axmap-cli 1.3.3 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/CLAUDE.md +15 -9
  2. package/README.ko.md +103 -87
  3. package/README.md +104 -88
  4. package/bin/axmap.mjs +9 -3
  5. package/mcp/README.md +8 -8
  6. package/mcp/install.ps1 +6 -3
  7. package/mcp/install.sh +5 -3
  8. package/mcp/server.mjs +81 -32
  9. package/package.json +7 -11
  10. package/src/agentcli.mjs +19 -0
  11. package/src/bridge.mjs +257 -0
  12. package/src/external-console.mjs +116 -0
  13. package/src/invariants.mjs +1 -1
  14. package/src/managed-session.mjs +178 -0
  15. package/src/protocol.mjs +1 -1
  16. package/src/session-dialogue.mjs +131 -0
  17. package/src/session-status.mjs +48 -0
  18. package/src/session-usage.mjs +34 -0
  19. package/src/state.mjs +8 -0
  20. package/src/terminal-bridge.mjs +225 -0
  21. package/src/update.mjs +1 -1
  22. package/tools/bridge.mjs +96 -0
  23. package/tools/mcp-register.mjs +2 -2
  24. package/tools/run-tests.mjs +10 -3
  25. package/tools/run.mjs +64 -0
  26. package/tools/setup.mjs +11 -0
  27. package/tools/windows-console.ps1 +91 -0
  28. package/app/README.md +0 -366
  29. package/app/eval/edges.mjs +0 -242
  30. package/app/lib/adjacent.mjs +0 -125
  31. package/app/lib/agentcli.mjs +0 -153
  32. package/app/lib/analyze.mjs +0 -1159
  33. package/app/lib/cochange.mjs +0 -421
  34. package/app/lib/datanodes.mjs +0 -127
  35. package/app/lib/entry.mjs +0 -192
  36. package/app/lib/featuregraph.mjs +0 -389
  37. package/app/lib/features.mjs +0 -645
  38. package/app/lib/fetchrepo-run.mjs +0 -37
  39. package/app/lib/fetchrepo.mjs +0 -164
  40. package/app/lib/flow.mjs +0 -1089
  41. package/app/lib/ladder.mjs +0 -387
  42. package/app/lib/langs.mjs +0 -630
  43. package/app/lib/live.mjs +0 -346
  44. package/app/lib/llm.mjs +0 -594
  45. package/app/lib/newfile.mjs +0 -126
  46. package/app/lib/prdiff.mjs +0 -651
  47. package/app/lib/reveal.mjs +0 -316
  48. package/app/lib/roots.mjs +0 -186
  49. package/app/lib/scope.mjs +0 -342
  50. package/app/lib/session.mjs +0 -389
  51. package/app/lib/slots.mjs +0 -233
  52. package/app/lib/ssot.mjs +0 -277
  53. package/app/lib/teamview.mjs +0 -975
  54. package/app/lib/terms.ko.mjs +0 -169
  55. package/app/server.mjs +0 -1959
  56. package/app/web/shell.css +0 -538
  57. package/app/web/shell.html +0 -197
  58. package/app/web/shell.js +0 -638
  59. package/app/web/stage.js +0 -347
  60. package/app/web/words.js +0 -85
  61. package/src/repotarget.mjs +0 -84
  62. package/tools/cluster-experiment.mjs +0 -256
  63. package/tools/cluster-sweep.mjs +0 -226
  64. package/tools/make-icon.mjs +0 -108
  65. package/tools/persona-bench.mjs +0 -362
  66. package/tools/pick-repo.mjs +0 -229
  67. package/tools/reveal-demo.mjs +0 -158
  68. package/tools/shortcut.mjs +0 -121
  69. package/tools/smoke.mjs +0 -174
  70. package/tools/topicgraph.py +0 -154
package/CLAUDE.md CHANGED
@@ -1,21 +1,27 @@
1
1
  # axMap 작업 규칙
2
2
 
3
- axMap은 여러 AI 에이전트의 작업 경로를 선점하고 충돌을 예방하는 CLI 도구다. 현재 개발 범위는 CLI와 MCP를 통한 협업 기능이다. 코드 분석·지도·코퍼스 기준 도구로의 확장은 보류한다. 범위 결정은 `docs/DECISIONS.md`의 D21을 따른다. 산문은 `axMap`, 식별자와 명령은 `axmap`, npm 패키지는 `axmap-cli`를 쓴다.
3
+ axMap은 여러 AI 에이전트의 작업 경로를 선점하고 충돌을 예방하는 CLI·MCP 협업 도구다.
4
+ 쪽지와 로컬 세션 연결도 이 범위에 포함한다. 현재 제품 결정은 `docs/DECISIONS.md`를 따른다.
5
+ 산문은 `axMap`, 식별자와 명령은 `axmap`, npm 패키지는 `axmap-cli`를 쓴다.
4
6
 
5
- 개발 기준은 `main`이다. 이 저장소의 소스 확인에는 `node bin/axmap.mjs`를 사용한다. PATH의 `axmap`은 npm 설치본일 수 있다.
7
+ 개발 기준은 `main`이다. 소스 확인에는 `node bin/axmap.mjs`를 사용한다.
8
+ PATH의 `axmap`은 npm 설치본일 수 있다.
6
9
 
7
10
  ## 작업 절차
8
11
 
