omp-superagent 0.1.10 → 0.1.11

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 (149) hide show
  1. package/DESIGN.md +58 -15
  2. package/README.ko.md +7 -0
  3. package/README.md +7 -0
  4. package/THIRD_PARTY_NOTICES.md +35 -436
  5. package/assets/architecture-dark.svg +7 -12
  6. package/assets/architecture.ko-dark.svg +7 -12
  7. package/assets/architecture.ko.svg +7 -12
  8. package/assets/architecture.mmd +5 -13
  9. package/assets/architecture.svg +7 -12
  10. package/config.example.json +1 -0
  11. package/docs/OPERATIONS.en.md +106 -52
  12. package/docs/OPERATIONS.md +98 -44
  13. package/docs/design/execution.md +80 -52
  14. package/docs/design/messaging.md +113 -32
  15. package/docs/releases/0.1.11.md +18 -0
  16. package/gateway/bin/omp-gateway-darwin-arm64 +0 -0
  17. package/gateway/bin/omp-gateway-darwin-x64 +0 -0
  18. package/gateway/bin/omp-gateway-linux-arm64 +0 -0
  19. package/gateway/bin/omp-gateway-linux-x64 +0 -0
  20. package/host-owner/bin/omp-host-owner-darwin-arm64 +0 -0
  21. package/host-owner/bin/omp-host-owner-darwin-x64 +0 -0
  22. package/host-owner/bin/omp-host-owner-linux-arm64 +0 -0
  23. package/host-owner/bin/omp-host-owner-linux-x64 +0 -0
  24. package/package.json +10 -11
  25. package/scripts/{prepare-ulw.ts → prepare-super.ts} +1 -1
  26. package/skills/head/SKILL.md +12 -3
  27. package/skills/head/references/routing.md +1 -1
  28. package/skills/head/references/supervision.md +23 -26
  29. package/skills/lane/SKILL.md +28 -21
  30. package/skills/lane/references/workflow.md +15 -17
  31. package/src/cli.ts +33 -33
  32. package/src/{config.ts → config/config.ts} +7 -3
  33. package/src/config/wake-config.ts +36 -0
  34. package/src/contracts.ts +61 -12
  35. package/src/{cron-jobs.ts → cron/cron-jobs.ts} +21 -13
  36. package/src/{cron-pr-intake.ts → cron/cron-pr-intake.ts} +4 -4
  37. package/src/{cron-schedule.ts → cron/cron-schedule.ts} +3 -3
  38. package/src/extension.ts +43 -25
  39. package/src/{gateway-client.ts → gateway/gateway-client.ts} +89 -32
  40. package/src/{gateway-native.ts → gateway/gateway-native.ts} +4 -4
  41. package/src/{gateway-protocol.ts → gateway/gateway-protocol.ts} +69 -14
  42. package/src/{gateway-wire.ts → gateway/gateway-wire.ts} +12 -7
  43. package/src/gateway-config.ts +1 -1
  44. package/src/gateway-restart-env.ts +3 -3
  45. package/src/{group-access.ts → group/group-access.ts} +8 -3
  46. package/src/{group-policy.ts → group/group-policy.ts} +2 -2
  47. package/src/{group-runner.ts → group/group-runner.ts} +11 -6
  48. package/src/host-extension.ts +164 -36
  49. package/src/host-sdk-helper.ts +62 -65
  50. package/src/{decision-tool.ts → lane/decision-tool.ts} +12 -4
  51. package/src/{decisions.ts → lane/decisions.ts} +12 -10
  52. package/src/{lane-models.ts → lane/lane-models.ts} +1 -1
  53. package/src/{lane-rows.ts → lane/lane-rows.ts} +2 -2
  54. package/src/{lane-watch.ts → lane/lane-watch.ts} +6 -2
  55. package/src/{workflow.ts → lane/workflow.ts} +1 -1
  56. package/src/lane-extension.ts +25 -7
  57. package/src/managed-memory-helper.ts +2 -2
  58. package/src/{managed-ulw-probe.ts → managed-super-probe.ts} +3 -3
  59. package/src/{delivery.ts → messaging/delivery.ts} +1 -1
  60. package/src/{discord-command-registration.ts → messaging/discord-command-registration.ts} +3 -2
  61. package/src/{discord-context.ts → messaging/discord-context.ts} +1 -1
  62. package/src/{messenger-command-catalog.json → messaging/messenger-command-catalog.json} +1 -0
  63. package/src/messaging/messenger-commands.ts +55 -0
  64. package/src/{result-attachment.ts → messaging/result-attachment.ts} +3 -3
  65. package/src/{slack-command-registration.ts → messaging/slack-command-registration.ts} +3 -3
  66. package/src/{telegram-command-registration.ts → messaging/telegram-command-registration.ts} +2 -2
  67. package/src/omp/head-resume.ts +123 -0
  68. package/src/{host-owner-path.ts → omp/host-owner-path.ts} +1 -1
  69. package/src/{host-protocol.ts → omp/host-protocol.ts} +10 -2
  70. package/src/{host-superkit.ts → omp/host-superkit.ts} +1 -1
  71. package/src/{host.ts → omp/host.ts} +26 -17
  72. package/src/{installed-omp.ts → omp/installed-omp.ts} +1 -1
  73. package/src/{managed-memory.ts → omp/managed-memory.ts} +2 -2
  74. package/src/{managed-ulw.ts → omp/managed-super.ts} +42 -16
  75. package/src/omp/native-journal.ts +124 -0
  76. package/src/{native-launch-profile.ts → omp/native-launch-profile.ts} +6 -2
  77. package/src/{native-presets.ts → omp/native-presets.ts} +2 -2
  78. package/src/omp/native-sessions.ts +124 -0
  79. package/src/{omp-usage.ts → omp/omp-usage.ts} +1 -1
  80. package/src/{soul.ts → omp/soul.ts} +2 -2
  81. package/src/omp/stock-head-launch.ts +31 -0
  82. package/src/{autostart.ts → operator/autostart.ts} +3 -3
  83. package/src/{operator.ts → operator/operator.ts} +2 -2
  84. package/src/{setup-judge.ts → operator/setup-judge.ts} +1 -1
  85. package/src/{setup-profiles.ts → operator/setup-profiles.ts} +2 -2
  86. package/src/{setup.ts → operator/setup.ts} +5 -5
  87. package/src/{pr-intake-automation.ts → pr/pr-intake-automation.ts} +1 -1
  88. package/src/{pr-intake-mode.ts → pr/pr-intake-mode.ts} +3 -3
  89. package/src/{pr-intake-review.ts → pr/pr-intake-review.ts} +5 -5
  90. package/src/{pr-intake-work.ts → pr/pr-intake-work.ts} +1 -1
  91. package/src/{pr-review-models.ts → pr/pr-review-models.ts} +2 -2
  92. package/src/{pr-watch.ts → pr/pr-watch.ts} +36 -26
  93. package/src/{message-order.ts → routing/message-order.ts} +1 -1
  94. package/src/{topic-history.ts → routing/topic-history.ts} +2 -2
  95. package/src/{topic-request.ts → routing/topic-request.ts} +4 -2
  96. package/src/{runtime.ts → runtime/controller.ts} +867 -1213
  97. package/src/runtime/deferred-routing.ts +106 -0
  98. package/src/runtime/dm-timeline.ts +194 -0
  99. package/src/{head-recovery.ts → runtime/head-recovery.ts} +1 -1
  100. package/src/{head-rotation.ts → runtime/head-rotation.ts} +32 -5
  101. package/src/runtime/model-journal.ts +119 -0
  102. package/src/runtime/native-frames.ts +131 -0
  103. package/src/{observation-request.ts → runtime/observation-request.ts} +1 -1
  104. package/src/runtime/preset-sync.ts +232 -0
  105. package/src/runtime/preset-watch-paths.ts +137 -0
  106. package/src/runtime/result-attachments.ts +146 -0
  107. package/src/storage/deferred-routing.ts +149 -0
  108. package/src/{store.ts → storage/store.ts} +75 -42
  109. package/src/{worker-bridge.ts → worker/worker-bridge.ts} +2 -2
  110. package/src/{worker-enrollment.ts → worker/worker-enrollment.ts} +2 -2
  111. package/src/{worker-host.ts → worker/worker-host.ts} +7 -3
  112. package/src/{worker-placement.ts → worker/worker-placement.ts} +1 -1
  113. package/src/{worker-profile.ts → worker/worker-profile.ts} +1 -1
  114. package/src/{worker-registration.ts → worker/worker-registration.ts} +2 -2
  115. package/src/{worker-request.ts → worker/worker-request.ts} +5 -5
  116. package/src/{worker-service.ts → worker/worker-service.ts} +2 -2
  117. package/src/{worker-trust.ts → worker/worker-trust.ts} +1 -1
  118. package/src/{worker-wire.ts → worker/worker-wire.ts} +3 -3
  119. package/src/worker-serve-prepare.ts +4 -4
  120. package/src/board-extension.ts +0 -217
  121. package/src/board.ts +0 -467
  122. package/src/gateway-host-helper.ts +0 -13
  123. package/src/messenger-commands.ts +0 -15
  124. package/src/native-sessions.ts +0 -34
  125. /package/src/{credentials.ts → config/credentials.ts} +0 -0
  126. /package/src/{lane-report.ts → lane/lane-report.ts} +0 -0
  127. /package/src/{dialog.ts → messaging/dialog.ts} +0 -0
  128. /package/src/{telegram-command-languages.json → messaging/telegram-command-languages.json} +0 -0
  129. /package/src/{host-broker-services.ts → omp/host-broker-services.ts} +0 -0
  130. /package/src/{host-inventory-manifest.ts → omp/host-inventory-manifest.ts} +0 -0
  131. /package/src/{host-reply-voice.ts → omp/host-reply-voice.ts} +0 -0
  132. /package/src/{host-services.ts → omp/host-services.ts} +0 -0
  133. /package/src/{native-settings.ts → omp/native-settings.ts} +0 -0
  134. /package/src/{superkit-skills.ts → omp/superkit-skills.ts} +0 -0
  135. /package/src/{repository.ts → operator/repository.ts} +0 -0
  136. /package/src/{pr-github-schema.ts → pr/pr-github-schema.ts} +0 -0
  137. /package/src/{pr-github.ts → pr/pr-github.ts} +0 -0
  138. /package/src/{pr-intake-comment.ts → pr/pr-intake-comment.ts} +0 -0
  139. /package/src/{pr-intake-fix.ts → pr/pr-intake-fix.ts} +0 -0
  140. /package/src/{pr-intake-github.ts → pr/pr-intake-github.ts} +0 -0
  141. /package/src/{pr-intake-material.ts → pr/pr-intake-material.ts} +0 -0
  142. /package/src/{pr-intake-tree.ts → pr/pr-intake-tree.ts} +0 -0
  143. /package/src/{head-quota.ts → runtime/head-quota.ts} +0 -0
  144. /package/src/{worker-checkout.ts → worker/worker-checkout.ts} +0 -0
  145. /package/src/{worker-destination.ts → worker/worker-destination.ts} +0 -0
  146. /package/src/{worker-doctor.ts → worker/worker-doctor.ts} +0 -0
  147. /package/src/{worker-ledger.ts → worker/worker-ledger.ts} +0 -0
  148. /package/src/{worker-repository.ts → worker/worker-repository.ts} +0 -0
  149. /package/upstream/{ulw.json → super.json} +0 -0
