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.
- package/DESIGN.md +68 -21
- package/README.ko.md +30 -372
- package/README.md +31 -419
- package/THIRD_PARTY_NOTICES.md +35 -436
- package/assets/architecture-dark.svg +7 -12
- package/assets/architecture.ko-dark.svg +7 -12
- package/assets/architecture.ko.svg +7 -12
- package/assets/architecture.mmd +5 -13
- package/assets/architecture.svg +7 -12
- package/config.example.json +8 -0
- package/docs/OPERATIONS.en.md +2277 -0
- package/docs/OPERATIONS.md +198 -45
- package/docs/design/execution.md +163 -54
- package/docs/design/messaging.md +125 -34
- package/docs/kakao-bridge-protocol.md +193 -0
- package/docs/releases/0.1.10.md +17 -0
- package/docs/releases/0.1.11.md +18 -0
- package/gateway/bin/omp-gateway-darwin-arm64 +0 -0
- package/gateway/bin/omp-gateway-darwin-x64 +0 -0
- package/gateway/bin/omp-gateway-linux-arm64 +0 -0
- package/gateway/bin/omp-gateway-linux-x64 +0 -0
- package/host-owner/bin/omp-host-owner-darwin-arm64 +0 -0
- package/host-owner/bin/omp-host-owner-darwin-x64 +0 -0
- package/host-owner/bin/omp-host-owner-linux-arm64 +0 -0
- package/host-owner/bin/omp-host-owner-linux-x64 +0 -0
- package/package.json +10 -11
- package/scripts/{prepare-ulw.ts → prepare-super.ts} +1 -1
- package/skills/head/SKILL.md +36 -5
- package/skills/head/references/routing.md +1 -1
- package/skills/head/references/supervision.md +32 -26
- package/skills/lane/SKILL.md +39 -21
- package/skills/lane/references/workflow.md +23 -16
- package/src/cli.ts +35 -33
- package/src/{config.ts → config/config.ts} +51 -6
- package/src/config/wake-config.ts +36 -0
- package/src/contracts.ts +91 -13
- package/src/{cron-jobs.ts → cron/cron-jobs.ts} +21 -13
- package/src/{cron-pr-intake.ts → cron/cron-pr-intake.ts} +4 -4
- package/src/{cron-schedule.ts → cron/cron-schedule.ts} +3 -3
- package/src/extension.ts +64 -28
- package/src/{gateway-client.ts → gateway/gateway-client.ts} +89 -32
- package/src/{gateway-native.ts → gateway/gateway-native.ts} +4 -4
- package/src/{gateway-protocol.ts → gateway/gateway-protocol.ts} +69 -14
- package/src/{gateway-wire.ts → gateway/gateway-wire.ts} +12 -7
- package/src/gateway-config.ts +1 -1
- package/src/gateway-restart-env.ts +3 -3
- package/src/{group-access.ts → group/group-access.ts} +8 -3
- package/src/{group-policy.ts → group/group-policy.ts} +2 -2
- package/src/{group-runner.ts → group/group-runner.ts} +11 -6
- package/src/host-extension.ts +213 -43
- package/src/host-sdk-helper.ts +62 -65
- package/src/{decision-tool.ts → lane/decision-tool.ts} +12 -4
- package/src/{decisions.ts → lane/decisions.ts} +12 -10
- package/src/{lane-models.ts → lane/lane-models.ts} +1 -1
- package/src/{lane-report.ts → lane/lane-report.ts} +22 -0
- package/src/{lane-rows.ts → lane/lane-rows.ts} +2 -2
- package/src/{lane-watch.ts → lane/lane-watch.ts} +6 -2
- package/src/{workflow.ts → lane/workflow.ts} +1 -1
- package/src/lane-extension.ts +69 -13
- package/src/managed-memory-helper.ts +2 -2
- package/src/{managed-ulw-probe.ts → managed-super-probe.ts} +3 -3
- package/src/{delivery.ts → messaging/delivery.ts} +1 -1
- package/src/{discord-command-registration.ts → messaging/discord-command-registration.ts} +3 -2
- package/src/{discord-context.ts → messaging/discord-context.ts} +1 -1
- package/src/{messenger-command-catalog.json → messaging/messenger-command-catalog.json} +1 -0
- package/src/messaging/messenger-commands.ts +55 -0
- package/src/{result-attachment.ts → messaging/result-attachment.ts} +3 -3
- package/src/{slack-command-registration.ts → messaging/slack-command-registration.ts} +3 -3
- package/src/{telegram-command-registration.ts → messaging/telegram-command-registration.ts} +2 -2
- package/src/omp/head-resume.ts +123 -0
- package/src/{host-owner-path.ts → omp/host-owner-path.ts} +1 -1
- package/src/{host-protocol.ts → omp/host-protocol.ts} +11 -2
- package/src/omp/host-reply-voice.ts +181 -0
- package/src/{host-superkit.ts → omp/host-superkit.ts} +1 -1
- package/src/{host.ts → omp/host.ts} +26 -17
- package/src/{installed-omp.ts → omp/installed-omp.ts} +1 -1
- package/src/{managed-memory.ts → omp/managed-memory.ts} +2 -2
- package/src/{managed-ulw.ts → omp/managed-super.ts} +42 -16
- package/src/omp/native-journal.ts +124 -0
- package/src/{native-launch-profile.ts → omp/native-launch-profile.ts} +6 -2
- package/src/{native-presets.ts → omp/native-presets.ts} +2 -2
- package/src/omp/native-sessions.ts +124 -0
- package/src/{omp-usage.ts → omp/omp-usage.ts} +1 -1
- package/src/omp/soul.ts +214 -0
- package/src/omp/stock-head-launch.ts +31 -0
- package/src/{autostart.ts → operator/autostart.ts} +3 -3
- package/src/{operator.ts → operator/operator.ts} +2 -2
- package/src/{setup-judge.ts → operator/setup-judge.ts} +1 -1
- package/src/{setup-profiles.ts → operator/setup-profiles.ts} +2 -2
- package/src/{setup.ts → operator/setup.ts} +7 -6
- package/src/{pr-intake-automation.ts → pr/pr-intake-automation.ts} +1 -1
- package/src/{pr-intake-mode.ts → pr/pr-intake-mode.ts} +3 -3
- package/src/{pr-intake-review.ts → pr/pr-intake-review.ts} +5 -5
- package/src/{pr-intake-work.ts → pr/pr-intake-work.ts} +1 -1
- package/src/{pr-review-models.ts → pr/pr-review-models.ts} +2 -2
- package/src/{pr-watch.ts → pr/pr-watch.ts} +36 -26
- package/src/{message-order.ts → routing/message-order.ts} +3 -2
- package/src/{topic-history.ts → routing/topic-history.ts} +2 -2
- package/src/{topic-request.ts → routing/topic-request.ts} +4 -2
- package/src/{runtime.ts → runtime/controller.ts} +1278 -1267
- package/src/runtime/deferred-routing.ts +106 -0
- package/src/runtime/dm-timeline.ts +194 -0
- package/src/{head-recovery.ts → runtime/head-recovery.ts} +1 -1
- package/src/{head-rotation.ts → runtime/head-rotation.ts} +32 -5
- package/src/runtime/model-journal.ts +119 -0
- package/src/runtime/native-frames.ts +131 -0
- package/src/{observation-request.ts → runtime/observation-request.ts} +1 -1
- package/src/runtime/preset-sync.ts +232 -0
- package/src/runtime/preset-watch-paths.ts +137 -0
- package/src/runtime/result-attachments.ts +146 -0
- package/src/storage/deferred-routing.ts +149 -0
- package/src/{store.ts → storage/store.ts} +450 -49
- package/src/{worker-bridge.ts → worker/worker-bridge.ts} +2 -2
- package/src/{worker-enrollment.ts → worker/worker-enrollment.ts} +2 -2
- package/src/{worker-host.ts → worker/worker-host.ts} +7 -3
- package/src/{worker-placement.ts → worker/worker-placement.ts} +1 -1
- package/src/{worker-profile.ts → worker/worker-profile.ts} +1 -1
- package/src/{worker-registration.ts → worker/worker-registration.ts} +2 -2
- package/src/{worker-request.ts → worker/worker-request.ts} +5 -5
- package/src/{worker-service.ts → worker/worker-service.ts} +2 -2
- package/src/{worker-trust.ts → worker/worker-trust.ts} +1 -1
- package/src/{worker-wire.ts → worker/worker-wire.ts} +3 -3
- package/src/worker-serve-prepare.ts +4 -4
- package/src/board-extension.ts +0 -217
- package/src/board.ts +0 -467
- package/src/gateway-host-helper.ts +0 -13
- package/src/messenger-commands.ts +0 -15
- package/src/native-sessions.ts +0 -34
- /package/src/{credentials.ts → config/credentials.ts} +0 -0
- /package/src/{dialog.ts → messaging/dialog.ts} +0 -0
- /package/src/{telegram-command-languages.json → messaging/telegram-command-languages.json} +0 -0
- /package/src/{host-broker-services.ts → omp/host-broker-services.ts} +0 -0
- /package/src/{host-inventory-manifest.ts → omp/host-inventory-manifest.ts} +0 -0
- /package/src/{host-services.ts → omp/host-services.ts} +0 -0
- /package/src/{native-settings.ts → omp/native-settings.ts} +0 -0
- /package/src/{superkit-skills.ts → omp/superkit-skills.ts} +0 -0
- /package/src/{repository.ts → operator/repository.ts} +0 -0
- /package/src/{pr-github-schema.ts → pr/pr-github-schema.ts} +0 -0
- /package/src/{pr-github.ts → pr/pr-github.ts} +0 -0
- /package/src/{pr-intake-comment.ts → pr/pr-intake-comment.ts} +0 -0
- /package/src/{pr-intake-fix.ts → pr/pr-intake-fix.ts} +0 -0
- /package/src/{pr-intake-github.ts → pr/pr-intake-github.ts} +0 -0
- /package/src/{pr-intake-material.ts → pr/pr-intake-material.ts} +0 -0
- /package/src/{pr-intake-tree.ts → pr/pr-intake-tree.ts} +0 -0
- /package/src/{head-quota.ts → runtime/head-quota.ts} +0 -0
- /package/src/{worker-checkout.ts → worker/worker-checkout.ts} +0 -0
- /package/src/{worker-destination.ts → worker/worker-destination.ts} +0 -0
- /package/src/{worker-doctor.ts → worker/worker-doctor.ts} +0 -0
- /package/src/{worker-ledger.ts → worker/worker-ledger.ts} +0 -0
- /package/src/{worker-repository.ts → worker/worker-repository.ts} +0 -0
- /package/upstream/{ulw.json → super.json} +0 -0
package/docs/design/messaging.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# Messaging and authority
|
|
2
2
|
|
|
3
|
-
[Architecture](../../DESIGN.md) · [Execution and coordination](execution.md) · [Operations](../OPERATIONS.md)
|
|
3
|
+
[Architecture](../../DESIGN.md) · [Execution and coordination](execution.md) · [Operations](../OPERATIONS.en.md)
|
|
4
4
|
|
|
5
5
|
## Transport and identity
|
|
6
6
|
|
|
7
7
|
The [native Gateway](../../gateway/src/main.rs) owns credentials, the
|
|
8
8
|
[adapter hub](../../gateway/src/adapter.rs), remote connections and authenticated
|
|
9
9
|
messenger effects. At least one adapter is required; all configured adapters run
|
|
10
|
-
together. The [head runtime](../../src/runtime.ts) owns conversation routing and
|
|
10
|
+
together. The [head runtime](../../src/runtime/controller.ts) owns conversation routing and
|
|
11
11
|
approval handling. It uses the Gateway's typed local Messenger interface, not
|
|
12
12
|
platform SDKs, arbitrary URLs or a generic RPC tunnel.
|
|
13
13
|
|
|
@@ -22,6 +22,7 @@ topic is a binding key, not a fabricated conversation or thread ID.
|
|
|
22
22
|
| [Discord](../../gateway/src/discord.rs) | Discord Gateway and REST verify the bot/owner and configured guild and parent-channel allowlists; owner one-to-one DMs are separately allowed. History recovery is for known routes after their saved cursors, not unseen chats or all edits/deletions. |
|
|
23
23
|
| [Telegram](../../gateway/src/telegram.rs) | Bot API `getMe` identifies the bot. Use the configured real owner and allowed chats; anonymous, forwarded, bot-mediated and business identities do not confer authority. Long poll only after startup approval reconciliation; refuse an active webhook without removing it. |
|
|
24
24
|
| [Slack](../../gateway/src/slack.rs) | Socket Mode and the Web API, with bot/workspace and active human owner checks and actual channel membership. No group DMs or public HTTP endpoint. Known-route history is limited by cursors, scopes, membership, retention and rate limits. |
|
|
25
|
+
| [KakaoTalk](../../gateway/src/kakao.rs) | No Kakao login. Polls an operator-run [loopback bridge](../kakao-bridge-protocol.md) with a dedicated token over a proxy-free, redirect-free client. Admits only rows whose sender, chat and numeric log ID match the configured owner one-to-one chat, at most once per log ID. A first contact or inbox generation change saves a baseline instead of replaying history. Replies carry deterministic push IDs; the bridge fixes the destination. Approval cards are cancelled with a notice, never accepted. No threads, attachments or group rooms. |
|
|
25
26
|
|
|
26
27
|
Set `discord.requireAddressing` to `true` to filter ordinary owner messages in
|
|
27
28
|
allowed Discord guild parent channels and threads not created by this bot,
|
|
@@ -37,12 +38,29 @@ The owner, guild and parent-channel checks still apply. Owner DMs, Discord
|
|
|
37
38
|
application commands, approval components and restricted group rooms retain
|
|
38
39
|
their existing policies.
|
|
39
40
|
|
|
41
|
+
Standalone owner preferences, such as the shared reply voice, cannot be set
|
|
42
|
+
through a reply, forward, or attachment. Adapters keep that provenance even
|
|
43
|
+
when a Telegram external reply, Discord forward, or Slack shared attachment
|
|
44
|
+
has no usable in-route snapshot. This marker does not change routing or message
|
|
45
|
+
identity and does not import external reply content.
|
|
46
|
+
|
|
40
47
|
The Gateway records pending owner-message candidates before advancing the
|
|
41
48
|
Discord WebSocket sequence. Until it verifies the sender and route, it keeps
|
|
42
49
|
only lookup coordinates and revision evidence, not message or attachment
|
|
43
50
|
content. A reply lookup can be retried; it must not substitute a newer edit
|
|
44
|
-
or replay a voice command.
|
|
45
|
-
|
|
51
|
+
or replay a voice command.
|
|
52
|
+
|
|
53
|
+
Waking HEAD on the same connected Gateway drains the durable inbox in order;
|
|
54
|
+
it does not start a baseline history sweep. On a fresh Gateway, HEAD pins
|
|
55
|
+
known authorized cursors before intake. The startup history request goes behind
|
|
56
|
+
existing ingress, subject to the initial approval barrier. Each Discord or Slack
|
|
57
|
+
transport gap carries its own exclusive history cutoff, even if HEAD processes
|
|
58
|
+
it much later. A failed read keeps that gap in its inbox position and retries
|
|
59
|
+
only the unfinished pinned routes, including after HEAD replacement. A live
|
|
60
|
+
receipt keeps its original place relative to slash commands. A distinct history
|
|
61
|
+
revision of that pending message stays in the durable inbox after the original,
|
|
62
|
+
where it can inherit the original physical route and logical topic. Already
|
|
63
|
+
admitted inputs and their external effects are not executed again.
|
|
46
64
|
|
|
47
65
|
### Account presence
|
|
48
66
|
|
|
@@ -94,12 +112,14 @@ be sent to the configured group model. Do not authorize a private repository
|
|
|
94
112
|
or provider that should not see this data.
|
|
95
113
|
|
|
96
114
|
Stock OMP can expand inline file references even with no tools enabled. The
|
|
97
|
-
[restricted runner](../../src/group-runner.ts) therefore sends group input as
|
|
115
|
+
[restricted runner](../../src/group/group-runner.ts) therefore sends group input as
|
|
98
116
|
JSON-quoted data with file-reference characters escaped. A fresh private
|
|
99
117
|
profile and scratch cwd exclude owner settings and session context; worktree
|
|
100
|
-
access goes only through the dedicated file tools.
|
|
101
|
-
|
|
102
|
-
|
|
118
|
+
access goes only through the dedicated file tools. Group chat uses native
|
|
119
|
+
`--no-tools`; group work uses an exact trusted extension and explicitly selects
|
|
120
|
+
its three tools because stock OMP disallows extensions with `--no-tools`.
|
|
121
|
+
Process exit alone is not a successful group turn: the runner also requires a
|
|
122
|
+
matching terminal native result.
|
|
103
123
|
|
|
104
124
|
## Durable admission and recovery
|
|
105
125
|
|
|
@@ -135,13 +155,15 @@ deduplicates the original event and any distinct edit revision. A permanent deni
|
|
|
135
155
|
may be recorded as rejected; handler, store or transport failures do not turn an
|
|
136
156
|
unresolved event into a denial. Preserve pending order and recover connectivity
|
|
137
157
|
with bounded backoff. A held event does not block the initial approval recovery
|
|
138
|
-
barrier or selected priority owner controls (`/restart`, `/stop`, `/stop head`)
|
|
139
|
-
|
|
158
|
+
barrier or selected priority owner controls (`/restart`, `/stop`, `/stop head`).
|
|
159
|
+
During a hold the Gateway selects the barrier first, otherwise the earliest
|
|
160
|
+
eligible control, without reading ordinary message bodies. Ordinary intake
|
|
161
|
+
keeps its order. After the first approval barrier, a head outage
|
|
140
162
|
does not close Gateway admission. Reconnecting does not replay already submitted work.
|
|
141
163
|
|
|
142
164
|
The head receipt does not wait for a [historical topic search](#topic-routing-and-controls),
|
|
143
165
|
which may read large native journals. An input that needs one is appended to a
|
|
144
|
-
durable deferred-routing queue in the coordination store (
|
|
166
|
+
durable deferred-routing queue in the coordination store (one ordered row per input),
|
|
145
167
|
receipted, and then searched and admitted in the background. Until it is admitted,
|
|
146
168
|
later ordinary inputs of the same physical channel or DM (including its threads
|
|
147
169
|
and logical topics) queue behind it; other conversations are not held. A
|
|
@@ -158,19 +180,52 @@ it; other lanes' work is independent. A pending queued
|
|
|
158
180
|
choice fences the automatic history choice like an unreceipted Gateway event. A
|
|
159
181
|
failed admission stays first in its conversation and is retried with bounded
|
|
160
182
|
backoff; a permanent denial is dropped. The queue survives a restart and resumes
|
|
161
|
-
in order once intake is ready.
|
|
183
|
+
in order once intake is ready. On first opening an older store, HEAD migrates the
|
|
184
|
+
previous `intake:deferred-routing` array in order and removes it in the same
|
|
185
|
+
transaction. Do not downgrade a migrated instance with deferred inputs pending.
|
|
162
186
|
|
|
163
187
|
Telegram persists its per-bot offset after admission and acknowledges it with the
|
|
164
188
|
next `getUpdates`. There is no Bot API history fetch; recovery cannot exceed its
|
|
165
189
|
24-hour update retention. Omit the previous offset after 24 hours of inactivity,
|
|
166
190
|
missing/invalid observation time or clock rollback. Stable message and
|
|
167
191
|
callback-query identities, not a presumed globally monotonic update ID, deduplicate
|
|
168
|
-
redeliveries and approval progress.
|
|
192
|
+
redeliveries and approval progress. If command normalization changed between
|
|
193
|
+
admission and redelivery, the Gateway also checks the exact earlier projection
|
|
194
|
+
of that same incoming message. A match keeps the first receipt and lets polling
|
|
195
|
+
advance; a changed payload under the same identity remains a conflict.
|
|
196
|
+
Telegram code, preformatted text and blockquotes can contain command examples:
|
|
197
|
+
a slash verb inside one is literal text, not an owner control. Formatting only
|
|
198
|
+
the arguments does not disable an otherwise valid command.
|
|
199
|
+
|
|
200
|
+
### HEAD replies while jobs are running
|
|
201
|
+
|
|
202
|
+
A completed HEAD prompt with a final answer can release its messenger request
|
|
203
|
+
at a native yielded pause. The managed Host must attest that all remaining
|
|
204
|
+
wakes are running root jobs, and the controller must have observed each job's
|
|
205
|
+
launch under this or a previously released request. Another owner prompt can
|
|
206
|
+
enter using fresh state and journal evidence. The native session remains
|
|
207
|
+
busy for restart, reaping, recovery, and model maintenance; the jobs keep
|
|
208
|
+
running.
|
|
209
|
+
|
|
210
|
+
Before release the controller persists the job, its observed launch call and original
|
|
211
|
+
input under the exact HEAD generation, session, PID and SDK instance. Reattachment
|
|
212
|
+
uses the original request’s journal cursor and matching launch to recover missed receipts without replaying
|
|
213
|
+
a prompt or sending an unverified assistant reply. A restart fence delays messenger
|
|
214
|
+
delivery, not the durable recording of a completion.
|
|
215
|
+
|
|
216
|
+
Structured completion IDs link a later job turn to its originating request
|
|
217
|
+
and route. A standalone reply for one proven origin uses the durable outbox
|
|
218
|
+
for that origin. If a completion is folded into another conversation's
|
|
219
|
+
foreground turn, the controller sends the attributable native result to the
|
|
220
|
+
job's origin, not the mixed assistant text. A foreground answer observed
|
|
221
|
+
before the foreign completion is still sent to its own conversation. If a
|
|
222
|
+
native batch cannot be split by origin, only individually identified job
|
|
223
|
+
receipts are sent.
|
|
169
224
|
|
|
170
225
|
### Uncertain submissions
|
|
171
226
|
|
|
172
227
|
Do not replay an ambiguous native prompt, approval response or external mutation.
|
|
173
|
-
[HEAD recovery](../../src/head-recovery.ts) can run a separate, evidence-bound
|
|
228
|
+
[HEAD recovery](../../src/runtime/head-recovery.ts) can run a separate, evidence-bound
|
|
174
229
|
reconciliation turn in the existing head under a native tool gate. The model may
|
|
175
230
|
propose `release` or `hold` through `head_recovery`; code rechecks the exact
|
|
176
231
|
request/session/file/generation, native `rpc_prompt_result` and run boundaries,
|
|
@@ -221,7 +276,7 @@ input as cancelled. A stalled lane exposes its exact input ID and queue blocker
|
|
|
221
276
|
through `/status` or `lane_inspect`. Only the operator in the bound topic can use
|
|
222
277
|
`/resolve --lane <input-id>` to cancel that uncertain input. This is not a native
|
|
223
278
|
interrupt, replay or implicit resume, and it preserves other fences and pauses.
|
|
224
|
-
See the [operations guide](../OPERATIONS.md#4
|
|
279
|
+
See the [operations guide](../OPERATIONS.en.md#4-commands-and-daily-use) for command usage.
|
|
225
280
|
|
|
226
281
|
## Topic routing and controls
|
|
227
282
|
|
|
@@ -312,7 +367,8 @@ See the [operations guide](../OPERATIONS.md#4-명령과-일상-사용) for comma
|
|
|
312
367
|
or `Do the login check in a new thread`. If the operator sends only
|
|
313
368
|
`이건 따로 빼줘` or `Split this into a new thread`, the controller asks them to
|
|
314
369
|
name the task with `/new` instead of creating a topic. Natural split
|
|
315
|
-
directives
|
|
370
|
+
directives preserve an explicit `cwd:` header, including spaces inside path
|
|
371
|
+
quotes. They apply only to original owner messages in physical Discord work
|
|
316
372
|
threads, not edits, quoted text or attachments. DM and other adapters retain
|
|
317
373
|
their existing topic behavior.
|
|
318
374
|
- `/head <request>` explicitly addresses the shared coordination model (Slack:
|
|
@@ -328,6 +384,9 @@ See the [operations guide](../OPERATIONS.md#4-명령과-일상-사용) for comma
|
|
|
328
384
|
answers instead pass through the controller's source-bound outbox without a
|
|
329
385
|
synthesis turn. Approval cards stay with their original native session and
|
|
330
386
|
authorized route.
|
|
387
|
+
- Send an explicit [SOUL reply voice change](execution.md#owner-facing-reply-voice)
|
|
388
|
+
through `/head` from a bound thread. Ordinary lane requests, reports and
|
|
389
|
+
quoted text do not become global settings changes.
|
|
331
390
|
- Thread-first work sends a short kickoff to the selected topic. The durable
|
|
332
391
|
`sent` receipt gates new lane dispatch and steering for that input. A missing
|
|
333
392
|
or uncertain delivery is not a successful kickoff.
|
|
@@ -365,12 +424,30 @@ See the [operations guide](../OPERATIONS.md#4-명령과-일상-사용) for comma
|
|
|
365
424
|
| Telegram | Ordinary slash messages and owner-scoped menus keep real message IDs. Normalize only actual bot-command entities addressed to this bot; ignore commands addressed to other bots. Native topics require eligible forum supergroups or topic-enabled private chat; group topic creation needs the granted capability. |
|
|
366
425
|
| Slack | Ordinary `!...` messages and registered `/superagent-*` commands use Socket Mode. Slash commands have no message `ts`: deduplicate with a token-free scoped invocation fingerprint; anchor topic boundaries to the last durably admitted real owner message and use admission order on the same anchor. Do not persist trigger/response tokens or invent a timestamp. Use real root messages for threads, never nested threads. |
|
|
367
426
|
|
|
368
|
-
[Command definitions](../../src/messenger-commands.ts) are shared. Menu registration
|
|
427
|
+
[Command definitions](../../src/messaging/messenger-commands.ts) are shared. Menu registration
|
|
369
428
|
is a separate explicit apply, not a side effect of setup, doctor or start. Command
|
|
370
429
|
intake must not wait for a model; Discord's ephemeral admission reply and Slack's
|
|
371
430
|
Socket Mode acknowledgement are not the actual command result.
|
|
372
431
|
|
|
373
|
-
|
|
432
|
+
Discord application commands take arguments in the registered `text` option.
|
|
433
|
+
For commands with fixed tokens, repeated spaces and tabs are separators, not
|
|
434
|
+
part of an identifier. Prompt bodies and multiline compaction instructions are
|
|
435
|
+
not split into words. Ordinary Slack command arguments decode Slack's three
|
|
436
|
+
mrkdwn entities once; registered slash payloads are already plain text. HEAD,
|
|
437
|
+
its initial lane handoff and exact `attach:` path verification use the same
|
|
438
|
+
decoded arguments. Later `lane_message` instructions are HEAD-authored text,
|
|
439
|
+
not Slack input. Neither interpretation changes the original receipt used for
|
|
440
|
+
redelivery.
|
|
441
|
+
|
|
442
|
+
`/fast` is an owner control on the shared HEAD, even from a bound topic.
|
|
443
|
+
It opens an argumentless menu showing the current mode (`off`, `on` or `ultra`).
|
|
444
|
+
Choosing a mode displays the proposed change and Confirm, Back and Cancel.
|
|
445
|
+
Only Confirm on that revision admits a change; Back and Cancel change no
|
|
446
|
+
settings. The result goes to the original route. Slack accepts `!fast` and
|
|
447
|
+
registered `/superagent-fast`. Text arguments cannot bypass the confirmation,
|
|
448
|
+
and edits cannot open the menu.
|
|
449
|
+
|
|
450
|
+
The head sends model, effort, fast and saved-reset menus through its normal outbox. The Gateway
|
|
374
451
|
renders native components and binds each click to the owner, exact sent card,
|
|
375
452
|
physical conversation, and displayed page. Navigation and cancellation only
|
|
376
453
|
edit the card. One final click admits an ordinary durable control receipt on
|
|
@@ -449,7 +526,7 @@ defers reconciliation and rechecks current state before the next write;
|
|
|
449
526
|
an ambiguous write is not retried.
|
|
450
527
|
|
|
451
528
|
`/help`, `/status`, `/context` and `/usage` are code-handled reads with no model turn.
|
|
452
|
-
[`/usage`](../../src/omp-usage.ts) invokes the configured executable and
|
|
529
|
+
[`/usage`](../../src/omp/omp-usage.ts) invokes the configured executable and
|
|
453
530
|
profile with `usage --json --redact`, so OMP discovers built-in and extension-provided
|
|
454
531
|
usage sources. Both usage and reset preserve explicit `--no-extensions`,
|
|
455
532
|
`--extension`, `--hook` and `--config` inputs from the configured launch command.
|
|
@@ -494,20 +571,34 @@ the native request and direct the operator to the appropriate local UI.
|
|
|
494
571
|
OMP 19.1 sends a built-in `ask` as one HTML `form`. The stdio owner cancels
|
|
495
572
|
that exact request because the messenger adapters do not render arbitrary HTML;
|
|
496
573
|
it does not forward the HTML, submit defaults or wait for a connected head.
|
|
497
|
-
[`decision_ask`](../../src/decision-tool.ts) uses the separate native `askDialog`; it is not a
|
|
498
|
-
parallel approval engine. [Decision records](../../src/decisions.ts) link the
|
|
574
|
+
[`decision_ask`](../../src/lane/decision-tool.ts) uses the separate native `askDialog`; it is not a
|
|
575
|
+
parallel approval engine. [Decision records](../../src/lane/decisions.ts) link the
|
|
499
576
|
native tool call, original source and original question/card. `answering` is an
|
|
500
|
-
attempt, not the `answered` state confirmed by native settlement.
|
|
501
|
-
question goes to the authorized topic
|
|
502
|
-
model
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
577
|
+
attempt, not the `answered` state confirmed by native settlement. By default,
|
|
578
|
+
a topic-owned question goes directly to the authorized topic without waking
|
|
579
|
+
the HEAD model, and a manager-handoff question goes to HEAD first. A root lane
|
|
580
|
+
can explicitly set `to: "head"` for an in-scope coordination choice even from
|
|
581
|
+
a bound topic. On admission of the valid source, the controller immediately
|
|
582
|
+
queues one durable HEAD review tied to the same pending native lane dialog.
|
|
583
|
+
Queueing is not an answer or a guarantee of when HEAD will reply. An unowned
|
|
584
|
+
native dialog after reconnect is held if its original topic cannot be verified.
|
|
585
|
+
Corrective assignments retain owner-only routing: an explicit `to: "head"`
|
|
586
|
+
question is refused and cancelled privately, not shown to the owner.
|
|
587
|
+
|
|
588
|
+
The isolated HEAD review permits only `lane_review_decision` for that dialog.
|
|
589
|
+
For a routine reversible choice shown to be within the assignment, HEAD
|
|
590
|
+
returns an original option to the lane and records the reason internally,
|
|
591
|
+
without a separate messenger message. When the owner must decide or the
|
|
592
|
+
supplied evidence cannot establish scope, HEAD escalates that same dialog;
|
|
593
|
+
the original route gets the card with the unchanged questions and choices
|
|
594
|
+
and the reason for escalation. If HEAD stops during an existing regular
|
|
595
|
+
review, the controller may escalate that exact pending dialog to the original
|
|
596
|
+
owner. This fallback does not apply to refused corrective-assignment questions.
|
|
597
|
+
Recommendations are not preselected. This path does not change assignment
|
|
598
|
+
scope, grant tool permission or manufacture user consent. Use the
|
|
599
|
+
[source-bound scope review](execution.md#bound-topic-assignment-scope-review)
|
|
600
|
+
for a conflicting original owner correction. Recommendation, silence, normal
|
|
601
|
+
text, quotes and reports are not approval.
|
|
511
602
|
|
|
512
603
|
## Content and delivery
|
|
513
604
|
|
|
@@ -518,7 +609,7 @@ approval.
|
|
|
518
609
|
message. Do not retry an ambiguous send or attachment upload.
|
|
519
610
|
- Quoted/replied content and Discord channel context are observations, not
|
|
520
611
|
commands. Snapshot a reference at first admission; a later edit or deletion
|
|
521
|
-
does not change that snapshot. [Discord purpose notes](../../src/discord-context.ts)
|
|
612
|
+
does not change that snapshot. [Discord purpose notes](../../src/messaging/discord-context.ts)
|
|
522
613
|
are local scoped context tied to a real owner input, not channel mutations
|
|
523
614
|
or authority to choose a repository or dispatch work.
|
|
524
615
|
- Resolve Telegram and Slack file references through original authorized
|
|
@@ -564,7 +655,7 @@ approval.
|
|
|
564
655
|
column labels and each row's values on separate lines. This leaves links,
|
|
565
656
|
emphasis and inline code available to Discord's Markdown renderer and lets
|
|
566
657
|
prose wrap naturally. Existing code blocks and stored output are unchanged.
|
|
567
|
-
[Delivery classification](../../src/delivery.ts) distinguishes
|
|
658
|
+
[Delivery classification](../../src/messaging/delivery.ts) distinguishes
|
|
568
659
|
definite rejection from uncertainty across the IPC boundary.
|
|
569
660
|
- Receipt/working reactions are best-effort decorations bound to the real
|
|
570
661
|
source message. They neither delay nor prove admission, execution or delivery.
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
# KakaoTalk bridge protocol (version 2)
|
|
2
|
+
|
|
3
|
+
[Operations guide (Korean)](OPERATIONS.md#24-kakaotalk-로컬-브리지-주인-11-전용) ·
|
|
4
|
+
[Operations guide (English)](OPERATIONS.en.md#24-kakaotalk-local-bridge-owner-one-to-one-only) ·
|
|
5
|
+
[Reference bridge](../scripts/kakao-reference-bridge.ts) · [Adapter](../gateway/src/kakao.rs)
|
|
6
|
+
|
|
7
|
+
KakaoTalk has no bot API. The Gateway's `kakao` adapter therefore never signs in to
|
|
8
|
+
Kakao, stores no Kakao credentials and never contacts Kakao servers. It talks to a
|
|
9
|
+
**bridge** that the operator runs on the same machine. The bridge owns whatever Kakao
|
|
10
|
+
session or client automation the operator chooses. Superagent does not ship one: the
|
|
11
|
+
repository contains only a [reference bridge](../scripts/kakao-reference-bridge.ts)
|
|
12
|
+
with an in-memory inbox for tests and local demos.
|
|
13
|
+
|
|
14
|
+
> **Terms of service risk.** Automating a personal KakaoTalk account is not an
|
|
15
|
+
> official Kakao integration. It can violate Kakao's terms of service and may lead to
|
|
16
|
+
> account restriction or suspension. Kakao may change its client or protocol at any
|
|
17
|
+
> time. The operator alone chooses, runs and is responsible for the bridge. Use a
|
|
18
|
+
> separate account where possible and do not automate other people's chats.
|
|
19
|
+
|
|
20
|
+
## Roles
|
|
21
|
+
|
|
22
|
+
| Role | Responsibility |
|
|
23
|
+
| --- | --- |
|
|
24
|
+
| Bridge | Receives Kakao messages, durably records messages that the owner sent in the owner's one-to-one chat with the bridge account, serves them on the inbox endpoint, and delivers replies to that same chat only. |
|
|
25
|
+
| Adapter (Gateway) | Polls the inbox, admits rows that exactly match the configured owner and chat, and posts the head's replies. It cannot choose a destination. |
|
|
26
|
+
|
|
27
|
+
Group chats, open chats and other people's one-to-one chats are out of scope for
|
|
28
|
+
version 2. A bridge MUST NOT place their messages in the Superagent inbox.
|
|
29
|
+
|
|
30
|
+
## Transport and authentication
|
|
31
|
+
|
|
32
|
+
- Plain HTTP on a literal loopback address: `127.0.0.1` or `[::1]`, with an explicit
|
|
33
|
+
port. The adapter rejects host names (including `localhost`), other addresses,
|
|
34
|
+
HTTPS, credentials, query strings and fragments in `bridgeUrl`. It uses a dedicated
|
|
35
|
+
HTTP client with environment/system proxies disabled, no redirects and no retries.
|
|
36
|
+
- A path in `bridgeUrl` is a base: `http://127.0.0.1:8080/kakao` uses
|
|
37
|
+
`/kakao/superagent/inbox`, `/kakao/superagent/v2/destination`, and
|
|
38
|
+
`/kakao/superagent/v2/send`.
|
|
39
|
+
- Every request carries exactly one `X-Superagent-Token` header. The token is a
|
|
40
|
+
dedicated secret for this interface only: at least 24 characters from
|
|
41
|
+
`[A-Za-z0-9_-]`. Do not reuse a token that also authorizes other bridge features.
|
|
42
|
+
The adapter reads it from the environment variable named by `kakao.tokenEnv`.
|
|
43
|
+
|
|
44
|
+
The bridge MUST:
|
|
45
|
+
|
|
46
|
+
1. Listen only on loopback and check that the peer address is loopback.
|
|
47
|
+
2. Reject (`403`) any request carrying a proxy or forwarding header (`Forwarded`,
|
|
48
|
+
`X-Forwarded-For`, `X-Real-IP`, `CF-Connecting-IP`) or a browser header (`Origin`,
|
|
49
|
+
`Referer`, `Sec-Fetch-Site`). This blocks tunnelled requests and browser-based
|
|
50
|
+
cross-site requests to the loopback port.
|
|
51
|
+
3. Reject (`403`) zero or several token headers and compare the token in constant
|
|
52
|
+
time.
|
|
53
|
+
4. Never log the token or message bodies at default verbosity.
|
|
54
|
+
5. Never send replies anywhere but the owner's one-to-one chat. Check the required
|
|
55
|
+
expected destination against the actual authenticated account and fixed chat
|
|
56
|
+
before each write. It is a precondition, not a destination selector. A mismatch
|
|
57
|
+
MUST be refused before any queueing or delivery; ignore fields that try to select
|
|
58
|
+
another destination.
|
|
59
|
+
|
|
60
|
+
## `GET /superagent/inbox`
|
|
61
|
+
|
|
62
|
+
Query parameters:
|
|
63
|
+
|
|
64
|
+
| Name | Meaning |
|
|
65
|
+
| --- | --- |
|
|
66
|
+
| `after` | Last row ID the adapter has processed (`0` on first contact). |
|
|
67
|
+
| `generation` | Inbox generation the adapter last saw (empty on first contact). |
|
|
68
|
+
| `limit` | Maximum rows to return. The adapter sends `50`. The bridge MUST NOT return more. |
|
|
69
|
+
|
|
70
|
+
Response: `200`, `Content-Type: application/json`.
|
|
71
|
+
|
|
72
|
+
```json
|
|
73
|
+
{
|
|
74
|
+
"generation": "f1d2c3",
|
|
75
|
+
"latest": 42,
|
|
76
|
+
"messages": [
|
|
77
|
+
{
|
|
78
|
+
"id": 41,
|
|
79
|
+
"logId": "3279618400000000001",
|
|
80
|
+
"chatId": "18400000000000001",
|
|
81
|
+
"senderId": "4000001",
|
|
82
|
+
"text": "status?",
|
|
83
|
+
"receivedAtMs": 1764000000000,
|
|
84
|
+
"stale": false
|
|
85
|
+
}
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
- `generation`: non-empty opaque string. It identifies one inbox history. The bridge
|
|
91
|
+
MUST change it whenever row IDs can repeat or go backwards (database recreated or
|
|
92
|
+
restored from backup). The reference rule: if `generation` matches but `after` is
|
|
93
|
+
greater than `latest`, issue a new generation.
|
|
94
|
+
- `latest`: the highest row ID currently stored, `0` when empty.
|
|
95
|
+
- If the requested `generation` differs from the current one, the bridge returns the
|
|
96
|
+
current `generation` and `latest` with **no** messages. The adapter then saves a
|
|
97
|
+
new baseline instead of replaying history: on first contact it starts after `latest`
|
|
98
|
+
(old commands are never executed); after a generation change it starts at `0`.
|
|
99
|
+
- Otherwise, return rows with `id > after` in ascending `id` order, at most `limit`.
|
|
100
|
+
- `id`: positive integer, strictly increasing within a generation.
|
|
101
|
+
- `logId`: Kakao's numeric message log ID, a decimal string without leading zeros (at
|
|
102
|
+
most 20 digits). It is the durable message identity: the adapter admits
|
|
103
|
+
`kakao:<botUserId>:<chatId>:<logId>` at most once, so replaying a row is harmless.
|
|
104
|
+
- `chatId`, `senderId`: decimal strings. The adapter drops rows that are not from the
|
|
105
|
+
configured `ownerId` in the configured `chatId`. Only the row ID is logged.
|
|
106
|
+
- `text`: 1 to 4000 characters after trimming. Longer rows are dropped.
|
|
107
|
+
- `receivedAtMs`: positive Unix milliseconds no greater than 2^53 − 1.
|
|
108
|
+
- `stale` (optional, default `false`): the bridge sets it for a row that is too old to
|
|
109
|
+
act on safely (the reference bridge uses 30 minutes since recording). The adapter
|
|
110
|
+
durably retires the Kakao log ID before attempting one notice, so a rebuilt
|
|
111
|
+
inbox cannot later execute it as fresh or replay an ambiguous notice.
|
|
112
|
+
- The whole response body MUST stay below 4 MiB.
|
|
113
|
+
|
|
114
|
+
A non-JSON `200` (for example an HTML page from an older bridge), a non-`2xx` status,
|
|
115
|
+
invalid JSON, an oversized body, or an invalid page (limit, order, range, or
|
|
116
|
+
generation) produces no admissions and leaves the adapter's cursor unchanged.
|
|
117
|
+
It retries after a short back-off and logs one line per distinct error per minute.
|
|
118
|
+
|
|
119
|
+
## `GET /superagent/v2/destination`
|
|
120
|
+
|
|
121
|
+
Return `200 application/json` with the authenticated bridge account, owner, and
|
|
122
|
+
fixed one-to-one chat: `{"botUserId":"900","ownerId":"42","chatId":"777"}`.
|
|
123
|
+
The adapter compares all three fields with its configuration before sending
|
|
124
|
+
any output. Missing, unverifiable, or different identity stops the send without
|
|
125
|
+
posting any text. Version 1's send endpoint is never used.
|
|
126
|
+
|
|
127
|
+
## `POST /superagent/v2/send`
|
|
128
|
+
|
|
129
|
+
Request body (`Content-Type: application/json`):
|
|
130
|
+
|
|
131
|
+
```json
|
|
132
|
+
{
|
|
133
|
+
"pushId": "sa-0123456789abcdef01234567-0-2",
|
|
134
|
+
"outputId": "out-17",
|
|
135
|
+
"message": "plain text",
|
|
136
|
+
"expectedDestination": {"botUserId":"900","ownerId":"42","chatId":"777"}
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
- `pushId`: `sa-` followed by at most 120 characters from `[A-Za-z0-9._:-]`. It is
|
|
141
|
+
derived deterministically from the durable output, chunk index and chunk count.
|
|
142
|
+
The bridge MUST deliver a given `pushId` at most once, including across restarts.
|
|
143
|
+
An identical repeated request returns the same known receipt or unconfirmed
|
|
144
|
+
state, without another send. Conflicting reuse of a push ID is refused.
|
|
145
|
+
- `outputId`: the Superagent output that produced this chunk (informational; useful for
|
|
146
|
+
matching answers to requests). Every chunk of one output shares it.
|
|
147
|
+
- `message`: plain text, 1 to 1500 characters. The adapter strips Markdown and splits
|
|
148
|
+
long replies at line breaks (at most 20 chunks per output).
|
|
149
|
+
- `expectedDestination`: the required fixed tuple. The bridge rechecks it
|
|
150
|
+
against the actual destination immediately before queueing or writing, even
|
|
151
|
+
if the previous read succeeded.
|
|
152
|
+
|
|
153
|
+
Responses:
|
|
154
|
+
|
|
155
|
+
| Status | Body | Adapter behaviour |
|
|
156
|
+
| --- | --- | --- |
|
|
157
|
+
| `200` | `{"ok":true,"state":"delivered","pushId":"…","destination":{"botUserId":"900","ownerId":"42","chatId":"777"},"messageId":"1234"}` | Confirmed only for a matching push ID and destination, with the actual Kakao log ID as a decimal string. |
|
|
158
|
+
| `2xx` | `{"ok":true,"state":"queued"}` | Queue acceptance only. The delivery is uncertain; no automatic resend. |
|
|
159
|
+
| `409` | any | Definitely refused before any effect; the chat is temporarily quiet. |
|
|
160
|
+
| other `4xx` | any | Definitely refused before any effect, including `403` for a wrong destination. |
|
|
161
|
+
| `5xx`, timeout, invalid or oversized (> 64 KiB) receipt | any | Outcome unknown. Superagent does not resend automatically. |
|
|
162
|
+
|
|
163
|
+
Each chunk needs its own confirmed Kakao log ID. A failed later chunk after
|
|
164
|
+
confirmed delivery of an earlier one leaves the output uncertain, never
|
|
165
|
+
definitely rejected or fully sent. Reconcile with the original bridge and
|
|
166
|
+
chat before authorizing any follow-up. The reference bridge simulates log IDs
|
|
167
|
+
from its in-memory delivery list; it cannot verify a live Kakao delivery.
|
|
168
|
+
|
|
169
|
+
## Unsupported features
|
|
170
|
+
|
|
171
|
+
Version 2 carries text only. Threads, attachments, reactions, typing indicators and
|
|
172
|
+
presence are unsupported. Approval cards cannot be shown: the adapter sends a short
|
|
173
|
+
notice and records the approval as **cancelled**. It never accepts one on the owner's
|
|
174
|
+
behalf.
|
|
175
|
+
|
|
176
|
+
## Security model summary
|
|
177
|
+
|
|
178
|
+
| Threat | Mitigation |
|
|
179
|
+
| --- | --- |
|
|
180
|
+
| Another local user or web page calls the bridge | Dedicated token, constant-time comparison, browser-header rejection. Loopback is not a sandbox: anyone who can run code as the same OS user can read the token. |
|
|
181
|
+
| Token leaves the machine | Literal loopback URL only, proxies disabled, redirects not followed. |
|
|
182
|
+
| Remote callers through a tunnel | Bridge rejects forwarding headers and non-loopback peers. |
|
|
183
|
+
| Someone else's message reaches the head | Bridge filters to the owner's one-to-one chat; adapter re-checks `ownerId`, `chatId` and `logId` on every row. |
|
|
184
|
+
| Replay after restart or restore | `generation` baseline, `after` cursor, and once-only admission by `logId`. |
|
|
185
|
+
| Duplicate sends after a timeout | Deterministic `pushId` and bridge-side deduplication; unknown outcomes are not resent automatically. |
|
|
186
|
+
| Prompt injection in owner chat | Messages are owner input with the same authority as the owner's other messengers. Anyone who controls the owner's Kakao account controls the head, as with any configured messenger. |
|
|
187
|
+
| Unbounded responses | 10 s request timeout, 2 s connect timeout, page and byte limits. |
|
|
188
|
+
|
|
189
|
+
## Versioning
|
|
190
|
+
|
|
191
|
+
Version 2 retains the inbox endpoint and uses versioned destination and send
|
|
192
|
+
endpoints so an older bridge cannot ignore the new precondition on a write.
|
|
193
|
+
New optional response fields may be added; adapters ignore unknown fields.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# omp-superagent 0.1.10
|
|
2
|
+
|
|
3
|
+
- **Optional KakaoTalk adapter.** Gateway can receive and reply in an owner's one-to-one chat through an operator-run loopback bridge. Superagent does not sign in to Kakao or ship a live Kakao client. See the [bridge protocol and limitations](https://github.com/dbc-hbin/omp-superagent/blob/v0.1.10/docs/kakao-bridge-protocol.md) before enabling it (#56).
|
|
4
|
+
- **Shared reply style for HEAD and lanes.** Tell HEAD how to answer future requests. The saved style applies to new conversational replies and survives restart, but does not change tools, approvals, or workflows. Ordinary messages in a bound work thread still go to its lane (#57, #58).
|
|
5
|
+
- **Safer recovery after interruptions.** HEAD retries interrupted reads of native completion records. The Host owner retries ownership observation if descendants change, and an exited lane Host no longer holds its slot. A fresh `/restart` can retry a failed checkpoint when no stop was sent (#59, #60, #61, #62).
|
|
6
|
+
- **Shorter READMEs and a complete English operations guide.** The [Korean guide](https://github.com/dbc-hbin/omp-superagent/blob/v0.1.10/docs/OPERATIONS.md) remains available.
|
|
7
|
+
|
|
8
|
+
## Install or upgrade
|
|
9
|
+
|
|
10
|
+
```sh
|
|
11
|
+
bun add --global --trust omp-superagent@0.1.10
|
|
12
|
+
omp-sa --help
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Alternatively, use `npm install --global omp-superagent@0.1.10` with Bun 1.4.4 or later on `PATH`. Install OMP separately; CI uses stock OMP 19.1.1. Installing does not restart a running Gateway.
|
|
16
|
+
|
|
17
|
+
[Changes since 0.1.9](https://github.com/dbc-hbin/omp-superagent/compare/v0.1.9...v0.1.10) · [Operations guide](https://github.com/dbc-hbin/omp-superagent/blob/v0.1.10/docs/OPERATIONS.en.md)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# omp-superagent 0.1.11
|
|
2
|
+
|
|
3
|
+
- **Idle HEADs can release memory.** After 30 minutes of verified inactivity, HEAD and its Host owner can exit while the Rust Gateway keeps receiving messages. The next request wakes the same session. Set `headIdleMs` to `0` to keep HEAD resident if first-response latency matters more.
|
|
4
|
+
- **Wake preserves the session and its service tier.** The Gateway checks the native profile, journal, model route and service tier before releasing queued messages. If the configuration changes during wake, restoring its exact bytes lets the same controller continue without resending the request.
|
|
5
|
+
- **Messenger recovery preserves order.** Discord and Slack recover history only through the end of each connection gap. Slack edits keep their original topic, and a replacement HEAD continues unfinished reads without replaying completed effects.
|
|
6
|
+
- **HEAD and lanes communicate directly.** Direct lane reports and follow-ups replace the board tools. HEAD can answer before a background job finishes and retain the job's result for that request. Messenger commands with space-separated arguments now preserve their arguments.
|
|
7
|
+
- **Choose HEAD fast mode from the messenger.** The `/fast` picker shows the current mode; changing it requires confirmation. The SDK and CI baseline are now stock OMP 19.2.1.
|
|
8
|
+
|
|
9
|
+
## Install or upgrade
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
bun add --global --trust omp-superagent@0.1.11
|
|
13
|
+
omp-sa --help
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Alternatively, use `npm install --global omp-superagent@0.1.11` with Bun 1.4.4 or later on `PATH`. Install OMP separately. Installing does not restart a running Gateway; stop and start it normally so the Gateway and HEAD use the same installation.
|
|
17
|
+
|
|
18
|
+
[Changes since 0.1.10](https://github.com/dbc-hbin/omp-superagent/compare/v0.1.10...v0.1.11) · [Operations guide](https://github.com/dbc-hbin/omp-superagent/blob/v0.1.11/docs/OPERATIONS.en.md)
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omp-superagent",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"description": "One messenger-connected OMP head with independent work sessions",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "dbc-hbin",
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
"files": [
|
|
16
16
|
"src/",
|
|
17
17
|
"scripts/build-host-owner.ts",
|
|
18
|
-
"scripts/prepare-
|
|
18
|
+
"scripts/prepare-super.ts",
|
|
19
19
|
"scripts/setup.sh",
|
|
20
20
|
"skills/",
|
|
21
21
|
"host-owner/bin/",
|
|
22
22
|
"gateway/bin/",
|
|
23
|
-
"upstream/
|
|
23
|
+
"upstream/super.json",
|
|
24
24
|
"assets/",
|
|
25
25
|
"docs/",
|
|
26
26
|
"config.example.json",
|
|
@@ -41,26 +41,25 @@
|
|
|
41
41
|
"release": "bun --no-env-file scripts/release.ts",
|
|
42
42
|
"start": "bun --no-env-file src/cli.ts start",
|
|
43
43
|
"setup": "bash scripts/setup.sh",
|
|
44
|
-
"prepare:ulw": "bun scripts/prepare-
|
|
44
|
+
"prepare:ulw": "bun scripts/prepare-super.ts",
|
|
45
45
|
"prepare": "bun run build:native --install",
|
|
46
|
-
"postinstall": "bun scripts/prepare-
|
|
46
|
+
"postinstall": "bun scripts/prepare-super.ts"
|
|
47
47
|
},
|
|
48
48
|
"engines": {
|
|
49
49
|
"bun": ">=1.4.4"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@oh-my-pi/pi-
|
|
53
|
-
"@oh-my-pi/pi-
|
|
54
|
-
"@oh-my-pi/pi-
|
|
55
|
-
"@oh-my-pi/pi-
|
|
56
|
-
"@oh-my-pi/pi-tui": "19.1.1",
|
|
57
|
-
"@oh-my-pi/pi-utils": "19.1.1",
|
|
52
|
+
"@oh-my-pi/pi-catalog": "19.2.1",
|
|
53
|
+
"@oh-my-pi/pi-coding-agent": "19.2.1",
|
|
54
|
+
"@oh-my-pi/pi-natives": "19.2.1",
|
|
55
|
+
"@oh-my-pi/pi-utils": "19.2.1",
|
|
58
56
|
"@sinclair/typebox": "^0.34.41",
|
|
59
57
|
"cron-parser": "5.10.6"
|
|
60
58
|
},
|
|
61
59
|
"devDependencies": {
|
|
62
60
|
"@discordjs/voice": "0.19.2",
|
|
63
61
|
"@noble/ciphers": "2.4.0",
|
|
62
|
+
"@oh-my-pi/pi-ai": "19.2.1",
|
|
64
63
|
"@slack/socket-mode": "^3.2.0",
|
|
65
64
|
"@slack/web-api": "^8.3.0",
|
|
66
65
|
"@types/bun": "^1.3.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
import { resolve } from "node:path";
|
|
3
|
-
import { managedUlwStatus, updateManagedUlw, type ManagedUlwOptions } from "../src/managed-
|
|
3
|
+
import { managedUlwStatus, updateManagedUlw, type ManagedUlwOptions } from "../src/omp/managed-super";
|
|
4
4
|
|
|
5
5
|
const options: ManagedUlwOptions = {};
|
|
6
6
|
let statusOnly = false;
|