omp-superagent 0.1.6 → 0.1.8

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 (90) hide show
  1. package/DESIGN.md +36 -20
  2. package/README.ko.md +140 -33
  3. package/README.md +165 -41
  4. package/THIRD_PARTY_NOTICES.md +9 -7
  5. package/config.example.json +3 -1
  6. package/docs/OPERATIONS.md +395 -157
  7. package/docs/design/execution.md +156 -22
  8. package/docs/design/messaging.md +258 -52
  9. package/docs/discord-voice.md +8 -4
  10. package/docs/releases/0.1.7.md +25 -0
  11. package/docs/releases/0.1.8.md +21 -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/omp-host-owner-darwin-arm64 +0 -0
  17. package/host-owner/bin/omp-host-owner-darwin-x64 +0 -0
  18. package/host-owner/bin/omp-host-owner-linux-arm64 +0 -0
  19. package/host-owner/bin/omp-host-owner-linux-x64 +0 -0
  20. package/package.json +9 -9
  21. package/scripts/ci.ts +4 -4
  22. package/scripts/test-omp.sh +2 -1
  23. package/skills/head/SKILL.md +26 -5
  24. package/skills/head/references/routing.md +68 -33
  25. package/skills/head/references/supervision.md +20 -4
  26. package/skills/lane/references/workflow.md +16 -7
  27. package/src/board.ts +5 -3
  28. package/src/cli.ts +161 -19
  29. package/src/config.ts +21 -1
  30. package/src/contracts.ts +63 -8
  31. package/src/cron-jobs.ts +443 -19
  32. package/src/cron-pr-intake.ts +257 -0
  33. package/src/discord-markdown.ts +350 -123
  34. package/src/extension.ts +78 -13
  35. package/src/gateway-client.ts +8 -2
  36. package/src/head-quota.ts +80 -0
  37. package/src/head-recovery.ts +40 -1
  38. package/src/host-extension.ts +122 -4
  39. package/src/host-inventory-manifest.ts +2 -2
  40. package/src/host-protocol.ts +11 -0
  41. package/src/host-sdk-helper.ts +121 -12
  42. package/src/host.ts +175 -57
  43. package/src/installed-omp.ts +116 -4
  44. package/src/lane-rows.ts +44 -4
  45. package/src/lane-watch.ts +339 -0
  46. package/src/managed-memory-helper.ts +13 -10
  47. package/src/managed-memory.ts +62 -27
  48. package/src/managed-ulw-probe.ts +75 -20
  49. package/src/managed-ulw.ts +174 -21
  50. package/src/messenger-command-catalog.json +2 -2
  51. package/src/native-launch-profile.ts +4 -2
  52. package/src/native-presets.ts +32 -5
  53. package/src/native-sessions.ts +3 -1
  54. package/src/native-settings.ts +47 -9
  55. package/src/observation-request.ts +23 -0
  56. package/src/omp-usage.ts +254 -36
  57. package/src/pr-github-schema.ts +5 -1
  58. package/src/pr-github.ts +68 -19
  59. package/src/pr-intake-automation.ts +316 -0
  60. package/src/pr-intake-comment.ts +226 -0
  61. package/src/pr-intake-fix.ts +233 -0
  62. package/src/pr-intake-github.ts +480 -0
  63. package/src/pr-intake-material.ts +230 -0
  64. package/src/pr-intake-mode.ts +59 -0
  65. package/src/pr-intake-review.ts +397 -0
  66. package/src/pr-intake-tree.ts +69 -0
  67. package/src/pr-intake-work.ts +29 -0
  68. package/src/pr-watch.ts +91 -32
  69. package/src/runtime.ts +2702 -391
  70. package/src/setup-judge.ts +1 -1
  71. package/src/setup.ts +12 -16
  72. package/src/store.ts +429 -86
  73. package/src/topic-history.ts +243 -47
  74. package/src/worker-checkout.ts +106 -0
  75. package/src/worker-destination.ts +10 -0
  76. package/src/worker-doctor.ts +66 -0
  77. package/src/worker-enrollment.ts +165 -0
  78. package/src/worker-host.ts +180 -0
  79. package/src/worker-ledger.ts +188 -0
  80. package/src/worker-placement.ts +78 -0
  81. package/src/worker-profile.ts +274 -0
  82. package/src/worker-registration.ts +288 -0
  83. package/src/worker-repository.ts +233 -0
  84. package/src/worker-request.ts +74 -0
  85. package/src/worker-service.ts +230 -0
  86. package/src/worker-stdio.ts +61 -0
  87. package/src/worker-trust.ts +36 -0
  88. package/src/worker-wire.ts +204 -0
  89. package/src/workflow.ts +81 -32
  90. package/src/setup-memory.ts +0 -21
