omp-superagent 0.1.16 → 0.1.18

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 (47) hide show
  1. package/DESIGN.md +15 -12
  2. package/config.example.json +4 -1
  3. package/docs/OPERATIONS.en.md +119 -33
  4. package/docs/OPERATIONS.md +83 -23
  5. package/docs/design/execution.md +66 -17
  6. package/docs/design/messaging.md +134 -47
  7. package/docs/releases/0.1.17.md +10 -0
  8. package/docs/releases/0.1.18.md +10 -0
  9. package/gateway/bin/omp-gateway-darwin-arm64 +0 -0
  10. package/gateway/bin/omp-gateway-darwin-x64 +0 -0
  11. package/gateway/bin/omp-gateway-linux-arm64 +0 -0
  12. package/gateway/bin/omp-gateway-linux-x64 +0 -0
  13. package/host-owner/bin/omp-host-owner-darwin-arm64 +0 -0
  14. package/host-owner/bin/omp-host-owner-darwin-x64 +0 -0
  15. package/host-owner/bin/omp-host-owner-linux-arm64 +0 -0
  16. package/host-owner/bin/omp-host-owner-linux-x64 +0 -0
  17. package/package.json +1 -1
  18. package/skills/head/SKILL.md +2 -2
  19. package/skills/head/references/routing.md +17 -6
  20. package/src/config/config.ts +15 -0
  21. package/src/contracts.ts +49 -4
  22. package/src/cron/cron-jobs.ts +135 -92
  23. package/src/cron/cron-pr-intake.ts +18 -11
  24. package/src/extension.ts +15 -5
  25. package/src/gateway/gateway-client.ts +3 -1
  26. package/src/lane/workflow.ts +12 -6
  27. package/src/managed-super-probe.ts +21 -15
  28. package/src/messaging/messenger-command-catalog.json +1 -1
  29. package/src/messaging/messenger-commands.ts +8 -3
  30. package/src/messaging/slack-context.ts +50 -0
  31. package/src/omp/superkit-skills.ts +15 -2
  32. package/src/pr/pr-intake-order.ts +62 -0
  33. package/src/pr/pr-intake-review.ts +49 -31
  34. package/src/pr/pr-intake-work.ts +3 -2
  35. package/src/routing/message-order.ts +22 -1
  36. package/src/routing/topic-request.ts +41 -0
  37. package/src/runtime/controller.ts +515 -191
  38. package/src/runtime/deferred-routing.ts +12 -4
  39. package/src/runtime/dm-timeline.ts +3 -3
  40. package/src/storage/deferred-routing.ts +25 -4
  41. package/src/storage/store.ts +389 -60
  42. package/src/worker/worker-checkout.ts +38 -4
  43. package/src/worker/worker-host.ts +114 -24
  44. package/src/worker/worker-ledger.ts +28 -9
  45. package/src/worker/worker-repository.ts +13 -0
  46. package/src/worker/worker-service.ts +74 -17
  47. package/src/worker/worker-wire.ts +3 -1
@@ -23,18 +23,52 @@ the worker launches the stock Host and owns its Unix socket, processes and nativ
23
23
  journal. An SSH disconnect is client detach, not cancellation, an exit receipt,
24
24
  or authority to reassign work. Open and attachment are separate from sending
25
25
  the first input. A pending or ambiguous launch must be reconciled on that
