omp-superagent 0.1.9 → 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 (151) hide show
  1. package/DESIGN.md +68 -21
  2. package/README.ko.md +30 -372
  3. package/README.md +31 -419
  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 +8 -0
  11. package/docs/OPERATIONS.en.md +2277 -0
  12. package/docs/OPERATIONS.md +198 -45
  13. package/docs/design/execution.md +163 -54
  14. package/docs/design/messaging.md +125 -34
  15. package/docs/kakao-bridge-protocol.md +193 -0
  16. package/docs/releases/0.1.10.md +17 -0
  17. package/docs/releases/0.1.11.md +18 -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 +10 -11
  27. package/scripts/{prepare-ulw.ts → prepare-super.ts} +1 -1
  28. package/skills/head/SKILL.md +36 -5
  29. package/skills/head/references/routing.md +1 -1
  30. package/skills/head/references/supervision.md +32 -26
  31. package/skills/lane/SKILL.md +39 -21
  32. package/skills/lane/references/workflow.md +23 -16
  33. package/src/cli.ts +35 -33
  34. package/src/{config.ts → config/config.ts} +51 -6
  35. package/src/config/wake-config.ts +36 -0
  36. package/src/contracts.ts +91 -13
  37. package/src/{cron-jobs.ts → cron/cron-jobs.ts} +21 -13
  38. package/src/{cron-pr-intake.ts → cron/cron-pr-intake.ts} +4 -4
  39. package/src/{cron-schedule.ts → cron/cron-schedule.ts} +3 -3
  40. package/src/extension.ts +64 -28
  41. package/src/{gateway-client.ts → gateway/gateway-client.ts} +89 -32
  42. package/src/{gateway-native.ts → gateway/gateway-native.ts} +4 -4
  43. package/src/{gateway-protocol.ts → gateway/gateway-protocol.ts} +69 -14
  44. package/src/{gateway-wire.ts → gateway/gateway-wire.ts} +12 -7
  45. package/src/gateway-config.ts +1 -1
  46. package/src/gateway-restart-env.ts +3 -3
  47. package/src/{group-access.ts → group/group-access.ts} +8 -3
  48. package/src/{group-policy.ts → group/group-policy.ts} +2 -2
  49. package/src/{group-runner.ts → group/group-runner.ts} +11 -6
  50. package/src/host-extension.ts +213 -43
  51. package/src/host-sdk-helper.ts +62 -65
  52. package/src/{decision-tool.ts → lane/decision-tool.ts} +12 -4
  53. package/src/{decisions.ts → lane/decisions.ts} +12 -10
  54. package/src/{lane-models.ts → lane/lane-models.ts} +1 -1
  55. package/src/{lane-report.ts → lane/lane-report.ts} +22 -0
  56. package/src/{lane-rows.ts → lane/lane-rows.ts} +2 -2
  57. package/src/{lane-watch.ts → lane/lane-watch.ts} +6 -2
  58. package/src/{workflow.ts → lane/workflow.ts} +1 -1
  59. package/src/lane-extension.ts +69 -13
  60. package/src/managed-memory-helper.ts +2 -2
  61. package/src/{managed-ulw-probe.ts → managed-super-probe.ts} +3 -3
  62. package/src/{delivery.ts → messaging/delivery.ts} +1 -1
  63. package/src/{discord-command-registration.ts → messaging/discord-command-registration.ts} +3 -2
  64. package/src/{discord-context.ts → messaging/discord-context.ts} +1 -1
  65. package/src/{messenger-command-catalog.json → messaging/messenger-command-catalog.json} +1 -0
  66. package/src/messaging/messenger-commands.ts +55 -0
  67. package/src/{result-attachment.ts → messaging/result-attachment.ts} +3 -3
  68. package/src/{slack-command-registration.ts → messaging/slack-command-registration.ts} +3 -3
  69. package/src/{telegram-command-registration.ts → messaging/telegram-command-registration.ts} +2 -2
  70. package/src/omp/head-resume.ts +123 -0
  71. package/src/{host-owner-path.ts → omp/host-owner-path.ts} +1 -1
  72. package/src/{host-protocol.ts → omp/host-protocol.ts} +11 -2
  73. package/src/omp/host-reply-voice.ts +181 -0
  74. package/src/{host-superkit.ts → omp/host-superkit.ts} +1 -1
  75. package/src/{host.ts → omp/host.ts} +26 -17
  76. package/src/{installed-omp.ts → omp/installed-omp.ts} +1 -1
  77. package/src/{managed-memory.ts → omp/managed-memory.ts} +2 -2
  78. package/src/{managed-ulw.ts → omp/managed-super.ts} +42 -16
  79. package/src/omp/native-journal.ts +124 -0
  80. package/src/{native-launch-profile.ts → omp/native-launch-profile.ts} +6 -2
  81. package/src/{native-presets.ts → omp/native-presets.ts} +2 -2
  82. package/src/omp/native-sessions.ts +124 -0
  83. package/src/{omp-usage.ts → omp/omp-usage.ts} +1 -1
  84. package/src/omp/soul.ts +214 -0
  85. package/src/omp/stock-head-launch.ts +31 -0
  86. package/src/{autostart.ts → operator/autostart.ts} +3 -3
  87. package/src/{operator.ts → operator/operator.ts} +2 -2
  88. package/src/{setup-judge.ts → operator/setup-judge.ts} +1 -1
  89. package/src/{setup-profiles.ts → operator/setup-profiles.ts} +2 -2
  90. package/src/{setup.ts → operator/setup.ts} +7 -6
  91. package/src/{pr-intake-automation.ts → pr/pr-intake-automation.ts} +1 -1
  92. package/src/{pr-intake-mode.ts → pr/pr-intake-mode.ts} +3 -3
  93. package/src/{pr-intake-review.ts → pr/pr-intake-review.ts} +5 -5
  94. package/src/{pr-intake-work.ts → pr/pr-intake-work.ts} +1 -1
  95. package/src/{pr-review-models.ts → pr/pr-review-models.ts} +2 -2
  96. package/src/{pr-watch.ts → pr/pr-watch.ts} +36 -26
  97. package/src/{message-order.ts → routing/message-order.ts} +3 -2
  98. package/src/{topic-history.ts → routing/topic-history.ts} +2 -2
  99. package/src/{topic-request.ts → routing/topic-request.ts} +4 -2
  100. package/src/{runtime.ts → runtime/controller.ts} +1278 -1267
  101. package/src/runtime/deferred-routing.ts +106 -0
  102. package/src/runtime/dm-timeline.ts +194 -0
  103. package/src/{head-recovery.ts → runtime/head-recovery.ts} +1 -1
  104. package/src/{head-rotation.ts → runtime/head-rotation.ts} +32 -5
  105. package/src/runtime/model-journal.ts +119 -0
  106. package/src/runtime/native-frames.ts +131 -0
  107. package/src/{observation-request.ts → runtime/observation-request.ts} +1 -1
  108. package/src/runtime/preset-sync.ts +232 -0
  109. package/src/runtime/preset-watch-paths.ts +137 -0
  110. package/src/runtime/result-attachments.ts +146 -0
  111. package/src/storage/deferred-routing.ts +149 -0
  112. package/src/{store.ts → storage/store.ts} +450 -49
  113. package/src/{worker-bridge.ts → worker/worker-bridge.ts} +2 -2
  114. package/src/{worker-enrollment.ts → worker/worker-enrollment.ts} +2 -2
  115. package/src/{worker-host.ts → worker/worker-host.ts} +7 -3
  116. package/src/{worker-placement.ts → worker/worker-placement.ts} +1 -1
  117. package/src/{worker-profile.ts → worker/worker-profile.ts} +1 -1
  118. package/src/{worker-registration.ts → worker/worker-registration.ts} +2 -2
  119. package/src/{worker-request.ts → worker/worker-request.ts} +5 -5
  120. package/src/{worker-service.ts → worker/worker-service.ts} +2 -2
  121. package/src/{worker-trust.ts → worker/worker-trust.ts} +1 -1
  122. package/src/{worker-wire.ts → worker/worker-wire.ts} +3 -3
  123. package/src/worker-serve-prepare.ts +4 -4
  124. package/src/board-extension.ts +0 -217
  125. package/src/board.ts +0 -467
  126. package/src/gateway-host-helper.ts +0 -13
  127. package/src/messenger-commands.ts +0 -15
  128. package/src/native-sessions.ts +0 -34
  129. /package/src/{credentials.ts → config/credentials.ts} +0 -0
  130. /package/src/{dialog.ts → messaging/dialog.ts} +0 -0
  131. /package/src/{telegram-command-languages.json → messaging/telegram-command-languages.json} +0 -0
  132. /package/src/{host-broker-services.ts → omp/host-broker-services.ts} +0 -0
  133. /package/src/{host-inventory-manifest.ts → omp/host-inventory-manifest.ts} +0 -0
  134. /package/src/{host-services.ts → omp/host-services.ts} +0 -0
  135. /package/src/{native-settings.ts → omp/native-settings.ts} +0 -0
  136. /package/src/{superkit-skills.ts → omp/superkit-skills.ts} +0 -0
  137. /package/src/{repository.ts → operator/repository.ts} +0 -0
  138. /package/src/{pr-github-schema.ts → pr/pr-github-schema.ts} +0 -0
  139. /package/src/{pr-github.ts → pr/pr-github.ts} +0 -0
  140. /package/src/{pr-intake-comment.ts → pr/pr-intake-comment.ts} +0 -0
  141. /package/src/{pr-intake-fix.ts → pr/pr-intake-fix.ts} +0 -0
  142. /package/src/{pr-intake-github.ts → pr/pr-intake-github.ts} +0 -0
  143. /package/src/{pr-intake-material.ts → pr/pr-intake-material.ts} +0 -0
  144. /package/src/{pr-intake-tree.ts → pr/pr-intake-tree.ts} +0 -0
  145. /package/src/{head-quota.ts → runtime/head-quota.ts} +0 -0
  146. /package/src/{worker-checkout.ts → worker/worker-checkout.ts} +0 -0
  147. /package/src/{worker-destination.ts → worker/worker-destination.ts} +0 -0
  148. /package/src/{worker-doctor.ts → worker/worker-doctor.ts} +0 -0
  149. /package/src/{worker-ledger.ts → worker/worker-ledger.ts} +0 -0
  150. /package/src/{worker-repository.ts → worker/worker-repository.ts} +0 -0
  151. /package/upstream/{ulw.json → super.json} +0 -0