@@ -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 서비스에 연결됩니다. 모든 입력은 OMP 헤드 에이전트 세션으로 전달되며, 헤드는 직접 판단하고 작업하거나 레인 A와 레인 B의 독립 저장소·주제 세션을 제어합니다. 레인 제어는 헤드만 합니다. 레인 결과는 헤드와 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>
@@ -18,9 +18,6 @@
18
18
  <path d="M754 162H714V200H638" fill="none" stroke="#6f6787" stroke-width="1.8" stroke-linejoin="round" marker-end="url(#flow-arrow)"/>
19
19
  <path d="M638 234H714V266H754" fill="none" stroke="#8f3ff0" stroke-width="2.4" stroke-linejoin="round" marker-end="url(#control-arrow)"/>
20
20
  <path d="M754 306H684V258H638" fill="none" stroke="#6f6787" stroke-width="1.8" stroke-linejoin="round" marker-end="url(#flow-arrow)"/>
21
- <path d="M542 274V370" fill="none" stroke="#8b82a3" stroke-width="1.6" stroke-dasharray="5 5" stroke-linecap="round" stroke-linejoin="round"/>
22
- <path d="M936 122H948V392H936" fill="none" stroke="#8b82a3" stroke-width="1.6" stroke-dasharray="5 5" stroke-linecap="round" stroke-linejoin="round"/>
23
- <path d="M846 338V370" fill="none" stroke="#8b82a3" stroke-width="1.6" stroke-dasharray="5 5" stroke-linecap="round" stroke-linejoin="round"/>
24
21
  </g>