26
- worker, never retried on another machine. Remote PIDs and session paths do not
27
- identify local processes or files. See [worker enrollment](../OPERATIONS.en.md#add-a-remote-worker).
26
+ worker, never retried on another machine. If an already attached lane loses
27
+ only its connection, a verified clean exit for that exact generation and
28
+ session clears the connection hold. Reconnection itself never launches a
29
+ Host; new input can reopen the existing session through the ordinary queue.
30
+ The loss of transport and an earlier uncertain input are separate holds.
31
+ A verified exit can clear the transport hold without settling the input or
32
+ releasing its effects. Exact owner resolution then needs no second reconnect
33
+ command; no prior admission or approval is replayed.
34
+ Remote PIDs and session paths do not identify local processes or files.
35
+ See [worker enrollment](../OPERATIONS.en.md#add-a-remote-worker).
36
+
37
+ New worker journals retain stock OMP file modes in a newly created private
38
+ lane directory. The worker records the directory's identity in its private
39
+ ledger before session preparation and verifies it on attach and across
40
+ generations. An existing directory without that provenance keeps the original
41
+ file-permission checks; old journals are not automatically adopted.
28
42
 
29
43
  When several workers qualify, placement accounts for both reported free slots
30
44
  and head assignments waiting to start. Concurrent admissions reserve their
31
45
  selection before the next admission decides, without serializing SSH probes.
32
46
  On the target, a failure before native session preparation releases the slot;
33
47
  after preparation begins, an uncertain attempt keeps its reservation.
48
+ Worker inventory with a verified workspace, probes and new opens reconcile
49
+ existing reservations on demand. If the journal cannot be trusted, an attempt
50
+ that never admitted a remote attachment can release its checkout using a
51
+ matching private native exit receipt or the Rust owner's record of reaping
52
+ its own stock child. For a previously attached attempt, that record must also
53
+ confirm the exact session acknowledged guarded shutdown with no native owned
54
+ work outstanding. Both processes must be gone and no public socket may remain.
55
+ Checkout-only retirement restores capacity without granting session or
56
+ clean-exit proof. It fences reopening the original journal and does not repair
57
+ its permissions or delete any work. An attempt without sufficient proof stays
58
+ held, including an attached worker that crashed without a shutdown acknowledgement.
34
59
  An absent socket alone cannot resolve a pending open: an SSH request may
35
60
  still arrive. Explicit close or resume can seal that generation on the worker
36
61
  before proceeding. A later open for the sealed generation is refused.
37
62
 
63
+ A first placement still matches the exact clean commit on both machines.
64
+ An already released lane may reopen the same verified native session in its
65
+ original physical worker checkout even after ordinary file edits there. The
66
+ worker attests the same enrolled root, Git metadata directory, subdirectory,
67
+ origin and revision; checkout leases and startup restrictions still apply.
68
+ Older bindings with no recorded physical identity keep the clean preflight.
69
+ This does not transfer edits, adopt another checkout or substitute a new
70
+ session if the original cannot be verified.
71
+
38
72
  Only an operator-approved head checkout may use a default worker implicitly;
39
73
  Git origin and commit identify compatible contents, not permission to send a
40
74
  task. Worker verification must not execute checkout-configured Git filters.
@@ -177,7 +211,7 @@ references](../../skills/head/SKILL.md) for operating policy.
177
211
 
178
212
  | Tools | Authority and outcome |
179
213
  | --- | --- |
180
- | `lane_start` | Requires a durable user source, title, existing absolute cwd, exact model or native preset, model reason and kickoff. Accepts a bounded brief, acceptance criteria, and an authorized destination or workflow. At most one new lane per source. Returns the durable ID and admission state, not an execution or completion receipt. |
214
+ | `lane_start` | Requires a durable user source, title, existing absolute cwd, exact model or native preset, model reason and kickoff. Accepts a bounded brief, acceptance criteria, and an authorized destination or workflow. At most one new lane per source. Returns the durable ID and admission state, including a pending kickoff when delivery is delayed, not an execution or completion receipt. |
181
215
  | `lane_message` | Explicit follow-up with a real authorized `sourceId` and the target lane. Deduplicate by source and lane; check destination, attachment/quote scope and identity compatibility. For a physical Discord work thread and a source from its exact guild parent, pin the HEAD-reviewed report route to that thread per handoff. This does not rebind the source or resume a paused lane. The same source may reach existing lanes only where those routes and reporting are authorized. |
182
216
  | `lane_inspect` | Lists records without a live probe; inspecting a specific lane adds live status where observable, model readback, queue blockers and observed progress. Null actual state is unknown, not a match. |
183
217
  | `lane_pause` | Takes a managed lane ID. Persists pause intent and requests an interrupt without claiming owned services or earlier effects are gone. |
@@ -365,11 +399,12 @@ managed controller negotiates `activity-v1`: each incremental text, thinking or
365
399
  one ordered activity frame instead of repeating the accumulated payload. The reduction is on that socket,
366
400
  not the native pipe or the owner's observation queue. Terminal messages, prompt results, approvals and
367
401
  lifecycle events retain their contents. The
368
- [recorded RPC oracle](../../test/rust-anything/) covers two synthetic native exits, including
369
- readiness, busy refusal, detach/reconnect and a chunked Unicode event. From a source checkout,
370
- build the owner and run `rust-anything app replay test/rust-anything` with
371
- [rust-anything 2.1.0](https://github.com/erkamyaman/rust-anything/tree/71c78e10c5beb39acecd52c2eb3f675a199f3cea).
372
- This compares against the Bun owner's recorded behavior; it does not replace the stock CLI lifecycle tests.
402
+ [recorded RPC oracle](../../test/rust-anything/) covers clean and nonzero native exits,
403
+ readiness, protocol refusal, busy refusal, detach/reconnect and a chunked Unicode event.
404
+ The [Bun differential test](../../test/owner-differential.test.ts) compares the current
405
+ owner with those transcripts in CI; it does not replace the stock CLI lifecycle tests.
406
+ From a source checkout with the owner built, run
407
+ `OMP_SUPERAGENT_NATIVE_TEST=1 bun test test/owner-differential.test.ts`.
373
408
 
374
409
  The [Host extension](../../src/host-extension.ts) uses the exact registered
375
410
  `AgentSession` and native persistence/lifecycle guards. Use native `wakeSources`
@@ -645,8 +680,9 @@ the native notice, subject to native settings and Eval availability, with no
645
680
  extension-command preflight. Installation, profile load, skill application,
646
681
  actual native activation, goal creation, and work completion are separate facts.
647
682
 
648
- On upgrade, old ULW invocations remain valid in original user text and are
649
- preserved there. New structured choices use only the canonical values above
683
+ On upgrade, old ULW invocations remain valid in original user text. The bridge
684
+ preserves that text and supplies a canonical selector to a Host that advertises
685
+ the canonical command. New structured choices use only the canonical values above
650
686
  (or `jevify`), not legacy aliases or a `skill://` ID. Existing durable workflow
651
687
  records, skill IDs, flags and native journal types are not renamed. A resident
652
688
  pre-upgrade Host can still receive the mapped old command if it advertises
@@ -664,10 +700,14 @@ detection recognize both `omp-superkit` and the legacy `omp-ulw` package ID.
664
700
  Stage the observed revision and its dependencies in a project-owned immutable
665
701
  package. Ignore arbitrary dependency lifecycle scripts; run defined
666
702
  materialization and an [offline native prompt-composition probe](../../src/managed-super-probe.ts)
667
- for ordinary and explicitly activated operation. For the canonical layout the probe
668
- checks that the hook uses the canonical directive and pointer paths and that native
669
- discovery resolves both canonical skills and legacy aliases. An older revision
670
- uses the full legacy skills instead. Serialize preparation via
703
+ for ordinary and explicitly activated operation. With identical inputs, the probe
704
+ requires the supported model's instructions to differ from the no-model result,
705
+ without depending on preset wording. For the canonical layout the probe checks
706
+ that native discovery resolves the canonical commands and skills, and that
707
+ workflow pointers identify the invoked command and its installed skill. At
708
+ [upstream `7078efa`](https://github.com/dbc-hbin/omp-superkit/commit/7078efa148)
709
+ Superkit removed the legacy aliases and switched pointer tags to canonical
710
+ names. Older layouts still use the full legacy skills. Serialize preparation via
671
711
  the update lock and atomically publish `active.json` only after validation.
672
712
  Once installed, activate only fast-forward revisions from the same source;
673
713
  retain the last valid active revision and report failures. Do not delete older
@@ -717,18 +757,27 @@ discarding custom commands or enabling disabled extensions.
717
757
  previously started legacy run on its original host before resolving it.
718
758
  See the [operator reference](../OPERATIONS.en.md#scheduled-jobs-cron) for syntax and controls.
719
759
  - [Repository PR intake](../../src/cron/cron-pr-intake.ts) is a typed cron job, not
720
- an executable prompt. Only original configured-owner Discord guild parent
721
- controls enroll a repository. Discovery pins the authenticated GitHub owner
760
+ an executable prompt. Only original configured-owner controls from an allowed
761
+ Discord or Slack parent enroll a repository. Slack PR mutations need a real
762
+ owner message ordered by its physical `ts`, not a native slash invocation.
763
+ Discovery pins the authenticated GitHub owner
722
764
  and repository, filters old/self-authored PRs, and records each offer before
723
765
  delivery. The separately authenticated registration/mode action sets a bounded
724
766
  unattended ceiling: review/comment, safe fix, or protected merge. The confirmed
725
- bot offer's Discord snowflake identifies the one thread for that PR. A
767
+ bot offer's Discord snowflake or Slack root `ts` identifies the one thread
768
+ for that PR. Slack reuses the verified bot alert without an extra root post.
769
+ Manual Slack mutations must follow the final confirmed message part; a file
770
+ receipt alone cannot prove this order. A
726
771
  noninteractive controller receipt admits an exact SHA to a tool-less native
727
772
  lane; it is not owner input and cannot serve as a source for manager tools.
728
773
  No ordinary scheduled prompt, observed PR text or model answer grants authority.
729
774
  Older discovery-only registrations remain manual until the owner opts in.
730
775
  [Review control](../../src/pr/pr-intake-review.ts) binds subsequent actions to
731
776
  that lane, route, enrollment epoch, review input, delivered answer and SHA.
777
+ A manual Slack review must be a fresh original message physically sent after
778
+ the control that opened the current enrollment epoch, even on history replay.
779
+ An edit to the same verified owner starter does not change its thread identity
780
+ or authorize another command.
732
781
  Static review uses a trusted workspace without a contributor checkout. Unlike
733
782
  ordinary coding lanes, this restricted local Host must attest a tool-less
734
783
  session on a supported native provider before the controller submits patch
@@ -65,6 +65,16 @@ receipt keeps its original place relative to slash commands. A distinct history
65
65
  revision of that pending message stays in the durable inbox after the original,
66
66
  where it can inherit the original physical route and logical topic. Already
67
67
  admitted inputs and their external effects are not executed again.
68
+ When Slack packet normalization changes, the Gateway matches exact retained
69
+ receipts from Gateway or HEAD (including deferred routing) before admitting a
70
+ new projection. Legacy `!usage-reset` text and attachment-based revision IDs
71
+ do not authorize another effect. If a Gateway receipt was lost after HEAD
72
+ persisted a message or edit, the pending event keeps that retained clock on
73
+ retransmission. Only the two exact old and current JSON representations derived
74
+ from the same verified Slack timestamp are equivalent; a different payload is
75
+ not. Slack broadcast events are references; only the exact owning reply can
76
+ establish its text and attachment evidence. A temporary Slack lookup failure
77
+ does not acknowledge an unverified broadcast as consumed.
68
78
 
69
79
  ### Account presence
70
80
 
@@ -174,14 +184,19 @@ and logical topics) queue behind it; other conversations are not held. A
174
184
  redelivery of a queued input shares the store's immutable-payload and signed
175
185
  attachment URL reconciliation. Fresh `/restart`, `/stop head`, and
176
186
  `/stop <exact authorized lane-id>` bypass deferred waiting, including after
177
- restart. A bare `/stop` bypasses failing admission only if it is not a reply and
178
- comes from an already-bound physical Discord work thread. Bare DM and
179
- reply-relative stops wait for earlier routing, rather than choosing today's
180
- apparent target; edits cannot acquire priority. Global HEAD stops and
187
+ restart. A bare `/stop` (`!stop` in Slack) bypasses failing admission only in an
188
+ already-bound physical Discord or Slack work thread, and only if the message does
189
+ not reference another target. On Slack, the thread's root can be a placement
190
+ receipt, so it must not resolve to a workspace question, a separate placement
191
+ or an unverified target. Bare DM and reply-relative stops wait for earlier
192
+ routing, rather than choosing today's apparent target; edits cannot acquire
193
+ priority. Global HEAD stops and
181
194
  lane-specific stops snapshot receipt order across both queues. A later resume
182
195
  waits for an older deferred stop of that exact lane without being cancelled by
183
- it; other lanes' work is independent. A pending queued
184
- choice fences the automatic history choice like an unreceipted Gateway event. A
196
+ it; other lanes' work is independent. A pending queued choice, including a Slack
197
+ message with fractional milliseconds, fences the automatic history choice like
198
+ an unreceipted Gateway event. Only a delivered question with actual historical
199
+ candidates starts a timer; an empty or failed lookup does not authorize work. A
185
200
  failed admission stays first in its conversation and is retried with bounded
186
201
  backoff; a permanent denial is dropped. The queue survives a restart and resumes
187
202
  in order once intake is ready. On first opening an older store, HEAD migrates the
@@ -226,7 +241,7 @@ before the foreign completion is still sent to its own conversation. If a
226
241
  native batch cannot be split by origin, only individually identified job
227
242
  receipts are sent.
228
243
 
229
- Same-conversation Discord HEAD steers still share one final answer. When the
244
+ Same-conversation Discord and Slack HEAD steers share one final answer. When the
230
245
  native session has observed a steer before that answer and completed its
231
246
  correlated prompt, the controller records its physical source with the answer.
232
247
  The opening request may be a Discord application command with no physical
@@ -235,9 +250,13 @@ prove that a joined message was answered, even in the same topic. A clean
235
250
  answer observed before that input can still provide proof if selected for
236
251
  delivery. An observed job launched in a continuation proved by a completion
237
252
  from the same request can contribute to its answer.
238
- Once Discord confirms the answer's message ID, the outbox queues a short inline
239
- link for each distinct joined message; a deleted source cannot fall back to a
240
- standalone link. This does not duplicate the answer or claim that each
253
+ Once the messenger confirms the answer's message ID, the outbox queues a short
254
+ notice for each distinct joined message. Discord replies to that exact input.
255
+ Slack verifies the original owner and bot answer in the same physical route and
256
+ links to both using `chat.getPermalink`. A confirmed rate limit before the notice
257
+ was posted leaves it pending until the provider's retry delay, for up to two
258
+ retries. An uncertain post is not retried. A missing or unverifiable source
259
+ cannot fall back to an unanchored notice. This does not duplicate the answer or claim that each
241
260
  request's work succeeded. An uncertain or failed answer send does not produce
242
261
  a link.
243
262
 
@@ -309,15 +328,16 @@ See the [operations guide](../OPERATIONS.en.md#4-commands-and-daily-use) for com
309
328
  evidence from the owner's request and context to discover and verify a directory
310
329
  before dispatch. It asks a focused question only if a material ambiguity remains.
311
330
  Neither a default repository nor the last active lane or chat is evidence of
312
- intent. If the original route is an unbound Discord thread, use that thread for
331
+ intent. If the original route is an unbound Discord or Slack thread, use that thread for
313
332
  any assigned work; create a sibling only on explicit request.
314
333
  An implicit workspace question left over from an older release is not a
315
334
  session binding. A follow-up can reference a single unstarted request in its
316
- current Discord thread or DM, or by replying to the exact sent question
335
+ current Discord or Slack thread or DM, or by replying to the exact sent question
317
336
  (including its Slack root timestamp). Submission rechecks that it is still
318
337
  awaiting placement; neither its excerpt nor hints based on it are reused
319
338
  after placement or cancellation. An exact workspace selection still answers
320
- the original question without replay.
339
+ the original question without replay. A terminal notice for an invalid or
340
+ mismatched directory is not a selectable workspace question.
321
341
  - Where there are eligible managed sessions, ordinary HEAD routing automatically
322
342
  checks relevant original owner text against scoped Mnemopi recall and a bounded
323
343
  search of authorized native journals. The read-only pass adds only matching
@@ -333,12 +353,35 @@ See the [operations guide](../OPERATIONS.en.md#4-commands-and-daily-use) for com
333
353
  - Explicit `cwd: /absolute/path`, `/new` with a task, an exact reply to a placed
334
354
  original or its delivered message with a verified workspace, and intentional
335
355
  historical lookup use controller placement. Invalid explicit cwd is rejected,
336
- not sent to HEAD as ordinary input. A new topic may reuse a workspace, never
337
- another topic's transcript. The quote body is not placement evidence; `/new`
356
+ not sent to HEAD as ordinary input. In Slack a verified leading mention of
357
+ this bot can precede `cwd:`, a plain thread split, or a historical continuation.
358
+ Only placement and lookup omit that address; it does not change the original
359
+ receipt or authorize a written control or workflow selector. A workspace
360
+ header or written choice decodes Slack path entities once. A new topic may
361
+ reuse a workspace, never another topic's transcript. The quote body is not placement evidence; `/new`
338
362
  in a bound thread can reuse that thread's workspace. When explicit placement
339
363
  needs workspace clarification, a known name or absolute path selects just one
340
364
  pending original on its original route. Neither an edited confirmation nor a
341
- stale answer becomes another task. A Slack reply uses the sent question's root timestamp.
365
+ stale answer becomes another task. A Slack channel-root reply uses the sent
366
+ question's root timestamp; a plausible reply or bare `!stop` can wait for
367
+ that exact receipt even when a slash invocation has no message timestamp or
368
+ a DM request has a logical topic ID. A
369
+ separate top-level Slack message is not a reply to the question. Within an
370
+ existing Slack thread, a written
371
+ `!choose <source-ts> <answer>` names the exact delivered question without
372
+ routing to another thread or guessing among outstanding questions. An explicit
373
+ answer must physically follow the final post of the question and be authored
374
+ no later than the deadline when the question has one. A number, a known
375
+ workspace name, a bare absolute path, or a `cwd:`-only answer to a single
376
+ threaded question uses the same physical post order. While the receipt is
377
+ in flight, HEAD retains these answers without applying them to an
378
+ unconfirmed post. On a lost IPC reply or startup it can recover the exact
379
+ completed, same-route Gateway send before consuming the answer. A history
380
+ question's deadline starts from its final Slack post, independent of when
381
+ HEAD obtains the receipt. It does not resend the question for proof. A timely
382
+ answer can hold automatic fallback from the durable queues. A bare number can be
383
+ ambiguous near an expired question, but that question no longer competes with
384
+ a later question or claims unrelated numbers indefinitely.
342
385
  - A retrospective request with a task description can search previous managed native
343
386
  sessions across the configured owner's currently allowed channels. Search the
344
387
  operator's text, not reply bodies, pasted commands or attachments. Telegram
@@ -366,11 +409,11 @@ See the [operations guide](../OPERATIONS.en.md#4-commands-and-daily-use) for com
366
409
  journal. Recheck the prior identity, work state, entry and pinned evidence
367
410
  digest before native submission, without searching mutable memory again;
368
411
  historical text cannot start workflows or approve effects.
369
- Outside a bound Discord work thread, a new request with a different explicit
412
+ Outside a bound Discord or Slack work thread, a new request with a different explicit
370
413
  workspace can start a separate topic. `/new` with a request in a thread starts
371
414
  a separate topic instead of changing a lane's cwd. A closed lane or an
372
415
  uncertain receipt is not reopened by ordinary input.
373
- - In an already-bound physical Discord work thread, work and replies stay in the
416
+ - In an already-bound native Discord or Slack work thread, work and replies stay in the
374
417
  current thread. A historical match contributes only verified, pinned evidence
375
418
  to the current lane, not a handoff to a different session or workspace. Ask
376
419
  about ambiguous matches in that same thread and honor a timely choice. For
@@ -379,7 +422,7 @@ See the [operations guide](../OPERATIONS.en.md#4-commands-and-daily-use) for com
379
422
  from the current session, then a verified candidate in the same cwd by recency.
380
423
  If none remains eligible, continue with the current lane context. This timeout
381
424
  does not approve effects or authorize cross-workspace execution.
382
- - A different `cwd:` in a bound Discord work thread does not change its lane or
425
+ - A different `cwd:` in a bound Discord or Slack work thread does not change its lane or
383
426
  open a sibling automatically. To separate work, send `/new <request>` or a
384
427
  direct, one-line split request, e.g. `이건 따로 빼줘: 로그인 점검`,
385
428
  `로그인 점검은 새 스레드에서 해줘`, `Split this into a new thread: Check login`,
@@ -387,9 +430,18 @@ See the [operations guide](../OPERATIONS.en.md#4-commands-and-daily-use) for com
387
430
  `이건 따로 빼줘` or `Split this into a new thread`, the controller asks them to
388
431
  name the task with `/new` instead of creating a topic. Natural split
389
432
  directives preserve an explicit `cwd:` header, including spaces inside path
390
- quotes. They apply only to original owner messages in physical Discord work
391
- threads, not edits, quoted text or attachments. DM and other adapters retain
392
- their existing topic behavior.
433
+ quotes. They apply only to original owner messages in native Discord or Slack
434
+ work threads, not edits, quoted text or attachments. When Slack removes a
435
+ verified bot address, rich formatting in the task after the split directive
436
+ remains task data. A verified `cwd:` header alone does not attest the split
437
+ directive or a workflow selector on the next line, including after `!new`.
438
+ An unverified task body is presented to the model as task data inside the
439
+ native context fence rather than passed to OMP's magic-keyword matcher. If blocks are present,
440
+ the raw fallback text cannot supply an address that the blocks do not attest.
441
+ Slack splits and workspace answers must have matching written-body
442
+ evidence from Gateway, with or without an address; old receipts are
443
+ not reinterpreted or upgraded on redelivery. Slack uses `!new` as
444
+ its text command. Ordinary DM context selection is unchanged.
393
445
  - `/new` and plain split directives keep the source parent. With operator opt-in,
394
446
  HEAD may select a different native parent for an original authorized owner
395
447
  request via `lane_start`. The default `"allowlist"` scope requires the
@@ -402,12 +454,17 @@ See the [operations guide](../OPERATIONS.en.md#4-commands-and-daily-use) for com
402
454
  The grant permits work delivery, not text or command intake or history
403
455
  recovery; approvals remain on the original allowed route. The source receives
404
456
  one placement notice; progress and final work reports use the work thread.
457
+ Slack's separate `allowCrossChannelThreads` opt-in only permits another
458
+ allowlisted channel in the same workspace and authenticated account, where the
459
+ bot is a member. The exact verified starter `ts` is the thread identity.
405
460
  - `/head <request>` explicitly addresses the shared coordination model (Slack:
406
461
  `!head` or `/superagent-head`). Manager handoffs keep HEAD's review path.
407
- When HEAD explicitly uses `lane_message` to continue an existing physical
408
- Discord work thread from its exact authorized guild parent, the controller
409
- records that thread as the handoff's progress and final report route. It
410
- does not change the original input or borrow its parent message as a thread
462
+ When HEAD selects an existing native Discord or Slack work thread from its exact
463
+ authorized parent, that thread is the handoff's progress and final
464
+ report route. An opening `lane_start` requires its confirmed kickoff in
465
+ that thread; an explicit `lane_message` pins the route on admission.
466
+ This applies equally to local and enrolled SSH lanes. It does not
467
+ change the original input or borrow its parent message as a thread
411
468
  reply. Replays preserve the recorded destination and do not send a parent
412
469
  copy. Native approvals during HEAD's review still use the original parent
413
470
  route, not the report's destination. Other routes, logical topics and
@@ -420,7 +477,11 @@ See the [operations guide](../OPERATIONS.en.md#4-commands-and-daily-use) for com
420
477
  quoted text do not become global settings changes.
421
478
  - Thread-first work sends a short kickoff to the selected topic. The durable
422
479
  `sent` receipt gates new lane dispatch and steering for that input. A missing
423
- or uncertain delivery is not a successful kickoff.
480
+ or uncertain delivery is not a successful kickoff. A pending Slack kickoff
481
+ behind a proven preflight rate limit keeps the original placement pending,
482
+ not uncertain. An ordered restart acknowledgement on the same route waits
483
+ without blocking unrelated delivery; only its sent receipt authorizes the
484
+ restart handoff. A later explicit HEAD stop still supersedes that wait.
424
485
  - `/new` selects a fresh logical topic in an eligible private conversation.
425
486
  With no request it does not start a lane or model turn. `/main` changes future
426
487
  input context without altering previous bindings, approvals or work. Topic
@@ -432,12 +493,14 @@ See the [operations guide](../OPERATIONS.en.md#4-commands-and-daily-use) for com
432
493
  - Ordinary follow-ups default to native `steer` when their destination has an
433
494
  eligible active run: unbound requests and ordinary `/head` text go to HEAD;
434
495
  ordinary replies in a bound work thread go to its lane without `lane_message`.
496
+ This includes a lane on an enrolled SSH worker.
435
497
  If a follow-up arrives before the native start event, that event rechecks
436
- pending inputs. An idle destination receives a new prompt.
498
+ pending inputs. An idle destination receives a new prompt in the same native
499
+ session after its ownership and readiness are verified.
437
500
  Match the full route including account, authority, thread and topic. A bound
438
501
  reply can join a manager run initiated elsewhere only if its verified delivery
439
502
  route is this exact thread. When steering another manager handoff into or from
440
- a parent-origin thread follow-up, both source conversations and report routes
503
+ a parent-origin thread handoff, both source conversations and report routes
441
504
  must match. A manager handoff keeps its HEAD review mode, with the verified
442
505
  reply route fixed for the joined run, including logical topics backed by native
443
506
  threads. Keep each source and native receipt distinct
@@ -466,7 +529,7 @@ See the [operations guide](../OPERATIONS.en.md#4-commands-and-daily-use) for com
466
529
  | --- | --- |
467
530
  | Discord | Ordinary `/...` messages and explicitly registered application commands share authorized ingress. Interactions have an `interactionId` and no message ID; do not use them for history, reactions, fetch, thread sources or replies, or persist response tokens. Server text/announcement channels support threads; forum/media posts can require exact tag IDs. DMs use logical topics. |
468
531
  | Telegram | Ordinary slash messages and owner-scoped menus keep real message IDs. Normalize only actual bot-command entities addressed to this bot; ignore commands addressed to other bots. Native topics require eligible forum supergroups or topic-enabled private chat; group topic creation needs the granted capability. |
469
- | Slack | Ordinary `!...` messages and registered `/superagent-*` commands use Socket Mode. Slash commands have no message `ts`: deduplicate with a token-free scoped invocation fingerprint; anchor topic boundaries to the last durably admitted real owner message and use admission order on the same anchor. Do not persist trigger/response tokens or invent a timestamp. Use real root messages for threads, never nested threads. |
532
+ | Slack | Ordinary `!...` messages and registered `/superagent-*` commands use Socket Mode. Slack does not allow app slash commands inside threads; use `!` there. Slash commands have no message `ts`: deduplicate with a token-free scoped invocation fingerprint; anchor topic boundaries to the last durably admitted real owner message and use admission order on the same anchor. Do not persist trigger/response tokens or invent a timestamp. Use real root messages for threads, never nested threads. |
470
533
 
471
534
  [Command definitions](../../src/messaging/messenger-commands.ts) are shared. Menu registration
472
535
  is a separate explicit apply, not a side effect of setup, doctor or start. Command
@@ -500,7 +563,7 @@ is not a native mutation receipt. The head requires the recorded sent receipt
500
563
  for the exact card before changing settings. Unselected cards expire after five
501
564
  minutes, on Gateway restart, or when a new menu of the same kind replaces them
502
565
  on the same route.
503
- On Discord, the model card shows two selects: the destination (HEAD or the
566
+ On Discord and Slack, the model card offers the destination (HEAD or the
504
567
  lane bound to the opening conversation) and the provider/model browser. With
505
568
  both destinations available the operator must pick one; without a bound lane
506
569
  only HEAD is offered. Browsing providers or changing the destination is not a
@@ -517,8 +580,9 @@ The reset picker chooses an exact linked account from the configured OMP profile
517
580
  Discord accepts the argumentless `/usage-reset` command in its picker and in
518
581
  authorized messages. `/usage` only reads quotas. The Gateway rejects stale
519
582
  `/usage` interactions carrying options; HEAD refuses legacy `/usage reset`
520
- messages as invalid controls, not model or lane requests. Edits cannot open
521
- the reset picker. Telegram and Slack keep their existing reset syntax.
583
+ messages as invalid controls, not model or lane requests. Slack accepts
584
+ `!usage-reset` or `/superagent-usage-reset`, as well as `!usage reset`. Telegram
585
+ keeps `/usage reset`. Edits cannot open the reset picker.
522
586
  The first click only changes the displayed card revision; Confirm on that
523
587
  revision is the only action that admits a reset request. Cancel closes the card
524
588
  without admitting any request. The head checks the original sent card and live
@@ -573,6 +637,12 @@ Manage Threads, and skip archived threads. A confirmed Discord rate limit
573
637
  defers reconciliation and rechecks current state before the next write;
574
638
  an ambiguous write is not retried.
575
639
 
640
+ Slack `thread_inspect` verifies the exact root against the authenticated
641
+ account. A bot-created work starter has an editable label: explicit title
642
+ updates and automatic `⏳`/`✅` changes edit that starter using `chat.update`, not
643
+ an owner message or the Slack channel's name. Slack has no per-thread archive,
644
+ reopen, or forum tag API; those fields are not simulated.
645
+
576
646
  `/help`, `/status`, `/context` and `/usage` are code-handled reads with no model turn.
577
647
  [`/usage`](../../src/omp/omp-usage.ts) invokes the configured executable and
578
648
  profile with `usage --json --redact`, so OMP discovers built-in and extension-provided
@@ -586,8 +656,10 @@ Unknown quota is not zero or an estimate of this session's usage. `/compact` use
586
656
  compaction and requires an idle eligible head; status and priority stop remain
587
657
  available while it runs. `/stop` pauses the bound lane. In an unbound topic a
588
658
  reply can select the exact pending placement or the running HEAD request on
589
- that route. If the bare command could mean either, or the referenced physical
590
- message's revisions do not identify one target, report the ambiguity on the
659
+ that route. A Slack question still being posted elsewhere in the channel
660
+ does not delay a stop for an already bound lane. If the bare command could
661
+ mean either, or the referenced physical message's revisions do not identify
662
+ one target, report the ambiguity on the
591
663
  original route instead of cancelling one by guesswork. Use `/stop head` for
592
664
  the global control, or name a lane ID to pause it. Once admitted to the
593
665
  head, priority controls and approval answers do not wait for an ordinary model
@@ -700,8 +772,11 @@ owner and request ID. A failed ownership read or a duplicate cannot lift a pause
700
772
  25 seconds for the whole Discord output, including destination lookup,
701
773
  leaving time to return the result before the head's 30-second IPC timeout.
702
774
  No new parts are posted after that deadline. An in-flight POST at expiry or
703
- a failure after a visible part is uncertain; nothing is resent. Slack
704
- uses upload URL → bytes → `files.completeUploadExternal`, not `files.upload`.
775
+ a failure after a visible part is uncertain; nothing is resent. Slack splits
776
+ at paragraph, line, then space boundaries into at most five posts of up to
777
+ 3,000 UTF-16 units. It holds a partial send as uncertain and records later
778
+ parts and the final timestamp only for a complete multipart send. Larger
779
+ output uses upload URL → bytes → `files.completeUploadExternal`, not `files.upload`.
705
780
  Telegram and Slack do not automatically retry remote mutations. Discord renders
706
781
  ordinary Markdown pipe tables at delivery as stacked list items, with the
707
782
  column labels and each row's values on separate lines. This leaves links,
@@ -717,18 +792,27 @@ owner and request ID. A failed ownership read or a duplicate cannot lift a pause
717
792
  - Pending outbox delivery runs concurrently across distinct physical routes
718
793
  (platform, account, authority, guild, channel, thread) while preserving
719
794
  strict sequence order within each physical route and never automatically
720
- retrying uncertain sends. Routes wake as soon as outputs become pending
795
+ retrying uncertain sends. A confirmed `Retry-After` holds later output on
796
+ that route only; the pending work stays visible to lifecycle guards. Slack
797
+ joined links honor the original preflight rejection time even if HEAD loses
798
+ the response or restarts before recording the delay. The exact completed
799
+ Gateway receipt settles success or definitive rejection for a joined link,
800
+ workspace question, kickoff, or restart acknowledgement, even if its IPC
801
+ reply is lost. Definitively rejected plain posts are not retried. A delay
802
+ the scheduler cannot represent is not retried and does not make the
803
+ rejection uncertain. An unfinished or ambiguous send never authorizes a retry.
804
+ Routes wake as soon as outputs become pending
721
805
  without waiting behind an unrelated command tail; restart checkpoints still
722
806
  wait for all in-flight route deliveries to settle before lifecycle handoff.
723
- - In-place editing of Discord progress reports is opt-in via
724
- `discord.editProgressInPlace` (default `false`). By default, every progress
807
+ - In-place editing of progress reports is opt-in via
808
+ `discord.editProgressInPlace` or `slack.editProgressInPlace` (both default `false`). By default, every progress
725
809
  update and HEAD lane progress summary posts as an ordinary new message so
726
- progress history stays visible. When enabled on Discord, nonterminal progress
810
+ progress history stays visible. When enabled, nonterminal progress
727
811
  for one request—including direct HEAD progress, direct topic progress, and
728
812
  HEAD summaries of non-topic lane progress keyed by the original lane input—uses
729
813
  a single `⏳` status message edited in place (`⏳\n` when the body begins
730
814
  with a code fence so card fences remain intact). Each update stays its own
731
- immutable output with `status: true`; initial long status messages use the
815
+ immutable output with `status: true`. On Discord, initial long status messages use the
732
816
  single-message text attachment fallback instead of splitting across multiple
733
817
  posts so later edits replace that single message cleanly. When an update is
734
818
  claimed for delivery, the controller fixes `editOf` to the physical message of
@@ -736,9 +820,10 @@ owner and request ID. A failed ownership read or a duplicate cannot lift a pause
736
820
  redelivery edits that same message. An uncertain post never becomes an edit
737
821
  target. A rejected edit fails only that update and is never reposted; it
738
822
  releases the target so a later update posts a fresh status message. An
739
- ambiguous edit stays uncertain. Final answers and lane completion reports are
740
- still separate new messages. Telegram and Slack always post ordinary progress
741
- messages; the Gateway rejects `editOf` and `status: true` outside Discord.
823
+ ambiguous edit stays uncertain. Slack verifies its own status marker and
824
+ exact destination before `chat.update`; an over-limit Slack status does not
825
+ create a file or a second message. Final answers and lane completion reports
826
+ remain separate. Other transports post ordinary progress messages.
742
827
  - Discord turns a fenced ```` ```card ```` [json-render](https://github.com/vercel-labs/json-render)
743
828
  spec (`{"root", "elements"}`, root `Card`; `Card`, `Section`, `Text`,
744
829
  `Fields`, `Field`, `Table`, `Divider`, `Image`) into an embed at delivery.
@@ -747,8 +832,10 @@ owner and request ID. A failed ownership read or a duplicate cannot lift a pause
747
832
  permission at the parent channel; otherwise send the original fence as text.
748
833
  An Image needs a valid HTTPS URL. A spec that is
749
834
  invalid, uses another component, reuses an element or exceeds Discord's embed
750
- limits stays verbatim as its code block, which is also what Telegram and Slack
751
- show. The [Rust renderer](../../gateway/src/discord/embeds.rs) and the
835
+ limits stays verbatim as its code block. Slack renders the same card format
836
+ as non-interactive Block Kit with HTTPS-only images and its own block bounds;
837
+ unsupported content stays literal. Telegram keeps the original text.
838
+ The [Rust renderer](../../gateway/src/discord/embeds.rs) and the
752
839
  [test-only Bun renderer](../../test/oracles/bun-gateway/discord-markdown.ts)
753
840
  share one [fixture](../../test/fixtures/discord-cards.json).
754
841
 
@@ -0,0 +1,10 @@
1
+ # omp-superagent 0.1.17
2
+
3
+ - Ordinary owner replies in an existing Discord work thread can reach its active local or SSH worker lane directly, without a HEAD model turn. Approvals and explicit manager handoffs still follow their original routes. [#74](https://github.com/dbc-hbin/omp-superagent/pull/74)
4
+ - After a verified clean exit clears a remote lane's connection hold, a new thread message can reopen the same native session on the same worker. Ordinary edits in the original verified checkout no longer prevent that reopen. Previously admitted input, approvals and uncertain effects are not replayed. [#72](https://github.com/dbc-hbin/omp-superagent/pull/72)
5
+ - New remote lane journals keep stock OMP's file modes inside a worker-verified private directory. Older unverified journals are not automatically adopted. A worker with an untrusted journal can release its checkout and capacity only with sufficient proof of process exit and, for a previously attached lane, guarded shutdown with no native owned work outstanding. Releasing the checkout does not make the journal resumable. [#72](https://github.com/dbc-hbin/omp-superagent/pull/72) · [#75](https://github.com/dbc-hbin/omp-superagent/pull/75)
6
+ - A remote Host owner exits unsuccessfully if it cannot verify persistence after reaping its native child, rather than keeping the socket open indefinitely. This is not proof of a clean exit and does not authorize session resume. [#73](https://github.com/dbc-hbin/omp-superagent/pull/73)
7
+
8
+ **Before upgrading**, follow the [upgrade procedure](https://github.com/dbc-hbin/omp-superagent/blob/v0.1.17/docs/OPERATIONS.en.md#update-an-existing-installation) ([한국어](https://github.com/dbc-hbin/omp-superagent/blob/v0.1.17/docs/OPERATIONS.md#기존-설치-업데이트)). Use the old installation to stop affected resident lanes and Gateway/HEAD and verify their exits. If an old Gateway is unreachable, recover it with the old installation first; a receipt for an earlier PID does not authorize replacement. Keep the original config and journals, install `omp-superagent@0.1.17`, and restart only previously running Gateways.
9
+
10
+ [Changes since 0.1.16](https://github.com/dbc-hbin/omp-superagent/compare/v0.1.16...v0.1.17)
@@ -0,0 +1,10 @@
1
+ # omp-superagent 0.1.18
2
+
3
+ - Slack work stays in its bound thread unless explicitly split. `!model` can select HEAD or the bound lane, and `!stop` can pause the bound lane even while an unrelated workspace question is pending. Optional settings enable mention-only channel intake, work starters in another allowlisted channel, and in-place progress updates. [#77](https://github.com/dbc-hbin/omp-superagent/pull/77)
4
+ - Slack supports repository PR intake from allowed parent conversations. Workspace answers and manual PR controls use verified Slack message identity and order. After an interrupted response, Superagent uses the matching durable Gateway receipt to settle delivery rather than treating missing confirmation as success or blindly resending. [#77](https://github.com/dbc-hbin/omp-superagent/pull/77)
5
+ - Managed Hosts verify current Superkit presets and canonical workflow discovery through native OMP, without depending on preset wording or retired aliases. Already-admitted legacy workflow commands still work on compatible Hosts. [#76](https://github.com/dbc-hbin/omp-superagent/pull/76)
6
+ - CI tests the latest official stock OMP on Linux and macOS and verifies fresh installs of the current package on all four target platforms. It no longer reinstalls a historical npm release to simulate an upgrade. [#76](https://github.com/dbc-hbin/omp-superagent/pull/76)
7
+
8
+ **Before upgrading**, follow the [upgrade procedure](https://github.com/dbc-hbin/omp-superagent/blob/v0.1.18/docs/OPERATIONS.en.md#update-an-existing-installation) ([한국어](https://github.com/dbc-hbin/omp-superagent/blob/v0.1.18/docs/OPERATIONS.md#기존-설치-업데이트)). Use the old installation to stop affected resident lanes and Gateway/HEAD and verify their exits before installing `omp-superagent@0.1.18`. For Slack, review the [app scopes and command setup](https://github.com/dbc-hbin/omp-superagent/blob/v0.1.18/docs/OPERATIONS.en.md#23-slack); reinstall the Slack app if you add scopes. In threads, use `!` controls rather than app slash commands.
9
+
10
+ [Changes since 0.1.17](https://github.com/dbc-hbin/omp-superagent/compare/v0.1.17...v0.1.18)
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.16",
3
+ "version": "0.1.18",
4
4
  "description": "One messenger-connected OMP head with independent work sessions",
5
5
  "license": "MIT",
6
6
  "author": "dbc-hbin",
@@ -48,7 +48,7 @@ work, send a separate update, or grant scope or execution authority.
48
48
  from the tool. For unsupported or ambiguous wording, clarify in ordinary
49
49
  language; do not ask for command syntax or claim a save. One-off requests
50
50
  remain local to that answer. No file, preset, or memory edit.
51
- - Keep discovered work in the original unbound Discord thread. Do not create a
51
+ - Keep discovered work in the original unbound Discord or Slack thread. Do not create a
52
52
  sibling without an explicit split request. A new lane needs a confirmed kickoff.
53
53
  Leave explicit cwd, `/new`, exact replies with a known workspace, and intentional
54
54
  historical lookup or choice to the controller's placement path.
@@ -86,7 +86,7 @@ load references for direct answers or routine progress updates.
86
86
 
87
87
  | When | Reference |
88
88
  | --- | --- |
89
- | Starting or splitting lanes, managing Discord topics, resolving workspace or shared-resource conflicts, or selecting an explicit workflow | `routing.md` |
89
+ | Starting or splitting lanes, managing Discord or Slack work threads, resolving workspace or shared-resource conflicts, or selecting an explicit workflow | `routing.md` |
90
90
  | Selecting a substantive lane model, handling an authorized model change, or resolving capability/risk ambiguity | `model-selection.md` |
91
91
  | Correcting or closing work, tracking a PR, or reconciling an interruption, approval, or uncertain effect | `supervision.md` |
92
92