package/DESIGN.md CHANGED
@@ -18,28 +18,32 @@ or lanes. This is not a multitenant service or an OS sandbox.
18
18
  - [Messaging and authority](docs/design/messaging.md): ingress, routing, controls,
19
19
  approvals, recovery, delivery, and Discord voice.
20
20
  - [Execution and coordination](docs/design/execution.md): lanes, native Host lifecycle,
21
- models, workflows, managed integration, monitoring, and the board.
22
- - [Setup and operations](docs/OPERATIONS.md): configuration, commands, and recovery procedures.
21
+ models, workflows, managed integration, monitoring, and direct lane coordination.
22
+ - Setup and operations ([English](docs/OPERATIONS.en.md) · [한국어](docs/OPERATIONS.md)): configuration, commands, and recovery procedures.
23
23
  - [Versioned release records](docs/releases/): dated evidence and its limits.
24
24
 
25
25
  <picture>
26
26
  <source media="(prefers-color-scheme: dark)" srcset="assets/architecture-dark.svg">
27
27
  <source media="(prefers-color-scheme: light)" srcset="assets/architecture.svg">
28
- <img src="assets/architecture.svg" width="100%" alt="One Gateway connects the messengers to the head. The head controls independent lanes and shares an informational board with them.">
28
+ <img src="assets/architecture.svg" width="100%" alt="One Gateway connects the messengers to the head controller, which routes bound topics directly and coordinates independent lanes.">
29
29
  </picture>
30
30
 
31
31
  [Mermaid source](assets/architecture.mmd)
32
32
 
33
33
  ## Ownership and source map
34
34
 
35
+ `src/` keeps the executable CLI and the extension/helper entry points that installed
36
+ launchers and managed Hosts load by path. Their implementations and shared modules
37
+ are grouped by feature below it. `runtime/` owns HEAD coordination; `storage/`
38
+ owns its durable state. Moving a module does not transfer authority to the Gateway.
39
+
35
40
  | Component | Responsibility | Entry points |
36
41
  | --- | --- | --- |
37
- | CLI and setup | Configuration, credentials, doctor, start/status/stop and one-shot macOS registration. | [CLI](src/cli.ts), [config](src/config.ts), [setup](src/setup.ts), [credentials](src/credentials.ts), [autostart](src/autostart.ts) |
38
- | 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-client.ts), [adapter hub](gateway/src/adapter.rs) |
39
- | 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.ts), [coordination store](src/store.ts) |
40
- | 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-report.ts), [role instructions](skills/lane/SKILL.md) |
41
- | 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/host.ts), [stdio owner](host-owner/src/main.rs), [SDK helper](src/host-sdk-helper.ts), [native lifecycle extension](src/host-extension.ts) |
42
- | Board | An informational log in `coordination.sqlite` shared by registered head/lane sessions in the same instance. Not a command, approval, or delivery bus. | [Board](src/board.ts), [board extension](src/board-extension.ts) |
42
+ | 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
+ | 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) |
45
+ | 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
+ | 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) |
43
47
 
44
48
  OMP owns transcripts, tool history, goals, child tasks, provider auth, and native
45
49
  execution records. Superagent stores the coordination facts needed to recover work:
@@ -47,8 +51,8 @@ intake and receipts, topic bindings, requests and lanes, approvals and delivery
47
51
  outcomes. `coordination.sqlite` is shared by Gateway and head with independent
48
52
  connections. It is not a second OMP transcript. The private Unix sockets under the
49
53
  canonical `stateDir` are instance-owned, not arbitrary URLs or a general RPC proxy.
50
- Native children get neither the manager nor the board. Managed extensions are not
51
- installed globally into ordinary OMP.
54
+ Native children cannot manage lanes, report as a root lane, or request tracked
55
+ decisions. Managed extensions are not installed globally into ordinary OMP.
52
56
 
53
57
  The operator CLI is still Bun, not a second resident Gateway. Command registration
54
58
  and confirmed avatar setup invoke a one-shot Rust REST client with credentials
@@ -73,8 +77,8 @@ part of the native build.
73
77
  2. `start` requires a valid active managed integration and starts or reuses one
74
78
  detached Gateway. A lifetime lock establishes single ownership. The Gateway starts
75
79
  or reconnects to the designated head through private local transport; the root
76
- head loads the manager and board extensions, a root lane loads the lane and board
77
- extensions. The Gateway owns configured messenger secrets and removes their
80
+ head loads the manager extension and a root lane loads the lane extension.
81
+ The Gateway owns configured messenger secrets and removes their
78
82
  environment variables from the managed Hosts; this is not isolation from the OS user.
79
83
  Gateway start/restart and new Host launches enforce the
