omp-superagent 0.1.13 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DESIGN.md +8 -5
- package/THIRD_PARTY_NOTICES.md +6 -0
- package/assets/architecture-dark.svg +4 -4
- package/assets/architecture.ko-dark.svg +4 -4
- package/assets/architecture.ko.svg +4 -4
- package/assets/architecture.mmd +5 -5
- package/assets/architecture.svg +4 -4
- package/config.example.json +1 -0
- package/docs/OPERATIONS.en.md +80 -23
- package/docs/OPERATIONS.md +73 -18
- package/docs/design/execution.md +180 -43
- package/docs/design/messaging.md +62 -10
- package/docs/releases/0.1.15.md +13 -0
- package/docs/releases/0.1.16.md +9 -0
- package/gateway/bin/omp-gateway-darwin-arm64 +0 -0
- package/gateway/bin/omp-gateway-darwin-x64 +0 -0
- package/gateway/bin/omp-gateway-linux-arm64 +0 -0
- package/gateway/bin/omp-gateway-linux-x64 +0 -0
- package/host-owner/bin/omp-host-owner-darwin-arm64 +0 -0
- package/host-owner/bin/omp-host-owner-darwin-x64 +0 -0
- package/host-owner/bin/omp-host-owner-linux-arm64 +0 -0
- package/host-owner/bin/omp-host-owner-linux-x64 +0 -0
- package/package.json +6 -3
- package/scripts/prepare-worker-memory.ts +37 -0
- package/skills/head/SKILL.md +29 -47
- package/skills/head/references/routing.md +35 -16
- package/skills/head/references/supervision.md +10 -14
- package/skills/lane/SKILL.md +14 -16
- package/skills/lane/references/workflow.md +14 -27
- package/src/cli.ts +56 -56
- package/src/config/config.ts +14 -0
- package/src/contracts.ts +38 -30
- package/src/cron/cron-jobs.ts +4 -3
- package/src/cron/cron-pr-intake.ts +1 -2
- package/src/extension.ts +69 -24
- package/src/gateway/gateway-client.ts +24 -15
- package/src/group/group-runner.ts +3 -2
- package/src/group-runner-extension.ts +7 -3
- package/src/host-extension.ts +109 -2
- package/src/host-sdk-helper.ts +6 -1
- package/src/lane/decision-tool.ts +2 -3
- package/src/lane/lane-report.ts +8 -30
- package/src/lane/lane-rows.ts +1 -1
- package/src/lane/workflow.ts +44 -3
- package/src/lane-extension.ts +5 -46
- package/src/messaging/discord-context.ts +8 -6
- package/src/messaging/discord-work-thread.ts +36 -0
- package/src/omp/host-protocol.ts +4 -3
- package/src/omp/host.ts +24 -7
- package/src/omp/managed-super.ts +43 -27
- package/src/omp/native-sessions.ts +12 -0
- package/src/omp/worker-memory-import.ts +410 -0
- package/src/omp/worker-memory-sdk.ts +8 -0
- package/src/operator/setup.ts +8 -13
- package/src/pr/pr-github-schema.ts +9 -0
- package/src/pr/pr-github.ts +6 -2
- package/src/pr/pr-intake-automation.ts +11 -8
- package/src/pr/pr-intake-fix.ts +2 -5
- package/src/pr/pr-intake-review.ts +7 -7
- package/src/routing/topic-history.ts +2 -2
- package/src/runtime/controller.ts +720 -468
- package/src/runtime/head-recovery.ts +7 -7
- package/src/runtime/head-superstack.ts +83 -0
- package/src/runtime/result-attachments.ts +3 -1
- package/src/runtime/worker-memory.ts +156 -0
- package/src/storage/deferred-routing.ts +1 -7
- package/src/storage/store.ts +465 -372
- package/src/worker/worker-host.ts +3 -2
- package/src/worker/worker-ledger.ts +20 -11
- package/src/worker/worker-memory-page.ts +83 -0
- package/src/worker/worker-memory-proofs.ts +260 -0
- package/src/worker/worker-memory-source.ts +305 -0
- package/src/worker/worker-memory-storage.ts +130 -0
- package/src/worker/worker-profile.ts +2 -0
- package/src/worker/worker-repository.ts +92 -7
- package/src/worker/worker-request.ts +1 -0
- package/src/worker/worker-service.ts +25 -8
- package/src/worker/worker-wire.ts +20 -6
package/docs/design/execution.md
CHANGED
|
@@ -14,9 +14,9 @@ host requires it, unless the operator explicitly requests Git worktrees. No
|
|
|
14
14
|
checkout is needed just for a read-only lane or separate reporting; checkouts
|
|
15
15
|
do not isolate shared refs, services or integration effects.
|
|
16
16
|
|
|
17
|
-
###
|
|
17
|
+
### Remote placement
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
The head may bind a new lane to a verified SSH worker.
|
|
20
20
|
The durable binding includes the target enrollment, repository identity, revision
|
|
21
21
|
and subdirectory. Admission, approvals and messenger delivery remain head-owned;
|
|
22
22
|
the worker launches the stock Host and owns its Unix socket, processes and native
|
|
@@ -44,6 +44,133 @@ cannot use attach to choose a different session or invoke native shell commands.
|
|
|
44
44
|
The target account and its explicitly approved extensions remain trusted;
|
|
45
45
|
OpenSSH command restrictions are not an OS sandbox for native agent tools.
|
|
46
46
|
|
|
47
|
+
### Idle remote memory pull
|
|
48
|
+
|
|
49
|
+
`remoteMemorySync` is an opt-in HEAD config setting, not a lane tool. The privacy
|
|
50
|
+
boundary is a newly negotiated, paired worker lane in the **same canonical
|
|
51
|
+
workspace as HEAD**. Both ends must use Mnemopi's `per-project` mode, not
|
|
52
|
+
`per-project-tagged` or `global`. A participating worker lane starts with a private native
|
|
53
|
+
bank and no previously shared project memories. Older sessions keep their
|
|
54
|
+
original native store; neither it nor its contents are moved or removed.
|
|
55
|
+
The controller never searches the worker's normal profile for historical records.
|
|
56
|
+
|
|
57
|
+
| Native backend | As worker source | As HEAD destination |
|
|
58
|
+
| --- | --- | --- |
|
|
59
|
+
| Mnemopi | Explicit project `retain`/`learn` facts in the isolated lane's native project bank. Exclude global writes, automatic transcripts, synthesized episodes, scratchpads, context/metadata and skills. | The live HEAD's matching project write bank only. Import text, not vectors, using the local bank's indexing policy. |
|
|
60
|
+
| Local | No session-bound record iterator for the shared rollout summary / `learned.md`. | No independent non-overwriting, searchable record import; the summary is developer-instruction input. |
|
|
61
|
+
| Hindsight | Remote bank listing and project tags are not a lane-owned export. | A queued remote retain is neither a local import nor a confirmed index. |
|
|
62
|
+
| Sharpshooter | Shared project files, not a lane-owned native record stream. | No supported isolated record import with replay confirmation. |
|
|
63
|
+
| Off, unavailable, unknown or older peer | No pull. | No import. |
|
|
64
|
+
|
|
65
|
+
Both ends must qualify; a mixed pair is not converted in either direction.
|
|
66
|
+
An unsupported pair keeps its ordinary lane lifecycle, including the existing
|
|
67
|
+
managed-memory launch preflight. Sync does not enable memory, change auth,
|
|
68
|
+
silently create a vector provider or upgrade the peer.
|
|
69
|
+
|
|
70
|
+
**Why not an OMP export or an SSH file copy?** In
|
|
71
|
+
[OMP 19.2.1 at `b55cd1b`](https://github.com/can1357/oh-my-pi/blob/b55cd1bb664d8ab46ddc77f2a34eb47555dbf1ac/packages/coding-agent/src/memory-backend/types.ts),
|
|
72
|
+
the generic extension API exposes `status`, `search` and `save`. Search is ranked,
|
|
73
|
+
clipped and scoped for recall; it is not iteration. Mnemopi opens its project
|
|
74
|
+
store [with the bank as the BEAM session ID](https://github.com/can1357/oh-my-pi/blob/b55cd1bb664d8ab46ddc77f2a34eb47555dbf1ac/packages/coding-agent/src/mnemopi/state.ts);
|
|
75
|
+
that ID alone does not identify the OMP lane. Its
|
|
76
|
+
[snapshot and import](https://github.com/can1357/oh-my-pi/blob/b55cd1bb664d8ab46ddc77f2a34eb47555dbf1ac/packages/mnemopi/src/core/beam/store.ts)
|
|
77
|
+
operate on a bank, not an authenticated lane; a snapshot includes scratchpad
|
|
78
|
+
and consolidation data. Superagent neither calls a full export nor accepts a
|
|
79
|
+
database, filesystem path, table selector, provider option or command over SSH.
|
|
80
|
+
|
|
81
|
+
Children can share the parent's native bank and edit a row without replacing its
|
|
82
|
+
creation metadata. The worker therefore also requires a content digest witnessed
|
|
83
|
+
at a successful **root, built-in** `retain` or `learn` call. It correlates
|
|
84
|
+
the root execution start, effective tool result and terminal execution event.
|
|
85
|
+
If stock presents `retain` or `learn` as a Bash command, only a single literal
|
|
86
|
+
foreground invocation with a successful typed native dispatch receipt counts;
|
|
87
|
+
command output, file- or stdin-backed arguments, help, compound commands and
|
|
88
|
+
background jobs do not.
|
|
89
|
+
Only matching project text is sealed in the form of a digest, never a second
|
|
90
|
+
copy of the text. Indirect calls without that proof, partial successes, oversized
|
|
91
|
+
batches, skill writes, replaced text and facts predating enrollment remain local.
|
|
92
|
+
The worker caps the witness at 65,536 entries per private bank; after that it
|
|
93
|
+
still retains ordinary native memories but does not attest additional facts.
|
|
94
|
+
|
|
95
|
+
After an admitted run has settled, the existing controller pump can pull one
|
|
96
|
+
bounded page per minute while the native lane remains resident. It gives
|
|
97
|
+
queued work priority, uses a single in-flight pull, rechecks enrollment and
|
|
98
|
+
native identity, and discards a page if its authority or destination changed
|
|
99
|
+
before import. The live Git root, repository-relative path and revision must
|
|
100
|
+
still match after native idle confirmation. Preparing a private bank makes
|
|
101
|
+
that worker eligible for a later readiness check, not for a read: its native
|
|
102
|
+
backend may initialize after attachment. Idle eviction permits one bounded final attempt; release does
|
|
103
|
+
not wait indefinitely for indexing, retry a missing acknowledgement or wake a
|
|
104
|
+
Host just to copy memory. Capacity eviction bypasses maintenance for a queued
|
|
105
|
+
lane. Stop or expiry cancels the pull's SSH probe without disconnecting the
|
|
106
|
+
lane's normal control channel. A short residency can leave records on the worker
|
|
107
|
+
until a later eligible run. Memory is never removed on either side by sync.
|
|
108
|
+
|
|
109
|
+
The durable cursor is bound to the native session, worker enrollment and
|
|
110
|
+
placement, and the HEAD destination. A bounded, cyclic scan can rediscover an
|
|
111
|
+
edited row or a reused SQLite row ID. Each page examines at most 64 working
|
|
112
|
+
rows plus one lookahead and returns at most 16 facts, 2 KiB each, in a 24 KiB
|
|
113
|
+
page. After a complete scan with one stable bank-change stamp the worker can
|
|
114
|
+
answer without reading or transmitting the same facts. A new Host attempt
|
|
115
|
+
invalidates that stamp, not the destination's record IDs. Native import IDs bind the
|
|
116
|
+
logical destination, origin and fact text, not the source row number or ID: two
|
|
117
|
+
rows with the same witnessed text in the same lane represent one imported fact.
|
|
118
|
+
Replay cannot overwrite existing records
|
|
119
|
+
or schedule another embedding for unchanged text. HEAD keeps a destination-scoped
|
|
120
|
+
digest receipt, not the fact text: forgetting an imported fact locally does not
|
|
121
|
+
make replay recreate it. A crash after reserving the digest but before native
|
|
122
|
+
commit leaves that uncertain fact on the worker rather than replaying it.
|
|
123
|
+
This is an append-only
|
|
124
|
+
transfer of observed facts, **not** a replica of updates or deletions. Neither
|
|
125
|
+
the cursor nor an SSH acknowledgement proves a vector exists. `lane_inspect`
|
|
126
|
+
reports page-level counts; only readback of a matching local model/vector
|
|
127
|
+
counts as indexed. `pending` counts a running native embedding task; `deferred`
|
|
128
|
+
means the text is present but no current task or vector was confirmed;
|
|
129
|
+
`disabled` means the configured policy is text-only. Imported records
|
|
130
|
+
are marked `IMPORTED` and receive lexical indexing. The HEAD adapter calls the
|
|
131
|
+
live BEAM `importFromDict({ working_memory: … }, false)`, never the worker's
|
|
132
|
+
export or a vector insert. Only new records are submitted for native
|
|
133
|
+
[embedding](https://github.com/can1357/oh-my-pi/blob/b55cd1bb664d8ab46ddc77f2a34eb47555dbf1ac/packages/mnemopi/src/core/beam/store.ts).
|
|
134
|
+
An active-model vector is checked locally
|
|
135
|
+
after the native task settles; a missing vector is not proof of provider
|
|
136
|
+
failure or an instruction to send the text again. The adapter uses the
|
|
137
|
+
pinned SDK's document embedding and conditional live-vector insert for just
|
|
138
|
+
the new rows. It never rewrites fact text or starts a whole-bank reindex.
|
|
139
|
+
The package's normal postinstall prepares `.upstream/worker-memory-sdk.mjs`
|
|
140
|
+
from the locked dependencies for stock CLIs that cannot import those helpers
|
|
141
|
+
directly. This does not build or replace OMP; a missing supported capability
|
|
142
|
+
does not switch the lane to a shared memory store.
|
|
143
|
+
Coordination receipts, text inserts and delayed vector writes all defer on
|
|
144
|
+
lock contention rather than blocking HEAD's event loop.
|
|
145
|
+
HEAD must have a persistent profile that remains safe on a normal bank reopen:
|
|
146
|
+
`mnemopi.noEmbeddings: true` for lexical-only use, or `models.offline: true`.
|
|
147
|
+
Immediate vector indexing requires an embedding provider already scoped and
|
|
148
|
+
authorized on the live HEAD bank. A local model name or cached weights alone
|
|
149
|
+
are not such a handle: text is searchable and the vector is reported as
|
|
150
|
+
deferred. The importer does not initialize an unscoped model, download one or
|
|
151
|
+
launch another CLI. A temporary offline or text-only override alone is not sufficient.
|
|
152
|
+
|
|
153
|
+
An online HEAD with embeddings enabled is **not** a destination, even if its
|
|
154
|
+
model name is local. The pinned stock [reopen repair](https://github.com/can1357/oh-my-pi/blob/b55cd1bb664d8ab46ddc77f2a34eb47555dbf1ac/packages/mnemopi/src/core/beam/store.ts)
|
|
155
|
+
embeds missing vectors and, on any stale model stamp, the whole bank. Other
|
|
156
|
+
native sessions can write stamps into the same project bank. The [embedding
|
|
157
|
+
resolver](https://github.com/can1357/oh-my-pi/blob/b55cd1bb664d8ab46ddc77f2a34eb47555dbf1ac/packages/mnemopi/src/core/embeddings.ts)
|
|
158
|
+
can use a process-wide provider before the named local model. Sync cannot bind
|
|
159
|
+
a future stock reopen to a provider per imported row. An enabled HTTP profile
|
|
160
|
+
is also ineligible; stock does not authorize redirect targets individually.
|
|
161
|
+
Changing the operator's durable policy later can change how native OMP uses
|
|
162
|
+
facts already stored.
|
|
163
|
+
|
|
164
|
+
No transferred text is submitted as a prompt, published to a messenger or
|
|
165
|
+
included in a sync diagnostic. Once stored, the destination's normal OMP
|
|
166
|
+
recall and compaction policies still apply to it as memory data. Anyone with
|
|
167
|
+
access to that native repository/profile can potentially recall those facts.
|
|
168
|
+
Only enable transfer for a trusted workspace. Secret-pattern checks reject
|
|
169
|
+
recognizable credentials; they cannot determine whether an arbitrary
|
|
170
|
+
natural-language fact is confidential.
|
|
171
|
+
|
|
172
|
+
### Management tools
|
|
173
|
+
|
|
47
174
|
The [head extension](../../src/extension.ts) restricts manager tools to
|
|
48
175
|
the managed root. Use live tool schemas for arguments and [head role
|
|
49
176
|
references](../../skills/head/SKILL.md) for operating policy.
|
|
@@ -101,51 +228,42 @@ pending native dialog. Omitting `to` keeps the default: a topic-owned question
|
|
|
101
228
|
goes directly to its authorized topic; a manager-handoff question goes to HEAD.
|
|
102
229
|
HEAD answers with an original option or escalates the same card on its original
|
|
103
230
|
route via `lane_review_decision`. Do not use a decision to change scope or
|
|
104
|
-
grant native approvals.
|
|
105
|
-
|
|
106
|
-
An explicit HEAD-directed question on the resulting corrective assignment is
|
|
107
|
-
cancelled privately, not rerouted to the owner.
|
|
231
|
+
grant native approvals. A direct bound-topic owner instruction can revise
|
|
232
|
+
the assignment without a HEAD decision.
|
|
108
233
|
HEAD uses `lane_message` for a specific authorized follow-up; neither an
|
|
109
234
|
observation nor a decision supplies fresh dispatch authority. Do not poll or
|
|
110
235
|
schedule a model just to check for updates.
|
|
111
236
|
|
|
112
|
-
###
|
|
113
|
-
|
|
114
|
-
An
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
corrective input only after the original lane run and HEAD review both
|
|
143
|
-
settle successfully. The correction applies only to that assignment, not to
|
|
144
|
-
tool availability, native approvals, operator settings, or other work. It
|
|
145
|
-
cannot replay denied or uncertain effects. The lane delivers the corrected
|
|
146
|
-
outcome on the original thread; HEAD does not echo the request or add a
|
|
147
|
-
second reply. If the correction is unsupported or unclear, HEAD gives one
|
|
148
|
-
bounded reason or clarification there, without dispatching work.
|
|
237
|
+
### Direct owner changes to bound-topic work
|
|
238
|
+
|
|
239
|
+
An authenticated owner's direct, explicit work instruction in a lane's own
|
|
240
|
+
bound topic supersedes conflicting task scope or acceptance in an earlier
|
|
241
|
+
HEAD brief. The lane applies the change inside its selected workspace when the
|
|
242
|
+
native session consumes the input, whether as a new ordinary prompt or as an
|
|
243
|
+
eligible steer. Apply only what the owner changed. A binding by itself does not
|
|
244
|
+
authorize work; quoted or forwarded content, attachments, historical excerpts,
|
|
245
|
+
child reports and sibling assignments do not acquire the owner's authority.
|
|
246
|
+
The original brief and acceptance remain available as prior context even if the
|
|
247
|
+
opening prompt never ran. They are not a veto over the owner's later instruction.
|
|
248
|
+
|
|
249
|
+
The [ordinary topic routing rules](messaging.md#topic-routing-and-controls)
|
|
250
|
+
still apply. Keep the original source, session and delivery identity; steering
|
|
251
|
+
does not change an existing manager handoff's reporting mode. There is no
|
|
252
|
+
separate HEAD approval, scope-review turn or replayed handoff. HEAD can still
|
|
253
|
+
coordinate shared edit ownership, dependencies and integration, and answer or
|
|
254
|
+
escalate a genuine tracked decision on its original route.
|
|
255
|
+
If a direct instruction joined a manager run, its decision keeps the opener's
|
|
256
|
+
card and destination. HEAD receives the question, not private steer text or a
|
|
257
|
+
claim that the original brief still represents current permission.
|
|
258
|
+
|
|
259
|
+
The instruction does not move the lane to another workspace or checkout,
|
|
260
|
+
take over sibling work, change operator settings, bypass tool restrictions or
|
|
261
|
+
native approvals, resume paused work, or clear an uncertain effect. It does
|
|
262
|
+
not undo completed work or authorize repeating a denied or uncertain action.
|
|
263
|
+
Old pending records from the retired review path are not a source of work or
|
|
264
|
+
permission and must not dispatch or replay on upgrade. This does not discard a
|
|
265
|
+
verified completed result still waiting for its first delivery on the original
|
|
266
|
+
route. An interrupted send is uncertain, not a reason to send again.
|
|
149
267
|
|
|
150
268
|
### Failed lane requests
|
|
151
269
|
|
|
@@ -484,6 +602,25 @@ keyword interpretation; keep generated metadata fenced. Selection is
|
|
|
484
602
|
serialized, not injected as steering. A conflict or missing advertised
|
|
485
603
|
capability does not silently downgrade a selected SUPER request to ordinary work.
|
|
486
604
|
|
|
605
|
+
HEAD supports native Superstack as a separate branch-local mode, based on
|
|
606
|
+
[omp-superkit `12d19ec96eb44e87acec9492269cbe638392cbef`](https://github.com/dbc-hbin/omp-superkit/tree/12d19ec96eb44e87acec9492269cbe638392cbef).
|
|
607
|
+
For an original owner request routed to HEAD, a leading `/superstack` or
|
|
608
|
+
`superstack` is pinned at admission before checking the native Host's command
|
|
609
|
+
advertisement at dispatch. Discord's physically written text must corroborate
|
|
610
|
+
the selector. Telegram must corroborate it independently of the arguments,
|
|
611
|
+
which may contain protected formatting. Redaction cannot turn a task into a
|
|
612
|
+
toggle. Existing receipts without a selection stay ordinary across replay.
|
|
613
|
+
It is not a messenger control, a lane `workflow` value, or a native goal.
|
|
614
|
+
The native task prefix is followed immediately by the original route envelope,
|
|
615
|
+
so later task prose cannot establish background job ownership. A pending
|
|
616
|
+
selection fences later HEAD prompts and steers. Bare enable and exact `off`
|
|
617
|
+
wait for full native idle and carry no task or envelope. A matching native
|
|
618
|
+
no-model receipt and current-branch journal state confirm the toggle; verified
|
|
619
|
+
non-application cancels, and unavailable evidence holds later work without
|
|
620
|
+
replay. Native flags still govern whether the policy is applied; edits, quoted
|
|
621
|
+
text and reports do not select it. An older Host without the command holds the
|
|
622
|
+
explicit request instead of running it as ordinary work.
|
|
623
|
+
|
|
487
624
|
SUPER's commands and defaults are based on
|
|
488
625
|
[omp-superkit `c11a6e4e185f9c31f484a05a13528ef724337bc1`](https://github.com/dbc-hbin/omp-superkit/tree/c11a6e4e185f9c31f484a05a13528ef724337bc1).
|
|
489
626
|
[Revision `e8825367bed06985ccb1ee1e635dce850e22bbb9`](https://github.com/dbc-hbin/omp-superkit/tree/e8825367bed06985ccb1ee1e635dce850e22bbb9)
|
package/docs/design/messaging.md
CHANGED
|
@@ -37,6 +37,10 @@ still parses as a command.
|
|
|
37
37
|
The owner, guild and parent-channel checks still apply. Owner DMs, Discord
|
|
38
38
|
application commands, approval components and restricted group rooms retain
|
|
39
39
|
their existing policies.
|
|
40
|
+
An ordinary message from the configured owner in an allowed guild but excluded
|
|
41
|
+
parent channel is not admitted or answered. Once routing identifies the
|
|
42
|
+
exclusion, the Gateway can log only the guild, destination and parent IDs, at
|
|
43
|
+
most once per second per Discord adapter, with no additional metadata lookup.
|
|
40
44
|
|
|
41
45
|
Standalone owner preferences, such as the shared reply voice, cannot be set
|
|
42
46
|
through a reply, forward, or attachment. Adapters keep that provenance even
|
|
@@ -222,6 +226,21 @@ before the foreign completion is still sent to its own conversation. If a
|
|
|
222
226
|
native batch cannot be split by origin, only individually identified job
|
|
223
227
|
receipts are sent.
|
|
224
228
|
|
|
229
|
+
Same-conversation Discord HEAD steers still share one final answer. When the
|
|
230
|
+
native session has observed a steer before that answer and completed its
|
|
231
|
+
correlated prompt, the controller records its physical source with the answer.
|
|
232
|
+
The opening request may be a Discord application command with no physical
|
|
233
|
+
message of its own. An unrelated background result or notification cannot
|
|
234
|
+
prove that a joined message was answered, even in the same topic. A clean
|
|
235
|
+
answer observed before that input can still provide proof if selected for
|
|
236
|
+
delivery. An observed job launched in a continuation proved by a completion
|
|
237
|
+
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
|
|
241
|
+
request's work succeeded. An uncertain or failed answer send does not produce
|
|
242
|
+
a link.
|
|
243
|
+
|
|
225
244
|
### Uncertain submissions
|
|
226
245
|
|
|
227
246
|
Do not replay an ambiguous native prompt, approval response or external mutation.
|
|
@@ -371,6 +390,18 @@ See the [operations guide](../OPERATIONS.en.md#4-commands-and-daily-use) for com
|
|
|
371
390
|
quotes. They apply only to original owner messages in physical Discord work
|
|
372
391
|
threads, not edits, quoted text or attachments. DM and other adapters retain
|
|
373
392
|
their existing topic behavior.
|
|
393
|
+
- `/new` and plain split directives keep the source parent. With operator opt-in,
|
|
394
|
+
HEAD may select a different native parent for an original authorized owner
|
|
395
|
+
request via `lane_start`. The default `"allowlist"` scope requires the
|
|
396
|
+
destination in `allowedChannelIds`; opt-in `"guild"` scope also permits an
|
|
397
|
+
eligible unlisted parent in the same allowed guild, bot account and owner.
|
|
398
|
+
Restricted `groupRooms` do not qualify. The Gateway verifies actual Discord
|
|
399
|
+
parent identity, capability and permissions before creation. It does not
|
|
400
|
+
add ACLs or fall back after refusal or uncertain creation. An unlisted
|
|
401
|
+
destination is authorized only for the exact confirmed native work thread.
|
|
402
|
+
The grant permits work delivery, not text or command intake or history
|
|
403
|
+
recovery; approvals remain on the original allowed route. The source receives
|
|
404
|
+
one placement notice; progress and final work reports use the work thread.
|
|
374
405
|
- `/head <request>` explicitly addresses the shared coordination model (Slack:
|
|
375
406
|
`!head` or `/superagent-head`). Manager handoffs keep HEAD's review path.
|
|
376
407
|
When HEAD explicitly uses `lane_message` to continue an existing physical
|
|
@@ -413,6 +444,19 @@ See the [operations guide](../OPERATIONS.en.md#4-commands-and-daily-use) for com
|
|
|
413
444
|
and deliver one result for a jointly handled cohort. History lookup verifies
|
|
414
445
|
a joined reply's topic ownership and its own completed native receipt, not the
|
|
415
446
|
manager's instructions or completion.
|
|
447
|
+
An authenticated owner's direct, explicit work instruction in the bound topic
|
|
448
|
+
can [revise the lane's scope or acceptance](execution.md#direct-owner-changes-to-bound-topic-work)
|
|
449
|
+
within the selected workspace once consumed, including on a steer. This keeps
|
|
450
|
+
the normal reporting mode and does not grant authority to quoted or forwarded
|
|
451
|
+
material, or to sibling tasks. Before submitting direct work, including a steer
|
|
452
|
+
or queued request after restart, verify the original account and route with
|
|
453
|
+
the connected Gateway. If the account cannot be verified, keep it pending.
|
|
454
|
+
An original physically older than an already admitted message in the same
|
|
455
|
+
logical topic is retained but not submitted as a fresh instruction. Normal
|
|
456
|
+
ordered inputs are not superseded merely because several are queued together.
|
|
457
|
+
For Telegram, use the written selector and the adapter's formatting evidence
|
|
458
|
+
consistently at admission, scheduling and dispatch: quoted selectors cannot
|
|
459
|
+
select a workflow or force a standalone turn. Formatted arguments remain data.
|
|
416
460
|
Controls, internal reports and workflow selection do not join the run.
|
|
417
461
|
Pause, approval, compaction and uncertainty gates still apply. Durable intake
|
|
418
462
|
and RPC admission do not prove consumption: OMP consumes steers at native
|
|
@@ -504,7 +548,11 @@ there is no provider fallback or mutation of local quota counters.
|
|
|
504
548
|
Thread capability comes from the authenticated adapter. Permission or network
|
|
505
549
|
failure is not permission to fall back to another destination. Preserve the
|
|
506
550
|
original binding when creating a sibling topic and journal creation intent before
|
|
507
|
-
the remote effect.
|
|
551
|
+
the remote effect. An opted-in cross-channel parent is journaled as the requested
|
|
552
|
+
destination, and only the exact thread the adapter recorded for that parent
|
|
553
|
+
reconciles an uncertain creation; a source-parent thread or another thread in
|
|
554
|
+
the destination channel is not evidence of that attempt. Discord
|
|
555
|
+
`thread_inspect` reads actual thread and parent policy;
|
|
508
556
|
`lane_thread_update` uses the original user source, checks the route and
|
|
509
557
|
permissions, then reads back title, tags or archived state. Exact tag IDs and
|
|
510
558
|
required/moderated tag policy apply. Archiving a thread does not pause its lane,
|
|
@@ -582,8 +630,6 @@ a bound topic. On admission of the valid source, the controller immediately
|
|
|
582
630
|
queues one durable HEAD review tied to the same pending native lane dialog.
|
|
583
631
|
Queueing is not an answer or a guarantee of when HEAD will reply. An unowned
|
|
584
632
|
native dialog after reconnect is held if its original topic cannot be verified.
|
|
585
|
-
Corrective assignments retain owner-only routing: an explicit `to: "head"`
|
|
586
|
-
question is refused and cancelled privately, not shown to the owner.
|
|
587
633
|
|
|
588
634
|
The isolated HEAD review permits only `lane_review_decision` for that dialog.
|
|
589
635
|
For a routine reversible choice shown to be within the assignment, HEAD
|
|
@@ -591,14 +637,20 @@ returns an original option to the lane and records the reason internally,
|
|
|
591
637
|
without a separate messenger message. When the owner must decide or the
|
|
592
638
|
supplied evidence cannot establish scope, HEAD escalates that same dialog;
|
|
593
639
|
the original route gets the card with the unchanged questions and choices
|
|
594
|
-
and the reason for escalation. If HEAD stops during an existing
|
|
640
|
+
and the reason for escalation. If HEAD stops during an existing
|
|
595
641
|
review, the controller may escalate that exact pending dialog to the original
|
|
596
|
-
owner.
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
642
|
+
owner. Recommendations are not preselected. This path does not change
|
|
643
|
+
assignment scope, grant tool permission or manufacture user consent. A direct
|
|
644
|
+
bound-topic work instruction can revise the task, but recommendation, silence,
|
|
645
|
+
normal text, quotes and reports are not replies to a native approval card.
|
|
646
|
+
|
|
647
|
+
On upgrade, a card that may belong to an interrupted legacy HEAD scope review
|
|
648
|
+
cannot be displayed or answered as an ordinary approval. Retire an already
|
|
649
|
+
presented card on its exact original route; a lost dismissal receipt is not
|
|
650
|
+
permission to send another dismissal or a native response. A later, verified
|
|
651
|
+
native goal resume can own a new dialog without reviving a previously held one.
|
|
652
|
+
The lane reopens in the same SQLite transaction that records the resume's native
|
|
653
|
+
owner and request ID. A failed ownership read or a duplicate cannot lift a pause.
|
|
602
654
|
|
|
603
655
|
## Content and delivery
|
|
604
656
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# omp-superagent 0.1.15
|
|
2
|
+
|
|
3
|
+
- In a bound topic, the authenticated owner can change a lane’s assignment directly. The lane keeps its workspace and the conditions the owner did not change; it does not ask HEAD to approve the new scope. Pauses and native approvals still apply.
|
|
4
|
+
- A late original message cannot override a newer instruction in the same topic. On upgrade, retired scope-review cards cannot authorize new work, and uncertain deliveries are not replayed.
|
|
5
|
+
- After `/restart` interrupts an active HEAD goal, the replacement can continue that same goal on its original conversation. It does not replay the interrupted prompt or move its approvals to the conversation that requested the restart.
|
|
6
|
+
- Discord links joined HEAD replies to their original messages. The optional `remoteMemorySync` setting lets HEAD pull eligible project facts from an idle paired SSH lane; it is off by default.
|
|
7
|
+
- The Gateway adapters now share native dialog validation, and Gateway and Host share RPC chunk limits. The test suite reuses its loopback operator across workers, and CI caches Rust dependencies without skipping tests or reusing tagged package builds.
|
|
8
|
+
|
|
9
|
+
**Before upgrading**, follow the [upgrade procedure](https://github.com/dbc-hbin/omp-superagent/blob/v0.1.15/docs/OPERATIONS.en.md#update-an-existing-installation) ([한국어](https://github.com/dbc-hbin/omp-superagent/blob/v0.1.15/docs/OPERATIONS.md#기존-설치-업데이트)). Use the old installation to stop affected resident lanes and Gateway/HEAD and verify their exits. `stop main` alone does not stop independent lanes. Keep the original config and journals, install `omp-superagent@0.1.15`, and restart only previously running Gateways.
|
|
10
|
+
|
|
11
|
+
The `v0.1.14` tag did not publish a package: native restart and bound-topic steering checks failed before publication.
|
|
12
|
+
|
|
13
|
+
[Changes since 0.1.13](https://github.com/dbc-hbin/omp-superagent/compare/v0.1.13...v0.1.15)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# omp-superagent 0.1.16
|
|
2
|
+
|
|
3
|
+
- HEAD supports `/head /superstack <task>` on a Host with a compatible managed omp-superkit revision. `/head /superstack` and `/head /superstack off` wait for the Host to become idle, then change the current HEAD branch without starting work. Command selection is pinned at admission, and HEAD confirms a toggle only after reading back the native branch state. Superstack does not create a goal or become a lane workflow.
|
|
4
|
+
- Discord can place new lane threads in a different eligible parent in the same guild when `discord.allowCrossChannelThreads` is enabled. Placement stays in the source parent by default. The optional `discord.crossChannelThreadScope` defaults to `"allowlist"`; `"guild"` permits eligible unlisted destinations without granting them request, command, approval, or history access.
|
|
5
|
+
- Discord adds the configured owner to bot-created work threads. Scoped work-thread continuations and approvals stay bound to their original authorized routes.
|
|
6
|
+
|
|
7
|
+
**Before upgrading**, follow the [upgrade procedure](https://github.com/dbc-hbin/omp-superagent/blob/v0.1.16/docs/OPERATIONS.en.md#update-an-existing-installation) ([한국어](https://github.com/dbc-hbin/omp-superagent/blob/v0.1.16/docs/OPERATIONS.md#기존-설치-업데이트)). Use the old installation to stop affected resident lanes and Gateway/HEAD and verify their exits. `stop main` alone does not stop independent lanes. Keep the original config and journals, install `omp-superagent@0.1.16`, and restart only previously running Gateways.
|
|
8
|
+
|
|
9
|
+
[Changes since 0.1.15](https://github.com/dbc-hbin/omp-superagent/compare/v0.1.15...v0.1.16)
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omp-superagent",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16",
|
|
4
4
|
"description": "One messenger-connected OMP head with independent work sessions",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "dbc-hbin",
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"src/",
|
|
17
17
|
"scripts/build-host-owner.ts",
|
|
18
18
|
"scripts/prepare-super.ts",
|
|
19
|
+
"scripts/prepare-worker-memory.ts",
|
|
19
20
|
"scripts/setup.sh",
|
|
20
21
|
"scripts/upgrade-evidence-files.mjs",
|
|
21
22
|
"scripts/upgrade-evidence.mjs",
|
|
@@ -38,7 +39,8 @@
|
|
|
38
39
|
"build:owner": "bun --no-env-file scripts/build-host-owner.ts --owner",
|
|
39
40
|
"build:native": "bun --no-env-file scripts/build-host-owner.ts",
|
|
40
41
|
"check": "tsc --noEmit",
|
|
41
|
-
"test": "bun run build:native &&
|
|
42
|
+
"test": "bun run build:native && bun run test:suite",
|
|
43
|
+
"test:suite": "operator=$(bun --no-env-file test/fixtures/operator.ts) && OMP_TEST_OPERATOR_LOOPBACK_BIN=\"$operator\" bun --no-env-file test --parallel=2 test",
|
|
42
44
|
"test:ci": "bun run build:native && bun --no-env-file scripts/ci.ts",
|
|
43
45
|
"test:baseline": "bash scripts/test-omp.sh",
|
|
44
46
|
"release": "bun --no-env-file scripts/release.ts",
|
|
@@ -46,7 +48,7 @@
|
|
|
46
48
|
"setup": "bash scripts/setup.sh",
|
|
47
49
|
"prepare:ulw": "bun scripts/prepare-super.ts",
|
|
48
50
|
"prepare": "bun run build:native --install",
|
|
49
|
-
"postinstall": "bun scripts/prepare-super.ts"
|
|
51
|
+
"postinstall": "bun --no-env-file scripts/prepare-worker-memory.ts && bun scripts/prepare-super.ts"
|
|
50
52
|
},
|
|
51
53
|
"engines": {
|
|
52
54
|
"bun": ">=1.4.4"
|
|
@@ -54,6 +56,7 @@
|
|
|
54
56
|
"dependencies": {
|
|
55
57
|
"@oh-my-pi/pi-catalog": "19.2.1",
|
|
56
58
|
"@oh-my-pi/pi-coding-agent": "19.2.1",
|
|
59
|
+
"@oh-my-pi/pi-mnemopi": "19.2.1",
|
|
57
60
|
"@oh-my-pi/pi-natives": "19.2.1",
|
|
58
61
|
"@oh-my-pi/pi-utils": "19.2.1",
|
|
59
62
|
"@sinclair/typebox": "^0.34.41",
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
import { mkdir, rename, rm, writeFile } from "node:fs/promises";
|
|
3
|
+
import { join, resolve } from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
|
|
6
|
+
// The standalone OMP extension loader supplies these stock modules directly.
|
|
7
|
+
// Bundle only the unexposed Mnemopi helpers, from the installed locked SDK.
|
|
8
|
+
const root = resolve(import.meta.dir, "..");
|
|
9
|
+
const nativeConfig = fileURLToPath(import.meta.resolve("@oh-my-pi/pi-coding-agent/mnemopi/config"));
|
|
10
|
+
const result = await Bun.build({
|
|
11
|
+
entrypoints: [join(root, "src/omp/worker-memory-sdk.ts")],
|
|
12
|
+
target: "bun",
|
|
13
|
+
format: "esm",
|
|
14
|
+
minify: true,
|
|
15
|
+
external: ["@oh-my-pi/pi-utils", "@oh-my-pi/pi-utils/lru", "@oh-my-pi/pi-natives",
|
|
16
|
+
"@oh-my-pi/pi-ai", "@oh-my-pi/pi-ai/error", "@oh-my-pi/pi-catalog/hosts"],
|
|
17
|
+
plugins: [{
|
|
18
|
+
name: "stock-expand-tilde",
|
|
19
|
+
setup(build) {
|
|
20
|
+
// v19.2.1 imports only expandTilde here; path-utils re-exports it
|
|
21
|
+
// unchanged from pi-utils. Do not pull unrelated editing tools into OMP.
|
|
22
|
+
build.onResolve({ filter: /^\.\.\/tools\/path-utils$/ }, ({ importer }) =>
|
|
23
|
+
importer === nativeConfig ? { path: "@oh-my-pi/pi-utils", external: true } : undefined);
|
|
24
|
+
},
|
|
25
|
+
}],
|
|
26
|
+
});
|
|
27
|
+
const [module] = result.outputs;
|
|
28
|
+
if (!result.success || !module || result.outputs.length !== 1)
|
|
29
|
+
throw new AggregateError(result.logs, "Could not prepare the stock worker memory helpers");
|
|
30
|
+
|
|
31
|
+
const directory = join(root, ".upstream");
|
|
32
|
+
await mkdir(directory, { recursive: true });
|
|
33
|
+
const output = join(directory, "worker-memory-sdk.mjs");
|
|
34
|
+
const staging = `${output}.${crypto.randomUUID()}`;
|
|
35
|
+
await writeFile(staging, new Uint8Array(await module.arrayBuffer()), { flag: "wx" });
|
|
36
|
+
try { await rename(staging, output); }
|
|
37
|
+
finally { await rm(staging, { force: true }); }
|