25
22
  <g>
26
23
  <rect x="24" y="132" width="160" height="142" rx="14" fill="#ffffff" stroke="#cfc7de" stroke-width="1.5"/>
@@ -39,7 +36,7 @@
39
36
  <rect x="446" y="132" width="192" height="142" rx="14" fill="#faf3ff" stroke="url(#hero)" stroke-width="2.5"/>
40
37
  <rect x="470" y="129" width="144" height="6" rx="3" fill="url(#hero)"/>
41
38
  <text x="542" y="167" font-size="22" font-weight="700" text-anchor="middle" fill="#7a2bd6">OMP 헤드</text>
42
- <text x="542" y="195" font-size="16" text-anchor="middle" fill="#5c5470">에이전트 세션</text>
39
+ <text x="542" y="195" font-size="16" text-anchor="middle" fill="#5c5470">모델 + 컨트롤러</text>
43
40
  <text x="542" y="222" font-size="16" text-anchor="middle" fill="#5c5470">판단 · 작업</text>
44
41
  <text x="542" y="250" font-size="15" font-weight="600" text-anchor="middle" fill="#7a2bd6">레인 제어는 헤드만</text>
45
42
  </g>
@@ -57,13 +54,11 @@
57
54
  <text x="845" y="288" font-size="16" text-anchor="middle" fill="#5c5470">독립 세션</text>
58
55
  <text x="845" y="315" font-size="16" text-anchor="middle" fill="#5c5470">저장소 / 주제 B</text>
59
56
  </g>
60
- <text x="249" y="304" font-size="15" fill="#5c5470">헤드를 거쳐 응답</text>
61
- <text x="650" y="219" font-size="15" fill="#5c5470">결과</text>
62
- <text x="695" y="295" font-size="15" fill="#5c5470">결과</text>
63
- <text x="553" y="325" font-size="15" fill="#5c5470">상태 / 맥락</text>
64
57
  <g>
65
- <rect x="446" y="370" width="490" height="44" rx="12" fill="#f5f1fb" stroke="#8b82a3" stroke-width="1.2" stroke-dasharray="5 5"/>
66
- <text x="466" y="398" font-size="18" font-weight="700" fill="#1d1530">공유 게시판</text>
67
- <text x="586" y="398" font-size="15" fill="#5c5470">정보 공유 전용 · 제어 아님</text>
58
+ <path d="M24 360H49" fill="none" stroke="#8f3ff0" stroke-width="2.4" marker-end="url(#control-arrow)"/>
59
+ <text x="60" y="365" font-size="16" fill="#5c5470">헤드에서 레인으로: lane_start 또는 lane_message</text>
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>
68
63
  </g>
69
64
  </svg>
@@ -1,26 +1,18 @@
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/>Agent session<br/>Decides · works<br/>Head-only lane control"]
4
+ H["OMP Head<br/>Model + controller<br/>Bound topics bypass the model"]
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
- S["Shared board<br/>Information only · not control"]
8
-
9
7
  M --> G