9
- 1. `docs/DECISIONS.md`, `docs/THREADS.md`, `docs/SPEC.md`, `docs/INVARIANTS.md`에서 관련 결정과 규격을 읽는다.
10
- 2. 세션마다 고유한 `AXMAP_AGENT`와 `AXMAP_SESSION`을 정한다. 변경 전에 `node bin/axmap.mjs claim <경로> --task <작업> --intent "목적"`으로 선점한다.
11
- 3. 선점이 겹치면 다른 영역으로 옮긴다. 필요한 경로만 잡고, 끝나면 `node bin/axmap.mjs release`로 반납한다.
12
+ 1. `docs/DECISIONS.md`, `docs/THREADS.md`, `docs/SPEC.md`, `docs/INVARIANTS.md`에서 관련 내용을 읽는다.
13
+ 2. 세션마다 고유한 `AXMAP_AGENT`와 `AXMAP_SESSION`을 정하고, 변경 전에 필요한 경로를 선점한다.
14
+ 3. 선점이 겹치면 다른 영역으로 옮긴다. 작업이 끝나면 같은 신원으로 반납한다.
12
15
  4. 선점 없는 커밋을 만들거나 `git commit --no-verify`로 훅을 우회하지 않는다. push 대상 원격과 브랜치를 확인한다.
13
16
 
14
17
  ## 구현 기준
15
18
 
16
- 루트 CLI는 Node 20+와 git만으로 동작한다. 새 의존성은 추가 전에 사용자와 논의한다. 데스크톱 셸의 기존 의존성은 `desktop/package.json`을 따른다.
19
+ Node 20+와 Git을 사용한다. 터미널 연결 의존성은 npm 설치에 포함하며 별도 컴파일러 설치를 요구하지 않는다.
20
+ 새 의존성은 추가 전에 사용자와 논의한다. 이번 터미널 의존성 추가는 사용자가 승인했다.
17
21
 
18
- 없는 데이터와 읽지 못한 데이터를 구별한다. 판정을 못 하면 통과시키지 않는다. 주석에는 구현 이유를 쓰고, 수치에는 측정 조건과 근거를 붙인다. 테스트 개수나 미측정 성능을 문서에 쓰지 않는다.
22
+ 없는 데이터와 읽지 못한 데이터를 구별한다. 판정을 못 하면 통과시키지 않는다.
23
+ 주석에는 구현 이유를 쓰고, 수치에는 측정 조건과 근거를 붙인다. 테스트 개수나 미측정 성능을 문서에 쓰지 않는다.
24
+ 가짜 provider의 테스트 결과를 실제 AI CLI 연결 성공으로 소개하지 않는다.
19
25
 
20
26
  ## 검증
21
27
 
@@ -24,7 +30,7 @@ npm test
24
30
  npm run demo
25
31
  npm run demo:compare
26
32
  npm run demo:chaos
27
- npm run smoke
28
33
  ```
29
34
 
30
- 프로토콜 변경은 회귀 테스트와 경합 데모로 검증하고, 화면 변경은 브라우저 스모크를 돌린다. 데스크톱 변경은 설치된 Electron으로 `npm run desktop:smoke`를 추가한다. 성공 여부는 종료 코드로 판단한다. 필요한 실행 환경이 없으면 검증 제한을 보고한다.
35
+ 프로토콜 변경은 회귀 테스트와 경합 데모로 검증한다. 설치 변경은 격리된 사용자 환경에서 검사한다.
36
+ 성공 여부는 종료 코드로 판단한다. 필요한 실행 환경이 없으면 검증 제한을 보고한다.
package/README.ko.md CHANGED
@@ -1,134 +1,150 @@
1
1
  # axMap
2
2
 
3
- [![English](https://raw.githubusercontent.com/rl2aderjoon/axmap/main/docs/assets/readme-en.svg)](https://github.com/rl2aderjoon/axmap/blob/main/README.md) [![한국어](https://raw.githubusercontent.com/rl2aderjoon/axmap/main/docs/assets/readme-ko.svg)](https://github.com/rl2aderjoon/axmap/blob/main/README.ko.md)
3
+ **한 저장소에서 일하는 여러 AI가 서로의 작업을 덮어쓰지 않도록.**
4
4
 
5
- **여러 AI 에이전트가 같은 git 저장소에서 작업할 때, 수정할 경로를 먼저 선점해 충돌을 예방하는 CLI 도구.**
5
+ axMap은 수정할 파일과 폴더를 미리 선점하고, 겹치는 작업을 알려주는 협업 CLI입니다.
6
+ Codex·Antigravity·Claude Code에서는 MCP로 선점과 반납, 상태 확인, 쪽지 기능을 사용할 수 있습니다.
6
7
 
7
- 누가 어디를 고치는지 장부에 기록하고, 겹치는 경로의 선점을 거부한다.
8
- 커밋 훅으로 선점 범위를 확인하고, 작업이 끝나면 반납한다.
9
- AI 도구에서는 MCP로 같은 기능을 사용할 수 있다.
10
-
11
- Node 20+와 git이 필요하다. CLI의 런타임 의존성은 없다.
12
- npm 패키지 이름은 `axmap-cli`, 실행 명령은 `axmap`이다.
8
+ [English](README.md) · **한국어** &nbsp; / &nbsp; Node.js 20+ · Git · MIT
13
9
 
14
10
  ## 설치
15
11
 
16
- Git 저장소 밖을 포함해 어느 폴더에서든 실행한다.
17
-
18
12
  ```bash
19
13
  npm install -g axmap-cli@latest
20
14
  axmap setup
