omp-superagent 0.1.7 → 0.1.9

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 (122) hide show
  1. package/DESIGN.md +27 -16
  2. package/README.ko.md +40 -19
  3. package/README.md +43 -18
  4. package/THIRD_PARTY_NOTICES.md +11 -11
  5. package/config.example.json +2 -1
  6. package/docs/OPERATIONS.md +285 -85
  7. package/docs/design/execution.md +133 -24
  8. package/docs/design/messaging.md +235 -50
  9. package/docs/discord-voice.md +8 -4
  10. package/docs/releases/0.1.8.md +21 -0
  11. package/docs/releases/0.1.9.md +18 -0
  12. package/gateway/bin/omp-gateway-darwin-arm64 +0 -0
  13. package/gateway/bin/omp-gateway-darwin-x64 +0 -0
  14. package/gateway/bin/omp-gateway-linux-arm64 +0 -0
  15. package/gateway/bin/omp-gateway-linux-x64 +0 -0
  16. package/host-owner/bin/notices/darwin-arm64/Cargo-LICENSES.txt +2 -0
  17. package/host-owner/bin/notices/darwin-arm64/Cargo-SOURCES.txt +2 -0
  18. package/host-owner/bin/notices/darwin-arm64/crates/bitflags-2.13.2/LICENSE-APACHE +201 -0
  19. package/host-owner/bin/notices/darwin-arm64/crates/bitflags-2.13.2/LICENSE-MIT +25 -0
  20. package/host-owner/bin/notices/darwin-arm64/crates/rustix-1.1.6/COPYRIGHT +29 -0
  21. package/host-owner/bin/notices/darwin-arm64/crates/rustix-1.1.6/LICENSE-APACHE +201 -0
  22. package/host-owner/bin/notices/darwin-arm64/crates/rustix-1.1.6/LICENSE-Apache-2.0_WITH_LLVM-exception +220 -0
  23. package/host-owner/bin/notices/darwin-arm64/crates/rustix-1.1.6/LICENSE-MIT +23 -0
  24. package/host-owner/bin/notices/darwin-x64/Cargo-LICENSES.txt +2 -0
  25. package/host-owner/bin/notices/darwin-x64/Cargo-SOURCES.txt +2 -0
  26. package/host-owner/bin/notices/darwin-x64/crates/bitflags-2.13.2/LICENSE-APACHE +201 -0
  27. package/host-owner/bin/notices/darwin-x64/crates/bitflags-2.13.2/LICENSE-MIT +25 -0
  28. package/host-owner/bin/notices/darwin-x64/crates/rustix-1.1.6/COPYRIGHT +29 -0
  29. package/host-owner/bin/notices/darwin-x64/crates/rustix-1.1.6/LICENSE-APACHE +201 -0
  30. package/host-owner/bin/notices/darwin-x64/crates/rustix-1.1.6/LICENSE-Apache-2.0_WITH_LLVM-exception +220 -0
  31. package/host-owner/bin/notices/darwin-x64/crates/rustix-1.1.6/LICENSE-MIT +23 -0
  32. package/host-owner/bin/notices/linux-arm64/Cargo-LICENSES.txt +3 -0
  33. package/host-owner/bin/notices/linux-arm64/Cargo-SOURCES.txt +3 -0
  34. package/host-owner/bin/notices/linux-arm64/crates/bitflags-2.13.2/LICENSE-APACHE +201 -0
  35. package/host-owner/bin/notices/linux-arm64/crates/bitflags-2.13.2/LICENSE-MIT +25 -0
  36. package/host-owner/bin/notices/linux-arm64/crates/linux-raw-sys-0.12.1/COPYRIGHT +29 -0
  37. package/host-owner/bin/notices/linux-arm64/crates/linux-raw-sys-0.12.1/LICENSE-APACHE +201 -0
  38. package/host-owner/bin/notices/linux-arm64/crates/linux-raw-sys-0.12.1/LICENSE-Apache-2.0_WITH_LLVM-exception +220 -0
  39. package/host-owner/bin/notices/linux-arm64/crates/linux-raw-sys-0.12.1/LICENSE-MIT +23 -0
  40. package/host-owner/bin/notices/linux-arm64/crates/rustix-1.1.6/COPYRIGHT +29 -0
  41. package/host-owner/bin/notices/linux-arm64/crates/rustix-1.1.6/LICENSE-APACHE +201 -0
  42. package/host-owner/bin/notices/linux-arm64/crates/rustix-1.1.6/LICENSE-Apache-2.0_WITH_LLVM-exception +220 -0
  43. package/host-owner/bin/notices/linux-arm64/crates/rustix-1.1.6/LICENSE-MIT +23 -0
  44. package/host-owner/bin/notices/linux-x64/Cargo-LICENSES.txt +3 -0
  45. package/host-owner/bin/notices/linux-x64/Cargo-SOURCES.txt +3 -0
  46. package/host-owner/bin/notices/linux-x64/crates/bitflags-2.13.2/LICENSE-APACHE +201 -0
  47. package/host-owner/bin/notices/linux-x64/crates/bitflags-2.13.2/LICENSE-MIT +25 -0
  48. package/host-owner/bin/notices/linux-x64/crates/linux-raw-sys-0.12.1/COPYRIGHT +29 -0
  49. package/host-owner/bin/notices/linux-x64/crates/linux-raw-sys-0.12.1/LICENSE-APACHE +201 -0
  50. package/host-owner/bin/notices/linux-x64/crates/linux-raw-sys-0.12.1/LICENSE-Apache-2.0_WITH_LLVM-exception +220 -0
  51. package/host-owner/bin/notices/linux-x64/crates/linux-raw-sys-0.12.1/LICENSE-MIT +23 -0
  52. package/host-owner/bin/notices/linux-x64/crates/rustix-1.1.6/COPYRIGHT +29 -0
  53. package/host-owner/bin/notices/linux-x64/crates/rustix-1.1.6/LICENSE-APACHE +201 -0
  54. package/host-owner/bin/notices/linux-x64/crates/rustix-1.1.6/LICENSE-Apache-2.0_WITH_LLVM-exception +220 -0
  55. package/host-owner/bin/notices/linux-x64/crates/rustix-1.1.6/LICENSE-MIT +23 -0
  56. package/host-owner/bin/omp-host-owner-darwin-arm64 +0 -0
  57. package/host-owner/bin/omp-host-owner-darwin-x64 +0 -0
  58. package/host-owner/bin/omp-host-owner-linux-arm64 +0 -0
  59. package/host-owner/bin/omp-host-owner-linux-x64 +0 -0
  60. package/package.json +17 -15
  61. package/skills/head/SKILL.md +3 -11
  62. package/skills/head/references/routing.md +23 -17
  63. package/skills/head/references/supervision.md +13 -1
  64. package/skills/lane/references/workflow.md +8 -8
  65. package/src/cli.ts +6 -3
  66. package/src/config.ts +5 -0
  67. package/src/contracts.ts +95 -10
  68. package/src/cron-jobs.ts +443 -19
  69. package/src/cron-pr-intake.ts +257 -0
  70. package/src/discord-command-registration.ts +34 -186
  71. package/src/extension.ts +31 -3
  72. package/src/gateway-client.ts +11 -59
  73. package/src/gateway-protocol.ts +35 -1
  74. package/src/head-quota.ts +80 -0
  75. package/src/head-recovery.ts +249 -1
  76. package/src/host-extension.ts +194 -5
  77. package/src/host-protocol.ts +16 -9
  78. package/src/host-sdk-helper.ts +105 -10
  79. package/src/host.ts +111 -29
  80. package/src/installed-omp.ts +116 -4
  81. package/src/lane-models.ts +8 -0
  82. package/src/managed-ulw-probe.ts +22 -20
  83. package/src/managed-ulw.ts +137 -24
  84. package/src/messenger-command-catalog.json +6 -3
  85. package/src/messenger-commands.ts +9 -2
  86. package/src/native-presets.ts +32 -5
  87. package/src/omp-usage.ts +254 -36
  88. package/src/operator.ts +77 -0
  89. package/src/pr-github-schema.ts +2 -0
  90. package/src/pr-github.ts +4 -2
  91. package/src/pr-intake-automation.ts +315 -0
  92. package/src/pr-intake-comment.ts +225 -0
  93. package/src/pr-intake-fix.ts +232 -0
  94. package/src/pr-intake-github.ts +479 -0
  95. package/src/pr-intake-material.ts +229 -0
  96. package/src/pr-intake-mode.ts +59 -0
  97. package/src/pr-intake-review.ts +397 -0
  98. package/src/pr-intake-tree.ts +68 -0
  99. package/src/pr-intake-work.ts +29 -0
  100. package/src/pr-review-models.ts +28 -0
  101. package/src/result-attachment.ts +60 -79
  102. package/src/runtime.ts +2968 -449
  103. package/src/setup-profiles.ts +26 -65
  104. package/src/slack-command-registration.ts +48 -197
  105. package/src/store.ts +507 -87
  106. package/src/superkit-skills.ts +22 -0
  107. package/src/telegram-command-languages.json +17 -0
  108. package/src/telegram-command-registration.ts +32 -134
  109. package/src/topic-history.ts +30 -17
  110. package/src/worker-bridge.ts +21 -0
  111. package/src/worker-enrollment.ts +2 -1
  112. package/src/worker-host.ts +0 -24
  113. package/src/worker-serve-prepare.ts +19 -0
  114. package/src/worker-service.ts +51 -47
  115. package/scripts/ci.ts +0 -44
  116. package/scripts/release.ts +0 -112
  117. package/scripts/test-omp.sh +0 -43
  118. package/src/discord-commands.ts +0 -29
  119. package/src/discord-markdown.ts +0 -172
  120. package/src/slack-commands.ts +0 -18
  121. package/src/telegram-signal.ts +0 -14
  122. package/src/worker-stdio.ts +0 -61
