omp-superagent 0.1.11 → 0.1.15

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 (82) hide show
  1. package/DESIGN.md +21 -5
  2. package/README.ko.md +3 -1
  3. package/README.md +3 -1
  4. package/THIRD_PARTY_NOTICES.md +6 -0
  5. package/assets/architecture-dark.svg +4 -4
  6. package/assets/architecture.ko-dark.svg +4 -4
  7. package/assets/architecture.ko.svg +4 -4
  8. package/assets/architecture.mmd +5 -5
  9. package/assets/architecture.svg +4 -4
  10. package/config.example.json +1 -0
  11. package/docs/OPERATIONS.en.md +242 -31
  12. package/docs/OPERATIONS.md +225 -25
  13. package/docs/design/execution.md +161 -43
  14. package/docs/design/messaging.md +45 -9
  15. package/docs/releases/0.1.11.md +4 -2
  16. package/docs/releases/0.1.13.md +13 -0
  17. package/docs/releases/0.1.15.md +13 -0
  18. package/gateway/bin/omp-gateway-darwin-arm64 +0 -0
  19. package/gateway/bin/omp-gateway-darwin-x64 +0 -0
  20. package/gateway/bin/omp-gateway-linux-arm64 +0 -0
  21. package/gateway/bin/omp-gateway-linux-x64 +0 -0
  22. package/host-owner/bin/omp-host-owner-darwin-arm64 +0 -0
  23. package/host-owner/bin/omp-host-owner-darwin-x64 +0 -0
  24. package/host-owner/bin/omp-host-owner-linux-arm64 +0 -0
  25. package/host-owner/bin/omp-host-owner-linux-x64 +0 -0
  26. package/package.json +9 -3
  27. package/scripts/prepare-worker-memory.ts +37 -0
  28. package/scripts/upgrade-evidence-files.mjs +100 -0
  29. package/scripts/upgrade-evidence.mjs +192 -0
  30. package/scripts/upgrade-host-wire.mjs +162 -0
  31. package/skills/head/SKILL.md +22 -47
  32. package/skills/head/references/routing.md +11 -12
  33. package/skills/head/references/supervision.md +10 -14
  34. package/skills/lane/SKILL.md +14 -16
  35. package/skills/lane/references/workflow.md +14 -27
  36. package/src/cli.ts +59 -79
  37. package/src/config/config.ts +4 -0
  38. package/src/contracts.ts +34 -27
  39. package/src/cron/cron-jobs.ts +4 -3
  40. package/src/cron/cron-pr-intake.ts +1 -2
  41. package/src/extension.ts +57 -14
  42. package/src/gateway/gateway-client.ts +14 -12
  43. package/src/group/group-runner.ts +3 -2
  44. package/src/group-runner-extension.ts +7 -3
  45. package/src/host-extension.ts +109 -2
  46. package/src/host-sdk-helper.ts +12 -3
  47. package/src/lane/decision-tool.ts +2 -3
  48. package/src/lane/lane-report.ts +8 -30
  49. package/src/lane/lane-rows.ts +1 -1
  50. package/src/lane/workflow.ts +44 -3
  51. package/src/lane-extension.ts +5 -46
  52. package/src/messaging/discord-context.ts +8 -6
  53. package/src/omp/host-protocol.ts +4 -3
  54. package/src/omp/host.ts +24 -7
  55. package/src/omp/managed-super.ts +43 -27
  56. package/src/omp/native-sessions.ts +12 -0
  57. package/src/omp/worker-memory-import.ts +410 -0
  58. package/src/omp/worker-memory-sdk.ts +8 -0
  59. package/src/operator/setup.ts +8 -13
  60. package/src/operator/stop-lane.ts +25 -0
  61. package/src/pr/pr-github-schema.ts +9 -0
  62. package/src/pr/pr-github.ts +6 -2
  63. package/src/pr/pr-intake-automation.ts +11 -8
  64. package/src/pr/pr-intake-fix.ts +2 -5
  65. package/src/pr/pr-intake-review.ts +7 -7
  66. package/src/routing/topic-history.ts +2 -2
  67. package/src/runtime/controller.ts +444 -408
  68. package/src/runtime/head-recovery.ts +7 -7
  69. package/src/runtime/worker-memory.ts +156 -0
  70. package/src/storage/deferred-routing.ts +1 -7
  71. package/src/storage/store.ts +441 -375
  72. package/src/worker/worker-host.ts +3 -2
  73. package/src/worker/worker-ledger.ts +20 -11
  74. package/src/worker/worker-memory-page.ts +83 -0
  75. package/src/worker/worker-memory-proofs.ts +260 -0
  76. package/src/worker/worker-memory-source.ts +305 -0
  77. package/src/worker/worker-memory-storage.ts +130 -0
  78. package/src/worker/worker-profile.ts +2 -0
  79. package/src/worker/worker-repository.ts +92 -7
  80. package/src/worker/worker-request.ts +1 -0
  81. package/src/worker/worker-service.ts +25 -8
  82. package/src/worker/worker-wire.ts +20 -6
package/DESIGN.md CHANGED
@@ -4,10 +4,13 @@ Superagent connects one OMP head to Discord, Telegram, and Slack. The head can
4
4
  work directly or delegate to independent native OMP sessions called **lanes**.
5
5
  The Gateway keeps the messenger connection and durable intake alive without
6
6
  running a model. All configured messenger owners are the **same trusted operator**.
