49 Commits
Author SHA1 Message Date
Godopu 507ac1847b docs: add PLAN_HERDR.md and herdr_docs.md reference file 2026-07-19 16:18:09 +09:00
Godopu 945edbe837 docs: archive macOS Keychain and Preflight bypass review reports from cline and claude 2026-07-18 23:29:55 +09:00
Godopu 36b3910ff2 fix(mac-compat): bypass keyring auth check hang and link macOS Library/Keychains to isolated home 2026-07-18 23:23:40 +09:00
Godopu fc24af4683 docs: archive macOS compatibility review reports from cline and claude 2026-07-18 22:37:15 +09:00
Godopu f79fd99de7 fix(mac-compat): resolve absolute path of agent binary and strip macos quarantine attribute to prevent gatekeeper and path-resolution timeouts 2026-07-18 22:26:23 +09:00
Godopu 31ca11c57d docs: archive planning/review reports and issue report from previous multi-agent-mux-loop runs 2026-07-17 21:33:31 +09:00
Godopu b45649de76 feat(delegate-job): support role aliases mapping and run delegate job safely using isolated temp copy with signal cleanups 2026-07-17 17:07:30 +09:00
Godopu 5a6cb91fb0 feat(delegate-job): support --role parameter in submit and update commands to resolve role suitability mismatches 2026-07-17 15:59:14 +09:00
Godopu be46484108 fix(loop): fix wait_for_job hang bug and finalize Creator Self-Planning documentation 2026-07-17 15:51:37 +09:00
Godopu 6c903420d8 fix(skill): resolve hardcoded planner session name and plan file paths dynamically in run_loop.sh 2026-07-16 23:48:13 +09:00
Godopu f85fdfc1f9 docs(skill): genericize multi-agent-mux-loop SKILL manual by replacing hardcoded agent session names with placeholders 2026-07-16 23:46:27 +09:00
Godopu 52c270eea7 docs(skill): update multi-agent-mux-loop SKILL manual to reflect skipped planning mode when --plan is omitted 2026-07-16 23:43:53 +09:00
Godopu 7c94eefb6d docs: add development plan for MAM Web PTY WebSocket Bridge architecture 2026-07-16 23:34:23 +09:00
Godopu f0e2bd26c2 fix(ui): correct libc symbol lookup for direct _exit syscall to achieve async-signal-safety 2026-07-16 23:27:55 +09:00
Godopu 7f1a7e5a50 fix(ui): enforce async-signal-safe exit, blocking waitpid reaping, and unsetenv env isolation inside child PTY process 2026-07-16 23:20:59 +09:00
Godopu a6e4dc97a4 fix(ui): prevent Dart event loop freezing by switching master PTY fd to non-blocking mode via fcntl 2026-07-16 23:19:24 +09:00
Godopu 7781e797aa fix(ui): implement async-signal-safe fork process layout and waitpid child zombie reaping for PTY 2026-07-16 23:11:37 +09:00
Godopu f52f6eb2af fix(ui): resolve M2 blocking bugs with full POSIX fork/exec PTY spawn and tmux environment isolation 2026-07-16 22:56:19 +09:00
Godopu b7901bcce5 feat(ui): complete M2 Milestone - Desktop POSIX PTY FFI implementation and attach terminal tab integration 2026-07-16 22:50:59 +09:00
Godopu 7e4cab6c09 fix(ui): expose stale banner under cold-start failures when no successful snapshot exists 2026-07-16 21:21:07 +09:00
Godopu 7c981549a2 fix(ui): implement cached startup pre-flight check in SessionService and propagate errors in StaleBanner 2026-07-16 21:18:14 +09:00
Godopu 2eb85866b3 feat(ui): complete M1 Milestone - read-only Dashboard and Detail Pane with status.sh integration 2026-07-16 21:09:31 +09:00
Godopu 7d22774d76 feat(loop): allow run_loop.sh to automatically load existing plan if --plan is omitted 2026-07-16 20:54:38 +09:00
Godopu 9778f38d9f feat(ui): scaffold multi-agent-mux-ui monorepo structure with Flutter and Melos configurations 2026-07-16 17:30:03 +09:00
Godopu 39be8d7b43 docs(resume): remove obsolete, hardcoded resume_all.sh script 2026-07-16 15:42:08 +09:00
GodopuandClaude Sonnet 5 35fc44f269 fix(loop): repair review-diff/verdict-parsing bugs, deduplicate session lookups
Applies the P0-P3 fixes from the multi-agent-mux-loop audit
(.mam/jobs/ab686e47/claude-reports/report-final.md):

- P0-1: capture BASE_COMMIT before Phase 2 and diff against it, so reviewer
  diffs stay non-empty and cumulative even after the Creator commits per the
  documented DoD (bare `git diff` alone showed nothing once committed).
- P0-2: has_verdict now matches only the report's last non-blank line, so a
  stray [VERDICT: ...] token quoted mid-report as a formatting example can no
  longer flip the outcome.
- P1-1: replace the English-only refactor/complex/design/architect keyword
  sniff (dead code against Korean-language reviewer reports) with an explicit
  [ESCALATE: PLANNER] tag the reviewer prompt now asks for.
- P1-2: resolve_all_reviewers/resolve_agent_type/resolve_planner_session now
  read through lib.sh's load_state_json single source of truth instead of
  each hand-rolling its own SQLite+YAML lookup; resolve_agent_type's name
  fallback matches exact hyphen segments instead of a substring `in` check.
- P2-1: warn when --all-reviewer and --reviewer are both given, since the
  latter is silently discarded.
- P2-2: correct the SKILL.md CLI-mapping table row that overstated an
  automated lint gate and an unconditional Planner feedback loop.
- P3: fix lib.sh shellcheck SC2164 (unguarded cd in start_watchdog) and
  annotate the intentional SC2317 dual source/exec guard.

Verified: shellcheck clean on both scripts, bash -n syntax OK, and the
rewritten has_verdict/resolve_* functions were unit-tested against this
repo's live .mam/agent-sessions state.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-16 13:50:25 +09:00
Godopu 7fde1d2b8a docs(loop): merge multi_agent_workflow.md into SKILL.md, drop duplicate 2026-07-16 13:36:12 +09:00
Godopu 626f35adfc refactor: harden run_loop.sh verdict parser, add atomic promotion, and revise multi_agent_workflow.md guidelines 2026-07-16 12:57:56 +09:00
Godopu 230e262414 feat(stop): fully purge registry entries on stop --purge-conversation and add zombie pre-gate 2026-07-16 12:06:37 +09:00
Godopu dfdbf69187 fix(loop): correct self-relative REPO_ROOT depth in run_loop.sh 2026-07-16 12:06:37 +09:00
Godopu 9d0fbaec40 fix(deploy): remove deleted creator-claude agent from resume_all.sh 2026-07-16 11:29:57 +09:00
Godopu a671dfbb9d docs(deploy): append git repository recommendation to INSTALL.md 2026-07-16 11:25:50 +09:00
Godopu 91cd08b139 docs(deploy): add multi-agent-mux-loop quick start guide to INSTALL.md 2026-07-16 10:40:16 +09:00
Godopu 0f970b97fa fix(loop): address planner and reviewer architecture defects
- Fix B-1: Correct Mermaid sequence diagram syntax (fi -> end) in SKILL.md and PLAN_LOOP.md
- Fix B-2: Force target agent exclusion from active reviewers in run_loop.sh and correct creator session role in registry
- Fix B-3 & B-4: Integrate WAIT_TIMEOUT deadline inside wait_for_job
- Fix M-3: Update CHANGES_DIFF to use dynamic cumulative git diff
- Fix M-2: Resolve verdict string parsing and substring collisions
2026-07-16 08:28:57 +09:00
Godopu bacf139447 feat(skills): add multi-agent-mux-loop autonomous loop orchestrator
Implement a new autonomous planning-execution-review orchestration loop
supporting:
- Collaborative planning & creator-planner challenge discussions (--plan-talk)
- Self-planning and self-review fallbacks
- Custom reviewer target list and all-reviewer unanimous PASS verdicts
- API-cost runaway safety limits via --max-loop

Integrated inside deploy/install.sh checklist and deploy/gitea-ci.yml.
2026-07-16 08:12:24 +09:00
Godopu ff01984a69 docs(workflow): clarify agent standby behavior after PASS verdict
Update the multi-agent workflow guidelines to explicitly specify that
agent sessions should not be stopped automatically upon receiving a PASS
verdict. Instead, they must remain in a standby (running) state, awaiting
further task instructions from the user, consistent with the project's
lifecycle charter.
2026-07-12 23:18:30 +09:00
Godopu 787fe58298 fix(skills): robustify load_state_json against lone surrogates
Implement a clean_surrogates helper inside lib.sh's load_state_json function
to recursively replace lone surrogates (e.g. from partial TUI screen dumps)
with replacement chars before printing, preventing UnicodeEncodeError on stdout.
2026-07-12 17:19:44 +09:00
Godopu f8675ab377 docs(roadmap): sync FW-D4 path and lint count in FUTURE_WORKS
Correct scripts/generate-env.sh -> deploy/generate-env.sh and update shellcheck unlinted count in both English and Korean versions, as eb733cf already resolved the generate-env.sh lint gap.

Addresses Reviewer Claude's non-blocking nit.
2026-07-12 16:59:58 +09:00
Godopu eb733cf7c1 refactor(deploy): consolidate install scripts and INSTALL.md into deploy/
- Move scripts/install_mam.sh → deploy/install_mam.sh (local-clone installer)
- Move scripts/generate-env.sh → deploy/generate-env.sh (env helper)
- Move .agents/INSTALL.md → deploy/INSTALL.md (user manual)
- Update install_mam.sh to copy INSTALL.md + generate-env.sh from new paths
- Ship INSTALL.md via deploy/install.sh remote path too (manifest-tracked)
- Update README/BOOTSTRAP generate-env.sh references & repository ASCII layout
- Extend deploy/README.md structure section; extend gitea-ci.yml lint list
- Remove now-empty scripts/ directory
- Fix duplicate ### 2. subsection headers in deploy/README.md (address B-2)
- Correct deploy/INSTALL.md dependency description to match actual checks (address M-1)
- Add local-clone lifecycle caveat (no update.sh/remove.sh) (address M-2)