10
8
  G --> H
11
- H -->|Head-only control| A
12
- H -->|Head-only control| B
13
- A -->|Results| H
14
- B -->|Results| 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
15
13
  H --> G
16
14
  G --> M
17
- H -.- S
18
- A -.- S
19
- B -.- S
20
-
21
15
  classDef head fill:#faf3ff,stroke:#9c4ffb,color:#7a2bd6,stroke-width:2px
22
16
  classDef lane stroke:#22b8d4
23
- classDef board fill:#f5f1fb,stroke:#8b82a3,color:#1d1530,stroke-dasharray:5 5
24
17
  class H head
25
18
  class A,B lane
26
- class S board
@@ -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 always-on Gateway service. All input passes to the OMP Head agent session, which decides and works directly or controls independent repository or topic sessions in Lane A and Lane B. Only the head controls lanes. Lane results return through the head and Gateway to the messengers. The head and lanes share an informational board; dashed connections are not a command bus.</desc>
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>
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>
@@ -18,9 +18,6 @@
18
18
  <path d="M754 162H714V200H638" fill="none" stroke="#6f6787" stroke-width="1.8" stroke-linejoin="round" marker-end="url(#flow-arrow)"/>
19
19
  <path d="M638 234H714V266H754" fill="none" stroke="#8f3ff0" stroke-width="2.4" stroke-linejoin="round" marker-end="url(#control-arrow)"/>
20
20
  <path d="M754 306H684V258H638" fill="none" stroke="#6f6787" stroke-width="1.8" stroke-linejoin="round" marker-end="url(#flow-arrow)"/>
21
- <path d="M542 274V370" fill="none" stroke="#8b82a3" stroke-width="1.6" stroke-dasharray="5 5" stroke-linecap="round" stroke-linejoin="round"/>
22
- <path d="M936 122H948V392H936" fill="none" stroke="#8b82a3" stroke-width="1.6" stroke-dasharray="5 5" stroke-linecap="round" stroke-linejoin="round"/>
23
- <path d="M846 338V370" fill="none" stroke="#8b82a3" stroke-width="1.6" stroke-dasharray="5 5" stroke-linecap="round" stroke-linejoin="round"/>
24
21
  </g>
25
22
  <g>
26
23
  <rect x="24" y="132" width="160" height="142" rx="14" fill="#ffffff" stroke="#cfc7de" stroke-width="1.5"/>
@@ -39,7 +36,7 @@
39
36
  <rect x="446" y="132" width="192" height="142" rx="14" fill="#faf3ff" stroke="url(#hero)" stroke-width="2.5"/>
40
37
  <rect x="470" y="129" width="144" height="6" rx="3" fill="url(#hero)"/>
41
38
  <text x="542" y="167" font-size="22" font-weight="700" text-anchor="middle" fill="#7a2bd6">OMP Head</text>
42
- <text x="542" y="195" font-size="16" text-anchor="middle" fill="#5c5470">agent session</text>
39
+ <text x="542" y="195" font-size="16" text-anchor="middle" fill="#5c5470">model + controller</text>
43
40
  <text x="542" y="222" font-size="16" text-anchor="middle" fill="#5c5470">decides · works</text>
44
41
  <text x="542" y="250" font-size="15" font-weight="600" text-anchor="middle" fill="#7a2bd6">Head-only lane control</text>
45
42
  </g>
@@ -57,13 +54,11 @@
57
54
  <text x="845" y="288" font-size="16" text-anchor="middle" fill="#5c5470">independent session</text>
58
55
  <text x="845" y="315" font-size="16" text-anchor="middle" fill="#5c5470">repo / topic B</text>
59
56
  </g>
60
- <text x="249" y="304" font-size="15" fill="#5c5470">Replies via head</text>
61
- <text x="650" y="219" font-size="15" fill="#5c5470">results</text>
62
- <text x="695" y="295" font-size="15" fill="#5c5470">results</text>
63
- <text x="553" y="325" font-size="15" fill="#5c5470">status / context</text>
64
57
  <g>
65
- <rect x="446" y="370" width="490" height="44" rx="12" fill="#f5f1fb" stroke="#8b82a3" stroke-width="1.2" stroke-dasharray="5 5"/>
66
- <text x="466" y="398" font-size="18" font-weight="700" fill="#1d1530">Shared board</text>
67
- <text x="609" y="398" font-size="15" fill="#5c5470">information only · not control</text>
58
+ <path d="M24 360H49" fill="none" stroke="#8f3ff0" stroke-width="2.4" marker-end="url(#control-arrow)"/>
59
+ <text x="60" y="365" font-size="16" fill="#5c5470">HEAD to lane: lane_start or lane_message</text>
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>
68
63
  </g>
69
64
  </svg>
@@ -5,6 +5,7 @@
5
5
  "maxHosts": 4,
6
6
  "maxSubagents": 8,
7
7
  "idleMs": 300000,
8
+ "headIdleMs": 1800000,
8
9
  "groupRooms": [],
