omp-superagent 0.1.8 → 0.1.10

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 (116) hide show
  1. package/DESIGN.md +16 -8
  2. package/README.ko.md +28 -374
  3. package/README.md +30 -421
  4. package/THIRD_PARTY_NOTICES.md +8 -8
  5. package/config.example.json +7 -0
  6. package/docs/OPERATIONS.en.md +2223 -0
  7. package/docs/OPERATIONS.md +164 -23
  8. package/docs/design/execution.md +164 -18
  9. package/docs/design/messaging.md +78 -17
  10. package/docs/kakao-bridge-protocol.md +193 -0
  11. package/docs/releases/0.1.10.md +17 -0
  12. package/docs/releases/0.1.9.md +18 -0
  13. package/gateway/bin/omp-gateway-darwin-arm64 +0 -0
  14. package/gateway/bin/omp-gateway-darwin-x64 +0 -0
  15. package/gateway/bin/omp-gateway-linux-arm64 +0 -0
  16. package/gateway/bin/omp-gateway-linux-x64 +0 -0
  17. package/host-owner/bin/notices/darwin-arm64/Cargo-LICENSES.txt +2 -0
  18. package/host-owner/bin/notices/darwin-arm64/Cargo-SOURCES.txt +2 -0
  19. package/host-owner/bin/notices/darwin-arm64/crates/bitflags-2.13.2/LICENSE-APACHE +201 -0
  20. package/host-owner/bin/notices/darwin-arm64/crates/bitflags-2.13.2/LICENSE-MIT +25 -0
  21. package/host-owner/bin/notices/darwin-arm64/crates/rustix-1.1.6/COPYRIGHT +29 -0
  22. package/host-owner/bin/notices/darwin-arm64/crates/rustix-1.1.6/LICENSE-APACHE +201 -0
  23. package/host-owner/bin/notices/darwin-arm64/crates/rustix-1.1.6/LICENSE-Apache-2.0_WITH_LLVM-exception +220 -0
  24. package/host-owner/bin/notices/darwin-arm64/crates/rustix-1.1.6/LICENSE-MIT +23 -0
  25. package/host-owner/bin/notices/darwin-x64/Cargo-LICENSES.txt +2 -0
  26. package/host-owner/bin/notices/darwin-x64/Cargo-SOURCES.txt +2 -0
  27. package/host-owner/bin/notices/darwin-x64/crates/bitflags-2.13.2/LICENSE-APACHE +201 -0
  28. package/host-owner/bin/notices/darwin-x64/crates/bitflags-2.13.2/LICENSE-MIT +25 -0
  29. package/host-owner/bin/notices/darwin-x64/crates/rustix-1.1.6/COPYRIGHT +29 -0
  30. package/host-owner/bin/notices/darwin-x64/crates/rustix-1.1.6/LICENSE-APACHE +201 -0
  31. package/host-owner/bin/notices/darwin-x64/crates/rustix-1.1.6/LICENSE-Apache-2.0_WITH_LLVM-exception +220 -0
  32. package/host-owner/bin/notices/darwin-x64/crates/rustix-1.1.6/LICENSE-MIT +23 -0
  33. package/host-owner/bin/notices/linux-arm64/Cargo-LICENSES.txt +3 -0
  34. package/host-owner/bin/notices/linux-arm64/Cargo-SOURCES.txt +3 -0
  35. package/host-owner/bin/notices/linux-arm64/crates/bitflags-2.13.2/LICENSE-APACHE +201 -0
  36. package/host-owner/bin/notices/linux-arm64/crates/bitflags-2.13.2/LICENSE-MIT +25 -0
  37. package/host-owner/bin/notices/linux-arm64/crates/linux-raw-sys-0.12.1/COPYRIGHT +29 -0
  38. package/host-owner/bin/notices/linux-arm64/crates/linux-raw-sys-0.12.1/LICENSE-APACHE +201 -0
  39. package/host-owner/bin/notices/linux-arm64/crates/linux-raw-sys-0.12.1/LICENSE-Apache-2.0_WITH_LLVM-exception +220 -0
  40. package/host-owner/bin/notices/linux-arm64/crates/linux-raw-sys-0.12.1/LICENSE-MIT +23 -0
  41. package/host-owner/bin/notices/linux-arm64/crates/rustix-1.1.6/COPYRIGHT +29 -0
  42. package/host-owner/bin/notices/linux-arm64/crates/rustix-1.1.6/LICENSE-APACHE +201 -0
  43. package/host-owner/bin/notices/linux-arm64/crates/rustix-1.1.6/LICENSE-Apache-2.0_WITH_LLVM-exception +220 -0
  44. package/host-owner/bin/notices/linux-arm64/crates/rustix-1.1.6/LICENSE-MIT +23 -0
  45. package/host-owner/bin/notices/linux-x64/Cargo-LICENSES.txt +3 -0
  46. package/host-owner/bin/notices/linux-x64/Cargo-SOURCES.txt +3 -0
  47. package/host-owner/bin/notices/linux-x64/crates/bitflags-2.13.2/LICENSE-APACHE +201 -0
  48. package/host-owner/bin/notices/linux-x64/crates/bitflags-2.13.2/LICENSE-MIT +25 -0
  49. package/host-owner/bin/notices/linux-x64/crates/linux-raw-sys-0.12.1/COPYRIGHT +29 -0
  50. package/host-owner/bin/notices/linux-x64/crates/linux-raw-sys-0.12.1/LICENSE-APACHE +201 -0
  51. package/host-owner/bin/notices/linux-x64/crates/linux-raw-sys-0.12.1/LICENSE-Apache-2.0_WITH_LLVM-exception +220 -0
  52. package/host-owner/bin/notices/linux-x64/crates/linux-raw-sys-0.12.1/LICENSE-MIT +23 -0
  53. package/host-owner/bin/notices/linux-x64/crates/rustix-1.1.6/COPYRIGHT +29 -0
  54. package/host-owner/bin/notices/linux-x64/crates/rustix-1.1.6/LICENSE-APACHE +201 -0
  55. package/host-owner/bin/notices/linux-x64/crates/rustix-1.1.6/LICENSE-Apache-2.0_WITH_LLVM-exception +220 -0
  56. package/host-owner/bin/notices/linux-x64/crates/rustix-1.1.6/LICENSE-MIT +23 -0
  57. package/host-owner/bin/omp-host-owner-darwin-arm64 +0 -0
  58. package/host-owner/bin/omp-host-owner-darwin-x64 +0 -0
  59. package/host-owner/bin/omp-host-owner-linux-arm64 +0 -0
  60. package/host-owner/bin/omp-host-owner-linux-x64 +0 -0
  61. package/package.json +10 -8
  62. package/skills/head/SKILL.md +28 -14
  63. package/skills/head/references/routing.md +23 -17
  64. package/skills/head/references/supervision.md +22 -1
  65. package/skills/lane/SKILL.md +11 -0
  66. package/skills/lane/references/workflow.md +17 -8
  67. package/src/cli.ts +6 -4
  68. package/src/config.ts +44 -3
  69. package/src/contracts.ts +101 -8
  70. package/src/discord-command-registration.ts +34 -186
  71. package/src/extension.ts +44 -6
  72. package/src/gateway-client.ts +11 -59
  73. package/src/gateway-protocol.ts +35 -1
  74. package/src/head-recovery.ts +226 -17
  75. package/src/host-extension.ts +132 -17
  76. package/src/host-protocol.ts +6 -9
  77. package/src/host-reply-voice.ts +181 -0
  78. package/src/lane-extension.ts +46 -8
  79. package/src/lane-models.ts +8 -0
  80. package/src/lane-report.ts +22 -0
  81. package/src/managed-ulw-probe.ts +22 -20
  82. package/src/message-order.ts +2 -1
  83. package/src/messenger-command-catalog.json +6 -3
  84. package/src/messenger-commands.ts +9 -2
  85. package/src/operator.ts +77 -0
  86. package/src/pr-github-schema.ts +2 -0
  87. package/src/pr-intake-automation.ts +1 -2
  88. package/src/pr-intake-comment.ts +1 -2
  89. package/src/pr-intake-fix.ts +1 -2
  90. package/src/pr-intake-github.ts +1 -2
  91. package/src/pr-intake-material.ts +1 -2
  92. package/src/pr-intake-tree.ts +1 -2
  93. package/src/pr-review-models.ts +28 -0
  94. package/src/result-attachment.ts +60 -79
  95. package/src/runtime.ts +1862 -298
  96. package/src/setup-profiles.ts +26 -65
  97. package/src/setup.ts +2 -1
  98. package/src/slack-command-registration.ts +48 -197
  99. package/src/soul.ts +214 -0
  100. package/src/store.ts +643 -55
  101. package/src/superkit-skills.ts +22 -0
  102. package/src/telegram-command-languages.json +17 -0
  103. package/src/telegram-command-registration.ts +32 -134
  104. package/src/worker-bridge.ts +21 -0
  105. package/src/worker-enrollment.ts +2 -1
  106. package/src/worker-host.ts +0 -24
  107. package/src/worker-serve-prepare.ts +19 -0
  108. package/src/worker-service.ts +51 -47
  109. package/scripts/ci.ts +0 -44
  110. package/scripts/release.ts +0 -112
  111. package/scripts/test-omp.sh +0 -44
  112. package/src/discord-commands.ts +0 -29
  113. package/src/discord-markdown.ts +0 -399
  114. package/src/slack-commands.ts +0 -18
  115. package/src/telegram-signal.ts +0 -14
  116. package/src/worker-stdio.ts +0 -61