21
15
  ```
22
16
 
23
- `setup`은 이 PC에 axMap을 설치하고 AI 도구의 사용자 설정에 MCP를 등록한다. 실행한 폴더에 타겟을 고정하거나 repo를 초기화하지 않는다.
24
- MCP를 사용하려면 설정 후 AI 도구를 다시 시작한다.
25
- 함께 작업하는 사람과 에이전트는 같은 원격 장부를 사용해야 서로의 선점을 볼 수 있다.
17
+ 어느 폴더에서든 한 번 설정한 뒤 AI 도구를 다시 시작하세요.
18
+ 새 Git 저장소의 장부는 첫 사용 때 자동으로 준비합니다. 함께 일하는 사람은 같은 원격 장부를 사용합니다.
26
19
 
27
- ## 1.3.3: Windows Codex 등록 오류 수정
20
+ [사용법](docs/INSTALL.md) · [MCP 연결](mcp/README.md) · [개발 가이드](docs/ONBOARD-TEAM.md)
28
21
 
29
- Windows에서 npm으로 설치한 Codex도 `axmap setup`으로 정상 등록한다. 셸 실행 파일 대신 패키지의 Node 진입점을 직접 실행해 경로와 인수를 그대로 전달한다.
22
+ ---
30
23
 
31
- ## 1.3.2: 쪽지 표시 이름과 사용자 자동 공유
24
+ ## 변경 기록
32
25
 
33
- 대화형 `setup`에서 `장효준`, `John Smith`처럼 쪽지에 표시할 이름을 입력한다. 입력 없이 설정하거나 오타를 고치려면 `axmap setup --name "장효준"`을 실행한다. 재설치할 때는 저장된 이름을 유지하며 Git 이름·이메일 설정은 바꾸지 않는다.
26
+ 최신 변경부터 정리합니다.
34
27
 
35
- 각 repo에서 axMap을 처음 사용하면 해당 repo의 Git 이메일을 읽고 기존 `axmap/users` 고아 브랜치에 표시 이름을 자동 공유한다. 코드 커밋이나 repo별 수동 등록은 필요 없다. 다른 팀원은 사용자 정보 동기화 후 수신자로 발견한다. 원격 push 권한이 필요하며, 공유 실패는 경고하고 다음 사용 때 재시도한다. `setup`만 실행하고 사용한 적 없는 repo에는 등록하지 않는다.
28
+ ### 1.5.0
36
29
 
37
- `axmap bus contacts`로 수신자 이름·이메일을 확인한다. 아는 이름으로 보낸 쪽지는 이메일 주소로 저장하므로 이름을 고쳐도 수신·읽음 기록이 이어진다. 동명이인은 이메일로 지정한다. 쪽지 자동 등록은 투표권이나 MR 승인 권한을 부여하지 않는다.
30
+ <sub>2026.10.21</sub>
38
31
 
39
- 자세한 설치·설정은 [docs/INSTALL.md](https://github.com/rl2aderjoon/axmap/blob/main/docs/INSTALL.md)를 참고한다.
32
+ **Windows에서 따로 실행한 Antigravity 대화창을 재시작 없이 연결합니다.**
40
33
 
41
- ## 1.3.1: 어느 폴더에서든 setup 한 번, 이후 repo 자동 연결
34
+ - 일반 `agy`로 직접 연 대화창도 설치된 훅으로 자동 등록합니다. 이미 열린 창은 대상 저장소에서 `axmap bridge attach --pid <PID>`로 연결합니다.
35
+ - `ax_dispatch`와 `ax_result`가 기존 프로세스와 대화를 유지합니다. 빈 입력창의 대기 상태를 확인해 전달하고, 요청 UUID가 있는 대화 기록과 현재 콘솔 상태로 결과를 판정합니다.
36
+ - `axmap bridge status [--json]`으로 모델 작업을 보내지 않고 로컬 연결 상태를 확인합니다.
37
+ - 독립 콘솔 연결은 현재 Windows agy만 지원합니다. 토큰 예산을 검사하는 `ax_chat`은 관리형 stdio 세션을 사용합니다.
42
38
 
43
- axMap을 한 번 설정하면 다른 Git 저장소에서도 Codex 등 AI CLI를 열어 바로 사용할 수 있다. 세션의 작업 repo를 자동으로 선택하고, 첫 조회·선점 때 장부를 준비하므로 매번 `axmap init`을 실행하지 않아도 된다.
39
+ 실제 기존 agy 창의 메시지 왕복과 회귀 테스트 574개 통과를 확인했습니다. 독립 콘솔의 자동 등록, 한글 전달, 입력 보호와 프로세스 식별 검사도 포함합니다.
40
+ [연결 안내 →](docs/SESSION-BRIDGE.md)
44
41
 
45
- 기존 원격 장부가 있으면 이어 쓰고, 같은 repo의 worktree는 장부 하나를 공유한다. 서로 다른 repo의 동시 세션은 독립적으로 동작한다. 원격 접근 실패를 장부 없음으로 판단해 별도 장부를 만들지 않는다.
42
+ ---
46
43
 
47
- MCP는 클라이언트가 알려주는 작업 폴더(roots)를 따라간다. 미지원 클라이언트는 시작 폴더를 사용하며, 도중에 폴더를 바꾸면 도구의 `cwd`에 작업 폴더 절대 경로를 전달한다. 커밋 훅을 적용할 새 repo에서는 `axmap hook install`을 실행한다.
44
+ ### 1.4.0
48
45
 
49
- 기존 설치를 업그레이드할 때도 어느 폴더에서든 아래 명령을 한 번 실행하고 AI CLI를 다시 시작한다.
46
+ <sub>2026.10.20</sub>
50
47
 
51
- ```bash
52
- npm install -g axmap-cli@latest
53
- axmap setup
54
- ```
48
+ **Codex와 Antigravity가 제한된 자동 대화를 주고받으며 토큰 사용량을 추적합니다.**
55
49
 
56
- `setup`은 MCP와 공유 훅 실행 사본 및 등록을 갱신한다. 이후 repo를 옮길 때는 setup이나 init을 반복하지 않는다. 특정 repo의 장부와 커밋 훅까지 미리 준비하려면 `axmap setup --repo <경로>`를 명시한다.
50
+ **추가**
57
51
 
58
- ## 작업 흐름
52
+ - `axmap bridge serve codex|agy`로 관리형 CLI를 한 번 시작하고, `bridge chat`으로 완료 또는 한도까지 짧은 메시지를 자동 중계합니다.
53
+ - MCP `ax_chat`, `ax_dialogue`, `ax_chat_stop`으로 중계 시작·조회·중단을 제공합니다. 요청별·누적 토큰과 캐시 사용량을 기록하며 대기 중에는 모델을 호출하지 않습니다.
54
+ - 별도 `axmap run`은 사용자가 직접 여는 대화형 터미널을 연결하는 프로토타입입니다.
55
+ - 터미널 연결 의존성을 npm 설치에 포함하고, setup의 실행 사본에도 함께 준비합니다.
59
56
 
60
- ```bash
61
- # 지금 누가 무엇을 잡고 있는지 확인
62
- axmap status
57
+ **정리**
63
58
 