9
10
  "discord": {
10
11
  "tokenEnv": "DISCORD_BOT_TOKEN",
@@ -35,10 +35,10 @@ Only the head can use `lane_models`, `lane_init_presets`, `lane_start`, `lane_se
35
35
  `lane_inspect`, `lane_message`, `lane_pause`, `lane_resume`, `lane_close`,
36
36
  `thread_inspect`, `lane_thread_update`, `messenger_presence`, `lane_watch`, `pr_watch`, `pr_watch_list`,
37
37
  `discord_context`, `discord_purpose_list`, `discord_purpose_set`, `discord_purpose_clear`,
38
- `decision_list`, `decision_inspect`, and `decision_withdraw`.
38
+ `decision_list`, `decision_inspect`, `decision_withdraw`, and `lane_review_decision`.
39
39
  `decision_ask` is available to HEAD and root lanes, but not to native children.
40
- Use `lane_inspect({})` to list lanes. Lanes do not receive management authority, and
41
- native children receive neither management nor board access. Do not install these extensions
40
+ Use `lane_inspect({})` to list lanes. Only root lanes can use `lane_report`; neither
41
+ lanes nor native children receive management authority. Do not install these extensions
42
42
  globally in ordinary OMP. See the [management tool contract](design/execution.md#management-tools)
43
43
  for tool arguments and role boundaries.
44
44
 
@@ -178,29 +178,31 @@ activates depends on native `magicKeywords.enabled`, `magicKeywords.jevify`, and
178
178
  availability; admission alone does not guarantee it. No global settings are changed.
179
179
  jevify needs no SUPER skill lookup, additional lane, goal, model change, or workflow artifact.
180
180
 
181
- Lane reports are for the head, not for external delivery. Internal instructions and reports
182
- are in English; the head replies externally in the user's language.
183
-
184
- ### Using the Shared Information Board
185
-
186
- Only head and lane sessions actually connected and registered in the same instance may use
187
- the board. Ordinary OMP sessions, other instances, native children, and sessions with only
188
- copied role environment variables cannot participate. Participants in the same instance can
189
- read every channel; repository channels are not security boundaries.
190
-
191
- ```text
192
- board_post({text: "Observed fact and relevant evidence", mentions: ["head"]})
193
- board_read({channel: "general", limit: 20})
194
- board_subscribe({channels: ["general", "repo:/absolute/repository"]})
195
- ```
196
-
197
- These are native tool argument examples, not shell commands. Follow the actual advertised
198
- schema. Share concise observations, evidence, and conflicts rather than full transcripts
199
- or secrets. Only the exact posts returned are marked read, and subscriptions belong to
200
- individual sessions. A header notification is not a read of the body. Posts are not
201
- instructions, approvals, or evidence of completion. They do not trigger idle model calls
202
- or start unloaded lanes. See the [shared board contract](design/execution.md#shared-information-board)
203
- for details on membership, tool fields, and notifications.
181
+ Internal instructions and manager-handoff reports are in English. Owner-facing replies
182
+ use the owner's language.
183
+
184
+ ### Direct Lane Coordination
185
+
186
+ - **Evidence or a wait:** Root lanes use `lane_report` to record selected evidence or an
187
+ exact wait. Direct-topic observations do not notify HEAD. Changed manager-handoff
188
+ evidence or wait transitions are queued for HEAD, not sent directly to Messenger.
189
+ Inspect the observed state when a decision actually depends on it; do not poll.
190
+ - **An in-scope choice that needs HEAD:** Use `decision_ask` with `to: "head"` even in a
191
+ bound topic, for example to resolve overlapping edit ownership. It immediately queues
192
+ one durable review of the original native dialog, not an immediate answer. HEAD answers
193
+ with an original option or escalates the same card to the owner on its original route.
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.
203
+
204
+ See [direct lane coordination](design/execution.md#direct-lane-coordination) and the
205
+ [scope-review contract](design/execution.md#bound-topic-assignment-scope-review).
204
206
 
205
207
  ### Choosing a Model for a New Lane
206
208
 
@@ -254,19 +256,26 @@ OMP 19's per-user daemon does not take over services from the previous broker. A
254
256
  in the new daemon is not evidence that you may stop or reclaim work whose completion was
255
257
  never confirmed in the old session.
256
258
 
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
+
257
266
  The default `command: ["omp"]` looks up OMP on PATH. To use a different installation, put
258
267
  its OMP path in the first entry of `command`. A relative path is resolved against the
259
268
  configuration file's directory, and all lanes use the same path. This repository does not
260
269
  download OMP or build it from source.
261
270
 
262
271
  ```sh
263
- bun add --global --trust omp-superagent@0.1.10
272
+ bun add --global --trust omp-superagent@0.1.11
264
273
  omp-sa --help
265
274
  ```
266
275
 
267
276
  `--trust` allows package installation scripts, including preparation of the managed
268
277
  omp-superkit. Add the output of `bun pm bin --global` to PATH. If Bun is on PATH, you can
269
- also use `npm install --global omp-superagent@0.1.10`. Create the configuration in your
278
+ also use `npm install --global omp-superagent@0.1.11`. Create the configuration in your
270
279
  own working directory, not the installation directory, with
271
280
  `omp-sa setup --config ./config.local.json`. Installation alone does not activate the bot.
272
281
 
@@ -281,9 +290,11 @@ bun install --frozen-lockfile
281
290
  ```
282
291
 
283
292
  Installation does not run OMP. `setup`, `doctor`, and actual Host startup check the selected
284
- CLI. The root SDK dependencies are the published `@oh-my-pi/pi-coding-agent`,
285
- `@oh-my-pi/pi-ai`, `@oh-my-pi/pi-catalog`, `@oh-my-pi/pi-natives`, `@oh-my-pi/pi-tui`,
286
- and `@oh-my-pi/pi-utils`, all pinned to the same baseline. Installation does not start
293
+ CLI. The standalone Bun helpers directly depend on `@oh-my-pi/pi-coding-agent`,
294
+ `@oh-my-pi/pi-catalog`, `@oh-my-pi/pi-natives` and `@oh-my-pi/pi-utils`, pinned to
295
+ the same baseline. The Host provides `pi-ai` to its extensions; it is a direct
296
+ development dependency only. The coding-agent SDK still installs `pi-ai` and `pi-tui`
297
+ transitively. Installation does not start
287
298
  the bot or replace an existing OMP executable or global settings.
288
299
 
289
300
  To avoid changing the system Bun, you can use an isolated local copy. Point the following
@@ -312,7 +323,7 @@ previous layout still work. To prepare only omp-superkit again, run:
312
323
  bun run prepare:ulw
313
324
  ```
314
325
 
315
- `upstream/ulw.json` specifies the official remote and `checkIntervalMs: 3600000` (one hour).
326
+ `upstream/super.json` specifies the official remote and `checkIntervalMs: 3600000` (one hour).
316
327
  Installation checks the remote's **default branch HEAD**. A production Gateway needs a
317
328
  valid active installation before startup. Once it confirms that, it starts IPC and the
318
329
  head first, checks the remote in the background, and then checks hourly for new commits
@@ -417,8 +428,9 @@ are not security sandboxes.
417
428
 
418
429
  Register Discord autocomplete commands explicitly. Before registration, both the Gateway
419
430
  and HEAD must be running the new version. Replacing only the Gateway may reconnect it to
420
- an old HEAD. Send `/help` in Discord and check that `/usage-reset` is listed. If it is
421
- not, do not register commands; finish updating HEAD first. Do not kill a busy HEAD.
431
+ an old HEAD. Send `/help` in Discord and check that `/usage-reset` and the `/fast`
432
+ menu with Confirm are listed. If not, finish updating HEAD before registering
433
+ commands. Do not kill a busy HEAD.
422
434
 
423
435
  ```sh
424
436
  bun --no-env-file src/cli.ts discord-commands --config config.local.json
@@ -427,13 +439,15 @@ bun --no-env-file src/cli.ts discord-commands --config config.local.json --apply
427
439
 
428
440
  The first command previews changes without writing. `--apply` **replaces this bot's entire
429
441
  global command list**; use it only with a dedicated Superagent app. It removes Hermes-only
430
- commands and registers the [shared commands (including `/head`) and Discord-only `/usage-reset`](../src/messenger-command-catalog.json).
442
+ commands and registers the [shared commands (including `/head`) and Discord-only `/usage-reset`](../src/messaging/messenger-command-catalog.json).
431
443
  If separate guild commands shadow global commands, registration reports the conflict
432
444
  rather than silently deleting them. Registration does not start the model or open a
433
445
  messenger connection, and is not a side effect of `setup`, `doctor`, or `start`.
434
446
  Commands that take arguments use an optional `text` field. For example, enter `preset high`
435
447
  in `/model`'s `text` field and `head` in `/stop`'s `text` field. `/status` also works as
436
- an ordinary message. In a parent channel with `discord.requireAddressing` enabled, mention
448
+ an ordinary message. If the field is missing, check `preApplyTextOptionDrift` in the
449
+ read-only plan for missing or outdated global options, and `guilds[].shadowing` for a
450
+ guild command hiding the global one. In a parent channel with `discord.requireAddressing` enabled, mention
437
451
  this bot or reply to one of its messages just as for any ordinary message.
438
452
 
439
453
  Commands follow the same owner, allowed channel, thread, and 1:1 DM boundaries. After
@@ -712,7 +726,10 @@ wait so the head can collect it at that boundary. On restart, the system checks
712
726
  original input/request/session/file/generation and the pre-submission cursor before
713
727
  reading uncollected records and deduplicating them. Native children cannot use the
714
728
  reporting tool. An observation is not verified acceptance or proof the target is still
715
- alive. It does not create a watch model, timer, automatic reminder, resume, or stop.
729
+ alive. Direct-topic observations do not notify the HEAD model; changed manager-handoff
730
+ evidence or wait transitions are queued for it. Neither creates a watch model, timer,
731
+ or automatic reminder, or resumes or stops work. A tracked decision receipt is not
732
+ evidence of work performed, even when an answer was submitted.
716
733
 
717
734
  The Gateway adds a receipt reaction after durably accepting an allowed source message.
718
735
  It can acknowledge receipt even without a head. Waiting for a reaction API response
@@ -920,6 +937,7 @@ completed. Do not add a separate preset block to this configuration file.
920
937
  | `maxHosts` | Budget for resident Hosts, including one head. Required integer, minimum 2. Work above that limit waits. |
921
938
  | `maxSubagents` | Native task concurrency budget distributed across all Hosts. Required integer, at least `maxHosts`. The per-Host limit is `floor(maxSubagents / maxHosts)`. |
922
939
  | `idleMs` | Time in milliseconds before safely settled idle lanes are reclaimed. Required nonnegative integer. Does not apply to the head and does not remove session history. |
940
+ | `headIdleMs` | How long to keep a fully idle HEAD resident (milliseconds). Default `1800000` (30 minutes); `0` keeps it resident. This does not change lane eviction or erase history. |
923
941
  | `model` | Optional OMP model identifier for starting the head. If omitted, existing OMP settings apply. This is not the default for all new lanes: select each new lane's model or preset through `lane_start`. Resuming a lane keeps its saved selection. |
924
942
  | `discord` | Optional block. If present, `tokenEnv`, `ownerId`, `allowedGuildIds`, and `allowedChannelIds` are all required. |
925
943
  | `discord.requireAddressing` | Optional boolean, default `false`. With `true`, in parent channels of allowed servers and threads not created by this bot, only ordinary messages from the owner with an actual mention of this bot or a reply to a message it sent are accepted. |
@@ -1171,6 +1189,8 @@ the split and the task on one plain-text line, such as `Split this into a new th
1171
1189
  or `Do the login check in a new thread` (also `이건 따로 빼줘: 로그인 점검` or
1172
1190
  `로그인 점검은 새 스레드에서 해줘` in Korean). For work in a different directory, put
1173
1191
  `/new cwd: /actual/work/path` on the first line and the task on the next line.
1192
+ Paths with spaces can be written as-is or enclosed in matching quotes, e.g.
1193
+ `/new cwd: "/projects/My App"`. The path is literal; no shell expansion is performed.
1174
1194
  If you leave the task unspecified, as in `Split this into a new thread` (`이건 따로 빼줘`), the bot
1175
1195
  asks you to specify the task with `/new` in the same thread and does not create a new thread.
1176
1196
  Edited messages, quotes, and attachments do not count as instructions to create a thread.
@@ -1219,7 +1239,7 @@ or current topic. The runtime only records the edit and sends a fixed notice ask
1219
1239
  new control message. The same policy applies to Slack's `!` controls. Editing an ordinary work
1220
1240
  message creates a new input revision and does not undo external effects that have already occurred.
1221
1241
 
1222
- ### Model Selection and Head Effort
1242
+ ### Model Selection, Head Effort and Fast Mode
1223
1243
 
1224
1244
  In a Discord lane thread, run **`/model` by itself**. In the first dropdown, select **HEAD** or
1225
1245
  **the current lane**. Select a provider in the second dropdown; that dropdown then shows the
@@ -1238,10 +1258,18 @@ and `/superagent-effort`. There is no separate HTTP endpoint.
1238
1258
  | `/model --lane <provider/id>` | Directly changes only the model of the idle lane bound to the current conversation. Does not call the HEAD model or rerun a failed request. |
1239
1259
  | `/effort` | Shows the current effort and opens the picker for levels supported by the current model. |
1240
1260
  | `/effort <level>` | Changes head effort to a level shown by the query. |
1261
+ | `/fast` | Shows the current shared HEAD mode even while busy. Select `off`, `on` (Fast), or `ultra` (Ultrafast), then press **Confirm**. Changes require an idle HEAD and model support. |
1241
1262
  | `/model preset` or `/model preset list` | Lists existing native presets, their validity, and their available default models. |
1242
1263
  | `/model preset <name>` | Applies all roles and default effort from the named native preset to the idle head session. |
1243
1264
  | `/model preset <name> --global` | Also saves the identical snapshot applied and verified on the current head as the native global default roles and effort. |
1244
1265
 
1266
+ Use `/fast` without arguments in Discord or Telegram and `!fast` or `/superagent-fast`
1267
+ in Slack (`!fast` in threads). Choosing a mode alone does not change it; **Back**
1268
+ returns to the choices and **Cancel** closes the menu without a change.
1269
+ Update the Gateway and HEAD, then refresh the registered command menus separately.
1270
+ The command does not run a model or change lanes or global defaults. Later
1271
+ requests using Fast or Ultrafast may cost more.
1272
+
1245
1273
  If a lane model's quota is confirmed exhausted, the runtime notifies the original conversation
1246
1274
  once. Follow-up requests in that lane wait for the operator to pick a model. If it is unclear
1247
1275
  whether a request ran, verify the original effect, then close the request with the
@@ -1544,6 +1572,27 @@ or other unresolved work, or if usage is unknown. This is separate from the lane
1544
1572
  and the rotation stage. Unlike automatic rotation, `/restart` restores the same
1545
1573
  HEAD session.
1546
1574
 
1575
+ When `head.hibernation.stage` is `sleeping`, `head.pid: null` and
1576
+ `head.ready: false` are expected. The Gateway is still listening. Its next
1577
+ accepted input wakes the same session, so the first reply includes Host startup
1578
+ time. A fresh Discord session after a disconnect or a Slack reconnect also wakes
1579
+ HEAD to recover missed history. `omp-sa status` does not wake it. Set `headIdleMs: 0` if a warm first
1580
+ reply matters more than idle memory. A resident lane, scheduled work or an
1581
+ unsettled operation can keep HEAD awake even after the configured time.
1582
+ HEAD stays resident if the journal is a symlink, the Host cannot attest to
1583
+ safe sleep, or stock OMP cannot restore the active selection. Sleep must not
1584
+ re-enable a paid service tier, reset a `--max-time` budget, or rearm a completed
1585
+ `--plan-yolo`. Keep the native OMP profile and session storage location unchanged.
1586
+ The same agent directory with a different effective `XDG_DATA_HOME` is not sufficient.
1587
+ `launching` can mean the native process is up but its controller is not ready.
1588
+ If the config was edited during launch, restore its exact original bytes. The
1589
+ same HEAD can then process its queued input; do not resend the message.
1590
+ If HEAD reports that the Gateway cannot order startup history, stop and
1591
+ start the Gateway and HEAD from the same installation before resuming work.
1592
+ To change messenger policy while HEAD sleeps, stop the Gateway normally, edit
1593
+ the config, and explicitly start it again. A message cannot authorize a wake
1594
+ under a changed policy.
1595
+
1547
1596
  `/usage` with no arguments does not call a model. It sends only the numbers the
1548
1597
  installed OMP reports to the original conversation. Remaining limits and reset
1549
1598
  times for each provider use the Superagent host’s local time zone automatically.
@@ -1751,7 +1800,7 @@ read-only. If another writer has the original session open, native policy forks
1751
1800
  it. Resuming once the writer releases the session, and choosing later sessions,
1752
1801
  also follow native policy. This does not attach to the existing managed Host
1753
1802
  process or transfer execution ownership. An ordinary resume does not automatically
1754
- load the manager or board extensions or confer manager or board authority.
1803
+ load the managed role extensions or confer management authority.
1755
1804
  History is not a source of new permissions or instructions.
1756
1805
 
1757
1806
  Use `agent: "seance"` and `sourceSession` with `task` for consultation **only if
@@ -1801,16 +1850,21 @@ and callbacks. Answers that arrive before recovery are not treated as stale and
1801
1850
  consumed or acknowledged. Slack processes distinct concurrent selections and modal
1802
1851
  submissions in order for each card and deduplicates only actual redeliveries.
1803
1852
 
1804
- HEAD first reviews questions sent by lanes via `decision_ask`. For a routine
1805
- choice within the delegated scope, HEAD selects one of the original choices and
1806
- returns it to the lane. It records the reason internally without sending a separate
1807
- messenger notification. If the decision materially affects scope, cost, permissions,
1808
- or external commitments, or otherwise requires user judgment, it shows the reason
1809
- for escalation on the original question card. HEAD does not answer execution
1810
- approvals or ordinary native dialogs on the operator’s behalf. The `ask` cards below
1811
- refer to the structured `askDialog` used by `decision_ask`. The Host does not send
1812
- the OMP 19.1 built-in `ask` HTML `form` to a messenger. It cancels it immediately
1813
- without submitting even the selected default.
1853
+ HEAD first reviews manager-handoff questions and root-lane questions explicitly
1854
+ 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.
1859
+ It records the reason internally without sending a separate messenger notification.
1860
+ 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
1862
+ controller may escalate that same pending dialog to the original owner. Neither path
1863
+ authorizes a scope change, grants native execution approval, or answers ordinary native
1864
+ dialogs on the operator's behalf.
1865
+ The `ask` cards below refer to the structured `askDialog` used by `decision_ask`.
1866
+ The Host does not send the OMP 19.1 built-in `ask` HTML `form` to a messenger.
1867
+ It cancels it immediately without submitting even the selected default.
1814
1868
 
1815
1869
  | Platform | Approval and question UI and limits |
1816
1870
  | --- | --- |
@@ -1966,7 +2020,7 @@ its checkout for one resident lane; it does not fetch, switch branches, or disca
1966
2020
  edits. Follow-ups stay on the same worker and native session; disconnecting SSH
1967
2021
  does not stop that Host. A cold reopen is held if the checkout has changed.
1968
2022
  Chat replies and approval cards use the original route; messenger file transfer
1969
- and access to the head's local SQLite board are not provided across SSH.
2023
+ is not provided across SSH.
1970
2024
  Remote lanes require the normal stock OMP command without extra head-side flags:
1971
2025
  custom tool/profile/approval flags are never silently removed to run remotely.
1972
2026
  Use a dedicated worker OMP profile without ambient plugins. Worker startup
@@ -2020,7 +2074,7 @@ worker. That is not a stop command for an already running lane.
2020
2074
  procedure. Voice-message status and duration are passed through, but this is not automatic
2021
2075
  transcription. Inputs or edits without meaningful text or supported attachments, such as
2022
2076
  sticker-only Discord messages, are not accepted as new work.
2023
- - Lane repository and board repository channel discovery use a Git process with `GIT_DIR`,
2077
+ - Lane repository discovery uses a Git process with `GIT_DIR`,
2024
2078
  `GIT_WORK_TREE`, and other `GIT_*` variables stripped from the launching shell's environment.
2025
2079
  This is not isolation of the entire general tool environment.
2026
2080
  - Allowed input resources differ by platform:
@@ -2143,7 +2197,7 @@ login or same-process TUI/herdr attach. Automatic CLI selection does not enable
2143
2197
  or external-package opt-ins.
2144
2198
 
2145
2199
  ```sh
2146
- OMP_SUPERAGENT_NATIVE_TEST=1 bun test test/native-host.test.ts test/native-runtime.test.ts test/native-model-selection.test.ts test/native-board.test.ts test/native-gateway.test.ts
2200
+ OMP_SUPERAGENT_NATIVE_TEST=1 bun test test/native-host.test.ts test/native-runtime.test.ts test/native-model-selection.test.ts test/native-gateway.test.ts
2147
2201
  OMP_SUPERAGENT_NATIVE_TEST=1 bun test test/native-autonomy.test.ts
2148
2202
  ```
2149
2203