7
- Ordinary owner work stays in the native session bound to its topic. Unbound
8
- ordinary requests go to the shared HEAD model to answer directly or verify a
9
- workspace and assign work. Explicit placement, historical lookup and
10
- code-handled controls do not require a shared-model turn to route.
7
+ Ordinary work from the authenticated owner stays in the native session bound
8
+ to its topic. Direct, explicit instructions there can revise the lane's scope
9
+ or acceptance within its selected workspace, including through native steering,
10
+ without a HEAD review. Unbound ordinary requests go to the shared HEAD model
11
+ to answer directly or verify a workspace and assign work. Explicit placement,
12
+ historical lookup and code-handled controls do not require a shared-model turn
13
+ to route.
11
14
  In a [bound Discord work thread](docs/design/messaging.md#topic-routing-and-controls),
12
15
  historical continuation and its replies stay there unless the operator explicitly
13
16
  asks to split. Separately,
@@ -41,7 +44,7 @@ owns its durable state. Moving a module does not transfer authority to the Gatew
41
44
  | --- | --- | --- |
42
45
  | CLI and setup | Configuration, credentials, doctor, start/status/stop and one-shot macOS registration. | [CLI](src/cli.ts), [config](src/config/config.ts), [setup](src/operator/setup.ts), [credentials](src/config/credentials.ts), [autostart](src/operator/autostart.ts) |
43
46
  | Gateway | One Rust process authenticates the configured adapters, admits intake durably, proxies scoped messenger effects and supervises exactly one head. It never connects to lane RPC or decides work. | [Gateway](gateway/src/main.rs), [server](gateway/src/server.rs), [ingress ledger](gateway/src/store.rs), [client](src/gateway/gateway-client.ts), [adapter hub](gateway/src/adapter.rs) |
44
- | Head | Its controller owns intake, placement, approvals and delivery. The shared model handles ordinary unbound requests, explicit `/head` work and manager coordination, not ordinary bound-topic prompts or their answers. | [Head extension](src/extension.ts), [runtime](src/runtime/controller.ts), [coordination store](src/storage/store.ts) |
47
+ | Head | Its controller owns intake, placement, approval routing and delivery. The shared model handles ordinary unbound requests, explicit `/head` work and manager coordination. It does not review direct bound-topic scope revisions. | [Head extension](src/extension.ts), [runtime](src/runtime/controller.ts), [coordination store](src/storage/store.ts) |
45
48
  | Lane | Runs work in its own native session with its own cwd, model and context. Topic answers go through the controller outbox without a shared-model synthesis turn; manager handoffs report to the head. Neither sends directly to a messenger. | [Lane extension](src/lane-extension.ts), [lane reporting](src/lane/lane-report.ts), [role instructions](skills/lane/SKILL.md) |
46
49
  | Host | One installed OMP process owns each managed root session. A detached Rust process owns its stdin/stdout and private reconnectable socket; it does not run inference, tools, or supervision policy. | [Host client](src/omp/host.ts), [stdio owner](host-owner/src/main.rs), [SDK helper](src/host-sdk-helper.ts), [native lifecycle extension](src/host-extension.ts) |
47
50
 
@@ -107,6 +110,19 @@ part of the native build.
107
110
  no `KeepAlive`, immediate activation, or second supervisor. `uninstall` removes
108
111
  only future startup. There is no Linux service installer or Windows support.
109
112
 
113
+ An [in-place package update](docs/OPERATIONS.en.md#update-an-existing-installation)
114
+ requires verified shutdown of every Gateway and resident Host using that installation.
115
+ Capture live identity from the physical socket before stopping. A local lane stop must
116
+ match the selected instance, recorded socket and native session on the connection that
117
+ sends the shutdown. Match the exact process, session and physical journal to a fresh
118
+ Host exit receipt and independently verify process exit.
119
+ Restore only previously running Gateways. A positively sleeping HEAD has no resident
120
+ process to stop; explicit start of its previously running Gateway resumes the same session.
121
+ Starting with 0.1.11, Rust owners verify journal persistence and flushed observations
122
+ in-process. A 0.1.10 owner must finish using its original helper before replacement.
123
+ The new installation cannot authenticate the old helper's `exit` request and does not
124
+ publish a receipt for it. Replacing the files does not release an already-fenced owner.
125
+
110
126
  ### Idle HEAD hibernation
111
127
 
112
128
  `headIdleMs` controls how long a fully idle HEAD stays resident (default 30
package/README.ko.md CHANGED
@@ -45,7 +45,9 @@
45
45
 
46
46
  ## 빠른 시작
47
47
 
48
- ### 1. 설치
48
+ ### 1. 처음 설치
49
+
50
+ **이미 설치했다면** [업데이트 절차](docs/OPERATIONS.md#기존-설치-업데이트)를 따르세요. 실제 소유 정보를 기록하고 해당 프로세스의 정상 종료를 확인한 뒤 파일을 교체하세요. 새 CLI로 업데이트 전 실행 중이던 Gateway만 다시 시작하세요. 종료 요청의 수락 응답만으로는 충분하지 않습니다.
49
51
 
50
52
  macOS 또는 Linux(arm64·x64), [Bun 1.4.4 이상](https://bun.sh), 별도로 설치한 [순정 OMP](https://github.com/can1357/oh-my-pi#install)가 필요합니다. 모델 제공자 인증은 OMP에서 설정하세요.
51
53
 
package/README.md CHANGED
@@ -46,7 +46,9 @@
46
46
 
47
47
  ## Quick start
48
48
 
49
- ### 1. Install
49
+ ### 1. First install
50
+
51
+ **Already installed?** Follow the [update procedure](docs/OPERATIONS.en.md#update-an-existing-installation): capture live owners, stop the verified processes before replacing files, and restart only previously running Gateways using the upgraded CLI. A shutdown ACK alone is not enough.
50
52
 
51
53
  Use macOS or Linux (arm64 or x64), [Bun 1.4.4+](https://bun.sh), and a separately installed [stock OMP](https://github.com/can1357/oh-my-pi#install). Authenticate your model provider in OMP.
52
54
 
@@ -25,6 +25,12 @@ binary: `host-owner/bin/notices/<platform>-<arch>/` or
25
25
 
26
26
  ## oh-my-pi: adapted code and artwork
27
27
 
28
+ - The opt-in worker memory import verifies Mnemopi's project-bank naming
29
+ contract from [`mnemopi/config.ts` in v19.2.1](https://github.com/can1357/oh-my-pi/blob/b55cd1bb664d8ab46ddc77f2a34eb47555dbf1ac/packages/coding-agent/src/mnemopi/config.ts).
30
+ `scripts/prepare-worker-memory.ts` builds the small embedded-CLI helper
31
+ locally from the installed MIT-licensed `@oh-my-pi/pi-coding-agent` and
32
+ `@oh-my-pi/pi-mnemopi` dependencies;
33
+ the generated module is not part of either distribution.
28
34
  - `src/host-extension.ts` adapts the `get_state` projection from
29
35
  [`rpc-mode.ts` in v18.22.0](https://github.com/can1357/oh-my-pi/blob/3e8cff3b7ce19a805c11a26a6dd1703066435851/packages/coding-agent/src/modes/rpc/rpc-mode.ts).
30
36
  - `host-owner/src/wire.rs` adapts the wire limits, v1 shrink thresholds, and
@@ -1,6 +1,6 @@
1
1
  <svg xmlns="http://www.w3.org/2000/svg" width="960" height="430" viewBox="0 0 960 430" role="img" aria-labelledby="architecture-title architecture-desc" font-family="system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif">
2
2
  <title id="architecture-title">One always-on service, one OMP head, independent lane sessions</title>
3
- <desc id="architecture-desc">Discord, Telegram, and Slack connect to the Gateway, which relays requests and replies through the head controller. The controller routes bound-topic prompts and replies without a head model turn. The head assigns work directly to independent lane sessions. Manager handoff results, decisions addressed to HEAD, and source-bound scope reviews return through the controller.</desc>
3
+ <desc id="architecture-desc">Discord, Telegram, and Slack connect to the Gateway. The head controller routes bound-topic owner work and replies without a head model turn, including changes to the lane's work within its workspace. The head coordinates independent lanes and reviews manager handoff results and decisions addressed to it.</desc>
4
4
  <defs>
5
5
  <linearGradient id="hero" x1="0" y1="0" x2="1" y2="0"><stop offset="0" stop-color="#fc49c6"/><stop offset="0.5" stop-color="#b47cff"/><stop offset="1" stop-color="#57e6fb"/></linearGradient>
6
6
  <marker id="flow-arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto" markerUnits="userSpaceOnUse"><path d="M0 0 10 5 0 10Z" fill="#a49bbd"/></marker>
@@ -38,7 +38,7 @@
38
38
  <text x="542" y="167" font-size="22" font-weight="700" text-anchor="middle" fill="#d6b2ff">OMP Head</text>
39
39
  <text x="542" y="195" font-size="16" text-anchor="middle" fill="#b7aecb">model + controller</text>
40
40
  <text x="542" y="222" font-size="16" text-anchor="middle" fill="#b7aecb">decides · works</text>
41
- <text x="542" y="250" font-size="15" font-weight="600" text-anchor="middle" fill="#d6b2ff">Head-only lane control</text>
41
+ <text x="542" y="250" font-size="15" font-weight="600" text-anchor="middle" fill="#d6b2ff">Lane coordination</text>
42
42
  </g>
43
43
  <g>
44
44
  <rect x="754" y="80" width="182" height="108" rx="14" fill="#17141f" stroke="#3f3854" stroke-width="1.5"/>
@@ -58,7 +58,7 @@
58
58
  <path d="M24 360H49" fill="none" stroke="#bb86ff" stroke-width="2.4" marker-end="url(#control-arrow)"/>
59
59
  <text x="60" y="365" font-size="16" fill="#b7aecb">HEAD to lane: lane_start or lane_message</text>
60
60
  <path d="M24 383H49" fill="none" stroke="#a49bbd" stroke-width="1.8" marker-end="url(#flow-arrow)"/>
61
- <text x="60" y="388" font-size="16" fill="#b7aecb">Lane to HEAD: delegated results, decisions for HEAD, and source-bound scope reviews</text>
62
- <text x="60" y="411" font-size="16" fill="#b7aecb">The controller routes bound-topic prompts and replies without a HEAD model turn.</text>
61
+ <text x="60" y="388" font-size="16" fill="#b7aecb">Lane to HEAD: delegated results and decisions for HEAD</text>
62
+ <text x="60" y="411" font-size="16" fill="#b7aecb">Direct bound-topic work, including scope changes, needs no HEAD model turn.</text>
63
63
  </g>
64
64
  </svg>
@@ -1,6 +1,6 @@
1
1
  <svg xmlns="http://www.w3.org/2000/svg" width="960" height="430" viewBox="0 0 960 430" role="img" aria-labelledby="architecture-title architecture-desc" font-family="system-ui, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', 'Noto Sans CJK KR', 'Segoe UI', sans-serif">
2
2
  <title id="architecture-title">상시 실행 서비스 하나, OMP 헤드 하나, 독립 레인 세션</title>
3
- <desc id="architecture-desc">Discord, Telegram, Slack의 요청과 답변은 Gateway와 헤드 컨트롤러를 거칩니다. 연결된 주제의 일반 요청과 답변은 헤드 모델을 호출하지 않고 처리합니다. 헤드는 독립 레인 세션에 직접 작업을 맡깁니다. 위임 작업 결과, 헤드에 보낸 질문, 원본 메시지에 연결된 범위 검토 요청은 컨트롤러를 거쳐 헤드에 전달됩니다.</desc>
3
+ <desc id="architecture-desc">Discord, Telegram, Slack은 Gateway에 연결됩니다. 헤드 컨트롤러는 연결된 주제에서 운영자가 직접 보낸 요청과 작업공간 내 범위 변경, 그에 대한 답변을 헤드 모델 호출 없이 전달합니다. 헤드는 독립 레인을 조율하고 위임 작업 결과와 헤드에 보낸 질문을 검토합니다.</desc>
4
4
  <defs>
5
5
  <linearGradient id="hero" x1="0" y1="0" x2="1" y2="0"><stop offset="0" stop-color="#fc49c6"/><stop offset="0.5" stop-color="#b47cff"/><stop offset="1" stop-color="#57e6fb"/></linearGradient>
6
6
  <marker id="flow-arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto" markerUnits="userSpaceOnUse"><path d="M0 0 10 5 0 10Z" fill="#a49bbd"/></marker>
@@ -38,7 +38,7 @@
38
38
  <text x="542" y="167" font-size="22" font-weight="700" text-anchor="middle" fill="#d6b2ff">OMP 헤드</text>
39
39
  <text x="542" y="195" font-size="16" text-anchor="middle" fill="#b7aecb">모델 + 컨트롤러</text>
40
40
  <text x="542" y="222" font-size="16" text-anchor="middle" fill="#b7aecb">판단 · 작업</text>
41
- <text x="542" y="250" font-size="15" font-weight="600" text-anchor="middle" fill="#d6b2ff">레인 제어는 헤드만</text>
41
+ <text x="542" y="250" font-size="15" font-weight="600" text-anchor="middle" fill="#d6b2ff">레인 조율</text>
42
42
  </g>
43
43
  <g>
44
44
  <rect x="754" y="80" width="182" height="108" rx="14" fill="#17141f" stroke="#3f3854" stroke-width="1.5"/>
@@ -58,7 +58,7 @@
58
58
  <path d="M24 360H49" fill="none" stroke="#bb86ff" stroke-width="2.4" marker-end="url(#control-arrow)"/>
59
59
  <text x="60" y="365" font-size="16" fill="#b7aecb">헤드에서 레인으로: lane_start 또는 lane_message</text>
60
60
  <path d="M24 383H49" fill="none" stroke="#a49bbd" stroke-width="1.8" marker-end="url(#flow-arrow)"/>
61
- <text x="60" y="388" font-size="16" fill="#b7aecb">레인에서 헤드로: 위임 작업 결과, 헤드에 보낸 질문, 원본 메시지에 연결된 범위 검토 요청</text>
62
- <text x="60" y="411" font-size="16" fill="#b7aecb">컨트롤러는 연결된 주제의 일반 요청과 답변을 헤드 모델 호출 없이 처리합니다.</text>
61
+ <text x="60" y="388" font-size="16" fill="#b7aecb">레인에서 헤드로: 위임 작업 결과와 헤드에 보낸 질문</text>
62
+ <text x="60" y="411" font-size="16" fill="#b7aecb">연결된 주제에서 운영자가 직접 지시한 작업과 범위 변경에는 헤드 모델 호출이 필요 없습니다.</text>
63
63
  </g>
64
64
  </svg>
@@ -1,6 +1,6 @@
1
1
  <svg xmlns="http://www.w3.org/2000/svg" width="960" height="430" viewBox="0 0 960 430" role="img" aria-labelledby="architecture-title architecture-desc" font-family="system-ui, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', 'Noto Sans CJK KR', 'Segoe UI', sans-serif">
2
2
  <title id="architecture-title">상시 실행 서비스 하나, OMP 헤드 하나, 독립 레인 세션</title>
3
- <desc id="architecture-desc">Discord, Telegram, Slack의 요청과 답변은 Gateway와 헤드 컨트롤러를 거칩니다. 연결된 주제의 일반 요청과 답변은 헤드 모델을 호출하지 않고 처리합니다. 헤드는 독립 레인 세션에 직접 작업을 맡깁니다. 위임 작업 결과, 헤드에 보낸 질문, 원본 메시지에 연결된 범위 검토 요청은 컨트롤러를 거쳐 헤드에 전달됩니다.</desc>
3
+ <desc id="architecture-desc">Discord, Telegram, Slack은 Gateway에 연결됩니다. 헤드 컨트롤러는 연결된 주제에서 운영자가 직접 보낸 요청과 작업공간 내 범위 변경, 그에 대한 답변을 헤드 모델 호출 없이 전달합니다. 헤드는 독립 레인을 조율하고 위임 작업 결과와 헤드에 보낸 질문을 검토합니다.</desc>
4
4
  <defs>
5
5
  <linearGradient id="hero" x1="0" y1="0" x2="1" y2="0"><stop offset="0" stop-color="#e23cb4"/><stop offset="0.5" stop-color="#9c4ffb"/><stop offset="1" stop-color="#22b8d4"/></linearGradient>
6
6
  <marker id="flow-arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto" markerUnits="userSpaceOnUse"><path d="M0 0 10 5 0 10Z" fill="#6f6787"/></marker>
@@ -38,7 +38,7 @@
38
38
  <text x="542" y="167" font-size="22" font-weight="700" text-anchor="middle" fill="#7a2bd6">OMP 헤드</text>
39
39
  <text x="542" y="195" font-size="16" text-anchor="middle" fill="#5c5470">모델 + 컨트롤러</text>
40
40
  <text x="542" y="222" font-size="16" text-anchor="middle" fill="#5c5470">판단 · 작업</text>
41
- <text x="542" y="250" font-size="15" font-weight="600" text-anchor="middle" fill="#7a2bd6">레인 제어는 헤드만</text>
41
+ <text x="542" y="250" font-size="15" font-weight="600" text-anchor="middle" fill="#7a2bd6">레인 조율</text>
42
42
  </g>
43
43
  <g>
44
44
  <rect x="754" y="80" width="182" height="108" rx="14" fill="#ffffff" stroke="#cfc7de" stroke-width="1.5"/>
@@ -58,7 +58,7 @@
58
58
  <path d="M24 360H49" fill="none" stroke="#8f3ff0" stroke-width="2.4" marker-end="url(#control-arrow)"/>
59
59
  <text x="60" y="365" font-size="16" fill="#5c5470">헤드에서 레인으로: lane_start 또는 lane_message</text>
60
60
  <path d="M24 383H49" fill="none" stroke="#6f6787" stroke-width="1.8" marker-end="url(#flow-arrow)"/>
61
- <text x="60" y="388" font-size="16" fill="#5c5470">레인에서 헤드로: 위임 작업 결과, 헤드에 보낸 질문, 원본 메시지에 연결된 범위 검토 요청</text>
62
- <text x="60" y="411" font-size="16" fill="#5c5470">컨트롤러는 연결된 주제의 일반 요청과 답변을 헤드 모델 호출 없이 처리합니다.</text>
61
+ <text x="60" y="388" font-size="16" fill="#5c5470">레인에서 헤드로: 위임 작업 결과와 헤드에 보낸 질문</text>
62
+ <text x="60" y="411" font-size="16" fill="#5c5470">연결된 주제에서 운영자가 직접 지시한 작업과 범위 변경에는 헤드 모델 호출이 필요 없습니다.</text>
63
63
  </g>
64
64
  </svg>
@@ -1,15 +1,15 @@
1
1
  flowchart LR
2
2
  M["Messengers<br/>Discord · Telegram · Slack"]
3
3
  G["Gateway<br/>Always-on service<br/>Admit · route · reply"]
4
- H["OMP Head<br/>Model + controller<br/>Bound topics bypass the model"]
4
+ H["OMP Head<br/>Model + controller<br/>Coordinates lanes"]
5
5
  A["Lane A<br/>Independent session<br/>repo / topic A"]
6
6
  B["Lane B<br/>Independent session<br/>repo / topic B"]
7
7
  M --> G
8
8
  G --> H
9
- H -->|"lane_start / lane_message"| A
10
- H -->|"lane_start / lane_message"| B
11
- A -->|"Manager results / decisions for HEAD / scope reviews"| H
12
- B -->|"Manager results / decisions for HEAD / scope reviews"| H
9
+ H -->|"Bound owner work via controller / HEAD handoff"| A
10
+ H -->|"Bound owner work via controller / HEAD handoff"| B
11
+ A -->|"Topic replies via controller / manager results / HEAD decisions"| H
12
+ B -->|"Topic replies via controller / manager results / HEAD decisions"| H
13
13
  H --> G
14
14
  G --> M
15
15
  classDef head fill:#faf3ff,stroke:#9c4ffb,color:#7a2bd6,stroke-width:2px
@@ -1,6 +1,6 @@
1
1
  <svg xmlns="http://www.w3.org/2000/svg" width="960" height="430" viewBox="0 0 960 430" role="img" aria-labelledby="architecture-title architecture-desc" font-family="system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif">
2
2
  <title id="architecture-title">One always-on service, one OMP head, independent lane sessions</title>
3
- <desc id="architecture-desc">Discord, Telegram, and Slack connect to the Gateway, which relays requests and replies through the head controller. The controller routes bound-topic prompts and replies without a head model turn. The head assigns work directly to independent lane sessions. Manager handoff results, decisions addressed to HEAD, and source-bound scope reviews return through the controller.</desc>
3
+ <desc id="architecture-desc">Discord, Telegram, and Slack connect to the Gateway. The head controller routes bound-topic owner work and replies without a head model turn, including changes to the lane's work within its workspace. The head coordinates independent lanes and reviews manager handoff results and decisions addressed to it.</desc>
4
4
  <defs>
5
5
  <linearGradient id="hero" x1="0" y1="0" x2="1" y2="0"><stop offset="0" stop-color="#e23cb4"/><stop offset="0.5" stop-color="#9c4ffb"/><stop offset="1" stop-color="#22b8d4"/></linearGradient>
6
6
  <marker id="flow-arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto" markerUnits="userSpaceOnUse"><path d="M0 0 10 5 0 10Z" fill="#6f6787"/></marker>
@@ -38,7 +38,7 @@
38
38
  <text x="542" y="167" font-size="22" font-weight="700" text-anchor="middle" fill="#7a2bd6">OMP Head</text>
39
39
  <text x="542" y="195" font-size="16" text-anchor="middle" fill="#5c5470">model + controller</text>
40
40
  <text x="542" y="222" font-size="16" text-anchor="middle" fill="#5c5470">decides · works</text>
41
- <text x="542" y="250" font-size="15" font-weight="600" text-anchor="middle" fill="#7a2bd6">Head-only lane control</text>
41
+ <text x="542" y="250" font-size="15" font-weight="600" text-anchor="middle" fill="#7a2bd6">Lane coordination</text>
42
42
  </g>
43
43
  <g>
44
44
  <rect x="754" y="80" width="182" height="108" rx="14" fill="#ffffff" stroke="#cfc7de" stroke-width="1.5"/>
@@ -58,7 +58,7 @@
58
58
  <path d="M24 360H49" fill="none" stroke="#8f3ff0" stroke-width="2.4" marker-end="url(#control-arrow)"/>
59
59
  <text x="60" y="365" font-size="16" fill="#5c5470">HEAD to lane: lane_start or lane_message</text>
60
60
  <path d="M24 383H49" fill="none" stroke="#6f6787" stroke-width="1.8" marker-end="url(#flow-arrow)"/>
61
- <text x="60" y="388" font-size="16" fill="#5c5470">Lane to HEAD: delegated results, decisions for HEAD, and source-bound scope reviews</text>
62
- <text x="60" y="411" font-size="16" fill="#5c5470">The controller routes bound-topic prompts and replies without a HEAD model turn.</text>
61
+ <text x="60" y="388" font-size="16" fill="#5c5470">Lane to HEAD: delegated results and decisions for HEAD</text>
62
+ <text x="60" y="411" font-size="16" fill="#5c5470">Direct bound-topic work, including scope changes, needs no HEAD model turn.</text>
63
63
  </g>
64
64
  </svg>
@@ -6,6 +6,7 @@
6
6
  "maxSubagents": 8,
7
7
  "idleMs": 300000,
8
8
  "headIdleMs": 1800000,
9
+ "remoteMemorySync": false,
9
10
  "groupRooms": [],
10
11
  "discord": {
11
12
  "tokenEnv": "DISCORD_BOT_TOKEN",
@@ -4,7 +4,7 @@
4
4
  [Design](../DESIGN.md) · [Example configuration](../config.example.json) ·
5
5
  [Attribution and license notices](../THIRD_PARTY_NOTICES.md)
6
6
 
7
- [Install](#1-local-preparation--does-not-start-the-bot) · [Platform apps](#2-platform-apps-and-access) · [Configuration](#3-configuration) · [Daily use](#4-commands-and-daily-use) · [Recovery](#5-operational-scope-and-recovery-constraints) · [Developer verification](#6-developer-verification)
7
+ [Install](#1-local-preparation--does-not-start-the-bot) · [Update](#update-an-existing-installation) · [Platform apps](#2-platform-apps-and-access) · [Configuration](#3-configuration) · [Daily use](#4-commands-and-daily-use) · [Recovery](#5-operational-scope-and-recovery-constraints) · [Developer verification](#6-developer-verification)
8
8
 
9
9
  This guide covers installation, configuration, day-to-day operation, and recovery. Unless
10
10
  otherwise noted, file and code paths and shell commands are relative to the **repository root**.
@@ -192,17 +192,22 @@ use the owner's language.
192
192
  one durable review of the original native dialog, not an immediate answer. HEAD answers
193
193
  with an original option or escalates the same card to the owner on its original route.
194
194
  Omit `to` for normal routing: bound-topic questions go to the owner, manager-handoff
195
- questions to HEAD. An explicit HEAD question on a corrective assignment is
196
- cancelled privately, not redirected to the owner.
197
- - **A conflicting owner correction:** For an eligible standalone original message in
198
- a bound topic, the root lane calls `lane_report({status:"scope_review", sourceId})`
199
- directly with the original source ID. Only HEAD may send a corrective `lane_message`
200
- to that same lane with the verified review ID and exact owner text. Hold the
201
- disputed work until a corrective assignment arrives. A decision card is not a
202
- substitute for scope review or native approval.
195
+ questions to HEAD.
196
+ - **Changing the lane's work:** Give the new instruction directly in that lane's
197
+ bound topic. An explicit instruction from the authenticated owner overrides
198
+ conflicting scope or acceptance in the earlier HEAD brief within the selected
199
+ workspace. It takes effect when OMP consumes the input in a new turn or as a
200
+ steer; there is no separate HEAD approval or handoff. For example,
201
+ “Include the API docs in this repo and verify the examples too” revises the
202
+ task. Quoting or forwarding that text is not an instruction. The change does
203
+ not move the checkout, reassign siblings, resume paused work, approve native
204
+ actions, or permit repeating denied or uncertain effects.
205
+ If a reconnect recovers an older instruction after a newer message in that
206
+ topic, send a fresh instruction if the work is still wanted. A queued request
207
+ for a bot account that is no longer connected is not run under its replacement.
203
208
 
204
209
  See [direct lane coordination](design/execution.md#direct-lane-coordination) and the
205
- [scope-review contract](design/execution.md#bound-topic-assignment-scope-review).
210
+ [rules for direct owner changes](design/execution.md#direct-owner-changes-to-bound-topic-work).
206
211
 
207
212
  ### Choosing a Model for a New Lane
208
213
 
@@ -256,26 +261,201 @@ OMP 19's per-user daemon does not take over services from the previous broker. A
256
261
  in the new daemon is not evidence that you may stop or reclaim work whose completion was
257
262
  never confirmed in the old session.
258
263
 
259
- **Upgrading from the Bun journal verifier:** before replacing an installation in
260
- place, let work settle and gracefully stop its resident lane Hosts (including
261
- remote workers) and its Gateway/HEAD using the old installation. Check their
262
- exit receipts and verify the owners have exited. `stop main` alone does not stop
263
- independent lanes. Old owners still need their original helper files until exit;
264
- the new owners verify their journals in Rust. Keep the state and session files.
265
-
266
264
  The default `command: ["omp"]` looks up OMP on PATH. To use a different installation, put
267
265
  its OMP path in the first entry of `command`. A relative path is resolved against the
268
266
  configuration file's directory, and all lanes use the same path. This repository does not
269
267
  download OMP or build it from source.
270
268
 
269
+ ### Update an Existing Installation
270
+
271
+ **Do not replace files while an affected process can still use them.** Schedule a quiet
272
+ window: hold new work, avoid concurrent starts/restarts or login activation, and let
273
+ active work, approvals, goals, deliveries and owned services settle. Inventory every
274
+ configured instance and enrolled worker account using the copy being replaced, not just
275
+ the currently selected config. In `omp-sa status --config FILE`, `lanes[]` and `workers[]`
276
+ are saved records, not live ownership or exit evidence. On each machine, cross-check the
277
+ inventory against local processes, for example with `ps -axo pid=,ppid=,uid=,comm=` and
278
+ `lsof -nP -a -p PID -d txt` to locate a candidate Gateway or owner executable if needed.
279
+ Do not read process environments or print credential files. If you cannot account for
280
+ an affected process, machine or installation, do not replace that copy.
281
+
282
+ #### Capture before stopping
283
+
284
+ Keep [`upgrade-evidence.mjs`](../scripts/upgrade-evidence.mjs) and its two helpers,
285
+ [`upgrade-host-wire.mjs`](../scripts/upgrade-host-wire.mjs) and
286
+ [`upgrade-evidence-files.mjs`](../scripts/upgrade-evidence-files.mjs), together from the same
287
+ revision as this guide, **outside every directory being replaced**, on each affected
288
+ machine. They use Bun and the installed 0.1.10+ private Gateway/Host protocol; they
289
+ need no package install. `capture`, `recheck` and `verify` are read-only. Only
290
+ `stop-local` requests shutdown, for one verified local lane. Keep captures private.
291
+
292
+ On the Gateway machine, use the account and CLI from the **old installation**.
293
+ Substitute your absolute paths and save the status for each instance:
294
+
271
295
  ```sh
272
- bun add --global --trust omp-superagent@0.1.11
296
+ OLD_OMP_SA=/path/to/old/omp-sa
297
+ CONFIG=/path/to/config.local.json
298
+ PROBE=/path/outside/installation/upgrade-evidence.mjs
299
+ umask 077
300
+ EVIDENCE_DIR=$(mktemp -d /tmp/omp-sa-upgrade.XXXXXX) &&
301
+ "$OLD_OMP_SA" status --config "$CONFIG" > "$EVIDENCE_DIR/status-before.json"
302
+ ```
303
+
304
+ For a source installation, use `bun --no-env-file /path/to/old/src/cli.ts` in
305
+ place of `"$OLD_OMP_SA"` for the old CLI commands. From the saved status, take the
306
+ absolute `main.socketPath` and use its sibling `gateway.sock` for the Gateway.
307
+ For each previously running Gateway, capture the Gateway and its HEAD together:
308
+
309
+ ```sh
310
+ GATEWAY_SOCKET=/absolute/state/run/gateway.sock
311
+ bun --no-env-file "$PROBE" capture gateway "$GATEWAY_SOCKET" > "$EVIDENCE_DIR/gateway.json"
312
+ ```
313
+
314
+ - For a resident HEAD the probe matches its native PID and session ID against
315
+ `gateway.head.pid` and `gateway.head.initialization.sessionId`. For a **sleeping**
316
+ HEAD it records `gateway.head.hibernation.sessionId` with no live Host to stop.
317
+ A positive `sleeping` stage from a live Gateway is different from an absent socket,
318
+ `gateway: null`, or a failed probe. Do not wake a sleeping HEAD for evidence.
319
+ - Do not run `stop` or `start` for an instance or lane already confirmed intentionally
320
+ stopped. Use the known prior stop/exit and machine process inventory to establish
321
+ this; a missing socket, saved state, or an unrelated receipt is not proof. An absent
322
+ or unconfirmed owner, an in-progress wake/rotation, or a failed capture is a reason to
323
+ resolve ownership before replacing files, not to mark it stopped or force a start.
324
+
325
+ For each affected resident lane, take `id`, `socketPath` and `sessionId` from the
326
+ corresponding `lanes[]` entry and confirm `placement.target`. On the physical machine
327
+ holding that socket, capture the live identity:
328
+
329
+ ```sh
330
+ LANE_ID=lane-example
331
+ LANE_SOCKET=/absolute/state/run/lane-example.sock
332
+ LANE_SESSION=SESSION_ID_FROM_STATUS
333
+ bun --no-env-file "$PROBE" capture host "$LANE_SOCKET" "$LANE_SESSION" > "$EVIDENCE_DIR/$LANE_ID.json"
334
+ ```
335
+
336
+ For `placement.target: "remote"`, match `placement.workerId` to `workers[].workerId`.
337
+ Use a separate authorized login on that enrolled machine **as the enrolled OS account**.
338
+ Set `PROBE` and create a private `EVIDENCE_DIR` on that machine using the same steps.
339
+ Use the recorded remote socket and add `--worker` to capture and verify the launch
340
+ attempt as well:
341
+
342
+ ```sh
343
+ bun --no-env-file "$PROBE" capture host "$LANE_SOCKET" "$LANE_SESSION" --worker > "$EVIDENCE_DIR/$LANE_ID.json"
344
+ ```
345
+
346
+ The enrolled SSH key's forced command is not a shell; do not loosen it, tunnel the
347
+ socket, or use same-named paths on the HEAD machine. If you lack authorized access
348
+ to the affected worker, cannot correlate all its dependent Hosts to their managing
349
+ HEADs, or cannot prove their ownership, leave that installation intact. A HEAD-only
350
+ update does not replace worker files or require stopping lanes on unchanged
351
+ installations.
352
+
353
+ #### Stop, verify, and replace
354
+
355
+ For a **local** lane, use the private status saved from its managing instance and
356
+ the capture from that host. `stop-local` checks that the lane's recorded socket
357
+ is the one derived from that instance's `main.socketPath` and lane ID. It compares
358
+ the live session and owner to the capture and sends a single shutdown on that
359
+ same connection. Do not substitute the old CLI's `stop LANE_ID`: it reconnects
360
+ by pathname. A refusal or lost reply is not permission to send another stop.
361
+
362
+ ```sh
363
+ bun --no-env-file "$PROBE" stop-local "$EVIDENCE_DIR/$LANE_ID.json" "$EVIDENCE_DIR/status-before.json" "$LANE_ID" &&
364
+ bun --no-env-file "$PROBE" verify "$EVIDENCE_DIR/$LANE_ID.json"
365
+ ```
366
+
367
+ For a remote lane, run `bun --no-env-file "$PROBE" recheck "$EVIDENCE_DIR/$LANE_ID.json"`
368
+ on the worker first. Only if it succeeds, run `"$OLD_OMP_SA" stop "$LANE_ID" --config "$CONFIG"`
369
+ on its managing HEAD machine. Once accepted, run
370
+ `bun --no-env-file "$PROBE" verify "$EVIDENCE_DIR/$LANE_ID.json"` on the worker.
371
+
372
+ After the affected lanes, stop each previously running Gateway using its old CLI
373
+ and saved capture. `stop main` does not stop independent lanes:
374
+
375
+ ```sh
376
+ bun --no-env-file "$PROBE" recheck "$EVIDENCE_DIR/gateway.json" &&
377
+ "$OLD_OMP_SA" stop main --config "$CONFIG" &&
378
+ bun --no-env-file "$PROBE" verify "$EVIDENCE_DIR/gateway.json"
379
+ ```
380
+
381
+ If HEAD hibernates after the first capture, the resident `recheck` fails. Take a fresh
382
+ Gateway capture only after it positively reports `sleeping` with the same session ID
383
+ and resume the stop procedure with that capture.
384
+
385
+ Each capture binds the Gateway PID and each live Host's native PID, adapter owner PID,
386
+ session ID and journal path to the socket's device and inode. The journal's device
387
+ and inode must still match at recheck and verification. An ordinary local journal
388
+ may be an owned symlink to the same owned regular file; a worker journal cannot be
389
+ a symlink. `verify` must report
390
+ `exit-confirmed` on the same machine/account before proceeding. It requires actual
391
+ process absence (`ESRCH`, not a reused PID or a permission error), absent old socket
392
+ paths, and for each formerly resident Host a **new** private `<socketPath>.exit.json`
393
+ inode, matching the captured identity (including the worker attempt where applicable),
394
+ `code: 0`, `signal: null`, `persisted: true`, and `observationsFlushed: true`. For an
395
+ already-sleeping HEAD, stopping Gateway does not create a new Host receipt: its live
396
+ Gateway had already verified the hibernation exit. If shutdown was accepted but still
397
+ completing, run `verify` again after the processes have had time to exit. Do not resend
398
+ stop blindly, delete socket or receipt files, or interpret a stale receipt, a shutdown
399
+ ACK, or a missing socket alone as success. If exit is refused or still unconfirmed,
400
+ leave the old files in place.
401
+
402
+ Only then use `bun add --global --trust omp-superagent@VERSION` or
403
+ `npm install --global omp-superagent@VERSION` with the target version, or rebuild the
404
+ source installation. Replace worker files only on the relevant worker after its
405
+ dependent Hosts have stopped. Keep the same config, state, enrollment and journals;
406
+ do not rerun `setup`.
407
+
408
+ #### Restore only what was running
409
+
410
+ On each Gateway machine, `omp-sa doctor --config FILE` checks local prerequisites
411
+ without starting anything. Run `omp-sa start --config FILE` **only for Gateways that
412
+ were running before the maintenance window**. A running Gateway with a sleeping HEAD
413
+ counts as running: explicit start brings that HEAD up using its saved session, rather
414
+ than returning it to sleep immediately. Do not manually start lanes; they are managed
415
+ by HEAD. Select the **explicit path to the upgraded installation** for all three
416
+ commands, not a different `omp-sa` that happens to be on `PATH`. For a package install:
417
+
418
+ ```sh
419
+ NEW_OMP_SA=/absolute/path/to/upgraded/bin/omp-sa
420
+ "$NEW_OMP_SA" doctor --config "$CONFIG" &&
421
+ "$NEW_OMP_SA" start --config "$CONFIG" &&
422
+ "$NEW_OMP_SA" status --config "$CONFIG"
423
+ ```
424
+
425
+ For a source installation, use the upgraded checkout instead:
426
+
427
+ ```sh
428
+ NEW_CLI=/absolute/path/to/upgraded/checkout/src/cli.ts
429
+ bun --no-env-file "$NEW_CLI" doctor --config "$CONFIG" &&
430
+ bun --no-env-file "$NEW_CLI" start --config "$CONFIG" &&
431
+ bun --no-env-file "$NEW_CLI" status --config "$CONFIG"
432
+ ```
433
+
434
+ In `status`, `gateway.gateway.ready`
435
+ is transport readiness, `gateway.gateway.admissionReady` is the initial approval
436
+ reconciliation barrier for durable intake, and `gateway.head.ready` is live controller
437
+ and preset readiness. `start` can return before all three are true. While HEAD is
438
+ resident, compare `gateway.head.initialization.sessionId` to the captured session
439
+ (using `gateway.head.hibernation.sessionId` as the **before** value if HEAD was asleep).
440
+ Do not force redelivery of held inputs or uncertain outputs.
441
+
442
+ **If 0.1.10 files were already overwritten:** do not use the new helper to finish an
443
+ old owner's shutdown. It cannot authenticate that `exit` request and will not write
444
+ an exit receipt. Preserve the instance, config, journal and logs for recovery; do
445
+ not restart, manufacture a receipt, or repeat an uncertain shutdown. Restoring
446
+ files alone does not release an owner whose verification already failed. Starting
447
+ with 0.1.11, owners verify their own exits in-process in Rust.
448
+
449
+ ### First Installation
450
+
451
+ ```sh
452
+ bun add --global --trust omp-superagent@0.1.15
273
453
  omp-sa --help
274
454
  ```
275
455
 
276
456
  `--trust` allows package installation scripts, including preparation of the managed
277
457
  omp-superkit. Add the output of `bun pm bin --global` to PATH. If Bun is on PATH, you can
278
- also use `npm install --global omp-superagent@0.1.11`. Create the configuration in your
458
+ also use `npm install --global omp-superagent@0.1.15`. Create the configuration in your
279
459
  own working directory, not the installation directory, with
280
460
  `omp-sa setup --config ./config.local.json`. Installation alone does not activate the bot.
281
461
 
@@ -1095,6 +1275,9 @@ do not constitute receipts for platform login or actual model calls. Check the G
1095
1275
  listed by the CLI to distinguish the actual errors and states for each stage. The Gateway's local
1096
1276
  endpoint is `<stateDir>/run/gateway.sock`; the actual adapter and supervisor logs are in
1097
1277
  `<stateDir>/logs/gateway.log`. Do not confuse the native head log with the transport log.
1278
+ For a Discord owner message ignored by the parent-channel allowlist, look for
1279
+ `Discord owner input ignored: channel not allowlisted`. The rate-limited entry
1280
+ has only the guild, destination and parent IDs. Nothing is posted in that channel.
1098
1281
  A ready Gateway persists incoming events before ACK even when the head is absent. Unresolved
1099
1282
  admissions or replies keep their pending order and appear in `gateway.unresolvedEvents` and as
1100
1283
  `head.ready: false`.
@@ -1175,11 +1358,12 @@ channel, go to HEAD; a bound work thread goes to its lane. `/head <request>` exp
1175
1358
  HEAD even in a thread. If work is running in the same conversation, the input is applied at the
1176
1359
  next OMP steering boundary without `/steer`. If idle, it starts a new run. The first reply just
1177
1360
  after opening a thread can also join the original run if that thread is confirmed as the run's
1178
- reply route. Admission of a message or acceptance of an RPC call does not prove the model read
1179
- the input. Other conversations, internal reports, workflow selections, and control commands are
1180
- not mixed into the current run. Steering does not bypass pauses, approvals, compaction, or holds
1181
- for uncertainty. The original Discord addressing policy still applies, and final replies or reports
1182
- for the same run are not sent twice.
1361
+ reply route. A direct owner steer can revise the lane's task without changing the run's
1362
+ reporting mode. Admission of a message or acceptance of an RPC call does not prove the model
1363
+ read the input. Other conversations, internal reports, workflow selections, and control commands
1364
+ are not mixed into the current run. Steering does not bypass pauses, approvals, compaction, or
1365
+ holds for uncertainty. The original Discord addressing policy still applies, and final replies or
1366
+ reports for the same run are not sent twice.
1183
1367
 
1184
1368
  **You can request a new topic without a command, too.** When a new lane is needed, an independent
1185
1369
  OMP session in the verified working directory is bound to a supported thread or topic. In a
@@ -1852,13 +2036,11 @@ submissions in order for each card and deduplicates only actual redeliveries.
1852
2036
 
1853
2037
  HEAD first reviews manager-handoff questions and root-lane questions explicitly
1854
2038
  addressed with `decision_ask({to:"head", questions:[…]})`. Other bound-topic questions
1855
- go to the owner directly. On a corrective assignment, the controller refuses and
1856
- cancels an explicit HEAD question without showing it to the owner. For a routine
1857
- choice within the delegated scope, HEAD uses `lane_review_decision` to return one
1858
- of the original choices to the lane.
2039
+ go to the owner directly. For a routine choice within the current scope, HEAD
2040
+ uses `lane_review_decision` to return one of the original choices to the lane.
1859
2041
  It records the reason internally without sending a separate messenger notification.
1860
2042
  When owner judgment is required, HEAD escalates the same pending dialog with the reason
1861
- on the original question card. If HEAD stops during an existing regular review, the
2043
+ on the original question card. If HEAD stops during an existing review, the
1862
2044
  controller may escalate that same pending dialog to the original owner. Neither path
1863
2045
  authorizes a scope change, grants native execution approval, or answers ordinary native
1864
2046
  dialogs on the operator's behalf.
@@ -2033,6 +2215,28 @@ Check `omp-sa status --config ./config.local.json` for the saved placement.
2033
2215
  To revoke new SSH connections, remove **only this enrollment's key** on the
2034
2216
  worker. That is not a stop command for an already running lane.
2035
2217
 
2218
+ **Optional project memory pull.** Before starting a **new** remote lane, set
2219
+ `"remoteMemorySync": true` in HEAD's private config if explicit facts retained
2220
+ on that worker may be stored in HEAD's native project bank. The default is
2221
+ off. Use Mnemopi in `per-project` mode on both ends and place the lane in HEAD's
2222
+ own approved repository directory. The new worker lane starts with a private
2223
+ bank, without pre-existing shared facts. Existing sessions and other backends are not migrated.
2224
+ For text-only search, keep `mnemopi.noEmbeddings: true` in the persistent HEAD
2225
+ profile. For vector indexing, HEAD must already use persistent `models.offline: true`
2226
+ and authorize an in-process embedding provider on its live bank. A local model
2227
+ name or cached weights alone leave indexing deferred. A temporary
2228
+ override is not enough. Online HEADs with embeddings enabled are ineligible,
2229
+ even when a local model is named: on reopen, stock OMP can send stored facts
2230
+ to a process-wide provider. Sync never changes your chat or embedding settings.
2231
+ This setting takes effect with the normal authorized config activation; do not
2232
+ restart a live service just to inspect it. Check the lane's `memorySync` field
2233
+ with `lane_inspect`. A checked page is not necessarily a vector-indexed page.
2234
+ `pending` means embedding is in flight; `deferred` means no vector or active
2235
+ task is confirmed. Text search can already work in either case.
2236
+ No transfers run while a lane is unloaded. Setting the option to `false` stops
2237
+ future pulls after config activation; it does not erase facts already stored.
2238
+ See the [backend matrix, indexing and privacy limits](design/execution.md#idle-remote-memory-pull).
2239
+
2036
2240
  ## 5. Operational scope and recovery constraints
2037
2241
 
2038
2242
  - Autonomous work uses the existing native task/job, goal, and workflow owners. It preserves
@@ -2147,7 +2351,9 @@ OMP_SUPERAGENT_WORKER_SSH_TEST=1 bun test test/native-worker-ssh.test.ts
2147
2351
  ```
2148
2352
 
2149
2353
  Run the general regression checks with `bun run check` and `bun run test`. The test script
2150
- builds the native binaries, then runs the test files with two isolated workers. To check for
2354
+ builds the native binaries, then runs the test files with two isolated workers. Both the
2355
+ local and CI suites build the loopback operator once through Cargo and pass its reported
2356
+ executable to those workers. A targeted `bun test` builds it on demand. To check for
2151
2357
  order dependencies, run the same set serially with `bun test test`. The default tests exclude
2152
2358
  opt-in native/PTY scenarios. Do not substitute a bare `bun test`, which also discovers tests
2153
2359
  in `.upstream`. In a checkout with OMP and managed omp-superkit ready, `bun run test:ci`
@@ -2158,7 +2364,7 @@ standalone CLI on `PATH`. It skips `node_modules/.bin`, which Bun puts at the fr
2158
2364
  not fall back to the SDK CLI or an older binary. It prints the selected OMP version and
2159
2365
  executable path and checks metadata for the public RPC and process observation capabilities.
2160
2366
  `test:ci` itself does not download, build, or update OMP. Python 3 is required, and launchd
2161
- checks run only on macOS. `test:ci` shares only the native binaries extracted by the
2367
+ checks run only on macOS. `test:ci` shares the native binaries extracted by the
2162
2368
  installed CLI in a temporary per-run cache. Each fixture's HOME, settings, and authentication
2163
2369
  remain isolated. Setting `OMP_TEST_NATIVES_DIR` to a trusted absolute path uses that path
2164
2370
  instead of the temporary cache; it is not deleted after the run.
@@ -2175,6 +2381,11 @@ The download requires internet access, curl, and shasum. CI does not run OMP 18.
2175
2381
  run the same checks manually with `bash scripts/test-omp.sh v18.22.2`, or specify `v18.20.3`
2176
2382
  to test the older asynchronous task API.
2177
2383
 
2384
+ CI caches Rust dependencies, not the project's binaries or test results. Only a
2385
+ successful `main` push saves the cache. Source tests and package builds use separate
2386
+ targets; a tagged package build does not restore the dependency cache. All compilation,
2387
+ tests, linkage checks and package install checks still run on a cache hit.
2388
+
2178
2389
  **OMP upstream compatibility** runs every Monday at 04:17 UTC or on manual dispatch in
2179
2390
  Actions. It looks up the latest official upstream release tag once, then runs the same
2180
2391
  checks against that tag on Ubuntu and macOS ARM64. Reproduce a failing tag locally with