64
- # 수정 전에 경로와 목적을 선언
65
- axmap claim src/auth --agent my-agent --session my-session --task T-12 --intent "토큰 만료 처리"
59
+ - 코드 시각화 화면, Electron 앱, 코드 분석·코퍼스 도구와 관련 테스트·연구 문서를 제거했습니다.
60
+ - 설치와 MCP에서 쓰는 CLI 탐지 코드를 공용 모듈로 분리했습니다.
66
61
 
67
- # 파일을 수정한 뒤 커밋할 변경을 준비하고 선점 범위를 확인
68
- git add src/auth
69
- axmap verify --agent my-agent --session my-session
62
+ **검증 상태**
70
63
 
71
- # 작업이 끝나면 반납
72
- axmap release --agent my-agent --session my-session
73
- ```
64
+ Windows에서 실제 Codex 0.163.0·agy 1.4.2의 문맥을 유지한 4회 자동 중계와 MCP를 통한 2회 백그라운드 중계를 확인했습니다.
65
+ 검증 합계는 처리 102590토큰(캐시 입력 54400, 출력 393 포함)입니다. 짧은 메시지도 CLI의 기본 문맥 비용이 크며, 예산은 다음 실행 전에 검사하므로 실행 중 엄격한 토큰 상한은 아닙니다.
66
+ 별도 대화형 PTY 경로는 가짜 프로그램 회귀 검증 단계입니다.
67
+ [개발 상태 보기 →](docs/SESSION-BRIDGE.md)
74
68
 
75
- 에이전트 이름과 세션은 각 작업 세션마다 고유하게 정하고, 선점부터 반납까지 같은 값을 쓴다.
76
- 커밋 훅에서도 같은 식별자를 사용하도록 `AXMAP_AGENT`와 `AXMAP_SESSION` 환경변수를 설정한다.
77
- 선점이 거절되면 메시지의 점유자·작업·남은 시간을 확인하고 겹치지 않는 영역을 선택한다.
78
- 필요한 경로만 잡고, 작업이 길어지면 `axmap renew`에 같은 agent와 session을 지정해 갱신한다.
69
+ ---
79
70
 
80
- `git worktree`로 나눈 작업 폴더도 같은 장부를 사용한다.
81
- `release`는 현재 세션이 잡은 경로를 반납한다.
71
+ ### 1.3.3
82
72
 
83
- ## 동작 방식
73
+ <sub>2026.10.16</sub>
84
74
 
85
- git은 변경을 합칠 때 텍스트 충돌을 발견한다.
86
- axMap은 수정 전에 경로를 선점해, 여러 에이전트가 같은 영역을 동시에 고치는 상황을 먼저 막는다.
75
+ **Windows에서 npm으로 설치한 Codex도 정상 연결됩니다.**
87
76
 
88
- 선점 장부는 전용 git 브랜치에 저장한다. 원격의 최신 장부를 확인하고,
89
- git ref의 원자적 갱신과 경로 겹침 판정으로 선점한다.
90
- 커밋 훅은 실제 수정 경로와 선점 범위를 대조한다.
91
- `axmap audit`은 장부 이력을 재생해 규칙 위반을 검사한다.
77
+ **수정**
92
78
 
93
- 상태를 읽지 못하면 그 이유를 알리고, 판정할 수 없는 상태를 성공으로 처리하지 않는다.
94
- 프로토콜은 [docs/SPEC.md](https://github.com/rl2aderjoon/axmap/blob/main/docs/SPEC.md), 지켜야 할 성질은 [docs/INVARIANTS.md](https://github.com/rl2aderjoon/axmap/blob/main/docs/INVARIANTS.md)에 있다.
79
+ - `axmap setup`이 Codex 패키지의 Node 진입점을 직접 실행합니다.
80
+ - 설치 경로에 공백이 있거나 인수에 따옴표가 있어도 셸 해석으로 값이 바뀌지 않도록 했습니다.
95
81
 
96
- ## AI 도구에서 사용
82
+ [릴리스 소스 →](https://github.com/rl2aderjoon/axmap/tree/v1.3.3)
97
83
 
98
- MCP를 연결하면 `ax_claim`, `ax_status`, `ax_release` 등의 도구를 AI가 호출할 수 있다.
99
- 에이전트에게 다음 작업 규칙을 전달한다.
84
+ ---
100
85
 
101
- ```text
102
- 파일을 수정하기 전에 ax_claim으로 경로와 목적을 선언한다.
103
- 선점이 거절되면 점유자를 확인하고 겹치지 않는 다른 작업을 선택한다.
104
- 작업이 끝나면 ax_release로 반납한다.
105
- ```
86
+ ### 1.3.2
106
87
 
107
- 연결 방법과 도구 목록은 [mcp/README.md](https://github.com/rl2aderjoon/axmap/blob/main/mcp/README.md)를 참고한다.
88
+ <sub>2026.10.16</sub>
108
89
 
109
- ## 개발과 검증
90
+ **쪽지에 표시할 이름을 정하고, 동료를 자동으로 찾습니다.**
110
91
 
111
- ```bash
112
- git clone https://github.com/rl2aderjoon/axmap.git
113
- cd axmap
114
- node bin/axmap.mjs --version
115
- npm test
116
- npm run demo
117
- npm run demo:compare
118
- npm run demo:chaos
119
- ```
92
+ **추가**
93
+
94
+ - 대화형 setup에서 표시 이름을 입력합니다. `axmap setup --name "이름"`으로 바꿀 수도 있습니다.
95
+ - 저장소를 처음 사용할 때 Git 이메일과 표시 이름을 팀의 사용자 장부에 공유합니다.
96
+ - `axmap bus contacts`로 쪽지를 받을 사람을 확인합니다.
97
+
98
+ **개선**
99
+
100
+ - 이름으로 보낸 쪽지는 확인된 이메일로 저장해, 이름을 바꿔도 수신·읽음 기록이 이어집니다.
101
+ - 동명이인은 이메일로 구분하며, 공유 실패는 경고하고 다음 사용 때 재시도합니다.
102
+ - Git 이름·이메일 설정과 투표 권한은 변경하지 않습니다.
103
+
104
+ [릴리스 소스 →](https://github.com/rl2aderjoon/axmap/tree/v1.3.2)
105
+
106
+ ---
107
+
108
+ ### 1.3.1
109
+
110
+ <sub>2026.10.15</sub>
111
+
112
+ **setup은 어느 폴더에서든 한 번이면 됩니다.**
113
+
114
+ **개선**
115
+
116
+ - Git 저장소 밖에서도 설치와 MCP 등록을 할 수 있습니다.
117
+ - setup을 실행한 폴더에 이후 작업 대상을 고정하지 않습니다.
118
+ - 기존 MCP 등록의 서버 경로와 환경을 갱신하면서 개인 설정과 다른 서버는 보존합니다.
119
+
120
+ 특정 저장소의 장부와 커밋 훅까지 준비하려면 `axmap setup --repo <경로>`를 사용합니다.
121
+
122
+ [릴리스 소스 →](https://github.com/rl2aderjoon/axmap/tree/v1.3.1)
123
+
124
+ ---
125
+
126
+ ### 1.3.0
127
+
128
+ <sub>2026.10.15</sub>
129
+
130
+ **저장소를 옮겨도, 세션의 작업 위치를 따라갑니다.**
131
+
132
+ **추가**
133
+
134
+ - 첫 상태 조회·선점 때 장부를 자동으로 준비해 저장소마다 `init`을 반복하지 않아도 됩니다.
135
+ - MCP가 클라이언트의 작업 폴더(roots)와 변경 알림을 지원합니다.
136
+
137
+ **개선**
138
+
139
+ - 기존 원격 장부를 이어 쓰고, 같은 저장소의 worktree는 장부 하나를 공유합니다.
140
+ - 서로 다른 저장소에서 실행한 세션은 독립적으로 동작합니다.
141
+ - 원격 접근 실패를 빈 장부로 취급하지 않습니다.
120
142
 
121
- 루트 CLI를 실행하기 위한 `npm install`은 필요 없다. 데모는 bash 환경에서 실행한다.
122
- 소스 확인에는 `node bin/axmap.mjs`를 사용한다.
143
+ roots 미지원 도구나 작업 대상이 모호한 경우에는 MCP 인수 `cwd`로 작업 폴더를 지정합니다.
144
+ 커밋 검증이 필요한 저장소에는 `axmap hook install`을 실행합니다.
123
145
 
124
- | 문서 | 내용 |
125
- |---|---|
126
- | [CLAUDE.md](https://github.com/rl2aderjoon/axmap/blob/main/CLAUDE.md) | 소스 작업 규칙 |
127
- | [docs/INSTALL.md](https://github.com/rl2aderjoon/axmap/blob/main/docs/INSTALL.md) | 설치와 사용 |
128
- | [docs/SPEC.md](https://github.com/rl2aderjoon/axmap/blob/main/docs/SPEC.md) | 명령과 선점 프로토콜 |
129
- | [docs/INVARIANTS.md](https://github.com/rl2aderjoon/axmap/blob/main/docs/INVARIANTS.md) | 불변식과 검증 기준 |
130
- | [docs/DECISIONS.md](https://github.com/rl2aderjoon/axmap/blob/main/docs/DECISIONS.md) | 제품 범위와 설계 결정 |
146
+ [릴리스 소스 →](https://github.com/rl2aderjoon/axmap/tree/v1.3.0)
131
147
 
132
- ## 라이선스
148
+ ---
133
149
 
134
- [MIT](https://github.com/rl2aderjoon/axmap/blob/main/LICENSE)
150
+ [설치·업그레이드](docs/INSTALL.md) · [프로토콜](docs/SPEC.md) · [문제 제보](https://github.com/rl2aderjoon/axmap/issues) · [MIT 라이선스](LICENSE)
package/README.md CHANGED
@@ -1,134 +1,150 @@
1
1
  # axMap
2
2
 
3
- [![English](https://raw.githubusercontent.com/rl2aderjoon/axmap/main/docs/assets/readme-en.svg)](https://github.com/rl2aderjoon/axmap/blob/main/README.md) [![한국어](https://raw.githubusercontent.com/rl2aderjoon/axmap/main/docs/assets/readme-ko.svg)](https://github.com/rl2aderjoon/axmap/blob/main/README.ko.md)
3
+ **Several AI agents. One repository. Clear ownership before every edit.**
4
4
 
5
- **A CLI tool that helps AI agents avoid conflicting edits by claiming paths before working in the same Git repository.**
5
+ axMap is a collaboration CLI that claims files and folders before work begins and rejects overlapping claims.
6
+ Codex, Antigravity and Claude Code can use claims, releases, status and messaging through MCP.
6
7
 
7
- axMap records who is editing which paths and rejects overlapping claims.
8
- Commit hooks check changes against claimed paths, and agents release their claims when work is done.
9
- AI tools can use the same workflow through MCP.
8
+ **English** · [한국어](README.ko.md) &nbsp; / &nbsp; Node.js 20+ · Git · MIT
10
9
 
11
- Requires Node.js 20+ and Git. The CLI has no npm runtime dependencies.
12
- The npm package is `axmap-cli`; the command is `axmap`.
13
-
14
- ## Installation
15
-
16
- Run these commands from any folder, including outside a Git repository.
10
+ ## Install
17
11
 
18
12
  ```bash