@@ -24,14 +24,15 @@ topic is a binding key, not a fabricated conversation or thread ID.
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
25
 
26
26
  Set `discord.requireAddressing` to `true` to filter ordinary owner messages in
27
- allowed Discord guild parent channels, including message edits and history
28
- catch-up. The default is `false`. A message must actually mention the
29
- authenticated bot or be a verified reply in that conversation to a message it
30
- authored. Typing the bot's name, mentioning a different bot, or copying a bot
31
- message without actually addressing the bot does not count.
32
- Authorized thread conversations can continue without addressing. When enabled,
33
- verified inline mentions of this bot are removed from ordinary owner input in
34
- guild parent channels and threads, so a text command still parses as a command.
27
+ allowed Discord guild parent channels and threads not created by this bot,
28
+ including message edits and history catch-up. The default is `false`. A message
29
+ must actually mention the authenticated bot or be a verified reply in that
30
+ conversation to a message it authored. Typing the bot's name, mentioning a
31
+ different bot, or copying a bot message without actually addressing the bot
32
+ does not count. Authorized threads that this bot created can continue without
33
+ addressing. When enabled, verified inline mentions of this bot are removed from
34
+ ordinary owner input in guild parent channels and threads, so a text command
35
+ still parses as a command.
35
36
  The owner, guild and parent-channel checks still apply. Owner DMs, Discord
36
37
  application commands, approval components and restricted group rooms retain
37
38
  their existing policies.
@@ -138,6 +139,27 @@ barrier or selected priority owner controls (`/restart`, `/stop`, `/stop head`);
138
139
  ordinary intake keeps its order. After the first approval barrier, a head outage
139
140
  does not close Gateway admission. Reconnecting does not replay already submitted work.
140
141
 