@@ -1,8 +1,10 @@
1
1
  # 운영·설치 가이드
2
2
 
3
- [프로젝트 소개로 돌아가기](../README.md) · [설계](../DESIGN.md) ·
3
+ [프로젝트 소개로 돌아가기](../README.ko.md) · [English](OPERATIONS.en.md) · [설계](../DESIGN.md) ·
4
4
  [설정 예제](../config.example.json) · [출처·라이선스 고지](../THIRD_PARTY_NOTICES.md)
5
5
 
6
+ [설치](#1-로컬-준비--봇은-시작하지-않음) · [플랫폼별 앱](#2-플랫폼별-앱과-접근-범위) · [설정](#3-설정) · [일상 사용](#4-명령과-일상-사용) · [복구](#5-운영-범위와-복구-제약) · [개발자 검증](#6-개발자-검증)
7
+
6
8
  이 문서는 설치·설정·일상 제어와 복구 절차를 다룬다. 파일·코드 경로와 셸 명령은 별도
7
9
  설명이 없으면 **저장소 루트 기준**이다. npm 설치에서는 같은 관리 명령을
8
10
  `bun --no-env-file src/cli.ts` 대신 `omp-sa`로 실행하며 설정 파일은 사용자 작업 디렉터리에 둔다.
@@ -206,13 +208,13 @@ board_subscribe({channels: ["general", "repo:/absolute/repository"]})
206
208
  사용한다. 이 저장소는 OMP를 다운로드하거나 소스에서 빌드하지 않는다.
207
209
 
208
210
  ```sh
209
- bun add --global --trust omp-superagent@0.1.8
211
+ bun add --global --trust omp-superagent@0.1.10
210
212
  omp-sa --help
211
213
  ```
212
214
 
213
215
  `--trust`는 관리형 omp-superkit 준비 등 패키지 설치 스크립트를 허용한다.
214
216
  `bun pm bin --global`의 출력 경로를 PATH에 포함한다. Bun이 PATH에 있으면
215
- `npm install --global omp-superagent@0.1.8`도 사용할 수 있다.
217
+ `npm install --global omp-superagent@0.1.10`도 사용할 수 있다.
216
218
  설정은 설치 디렉터리가 아닌 사용자 작업 디렉터리에
217
219
  `omp-sa setup --config ./config.local.json`으로 만든다. 설치만으로 봇을 활성화하지 않는다.
218
220
 
@@ -244,7 +246,9 @@ export PATH="$PWD/.upstream/toolchain/node_modules/.bin:$PATH"
244
246
 
245
247
  설치에는 공식 [dbc-hbin/omp-superkit](https://github.com/dbc-hbin/omp-superkit)이 항상 포함된다.
246
248
  루트 `bun install`의 postinstall이 관리형 패키지를 준비한다. 활성화 검사는 배포된 native SDK의
247
- 실제 prompt composition을 사용한다. omp-superkit만 다시 준비할 때는 다음을 사용한다.
249
+ 실제 prompt composition을 사용한다. 최신 레이아웃에서는 `skill://super`와 `skill://super-*`의
250
+ 지침과 포인터를 검사하고, 기존 스킬 ID도 별칭으로 해석되는지 확인한다. 이전 레이아웃의 유효한
251
+ 설치는 그대로 사용할 수 있다. omp-superkit만 다시 준비할 때는 다음을 사용한다.
248
252
 
249
253
  ```sh
250
254
  bun run prepare:ulw
@@ -332,8 +336,10 @@ export DISCORD_BOT_TOKEN
332
336
  위 입력은 Bash에서 토큰이 화면과 명령 이력에 노출되지 않게 받는 예다.
333
337
  프로세스는 현재 사용자 권한과 환경을 사용한다. 레인과 worktree는 보안 샌드박스가 아니다.
334
338
 
335
- Discord 자동완성 목록은 명시적으로 등록한다. 먼저 새 interaction 처리 코드가 실행되는
336
- Gateway를 사용해야 한다. 작업 중인 헤드를 강제 종료해서 업데이트하지 않는다.
339
+ Discord 자동완성 목록은 명시적으로 등록한다. 명령을 등록하기 전에 Gateway와 HEAD 모두
340
+ 새 버전으로 실행 중이어야 한다. Gateway만 교체하면 기존 HEAD에 재연결될 수 있다.
341
+ Discord에서 `/help`를 보내 `/usage-reset`이 표시되는지 확인한다. 표시되지 않으면
342
+ 등록하지 말고 HEAD 업데이트를 먼저 마친다. 작업 중인 HEAD를 강제 종료하지 않는다.
337
343
 
338
344
  ```sh
339
345
  bun --no-env-file src/cli.ts discord-commands --config config.local.json
@@ -342,7 +348,7 @@ bun --no-env-file src/cli.ts discord-commands --config config.local.json --apply
342
348
 
343
349
  첫 명령은 읽기 전용 변경 확인이다. `--apply`는 **이 봇의 전역 명령 목록 전체를 교체**하므로
344
350
  전용 Superagent 앱에서만 사용한다. Hermes 전용 명령은 제거하고 `/head`를 포함한
345
- [공통 명령 목록](../src/messenger-command-catalog.json)만 등록한다.
351
+ [공통 명령 목록과 Discord 전용 `/usage-reset`](../src/messenger-command-catalog.json)을 등록한다.
346
352
  별도 guild 명령이 전역 명령을 가리는 경우 몰래 삭제하지 않고 충돌을 알린다.
347
353
  등록은 모델·메신저 연결을 시작하지 않으며 setup·doctor·start의 부수 효과로 실행되지 않는다.
348
354
  인수가 있는 명령은 선택적인 `text` 필드를 사용한다. 예를 들어 `/model`의 `text`에
@@ -476,11 +482,40 @@ export SLACK_BOT_TOKEN SLACK_APP_TOKEN
476
482
  ```
477
483
 
478
484
  Rust Gateway가 [Socket Mode](https://docs.slack.dev/apis/events-api/using-socket-mode/)와
479
- [Web API](https://docs.slack.dev/apis/web-api/)를 사용한다. 명령 등록 CLI는 Slack Web API SDK를 사용한다.
485
+ [Web API](https://docs.slack.dev/apis/web-api/)를 사용한다. 명령 등록은 같은 배포 파일의 일회성 Rust
486
+ REST 명령을 사용하며 Socket Mode나 Gateway 데몬을 시작하지 않는다.
480
487
  스레드 조회는 현재 공식 [conversations.replies](https://docs.slack.dev/reference/methods/conversations.replies/)
481
488
  문서의 bot history scopes를 따른다. bot token이면 채널 스레드를 무조건 조회할 수 없다는
482
489
  과거 제한을 전제로 하지 않는다. 실제 접근 권한·workspace 보존 정책·API rate limit은 여전히 적용된다.
483
490
 
491
+ ### 2.4 KakaoTalk (로컬 브리지, 주인 1:1 전용)
492
+
493
+ > **약관 위험.** 카카오톡에는 공식 봇 API가 없다. 개인 카카오 계정을 자동화하는 것은 카카오의
494
+ > 공식 연동이 아니며 이용약관 위반으로 계정 제한·정지를 받을 수 있다. 브리지를 고르고 운영하는
495
+ > 책임은 운영자에게 있다. 가능하면 별도 계정을 쓰고 다른 사람의 대화는 자동화하지 않는다.
496
+
497
+ 이 어댑터는 카카오에 **로그인하지 않고** 카카오 서버에 접속하지도 않는다. 운영자가 같은 컴퓨터에서
498
+ 직접 운영하는 **브리지**가 카카오 세션을 맡는다. 브리지는 주인 1:1 방에서 주인이 보낸 메시지만
499
+ 수신함에 기록하고 Gateway는 그 수신함을 읽는다. 답장은 주인 1:1 방으로만 보내는 브리지 발송
500
+ 경로로 나간다. 저장소에는 카카오에 연결하지 않는 [참조 브리지](../scripts/kakao-reference-bridge.ts)만
501
+ 들어 있다. 실제 브리지가 지켜야 할 요청·응답 형식과 보안 요구 사항은
502
+ [카카오 브리지 프로토콜](kakao-bridge-protocol.md)에 있다.
503
+
504
+ - 설정 예:
505
+ `"kakao": {"bridgeUrl":"http://127.0.0.1:PORT","tokenEnv":"KAKAO_SUPERAGENT_TOKEN","botUserId":"…","ownerId":"…","chatId":"…"}`.
506
+ `bridgeUrl`은 `127.0.0.1`이나 `[::1]` 숫자 주소만 허용한다(`localhost` 같은 호스트 이름 거부).
507
+ `botUserId`는 브리지 계정, `ownerId`는 주인, `chatId`는 둘의 1:1 방 ID다.
508
+ - `tokenEnv`가 가리키는 토큰은 이 인터페이스 전용으로 만든다. 24자 이상, `[A-Za-z0-9_-]`만
509
+ 쓴다. 브리지의 다른 기능을 여는 토큰을 재사용하지 않는다.
510
+ - 지원: 텍스트 수신과 답장(Markdown을 평문으로 바꾸고 1500자 단위로 분할), `/new` 같은 DM 명령.
511
+ 미지원: 스레드, 첨부, 반응, 확인 카드. 확인 카드가 필요하면 안내문을 보내고 **취소**한다(대신 수락하지 않음).
512
+ - 브리지의 대화방과 모든 메시지 조각의 카카오 발송 영수증을 확인해야 발송 완료로 기록한다.
513
+ 브리지 큐 접수나 일부만 발송된 응답은 완료가 아니다.
514
+ - 브리지가 `stale`로 표시한 메시지는 실행하지 않고 알림을 한 번 시도한다. 처음 연결하면 이전 기록을 재생하지 않는다.
515
+ - 단체방(`groupRooms`)은 kakao에서 허용하지 않는다. `omp-sa setup`은 kakao를 묻지 않으니 설정 파일에 직접 추가한다.
516
+ - 로컬 확인: `KAKAO_SUPERAGENT_TOKEN=… KAKAO_BOT_USER_ID=900 KAKAO_OWNER_CHAT_ID=777 KAKAO_OWNER_ID=42 bun scripts/kakao-reference-bridge.ts`로
517
+ 참조 브리지를 띄우면 첫 줄에 주소가 나온다. `POST /demo/owner-message`로 주인 메시지를 넣으면 답장이 터미널에 찍힌다.
518
+
484
519
  ### 메시지 수신·처리 중 반응
485
520
 
486
521
  새 레인이 필요한 작업은 범위와 작업 디렉터리를 확인한 뒤 배정된 스레드·topic에
@@ -696,7 +731,7 @@ Judge에서 지정하도록 권장**한다. 기존 전역·프로젝트·overlay
696
731
  `settings.json`/`agent.db`만 남아 실효 역할을 판정할 수 없으면 확인 불가로 안내한다.
697
732
  legacy 파일은 존재 여부만 확인하고 읽거나 이관하지 않는다. 명시적인 상위 layer의
698
733
  역할 선택·해제와 현행 전역 설정의 우선순위는 보존한다.
699
- 메신저 `/model`은 현재 헤드 모델 제어이고 관리 세션의 설정은 세션 전용이므로, 영속적인
734
+ 메신저 `/model`은 선택한 세션의 모델을 제어하므로, 영속적인
700
735
  judge 역할 설정을 대신하는 경로로 안내하지 않는다. 기존 구성의 토큰 갱신·취소·저장 실패에는
701
736
  이 검사와 권장을 실행하지 않는다.
702
737
 
@@ -813,7 +848,7 @@ CLI 실행 이름은 `omp-sa`다. 위의 전역 패키지 설치 또는 준비
813
848
  `omp-superagent`로 유지한다. 아래 소스 호출 방식도 같은 CLI이며, 두 방식 모두 `.env`
814
849
  자동 로딩을 끈다.
815
850
 
816
- 모든 관리 명령에 `--config FILE`이 필요하다. 먼저 봇을 시작하지 않는 진단을 실행한다.
851
+ 아래 관리 명령에는 `--config FILE`을 전달한다. 먼저 봇을 시작하지 않는 진단을 실행한다.
817
852
 
818
853
  ```sh
819
854
  bun --no-env-file src/cli.ts doctor --config config.local.json
@@ -883,6 +918,16 @@ launch 직후 소유권 기록 전 crash 등은 수동 조정까지 보류할
883
918
  계속한다. 레인은 메신저 자격 증명을 갖지 않는다. 여러 주제를 비교하거나 공유 HEAD에 명시적으로
884
919
  요청하려면 `/head 요청`(Slack `!head 요청`)을 사용한다.
885
920
 
921
+ **공유 답변 말투(SOUL)를 변경하려면** 헤드에게 새 메시지로
922
+ “앞으로 유능한 편집장처럼, 존댓말로 짧게 결론부터 해줘”라고 말하면 된다.
923
+ “이제부터 옆자리 선배처럼 차분하게 설명해 줘”도 가능하다. `SOUL:`은 필요 없다.
924
+ 연결된 작업 스레드에서만 기존 `/head`(Slack `!head`)로 헤드를 지정한다. 그 외
925
+ 스레드 메시지는 기존 레인으로 간다. “말투를 기본값으로 돌려줘”는 기본값을 복원한다.
926
+ HEAD 답변에서 저장한 리비전을 확인한다. 설정은 재시작 후에도 유지되고, 이후 새 HEAD 답변과
927
+ 레인의 직접 답변에 함께 적용된다. 작성 중인 답변, 내부 보고, 코드가 만드는 상태·승인 안내는
928
+ 바꾸지 않는다. “이번 답변만” 같은 요청도 저장하지 않는다. 컨셉은 현재 편집장형·멘토형·기본형을
929
+ 지원하며, 정체성·모델·도구·승인·워크플로는 그대로다.
930
+
886
931
  헤드에서 Mnemopi가 활성화되어 검색할 수 있으면, 다른 운영자 채널·DM에서도
887
932
  `지난주 로그인 버그 보던 데서 계속해줘`처럼 시점과 작업을 설명할 수 있다. 저장소 이름, 원래
888
933
  메시지 링크, `/new`는 필요 없다. 먼저 헤드 프로필의 **OMP Mnemopi `recall`**로 단서를 찾고,
@@ -963,30 +1008,48 @@ paused native lane goal도 재개한다. 자동 report·재연결·새 queued
963
1008
  기록과 고정 안내만 남기고 새 메시지로 제어하도록 요청한다. Slack의 `!` 제어도 같은 정책이다.
964
1009
  일반 작업 메시지 수정은 새 입력 revision이며 이미 실행된 외부 효과를 취소하지 않는다.
965
1010
 
966
- ### 헤드의 모델·effort
1011
+ ### 모델 선택과 헤드의 effort
967
1012
 
968
- 다음 명령은 DM·허용 채널·스레드에서 **현재 메인 헤드 세션**에 적용된다. 레인에 연결된
969
- 스레드에서도 그 레인이 아니라 헤드를 제어한다. Discord·Telegram은 일반 `/` 텍스트를,
1013
+ Discord에서는 레인 스레드에서 **`/model`만** 실행하면 된다. 첫 번째 드롭다운에서
1014
+ **HEAD** 또는 **현재 레인**을 고른다. 두 번째 드롭다운에서 공급자를 고르면 같은 자리에
1015
+ 해당 공급자의 모델 목록이 나온다. 마지막으로 모델을 선택해야 변경된다. 변경할 레인이
1016
+ 연결되어 있지 않은 대화에서는 HEAD만 선택할 수 있다.
1017
+ 텍스트로 모델 ID를 직접 보낼 때 `--lane`을 생략하면 레인 스레드에서도 **HEAD**가 바뀐다.
1018
+ Discord·Telegram은 일반 `/` 텍스트를,
970
1019
  Discord는 등록된 슬래시 명령을 함께 지원한다. Slack은 일반 `!model`·`!effort` 텍스트와
971
1020
  등록된 `/superagent-model`·`/superagent-effort`를 지원하며 별도 HTTP endpoint는 없다.
972
1021
 
973
1022
  | 명령 | 동작 |
974
1023
  | --- | --- |
975
- | `/model` | 현재 provider/model·effort 표시 및 공급자 → 모델 선택 메뉴 열기 |
1024
+ | `/model` | 모델 선택 메뉴 열기. Discord에서는 HEAD 또는 현재 레인을 선택하고, Telegram·Slack에서는 HEAD를 변경 |
976
1025
  | `/model list` | 현재 native 인증·활성화 상태에서 선택 가능한 chat 모델 목록 |
977
1026
  | `/model <provider/model>` | 목록의 정확한 provider/model로 헤드 모델 변경 |
1027
+ | `/model --lane <provider/id>` | 현재 대화에 연결된 유휴 레인의 모델만 직접 변경. HEAD 모델 호출이나 실패한 요청 재실행 없음 |
978
1028
  | `/effort` | 현재 effort 표시 및 현재 모델이 지원하는 강도 선택 메뉴 열기 |
979
1029
  | `/effort <level>` | 조회에 표시된 값으로 헤드 effort 변경 |
980
1030
  | `/model preset` 또는 `/model preset list` | 기존 native 프리셋의 이름·유효성·가용 기본 모델 조회 |
981
1031
  | `/model preset <name>` | 해당 native 프리셋의 전체 역할·기본 effort를 유휴 헤드 세션에 적용 |
982
1032
  | `/model preset <name> --global` | 현재 헤드에 적용·확인한 동일 snapshot을 native 전역 기본 역할·effort에도 저장 |
983
1033
 
1034
+ 레인 모델의 쿼터 소진이 확인되면 코드가 원래 대화에 한 번 알린다. 해당 레인의 후속 요청은
1035
+ 운영자가 모델을 선택할 때까지 기다린다. 실행 여부가 불확실한 요청은 원래 효과를 확인한 뒤
1036
+ 알림의 `/resolve --lane <input-id>`로 닫아야 한다. 일시적 429 등 그 밖의 실행 오류는
1037
+ HEAD가 원래 작업 범위에서 복구하며, 쿼터 소진만으로 HEAD 모델이나 전역 설정을 바꾸지 않는다.
1038
+ 모델 변경 응답이 유실되면 Discord에서는 **원래 레인 대화에서 `/model`을 새로 열고
1039
+ 현재 레인과 같은 공급자·모델을 다시 선택**한다. 직접 입력하려면 같은 대화에서
1040
+ `/model --lane <provider/id>`를 새로 보낸다. 이미 적용됐다면 다시 바꾸지 않고 확인하며,
1041
+ 실제 모델이나 소유권을 확인할 수 없으면 보류한다.
1042
+ 이후 직접 고른 모델을 이전 오류 보고가 덮어쓰지는 않는다.
1043
+ 수동 `/cron pr-review`에서 쿼터가 소진된 경우에도 해당 PR 스레드에서 모델을 바꿀 수 있다.
1044
+ 이때는 현재 레인을 선택하면 도구 없이 정적 검토가 가능한 모델만 표시한다.
1045
+ 같은 카드에서 HEAD를 선택하면 일반 모델 목록이 나온다. 무인 PR 검토에는 적용되지 않는다.
1046
+
984
1047
  Discord와 Slack은 드롭다운, Telegram은 인라인 버튼으로 표시한다. 메뉴를 열거나 페이지를
985
1048
  넘기는 것만으로는 아무 설정도 바뀌지 않는다. 메뉴는 5분 후 또는 Gateway가 재시작되면
986
1049
  만료된다. 강도 메뉴를 연 뒤 헤드 모델이 달라졌다면 다시 열어야 한다. 클릭 접수와 실제 변경
987
1050
  완료는 별개이며, 결과는 원래 대화에 별도로 표시된다. 텍스트 명령도 계속 사용할 수 있다.
988
1051
 
989
- 조회는 실행 중에도 모델 호출 없이 처리한다. 변경은 헤드가 유휴이고 승인·goal·백그라운드
1052
+ 조회는 실행 중에도 모델 호출 없이 처리한다. HEAD 변경은 헤드가 유휴이고 승인·goal·백그라운드
990
1053
  작업·소유 서비스·compaction·불확실한 제출이 없을 때만 처리한다. 바쁘면 거부하므로 작업이
991
1054
  정리된 뒤 새 명령을 보내야 한다. 변경을 위해 실행 중 작업을 자동 중단하지 않는다.
992
1055
  모델 변경 후 effort가 native 지원 범위에 맞춰 조정될 수 있으며 응답은 실제 readback 값을
@@ -1189,7 +1252,7 @@ head SHA를 사용한다. GitHub가 원자적으로 비교하는 값은 head SHA
1189
1252
  | `/restart` | 바쁜 헤드를 체크포인트한 뒤 Gateway와 헤드 교체. 원래 대화 ACK·실제 안전한 종료 확인, 같은 세션/모델 복원, 안전한 goal 재개. 레인은 유지하며 불확실한 효과는 보류 |
1190
1253
  | `/context` | 헤드 native 컨텍스트 사용량·한도 조회. 추정치·미상은 그대로 표시 |
1191
1254
  | `/usage` | 설정한 프로필의 순정 `omp usage`에서 제공자별 계정 한도·사용량·리셋 시각 조회. 세션 토큰·비용 통계가 아님 |
1192
- | `/usage reset` | 지금 쓸 수 있는 리셋권의 계정별·전체 개수 조회. 계정을 고른 뒤 Confirm을 눌러야 그 계정의 리셋권 1개 사용 |
1255
+ | `/usage-reset` (Discord), `/usage reset` (Telegram), `!usage reset` (Slack) | 지금 쓸 수 있는 리셋권의 계정별·전체 개수 조회. 계정을 고른 뒤 Confirm을 눌러야 그 계정의 리셋권 1개 사용 |
1193
1256
  | `/compact [보존할 내용]` | 유휴 헤드의 native 컨텍스트 압축. 여러 줄 보존 지시 전달 가능 |
1194
1257
  | `/stop` | 연결된 레인은 일시정지. 미배정 대화에서는 경로 질문이나 실행 중인 요청의 원문에 답장해 대상을 지정. 배정 대기와 HEAD 실행이 함께 있거나 수정본이 서로 다른 레인을 가리키면 임의로 중지하지 않고 같은 대화에서 안내 |
1195
1258
  | `/stop head` | 현재 주제와 무관하게 공유 헤드 작업 중단 |
@@ -1214,10 +1277,16 @@ Gateway는 헤드가 연속 **30분 이상 유휴**이고 native 컨텍스트
1214
1277
  CLI 조회 실패와 확인 가능한 한도가 없는 경우는 구분한다. Slack에서는 `!usage`
1215
1278
  또는 등록된 `/superagent-usage`를 사용한다.
1216
1279
 
1217
- `/usage reset`은 설치된 OMP CLI가 계정 지정 리셋권 사용을 지원할 때 동작한다.
1218
- 등록된 Discord `/usage`의 `text` 옵션에 `reset`을 입력하거나 Discord·Telegram 메시지로
1219
- `/usage reset`을 보낸다. Slack에서는 `!usage reset` 또는 `/superagent-usage reset`을 사용한다.
1220
- 등록된 명령의 옵션 갱신은 기존 명령 등록 절차를 따른다. `Codex · 계정 #7 · al…`처럼
1280
+ 리셋권 메뉴는 설치된 OMP CLI가 계정 지정 리셋권 사용을 지원할 때 동작한다.
1281
+ Discord 명령 목록과 허용된 일반 채팅에서는 인수 없는 `/usage-reset`만 사용한다.
1282
+ `/usage`는 인수 없는 한도 조회 전용이다. 예전 채팅의 `/usage reset`과 오래된 등록의
1283
+ `/usage text:reset`은 거부되며, 리셋권 메뉴를 열거나 모델·레인 작업을 시작하지 않는다.
1284
+ Gateway와 HEAD 업데이트 후 Discord `/help`에 `/usage-reset`이 표시되는지 확인한다.
1285
+ 그런 다음 `discord-commands` 읽기 전용 결과에서 `/usage-reset` 추가를 확인하고 위의 전역
1286
+ 등록 절차를 따른다. `/help` 확인 후에는 등록 전이라도 Discord에서 **일반 채팅 메시지**로
1287
+ `/usage-reset`을 보낼 수 있다(`requireAddressing`이 필요한 채널에서는 봇 멘션 또는 답장).
1288
+ Telegram에서는 `/usage reset`, Slack에서는 `!usage reset` 또는 `/superagent-usage reset`을 사용한다.
1289
+ `Codex · 계정 #7 · al…`처럼
1221
1290
  로컬 `omp usage reset`의 계정 지정 번호와 가능한 경우 짧게 마스킹한 계정·조직 이름을 표시한다.
1222
1291
  전체 이메일·제공자 계정 ID는 채팅에 넣지 않는다. 메뉴 열기·계정 선택·Cancel은 비용이 없다.
1223
1292
  확인 카드는 5분 뒤 만료되며 원래 대화의 운영자만 Confirm으로 한 번 사용할 수 있다. 사용 결과가 불확실하면
@@ -1278,6 +1347,15 @@ Slack 일반 메시지는 `!resolve [input-id]`를 사용한다.
1278
1347
  불명확한 것만으로는 풀지 않는다. 리셋권을 쓰거나, 테스트 모델 호출을 하거나,
1279
1348
  실패한 원래 작업을 다시 보내지 않는다. 다른 실패와 불확실한 외부 효과는 계속 보류한다.
1280
1349
 
1350
+ 모델 거절(`provider_refusal`)이나 제공자 오류처럼 도구를 하나도 시작하기 전에 끝난 헤드
1351
+ 요청은 같은 실행 기록(요청 하나, 도구 호출 없는 실패 응답, 사용량 기록뿐)으로 확인되면
1352
+ 보류하지 않고 실패로 닫으며, 다시 실행하지 않고 다음 요청을 처리한다(쿼터·사용량 한도 거절은
1353
+ 복구가 확인되기 전에는 재시작 뒤 `session_exit`나 모델 변경·어댑터 부재가 있어도 계속 보류한다). 재시작 뒤 이미
1354
+ 보류된 같은 종류의 입력도 복구 점검에서 닫는다(receipt 뒤에는 사용량 기록과 `session_exit` 같은
1355
+ custom 기록만 허용하고, 뒤에 메시지·새 실행·도구 시작이 있으면 계속 보류한다). 도구가 하나라도 시작됐거나 기록을 읽을 수
1356
+ 없으면 계속 보류하고, 실패 안내에 정확한 `/resolve <input-id>`를 적는다. 보류 중 새 헤드
1357
+ 메시지가 오면 막은 입력 ID와 `/resolve` 안내를 마커와 함께 한 트랜잭션에 저장해 한 번만 보낸다.
1358
+
1281
1359
  요청 결과가 불확실해지면 코드가 먼저 native 근거와 실행 신원을 대조하고, 판단 가능한 근거가
1282
1360
  있을 때 같은 헤드가 기존 native 세션에서 별도의 복구 판단 턴을 수행한다.
1283
1361
  다른 AI 감독자나 새 세션을 만들지 않으며 원래 요청도 다시 제출하지 않는다. 실행·goal·비동기
@@ -1446,6 +1524,65 @@ bun --no-env-file src/cli.ts uninstall --config config.local.json
1446
1524
  실패한 시작을 자동 반복하지 않는다. 등록 성공은 모든 crash 복구의 보장이 아니다.
1447
1525
  - Linux/systemd·Windows 서비스 설치와 Gateway crash 자동 재시작은 이 명령의 범위가 아니다.
1448
1526
 
1527
+ ### 원격 워커 추가
1528
+
1529
+ “이 저장소 Linux에서 테스트해”라고 했을 때 다른 머신에 레인을 열 수 있습니다.
1530
+ 메신저 계정과 봇 토큰은 **헤드에만** 둡니다. 양쪽 모두 `omp-sa worker`가 있는
1531
+ 빌드를 사용하세요. 아직 배포되지 않은 소스라면 이전 npm 버전 대신 [로컬 준비](#1-로컬-준비--봇은-시작하지-않음)의 소스 설치 방법을 따르세요.
1532
+
1533
+ 1. **워커에서:** [로컬 준비](#1-로컬-준비--봇은-시작하지-않음)에 따라 Git, Bun, stock OMP, `omp-superagent`를 설치합니다.
1534
+ 실행 파일과 `omp-superagent` 설치 경로는 등록할 작업용 checkout 밖에 있어야 하며,
1535
+ 다른 사용자가 해당 경로의 파일을 교체할 수 없어야 합니다.
1536
+ 작업할 계정에서 OMP 모델 인증과 네이티브 메모리 백엔드를 설정하세요. 워커에서는 셸 명령으로
1537
+ 가져오는 API 키와 원격 인증 브로커를 지원하지 않습니다. 메모리 백엔드가 없다면
1538
+ 예를 들어 `omp config set memory.backend mnemopi`를 사용할 수 있습니다. 같은 Git 저장소의 전용 clone을
1539
+ **요청할 커밋으로** 맞춥니다. 커밋만 받아 놓고 다른 브랜치에서 작업 중인 상태로는 부족합니다.
1540
+ 테일넷 등 사설망을 통해 이 계정의 **OpenSSH 서버**에 접속할 수 있어야 합니다.
1541
+ `authorized_keys`의 지정 명령 제한을 사용하므로 Tailscale SSH 자체의 로그인 정책으로 대체할 수 없습니다.
1542
+ 공개 포트, 두 번째 헤드, 워커에서의 `omp-sa setup`이나 `omp-sa start`는 필요 없습니다.
1543
+ 2. **헤드에서:** 워커 운영자와 SSH 호스트 키 지문을 확인한 뒤 `known_hosts`에 등록합니다.
1544
+ `~/.ssh/config` 별칭 대신 직접 접속할 수 있는 DNS 이름이나 IP를 사용하세요. Tailscale SSH가
1545
+ 22번 포트를 사용한다면 사설망에서 별도 포트로 수신하는 OpenSSH를 사용하세요. 해당 키는
1546
+ `known_hosts`의 `[호스트]:포트`에 고정하고, 두 번의 `worker add` 모두 `dev@linux-box:포트`를
1547
+ 지정합니다. 기본 SSH 포트를 쓸 때는 다음과 같습니다.
1548
+ ```sh
1549
+ omp-sa worker add dev@linux-box --config ./config.local.json
1550
+ ```
1551
+ 3. **워커에서 `dev` 계정으로:** 위 명령이 출력한 `worker init` 명령을 실행합니다.
1552
+ 생성된 헤드의 **공개키**는 그대로 두고 예시 경로만 실제 저장소로 바꾸세요.
1553
+ ```sh
1554
+ omp-sa worker init --head-key 'ssh-ed25519 …' --repo "$HOME/src/my-app"
1555
+ ```
1556
+ 지정된 워커 명령만 호출할 수 있는 전용 키가 `~/.ssh/authorized_keys`에 등록됩니다.
1557
+ 헤드의 개인 키·봇 토큰·설정 파일은 복사하지 마세요. 레인의 도구는 워커 OS 계정의
1558
+ 권한으로 실행되므로 다른 파일과 격리하려면 전용 계정을 사용하세요.
1559
+ 4. **다시 헤드에서:** 같은 `worker add` 명령을 실행합니다. 처음 안내가 나왔을 때가
1560
+ 아니라 **`verified`가 표시되어야 등록 완료**입니다. 특정 헤드 checkout의 새 레인에
1561
+ 이 워커를 우선 사용하려면 `--default --local-repo /헤드의/경로/my-app`을 붙입니다.
1562
+ `--local-repo`를 생략하면 설정의 `headCwd`를 사용합니다. 같은 Git 원격 주소라도
1563
+ 다른 checkout에 이 기본 배치 권한이 넘어가지는 않습니다.
1564
+
1565
+ 등록 목록은 `omp-sa worker list --config ./config.local.json`으로 확인합니다. 목록 조회는
1566
+ 워커에 접속하지 않습니다. 지금 연결되는지 확인하려면
1567
+ `omp-sa worker doctor dev@linux-box --config ./config.local.json`에 등록 때 쓴 주소와
1568
+ 포트를 그대로 지정하세요. 워커 신원과 빈 슬롯을 확인하며, 기본 워커라면 승인된 헤드
1569
+ checkout의 현재 커밋도 대조합니다. 확인이 막히면 종료 코드는 0이 아니며, 레인을 시작하지 않습니다.
1570
+
1571
+ 이제 채팅에서 원격 실행이나 필요한 OS를 지정하면 됩니다. 저장소는 폴더 이름이 아니라
1572
+ Git 원격 주소로 매칭합니다. 커밋하지 않은 변경과 무시된 파일을 동기화하지 않으므로
1573
+ 깨끗한 커밋을 기준으로 요청하세요. 실행 중인 레인이 해당 checkout을 예약하며
1574
+ 자동 fetch·브랜치 전환·변경 폐기는 하지 않습니다. 후속 요청은 같은 워커의 같은 세션으로 갑니다.
1575
+ SSH가 끊겨도 Host 자체는 종료되지 않습니다. Host가 종료된 뒤 checkout이 달라져 있으면
1576
+ 재기동은 보류됩니다. 답변과 승인 카드는 원래 대화로 돌아오지만 메신저 첨부파일 전달과
1577
+ 헤드의 로컬 SQLite 보드 접근은 원격 레인에서 지원하지 않습니다. 헤드의 OMP 실행 명령에
1578
+ 도구·프로필·승인 등의 추가 플래그가 있으면 이를 빼고 원격 실행하지 않고 요청을 거부합니다.
1579
+ 워커는 자동 로드 플러그인이 없는 전용 OMP 프로필을 사용하세요. `.omp/`, `.env`, Git 필터 등
1580
+ 실행 설정이 있는 checkout, linked worktree, 서브모듈은 자동으로 수정하거나 로드하지 않고 거부합니다.
1581
+ 커스텀 모델 확장이 필요하면 워커 OMP agent 디렉터리의 `worker-extensions.json`(`0600`)에
1582
+ 등록된 checkout 밖의 신뢰하는 모듈 절대경로를 JSON 배열로 적습니다. 배치된 위치는
1583
+ `omp-sa status --config ./config.local.json`에서 확인합니다. 접근을 철회할 때는
1584
+ 워커에서 **해당 등록 키만** 제거하세요. 키 제거가 이미 실행 중인 레인을 중단하지는 않습니다.
1585
+
1449
1586
  ## 5. 운영 범위와 복구 제약
1450
1587
 
1451
1588
  - 자율 작업은 기존 native task/job·goal·workflow owner를 사용하며 원래 허가 목표·source/route·
@@ -1461,10 +1598,13 @@ bun --no-env-file src/cli.ts uninstall --config config.local.json
1461
1598
  - 모든 플랫폼의 입력 첨부는 요청당 최대 10개, 개별 20 MiB, 합계 40 MiB다.
1462
1599
  선언 크기·실제 스트림 크기를 대조하며 redirect는 따르지 않는다.
1463
1600
  Telegram에서 `file_size`가 없으면 크기 미상(`null`)으로 저장한다. 알려진 0바이트와 구분하며,
1464
- 미상 크기도 실제 다운로드 바이트의 파일·요청·이미지 한도와 Gateway 완료 프레임을 검사한다.
1465
- PNG/JPEG/GIF/WebP는 내용 시그니처를 확인해 모델 이미지 입력으로 전달하고,
1601
+ 미상 크기도 실제 다운로드 바이트의 파일·요청·이미지 한도를 적용한다. Gateway가 전용 디렉터리에
1602
+ 파일을 저장하고 요청 전체가 완료되면 파일별 경로·SHA-256을 반환한다. HEAD는 요청 ID와
1603
+ 파일 순서로 영수증을 검증한다. PNG/JPEG/GIF/WebP는 내용 시그니처를 확인하며,
1604
+ 모델에 넘길 바이트의 SHA-256이 영수증과 다르면 요청을 취소한다.
1466
1605
  RPC base64 입력의 디코딩 후 이미지 데이터 합계는 별도로 8 MiB로 제한한다.
1467
1606
  그 밖의 파일은 로컬 경로를 제공한다. 임의 URL 다운로드·문서 자동 변환은 제공하지 않는다.
1607
+ Gateway 재시작 시에는 소유권과 형식이 확인된 미완료 다운로드만 정리한다. 완료된 첨부는 남는다.
1468
1608
  자격 증명·서명된 다운로드 URL은 모델 프롬프트에 넣지 않는다.
1469
1609
  안전한 다운로드에 실패하면 그 요청의 모델 실행을 시작하지 않는다.
1470
1610
  - Discord·Telegram 답장의 참조 ID·작성자·본문과 Telegram 선택 인용문을 head와 명시적 레인
@@ -1523,7 +1663,7 @@ bun --no-env-file src/cli.ts uninstall --config config.local.json
1523
1663
 
1524
1664
  ## 6. 개발자 검증
1525
1665
 
1526
- 원격 등록·레인 제어는 [워커 추가 절차](../README.ko.md#원격-워커-추가)로 설정한다.
1666
+ 원격 등록·레인 제어는 [워커 추가 절차](#원격-워커-추가)로 설정한다.
1527
1667
  OpenSSH 클라이언트·서버와 stock OMP가 설치되어 있으면 아래 명령으로 별도 머신 없이
1528
1668
  등록 → 원격 시작 → 연결 해제/재접속 → 후속 메시지와 답변 → 종료를 시험할 수 있다.
1529
1669
  임시 HOME과 전용 키, 루프백 `sshd`, 오프라인 모델을 사용한다. 실제 테일넷 연결이나
@@ -1604,6 +1744,7 @@ GitHub 소스 아카이브는 커밋된 소스만 담으며 설치할 때 현재
1604
1744
  owner를 빌드한다. npm `.tgz`는 네 플랫폼용 실행 파일과 라이선스 고지를 함께 담아 설치
1605
1745
  머신에서 Rust 빌드를 요구하지 않는다. 실제 실행에는 두 배포 모두 Bun과 별도 설치한 OMP가
1606
1746
  필요하다. 관리형 omp-superkit은 설치 단계에서 준비하며 아카이브에 내장하지 않는다.
1747
+ CI·기준판 테스트·릴리즈 스크립트는 소스 checkout 전용이며 npm 패키지에는 포함하지 않는다.
1607
1748
 
1608
1749
  `package.json`의 버전과 `docs/releases/<version>.md`를 준비하고 의도한 변경을 커밋한다.
1609
1750
  [CI의 네이티브 빌드 매트릭스](../.github/workflows/ci.yml)는 각 대상(`darwin-arm64`, `darwin-x64`,
@@ -1,6 +1,6 @@
1
1
  # Execution and coordination
2
2
 
3
- [Architecture](../../DESIGN.md) · [Messaging and authority](messaging.md) · [Operations](../OPERATIONS.md)
3
+ [Architecture](../../DESIGN.md) · [Messaging and authority](messaging.md) · [Operations](../OPERATIONS.en.md)
4
4
 
5
5
  ## Lane control
6
6
 
@@ -24,7 +24,7 @@ journal. An SSH disconnect is client detach, not cancellation, an exit receipt,
24
24
  or authority to reassign work. Open and attachment are separate from sending
25
25
  the first input. A pending or ambiguous launch must be reconciled on that
26
26
  worker, never retried on another machine. Remote PIDs and session paths are not
27
- local filesystem or board identities. See [worker enrollment](../../README.md#add-a-remote-worker).
27
+ local filesystem or board identities. See [worker enrollment](../OPERATIONS.en.md#add-a-remote-worker).
28
28
 
29
29
  When several workers qualify, placement accounts for both reported free slots
30
30
  and head assignments waiting to start. Concurrent admissions reserve their
@@ -51,7 +51,7 @@ references](../../skills/head/SKILL.md) for operating policy.
51
51
  | Tools | Authority and outcome |
52
52
  | --- | --- |
53
53
  | `lane_start` | Requires a durable user source, title, existing absolute cwd, exact model or native preset, model reason and kickoff. Accepts a bounded brief, acceptance criteria, and an authorized destination or workflow. At most one new lane per source. Returns the durable ID and admission state, not an execution or completion receipt. |
54
- | `lane_message` | Explicit follow-up with a real authorized `sourceId` and the target lane. Deduplicate by source and lane; check destination, attachment/quote scope and identity compatibility. The same source may reach existing lanes only where those routes and reporting are authorized. |
54
+ | `lane_message` | Explicit follow-up with a real authorized `sourceId` and the target lane. Deduplicate by source and lane; check destination, attachment/quote scope and identity compatibility. For a physical Discord work thread and a source from its exact guild parent, pin the HEAD-reviewed report route to that thread per handoff. This does not rebind the source or resume a paused lane. The same source may reach existing lanes only where those routes and reporting are authorized. |
55
55
  | `lane_inspect` | Lists records without a live probe; inspecting a specific lane adds live status where observable, model readback, queue blockers and observed progress. Null actual state is unknown, not a match. |
56
56
  | `lane_pause` | Takes a managed lane ID. Persists pause intent and requests an interrupt without claiming owned services or earlier effects are gone. |
57
57
  | `lane_resume` | Takes a managed lane ID and an authorized original `sourceId`. May reopen a paused native goal after checking native state; never releases an uncertain submission or revives cancelled work. |
@@ -85,6 +85,76 @@ runtime exposes observation timestamps and `ownerCurrent`, not a guarantee
85
85
  that a reported dependency is still live. Native children cannot use the
86
86
  manager, report as the lane, or access the board.
87
87
 
88
+ ### Bound-topic assignment scope review
89
+
90
+ An existing assignment can conflict with a later explicit owner correction.
91
+ Ordinary bound-topic requests and replies still stay in the lane. For a
92
+ standalone original owner message in the active bound topic, the root lane
93
+ may call `lane_report({status:"scope_review", sourceId})` **directly**, using
94
+ the current original source ID. The arguments cannot contain a target,
95
+ owner-text copy, or lane-authored explanation. A scope review is neither a
96
+ progress report nor a manager handoff. It has only an identity receipt from
97
+ the native tool result and appends no custom progress event.
98
+
99
+ The controller requires a matched native execution start and successful end
100
+ from the exact current root lane session, file, request and generation. It
101
+ rejects eval, `xd://`, custom-only or replayed receipts and fails closed on
102
+ steering ambiguity. It rechecks the authenticated original owner input and
103
+ its current topic binding independently. Both the review and corrective
104
+ prompt require a fresh Gateway check of the original messenger account; a
105
+ stored allowlist alone is insufficient after reconnect. A newer owner
106
+ message in the same topic takes precedence even if catch-up admitted the
107
+ older physical message last. Review requires exact trimmed owner text with
108
+ no detected credentials or excluded material, including quotes spanning
109
+ lines. Ineligible text stays in the bound lane; its
110
+ redacted or projected remainder cannot authorize a review. HEAD compares
111
+ the eligible text against the existing assignment and receives no lane
112
+ prose, quote, or attachment as part of the review.
113
+
114
+ If the original text explicitly supersedes the conflicting scope, the only
115
+ allowed dispatch is a direct `lane_message` to that same lane with its review
116
+ ID as `sourceId` and the exact verified owner text as `text`, without a
117
+ workflow or override. The controller may dispatch one fresh, deduplicated
118
+ corrective input only after the original lane run and HEAD review both
119
+ settle successfully. The correction applies only to that assignment, not to
120
+ tool availability, native approvals, operator settings, or other work. It
121
+ cannot replay denied or uncertain effects. The lane delivers the corrected
122
+ outcome on the original thread; HEAD does not echo the request or add a
123
+ second reply. If the correction is unsupported or unclear, HEAD gives one
124
+ bounded reason or clarification there, without dispatching work.
125
+
126
+ ### Failed lane requests
127
+
128
+ Confirmed provider quota exhaustion is an operator decision, not a recovery
129
+ prompt. The controller sends one notice on the authorized reply route and holds
130
+ new prompts on that lane until the operator selects a model in its bound topic
131
+ with `/model --lane <provider/id>` or the current-lane option on Discord's
132
+ `/model` card. If the model-change acknowledgement is lost, selecting the same
133
+ provider and model on a fresh card in the original conversation can reconcile
134
+ the pending change against the original session. A cold lane's subsequent
135
+ native application does not replace the receipt for the operator's original
136
+ choice. This does not change HEAD or replay the failed request. A transient
137
+ HTTP 429 or model-capacity error alone is not evidence of
138
+ exhausted account quota.
139
+
140
+ Other native execution errors, including in topic-owned work, go to HEAD for
141
+ recovery. Before forwarding a lost-response report, the controller checks the
142
+ original attached session for an exact settled receipt. If HEAD was busy, it
143
+ checks again before forwarding; if a settlement state read fails, the next
144
+ wake retries the read, not the prompt. A verified result supersedes the obsolete
145
+ report, including an informational report from an older session without a
146
+ verified owner. Such a report cannot authorize corrective work. Neither a
147
+ missing ACK nor a detached client authorizes resubmission.
148
+ A failed run proven to have started no local or provider-executed tools can close
149
+ as failed and permit HEAD to select an eligible fallback and send a fresh,
150
+ scoped correction. Recovery authority comes from HEAD's active report, not a
151
+ source ID supplied in a tool call. Cancellation of the original request or a
152
+ newer operator model selection invalidates the report, even if the model was
153
+ changed back. A correction keeps the original approval route. If a dialog is
154
+ first seen after reconnect and cannot be tied to that request, it stays on the
155
+ native Host rather than appearing in the lane thread. Uncertain effects stay
156
+ fenced; the report does not authorize a replay or a move to another lane.
157
+
88
158
  ## Execution budget and Host lifecycle
89
159
 
90
160
  [`maxHosts`, `maxSubagents`, and `idleMs`](../../src/config.ts) are explicit
@@ -106,6 +176,10 @@ journal persistence. An enabled native goal, including a paused one, can prevent
106
176
  shutdown. Do not infer eligibility from `agent_end`, an RPC disconnect, a saved
107
177
  file, or a lease alone. Release ownership and the slot only after actual native
108
178
  exit; a shutdown ACK is not exit. Reload the same native session when authorized.
179
+ A read-only ownership snapshot may resample the full evidence for the same
180
+ root after native child registration and attachment invalidate successive
181
+ reads. After at most two resamples, another change leaves ownership
182
+ unverified. Root mismatches, other failures and maintenance drains do not retry.
109
183
 
110
184
  The resident Rust owner speaks the stock JSONL/v2 protocol. Bun and the published SDK still
111
185
  prepare and publish the native session under its exact profile. One short-lived
@@ -121,6 +195,9 @@ queue restoration uses the SDK's reassembled-frame byte limit: this is the value
121
195
  [`maxResponseBytes` in OMP 19.0](https://github.com/can1357/oh-my-pi/blob/v19.0.0/packages/coding-agent/src/modes/rpc/rpc-frame.ts#L341-L347)
122
196
  and [`maxIntactFrameBytes` in 19.1](https://github.com/can1357/oh-my-pi/blob/v19.1.0/packages/coding-agent/src/modes/rpc/rpc-frame.ts#L341-L347).
123
197
  An intact queue must not be reported as truncated. No second Bun runtime stays resident per Host.
198
+ For SSH workers the enrolled forced command hands its stdio to the Rust relay.
199
+ Admission and Host attestation can use a short-lived helper; no Bun process
200
+ stays just to forward bytes. SSH EOF detaches only that connection.
124
201
  Gateway supervision reads the exact session, process and socket identity from a fresh handshake
125
202
  instead of fetching the same full state again on the new connection.
126
203
 
@@ -240,8 +317,31 @@ Each lane records a resolved model, selection reason, and the complete native
240
317
  role/thinking preset snapshot if a preset was selected. A later preset/global
241
318
  change does not change that snapshot. Resume and reconnect check native
242
319
  readback; unavailability or drift holds dispatch without silently selecting a
243
- different model. An authorized `lane_set_model` can change one eligible idle
244
- lane, with durable intent and readback. `config.model` is a head launch default,
320
+ different model. A running lane may accept OMP's selected retry fallback
321
+ without changing its durable configured model. The current model must match
322
+ the newest flagged `model_change` on the active native journal branch, and the
323
+ uninterrupted flagged chain must start at the configured model. The controller
324
+ queries the attached native owner for the leaf and entries, including for
325
+ remote workers; it does not open worker paths. Exact catalog IDs take precedence
326
+ over native selector suffixes. An unflagged ephemeral switch, including context
327
+ promotion, does not authorize another model.
328
+
329
+ Warm recovery and cold resume may both return the Host to the original model.
330
+ Normal readback recognizes that model directly without relying on a reverse
331
+ journal entry. A newly restored Host must confirm the configured model and
332
+ record its active journal cursor before using retry evidence. Only a flagged
333
+ row after that cursor on the active branch can authorize a fallback, even
334
+ across reconnects. A current owner/generation receipt and a notice, written
335
+ together, prevent the same row from re-authorizing drift after recovery or
336
+ owner replacement. The notice reports which model is selected, not which model
337
+ generated an answer. Frozen preset lanes remain excluded. An authorized
338
+ `lane_set_model` can change one eligible idle lane with durable intent and
339
+ returns that change's own readback. The managed Host fences ordinary lane
340
+ model switches as maintenance and rechecks native activity before invoking
341
+ the setter; a menu click cannot use an earlier idle observation to switch a
342
+ lane that has since started work. If the selected model is already running as a
343
+ temporary fallback, its presence in `get_state` is not proof that it will be
344
+ restored as the lane's selected model. `config.model` is a head launch default,
245
345
  not the lane default or a reason to overwrite a saved head's model on restart.
246
346
  Managed Hosts use private settings overlays, with native session-scope
247
347
  readback. Legacy lanes without a recorded selection adopt their authoritative
@@ -251,7 +351,9 @@ to recover a recorded session.
251
351
  This preserves existing native provider fallback and retry policy; it is not a
252
352
  guarantee about every lower-level provider request.
253
353
 
254
- `/model` and `/effort` target the shared head even when issued in a lane topic.
354
+ Direct `/model <provider/id>` and `/effort` target the shared head even in a
355
+ lane topic. Discord's `/model` card and the explicit `/model --lane` command
356
+ can instead target the lane bound to that conversation.
255
357
  Read-only queries can run while busy; mutations require native idle and session
256
358
  scope, record intent and report the actual applied model/effort. A current
257
359
  owner's explicit natural-language request can use `head_set_model` after its
@@ -267,6 +369,45 @@ the original topic, not a model turn or native approval. The head validates
267
369
  the menu's session and generation before applying it, and an effort selection
268
370
  also requires the model for which the options were shown.
269
371
 
372
+ ## Owner-facing reply voice
373
+
374
+ [SOUL](../../src/soul.ts) is an instance-wide presentation preference, not a
375
+ role, workflow, or OMP profile. The default and the one saved override use
376
+ bounded choices for presentational concept (plain, editorial, or mentoring),
377
+ tone, register, detail, answer order, and emoji. The HEAD
378
+ contract still defines its identity. The `soul_update` native tool checks the
379
+ current root HEAD session and a fresh, explicit original owner request. The
380
+ controller derives the supported combination from that exact message, not from
381
+ model-supplied fields. A plain request already addressed to HEAD does not need
382
+ a command or a SOUL keyword. Questions, one-off requests, quotes, edits,
383
+ derived input, and restricted-group messages cannot authorize a change. The
384
+ instance ledger owns the revision and readback. Choosing a concept does not
385
+ change any other setting by implication or establish a new role.
386
+
387
+ The controller supplies the current voice on new, eligible owner-facing
388
+ HEAD turns (including synthesis from a normal lane report) and on direct
389
+ topic-reply lane turns. It uses the admitted run's delivery scope, not message
390
+ content or the current channel. A steer inherits the opening run's scope:
391
+ joining an active manager handoff does not give the lane the reply voice.
392
+ The private owned Host takes only the closed voice profile and renders a
393
+ root-only, temporary system block. An opaque admission token is removed at
394
+ the stock input boundary; neither token nor style enters the user history,
395
+ lane brief, or global `PERSONALITY.md`. Native task children, internal control prompts,
396
+ structured replies, and code-generated notices do not use it. Settings apply
397
+ to the next eligible run on a capable resident Host, without reloading its
398
+ session or changing SUPER activation. Hosts advertising reply voice v2 also
399
+ receive the concept; v1 Hosts continue receiving the original style fields
400
+ without the concept. Hosts with no capability continue unstyled.
401
+
402
+ The prompt boundary was compared with [Cataly `d2cb7078`](https://github.com/vntrevx/Cataly/blob/d2cb7078033ccab27895515d4c566fe7ed4078de/extension/index.ts#L1274-L1295),
403
+ [OpenClaw `6978b40e`](https://github.com/openclaw/openclaw/blob/6978b40e9d3812083064c97e24de00454d6bf868/docs/concepts/system-prompt.md#L166-L185),
404
+ [Hermes `242315ce`](https://github.com/NousResearch/hermes-agent/blob/242315ce571cde721e717a544cf8ae6c343315cf/agent/system_prompt.py#L547-L553),
405
+ and [Dori `3b5487df`](https://github.com/vntrevx/omp-dori/blob/3b5487df12540cdd428ebcf7455375d72921e2dc/skills/dori-mode/SKILL.md#L65-L74).
406
+ These are design references, not prompt or code reuse. The stock OMP extension
407
+ and RPC contract was inspected at [v19.1.1](https://github.com/can1357/oh-my-pi/commit/31ffee513f27a01bba7d4dfbe12bae239cdc646a);
408
+ the installed Host advertises the optional bridge rather than inferring it
409
+ from a CLI version.
410
+
270
411
  ## Workflow selection
271
412
 
272
413
  The root role extensions add only their own role instructions to native context.
@@ -292,19 +433,21 @@ keyword interpretation; keep generated metadata fenced. Selection is
292
433
  serialized, not injected as steering. A conflict or missing advertised
293
434
  capability does not silently downgrade a selected SUPER request to ordinary work.
294
435
 
295
- SUPER's command, skill and native-keyword contracts are based on
436
+ SUPER's commands and defaults are based on
296
437
  [omp-superkit `c11a6e4e185f9c31f484a05a13528ef724337bc1`](https://github.com/dbc-hbin/omp-superkit/tree/c11a6e4e185f9c31f484a05a13528ef724337bc1).
438
+ [Revision `e8825367bed06985ccb1ee1e635dce850e22bbb9`](https://github.com/dbc-hbin/omp-superkit/tree/e8825367bed06985ccb1ee1e635dce850e22bbb9)
439
+ moved the workflow instructions into canonical skills and retained the original IDs as aliases.
297
440
  Use a leading invocation; the `/` is optional in request text. These are OMP
298
441
  extension commands, not registered messenger controls.
299
442
 
300
- | OMP command | `workflow.name` | Discoverable OMP skill | Default native keyword |
301
- | --- | --- | --- | --- |
302
- | `/super` | `super` | `skill://ultrawork` | None |
303
- | `/super-plan` | `super-plan` | `skill://ulw-plan` | `ultrathink` |
304
- | `/super-run` | `super-run` | `skill://ulw-execute` | `orchestrate` |
305
- | `/super-loop` | `super-loop` | `skill://ulw-loop` | `orchestrate` |
306
- | `/super-research` | `super-research` | `skill://ulw-research` | `workflowz` |
307
- | `/super-graph` | `super-graph` | `skill://mass-ulw` | `workflowz` |
443
+ | OMP command | `workflow.name` | Canonical OMP skill | Legacy skill | Default native keyword |
444
+ | --- | --- | --- | --- | --- |
445
+ | `/super` | `super` | `skill://super` | `skill://ultrawork` | None |
446
+ | `/super-plan` | `super-plan` | `skill://super-plan` | `skill://ulw-plan` | `ultrathink` |
447
+ | `/super-run` | `super-run` | `skill://super-run` | `skill://ulw-execute` | `orchestrate` |
448
+ | `/super-loop` | `super-loop` | `skill://super-loop` | `skill://ulw-loop` | `orchestrate` |
449
+ | `/super-research` | `super-research` | `skill://super-research` | `skill://ulw-research` | `workflowz` |
450
+ | `/super-graph` | `super-graph` | `skill://super-graph` | `skill://mass-ulw` | `workflowz` |
308
451
 
309
452
  Plain SUPER arms the session without selecting a specialty workflow or implicitly
310
453
  creating a goal in RPC. SUPER Graph selects the graph workflow, not plain SUPER
@@ -333,7 +476,10 @@ detection recognize both `omp-superkit` and the legacy `omp-ulw` package ID.
333
476
  Stage the observed revision and its dependencies in a project-owned immutable
334
477
  package. Ignore arbitrary dependency lifecycle scripts; run defined
335
478
  materialization and an [offline native prompt-composition probe](../../src/managed-ulw-probe.ts)
336
- for ordinary and explicitly activated operation. Serialize preparation via
479
+ for ordinary and explicitly activated operation. For the canonical layout the probe
480
+ checks that the hook uses the canonical directive and pointer paths and that native
481
+ discovery resolves both canonical skills and legacy aliases. An older revision
482
+ uses the full legacy skills instead. Serialize preparation via
337
483
  the update lock and atomically publish `active.json` only after validation.
338
484
  Once installed, activate only fast-forward revisions from the same source;
339
485
  retain the last valid active revision and report failures. Do not delete older
@@ -381,7 +527,7 @@ discarding custom commands or enabling disabled extensions.
381
527
  jobs remain inspectable and removable; pending runs are cancelled rather
382
528
  than forwarded to a model, and queued shell output is not sent. Verify any
383
529
  previously started legacy run on its original host before resolving it.
384
- See the [operator reference](../OPERATIONS.md#예약-작업-cron) for syntax and controls.
530
+ See the [operator reference](../OPERATIONS.en.md#scheduled-jobs-cron) for syntax and controls.
385
531
  - [Repository PR intake](../../src/cron-pr-intake.ts) is a typed cron job, not
386
532
  an executable prompt. Only original configured-owner Discord guild parent
387
533
  controls enroll a repository. Discovery pins the authenticated GitHub owner
@@ -403,7 +549,7 @@ discarding custom commands or enabling disabled extensions.
403
549
  effect checks the enrolled repository, original route and policy revision;
404
550
  higher stages require an explicit policy or a fresh SHA-bound owner command.
405
551
  An uncertain write permits read-only reconciliation, not resubmission. See [operator commands
406
- and supported GitHub protections](../OPERATIONS.md#새-외부-pr-검토-cron-pr-add).
552
+ and supported GitHub protections](../OPERATIONS.en.md#reviewing-new-external-prs-cron-pr-add).
407
553
  - [PR watch](../../src/pr-watch.ts) reads only explicitly registered GitHub PRs
408
554
  through existing `gh` authentication and GETs. Establish a quiet baseline,
409
555
  then record changed observations and their cursor together. Work only while