19
13
  npm install -g axmap-cli@latest
20
14
  axmap setup
21
15
  ```
22
16
 
23
- `setup` installs axMap and registers MCP in your AI tool's user settings. It does not bind the installation to the current folder or initialize a repository.
24
- Restart your AI tool after setup to use MCP.
25
- People and agents working together must share the same remote ledger to see each other's claims.
17
+ Run setup once from any folder, then restart your AI tool.
18
+ Each Git repository's ledger is prepared on first use. Collaborators must share the same remote ledger.
26
19
 
27
- During interactive setup, enter the name people should use for messages, such as `John Smith` or `장효준`. To set or correct it without a prompt, run `axmap setup --name "John Smith"`. Reinstallation keeps the saved name. Git's name and email settings are unchanged.
20
+ [Usage](docs/INSTALL.md) · [MCP setup](mcp/README.md) · [Development](docs/ONBOARD-TEAM.md)
28
21
 
29
- On first use in a repository, axMap reads that repository's Git email and shares your display name through the existing `axmap/users` branch. No code commit or per-repository manual registration is needed. Teammates discover it when their user information synchronizes. This requires push access; an offline or rejected update is reported and retried. Setup alone does not announce you to repositories you have never used.
22
+ ---
30
23
 
31
- Use `axmap bus contacts` to list known names and email addresses. Messages sent to a known name are addressed to its email, so correcting the name preserves delivery and read history. If multiple people use the same name, specify the recipient's email. Messaging registration does not grant voting or MR approval rights.
24
+ ## Changelog
32
25
 
33
- See [docs/INSTALL.md](https://github.com/rl2aderjoon/axmap/blob/main/docs/INSTALL.md) for installation and configuration details (Korean).
26
+ Newest changes first.
34
27
 
35
- ## 1.3.3: Windows Codex registration fix
28
+ ### 1.5.0
36
29
 
37
- `axmap setup` now registers Codex correctly when Codex is installed through npm on Windows. It launches the package's Node entry directly, preserving paths and arguments without a shell.
30
+ <sub>October 21, 2026</sub>
38
31
 
39
- ## Global setup and automatic repositories in 1.3.1
32
+ **Connect an existing Windows Antigravity conversation without restarting it.**
40
33
 
41
- Set up axMap once, then open Codex or another AI CLI in any Git repository. axMap selects that session's repository and prepares its ledger on the first status or claim request. There is no per-repository `axmap init` step.
34
+ - Interactive `agy` sessions launched directly register through the installed hooks. Use `axmap bridge attach --pid <PID>` from the target repository for an already open console.
35
+ - `ax_dispatch` and `ax_result` preserve the existing process and conversation. Delivery requires an empty, idle input box; results match the request UUID in the transcript and the live console state.
36
+ - `axmap bridge status [--json]` checks local connections without submitting model work.
37
+ - Independent console connections currently support Windows agy only. Token-budgeted `ax_chat` still requires managed stdio sessions.
42
38
 
43
- Existing remote ledgers are reused. Linked worktrees share one ledger, and simultaneous sessions in different repositories keep independent targets. Remote access failures stop the request instead of creating a separate ledger.
39
+ Validated against an existing real agy console and 574 passing regression tests, including independent-console registration, Unicode delivery, input protection and process identity checks.
40
+ [Connection guide →](docs/SESSION-BRIDGE.md)
44
41
 
45
- MCP follows workspace roots supplied by the client. When roots are unsupported, it uses the launch directory; pass the absolute working directory through the tool's `cwd` argument for later directory changes. Run `axmap hook install` in each repository where you want commit enforcement.
42
+ ---
46
43
 
47
- To upgrade an existing installation, run this once from any folder, then restart your AI CLI:
44
+ ### 1.4.0
48
45
 
49
- ```bash
50
- npm install -g axmap-cli@latest
51
- axmap setup
52
- ```
46
+ <sub>October 20, 2026</sub>
53
47
 
54
- `setup` refreshes the installed MCP and shared hook runner as well as its registration. Subsequent repository changes do not require another setup or init. To explicitly prepare one repository and its commit hook during setup, use `axmap setup --repo <path>`.
48
+ **Codex and Antigravity can exchange tasks automatically, with measured token usage and bounded conversations.**
55
49
 
56
- ## Workflow
50
+ **Added**
57
51
 
58
- ```bash
59
- # Check who has claimed which paths
60
- axmap status
52
+ - `axmap bridge serve codex|agy` explicitly starts persistent managed CLI sessions. `bridge chat` relays short messages until completion or a configured limit.
53
+ - MCP `ax_chat`, `ax_dialogue`, and `ax_chat_stop` start, inspect, and stop automatic relay. Per-request and cumulative token counts include cache details; idle waiting makes no model calls.
54
+ - The separate prototype `axmap run` command connects a user-launched interactive terminal.
55
+ - The terminal dependency ships with npm installation and is copied into setup's installed runtime.
61
56
 