142
+ The head receipt does not wait for a [historical topic search](#topic-routing-and-controls),
143
+ which may read large native journals. An input that needs one is appended to a
144
+ durable deferred-routing queue in the coordination store (`intake:deferred-routing`),
145
+ receipted, and then searched and admitted in the background. Until it is admitted,
146
+ later ordinary inputs of the same physical channel or DM (including its threads
147
+ and logical topics) queue behind it; other conversations are not held. A
148
+ redelivery of a queued input shares the store's immutable-payload and signed
149
+ attachment URL reconciliation. Fresh `/restart`, `/stop head`, and
150
+ `/stop <exact authorized lane-id>` bypass deferred waiting, including after
151
+ restart. A bare `/stop` bypasses failing admission only if it is not a reply and
152
+ comes from an already-bound physical Discord work thread. Bare DM and
153
+ reply-relative stops wait for earlier routing, rather than choosing today's
154
+ apparent target; edits cannot acquire priority. Global HEAD stops and
155
+ lane-specific stops snapshot receipt order across both queues. A later resume
156
+ waits for an older deferred stop of that exact lane without being cancelled by
157
+ it; other lanes' work is independent. A pending queued
158
+ choice fences the automatic history choice like an unreceipted Gateway event. A
159
+ failed admission stays first in its conversation and is retried with bounded
160
+ backoff; a permanent denial is dropped. The queue survives a restart and resumes
161
+ in order once intake is ready.
162
+
141
163
  Telegram persists its per-bot offset after admission and acknowledges it with the
142
164
  next `getUpdates`. There is no Bot API history fetch; recovery cannot exceed its
143
165
  24-hour update retention. Omit the previous offset after 24 hours of inactivity,
@@ -158,6 +180,42 @@ remain held. Recovery cannot dispatch, answer approvals, run tools outside its
158
180
  gate or repeat the original request. A later stop or manual resolution invalidates
159
181
  older recovery work.
160
182
 
183
+ An exact, settled HEAD `openai-codex` quota refusal with no tool calls or
184
+ partial answer can also close as cancelled without a recovery model turn.
185
+ Only that hold arms a usage check on the existing controller wake, at most once
186
+ per OMP usage-cache interval. The current session and same model must have a
187
+ permitted, healthy credential in native OMP model health and a matching usage
188
+ report with measured headroom above its effective reserve after the failure.
189
+ The credential must also appear in any discovered account roster for the model.
190
+ Credit-funded overage, a reset timestamp, a stale report, missing account
191
+ attribution, or an uncertain effect is not proof. The controller rechecks the
192
+ exact native run journal, stop boundary and current request ownership before
193
+ closing the hold. This does
194
+ not spend a saved reset or retry the original input; later inputs keep their
195
+ durable order. The quota and credential contracts were checked against the
196
+ [pinned OMP SDK](../../DESIGN.md#stock-omp-and-verification-scope).
197
+
198
+ Any other settled HEAD failure (`prompt_result` status `error`) whose exact
199
+ native run journal contains only its single prompt, failed model replies without
200
+ tool calls, native `provider_refusal` entries and usage records closes as
201
+ cancelled at settlement, with a failure notice and without replay. The same
202
+ receipt identity, run ordinal, session and file binding as the quota rule
203
+ applies. Automatic closure requires that the native session still be idle
204
+ after reading its journal and that every output have a terminal delivery
205
+ state. An outstanding native confirmation retains its original owner route
206
+ and delays settlement until the native dialog is answered or cancelled. An
207
+ input already held after a restart closes the same way during reconciliation;
208
+ after the settled receipt only usage records and native or extension `custom`
209
+ entries (for example `session_exit`) are tolerated, never a later message, run
210
+ or tool start.
211
+ A started tool, a steered follow-up, an unknown journal entry, an unreadable
212
+ journal, or a quota or quota-like refusal (even after a restart `session_exit`,
213
+ model change, or without a quota reader) keeps the input uncertain. That failure
214
+ notice names the exact `/resolve <input-id>`, and the first new owner message
215
+ held behind it atomically persists one hold notice and its marker naming the
216
+ blocking input. Later held messages receive no further notice for the same
217
+ blocker.
218
+
161
219
  `/resolve [input-id]` (`!resolve` in Slack) manually closes an uncertain head
162
220
  input as cancelled. A stalled lane exposes its exact input ID and queue blocker
163
221
  through `/status` or `lane_inspect`. Only the operator in the bound topic can use
@@ -193,10 +251,11 @@ See the [operations guide](../OPERATIONS.md#4-명령과-일상-사용) for comma
193
251
  recall results or journal excerpts. Matches do not dispatch work, authorize
194
252
  approvals, or reopen a session. If recall is unavailable, direct journal
195
253
  matches can still inform HEAD; a missing hint does not block ordinary chat.
196
- Lookup does not reserve a standalone turn for a steering input after its
197
- original turn ends. HEAD verifies useful leads or asks only if material
198
- ambiguity remains. Native file and model references in historical data are
199
- inert, unlike references in the current owner's task.
254
+ Advisory lookup applies to new turns; a follow-up already eligible to steer
255
+ has a verified destination and does not wait for recall. HEAD verifies useful
256
+ leads or asks only if material ambiguity remains. Native file and model
257
+ references in historical data are inert, unlike references in the current
258
+ owner's task.
200
259
  - Explicit `cwd: /absolute/path`, `/new` with a task, an exact reply to a placed
201
260
  original or its delivered message with a verified workspace, and intentional
202
261
  historical lookup use controller placement. Invalid explicit cwd is rejected,
@@ -257,10 +316,18 @@ See the [operations guide](../OPERATIONS.md#4-명령과-일상-사용) for comma
257
316
  threads, not edits, quoted text or attachments. DM and other adapters retain
258
317
  their existing topic behavior.
259
318
  - `/head <request>` explicitly addresses the shared coordination model (Slack:
260
- `!head` or `/superagent-head`). Its manager handoffs keep the original review
261
- path. Bound-topic commentary and final answers instead pass through the
262
- controller's source-bound outbox without a synthesis turn. Approval cards
263
- also stay with their original native session and authorized route.
319
+ `!head` or `/superagent-head`). Manager handoffs keep HEAD's review path.
320
+ When HEAD explicitly uses `lane_message` to continue an existing physical
321
+ Discord work thread from its exact authorized guild parent, the controller
322
+ records that thread as the handoff's progress and final report route. It
323
+ does not change the original input or borrow its parent message as a thread
324
+ reply. Replays preserve the recorded destination and do not send a parent
325
+ copy. Native approvals during HEAD's review still use the original parent
326
+ route, not the report's destination. Other routes, logical topics and
327
+ `/resume` retain their existing rules. Bound-topic commentary and final
328
+ answers instead pass through the controller's source-bound outbox without a
329
+ synthesis turn. Approval cards stay with their original native session and
330
+ authorized route.
264
331
  - Thread-first work sends a short kickoff to the selected topic. The durable
265
332
  `sent` receipt gates new lane dispatch and steering for that input. A missing
266
333
  or uncertain delivery is not a successful kickoff.
@@ -272,12 +339,25 @@ See the [operations guide](../OPERATIONS.md#4-명령과-일상-사용) for comma
272
339
  not rollback of effects. A DM edit whose original request was placed by HEAD
273
340
  reuses that verified lane, even if a newer topic is now active. If placement
274
341
  is still in progress or cannot be verified, the edit creates no topic.
275
- - For an active native run, eligible ordinary same-route follow-ups use native
276
- `steer`. Match the full route including account, authority, thread and topic;
277
- controls, internal reports and workflow selection do not join the run. Keep
278
- each source, receipt and outcome binding; jointly handled inputs produce one
279
- result for the cohort. A lane still needs explicit `lane_message`; pause,
280
- approval, compaction and uncertainty gates still apply.
342
+ - Ordinary follow-ups default to native `steer` when their destination has an
343
+ eligible active run: unbound requests and ordinary `/head` text go to HEAD;
344
+ ordinary replies in a bound work thread go to its lane without `lane_message`.
345
+ If a follow-up arrives before the native start event, that event rechecks
346
+ pending inputs. An idle destination receives a new prompt.
347
+ Match the full route including account, authority, thread and topic. A bound
348
+ reply can join a manager run initiated elsewhere only if its verified delivery
349
+ route is this exact thread. When steering another manager handoff into or from
350
+ a parent-origin thread follow-up, both source conversations and report routes
351
+ must match. A manager handoff keeps its HEAD review mode, with the verified
352
+ reply route fixed for the joined run, including logical topics backed by native
353
+ threads. Keep each source and native receipt distinct
354
+ and deliver one result for a jointly handled cohort. History lookup verifies
355
+ a joined reply's topic ownership and its own completed native receipt, not the
356
+ manager's instructions or completion.
357
+ Controls, internal reports and workflow selection do not join the run.
358
+ Pause, approval, compaction and uncertainty gates still apply. Durable intake
359
+ and RPC admission do not prove consumption: OMP consumes steers at native
360
+ boundaries, and a run can settle before a follow-up reaches such a boundary.
281
361
 
282
362
  | Platform | Command and topic representation |
283
363
  | --- | --- |
@@ -290,7 +370,7 @@ is a separate explicit apply, not a side effect of setup, doctor or start. Comma
290
370
  intake must not wait for a model; Discord's ephemeral admission reply and Slack's
291
371
  Socket Mode acknowledgement are not the actual command result.
292
372
 
293
- The head sends model and effort menus through its normal outbox. The Gateway
373
+ The head sends model, effort, and saved-reset menus through its normal outbox. The Gateway
294
374
  renders native components and binds each click to the owner, exact sent card,
295
375
  physical conversation, and displayed page. Navigation and cancellation only
296
376
  edit the card. One final click admits an ordinary durable control receipt on
@@ -299,9 +379,51 @@ is not a native mutation receipt. The head requires the recorded sent receipt
299
379
  for the exact card before changing settings. Unselected cards expire after five
300
380
  minutes, on Gateway restart, or when a new menu of the same kind replaces them
301
381
  on the same route.
382
+ On Discord, the model card shows two selects: the destination (HEAD or the
383
+ lane bound to the opening conversation) and the provider/model browser. With
384
+ both destinations available the operator must pick one; without a bound lane
385
+ only HEAD is offered. Browsing providers or changing the destination is not a
386
+ model change. The card uses the lane's saved model for its checkmark, omitting
387
+ it when uncertain; browsing does not wait for a lane Host. Remote lanes offer
388
+ only identifiers their worker accepts; manual PR review lanes offer only
389
+ static-review-compatible models. Neither restriction filters the HEAD list.
390
+ The final model selection carries the destination with the saved card and
391
+ option indices. A stale lane selection cannot fall back to HEAD.
302
392
  The interaction pattern was compared with [Hermes Agent at 242315ce](https://github.com/NousResearch/hermes-agent/blob/242315ce571cde721e717a544cf8ae6c343315cf/gateway/slash_commands_model.py#L516-L567);
303
393
  the catalogue and mutation remain native OMP, and no upstream picker code is used.
304
394
 
395
+ The reset picker chooses an exact linked account from the configured OMP profile.
396
+ Discord accepts the argumentless `/usage-reset` command in its picker and in
397
+ authorized messages. `/usage` only reads quotas. The Gateway rejects stale
398
+ `/usage` interactions carrying options; HEAD refuses legacy `/usage reset`
399
+ messages as invalid controls, not model or lane requests. Edits cannot open
400
+ the reset picker. Telegram and Slack keep their existing reset syntax.
401
+ The first click only changes the displayed card revision; Confirm on that
402
+ revision is the only action that admits a reset request. Cancel closes the card
403
+ without admitting any request. The head checks the original sent card and live
404
+ availability, then persists the attempt before asking the installed CLI to
405
+ redeem one currently usable ticket on that account. The native CLI selects
406
+ the ticket; the chat card does not authorize or pin an individual grant.
407
+ Duplicate or interrupted attempts are never replayed. Native success is
408
+ recorded before checking the refreshed balance; a missing receipt never
409
+ implies the ticket was or was not spent. An uncertain attempt holds further
410
+ redemptions for a matching or indistinguishable provider account, even after
411
+ re-login changes the local row or adds identity fields. The operator must check
412
+ the balance and close the original hold with `/resolve` (`!resolve` in Slack).
413
+ Banked tickets that cannot currently be spent are reported separately from
414
+ the selectable accounts, without a Confirm action.
415
+ An admitted reset holds restart handoff until its outcome is durably recorded.
416
+ Account options show the native selector number and, when available, a short
417
+ masked account or organization hint; raw identities never enter the card.
418
+ Capability is checked against the configured binary's `omp usage --help`.
419
+ The adapter expects a read-only `usage reset --json` list and a separate
420
+ `usage reset <provider>/<credential id>` redemption. The
421
+ [OMP 19.0.0 CLI source](https://github.com/can1357/oh-my-pi/blob/57771ae562b9345e0579bceb2d68d585e3e6927e/packages/coding-agent/src/cli/usage-cli.ts)
422
+ and previously inspected 19.1.0 CLI are dated references for this command shape,
423
+ not the [current SDK baseline](../../DESIGN.md#stock-omp-and-verification-scope).
424
+ Older executables without the exact-target command show an unsupported state;
425
+ there is no provider fallback or mutation of local quota counters.
426
+
305
427
  Thread capability comes from the authenticated adapter. Permission or network
306
428
  failure is not permission to fall back to another destination. Preserve the
307
429
  original binding when creating a sibling topic and journal creation intent before
@@ -311,19 +433,31 @@ permissions, then reads back title, tags or archived state. Exact tag IDs and
311
433
  required/moderated tag policy apply. Archiving a thread does not pause its lane,
312
434
  and reopening it does not resume it.
313
435
 
314
- For a bound Discord work thread, an owned native run adds `⏳` to the title;
315
- verified `lane_close` completion replaces it with `✅`. Native settlement alone
316
- does not mark work complete. Pausing clears the working marker and cancelling
317
- clears either marker. Resumed work gets the working marker again when it runs.
318
- The head reads the current title and updates its prefix through the same
319
- authorized thread API. These edits need Manage Threads, are best effort, and
320
- skip archived threads. They do not change tags, archive state, or lane execution.
321
-
322
- `/help`, `/status`, `/context` and `/usage` are code-handled reads with no model
323
- turn. [`/usage`](../../src/omp-usage.ts) invokes the configured executable and
324
- profile with `usage --json --redact --no-extensions` and projects provider quota
325
- and reset data, without sending account identifiers or raw responses. Unknown
326
- quota is not zero or an estimate of this session's usage. `/compact` uses native
436
+ For a bound Discord work thread, an owned run or queued lane input adds `⏳`
437
+ to the title. Outstanding inputs, approvals, or result delivery can keep that
438
+ marker. After the latest run succeeds and its final reply is confirmed sent,
439
+ the head automatically replaces it with `✅`. This marks the delivered request,
440
+ not independent verification of its acceptance criteria or closure of the lane.
441
+ Explicit `lane_close` completion also shows `✅`; pause and cancellation remove
442
+ the marker. A follow-up replaces the check with `⏳` again.
443
+
444
+ When startup recovery allows writes, the head reconciles managed work threads
445
+ from stored run and delivery receipts without launching unloaded lanes. It changes only the
446
+ prefix through the authorized thread API. Edits are best effort, require
447
+ Manage Threads, and skip archived threads. A confirmed Discord rate limit
448
+ defers reconciliation and rechecks current state before the next write;
449
+ an ambiguous write is not retried.
450
+
451
+ `/help`, `/status`, `/context` and `/usage` are code-handled reads with no model turn.
452
+ [`/usage`](../../src/omp-usage.ts) invokes the configured executable and
453
+ profile with `usage --json --redact`, so OMP discovers built-in and extension-provided
454
+ usage sources. Both usage and reset preserve explicit `--no-extensions`,
455
+ `--extension`, `--hook` and `--config` inputs from the configured launch command.
456
+ Neither subprocess receives the Gateway bearer or configured messenger credentials.
457
+ The reply includes safe OMP-masked account names when available, never full
458
+ email addresses, raw IDs, or raw responses. Unrecognized meter names use
459
+ numbered labels rather than publishing provider-controlled text.
460
+ Unknown quota is not zero or an estimate of this session's usage. `/compact` uses native
327
461
  compaction and requires an idle eligible head; status and priority stop remain
328
462
  available while it runs. `/stop` pauses the bound lane. In an unbound topic a
329
463
  reply can select the exact pending placement or the running HEAD request on
@@ -391,6 +525,9 @@ approval.
391
525
  API routes and metadata. Do not persist or surface credential URLs or
392
526
  follow redirects on private file downloads. Enforce byte limits end to end;
393
527
  an unknown size is not zero and a known size must match the bytes received.
528
+ Rust stages the authorized batch under the instance's private attachments
529
+ directory. The head receives file receipts, not a second copy of every
530
+ download over the Gateway socket; it still constructs the native image input.
394
531
  The adapters preserve audio metadata; they do not transcribe attachments.
395
532
  - An owner can authorize one specific result file with a standalone leading
396
533
  `attach: workspace/relative-file.ext` line. `result_attach` stages the exact
@@ -402,14 +539,19 @@ approval.
402
539
  hard links, dot paths and managed private state are excluded. Delivery uses
403
540
  the original authorized topic and stable outbox identity, with no destination
404
541
  override and no replay of uncertain sends. Restricted group rooms cannot
405
- use this feature. The private controller outbox stores the bounded immutable
406
- bytes; the Gateway attempt ledger stores their fingerprint and the receipt,
407
- not a second copy of the file.
542
+ use this feature. New outbox rows refer to a private snapshot made before
543
+ admission. The Gateway verifies its recorded identity and contents rather
544
+ than reopening the workspace path. Older queued inline attachments retain
545
+ their original delivery identity; moving the bytes does not authorize a
546
+ second upload after an uncertain send.
408
547
  - Long outputs use a single bounded text attachment where supported. Discord
409
548
  first splits an over-limit reply at paragraph, line, then space boundaries
410
- into at most five ordered messages, closing and reopening a code fence that
411
- crosses a boundary; only the first replies to the original message, each part
412
- has its own nonce, and the first message ID is the delivery receipt. For newly
549
+ into at most five ordered messages of up to 2,000 UTF-16 units, closing and
550
+ reopening a code fence that crosses a boundary. Rendered table fields stay
551
+ whole across message boundaries; when a field cannot fit, the bounded text
552
+ attachment preserves its Markdown rather than cutting through it.
553
+ Only the first message replies to the original. Each part has its own nonce,
554
+ and the first message ID is the delivery receipt. For newly
413
555
  completed multipart sends the Gateway also records later message IDs for scoped
414
556
  reply lookup; partial or uncertain sends are not workspace evidence. The Gateway has
415
557
  25 seconds for the whole Discord output, including destination lookup,
@@ -417,23 +559,66 @@ approval.
417
559
  No new parts are posted after that deadline. An in-flight POST at expiry or
418
560
  a failure after a visible part is uncertain; nothing is resent. Slack
419
561
  uses upload URL → bytes → `files.completeUploadExternal`, not `files.upload`.
420
- Telegram and Slack do not automatically retry remote mutations. Discord formats
421
- pipe tables as fixed-width code blocks at delivery, preserving the stored
422
- original. [Delivery classification](../../src/delivery.ts) distinguishes
562
+ Telegram and Slack do not automatically retry remote mutations. Discord renders
563
+ ordinary Markdown pipe tables at delivery as stacked list items, with the
564
+ column labels and each row's values on separate lines. This leaves links,
565
+ emphasis and inline code available to Discord's Markdown renderer and lets
566
+ prose wrap naturally. Existing code blocks and stored output are unchanged.
567
+ [Delivery classification](../../src/delivery.ts) distinguishes
423
568
  definite rejection from uncertainty across the IPC boundary.
424
569
  - Receipt/working reactions are best-effort decorations bound to the real
425
570
  source message. They neither delay nor prove admission, execution or delivery.
426
571
  Progress reports are coalesced before submission where safe; a final result
427
572
  takes precedence over undelivered progress. Already started external sends
428
573
  cannot be recalled.
574
+ - Pending outbox delivery runs concurrently across distinct physical routes
575
+ (platform, account, authority, guild, channel, thread) while preserving
576
+ strict sequence order within each physical route and never automatically
577
+ retrying uncertain sends. Routes wake as soon as outputs become pending
578
+ without waiting behind an unrelated command tail; restart checkpoints still
579
+ wait for all in-flight route deliveries to settle before lifecycle handoff.
580
+ - In-place editing of Discord progress reports is opt-in via
581
+ `discord.editProgressInPlace` (default `false`). By default, every progress
582
+ update and HEAD lane progress summary posts as an ordinary new message so
583
+ progress history stays visible. When enabled on Discord, nonterminal progress
584
+ for one request—including direct HEAD progress, direct topic progress, and
585
+ HEAD summaries of non-topic lane progress keyed by the original lane input—uses
586
+ a single `⏳` status message edited in place (`⏳\n` when the body begins
587
+ with a code fence so card fences remain intact). Each update stays its own
588
+ immutable output with `status: true`; initial long status messages use the
589
+ single-message text attachment fallback instead of splitting across multiple
590
+ posts so later edits replace that single message cleanly. When an update is
591
+ claimed for delivery, the controller fixes `editOf` to the physical message of
592
+ the stream's first confirmed post and persists it with the output, so a
593
+ redelivery edits that same message. An uncertain post never becomes an edit
594
+ target. A rejected edit fails only that update and is never reposted; it
595
+ releases the target so a later update posts a fresh status message. An
596
+ ambiguous edit stays uncertain. Final answers and lane completion reports are
597
+ still separate new messages. Telegram and Slack always post ordinary progress
598
+ messages; the Gateway rejects `editOf` and `status: true` outside Discord.
599
+ - Discord turns a fenced ```` ```card ```` [json-render](https://github.com/vercel-labs/json-render)
600
+ spec (`{"root", "elements"}`, root `Card`; `Card`, `Section`, `Text`,
601
+ `Fields`, `Field`, `Table`, `Divider`, `Image`) into an embed at delivery.
602
+ Table content becomes an aligned code block in the embed description. In a
603
+ guild or thread, only use embeds when the bot has verified Embed Links
604
+ permission at the parent channel; otherwise send the original fence as text.
605
+ An Image needs a valid HTTPS URL. A spec that is
606
+ invalid, uses another component, reuses an element or exceeds Discord's embed
607
+ limits stays verbatim as its code block, which is also what Telegram and Slack
608
+ show. The [Rust renderer](../../gateway/src/discord/embeds.rs) and the
609
+ [test-only Bun renderer](../../test/oracles/bun-gateway/discord-markdown.ts)
610
+ share one [fixture](../../test/fixtures/discord-cards.json).
429
611
 
430
612
  ## Discord voice
431
613
 
432
614
  [Discord voice](../../gateway/src/discord_voice.rs) is optional Gateway functionality,
433
615
  separate from voice attachments or the head model. A fresh original owner
434
- `/voice start` in the configured text channel can open one bounded OpenAI Live
435
- conversation in the configured voice channel. Use channel permissions to
436
- exclude other participants. Edits, catch-up and restart cannot open or resume it.
616
+ `/voice start` in the configured guild text channel outside a restricted group
617
+ room can open one bounded OpenAI Live conversation in the configured voice
618
+ channel. Use channel permissions to exclude other participants. Live voice
619
+ controls do not require a bot mention when `discord.requireAddressing` is
620
+ enabled; confirmation still requires the exact active draft reply. Edits,
621
+ catch-up and restart cannot open or resume a call.
437
622
 
438
623
  In subscription mode the [Rust Gateway](../../gateway/src/discord_voice/subscription.rs)
439
624
  uses the installed Codex CLI to verify the active subscriber, then sends audio via
@@ -451,8 +636,8 @@ cancels still-queued posts and invalidates unconfirmed drafts without waiting fo
451
636
  ordinary intake; requests already transmitted cannot be recalled. Neither start
452
637
  command submits or approves work. Only the owner's written
453
638
  `/voice confirm` as a reply to the active draft enters normal durable head
454
- intake; normal approval rules still apply. Head replies stay in normal Discord
455
- text delivery, with no return path to Live. The Gateway stores no recordings
639
+ intake; normal routing and approval rules still apply. Replies stay in normal
640
+ Discord text delivery, with no return path to Live. The Gateway stores no recordings
456
641
  or full voice transcript; drafts are visible in Discord and confirmed tasks and
457
642
  replies use existing records.
458
643
  See the [voice operations guide](../discord-voice.md) for setup, costs, and limits.
@@ -6,7 +6,8 @@
6
6
  ## 준비
7
7
 
8
8
  1. Discord 서버에 **봇과 소유자만 들어갈 수 있는 일반 음성 채널**과 작업 초안·답변용 텍스트 채널을 준비하세요.
9
- 서버는 `discord.allowedGuildIds`, 텍스트 채널은 `discord.allowedChannelIds`에 있어야 합니다.
9
+ 서버는 `discord.allowedGuildIds`, 텍스트 채널은 `discord.allowedChannelIds`에 있어야 하며
10
+ 텍스트 채널은 제한 모드 `groupRooms`에 등록되지 않은 일반 운영자 채널이어야 합니다.
10
11
  봇에는 음성 채널 보기·연결·발언, 텍스트 채널 보기·보내기·기록 읽기 권한이 필요합니다.
11
12
  권한으로 제삼자의 입장을 제한하세요. 참여자 변경 통지는 실시간 접근 제어를 대신할 수 없습니다.
12
13
  2. 기존 설정의 `discord` 안에 `voice` 객체를 추가하세요. **Codex 구독**을 쓰려면 아래처럼 설정합니다.
@@ -46,7 +47,8 @@
46
47
  WebRTC 프로토콜을 쓰므로 Codex나 서비스 변경으로 호환성이 깨질 수 있습니다.
47
48
  **API 모드:** `apiKeyEnv`가 가리키는 변수에 OpenAI 키를 설정하세요. Gateway의 환경 또는 기존 비공개 `FILE.env`를 사용하고,
48
49
  JSON에 키를 넣지 마세요. Discord 토큰과는 다른 변수여야 합니다. Gateway는 해당 변수를 HEAD·레인 환경에서 제외합니다.
49
- 4. 프로젝트의 잠금 파일로 의존성을 설치하세요(`bun install --frozen-lockfile`).
50
+ 4. [설치 가이드](OPERATIONS.md#1-로컬-준비--봇은-시작하지-않음)에 따라 npm 패키지를 설치하거나
51
+ 소스 checkout에서 `bun install --frozen-lockfile`을 실행하세요.
50
52
  Rust Gateway에 DAVE 및 Opus가 포함됩니다. 음성 연결은 소유자가 명시적으로 시작할 때만 열며 설치·진단 중에는 봇을 접속시키지 않습니다.
51
53
  설정 변경은 다음 Gateway 시작에 반영됩니다.
52
54
 
@@ -65,7 +67,8 @@ API 키로 로그인한 Codex, 만료된 자격증명, 별도의 지역·전용
65
67
  ## 사용
66
68
 
67
69
  - 소유자가 지정 음성 채널에 들어간 뒤 **지정 텍스트 채널**에 일반 메시지 `/voice start`를 보냅니다.
68
- 등록형 슬래시 명령이나 DM이 아닙니다. 준비됐다는 알림 후 말하세요.
70
+ 등록형 슬래시 명령이나 DM이 아닙니다. `discord.requireAddressing`이 켜져 있어도 실시간
71
+ `/voice` 명령에는 봇 멘션이 필요하지 않습니다. 준비됐다는 알림 후 말하세요.
69
72
  - 일반 대화는 Live가 음성으로 답합니다. 작업을 맡기려면 구독·API 모드 모두 **`/voice start` 대신
70
73
  `/voice start work`로 새 통화를 시작**한 뒤 “헤드에게 작업을 맡겨줘”처럼 명확하게 말하세요.
71
74
  이 시작 명령은 해당 통화에서 작업 초안을 **지정 텍스트 채널의 독자에게 공개**하는 허용이지 실행 승인이 아닙니다.
@@ -75,7 +78,8 @@ API 키로 로그인한 Codex, 만료된 자격증명, 별도의 지역·전용
75
78
  **그 초안에 Discord 답장으로** `/voice confirm`을 보내야 기존 HEAD에 접수됩니다. 초안은 한 번에 하나만 유효하며,
76
79
  게시 후 5분 또는 통화 종료 시 만료됩니다. 채널에 따로 쓰거나 음성으로 “승인”하는 것은 접수가 아니며,
77
80
  위험한 작업은 기존 승인 절차를 거칩니다. 접수가 불확실하면 텍스트 요청 기록을 확인하고 자동으로 반복하지 마세요.
78
- - HEAD 결과는 **Discord 텍스트로만** 받습니다. 결과나 작업 상태는 음성 모델에 전달하지 않습니다.
81
+ - 확인한 작업은 일반 텍스트 작업과 같은 라우팅·승인 규칙을 따르며 결과는 **Discord 텍스트로만** 받습니다.
82
+ 결과나 작업 상태는 음성 모델에 전달하지 않습니다.
79
83
  - `/voice work off`로 통화를 유지한 채 게시 허용을 철회하고 미확인 초안을 무효화할 수 있습니다.
80
84
  이미 전송된 메시지는 회수할 수 없으며, 확인한 작업을 취소하지도 않습니다. 통화 도중 게시 허용을 켜거나
81
85
  되돌릴 수 없습니다. 다시 작업을 맡기려면 통화를 종료하고 새 `/voice start work`로 시작하세요.
@@ -0,0 +1,21 @@
1
+ # omp-superagent 0.1.8
2
+
3
+ - **Follow up without `/steer`.** An ordinary owner reply can join the active HEAD or lane run in the same conversation at OMP's next steering boundary. A different thread does not interrupt it. History searches no longer delay the durable receipt; later messages stay ordered within their conversation. Replies to unrelated destinations can be delivered independently (#41, #45, #47).
4
+ - **Reset a specific account, or let the HEAD queue recover.** `/usage reset` lists available resets without spending one. Select an account and confirm to use one reset. Separately, after a verified Codex quota refusal with no tool calls or partial answer, fresh account and usage evidence can release the HEAD queue. This cancels the failed input rather than replaying it and never spends a reset (#36, #38).
5
+ - **Choose how far external PR intake can go.** Read-only PR watches are unchanged. An owner who enrolls a personal repository with `/cron pr-add` in an authorized Discord parent channel opts into tool-free static review and a GitHub comment. Fix commits and protected merges require a higher mode or a fresh command for the reviewed SHA. Older discovery-only registrations stay manual. Read the [PR intake guide](https://github.com/dbc-hbin/omp-superagent/blob/v0.1.8/docs/OPERATIONS.md#새-외부-pr-검토-cron-pr-add) before enrolling a private repository (#46).
6
+ - **Discord addressing and progress.** With `discord.requireAddressing` enabled, ordinary owner messages in threads created by someone else need a bot mention or a reply to the bot, just like shared parent channels. Bot-created threads and owner DMs keep their existing behavior. Set `discord.editProgressInPlace` to edit one progress message per request; the default keeps separate posts, and the final answer is always separate. Reports render tables as labeled rows, supported cards as embeds when permitted, and lane titles reflect the final state (#37, #39, #40, #48).
7
+ - **Scheduled shell commands are disabled.** Use `/cron add` for scheduled HEAD prompts with normal approval checks. Legacy direct-shell jobs can be inspected or removed but are not run, replayed as prompts, or allowed to send pending shell output. Check any previously started shell job on its original host before resolving it (#44).
8
+ - **OMP and Host startup.** CI and the published SDK now use stock OMP **19.1.1**. Hosts check the installed CLI's capabilities rather than requiring an exact version. Startup reuses unchanged CLI inspection and combines discovery with preparation. Preset changes are monitored without reloading unchanged settings, including when a watched configuration is replaced on macOS (#42, #43).
9
+
10
+ Thanks to [@gimso2x](https://github.com/gimso2x) and [@Momentum96](https://github.com/Momentum96) for contributions to this release.
11
+
12
+ ## Install or upgrade
13
+
14
+ ```sh
15
+ bun add --global --trust omp-superagent@0.1.8
16
+ omp-sa --help
17
+ ```
18
+
19
+ Alternatively, use `npm install --global omp-superagent@0.1.8` with Bun 1.4.4 or later on `PATH`. The npm package includes the native Host owner and Gateway for macOS and Linux on arm64 and x64. OMP is installed separately. Installing the package does not restart a running Gateway.
20
+
21
+ [Changes since 0.1.7](https://github.com/dbc-hbin/omp-superagent/compare/v0.1.7...v0.1.8) · [Operations guide](https://github.com/dbc-hbin/omp-superagent/blob/v0.1.8/docs/OPERATIONS.md)
@@ -0,0 +1,18 @@
1
+ # omp-superagent 0.1.9
2
+
3
+ - **Change the model for a Discord work thread.** Open `/model` and select HEAD or the lane bound to that thread. A verified lane quota failure pauses that lane's queue and notifies the original conversation without starting a HEAD turn or replaying the failed request. OMP's temporary retry fallback does not overwrite the lane's configured choice (#50).
4
+ - **A tool-free HEAD failure no longer stalls the queue.** When the exact native journal proves the request failed before any tool started, HEAD can close it without replay and move on. Quota failures still require recovery evidence. For uncertain effects, the notice identifies the exact `/resolve <input-id>` to use after checking what happened (#54).
5
+ - **Discord now uses `/usage-reset`.** `/usage` is read-only and takes no options. `/usage-reset` opens the account picker; spending a ticket still requires confirmation. Telegram and Slack command syntax is unchanged. Reopened lane work sends progress and the final answer to the original work thread while keeping the original approval route (#52, #53).
6
+ - **Native Gateway handles more I/O.** Avatar updates, messenger command registration, SSH relay, and attachment staging move to Rust. Inbound attachments are staged in a private directory and checked against Gateway receipts before use. The npm package still includes native binaries for macOS and Linux on arm64 and x64.
7
+ - **Current omp-superkit layouts install cleanly.** Managed setup checks canonical `super` and `super-*` skills and their command pointers while preserving valid legacy revisions.
8
+
9
+ ## Install or upgrade
10
+
11
+ ```sh
12
+ bun add --global --trust omp-superagent@0.1.9
13
+ omp-sa --help
14
+ ```
15
+
16
+ Alternatively, use `npm install --global omp-superagent@0.1.9` with Bun 1.4.4 or later on `PATH`. OMP is installed separately; CI uses stock OMP 19.1.1. Installing does not restart a running Gateway. Before re-registering Discord commands, update both Gateway and HEAD, then check that Discord `/help` lists `/usage-reset`.
17
+
18
+ [Changes since 0.1.8](https://github.com/dbc-hbin/omp-superagent/compare/v0.1.8...v0.1.9) · [Operations guide](https://github.com/dbc-hbin/omp-superagent/blob/v0.1.9/docs/OPERATIONS.md)
Binary file
Binary file
Binary file
@@ -1,5 +1,6 @@
1
1
  anyhow-1.0.104: MIT OR Apache-2.0
2
2
  base64-0.22.1: MIT OR Apache-2.0
3
+ bitflags-2.13.2: MIT OR Apache-2.0
3
4
  bytes-1.12.2: MIT
4
5
  cfg-if-1.0.5: MIT OR Apache-2.0
5
6
  equivalent-1.0.3: Apache-2.0 OR MIT
@@ -15,6 +16,7 @@ mio-1.2.5: MIT
15
16
  pin-project-lite-0.2.18: Apache-2.0 OR MIT
16
17
  proc-macro2-1.0.107: MIT OR Apache-2.0
17
18
  quote-1.0.47: MIT OR Apache-2.0
19
+ rustix-1.1.6: Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT
18
20
  serde-1.0.229: MIT OR Apache-2.0
19
21
  serde_core-1.0.229: MIT OR Apache-2.0
20
22
  serde_derive-1.0.229: MIT OR Apache-2.0
@@ -1,5 +1,6 @@
1
1
  anyhow-1.0.104: https://static.crates.io/crates/anyhow/anyhow-1.0.104.crate
2
2
  base64-0.22.1: https://static.crates.io/crates/base64/base64-0.22.1.crate
3
+ bitflags-2.13.2: https://static.crates.io/crates/bitflags/bitflags-2.13.2.crate
3
4
  bytes-1.12.2: https://static.crates.io/crates/bytes/bytes-1.12.2.crate
4
5
  cfg-if-1.0.5: https://static.crates.io/crates/cfg-if/cfg-if-1.0.5.crate
5
6
  equivalent-1.0.3: https://static.crates.io/crates/equivalent/equivalent-1.0.3.crate
@@ -15,6 +16,7 @@ mio-1.2.5: https://static.crates.io/crates/mio/mio-1.2.5.crate
15
16
  pin-project-lite-0.2.18: https://static.crates.io/crates/pin-project-lite/pin-project-lite-0.2.18.crate
16
17
  proc-macro2-1.0.107: https://static.crates.io/crates/proc-macro2/proc-macro2-1.0.107.crate
17
18
  quote-1.0.47: https://static.crates.io/crates/quote/quote-1.0.47.crate
19
+ rustix-1.1.6: https://static.crates.io/crates/rustix/rustix-1.1.6.crate
18
20
  serde-1.0.229: https://static.crates.io/crates/serde/serde-1.0.229.crate
19
21
  serde_core-1.0.229: https://static.crates.io/crates/serde_core/serde_core-1.0.229.crate
20
22
  serde_derive-1.0.229: https://static.crates.io/crates/serde_derive/serde_derive-1.0.229.crate