Closes the deploy consolidation plan and addresses Planner / Reviewer feedback.
2026-07-12 16:30:15 +09:00
Godopu 2d2510f391 refactor(lib): add robust TUI readiness tokens for cline
- Include 'What can I do' and 'slash commands' to grep search pattern
- Avoid false-positive timeouts when welcome screen branding logo is skipped
2026-07-12 15:44:01 +09:00
Godopu dc1a2718d1 refactor(lib): extend wait_for_tui_ready timeout to 30 seconds
- Allow slow-starting node standalone CLI processes to boot without false-positive timeouts
- Mitigate disk I/O constraints on isolated DB provisioning
2026-07-12 15:43:04 +09:00
Godopu 742e71b784 refactor(lib): map cline isolation paths directly to root without data subfolder
- Align symlink and copy paths directly under isolation root (no data/ intermediate directory)
- Correctly restore global settings and SQLite databases for standalone CLI execution
2026-07-12 15:42:21 +09:00
Godopu f1e754d73e refactor(lib): physically copy sqlite DBs instead of symlinking for cline
- Prevent sqlite DB locking errors across concurrent isolated sessions
- Use cp -p for files inside data/db/ during provision_isolation
2026-07-12 15:41:59 +09:00
Godopu a57ce0a1b8 refactor(lib): seed db/ subfolder for cline isolation to preserve oauth and provider states
- Symlink all database files inside data/db/ under isolation root
- Prevent cline CLI from bouncing back to the initial Welcome provider selection screen
2026-07-12 15:41:17 +09:00
Godopu ae8ea9b939 refactor(lib): target correct data subfolder for cline isolation seeding
- Place data/settings/ and data/globalState.json inside isolation root
- Align directories with cli --data-dir internal structure to prevent startup authentication crashes
2026-07-12 15:35:25 +09:00
Godopu 559240f3c8 refactor(create): force state isolation by default for new sessions
- Update default ISOLATE value to 1 in create_session.sh
- Add --no-isolate option to allow opting out of directory isolation if desired
- Keep --isolate flag for legacy syntax compatibility
2026-07-12 15:34:00 +09:00
Godopu ed126ba37f docs(install): drop broken PATH export and un-escape $UUID in resume guide
- Fix R-1 bug by dropping PATH='$PATH' to prevent PATH environment variable corruption
- Allow calling shell to expand $UUID inline prior to tmux spawn
2026-07-12 15:19:51 +09:00
Godopu 9182d89dbd docs(install): address R-1, R-2, and R-3 feedback in resume guidelines
- Align step label languages to Korean (R-2)
- Reintroduce -r $UUID and --dangerously-skip-permissions to claude spawn (R-1)
- Add isolation environment path mapping caveats pointing back to authorative SKILL.md (R-3)
2026-07-12 15:17:31 +09:00
Godopu 875740788a docs(install): clarify install pre-requisites and concrete resume command examples
- Add source repo clone pre-requisite statement in INSTALL.md section 2
- Incorporate concrete tmux new-session and update_yaml_resumed commands in INSTALL.md section 3
2026-07-12 14:52:30 +09:00
165 changed files with 12361 additions and 179 deletions
-105
View File
@@ -1,105 +0,0 @@
# Multi-Agent Collaboration Workflow Reference Guide
본 문서는 대규모 프로젝트나 정밀한 설계·구현 요구사항을 처리하기 위해 **Planner, Developer, Reviewer** 에이전트 간의 역할 분담 및 피드백 루프를 운영하는 **다중 에이전트 협업 워크플로우(Multi-Agent Collaboration Workflow)**를 정의합니다.
---
## 1. 역할 정의 및 분담 (Roles & Responsibilities)
협업 시스템은 각 에이전트의 책임 영역을 명확히 격리하여 상호 교차 검증을 강제합니다.
```
┌──────────────────────┐
│ User Prompt │
└──────────┬───────────┘
┌──────────────────────┐
│ 1. Planner Agent │ ◄──────────────────┐
│ - Plan & Checklist │ │
└──────────┬───────────┘ │
▼ │
┌──────────────────────┐ │
│ 2. Developer Agent │ │
│ - Code & DoD Verify │ │
└──────────┬───────────┘ │
▼ │ (NOT PASS Feedback)
┌──────────────────────┐ │
│ 3. Reviewer Agents │ │
│ - Dual Peer Review │ ───────────────────┘
└──────────┬───────────┘
▼ (PASS)
┌──────────────────────┐
│ 4. Done & Commit │
└──────────────────────┘
```
### 1.1. Planner Agent (설계 및 통제)
- **목적**: 요구사항을 명세화하고, 구현 단계의 설계 결함이나 모순(Contradiction)을 사전에 차단합니다.
- **역할**:
- 사용자 요구사항에 따른 구현 목표 및 범위 수립.
- `implementation_plan.md``task.md` (체크리스트) 작성 및 버전 관리(Rev.1, Rev.2, ...).
- 리뷰어 피드백 발생 시 설계 변경의 파급 범위를 계산하여 계획 갱신.
- **핵심 원칙**: 직접 코드를 수정하지 않고 오직 설계와 체크리스트 자산만 관리합니다.
### 1.2. Developer Agent (구현 및 자가 검증)
- **목적**: Planner가 제공한 체크리스트를 기반으로 실제 리포지토리 코드를 물리적으로 수정 및 구현합니다.
- **역할**:
- `task.md`를 순차적으로 완료 상태(`[x]`)로 업데이트하며 구현 수행.
- 커밋 전 **Definition of Done (DoD)** 체크리스트를 자체 실행하여 금지된 코드 패턴, 메모리/구조적 사이드 이펙트 유무 자가 검토.
- 수정 사항을 단일 원자적(Atomic) 커밋으로 마감하고 리뷰어에게 전달.
### 1.3. Reviewer Agents (교차 피드백 및 검증)
- **목적**: 구현된 결과물이 최초 설계서 및 학술적 제약 요건에 일치하는지 제3자의 관점에서 엄격하게 검토합니다.
- **역할**:
- **Reviewer A (Claude)**: 학술 서사와 코드 설계 간의 상위 논리적 정합성 및 결함(예: HOLB 해소 주장과 단일 커넥션 다이얼러의 모순 등) 검증.
- **Reviewer B (Cline)**: 전이 조건, 예외 처리, 타입 시그니처, 텔레메트리 매핑 등 하위 레벨 구현의 세부 사항 기계적 검증.
- **판정 규칙**: 두 리뷰어 모두 **PASS** 판정을 내릴 때까지 개발자는 마감할 수 없으며, 반려 시 **1단계(Planner)**로 피드백이 환류됩니다.
---
## 2. 세부 운영 단계 (Step-by-Step Workflow)
### 1단계: 설계 수립 (Planning Phase)
1. 사용자가 요구사항을 제시하면, **Planner 에이전트**가 프로젝트의 전반적인 구조를 파악합니다.
2. `implementation_plan.md``task.md`를 작성하여 개발을 위한 로드맵을 제공합니다.
3. 사용자가 해당 구현 계획을 승인하면 다음 단계로 이행합니다.
### 2단계: 코드 구현 및 자가 검증 (Development Phase)
1. **Developer 에이전트**가 배정된 태스크의 코드를 수정합니다.
2. 작업 진행 중 예상치 못한 설계 변경 필요성이 감지되면 작업을 멈추고 **Planner 에이전트**에게 계획 수정을 먼저 위임합니다.
3. 구현 완료 후 아래의 **DoD 검증**을 수행합니다:
- 핵심 기능의 타입 매핑 확인.
- 공유 자원(`tls.Config` 등) 변경 시 사이드 이펙트 방지(복제 후 변이 적용 등).
- 문서-코드 간 주장의 정합성 체크.
4. 검증 완료 후 단일 커밋을 작성합니다.
### 3단계: 피드백 루프 및 통과 (Review Phase)
1. Developer 에이전트가 리뷰어 세션에 작업 완료 사실과 변경 범위를 전달합니다.
2. 리뷰어들은 `git diff`를 바탕으로 개별 검증을 수행하고 보고서 형태의 리뷰 피드백을 출력합니다.
- **반려 (`NOT PASS`)** -> 피드백 요약본을 Planner 에이전트에게 전송하여 상위 레벨 계획(Rev.n) 개시.
- **통과 (`PASS`)** -> 모든 검토 사항이 해결되었음을 명시.
3. 모든 리뷰어가 PASS를 발행하면 작업을 완결하고 세션을 안전하게 종료(`multi-agent-mux-stop`)합니다.
---
## 3. Best Practices & 템플릿
### 3.1. 작업 시작 시 Planner 에이전트 프롬프트 템플릿
```
[역할 요구]
프로젝트의 구조 및 내용을 파악하고, 현재 작업 요건에 맞춰 구현 계획서(implementation_plan.md) 및 태스크 체크리스트(task.md)를 작성해 주세요.
[검토 초점]
- 설계 수준에서 논리적 모순이 발생할 여지가 없는지
- naive 구현과 대비되는 핵심 차별점이 코드 명세에 정확히 명시되었는지
```
### 3.2. 피드백 루프 환류 시 프롬프트 템플릿
```
Reviewer 검토 결과 구현 코드 차원에서 아래의 블로킹(NOT PASS) 피드백이 발생했습니다.
위 피드백을 수용하여 설계 문서를 수정하는 계획을 수립하고, implementation_plan.md (Rev.[N]) 및 task.md 내용을 업데이트해 주세요.
[피드백 내용]
- [블로킹 항목 1]
- [블로킹 항목 2]
```
+59
View File
@@ -0,0 +1,59 @@
# 📘 herdr_docs.md: Herdr 공식 문서 사이드맵 및 문서 구조 레퍼런스
이 문서는 AI 에이전트 인지형 멀티플렉서인 **herdr**의 공식 문서 구조 및 핵심 경로 링크들을 정리한 참고서입니다. 개발 과정 및 스킬 설계 시 참조용 사양으로 활용합니다.
---
## 🔗 Herdr 공식 문서 사이트 구조
공식 홈페이지 및 메인 설명: **[herdr.dev](https://herdr.dev)**
### 1. 🚀 시작하기 (Start here)
* **Overview (개요)**: [herdr.dev/docs/](https://herdr.dev/docs/)
* Herdr의 도입 목적 및 핵심 철학
* **Install (설치 방법)**: [herdr.dev/docs/install/](https://herdr.dev/docs/install/)
* 시스템 요구사항 및 바이너리 설치 스크립트 제공
* **Quick start (빠른 시작)**: [herdr.dev/docs/quick-start/](https://herdr.dev/docs/quick-start/)
* 기본 워크스페이스 생성 및 에이전트 실행 예시
* **Concepts (핵심 개념)**: [herdr.dev/docs/concepts/](https://herdr.dev/docs/concepts/)
* 에이전트 인지식 터미널 구조, Pane, Tab, Workspace 관계
* **Keyboard (키보드 단축키)**: [herdr.dev/docs/keyboard/](https://herdr.dev/docs/keyboard/)
* 멀티플렉서 제어를 위한 주요 기본 단축키 목록
### 2. 🤖 Herdr 실무 활용 (Using Herdr)
* **How to work with Herdr (작업 워크플로우)**: [herdr.dev/docs/how-to-work/](https://herdr.dev/docs/how-to-work/)
* 개발자와 에이전트 간의 화면 분할 및 협업 모범 사례
* **Agents (에이전트 제어)**: [herdr.dev/docs/agents/](https://herdr.dev/docs/agents/)
* Claude Code, Cline, Agy 등 주요 코딩 에이전트 실행 및 연동 규칙
* **Session state and restore (세션 상태 및 복원)**: [herdr.dev/docs/session-state/](https://herdr.dev/docs/session-state/)
* 호스트 리부팅 및 연결 유실 시 대화 상태 원자적 백업 및 복원
* **Persistence and remote access (영속성 및 원격 접속)**: [herdr.dev/docs/persistence-remote/](https://herdr.dev/docs/persistence-remote/)
* 백그라운드 영속 구동 및 원격 터미널에서의 Attach 방법
### 3. ⚙️ 설정 가이드 (Configure)
* **Configuration (설정 기초)**: [herdr.dev/docs/configuration/](https://herdr.dev/docs/configuration/)
* 사용자 프로필 설정 및 환경 변수 연동
* **Config reference (설정 참조)**: [herdr.dev/docs/config-reference/](https://herdr.dev/docs/config-reference/)
* `config.toml` 구조 및 전역 키 맵 변경 스펙
* **Plugins (플러그인)**: [herdr.dev/docs/plugins/](https://herdr.dev/docs/plugins/)
* Herdr 확장용 플러그인 사양 및 연동
* **Marketplace (마켓플레이스)**: [herdr.dev/docs/marketplace/](https://herdr.dev/docs/marketplace/)
* 커뮤니티 플러그인 공유 및 다운로드
### 4. 📚 레퍼런스 및 사양 (Reference)
* **CLI reference (명령어 참조)**: [herdr.dev/docs/cli-reference/](https://herdr.dev/docs/cli-reference/)
* `herdr run`, `herdr capture`, `herdr kill` 등 CLI 인자 설명
* **Socket API (소켓 API)**: [herdr.dev/docs/socket-api/](https://herdr.dev/docs/socket-api/)
* 프로그래밍 방식으로 창 분할, 입력 전송, 상태 조회를 수행하기 위한 로컬 Unix 소켓 규격
* **Integrations (외부 연동)**: [herdr.dev/docs/integrations/](https://herdr.dev/docs/integrations/)
* CI/CD 환경 및 외부 IDE 어댑터 연동 방안
* **Agent skill file (에이전트 스킬 파일)**: [herdr.dev/docs/agent-skill/](https://herdr.dev/docs/agent-skill/)
* 에이전트가 자체적으로 Herdr 환경을 진단할 때 읽는 규칙 정의
* **Windows beta (윈도우 베타)**: [herdr.dev/docs/windows-beta/](https://herdr.dev/docs/windows-beta/)
* Windows 환경 구동 현황 및 제약 사항
### 5. 🚑 문제 해결 및 기타 (Help)
* **Troubleshooting (문제 해결)**: [herdr.dev/docs/troubleshooting/](https://herdr.dev/docs/troubleshooting/)
* 인증 실패, PTY 블로킹, 세션 크래시 자가 진단 및 대처법
* **Preview docs (프리뷰 문서)**: [herdr.dev/docs/preview/](https://herdr.dev/docs/preview/)
* 차기 업데이트 예정 기능 문서
@@ -0,0 +1,46 @@
# 리뷰 리포트 — Job 20a83d73
- **리뷰 대상**: 커밋 `f79fd99``create_session.sh` / `resume_session.sh`에 에이전트 바이너리 절대 경로 해석(`command -v`) 및 macOS 격리 속성 해제(`xattr -d com.apple.quarantine`) 추가로 macOS 타임아웃 오류 수정
- **리뷰어**: claude (planner-reviewer)
- **리뷰 방식**: 정적 분석(bash -n, shellcheck 기준선 대비) + 격리 tmux 서버에서의 실제 실행 재현 검증
## 1. 설계 타당성 — 실행으로 검증함
macOS에서의 실제 고장 메커니즘은 "tmux 서버가 축소된 PATH로 기동 → pane에서 `claude`/`agy` 미발견 → pane 즉사 → `wait_for_tui_ready` 타임아웃"이다. 이 메커니즘과 수정 효과를 Linux에서 격리 tmux 서버(`-L mam_rev_20a83d73`, `env -i PATH=/usr/bin:/bin`)로 직접 재현했다:
- **Case A (수정 전 시나리오)**: PATH 밖의 가짜 에이전트를 bare name으로 `new-session`**pane 즉사 확인** (타임아웃 전조 재현 성공).
- **Case B (수정 후 시나리오)**: 동일 조건에서 절대 경로로 `new-session`**세션 생존 + 에이전트 실제 실행 확인** (마커 파일 기록됨).
호출 스크립트(전체 PATH 보유) 시점에 `command -v`로 해석해 절대 경로를 명령 문자열에 굽는 설계는 이 문제의 정확한 해법이다. Gatekeeper quarantine 해제도 macOS 최초 실행 지연/행에 대한 합리적 보완책이다(Darwin 전용 가드로 Linux 무영향).
## 2. 정적 분석
- `bash -n` 양 파일 통과.
- `shellcheck -S warning`: 변경 전 기준선(31ca11c 시점 파일을 추출해 비교) 대비 **신규 경고 0건**. `resume_session.sh:40`의 SC2155 1건은 이번 diff와 무관한 기존 경고로 변화 없음.
## 3. 동작성 검증 (실행 기반)
- **해석 스니펫 단독 실행**: PATH에 있는 `claude``/home/godopu16/.local/bin/claude`로 정상 해석. PATH에 없는 이름 → bare name으로 안전한 폴백, `set -euo pipefail` 하에서 exit 0 (조건문 내 `command -v` 실패가 set -e를 트립하지 않음을 실측).
- **실제 스크립트 스모크**: `create_session.sh --dry-run`(실제 claude 에이전트, 격리 서버명 지정)으로 신규 블록 포함 전체 경로가 exit 0으로 통과 — 부수효과 없이 CMD_FULL 확정 지점까지 실행됨.
- **xattr 안전성**: Darwin 가드로 Linux에서 완전 스킵. macOS에서 `xattr` 부재/실패 시에도 `2>/dev/null || true` 패턴이 `set -e`를 트립하지 않음을 동형 재현으로 확인. `[ -f "$RESOLVED_BIN" ]` 가드 덕에 미해석(bare name) 상태에서는 실행 자체가 스킵됨.
## 4. 유실 검사
- 4개 에이전트(claude/agy/hermes/cline)의 플래그(`--dangerously-skip-permissions`, `-i`, `-r/--conversation/--resume/--id $UUID`) 및 `ISO_ENV_PREFIX`/`ISO_CMD_ARGS` 배치가 변경 전과 전부 동일하게 보존됨. cline이 env prefix를 받지 않는 기존 비대칭도 그대로 유지(회귀 없음).
- claude wrapper 경로(비격리 시 `~/.local/bin/<session>` 우선)는 양 스크립트 모두 변경되지 않음.
- 다운스트림 영향: drift 클래스 AD(reconcile.sh)와 status.sh는 `cmd_full`/`start_command`를 비교 로직에 사용하지 않고 표시용으로만 전달함을 확인 — 절대 경로가 들어가도 오탐 없음.
## 5. 비차단(Non-blocking) 지적 사항
1. **경로 내 공백 취약**`RESOLVED_BIN`이 공백 포함 경로로 해석되면 CMD_FULL이 깨짐을 격리 tmux에서 실측으로 확인(pane 즉사). 다만 대상 CLI들의 표준 설치 경로(`/opt/homebrew/bin`, `~/.local/bin`, npm global 등)에는 공백이 없고 macOS 홈 디렉터리 short name에도 공백이 없어 실사용 확률은 낮음. 후속 개선 시 `printf %q` 또는 인용 부호 처리를 권장(단, resume 쪽 `eval` 이중 해석 계층 고려 필요).
2. **중복 분기**`cline` 분기와 else 분기가 기능적으로 완전 동일(`command -v cline` == `command -v "$AGENT"` when AGENT=cline). 동작 문제는 없으나 단순화 여지 있음(양 파일 공통).
3. **resume 후 메타데이터 불일치(외관상)**`update_yaml_resumed.sh`가 resume 후 `cmd_full`을 bare name 형태로 되써서, 실제 pane은 절대 경로로 실행됐는데 YAML 기록은 bare name이 됨. 비교 로직에 쓰이지 않는 표시 전용 필드라 실해는 없음.
4. **macOS 실기기 미검증** — 본 리뷰 환경은 Linux이므로 `xattr` 실효(quarantine 속성 실제 제거) 자체는 실측 불가. 가드/에러 억제 로직의 안전성은 동형 재현으로 확인했고, 명령·플래그는 표준 macOS 관행과 일치함.
참고: 리뷰 중 발견된 저장소 내 `multi-agent-mux-delegate-job.27194_12342.tmp` 파일은 고아 파일이 아니라 **본 job(20a83d73)을 디스패치 중인 살아있는 delegate_job_safe 임시 사본**(PID 확인됨)으로, 직전 라운드에서 검증한 trap 정리 대상이다. 결함 아님.
## 6. 결론
수정의 핵심 메커니즘(절대 경로 baking)이 재현 실험으로 실효성이 입증되었고, 기존 동작 유실·신규 경고·다운스트림 회귀가 전무하다. 비차단 지적 4건은 모두 후속 개선 수준이며 설계 재작업이 필요한 사항은 없다.
[VERDICT: PASS]
@@ -0,0 +1,95 @@
# ✅ Peer Review Report: multi-agent-mux-loop SKILL.md & run_loop.sh Refactoring (Commits 52c270e, f85fdfc, 6c90342)
**Job**: `47d1dce6` · **Reviewer**: Reviewer B (Cline, `canary-projects-multi-agent-mux-reviewer-cline`)
**Review Targets**:
- Commit `52c270e` — "docs(skill): update multi-agent-mux-loop SKILL manual to reflect skipped planning mode when --plan is omitted"
- Commit `f85fdfc` — "docs(skill): genericize multi-agent-mux-loop SKILL manual by replacing hardcoded agent session names with placeholders"
- Commit `6c90342` — "fix(skill): resolve hardcoded planner session name and plan file paths dynamically in run_loop.sh"
**Prior Context**: PTY 리뷰 5회차 완료 (cc09bae5 PASS). 본 잡은 multi-agent-mux-loop 오케스트레이션 스킬의 문서/스크립트 리팩토링 리뷰.
**Plan Reference**: `.agents/reports/canary-projects-multi-agent-mux-planner-reviewer-claude/report-final.md` (Rev.3)
**Review Scope**: 브리프가 요청한 "잠재적인 문법 오류나 셸 스크립트 오작동 여부 꼼꼼한 검토"
**Method**: 라인 단위 diff 분석 + `bash -n` 문법 검사 + `shellcheck` 정적 분석 + Python 임베디드 코드 4시나리오 런타임实证 + Self-Planning Mode bash 로직 3시나리오 `set -euo pipefail` 시뮬레이션 + mermaid 다이어그램 문법 검증 + 플레이스홀더 일관성 교차 검증
---
## 1. 커밋 개요
3개 커밋이 multi-agent-mux-loop 오케스트레이션 스킬의 문서와 스크립트를 리팩토링:
| 커밋 | 파일 | 변경량 | 내용 |
|------|------|--------|------|
| 52c270e | SKILL.md | 문서 | 계획 생략 모드 설명 업데이트 + mermaid 시퀀스 다이어그램 "Use Existing Plan (No --plan)" 분기 추가 |
| f85fdfc | SKILL.md | 문서 | 하드코딩 에이전트명 → 범용 플레이스홀더(`<creator-session-name>`, `<reviewer-session-name>`) 정제 |
| 6c90342 | run_loop.sh | +5/-3 | 하드코딩 fallback 플래너 세션명/계획 파일 경로 → 동적 `$PLANNER_SESSION` 변수 기반 리팩토링 |
---
## 2. 핵심 검증: run_loop.sh 셸 스크립트 (6c90342)
### 2.1 정적 분석 — ✅ 통과
| 검증 | 방법 | 결과 |
|------|------|------|
| bash 문법 검사 | `bash -n run_loop.sh` | ✅ SYNTAX OK |
| shellcheck (기본) | `shellcheck run_loop.sh` | ✅ EXIT 0 (경고/에러 전무) |
| shellcheck (-x 외부 소스 제외) | `shellcheck -x -S warning run_loop.sh` | ✅ EXIT 0 |
| shellcheck 버전 | 0.11.0 | 최신 분석 도구 |
**평가**: ✅ 셸 스크립트 정적 분석 완벽 통과. 문법 오류, 미정의 변수, 인용 오류, 조건부 파이프라인 등 shellcheck가 감지할 수 있는 모든 결함이 전무.
### 2.2 변경 1: `resolve_planner_session` 함수 (라인 185 영역)
**diff**:
```diff
-planner = 'canary-projects-multi-agent-mux-planner-reviewer-claude'
+planner = ''
for s in d.get('tmux_sessions', []):
if 'planner' in s.get('role', ''):
planner = s.get('name')
```
**분석**: 하드코딩된 플래너 세션명을 빈 문자열 초기값으로 변경. 이후 루프가 `tmux_sessions` 배열에서 `role`에 'planner'가 포함된 세션을 동적으로 검색하여 할당. 찾지 못하면 빈 문자열 반환.
**Python 임베디드 코드 런타임实证 (4시나리오)**:
| 시나리오 | 입력 MAM_STATE_JSON | 출력 | 기대 | 결과 |
|----------|---------------------|------|------|------|
| 1. 플래너 발견 | `{tmux_sessions:[{name:test-creator,role:creator},{name:test-planner-xyz,role:planner}]}` | `test-planner-xyz` | 동적 세션명 | ✅ |
| 2. 플래너 없음 | `{tmux_sessions:[{name:test-creator,role:creator}]}` | ``(빈) | 빈 문자열 | ✅ |
| 3. 빈 상태 | `{}` | ``(빈) | 빈 문자열 | ✅ |
| 4. env var 없음 | unset | ``(빈) | 빈 문자열 | ✅ |
**평가**: ✅ Python 임베디드 코드가 4가지 시나리오에서 모두 올바르게 동작. 동적 세션명 할당 및 빈 문자열 안전 반환 확인.
### 2.3 변경 2: Self-Planning Mode 계획 파일 로드 (라인 312 영역)
**diff**:
```diff
- EXISTING_PLAN_FILE=".agents/reports/canary-projects-multi-agent-mux-planner-reviewer-claude/report-final.md"
- if [ -f "$EXISTING_PLAN_FILE" ]; then
+ EXISTING_PLAN_FILE=""
+ if [ -n "$PLANNER_SESSION" ]; then
+ EXISTING_PLAN_FILE=".agents/reports/$PLANNER_SESSION/report-final.md"
+ fi
+ if [ -n "$EXISTING_PLAN_FILE" ] && [ -f "$EXISTING_PLAN_FILE" ]; then
```
**분석**: 하드코딩된 경로를 `$PLANNER_SESSION` 동적 변수 기반 경로로 변경. 2단계 가드 추가:
1. `[ -n "$PLANNER_SESSION" ]` — 빈 세션명이면 경로 구성 스킵
2. `[ -n "$EXISTING_PLAN_FILE" ] && [ -f "$EXISTING_PLAN_FILE" ]` — 빈 경로이거나 파일이 없으면 로드 스킵
**변수 할당 흐름 추적**:
- `PLANNER_SESSION`는 라인 211에서 `resolve_planner_session()` 호출로 할당 — Self-Planning Mode(라인 312) **이전**에 실행 ✅
- `CURRENT_PLAN`는 라인 213에서 `CURRENT_PLAN=""`로 초기화 — `set -u` (nounset) 오류 방지 ✅
- 라인 335: `if [ -n "$CURRENT_PLAN" ]` — 빈 문자열이면 false → `EXECUTION_PROMPT`에 계획서 미포함 ✅
- 라인 543: `if [ "$PLAN_MODE" = true ] && [ -n "${CURRENT_PLAN:-}" ]` — `${CURRENT_PLAN:-}` 기본값 확장으로 `set -u` 추가 방어 ✅
**Self-Planning Mode bash 로직 시뮬레이션 (3시나리오, `set -euo pipefail` 하)**:
| 시나리오 | PLANNER_SESSION | 동작 | CURRENT_PLAN | 결과 |
|----------|-----------------|------|--------------|------|
| 1. 실제 플래너 (파일 존재) | `canary-...-planner-reviewer-claude` | 계획 로드 | 2220자 | ✅ |
| 2. 빈 문자열 | `` | 파일 로드 스킵 | 0자 | ✅ |
| 3. 다른 플래너 (파일 없음) | `some-other-planner` | 파일 없음 스킵 | 0자 | ✅ |
**평가**: ✅ `set -euo pipefail` (특히 `set -u` nounset) 하에서 3가지 시나리오 모두 에러 없이 통과. 변수 안전성 확보. 2단계 가드 로직이 빈 세션명/존재하지 않는 파일을 올바르게 처리.
@@ -0,0 +1,138 @@
# ✅ Peer Review Report: M2 PTY _exit Syscall Symbol Correction (Commit f0e2bd2)
**Job**: `cc09bae5` · **Reviewer**: Reviewer B (Cline, `canary-projects-multi-agent-mux-reviewer-cline`)
**Review Target**: Commit `f0e2bd2` — "fix(ui): correct libc symbol lookup for direct _exit syscall to achieve async-signal-safety"
**Prior Reviews**:
- Job `66ec158f` (b7901bc) → 3 BLOCKING 결함 지적
- Job `fcf4c9d0` (f52f6eb) → DEFECT 1/2 해결, DEFECT 3 미해결
- Job `7448cb2f` (7781e79) → async-signal-safety/waitpid 해결, DEFECT 3 미해결 (3회차)
- Job `ef0b32ff` (7f1a7e5) → **DEFECT 3 해결 (4회차) + 모든 결함 PASS** — 본 커밋은 ef0b32ff 리뷰의 NON-BLOCKING 관찰 #1 정밀 수정
**Plan Reference**: `.agents/reports/canary-projects-multi-agent-mux-planner-reviewer-claude/report-final.md` (Rev.3, §6.7 PTY 메커니즘 / §10 DoD)
**Review Scope**: 브리프가 명시한 `cExit` lookup 심볼 오타 수정 (`'exit'``'_exit'`) 검증 + 회귀 확인
**Method**: 라인 단위 diff 분석 + `dart analyze`/`flutter analyze`/`dart test` + **`_exit` 심볼 glibc resolve实证** + TMUX env 격리 회귀实证
---
## 1. 커밋 개요
커밋 `f0e2bd2`는 이전 리뷰(ef0b32ff)의 NON-BLOCKING 관찰 #1을 정밀 수정. 1개 파일, +1/-1행 (단일 라인 변경).
**변경 내용** (`pty_session.dart:111`):
```diff
- final cExit = libc.lookupFunction<_exit_c, _exit_dart>('exit');
+ final cExit = libc.lookupFunction<_exit_c, _exit_dart>('_exit');
```
---
## 2. 수정 항목 교차 검증
### 2.1 이전 리뷰 관찰 (ef0b32ff, NON-BLOCKING #1)
> **`cExit` lookup 이름 (정확성)**: 라인 111 `lookup('exit')`는 C `exit()`를 바인딩 (async-signal-unsafe, atexit handlers 실행). 브리프가 "libc exit syscall"이라고 서술했으나, 진정한 async-signal-safe는 `lookup('_exit')` 또는 `lookup('_Exit')`. 단, 자식이 fork 직후이므로 Dart 런타임 atexit handlers가 미등록 상태이며, 기능적으로 자식 종료를 달성하므로 실질적 영향 없음. 향후 정확성을 위해 `_exit` 권장.
### 2.2 수정 검증
**diff 분석**: 라인 111에서 `lookup('exit')``lookup('_exit')`로 정확히 1행 수정. 다른 라인 무변경 ✅.
**C `exit()` vs `_exit()` 구분**:
- `exit(int status)` (stdlib.h): async-signal-**unsafe** — `atexit()` 등록 핸들러 실행, `stdio` 버퍼 flush, `_exit()` 최종 호출
- `_exit(int status)` (unistd.h): async-signal-**safe** — 커널 syscall 직접 호출, 버퍼 flush/handlers 미실행
POSIX async-signal-safety 규칙에 따르면, fork 후 exec 실패 시 자식에서 호출할 수 있는 함수는 async-signal-safe 목록에 있는 함수만. `_exit()`는 이 목록에 포함되나, `exit()`는 포함되지 않음. 본 수정으로 자식 분기의 예외 퇴장 경로(`cExit(-1)` at 라인 192, `cExit(-2)` at 라인 211)가 진정한 async-signal-safe `_exit` syscall을 사용하게 됨.
**FFI 시그니처 일관성**: typedef `_exit_c = ffi.Void Function(ffi.Int32 status)` / `_exit_dart = void Function(int status)`는 C `_exit(int)` 시그니처와 정확히 일치 ✅. 변경 전에도 시그니처는 `_exit` 기준이었으나 lookup 이름만 `exit`였던 불일치가 해결됨.
---
## 3. `_exit` 심볼 glibc resolve实证
**검증 방법**: `nm -D /lib/x86_64-linux-gnu/libc.so.6`로 glibc에서 `_exit` 심볼 존재 확인 + Dart FFI `lookupFunction<_exit_c, _exit_dart>('_exit')` 실행实证.
**결과 1 — glibc 심볼 확인**:
```
$ nm -D /lib/x86_64-linux-gnu/libc.so.6 | grep -w '_exit'
00000000000f7480 T _exit@@GLIBC_2.2.5
```
`T` (Text segment, exported symbol) — `_exit`가 glibc에 존재하며 export됨 ✅.
**결과 2 — Dart FFI lookup实证**:
```
SUCCESS: _exit symbol resolved from libc.so.6 - async-signal-safe exit syscall available
(lookupFunction throws if symbol not found, so reaching here means _exit is bound)
```
`lookupFunction<_exit_c, _exit_dart>('_exit')`가 예외 없이 성공 — 런타임에 `_exit` 심볼이 올바르게 바인딩됨을实证 ✅. `lookupFunction`은 심볼을 찾지 못하면 `ArgumentError`를 throw하므로, 정상 실행 자체가 resolve 성공의 증거.
**평가**: ✅ `lookup('_exit')`가 glibc의 `_exit@@GLIBC_2.2.5` 심볼을 올바르게 바인딩. 런타임에 자식 분기의 `cExit(-1)`/`cExit(-2)` 호출이 진정한 async-signal-safe `_exit` syscall을 기동함.
---
## 4. 정적 분석 및 회귀 검증
| 항목 | 검증 방법 | 결과 |
|------|----------|------|
| `dart analyze` (mam_pty) | 실행 | ✅ No issues found! |
| `flutter analyze` (mam_desktop) | 실행 | ✅ No issues found! |
| M1 회귀 (`dart test` mam_core) | 실행 | ✅ 3/3 All tests passed |
| 런타임 PTY 동작 (`dart test` echo) | 실행 | ✅ echo `hello-pty-ok` 출력 정상 |
| DEFECT 3 TMUX env 격리 (회귀) | 런타임实证 (TMUX 설정 + printenv) | ✅ PASS — 자식 printenv 빈 출력 (회귀 없음) |
| `_exit` 심볼 glibc resolve | `nm -D` + Dart FFI lookup实证 | ✅ `_exit@@GLIBC_2.2.5` 바인딩 성공 |
| 기존 스크립트 회귀 | git diff --stat | ✅ status.sh 외 기존 스크립트 무변경 |
**전체 테스트 실행 결과** (부모에 `TMUX=fake-server,12345,0 TMUX_PANE=%5` 설정):
```
00:00 +0: test/pty_runtime_test.dart: PtySession runtime execution resolves process output
PTY Runtime stdout verified: hello-pty-ok
00:00 +1: test/pty_runtime_test.dart: PtySession strips TMUX/TMUX_PANE from child environment
printenv TMUX TMUX_PANE output: []
00:00 +2: All tests passed!
```
이전 리뷰(ef0b32ff)에서 PASS 판정된 모든 기능이 회귀 없이 유지됨:
- DEFECT 1 (/proc/self/fd 경로): ✅ 유지
- DEFECT 2 (자식 stdio PTY 연결): ✅ 유지
- DEFECT 3 (TMUX env 격리, unsetenv): ✅ 유지 (회귀 없음)
- async-signal-safety: ✅ 유지 + `_exit` 정확성 향상
- waitpid zombie reaping (blocking): ✅ 유지
- non-blocking master fd (fcntl): ✅ 유지
---
## 5. AGENTS.md 원칙 검증
- **Surgical Changes (§3)**: 단일 라인 수정 (`'exit'``'_exit'`) — 이전 리뷰 관찰에 정확히 대응하는 최소 변경 ✅. 다른 코드/포맷/주석 무변경. "Every changed line should trace directly to the user's request" — 본 수정은 1행이며 리뷰 관찰 #1에 직접 추적됨.
- **Simplicity First (§2)**: 단일 라인 정밀 수정 — 더 단순할 수 없는 최소 변경 ✅.
- **Goal-Driven Execution (§4)**: 본 수정의 성공 기준은 "async-signal-safe `_exit` syscall 바인딩" → `nm -D` + Dart FFI lookup实证으로 검증 완료 ✅.
- **Think Before Coding (§1)**: 이전 리뷰(ef0b32ff)에서 `exit()` vs `_exit()`의 async-signal-safety 차이를 명확히 지적했으며, 주 개발자가 이를 정확히 이해하고 수정 — §1 원칙 이행.
---
## 6. 종합 평가
커밋 `f0e2bd2`는 이전 리뷰(ef0b32ff)의 NON-BLOCKING 관찰 #1을 **정확히 단일 라인으로 해결**:
### 수정 항목 — 해결
1.**`cExit` lookup 심볼 정확성**: `lookup('exit')``lookup('_exit')`로 수정. C `exit()` (async-signal-unsafe, atexit handlers 실행) 대신 C `_exit()` (async-signal-safe, 커널 syscall 직접 호출)를 바인딩. 자식 분기의 예외 퇴장 경로(`cExit(-1)` slave open 실패, `cExit(-2)` execvp 실패)가 진정한 async-signal-safe `_exit` syscall을 사용.
### 검증 결과
- `dart analyze`: No issues found ✅
- `flutter analyze`: No issues found ✅
- M1 회귀: 3/3 All tests passed ✅
- 런타임 PTY echo: 정상 동작 ✅
- 런타임 TMUX env 격리: ✅ PASS (회귀 없음)
- **`_exit` 심볼 glibc resolve实证**: ✅ `_exit@@GLIBC_2.2.5` 바인딩 성공 (nm -D + Dart FFI lookup)
- 기존 스크립트 회귀: 없음 ✅
### 전체 리뷰 이력 (5회차 누적)
| 회차 | 커밋 | 판정 | 핵심 |
|------|------|------|------|
| 1 (66ec158f) | b7901bc | NOT PASS | 3 BLOCKING 결함 지적 |
| 2 (fcf4c9d0) | f52f6eb | NOT PASS | DEFECT 1/2 해결, DEFECT 3 미해결 |
| 3 (7448cb2f) | 7781e79 | NOT PASS | async-signal-safety/waitpid 해결, DEFECT 3 미해결 |
| 4 (ef0b32ff) | 7f1a7e5 | **PASS** | DEFECT 3 해결 (unsetenv), 모든 결함 해결 |
| 5 (본 리뷰) | f0e2bd2 | **PASS** | NON-BLOCKING 관찰 #1 정밀 수정 (_exit 심볼) |
ef0b32ff에서 PASS 판정된 모든 기능이 회귀 없이 유지되며, 추가로 `_exit` syscall 바인딩 정확성이 향상됨. M2 마일스톤(Desktop PTY 연동 + attach terminal tab)의 모든 핵심 계약(§6.7 PTY 메커니즘, §10 DoD)이 런타임实证으로 검증됨. 정적 분석과 런타임实证 테스트가 모두 통과.
[VERDICT: PASS]
@@ -0,0 +1,179 @@
# ✅ Peer Review Report: M1 Dashboard & Detail Pane Implementation (Commit 2eb8586)
**Job**: `cb97a36f` · **Reviewer**: Reviewer B (Cline, `canary-projects-multi-agent-mux-reviewer-cline`)
**Review Target**: Commit `2eb8586` — "feat(ui): complete M1 Milestone - read-only Dashboard and Detail Pane with status.sh integration"
**Plan Reference**: `.agents/reports/canary-projects-multi-agent-mux-planner-reviewer-claude/report-final.md` (Rev.3 — Flutter 전면 재작성 계획서)
**Review Scope**: 계획서에 입각하여 제출된 코드가 안전하고 모순 없이 구현되었는지 교차 검증 (구현하지 않음, 리뷰만 수행)
**Method**: 계획서 §3(D8), §5(아키텍처), §6(예외처리/보안 계약), §10(DoD)를 실제 커밋 코드와 라인 단위 교차 검증 + 라이브 실행实证 + Dart 테스트/정적 분석 실행
---
## 1. 커밋 개요
커밋 `2eb8586`는 M1 마일스톤(읽기 전용 대시보드 + Detail Pane)을 구현. 22개 파일, +1941/-326행. 핵심 변경:
- `status.sh` additive 스키마 확장 (D8 해법 구현, +103/-5행)
- `packages/mam_core/` — 순수 Dart 데이터/서비스 계층 (models, command_runner, session_service, status_repository)
- `apps/mam_desktop/` — Flutter Desktop UI (main, session_table, detail_pane, stale_banner, providers, theme, status_script_locator)
- `packages/mam_core/test/session_service_test.dart` — 3개 단위 테스트
---
## 2. D8 — `status.sh --json` additive 스키마 확장 (§3.1) 검증
**계획서 요구**: 기존 5개 키(timestamp/yaml_path/tmux_sessions_alive/tmux_confirmed/drifts/actions) 무변경 + 신규 `sessions_detail` 키 추가. 텍스트 모드 byte-identical 회귀 없음.
**라이브 실행实证**:
```
$ bash status.sh --json | python3 -m json.tool
top keys: ['timestamp', 'yaml_path', 'tmux_sessions_alive', 'tmux_confirmed', 'drifts', 'actions', 'sessions_detail']
sessions_detail count: 2
sessions_detail[0] keys: ['name', 'server', 'status', 'tmux_alive', 'cmd', 'role', 'resume_state',
'job_id', 'job_status', 'pane_cwd', 'attach_command', 'drift_classes', 'pane_pid', 'cmd_full',
'start_command', 'last_visible_status']
```
- 기존 6개 키(timestamp/yaml_path/tmux_sessions_alive/tmux_confirmed/drifts/actions) **전부 보존**
- 신규 `sessions_detail` 키 추가 ✅
- `sessions_detail` 필드가 계획서 §3.1의 D8 계약(name/server/status/tmux_alive/cmd/role/resume_state/job_id/job_status/pane_cwd/attach_command/drift_classes)과 **field-for-field 일치**
- additive beyond D8: `pane_pid`/`cmd_full`/`start_command`/`last_visible_status` — Detail Pane용 추가 필드, 계획서가 "세션명/워크스페이스 등을 계산하는 부분"이라 명시한 범위 내 ✅
**텍스트 모드 회귀 검증 (DoD-1)**:
```
$ diff <(old status.sh text output) <(new status.sh text output)
1c1
< agent-sessions status — 2026-07-16T12:16:37Z (tmux_confirmed=True)
---
> agent-sessions status — 2026-07-16T12:16:38Z (tmux_confirmed=True)
```
유일한 차이는 타임스탬프(1초) — 본문 byte-identical ✅. git diff 분석: 변경은 `--json` 분기(조기 exit 제거 + 새 Python 블록 추가)에만 국한, 텍스트 모드 Python 블록(라인 31~119)은 **무변경** ✅.
---
## 3. 아키텍처 준수 (§5) 검증
### 3.1 모노레포 패키지 구조 (§5.2)
**검증**: `packages/mam_core/`(순수 Dart, Flutter 비의존) + `apps/mam_desktop/`(Flutter Desktop) 분리 구현 ✅. `mam_core``dart:io`/`dart:convert`/`package:meta`만 의존하고 Flutter 엔진 의존성이 없음을 확인 — 헤드리스 실행 가능 원칙 준수. `mam_core.dart` barrel export가 models/services/command_runner를 깔끔히 노출.
### 3.2 `command_runner.dart` — 유일한 서브프로세스 실행 지점 (§6.1, D5)
**검증**:
- `Process.start(argv.first, argv.sublist(1), runInShell: false)` — argv list 강제, `runInShell: false` 명시 ✅ (D5 계약)
- `Future.any([exitFuture, Future.delayed(timeout)])`로 클라이언트측 타임아웃 강제 ✅ (§6.1)
- `killOnTimeout` 파라미터: `true`면 SIGTERM→5s→SIGKILL, `false`면 프로세스 백그라운드 완주 + `backgroundFuture` 반환 ✅ (D-Critical purge 계약)
- `CommandResult``timedOut`/`backgroundFuture` 필드로 타임아웃 상태 명확히 구분 ✅
**평가**: ✅ §6.1 의사코드 계약을 정확히 구현. D5(명령 주입 방지) + D-Critical(purge 원자성 보존) 모두 충족.
### 3.3 `status_repository.dart` — 폴링 + stale/backoff (§6.6, D6)
**검증**:
- `Stream<SessionsPoll> watch()` — 폴링 루프, 실패 시 `lastGood` 스냅샷 유지 + `stale: true` 표시 ✅ (D6)
- 백오프: `failureBackoff = [3s, 6s, 15s]` — 계획서 §6.6 "3s→6s→최대 15s"와 일치 ✅
- `SessionsPoll` 모델: `snapshot`/`stale`/`lastOkAt`/`error` — stale 배너에 필요한 정보 전부 포함 ✅
- 기본 폴링 간격 4초(계획서는 3초 권장) — 경미한 차이이나 계획서가 "기본 3초, 설정 가능"이라 했으므로 구현 재량 범위 내
**평가**: ✅ D6 계약 정확히 구현. UI가 null/blank dashboard를 보지 않도록 보장.
### 3.4 `session_service.dart` — status.sh --json 래핑 (§2, Rev.1 §1)
**검증**:
- `runCommand(['bash', statusScriptPath, '--json'], timeout: 5s)` — 조회 5초 타임아웃(§6.1) ✅
- `timedOut`/`rc != 0`/`jsonDecode` 실패 시 `StatusFetchException` throw — `StatusRepository`가 이를 catch해 stale 처리 ✅
- `decoded is! Map<String, dynamic>` 타입 가드 ✅
- "이 코드는 YAML/SQLite/jsonl을 직접 읽지 않는다" — `status.sh --json` 출력만 소비, Rev.1 §1 원칙 준수 ✅
**평가**: ✅ 단일 진실 공급원 원칙 준수.
---
## 4. UI 계층 검증 (§7 화면 설계)
### 4.1 `main.dart` — DashboardScreen (§7 Sessions 대시보드)
**검증**:
- `ProviderScope` + `ConsumerWidget` — Riverpod 상태관리 (§5.1) ✅
- `sessionsPollProvider` StreamProvider 구독 → `pollAsync.when(data/loading/error)`
- Master-Detail 레이아웃: `SessionTable`(flex:3) + `DetailPane`(width:380) ✅ (§7)
- `_ErrorScreen` — 폴링 시작 실패 시 에러 화면 ✅
- `StaleBanner` — stale 상태 표시 ✅ (D6)
### 4.2 `session_table.dart` — DataTable2 (§7)
**검증**:
- `data_table_2` 사용 (§5.1 스택 선정) ✅
- 컬럼: `NAME/SERVER/YAML/TMUX/CMD/RESUME/JOB_ID/JOB_STATUS/DRIFT` — 계획서 §7 "Rev.1 §4.1과 동일 컬럼 셋" 정확히 일치 ✅
- 행 선택(`onTap``onSelect`) → `selectedSessionNameProvider` 업데이트 ✅
- `_StatusChip`/`_TmuxChip` — 상태별 색상 코딩(running=success, dead=danger) ✅
- 빈 상태 처리(`empty:` widget) ✅
### 4.3 `detail_pane.dart` — Detail Pane (§7)
**검증**:
- `SessionRow?` null 처리 → `_EmptyDetail`("Select a session") ✅
- PANE 섹션: pid/cwd/cmd/cmd_full ✅
- ATTACH 섹션: attach_command/start_command + 복사 버튼(`Clipboard.setData`) ✅ (§4 "복사 버튼" 요구사항)
- STATUS 섹션: last_visible_status/resume_state/job_id/job_status/drift_classes ✅
- `SelectableText` — 텍스트 선택 가능 ✅
- `_Header` — 세션명 + 상태 pill(status/tmux/role/server) ✅
### 4.4 `stale_banner.dart` — D6 stale 배너 (§6.6)
**검증**:
- `poll.stale` false → `SizedBox.shrink()` (숨김) ✅
- stale true → 경고 배너 "⚠ status snapshot stale (last ok: HH:MM:SS)" ✅
- `lastOkAt` 포맷팅(HH:MM:SS) ✅
### 4.5 `status_script_locator.dart` — 스크립트 경로 해석
**검증**: `.git` 마커로 repo root walk-up → 고정 경로 하강. 하드코딩 절대경로 없음. `flutter run` 실행 디렉터리 무관 robustness ✅. 계획서가 명시하지 않았으나 구현 품질 향상(Rev.1 §8 "no hardcoded absolute path" 원칙 계승).
### 4.6 `session_providers.dart` — Riverpod wiring
**검증**: `sessionServiceProvider``statusRepositoryProvider``sessionsPollProvider` 계층적 의존성 주입 ✅. `apps/mam_desktop`이 폴링/백오프 로직을 재구현하지 않고 `mam_core`에 위임 ✅ (§6.6 "Framework agnostic" 원칙).
---
## 5. DoD (§10) 실증 검증
계획서 §10의 12개 DoD 항목 중 M1 범위에서 검증 가능한 항목들을 실제로 실행 검증:
| DoD | 항목 | 검증 방법 | 결과 |
|-----|------|----------|------|
| 1 | `status.sh` 회귀 없음 (텍스트 모드 byte-identical) | old vs new text output diff | ✅ PASS (타임스탬프만 차이, 본문 동일) |
| 2 | 비파괴 검증 (mam_core/pty에 파일 쓰기/삭제 없음) | `grep -rn` | ✅ PASS (코드 전무) |
| 3 | 명령 주입 방어 (`runInShell: true` 금지) | `grep -rn 'runInShell'` | ✅ PASS (`runInShell: false`만 존재) |
| 9 | 정적 분석 (`dart analyze` clean) | `dart analyze` 실행 | ✅ PASS (No issues found!) |
| 11 | 회귀 없음 (stop/create/resume/monitor/lib.sh 무변경) | `git diff --stat` | ✅ PASS (status.sh만 변경) |
| — | Dart 단위 테스트 | `dart test` 실행 | ✅ PASS (3/3 All tests passed!) |
**DoD-1 상세 (jq diff 대체 검증)**: 기존 5개 키(timestamp/yaml_path/tmux_sessions_alive/tmux_confirmed/drifts) + actions 키가 신규 `sessions_detail` 추가 전후로 동일함을 라이브 실행으로 확인. `sessions_detail`은 순수 additive.
**테스트 커버리지** (`session_service_test.dart`):
1. `SessionsSnapshot.fromJson` well-formed payload 파싱 — drift 클래스, role, resume_state, pane.pid, attach_command 전부 정확히 매핑 ✅
2. 누락 필드 허용(`{"name": "bare"}`) — 기본값(`?`/`-`/null) 적용 ✅
3. 실제 `status.sh --json` 출력 파싱 — 라이브 연동 검증 ✅
**평가**: ✅ M1 범위 DoD 전부 충족. 테스트는 실제 `status.sh` 라이브 연동까지 검증하여 매우 견고함.
---
## 6. 코드 품질 관찰 (NON-BLOCKING — PASS에 영향 없음)
아래 항목들은 통과를 막는 결함이 아니며, 향후 마일스톤에서 고려하면 더 견고해지는 사항이다.
1. **폴링 간격 (선택)**: 계획서 §6.6/§7이 "기본 3초"를 권장했으나 `StatusRepository` 기본값이 4초(`pollInterval: Duration(seconds: 4)`). 경미한 차이이며 계획서가 "설정 가능"이라 명시했으므로 구현 재량 범위. 향후 사용자 피드백에 따라 조정 가능.
2. **`sessions_detail` additive 필드 (주의 권고)**: `pane_pid`/`cmd_full`/`start_command`/`last_visible_status` 4개 필드가 계획서 §3.1의 D8 예시 스키마를 초과해 추가됨. 코드 주석이 "Additive beyond the D8 example — needed by the M1 Detail Pane"이라 명시했으므로 의도적 확장이며, `SessionRow.fromJson`이 이를 안전히 파싱(누락 시 null). 회귀 위험 없음. 단, 향후 `status.sh` 출력 스키마를 문서화할 때 이 4개 필드도 계획서에 갱신하면 추적성 향상.
3. **`status_script_locator.dart` 예외 메시지 (선택)**: `.git` 디렉터리를 못 찾았을 때 "Run mam_desktop from within the multi-agent-mux repo checkout"이라는 안내가 명확. 다만 submodule/worktree 환경에서 `.git`이 파일인 경우(`.git` 디렉터리가 아님)를 고려하면 더 robust해짐. (현재 환경에서는 이슈 없음)
4. **`_StatusChip` switch 표현식 (선택)**: `case 'stopped': case 'terminated': case 'archived':` fallthrough가 의도한 대로 동작하나, Dart 3 switch 표현식에서 여러 case가 연속일 때 가독성이 약간 떨어질 수 있음. 기능적으로 정확하므로 스타일 선호 영역.
---
## 7. AGENTS.md 원칙 준수 검증
- **Surgical Changes (§3)**: 변경이 M1 대시보드/Detail Pane + D8 `status.sh` 확장에만 국한. 기존 스크립트(stop/create/resume/monitor/lib.sh) 무변경. `git diff --stat`로 확인 ✅
- **Simplicity First (§2)**: `mam_core`(순수 Dart) + `mam_desktop`(Flutter) 관심사 분리. `command_runner.dart` 유일 실행 지점으로 과잉 추상화 없음. 각 모델 클래스 단일 책임 ✅
- **Goal-Driven Execution (§4)**: §10 DoD 항목 전부 관측 가능(grep/diff/dart test/dart analyze). 라이브 실행实证으로 회귀 없음 입증 ✅
- **문서-코드 정합성**: 계획서 §3.1 D8 스키마 ↔ `status.sh` `sessions_detail` 출력 ↔ `SessionRow.fromJson` 매핑 — 3계층 전부 field-for-field 일치 ✅
---
## 8. 종합 평가
커밋 `2eb8586`는 계획서(Rev.3)의 M1 마일스톤(읽기 전용 대시보드 + Detail Pane)을 충실하게 구현했다. 핵심 성과:
1. **D8 additive 스키마 확장 정확 구현**: `status.sh --json`이 기존 6개 키를 무변경으로 보존하면서 `sessions_detail` 신규 키를 추가. 라이브 실행实证으로 기존 소비자 회귀 없음을 확인했으며, 텍스트 모드는 byte-identical(타임스탬프만 차이).
2. **불변 안전 계약 정확 이식**: `command_runner.dart`가 D5(명령 주입 방지, `runInShell: false`) + D-Critical(purge `killOnTimeout: false` + `backgroundFuture`) + §6.1 타임아웃(조회 5초)을 정확히 구현. `status_repository.dart`가 D6(stale 스냅샷 유지 + 백오프 3s→6s→15s)을 충족.
3. **모노레포 관심사 분리**: `mam_core`(순수 Dart, Flutter 비의존)가 데이터/서비스 계층을 담당하고 `mam_desktop`이 Riverpod으로 wiring — 계획서 §5.2 구조 정확히 반영.
4. **견고한 테스트**: 3개 단위 테스트(파싱 정확성 + 누락 필드 허용 + 실제 `status.sh` 라이브 연동) 전부 통과. `dart analyze` No issues found.
5. **회귀 없음**: 기존 셸 스크립트(stop/create/resume/monitor/lib.sh) 전부 무변경, `status.sh``--json` 분기 내부에만 additive 변경.
개선 권고 4건은 모두 NON-BLOCKING(구현 재량/스타일/향후 문서화)으로 통과 판정에 영향을 주지 않는다. 코드는 계획서에 입각해 안전하고 모순 없이 구현되었다.
[VERDICT: PASS]
@@ -0,0 +1,41 @@
# 리뷰 리포트 — Job dbab0e07
- **리뷰 대상**: 커밋 `36b3910` — (1) `create_session.sh` agy 인증 사전검증을 파일 기반으로 우회해 macOS 키체인 접근 Hang 방지, (2) `lib.sh provision_isolation()`에 Darwin 전용 `~/Library/Keychains` 심링크 시딩 추가로 격리 모드 인증 토큰 소실 해결
- **리뷰어**: claude (planner-reviewer)
- **리뷰 방식**: 정적 분석(bash -n, shellcheck 기준선 대비) + 계측 스텁/가짜 HOME/uname 오버라이드 기반 실행 검증
## 1. 설계 타당성
- **Hang 우회**: agy 격리 lever가 `HOME=<root>`이고(lib.sh 주석의 Phase 0 실측 매트릭스), macOS에서 `agy models`가 키체인 접근 프롬프트로 비대화식 환경에서 블로킹되는 문제를, 디스크상 토큰 파일(`~/.gemini/oauth_creds.json` 또는 `~/.gemini/antigravity-cli/antigravity-oauth-token`) 존재 시 CLI 호출 자체를 생략하는 방식으로 회피 — 검사 파일 경로 2개가 `provision_isolation()`이 agy 자격증명으로 시딩하는 파일 목록과 정확히 일치함(저장소 내부 지식과 정합).
- **토큰 소실 해결**: 격리 시 `HOME=<root>`로 바뀌면 macOS 키체인 경로(`$HOME/Library/Keychains`)가 빈 격리 홈을 가리켜 자격증명 조회가 실패하는 구조 — 실제 Keychains 디렉터리를 심링크로 시딩하는 것은 이 파일의 기존 철학("auth/config files are SYMLINKED ... never copied — token refresh must converge on the real files")과 일치하는 올바른 해법.
## 2. 실행 검증 (전부 실측)
- **사전검증 우회(Case A)**: 가짜 HOME에 토큰 파일 배치 + 호출 기록 스텁 `agy`를 PATH 선두에 두고 `create_session.sh --dry-run --agent agy` 실행 → **`agy` 바이너리가 단 한 번도 실행되지 않음**(Hang 원인 원천 제거 확인), exit 0.
- **폴백 보존(Case B)**: 토큰 파일 없는 빈 HOME → `agy models`가 정확히 1회 호출되고 스텁 실패 시 기존 오류 메시지("agy is not authenticated")와 exit 1이 그대로 동작 — 미인증 조기 차단 시맨틱 유실 없음.
- **Keychains 시딩**: lib.sh를 소싱한 격리 하네스에서 `uname`을 Darwin으로 오버라이드하고 가짜 HOME(`Library/Keychains/login.keychain-db` 포함)으로 `provision_isolation agy` 실행 →
- 심링크 정상 생성, 격리 홈 경유 read-through로 실제 키체인 데이터 접근 확인.
- `seeded` 출력에 `Library/Keychains`가 기존 포맷대로 병합됨.
- **재프로비저닝 멱등성**: 2회 실행에도 `ln -sfn``-n` 덕에 중첩 링크(`Keychains/Keychains`) 없이 동일 결과.
- **🔑 삭제 안전성(최중요)**: create rollback의 `rm -rf "$ISOLATION_ROOT"` 시뮬레이션 → **심링크만 제거되고 실제 키체인 파일은 온전히 생존**함을 실측 확인(rm -rf는 심링크를 따라 들어가지 않음). `seeded` 목록을 순회하며 삭제하는 소비자는 코드베이스에 존재하지 않음(생성·기록 전용)도 grep으로 확인.
## 3. 정적 분석
- `bash -n` 양 파일 통과. `shellcheck -S warning`: 변경 전 기준선(fc24af4) 대비 양 파일 모두 **경고 0건 → 0건, 신규 경고 없음**.
## 4. 유실 검사
- agy 외 에이전트(claude/cline/hermes)의 provision 분기·사전검증 분기는 바이트 단위로 무변경. Darwin 가드로 Linux에서 Keychains 시딩 완전 스킵(Linux 회귀 없음).
## 5. 비차단(Non-blocking) 지적 사항
1. **사전검증 약화** — 파일 존재가 토큰 유효성을 보증하지 않으므로, 만료/폐기된 토큰은 이제 preflight를 통과하고 TUI 기동 단계에서야 실패가 드러남. Hang 대비 합리적 트레이드오프이나 오류 표면화 시점이 늦어짐.
2. **Darwin 미게이팅** — 우회 분기가 OS 무관하게 적용되어, Hang이 없던 Linux에서도 엄격 검사가 생략됨(부수적으로 네트워크 호출 생략이라 빨라지는 이점은 있음). 엄격성이 중요해지면 `uname` 게이트 추가 고려.
3. **자격증명 격리 부재(의도된 설계)** — 격리 세션이 실제 키체인을 공유하게 되나, 시딩의 목적 자체가 인증 공유이므로 기존 심링크 시딩 철학과 일치. 기록 차원의 언급.
4. **macOS 실기기 미검증** — Security.framework가 심링크된 `$HOME/Library/Keychains`를 실제로 수용하는지는 Linux 환경에서 실측 불가. 메커니즘 수준(경로 해석·링크·멱등성·삭제 안전성)은 전부 검증 완료.
## 6. 결론
두 수정 모두 고장 메커니즘을 정확히 겨냥했고, 우회·폴백·시딩·멱등성·삭제 안전성이 전부 실행으로 입증되었으며 정적 분석 신규 경고와 기존 동작 유실이 없다. 비차단 4건은 후속 개선/기록 수준이다.
[VERDICT: PASS]
@@ -0,0 +1,32 @@
# Peer Review: `multi-agent-mux-loop` SKILL 문서 정비 + `run_loop.sh` 하드코딩 제거 (커밋 `52c270e`/`f85fdfc`/`6c90342`)
## Scope
세 커밋을 검토했다: (1) `52c270e` — SKILL.md의 "Self-Planning"(계획 완전 생략) 서술을 "Existing Plan Execution"(기존 승격 계획서 로드 후 즉시 구현)으로 정정, (2) `f85fdfc` — SKILL.md 내 하드코딩된 세션명(`canary-projects-multi-agent-mux-*`)을 플레이스홀더(`<planner-session-name>`/`<creator-session-name>`/`<reviewer-session-name-N>`)로 치환, (3) `6c90342``run_loop.sh``resolve_planner_session()` 폴백과 기존 계획 파일 경로를 실제로 동적화. 문서 변경(1, 2)은 렌더링/의미 정합성 위주로, 셸 스크립트 변경(3)은 문법·동작 검증 위주로 리뷰했다.
## 1, 2. SKILL.md 문서 변경 검토
- **`52c270e`**: `--plan` 미지정 시의 실제 동작(계획서 승격 파일을 로드해 즉시 구현 착수)과 서술("Self-Planning", "계획을 거치지 않고 직접 구현")이 이전엔 어긋나 있었다 — 실제로는 완전한 무계획 실행이 아니라 "기존 계획서가 있으면 그걸 쓴다"는 동작이므로, 이번 수정으로 프로즈/표/mermaid 다이어그램의 분기 라벨("Use Existing Plan (No --plan)")이 셋 다 일관되게 정정되었다. 세 위치(설명 불릿, 표, 다이어그램) 모두 누락 없이 반영됨을 확인.
- **`f85fdfc`**: 하드코딩된 세션명이 매뉴얼 예시 곳곳(다이어그램 참가자 라벨, `--target-agent`/`--reviewer` 예시 값)에 있었는데, 전부 제네릭 플레이스홀더로 치환됨. `grep -n "canary-projects-multi-agent-mux" SKILL.md` 기준으로 잔여 하드코딩이 없는지 확인했다(아래 §3 참고 — 실제로는 no-arg `--plan`을 하드코딩 언급 없이 완전히 정리했음을 확인).
두 커밋 모두 마크다운/mermaid 문법 오류 없이 코드펜스와 표 구조를 그대로 유지했다.
## 3. `run_loop.sh` 변경 검토 (실행 검증 포함)
### 변경 내용
- `resolve_planner_session()`의 폴백 값이 `'canary-projects-multi-agent-mux-planner-reviewer-claude'`(하드코딩)에서 `''`(빈 문자열)로 변경 — 이제 `role``'planner'`를 포함하는 tmux 세션을 찾지 못하면 특정 프로젝트 이름으로 잘못 추측하지 않고 정직하게 "찾지 못함"을 반환한다.
- 기존 계획서 로드 블록(`else` 분기, 314-322행)이 `EXISTING_PLAN_FILE=".agents/reports/canary-projects-multi-agent-mux-planner-reviewer-claude/report-final.md"`(하드코딩)에서 `PLANNER_SESSION` 기반 동적 경로로 변경되고, `[ -n "$PLANNER_SESSION" ]` 가드가 추가되어 세션을 못 찾은 경우 경로 조합 자체를 건너뛴다.
### 검증
- `bash -n run_loop.sh` → 문법 오류 없음.
- `shellcheck run_loop.sh` → 경고/오류 0건(종료 코드 0).
- **`resolve_planner_session()`을 실제로 발췌·소싱해 현재 라이브 상태에 대해 실행**: `canary-projects-multi-agent-mux-planner-reviewer-claude`를 정확히 반환함(현재 이 세션의 role이 `planner-reviewer`이므로 `'planner' in role` 매치) — 우연이 아니라 실제 동작 확인. 이어서 이 값으로 조합된 경로(`.agents/reports/canary-projects-multi-agent-mux-planner-reviewer-claude/report-final.md`)가 실제로 파일시스템에 존재함을 확인해, 이 프로젝트에서는 하드코딩 시절과 동일한 결과를 내면서도 이제는 진짜로 동적임을 증명했다.
- **빈 `PLANNER_SESSION` 엣지 케이스**(플래너 역할 세션이 아예 없는 워크스페이스를 시뮬레이션): 동일한 `set -euo pipefail` 하에서 새 로직 스니펫만 분리 실행 → `EXISTING_PLAN_FILE`이 빈 문자열로 남고 "계획 로드 건너뜀" 분기가 정상 작동, `set -u`(nounset)로 인한 미정의 변수 오류도 없음(`PLANNER_SESSION`은 항상 대입되므로 빈 문자열이어도 unset이 아님) — 하드코딩이 없어진 대신 도입될 수 있었던 "다른 워크스페이스에서 조용히 깨짐" 위험이 실제로는 없음을 확인.
- `--plan` 모드 경로(224-228, 285-286, 496-497, 543-548행)의 `$PLANNER_SESSION` 사용처는 이번 diff의 대상이 아니며, 플래너 세션이 비어 있을 경우 `multi-agent-mux-delegate-job submit`이 초반에 실패로 이어지는 fail-fast 구조라 이번 변경으로 인한 새로운 침묵 실패 경로는 없다.
- `git diff 7c94eef 6c90342 --stat` → 이 세 커밋이 건드린 파일은 `SKILL.md``run_loop.sh` 딱 둘뿐, 회귀 없음.
## 결론
문서 두 건은 실제 동작과 서술의 불일치를 바로잡고 하드코딩된 예시를 제네릭화한 정확한 수정이며, 셸 스크립트 변경은 실제로 실행해 정상 케이스(현재 세션 정확히 해석)와 엣지 케이스(플래너 세션 부재 시 안전한 스킵) 모두를 검증했다. 문법 오류, shellcheck 경고, 회귀 모두 없다.
[VERDICT: PASS]
@@ -0,0 +1,40 @@
# Peer Review (Round 5, 최종): `exit`→`_exit` 심볼 정정 (commit `f0e2bd2`) — `multi-agent-mux-ui` M2
## Scope
`604fdecf` 리뷰에서 지적한 마지막 1건 — `cExit``lookupFunction<...>('exit')`로 잘못된(async-signal-unsafe) libc 심볼에 바인딩되어 있던 문제 — 에 대한 수정 커밋 `f0e2bd2`("fix(ui): correct libc symbol lookup for direct _exit syscall to achieve async-signal-safety")를 검토했다.
## 변경 확인
`pty_session.dart:111`, 문자열 리터럴 한 글자(정확히는 언더스코어 하나) 수정:
```diff
- final cExit = libc.lookupFunction<_exit_c, _exit_dart>('exit');
+ final cExit = libc.lookupFunction<_exit_c, _exit_dart>('_exit');
```
이 파일에 대한 이번 커밋의 변경은 이 한 줄이 전부다(그 외 diff는 `.dart_tool` 빌드 캐시 바이너리뿐).
## 실행 검증
1. **심볼 재확인**: `libc.lookup('_exit').address`가 이제 실제로 `cExit`가 가리키는 주소와 일치함을 별도 스크립트로 재확인(이전 라운드에서 `'exit'`/`'_exit'`가 서로 다른 주소임을 이미 확정했던 것과 대조).
2. **실제 실패 경로 재현**: 존재하지 않는 실행파일(`this-binary-does-not-exist-xyz`)로 `PtySession.start()`를 호출해 `execvp()` 실패 → `cExit(-2)` 경로를 실제로 타게 만들었다. 결과: `start()`는 15ms 만에 정상 반환했고, 자식 프로세스는 **100ms 이내에 완전히 사라짐**(`ps`로 확인, 좀비도 아니고 행도 아님) — 이전 라운드에서 우려했던 "잘못된 심볼로 인한 잠재적 행/불안정 종료" 없이 자식이 즉시, 깨끗하게 종료됨을 확인.
3. **회귀 테스트**: `mam_pty``pty_runtime_test.dart`에 이번 리뷰 체인 동안 검증해온 항목에 대응하는 자동화 테스트가 추가되어 있음을 확인 — echo 케이스에 더해 **"PtySession strips TMUX/TMUX_PANE from child environment"** 테스트가 신규로 존재하며 통과한다. 이제 이전까지 매 라운드 내가 수작업 스크래치 스크립트로 검증해야 했던 env 격리가 저장소 자체의 회귀 테스트로 편입되었다.
4. **전체 회귀 스위트**: `dart analyze`(mam_pty/mam_core) + `flutter analyze`(mam_desktop) 전부 clean. `dart test`(mam_pty 2/2, mam_core 3/3) + `flutter test`(mam_desktop 3/3) 전부 통과.
5. **DoD**: `git show f0e2bd2 --stat -- '*.sh'` → 셸 스크립트 변경 없음. `grep -rn "runInShell: *true"` → 없음. `grep -rn "\.writeAsString\|\.writeAsBytes\|\.delete(\|openWrite("`(mam_core/mam_pty) → 없음.
## M2 전체 검증 이력 요약 (이번 라운드로 완결)
이 마일스톤은 5라운드에 걸쳐 검토되었고, 매 라운드 실제 실행으로 재현/반증했다:
| 라운드 | 커밋 | 발견 | 상태 |
| :-- | :-- | :-- | :-- |
| 1 (`c2503ed6`) | `b7901bc` | `/proc/self/fd/` 즉시 예외, PTY 슬레이브 미연결, env 격리 없음 | NOT PASS |
| 2 (`1fc02bc2`) | `f52f6eb` | 위 3건 해결(fork/exec 재작성) — 좀비 누수, fork-unsafe 호출 신규 발견 | NOT PASS |
| 3 (`a3f7449e`) | `7781e79` | fork-unsafe 부분개선 — 이벤트루프 정지(가장 심각), env 격리 죽은 코드 신규 발견 | NOT PASS |
| 4 (`604fdecf`) | `7f1a7e5`(+`a6e4dc9`) | 이벤트루프 정지/env 격리/좀비회수 전부 해결 — `exit``_exit` 심볼 오류 발견 | NOT PASS |
| 5 (본 리뷰) | `f0e2bd2` | 심볼 오류 정정, 실패 경로 실행 재현으로 정상 종료 확인 | **PASS** |
계획서 §5.2(구조)/§6.7(PTY 메커니즘, env 격리, TOCTOU, 리사이즈)/§10(DoD)의 요구사항이 모두 실제 실행 검증을 통과했고, 더 이상 미해결 항목이 없다.
[VERDICT: PASS]
@@ -0,0 +1,34 @@
# Peer Review (Round 3): 콜드스타트 에러 침묵 버그 수정 (commit `7e4cab6`) — `multi-agent-mux-ui`
## Scope
`50ed0559` 리뷰에서 지적한 잔여 결함 — "콜드스타트(한 번도 성공한 적 없는 폴링 실패)가 여전히 완전히 침묵됨, `stale_banner.dart:15``if (!poll.stale) return shrink` 게이트가 원인" — 에 대한 수정 커밋 `7e4cab6`("fix(ui): expose stale banner under cold-start failures when no successful snapshot exists")를 검토했다.
## 변경 내용 확인
`stale_banner.dart` 5줄 변경(그 외 파일은 무관한 dart_tool 캐시 바이너리 1개뿐):
```dart
final shouldShow = poll.stale || (poll.snapshot == null && poll.error != null);
if (!shouldShow) return const SizedBox.shrink();
...
final lastOkText = lastOk == null
? 'never'
: '...'
```
내가 `50ed0559`에서 제안한 수정안과 조건식이 정확히 일치한다 — `poll.stale`뿐 아니라 `poll.snapshot == null && poll.error != null`(콜드스타트: 한 번도 성공하지 못했지만 에러는 있는 상태)도 노출 조건에 포함시켰고, `lastOkAt == null`일 때 문구도 의미 없는 시각 대신 `'never'`로 분기했다.
## 검증
1. **경로 추적**: `main.dart``_DashboardBody``snapshot`이 null이어도 `StaleBanner(poll: poll)`를 항상 마운트한다(`sessions`/`count`는 각각 `?? const []`/`?? 0`로 안전 처리) — 배너 표시 조건이 고쳐지면 실제로 화면에 그려질 경로가 이미 존재함을 재확인.
2. **스트림 도달성**: `StatusRepository.watch()`는 모든 폴링 실패를 내부에서 흡수해 항상 `SessionsPoll`을 yield하므로(예외를 스트림 밖으로 던지지 않음), Riverpod `sessionsPollProvider`는 첫 실패 시에도 `AsyncError`가 아니라 `AsyncData(poll)`로 즉시 전이 — `DashboardScreen``_ErrorScreen`이 아니라 `_DashboardBody`(그리고 그 안의 `StaleBanner`)로 정상 도달함을 재확인.
3. **실제 렌더링 재현(직접 실행)**: `SessionsPoll(snapshot: null, stale: false, lastOkAt: null, error: 'StatusFetchException: preflight failed: tmux is missing or not executable')``StaleBanner`를 단독 렌더링하는 위젯 테스트를 임시 작성해 `flutter test`로 직접 실행 — `'never'` 텍스트와 에러 메시지(`'tmux is missing'`) 문자열이 모두 실제로 화면에 렌더링됨을 확인(테스트는 검증 후 삭제, 저장소에는 남기지 않음 — 리뷰 산출물 오염 방지). 이전 라운드(`50ed0559`)에서 재현했던 "배너가 전혀 뜨지 않는" 상황이 이제 재현되지 않는다.
4. **회귀 없음**: `dart analyze`(mam_core)/`flutter analyze`(mam_desktop) 모두 No issues found. 기존 6개 테스트(`mam_core` 3 + `mam_desktop` 3) 전부 통과.
5. **스코프 확인**: 이번 커밋은 `stale_banner.dart` 한 파일만 수정 — 이전 라운드에서 요청한 "좁은 범위 수정" 요구와 정확히 일치, 다른 파일에 부작용 없음.
## 결론
`765e2329`(pre-flight 체크 누락) → `50ed0559`(수정이 잘못된 조건 분기에 적용됨) → 이번 `7e4cab6`까지 이어진 콜드스타트 에러 침묵 버그가 정확한 근본 원인(단일 `if` 게이트)에 대한 정밀 수정으로 완전히 해소되었다. 실제 위젯 렌더링까지 직접 실행해 확인했고, 회귀도 없다. M1 스코프에서 더 이상 남은 이슈가 없다.
[VERDICT: PASS]
@@ -0,0 +1,162 @@
# ✅ Peer Review Report: macOS 키체인 Hang 우회 및 격리 모드 인증 토큰 소실 수정 (Job 14943484)
**Job**: `14943484` · **Reviewer**: Reviewer B (Cline, `canary-projects-multi-agent-mux-reviewer-cline`)
**Review Target**: 커밋 `36b3910` "fix(mac-compat): bypass keyring auth check hang and link macOS Library/Keychains to isolated home"
**Files Changed**: `lib.sh` (+8/-0), `create_session.sh` (+4/-1) — 2 files, 12 insertions, 1 deletion
**Review Scope**: 작업 목표 "create_session.sh 및 lib.sh에서 macOS 키체인(keyring) 접근 차단으로 인한 비대화식 Hang 현상과 격리 모드(--isolate) 시 인증 토큰 소실 문제를 각각 파일 기반 사전 검증 우회 및 Library/Keychains 폴더 링크 추가를 통해 해결" — 린트, 동작성, 유실 관점 교차 리뷰
**Method**: 커밋 diff 분석 + `bash -n`/`shellcheck` 정적 분석 + 인증 바이패스 로직 4케이스 검증 + Darwin 가드 검증 + 경로 일치성 확인 + seeded 패턴 일관성 확인 + 타 agent keychain 필요성 분석
---
## 1. 변경 사항 개요
### 1.1 파일 기반 사전 검증 우회 (create_session.sh 라인 92-98)
```diff
elif [ "$AGENT" = "agy" ]; then
- if ! agy models >/dev/null 2>&1; then
+ # Fast, non-blocking check: if token or credentials exist on disk, assume authenticated to prevent keyring hang
+ if [ -f "$HOME/.gemini/oauth_creds.json" ] || [ -f "$HOME/.gemini/antigravity-cli/antigravity-oauth-token" ]; then
+ true
+ elif ! agy models >/dev/null 2>&1; then
echo "ERROR: agy is not authenticated. Please log in first." >&2
exit 1
fi
```
**목적**: `agy models` 명령이 macOS에서 키체인 접근 시 비대화식 Hang 유발. 토큰/자격증명 파일 존재 시 파일 기반으로 인증 가정하여 Hang 우회.
### 1.2 Library/Keychains 폴더 링크 추가 (lib.sh 라인 841-848)
```diff
+ # On macOS, seed ~/Library/Keychains to allow isolated agy to query Keychain Access credentials
+ if [ "$(uname)" = "Darwin" ]; then
+ mkdir -p "$root/Library"
+ if [ -d "$HOME/Library/Keychains" ]; then
+ ln -sfn "$HOME/Library/Keychains" "$root/Library/Keychains"
+ seeded="${seeded:+$seeded,}Library/Keychains"
+ fi
+ fi
```
**목적**: `--isolate` 모드 시 격리된 홈 디렉토리에 `~/Library/Keychains` 심볼릭 링크 추가 → 격리 agy가 Keychain Access 자격증명 조회 가능.
---
## 2. 작업 목표 달성도
| 목표 | 상태 | 확인 |
|------|------|------|
| macOS 키체인 Hang 우회 (파일 기반 사전 검증) | ✅ | 토큰 파일 존재 시 `agy models` 스킵 |
| 격리 모드 인증 토큰 소실 해결 (Keychains 링크) | ✅ | Darwin 가드 + Library/Keychains 심볼릭 링크 |
| create_session.sh 적용 | ✅ | 라인 92-98 |
| lib.sh 적용 | ✅ | 라인 841-848 (agy case) |
---
## 3. 정적 분석
| 파일 | bash -n | shellcheck | 비고 |
|------|---------|------------|------|
| lib.sh | ✅ SYNTAX OK | ✅ 경고 없음 (clean) | 본 diff 새 경고 0건 |
| create_session.sh | ✅ SYNTAX OK | SC1091 (info, 기존 source) — **본 diff 새 경고 없음** | EXIT 1 (기존) |
---
## 4. 동작성 검증
### 4.1 ✅ 인증 바이패스 로직 4케이스 검증
| 케이스 | 조건 | 결과 | 판정 |
|--------|------|------|------|
| 1 | `antigravity-oauth-token` 파일 존재 | BYPASS (token found) | ✅ Hang 우회 |
| 2 | `oauth_creds.json` 파일 존재 | BYPASS (oauth_creds found) | ✅ Hang 우회 |
| 3 | 파일 없음 + agy models 실패 | ERROR (not authenticated) | ✅ 정상 에러 |
| 4 | 파일 없음 + agy models 성공 | PASS (agy models succeeded) | ✅ 정상 통과 |
**검증**: 파일 존재 시 `agy models` 호출 스킵 → macOS 키체인 Hang 방지. 파일 부재 시 기존 `agy models` 체크 유지 → 미인증 감지.
### 4.2 ✅ Darwin 가드 검증 (Keychains 링크)
| 조건 | 결과 | 판정 |
|------|------|------|
| `uname` = Linux | Darwin 체크 실패 → 블록 스킵 | ✅ Linux에서 Keychains 링크 미생성 |
| `uname` = Darwin + `~/Library/Keychains` 존재 | `mkdir -p $root/Library` + `ln -sfn` 실행 | ✅ macOS에서 심볼릭 링크 생성 |
| `uname` = Darwin + `~/Library/Keychains` 부재 | `[ -d ]` 실패 → 링크 미생성 | ✅ graceful (seeded 미추가) |
### 4.3 ✅ 경로 일치성 (auth check vs provisioning)
| 파일 | create_session.sh 체크 경로 | lib.sh provisioning 경로 | 일치 |
|------|---------------------------|-------------------------|------|
| oauth_creds.json | `$HOME/.gemini/oauth_creds.json` | `$HOME/.gemini/oauth_creds.json` (라인 835) | ✅ |
| antigravity-oauth-token | `$HOME/.gemini/antigravity-cli/antigravity-oauth-token` | `$HOME/.gemini/antigravity-cli/antigravity-oauth-token` (라인 838) | ✅ |
인증 체크 파일과 격리 provisioning 파일 경로가 완전 일치 → 일관성 확보.
### 4.4 ✅ seeded 패턴 일관성
`seeded="${seeded:+$seeded,}Library/Keychains"` (라인 846) — 기존 패턴(라인 836, 839, 853)과 동일한 `${seeded:+$seeded,}` 누적 패턴. 일관성 확보 ✅
### 4.5 ✅ 타 agent keychain 필요성 분석
| Agent | 인증 방식 | Keychain 필요 | Keychains 링크 적용 |
|-------|----------|---------------|---------------------|
| claude | `.credentials.json` 파일 기반 | 아니오 | 불필요 (맞음) |
| cline | 파일 기반 settings + DB | 아니오 | 불필요 (맞음) |
| agy | macOS Keychain Access | **예** | **적용됨** ✅ |
| hermes | `auth.json` 파일 기반 | 아니오 | 불필요 (맞음) |
Keychains 링크가 agy case에만 추가된 것은 **정확한 타겟팅** — agy만 macOS Keychain 사용, 타 agent는 파일 기반 인증.
### 4.6 ✅ true 문 유효성
`if` 블록 본문으로 `true` 사용 — bash에서 유효 (no-op). `if true; then true; fi` 검증 통과. 의도: 파일 존재 시 아무 동작 없이 통과(바이패스).
---
## 5. 잔여 결함 (LOW — INFORMATIONAL)
### 5.1 ⚠️ 만료된 토큰 시 false positive 가능성 (LOW, 설계 트레이드오프)
**위치**: create_session.sh 라인 93
**분석**: 토큰 파일이 존재하지만 **만료/무효**한 경우, 바이패스가 `agy models` 체크를 스킵하여 세션 시작 → agy 실행 시 인증 실패 가능.
**평가**: 의도적 트레이드오프 — 원 문제는 **Hang**(무한 대기)이며, 만료 토큰으로 인한 후속 실패는 Hang보다 나음(진단 가능). 주석(라인 92)이 의도 명시.
**심각도**: LOW — BLOCKING 아님. 설계 결정으로 수용 가능.
### 5.2 ️ 작업 트리 잔여 .tmp 파일 (INFO, unrelated)
**위치**: `.agents/skills/multi-agent-mux-delegate-job/multi-agent-mux-delegate-job.14657_36745.tmp` (untracked)
**분석**: 이전 delegate_job_safe 실행 잔여물. 본 diff와 무관. 무해하지만 정리 권장.
**심각도**: INFO — 본 리뷰 범위 외.
---
## 6. 종합 평가
### 작업 목표 달성도
"create_session.sh 및 lib.sh에서 macOS 키체인(keyring) 접근 차단으로 인한 비대화식 Hang 현상과 격리 모드(--isolate) 시 인증 토큰 소실 문제를 각각 파일 기반 사전 검증 우회 및 Library/Keychains 폴더 링크 추가를 통해 해결" — **달성**.
### 변경 품질
1.**파일 기반 Hang 우회**: 토큰/자격증명 파일 존재 시 `agy models` 스킵 — 4케이스 검증 모두 PASS
2.**Keychains 심볼릭 링크**: Darwin 가드 + `[ -d ]` 존재 확인 + `ln -sfn` — 안전한 조건부 생성
3.**경로 일치성**: auth check 파일과 provisioning 파일 경로 완전 일치
4.**타겟팅 정확**: agy case에만 Keychains 링크 추가 — 타 agent는 파일 기반 인증으로 불필요
5.**seeded 패턴 일관**: 기존 누적 패턴과 동일
6.**Darwin 가드**: Linux에서 미실행, macOS에서만 동작
### 검증 결과
- 정적 분석: `bash -n` 2/2 OK, `shellcheck` 본 diff 새 경고 없음 (lib.sh clean, create SC1091 기존만) ✅
- 인증 바이패스: 4케이스(토큰 존재/ oauth_creds 존재/ 파일 없음+실패/ 파일 없음+성공) 모두 PASS ✅
- Darwin 가드: Linux 스킵 확인 ✅
- 경로 일치성: auth check ↔ provisioning 완전 일치 ✅
- seeded 일관성: 기존 패턴과 동일 ✅
- 타 agent 분석: agy만 Keychain 사용, 타겟팅 정확 ✅
### 잔여 LOW 1건 + INFO 1건
- LOW 5.1: 만료 토큰 false positive — 의도적 트레이드오프 (Hang > 후속 실패), 주석 명시
- INFO 5.2: 잔여 .tmp 파일 (본 diff 무관)
### 판정 근거
작업 목표(키체인 Hang 우회 + 격리 토큰 소실 해결) 완전 달성. 파일 기반 바이패스 4케이스 검증 PASS, Darwin 가드 동작 확인, 경로 일치성 확보, agy 타겟팅 정확. 정적 분석 통과. 잔여 LOW 1건은 의도적 설계 트레이드오프(Hang 방지가 만료 토큰 후속 실패보다 우선). 주 개발자가 macOS 키체인 문제를 정확히 진단하고 파일 기반 우회 + Keychains 링크로 해결했으므로 PASS 판정이 타당.
[VERDICT: PASS]
@@ -0,0 +1,221 @@
# ✅ Peer Review Report: multi-agent-mux-loop Self-Planning Mode 수정 diff 교차 검증 (Job 417d0efd)
**Job**: `417d0efd` · **Reviewer**: Reviewer B (Cline, `canary-projects-multi-agent-mux-reviewer-cline`)
**Review Target**: 주 개발자(Antigravity)가 제출한 미커밋 git diff — SKILL.md, run_loop.sh, PLAN_LOOP.md 3개 파일 Self-Planning Mode 반영 수정 (3차 시도)
**Prior Context**:
-`71d5a6f2`: 4건 BLOCKING 결함 발견 (DEFECT A/B/C: mermaid `fi` 문법 오류, DEFECT D: PLAN_LOOP.md 하드코딩) → NOT PASS + ESCALATE
-`22e70ce2`: 동일 4건 결함 0/4 해결 (diff가 `fi` 유지) → NOT PASS + ESCALATE
- 본 잡 `417d0efd`: 주 개발자 3차 시도 — 4건 결함 해결 시도
**Review Scope**: 작업 목표 "multi-agent-mux-loop에서 --plan 옵션이 없을 때 계획과 개발을 모두 creator가 수행하는 수정사항(run_loop.sh, SKILL.md, PLAN_LOOP.md의 변경내역)이 올바르게 반영되었는지 확인" — 린트, 동작성, 유실 관점 교차 리뷰
**Method**: 라인 단위 diff 분석 + `bash -n`/`shellcheck` 정적 분석 + **mermaid CLI 11.16.0 렌더링实证** + 이전 결함 추적 비교 + `Loop` 예약어 충돌 근본 원인 분석
---
## 1. diff 개요 (5개 파일, +24/-13)
| 파일 | 변경 | 내용 |
|------|------|------|
| SKILL.md | +14/-6 | (1) "Existing Plan Execution" → "Creator Self-Planning & Development" 설명 (2) planning mermaid 블록 2단계 분기 추가 (3) **review mermaid 블록 `fi`→`end` 교체 (라인 117)** (4) Feedback Loop Cadence Self-Planning 설명 추가 |
| run_loop.sh | +2/-2 | (1) `wait_for_job` 잡 경로 `.mam/jobs/$job_id/job.json``.mam/jobs/$job_id.json` (2) EXECUTION_PROMPT Creator 자율 계획 지시로 변경 |
| PLAN_LOOP.md | +8/-4 | (1) `--target-agent` 하드코딩 → `<creator-session-name>` 플레이스홀더 (2) participant `Planner Claude`/`Creator Claude``Planner Agent`/`Creator Agent` (3) `--plan` 옵션 설명 Self-Planning 추가 (4) **planning mermaid `fi`→`end` 교체 (라인 66)** (5) **review mermaid `fi`→`end` 교체 (라인 84)** |
| dart_tool binary x2 | (무관) | 캐시 파일 — 리뷰 범위 외 |
---
## 2. 이전 4건 BLOCKING 결함 해결 추적 — 4/4 해결 ✅
### 2.1 ✅ DEFECT A (해결): SKILL.md 라인 117 `fi`→`end`
**이전 상태** (잡 71d5a6f2): SKILL.md mermaid review 블록 라인 117에 `fi` → mermaid CLI 파싱 에러
**본 diff**:
```diff
- fi
+ end
```
**현재 상태**: `grep -nc ' fi' SKILL.md` = **0**
**평가**: ✅ 해결. `fi``end`로 정확히 교체됨.
### 2.2 ✅ DEFECT B (해결): PLAN_LOOP.md 라인 66 `fi`→`end`
**이전 상태**: PLAN_LOOP.md mermaid 블록 라인 66에 `fi` → mermaid CLI 파싱 에러
**본 diff**:
```diff
- fi
+ end
+ end
```
**현재 상태**: `grep -nc ' fi' PLAN_LOOP.md` = **0**
**평가**: ✅ 해결. `fi``end`로 교체되고, 상위 `else --plan 미지정` 분기를 닫는 `end` 추가.
### 2.3 ✅ DEFECT C (해결): PLAN_LOOP.md 라인 84 `fi`→`end`
**이전 상태**: PLAN_LOOP.md mermaid review 블록 라인 84에 `fi`
**본 diff**:
```diff
- fi
+ end
```
**현재 상태**: 라인 84 `fi` 제거, `end`로 교체 ✅
**평가**: ✅ 해결.
### 2.4 ✅ DEFECT D (해결): PLAN_LOOP.md 하드코딩 3건 → 플레이스홀더/일반화
**이전 상태**: PLAN_LOOP.md 라인 19, 45, 46에 하드코딩 에이전트명
**본 diff**:
```diff
- --target-agent "canary-projects-multi-agent-mux-creator-claude" \
+ --target-agent "<creator-session-name>" \
- participant Plan as Planner Claude
- participant Dev as Creator Claude
+ participant Plan as Planner Agent
+ participant Dev as Creator Agent
```
**현재 상태**:
- `grep 'creator-claude\|Planner Claude\|Creator Claude' PLAN_LOOP.md` = **0건**
- `grep 'creator-session-name\|Planner Agent\|Creator Agent' PLAN_LOOP.md` = **3건** (플레이스홀더/일반화 확인) ✅
**평가**: ✅ 해결. SKILL.md(`f85fdfc`)와 일관성 확보. 3건 모두 정제.
### 2.5 이전 결함 추적 요약
| 결함 | 이전 상태 | 잡 22e70ce2 후 | 본 diff 후 | 해결? |
|------|-----------|----------------|------------|-------|
| DEFECT A: SKILL.md `fi` | 1개 | 1개 (미해결) | **0개** | ✅ 해결 |
| DEFECT B: PLAN_LOOP.md `fi` (66) | 1개 | 1개 (미해결) | **0개** | ✅ 해결 |
| DEFECT C: PLAN_LOOP.md `fi` (84) | 1개 | 1개 (미해결) | **0개** | ✅ 해결 |
| DEFECT D: PLAN_LOOP.md 하드코딩 | 3건 | 3건 (미해결) | **0건** | ✅ 해결 |
---
## 3. mermaid 렌더링实证 (CLI 11.16.0)
### 3.1 ✅ PLAN_LOOP.md — 렌더링 성공
```
$ npx @mermaid-js/mermaid-cli -i planloop2.mmd -o planloop2.svg
Generating single mermaid chart
→ SVG 생성: 41401 bytes ✅
```
**PLAN_LOOP.md mermaid 블록 구조 분석** (라인 41-92):
```
alt --plan 지정 시 → alt #1 open
loop ... → loop #1 open
end → loop #1 close ✅
else --plan 미지정 → alt #1 else
alt 기존 계획 존재 시 → alt #2 open
else 계획 미존재 시 → alt #2 else
end → alt #2 close ✅
end → alt #1 close ✅ (이전 fi, 이제 end)
loop 최대 --max-loop → loop #2 open
alt 리뷰어 옵션 지정 시 → alt #3 open
alt 100% PASS 충족 시 → alt #4 open
else NOT PASS 검출 시 → alt #4 else
end → alt #4 close ✅
else 리뷰어 미지정 → alt #3 else
end → alt #3 close ✅ (이전 fi, 이제 end)
end → loop #2 close ✅
alt --cleanup 지정 시 → alt #5 open
end → alt #5 close ✅
```
**밸런스**: alt=5, else=4, end=7, loop=2 → 열린 7 = 닫힌 7 ✅
**평가**: ✅ PLAN_LOOP.md mermaid 다이어그램이 정상 렌더링됨. `fi` 문제 2건 + 하드코딩 3건 모두 해결로 완전한 복구.
### 3.2 ⚠️ SKILL.md — `Loop` 예약어 충돌로 렌더링 실패 (기존 문제, 본 diff 외)
```
$ npx @mermaid-js/mermaid-cli -i skill2.mmd -o skill2.svg
Error: Parse error on line 12:
...ign Plan-->>Loop: plan report ge
Expecting '+', '-', '()', 'ACTOR', got 'loop'
```
**근본 원인 분석 (이진 탐색 +隔离 테스트)**:
- `Loop` participant 이름이 mermaid 11.16.0에서 예약어/키워드 충돌
- **隔离实证**: `actor Lp as run_loop.sh`로 변경 시 SVG 25575 bytes 정상 렌더링 ✅
- **`Loop` 사용 시**: 파싱 에러 (라인 7 `Loop->>Plan: delegate plan design`에서 실패)
- `Loop`는 mermaid 시퀀스 다이어그램에서 `loop` 키워드와 충돌하는 것으로 판단 — mermaid 파서가 participant `Loop``loop` 키워드로 오인
**기존 문제 여부 확인**:
- HEAD 버전(수정 전) SKILL.md에도 `actor Loop as run_loop.sh` 존재 (라인 79)
-`Loop` participant는 본 diff가 **도입한 문제가 아님** — 원래부터 존재
- 이전 `fi` 문제가 먼저 파싱을 깨뜨렸기 때문에 `Loop` 문제가 가려져 있었음
- `fi` 해결 후 `Loop` 문제가 드러남 — 본 diff의 수정이 올바르게 이루어져서 다음 계층의 기존 문제가 노출된 것
**평가**: ⚠️ SKILL.md mermaid 렌더링은 여전히 실패하나, 이는 **본 diff의 책임 범위 밖** — 본 diff는 `fi``end` 교체(지정 결함)를 올바르게 수행했으며, `Loop` participant는 건드리지 않음. `Loop` 예약어 충돌은 별개의 기존 결함(DEFECT E)으로 다음 라운드에서 다룰 사안.
---
## 4. 긍정적 변경 상세 (POSITIVE)
### 4.1 ✅ run_loop.sh 잡 경로 수정 (hang 버그 해결) — 런타임实证 (잡 22e70ce2와 동일)
```diff
- with open('.mam/jobs/$job_id/job.json') as f:
+ with open('.mam/jobs/$job_id.json') as f:
```
- 실제 레지스트리 구조: `.mam/jobs/<job_id>.json` (플랫 파일) — 신규 경로 일치 ✅
- 런타임实证: 신규 경로 `status: running` 정상 읽기, 구버전 `unknown (No such file)` → hang 버그 해결
- `bash -n`: SYNTAX OK ✅, `shellcheck`: EXIT 0 ✅
### 4.2 ✅ run_loop.sh EXECUTION_PROMPT Creator 자율 계획 지시
```diff
-EXECUTION_PROMPT="다음 작업 목표를 완성해주세요: $TASK"
+EXECUTION_PROMPT="계획서가 존재하지 않으므로, 작업자(Creator)의 판단하에 스스로 구현 계획 및 설계를 수립한 뒤, 이를 바탕으로 코드를 구현하고 다음 작업 목표를 완성해주세요. 작업 목표: $TASK"
```
- 작업 목표 "계획과 개발을 모두 creator가 수행" 정확히 반영 ✅
- `if [ -n "$CURRENT_PLAN" ]` 가드로 계획서 존재 시 기존 프롬프트 유지 ✅
### 4.3 ✅ SKILL.md 설명/Feedback Loop Cadence 업데이트
- 라인 13: "Creator Self-Planning & Development" — "계획서가 존재하지 않는 경우 작업자(Creator: developer/writer)가 스스로 구현 계획 및 설계 수립을 포함한 개발 전 과정을 직접 진행" 명시 ✅
- 라인 126-131: Feedback Loop Cadence "Creator Self-Planning (No `--plan`)" 설명 추가 ✅
- 라인 156: Workflow 예시 "Creator Self-Planning & Development" 업데이트 ✅
### 4.4 ✅ PLAN_LOOP.md Self-Planning Mode 반영
- 라인 27: `--plan` 옵션 설명 "(비활성화 시 기존 계획서를 로드하며, 계획서가 없는 경우 Creator가 직접 계획 및 설계를 수립하여 구동)" 추가 ✅
- 라인 60-65: planning mermaid 블록 `alt 기존 계획 존재 시`/`else 계획 미존재 시` 2단계 분기 추가 ✅
- mermaid 렌더링 성공 (§3.1) ✅
---
## 5. 새로 발견된 결함 (INFORMATIONAL — 본 diff 외)
### 5.1 ⚠️ DEFECT E (NON-BLOCKING for 본 diff, BLOCKING for 전체 mermaid 렌더링): SKILL.md `Loop` participant 예약어 충돌
| 항목 | 내용 |
|------|------|
| 파일 | SKILL.md |
| 위치 | 라인 79 `actor Loop as run_loop.sh` (및 mermaid 블록 내 `Loop` 참조 전체) |
| 문제 | `Loop`가 mermaid 11.16.0에서 `loop` 키워드와 충돌 — participant 이름으로 사용 시 파싱 에러 |
|实证 | `actor Lp as run_loop.sh`로 변경 시 정상 렌더링 (SVG 25575 bytes) |
| 본 diff 책임 | ❌ 아님 — `Loop`는 HEAD 버전부터 존재, 본 diff가 도입/수정하지 않음 |
| 심각도 | SKILL.md mermaid 렌더링 실패의 근본 원인이나, 본 diff의 4건 결함과는 별개 |
| 권고 | 다음 라운드에서 `Loop``Orch` (Orchestrator) 또는 `Runner` 등 비-예약어로 변경 |
---
## 6. 종합 평가
### 작업 목표 달성도
"multi-agent-mux-loop에서 --plan 옵션이 없을 때 계획과 개발을 모두 creator가 수행하는 수정사항(run_loop.sh, SKILL.md, PLAN_LOOP.md의 변경내역)이 올바르게 반영되었는지 확인"에 대한 검증:
#### 달성 — ✅
- **이전 4건 BLOCKING 결함 4/4 해결**: DEFECT A (`fi` SKILL.md), DEFECT B (`fi` PLAN_LOOP.md 66), DEFECT C (`fi` PLAN_LOOP.md 84), DEFECT D (하드코딩 3건) — 주 개발자가 2회 연속 NOT PASS 후 3차 시도에서 모든 지적 사항 수용/수정
- **PLAN_LOOP.md mermaid 렌더링 성공** (SVG 41401 bytes, CLI 11.16.0实证) — `fi` 2건 + 하드코딩 3건 해결로 완전 복구
- **run_loop.sh**: 잡 경로 hang 버그 해결 (런타임实证) + EXECUTION_PROMPT Creator 자율 계획 지시 + `bash -n` OK + `shellcheck` EXIT 0
- **SKILL.md**: `fi``end` 교체 + "Creator Self-Planning & Development" 설명 + Feedback Loop Cadence Self-Planning 모드 설명
#### 잔여 (본 diff 범위 외, INFORMATIONAL) — ⚠️
- **SKILL.md mermaid 렌더링**: `Loop` participant 예약어 충돌로 여전히 실패 — 그러나 이는 본 diff가 도입/수정한 부분이 아님 (HEAD부터 존재). `fi` 해결 후 드러난 기존 결함(DEFECT E). 본 diff의 4건 결함 해결과는 별개.
### 검증 결과
- run_loop.sh: `bash -n` OK ✅, `shellcheck` EXIT 0 ✅, Self-Planning Mode 로직 정상 ✅, hang 버그 해결 ✅
- PLAN_LOOP.md: mermaid 렌더링 성공 ✅, `fi` 0건 ✅, 하드코딩 0건 ✅
- SKILL.md: `fi` 0건 ✅, Self-Planning 설명 반영 ✅ — 그러나 `Loop` 예약어 충돌로 mermaid 렌더링 실패 (기존 문제, 본 diff 외)
### 판정 근거
본 diff는 이전 2회 리뷰(71d5a6f2, 22e70ce2)에서 명확히 지적한 4건 BLOCKING 결함을 **모두 해결**함. PLAN_LOOP.md는 mermaid 렌더링이 완전히 복구되었고, run_loop.sh는 정상 동작함. SKILL.md의 `Loop` 예약어 충돌은 본 diff가 도입한 문제가 아니며, 본 diff가 수정하라고 지정받은 범위 밖. 주 개발자가 지정된 작업을 성실히 완수했으므로 PASS 판정이 타당. `Loop` 문제는 다음 라운드에서 별도로 다룰 사안으로 informational note로 기록.
[VERDICT: PASS]
@@ -0,0 +1,172 @@
# ✅ Peer Review Report: macOS 타임아웃 오류 수정 — 절대 경로 분석 및 quarantine 해제 (Job e81e70d6)
**Job**: `e81e70d6` · **Reviewer**: Reviewer B (Cline, `canary-projects-multi-agent-mux-reviewer-cline`)
**Review Target**: 커밋 `f79fd99` "fix(mac-compat): resolve absolute path of agent binary and strip macos quarantine attribute to prevent gatekeeper and path-resolution timeouts"
**Files Changed**: `create_session.sh` (+18/-4), `resume_session.sh` (+17/-4) — 2 files, 43 insertions, 8 deletions
**Review Scope**: 작업 목표 "create_session.sh 및 resume_session.sh에서 에이전트 실행 시 절대 경로 분석(command -v)과 macOS 격리 해제(xattr) 처리로 macOS 타임아웃 오류를 수정" — 린트, 동작성, 유실 관점 교차 리뷰
**Method**: 커밋 diff 분석 + `bash -n`/`shellcheck` 정적 분석 + `command -v` 해상도 검증 + Darwin/xattr 가드 검증 + 양 파일 블록 일치성 비교 + 사전 패턴 회귀 확인 + cline 특수 케이스 중복성 검증
---
## 1. 변경 사항 개요
### 1.1 절대 경로 분석 (command -v)
두 파일 모두 동일한 블록 추가:
```bash
RESOLVED_BIN="$AGENT"
if [ "$AGENT" = "cline" ]; then
if command -v cline >/dev/null 2>&1; then
RESOLVED_BIN="$(command -v cline)"
fi
else
if command -v "$AGENT" >/dev/null 2>&1; then
RESOLVED_BIN="$(command -v "$AGENT")"
fi
fi
```
**목적**: tmux 세션 spawn 시 PATH 상속 문제 방지. `command -v`로 절대 경로 해상 → tmux가 올바른 바이너리 실행.
### 1.2 macOS quarantine 속성 제거 (xattr)
```bash
if [ "$(uname)" = "Darwin" ] && [ -f "$RESOLVED_BIN" ]; then
xattr -d com.apple.quarantine "$RESOLVED_BIN" 2>/dev/null || true
fi
```
**목적**: macOS Gatekeeper가 quarantine 속성으로 인해 바이너리 실행 시 확인 대화상자 표시 → 타임아웃 발생. `xattr -d`로 속성 제거.
### 1.3 case 문 RESOLVED_BIN 적용
모든 agent 케이스(claude/agy/hermes/cline)의 `CMD_FULL`에서 bare 이름 → `${RESOLVED_BIN}` 교체.
---
## 2. 작업 목표 달성도
| 목표 | 상태 | 확인 |
|------|------|------|
| 절대 경로 분석 (command -v) | ✅ | 두 파일 모두 RESOLVED_BIN 블록 추가 |
| macOS 격리 해제 (xattr) | ✅ | Darwin 가드 + xattr -d com.apple.quarantine |
| macOS 타임아웃 오류 수정 | ✅ | PATH 해상 + Gatekeeper 방지로 근원 해결 |
| create_session.sh 적용 | ✅ | 라인 152-174 |
| resume_session.sh 적용 | ✅ | 라인 90-113 |
---
## 3. 정적 분석
| 파일 | bash -n | shellcheck | 비고 |
|------|---------|------------|------|
| create_session.sh | ✅ SYNTAX OK | SC1091 (info, 기존 source) — **본 diff 새 경고 없음** | EXIT 1 (기존) |
| resume_session.sh | ✅ SYNTAX OK | SC1091 (info, 기존), SC2155 (warning, 라인 40, 기존) — **본 diff 새 경고 없음** | EXIT 1 (기존) |
`shellcheck -x`(source follow)에서도 본 diff 관련 새 경고 없음 ✅
---
## 4. 동작성 검증
### 4.1 ✅ command -v 해상도 검증
| 조건 | 결과 | 판정 |
|------|------|------|
| agent 바이너리 PATH에 있음 | `command -v` → 절대 경로 | ✅ 정상 (예: `/home/godopu16/.npm-global/bin/cline`) |
| agent 바이너리 PATH에 없음 | `command -v` 실패 → `RESOLVED_BIN` stays as `$AGENT` | ✅ graceful fallback |
| Linux 환경 | 모든 agent NOT FOUND → fallback | ✅ 정상 동작 |
### 4.2 ✅ Darwin/xattr 가드 검증
| 조건 | 결과 | 판정 |
|------|------|------|
| `uname` = Linux | Darwin 체크 실패 → xattr 블록 스킵 | ✅ Linux에서 xattr 미호출 |
| `uname` = Darwin + 파일 존재 | `xattr -d com.apple.quarantine` 실행 | ✅ macOS에서 quarantine 제거 |
| `uname` = Darwin + quarantine 없음 | `xattr -d` 실패 → `\|\| true`로 무시 | ✅ graceful |
| `RESOLVED_BIN` = bare 이름(해상 실패) | `[ -f "$RESOLVED_BIN" ]` 실패 → xattr 스킵 | ✅ 파일이 아닌 경우 안전 |
### 4.3 ✅ 양 파일 블록 일치성
`RESOLVED_BIN` 해상 블록 + `xattr` 블록이 create_session.sh(라인 152-167)와 resume_session.sh(라인 90-105)에서 **byte-identical** ✅. `diff`로 확인 — IDENTICAL.
### 4.4 ✅ 사전 패턴 회귀 확인
- `cline` case의 `ISO_ENV_PREFIX` 누락: **사전 패턴** (원본 `cline -i...``ISO_ENV_PREFIX` 없음). 본 diff는 `cline``${RESOLVED_BIN}`만 교체, 패턴 유지. 회귀 아님 ✅
- `case` 문의 `CMD_FULL` 구조: bare 이름 → `${RESOLVED_BIN}` 교체만, 나머지 인자/플래그 동일 ✅
- auth check(라인 86-102)는 bare 이름 사용: `RESOLVED_BIN` 블록 **이전** pre-flight 검사이므로 PATH 기반 조회가 적절. 본 diff 범위 외 ✅
### 4.5 ✅ spawn 경로 모두 CMD_FULL 사용
- create_session.sh spawn(): claude(라인 184), agy|hermes|cline(라인 188) 모두 `"$CMD_FULL"` 사용 → `RESOLVED_BIN` 반영 ✅
- resume_session.sh: claude wrapper 경로(라인 127)는 사전 패턴(하드코딩 wrapper), else(라인 129) + agy|hermes|cline(라인 136)은 `$CMD_FULL``RESOLVED_BIN` 반영 ✅
---
## 5. 잔여 결함 (LOW — INFORMATIONAL)
### 5.1 ⚠️ cline 특수 케이스 중복 (LOW, code smell)
**위치**: 양 파일 라인 154-162
```bash
if [ "$AGENT" = "cline" ]; then
if command -v cline >/dev/null 2>&1; then
RESOLVED_BIN="$(command -v cline)" # hardcode "cline"
fi
else
if command -v "$AGENT" >/dev/null 2>&1; then
RESOLVED_BIN="$(command -v "$AGENT")" # variable "$AGENT"
fi
fi
```
**분석**: `AGENT=cline`일 때 else 브랜치 `command -v "$AGENT"`(= `command -v cline`)와 동일 결과.实证: 두 방법 모두 `/home/godopu16/.npm-global/bin/cline` 반환 → **IDENTICAL**.
**평가**: 특수 케이스가 기능적으로 중복. else 브랜치만으로 충분. 단, 버그 아님 — 올바르게 동작함. 단순 code smell.
**심각도**: LOW — BLOCKING 아님.
**권고**: 향후 `if command -v "$AGENT"` 단일 브랜치로 단순화 고려.
### 5.2 ⚠️ RESOLVED_BIN 경로 내 공백 시 eval 분할 (LOW, theoretical)
**위치**: resume_session.sh 라인 136 `eval "tmux ... \"$CMD_FULL\""`
**분석**: `RESOLVED_BIN`이 공백 포함 경로(예: `/path with spaces/claude`)인 경우, `CMD_FULL` 내 공백이 eval에 의해 단어 분할 → 잘못된 실행.
**현재 영향**: macOS/Linux 표준 설치 경로(`/usr/local/bin`, `/opt/homebrew/bin`, `~/.npm-global/bin`)는 공백 없음. 이론적 가능성만 존재.
**참고**: 사전 패턴 — 원본도 `CMD_FULL="claude --dangerously..."`를 eval로 실행. 본 diff가 도입한 문제 아님.
**심각도**: LOW — 이론적, BLOCKING 아님.
### 5.3 ️ 작업 트리 잔여 .tmp 파일 (INFO, unrelated)
**위치**: `.agents/skills/multi-agent-mux-delegate-job/multi-agent-mux-delegate-job.16035_12342.tmp` (untracked)
**분석**: 이전 delegate_job_safe 실행 잔여물. 본 diff와 무관. 무해하지만 정리 권장.
**심각도**: INFO — 본 리뷰 범위 외.
---
## 6. 종합 평가
### 작업 목표 달성도
"create_session.sh 및 resume_session.sh에서 에이전트 실행 시 절대 경로 분석(command -v)과 macOS 격리 해제(xattr) 처리로 macOS 타임아웃 오류를 수정" — **달성**.
### 변경 품질
1.**절대 경로 해상**: `command -v`로 PATH 상속 문제 해결, graceful fallback(해상 실패 시 bare 이름 유지)
2.**quarantine 제거**: Darwin 가드 + `xattr -d ... || true`로 안전 처리, Linux에서 미실행
3.**양 파일 일치**: RESOLVED_BIN + xattr 블록이 byte-identical — 일관성 확보
4.**사전 패턴 존중**: cline ISO_ENV_PREFIX 누락 등 기존 설계 유지, 회귀 없음
5.**모든 spawn 경로 반영**: create/resume 모든 case에서 `${RESOLVED_BIN}` 적용
### 검증 결과
- 정적 분석: `bash -n` 2/2 OK, `shellcheck` 본 diff 새 경고 없음 ✅
- command -v 해상: 정상(절대 경로) + fallback(bare 이름) 모두 확인 ✅
- Darwin/xattr 가드: Linux 스킵, macOS 실행, quarantine 없음 시 graceful ✅
- 양 파일 일치성: IDENTICAL ✅
- 사전 패턴 회귀: 없음 ✅
### 잔여 LOW 2건 + INFO 1건
- LOW 5.1: cline 특수 케이스 중복 (code smell, 버그 아님)
- LOW 5.2: RESOLVED_BIN 공백 시 eval 분할 (이론적, 사전 패턴)
- INFO 5.3: 잔여 .tmp 파일 (본 diff 무관)
### 판정 근거
작업 목표(절대 경로 분석 + quarantine 해제) 완전 달성. 양 파일에 동일 블록 추가로 일관성 확보. 정적 분석 통과, 동작성 검증(command -v fallback, Darwin 가드, 일치성) 모두 PASS. 사전 패턴 회귀 없음. 잔여 LOW 2건은 모두 BLOCKING 아닌 code smell/이론적 가능성. 주 개발자가 macOS 타임아웃 근원(PATH 해상 + Gatekeeper)을 정확히 진단하고 수정했으므로 PASS 판정이 타당.
[VERDICT: PASS]
+42 -5
View File
@@ -16,6 +16,9 @@
if [ -z "${BASH_VERSION:-}" ]; then
echo "ERROR: lib.sh must be executed/sourced from bash (foreign shell detected)" >&2
# Reachable when this file is executed directly rather than sourced;
# `return` only fails (falling through to `exit`) in that path.
# shellcheck disable=SC2317
return 1 2>/dev/null || exit 1
fi
SKILL_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
@@ -145,6 +148,16 @@ try:
d = yaml.safe_load(f) or {}
except Exception:
pass
# Clean lone surrogates to prevent UnicodeEncodeError on stdout print
def clean_surrogates(obj):
if isinstance(obj, str):
return obj.encode('utf-8', errors='replace').decode('utf-8')
elif isinstance(obj, dict):
return {k: clean_surrogates(v) for k, v in obj.items()}
elif isinstance(obj, list):
return [clean_surrogates(x) for x in obj]
return obj
d = clean_surrogates(d)
print(json.dumps(d, ensure_ascii=False))
PYEOF
}
@@ -797,7 +810,7 @@ provision_isolation() {
if [ -d "$HOME/.claude/plugins" ]; then ln -sfn "$HOME/.claude/plugins" "$root/plugins"; seeded="$seeded,plugins"; fi
;;
cline)
# Phase 0 실측: --config 공유 지정만으론 auth 미공유 — settings/* + globalState.json 시딩 필수
# CLI 가 --data-dir <root> 를 읽을 때 최상위 루트 하위에서 설정을 찾으므로 다이렉트 맵핑
mkdir -p "$root/settings"
for f in "$HOME/.cline/data/settings/"*; do
[ -e "$f" ] || continue
@@ -807,6 +820,15 @@ provision_isolation() {
if [ -e "$HOME/.cline/data/globalState.json" ]; then
ln -sfn "$HOME/.cline/data/globalState.json" "$root/globalState.json"; seeded="${seeded:+$seeded,}globalState.json"
fi
# 인증과 DB 바인딩을 연계하여 Welcome Screen 튕김 방지
mkdir -p "$root/db"
for f in "$HOME/.cline/data/db/"*; do
[ -e "$f" ] || continue
base="$(basename "$f")"
# DB 락 경쟁 크래시 방지를 위해 물리 복사(cp -p)로 직접 주입
cp -p "$f" "$root/db/$base"
seeded="${seeded:+$seeded,}db/$base"
done
;;
agy)
mkdir -p "$root/.gemini/antigravity-cli"
@@ -816,6 +838,14 @@ provision_isolation() {
for f in antigravity-oauth-token installation_id settings.json; do
if [ -e "$HOME/.gemini/antigravity-cli/$f" ]; then ln -sfn "$HOME/.gemini/antigravity-cli/$f" "$root/.gemini/antigravity-cli/$f"; seeded="${seeded:+$seeded,}.gemini/antigravity-cli/$f"; fi
done
# On macOS, seed ~/Library/Keychains to allow isolated agy to query Keychain Access credentials
if [ "$(uname)" = "Darwin" ]; then
mkdir -p "$root/Library"
if [ -d "$HOME/Library/Keychains" ]; then
ln -sfn "$HOME/Library/Keychains" "$root/Library/Keychains"
seeded="${seeded:+$seeded,}Library/Keychains"
fi
fi
;;
hermes)
mkdir -p "$root/.hermes"
@@ -999,10 +1029,10 @@ start_watchdog() {
# Start the wildcard monitor subscriber daemon with --idle-timeout 0 (never idle out)
# and ensure it runs with $workdir as cwd to anchor relative log paths.
local orig_pwd="$PWD"
cd "$workdir"
cd "$workdir" || return 1
nohup bash "$monitor_script" --subscribe --idle-timeout 0 >> "$log_file" 2>&1 &
pid=$!
cd "$orig_pwd"
cd "$orig_pwd" || return 1
fi
echo "$pid"
@@ -1017,7 +1047,7 @@ wait_for_tui_ready() {
local_tmux="tmux -L $TMUX_SERVER_NAME"
fi
for i in {1..15}; do
for i in {1..30}; do
if _pane_dialog_open "$sess"; then
sleep 1
continue
@@ -1045,7 +1075,7 @@ wait_for_tui_ready() {
fi
;;
cline)
if echo "$content" | grep -E -q "Cline|history|Chat" 2>/dev/null; then
if echo "$content" | grep -E -q "Cline|history|Chat|What can I do|slash commands" 2>/dev/null; then
echo "✅ Cline TUI detected ready."
return 0
fi
@@ -1149,6 +1179,10 @@ send_keys_safe() {
_sks_tmux set-buffer -b "sks_$job_id" "$text"
_sks_tmux paste-buffer -b "sks_$job_id" -t "$sess"
_sks_tmux delete-buffer -b "sks_$job_id" 2>/dev/null || true
if [[ "$sess" =~ "agy" ]]; then
_sks_tmux send-keys -t "$sess" C-m
return 0
fi
sleep 0.5
local pane_content was_popup=0
pane_content=$(_pane_capture "$sess")
@@ -1166,6 +1200,9 @@ send_keys_safe() {
local cur_content
cur_content=$(_pane_capture "$sess")
# Hardened Submission Checks
if printf '%s\n' "$cur_content" | grep -Eq "● |✽ |[A-Za-z]+ing…|[A-Za-z]+ing\.\.\.|esc to interrupt"; then
return 0
fi
if [ "$was_popup" = "0" ] && ! _pane_tail "$sess" 3 | grep -Fq "$marker" && [ "$cur_content" != "$pre_submit" ]; then
return 0
elif [ "$was_popup" = "1" ] && \
@@ -35,8 +35,8 @@ Options:
--tmux-server NAME specify isolated tmux server name
--submit-job PROMPT submit a job to multi-agent-mux-delegate-job registry with the given prompt
--onboard automatically submit a project alignment/orientation job to the new agent
--isolate provision an isolated per-session state home (.mam/agent_homes/<uuid>)
so same-CLI multi-role sessions never share a conversation id
--no-isolate disable state isolation (shares global configuration/history)
[default: isolated mode is always active]
-h, --help this help
EOF
}
@@ -50,7 +50,7 @@ DRY_RUN=0
TMUX_SERVER_OPT=""
SUBMIT_JOB_PROMPT=""
ONBOARD=0
ISOLATE=0
ISOLATE=1
while [ $# -gt 0 ]; do
case "$1" in
@@ -63,7 +63,8 @@ while [ $# -gt 0 ]; do
--tmux-server) TMUX_SERVER_OPT="$2"; shift 2 ;;
--submit-job) SUBMIT_JOB_PROMPT="$2"; shift 2 ;;
--onboard) ONBOARD=1; shift ;;
--isolate) ISOLATE=1; shift ;;
--isolate) ISOLATE=1; shift ;; # legacy compatibility
--no-isolate) ISOLATE=0; shift ;;
-h|--help) usage; exit 0 ;;
*) echo "ERROR: unknown arg: $1" >&2; usage; exit 2 ;;
esac
@@ -88,7 +89,10 @@ if [ "$AGENT" = "claude" ]; then
exit 1
fi
elif [ "$AGENT" = "agy" ]; then
if ! agy models >/dev/null 2>&1; then
# Fast, non-blocking check: if token or credentials exist on disk, assume authenticated to prevent keyring hang
if [ -f "$HOME/.gemini/oauth_creds.json" ] || [ -f "$HOME/.gemini/antigravity-cli/antigravity-oauth-token" ]; then
true
elif ! agy models >/dev/null 2>&1; then
echo "ERROR: agy is not authenticated. Please log in first." >&2
exit 1
fi
@@ -147,11 +151,29 @@ if [ -n "$ISOLATION_ROOT" ]; then
ISO_ENV_PREFIX="$(isolation_env_prefix "$AGENT" "$ISOLATION_ROOT")"
ISO_CMD_ARGS="$(isolation_cmd_args "$AGENT" "$ISOLATION_ROOT")"
fi
# Resolve absolute path of the agent command to prevent tmux PATH inheritance issues (especially on macOS)
RESOLVED_BIN="$AGENT"
if [ "$AGENT" = "cline" ]; then
if command -v cline >/dev/null 2>&1; then
RESOLVED_BIN="$(command -v cline)"
fi
else
if command -v "$AGENT" >/dev/null 2>&1; then
RESOLVED_BIN="$(command -v "$AGENT")"
fi
fi
# On macOS, clear quarantine attribute for the agent binary to prevent Gatekeeper hangs
if [ "$(uname)" = "Darwin" ] && [ -f "$RESOLVED_BIN" ]; then
xattr -d com.apple.quarantine "$RESOLVED_BIN" 2>/dev/null || true
fi
case "$AGENT" in
claude) CMD_FULL="${ISO_ENV_PREFIX}claude --dangerously-skip-permissions" ;;
agy) CMD_FULL="${ISO_ENV_PREFIX}agy --dangerously-skip-permissions" ;;
hermes) CMD_FULL="${ISO_ENV_PREFIX}hermes" ;;
cline) CMD_FULL="cline -i${ISO_CMD_ARGS:+ $ISO_CMD_ARGS}" ;;
claude) CMD_FULL="${ISO_ENV_PREFIX}${RESOLVED_BIN} --dangerously-skip-permissions" ;;
agy) CMD_FULL="${ISO_ENV_PREFIX}${RESOLVED_BIN} --dangerously-skip-permissions" ;;
hermes) CMD_FULL="${ISO_ENV_PREFIX}${RESOLVED_BIN}" ;;
cline) CMD_FULL="${RESOLVED_BIN} -i${ISO_CMD_ARGS:+ $ISO_CMD_ARGS}" ;;
esac
spawn() {
@@ -33,6 +33,7 @@ multi-agent-mux-delegate-job submit \
--agent <claude-code|hermes-agent|agy-agent|cline-agent|human> \
--agent-session tmux:<session_name> \
--prompt "Task description or instructions here" \
--role <Worker|Planner|Reviewer> \
--timeout 3600 --idle-timeout 120
# 2) Submit a job with a feedback loop (Worker-Reviewer Loop)
@@ -52,9 +52,10 @@ multi-agent-mux-delegate-job <command> [options]
submit --agent <name> --prompt <text> [--workdir <dir>] [--agent-session <label>]
[--timeout <sec>] [--idle-timeout <sec>] [--validate <script>]
[--registry-dir <dir>] [--dry-run]
[--registry-dir <dir>] [--dry-run] [--role <role_name>]
[--type <direct|loop|discuss>] [--reviewer <reviewer_agent>]
[--reviewer-session <reviewer_session>] [--max-iterations <count>]
[--counterpart-role <role_name>] [--strict-role-check]
# The skill is tmux-interactive only; --mode print was removed.
status --job <id> [--registry-dir <dir>]
list [--registry-dir <dir>]
@@ -67,8 +68,13 @@ EOF
# ---- arg parsing helpers --------------------------------------------------
AGENT="claude-code"; PROMPT=""; WORKDIR="$(pwd)"; AGENT_SESSION="tmux:claude"
TIMEOUT=3600; IDLE_TIMEOUT=120; VALIDATE=""; DRY_RUN=0
JOB_ID=""; REGISTRY_DIR="$REGISTRY_DIR_DEFAULT"
JOB_ID=""; REGISTRY_DIR="$REGISTRY_DIR_DEFAULT"; DELEGATE_ROLE="Worker"
TYPE="direct"; REVIEWER="hermes"; REVIEWER_SESSION="tmux:hermes"; MAX_ITERATIONS=5
DEFAULT_COUNTERPART_ROLE="Reviewer"
COUNTERPART_ROLE="$DEFAULT_COUNTERPART_ROLE"
STRICT_ROLE_CHECK=0
ROLE_ALIASES_JSON='{"worker": ["worker", "creator"], "planner": ["planner"], "reviewer": ["reviewer"]}'
COUNTERPART_ROLE_EXPLICIT=0
parse_opts() {
while [[ $# -gt 0 ]]; do
@@ -83,10 +89,13 @@ parse_opts() {
--job) JOB_ID="$2"; shift 2;;
--registry-dir) REGISTRY_DIR="$2"; shift 2;;
--dry-run) DRY_RUN=1; shift;;
--role) DELEGATE_ROLE="$2"; shift 2;;
--type) TYPE="$2"; shift 2;;
--reviewer) REVIEWER="$2"; shift 2;;
--reviewer-session) REVIEWER_SESSION="$2"; shift 2;;
--max-iterations) MAX_ITERATIONS="$2"; shift 2;;
--counterpart-role) COUNTERPART_ROLE="$2"; COUNTERPART_ROLE_EXPLICIT=1; shift 2;;
--strict-role-check) STRICT_ROLE_CHECK=1; shift;;
*) echo "unknown option: $1" >&2; usage; exit 1;;
esac
done
@@ -101,7 +110,7 @@ cmd_submit() {
# 1) register job (prints the new job id)
JOB_ID="$("$PY" "$SCRIPT_DIR/scripts/registry.py" --registry-dir "$REGISTRY_DIR" register \
--prompt "$PROMPT" --agent "$AGENT" --agent-session "$AGENT_SESSION" \
--prompt "$PROMPT" --agent "$AGENT" --agent-session "$AGENT_SESSION" --role "$DELEGATE_ROLE" \
--timeout "$TIMEOUT" --idle-timeout "$IDLE_TIMEOUT" \
--job-type "$TYPE" --reviewer "$REVIEWER" --reviewer-session "$REVIEWER_SESSION" \
--max-iterations "$MAX_ITERATIONS")"
@@ -116,7 +125,7 @@ cmd_submit() {
- **Job ID**: $JOB_ID
- **Target Agent**: $AGENT (session: $AGENT_SESSION)
- **Role**: Worker
- **Role**: $DELEGATE_ROLE
- **Timeout**: $TIMEOUT s (Idle: $IDLE_TIMEOUT s)
- **Output Report Path**: .mam/jobs/$JOB_ID/$AGENT-reports/report-final.md
@@ -196,7 +205,8 @@ EOF
local iteration=1
local current_prompt="$PROMPT"
local current_session="$AGENT_SESSION"
local current_role="worker"
local _phase="worker"
local display_role="$DELEGATE_ROLE"
if [[ "$DRY_RUN" == "1" ]]; then
echo "[dry-run] orchestrator loop would start for job: $JOB_ID type: $TYPE"
@@ -208,7 +218,7 @@ EOF
while true; do
echo "=================================================="
echo "Iteration $iteration - Role: $current_role"
echo "Iteration $iteration - Role: $display_role"
echo "Session: $current_session"
echo "=================================================="
@@ -222,7 +232,7 @@ EOF
- **Job ID**: $JOB_ID
- **Target Agent/Session**: $current_session
- **Role**: $current_role
- **Role**: $display_role
- **Iteration**: $iteration
- **Output Report Path**: .mam/jobs/$JOB_ID/${clean_session}-reports/report-final.md
@@ -238,10 +248,11 @@ EOF
--agent-session "$current_session" \
--prompt "$current_prompt" \
--iteration "$iteration" \
--role "$display_role" \
--status "pending"
# Start subscriber
local logf="$REGISTRY_DIR/${JOB_ID}.iter_${iteration}_${current_role}.subscriber.out"
local logf="$REGISTRY_DIR/${JOB_ID}.iter_${iteration}_${display_role}.subscriber.out"
"$PY" "$SCRIPT_DIR/scripts/job_subscriber.py" --registry-dir "$REGISTRY_DIR" \
--job "$JOB_ID" --timeout "$TIMEOUT" --idle-timeout "$IDLE_TIMEOUT" \
>"$logf" 2>&1 &
@@ -270,7 +281,12 @@ EOF
local instructions="Your job_id is \"$JOB_ID\". Detailed task requirements, instructions, and target output paths for iteration $iteration are documented in the task brief file at: .mam/jobs/$JOB_ID/brief.md. Please READ and follow .mam/jobs/$JOB_ID/brief.md to complete your work. Commands: start='$pub --event started', success='$pub --event completed --detail <summary>', error='$pub --event error --detail <reason>'."
# Trigger agent
run_agent "$JOB_ID" "$instructions" "$current_session"
local force_warn_only=0
if [[ "$_phase" == "reviewer" && "$COUNTERPART_ROLE_EXPLICIT" -eq 1 \
&& "${COUNTERPART_ROLE,,}" != "${DEFAULT_COUNTERPART_ROLE,,}" ]]; then
force_warn_only=1
fi
run_agent "$JOB_ID" "$instructions" "$current_session" "$force_warn_only"
# Wait for subscriber
local sub_rc=0
@@ -287,21 +303,22 @@ EOF
job_status="timeout"
fi
echo "Job role $current_role finished with status: $job_status"
echo "Job role $display_role finished with status: $job_status"
# Retrieve feedback from the last event
local feedback
feedback="$("$PY" "$SCRIPT_DIR/scripts/registry.py" --registry-dir "$REGISTRY_DIR" get-feedback --job "$JOB_ID")"
echo "Feedback/Detail: $feedback"
if [[ "$current_role" == "worker" ]]; then
if [[ "$_phase" == "worker" ]]; then
if [[ "$job_status" != "completed" ]]; then
echo "Worker did not complete successfully (status: $job_status). Terminating workflow."
break
fi
# Worker completed successfully, now switch to reviewer
current_role="reviewer"
_phase="reviewer"
display_role="$COUNTERPART_ROLE"
current_session="$REVIEWER_SESSION"
# Build reviewer prompt based on type
if [[ "$TYPE" == "loop" ]]; then
@@ -340,7 +357,8 @@ EOF
fi
iteration=$((iteration + 1))
current_role="worker"
_phase="worker"
display_role="$DELEGATE_ROLE"
current_session="$AGENT_SESSION"
current_prompt="The reviewer provided the following feedback for job $JOB_ID: $feedback. Please modify the code/artifacts to address these comments. CRITICAL: As the Developer Team Leader, you must thoroughly review the suggested modifications, verify their validity, adopt/implement them if valid, and if you judge any recommendation to be invalid, do NOT implement it but instead explain your reasons clearly in your response and send it back to the reviewer (수정안을 최대한 꼼꼼히 검토하여 타당성을 검증하고, 타당하다면 수렴하여 수정을 진행하되, 타당하지 않다고 판단되는 부분이 있다면 그 이유를 명확히 밝혀 리뷰어에게 전달하십시오)."
fi
@@ -365,7 +383,7 @@ EOF
}
run_agent() {
local job_id="$1"; local instructions="$2"; local target_session="${3:-$AGENT_SESSION}"
local job_id="$1"; local instructions="$2"; local target_session="${3:-$AGENT_SESSION}"; local force_warn_only="${4:-0}"
# The skill is INTERACTIVE-ONLY. We never invoke `claude -p` or any other
# one-shot print mode, because:
# - claude -p exits the moment stdin is drained, so there's nothing to
@@ -406,6 +424,53 @@ run_agent() {
return 1
fi
# Check role suitability
source "$SCRIPT_DIR/../lib.sh"
local sess_role job_role
sess_role=$(SESS_NAME="$sess" MAM_STATE_JSON="$(load_state_json)" "$PY" -c "
import os, json
d = json.loads(os.environ.get('MAM_STATE_JSON', '{}'))
name = os.environ.get('SESS_NAME')
for s in d.get('tmux_sessions', []):
if s.get('name') == name:
print(s.get('role', ''))
break
" 2>/dev/null || echo "")
job_role=$("$PY" -c "
import json
try:
with open('$REGISTRY_DIR/$job_id.json') as f:
print(json.load(f).get('role', ''))
except Exception:
pass
" 2>/dev/null || echo "")
if [[ -n "$job_role" && -n "$sess_role" ]]; then
local check_result
check_result=$(JOB_ROLE="$job_role" SESS_ROLE="$sess_role" ROLE_ALIASES_JSON="$ROLE_ALIASES_JSON" "$PY" -c "
import os, json
job = os.environ.get('JOB_ROLE', '').lower()
sess = os.environ.get('SESS_ROLE', '').lower()
aliases = json.loads(os.environ.get('ROLE_ALIASES_JSON', '{}'))
candidates = aliases.get(job, [job])
if any(c in sess for c in candidates):
print('OK')
else:
print('MISMATCH')
" 2>/dev/null || echo "OK")
if [[ "$check_result" == "MISMATCH" ]]; then
local mismatch_msg="Target session '$sess' has role '$sess_role' which does not match job role '$job_role'."
if [[ "$STRICT_ROLE_CHECK" -eq 1 && "$force_warn_only" -ne 1 ]]; then
echo "ERROR: role suitability mismatch. $mismatch_msg" >&2
return 1
else
echo "WARNING: $mismatch_msg" >&2
fi
fi
fi
# Before launching the agent, set up error trap to publish error event
if [ -n "${job_id:-}" ] && [ -n "${PY:-}" ]; then
pub_script="$SCRIPT_DIR/scripts/publish_event.py"
@@ -413,7 +478,6 @@ run_agent() {
fi
echo "살아있는 에이전트 세션 '$sess'에 작업을 위임합니다..."
source "$SCRIPT_DIR/../lib.sh"
if ! send_keys_safe "$sess" "$instructions" "$job_id"; then
echo "ERROR: 프롬프트 주입 실패 — 세션 '$sess' (프롬프트 잠금 의심)" >&2
return 1
@@ -51,6 +51,7 @@ def register_job(
prompt: str,
agent: str = "claude-code",
agent_session: str = "tmux:claude",
role: str = "Worker",
broker: Optional[Dict[str, Any]] = None,
timeout_sec: int = 3600,
idle_timeout_sec: int = 120,
@@ -87,6 +88,7 @@ def register_job(
"prompt": prompt,
"agent": agent,
"agent_session": agent_session,
"role": role,
"broker": broker,
"topic_prefix": topic_prefix_for(job_id),
"timeout_sec": int(timeout_sec),
@@ -239,6 +241,7 @@ def _build_parser() -> argparse.ArgumentParser:
p_reg.add_argument("--prompt", required=True)
p_reg.add_argument("--agent", default="claude-code")
p_reg.add_argument("--agent-session", default="tmux:claude")
p_reg.add_argument("--role", default="Worker", help="logical role for the delegated agent (e.g. Worker, Planner, Reviewer)")
p_reg.add_argument("--timeout", type=int, default=3600)
p_reg.add_argument("--idle-timeout", type=int, default=120)
p_reg.add_argument("--bits", type=int, default=32, help="32 (PoC) or 128 (prod)")
@@ -266,6 +269,7 @@ def _build_parser() -> argparse.ArgumentParser:
p_update.add_argument("--agent-session", default=None)
p_update.add_argument("--prompt", default=None)
p_update.add_argument("--iteration", type=int, default=None)
p_update.add_argument("--role", default=None)
p_feedback = sub.add_parser("get-feedback", help="get the last feedback detail (completed/error) for a job")
p_feedback.add_argument("--job", required=True)
@@ -302,6 +306,7 @@ def main(argv: Optional[List[str]] = None) -> int:
prompt=args.prompt,
agent=args.agent,
agent_session=args.agent_session,
role=args.role,
timeout_sec=args.timeout,
idle_timeout_sec=args.idle_timeout,
registry_dir=rd,
@@ -354,6 +359,8 @@ def main(argv: Optional[List[str]] = None) -> int:
fields["prompt"] = args.prompt
if args.iteration is not None:
fields["iteration"] = args.iteration
if args.role is not None:
fields["role"] = args.role
try:
mqtt_common.update_job_status(args.job, rd, **fields)
except FileNotFoundError as exc:
@@ -0,0 +1,191 @@
# Multi-Agent Mux Loop — Autonomous Orchestration Loop
> **Companion skills**: `multi-agent-mux-create` (start), `multi-agent-mux-resume` (re-attach), `multi-agent-mux-delegate-job` (delegate).
> **Safety Guard**: `--max-loop` and `--plan-talk` restrict API cost runaways.
> **Single source of truth**: `./.mam/agent-sessions.yaml`.
수동 템플릿 작성 및 수동 프롬프트 환류는 폐지되었습니다. Planner, Creator, Reviewer 간의 모든 협업 피드백 루프는 본 스킬(`run_loop.sh`)만을 단독으로 사용하여 자동으로 오케스트레이션합니다.
## What this skill does
Run an autonomous planning-execution-review loop using multiple agents (Planner, Creator, Reviewers) in the workspace. It supports:
- **Collaborative Planning** (`--plan` and `--plan-talk N`): Planner designs the solution, Creator challenges the plan for N turns to resolve edge cases, then implementation starts.
- **Creator Self-Planning & Development** (default without `--plan`): Planner 에이전트에게 계획 작성을 위임하지 않고, 기존에 승격된 계획서가 있다면 이를 로드하여 코드를 구현하며, 계획서가 존재하지 않는 경우 작업자(Creator: developer/writer)가 스스로 구현 계획 및 설계 수립을 포함한 개발 전 과정을 직접 진행합니다.
- **Targeted Peer-Review** (`--reviewer`): Runs custom-selected reviewer agents to verify code changes.
- **Total Peer-Review** (`--all-reviewer`): Enforces a unanimous PASS verdict from all registered reviewer sessions.
- **Self-Review** (default): Creator verifies its code changes autonomously without peer reviews.
- **Safety Limits** (`--max-loop N`): Aborts execution if reviews fail to PASS after N iterations.
---
## Roles & Responsibilities
협업 시스템은 각 에이전트의 책임 영역을 명확히 격리하여 상호 교차 검증을 강제합니다.
```
┌──────────────────────┐
│ User Prompt │
└──────────┬───────────┘
┌──────────────────────┐
│ 1. Planner Agent │ ◄──────────────────┐
│ - Plan & Checklist │ │
└──────────┬───────────┘ │
▼ │
┌──────────────────────┐ │
│ 2. Creator Agent │ │
│ - Code & DoD Verify │ │
└──────────┬───────────┘ │
▼ │ (NOT PASS Feedback)
┌──────────────────────┐ │
│ 3. Reviewer Agents │ │
│ - Dual Peer Review │ ───────────────────┘
└──────────┬───────────┘
▼ (PASS)
┌──────────────────────┐
│ 4. Done & Standby │
└──────────────────────┘
```
### Planner (설계 및 통제)
- **목적**: 요구사항을 명세화하고, 구현 단계의 설계 결함이나 모순(Contradiction)을 사전에 차단합니다.
- **역할**:
- 사용자 요구사항에 따른 구현 목표 및 범위 수립.
- `implementation_plan.md``task.md` (체크리스트) 작성 및 버전 관리(Rev.1, Rev.2, ...).
- 리뷰어 피드백 발생 시 설계 변경의 파급 범위를 계산하여 계획 갱신.
- **핵심 원칙**: 직접 코드를 수정하지 않고 오직 설계와 체크리스트 자산만 관리합니다.
### Creator (구현 및 자가 검증)
- **목적**: Planner가 제공한 체크리스트를 기반으로 실제 리포지토리 코드를 물리적으로 수정 및 구현합니다.
- **역할**:
- `task.md`를 순차적으로 완료 상태(`[x]`)로 업데이트하며 구현 수행.
- 커밋 전 **Definition of Done (DoD)** 체크리스트를 자체 실행하여 금지된 코드 패턴, 메모리/구조적 사이드 이펙트 유무 자가 검토.
- 수정 사항을 단일 원자적(Atomic) 커밋으로 마감하고 리뷰어에게 전달.
### Reviewer Agents (교차 피드백 및 검증)
- **목적**: 구현된 결과물이 최초 설계서 및 제약 요건에 일치하는지 제3자의 관점에서 엄격하게 검토합니다.
- **역할**:
- 상위 논리적 정합성(설계 주장과 구현 간 모순 여부) 검증.
- 전이 조건, 예외 처리, 타입 시그니처 등 하위 레벨 구현의 세부 사항 기계적 검증.
- **판정 규칙**: 지정 또는 자동으로 수집된 모든 리뷰어 세션이 만장일치로 **PASS** 판정을 내릴 때까지 Creator는 마감할 수 없으며, 반려 시 **Planner**에게 피드백이 환류됩니다.
---
## Specification & Flow
```mermaid
sequenceDiagram
autonumber
actor Loop as run_loop.sh
participant Plan as Planner Agent
participant Dev as Creator Agent
participant Rev as Reviewer Agents
Loop->>Loop: Parse args & validate session states
alt --plan enabled
Loop->>Plan: delegate plan design
Plan-->>Loop: plan report generated
loop for --plan-talk turns (default 1)
Loop->>Dev: delegate plan review & challenge
Dev->>Plan: send critiques (Discussion)
Plan-->>Dev: update plan & reach consensus
end
else Use Existing Plan or Creator Self-Plan (No --plan)
alt Existing Plan Found
Loop->>Dev: notify task execution using existing plan
else No Plan Found
Loop->>Dev: request Creator self-planning and code execution
end
end
Loop->>Dev: delegate code implementation
Dev-->>Loop: code modification complete
loop up to --max-loop times (default 3)
alt Reviewers specified (--reviewer / --all-reviewer)
Loop->>Rev: delegate code validation
Rev-->>Loop: Verdict report ([VERDICT: PASS] / [VERDICT: NOT PASS])
alt Unanimous PASS achieved
Note over Loop,Rev: Break loop (Success)
else NOT PASS detected
Loop->>Dev: delegate code correction with reviewer feedback
end
else Self-Review (default)
Loop->>Dev: notify self-evaluation
Dev-->>Loop: verification complete
end
end
alt --cleanup enabled
Loop->>Loop: purge temporary job folders
end
```
---
## Feedback Loop Cadence
1. **Planning Phase**:
- **Collaborative Planning (`--plan`)**: Planner가 프로젝트 구조를 파악하고 `implementation_plan.md`/`task.md`로 로드맵을 제공하며, Creator와의 피드백 루프를 통해 정제됩니다.
- **Creator Self-Planning (No `--plan`)**: Planner의 개입 없이, 기존 계획서가 있다면 이를 기반으로 하고, 그렇지 않다면 Creator가 독자적으로 설계 및 태스크 단위를 구상한 후 구현에 착수합니다.
2. **Execution Phase**: Creator가 배정된 태스크의 코드를 수정합니다. `--plan` 모드 진행 중 예상치 못한 설계 변경 필요성이 감지되면 작업을 멈추고 Planner에게 계획 수정을 먼저 위임합니다. (Creator 자율 계획 모드에서는 Creator가 직접 설계를 변경하며 진행합니다.) 구현 완료 후 DoD(타입 매핑, 공유 자원 사이드 이펙트 방지, 문서-코드 정합성)를 자체 검증한 뒤 단일 커밋을 작성합니다.
3. **Review Phase**: Creator가 리뷰어 세션에 작업 완료 사실과 변경 범위(`git diff`)를 전달합니다. 리뷰어는 검증 후 리포트 **마지막에 단독 행**으로 판정을 남깁니다:
- **반려 (`[VERDICT: NOT PASS]`)** → 피드백 요약을 Planner에게 전송하여 상위 레벨 계획(Rev.n)을 개시합니다.
- **통과 (`[VERDICT: PASS]`)** → 모든 검토 사항이 해결되었음을 명시합니다.
4. 지정되거나 자동 수집된 리뷰어 전원이 PASS를 발행해야 완결되며, `--max-loop N`회 내에 도달하지 못하면 안전을 위해 루프를 중단합니다.
5. 완결 후에도 에이전트 세션은 종료하지 않고, 다음 태스크 지시가 있을 때까지 프롬프트 대기 상태(Standby)로 유지됩니다.
---
## CLI Option ↔ Workflow Phase Mapping
워크플로우 단계별로 활용할 수 있는 `run_loop.sh` 옵션 규격은 다음과 같습니다:
| 워크플로우 단계 | 해당 CLI 옵션 | 설명 |
| :--- | :--- | :--- |
| **Phase 1: Planning** | `--plan` | Planner 에이전트를 기동하여 최초 계획 작성을 강제합니다. (옵션을 지정하지 않을 경우 새 계획서 작성을 생략하며, 기존 계획서가 있는 경우 이를 로드하고, 없는 경우 Creator가 직접 계획 및 설계를 수립하여 즉시 구현에 착수합니다.) |
| **Phase 1: Debate** | `--plan-talk N` | Planner와 Creator가 상호 대화식 챌린지 루프를 `N`회 돌며 계획을 교차 정제합니다. |
| **Phase 2: Execution** | (기본값) | `--target-agent`로 명시한 주 작업 세션에 코딩 태스크를 주입합니다. |
| **Phase 3: Review** | `--reviewer "A,B"` | 지정된 리뷰어 세션 리스트(`A`, `B` 등)에 교차 Peer Review를 위임합니다. |
| **Phase 3: Consensus** | `--all-reviewer` | 레지스트리에 등록된 모든 active 리뷰어 세션을 자동으로 수집하여 리뷰를 돌립니다. (지정/수집된 모든 리뷰어의 PASS 만장일치가 항상 필요합니다.) |
| **Iterative Loop** | `--max-loop M` | NOT PASS 판정 시 최대 `M`회까지 Creator가 자체 수정합니다. `--plan` 모드에서 리뷰어가 리포트에 `[ESCALATE: PLANNER]` 태그를 남기면 설계 변경 수준으로 판단하여 Planner에게 계획 갱신을 위임합니다 (린트는 리뷰어가 검토 관점 중 하나로 확인할 뿐, 별도의 자동 게이트는 아닙니다). |
---
## Workflow
```bash
# 1. Creator Self-Planning & Development + Self-review (direct task execution using existing promoted plan or Creator's own self-plan)
bash .agents/skills/multi-agent-mux-loop/scripts/run_loop.sh \
--target-agent "<creator-session-name>" \
--task "Fix typo in deploy/README.md"
# 2. Collaborative planning + Targeted Reviewers + Safety limits
# (실전 자율 루프 기동의 표준 패턴 — 리뷰어 2인 지정 + 전원 합의 + 최대 3회 반복)
bash .agents/skills/multi-agent-mux-loop/scripts/run_loop.sh \
--plan \
--plan-talk 1 \
--reviewer "<reviewer-session-name-1>,<reviewer-session-name-2>" \
--all-reviewer \
--max-loop 3 \
--verbose \
--target-agent "<creator-session-name>" \
--task "Refactor the session backup mechanism to handle NFS flock"
# 3. Total validation (all reviewers must PASS)
bash .agents/skills/multi-agent-mux-loop/scripts/run_loop.sh \
--all-reviewer \
--max-loop 5 \
--cleanup \
--target-agent "<creator-session-name>" \
--task "Close CI shellcheck coverage gaps"
```
## Pitfalls
- **Incorrect Verdict format (앵커링 파서 하드닝)**: 리뷰 리포트 파일 내에서 `[VERDICT: PASS]` 또는 `[VERDICT: NOT PASS]` 토큰은 반드시 리포트의 **마지막에 단독 행**으로 기재되어야 합니다. 코드 인용이나 변경 diff 내에 등장하는 토큰은 매칭 대상에서 완전 배제됩니다.
- **Fail-closed on missing verdict**: 최종 Verdict 토큰이 누락되거나 리포트 픽업에 실패하면, 파서는 **경고 후 통과시키는 것이 아니라** 안전을 위해 즉시 `NOT PASS`로 판정(fail-closed)하고 교정 사이클을 수행합니다. 리뷰어에게는 반드시 리포트 끝에 단독 행으로 토큰을 찍도록 지시해야 합니다.
- **Session Availability**: `run_loop.sh` 기동 전에 참조되는 Planner, Target Agent, Reviewer 세션들이 모두 tmux 세션으로 기동되어 (`status.sh` 기준 `alive``running`) 있어야 합니다.
- **동시 루프 기동 금지 (NFS Lock Shadowing)**: 동일한 작업 트리 내에서 다수의 `run_loop.sh` 제어기를 동시에 기동하면 SQLite DB 갱신 경합 및 YAML 데이터 오염이 발생합니다. 하나의 루프가 끝날 때까지 다른 루프를 병렬로 기동하지 마십시오.
- **원자적 아카이빙 (Promotion)**: 루프 성공 종료 시 최종 계획서와 검증 리포트들은 `.agents/reports/<session_name>/` 디렉토리로 원자적으로 덮어쓰기(`mv -f`)되어 보존됩니다. 해당 경로의 리포트들로 VCS 추적성을 확보해야 합니다.
@@ -0,0 +1,604 @@
#!/usr/bin/env bash
# ===========================================================================
# run_loop.sh — Autonomous Planning, Execution, and Peer-Review Orchestrator
# ===========================================================================
set -euo pipefail
# 1. Load Common Framework Library
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "$SCRIPT_DIR/../../../.." && pwd)"
# shellcheck disable=SC1091
source "$REPO_ROOT/.agents/skills/lib.sh"
# Default configuration parameters
PLAN_MODE=false
PLAN_TALK_TURNS=1
ALL_REVIEWERS=false
MAX_LOOP=3
VERBOSE=false
CLEANUP=false
TARGET_AGENT=""
TASK=""
REVIEWER_LIST=""
# Print usage instructions
usage() {
echo "Usage: $0 [options] --target-agent <agent-session-name> --task <goal-text>"
echo "Options:"
echo " --plan Enable Planner agent intervention & design phase"
echo " --plan-talk N Planner-Creator discussion limit turns (default: 1)"
echo " --reviewer \"A,B\" Targeted reviewer session name list (comma-separated)"
echo " --all-reviewer Enforce PASS verdict from all active reviewer sessions"
echo " --max-loop N Max execution-review corrective loop runs (default: 3)"
echo " --verbose Print detailed execution timeline traces"
echo " --cleanup Purge temporary job directories upon success"
exit 1
}
# Parse options safely
while [[ "$#" -gt 0 ]]; do
case "$1" in
--plan) PLAN_MODE=true; shift ;;
--plan-talk)
if [[ ! "$2" =~ ^[0-9]+$ ]]; then
echo "ERROR: --plan-talk requires a positive integer."
exit 1
fi
PLAN_TALK_TURNS="$2"; shift 2 ;;
--reviewer) REVIEWER_LIST="$2"; shift 2 ;;
--all-reviewer) ALL_REVIEWERS=true; shift ;;
--max-loop)
if [[ ! "$2" =~ ^[0-9]+$ ]] || [ "$2" -le 0 ]; then
echo "ERROR: --max-loop requires a positive non-zero integer."
exit 1
fi
MAX_LOOP="$2"; shift 2 ;;
--verbose) VERBOSE=true; shift ;;
--cleanup) CLEANUP=true; shift ;;
--target-agent) TARGET_AGENT="$2"; shift 2 ;;
--task) TASK="$2"; shift 2 ;;
-h|--help) usage ;;
*) echo "Unknown option: $1"; usage ;;
esac
done
if [ -z "$TARGET_AGENT" ] || [ -z "$TASK" ]; then
echo "ERROR: --target-agent and --task are mandatory fields."
usage
fi
delegate_job_safe() {
local orig_script="$REPO_ROOT/.agents/skills/multi-agent-mux-delegate-job/multi-agent-mux-delegate-job"
local tmp_script
tmp_script="${orig_script}.${RANDOM}_$$.tmp"
cp "$orig_script" "$tmp_script"
trap 'rm -f "$tmp_script"' EXIT INT TERM HUP
local rc=0
bash "$tmp_script" "$@" || rc=$?
rm -f "$tmp_script"
trap - EXIT INT TERM HUP
return $rc
}
log_info() {
echo -e "\033[1;34m[*]\033[0m $1"
}
log_success() {
echo -e "\033[1;32m[✓]\033[0m $1"
}
log_warn() {
echo -e "\033[1;33m[!]\033[0m $1"
}
log_error() {
echo -e "\033[1;31m[✗]\033[0m $1"
}
# --all-reviewer silently takes precedence over an explicit --reviewer list;
# warn so the discarded list isn't mistaken for having been honored (P2-1).
if [ "$ALL_REVIEWERS" = true ] && [ -n "$REVIEWER_LIST" ]; then
log_warn "--all-reviewer takes precedence; ignoring --reviewer list ('$REVIEWER_LIST')."
fi
# Verdict must occupy the report's last non-blank line — a standalone token
# quoted mid-report (e.g. as a formatting example) never matches (P0-2).
has_verdict() {
local file="$1" verdict="$2"
local last_line pattern
last_line=$(grep -v '^[[:space:]]*$' "$file" 2>/dev/null | tail -n 1)
pattern="^\[VERDICT: ${verdict}\][[:space:]]*\r?\$"
[[ "$last_line" =~ $pattern ]]
}
# Helper: Blocking wait for a delegate job's completion or error state (with safety timeout)
wait_for_job() {
local job_id="$1"
local check_interval=3
local max_wait="${2:-3900}"
local deadline
deadline=$((SECONDS + max_wait))
if [ "$VERBOSE" = true ]; then
log_info "Monitoring job '$job_id' for status changes (timeout: ${max_wait}s)..."
fi
while [ "$SECONDS" -lt "$deadline" ]; do
local status
status=$(python3 -c "
import json, os
try:
with open('.mam/jobs/$job_id.json') as f:
print(json.load(f).get('status', 'unknown'))
except Exception:
print('unknown')
" 2>/dev/null || echo "unknown")
if [ "$status" = "completed" ]; then
if [ "$VERBOSE" = true ]; then
log_success "Job '$job_id' completed successfully."
fi
return 0
elif [ "$status" = "error" ]; then
log_error "Job '$job_id' finished with errors."
return 1
fi
sleep "$check_interval"
done
log_error "Job '$job_id' timed out after ${max_wait}s."
return 1
}
# Resolve active reviewers (excluding $TARGET_AGENT) via lib.sh's
# load_state_json — the single source of truth for the merged DB/YAML
# session state, instead of hand-rolling a 4th copy of that lookup (P1-2).
resolve_all_reviewers() {
TARGET_AGENT="$TARGET_AGENT" MAM_STATE_JSON="$(load_state_json)" python3 -c "
import os, json
d = json.loads(os.environ.get('MAM_STATE_JSON', '{}'))
target_agent = os.environ.get('TARGET_AGENT')
reviewers = [s.get('name') for s in d.get('tmux_sessions', [])
if 'reviewer' in s.get('role', '') and s.get('name') != target_agent]
print(','.join(reviewers))
"
}
# Resolve target agent type (claude, cline, agy) via load_state_json.
resolve_agent_type() {
local name="$1"
NAME="$name" MAM_STATE_JSON="$(load_state_json)" python3 -c "
import os, json
name = os.environ.get('NAME')
d = json.loads(os.environ.get('MAM_STATE_JSON', '{}'))
agent = None
for s in d.get('tmux_sessions', []):
if s.get('name') == name:
agent = s.get('agent') or s.get('pane', {}).get('cmd')
break
if not agent:
# Exact hyphen-segment match, not a naive substring 'in' check, so a
# decoy substring inside an unrelated segment can't misclassify.
segments = name.split('-')
if 'agy' in segments:
agent = 'agy'
elif 'cline' in segments:
agent = 'cline'
elif 'hermes' in segments:
agent = 'hermes'
else:
agent = 'claude'
print(agent)
"
}
# Resolve planner session dynamically via load_state_json.
resolve_planner_session() {
MAM_STATE_JSON="$(load_state_json)" python3 -c "
import os, json
d = json.loads(os.environ.get('MAM_STATE_JSON', '{}'))
planner = ''
for s in d.get('tmux_sessions', []):
if 'planner' in s.get('role', ''):
planner = s.get('name')
break
print(planner)
"
}
# Portable Job ID extraction helper (fails-safe, avoids SC1091/grep GNU dependency)
extract_job_id() {
local output="$1"
local job_id
# Portable extraction equivalent to PCRE K
job_id=$(echo "$output" | grep -o 'registered job: [A-Za-z0-9]*' | awk '{print $3}' || true)
echo "$job_id"
}
# Main Execution Loop Flow
log_info "Initializing multi-agent-mux-loop controller..."
log_info "Target Agent: $TARGET_AGENT"
log_info "Task Goal: $TASK"
PLANNER_SESSION=$(resolve_planner_session)
log_info "Resolved Planner session: $PLANNER_SESSION"
CURRENT_PLAN=""
CREATED_JOBS=()
# ===========================================================================
# PHASE 1: PLANNING & DISCUSSIONS
# ===========================================================================
if [ "$PLAN_MODE" = true ]; then
log_info "=== Phase 1: Interactive Planning Phase ==="
# Step 1.1: Request initial plan from Planner
log_info "Requesting initial implementation plan from Planner..."
PLAN_JOB_OUTPUT=$(delegate_job_safe submit \
--agent-session "tmux:$PLANNER_SESSION" \
--agent "$(resolve_agent_type "$PLANNER_SESSION")" \
--type "direct" \
--role "Planner" \
--prompt "태스크 목표를 바탕으로 구체적인 구현 계획서를 작성해주세요. 목표: $TASK")
PLAN_JOB_ID=$(extract_job_id "$PLAN_JOB_OUTPUT")
if [ -z "$PLAN_JOB_ID" ]; then
log_error "Failed to register planner job. Output:\n$PLAN_JOB_OUTPUT"
exit 1
fi
CREATED_JOBS+=("$PLAN_JOB_ID")
log_info "Planner Job ID: $PLAN_JOB_ID"
if ! wait_for_job "$PLAN_JOB_ID"; then
log_error "Planning phase failed during initial plan design."
exit 1
fi
# Retrieve plan text safely
PLAN_FILE=$(find ".mam/jobs/$PLAN_JOB_ID" -maxdepth 2 -name "report-final.md" 2>/dev/null | head -n 1 || true)
if [ -z "$PLAN_FILE" ] || [ ! -f "$PLAN_FILE" ]; then
log_error "Final plan file not found."
exit 1
fi
CURRENT_PLAN=$(cat "$PLAN_FILE")
# Step 1.2: Interactive Creator-Planner Debate
turn=1
while [ "$turn" -le "$PLAN_TALK_TURNS" ]; do
log_info "Discussion Turn $turn/$PLAN_TALK_TURNS: Creator challenging the plan..."
# Creator critique job
DEBATE_JOB_OUTPUT=$(delegate_job_safe submit \
--agent-session "tmux:$TARGET_AGENT" \
--agent "$(resolve_agent_type "$TARGET_AGENT")" \
--type "direct" \
--role "Worker" \
--prompt "Planner가 제시한 다음 계획서를 꼼꼼히 검토하고, 실제 구현 시 마주할 수 있는 맹점이나 제약사항 1가지를 발굴하여 Planner에게 이의를 제기(Challenge)해주세요. 계획서:\n$CURRENT_PLAN")
DEBATE_JOB_ID=$(extract_job_id "$DEBATE_JOB_OUTPUT")
if [ -z "$DEBATE_JOB_ID" ]; then
log_error "Failed to register Creator critique job. Output:\n$DEBATE_JOB_OUTPUT"
exit 1
fi
CREATED_JOBS+=("$DEBATE_JOB_ID")
log_info "Critique Job ID: $DEBATE_JOB_ID"
if ! wait_for_job "$DEBATE_JOB_ID"; then
log_error "Creator critique step failed."
exit 1
fi
CRITIQUE_FILE=$(find ".mam/jobs/$DEBATE_JOB_ID" -maxdepth 2 -name "report-final.md" 2>/dev/null | head -n 1 || true)
if [ -z "$CRITIQUE_FILE" ] || [ ! -f "$CRITIQUE_FILE" ]; then
log_error "Critique file not found."
exit 1
fi
CRITIQUE_TEXT=$(cat "$CRITIQUE_FILE")
log_info "Planner refining plan with Creator's feedback..."
REFINE_JOB_OUTPUT=$(delegate_job_safe submit \
--agent-session "tmux:$PLANNER_SESSION" \
--agent "$(resolve_agent_type "$PLANNER_SESSION")" \
--type "direct" \
--role "Planner" \
--prompt "작업자(Creator)로부터 다음 이의제기 피드백을 받았습니다. 피드백을 반영하여 계획서를 정교하게 업데이트(Refine)하여 다시 출력해주세요. 피드백:\n$CRITIQUE_TEXT\n기존 계획서:\n$CURRENT_PLAN")
REFINE_JOB_ID=$(extract_job_id "$REFINE_JOB_OUTPUT")
if [ -z "$REFINE_JOB_ID" ]; then
log_error "Failed to register plan refinement job. Output:\n$REFINE_JOB_OUTPUT"
exit 1
fi
CREATED_JOBS+=("$REFINE_JOB_ID")
log_info "Refinement Job ID: $REFINE_JOB_ID"
if ! wait_for_job "$REFINE_JOB_ID"; then
log_error "Planner refinement step failed."
exit 1
fi
REFINE_FILE=$(find ".mam/jobs/$REFINE_JOB_ID" -maxdepth 2 -name "report-final.md" 2>/dev/null | head -n 1 || true)
if [ -z "$REFINE_FILE" ] || [ ! -f "$REFINE_FILE" ]; then
log_error "Refinement plan file not found."
exit 1
fi
CURRENT_PLAN=$(cat "$REFINE_FILE")
turn=$((turn + 1))
done
log_success "Interactive planning completed. Plan finalized."
else
log_info "=== Phase 1: Self-Planning Mode (Direct Execution) ==="
EXISTING_PLAN_FILE=""
if [ -n "$PLANNER_SESSION" ]; then
EXISTING_PLAN_FILE=".agents/reports/$PLANNER_SESSION/report-final.md"
fi
if [ -n "$EXISTING_PLAN_FILE" ] && [ -f "$EXISTING_PLAN_FILE" ]; then
log_info "Found existing promoted plan at '$EXISTING_PLAN_FILE'. Loading plan..."
CURRENT_PLAN=$(cat "$EXISTING_PLAN_FILE")
fi
fi
# ===========================================================================
# PHASE 2: IMPLEMENTATION (CREATION)
# ===========================================================================
log_info "=== Phase 2: Code Implementation ==="
# Fix the pre-implementation commit as the diff baseline so review diffs stay
# cumulative and non-empty even after the Creator commits per DoD (P0-1).
BASE_COMMIT=$(git rev-parse HEAD 2>/dev/null || echo "")
EXECUTION_PROMPT="계획서가 존재하지 않으므로, 작업자(Creator)의 판단하에 스스로 구현 계획 및 설계를 수립한 뒤, 이를 바탕으로 코드를 구현하고 다음 작업 목표를 완성해주세요. 작업 목표: $TASK"
if [ -n "$CURRENT_PLAN" ]; then
EXECUTION_PROMPT="이미 수립된 다음 계획서에 입각하여 작업자의 판단하에 코드를 구현하고 작업 목표를 완성해주세요. 계획서:\n$CURRENT_PLAN\n\n작업 목표: $TASK"
fi
EXEC_JOB_OUTPUT=$(delegate_job_safe submit \
--agent-session "tmux:$TARGET_AGENT" \
--agent "$(resolve_agent_type "$TARGET_AGENT")" \
--type "direct" \
--role "Worker" \
--prompt "$EXECUTION_PROMPT")
EXEC_JOB_ID=$(extract_job_id "$EXEC_JOB_OUTPUT")
if [ -z "$EXEC_JOB_ID" ]; then
log_error "Failed to register Creator execution job. Output:\n$EXEC_JOB_OUTPUT"
exit 1
fi
CREATED_JOBS+=("$EXEC_JOB_ID")
log_info "Creator Job ID: $EXEC_JOB_ID"
if ! wait_for_job "$EXEC_JOB_ID"; then
log_error "Creator execution failed."
exit 1
fi
log_success "Initial implementation finished."
# ===========================================================================
# PHASE 3: VERIFICATION LOOP (PEER REVIEW)
# ===========================================================================
log_info "=== Phase 3: Verification & Corrective Review Loop ==="
# Resolve reviewer array
REVIEWERS=()
if [ "$ALL_REVIEWERS" = true ]; then
# Parse list safely using command substitution + fallback
RESOLVED_REVS=$(resolve_all_reviewers)
if [ -n "$RESOLVED_REVS" ]; then
IFS=' ,' read -r -a REVIEWERS <<< "$RESOLVED_REVS"
fi
elif [ -n "$REVIEWER_LIST" ]; then
IFS=' ,' read -r -a REVIEWERS <<< "$REVIEWER_LIST"
fi
loop_count=1
while [ "$loop_count" -le "$MAX_LOOP" ]; do
log_info "Review Loop Iteration $loop_count/$MAX_LOOP..."
if [ "${#REVIEWERS[@]}" -eq 0 ]; then
log_warn "No reviewers specified. Conducting Creator Self-Review..."
SELF_REV_OUTPUT=$(delegate_job_safe submit \
--agent-session "tmux:$TARGET_AGENT" \
--agent "$(resolve_agent_type "$TARGET_AGENT")" \
--type "direct" \
--role "Reviewer" \
--prompt "작업 완료 상태에 대해 스스로 검증(Self-Review)하여 결함이 없음을 확인하고 종결해주세요. 리뷰 리포트 마지막에 단독 행으로 반드시 '[VERDICT: PASS]' 혹은 '[VERDICT: NOT PASS]' 태그를 명시해주세요.")
SELF_REV_ID=$(extract_job_id "$SELF_REV_OUTPUT")
if [ -z "$SELF_REV_ID" ]; then
log_error "Failed to register Self-Review job."
exit 1
fi
CREATED_JOBS+=("$SELF_REV_ID")
wait_for_job "$SELF_REV_ID"
REPORT_FILE=$(find ".mam/jobs/$SELF_REV_ID" -maxdepth 2 -name "report-final.md" 2>/dev/null | head -n 1 || true)
if [ -n "$REPORT_FILE" ] && [ -f "$REPORT_FILE" ] && has_verdict "$REPORT_FILE" "PASS" && ! has_verdict "$REPORT_FILE" "NOT PASS"; then
log_success "Self-Review PASS."
break
else
log_warn "Self-Review NOT PASS."
if [ "$loop_count" -eq "$MAX_LOOP" ]; then
log_error "Reached max loop count. Self-review loop aborted with failures."
exit 1
fi
fi
else
log_info "Active reviewers: ${REVIEWERS[*]}"
# We use space-separated lists or simple loops to bypass bash-4 associative array requirement (M-7 macOS compatibility)
declare -a JOB_IDS=()
declare -a JOB_REVS=()
for rev in "${REVIEWERS[@]}"; do
log_info "Requesting code review from Reviewer '$rev'..."
# Cumulative diff since BASE_COMMIT (M-6): includes committed AND
# uncommitted changes, so it stays non-empty even after the Creator
# commits per the documented DoD (bare `git diff` alone would not).
if [ -n "$BASE_COMMIT" ]; then
CHANGES_DIFF=$(git diff "$BASE_COMMIT" 2>/dev/null || echo "No git diff available")
else
CHANGES_DIFF=$(git diff 2>/dev/null || echo "No git diff available")
fi
REV_OUTPUT=$(delegate_job_safe submit \
--agent-session "tmux:$rev" \
--agent "$(resolve_agent_type "$rev")" \
--type "direct" \
--role "Reviewer" \
--prompt "다음 구현 사항(작업 목표: $TASK) 및 누적 변경분(git diff)에 대해 린트, 동작성, 유실 등의 관점에서 교차 코드 리뷰를 수행해주세요. 확인 후 최종 Verdict로 '[VERDICT: PASS]' 혹은 '[VERDICT: NOT PASS]' 태그를 리뷰 리포트 마지막에 단독 행으로 명시적으로 작성해주세요. 만약 단순 버그 수정으로는 부족하고 설계 변경/재작업 수준의 재계획이 필요하다고 판단되면, 리포트 아무 곳에나 단독 행으로 '[ESCALATE: PLANNER]' 태그도 함께 남겨주세요. 변경분:\n$CHANGES_DIFF")
REV_JOB_ID=$(extract_job_id "$REV_OUTPUT")
if [ -z "$REV_JOB_ID" ]; then
log_error "Failed to register review job for '$rev'."
exit 1
fi
CREATED_JOBS+=("$REV_JOB_ID")
JOB_IDS+=("$REV_JOB_ID")
JOB_REVS+=("$rev")
done
# Wait for all reviews
all_passed=true
FEEDBACK_AGGREGATE=""
for idx in "${!JOB_IDS[@]}"; do
job_id="${JOB_IDS[$idx]}"
rev="${JOB_REVS[$idx]}"
if ! wait_for_job "$job_id"; then
log_warn "Reviewer '$rev' job crashed."
all_passed=false
continue
fi
# Parse verdict from report file (fails-safe, M-2 anchored checks)
REPORT_FILE=$(find ".mam/jobs/$job_id" -maxdepth 2 -name "report-final.md" 2>/dev/null | head -n 1 || true)
if [ -z "$REPORT_FILE" ] || [ ! -f "$REPORT_FILE" ]; then
log_warn "Reviewer '$rev' report not found. Counting as NOT PASS."
all_passed=false
continue
fi
REPORT_CONTENT=$(cat "$REPORT_FILE" 2>/dev/null || echo "")
# Precedence rules: NOT PASS wins over PASS. Absence of verdict tags is treated as NOT PASS (fail-closed)
if has_verdict "$REPORT_FILE" "NOT PASS" || ! has_verdict "$REPORT_FILE" "PASS"; then
log_warn "Reviewer '$rev': NOT PASS"
all_passed=false
FEEDBACK_AGGREGATE="$FEEDBACK_AGGREGATE\n--- Reviewer ($rev) Feedback ---\n$REPORT_CONTENT"
else
log_success "Reviewer '$rev': PASS"
fi
done
if [ "$all_passed" = true ]; then
log_success "All reviewers issued [VERDICT: PASS]. Loop completed successfully."
break
else
if [ "$loop_count" -eq "$MAX_LOOP" ]; then
log_error "Reached max loop count ($MAX_LOOP). Review loop aborted with failures."
exit 1
fi
# Re-planning check: rely on the explicit '[ESCALATE: PLANNER]' tag a
# reviewer is instructed to emit, rather than sniffing English keywords
# (reviewers report in Korean, so keyword matching never fired) (P1-1).
COMPLEX_FIX=false
if echo "$FEEDBACK_AGGREGATE" | grep -qE '^\[ESCALATE: PLANNER\][[:space:]]*\r?$'; then
COMPLEX_FIX=true
fi
if [ "$PLAN_MODE" = true ] && [ "$COMPLEX_FIX" = true ]; then
log_warn "Feedback involves complex code modifications. Diverting to Planner to revise plan..."
REFINE_PLAN_OUTPUT=$(delegate_job_safe submit \
--agent-session "tmux:$PLANNER_SESSION" \
--agent "$(resolve_agent_type "$PLANNER_SESSION")" \
--type "direct" \
--role "Planner" \
--prompt "리뷰어들로부터 다음과 같이 정교한 코드 수정 피드백이 도착했습니다. 해당 피드백을 수렴하여 구현 계획서(Plan)를 갱신(Refine)하여 다시 작성해주세요. 피드백:\n$FEEDBACK_AGGREGATE\n기존 계획서:\n$CURRENT_PLAN")
REFINE_PLAN_ID=$(extract_job_id "$REFINE_PLAN_OUTPUT")
if [ -z "$REFINE_PLAN_ID" ]; then
log_error "Failed to register plan refinement job."
exit 1
fi
CREATED_JOBS+=("$REFINE_PLAN_ID")
wait_for_job "$REFINE_PLAN_ID"
REFINE_PLAN_FILE=$(find ".mam/jobs/$REFINE_PLAN_ID" -maxdepth 2 -name "report-final.md" 2>/dev/null | head -n 1 || true)
if [ -z "$REFINE_PLAN_FILE" ] || [ ! -f "$REFINE_PLAN_FILE" ]; then
log_error "Refined plan file not found."
exit 1
fi
CURRENT_PLAN=$(cat "$REFINE_PLAN_FILE")
CORRECTION_PROMPT="갱신된 다음 계획서에 입각하여 지적된 오류들을 수정하고 코드를 다시 구현해주세요. 계획서:\n$CURRENT_PLAN\n피드백 상세:\n$FEEDBACK_AGGREGATE"
else
log_info "Applying straight bugfixes based on reviewer feedback..."
CORRECTION_PROMPT="리뷰어들이 지적한 다음 피드백에 입각하여 코드를 수정해주세요. 피드백:\n$FEEDBACK_AGGREGATE"
fi
# Creator execution corrective job
CORRECT_JOB_OUTPUT=$(delegate_job_safe submit \
--agent-session "tmux:$TARGET_AGENT" \
--agent "$(resolve_agent_type "$TARGET_AGENT")" \
--type "direct" \
--role "Worker" \
--prompt "$CORRECTION_PROMPT")
CORRECT_JOB_ID=$(extract_job_id "$CORRECT_JOB_OUTPUT")
if [ -z "$CORRECT_JOB_ID" ]; then
log_error "Failed to register Creator correction job."
exit 1
fi
CREATED_JOBS+=("$CORRECT_JOB_ID")
wait_for_job "$CORRECT_JOB_ID"
fi
fi
loop_count=$((loop_count + 1))
done
# Promote finalized plan and passed reviewer reports to durable location
if [ "$PLAN_MODE" = true ] && [ -n "${CURRENT_PLAN:-}" ] && [ -n "${PLAN_JOB_ID:-}" ]; then
plan_dest_dir=".agents/reports/$PLANNER_SESSION"
log_info "Promoting final plan to durable location: $plan_dest_dir"
mkdir -p "$plan_dest_dir"
echo "$CURRENT_PLAN" > "$plan_dest_dir/plan-${PLAN_JOB_ID}.md.tmp"
mv -f "$plan_dest_dir/plan-${PLAN_JOB_ID}.md.tmp" "$plan_dest_dir/plan-${PLAN_JOB_ID}.md"
fi
if [ "${#REVIEWERS[@]}" -gt 0 ]; then
log_info "Promoting final review reports to durable location..."
for idx in "${!JOB_IDS[@]}"; do
job_id="${JOB_IDS[$idx]}"
rev="${JOB_REVS[$idx]}"
report_file=$(find ".mam/jobs/$job_id" -maxdepth 2 -name "report-final.md" 2>/dev/null | head -n 1 || true)
if [ -n "$report_file" ] && [ -f "$report_file" ]; then
dest_dir=".agents/reports/$rev"
mkdir -p "$dest_dir"
cp "$report_file" "$dest_dir/report-${job_id}.md.tmp"
mv -f "$dest_dir/report-${job_id}.md.tmp" "$dest_dir/report-${job_id}.md"
fi
done
fi
# ===========================================================================
# PHASE 4: CLEANUP
# ===========================================================================
if [ "$CLEANUP" = true ]; then
log_info "Cleaning up temporary job directories created during this loop run..."
for job in "${CREATED_JOBS[@]}"; do
if [ -d ".mam/jobs/$job" ]; then
rm -rf ".mam/jobs/$job"
rm -f ".mam/jobs/$job.subscriber.out"
if [ "$VERBOSE" = true ]; then
log_info "Purged temp assets for job: $job"
fi
fi
done
log_success "Cleanup complete."
fi
log_success "Mux loop finished with 100% PASS verdicts."
exit 0
@@ -0,0 +1,147 @@
#!/usr/bin/env bash
# resume_session.sh — resume a stopped session
set -euo pipefail
source "$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)/lib.sh"
usage() {
cat <<EOF
Usage: $0 --workspace <path> --agent <claude|agy|hermes|cline> --session <name>
EOF
}
WORKSPACE=""
AGENT=""
SESSION_NAME=""
while [ $# -gt 0 ]; do
case "$1" in
--workspace) WORKSPACE="$2"; shift 2 ;;
--agent) AGENT="$2"; shift 2 ;;
--session) SESSION_NAME="$2"; shift 2 ;;
-h|--help) usage; exit 0 ;;
*) echo "ERROR: unknown arg: $1" >&2; exit 2 ;;
esac
done
[ -n "$WORKSPACE" ] || { echo "ERROR: --workspace required" >&2; exit 2; }
[ -n "$AGENT" ] || { echo "ERROR: --agent required" >&2; exit 2; }
[ -n "$SESSION_NAME" ] || { echo "ERROR: --session required" >&2; exit 2; }
# 1. Resolve the session id
UUID=$(bash "$(dirname "${BASH_SOURCE[0]}")/resolve_session_id.sh" \
--workspace "$WORKSPACE" --agent "$AGENT" --session "$SESSION_NAME")
if [ -z "$UUID" ]; then
echo "ERROR: No saved session for $WORKSPACE ($AGENT). Use multi-agent-mux-create first." >&2
exit 1
fi
export TMUX_SERVER_NAME="$(resolve_tmux_server "$SESSION_NAME")"
# 2. If tmux is alive, print warning or attach.
if tmux has-session -t "$SESSION_NAME" 2>/dev/null; then
echo "tmux '$SESSION_NAME' already running."
# Just update YAML to make sure it's set to running
bash "$(dirname "${BASH_SOURCE[0]}")/update_yaml_resumed.sh" \
--session "$SESSION_NAME" --uuid "$UUID" --agent "$AGENT"
exit 0
fi
# 3. Resolve isolation settings for this session
ISO_ROOT=""
ISO_ENV=""
ISO_ARGS=""
ISO_DATA=$(env_python "$AGENT_SESSIONS_YAML" SESSION_NAME="$SESSION_NAME" <<'PYEOF'
import os, json, yaml, sqlite3
name = os.environ['SESSION_NAME']
yaml_path = os.environ['YAML_PATH']
db_path = os.path.splitext(yaml_path)[0] + '.db'
d = {}
try:
if os.path.exists(db_path):
conn = sqlite3.connect(db_path, timeout=60.0)
row = conn.execute('SELECT data FROM sessions WHERE name=?', (name,)).fetchone()
if row:
s = json.loads(row[0])
print(json.dumps(s.get('isolation') or {}))
raise SystemExit(0)
elif os.path.exists(yaml_path):
with open(yaml_path) as f:
d = yaml.safe_load(f) or {}
except Exception:
pass
for s in d.get('tmux_sessions', []):
if s.get('name') == name:
print(json.dumps(s.get('isolation') or {}))
raise SystemExit(0)
print("{}")
PYEOF
)
ISO_ROOT=$(printf '%s' "$ISO_DATA" | python3 -c 'import sys,json; print(json.load(sys.stdin).get("root",""))')
if [ -n "$ISO_ROOT" ]; then
ISO_ENV="$(isolation_env_prefix "$AGENT" "$ISO_ROOT")"
ISO_ARGS="$(isolation_cmd_args "$AGENT" "$ISO_ROOT")"
echo "Re-applying isolation: root=$ISO_ROOT env=$ISO_ENV args=$ISO_ARGS"
fi
# Resolve absolute path of the agent command to prevent tmux PATH inheritance issues (especially on macOS)
RESOLVED_BIN="$AGENT"
if [ "$AGENT" = "cline" ]; then
if command -v cline >/dev/null 2>&1; then
RESOLVED_BIN="$(command -v cline)"
fi
else
if command -v "$AGENT" >/dev/null 2>&1; then
RESOLVED_BIN="$(command -v "$AGENT")"
fi
fi
# On macOS, clear quarantine attribute for the agent binary to prevent Gatekeeper hangs
if [ "$(uname)" = "Darwin" ] && [ -f "$RESOLVED_BIN" ]; then
xattr -d com.apple.quarantine "$RESOLVED_BIN" 2>/dev/null || true
fi
# Determine CMD_FULL with isolation applied
case "$AGENT" in
claude) CMD_FULL="${RESOLVED_BIN} --dangerously-skip-permissions -r $UUID" ;;
agy) CMD_FULL="${RESOLVED_BIN} --dangerously-skip-permissions --conversation $UUID" ;;
hermes) CMD_FULL="${RESOLVED_BIN} --resume $UUID" ;;
cline) CMD_FULL="${RESOLVED_BIN} -i --id $UUID" ;;
esac
# Prepend env prefix and append command args (T4)
if [ -n "$ISO_ENV" ]; then
CMD_FULL="$ISO_ENV $CMD_FULL"
fi
if [ -n "$ISO_ARGS" ]; then
CMD_FULL="$CMD_FULL $ISO_ARGS"
fi
# 4. Spawn new tmux session + run agent with the saved id
case "$AGENT" in
claude)
if [ -z "$ISO_ROOT" ] && [ -x "$HOME/.local/bin/canary-projects-multi-agent-mux-creator-claude" ]; then
START_CMD="tmux new-session -d -s \"$SESSION_NAME\" -x 140 -y 40 -c \"$WORKSPACE\" \"$HOME/.local/bin/canary-projects-multi-agent-mux-creator-claude\""
else
START_CMD="tmux new-session -d -s \"$SESSION_NAME\" -x 140 -y 40 -c \"$WORKSPACE\" \"$CMD_FULL\""
fi
eval "$START_CMD"
# auto-handle trust / bypass dialogs
handle_startup_dialogs "$SESSION_NAME" 20
;;
agy|hermes|cline)
eval "tmux new-session -d -s \"$SESSION_NAME\" -x 140 -y 40 -c \"$WORKSPACE\" \"$CMD_FULL\""
;;
esac
# Wait for TUI readiness or let it settle
sleep 2
# 5. Update agent-sessions.yaml: status running, last_visible_status
bash "$(dirname "${BASH_SOURCE[0]}")/update_yaml_resumed.sh" \
--session "$SESSION_NAME" --uuid "$UUID" --agent "$AGENT"
echo "Successfully resumed $SESSION_NAME ($AGENT)"
@@ -19,15 +19,113 @@ JSON=0
# read-only drift snapshot — reconcile.sh --dry-run (no side effects)
DRIFT_JSON="$(bash "$RECONCILE" --once --emit-diff --dry-run)"
if [ "$JSON" = "1" ]; then
printf '%s\n' "$DRIFT_JSON"
exit 0
fi
# Project root (parent of .agents/) holds the multi-agent-mux-delegate-job .mam registry.
# Resolved relative to this script — no hardcoded absolute path (review item 6).
PROJECT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../../../" && pwd)"
if [ "$JSON" = "1" ]; then
# D8: --json historically only carried reconcile.sh's drift subset (timestamp/
# yaml_path/tmux_sessions_alive/tmux_confirmed/drifts/actions), not the enriched
# per-row fields (RESUME/JOB_ID/JOB_STATUS/CMD/attach_command/pane.cwd/...) that
# only this script's text-mode block computed. Fixed additively below via a
# 'sessions_detail' key — every existing key is passed through untouched, so
# any consumer of the pre-fix schema keeps working unmodified.
MAM_STATE_JSON="$(load_state_json)" DRIFT_JSON="$DRIFT_JSON" env_python "$AGENT_SESSIONS_YAML" PROJECT_ROOT="$PROJECT_ROOT" <<'PYEOF'
import os, json, glob
home = os.environ['HOME_DIR']
claude_project_dir = os.environ.get('CLAUDE_PROJECT_DIR', f"{home}/.claude/projects")
drift = json.loads(os.environ['DRIFT_JSON'])
try:
d = json.loads(os.environ.get('MAM_STATE_JSON', '{}'))
except Exception:
d = {}
alive = set(drift.get('tmux_sessions_alive', []))
drift_by_name = {}
for dr in drift.get('drifts', []):
drift_by_name.setdefault(dr['name'], []).append(dr['class'])
def resume_on_disk(s):
# workspace-SCOPED check only — per-row own id, never a global identity (P0-C)
name = s.get('name', '')
cwd = (s.get('pane') or {}).get('cwd', '')
if name.endswith('-creator-claude'):
u = s.get('claude_session_id_own')
if u:
key = cwd.replace('/', '-').replace('_', '-')
return 'yes' if os.path.exists(f"{claude_project_dir}/{key}/{u}.jsonl") else 'MISSING'
key = cwd.replace('/', '-').replace('_', '-')
return 'scan' if glob.glob(f"{claude_project_dir}/{key}/*.jsonl") else 'no'
if name.endswith('-creator-agy'):
u = s.get('agy_conversation_id_own')
if u:
return 'yes' if os.path.exists(f"{home}/.gemini/antigravity-cli/conversations/{u}.db") else 'MISSING'
return 'no'
return '?'
def get_job_status(s):
jid = s.get('delegate_job_id')
if not jid:
return ('-', '-')
project_root = os.environ.get('PROJECT_ROOT', '.')
candidates = [
os.path.join('.mam', 'jobs', f"{jid}.json"),
os.path.join(project_root, '.mam', 'jobs', f"{jid}.json"),
os.path.join(project_root, '.mam', 'delegate_job_logs', jid, 'status.json'),
]
for path in candidates:
if os.path.exists(path):
try:
with open(path) as jf:
job_data = json.load(jf)
return (jid, job_data.get('status', 'unknown'))
except Exception:
pass
return (jid, 'unknown')
sessions_detail = []
for s in d.get('tmux_sessions', []):
name = s.get('name', '?')
server = s.get('tmux_server') or 'default'
jid, jstatus = get_job_status(s)
pane = s.get('pane') or {}
sessions_detail.append({
# Fields named/typed to match the reviewed D8 contract
# (.mam/jobs/40bdce88/claude-reports/report-final.md §3.1) exactly —
# mam_core maps this straight onto its Session/Pane/Drift models.
'name': name,
'server': server,
'status': s.get('status', '?'),
'tmux_alive': f"{name}|{server}" in alive,
'cmd': pane.get('cmd'),
'role': s.get('role'),
'resume_state': resume_on_disk(s),
'job_id': jid,
'job_status': jstatus,
'pane_cwd': pane.get('cwd'),
'attach_command': s.get('attach_command'),
'drift_classes': drift_by_name.get(name, []),
# Additive beyond the D8 example — needed by the M1 Detail Pane
# (pane pid / full launch command / start command / last banner text).
'pane_pid': pane.get('pid'),
'cmd_full': pane.get('cmd_full'),
'start_command': s.get('start_command'),
'last_visible_status': s.get('last_visible_status'),
})
drift['sessions_detail'] = sessions_detail
print(json.dumps(drift, ensure_ascii=False))
PYEOF
exit 0
fi
MAM_STATE_JSON="$(load_state_json)" DRIFT_JSON="$DRIFT_JSON" env_python "$AGENT_SESSIONS_YAML" PROJECT_ROOT="$PROJECT_ROOT" <<'PYEOF'
import os, sys, json, glob
@@ -27,8 +27,10 @@
# Exit codes:
# 0 = success (or already-stopped no-op) | 1 = YAML not found / not registered
# 2 = invalid args | 3 = interactive confirmation required (--yes 누락)
# 4 = purge aborted (tmux session survived the kill chain)
set -euo pipefail
# shellcheck disable=SC1091
source "$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)/lib.sh"
usage() {
@@ -68,7 +70,8 @@ done
[ -n "$SESSION_NAME" ] || { echo "ERROR: --session required" >&2; usage; exit 2; }
[ -f "$AGENT_SESSIONS_YAML" ] || { echo "ERROR: $AGENT_SESSIONS_YAML not found" >&2; exit 1; }
export TMUX_SERVER_NAME="$(resolve_tmux_server "$SESSION_NAME")"
TMUX_SERVER_NAME="$(resolve_tmux_server "$SESSION_NAME")"
export TMUX_SERVER_NAME
# --agent 미지정 시 이름 suffix 로 fallback (P1-F)
if [ -z "$AGENT" ]; then
@@ -190,6 +193,21 @@ else
echo "tmux already dead, just updating YAML"
fi
# Purge pre-gate: 레코드 제거는 tmux 사망이 확인된 경우에만 허용한다.
# (kill 체인은 best-effort — 세션이 살아남으면 monitor drift-B 가
# 레코드 없는 세션을 running 으로 자동 재등록해 purge 가 조용히 뒤집힌다)
if [ "$PURGE" = "1" ] && [ "$TMUX_ALIVE" = "1" ]; then
_wait_session_gone "$SESSION_NAME" 5 || true # SIGKILL 폴백의 비동기 회수 윈도우 흡수
if tmux has-session -t "$SESSION_NAME" 2>/dev/null; then
echo "ERROR: session '$SESSION_NAME' is still alive after the kill chain." >&2
echo " Refusing registry removal — records preserved (no state was modified)." >&2
echo " Diagnose the stuck TUI (tmux attach -t '$SESSION_NAME'), then re-run" >&2
echo " stop_session.sh --purge-conversation --yes (retry is safe/idempotent)." >&2
delegate_publish_event "$DELEGATE_JOB_ID" error "purge aborted: tmux session still alive"
exit 4
fi
fi
atomic_dump_yaml "$AGENT_SESSIONS_YAML" \
SESSION_NAME="$SESSION_NAME" AGENT="$AGENT" PURGE="$PURGE" \
NOW_ISO="$NOW_ISO" NOW_EPOCH="$NOW_EPOCH" LAST_STATUS="$LAST_STATUS" \
@@ -216,12 +234,7 @@ if target is None:
print(f"ERROR: disappeared during script: {name}", flush=True)
raise SystemExit(1)
if purge:
target['status'] = 'terminated'
target['terminated_at'] = now
target['terminated_at_epoch'] = int(os.environ['NOW_EPOCH'])
target['termination_mode'] = 'purge'
else:
if not purge:
target['status'] = 'stopped'
target['stopped_at'] = now
target['stopped_at_epoch'] = int(os.environ['NOW_EPOCH'])
@@ -324,8 +337,12 @@ elif purge and not purge_uuid:
print("WARN: --purge-conversation requested but no workspace-scoped UUID resolved; nothing purged", flush=True)
if purge:
target['resumable'] = False
d['tmux_sessions'] = [s for s in d.get('tmux_sessions', []) if s.get('name') != name]
if purge_uuid:
print(f"removed: {name} (registry entry fully purged from YAML+DB)", flush=True)
else:
print(f"removed: {name} (registry entry purged from YAML+DB; WARN: conversation artifacts unresolved — disk copies may remain)", flush=True)
else:
print(f"updated: {name} status={target['status']}", flush=True)
PYEOF
@@ -0,0 +1,34 @@
# multi-agent-mux-ui
MAM (Multi-Agent Mux) 에이전트 세션 및 스킬들을 직관적으로 제어하고 관리하기 위한 Flutter 기반 GUI/TUI 대시보드 프로그램입니다.
## Related Skills
- `multi-agent-mux-status` (읽기 전용 조회)
- `multi-agent-mux-stop` (세션 graceful stop & purge)
- `multi-agent-mux-create` (fresh 세션 생성)
- `multi-agent-mux-resume` (세션 복원)
- `multi-agent-mux-delegate-job` (비동기 잡 위임)
## Structure
- `packages/mam_core`: 공용 비동기 프로세스 래퍼, 세션 리스트 조회(status.sh래핑), stop/purge 락 및 에러 핸들러
- `packages/mam_pty`: FFI PTY 스폰 로직 및 Web websocket-PTY 브릿지
- `apps/mam_desktop`: Flutter Desktop 대시보드 (xterm 연동 attach 제어)
- `apps/mam_web`: Flutter Web 대시보드 (WebSocket 데몬 브릿지 통신)
- `apps/mam_tui`: 순수 Dart TUI (inheritStdio foreground attach)
## Execution
- **Desktop 기동**:
```bash
flutter run -d linux --device-id=linux .agents/skills/multi-agent-mux-ui/apps/mam_desktop
```
- **Web 기동**:
```bash
flutter run -d chrome .agents/skills/multi-agent-mux-ui/apps/mam_web
```
- **TUI 기동**:
```bash
dart run .agents/skills/multi-agent-mux-ui/apps/mam_tui
```
@@ -0,0 +1,45 @@
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.build/
.buildlog/
.history
.svn/
.swiftpm/
migrate_working_dir/
# IntelliJ related
*.iml
*.ipr
*.iws
.idea/
# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/
# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins-dependencies
.pub-cache/
.pub/
/build/
/coverage/
# Symbolication related
app.*.symbols
# Obfuscation related
app.*.map.json
# Android Studio will place build artifacts here
/android/app/debug
/android/app/profile
/android/app/release
@@ -0,0 +1,36 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.
version:
revision: "924134a44c189315be2148659913dda1671cbe99"
channel: "stable"
project_type: app
# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: 924134a44c189315be2148659913dda1671cbe99
base_revision: 924134a44c189315be2148659913dda1671cbe99
- platform: linux
create_revision: 924134a44c189315be2148659913dda1671cbe99
base_revision: 924134a44c189315be2148659913dda1671cbe99
- platform: macos
create_revision: 924134a44c189315be2148659913dda1671cbe99
base_revision: 924134a44c189315be2148659913dda1671cbe99
- platform: windows
create_revision: 924134a44c189315be2148659913dda1671cbe99
base_revision: 924134a44c189315be2148659913dda1671cbe99
# User provided section
# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'
@@ -0,0 +1,17 @@
# mam_desktop
A new Flutter project.
## Getting Started
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
- [Learn Flutter](https://docs.flutter.dev/get-started/learn-flutter)
- [Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
- [Flutter learning resources](https://docs.flutter.dev/reference/learning-resources)
For help getting started with Flutter development, view the
[online documentation](https://docs.flutter.dev/), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
@@ -0,0 +1,28 @@
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.
# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml
linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at https://dart.dev/lints.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
@@ -0,0 +1,156 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:mam_core/mam_core.dart';
import 'src/providers/session_providers.dart';
import 'src/theme/app_theme.dart';
import 'src/widgets/detail_pane.dart';
import 'src/widgets/session_table.dart';
import 'src/widgets/stale_banner.dart';
void main() {
runApp(const ProviderScope(child: MamDesktopApp()));
}
class MamDesktopApp extends StatelessWidget {
const MamDesktopApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'multi-agent-mux',
debugShowCheckedModeBanner: false,
theme: buildAppTheme(),
home: const DashboardScreen(),
);
}
}
class DashboardScreen extends ConsumerWidget {
const DashboardScreen({super.key});
@override
Widget build(BuildContext context, WidgetRef ref) {
final pollAsync = ref.watch(sessionsPollProvider);
return Scaffold(
body: DecoratedBox(
decoration: const BoxDecoration(gradient: backgroundGradient),
child: SafeArea(
child: pollAsync.when(
data: (poll) => _DashboardBody(poll: poll),
loading: () => const Center(child: CircularProgressIndicator()),
error: (error, stackTrace) => _ErrorScreen(error: error),
),
),
),
);
}
}
class _ErrorScreen extends StatelessWidget {
final Object error;
const _ErrorScreen({required this.error});
@override
Widget build(BuildContext context) {
return Center(
child: Padding(
padding: const EdgeInsets.all(32),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
const Icon(Icons.error_outline, color: AppColors.danger, size: 40),
const SizedBox(height: 12),
Text(
'Failed to start status polling:\n$error',
textAlign: TextAlign.center,
style: const TextStyle(color: AppColors.danger),
),
],
),
),
);
}
}
class _DashboardBody extends ConsumerWidget {
final SessionsPoll poll;
const _DashboardBody({required this.poll});
@override
Widget build(BuildContext context, WidgetRef ref) {
final selectedName = ref.watch(selectedSessionNameProvider);
final sessions = poll.snapshot?.sessions ?? const <SessionRow>[];
final matches = sessions.where((s) => s.name == selectedName);
final selectedRow = matches.isEmpty ? null : matches.first;
return Column(
children: [
_TopBar(poll: poll),
StaleBanner(poll: poll),
Expanded(
child: Row(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Expanded(
flex: 3,
child: Padding(
padding: const EdgeInsets.all(16),
child: SessionTable(
sessions: sessions,
selectedName: selectedName,
onSelect: (name) =>
ref.read(selectedSessionNameProvider.notifier).state =
name,
),
),
),
SizedBox(width: 380, child: DetailPane(session: selectedRow)),
],
),
),
],
);
}
}
class _TopBar extends StatelessWidget {
final SessionsPoll poll;
const _TopBar({required this.poll});
@override
Widget build(BuildContext context) {
final count = poll.snapshot?.sessions.length ?? 0;
return Padding(
padding: const EdgeInsets.fromLTRB(20, 16, 20, 0),
child: Row(
children: [
const Text(
'multi-agent-mux',
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w700,
color: AppColors.textPrimary,
),
),
const SizedBox(width: 12),
Container(
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 4),
decoration: BoxDecoration(
color: AppColors.accent.withValues(alpha: 0.18),
borderRadius: BorderRadius.circular(999),
),
child: Text(
'$count session${count == 1 ? '' : 's'}',
style: const TextStyle(
color: AppColors.accent2,
fontWeight: FontWeight.w600,
),
),
),
],
),
);
}
}
@@ -0,0 +1,26 @@
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:mam_core/mam_core.dart';
import '../status_script_locator.dart';
/// The single [SessionService] instance for this app run — owns the
/// resolved path to `status.sh`.
final sessionServiceProvider = Provider<SessionService>((ref) {
return SessionService(statusScriptPath: locateStatusScript());
});
/// Polling + stale/backoff (D6) sits in `mam_core`; this provider just wires
/// it up. `apps/mam_desktop` does not reimplement the timer/backoff logic.
final statusRepositoryProvider = Provider<StatusRepository>((ref) {
return StatusRepository(sessionService: ref.watch(sessionServiceProvider));
});
/// Reactive stream of [SessionsPoll] the UI subscribes to. 4s base interval
/// on success, backing off to 6s/15s on repeated `status.sh` failures.
final sessionsPollProvider = StreamProvider<SessionsPoll>((ref) {
final repo = ref.watch(statusRepositoryProvider);
return repo.watch();
});
/// Currently selected row name for the Master-Detail layout.
final selectedSessionNameProvider = StateProvider<String?>((ref) => null);
@@ -0,0 +1,26 @@
import 'dart:io';
/// Locates `status.sh` by walking up from the current working directory to
/// the repo root (marked by `.git`), then descending a fixed path — robust
/// regardless of which subdirectory `flutter run` happens to be invoked
/// from, unlike a hardcoded relative path.
String locateStatusScript() {
var dir = Directory.current;
while (!Directory('${dir.path}/.git').existsSync()) {
final parent = dir.parent;
if (parent.path == dir.path) {
throw StateError(
'Could not locate the repo root (.git) from ${Directory.current.path}. '
'Run mam_desktop from within the multi-agent-mux repo checkout.',
);
}
dir = parent;
}
final scriptPath =
'${dir.path}/.agents/skills/multi-agent-mux-status/scripts/status.sh';
if (!File(scriptPath).existsSync()) {
throw StateError('status.sh not found at $scriptPath');
}
return scriptPath;
}
@@ -0,0 +1,50 @@
import 'package:flutter/material.dart';
class AppColors {
AppColors._();
static const bgTop = Color(0xFF0B0F1A);
static const bgBottom = Color(0xFF141B2E);
static const accent = Color(0xFF7C5CFF);
static const accent2 = Color(0xFF19C6E0);
static const surface = Color(0xFF171E31);
static const surfaceAlt = Color(0xFF1E2740);
static const border = Color(0xFF2A3350);
static const textPrimary = Color(0xFFEAF0FF);
static const textSecondary = Color(0xFF93A0C4);
static const danger = Color(0xFFFF5C7A);
static const warning = Color(0xFFFFB454);
static const success = Color(0xFF4CE0B3);
}
const backgroundGradient = LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [AppColors.bgTop, AppColors.bgBottom],
);
ThemeData buildAppTheme() {
final base = ThemeData(brightness: Brightness.dark, useMaterial3: true);
return base.copyWith(
scaffoldBackgroundColor: AppColors.bgTop,
colorScheme: base.colorScheme.copyWith(
primary: AppColors.accent,
secondary: AppColors.accent2,
surface: AppColors.surface,
error: AppColors.danger,
),
textTheme: base.textTheme.apply(
bodyColor: AppColors.textPrimary,
displayColor: AppColors.textPrimary,
),
dividerColor: AppColors.border,
cardTheme: CardThemeData(
color: AppColors.surface,
elevation: 0,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(16),
side: const BorderSide(color: AppColors.border),
),
),
);
}
@@ -0,0 +1,292 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:mam_core/mam_core.dart';
import '../theme/app_theme.dart';
import 'terminal_pane.dart';
class _KV {
final String label;
final String value;
final bool copyable;
const _KV(this.label, this.value, {this.copyable = false});
}
class DetailPane extends StatelessWidget {
final SessionRow? session;
const DetailPane({super.key, required this.session});
@override
Widget build(BuildContext context) {
final s = session;
return DecoratedBox(
decoration: const BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [AppColors.surface, AppColors.surfaceAlt],
),
border: Border(left: BorderSide(color: AppColors.border)),
),
child: s == null
? const _EmptyDetail()
: DefaultTabController(
length: 2,
child: Column(
children: [
const TabBar(
tabs: [
Tab(text: 'INFO'),
Tab(text: 'TERMINAL'),
],
labelColor: AppColors.accent2,
unselectedLabelColor: AppColors.textSecondary,
indicatorColor: AppColors.accent2,
),
Expanded(
child: TabBarView(
children: [
_DetailContent(session: s),
TerminalPane(
sessionName: s.name,
serverName: s.server,
),
],
),
),
],
),
),
);
}
}
class _EmptyDetail extends StatelessWidget {
const _EmptyDetail();
@override
Widget build(BuildContext context) {
return const Center(
child: Text(
'Select a session to see details',
style: TextStyle(color: AppColors.textSecondary),
),
);
}
}
class _DetailContent extends StatelessWidget {
final SessionRow session;
const _DetailContent({required this.session});
@override
Widget build(BuildContext context) {
final s = session;
return SingleChildScrollView(
padding: const EdgeInsets.all(24),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_Header(session: s),
const SizedBox(height: 24),
_Section(
title: 'PANE',
entries: [
_KV('pid', s.pane.pid?.toString() ?? '?'),
_KV('cwd', s.pane.cwd ?? '?'),
_KV('cmd', s.pane.cmd ?? '?'),
_KV('cmd_full', s.pane.cmdFull ?? '?', copyable: true),
],
),
const SizedBox(height: 16),
_Section(
title: 'ATTACH',
entries: [
_KV('attach_command', s.attachCommand ?? '?', copyable: true),
_KV('start_command', s.startCommand ?? '?', copyable: true),
],
),
const SizedBox(height: 16),
_Section(
title: 'STATUS',
entries: [
_KV('last_visible_status', s.lastVisibleStatus ?? '?'),
_KV('resume_state', s.resumeState),
_KV('job_id', s.jobId),
_KV('job_status', s.jobStatus),
_KV(
'drift_classes',
s.driftClasses.isEmpty ? '-' : s.driftClasses.join(', '),
),
],
),
],
),
);
}
}
class _Header extends StatelessWidget {
final SessionRow session;
const _Header({required this.session});
@override
Widget build(BuildContext context) {
final s = session;
return Container(
width: double.infinity,
padding: const EdgeInsets.all(20),
decoration: BoxDecoration(
gradient: const LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [AppColors.accent, AppColors.accent2],
),
borderRadius: BorderRadius.circular(20),
boxShadow: [
BoxShadow(
color: AppColors.accent.withValues(alpha: 0.35),
blurRadius: 24,
offset: const Offset(0, 8),
),
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
s.name,
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.w700,
color: Colors.white,
),
),
const SizedBox(height: 10),
Wrap(
spacing: 8,
runSpacing: 8,
children: [
_Pill(text: s.status.toUpperCase()),
_Pill(text: s.tmuxAlive ? 'TMUX ALIVE' : 'TMUX DEAD'),
if (s.role != null) _Pill(text: s.role!.toUpperCase()),
_Pill(text: 'SERVER: ${s.server}'),
],
),
],
),
);
}
}
class _Pill extends StatelessWidget {
final String text;
const _Pill({required this.text});
@override
Widget build(BuildContext context) {
return Container(
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 4),
decoration: BoxDecoration(
color: Colors.black.withValues(alpha: 0.25),
borderRadius: BorderRadius.circular(999),
),
child: Text(
text,
style: const TextStyle(
color: Colors.white,
fontSize: 11,
fontWeight: FontWeight.w600,
),
),
);
}
}
class _Section extends StatelessWidget {
final String title;
final List<_KV> entries;
const _Section({required this.title, required this.entries});
@override
Widget build(BuildContext context) {
return Container(
width: double.infinity,
padding: const EdgeInsets.all(16),
decoration: BoxDecoration(
color: AppColors.surface,
borderRadius: BorderRadius.circular(16),
border: Border.all(color: AppColors.border),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
title,
style: const TextStyle(
color: AppColors.textSecondary,
fontSize: 12,
fontWeight: FontWeight.w700,
letterSpacing: 1.2,
),
),
const SizedBox(height: 12),
...entries.map((e) => _KVRow(entry: e)),
],
),
);
}
}
class _KVRow extends StatelessWidget {
final _KV entry;
const _KVRow({required this.entry});
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.symmetric(vertical: 6),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
width: 130,
child: Text(
entry.label,
style: const TextStyle(
color: AppColors.textSecondary,
fontSize: 12,
),
),
),
Expanded(
child: SelectableText(
entry.value,
style: const TextStyle(
color: AppColors.textPrimary,
fontSize: 13,
fontFamily: 'monospace',
),
),
),
if (entry.copyable)
SizedBox(
width: 32,
height: 32,
child: IconButton(
padding: EdgeInsets.zero,
icon: const Icon(
Icons.copy,
size: 15,
color: AppColors.textSecondary,
),
tooltip: 'Copy',
onPressed: () =>
Clipboard.setData(ClipboardData(text: entry.value)),
),
),
],
),
);
}
}
@@ -0,0 +1,167 @@
import 'package:data_table_2/data_table_2.dart';
import 'package:flutter/material.dart';
import 'package:mam_core/mam_core.dart';
import '../theme/app_theme.dart';
class SessionTable extends StatelessWidget {
final List<SessionRow> sessions;
final String? selectedName;
final ValueChanged<String> onSelect;
const SessionTable({
super.key,
required this.sessions,
required this.selectedName,
required this.onSelect,
});
@override
Widget build(BuildContext context) {
return Container(
decoration: BoxDecoration(
color: AppColors.surface,
borderRadius: BorderRadius.circular(16),
border: Border.all(color: AppColors.border),
),
clipBehavior: Clip.antiAlias,
child: DataTable2(
columnSpacing: 16,
horizontalMargin: 16,
minWidth: 900,
headingRowColor: WidgetStateProperty.all(AppColors.surfaceAlt),
headingTextStyle: const TextStyle(
color: AppColors.textSecondary,
fontWeight: FontWeight.w700,
fontSize: 12,
letterSpacing: 0.6,
),
dataRowHeight: 44,
empty: const Center(
child: Text(
'(no sessions registered)',
style: TextStyle(color: AppColors.textSecondary),
),
),
columns: const [
DataColumn2(label: Text('NAME'), size: ColumnSize.L),
DataColumn2(label: Text('SERVER'), size: ColumnSize.S),
DataColumn2(label: Text('YAML'), size: ColumnSize.S),
DataColumn2(label: Text('TMUX'), size: ColumnSize.S),
DataColumn2(label: Text('CMD'), size: ColumnSize.S),
DataColumn2(label: Text('RESUME'), size: ColumnSize.S),
DataColumn2(label: Text('JOB_ID'), size: ColumnSize.S),
DataColumn2(label: Text('JOB_STATUS'), size: ColumnSize.S),
DataColumn2(label: Text('DRIFT'), size: ColumnSize.S),
],
rows: sessions.map((s) {
final selected = s.name == selectedName;
return DataRow2(
selected: selected,
color: selected
? WidgetStateProperty.all(
AppColors.accent.withValues(alpha: 0.16),
)
: null,
onTap: () => onSelect(s.name),
cells: [
DataCell(
Text(
s.name,
overflow: TextOverflow.ellipsis,
style: const TextStyle(color: AppColors.textPrimary),
),
),
DataCell(
Text(
s.server,
style: const TextStyle(color: AppColors.textSecondary),
),
),
DataCell(_StatusChip(status: s.status)),
DataCell(_TmuxChip(alive: s.tmuxAlive)),
DataCell(
Text(
s.pane.cmd ?? '?',
style: const TextStyle(color: AppColors.textPrimary),
),
),
DataCell(
Text(
s.resumeState,
style: const TextStyle(color: AppColors.textSecondary),
),
),
DataCell(
Text(
s.jobId,
style: const TextStyle(color: AppColors.textSecondary),
),
),
DataCell(
Text(
s.jobStatus,
style: const TextStyle(color: AppColors.textSecondary),
),
),
DataCell(
s.hasDrift
? Text(
s.driftClasses.join(','),
style: const TextStyle(
color: AppColors.warning,
fontWeight: FontWeight.w600,
),
)
: const Text(
'-',
style: TextStyle(color: AppColors.textSecondary),
),
),
],
);
}).toList(),
),
);
}
}
class _StatusChip extends StatelessWidget {
final String status;
const _StatusChip({required this.status});
@override
Widget build(BuildContext context) {
Color color;
switch (status) {
case 'running':
color = AppColors.success;
case 'stopped':
case 'terminated':
case 'archived':
color = AppColors.textSecondary;
default:
color = AppColors.warning;
}
return Text(
status,
style: TextStyle(color: color, fontWeight: FontWeight.w600),
);
}
}
class _TmuxChip extends StatelessWidget {
final bool alive;
const _TmuxChip({required this.alive});
@override
Widget build(BuildContext context) {
return Text(
alive ? 'alive' : 'dead',
style: TextStyle(
color: alive ? AppColors.success : AppColors.danger,
fontWeight: FontWeight.w600,
),
);
}
}
@@ -0,0 +1,51 @@
import 'package:flutter/material.dart';
import 'package:mam_core/mam_core.dart';
import '../theme/app_theme.dart';
/// D6: when `status.sh` polling fails, the last good snapshot is kept and
/// this banner surfaces staleness instead of the dashboard silently
/// blanking out or crashing.
class StaleBanner extends StatelessWidget {
final SessionsPoll poll;
const StaleBanner({super.key, required this.poll});
@override
Widget build(BuildContext context) {
final shouldShow = poll.stale || (poll.snapshot == null && poll.error != null);
if (!shouldShow) return const SizedBox.shrink();
final lastOk = poll.lastOkAt;
final lastOkText = lastOk == null
? 'never'
: '${lastOk.hour.toString().padLeft(2, '0')}:'
'${lastOk.minute.toString().padLeft(2, '0')}:'
'${lastOk.second.toString().padLeft(2, '0')}';
return Container(
width: double.infinity,
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
color: AppColors.warning.withValues(alpha: 0.15),
child: Row(
children: [
const Icon(
Icons.warning_amber_rounded,
color: AppColors.warning,
size: 18,
),
const SizedBox(width: 8),
Expanded(
child: Text(
'⚠ status snapshot stale (last ok: $lastOkText)${poll.error != null ? ' — Error: ${poll.error}' : ''}',
style: const TextStyle(
color: AppColors.warning,
fontWeight: FontWeight.w600,
),
overflow: TextOverflow.ellipsis,
),
),
],
),
);
}
}
@@ -0,0 +1,141 @@
import 'dart:async';
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:xterm/xterm.dart';
import 'package:mam_pty/mam_pty.dart';
import '../theme/app_theme.dart';
class TerminalPane extends StatefulWidget {
final String sessionName;
final String serverName;
final VoidCallback? onClosed;
const TerminalPane({
super.key,
required this.sessionName,
required this.serverName,
this.onClosed,
});
@override
State<TerminalPane> createState() => _TerminalPaneState();
}
class _TerminalPaneState extends State<TerminalPane> {
late final Terminal _terminal;
PtySession? _pty;
StreamSubscription<List<int>>? _stdoutSub;
bool _hasError = false;
String _errorMessage = '';
@override
void initState() {
super.initState();
_terminal = Terminal(
maxLines: 1000,
);
_startPty();
}
Future<void> _startPty() async {
try {
final pty = await PtySession.start(
'tmux',
['-L', widget.serverName, 'attach', '-t', widget.sessionName],
);
if (!mounted) {
pty.close();
return;
}
setState(() {
_pty = pty;
});
// Handle PTY stdout stream data redirection to xterm widget
_stdoutSub = pty.stdout.listen(
(data) {
_terminal.write(utf8.decode(data, allowMalformed: true));
},
onError: (err) {
_showError(err.toString());
},
onDone: () {
widget.onClosed?.call();
},
);
// Handle user keyboard inputs redirection from xterm to PTY using onOutput (xterm v3)
_terminal.onOutput = (data) {
_pty?.writeString(data);
};
// Handle user-driven terminal layout resizes (4 args in xterm v3)
_terminal.onResize = (cols, rows, pxW, pxH) {
_pty?.resize(cols, rows);
};
} catch (e) {
_showError(e.toString());
}
}
void _showError(String message) {
if (mounted) {
setState(() {
_hasError = true;
_errorMessage = message;
});
}
}
@override
void dispose() {
_stdoutSub?.cancel();
_pty?.close();
super.dispose();
}
@override
Widget build(BuildContext context) {
if (_hasError) {
return Center(
child: Padding(
padding: const EdgeInsets.all(24),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
const Icon(Icons.error_outline, color: AppColors.danger, size: 40),
const SizedBox(height: 12),
Text(
'PTY Session failed:\n$_errorMessage',
textAlign: TextAlign.center,
style: const TextStyle(color: AppColors.danger),
),
const SizedBox(height: 16),
ElevatedButton(
onPressed: () {
setState(() {
_hasError = false;
_errorMessage = '';
});
_startPty();
},
child: const Text('Retry'),
),
],
),
),
);
}
return Container(
color: Colors.black,
padding: const EdgeInsets.all(8),
child: TerminalView(
_terminal,
autofocus: true,
backgroundOpacity: 1.0,
),
);
}
}
@@ -0,0 +1 @@
flutter/ephemeral
@@ -0,0 +1,128 @@
# Project-level configuration.
cmake_minimum_required(VERSION 3.13)
project(runner LANGUAGES CXX)
# The name of the executable created for the application. Change this to change
# the on-disk name of your application.
set(BINARY_NAME "mam_desktop")
# The unique GTK application identifier for this application. See:
# https://wiki.gnome.org/HowDoI/ChooseApplicationID
set(APPLICATION_ID "com.mam.mam_desktop")
# Explicitly opt in to modern CMake behaviors to avoid warnings with recent
# versions of CMake.
cmake_policy(SET CMP0063 NEW)
# Load bundled libraries from the lib/ directory relative to the binary.
set(CMAKE_INSTALL_RPATH "$ORIGIN/lib")
# Root filesystem for cross-building.
if(FLUTTER_TARGET_PLATFORM_SYSROOT)
set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT})
set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT})
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
endif()
# Define build configuration options.
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
set(CMAKE_BUILD_TYPE "Debug" CACHE
STRING "Flutter build mode" FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
"Debug" "Profile" "Release")
endif()
# Compilation settings that should be applied to most targets.
#
# Be cautious about adding new options here, as plugins use this function by
# default. In most cases, you should add new options to specific targets instead
# of modifying this function.
function(APPLY_STANDARD_SETTINGS TARGET)
target_compile_features(${TARGET} PUBLIC cxx_std_14)
target_compile_options(${TARGET} PRIVATE -Wall -Werror)
target_compile_options(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:-O3>")
target_compile_definitions(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:NDEBUG>")
endfunction()
# Flutter library and tool build rules.
set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter")
add_subdirectory(${FLUTTER_MANAGED_DIR})
# System-level dependencies.
find_package(PkgConfig REQUIRED)
pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
# Application build; see runner/CMakeLists.txt.
add_subdirectory("runner")
# Run the Flutter tool portions of the build. This must not be removed.
add_dependencies(${BINARY_NAME} flutter_assemble)
# Only the install-generated bundle's copy of the executable will launch
# correctly, since the resources must in the right relative locations. To avoid
# people trying to run the unbundled copy, put it in a subdirectory instead of
# the default top-level location.
set_target_properties(${BINARY_NAME}
PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run"
)
# Generated plugin build rules, which manage building the plugins and adding
# them to the application.
include(flutter/generated_plugins.cmake)
# === Installation ===
# By default, "installing" just makes a relocatable bundle in the build
# directory.
set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle")
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE)
endif()
# Start with a clean build bundle directory every time.
install(CODE "
file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\")
" COMPONENT Runtime)
set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data")
set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib")
install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
COMPONENT Runtime)
install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
COMPONENT Runtime)
install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
COMPONENT Runtime)
foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES})
install(FILES "${bundled_library}"
DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
COMPONENT Runtime)
endforeach(bundled_library)
# Copy the native assets provided by the build.dart from all packages.
set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/linux/")
install(DIRECTORY "${NATIVE_ASSETS_DIR}"
DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
COMPONENT Runtime)
# Fully re-copy the assets directory on each build to avoid having stale files
# from a previous install.
set(FLUTTER_ASSET_DIR_NAME "flutter_assets")
install(CODE "
file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\")
" COMPONENT Runtime)
install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}"
DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime)
# Install the AOT library on non-Debug builds only.
if(NOT CMAKE_BUILD_TYPE MATCHES "Debug")
install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
COMPONENT Runtime)
endif()
@@ -0,0 +1,88 @@
# This file controls Flutter-level build steps. It should not be edited.
cmake_minimum_required(VERSION 3.10)
set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral")
# Configuration provided via flutter tool.
include(${EPHEMERAL_DIR}/generated_config.cmake)
# TODO: Move the rest of this into files in ephemeral. See
# https://github.com/flutter/flutter/issues/57146.
# Serves the same purpose as list(TRANSFORM ... PREPEND ...),
# which isn't available in 3.10.
function(list_prepend LIST_NAME PREFIX)
set(NEW_LIST "")
foreach(element ${${LIST_NAME}})
list(APPEND NEW_LIST "${PREFIX}${element}")
endforeach(element)
set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE)
endfunction()
# === Flutter Library ===
# System-level dependencies.
find_package(PkgConfig REQUIRED)
pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0)
pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0)
set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so")
# Published to parent scope for install step.
set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)
set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE)
set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE)
set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE)
list(APPEND FLUTTER_LIBRARY_HEADERS
"fl_basic_message_channel.h"
"fl_binary_codec.h"
"fl_binary_messenger.h"
"fl_dart_project.h"
"fl_engine.h"
"fl_json_message_codec.h"
"fl_json_method_codec.h"
"fl_message_codec.h"
"fl_method_call.h"
"fl_method_channel.h"
"fl_method_codec.h"
"fl_method_response.h"
"fl_plugin_registrar.h"
"fl_plugin_registry.h"
"fl_standard_message_codec.h"
"fl_standard_method_codec.h"
"fl_string_codec.h"
"fl_value.h"
"fl_view.h"
"flutter_linux.h"
)
list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/")
add_library(flutter INTERFACE)
target_include_directories(flutter INTERFACE
"${EPHEMERAL_DIR}"
)
target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}")
target_link_libraries(flutter INTERFACE
PkgConfig::GTK
PkgConfig::GLIB
PkgConfig::GIO
)
add_dependencies(flutter flutter_assemble)
# === Flutter tool backend ===
# _phony_ is a non-existent file to force this command to run every time,
# since currently there's no way to get a full input/output list from the
# flutter tool.
add_custom_command(
OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}
${CMAKE_CURRENT_BINARY_DIR}/_phony_
COMMAND ${CMAKE_COMMAND} -E env
${FLUTTER_TOOL_ENVIRONMENT}
"${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh"
${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE}
VERBATIM
)
add_custom_target(flutter_assemble DEPENDS
"${FLUTTER_LIBRARY}"
${FLUTTER_LIBRARY_HEADERS}
)
@@ -0,0 +1,11 @@
//
// Generated file. Do not edit.
//
// clang-format off
#include "generated_plugin_registrant.h"
void fl_register_plugins(FlPluginRegistry* registry) {
}
@@ -0,0 +1,15 @@
//
// Generated file. Do not edit.
//
// clang-format off
#ifndef GENERATED_PLUGIN_REGISTRANT_
#define GENERATED_PLUGIN_REGISTRANT_
#include <flutter_linux/flutter_linux.h>
// Registers Flutter plugins.
void fl_register_plugins(FlPluginRegistry* registry);
#endif // GENERATED_PLUGIN_REGISTRANT_
@@ -0,0 +1,23 @@
#
# Generated file, do not edit.
#
list(APPEND FLUTTER_PLUGIN_LIST
)
list(APPEND FLUTTER_FFI_PLUGIN_LIST
)
set(PLUGIN_BUNDLED_LIBRARIES)
foreach(plugin ${FLUTTER_PLUGIN_LIST})
add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin})
target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)
list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>)
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
endforeach(plugin)
foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin})
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
endforeach(ffi_plugin)
@@ -0,0 +1,26 @@
cmake_minimum_required(VERSION 3.13)
project(runner LANGUAGES CXX)
# Define the application target. To change its name, change BINARY_NAME in the
# top-level CMakeLists.txt, not the value here, or `flutter run` will no longer
# work.
#
# Any new source files that you add to the application should be added here.
add_executable(${BINARY_NAME}
"main.cc"
"my_application.cc"
"${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
)
# Apply the standard set of build settings. This can be removed for applications
# that need different build settings.
apply_standard_settings(${BINARY_NAME})
# Add preprocessor definitions for the application ID.
add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}")
# Add dependency libraries. Add any application-specific dependencies here.
target_link_libraries(${BINARY_NAME} PRIVATE flutter)
target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK)
target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}")
@@ -0,0 +1,6 @@
#include "my_application.h"
int main(int argc, char** argv) {
g_autoptr(MyApplication) app = my_application_new();
return g_application_run(G_APPLICATION(app), argc, argv);
}
@@ -0,0 +1,148 @@
#include "my_application.h"
#include <flutter_linux/flutter_linux.h>
#ifdef GDK_WINDOWING_X11
#include <gdk/gdkx.h>
#endif
#include "flutter/generated_plugin_registrant.h"
struct _MyApplication {
GtkApplication parent_instance;
char** dart_entrypoint_arguments;
};
G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION)
// Called when first Flutter frame received.
static void first_frame_cb(MyApplication* self, FlView* view) {
gtk_widget_show(gtk_widget_get_toplevel(GTK_WIDGET(view)));
}
// Implements GApplication::activate.
static void my_application_activate(GApplication* application) {
MyApplication* self = MY_APPLICATION(application);
GtkWindow* window =
GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application)));
// Use a header bar when running in GNOME as this is the common style used
// by applications and is the setup most users will be using (e.g. Ubuntu
// desktop).
// If running on X and not using GNOME then just use a traditional title bar
// in case the window manager does more exotic layout, e.g. tiling.
// If running on Wayland assume the header bar will work (may need changing
// if future cases occur).
gboolean use_header_bar = TRUE;
#ifdef GDK_WINDOWING_X11
GdkScreen* screen = gtk_window_get_screen(window);
if (GDK_IS_X11_SCREEN(screen)) {
const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen);
if (g_strcmp0(wm_name, "GNOME Shell") != 0) {
use_header_bar = FALSE;
}
}
#endif
if (use_header_bar) {
GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new());
gtk_widget_show(GTK_WIDGET(header_bar));
gtk_header_bar_set_title(header_bar, "mam_desktop");
gtk_header_bar_set_show_close_button(header_bar, TRUE);
gtk_window_set_titlebar(window, GTK_WIDGET(header_bar));
} else {
gtk_window_set_title(window, "mam_desktop");
}
gtk_window_set_default_size(window, 1280, 720);
g_autoptr(FlDartProject) project = fl_dart_project_new();
fl_dart_project_set_dart_entrypoint_arguments(
project, self->dart_entrypoint_arguments);
FlView* view = fl_view_new(project);
GdkRGBA background_color;
// Background defaults to black, override it here if necessary, e.g. #00000000
// for transparent.
gdk_rgba_parse(&background_color, "#000000");
fl_view_set_background_color(view, &background_color);
gtk_widget_show(GTK_WIDGET(view));
gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view));
// Show the window when Flutter renders.
// Requires the view to be realized so we can start rendering.
g_signal_connect_swapped(view, "first-frame", G_CALLBACK(first_frame_cb),
self);
gtk_widget_realize(GTK_WIDGET(view));
fl_register_plugins(FL_PLUGIN_REGISTRY(view));
gtk_widget_grab_focus(GTK_WIDGET(view));
}
// Implements GApplication::local_command_line.
static gboolean my_application_local_command_line(GApplication* application,
gchar*** arguments,
int* exit_status) {
MyApplication* self = MY_APPLICATION(application);
// Strip out the first argument as it is the binary name.
self->dart_entrypoint_arguments = g_strdupv(*arguments + 1);
g_autoptr(GError) error = nullptr;
if (!g_application_register(application, nullptr, &error)) {
g_warning("Failed to register: %s", error->message);
*exit_status = 1;
return TRUE;
}
g_application_activate(application);
*exit_status = 0;
return TRUE;
}
// Implements GApplication::startup.
static void my_application_startup(GApplication* application) {
// MyApplication* self = MY_APPLICATION(object);
// Perform any actions required at application startup.
G_APPLICATION_CLASS(my_application_parent_class)->startup(application);
}
// Implements GApplication::shutdown.
static void my_application_shutdown(GApplication* application) {
// MyApplication* self = MY_APPLICATION(object);
// Perform any actions required at application shutdown.
G_APPLICATION_CLASS(my_application_parent_class)->shutdown(application);
}
// Implements GObject::dispose.
static void my_application_dispose(GObject* object) {
MyApplication* self = MY_APPLICATION(object);
g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev);
G_OBJECT_CLASS(my_application_parent_class)->dispose(object);
}
static void my_application_class_init(MyApplicationClass* klass) {
G_APPLICATION_CLASS(klass)->activate = my_application_activate;
G_APPLICATION_CLASS(klass)->local_command_line =
my_application_local_command_line;
G_APPLICATION_CLASS(klass)->startup = my_application_startup;
G_APPLICATION_CLASS(klass)->shutdown = my_application_shutdown;
G_OBJECT_CLASS(klass)->dispose = my_application_dispose;
}
static void my_application_init(MyApplication* self) {}
MyApplication* my_application_new() {
// Set the program name to the application ID, which helps various systems
// like GTK and desktop environments map this running application to its
// corresponding .desktop file. This ensures better integration by allowing
// the application to be recognized beyond its binary name.
g_set_prgname(APPLICATION_ID);
return MY_APPLICATION(g_object_new(my_application_get_type(),
"application-id", APPLICATION_ID, "flags",
G_APPLICATION_NON_UNIQUE, nullptr));
}
@@ -0,0 +1,21 @@
#ifndef FLUTTER_MY_APPLICATION_H_
#define FLUTTER_MY_APPLICATION_H_
#include <gtk/gtk.h>
G_DECLARE_FINAL_TYPE(MyApplication,
my_application,
MY,
APPLICATION,
GtkApplication)
/**
* my_application_new:
*
* Creates a new Flutter-based application.
*
* Returns: a new #MyApplication.
*/
MyApplication* my_application_new();
#endif // FLUTTER_MY_APPLICATION_H_
@@ -0,0 +1,7 @@
# Flutter-related
**/Flutter/ephemeral/
**/Pods/
# Xcode-related
**/dgph
**/xcuserdata/
@@ -0,0 +1 @@
#include "ephemeral/Flutter-Generated.xcconfig"
@@ -0,0 +1 @@
#include "ephemeral/Flutter-Generated.xcconfig"
@@ -0,0 +1,10 @@
//
// Generated file. Do not edit.
//
import FlutterMacOS
import Foundation
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
}
@@ -0,0 +1,729 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 54;
objects = {
/* Begin PBXAggregateTarget section */
33CC111A2044C6BA0003C045 /* Flutter Assemble */ = {
isa = PBXAggregateTarget;
buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */;
buildPhases = (
33CC111E2044C6BF0003C045 /* ShellScript */,
);
dependencies = (
);
name = "Flutter Assemble";
productName = FLX;
};
/* End PBXAggregateTarget section */
/* Begin PBXBuildFile section */
331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C80D7294CF71000263BE5 /* RunnerTests.swift */; };
335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; };
33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; };
33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; };
33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };
33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
331C80D9294CF71000263BE5 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 33CC10E52044A3C60003C045 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 33CC10EC2044A3C60003C045;
remoteInfo = Runner;
};
33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 33CC10E52044A3C60003C045 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 33CC111A2044C6BA0003C045;
remoteInfo = FLX;
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
33CC110E2044A8840003C045 /* Bundle Framework */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
);
name = "Bundle Framework";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
331C80D5294CF71000263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = "<group>"; };
335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = "<group>"; };
33CC10ED2044A3C60003C045 /* mam_desktop.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "mam_desktop.app"; sourceTree = BUILT_PRODUCTS_DIR; };
33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = "<group>"; };
33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = "<group>"; };
33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = "<group>"; };
33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = "<group>"; };
33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = "<group>"; };
33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = "<group>"; };
33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = "<group>"; };
33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = "<group>"; };
33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = "<group>"; };
78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterGeneratedPluginSwiftPackage; path = ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; sourceTree = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
331C80D2294CF70F00263BE5 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
33CC10EA2044A3C60003C045 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
331C80D6294CF71000263BE5 /* RunnerTests */ = {
isa = PBXGroup;
children = (
331C80D7294CF71000263BE5 /* RunnerTests.swift */,
);
path = RunnerTests;
sourceTree = "<group>";
};
33BA886A226E78AF003329D5 /* Configs */ = {
isa = PBXGroup;
children = (
33E5194F232828860026EE4D /* AppInfo.xcconfig */,
9740EEB21CF90195004384FC /* Debug.xcconfig */,
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
333000ED22D3DE5D00554162 /* Warnings.xcconfig */,
);
path = Configs;
sourceTree = "<group>";
};
33CC10E42044A3C60003C045 = {
isa = PBXGroup;
children = (
33FAB671232836740065AC1E /* Runner */,
33CEB47122A05771004F2AC0 /* Flutter */,
331C80D6294CF71000263BE5 /* RunnerTests */,
33CC10EE2044A3C60003C045 /* Products */,
D73912EC22F37F3D000D13A0 /* Frameworks */,
);
sourceTree = "<group>";
};
33CC10EE2044A3C60003C045 /* Products */ = {
isa = PBXGroup;
children = (
33CC10ED2044A3C60003C045 /* mam_desktop.app */,
331C80D5294CF71000263BE5 /* RunnerTests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
33CC11242044D66E0003C045 /* Resources */ = {
isa = PBXGroup;
children = (
33CC10F22044A3C60003C045 /* Assets.xcassets */,
33CC10F42044A3C60003C045 /* MainMenu.xib */,
33CC10F72044A3C60003C045 /* Info.plist */,
);
name = Resources;
path = ..;
sourceTree = "<group>";
};
33CEB47122A05771004F2AC0 /* Flutter */ = {
isa = PBXGroup;
children = (
78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */,
335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */,
33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */,
33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */,
33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */,
);
path = Flutter;
sourceTree = "<group>";
};
33FAB671232836740065AC1E /* Runner */ = {
isa = PBXGroup;
children = (
33CC10F02044A3C60003C045 /* AppDelegate.swift */,
33CC11122044BFA00003C045 /* MainFlutterWindow.swift */,
33E51913231747F40026EE4D /* DebugProfile.entitlements */,
33E51914231749380026EE4D /* Release.entitlements */,
33CC11242044D66E0003C045 /* Resources */,
33BA886A226E78AF003329D5 /* Configs */,
);
path = Runner;
sourceTree = "<group>";
};
D73912EC22F37F3D000D13A0 /* Frameworks */ = {
isa = PBXGroup;
children = (
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
331C80D4294CF70F00263BE5 /* RunnerTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
buildPhases = (
331C80D1294CF70F00263BE5 /* Sources */,
331C80D2294CF70F00263BE5 /* Frameworks */,
331C80D3294CF70F00263BE5 /* Resources */,
);
buildRules = (
);
dependencies = (
331C80DA294CF71000263BE5 /* PBXTargetDependency */,
);
name = RunnerTests;
productName = RunnerTests;
productReference = 331C80D5294CF71000263BE5 /* RunnerTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
33CC10EC2044A3C60003C045 /* Runner */ = {
isa = PBXNativeTarget;
buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
33CC10E92044A3C60003C045 /* Sources */,
33CC10EA2044A3C60003C045 /* Frameworks */,
33CC10EB2044A3C60003C045 /* Resources */,
33CC110E2044A8840003C045 /* Bundle Framework */,
3399D490228B24CF009A79C7 /* ShellScript */,
);
buildRules = (
);
dependencies = (
33CC11202044C79F0003C045 /* PBXTargetDependency */,
);
name = Runner;
packageProductDependencies = (
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */,
);
productName = Runner;
productReference = 33CC10ED2044A3C60003C045 /* mam_desktop.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
33CC10E52044A3C60003C045 /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = YES;
LastSwiftUpdateCheck = 0920;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
331C80D4294CF70F00263BE5 = {
CreatedOnToolsVersion = 14.0;
TestTargetID = 33CC10EC2044A3C60003C045;
};
33CC10EC2044A3C60003C045 = {
CreatedOnToolsVersion = 9.2;
LastSwiftMigration = 1100;
ProvisioningStyle = Automatic;
SystemCapabilities = {
com.apple.Sandbox = {
enabled = 1;
};
};
};
33CC111A2044C6BA0003C045 = {
CreatedOnToolsVersion = 9.2;
ProvisioningStyle = Manual;
};
};
};
buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 33CC10E42044A3C60003C045;
packageReferences = (
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */,
);
productRefGroup = 33CC10EE2044A3C60003C045 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
33CC10EC2044A3C60003C045 /* Runner */,
331C80D4294CF70F00263BE5 /* RunnerTests */,
33CC111A2044C6BA0003C045 /* Flutter Assemble */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
331C80D3294CF70F00263BE5 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
33CC10EB2044A3C60003C045 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */,
33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
3399D490228B24CF009A79C7 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n";
};
33CC111E2044C6BF0003C045 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
Flutter/ephemeral/FlutterInputs.xcfilelist,
);
inputPaths = (
Flutter/ephemeral/tripwire,
);
outputFileListPaths = (
Flutter/ephemeral/FlutterOutputs.xcfilelist,
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire";
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
331C80D1294CF70F00263BE5 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
33CC10E92044A3C60003C045 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */,
33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */,
335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
331C80DA294CF71000263BE5 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 33CC10EC2044A3C60003C045 /* Runner */;
targetProxy = 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */;
};
33CC11202044C79F0003C045 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */;
targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
33CC10F42044A3C60003C045 /* MainMenu.xib */ = {
isa = PBXVariantGroup;
children = (
33CC10F52044A3C60003C045 /* Base */,
);
name = MainMenu.xib;
path = Runner;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
331C80DB294CF71000263BE5 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.mam.mamDesktop.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/mam_desktop.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/mam_desktop";
};
name = Debug;
};
331C80DC294CF71000263BE5 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.mam.mamDesktop.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/mam_desktop.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/mam_desktop";
};
name = Release;
};
331C80DD294CF71000263BE5 /* Profile */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.mam.mamDesktop.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/mam_desktop.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/mam_desktop";
};
name = Profile;
};
338D0CE9231458BD00FA5F75 /* Profile */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CODE_SIGN_IDENTITY = "-";
COPY_PHASE_STRIP = NO;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.15;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
};
name = Profile;
};
338D0CEA231458BD00FA5F75 /* Profile */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 5.0;
};
name = Profile;
};
338D0CEB231458BD00FA5F75 /* Profile */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Manual;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Profile;
};
33CC10F92044A3C60003C045 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CODE_SIGN_IDENTITY = "-";
COPY_PHASE_STRIP = NO;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.15;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
33CC10FA2044A3C60003C045 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CODE_SIGN_IDENTITY = "-";
COPY_PHASE_STRIP = NO;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.15;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
};
name = Release;
};
33CC10FC2044A3C60003C045 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
};
name = Debug;
};
33CC10FD2044A3C60003C045 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 5.0;
};
name = Release;
};
33CC111C2044C6BA0003C045 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Manual;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
33CC111D2044C6BA0003C045 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
331C80DB294CF71000263BE5 /* Debug */,
331C80DC294CF71000263BE5 /* Release */,
331C80DD294CF71000263BE5 /* Profile */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = {
isa = XCConfigurationList;
buildConfigurations = (
33CC10F92044A3C60003C045 /* Debug */,
33CC10FA2044A3C60003C045 /* Release */,
338D0CE9231458BD00FA5F75 /* Profile */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = {
isa = XCConfigurationList;
buildConfigurations = (
33CC10FC2044A3C60003C045 /* Debug */,
33CC10FD2044A3C60003C045 /* Release */,
338D0CEA231458BD00FA5F75 /* Profile */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = {
isa = XCConfigurationList;
buildConfigurations = (
33CC111C2044C6BA0003C045 /* Debug */,
33CC111D2044C6BA0003C045 /* Release */,
338D0CEB231458BD00FA5F75 /* Profile */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
/* Begin XCLocalSwiftPackageReference section */
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */ = {
isa = XCLocalSwiftPackageReference;
relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage;
};
/* End XCLocalSwiftPackageReference section */
/* Begin XCSwiftPackageProductDependency section */
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = {
isa = XCSwiftPackageProductDependency;
productName = FlutterGeneratedPluginSwiftPackage;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = 33CC10E52044A3C60003C045 /* Project object */;
}
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
@@ -0,0 +1,117 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<PreActions>
<ExecutionAction
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
<ActionContent
title = "Run Prepare Flutter Framework Script"
scriptText = "&quot;$FLUTTER_ROOT&quot;/packages/flutter_tools/bin/macos_assemble.sh prepare&#10;">
<EnvironmentBuildable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
BuildableName = "mam_desktop.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</EnvironmentBuildable>
</ActionContent>
</ExecutionAction>
</PreActions>
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
BuildableName = "mam_desktop.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
BuildableName = "mam_desktop.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO"
parallelizable = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "331C80D4294CF70F00263BE5"
BuildableName = "RunnerTests.xctest"
BlueprintName = "RunnerTests"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
enableGPUValidationMode = "1"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
BuildableName = "mam_desktop.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Profile"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
BuildableName = "mam_desktop.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:Runner.xcodeproj">
</FileRef>
</Workspace>
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
@@ -0,0 +1,13 @@
import Cocoa
import FlutterMacOS
@main
class AppDelegate: FlutterAppDelegate {
override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
return true
}
override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool {
return true
}
}
@@ -0,0 +1,68 @@
{
"images" : [
{
"size" : "16x16",
"idiom" : "mac",
"filename" : "app_icon_16.png",
"scale" : "1x"
},
{
"size" : "16x16",
"idiom" : "mac",
"filename" : "app_icon_32.png",
"scale" : "2x"
},
{
"size" : "32x32",
"idiom" : "mac",
"filename" : "app_icon_32.png",
"scale" : "1x"
},
{
"size" : "32x32",
"idiom" : "mac",
"filename" : "app_icon_64.png",
"scale" : "2x"
},
{
"size" : "128x128",
"idiom" : "mac",
"filename" : "app_icon_128.png",
"scale" : "1x"
},
{
"size" : "128x128",
"idiom" : "mac",
"filename" : "app_icon_256.png",
"scale" : "2x"
},
{
"size" : "256x256",
"idiom" : "mac",
"filename" : "app_icon_256.png",
"scale" : "1x"
},
{
"size" : "256x256",
"idiom" : "mac",
"filename" : "app_icon_512.png",
"scale" : "2x"
},
{
"size" : "512x512",
"idiom" : "mac",
"filename" : "app_icon_512.png",
"scale" : "1x"
},
{
"size" : "512x512",
"idiom" : "mac",
"filename" : "app_icon_1024.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
@@ -0,0 +1,343 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14490.70"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="NSApplication">
<connections>
<outlet property="delegate" destination="Voe-Tx-rLC" id="GzC-gU-4Uq"/>
</connections>
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<customObject id="Voe-Tx-rLC" customClass="AppDelegate" customModule="Runner" customModuleProvider="target">
<connections>
<outlet property="applicationMenu" destination="uQy-DD-JDr" id="XBo-yE-nKs"/>
<outlet property="mainFlutterWindow" destination="QvC-M9-y7g" id="gIp-Ho-8D9"/>
</connections>
</customObject>
<customObject id="YLy-65-1bz" customClass="NSFontManager"/>
<menu title="Main Menu" systemMenu="main" id="AYu-sK-qS6">
<items>
<menuItem title="APP_NAME" id="1Xt-HY-uBw">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="APP_NAME" systemMenu="apple" id="uQy-DD-JDr">
<items>
<menuItem title="About APP_NAME" id="5kV-Vb-QxS">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="orderFrontStandardAboutPanel:" target="-1" id="Exp-CZ-Vem"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="VOq-y0-SEH"/>
<menuItem title="Preferences…" keyEquivalent="," id="BOF-NM-1cW"/>
<menuItem isSeparatorItem="YES" id="wFC-TO-SCJ"/>
<menuItem title="Services" id="NMo-om-nkz">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Services" systemMenu="services" id="hz9-B4-Xy5"/>
</menuItem>
<menuItem isSeparatorItem="YES" id="4je-JR-u6R"/>
<menuItem title="Hide APP_NAME" keyEquivalent="h" id="Olw-nP-bQN">
<connections>
<action selector="hide:" target="-1" id="PnN-Uc-m68"/>
</connections>
</menuItem>
<menuItem title="Hide Others" keyEquivalent="h" id="Vdr-fp-XzO">
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
<connections>
<action selector="hideOtherApplications:" target="-1" id="VT4-aY-XCT"/>
</connections>
</menuItem>
<menuItem title="Show All" id="Kd2-mp-pUS">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="unhideAllApplications:" target="-1" id="Dhg-Le-xox"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="kCx-OE-vgT"/>
<menuItem title="Quit APP_NAME" keyEquivalent="q" id="4sb-4s-VLi">
<connections>
<action selector="terminate:" target="-1" id="Te7-pn-YzF"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Edit" id="5QF-Oa-p0T">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Edit" id="W48-6f-4Dl">
<items>
<menuItem title="Undo" keyEquivalent="z" id="dRJ-4n-Yzg">
<connections>
<action selector="undo:" target="-1" id="M6e-cu-g7V"/>
</connections>
</menuItem>
<menuItem title="Redo" keyEquivalent="Z" id="6dh-zS-Vam">
<connections>
<action selector="redo:" target="-1" id="oIA-Rs-6OD"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="WRV-NI-Exz"/>
<menuItem title="Cut" keyEquivalent="x" id="uRl-iY-unG">
<connections>
<action selector="cut:" target="-1" id="YJe-68-I9s"/>
</connections>
</menuItem>
<menuItem title="Copy" keyEquivalent="c" id="x3v-GG-iWU">
<connections>
<action selector="copy:" target="-1" id="G1f-GL-Joy"/>
</connections>
</menuItem>
<menuItem title="Paste" keyEquivalent="v" id="gVA-U4-sdL">
<connections>
<action selector="paste:" target="-1" id="UvS-8e-Qdg"/>
</connections>
</menuItem>
<menuItem title="Paste and Match Style" keyEquivalent="V" id="WeT-3V-zwk">
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
<connections>
<action selector="pasteAsPlainText:" target="-1" id="cEh-KX-wJQ"/>
</connections>
</menuItem>
<menuItem title="Delete" id="pa3-QI-u2k">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="delete:" target="-1" id="0Mk-Ml-PaM"/>
</connections>
</menuItem>
<menuItem title="Select All" keyEquivalent="a" id="Ruw-6m-B2m">
<connections>
<action selector="selectAll:" target="-1" id="VNm-Mi-diN"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="uyl-h8-XO2"/>
<menuItem title="Find" id="4EN-yA-p0u">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Find" id="1b7-l0-nxx">
<items>
<menuItem title="Find…" tag="1" keyEquivalent="f" id="Xz5-n4-O0W">
<connections>
<action selector="performFindPanelAction:" target="-1" id="cD7-Qs-BN4"/>
</connections>
</menuItem>
<menuItem title="Find and Replace…" tag="12" keyEquivalent="f" id="YEy-JH-Tfz">
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
<connections>
<action selector="performFindPanelAction:" target="-1" id="WD3-Gg-5AJ"/>
</connections>
</menuItem>
<menuItem title="Find Next" tag="2" keyEquivalent="g" id="q09-fT-Sye">
<connections>
<action selector="performFindPanelAction:" target="-1" id="NDo-RZ-v9R"/>
</connections>
</menuItem>
<menuItem title="Find Previous" tag="3" keyEquivalent="G" id="OwM-mh-QMV">
<connections>
<action selector="performFindPanelAction:" target="-1" id="HOh-sY-3ay"/>
</connections>
</menuItem>
<menuItem title="Use Selection for Find" tag="7" keyEquivalent="e" id="buJ-ug-pKt">
<connections>
<action selector="performFindPanelAction:" target="-1" id="U76-nv-p5D"/>
</connections>
</menuItem>
<menuItem title="Jump to Selection" keyEquivalent="j" id="S0p-oC-mLd">
<connections>
<action selector="centerSelectionInVisibleArea:" target="-1" id="IOG-6D-g5B"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Spelling and Grammar" id="Dv1-io-Yv7">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Spelling" id="3IN-sU-3Bg">
<items>
<menuItem title="Show Spelling and Grammar" keyEquivalent=":" id="HFo-cy-zxI">
<connections>
<action selector="showGuessPanel:" target="-1" id="vFj-Ks-hy3"/>
</connections>
</menuItem>
<menuItem title="Check Document Now" keyEquivalent=";" id="hz2-CU-CR7">
<connections>
<action selector="checkSpelling:" target="-1" id="fz7-VC-reM"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="bNw-od-mp5"/>
<menuItem title="Check Spelling While Typing" id="rbD-Rh-wIN">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleContinuousSpellChecking:" target="-1" id="7w6-Qz-0kB"/>
</connections>
</menuItem>
<menuItem title="Check Grammar With Spelling" id="mK6-2p-4JG">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleGrammarChecking:" target="-1" id="muD-Qn-j4w"/>
</connections>
</menuItem>
<menuItem title="Correct Spelling Automatically" id="78Y-hA-62v">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleAutomaticSpellingCorrection:" target="-1" id="2lM-Qi-WAP"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Substitutions" id="9ic-FL-obx">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Substitutions" id="FeM-D8-WVr">
<items>
<menuItem title="Show Substitutions" id="z6F-FW-3nz">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="orderFrontSubstitutionsPanel:" target="-1" id="oku-mr-iSq"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="gPx-C9-uUO"/>
<menuItem title="Smart Copy/Paste" id="9yt-4B-nSM">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleSmartInsertDelete:" target="-1" id="3IJ-Se-DZD"/>
</connections>
</menuItem>
<menuItem title="Smart Quotes" id="hQb-2v-fYv">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleAutomaticQuoteSubstitution:" target="-1" id="ptq-xd-QOA"/>
</connections>
</menuItem>
<menuItem title="Smart Dashes" id="rgM-f4-ycn">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleAutomaticDashSubstitution:" target="-1" id="oCt-pO-9gS"/>
</connections>
</menuItem>
<menuItem title="Smart Links" id="cwL-P1-jid">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleAutomaticLinkDetection:" target="-1" id="Gip-E3-Fov"/>
</connections>
</menuItem>
<menuItem title="Data Detectors" id="tRr-pd-1PS">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleAutomaticDataDetection:" target="-1" id="R1I-Nq-Kbl"/>
</connections>
</menuItem>
<menuItem title="Text Replacement" id="HFQ-gK-NFA">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleAutomaticTextReplacement:" target="-1" id="DvP-Fe-Py6"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Transformations" id="2oI-Rn-ZJC">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Transformations" id="c8a-y6-VQd">
<items>
<menuItem title="Make Upper Case" id="vmV-6d-7jI">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="uppercaseWord:" target="-1" id="sPh-Tk-edu"/>
</connections>
</menuItem>
<menuItem title="Make Lower Case" id="d9M-CD-aMd">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="lowercaseWord:" target="-1" id="iUZ-b5-hil"/>
</connections>
</menuItem>
<menuItem title="Capitalize" id="UEZ-Bs-lqG">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="capitalizeWord:" target="-1" id="26H-TL-nsh"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Speech" id="xrE-MZ-jX0">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Speech" id="3rS-ZA-NoH">
<items>
<menuItem title="Start Speaking" id="Ynk-f8-cLZ">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="startSpeaking:" target="-1" id="654-Ng-kyl"/>
</connections>
</menuItem>
<menuItem title="Stop Speaking" id="Oyz-dy-DGm">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="stopSpeaking:" target="-1" id="dX8-6p-jy9"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="View" id="H8h-7b-M4v">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="View" id="HyV-fh-RgO">
<items>
<menuItem title="Enter Full Screen" keyEquivalent="f" id="4J7-dP-txa">
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
<connections>
<action selector="toggleFullScreen:" target="-1" id="dU3-MA-1Rq"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Window" id="aUF-d1-5bR">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Window" systemMenu="window" id="Td7-aD-5lo">
<items>
<menuItem title="Minimize" keyEquivalent="m" id="OY7-WF-poV">
<connections>
<action selector="performMiniaturize:" target="-1" id="VwT-WD-YPe"/>
</connections>
</menuItem>
<menuItem title="Zoom" id="R4o-n2-Eq4">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="performZoom:" target="-1" id="DIl-cC-cCs"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="eu3-7i-yIM"/>
<menuItem title="Bring All to Front" id="LE2-aR-0XJ">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="arrangeInFront:" target="-1" id="DRN-fu-gQh"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Help" id="EPT-qC-fAb">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Help" systemMenu="help" id="rJ0-wn-3NY"/>
</menuItem>
</items>
<point key="canvasLocation" x="142" y="-258"/>
</menu>
<window title="APP_NAME" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="QvC-M9-y7g" customClass="MainFlutterWindow" customModule="Runner" customModuleProvider="target">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
<rect key="contentRect" x="335" y="390" width="800" height="600"/>
<rect key="screenRect" x="0.0" y="0.0" width="2560" height="1577"/>
<view key="contentView" wantsLayer="YES" id="EiT-Mj-1SZ">
<rect key="frame" x="0.0" y="0.0" width="800" height="600"/>
<autoresizingMask key="autoresizingMask"/>
</view>
</window>
</objects>
</document>
@@ -0,0 +1,14 @@
// Application-level settings for the Runner target.
//
// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the
// future. If not, the values below would default to using the project name when this becomes a
// 'flutter create' template.
// The application's name. By default this is also the title of the Flutter window.
PRODUCT_NAME = mam_desktop
// The application's bundle identifier
PRODUCT_BUNDLE_IDENTIFIER = com.mam.mamDesktop
// The copyright displayed in application information
PRODUCT_COPYRIGHT = Copyright © 2026 com.mam. All rights reserved.
@@ -0,0 +1,2 @@
#include "../../Flutter/Flutter-Debug.xcconfig"
#include "Warnings.xcconfig"
@@ -0,0 +1,2 @@
#include "../../Flutter/Flutter-Release.xcconfig"
#include "Warnings.xcconfig"
@@ -0,0 +1,13 @@
WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings
GCC_WARN_UNDECLARED_SELECTOR = YES
CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
CLANG_WARN_PRAGMA_PACK = YES
CLANG_WARN_STRICT_PROTOTYPES = YES
CLANG_WARN_COMMA = YES
GCC_WARN_STRICT_SELECTOR_MATCH = YES
CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES
GCC_WARN_SHADOW = YES
CLANG_WARN_UNREACHABLE_CODE = YES
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.network.server</key>
<true/>
</dict>
</plist>
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>NSHumanReadableCopyright</key>
<string>$(PRODUCT_COPYRIGHT)</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>
@@ -0,0 +1,15 @@
import Cocoa
import FlutterMacOS
class MainFlutterWindow: NSWindow {
override func awakeFromNib() {
let flutterViewController = FlutterViewController()
let windowFrame = self.frame
self.contentViewController = flutterViewController
self.setFrame(windowFrame, display: true)
RegisterGeneratedPlugins(registry: flutterViewController)
super.awakeFromNib()
}
}
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
</dict>
</plist>
@@ -0,0 +1,12 @@
import Cocoa
import FlutterMacOS
import XCTest
class RunnerTests: XCTestCase {
func testExample() {
// If you add code to the Runner application, consider adding tests here.
// See https://developer.apple.com/documentation/xctest for more information about using XCTest.
}
}
@@ -0,0 +1,403 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
args:
dependency: transitive
description:
name: args
sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04
url: "https://pub.dev"
source: hosted
version: "2.7.0"
async:
dependency: transitive
description:
name: async
sha256: e2eb0491ba5ddb6177742d2da23904574082139b07c1e33b8503b9f46f3e1a37
url: "https://pub.dev"
source: hosted
version: "2.13.1"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea"
url: "https://pub.dev"
source: hosted
version: "2.1.2"
characters:
dependency: transitive
description:
name: characters
sha256: faf38497bda5ead2a8c7615f4f7939df04333478bf32e4173fcb06d428b5716b
url: "https://pub.dev"
source: hosted
version: "1.4.1"
clock:
dependency: transitive
description:
name: clock
sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b
url: "https://pub.dev"
source: hosted
version: "1.1.2"
collection:
dependency: transitive
description:
name: collection
sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76"
url: "https://pub.dev"
source: hosted
version: "1.19.1"
convert:
dependency: transitive
description:
name: convert
sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68
url: "https://pub.dev"
source: hosted
version: "3.1.2"
crypto:
dependency: transitive
description:
name: crypto
sha256: c8ea0233063ba03258fbcf2ca4d6dadfefe14f02fab57702265467a19f27fadf
url: "https://pub.dev"
source: hosted
version: "3.0.7"
cupertino_icons:
dependency: "direct main"
description:
name: cupertino_icons
sha256: "41e005c33bd814be4d3096aff55b1908d419fde52ca656c8c47719ec745873cd"
url: "https://pub.dev"
source: hosted
version: "1.0.9"
data_table_2:
dependency: "direct main"
description:
name: data_table_2
sha256: cb31d465dcf1e1598a662d06d3d2c16c73700ae9e837a3d91588f1dda7519abc
url: "https://pub.dev"
source: hosted
version: "2.7.2"
equatable:
dependency: transitive
description:
name: equatable
sha256: "3bce007a596ff8b3119c45d68aaef631272537c03d30e5d4534dd24bf4c5eaa2"
url: "https://pub.dev"
source: hosted
version: "2.1.0"
fake_async:
dependency: transitive
description:
name: fake_async
sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44"
url: "https://pub.dev"
source: hosted
version: "1.3.3"
ffi:
dependency: transitive
description:
name: ffi
sha256: "6d7fd89431262d8f3125e81b50d3847a091d846eafcd4fdb88dd06f36d705a45"
url: "https://pub.dev"
source: hosted
version: "2.2.0"
flutter:
dependency: "direct main"
description: flutter
source: sdk
version: "0.0.0"
flutter_lints:
dependency: "direct dev"
description:
name: flutter_lints
sha256: "3105dc8492f6183fb076ccf1f351ac3d60564bff92e20bfc4af9cc1651f4e7e1"
url: "https://pub.dev"
source: hosted
version: "6.0.0"
flutter_markdown:
dependency: "direct main"
description:
name: flutter_markdown
sha256: "04c4722cc36ec5af38acc38ece70d22d3c2123c61305d555750a091517bbe504"
url: "https://pub.dev"
source: hosted
version: "0.6.23"
flutter_riverpod:
dependency: "direct main"
description:
name: flutter_riverpod
sha256: "9532ee6db4a943a1ed8383072a2e3eeda041db5657cdf6d2acecf3c21ecbe7e1"
url: "https://pub.dev"
source: hosted
version: "2.6.1"
flutter_test:
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
http:
dependency: transitive
description:
name: http
sha256: "87721a4a50b19c7f1d49001e51409bddc46303966ce89a65af4f4e6004896412"
url: "https://pub.dev"
source: hosted
version: "1.6.0"
http_parser:
dependency: transitive
description:
name: http_parser
sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571"
url: "https://pub.dev"
source: hosted
version: "4.1.2"
leak_tracker:
dependency: transitive
description:
name: leak_tracker
sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de"
url: "https://pub.dev"
source: hosted
version: "11.0.2"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1"
url: "https://pub.dev"
source: hosted
version: "3.0.10"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1"
url: "https://pub.dev"
source: hosted
version: "3.0.2"
lints:
dependency: transitive
description:
name: lints
sha256: "12f842a479589fea194fe5c5a3095abc7be0c1f2ddfa9a0e76aed1dbd26a87df"
url: "https://pub.dev"
source: hosted
version: "6.1.0"
mam_core:
dependency: "direct main"
description:
path: "../../packages/mam_core"
relative: true
source: path
version: "1.0.0"
mam_pty:
dependency: "direct main"
description:
path: "../../packages/mam_pty"
relative: true
source: path
version: "1.0.0"
markdown:
dependency: transitive
description:
name: markdown
sha256: ee85086ad7698b42522c6ad42fe195f1b9898e4d974a1af4576c1a3a176cada9
url: "https://pub.dev"
source: hosted
version: "7.3.1"
matcher:
dependency: transitive
description:
name: matcher
sha256: dc0b7dc7651697ea4ff3e69ef44b0407ea32c487a39fff6a4004fa585e901861
url: "https://pub.dev"
source: hosted
version: "0.12.19"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
sha256: "9c337007e82b1889149c82ed242ed1cb24a66044e30979c44912381e9be4c48b"
url: "https://pub.dev"
source: hosted
version: "0.13.0"
meta:
dependency: "direct main"
description:
name: meta
sha256: "1741988757a65eb6b36abe716829688cf01910bbf91c34354ff7ec1c3de2b349"
url: "https://pub.dev"
source: hosted
version: "1.18.0"
path:
dependency: transitive
description:
name: path
sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5"
url: "https://pub.dev"
source: hosted
version: "1.9.1"
quiver:
dependency: transitive
description:
name: quiver
sha256: ea0b925899e64ecdfbf9c7becb60d5b50e706ade44a85b2363be2a22d88117d2
url: "https://pub.dev"
source: hosted
version: "3.2.2"
riverpod:
dependency: transitive
description:
name: riverpod
sha256: "59062512288d3056b2321804332a13ffdd1bf16df70dcc8e506e411280a72959"
url: "https://pub.dev"
source: hosted
version: "2.6.1"
shelf:
dependency: transitive
description:
name: shelf
sha256: e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12
url: "https://pub.dev"
source: hosted
version: "1.4.2"
shelf_web_socket:
dependency: transitive
description:
name: shelf_web_socket
sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1"
url: "https://pub.dev"
source: hosted
version: "1.0.4"
sky_engine:
dependency: transitive
description: flutter
source: sdk
version: "0.0.0"
source_span:
dependency: transitive
description:
name: source_span
sha256: "56a02f1f4cd1a2d96303c0144c93bd6d909eea6bee6bf5a0e0b685edbd4c47ab"
url: "https://pub.dev"
source: hosted
version: "1.10.2"
stack_trace:
dependency: transitive
description:
name: stack_trace
sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1"
url: "https://pub.dev"
source: hosted
version: "1.12.1"
state_notifier:
dependency: transitive
description:
name: state_notifier
sha256: b8677376aa54f2d7c58280d5a007f9e8774f1968d1fb1c096adcb4792fba29bb
url: "https://pub.dev"
source: hosted
version: "1.0.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d"
url: "https://pub.dev"
source: hosted
version: "2.1.4"
string_scanner:
dependency: transitive
description:
name: string_scanner
sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43"
url: "https://pub.dev"
source: hosted
version: "1.4.1"
term_glyph:
dependency: transitive
description:
name: term_glyph
sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e"
url: "https://pub.dev"
source: hosted
version: "1.2.2"
test_api:
dependency: transitive
description:
name: test_api
sha256: "949a932224383300f01be9221c39180316445ecb8e7547f70a41a35bf421fb9e"
url: "https://pub.dev"
source: hosted
version: "0.7.11"
typed_data:
dependency: transitive
description:
name: typed_data
sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006
url: "https://pub.dev"
source: hosted
version: "1.4.0"
vector_math:
dependency: transitive
description:
name: vector_math
sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b
url: "https://pub.dev"
source: hosted
version: "2.2.0"
vm_service:
dependency: transitive
description:
name: vm_service
sha256: "0016aef94fc66495ac78af5859181e3f3bf2026bd8eecc72b9565601e19ab360"
url: "https://pub.dev"
source: hosted
version: "15.2.0"
web:
dependency: transitive
description:
name: web
sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a"
url: "https://pub.dev"
source: hosted
version: "1.1.1"
web_socket_channel:
dependency: transitive
description:
name: web_socket_channel
sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b
url: "https://pub.dev"
source: hosted
version: "2.4.0"
xterm:
dependency: "direct main"
description:
name: xterm
sha256: "168dfedca77cba33fdb6f52e2cd001e9fde216e398e89335c19b524bb22da3a2"
url: "https://pub.dev"
source: hosted
version: "4.0.0"
yaml:
dependency: transitive
description:
name: yaml
sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce
url: "https://pub.dev"
source: hosted
version: "3.1.3"
zmodem:
dependency: transitive
description:
name: zmodem
sha256: "3b7e5b29f3a7d8aee472029b05165a68438eff2f3f7766edf13daba1e297adbf"
url: "https://pub.dev"
source: hosted
version: "0.0.6"
sdks:
dart: ">=3.12.1 <4.0.0"
flutter: ">=3.27.0"
@@ -0,0 +1,95 @@
name: mam_desktop
description: "A new Flutter project."
# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.0.0+1
environment:
sdk: ^3.12.1
# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
# consider running `flutter pub upgrade --major-versions`. Alternatively,
# dependencies can be manually updated by changing the version numbers below to
# the latest version available on pub.dev. To see which dependencies have newer
# versions available, run `flutter pub outdated`.
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.8
mam_core:
path: ../../packages/mam_core
mam_pty:
path: ../../packages/mam_pty
flutter_riverpod: ^2.4.9
data_table_2: ^2.5.8
xterm: ^4.0.0
flutter_markdown: ^0.6.18
meta: ^1.9.0
dev_dependencies:
flutter_test:
sdk: flutter
# The "flutter_lints" package below contains a set of recommended lints to
# encourage good coding practices. The lint set provided by the package is
# activated in the `analysis_options.yaml` file located at the root of your
# package. See that file for information about deactivating specific lint
# rules and activating additional ones.
flutter_lints: ^6.0.0
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
# The following section is specific to Flutter packages.
flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true
# To add assets to your application, add an assets section, like this:
# assets:
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/to/resolution-aware-images
# For details regarding adding assets from package dependencies, see
# https://flutter.dev/to/asset-from-package
# To add custom fonts to your application, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts from package dependencies,
# see https://flutter.dev/to/font-from-package
@@ -0,0 +1,74 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:mam_core/mam_core.dart';
import 'package:mam_desktop/src/providers/session_providers.dart';
import 'package:mam_desktop/src/theme/app_theme.dart';
import 'package:mam_desktop/src/widgets/detail_pane.dart';
import 'package:mam_desktop/src/widgets/session_table.dart';
void main() {
testWidgets('SessionTable renders rows and drives selection', (tester) async {
final rows = [
SessionRow(
name: 'demo-session',
server: 'default',
status: 'running',
tmuxAlive: true,
pane: const Pane(
pid: 123,
cwd: '/x',
cmd: 'claude',
cmdFull: 'claude --foo',
),
role: 'creator',
resumeState: 'yes',
jobId: '-',
jobStatus: '-',
attachCommand: 'tmux attach -t demo-session',
driftClasses: const ['B'],
),
];
String? selected;
await tester.pumpWidget(
MaterialApp(
theme: buildAppTheme(),
home: Scaffold(
body: SessionTable(
sessions: rows,
selectedName: null,
onSelect: (name) => selected = name,
),
),
),
);
expect(find.text('demo-session'), findsOneWidget);
expect(find.text('running'), findsOneWidget);
await tester.tap(find.text('demo-session'));
await tester.pump();
expect(selected, 'demo-session');
});
testWidgets('DetailPane shows placeholder when nothing selected', (
tester,
) async {
await tester.pumpWidget(
MaterialApp(
theme: buildAppTheme(),
home: const Scaffold(body: DetailPane(session: null)),
),
);
expect(find.text('Select a session to see details'), findsOneWidget);
});
test('selectedSessionNameProvider defaults to null', () {
final container = ProviderContainer();
addTearDown(container.dispose);
expect(container.read(selectedSessionNameProvider), isNull);
});
}
@@ -0,0 +1,17 @@
flutter/ephemeral/
# Visual Studio user-specific files.
*.suo
*.user
*.userosscache
*.sln.docstates
# Visual Studio build-related files.
x64/
x86/
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
@@ -0,0 +1,108 @@
# Project-level configuration.
cmake_minimum_required(VERSION 3.14)
project(mam_desktop LANGUAGES CXX)
# The name of the executable created for the application. Change this to change
# the on-disk name of your application.
set(BINARY_NAME "mam_desktop")
# Explicitly opt in to modern CMake behaviors to avoid warnings with recent
# versions of CMake.
cmake_policy(VERSION 3.14...3.25)
# Define build configuration option.
get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(IS_MULTICONFIG)
set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release"
CACHE STRING "" FORCE)
else()
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
set(CMAKE_BUILD_TYPE "Debug" CACHE
STRING "Flutter build mode" FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
"Debug" "Profile" "Release")
endif()
endif()
# Define settings for the Profile build mode.
set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}")
set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}")
set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}")
set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}")
# Use Unicode for all projects.
add_definitions(-DUNICODE -D_UNICODE)
# Compilation settings that should be applied to most targets.
#
# Be cautious about adding new options here, as plugins use this function by
# default. In most cases, you should add new options to specific targets instead
# of modifying this function.
function(APPLY_STANDARD_SETTINGS TARGET)
target_compile_features(${TARGET} PUBLIC cxx_std_17)
target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100")
target_compile_options(${TARGET} PRIVATE /EHsc)
target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0")
target_compile_definitions(${TARGET} PRIVATE "$<$<CONFIG:Debug>:_DEBUG>")
endfunction()
# Flutter library and tool build rules.
set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter")
add_subdirectory(${FLUTTER_MANAGED_DIR})
# Application build; see runner/CMakeLists.txt.
add_subdirectory("runner")
# Generated plugin build rules, which manage building the plugins and adding
# them to the application.
include(flutter/generated_plugins.cmake)
# === Installation ===
# Support files are copied into place next to the executable, so that it can
# run in place. This is done instead of making a separate bundle (as on Linux)
# so that building and running from within Visual Studio will work.
set(BUILD_BUNDLE_DIR "$<TARGET_FILE_DIR:${BINARY_NAME}>")
# Make the "install" step default, as it's required to run.
set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1)
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE)
endif()
set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data")
set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}")
install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
COMPONENT Runtime)
install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
COMPONENT Runtime)
install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
COMPONENT Runtime)
if(PLUGIN_BUNDLED_LIBRARIES)
install(FILES "${PLUGIN_BUNDLED_LIBRARIES}"
DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
COMPONENT Runtime)
endif()
# Copy the native assets provided by the build.dart from all packages.
set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/windows/")
install(DIRECTORY "${NATIVE_ASSETS_DIR}"
DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
COMPONENT Runtime)
# Fully re-copy the assets directory on each build to avoid having stale files
# from a previous install.
set(FLUTTER_ASSET_DIR_NAME "flutter_assets")
install(CODE "
file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\")
" COMPONENT Runtime)
install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}"
DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime)
# Install the AOT library on non-Debug builds only.
install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
CONFIGURATIONS Profile;Release
COMPONENT Runtime)
@@ -0,0 +1,109 @@
# This file controls Flutter-level build steps. It should not be edited.
cmake_minimum_required(VERSION 3.14)
set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral")
# Configuration provided via flutter tool.
include(${EPHEMERAL_DIR}/generated_config.cmake)
# TODO: Move the rest of this into files in ephemeral. See
# https://github.com/flutter/flutter/issues/57146.
set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper")
# Set fallback configurations for older versions of the flutter tool.
if (NOT DEFINED FLUTTER_TARGET_PLATFORM)
set(FLUTTER_TARGET_PLATFORM "windows-x64")
endif()
# === Flutter Library ===
set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll")
# Published to parent scope for install step.
set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)
set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE)
set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE)
set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE)
list(APPEND FLUTTER_LIBRARY_HEADERS
"flutter_export.h"
"flutter_windows.h"
"flutter_messenger.h"
"flutter_plugin_registrar.h"
"flutter_texture_registrar.h"
)
list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/")
add_library(flutter INTERFACE)
target_include_directories(flutter INTERFACE
"${EPHEMERAL_DIR}"
)
target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib")
add_dependencies(flutter flutter_assemble)
# === Wrapper ===
list(APPEND CPP_WRAPPER_SOURCES_CORE
"core_implementations.cc"
"standard_codec.cc"
)
list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/")
list(APPEND CPP_WRAPPER_SOURCES_PLUGIN
"plugin_registrar.cc"
)
list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/")
list(APPEND CPP_WRAPPER_SOURCES_APP
"flutter_engine.cc"
"flutter_view_controller.cc"
)
list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/")
# Wrapper sources needed for a plugin.
add_library(flutter_wrapper_plugin STATIC
${CPP_WRAPPER_SOURCES_CORE}
${CPP_WRAPPER_SOURCES_PLUGIN}
)
apply_standard_settings(flutter_wrapper_plugin)
set_target_properties(flutter_wrapper_plugin PROPERTIES
POSITION_INDEPENDENT_CODE ON)
set_target_properties(flutter_wrapper_plugin PROPERTIES
CXX_VISIBILITY_PRESET hidden)
target_link_libraries(flutter_wrapper_plugin PUBLIC flutter)
target_include_directories(flutter_wrapper_plugin PUBLIC
"${WRAPPER_ROOT}/include"
)
add_dependencies(flutter_wrapper_plugin flutter_assemble)
# Wrapper sources needed for the runner.
add_library(flutter_wrapper_app STATIC
${CPP_WRAPPER_SOURCES_CORE}
${CPP_WRAPPER_SOURCES_APP}
)
apply_standard_settings(flutter_wrapper_app)
target_link_libraries(flutter_wrapper_app PUBLIC flutter)
target_include_directories(flutter_wrapper_app PUBLIC
"${WRAPPER_ROOT}/include"
)
add_dependencies(flutter_wrapper_app flutter_assemble)
# === Flutter tool backend ===
# _phony_ is a non-existent file to force this command to run every time,
# since currently there's no way to get a full input/output list from the
# flutter tool.
set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_")
set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE)
add_custom_command(
OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}
${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN}
${CPP_WRAPPER_SOURCES_APP}
${PHONY_OUTPUT}
COMMAND ${CMAKE_COMMAND} -E env
${FLUTTER_TOOL_ENVIRONMENT}
"${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat"
${FLUTTER_TARGET_PLATFORM} $<CONFIG>
VERBATIM
)
add_custom_target(flutter_assemble DEPENDS
"${FLUTTER_LIBRARY}"
${FLUTTER_LIBRARY_HEADERS}
${CPP_WRAPPER_SOURCES_CORE}
${CPP_WRAPPER_SOURCES_PLUGIN}
${CPP_WRAPPER_SOURCES_APP}
)
@@ -0,0 +1,11 @@
//
// Generated file. Do not edit.
//
// clang-format off
#include "generated_plugin_registrant.h"
void RegisterPlugins(flutter::PluginRegistry* registry) {
}
@@ -0,0 +1,15 @@
//
// Generated file. Do not edit.
//
// clang-format off
#ifndef GENERATED_PLUGIN_REGISTRANT_
#define GENERATED_PLUGIN_REGISTRANT_
#include <flutter/plugin_registry.h>
// Registers Flutter plugins.
void RegisterPlugins(flutter::PluginRegistry* registry);
#endif // GENERATED_PLUGIN_REGISTRANT_
@@ -0,0 +1,23 @@
#
# Generated file, do not edit.
#
list(APPEND FLUTTER_PLUGIN_LIST
)
list(APPEND FLUTTER_FFI_PLUGIN_LIST
)
set(PLUGIN_BUNDLED_LIBRARIES)
foreach(plugin ${FLUTTER_PLUGIN_LIST})
add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin})
target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)
list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>)
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
endforeach(plugin)
foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin})
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
endforeach(ffi_plugin)
@@ -0,0 +1,40 @@
cmake_minimum_required(VERSION 3.14)
project(runner LANGUAGES CXX)
# Define the application target. To change its name, change BINARY_NAME in the
# top-level CMakeLists.txt, not the value here, or `flutter run` will no longer
# work.
#
# Any new source files that you add to the application should be added here.
add_executable(${BINARY_NAME} WIN32
"flutter_window.cpp"
"main.cpp"
"utils.cpp"
"win32_window.cpp"
"${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
"Runner.rc"
"runner.exe.manifest"
)
# Apply the standard set of build settings. This can be removed for applications
# that need different build settings.
apply_standard_settings(${BINARY_NAME})
# Add preprocessor definitions for the build version.
target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"")
target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}")
target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}")
target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}")
target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}")
# Disable Windows macros that collide with C++ standard library functions.
target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX")
# Add dependency libraries and include directories. Add any application-specific
# dependencies here.
target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app)
target_link_libraries(${BINARY_NAME} PRIVATE "dwmapi.lib")
target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}")
# Run the Flutter tool portions of the build. This must not be removed.
add_dependencies(${BINARY_NAME} flutter_assemble)
@@ -0,0 +1,121 @@
// Microsoft Visual C++ generated resource script.
//
#pragma code_page(65001)
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "winres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (United States) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""winres.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_APP_ICON ICON "resources\\app_icon.ico"
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
#if defined(FLUTTER_VERSION_MAJOR) && defined(FLUTTER_VERSION_MINOR) && defined(FLUTTER_VERSION_PATCH) && defined(FLUTTER_VERSION_BUILD)
#define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD
#else
#define VERSION_AS_NUMBER 1,0,0,0
#endif
#if defined(FLUTTER_VERSION)
#define VERSION_AS_STRING FLUTTER_VERSION
#else
#define VERSION_AS_STRING "1.0.0"
#endif
VS_VERSION_INFO VERSIONINFO
FILEVERSION VERSION_AS_NUMBER
PRODUCTVERSION VERSION_AS_NUMBER
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
#else
FILEFLAGS 0x0L
#endif
FILEOS VOS__WINDOWS32
FILETYPE VFT_APP
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904e4"
BEGIN
VALUE "CompanyName", "com.mam" "\0"
VALUE "FileDescription", "mam_desktop" "\0"
VALUE "FileVersion", VERSION_AS_STRING "\0"
VALUE "InternalName", "mam_desktop" "\0"
VALUE "LegalCopyright", "Copyright (C) 2026 com.mam. All rights reserved." "\0"
VALUE "OriginalFilename", "mam_desktop.exe" "\0"
VALUE "ProductName", "mam_desktop" "\0"
VALUE "ProductVersion", VERSION_AS_STRING "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1252
END
END
#endif // English (United States) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
@@ -0,0 +1,71 @@
#include "flutter_window.h"
#include <optional>
#include "flutter/generated_plugin_registrant.h"
FlutterWindow::FlutterWindow(const flutter::DartProject& project)
: project_(project) {}
FlutterWindow::~FlutterWindow() {}
bool FlutterWindow::OnCreate() {
if (!Win32Window::OnCreate()) {
return false;
}
RECT frame = GetClientArea();
// The size here must match the window dimensions to avoid unnecessary surface
// creation / destruction in the startup path.
flutter_controller_ = std::make_unique<flutter::FlutterViewController>(
frame.right - frame.left, frame.bottom - frame.top, project_);
// Ensure that basic setup of the controller was successful.
if (!flutter_controller_->engine() || !flutter_controller_->view()) {
return false;
}
RegisterPlugins(flutter_controller_->engine());
SetChildContent(flutter_controller_->view()->GetNativeWindow());
flutter_controller_->engine()->SetNextFrameCallback([&]() {
this->Show();
});
// Flutter can complete the first frame before the "show window" callback is
// registered. The following call ensures a frame is pending to ensure the
// window is shown. It is a no-op if the first frame hasn't completed yet.
flutter_controller_->ForceRedraw();
return true;
}
void FlutterWindow::OnDestroy() {
if (flutter_controller_) {
flutter_controller_ = nullptr;
}
Win32Window::OnDestroy();
}
LRESULT
FlutterWindow::MessageHandler(HWND hwnd, UINT const message,
WPARAM const wparam,
LPARAM const lparam) noexcept {
// Give Flutter, including plugins, an opportunity to handle window messages.
if (flutter_controller_) {
std::optional<LRESULT> result =
flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam,
lparam);
if (result) {
return *result;
}
}
switch (message) {
case WM_FONTCHANGE:
flutter_controller_->engine()->ReloadSystemFonts();
break;
}
return Win32Window::MessageHandler(hwnd, message, wparam, lparam);
}
@@ -0,0 +1,33 @@
#ifndef RUNNER_FLUTTER_WINDOW_H_
#define RUNNER_FLUTTER_WINDOW_H_
#include <flutter/dart_project.h>
#include <flutter/flutter_view_controller.h>
#include <memory>
#include "win32_window.h"
// A window that does nothing but host a Flutter view.
class FlutterWindow : public Win32Window {
public:
// Creates a new FlutterWindow hosting a Flutter view running |project|.
explicit FlutterWindow(const flutter::DartProject& project);
virtual ~FlutterWindow();
protected:
// Win32Window:
bool OnCreate() override;
void OnDestroy() override;
LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam,
LPARAM const lparam) noexcept override;
private:
// The project to run.
flutter::DartProject project_;
// The Flutter instance hosted by this window.
std::unique_ptr<flutter::FlutterViewController> flutter_controller_;
};
#endif // RUNNER_FLUTTER_WINDOW_H_
@@ -0,0 +1,43 @@
#include <flutter/dart_project.h>
#include <flutter/flutter_view_controller.h>
#include <windows.h>
#include "flutter_window.h"
#include "utils.h"
int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
_In_ wchar_t *command_line, _In_ int show_command) {
// Attach to console when present (e.g., 'flutter run') or create a
// new console when running with a debugger.
if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) {
CreateAndAttachConsole();
}
// Initialize COM, so that it is available for use in the library and/or
// plugins.
::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);
flutter::DartProject project(L"data");
std::vector<std::string> command_line_arguments =
GetCommandLineArguments();
project.set_dart_entrypoint_arguments(std::move(command_line_arguments));
FlutterWindow window(project);
Win32Window::Point origin(10, 10);
Win32Window::Size size(1280, 720);
if (!window.Create(L"mam_desktop", origin, size)) {
return EXIT_FAILURE;
}
window.SetQuitOnClose(true);
::MSG msg;
while (::GetMessage(&msg, nullptr, 0, 0)) {
::TranslateMessage(&msg);
::DispatchMessage(&msg);
}
::CoUninitialize();
return EXIT_SUCCESS;
}
@@ -0,0 +1,16 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by Runner.rc
//
#define IDI_APP_ICON 101
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 102
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness>
</windowsSettings>
</application>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- Windows 10 and Windows 11 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
</application>
</compatibility>
</assembly>
@@ -0,0 +1,69 @@
#include "utils.h"
#include <flutter_windows.h>
#include <io.h>
#include <stdio.h>
#include <windows.h>
#include <iostream>
void CreateAndAttachConsole() {
if (::AllocConsole()) {
FILE *unused;
if (freopen_s(&unused, "CONOUT$", "w", stdout)) {
_dup2(_fileno(stdout), 1);
}
if (freopen_s(&unused, "CONOUT$", "w", stderr)) {
_dup2(_fileno(stdout), 2);
}
std::ios::sync_with_stdio();
FlutterDesktopResyncOutputStreams();
}
}
std::vector<std::string> GetCommandLineArguments() {
// Convert the UTF-16 command line arguments to UTF-8 for the Engine to use.
int argc;
wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc);
if (argv == nullptr) {
return std::vector<std::string>();
}
std::vector<std::string> command_line_arguments;
// Skip the first argument as it's the binary name.
for (int i = 1; i < argc; i++) {
command_line_arguments.push_back(Utf8FromUtf16(argv[i]));
}
::LocalFree(argv);
return command_line_arguments;
}
std::string Utf8FromUtf16(const wchar_t* utf16_string) {
if (utf16_string == nullptr) {
return std::string();
}
// First, find the length of the string with a safe upper bound (CWE-126).
// UNICODE_STRING_MAX_CHARS (32767) is the maximum length of a UNICODE_STRING.
int input_length = static_cast<int>(wcsnlen(utf16_string, UNICODE_STRING_MAX_CHARS));
// Now use that bounded length to determine the required buffer size.
// When an explicit length is passed, WideCharToMultiByte does not include
// the null terminator in its returned size.
int target_length = ::WideCharToMultiByte(
CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,
input_length, nullptr, 0, nullptr, nullptr);
std::string utf8_string;
if (target_length == 0 || static_cast<size_t>(target_length) > utf8_string.max_size()) {
return utf8_string;
}
utf8_string.resize(target_length);
int converted_length = ::WideCharToMultiByte(
CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,
input_length, utf8_string.data(), target_length, nullptr, nullptr);
if (converted_length == 0) {
return std::string();
}
return utf8_string;
}
@@ -0,0 +1,19 @@
#ifndef RUNNER_UTILS_H_
#define RUNNER_UTILS_H_
#include <string>
#include <vector>
// Creates a console for the process, and redirects stdout and stderr to
// it for both the runner and the Flutter library.
void CreateAndAttachConsole();
// Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string
// encoded in UTF-8. Returns an empty std::string on failure.
std::string Utf8FromUtf16(const wchar_t* utf16_string);
// Gets the command line arguments passed in as a std::vector<std::string>,
// encoded in UTF-8. Returns an empty std::vector<std::string> on failure.
std::vector<std::string> GetCommandLineArguments();
#endif // RUNNER_UTILS_H_
@@ -0,0 +1,288 @@
#include "win32_window.h"
#include <dwmapi.h>
#include <flutter_windows.h>
#include "resource.h"
namespace {
/// Window attribute that enables dark mode window decorations.
///
/// Redefined in case the developer's machine has a Windows SDK older than
/// version 10.0.22000.0.
/// See: https://docs.microsoft.com/windows/win32/api/dwmapi/ne-dwmapi-dwmwindowattribute
#ifndef DWMWA_USE_IMMERSIVE_DARK_MODE
#define DWMWA_USE_IMMERSIVE_DARK_MODE 20
#endif
constexpr const wchar_t kWindowClassName[] = L"FLUTTER_RUNNER_WIN32_WINDOW";
/// Registry key for app theme preference.
///
/// A value of 0 indicates apps should use dark mode. A non-zero or missing
/// value indicates apps should use light mode.
constexpr const wchar_t kGetPreferredBrightnessRegKey[] =
L"Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize";
constexpr const wchar_t kGetPreferredBrightnessRegValue[] = L"AppsUseLightTheme";
// The number of Win32Window objects that currently exist.
static int g_active_window_count = 0;
using EnableNonClientDpiScaling = BOOL __stdcall(HWND hwnd);
// Scale helper to convert logical scaler values to physical using passed in
// scale factor
int Scale(int source, double scale_factor) {
return static_cast<int>(source * scale_factor);
}
// Dynamically loads the |EnableNonClientDpiScaling| from the User32 module.
// This API is only needed for PerMonitor V1 awareness mode.
void EnableFullDpiSupportIfAvailable(HWND hwnd) {
HMODULE user32_module = LoadLibraryA("User32.dll");
if (!user32_module) {
return;
}
auto enable_non_client_dpi_scaling =
reinterpret_cast<EnableNonClientDpiScaling*>(
GetProcAddress(user32_module, "EnableNonClientDpiScaling"));
if (enable_non_client_dpi_scaling != nullptr) {
enable_non_client_dpi_scaling(hwnd);
}
FreeLibrary(user32_module);
}
} // namespace
// Manages the Win32Window's window class registration.
class WindowClassRegistrar {
public:
~WindowClassRegistrar() = default;
// Returns the singleton registrar instance.
static WindowClassRegistrar* GetInstance() {
if (!instance_) {
instance_ = new WindowClassRegistrar();
}
return instance_;
}
// Returns the name of the window class, registering the class if it hasn't
// previously been registered.
const wchar_t* GetWindowClass();
// Unregisters the window class. Should only be called if there are no
// instances of the window.
void UnregisterWindowClass();
private:
WindowClassRegistrar() = default;
static WindowClassRegistrar* instance_;
bool class_registered_ = false;
};
WindowClassRegistrar* WindowClassRegistrar::instance_ = nullptr;
const wchar_t* WindowClassRegistrar::GetWindowClass() {
if (!class_registered_) {
WNDCLASS window_class{};
window_class.hCursor = LoadCursor(nullptr, IDC_ARROW);
window_class.lpszClassName = kWindowClassName;
window_class.style = CS_HREDRAW | CS_VREDRAW;
window_class.cbClsExtra = 0;
window_class.cbWndExtra = 0;
window_class.hInstance = GetModuleHandle(nullptr);
window_class.hIcon =
LoadIcon(window_class.hInstance, MAKEINTRESOURCE(IDI_APP_ICON));
window_class.hbrBackground = 0;
window_class.lpszMenuName = nullptr;
window_class.lpfnWndProc = Win32Window::WndProc;
RegisterClass(&window_class);
class_registered_ = true;
}
return kWindowClassName;
}
void WindowClassRegistrar::UnregisterWindowClass() {
UnregisterClass(kWindowClassName, nullptr);
class_registered_ = false;
}
Win32Window::Win32Window() {
++g_active_window_count;
}
Win32Window::~Win32Window() {
--g_active_window_count;
Destroy();
}
bool Win32Window::Create(const std::wstring& title,
const Point& origin,
const Size& size) {
Destroy();
const wchar_t* window_class =
WindowClassRegistrar::GetInstance()->GetWindowClass();
const POINT target_point = {static_cast<LONG>(origin.x),
static_cast<LONG>(origin.y)};
HMONITOR monitor = MonitorFromPoint(target_point, MONITOR_DEFAULTTONEAREST);
UINT dpi = FlutterDesktopGetDpiForMonitor(monitor);
double scale_factor = dpi / 96.0;
HWND window = CreateWindow(
window_class, title.c_str(), WS_OVERLAPPEDWINDOW,
Scale(origin.x, scale_factor), Scale(origin.y, scale_factor),
Scale(size.width, scale_factor), Scale(size.height, scale_factor),
nullptr, nullptr, GetModuleHandle(nullptr), this);
if (!window) {
return false;
}
UpdateTheme(window);
return OnCreate();
}
bool Win32Window::Show() {
return ShowWindow(window_handle_, SW_SHOWNORMAL);
}
// static
LRESULT CALLBACK Win32Window::WndProc(HWND const window,
UINT const message,
WPARAM const wparam,
LPARAM const lparam) noexcept {
if (message == WM_NCCREATE) {
auto window_struct = reinterpret_cast<CREATESTRUCT*>(lparam);
SetWindowLongPtr(window, GWLP_USERDATA,
reinterpret_cast<LONG_PTR>(window_struct->lpCreateParams));
auto that = static_cast<Win32Window*>(window_struct->lpCreateParams);
EnableFullDpiSupportIfAvailable(window);
that->window_handle_ = window;
} else if (Win32Window* that = GetThisFromHandle(window)) {
return that->MessageHandler(window, message, wparam, lparam);
}
return DefWindowProc(window, message, wparam, lparam);
}
LRESULT
Win32Window::MessageHandler(HWND hwnd,
UINT const message,
WPARAM const wparam,
LPARAM const lparam) noexcept {
switch (message) {
case WM_DESTROY:
window_handle_ = nullptr;
Destroy();
if (quit_on_close_) {
PostQuitMessage(0);
}
return 0;
case WM_DPICHANGED: {
auto newRectSize = reinterpret_cast<RECT*>(lparam);
LONG newWidth = newRectSize->right - newRectSize->left;
LONG newHeight = newRectSize->bottom - newRectSize->top;
SetWindowPos(hwnd, nullptr, newRectSize->left, newRectSize->top, newWidth,
newHeight, SWP_NOZORDER | SWP_NOACTIVATE);
return 0;
}
case WM_SIZE: {
RECT rect = GetClientArea();
if (child_content_ != nullptr) {
// Size and position the child window.
MoveWindow(child_content_, rect.left, rect.top, rect.right - rect.left,
rect.bottom - rect.top, TRUE);
}
return 0;
}
case WM_ACTIVATE:
if (child_content_ != nullptr) {
SetFocus(child_content_);
}
return 0;
case WM_DWMCOLORIZATIONCOLORCHANGED:
UpdateTheme(hwnd);
return 0;
}
return DefWindowProc(window_handle_, message, wparam, lparam);
}
void Win32Window::Destroy() {
OnDestroy();
if (window_handle_) {
DestroyWindow(window_handle_);
window_handle_ = nullptr;
}
if (g_active_window_count == 0) {
WindowClassRegistrar::GetInstance()->UnregisterWindowClass();
}
}
Win32Window* Win32Window::GetThisFromHandle(HWND const window) noexcept {
return reinterpret_cast<Win32Window*>(
GetWindowLongPtr(window, GWLP_USERDATA));
}
void Win32Window::SetChildContent(HWND content) {
child_content_ = content;
SetParent(content, window_handle_);
RECT frame = GetClientArea();
MoveWindow(content, frame.left, frame.top, frame.right - frame.left,
frame.bottom - frame.top, true);
SetFocus(child_content_);
}
RECT Win32Window::GetClientArea() {
RECT frame;
GetClientRect(window_handle_, &frame);
return frame;
}
HWND Win32Window::GetHandle() {
return window_handle_;
}
void Win32Window::SetQuitOnClose(bool quit_on_close) {
quit_on_close_ = quit_on_close;
}
bool Win32Window::OnCreate() {
// No-op; provided for subclasses.
return true;
}
void Win32Window::OnDestroy() {
// No-op; provided for subclasses.
}
void Win32Window::UpdateTheme(HWND const window) {
DWORD light_mode;
DWORD light_mode_size = sizeof(light_mode);
LSTATUS result = RegGetValue(HKEY_CURRENT_USER, kGetPreferredBrightnessRegKey,
kGetPreferredBrightnessRegValue,
RRF_RT_REG_DWORD, nullptr, &light_mode,
&light_mode_size);
if (result == ERROR_SUCCESS) {
BOOL enable_dark_mode = light_mode == 0;
DwmSetWindowAttribute(window, DWMWA_USE_IMMERSIVE_DARK_MODE,
&enable_dark_mode, sizeof(enable_dark_mode));
}
}
@@ -0,0 +1,102 @@
#ifndef RUNNER_WIN32_WINDOW_H_
#define RUNNER_WIN32_WINDOW_H_
#include <windows.h>
#include <functional>
#include <memory>
#include <string>
// A class abstraction for a high DPI-aware Win32 Window. Intended to be
// inherited from by classes that wish to specialize with custom
// rendering and input handling
class Win32Window {
public:
struct Point {
unsigned int x;
unsigned int y;
Point(unsigned int x, unsigned int y) : x(x), y(y) {}
};
struct Size {
unsigned int width;
unsigned int height;
Size(unsigned int width, unsigned int height)
: width(width), height(height) {}
};
Win32Window();
virtual ~Win32Window();
// Creates a win32 window with |title| that is positioned and sized using
// |origin| and |size|. New windows are created on the default monitor. Window
// sizes are specified to the OS in physical pixels, hence to ensure a
// consistent size this function will scale the inputted width and height as
// as appropriate for the default monitor. The window is invisible until
// |Show| is called. Returns true if the window was created successfully.
bool Create(const std::wstring& title, const Point& origin, const Size& size);
// Show the current window. Returns true if the window was successfully shown.
bool Show();
// Release OS resources associated with window.
void Destroy();
// Inserts |content| into the window tree.
void SetChildContent(HWND content);
// Returns the backing Window handle to enable clients to set icon and other
// window properties. Returns nullptr if the window has been destroyed.
HWND GetHandle();
// If true, closing this window will quit the application.
void SetQuitOnClose(bool quit_on_close);
// Return a RECT representing the bounds of the current client area.
RECT GetClientArea();
protected:
// Processes and route salient window messages for mouse handling,
// size change and DPI. Delegates handling of these to member overloads that
// inheriting classes can handle.
virtual LRESULT MessageHandler(HWND window,
UINT const message,
WPARAM const wparam,
LPARAM const lparam) noexcept;
// Called when CreateAndShow is called, allowing subclass window-related
// setup. Subclasses should return false if setup fails.
virtual bool OnCreate();
// Called when Destroy is called.
virtual void OnDestroy();
private:
friend class WindowClassRegistrar;
// OS callback called by message pump. Handles the WM_NCCREATE message which
// is passed when the non-client area is being created and enables automatic
// non-client DPI scaling so that the non-client area automatically
// responds to changes in DPI. All other messages are handled by
// MessageHandler.
static LRESULT CALLBACK WndProc(HWND const window,
UINT const message,
WPARAM const wparam,
LPARAM const lparam) noexcept;
// Retrieves a class instance pointer for |window|
static Win32Window* GetThisFromHandle(HWND const window) noexcept;
// Update the window frame's theme to match the system theme.
static void UpdateTheme(HWND const window);
bool quit_on_close_ = false;
// window handle for top level window.
HWND window_handle_ = nullptr;
// window handle for hosted content.
HWND child_content_ = nullptr;
};
#endif // RUNNER_WIN32_WINDOW_H_
@@ -0,0 +1,124 @@
{
"configVersion": 2,
"packages": [
{
"name": "async",
"rootUri": "file:///home/godopu16/.pub-cache/hosted/pub.dev/async-2.13.1",
"packageUri": "lib/",
"languageVersion": "3.4"
},
{
"name": "collection",
"rootUri": "file:///home/godopu16/.pub-cache/hosted/pub.dev/collection-1.19.1",
"packageUri": "lib/",
"languageVersion": "3.4"
},
{
"name": "crypto",
"rootUri": "file:///home/godopu16/.pub-cache/hosted/pub.dev/crypto-3.0.7",
"packageUri": "lib/",
"languageVersion": "3.4"
},
{
"name": "ffi",
"rootUri": "file:///home/godopu16/.pub-cache/hosted/pub.dev/ffi-2.2.0",
"packageUri": "lib/",
"languageVersion": "3.7"
},
{
"name": "http_parser",
"rootUri": "file:///home/godopu16/.pub-cache/hosted/pub.dev/http_parser-4.1.2",
"packageUri": "lib/",
"languageVersion": "3.4"
},
{
"name": "mam_pty",
"rootUri": "../../../packages/mam_pty",
"packageUri": "lib/",
"languageVersion": "3.0"
},
{
"name": "meta",
"rootUri": "file:///home/godopu16/.pub-cache/hosted/pub.dev/meta-1.19.0",
"packageUri": "lib/",
"languageVersion": "3.5"
},
{
"name": "path",
"rootUri": "file:///home/godopu16/.pub-cache/hosted/pub.dev/path-1.9.1",
"packageUri": "lib/",
"languageVersion": "3.4"
},
{
"name": "shelf",
"rootUri": "file:///home/godopu16/.pub-cache/hosted/pub.dev/shelf-1.4.2",
"packageUri": "lib/",
"languageVersion": "3.4"
},
{
"name": "shelf_web_socket",
"rootUri": "file:///home/godopu16/.pub-cache/hosted/pub.dev/shelf_web_socket-1.0.4",
"packageUri": "lib/",
"languageVersion": "2.17"
},
{
"name": "source_span",
"rootUri": "file:///home/godopu16/.pub-cache/hosted/pub.dev/source_span-1.10.2",
"packageUri": "lib/",
"languageVersion": "3.1"
},
{
"name": "stack_trace",
"rootUri": "file:///home/godopu16/.pub-cache/hosted/pub.dev/stack_trace-1.12.1",
"packageUri": "lib/",
"languageVersion": "3.4"
},
{
"name": "stream_channel",
"rootUri": "file:///home/godopu16/.pub-cache/hosted/pub.dev/stream_channel-2.1.4",
"packageUri": "lib/",
"languageVersion": "3.3"
},
{
"name": "string_scanner",
"rootUri": "file:///home/godopu16/.pub-cache/hosted/pub.dev/string_scanner-1.4.1",
"packageUri": "lib/",
"languageVersion": "3.1"
},
{
"name": "term_glyph",
"rootUri": "file:///home/godopu16/.pub-cache/hosted/pub.dev/term_glyph-1.2.2",
"packageUri": "lib/",
"languageVersion": "3.1"
},
{
"name": "typed_data",
"rootUri": "file:///home/godopu16/.pub-cache/hosted/pub.dev/typed_data-1.4.0",
"packageUri": "lib/",
"languageVersion": "3.5"
},
{
"name": "web",
"rootUri": "file:///home/godopu16/.pub-cache/hosted/pub.dev/web-0.5.1",
"packageUri": "lib/",
"languageVersion": "3.3"
},
{
"name": "web_socket_channel",
"rootUri": "file:///home/godopu16/.pub-cache/hosted/pub.dev/web_socket_channel-2.4.5",
"packageUri": "lib/",
"languageVersion": "3.3"
},
{
"name": "mam_pty_bridge_daemon",
"rootUri": "../",
"packageUri": "lib/",
"languageVersion": "3.0"
}
],
"generator": "pub",
"generatorVersion": "3.12.1",
"flutterRoot": "file:///home/godopu16/puenv/flutter",
"flutterVersion": "3.44.1",
"pubCache": "file:///home/godopu16/.pub-cache"
}
@@ -0,0 +1,150 @@
{
"roots": [
"mam_pty_bridge_daemon"
],
"packages": [
{
"name": "mam_pty_bridge_daemon",
"version": "1.0.0",
"dependencies": [
"mam_pty",
"meta"
],
"devDependencies": []
},
{
"name": "mam_pty",
"version": "1.0.0",
"dependencies": [
"ffi",
"meta",
"shelf",
"shelf_web_socket"
]
},
{
"name": "shelf_web_socket",
"version": "1.0.4",
"dependencies": [
"shelf",
"stream_channel",
"web_socket_channel"
]
},
{
"name": "shelf",
"version": "1.4.2",
"dependencies": [
"async",
"collection",
"http_parser",
"path",
"stack_trace",
"stream_channel"
]
},
{
"name": "http_parser",
"version": "4.1.2",
"dependencies": [
"collection",
"source_span",
"string_scanner",
"typed_data"
]
},
{
"name": "collection",
"version": "1.19.1",
"dependencies": []
},
{
"name": "typed_data",
"version": "1.4.0",
"dependencies": [
"collection"
]
},
{
"name": "stream_channel",
"version": "2.1.4",
"dependencies": [
"async"
]
},
{
"name": "stack_trace",
"version": "1.12.1",
"dependencies": [
"path"
]
},
{
"name": "path",
"version": "1.9.1",
"dependencies": []
},
{
"name": "string_scanner",
"version": "1.4.1",
"dependencies": [
"source_span"
]
},
{
"name": "ffi",
"version": "2.2.0",
"dependencies": []
},
{
"name": "source_span",
"version": "1.10.2",
"dependencies": [
"collection",
"path",
"term_glyph"
]
},
{
"name": "term_glyph",
"version": "1.2.2",
"dependencies": []
},
{
"name": "web_socket_channel",
"version": "2.4.5",
"dependencies": [
"async",
"crypto",
"stream_channel",
"web"
]
},
{
"name": "web",
"version": "0.5.1",
"dependencies": []
},
{
"name": "crypto",
"version": "3.0.7",
"dependencies": [
"typed_data"
]
},
{
"name": "async",
"version": "2.13.1",
"dependencies": [
"collection",
"meta"
]
},
{
"name": "meta",
"version": "1.19.0",
"dependencies": []
}
],
"configVersion": 1
}
@@ -0,0 +1,148 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
async:
dependency: transitive
description:
name: async
sha256: e2eb0491ba5ddb6177742d2da23904574082139b07c1e33b8503b9f46f3e1a37
url: "https://pub.dev"
source: hosted
version: "2.13.1"
collection:
dependency: transitive
description:
name: collection
sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76"
url: "https://pub.dev"
source: hosted
version: "1.19.1"
crypto:
dependency: transitive
description:
name: crypto
sha256: c8ea0233063ba03258fbcf2ca4d6dadfefe14f02fab57702265467a19f27fadf
url: "https://pub.dev"
source: hosted
version: "3.0.7"
ffi:
dependency: transitive
description:
name: ffi
sha256: "6d7fd89431262d8f3125e81b50d3847a091d846eafcd4fdb88dd06f36d705a45"
url: "https://pub.dev"
source: hosted
version: "2.2.0"
http_parser:
dependency: transitive
description:
name: http_parser
sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571"
url: "https://pub.dev"
source: hosted
version: "4.1.2"
mam_pty:
dependency: "direct main"
description:
path: "../../packages/mam_pty"
relative: true
source: path
version: "1.0.0"
meta:
dependency: "direct main"
description:
name: meta
sha256: "307249ce4ff29d58a18e97f6345f539382eb9c9c29ecda628900f31de0443dd9"
url: "https://pub.dev"
source: hosted
version: "1.19.0"
path:
dependency: transitive
description:
name: path
sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5"
url: "https://pub.dev"
source: hosted
version: "1.9.1"
shelf:
dependency: transitive
description:
name: shelf
sha256: e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12
url: "https://pub.dev"
source: hosted
version: "1.4.2"
shelf_web_socket:
dependency: transitive
description:
name: shelf_web_socket
sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1"
url: "https://pub.dev"
source: hosted
version: "1.0.4"
source_span:
dependency: transitive
description:
name: source_span
sha256: "56a02f1f4cd1a2d96303c0144c93bd6d909eea6bee6bf5a0e0b685edbd4c47ab"
url: "https://pub.dev"
source: hosted
version: "1.10.2"
stack_trace:
dependency: transitive
description:
name: stack_trace
sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1"
url: "https://pub.dev"
source: hosted
version: "1.12.1"
stream_channel:
dependency: transitive
description:
name: stream_channel
sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d"
url: "https://pub.dev"
source: hosted
version: "2.1.4"
string_scanner:
dependency: transitive
description:
name: string_scanner
sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43"
url: "https://pub.dev"
source: hosted
version: "1.4.1"
term_glyph:
dependency: transitive
description:
name: term_glyph
sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e"
url: "https://pub.dev"
source: hosted
version: "1.2.2"
typed_data:
dependency: transitive
description:
name: typed_data
sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006
url: "https://pub.dev"
source: hosted
version: "1.4.0"
web:
dependency: transitive
description:
name: web
sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27"
url: "https://pub.dev"
source: hosted
version: "0.5.1"
web_socket_channel:
dependency: transitive
description:
name: web_socket_channel
sha256: "58c6666b342a38816b2e7e50ed0f1e261959630becd4c879c4f26bfa14aa5a42"
url: "https://pub.dev"
source: hosted
version: "2.4.5"
sdks:
dart: ">=3.7.0 <4.0.0"
@@ -0,0 +1,12 @@
name: mam_pty_bridge_daemon
description: Headless Dart daemon serving as a WebSocket PTY bridge for Web clients.
version: 1.0.0
publish_to: none
environment:
sdk: '>=3.0.0 <4.0.0'
dependencies:
mam_pty:
path: ../../packages/mam_pty
meta: ^1.9.0
@@ -0,0 +1,94 @@
{
"configVersion": 2,
"packages": [
{
"name": "async",
"rootUri": "file:///home/godopu16/.pub-cache/hosted/pub.dev/async-2.13.1",
"packageUri": "lib/",
"languageVersion": "3.4"
},
{
"name": "collection",
"rootUri": "file:///home/godopu16/.pub-cache/hosted/pub.dev/collection-1.19.1",
"packageUri": "lib/",
"languageVersion": "3.4"
},
{
"name": "http",
"rootUri": "file:///home/godopu16/.pub-cache/hosted/pub.dev/http-1.6.0",
"packageUri": "lib/",
"languageVersion": "3.4"
},
{
"name": "http_parser",
"rootUri": "file:///home/godopu16/.pub-cache/hosted/pub.dev/http_parser-4.1.2",
"packageUri": "lib/",
"languageVersion": "3.4"
},
{
"name": "mam_core",
"rootUri": "../../../packages/mam_core",
"packageUri": "lib/",
"languageVersion": "3.0"
},
{
"name": "meta",
"rootUri": "file:///home/godopu16/.pub-cache/hosted/pub.dev/meta-1.19.0",
"packageUri": "lib/",
"languageVersion": "3.5"
},
{
"name": "path",
"rootUri": "file:///home/godopu16/.pub-cache/hosted/pub.dev/path-1.9.1",
"packageUri": "lib/",
"languageVersion": "3.4"
},
{
"name": "source_span",
"rootUri": "file:///home/godopu16/.pub-cache/hosted/pub.dev/source_span-1.10.2",
"packageUri": "lib/",
"languageVersion": "3.1"
},
{
"name": "string_scanner",
"rootUri": "file:///home/godopu16/.pub-cache/hosted/pub.dev/string_scanner-1.4.1",
"packageUri": "lib/",
"languageVersion": "3.1"
},
{
"name": "term_glyph",
"rootUri": "file:///home/godopu16/.pub-cache/hosted/pub.dev/term_glyph-1.2.2",
"packageUri": "lib/",
"languageVersion": "3.1"
},
{
"name": "typed_data",
"rootUri": "file:///home/godopu16/.pub-cache/hosted/pub.dev/typed_data-1.4.0",
"packageUri": "lib/",
"languageVersion": "3.5"
},
{
"name": "web",
"rootUri": "file:///home/godopu16/.pub-cache/hosted/pub.dev/web-1.1.1",
"packageUri": "lib/",
"languageVersion": "3.4"
},
{
"name": "yaml",
"rootUri": "file:///home/godopu16/.pub-cache/hosted/pub.dev/yaml-3.1.3",
"packageUri": "lib/",
"languageVersion": "3.4"
},
{
"name": "mam_tui",
"rootUri": "../",
"packageUri": "lib/",
"languageVersion": "3.0"
}
],
"generator": "pub",
"generatorVersion": "3.12.1",
"flutterRoot": "file:///home/godopu16/puenv/flutter",
"flutterVersion": "3.44.1",
"pubCache": "file:///home/godopu16/.pub-cache"
}

Some files were not shown because too many files have changed in this diff Show More