@@ -23,6 +23,39 @@ topic is a binding key, not a fabricated conversation or thread ID.
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
25
 
26
+ Set `discord.requireAddressing` to `true` to filter ordinary owner messages in
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.
36
+ The owner, guild and parent-channel checks still apply. Owner DMs, Discord
37
+ application commands, approval components and restricted group rooms retain
38
+ their existing policies.
39
+
40
+ The Gateway records pending owner-message candidates before advancing the
41
+ Discord WebSocket sequence. Until it verifies the sender and route, it keeps
42
+ only lookup coordinates and revision evidence, not message or attachment
43
+ content. A reply lookup can be retried; it must not substitute a newer edit
44
+ or replay a voice command. The head pins a failed Discord history scan to its
45
+ original cursor so that later live messages cannot hide the missed interval.
46
+
47
+ ### Account presence
48
+
49
+ `messenger_presence` controls only the authenticated bot on the original owner's
50
+ messenger. On Discord the existing supervised socket writes the requested status
51
+ with no activity payload or privileged member presence subscription. Explicit
52
+ stop sets invisible; it does not close the socket or stop intake. With no request,
53
+ the Gateway does not override the platform default. The desired setting survives
54
+ reconnect/restart; a current socket write is not a remote readback of the dot.
55
+ Presence is not HEAD readiness, message delivery or lane progress. The Slack
56
+ Events API bot indicator is configured in app settings; Telegram's Bot API does
57
+ not offer this operation. No personal credentials or second client are used.
58
+
26
59
  ## Restricted group rooms
27
60
 
28
61
  `groupRooms` opts a specific server/workspace/chat and parent channel into a
@@ -106,6 +139,27 @@ barrier or selected priority owner controls (`/restart`, `/stop`, `/stop head`);
106
139
  ordinary intake keeps its order. After the first approval barrier, a head outage
107
140
  does not close Gateway admission. Reconnecting does not replay already submitted work.
108
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
+
109
163
  Telegram persists its per-bot offset after admission and acknowledges it with the
110
164
  next `getUpdates`. There is no Bot API history fetch; recovery cannot exceed its
111
165
  24-hour update retention. Omit the previous offset after 24 hours of inactivity,
@@ -126,6 +180,21 @@ remain held. Recovery cannot dispatch, answer approvals, run tools outside its
126
180
  gate or repeat the original request. A later stop or manual resolution invalidates
127
181
  older recovery work.
128
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
+
129
198
  `/resolve [input-id]` (`!resolve` in Slack) manually closes an uncertain head
130
199
  input as cancelled. A stalled lane exposes its exact input ID and queue blocker
131
200
  through `/status` or `lane_inspect`. Only the operator in the bound topic can use
