omp-superagent 0.1.10 → 0.1.13
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 +71 -15
- package/README.ko.md +10 -1
- package/README.md +10 -1
- package/THIRD_PARTY_NOTICES.md +35 -436
- package/assets/architecture-dark.svg +7 -12
- package/assets/architecture.ko-dark.svg +7 -12
- package/assets/architecture.ko.svg +7 -12
- package/assets/architecture.mmd +5 -13
- package/assets/architecture.svg +7 -12
- package/config.example.json +1 -0
- package/docs/OPERATIONS.en.md +282 -53
- package/docs/OPERATIONS.md +264 -45
- package/docs/design/execution.md +80 -52
- package/docs/design/messaging.md +113 -32
- package/docs/releases/0.1.11.md +20 -0
- package/docs/releases/0.1.13.md +13 -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 +13 -11
- package/scripts/{prepare-ulw.ts → prepare-super.ts} +1 -1
- package/scripts/upgrade-evidence-files.mjs +100 -0
- package/scripts/upgrade-evidence.mjs +192 -0
- package/scripts/upgrade-host-wire.mjs +162 -0
- package/skills/head/SKILL.md +12 -3
- package/skills/head/references/routing.md +1 -1
- package/skills/head/references/supervision.md +23 -26
- package/skills/lane/SKILL.md +28 -21
- package/skills/lane/references/workflow.md +15 -17
- package/src/cli.ts +33 -53
- package/src/{config.ts → config/config.ts} +7 -3
- package/src/config/wake-config.ts +36 -0
- package/src/contracts.ts +61 -12
- package/src/{cron-jobs.ts → cron/cron-jobs.ts} +21 -13
- package/src/{cron-pr-intake.ts → cron/cron-pr-intake.ts} +4 -4
- package/src/{cron-schedule.ts → cron/cron-schedule.ts} +3 -3
- package/src/extension.ts +43 -25
- package/src/{gateway-client.ts → gateway/gateway-client.ts} +89 -32
- package/src/{gateway-native.ts → gateway/gateway-native.ts} +4 -4
- package/src/{gateway-protocol.ts → gateway/gateway-protocol.ts} +69 -14
- package/src/{gateway-wire.ts → gateway/gateway-wire.ts} +12 -7
- package/src/gateway-config.ts +1 -1
- package/src/gateway-restart-env.ts +3 -3
- package/src/{group-access.ts → group/group-access.ts} +8 -3
- package/src/{group-policy.ts → group/group-policy.ts} +2 -2
- package/src/{group-runner.ts → group/group-runner.ts} +11 -6
- package/src/host-extension.ts +164 -36
- package/src/host-sdk-helper.ts +66 -65
- package/src/{decision-tool.ts → lane/decision-tool.ts} +12 -4
- package/src/{decisions.ts → lane/decisions.ts} +12 -10
- package/src/{lane-models.ts → lane/lane-models.ts} +1 -1
- package/src/{lane-rows.ts → lane/lane-rows.ts} +2 -2
- package/src/{lane-watch.ts → lane/lane-watch.ts} +6 -2
- package/src/{workflow.ts → lane/workflow.ts} +1 -1
- package/src/lane-extension.ts +25 -7
- package/src/managed-memory-helper.ts +2 -2
- package/src/{managed-ulw-probe.ts → managed-super-probe.ts} +3 -3
- package/src/{delivery.ts → messaging/delivery.ts} +1 -1
- package/src/{discord-command-registration.ts → messaging/discord-command-registration.ts} +3 -2
- package/src/{discord-context.ts → messaging/discord-context.ts} +1 -1
- package/src/{messenger-command-catalog.json → messaging/messenger-command-catalog.json} +1 -0
- package/src/messaging/messenger-commands.ts +55 -0
- package/src/{result-attachment.ts → messaging/result-attachment.ts} +3 -3
- package/src/{slack-command-registration.ts → messaging/slack-command-registration.ts} +3 -3
- package/src/{telegram-command-registration.ts → messaging/telegram-command-registration.ts} +2 -2
- package/src/omp/head-resume.ts +123 -0
- package/src/{host-owner-path.ts → omp/host-owner-path.ts} +1 -1
- package/src/{host-protocol.ts → omp/host-protocol.ts} +10 -2
- package/src/{host-superkit.ts → omp/host-superkit.ts} +1 -1
- package/src/{host.ts → omp/host.ts} +26 -17
- package/src/{installed-omp.ts → omp/installed-omp.ts} +1 -1
- package/src/{managed-memory.ts → omp/managed-memory.ts} +2 -2
- package/src/{managed-ulw.ts → omp/managed-super.ts} +42 -16
- package/src/omp/native-journal.ts +124 -0
- package/src/{native-launch-profile.ts → omp/native-launch-profile.ts} +6 -2
- package/src/{native-presets.ts → omp/native-presets.ts} +2 -2
- package/src/omp/native-sessions.ts +124 -0
- package/src/{omp-usage.ts → omp/omp-usage.ts} +1 -1
- package/src/{soul.ts → omp/soul.ts} +2 -2
- package/src/omp/stock-head-launch.ts +31 -0
- package/src/{autostart.ts → operator/autostart.ts} +3 -3
- package/src/{operator.ts → operator/operator.ts} +2 -2
- package/src/{setup-judge.ts → operator/setup-judge.ts} +1 -1
- package/src/{setup-profiles.ts → operator/setup-profiles.ts} +2 -2
- package/src/{setup.ts → operator/setup.ts} +5 -5
- package/src/operator/stop-lane.ts +25 -0
- package/src/{pr-intake-automation.ts → pr/pr-intake-automation.ts} +1 -1
- package/src/{pr-intake-mode.ts → pr/pr-intake-mode.ts} +3 -3
- package/src/{pr-intake-review.ts → pr/pr-intake-review.ts} +5 -5
- package/src/{pr-intake-work.ts → pr/pr-intake-work.ts} +1 -1
- package/src/{pr-review-models.ts → pr/pr-review-models.ts} +2 -2
- package/src/{pr-watch.ts → pr/pr-watch.ts} +36 -26
- package/src/{message-order.ts → routing/message-order.ts} +1 -1
- package/src/{topic-history.ts → routing/topic-history.ts} +2 -2
- package/src/{topic-request.ts → routing/topic-request.ts} +4 -2
- package/src/{runtime.ts → runtime/controller.ts} +867 -1213
- package/src/runtime/deferred-routing.ts +106 -0
- package/src/runtime/dm-timeline.ts +194 -0
- package/src/{head-recovery.ts → runtime/head-recovery.ts} +1 -1
- package/src/{head-rotation.ts → runtime/head-rotation.ts} +32 -5
- package/src/runtime/model-journal.ts +119 -0
- package/src/runtime/native-frames.ts +131 -0
- package/src/{observation-request.ts → runtime/observation-request.ts} +1 -1
- package/src/runtime/preset-sync.ts +232 -0
- package/src/runtime/preset-watch-paths.ts +137 -0
- package/src/runtime/result-attachments.ts +146 -0
- package/src/storage/deferred-routing.ts +149 -0
- package/src/{store.ts → storage/store.ts} +75 -42
- package/src/{worker-bridge.ts → worker/worker-bridge.ts} +2 -2
- package/src/{worker-enrollment.ts → worker/worker-enrollment.ts} +2 -2
- package/src/{worker-host.ts → worker/worker-host.ts} +7 -3
- package/src/{worker-placement.ts → worker/worker-placement.ts} +1 -1
- package/src/{worker-profile.ts → worker/worker-profile.ts} +1 -1
- package/src/{worker-registration.ts → worker/worker-registration.ts} +2 -2
- package/src/{worker-request.ts → worker/worker-request.ts} +5 -5
- package/src/{worker-service.ts → worker/worker-service.ts} +2 -2
- package/src/{worker-trust.ts → worker/worker-trust.ts} +1 -1
- package/src/{worker-wire.ts → worker/worker-wire.ts} +3 -3
- package/src/worker-serve-prepare.ts +4 -4
- package/src/board-extension.ts +0 -217
- package/src/board.ts +0 -467
- package/src/gateway-host-helper.ts +0 -13
- package/src/messenger-commands.ts +0 -15
- package/src/native-sessions.ts +0 -34
- /package/src/{credentials.ts → config/credentials.ts} +0 -0
- /package/src/{lane-report.ts → lane/lane-report.ts} +0 -0
- /package/src/{dialog.ts → messaging/dialog.ts} +0 -0
- /package/src/{telegram-command-languages.json → messaging/telegram-command-languages.json} +0 -0
- /package/src/{host-broker-services.ts → omp/host-broker-services.ts} +0 -0
- /package/src/{host-inventory-manifest.ts → omp/host-inventory-manifest.ts} +0 -0
- /package/src/{host-reply-voice.ts → omp/host-reply-voice.ts} +0 -0
- /package/src/{host-services.ts → omp/host-services.ts} +0 -0
- /package/src/{native-settings.ts → omp/native-settings.ts} +0 -0
- /package/src/{superkit-skills.ts → omp/superkit-skills.ts} +0 -0
- /package/src/{repository.ts → operator/repository.ts} +0 -0
- /package/src/{pr-github-schema.ts → pr/pr-github-schema.ts} +0 -0
- /package/src/{pr-github.ts → pr/pr-github.ts} +0 -0
- /package/src/{pr-intake-comment.ts → pr/pr-intake-comment.ts} +0 -0
- /package/src/{pr-intake-fix.ts → pr/pr-intake-fix.ts} +0 -0
- /package/src/{pr-intake-github.ts → pr/pr-intake-github.ts} +0 -0
- /package/src/{pr-intake-material.ts → pr/pr-intake-material.ts} +0 -0
- /package/src/{pr-intake-tree.ts → pr/pr-intake-tree.ts} +0 -0
- /package/src/{head-quota.ts → runtime/head-quota.ts} +0 -0
- /package/src/{worker-checkout.ts → worker/worker-checkout.ts} +0 -0
- /package/src/{worker-destination.ts → worker/worker-destination.ts} +0 -0
- /package/src/{worker-doctor.ts → worker/worker-doctor.ts} +0 -0
- /package/src/{worker-ledger.ts → worker/worker-ledger.ts} +0 -0
- /package/src/{worker-repository.ts → worker/worker-repository.ts} +0 -0
- /package/upstream/{ulw.json → super.json} +0 -0
package/docs/OPERATIONS.en.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
[Design](../DESIGN.md) · [Example configuration](../config.example.json) ·
|
|
5
5
|
[Attribution and license notices](../THIRD_PARTY_NOTICES.md)
|
|
6
6
|
|
|
7
|
-
[Install](#1-local-preparation--does-not-start-the-bot) · [Platform apps](#2-platform-apps-and-access) · [Configuration](#3-configuration) · [Daily use](#4-commands-and-daily-use) · [Recovery](#5-operational-scope-and-recovery-constraints) · [Developer verification](#6-developer-verification)
|
|
7
|
+
[Install](#1-local-preparation--does-not-start-the-bot) · [Update](#update-an-existing-installation) · [Platform apps](#2-platform-apps-and-access) · [Configuration](#3-configuration) · [Daily use](#4-commands-and-daily-use) · [Recovery](#5-operational-scope-and-recovery-constraints) · [Developer verification](#6-developer-verification)
|
|
8
8
|
|
|
9
9
|
This guide covers installation, configuration, day-to-day operation, and recovery. Unless
|
|
10
10
|
otherwise noted, file and code paths and shell commands are relative to the **repository root**.
|
|
@@ -35,10 +35,10 @@ Only the head can use `lane_models`, `lane_init_presets`, `lane_start`, `lane_se
|
|
|
35
35
|
`lane_inspect`, `lane_message`, `lane_pause`, `lane_resume`, `lane_close`,
|
|
36
36
|
`thread_inspect`, `lane_thread_update`, `messenger_presence`, `lane_watch`, `pr_watch`, `pr_watch_list`,
|
|
37
37
|
`discord_context`, `discord_purpose_list`, `discord_purpose_set`, `discord_purpose_clear`,
|
|
38
|
-
`decision_list`, `decision_inspect`, and `
|
|
38
|
+
`decision_list`, `decision_inspect`, `decision_withdraw`, and `lane_review_decision`.
|
|
39
39
|
`decision_ask` is available to HEAD and root lanes, but not to native children.
|
|
40
|
-
Use `lane_inspect({})` to list lanes.
|
|
41
|
-
native children receive
|
|
40
|
+
Use `lane_inspect({})` to list lanes. Only root lanes can use `lane_report`; neither
|
|
41
|
+
lanes nor native children receive management authority. Do not install these extensions
|
|
42
42
|
globally in ordinary OMP. See the [management tool contract](design/execution.md#management-tools)
|
|
43
43
|
for tool arguments and role boundaries.
|
|
44
44
|
|
|
@@ -178,29 +178,31 @@ activates depends on native `magicKeywords.enabled`, `magicKeywords.jevify`, and
|
|
|
178
178
|
availability; admission alone does not guarantee it. No global settings are changed.
|
|
179
179
|
jevify needs no SUPER skill lookup, additional lane, goal, model change, or workflow artifact.
|
|
180
180
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
###
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
181
|
+
Internal instructions and manager-handoff reports are in English. Owner-facing replies
|
|
182
|
+
use the owner's language.
|
|
183
|
+
|
|
184
|
+
### Direct Lane Coordination
|
|
185
|
+
|
|
186
|
+
- **Evidence or a wait:** Root lanes use `lane_report` to record selected evidence or an
|
|
187
|
+
exact wait. Direct-topic observations do not notify HEAD. Changed manager-handoff
|
|
188
|
+
evidence or wait transitions are queued for HEAD, not sent directly to Messenger.
|
|
189
|
+
Inspect the observed state when a decision actually depends on it; do not poll.
|
|
190
|
+
- **An in-scope choice that needs HEAD:** Use `decision_ask` with `to: "head"` even in a
|
|
191
|
+
bound topic, for example to resolve overlapping edit ownership. It immediately queues
|
|
192
|
+
one durable review of the original native dialog, not an immediate answer. HEAD answers
|
|
193
|
+
with an original option or escalates the same card to the owner on its original route.
|
|
194
|
+
Omit `to` for normal routing: bound-topic questions go to the owner, manager-handoff
|
|
195
|
+
questions to HEAD. An explicit HEAD question on a corrective assignment is
|
|
196
|
+
cancelled privately, not redirected to the owner.
|
|
197
|
+
- **A conflicting owner correction:** For an eligible standalone original message in
|
|
198
|
+
a bound topic, the root lane calls `lane_report({status:"scope_review", sourceId})`
|
|
199
|
+
directly with the original source ID. Only HEAD may send a corrective `lane_message`
|
|
200
|
+
to that same lane with the verified review ID and exact owner text. Hold the
|
|
201
|
+
disputed work until a corrective assignment arrives. A decision card is not a
|
|
202
|
+
substitute for scope review or native approval.
|
|
203
|
+
|
|
204
|
+
See [direct lane coordination](design/execution.md#direct-lane-coordination) and the
|
|
205
|
+
[scope-review contract](design/execution.md#bound-topic-assignment-scope-review).
|
|
204
206
|
|
|
205
207
|
### Choosing a Model for a New Lane
|
|
206
208
|
|
|
@@ -259,14 +261,196 @@ its OMP path in the first entry of `command`. A relative path is resolved agains
|
|
|
259
261
|
configuration file's directory, and all lanes use the same path. This repository does not
|
|
260
262
|
download OMP or build it from source.
|
|
261
263
|
|
|
264
|
+
### Update an Existing Installation
|
|
265
|
+
|
|
266
|
+
**Do not replace files while an affected process can still use them.** Schedule a quiet
|
|
267
|
+
window: hold new work, avoid concurrent starts/restarts or login activation, and let
|
|
268
|
+
active work, approvals, goals, deliveries and owned services settle. Inventory every
|
|
269
|
+
configured instance and enrolled worker account using the copy being replaced, not just
|
|
270
|
+
the currently selected config. In `omp-sa status --config FILE`, `lanes[]` and `workers[]`
|
|
271
|
+
are saved records, not live ownership or exit evidence. On each machine, cross-check the
|
|
272
|
+
inventory against local processes, for example with `ps -axo pid=,ppid=,uid=,comm=` and
|
|
273
|
+
`lsof -nP -a -p PID -d txt` to locate a candidate Gateway or owner executable if needed.
|
|
274
|
+
Do not read process environments or print credential files. If you cannot account for
|
|
275
|
+
an affected process, machine or installation, do not replace that copy.
|
|
276
|
+
|
|
277
|
+
#### Capture before stopping
|
|
278
|
+
|
|
279
|
+
Keep [`upgrade-evidence.mjs`](../scripts/upgrade-evidence.mjs) and its two helpers,
|
|
280
|
+
[`upgrade-host-wire.mjs`](../scripts/upgrade-host-wire.mjs) and
|
|
281
|
+
[`upgrade-evidence-files.mjs`](../scripts/upgrade-evidence-files.mjs), together from the same
|
|
282
|
+
revision as this guide, **outside every directory being replaced**, on each affected
|
|
283
|
+
machine. They use Bun and the installed 0.1.10+ private Gateway/Host protocol; they
|
|
284
|
+
need no package install. `capture`, `recheck` and `verify` are read-only. Only
|
|
285
|
+
`stop-local` requests shutdown, for one verified local lane. Keep captures private.
|
|
286
|
+
|
|
287
|
+
On the Gateway machine, use the account and CLI from the **old installation**.
|
|
288
|
+
Substitute your absolute paths and save the status for each instance:
|
|
289
|
+
|
|
290
|
+
```sh
|
|
291
|
+
OLD_OMP_SA=/path/to/old/omp-sa
|
|
292
|
+
CONFIG=/path/to/config.local.json
|
|
293
|
+
PROBE=/path/outside/installation/upgrade-evidence.mjs
|
|
294
|
+
umask 077
|
|
295
|
+
EVIDENCE_DIR=$(mktemp -d /tmp/omp-sa-upgrade.XXXXXX) &&
|
|
296
|
+
"$OLD_OMP_SA" status --config "$CONFIG" > "$EVIDENCE_DIR/status-before.json"
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
For a source installation, use `bun --no-env-file /path/to/old/src/cli.ts` in
|
|
300
|
+
place of `"$OLD_OMP_SA"` for the old CLI commands. From the saved status, take the
|
|
301
|
+
absolute `main.socketPath` and use its sibling `gateway.sock` for the Gateway.
|
|
302
|
+
For each previously running Gateway, capture the Gateway and its HEAD together:
|
|
303
|
+
|
|
304
|
+
```sh
|
|
305
|
+
GATEWAY_SOCKET=/absolute/state/run/gateway.sock
|
|
306
|
+
bun --no-env-file "$PROBE" capture gateway "$GATEWAY_SOCKET" > "$EVIDENCE_DIR/gateway.json"
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
- For a resident HEAD the probe matches its native PID and session ID against
|
|
310
|
+
`gateway.head.pid` and `gateway.head.initialization.sessionId`. For a **sleeping**
|
|
311
|
+
HEAD it records `gateway.head.hibernation.sessionId` with no live Host to stop.
|
|
312
|
+
A positive `sleeping` stage from a live Gateway is different from an absent socket,
|
|
313
|
+
`gateway: null`, or a failed probe. Do not wake a sleeping HEAD for evidence.
|
|
314
|
+
- Do not run `stop` or `start` for an instance or lane already confirmed intentionally
|
|
315
|
+
stopped. Use the known prior stop/exit and machine process inventory to establish
|
|
316
|
+
this; a missing socket, saved state, or an unrelated receipt is not proof. An absent
|
|
317
|
+
or unconfirmed owner, an in-progress wake/rotation, or a failed capture is a reason to
|
|
318
|
+
resolve ownership before replacing files, not to mark it stopped or force a start.
|
|
319
|
+
|
|
320
|
+
For each affected resident lane, take `id`, `socketPath` and `sessionId` from the
|
|
321
|
+
corresponding `lanes[]` entry and confirm `placement.target`. On the physical machine
|
|
322
|
+
holding that socket, capture the live identity:
|
|
323
|
+
|
|
324
|
+
```sh
|
|
325
|
+
LANE_ID=lane-example
|
|
326
|
+
LANE_SOCKET=/absolute/state/run/lane-example.sock
|
|
327
|
+
LANE_SESSION=SESSION_ID_FROM_STATUS
|
|
328
|
+
bun --no-env-file "$PROBE" capture host "$LANE_SOCKET" "$LANE_SESSION" > "$EVIDENCE_DIR/$LANE_ID.json"
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
For `placement.target: "remote"`, match `placement.workerId` to `workers[].workerId`.
|
|
332
|
+
Use a separate authorized login on that enrolled machine **as the enrolled OS account**.
|
|
333
|
+
Set `PROBE` and create a private `EVIDENCE_DIR` on that machine using the same steps.
|
|
334
|
+
Use the recorded remote socket and add `--worker` to capture and verify the launch
|
|
335
|
+
attempt as well:
|
|
336
|
+
|
|
337
|
+
```sh
|
|
338
|
+
bun --no-env-file "$PROBE" capture host "$LANE_SOCKET" "$LANE_SESSION" --worker > "$EVIDENCE_DIR/$LANE_ID.json"
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
The enrolled SSH key's forced command is not a shell; do not loosen it, tunnel the
|
|
342
|
+
socket, or use same-named paths on the HEAD machine. If you lack authorized access
|
|
343
|
+
to the affected worker, cannot correlate all its dependent Hosts to their managing
|
|
344
|
+
HEADs, or cannot prove their ownership, leave that installation intact. A HEAD-only
|
|
345
|
+
update does not replace worker files or require stopping lanes on unchanged
|
|
346
|
+
installations.
|
|
347
|
+
|
|
348
|
+
#### Stop, verify, and replace
|
|
349
|
+
|
|
350
|
+
For a **local** lane, use the private status saved from its managing instance and
|
|
351
|
+
the capture from that host. `stop-local` checks that the lane's recorded socket
|
|
352
|
+
is the one derived from that instance's `main.socketPath` and lane ID. It compares
|
|
353
|
+
the live session and owner to the capture and sends a single shutdown on that
|
|
354
|
+
same connection. Do not substitute the old CLI's `stop LANE_ID`: it reconnects
|
|
355
|
+
by pathname. A refusal or lost reply is not permission to send another stop.
|
|
356
|
+
|
|
357
|
+
```sh
|
|
358
|
+
bun --no-env-file "$PROBE" stop-local "$EVIDENCE_DIR/$LANE_ID.json" "$EVIDENCE_DIR/status-before.json" "$LANE_ID" &&
|
|
359
|
+
bun --no-env-file "$PROBE" verify "$EVIDENCE_DIR/$LANE_ID.json"
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
For a remote lane, run `bun --no-env-file "$PROBE" recheck "$EVIDENCE_DIR/$LANE_ID.json"`
|
|
363
|
+
on the worker first. Only if it succeeds, run `"$OLD_OMP_SA" stop "$LANE_ID" --config "$CONFIG"`
|
|
364
|
+
on its managing HEAD machine. Once accepted, run
|
|
365
|
+
`bun --no-env-file "$PROBE" verify "$EVIDENCE_DIR/$LANE_ID.json"` on the worker.
|
|
366
|
+
|
|
367
|
+
After the affected lanes, stop each previously running Gateway using its old CLI
|
|
368
|
+
and saved capture. `stop main` does not stop independent lanes:
|
|
369
|
+
|
|
370
|
+
```sh
|
|
371
|
+
bun --no-env-file "$PROBE" recheck "$EVIDENCE_DIR/gateway.json" &&
|
|
372
|
+
"$OLD_OMP_SA" stop main --config "$CONFIG" &&
|
|
373
|
+
bun --no-env-file "$PROBE" verify "$EVIDENCE_DIR/gateway.json"
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
If HEAD hibernates after the first capture, the resident `recheck` fails. Take a fresh
|
|
377
|
+
Gateway capture only after it positively reports `sleeping` with the same session ID
|
|
378
|
+
and resume the stop procedure with that capture.
|
|
379
|
+
|
|
380
|
+
Each capture binds the Gateway PID and each live Host's native PID, adapter owner PID,
|
|
381
|
+
session ID and journal path to the socket's device and inode. The journal's device
|
|
382
|
+
and inode must still match at recheck and verification. An ordinary local journal
|
|
383
|
+
may be an owned symlink to the same owned regular file; a worker journal cannot be
|
|
384
|
+
a symlink. `verify` must report
|
|
385
|
+
`exit-confirmed` on the same machine/account before proceeding. It requires actual
|
|
386
|
+
process absence (`ESRCH`, not a reused PID or a permission error), absent old socket
|
|
387
|
+
paths, and for each formerly resident Host a **new** private `<socketPath>.exit.json`
|
|
388
|
+
inode, matching the captured identity (including the worker attempt where applicable),
|
|
389
|
+
`code: 0`, `signal: null`, `persisted: true`, and `observationsFlushed: true`. For an
|
|
390
|
+
already-sleeping HEAD, stopping Gateway does not create a new Host receipt: its live
|
|
391
|
+
Gateway had already verified the hibernation exit. If shutdown was accepted but still
|
|
392
|
+
completing, run `verify` again after the processes have had time to exit. Do not resend
|
|
393
|
+
stop blindly, delete socket or receipt files, or interpret a stale receipt, a shutdown
|
|
394
|
+
ACK, or a missing socket alone as success. If exit is refused or still unconfirmed,
|
|
395
|
+
leave the old files in place.
|
|
396
|
+
|
|
397
|
+
Only then use `bun add --global --trust omp-superagent@VERSION` or
|
|
398
|
+
`npm install --global omp-superagent@VERSION` with the target version, or rebuild the
|
|
399
|
+
source installation. Replace worker files only on the relevant worker after its
|
|
400
|
+
dependent Hosts have stopped. Keep the same config, state, enrollment and journals;
|
|
401
|
+
do not rerun `setup`.
|
|
402
|
+
|
|
403
|
+
#### Restore only what was running
|
|
404
|
+
|
|
405
|
+
On each Gateway machine, `omp-sa doctor --config FILE` checks local prerequisites
|
|
406
|
+
without starting anything. Run `omp-sa start --config FILE` **only for Gateways that
|
|
407
|
+
were running before the maintenance window**. A running Gateway with a sleeping HEAD
|
|
408
|
+
counts as running: explicit start brings that HEAD up using its saved session, rather
|
|
409
|
+
than returning it to sleep immediately. Do not manually start lanes; they are managed
|
|
410
|
+
by HEAD. Select the **explicit path to the upgraded installation** for all three
|
|
411
|
+
commands, not a different `omp-sa` that happens to be on `PATH`. For a package install:
|
|
412
|
+
|
|
262
413
|
```sh
|
|
263
|
-
|
|
414
|
+
NEW_OMP_SA=/absolute/path/to/upgraded/bin/omp-sa
|
|
415
|
+
"$NEW_OMP_SA" doctor --config "$CONFIG" &&
|
|
416
|
+
"$NEW_OMP_SA" start --config "$CONFIG" &&
|
|
417
|
+
"$NEW_OMP_SA" status --config "$CONFIG"
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
For a source installation, use the upgraded checkout instead:
|
|
421
|
+
|
|
422
|
+
```sh
|
|
423
|
+
NEW_CLI=/absolute/path/to/upgraded/checkout/src/cli.ts
|
|
424
|
+
bun --no-env-file "$NEW_CLI" doctor --config "$CONFIG" &&
|
|
425
|
+
bun --no-env-file "$NEW_CLI" start --config "$CONFIG" &&
|
|
426
|
+
bun --no-env-file "$NEW_CLI" status --config "$CONFIG"
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
In `status`, `gateway.gateway.ready`
|
|
430
|
+
is transport readiness, `gateway.gateway.admissionReady` is the initial approval
|
|
431
|
+
reconciliation barrier for durable intake, and `gateway.head.ready` is live controller
|
|
432
|
+
and preset readiness. `start` can return before all three are true. While HEAD is
|
|
433
|
+
resident, compare `gateway.head.initialization.sessionId` to the captured session
|
|
434
|
+
(using `gateway.head.hibernation.sessionId` as the **before** value if HEAD was asleep).
|
|
435
|
+
Do not force redelivery of held inputs or uncertain outputs.
|
|
436
|
+
|
|
437
|
+
**If 0.1.10 files were already overwritten:** do not use the new helper to finish an
|
|
438
|
+
old owner's shutdown. It cannot authenticate that `exit` request and will not write
|
|
439
|
+
an exit receipt. Preserve the instance, config, journal and logs for recovery; do
|
|
440
|
+
not restart, manufacture a receipt, or repeat an uncertain shutdown. Restoring
|
|
441
|
+
files alone does not release an owner whose verification already failed. Starting
|
|
442
|
+
with 0.1.11, owners verify their own exits in-process in Rust.
|
|
443
|
+
|
|
444
|
+
### First Installation
|
|
445
|
+
|
|
446
|
+
```sh
|
|
447
|
+
bun add --global --trust omp-superagent@0.1.13
|
|
264
448
|
omp-sa --help
|
|
265
449
|
```
|
|
266
450
|
|
|
267
451
|
`--trust` allows package installation scripts, including preparation of the managed
|
|
268
452
|
omp-superkit. Add the output of `bun pm bin --global` to PATH. If Bun is on PATH, you can
|
|
269
|
-
also use `npm install --global omp-superagent@0.1.
|
|
453
|
+
also use `npm install --global omp-superagent@0.1.13`. Create the configuration in your
|
|
270
454
|
own working directory, not the installation directory, with
|
|
271
455
|
`omp-sa setup --config ./config.local.json`. Installation alone does not activate the bot.
|
|
272
456
|
|
|
@@ -281,9 +465,11 @@ bun install --frozen-lockfile
|
|
|
281
465
|
```
|
|
282
466
|
|
|
283
467
|
Installation does not run OMP. `setup`, `doctor`, and actual Host startup check the selected
|
|
284
|
-
CLI. The
|
|
285
|
-
`@oh-my-pi/pi-
|
|
286
|
-
|
|
468
|
+
CLI. The standalone Bun helpers directly depend on `@oh-my-pi/pi-coding-agent`,
|
|
469
|
+
`@oh-my-pi/pi-catalog`, `@oh-my-pi/pi-natives` and `@oh-my-pi/pi-utils`, pinned to
|
|
470
|
+
the same baseline. The Host provides `pi-ai` to its extensions; it is a direct
|
|
471
|
+
development dependency only. The coding-agent SDK still installs `pi-ai` and `pi-tui`
|
|
472
|
+
transitively. Installation does not start
|
|
287
473
|
the bot or replace an existing OMP executable or global settings.
|
|
288
474
|
|
|
289
475
|
To avoid changing the system Bun, you can use an isolated local copy. Point the following
|
|
@@ -312,7 +498,7 @@ previous layout still work. To prepare only omp-superkit again, run:
|
|
|
312
498
|
bun run prepare:ulw
|
|
313
499
|
```
|
|
314
500
|
|
|
315
|
-
`upstream/
|
|
501
|
+
`upstream/super.json` specifies the official remote and `checkIntervalMs: 3600000` (one hour).
|
|
316
502
|
Installation checks the remote's **default branch HEAD**. A production Gateway needs a
|
|
317
503
|
valid active installation before startup. Once it confirms that, it starts IPC and the
|
|
318
504
|
head first, checks the remote in the background, and then checks hourly for new commits
|
|
@@ -417,8 +603,9 @@ are not security sandboxes.
|
|
|
417
603
|
|
|
418
604
|
Register Discord autocomplete commands explicitly. Before registration, both the Gateway
|
|
419
605
|
and HEAD must be running the new version. Replacing only the Gateway may reconnect it to
|
|
420
|
-
an old HEAD. Send `/help` in Discord and check that `/usage-reset`
|
|
421
|
-
|
|
606
|
+
an old HEAD. Send `/help` in Discord and check that `/usage-reset` and the `/fast`
|
|
607
|
+
menu with Confirm are listed. If not, finish updating HEAD before registering
|
|
608
|
+
commands. Do not kill a busy HEAD.
|
|
422
609
|
|
|
423
610
|
```sh
|
|
424
611
|
bun --no-env-file src/cli.ts discord-commands --config config.local.json
|
|
@@ -427,13 +614,15 @@ bun --no-env-file src/cli.ts discord-commands --config config.local.json --apply
|
|
|
427
614
|
|
|
428
615
|
The first command previews changes without writing. `--apply` **replaces this bot's entire
|
|
429
616
|
global command list**; use it only with a dedicated Superagent app. It removes Hermes-only
|
|
430
|
-
commands and registers the [shared commands (including `/head`) and Discord-only `/usage-reset`](../src/messenger-command-catalog.json).
|
|
617
|
+
commands and registers the [shared commands (including `/head`) and Discord-only `/usage-reset`](../src/messaging/messenger-command-catalog.json).
|
|
431
618
|
If separate guild commands shadow global commands, registration reports the conflict
|
|
432
619
|
rather than silently deleting them. Registration does not start the model or open a
|
|
433
620
|
messenger connection, and is not a side effect of `setup`, `doctor`, or `start`.
|
|
434
621
|
Commands that take arguments use an optional `text` field. For example, enter `preset high`
|
|
435
622
|
in `/model`'s `text` field and `head` in `/stop`'s `text` field. `/status` also works as
|
|
436
|
-
an ordinary message.
|
|
623
|
+
an ordinary message. If the field is missing, check `preApplyTextOptionDrift` in the
|
|
624
|
+
read-only plan for missing or outdated global options, and `guilds[].shadowing` for a
|
|
625
|
+
guild command hiding the global one. In a parent channel with `discord.requireAddressing` enabled, mention
|
|
437
626
|
this bot or reply to one of its messages just as for any ordinary message.
|
|
438
627
|
|
|
439
628
|
Commands follow the same owner, allowed channel, thread, and 1:1 DM boundaries. After
|
|
@@ -712,7 +901,10 @@ wait so the head can collect it at that boundary. On restart, the system checks
|
|
|
712
901
|
original input/request/session/file/generation and the pre-submission cursor before
|
|
713
902
|
reading uncollected records and deduplicating them. Native children cannot use the
|
|
714
903
|
reporting tool. An observation is not verified acceptance or proof the target is still
|
|
715
|
-
alive.
|
|
904
|
+
alive. Direct-topic observations do not notify the HEAD model; changed manager-handoff
|
|
905
|
+
evidence or wait transitions are queued for it. Neither creates a watch model, timer,
|
|
906
|
+
or automatic reminder, or resumes or stops work. A tracked decision receipt is not
|
|
907
|
+
evidence of work performed, even when an answer was submitted.
|
|
716
908
|
|
|
717
909
|
The Gateway adds a receipt reaction after durably accepting an allowed source message.
|
|
718
910
|
It can acknowledge receipt even without a head. Waiting for a reaction API response
|
|
@@ -920,6 +1112,7 @@ completed. Do not add a separate preset block to this configuration file.
|
|
|
920
1112
|
| `maxHosts` | Budget for resident Hosts, including one head. Required integer, minimum 2. Work above that limit waits. |
|
|
921
1113
|
| `maxSubagents` | Native task concurrency budget distributed across all Hosts. Required integer, at least `maxHosts`. The per-Host limit is `floor(maxSubagents / maxHosts)`. |
|
|
922
1114
|
| `idleMs` | Time in milliseconds before safely settled idle lanes are reclaimed. Required nonnegative integer. Does not apply to the head and does not remove session history. |
|
|
1115
|
+
| `headIdleMs` | How long to keep a fully idle HEAD resident (milliseconds). Default `1800000` (30 minutes); `0` keeps it resident. This does not change lane eviction or erase history. |
|
|
923
1116
|
| `model` | Optional OMP model identifier for starting the head. If omitted, existing OMP settings apply. This is not the default for all new lanes: select each new lane's model or preset through `lane_start`. Resuming a lane keeps its saved selection. |
|
|
924
1117
|
| `discord` | Optional block. If present, `tokenEnv`, `ownerId`, `allowedGuildIds`, and `allowedChannelIds` are all required. |
|
|
925
1118
|
| `discord.requireAddressing` | Optional boolean, default `false`. With `true`, in parent channels of allowed servers and threads not created by this bot, only ordinary messages from the owner with an actual mention of this bot or a reply to a message it sent are accepted. |
|
|
@@ -1171,6 +1364,8 @@ the split and the task on one plain-text line, such as `Split this into a new th
|
|
|
1171
1364
|
or `Do the login check in a new thread` (also `이건 따로 빼줘: 로그인 점검` or
|
|
1172
1365
|
`로그인 점검은 새 스레드에서 해줘` in Korean). For work in a different directory, put
|
|
1173
1366
|
`/new cwd: /actual/work/path` on the first line and the task on the next line.
|
|
1367
|
+
Paths with spaces can be written as-is or enclosed in matching quotes, e.g.
|
|
1368
|
+
`/new cwd: "/projects/My App"`. The path is literal; no shell expansion is performed.
|
|
1174
1369
|
If you leave the task unspecified, as in `Split this into a new thread` (`이건 따로 빼줘`), the bot
|
|
1175
1370
|
asks you to specify the task with `/new` in the same thread and does not create a new thread.
|
|
1176
1371
|
Edited messages, quotes, and attachments do not count as instructions to create a thread.
|
|
@@ -1219,7 +1414,7 @@ or current topic. The runtime only records the edit and sends a fixed notice ask
|
|
|
1219
1414
|
new control message. The same policy applies to Slack's `!` controls. Editing an ordinary work
|
|
1220
1415
|
message creates a new input revision and does not undo external effects that have already occurred.
|
|
1221
1416
|
|
|
1222
|
-
### Model Selection and
|
|
1417
|
+
### Model Selection, Head Effort and Fast Mode
|
|
1223
1418
|
|
|
1224
1419
|
In a Discord lane thread, run **`/model` by itself**. In the first dropdown, select **HEAD** or
|
|
1225
1420
|
**the current lane**. Select a provider in the second dropdown; that dropdown then shows the
|
|
@@ -1238,10 +1433,18 @@ and `/superagent-effort`. There is no separate HTTP endpoint.
|
|
|
1238
1433
|
| `/model --lane <provider/id>` | Directly changes only the model of the idle lane bound to the current conversation. Does not call the HEAD model or rerun a failed request. |
|
|
1239
1434
|
| `/effort` | Shows the current effort and opens the picker for levels supported by the current model. |
|
|
1240
1435
|
| `/effort <level>` | Changes head effort to a level shown by the query. |
|
|
1436
|
+
| `/fast` | Shows the current shared HEAD mode even while busy. Select `off`, `on` (Fast), or `ultra` (Ultrafast), then press **Confirm**. Changes require an idle HEAD and model support. |
|
|
1241
1437
|
| `/model preset` or `/model preset list` | Lists existing native presets, their validity, and their available default models. |
|
|
1242
1438
|
| `/model preset <name>` | Applies all roles and default effort from the named native preset to the idle head session. |
|
|
1243
1439
|
| `/model preset <name> --global` | Also saves the identical snapshot applied and verified on the current head as the native global default roles and effort. |
|
|
1244
1440
|
|
|
1441
|
+
Use `/fast` without arguments in Discord or Telegram and `!fast` or `/superagent-fast`
|
|
1442
|
+
in Slack (`!fast` in threads). Choosing a mode alone does not change it; **Back**
|
|
1443
|
+
returns to the choices and **Cancel** closes the menu without a change.
|
|
1444
|
+
Update the Gateway and HEAD, then refresh the registered command menus separately.
|
|
1445
|
+
The command does not run a model or change lanes or global defaults. Later
|
|
1446
|
+
requests using Fast or Ultrafast may cost more.
|
|
1447
|
+
|
|
1245
1448
|
If a lane model's quota is confirmed exhausted, the runtime notifies the original conversation
|
|
1246
1449
|
once. Follow-up requests in that lane wait for the operator to pick a model. If it is unclear
|
|
1247
1450
|
whether a request ran, verify the original effect, then close the request with the
|
|
@@ -1544,6 +1747,27 @@ or other unresolved work, or if usage is unknown. This is separate from the lane
|
|
|
1544
1747
|
and the rotation stage. Unlike automatic rotation, `/restart` restores the same
|
|
1545
1748
|
HEAD session.
|
|
1546
1749
|
|
|
1750
|
+
When `head.hibernation.stage` is `sleeping`, `head.pid: null` and
|
|
1751
|
+
`head.ready: false` are expected. The Gateway is still listening. Its next
|
|
1752
|
+
accepted input wakes the same session, so the first reply includes Host startup
|
|
1753
|
+
time. A fresh Discord session after a disconnect or a Slack reconnect also wakes
|
|
1754
|
+
HEAD to recover missed history. `omp-sa status` does not wake it. Set `headIdleMs: 0` if a warm first
|
|
1755
|
+
reply matters more than idle memory. A resident lane, scheduled work or an
|
|
1756
|
+
unsettled operation can keep HEAD awake even after the configured time.
|
|
1757
|
+
HEAD stays resident if the journal is a symlink, the Host cannot attest to
|
|
1758
|
+
safe sleep, or stock OMP cannot restore the active selection. Sleep must not
|
|
1759
|
+
re-enable a paid service tier, reset a `--max-time` budget, or rearm a completed
|
|
1760
|
+
`--plan-yolo`. Keep the native OMP profile and session storage location unchanged.
|
|
1761
|
+
The same agent directory with a different effective `XDG_DATA_HOME` is not sufficient.
|
|
1762
|
+
`launching` can mean the native process is up but its controller is not ready.
|
|
1763
|
+
If the config was edited during launch, restore its exact original bytes. The
|
|
1764
|
+
same HEAD can then process its queued input; do not resend the message.
|
|
1765
|
+
If HEAD reports that the Gateway cannot order startup history, stop and
|
|
1766
|
+
start the Gateway and HEAD from the same installation before resuming work.
|
|
1767
|
+
To change messenger policy while HEAD sleeps, stop the Gateway normally, edit
|
|
1768
|
+
the config, and explicitly start it again. A message cannot authorize a wake
|
|
1769
|
+
under a changed policy.
|
|
1770
|
+
|
|
1547
1771
|
`/usage` with no arguments does not call a model. It sends only the numbers the
|
|
1548
1772
|
installed OMP reports to the original conversation. Remaining limits and reset
|
|
1549
1773
|
times for each provider use the Superagent host’s local time zone automatically.
|
|
@@ -1751,7 +1975,7 @@ read-only. If another writer has the original session open, native policy forks
|
|
|
1751
1975
|
it. Resuming once the writer releases the session, and choosing later sessions,
|
|
1752
1976
|
also follow native policy. This does not attach to the existing managed Host
|
|
1753
1977
|
process or transfer execution ownership. An ordinary resume does not automatically
|
|
1754
|
-
load the
|
|
1978
|
+
load the managed role extensions or confer management authority.
|
|
1755
1979
|
History is not a source of new permissions or instructions.
|
|
1756
1980
|
|
|
1757
1981
|
Use `agent: "seance"` and `sourceSession` with `task` for consultation **only if
|
|
@@ -1801,16 +2025,21 @@ and callbacks. Answers that arrive before recovery are not treated as stale and
|
|
|
1801
2025
|
consumed or acknowledged. Slack processes distinct concurrent selections and modal
|
|
1802
2026
|
submissions in order for each card and deduplicates only actual redeliveries.
|
|
1803
2027
|
|
|
1804
|
-
HEAD first reviews questions
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
the
|
|
1813
|
-
|
|
2028
|
+
HEAD first reviews manager-handoff questions and root-lane questions explicitly
|
|
2029
|
+
addressed with `decision_ask({to:"head", questions:[…]})`. Other bound-topic questions
|
|
2030
|
+
go to the owner directly. On a corrective assignment, the controller refuses and
|
|
2031
|
+
cancels an explicit HEAD question without showing it to the owner. For a routine
|
|
2032
|
+
choice within the delegated scope, HEAD uses `lane_review_decision` to return one
|
|
2033
|
+
of the original choices to the lane.
|
|
2034
|
+
It records the reason internally without sending a separate messenger notification.
|
|
2035
|
+
When owner judgment is required, HEAD escalates the same pending dialog with the reason
|
|
2036
|
+
on the original question card. If HEAD stops during an existing regular review, the
|
|
2037
|
+
controller may escalate that same pending dialog to the original owner. Neither path
|
|
2038
|
+
authorizes a scope change, grants native execution approval, or answers ordinary native
|
|
2039
|
+
dialogs on the operator's behalf.
|
|
2040
|
+
The `ask` cards below refer to the structured `askDialog` used by `decision_ask`.
|
|
2041
|
+
The Host does not send the OMP 19.1 built-in `ask` HTML `form` to a messenger.
|
|
2042
|
+
It cancels it immediately without submitting even the selected default.
|
|
1814
2043
|
|
|
1815
2044
|
| Platform | Approval and question UI and limits |
|
|
1816
2045
|
| --- | --- |
|
|
@@ -1966,7 +2195,7 @@ its checkout for one resident lane; it does not fetch, switch branches, or disca
|
|
|
1966
2195
|
edits. Follow-ups stay on the same worker and native session; disconnecting SSH
|
|
1967
2196
|
does not stop that Host. A cold reopen is held if the checkout has changed.
|
|
1968
2197
|
Chat replies and approval cards use the original route; messenger file transfer
|
|
1969
|
-
|
|
2198
|
+
is not provided across SSH.
|
|
1970
2199
|
Remote lanes require the normal stock OMP command without extra head-side flags:
|
|
1971
2200
|
custom tool/profile/approval flags are never silently removed to run remotely.
|
|
1972
2201
|
Use a dedicated worker OMP profile without ambient plugins. Worker startup
|
|
@@ -2020,7 +2249,7 @@ worker. That is not a stop command for an already running lane.
|
|
|
2020
2249
|
procedure. Voice-message status and duration are passed through, but this is not automatic
|
|
2021
2250
|
transcription. Inputs or edits without meaningful text or supported attachments, such as
|
|
2022
2251
|
sticker-only Discord messages, are not accepted as new work.
|
|
2023
|
-
- Lane repository
|
|
2252
|
+
- Lane repository discovery uses a Git process with `GIT_DIR`,
|
|
2024
2253
|
`GIT_WORK_TREE`, and other `GIT_*` variables stripped from the launching shell's environment.
|
|
2025
2254
|
This is not isolation of the entire general tool environment.
|
|
2026
2255
|
- Allowed input resources differ by platform:
|
|
@@ -2143,7 +2372,7 @@ login or same-process TUI/herdr attach. Automatic CLI selection does not enable
|
|
|
2143
2372
|
or external-package opt-ins.
|
|
2144
2373
|
|
|
2145
2374
|
```sh
|
|
2146
|
-
OMP_SUPERAGENT_NATIVE_TEST=1 bun test test/native-host.test.ts test/native-runtime.test.ts test/native-model-selection.test.ts test/native-
|
|
2375
|
+
OMP_SUPERAGENT_NATIVE_TEST=1 bun test test/native-host.test.ts test/native-runtime.test.ts test/native-model-selection.test.ts test/native-gateway.test.ts
|
|
2147
2376
|
OMP_SUPERAGENT_NATIVE_TEST=1 bun test test/native-autonomy.test.ts
|
|
2148
2377
|
```
|
|
2149
2378
|
|