62
- # Declare your paths and purpose before editing
63
- axmap claim src/auth --agent my-agent --session my-session --task T-12 --intent "Handle token expiration"
57
+ **Removed**
64
58
 
65
- # After editing, stage your changes and check their claimed scope
66
- git add src/auth
67
- axmap verify --agent my-agent --session my-session
59
+ - Code visualization screens, the Electron app, analysis and corpus tools, and their tests and research documents.
60
+ - Setup and MCP now share CLI discovery from a dedicated source module.
68
61
 
69
- # Release your claims when work is done
70
- axmap release --agent my-agent --session my-session
71
- ```
62
+ **Validation**
72
63
 
73
- Use a unique agent name and session for each work session, and keep them consistent from claim to release.
74
- Set the `AXMAP_AGENT` and `AXMAP_SESSION` environment variables so commit hooks use the same identity.
75
- If a claim is rejected, check its owner, purpose, and remaining time, then choose a different area.
76
- Claim only the paths you need. For longer tasks, run `axmap renew` with the same agent and session.
64
+ On Windows, actual Codex 0.163.0 and agy 1.4.2 completed a four-turn automatic exchange with retained context, followed by a two-turn MCP background exchange.
65
+ These six model turns processed 102,590 tokens, including 54,400 cached input tokens and 393 output tokens. CLI context dominates short-message costs; budgets are checked before the next turn, not enforced as a hard limit within an active turn.
66
+ The separate interactive PTY prototype remains validated with simulated programs only.
67
+ [Read the development status →](docs/SESSION-BRIDGE.md)
77
68
 
78
- Work folders created with `git worktree` share the same ledger.
79
- `release` releases paths claimed by the current session.
69
+ ---
80
70
 
81
- ## How it works
71
+ ### 1.3.3
82
72
 
83
- Git detects text conflicts when changes are merged.
84
- axMap claims paths before edits to prevent agents from working on the same area at the same time.
73
+ <sub>October 16, 2026</sub>
85
74
 
86
- The claim ledger lives on a dedicated Git branch. axMap checks the latest remote ledger,
87
- then uses atomic Git ref updates and path overlap checks to acquire claims.
88
- Commit hooks compare staged changes with claimed paths.
89
- `axmap audit` replays the ledger history to check for rule violations.
75
+ **Windows setup connects npm-installed Codex correctly.**
90
76
 
91
- axMap reports unreadable state and refuses operations it cannot safely evaluate.
92
- The protocol is documented in [docs/SPEC.md](https://github.com/rl2aderjoon/axmap/blob/main/docs/SPEC.md), and its invariants in [docs/INVARIANTS.md](https://github.com/rl2aderjoon/axmap/blob/main/docs/INVARIANTS.md) (Korean).
77
+ **Fixed**
93
78
 
94
- ## Using AI tools
79
+ - `axmap setup` launches the Codex package's Node entry directly.
80
+ - Paths containing spaces and quoted arguments reach Codex without shell reinterpretation.
95
81
 
96
- With MCP connected, AI agents can call tools such as `ax_claim`, `ax_status`, and `ax_release`.
97
- Give your agents these working rules.
82
+ [Release source →](https://github.com/rl2aderjoon/axmap/tree/v1.3.3)
98
83
 
99
- ```text
100
- Before editing files, declare the paths and purpose with ax_claim.
101
- If a claim is rejected, check its owner and choose another task with no overlapping paths.
102
- Release your claims with ax_release when work is done.
103
- ```
84
+ ---
104
85
 
105
- See [mcp/README.md](https://github.com/rl2aderjoon/axmap/blob/main/mcp/README.md) for connection instructions and the tool list (Korean).
86
+ ### 1.3.2
106
87
 
107
- ## Development and verification
88
+ <sub>October 16, 2026</sub>
108
89
 
109
- ```bash
110
- git clone https://github.com/rl2aderjoon/axmap.git
111
- cd axmap
112
- node bin/axmap.mjs --version
113
- npm test
114
- npm run demo
115
- npm run demo:compare
116
- npm run demo:chaos
117
- ```
90
+ **Choose your messaging name. Discover teammates automatically.**
91
+
92
+ **Added**
93
+
94
+ - Interactive setup asks for a display name. Change it with `axmap setup --name "Your name"`.
95
+ - First use in a repository shares its Git email and your display name through the team's user ledger.
96
+ - `axmap bus contacts` lists known recipients.
97
+
98
+ **Updated**
99
+
100
+ - Messages sent to a known name are addressed by email, preserving delivery and read history after name changes.
101
+ - Duplicate names require an email address. Failed profile updates are reported and retried on later use.
102
+ - Git identity settings and voting permissions remain unchanged.
103
+
104
+ [Release source →](https://github.com/rl2aderjoon/axmap/tree/v1.3.2)
105
+
106
+ ---
107
+
108
+ ### 1.3.1
109
+
110
+ <sub>October 15, 2026</sub>
111
+
112
+ **One setup, from any folder.**
113
+
114
+ **Updated**
115
+
116
+ - Installation and MCP registration work outside Git repositories.
117
+ - Running setup in a folder does not pin future work to that repository.
118
+ - Registration refreshes server paths and environment settings while preserving personal settings and other servers.
119
+
120
+ Use `axmap setup --repo <path>` to prepare a specific repository's ledger and commit hook.
121
+
122
+ [Release source →](https://github.com/rl2aderjoon/axmap/tree/v1.3.1)
123
+
124
+ ---
125
+
126
+ ### 1.3.0
127
+
128
+ <sub>October 15, 2026</sub>
129
+
130
+ **Your session follows its working repository.**
131
+
132
+ **Added**
133
+
134
+ - Status and claim commands prepare missing ledgers automatically, removing the repeated `init` step.
135
+ - MCP follows client workspace roots and their change notifications.
136
+
137
+ **Updated**
118
138
 
119
- The root CLI runs without `npm install`. The demos require Bash.
120
- Use `node bin/axmap.mjs` to run the source version.
139
+ - Existing remote ledgers are reused, and linked worktrees share one ledger.
140
+ - Sessions in separate repositories keep independent targets.
141
+ - A remote access failure is never treated as an empty ledger.
121
142
 
122
- The following supporting documents are currently in Korean.
143
+ Use the MCP tool's `cwd` argument when roots are unavailable or the target is ambiguous.
144
+ Run `axmap hook install` in repositories that need commit enforcement.
123
145
 
124
- | Document | Contents |
125
- |---|---|
126
- | [CLAUDE.md](https://github.com/rl2aderjoon/axmap/blob/main/CLAUDE.md) | Rules for working on the source |
127
- | [docs/INSTALL.md](https://github.com/rl2aderjoon/axmap/blob/main/docs/INSTALL.md) | Installation and usage |
128
- | [docs/SPEC.md](https://github.com/rl2aderjoon/axmap/blob/main/docs/SPEC.md) | Commands and the claim protocol |
129
- | [docs/INVARIANTS.md](https://github.com/rl2aderjoon/axmap/blob/main/docs/INVARIANTS.md) | Invariants and verification criteria |
130
- | [docs/DECISIONS.md](https://github.com/rl2aderjoon/axmap/blob/main/docs/DECISIONS.md) | Product scope and design decisions |
146
+ [Release source →](https://github.com/rl2aderjoon/axmap/tree/v1.3.0)
131
147
 
132
- ## License
148
+ ---
133
149
 
134
- [MIT](https://github.com/rl2aderjoon/axmap/blob/main/LICENSE)
150
+ [Installation & upgrades](docs/INSTALL.md) · [Protocol](docs/SPEC.md) · [Report an issue](https://github.com/rl2aderjoon/axmap/issues) · [MIT license](LICENSE)
package/bin/axmap.mjs CHANGED
@@ -43,7 +43,7 @@ import {
43
43
  noticeLine,
44
44
  registryUrl,
45
45
  } from '../src/update.mjs'
46
- import { stateDir } from '../src/repotarget.mjs'
46
+ import { stateDir } from '../src/state.mjs'
47
47
  import { homeRegistrations } from '../src/mcpstate.mjs'
48
48
  import { compareBranchFor, formatOverlap } from '../src/overlap.mjs'
49
49
  import { withRepoLock } from '../src/repolock.mjs'
@@ -2599,7 +2599,7 @@ exec node "$AX" verify
2599
2599
  *
2600
2600
  * 🔴 **import 하지 않고 spawn 한다.** 이유가 둘이다.
2601
2601
  *
2602
- * 1. `tools/setup.mjs` 는 설치기를 부르느라 `app/lib/agentcli.mjs` 계열까지
2602
+ * 1. `tools/setup.mjs` 는 설치기를 부르느라 `src/agentcli.mjs` 계열까지
2603
2603
  * 끌고 온다. 여기서 static import 를 걸면 그 전부가 `src/closure.mjs` 의
2604
2604
  * import 그래프에 잡혀 **팀 저장소의 `ci/axmap/` 사본이 통째로 불어난다.**
2605
2605
  * 사본은 CI 가 판정에 쓰는 파일만 담기로 한 자리다.
@@ -2622,6 +2622,8 @@ exec node "$AX" verify
2622
2622
  * 두 군데 적으면 한 쪽만 고쳐지는 날이 온다.
2623
2623
  */
2624
2624
  const RUNNERS = {
2625
+ run: ['tools/run.mjs', '사용자가 여는 AI CLI를 연결한다'],
2626
+ bridge: ['tools/bridge.mjs', '열린 로컬 AI 세션에 작업을 전달한다'],
2625
2627
  gate: ['governance/gate.mjs', '이 MR 이 정족수를 채웠는가'],
2626
2628
  vote: ['governance/vote.mjs', '표를 던진다'],
2627
2629
  bus: ['tools/bus.mjs', '에이전트 사이 쪽지함'],
@@ -2764,7 +2766,7 @@ async function cmdUpdate(flags) {
2764
2766
  *
2765
2767
  * 🔴 자리를 여기서 새로 정하지 않는다 — `stateDir()` 을 쓴다. 그래야
2766
2768
  * `AXMAP_STATE_DIR` 이 여기에도 걸린다. 그 환경변수가 있는 이유가
2767
- * `src/repotarget.mjs` 에 적혀 있다 — *"테스트가 사람의 작업 환경을 고치는
2769
+ * `src/state.mjs` 에 적혀 있다 — *"테스트가 사람의 작업 환경을 고치는
2768
2770
  * 것은 어떤 이유로도 정당하지 않다."* `os.homedir()` 를 직접 부르면 이 명령의
2769
2771
  * 출력이 **돌리는 사람의 PC 상태에 따라 달라지고**, 그러면 시험이 사람마다
2770
2772
  * 다른 답을 낸다 (실제로 그렇게 깨졌다).
@@ -2831,6 +2833,8 @@ const HELP = `axmap - AI 에이전트 작업 선점 프로토콜
2831
2833
  axmap gate 이 MR 이 정족수를 채웠는가 (CI 가 부른다)
2832
2834
  axmap vote 표를 던진다
2833
2835
  axmap bus 에이전트 사이 쪽지함 (post · list · read · reply)
2836
+ axmap bridge 로컬 세션·자동 대화 (serve · sessions · send · chat · dialogue)
2837
+ axmap run agy [인수...] 연결된 Antigravity CLI를 직접 연다
2834
2838
  axmap mr-target 이 브랜치가 저 브랜치로 갈 수 있는가
2835
2839
  axmap version 브랜치 단계로 다음 버전을 정한다
2836
2840
  axmap promote 한 단계 위로 올리는 MR 을 만든다
@@ -2871,6 +2875,8 @@ if (boolFlag(flags.version, 'version') && !cmd) {
2871
2875
  switch (cmd) {
2872
2876
  // 이름을 경로로 바꿔 주는 것들 (RUNNERS). 인자는 손대지 않고 그대로 간다.
2873
2877
  case 'setup':
2878
+ case 'bridge':
2879
+ case 'run':
2874
2880
  case 'gate':
2875
2881
  case 'vote':
2876
2882
  case 'bus':