@@ -135,24 +204,60 @@ See the [operations guide](../OPERATIONS.md#4-명령과-일상-사용) for comma
135
204
 
136
205
  ## Topic routing and controls
137
206
 
138
- - The head **controller** receives ordinary input; its **model** does not. Each
139
- authenticated original records its intended topic owner at admission. The
140
- controller creates a source-bound handoff to that session. A new topic may reuse a
141
- workspace, never another topic's transcript. The controller matches repository or
142
- directory names in owner text against placed lanes of the same authenticated channel
143
- or DM. A reply to a placed original or a sent message on its physical route supplies
144
- that task's workspace; the quote body is not evidence. `/new` in a bound thread can
145
- reuse that thread's workspace. An explicit `cwd: /absolute/path` takes precedence.
146
- With no unique existing directory, ask on the original route; a known name or absolute
147
- path selects just one pending original. Neither an edited confirmation nor a stale
148
- answer to the workspace question becomes another task. A Slack reply uses the sent question's root timestamp.
149
- A retrospective request with a task description can search previous managed native
207
+ - The head **controller** admits authenticated owner inputs and preserves their
208
+ original source and route. Ordinary messages in a bound topic continue its
209
+ native session and journal; input for an opening topic stays with that
210
+ placement. Neither needs a turn in the shared model.
211
+ - Other ordinary unbound inputs go to the shared HEAD model as original,
212
+ source-bound requests, even if the text names a repository. HEAD answers
213
+ questions that need no workspace directly. For repository work, it uses scoped
214
+ evidence from the owner's request and context to discover and verify a directory
215
+ before dispatch. It asks a focused question only if a material ambiguity remains.
216
+ Neither a default repository nor the last active lane or chat is evidence of
217
+ intent. If the original route is an unbound Discord thread, use that thread for
218
+ any assigned work; create a sibling only on explicit request.
219
+ An implicit workspace question left over from an older release is not a
220
+ session binding. A follow-up can reference a single unstarted request in its
221
+ current Discord thread or DM, or by replying to the exact sent question
222
+ (including its Slack root timestamp). Submission rechecks that it is still
223
+ awaiting placement; neither its excerpt nor hints based on it are reused
224
+ after placement or cancellation. An exact workspace selection still answers
225
+ the original question without replay.
226
+ - Where there are eligible managed sessions, ordinary HEAD routing automatically
227
+ checks relevant original owner text against scoped Mnemopi recall and a bounded
228
+ search of authorized native journals. The read-only pass adds only matching
229
+ lane, workspace, and session coordinates to the HEAD input, never raw
230
+ recall results or journal excerpts. Matches do not dispatch work, authorize
231
+ approvals, or reopen a session. If recall is unavailable, direct journal
232
+ matches can still inform HEAD; a missing hint does not block ordinary chat.
233
+ Advisory lookup applies to new turns; a follow-up already eligible to steer
234
+ has a verified destination and does not wait for recall. HEAD verifies useful
235
+ leads or asks only if material ambiguity remains. Native file and model
236
+ references in historical data are inert, unlike references in the current
237
+ owner's task.
238
+ - Explicit `cwd: /absolute/path`, `/new` with a task, an exact reply to a placed
239
+ original or its delivered message with a verified workspace, and intentional
240
+ historical lookup use controller placement. Invalid explicit cwd is rejected,
241
+ not sent to HEAD as ordinary input. A new topic may reuse a workspace, never
242
+ another topic's transcript. The quote body is not placement evidence; `/new`
243
+ in a bound thread can reuse that thread's workspace. When explicit placement
244
+ needs workspace clarification, a known name or absolute path selects just one
245
+ pending original on its original route. Neither an edited confirmation nor a
246
+ stale answer becomes another task. A Slack reply uses the sent question's root timestamp.
247
+ - A retrospective request with a task description can search previous managed native
150
248
  sessions across the configured owner's currently allowed channels. Search the
151
- operator's text, not reply bodies or attachments. Restricted group rooms, HEAD,
152
- other bot accounts and unrelated local OMP sessions are not candidates. Natural
249
+ operator's text, not reply bodies, pasted commands or attachments. Telegram
250
+ quote and code entities are excluded from lookup, not from the delivered
251
+ message. Older Telegram records without a verified prose view cannot supply
252
+ that evidence. For a manager-opened session, verify the live account on the
253
+ original route as well as the destination, and match the opening request's own
254
+ completed native receipt even if another input steered the run. Restricted
255
+ group rooms, HEAD, other bot accounts and unrelated local OMP sessions are not candidates. Natural
153
256
  language dates refer to the original request timestamp, using UTC calendar boundaries.
154
- The controller first calls the live head extension's public `ctx.memory.search`:
155
- with Mnemopi this runs the same scoped lookup (`recallResultsScoped`) as OMP's
257
+ Unlike ordinary advisory routing, this path requires active, searchable Mnemopi
258
+ on the live head. Another enabled backend can satisfy managed startup but is not
259
+ a substitute for this search. The controller calls the head extension's public `ctx.memory.search`,
260
+ which runs the same scoped lookup (`recallResultsScoped`) as OMP's Mnemopi
156
261
  `recall` tool. The head does not run a model turn or save a memory. A memory
157
262
  hit is a search hint, never a routing decision. Combine corroborated memory
158
263
  hits with direct matches on active branches of eligible journals. A successful
@@ -191,7 +296,7 @@ See the [operations guide](../OPERATIONS.md#4-명령과-일상-사용) for comma
191
296
  their existing topic behavior.
192
297
  - `/head <request>` explicitly addresses the shared coordination model (Slack:
193
298
  `!head` or `/superagent-head`). Its manager handoffs keep the original review
194
- path. Ordinary topic commentary and final answers instead pass through the
299
+ path. Bound-topic commentary and final answers instead pass through the
195
300
  controller's source-bound outbox without a synthesis turn. Approval cards
196
301
  also stay with their original native session and authorized route.
197
302
  - Thread-first work sends a short kickoff to the selected topic. The durable
@@ -202,13 +307,26 @@ See the [operations guide](../OPERATIONS.md#4-명령과-일상-사용) for comma
202
307
  input context without altering previous bindings, approvals or work. Topic
203
308
  boundaries are durable; redelivery uses the original binding and editing an
204
309
  admitted control cannot move its boundary. Ordinary edits are new revisions,
205
- not rollback of effects.
206
- - For an active native run, eligible ordinary same-route follow-ups use native
207
- `steer`. Match the full route including account, authority, thread and topic;
208
- controls, internal reports and workflow selection do not join the run. Keep
209
- each source, receipt and outcome binding; jointly handled inputs produce one
210
- result for the cohort. A lane still needs explicit `lane_message`; pause,
211
- approval, compaction and uncertainty gates still apply.
310
+ not rollback of effects. A DM edit whose original request was placed by HEAD
311
+ reuses that verified lane, even if a newer topic is now active. If placement
312
+ is still in progress or cannot be verified, the edit creates no topic.
313
+ - Ordinary follow-ups default to native `steer` when their destination has an
314
+ eligible active run: unbound requests and ordinary `/head` text go to HEAD;
315
+ ordinary replies in a bound work thread go to its lane without `lane_message`.
316
+ If a follow-up arrives before the native start event, that event rechecks
317
+ pending inputs. An idle destination receives a new prompt.
318
+ Match the full route including account, authority, thread and topic. A bound
319
+ reply can join the kickoff initiated elsewhere only if the existing verified
320
+ delivery route is this exact thread. A manager handoff keeps its HEAD review
321
+ mode, with the verified reply route fixed for the joined run, including logical
322
+ topics backed by native threads. Keep each source and native receipt distinct
323
+ and deliver one result for a jointly handled cohort. History lookup verifies
324
+ a joined reply's topic ownership and its own completed native receipt, not the
325
+ manager's instructions or completion.
326
+ Controls, internal reports and workflow selection do not join the run.
327
+ Pause, approval, compaction and uncertainty gates still apply. Durable intake
328
+ and RPC admission do not prove consumption: OMP consumes steers at native
329
+ boundaries, and a run can settle before a follow-up reaches such a boundary.
212
330
 
213
331
  | Platform | Command and topic representation |
214
332
  | --- | --- |
@@ -221,7 +339,7 @@ is a separate explicit apply, not a side effect of setup, doctor or start. Comma
221
339
  intake must not wait for a model; Discord's ephemeral admission reply and Slack's
222
340
  Socket Mode acknowledgement are not the actual command result.
223
341
 
224
- The head sends model and effort menus through its normal outbox. The Gateway
342
+ The head sends model, effort, and saved-reset menus through its normal outbox. The Gateway
225
343
  renders native components and binds each click to the owner, exact sent card,
226
344
  physical conversation, and displayed page. Navigation and cancellation only
227
345
  edit the card. One final click admits an ordinary durable control receipt on
@@ -233,6 +351,33 @@ on the same route.
233
351
  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);
234
352
  the catalogue and mutation remain native OMP, and no upstream picker code is used.
235
353
 
354
+ `/usage reset` chooses an exact linked account from the configured OMP profile.
355
+ The first click only changes the displayed card revision; Confirm on that
356
+ revision is the only action that admits a reset request. Cancel closes the card
357
+ without admitting any request. The head checks the original sent card and live
358
+ availability, then persists the attempt before asking the installed CLI to
359
+ redeem one currently usable ticket on that account. The native CLI selects
360
+ the ticket; the chat card does not authorize or pin an individual grant.
361
+ Duplicate or interrupted attempts are never replayed. Native success is
362
+ recorded before checking the refreshed balance; a missing receipt never
363
+ implies the ticket was or was not spent. An uncertain attempt holds further
364
+ redemptions for a matching or indistinguishable provider account, even after
365
+ re-login changes the local row or adds identity fields. The operator must check
366
+ the balance and close the original hold with `/resolve` (`!resolve` in Slack).
367
+ Banked tickets that cannot currently be spent are reported separately from
368
+ the selectable accounts, without a Confirm action.
369
+ An admitted reset holds restart handoff until its outcome is durably recorded.
370
+ Account options show the native selector number and, when available, a short
371
+ masked account or organization hint; raw identities never enter the card.
372
+ Capability is checked against the configured binary's `omp usage --help`.
373
+ The adapter expects a read-only `usage reset --json` list and a separate
374
+ `usage reset <provider>/<credential id>` redemption. The
375
+ [OMP 19.0.0 CLI source](https://github.com/can1357/oh-my-pi/blob/57771ae562b9345e0579bceb2d68d585e3e6927e/packages/coding-agent/src/cli/usage-cli.ts)
376
+ and previously inspected 19.1.0 CLI are dated references for this command shape,
377
+ not the [current SDK baseline](../../DESIGN.md#stock-omp-and-verification-scope).
378
+ Older executables without the exact-target command show an unsupported state;
379
+ there is no provider fallback or mutation of local quota counters.
380
+
236
381
  Thread capability comes from the authenticated adapter. Permission or network
237
382
  failure is not permission to fall back to another destination. Preserve the
238
383
  original binding when creating a sibling topic and journal creation intent before
@@ -242,23 +387,38 @@ permissions, then reads back title, tags or archived state. Exact tag IDs and
242
387
  required/moderated tag policy apply. Archiving a thread does not pause its lane,
243
388
  and reopening it does not resume it.
244
389
 
245
- For a bound Discord work thread, an owned native run adds `⏳` to the title;
246
- verified `lane_close` completion replaces it with `✅`. Native settlement alone
247
- does not mark work complete. Pausing clears the working marker and cancelling
248
- clears either marker. Resumed work gets the working marker again when it runs.
249
- The head reads the current title and updates its prefix through the same
250
- authorized thread API. These edits need Manage Threads, are best effort, and
251
- skip archived threads. They do not change tags, archive state, or lane execution.
252
-
253
- `/help`, `/status`, `/context` and `/usage` are code-handled reads with no model
254
- turn. [`/usage`](../../src/omp-usage.ts) invokes the configured executable and
255
- profile with `usage --json --redact --no-extensions` and projects provider quota
256
- and reset data, without sending account identifiers or raw responses. Unknown
257
- quota is not zero or an estimate of this session's usage. `/compact` uses native
390
+ For a bound Discord work thread, an owned run or queued lane input adds `⏳`
391
+ to the title. Outstanding inputs, approvals, or result delivery can keep that
392
+ marker. After the latest run succeeds and its final reply is confirmed sent,
393
+ the head automatically replaces it with `✅`. This marks the delivered request,
394
+ not independent verification of its acceptance criteria or closure of the lane.
395
+ Explicit `lane_close` completion also shows `✅`; pause and cancellation remove
396
+ the marker. A follow-up replaces the check with `⏳` again.
397
+
398
+ When startup recovery allows writes, the head reconciles managed work threads
399
+ from stored run and delivery receipts without launching unloaded lanes. It changes only the
400
+ prefix through the authorized thread API. Edits are best effort, require
401
+ Manage Threads, and skip archived threads. A confirmed Discord rate limit
402
+ defers reconciliation and rechecks current state before the next write;
403
+ an ambiguous write is not retried.
404
+
405
+ `/help`, `/status`, `/context` and `/usage` are code-handled reads with no model turn.
406
+ [`/usage`](../../src/omp-usage.ts) invokes the configured executable and
407
+ profile with `usage --json --redact`, so OMP discovers built-in and extension-provided
408
+ usage sources. Both usage and reset preserve explicit `--no-extensions`,
409
+ `--extension`, `--hook` and `--config` inputs from the configured launch command.
410
+ Neither subprocess receives the Gateway bearer or configured messenger credentials.
411
+ The reply includes safe OMP-masked account names when available, never full
412
+ email addresses, raw IDs, or raw responses. Unrecognized meter names use
413
+ numbered labels rather than publishing provider-controlled text.
414
+ Unknown quota is not zero or an estimate of this session's usage. `/compact` uses native
258
415
  compaction and requires an idle eligible head; status and priority stop remain
259
- available while it runs. `/stop` pauses the bound lane. In an unbound topic it
260
- cancels work awaiting workspace clarification, or stops head work when there
261
- is no such request. Use `/stop head` or a lane ID to name a target. Once admitted to the
416
+ available while it runs. `/stop` pauses the bound lane. In an unbound topic a
417
+ reply can select the exact pending placement or the running HEAD request on
418
+ that route. If the bare command could mean either, or the referenced physical
419
+ message's revisions do not identify one target, report the ambiguity on the
420
+ original route instead of cancelling one by guesswork. Use `/stop head` for
421
+ the global control, or name a lane ID to pause it. Once admitted to the
262
422
  head, priority controls and approval answers do not wait for an ordinary model
263
423
  turn to finish. [Restart](../../DESIGN.md#explicit-restart)
264
424
  is distinct from stopping a task or resuming a topic. `/cron` controls
@@ -335,9 +495,12 @@ approval.
335
495
  not a second copy of the file.
336
496
  - Long outputs use a single bounded text attachment where supported. Discord
337
497
  first splits an over-limit reply at paragraph, line, then space boundaries
338
- into at most five ordered messages, closing and reopening a code fence that
339
- crosses a boundary; only the first replies to the original message, each part
340
- has its own nonce, and the first message ID is the delivery receipt. For newly
498
+ into at most five ordered messages of up to 2,000 UTF-16 units, closing and
499
+ reopening a code fence that crosses a boundary. Rendered table fields stay
500
+ whole across message boundaries; when a field cannot fit, the bounded text
501
+ attachment preserves its Markdown rather than cutting through it.
502
+ Only the first message replies to the original. Each part has its own nonce,
503
+ and the first message ID is the delivery receipt. For newly
341
504
  completed multipart sends the Gateway also records later message IDs for scoped
342
505
  reply lookup; partial or uncertain sends are not workspace evidence. The Gateway has
343
506
  25 seconds for the whole Discord output, including destination lookup,
@@ -345,23 +508,66 @@ approval.
345
508
  No new parts are posted after that deadline. An in-flight POST at expiry or
346
509
  a failure after a visible part is uncertain; nothing is resent. Slack
347
510
  uses upload URL → bytes → `files.completeUploadExternal`, not `files.upload`.
348
- Telegram and Slack do not automatically retry remote mutations. Discord formats
349
- pipe tables as fixed-width code blocks at delivery, preserving the stored
350
- original. [Delivery classification](../../src/delivery.ts) distinguishes
511
+ Telegram and Slack do not automatically retry remote mutations. Discord renders
512
+ ordinary Markdown pipe tables at delivery as stacked list items, with the
513
+ column labels and each row's values on separate lines. This leaves links,
514
+ emphasis and inline code available to Discord's Markdown renderer and lets
515
+ prose wrap naturally. Existing code blocks and stored output are unchanged.
516
+ [Delivery classification](../../src/delivery.ts) distinguishes
351
517
  definite rejection from uncertainty across the IPC boundary.
352
518
  - Receipt/working reactions are best-effort decorations bound to the real
353
519
  source message. They neither delay nor prove admission, execution or delivery.
354
520
  Progress reports are coalesced before submission where safe; a final result
355
521
  takes precedence over undelivered progress. Already started external sends
356
522
  cannot be recalled.
523
+ - Pending outbox delivery runs concurrently across distinct physical routes
524
+ (platform, account, authority, guild, channel, thread) while preserving
525
+ strict sequence order within each physical route and never automatically
526
+ retrying uncertain sends. Routes wake as soon as outputs become pending
527
+ without waiting behind an unrelated command tail; restart checkpoints still
528
+ wait for all in-flight route deliveries to settle before lifecycle handoff.
529
+ - In-place editing of Discord progress reports is opt-in via
530
+ `discord.editProgressInPlace` (default `false`). By default, every progress
531
+ update and HEAD lane progress summary posts as an ordinary new message so
532
+ progress history stays visible. When enabled on Discord, nonterminal progress
533
+ for one request—including direct HEAD progress, direct topic progress, and
534
+ HEAD summaries of non-topic lane progress keyed by the original lane input—uses
535
+ a single `⏳` status message edited in place (`⏳\n` when the body begins
536
+ with a code fence so card fences remain intact). Each update stays its own
537
+ immutable output with `status: true`; initial long status messages use the
538
+ single-message text attachment fallback instead of splitting across multiple
539
+ posts so later edits replace that single message cleanly. When an update is
540
+ claimed for delivery, the controller fixes `editOf` to the physical message of
541
+ the stream's first confirmed post and persists it with the output, so a
542
+ redelivery edits that same message. An uncertain post never becomes an edit
543
+ target. A rejected edit fails only that update and is never reposted; it
544
+ releases the target so a later update posts a fresh status message. An
545
+ ambiguous edit stays uncertain. Final answers and lane completion reports are
546
+ still separate new messages. Telegram and Slack always post ordinary progress
547
+ messages; the Gateway rejects `editOf` and `status: true` outside Discord.
548
+ - Discord turns a fenced ```` ```card ```` [json-render](https://github.com/vercel-labs/json-render)
549
+ spec (`{"root", "elements"}`, root `Card`; `Card`, `Section`, `Text`,
550
+ `Fields`, `Field`, `Table`, `Divider`, `Image`) into an embed at delivery.
551
+ Table content becomes an aligned code block in the embed description. In a
552
+ guild or thread, only use embeds when the bot has verified Embed Links
553
+ permission at the parent channel; otherwise send the original fence as text.
554
+ An Image needs a valid HTTPS URL. A spec that is
555
+ invalid, uses another component, reuses an element or exceeds Discord's embed
556
+ limits stays verbatim as its code block, which is also what Telegram and Slack
557
+ show. The [Rust renderer](../../gateway/src/discord/embeds.rs) and
558
+ [`extractDiscordCards`](../../src/discord-markdown.ts) share one
559
+ [fixture](../../test/fixtures/discord-cards.json).
357
560
 
358
561
  ## Discord voice
359
562
 
360
563
  [Discord voice](../../gateway/src/discord_voice.rs) is optional Gateway functionality,
361
564
  separate from voice attachments or the head model. A fresh original owner
362
- `/voice start` in the configured text channel can open one bounded OpenAI Live
363
- conversation in the configured voice channel. Use channel permissions to
364
- exclude other participants. Edits, catch-up and restart cannot open or resume it.
565
+ `/voice start` in the configured guild text channel outside a restricted group
566
+ room can open one bounded OpenAI Live conversation in the configured voice
567
+ channel. Use channel permissions to exclude other participants. Live voice
568
+ controls do not require a bot mention when `discord.requireAddressing` is
569
+ enabled; confirmation still requires the exact active draft reply. Edits,
570
+ catch-up and restart cannot open or resume a call.
365
571
 
366
572
  In subscription mode the [Rust Gateway](../../gateway/src/discord_voice/subscription.rs)
367
573
  uses the installed Codex CLI to verify the active subscriber, then sends audio via
@@ -379,8 +585,8 @@ cancels still-queued posts and invalidates unconfirmed drafts without waiting fo
379
585
  ordinary intake; requests already transmitted cannot be recalled. Neither start
380
586
  command submits or approves work. Only the owner's written
381
587
  `/voice confirm` as a reply to the active draft enters normal durable head
382
- intake; normal approval rules still apply. Head replies stay in normal Discord
383
- text delivery, with no return path to Live. The Gateway stores no recordings
588
+ intake; normal routing and approval rules still apply. Replies stay in normal
589
+ Discord text delivery, with no return path to Live. The Gateway stores no recordings
384
590
  or full voice transcript; drafts are visible in Discord and confirmed tasks and
385
591
  replies use existing records.
386
592
  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,25 @@
1
+ # omp-superagent 0.1.7
2
+
3
+ - **Control the Discord bot’s online indicator from chat.** Ask the bot to stay online, show its presence, or turn the indicator off without disconnecting it. The response distinguishes the requested setting from the value sent on the current connection; neither proves what a remote user sees. Slack Socket Mode bots and Telegram bots cannot use this control (#35).
4
+ - **Watch a PR or its CI from the original conversation.** Give HEAD a GitHub PR URL or `owner/repo#number`. The first check establishes a baseline; later changes notify the registering conversation. The default interval is five minutes. A watch never merges a PR or retries CI (#35).
5
+ - **Watch a managed lane without changing its work.** Request notifications for recorded progress, holds, failures, or closure. Stopping notifications does not pause or cancel the lane, and silence alone is not reported as a stall (#35).
6
+ - **Shorter CI.** The release gate runs the SDK-matched stock OMP on Ubuntu and macOS. OMP 18 remains available for manual compatibility checks; all four native package install checks remain required (#35).
7
+ - **Use the SUPER workflow names.** Start an authorized request with `super`, `super-plan`, `super-run`, `super-loop`, `super-research`, or `super-graph`. These are the public commands in [omp-superkit](https://github.com/dbc-hbin/omp-superkit/commit/c11a6e4e185f9c31f484a05a13528ef724337bc1); quoted examples and lane reports do not select a workflow.
8
+ - **Run a lane on an enrolled SSH worker.** The head can open a lane at an approved checkout revision and reconnect to the same OMP session. Approvals and results stay on the original conversation. Enrollment requires confirmation on both machines; no system SSH server or background GUI launcher is installed. See the [worker setup guide](https://github.com/dbc-hbin/omp-superagent/blob/v0.1.7/README.md#add-a-remote-worker) (#31, #34).
9
+ - **Check worker enrollment and connectivity.** `omp-sa worker list --config FILE` reads the local inventory without connecting. `omp-sa worker doctor USER@HOST[:PORT] --config FILE` diagnoses the enrolled destination. For a non-default port, enroll with that port and verify the corresponding `[host]:port` host key (#34).
10
+ - **Address the bot explicitly in shared Discord channels.** Set `discord.requireAddressing` to `true` to accept an owner message in a shared parent channel only when it mentions the bot or replies to a verified bot message. The default is unchanged. Owner DMs and authorized threads do not require a mention; an edit or reconnect does not elevate a restricted room to owner authority (#34).
11
+ - **Continue on the right thread.** Follow-ups in bound threads continue their existing work. New requests go to HEAD, which can use scoped memory and verified session history without replaying held work or transferring approvals (#28).
12
+ - **Keep the selected OMP memory backend.** An enabled native backend is preserved. When memory is off or unset, the integration defaults to Mnemopi only when the selected profile can be safely updated (#27).
13
+
14
+ Thanks to [Jay (@Momentum96)](https://github.com/Momentum96) for the original Discord addressing filter [#29](https://github.com/dbc-hbin/omp-superagent/pull/29) and the proposals for [remote lane parity (#30)](https://github.com/dbc-hbin/omp-superagent/pull/30), [worker diagnostics (#32)](https://github.com/dbc-hbin/omp-superagent/pull/32), and [macOS GUI workers (#33)](https://github.com/dbc-hbin/omp-superagent/pull/33). The GUI launcher is not part of this release.
15
+
16
+ ## Install or upgrade
17
+
18
+ ```sh
19
+ bun add --global --trust omp-superagent@0.1.7
20
+ omp-sa --help
21
+ ```
22
+
23
+ Alternatively, use `npm install --global omp-superagent@0.1.7` with Bun 1.4.4 or later on `PATH`. The package includes the Host owner and Gateway for macOS and Linux on arm64 and x64. Running managed sessions requires a separately installed OMP.
24
+
25
+ [Changes since 0.1.6](https://github.com/dbc-hbin/omp-superagent/compare/v0.1.6...v0.1.7) · [Operations guide](https://github.com/dbc-hbin/omp-superagent/blob/v0.1.7/docs/OPERATIONS.md)
@@ -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)
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.6",
3
+ "version": "0.1.8",
4
4
  "description": "One messenger-connected OMP head with independent work sessions",
5
5
  "license": "MIT",
6
6
  "author": "dbc-hbin",
@@ -33,8 +33,8 @@
33
33
  "build:owner": "bun --no-env-file scripts/build-host-owner.ts --owner",
34
34
  "build:native": "bun --no-env-file scripts/build-host-owner.ts",
35
35
  "check": "tsc --noEmit",
36
- "test": "bun run build:native && bun test test",
37
- "test:ci": "bun --no-env-file scripts/ci.ts",
36
+ "test": "bun run build:native && bun test --parallel=2 test",
37
+ "test:ci": "bun run build:native && bun --no-env-file scripts/ci.ts",
38
38
  "test:baseline": "bash scripts/test-omp.sh",
39
39
  "release": "bun --no-env-file scripts/release.ts",
40
40
  "start": "bun --no-env-file src/cli.ts start",
@@ -47,12 +47,12 @@
47
47
  "bun": ">=1.4.4"
48
48
  },
49
49
  "dependencies": {
50
- "@oh-my-pi/pi-ai": "19.0.0",
51
- "@oh-my-pi/pi-catalog": "19.0.0",
52
- "@oh-my-pi/pi-coding-agent": "19.0.0",
53
- "@oh-my-pi/pi-natives": "19.0.0",
54
- "@oh-my-pi/pi-tui": "19.0.0",
55
- "@oh-my-pi/pi-utils": "19.0.0",
50
+ "@oh-my-pi/pi-ai": "19.1.1",
51
+ "@oh-my-pi/pi-catalog": "19.1.1",
52
+ "@oh-my-pi/pi-coding-agent": "19.1.1",
53
+ "@oh-my-pi/pi-natives": "19.1.1",
54
+ "@oh-my-pi/pi-tui": "19.1.1",
55
+ "@oh-my-pi/pi-utils": "19.1.1",
56
56
  "@slack/web-api": "^8.3.0",
57
57
  "@sinclair/typebox": "^0.34.41",
58
58
  "abort-controller": "3.0.0",
package/scripts/ci.ts CHANGED
@@ -28,10 +28,10 @@ console.log(`CI: Bun ${Bun.version}; ULW ${ulw}`);
28
28
  const bun = [process.execPath, "--no-env-file"];
29
29
  const commands = [
30
30
  [...bun, "run", "check"],
31
- [...bun, "run", "build:native"],
32
- ["cargo", "build", "--locked", "--manifest-path", "gateway/Cargo.toml",
33
- "--example", "gateway-differential", "--example", "gateway-lifecycle-fixture"],
34
- [...bun, "test", "test"],
31
+ ["cargo", "test", "--locked", "--manifest-path", "host-owner/Cargo.toml"],
32
+ // Cargo's default test targets build the Gateway examples used by the Bun fixtures.
33
+ ["cargo", "test", "--locked", "--manifest-path", "gateway/Cargo.toml"],
34
+ [...bun, "test", "--parallel=2", "test"],
35
35
  ];
36
36
  for (const command of commands) {
37
37
  const child = Bun.spawn(command, {
@@ -40,4 +40,5 @@ if [[ $actual != "omp/${tag#v}" ]]; then
40
40
  echo "OMP release $tag reported '$actual'; refusing to test a different version." >&2
41
41
  exit 1
42
42
  fi
43
- PATH="$directory:$PATH" bun run test:ci
43
+ # The frozen source install above already built and staged both native binaries.
44
+ PATH="$directory:$PATH" bun --no-env-file scripts/ci.ts