80
84
  [native memory preflight](docs/design/execution.md#native-memory-preflight):
@@ -103,6 +107,45 @@ part of the native build.
103
107
  no `KeepAlive`, immediate activation, or second supervisor. `uninstall` removes
104
108
  only future startup. There is no Linux service installer or Windows support.
105
109
 
110
+ ### Idle HEAD hibernation
111
+
112
+ `headIdleMs` controls how long a fully idle HEAD stays resident (default 30
113
+ minutes; `0` disables hibernation). It is independent of lane eviction. Only
114
+ the Host and its stdio owner exit: the same Rust Gateway keeps its messenger
115
+ connections and durable ingress. A registered but unloaded lane does not
116
+ need to be started to park HEAD. An active or unverified lane, scheduled work,
117
+ pending approval, unresolved delivery, or other work needing the controller
118
+ prevents hibernation.
119
+
120
+ If both checks are due and HEAD also qualifies for the existing high-context
121
+ rotation, rotation takes precedence. Hibernation itself never selects a new journal.
122
+
123
+ Before reporting `head.hibernation.stage: "sleeping"`, the Gateway fences
124
+ dispatch and verifies the original Host's clean journal receipt and both
125
+ process exits. A surviving older Host must explicitly attest to hibernation;
126
+ an ordinary rotation response is not sufficient. An authenticated event arriving
127
+ across this boundary stays in the Gateway queue. On demand, one replacement
128
+ reopens the **same** journal in the **same native profile** and verifies the
129
+ model selection before dispatch resumes. The helper and the live Host verify
130
+ both the agent directory and the native data and session-discovery roots.
131
+ The Gateway does not expose its controller socket until all configured adapters
132
+ have authenticated. A wake stays `launching` until the verified replacement's
133
+ connected controller reaches `/ready`; probing the native PID is not completion.
134
+ If the config changes during wake, restoring the exact reserved bytes allows
135
+ that controller to continue without a second launch or replay. An older checkpoint without an
136
+ attested profile remains held: a matching configuration hash or an operator
137
+ stop cannot reconstruct its original profile identity.
138
+ If the Host starts before its Gateway, it waits to attach; this never retries
139
+ a prompt or a messenger effect.
140
+ A fresh Discord login after a lost session or a Slack Socket Mode reconnect
141
+ also wakes HEAD to check for messages missed offline. A replayed Discord
142
+ connection or Telegram's own polling recovery does not require this wake.
143
+ An ordinary wake does not give history priority over already queued messages.
144
+ An actual history gap requires a scan covering the gap, not one that passed
145
+ the route before the reconnect. Neither a CLI `status` read nor an explicit
146
+ Gateway stop is demand for a Host. A proved failure to create the child releases
147
+ only that launch reservation; an uncertain shutdown or launch stays fenced.
148
+
106
149
  ### Idle head rotation
107
150
 
108
151
  The Gateway may replace only the designated head after the runtime attests at
@@ -140,10 +183,11 @@ lifecycle control, not a model turn. It can be admitted while the head is busy:
140
183
  route before handing off the restart. Checkpoint with native APIs: cancel the
141
184
  head's pending cards by their original IDs, abort/clear queued native work,
142
185
  pause the active head goal and cancel and reap the root's native background
143
- jobs. Cancellation alone is not an exit receipt. If the final checkpoint is
144
- still busy, a **new** owner `/restart` can continue from the saved checkpoint
145
- on that same head; a duplicate command or uncertain handoff cannot. Require
146
- actual quiescence before shutdown; never signal a PID to bypass ownership.
186
+ jobs. Cancellation alone is not an exit receipt. If checkpointing fails
187
+ before Gateway handoff or final readback still finds HEAD busy, a **new**
188
+ owner `/restart` on the same head can retry using any checkpoint already
189
+ saved. A duplicate command or uncertain handoff cannot. Require actual
190
+ quiescence before shutdown; never signal a PID to bypass ownership.
147
191
  - Bind one durable lifecycle request to the original owner input, acknowledgement
148
192
  and current process identity. Duplicate delivery does not start another replacement.
149
193
  Compatible edits to runtime limits or the default model can take effect on
@@ -161,6 +205,9 @@ lifecycle control, not a model turn. It can be admitted while the head is busy:
161
205
  keeps intake held; a configured default is not evidence of active effort.
162
206
  Reconnect to resident lanes within the Host budget only when ownership and
163
207
  generation match. Leave out-of-budget Hosts untouched and unloaded lanes unloaded.
208
+ A detached local lane's recorded residency is retired only after its exact owner
209
+ PID no longer exists and its socket path is confirmed absent. That releases its
210
+ slot without changing paused work, queue order or unresolved approvals.
164
211
  Restore native admission and outcomes from matching journal evidence, not receipts
165
212
  from another run. Held submissions are not replayed. Only a goal active before the
166
213
  restart with a verified original source can resume through native goal resume;
@@ -170,9 +217,9 @@ lifecycle control, not a model turn. It can be admitted while the head is busy:
170
217
 
171
218
  ## Stock OMP and verification scope
172
219
 
173
- The [package manifest](package.json) pins the published SDK to **19.1.1**, with
174
- upstream [v19.1.1 source](https://github.com/can1357/oh-my-pi/commit/31ffee513f27a01bba7d4dfbe12bae239cdc646a).
175
- That pin is not a CLI version allowlist. [CLI inspection](src/installed-omp.ts)
220
+ The [package manifest](package.json) pins the published SDK to **19.2.1**, with
221
+ upstream [v19.2.1 source](https://github.com/can1357/oh-my-pi/commit/b55cd1bb664d8ab46ddc77f2a34eb47555dbf1ac).
222
+ That pin is not a CLI version allowlist. [CLI inspection](src/omp/installed-omp.ts)
176
223
  checks CLI identity, public `rpc-ui`, resume, extension and model flags, and the
177
224
  advertised process interface. A process reuses an inspection only while the
178
225
  configured executable's resolved regular file (path, device, inode, size, mtime,
@@ -184,7 +231,7 @@ runtime wrapper in place of the native CLI.
184
231
  [CI](https://github.com/dbc-hbin/omp-superagent/actions/workflows/ci.yml)
185
232
  uses the SDK-matched official CLI for the baseline tests on Linux x64 and macOS
186
233
  ARM64. Separate jobs build and verify installation of the npm payload on Linux
187
- and macOS on both architectures; see the [packaging procedure](docs/OPERATIONS.md#소스npm-릴리즈).
234
+ and macOS on both architectures; see the [packaging procedure](docs/OPERATIONS.en.md#source-and-npm-releases).
188
235
  OMP 18 can still be tested locally with `bash scripts/test-omp.sh <release-tag>`.
189
236
  `bun run test:ci` uses the installed
190
237
  CLI; `bun run test:baseline` downloads and verifies the SDK-matched official binary.
package/README.ko.md CHANGED
@@ -9,8 +9,7 @@
9
9
  </p>
10
10
 
11
11
  <p align="center">
12
- Discord·Telegram·Slack을 <a href="https://github.com/can1357/oh-my-pi">oh-my-pi</a>의 세션·인증·도구·native <code>task</code>에 연결합니다.
13
- 일반 작업과 후속 답변은 주제별 독립 OMP 세션에서 처리합니다. 주제 간 조정은 <code>/head</code>로 전역 헤드에 요청합니다.
12
+ Discord·Telegram·Slack에서 <a href="https://github.com/can1357/oh-my-pi">oh-my-pi</a>로 코딩과 프로젝트 작업을 합니다.
14
13
  </p>
15
14
 
16
15
  <p align="center">
@@ -31,415 +30,74 @@
31
30
  <a href="README.md">English</a> · <strong>한국어</strong>
32
31
  </p>
33
32
 
34
- ## 차별점
33
+ ## 주요 기능
35
34
 
36
- <table>
37
- <tr>
38
- <td width="50%" valign="top">
39
- <h4>직접 실행하는 헤드</h4>
40
- 조사·구현을 직접 처리하거나, 분리할 작업의 범위와 인계를 정해 위임합니다.
41
- </td>
42
- <td width="50%" valign="top">
43
- <h4>맡긴 목표 안의 자율 실행</h4>
44
- 다음 유용한 일을 선택·우선순위화하고 계획·실행·검증·수정합니다.
45
- 검증한 중간 결과 뒤에도 남은 허가 작업을 단계별 허락 없이 이어가되 새 범위·외부 효과를 임의로 추가하지 않습니다.
46
- </td>
47
- </tr>
48
- <tr>
49
- <td width="50%" valign="top">
50
- <h4>저장소·주제별 독립 레인</h4>
51
- 별도 OMP Host와 세션으로 작업 디렉터리와 맥락을 나눕니다.
52
- </td>
53
- <td width="50%" valign="top">
54
- <h4>레인별 native 모델·프리셋</h4>
55
- 새 주제는 현재 헤드 모델로 시작한 뒤 자기 모델을 유지합니다. 명시적 위임에는 별도 모델이나 프리셋을 선택할 수 있습니다.
56
- </td>
57
- </tr>
58
- <tr>
59
- <td width="50%" valign="top">
60
- <h4>연결과 세션 수명의 분리</h4>
61
- 지속 실행되는 Gateway가 메신저 연결과 수신·조율 장부를 맡고, OMP 세션이 대화 맥락을 맡습니다.
62
- </td>
63
- <td width="50%" valign="top">
64
- <h4>관리 세션만 쓰는 공유 게시판</h4>
65
- 같은 인스턴스에 등록된 헤드·레인이 정보를 공유하며, 명령이나 승인 경로로 쓰지 않습니다.
66
- </td>
67
- </tr>
68
- <tr>
69
- <td colspan="2" valign="top">
70
- <h4>순정 OMP 사용</h4>
71
- 관리형 익스텐션과 공개 API로 기존 세션·도구·승인·인증을 재사용하며 코어 fork를 유지하지 않습니다.
72
- </td>
73
- </tr>
74
- </table>
35
+ - **헤드와 주제별 레인.** 헤드는 직접 답하고 작업할 수 있습니다. 레인마다 저장소·OMP 세션·모델이 독립적이며, 후속 요청과 답변은 연결된 주제에 남습니다.
36
+ - **메신저 연결과 모델 실행 분리.** Gateway가 요청을 저장하고 헤드의 수명을 관리합니다. 세션·도구·인증·승인은 순정 OMP가 맡습니다.
37
+ - **로컬 또는 [SSH 워커](#원격-워커-추가)에서 레인 실행.** 설정된 모든 소유자는 같은 신뢰된 운영자로 취급합니다. 멀티테넌트 서비스나 OS 샌드박스가 아닙니다.
75
38
 
76
- ## 구조
39
+ ## 아키텍처
77
40
 
78
41
  <picture>
79
42
  <source media="(prefers-color-scheme: dark)" srcset="assets/architecture.ko-dark.svg">
80
- <source media="(prefers-color-scheme: light)" srcset="assets/architecture.ko.svg">
81
- <img src="assets/architecture.ko.svg" width="100%" alt="메신저 연결을 유지하는 Gateway, 직접 작업하거나 독립 레인에 인계하는 OMP 헤드, 같은 인스턴스의 정보 게시판">
43
+ <img src="assets/architecture.ko.svg" width="100%" alt="메신저는 Gateway에 연결됩니다. 헤드는 요청을 처리하고 독립 레인에 작업을 맡기며, 레인은 결과를 헤드에 보고합니다.">
82
44
  </picture>
83
45
 
84
- Gateway는 메신저 연결·수신 장부·헤드 수명을 관리하는 데몬입니다. 작업을 판단하고 레인을 지시하는 주체는 헤드입니다.
85
- 헤드 런타임이 승인과 전송을 관리합니다. 연결된 주제의 일반 후속 요청은 해당 레인이 처리하며,
86
- 전역 모델을 거치지 않고 답변을 전달합니다.
87
-
88
- [구조도 Mermaid 원본](assets/architecture.mmd)
89
-
90
- ## 안전과 권한
91
-
92
- 설정한 모든 메신저 소유자는 같은 신뢰된 운영자 한 명으로 취급합니다. 멀티테넌트 서비스나
93
- OS 샌드박스가 아닙니다. 자세한 내용은 [설계(영문)](DESIGN.md)를 참고하세요.
94
-
95
- | 단계 | 바뀌는 것 |
96
- | --- | --- |
97
- | [설치](#1-설치) | 의존성과 관리형 omp-superkit 통합을 준비합니다. 봇을 시작하거나 설치된 OMP를 교체하지 않습니다. |
98
- | [`setup`](#2-설정과-자격-증명) | `config.local.json`과 소유자 전용 평문 파일 `config.local.json.env`(`0600`)를 만듭니다. 최종 저장 전에 필요한 OMP 전역 메모리 변경과 봇 프로필 사진 교체를 안내합니다. 봇·모델 세션은 시작하지 않습니다. |
99
- | [`doctor`](#3-진단-후-명시적으로-시작) | 메신저에 로그인하거나 설정을 변경하지 않고 로컬 설정과 OMP 메모리 백엔드의 실효 상태를 진단합니다. |
100
- | [`start`](#3-진단-후-명시적으로-시작) | 필요한 경우 OMP 메모리 기본값을 저장한 뒤 detached Gateway와 헤드를 시작하고 설정한 모든 플랫폼에 연결합니다. |
101
- | [Discord 음성채팅](docs/discord-voice.md) | 기본값은 꺼짐입니다. 구독 권한이 없으면 유료 API로 전환하지 않습니다. |
102
- | [`/stop`](#사용-방법) | 연결 레인을 일시정지합니다. 승인·취소·도구 제외와 불확실한 효과에 대한 보류는 유지합니다. |
103
-
104
- ## 배포 형태
105
-
106
- [npm 패키지](https://www.npmjs.com/package/omp-superagent)를 Bun 또는 npm으로 설치하거나
107
- [GitHub Release](https://github.com/dbc-hbin/omp-superagent/releases/tag/v0.1.9)의 소스·npm tarball을 받으세요.
108
- 실행에는 Bun이 필요하며 독립 실행 바이너리는 아닙니다. 설치 시 관리형 의존성을 준비합니다.
109
- Host를 실행하려면 별도로 설치한 OMP가 필요하며, 이 프로젝트가 패치하거나 빌드하지 않습니다.
110
-
111
46
  ## 빠른 시작
112
47
 
113
- 현재 소스는 Git, **Bun >= 1.4.4**, 로컬 Unix socket을 사용합니다. 패키지 설치에는 OMP가
114
- 필요 없습니다. Host를 실행할 때는 별도로 설치한 OMP의 기능을 검사하며, 버전 범위로 제한하지
115
- 않습니다. CI 기준판은 **OMP 19.1.1**이며, **18.20.3과 18.22.2**는 이전 릴리스에서 검증했습니다.
116
- Windows는 지원하지 않습니다.
117
-
118
- <details>
119
- <summary><strong>SDK 고정 버전과 CI 재현</strong></summary>
120
-
121
- SDK는 [upstream `v19.1.1` 커밋](https://github.com/can1357/oh-my-pi/commit/31ffee513f27a01bba7d4dfbe12bae239cdc646a)에 맞춰 고정합니다.
122
- `bun run test:ci`는 현재 설치된 OMP를 검사합니다. CI 기준판을 재현하려면 `bun run test:baseline`을
123
- 사용하세요. OMP 18은 수동 검사만 제공합니다. `bash scripts/test-omp.sh v18.22.2` 또는 `v18.20.3`을
124
- 지정하면 해당 공식 바이너리를 검증한 뒤 같은 회귀를 로컬에서 실행합니다.
125
- 별도의 주간·수동 **OMP upstream compatibility** 검사는 최신판이 깨지면 그대로 실패하며 릴리스를 막지 않습니다.
126
-
127
- </details>
128
-
129
48
  ### 1. 설치
130
49
 
131
- <table width="100%"><tr><td>
132
-
133
- **중요**
134
-
135
- Host를 OMP 18에서 19로 바꾸기 전에 기존 백그라운드 서비스를 확인하세요.
136
- OMP 19 데몬은 이전 브로커의 서비스를 인수하지 않습니다.
137
-
138
- </td></tr></table>
139
-
140
- OMP 자체를 설치하려면 [공식 설치 안내](https://github.com/can1357/oh-my-pi#install)를 참고하세요.
50
+ macOS 또는 Linux(arm64·x64), [Bun 1.4.4 이상](https://bun.sh), 별도로 설치한 [순정 OMP](https://github.com/can1357/oh-my-pi#install)가 필요합니다. 모델 제공자 인증은 OMP에서 설정하세요.
141
51
 
142
52
  ```sh
143
- bun add --global --trust omp-superagent@0.1.9
53
+ bun add --global --trust omp-superagent
144
54
  omp-sa --help
145
55
  ```
146
56
 
147
- `--trust`는 관리형 omp-superkit 통합 준비 등 패키지 설치 스크립트 실행을 허용합니다.
148
- `bun pm bin --global`의 출력 경로를 `PATH`에 포함하세요.
149
-
150
- <details>
151
- <summary><strong>npm으로 설치</strong></summary>
152
-
153
- Bun이 `PATH`에 있다면 npm으로도 설치할 수 있습니다.
154
-
155
- ```sh
156
- npm install --global omp-superagent@0.1.9
157
- ```
158
-
159
- postinstall이 필수 관리형 omp-superkit 통합을 준비하므로 설치 스크립트를 생략하지 마세요.
160
-
161
- </details>
162
-
163
- 공개 SDK 패키지와 플랫폼 네이티브 의존성은 패키지 레지스트리에서 받으며, Rust 도구·OMP 소스
164
- checkout·코어 패치·네이티브 빌드가 필요하지 않습니다. 의존성 설치에는 네트워크가 필요하지만,
165
- 봇을 시작하거나 설치된 OMP를 교체하지는 않습니다.
166
- `command`에는 설치된 OMP 실행 파일과 그 뒤에 네이티브 CLI 옵션을 지정합니다.
167
- Bun 등 런타임으로 OMP 소스를 실행하는 래퍼는 지원하지 않습니다.
168
-
169
- CLI 명령어는 <strong><code>omp-sa</code></strong>이며 프로젝트·패키지 이름은 `omp-superagent`로 유지합니다.
170
-
171
- <details>
172
- <summary><strong>소스 checkout에서 실행</strong></summary>
173
-
174
- 소스 checkout이나 소스 tarball에는 stable Rust/Cargo, CMake, C 컴파일러가 필요합니다. Cargo는 Gateway와 Host 중계기만 빌드하며 OMP는 빌드하지 않습니다. Rust 코드 변경 후에는 `bun run build:native`를 실행하세요. 소스 루트에서:
175
-
176
- ```sh
177
- bun install --frozen-lockfile
178
- bun link
179
- ```
180
-
181
- `omp-sa`와 소스 호출 `bun --no-env-file src/cli.ts`는 같은 CLI이며 둘 다 `.env` 자동 로딩을 끕니다.
182
-
183
- </details>
57
+ `bun pm bin --global`의 출력 경로를 `PATH`에 추가하세요. Bun이 `PATH`에 있으면 `npm install --global omp-superagent`도 사용할 수 있습니다. npm 패키지에는 네이티브 실행 파일이 포함됩니다. 소스 빌드는 [운영 가이드](docs/OPERATIONS.md)를 참고하세요.
184
58
 
185
59
  ### 2. 설정과 자격 증명
186
60
 
187
- 원격 실행이 필요하면 헤드를 평소처럼 설정한 뒤 [원격 워커 추가](#원격-워커-추가)를 따르세요.
188
- 워커에서는 메신저를 설정하지 않습니다.
189
-
190
- [플랫폼 앱·권한](docs/OPERATIONS.md#2-플랫폼별-앱과-접근-범위)을 준비한 뒤 터미널에서 실행합니다.
61
+ [Discord·Telegram·Slack 앱](docs/OPERATIONS.md#2-플랫폼별-앱과-접근-범위) 중 사용할 플랫폼을 준비한 뒤 실행하세요.
191
62
 
192
63
  ```sh
193
64
  omp-sa setup --config ./config.local.json
194
65
  ```
195
66
 
196
- <table width="100%"><tr><td>
197
-
198
- **중요**
199
-
200
- 셋업은 `config.local.json`을 만들고 숨김 입력으로 받은 토큰을 소유자 전용
201
- `config.local.json.env`(`0600`)에 저장합니다. 파일은 암호화 저장소가 아닌 평문이며,
202
- 비어 있지 않은 셸 자격 증명이 우선합니다. 모델 제공자 인증은 기존 OMP 방식으로 설정합니다.
203
-
204
- </td></tr></table>
205
-
206
- 봇·모델 세션은 시작하지 않습니다. 최종 저장 확인에는 Discord/Telegram 봇 프로필 사진을
207
- 마스코트로 바꾸는 작업도 포함됩니다.
208
-
209
- 관리형 헤드와 레인은 실효 설정이 `off`가 아닌 모든 지원 OMP 메모리 백엔드를 사용할 수
210
- 있습니다. 선택된 프로필에 백엔드가 미설정이거나 전역 설정에서 꺼져 있으면, 셋업은 최종
211
- 저장 전에 이를 안내하고 저장을 승인한 뒤 해당 프로필의 전역 `memory.backend`만 `mnemopi`로
212
- 설정합니다. 메모리만 따로 묻지 않으며 프로젝트·실행 오버레이는 변경하지 않습니다.
213
- 저장 뒤에도 메모리가 꺼져 있거나 실효 상태를 확인할 수 없으면 저장 파일을 보존하고 셋업이
214
- 완료되지 않았다고 알립니다.
67
+ 설정 중에는 봇이나 모델이 시작되지 않습니다. `config.local.json.env`에는 토큰이 소유자 전용 권한으로 평문 저장되므로 공유하지 마세요. 최종 저장 전에 봇 프로필 사진과 OMP 메모리 설정의 변경 여부를 확인하세요.
215
68
 
216
- 누락된 native judge 역할은 설정을 권장하지만 모델을 자동 선택하거나 호출하지 않습니다.
217
-
218
- 메모리 동작, 다른 설정 경로, 수동 설정과 저장 효과는
219
- [설정 가이드](docs/OPERATIONS.md#3-설정)를 참고하세요.
69
+ 카카오톡은 [직접 운영하는 브리지](docs/kakao-bridge-protocol.md)로만 연결합니다. 비공식 자동화라 카카오 계정이 제한될 수 있습니다. 설정 블록은 설정 파일에 직접 추가하세요.
220
70
 
221
71
  ### 3. 진단 후 명시적으로 시작
222
72
 
223
73
  ```sh
224
74
  omp-sa doctor --config ./config.local.json
225
- ```
226
-
227
- 소스 준비와 `doctor`는 메신저에 로그인하지 않습니다. `doctor`로 로컬 설정과 CLI·자격 증명 환경,
228
- 실효 메모리 설정을 변경 없이 진단합니다. 기존 구성에서도 Gateway 시작·재시작과 각 관리형 Host
229
- 실행에는 셋업과 같은 기본값 보완 규칙이 적용됩니다. 각 Host는 자기 작업 디렉터리를 기준으로
230
- 확인하며, 프로젝트·실행 오버레이에서 명시적으로 꺼둔 경우에는 시작하지 않습니다.
231
- `start`는 설정에 남긴 **모든 플랫폼**을 활성화하고, detached Gateway와 헤드를 시작합니다.
232
-
233
- ```sh
234
75
  omp-sa start --config ./config.local.json
76
+ omp-sa status --config ./config.local.json
235
77
  ```
236
78
 
237
- 같은 헤드가 누락된 native `high`/`middle`/`low` 프리셋만 초기화한 뒤 일반 작업을 시작합니다.
238
- 관리 프리셋은 이후 OMP의 `slow`·`default`·`smol` 역할을 따라가며, 활성 세션과 수동 프리셋은
239
- 보존합니다. `status`는 초기화와 transport 준비를 구분합니다.
240
- setup과 doctor는 봇·모델 세션을 시작하지 않습니다.
241
-
242
- <table width="100%"><tr><td>
243
-
244
- **참고**
245
-
246
- 이 패치 없는 배포판은 관리형 RPC Host에 native TUI/herdr로 접속하는 기능을 제공하지 않습니다.
247
- 관리 세션은 메신저 명령과 `omp-sa status`로 확인하고 제어합니다.
248
- 레인 기록은 일반 OMP의 기본 세션 검색에서도 찾습니다. `/resume`(Tab으로 모든 프로젝트)
249
- 또는 native 기록 도구를 사용하세요. 의도적인 재개는 일반 OMP 작업이며 관리 Host 접속이나
250
- 관리·게시판 권한 부여가 아닙니다.
251
- [native 세션 접근](docs/OPERATIONS.md#일반-omp에서-세션-기록-찾기)에서 범위와 사용법을 확인하세요.
252
-
253
- </td></tr></table>
254
-
255
- 상태 조회·종료·macOS 로그인 후 자동 시작·복구는 [운영 가이드](docs/OPERATIONS.md)를
256
- 참고하세요. 로그인 자동 시작은 한 번 실행하는 방식이며 crash 자동 재시작은 아닙니다.
257
- Linux 서비스 설치는 제공하지 않습니다.
258
-
259
- ## 원격 워커 추가
260
-
261
- “이 저장소 Linux에서 테스트해”라고 했을 때 다른 머신에 레인을 열 수 있습니다.
262
- 메신저 계정과 봇 토큰은 **헤드에만** 둡니다. 양쪽 모두 `omp-sa worker`가 있는
263
- 빌드를 사용하세요. 아직 배포되지 않은 소스라면 이전 npm 버전 대신 위의 소스 설치 방법을 따르세요.
264
-
265
- 1. **워커에서:** 위의 방법으로 Git, Bun, stock OMP, `omp-superagent`를 설치합니다.
266
- 실행 파일과 `omp-superagent` 설치 경로는 등록할 작업용 checkout 밖에 있어야 하며,
267
- 다른 사용자가 해당 경로의 파일을 교체할 수 없어야 합니다.
268
- 작업할 계정에서 OMP 모델 인증과 네이티브 메모리 백엔드를 설정하세요. 워커에서는 셸 명령으로
269
- 가져오는 API 키와 원격 인증 브로커를 지원하지 않습니다. 메모리 백엔드가 없다면
270
- 예를 들어 `omp config set memory.backend mnemopi`를 사용할 수 있습니다. 같은 Git 저장소의 전용 clone을
271
- **요청할 커밋으로** 맞춥니다. 커밋만 받아 놓고 다른 브랜치에서 작업 중인 상태로는 부족합니다.
272
- 테일넷 등 사설망을 통해 이 계정의 **OpenSSH 서버**에 접속할 수 있어야 합니다.
273
- `authorized_keys`의 지정 명령 제한을 사용하므로 Tailscale SSH 자체의 로그인 정책으로 대체할 수 없습니다.
274
- 공개 포트, 두 번째 헤드, 워커에서의 `omp-sa setup`이나 `omp-sa start`는 필요 없습니다.
275
- 2. **헤드에서:** 워커 운영자와 SSH 호스트 키 지문을 확인한 뒤 `known_hosts`에 등록합니다.
276
- `~/.ssh/config` 별칭 대신 직접 접속할 수 있는 DNS 이름이나 IP를 사용하세요. Tailscale SSH가
277
- 22번 포트를 사용한다면 사설망에서 별도 포트로 수신하는 OpenSSH를 사용하세요. 해당 키는
278
- `known_hosts`의 `[호스트]:포트`에 고정하고, 두 번의 `worker add` 모두 `dev@linux-box:포트`를
279
- 지정합니다. 기본 SSH 포트를 쓸 때는 다음과 같습니다.
280
- ```sh
281
- omp-sa worker add dev@linux-box --config ./config.local.json
282
- ```
283
- 3. **워커에서 `dev` 계정으로:** 위 명령이 출력한 `worker init` 명령을 실행합니다.
284
- 생성된 헤드의 **공개키**는 그대로 두고 예시 경로만 실제 저장소로 바꾸세요.
285
- ```sh
286
- omp-sa worker init --head-key 'ssh-ed25519 …' --repo "$HOME/src/my-app"
287
- ```
288
- 지정된 워커 명령만 호출할 수 있는 전용 키가 `~/.ssh/authorized_keys`에 등록됩니다.
289
- 헤드의 개인 키·봇 토큰·설정 파일은 복사하지 마세요. 레인의 도구는 워커 OS 계정의
290
- 권한으로 실행되므로 다른 파일과 격리하려면 전용 계정을 사용하세요.
291
- 4. **다시 헤드에서:** 같은 `worker add` 명령을 실행합니다. 처음 안내가 나왔을 때가
292
- 아니라 **`verified`가 표시되어야 등록 완료**입니다. 특정 헤드 checkout의 새 레인에
293
- 이 워커를 우선 사용하려면 `--default --local-repo /헤드의/경로/my-app`을 붙입니다.
294
- `--local-repo`를 생략하면 설정의 `headCwd`를 사용합니다. 같은 Git 원격 주소라도
295
- 다른 checkout에 이 기본 배치 권한이 넘어가지는 않습니다.
296
-
297
- 등록 목록은 `omp-sa worker list --config ./config.local.json`으로 확인합니다. 목록 조회는
298
- 워커에 접속하지 않습니다. 지금 연결되는지 확인하려면
299
- `omp-sa worker doctor dev@linux-box --config ./config.local.json`에 등록 때 쓴 주소와
300
- 포트를 그대로 지정하세요. 워커 신원과 빈 슬롯을 확인하며, 기본 워커라면 승인된 헤드
301
- checkout의 현재 커밋도 대조합니다. 확인이 막히면 종료 코드는 0이 아니며, 레인을 시작하지 않습니다.
302
-
303
- 이제 채팅에서 원격 실행이나 필요한 OS를 지정하면 됩니다. 저장소는 폴더 이름이 아니라
304
- Git 원격 주소로 매칭합니다. 커밋하지 않은 변경과 무시된 파일을 동기화하지 않으므로
305
- 깨끗한 커밋을 기준으로 요청하세요. 실행 중인 레인이 해당 checkout을 예약하며
306
- 자동 fetch·브랜치 전환·변경 폐기는 하지 않습니다. 후속 요청은 같은 워커의 같은 세션으로 갑니다.
307
- SSH가 끊겨도 Host 자체는 종료되지 않습니다. Host가 종료된 뒤 checkout이 달라져 있으면
308
- 재기동은 보류됩니다. 답변과 승인 카드는 원래 대화로 돌아오지만 메신저 첨부파일 전달과
309
- 헤드의 로컬 SQLite 보드 접근은 원격 레인에서 지원하지 않습니다. 헤드의 OMP 실행 명령에
310
- 도구·프로필·승인 등의 추가 플래그가 있으면 이를 빼고 원격 실행하지 않고 요청을 거부합니다.
311
- 워커는 자동 로드 플러그인이 없는 전용 OMP 프로필을 사용하세요. `.omp/`, `.env`, Git 필터 등
312
- 실행 설정이 있는 checkout, linked worktree, 서브모듈은 자동으로 수정하거나 로드하지 않고 거부합니다.
313
- 커스텀 모델 확장이 필요하면 워커 OMP agent 디렉터리의 `worker-extensions.json`(`0600`)에
314
- 등록된 checkout 밖의 신뢰하는 모듈 절대경로를 JSON 배열로 적습니다. 배치된 위치는
315
- `omp-sa status --config ./config.local.json`에서 확인합니다. 접근을 철회할 때는
316
- 워커에서 **해당 등록 키만** 제거하세요. 키 제거가 이미 실행 중인 레인을 중단하지는 않습니다.
79
+ `doctor`는 메신저에 로그인하지 않고 로컬 설정을 검사합니다. `start`는 설정된 모든 플랫폼에 연결하며, `status`는 Gateway 연결과 HEAD의 작업 준비 상태를 구분합니다.
317
80
 
318
81
  ## 사용 방법
319
82
 
320
- - `discord.requireAddressing`을 켜면(기본값은 꺼짐), 허용된 서버의 부모 채널이나 이 봇이 만들지
321
- 않은 스레드에서는 이 봇을 멘션하거나 같은 대화에서 이 봇이 보낸 메시지에 답장해야 운영자의
322
- 일반 메시지가 접수됩니다. 이 봇이 만든 스레드에서는 멘션·답장이 필요 없고, 운영자 DM과 앱 명령은 그대로입니다.
323
- - 일반 후속 요청은 같은 대화에 보내세요. 연결된 작업 스레드에서는 해당 레인으로, 헤드가 처리하는
324
- 대화나 `/head 요청`은 HEAD로 갑니다. `/steer` 없이도 조건을 충족하면 다음 OMP steering 경계에서
325
- 실행 중인 작업에 반영하고, 유휴 상태라면 새 턴을 시작합니다. 일시정지·승인·불확실한 효과에 대한 보류는 유지합니다.
326
- - 새 요청은 그대로 보내세요. 저장소 이름을 안다면 `client-ui에서 로그인 오류 봐줘`처럼 적어도 됩니다.
327
- HEAD는 저장소가 필요 없는 질문에는 직접 답하고, 작업에는 요청과 해당 대화의 문맥을 바탕으로 실제
328
- 작업 디렉터리를 찾아 확인한 뒤 배정합니다. 중요한 모호함이 남을 때만 구체적으로 묻습니다.
329
- 기본 저장소나 마지막으로 활동한 채팅을 기준으로 삼지 않습니다. 아직 연결되지 않은 Discord
330
- 스레드에서 요청했다면, 따로 나눠 달라고 하지 않는 한 그 스레드에서 작업을 이어갑니다.
331
- - 디렉터리를 직접 정하려면 첫 줄에 `cwd: /작업/절대경로`를, 별도 주제로 시작하려면 `/new 요청`을
332
- 사용하세요. 이미 배정된 작업 메시지에 직접 답장하면 이전 대화 내용 없이 확인된 작업 경로만 다시 쓸 수 있습니다.
333
- - 헤드에서 Mnemopi가 활성화되어 검색할 수 있으면 다른 운영자 채널에서도 `지난주 로그인 버그 보던 데서 계속해줘`라고 할 수 있습니다. Mnemopi `recall`로 단서를 찾고, 날짜와 작업 내용을 원래 세션에서 확인합니다. 하나로 좁혀지면 그 저장소에서 이어가고, 여럿이면 번호로 고릅니다. 다른 메모리 백엔드로도 관리형 세션을 실행할 수 있지만 이 과거 작업 검색은 지원하지 않습니다. 제한 그룹방은 검색 대상이 아닙니다.
334
- - 전역 조정은 `/head 요청`을 사용합니다. 저장소·주제별 레인 맥락은
335
- 독립적입니다. 음성 첨부 메타데이터 보존이 자동 전사를 뜻하지는 않습니다.
336
- - `/help`와 `/status`로 명령·상태를 확인합니다. Discord 작업 스레드에서 `/model`을 열면
337
- 유휴 HEAD 또는 해당 스레드에 연결된 유휴 레인을 선택할 수 있습니다. 모델 ID를 직접 입력하는
338
- `/model <provider/model>`은 `--lane`을 붙이지 않으면 HEAD에 적용됩니다. `/effort`도
339
- HEAD에 적용됩니다. `/head`로 HEAD 모델 변경을 요청하면 해당 턴이 끝난 뒤 적용합니다.
340
- 전역 프리셋 저장은 명시적 `--global`이 필요합니다. Slack 일반 메시지 명령은 `!`를 씁니다.
341
- - `/usage`는 OMP가 조회한 기본·확장 제공자의 계정별 한도와 리셋 시각을 마스킹된 계정 이름과 함께 보여줍니다. 모델은 호출하지 않습니다.
342
- - Discord 명령 목록과 채팅에서는 `/usage-reset`으로 계정별 보유 리셋권을 확인합니다.
343
- Telegram은 `/usage reset`, Slack은 `!usage reset` 또는 `/superagent-usage reset`을 사용합니다.
344
- 계정을 고르고 **Confirm**을 누르면 지금 쓸 수
345
- 있는 리셋권 한 개를 사용합니다. 계정 지정 리셋을 지원하는 순정 OMP가 필요합니다.
346
- 이와 별개로, 도구 실행이나 부분 응답 없이 Codex 한도 초과가 확인된 경우 HEAD는 새 사용량 보고에서
347
- 회복을 확인한 뒤 후속 대기 요청을 처리합니다. 리셋권을 쓰거나 실패한 요청을 완료 처리·재실행하지 않습니다.
348
- - 결과 파일을 받으려면 운영자 요청 첫 줄에 `attach: 보고서/결과.pdf`처럼 작업 디렉터리 상대 경로를 적으세요.
349
- - 단체방·서버에서는 [제한 그룹 모드](docs/OPERATIONS.md#단체방서버-권한-분리)로 허용된 사용자에게 요청 접수, 도구 없는 채팅 또는 worktree 편집을 열 수 있습니다. 운영자 세션 권한은 주지 않습니다.
350
- - `/head 2시간마다 CI 상태를 요약해서 여기로 보내줘`라고 요청하거나
351
- `/cron add "every 2h" CI 상태를 요약해줘`로 직접 등록한 뒤, 같은 대화에서
352
- [`/cron`](docs/OPERATIONS.md#예약-작업-cron)으로 관리합니다. 예약 프롬프트에는 HEAD의
353
- 일반 승인 규칙이 적용되며, 직접 셸 예약(`/cron add shell`)은 비활성화되어 있습니다.
354
- - `디스코드 봇 온라인 상태 유지해 줘`, `owner/repo#35 CI가 통과하면 알려줘`,
355
- `이 작업이 멈추거나 끝나면 알려줘`처럼 요청하세요. 같은 대화에서 상태를 묻거나 감시를 중지할 수
356
- 있습니다. 감시는 알림만 보냅니다. PR을 변경하거나 작업을 중지하지 않으며, Discord 온라인 표시를
357
- 꺼도 메시지는 계속 받습니다.
358
- - [외부 PR 자동화](docs/OPERATIONS.md#새-외부-pr-검토-cron-pr-add)는 감시와 별개입니다.
359
- 허용된 Discord 서버의 부모 채널에서 `/cron pr-add`로 본인의 `gh` 인증 계정이 소유한
360
- 저장소를 명시적으로 등록합니다. 신규 등록은 기본적으로 무인 리뷰와 GitHub 코멘트만 남깁니다.
361
- 수정 커밋이나 병합을 자동화하려면 `/cron pr-mode`로 상위 모드를 선택해야 하며,
362
- 병합에는 독립 승인·필수 CI·브랜치 보호 규칙 충족이 필요합니다.
363
- - `/stop`은 연결 레인을 일시정지하고 `/resume`은 재개를 허가합니다. 승인·취소·도구 제외와
364
- 불확실한 효과에 대한 보류는 유지합니다. 진척 보고·복구가 작업 완료의 검증이나 외부 효과의
365
- 취소를 뜻하지 않으며, 저장된 goal은 crash replay나 로드되지 않은 상태의 실행을 보장하지 않습니다.
366
-
367
- <table width="100%"><tr><td>
368
-
369
- **음성**
370
-
371
- Discord에서는 [소유자 전용 음성채팅](docs/discord-voice.md)을 선택적으로 켤 수 있습니다.
372
- Codex 구독 음성 또는 별도 과금되는 API 음성 중 하나를 선택합니다. 구독 모드는 API 키 없이
373
- 동작하며, 구독 권한이 없으면 유료 API로 전환하지 않습니다. 작업은 텍스트로 확인한 뒤 기존 HEAD가 맡습니다.
374
- 기본값은 꺼짐이며 봇 시작만으로 음성 채널에 들어가거나 음성 요금이 발생하지 않습니다.
375
-
376
- </td></tr></table>
377
-
378
- 명령 등록, 재시작·복구 의미와 플랫폼 차이는
379
- [명령과 일상 사용](docs/OPERATIONS.md#4-명령과-일상-사용)을 참고하세요.
380
- 저장소를 편집했다고 현재 운영 서비스에 반영되는 것은 아닙니다.
381
-
382
- ## SUPER 워크플로
383
-
384
- 공식 [omp-superkit](https://github.com/dbc-hbin/omp-superkit)은 필수 관리형 통합입니다.
385
- 통합을 로드하는 것만으로 워크플로가 활성화되지는 않습니다. 메신저에서 워크플로를 요청하려면
386
- 작업 요청의 첫 단어로 `super`, `super-plan`, `super-run`, `super-loop`, `super-research`,
387
- `super-graph` 중 하나를 사용하세요. 이에 대응하는 `/super`, `/super-plan`, `/super-run`,
388
- `/super-loop`, `/super-research`, `/super-graph`는 OMP 명령이지 메신저 슬래시 명령이 아닙니다.
389
- 각 용도와 설치된 스킬 ID, 기준 upstream 리비전은 [워크플로 표(영문)](docs/design/execution.md#workflow-selection)를
390
- 참고하세요.
391
-
392
- 헤드는 허가된 작업에 구체적으로 도움이 될 때 워크플로를 선택할 수 있습니다.
393
- 일반 작업은 직접 세션·native task·일반 레인으로 처리할 수 있습니다.
394
-
395
- 업데이트는 새 Host에 적용하며 실행 중인 헤드·레인의 버전은 유지합니다.
396
- [관리형 통합 운영](docs/OPERATIONS.md#필수-관리형-omp-superkit-설치와-갱신)에서 갱신·활성화 동작을 확인하세요.
397
-
398
- ## 개발
399
-
400
- 설치 후 로컬 검사를 실행합니다.
401
-
402
- ```sh
403
- bun run check
404
- bun test test
405
- bun run test:ci
406
- ```
407
-
408
- 오프라인 native/PTY 범위·필요 도구·로컬 패키징과 게시 경계는
409
- [개발자 검증·소스 릴리즈 절차](docs/OPERATIONS.md#6-개발자-검증)를 참고하세요.
410
- [현재 CI](https://github.com/dbc-hbin/omp-superagent/blob/main/.github/workflows/ci.yml)는
411
- 고정된 SDK와 같은 버전의 순정 CLI를 검사합니다.
412
- [과거 실행 기록](docs/releases/0.1.0.md#verification-records)은 기록된 버전과 시나리오에만 적용됩니다.
413
- 오프라인 CI는 실계정 접속이나 운영 준비 완료를 보증하지 않습니다.
414
-
415
- ## 문서와 출처
416
-
417
- | 문서 | 내용 |
83
+ | 할 일 | 채팅에 보낼 내용 |
418
84
  | --- | --- |
419
- | [설계(영문)](DESIGN.md) | 아키텍처와 메신저 권한·실행 계약. |
420
- | [메시징과 권한(영문)](docs/design/messaging.md) | 수신·라우팅·제어·승인·복구·전달과 Discord 음성채팅. |
421
- | [실행과 조율(영문)](docs/design/execution.md) | 레인·native Host 수명·모델·workflow·관리형 통합·모니터링·게시판. |
422
- | [운영 가이드](docs/OPERATIONS.md) | 설치·설정·명령·복구 절차. |
423
- | [Discord 음성채팅](docs/discord-voice.md) | Codex 구독 음성 또는 별도 과금되는 API 음성 선택. |
424
- | 릴리즈 | [릴리즈 노트](docs/releases/0.1.9.md) 및 [과거 검증 기록](docs/releases/0.1.0.md#verification-records). |
85
+ | 작업 시작 또는 이어가기 | 요청을 그대로 보내고 같은 작업 주제에서 후속 메시지를 보냅니다. |
86
+ | 전역 헤드에 요청 | `/head <요청>` |
87
+ | 작업 경로 지정 | 첫 줄에 `cwd: /절대/경로`를 적습니다. |
88
+ | 새 주제로 시작 | `/new <요청>` |
89
+ | 레인 상태 확인 또는 일시정지 | 작업 주제에서 `/status` 또는 `/stop`을 보냅니다. 재개는 `/resume`입니다. |
425
90
 
426
- [oh-my-pi](https://github.com/can1357/oh-my-pi)를 기반으로 하며, workflow에는 [omp-superkit](https://github.com/dbc-hbin/omp-superkit)을 사용합니다.
91
+ 명령 목록은 `/help`에서 확인하세요. 모델 선택, 사용량 리셋, 승인, 예약 작업, 안전한 종료는 [운영 가이드](docs/OPERATIONS.md#4-명령과-일상-사용)에 정리되어 있습니다. Discord [음성채팅](docs/discord-voice.md)은 기본적으로 꺼져 있습니다.
427
92
 
428
- [Jay (@Momentum96)](https://github.com/Momentum96)는
429
- [Discord 멘션·답글 필터(#29)](https://github.com/dbc-hbin/omp-superagent/pull/29)의 원안을 기여했고,
430
- [원격 레인 동작 검증(#30)](https://github.com/dbc-hbin/omp-superagent/pull/30),
431
- [워커 등록·진단(#32)](https://github.com/dbc-hbin/omp-superagent/pull/32),
432
- [macOS GUI 워커(#33)](https://github.com/dbc-hbin/omp-superagent/pull/33)를 제안했습니다.
433
- 워커 진단·별도 SSH 포트·원격 의사결정 검증에는 이 제안을 반영했습니다.
434
- 워커는 기존 SSH 실행 방식을 유지하며 GUI 런처는 포함하지 않습니다.
93
+ ## 원격 워커 추가
435
94
 
436
- ## License
95
+ [SSH 워커 등록 절차](docs/OPERATIONS.md#원격-워커-추가)를 따르세요. 메신저 자격 증명은 HEAD에만 필요합니다.
437
96
 
438
- 프로젝트 코드는 [MIT 라이선스](LICENSE)를 따릅니다. 서드파티 구성 요소에는 별도 조건이
439
- 적용됩니다. [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md)를 참고하세요.
97
+ ## 문서와 출처
440
98
 
441
- <p align="center">
442
- <a href="https://github.com/dbc-hbin/omp-superagent/issues">이슈</a> ·
443
- <a href="https://github.com/dbc-hbin/omp-superagent/releases">릴리즈</a> ·
444
- <a href="https://www.npmjs.com/package/omp-superagent">npm</a>
445
- </p>
99
+ - 운영 가이드: [한국어](docs/OPERATIONS.md) · [English](docs/OPERATIONS.en.md)
100
+ - [설계와 구조도(영문)](DESIGN.md) · [설정 예제](config.example.json) · [개발자 검증](docs/OPERATIONS.md#6-개발자-검증)
101
+ - [릴리스 노트](docs/releases/) · [GitHub 다운로드](https://github.com/dbc-hbin/omp-superagent/releases)
102
+ - [oh-my-pi](https://github.com/can1357/oh-my-pi)를 기반으로 [omp-superkit](https://github.com/dbc-hbin/omp-superkit)을 사용합니다. [@Momentum96](https://github.com/Momentum96)의 [Discord 멘션·답글 필터 기여](https://github.com/dbc-hbin/omp-superagent/pull/29)와 [원격 레인](https://github.com/dbc-hbin/omp-superagent/pull/30)·[워커 등록](https://github.com/dbc-hbin/omp-superagent/pull/32)·[GUI 워커](https://github.com/dbc-hbin/omp-superagent/pull/33) 제안에 감사드립니다. 배포판은 GUI 런처가 아닌 SSH 워커를 사용합니다.
103
+ - [MIT 라이선스](LICENSE) · [서드파티 고지](THIRD_PARTY_NOTICES.md)