omp-superagent 0.1.17 → 0.1.19
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 +15 -12
- package/config.example.json +4 -1
- package/docs/OPERATIONS.en.md +205 -59
- package/docs/OPERATIONS.md +173 -47
- package/docs/design/execution.md +119 -37
- package/docs/design/messaging.md +160 -45
- package/docs/releases/0.1.18.md +10 -0
- package/docs/releases/0.1.19.md +10 -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 +1 -1
- package/skills/head/SKILL.md +6 -5
- package/skills/head/references/model-selection.md +8 -22
- package/skills/head/references/routing.md +36 -17
- package/skills/lane/SKILL.md +24 -76
- package/skills/lane/references/workflow.md +7 -94
- package/src/cli.ts +36 -16
- package/src/config/config.ts +21 -2
- package/src/contracts.ts +66 -7
- package/src/cron/cron-jobs.ts +135 -92
- package/src/cron/cron-pr-intake.ts +18 -11
- package/src/extension.ts +25 -10
- package/src/gateway/gateway-client.ts +3 -1
- package/src/host-extension.ts +76 -8
- package/src/lane/lane-report.ts +1 -1
- package/src/lane/lane-rows.ts +2 -1
- package/src/lane/workflow.ts +12 -6
- package/src/lane-extension.ts +4 -21
- package/src/managed-super-probe.ts +21 -15
- package/src/messaging/messenger-command-catalog.json +1 -1
- package/src/messaging/messenger-commands.ts +8 -3
- package/src/messaging/result-attachment.ts +77 -19
- package/src/messaging/slack-context.ts +50 -0
- package/src/messaging/written-directives.ts +56 -0
- package/src/omp/exit-record.ts +27 -0
- package/src/omp/host-protocol.ts +20 -0
- package/src/omp/host.ts +73 -20
- package/src/omp/installed-omp.ts +15 -12
- package/src/omp/managed-super.ts +135 -65
- package/src/omp/superkit-skills.ts +15 -2
- package/src/pr/pr-intake-order.ts +62 -0
- package/src/pr/pr-intake-review.ts +49 -31
- package/src/pr/pr-intake-work.ts +3 -2
- package/src/routing/message-order.ts +22 -1
- package/src/routing/topic-request.ts +48 -4
- package/src/runtime/controller.ts +968 -338
- package/src/runtime/deferred-routing.ts +12 -4
- package/src/runtime/dm-timeline.ts +3 -3
- package/src/runtime/inbound-attachments.ts +70 -0
- package/src/runtime/local-host-fence.ts +85 -0
- package/src/runtime/model-journal.ts +14 -9
- package/src/runtime/native-frames.ts +5 -1
- package/src/runtime/result-attachments.ts +151 -24
- package/src/runtime/worker-result-download.ts +36 -0
- package/src/storage/deferred-routing.ts +25 -4
- package/src/storage/store.ts +445 -75
- package/src/worker/worker-checkout.ts +89 -9
- package/src/worker/worker-destination.ts +8 -7
- package/src/worker/worker-doctor.ts +29 -9
- package/src/worker/worker-enrollment.ts +44 -12
- package/src/worker/worker-git-startup.ts +157 -0
- package/src/worker/worker-host.ts +16 -26
- package/src/worker/worker-ledger.ts +42 -18
- package/src/worker/worker-placement-intent.ts +13 -0
- package/src/worker/worker-placement.ts +204 -28
- package/src/worker/worker-profile.ts +18 -65
- package/src/worker/worker-project-startup.ts +106 -0
- package/src/worker/worker-registration.ts +85 -30
- package/src/worker/worker-repository.ts +55 -6
- package/src/worker/worker-request.ts +13 -6
- package/src/worker/worker-result-attachments.ts +185 -0
- package/src/worker/worker-result-wire.ts +12 -0
- package/src/worker/worker-service.ts +51 -23
- package/src/worker/worker-trust.ts +19 -4
- package/src/worker/worker-wire.ts +47 -14
- package/upstream/super.json +2 -3
package/docs/design/execution.md
CHANGED
|
@@ -41,10 +41,14 @@ generations. An existing directory without that provenance keeps the original
|
|
|
41
41
|
file-permission checks; old journals are not automatically adopted.
|
|
42
42
|
|
|
43
43
|
When several workers qualify, placement accounts for both reported free slots
|
|
44
|
-
and
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
and the specific checkout reserved by each waiting head assignment. A worker
|
|
45
|
+
with a free slot still cannot start a second lane on a busy checkout. Concurrent
|
|
46
|
+
admissions reserve their selection before the next admission decides, without
|
|
47
|
+
serializing SSH probes.
|
|
48
|
+
On the target, a failure before native session preparation releases the slot.
|
|
49
|
+
If journal preparation has begun but the launcher proves it never spawned the
|
|
50
|
+
stdio owner, the exact attempt can release its checkout and slot without
|
|
51
|
+
adopting the journal. A lost launch response or missing socket is not that proof.
|
|
48
52
|
Worker inventory with a verified workspace, probes and new opens reconcile
|
|
49
53
|
existing reservations on demand. If the journal cannot be trusted, an attempt
|
|
50
54
|
that never admitted a remote attachment can release its checkout using a
|
|
@@ -60,7 +64,41 @@ An absent socket alone cannot resolve a pending open: an SSH request may
|
|
|
60
64
|
still arrive. Explicit close or resume can seal that generation on the worker
|
|
61
65
|
before proceeding. A later open for the sealed generation is refused.
|
|
62
66
|
|
|
63
|
-
|
|
67
|
+
Ordinary first placement matches the exact clean commit on both machines.
|
|
68
|
+
An alternative binds the **worker's current checkout**: the worker operator
|
|
69
|
+
enrolls that specific repository for current placement, and HEAD only selects
|
|
70
|
+
it under current-workspace authority. This can be an exact directive in the
|
|
71
|
+
admitted original owner message, or `--default-current` for one operator-pinned
|
|
72
|
+
physical checkout on HEAD. Only omitted placement uses this new default;
|
|
73
|
+
an empty selector still uses ordinary placement. An explicit owner directive
|
|
74
|
+
selects the workspace for both a new lane and a handoff to an existing lane.
|
|
75
|
+
HEAD does not need to transcribe the selector. It cannot use a handoff to
|
|
76
|
+
substitute another worker, subdirectory, or execution mode.
|
|
77
|
+
If the requested path names that checkout but now resolves elsewhere, placement
|
|
78
|
+
stops; it must not run on the replacement as a local fallback. The local
|
|
79
|
+
directory establishes repository identity and subdirectory, not content
|
|
80
|
+
equivalence. The worker attests its own current base commit and the device/inode
|
|
81
|
+
identities of the root, Git directory and selected directory. That identity
|
|
82
|
+
travels with the durable lane, launch attempt, and generation seal. The worker
|
|
83
|
+
rechecks it at open and against the native session before admitting work.
|
|
84
|
+
On a new Host, the base must still match at the first prompt or goal resume,
|
|
85
|
+
not merely when the Host became ready. If the worker refuses before dispatch,
|
|
86
|
+
HEAD pauses the lane; it does not retry against a different checkout. Later
|
|
87
|
+
commits from the admitted task do not invalidate its original placement.
|
|
88
|
+
Result copies use the admitted directory identity, not a fresh lookup of the
|
|
89
|
+
pathname. A new commit or a replaced checkout is not interchangeable with the
|
|
90
|
+
original on a subsequent launch. No files, Git history or
|
|
91
|
+
credentials move during placement, and this selection cannot authorize a
|
|
92
|
+
cross-workspace project-memory pull.
|
|
93
|
+
|
|
94
|
+
Enrollment defaults to one resident worker Host. A larger operator-selected
|
|
95
|
+
capacity is bounded by the number of independent enrolled repositories.
|
|
96
|
+
An opening lane occupies one slot, even while HEAD is waiting for the worker's
|
|
97
|
+
acknowledgement. Capacity is a global admission limit within that enrollment, not permission
|
|
98
|
+
to use a busy checkout; the exclusive physical checkout claim still wins races
|
|
99
|
+
between enrollments. Direct SSH and opt-in `tailscale nc` transport enforce the
|
|
100
|
+
same known-host and dedicated-key checks and the same forced-command protocol.
|
|
101
|
+
|
|
64
102
|
An already released lane may reopen the same verified native session in its
|
|
65
103
|
original physical worker checkout even after ordinary file edits there. The
|
|
66
104
|
worker attests the same enrolled root, Git metadata directory, subdirectory,
|
|
@@ -211,7 +249,7 @@ references](../../skills/head/SKILL.md) for operating policy.
|
|
|
211
249
|
|
|
212
250
|
| Tools | Authority and outcome |
|
|
213
251
|
| --- | --- |
|
|
214
|
-
| `lane_start` | Requires a durable user source, title, existing absolute cwd, exact model or native preset,
|
|
252
|
+
| `lane_start` | Requires a durable user source, title, existing absolute cwd, exact model or native preset, and kickoff. A model selection note, brief, acceptance criteria, destination and workflow are optional. At most one new lane per source. Returns the durable ID and admission state, not completion. |
|
|
215
253
|
| `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. |
|
|
216
254
|
| `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. |
|
|
217
255
|
| `lane_pause` | Takes a managed lane ID. Persists pause intent and requests an interrupt without claiming owned services or earlier effects are gone. |
|
|
@@ -232,8 +270,9 @@ settlement, verified acceptance criteria, and user delivery.
|
|
|
232
270
|
|
|
233
271
|
### Direct lane coordination
|
|
234
272
|
|
|
235
|
-
|
|
236
|
-
|
|
273
|
+
Lanes can work and deliver a final answer without a preliminary workflow read or
|
|
274
|
+
an intermediate status report. The [`lane_report` tool](../../src/lane-extension.ts)
|
|
275
|
+
records selected observations in the native journal. It hashes files in bounded chunks, verifying their identity
|
|
237
276
|
and metadata before accepting the digest, or hashes successful work tool results.
|
|
238
277
|
Tracked decisions and other coordination receipts are not work evidence. Duplicate
|
|
239
278
|
content and repeated waits do not refresh evidence timestamps; ordinary
|
|
@@ -357,6 +396,18 @@ journal persistence. An enabled native goal, including a paused one, can prevent
|
|
|
357
396
|
shutdown. Do not infer eligibility from `agent_end`, an RPC disconnect, a saved
|
|
358
397
|
file, or a lease alone. Release ownership and the slot only after actual native
|
|
359
398
|
exit; a shutdown ACK is not exit. Reload the same native session when authorized.
|
|
399
|
+
|
|
400
|
+
For a local lane, a socket left on disk is not itself a resident Host. HEAD
|
|
401
|
+
keeps the local handshake's native/owner PIDs, session and socket identity.
|
|
402
|
+
For older lanes without that identity, only a newer private exit receipt for
|
|
403
|
+
the recorded native PID and session can identify the owner. If both PIDs are
|
|
404
|
+
gone and the unchanged private socket refuses a connection, HEAD records a
|
|
405
|
+
durable journal fence and stops charging that inode against `maxHosts`. This
|
|
406
|
+
is not clean-exit or observation-flush proof. HEAD does not unlink the socket,
|
|
407
|
+
restore that journal, settle an input or change the lane's work state. A
|
|
408
|
+
replacement endpoint counts as unresolved; removing the residue does not
|
|
409
|
+
remove the journal fence. Worker retirement uses its own evidence, as above.
|
|
410
|
+
|
|
360
411
|
A read-only ownership snapshot may resample the full evidence for the same
|
|
361
412
|
root after native child registration and attachment invalidate successive
|
|
362
413
|
reads. After at most two resamples, another change leaves ownership
|
|
@@ -399,11 +450,12 @@ managed controller negotiates `activity-v1`: each incremental text, thinking or
|
|
|
399
450
|
one ordered activity frame instead of repeating the accumulated payload. The reduction is on that socket,
|
|
400
451
|
not the native pipe or the owner's observation queue. Terminal messages, prompt results, approvals and
|
|
401
452
|
lifecycle events retain their contents. The
|
|
402
|
-
[recorded RPC oracle](../../test/rust-anything/) covers
|
|
403
|
-
readiness, busy refusal, detach/reconnect and a chunked Unicode event.
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
453
|
+
[recorded RPC oracle](../../test/rust-anything/) covers clean and nonzero native exits,
|
|
454
|
+
readiness, protocol refusal, busy refusal, detach/reconnect and a chunked Unicode event.
|
|
455
|
+
The [Bun differential test](../../test/owner-differential.test.ts) compares the current
|
|
456
|
+
owner with those transcripts in CI; it does not replace the stock CLI lifecycle tests.
|
|
457
|
+
From a source checkout with the owner built, run
|
|
458
|
+
`OMP_SUPERAGENT_NATIVE_TEST=1 bun test test/owner-differential.test.ts`.
|
|
407
459
|
|
|
408
460
|
The [Host extension](../../src/host-extension.ts) uses the exact registered
|
|
409
461
|
`AgentSession` and native persistence/lifecycle guards. Use native `wakeSources`
|
|
@@ -479,11 +531,15 @@ resumes an eligible head goal as described in the [restart contract](../../DESIG
|
|
|
479
531
|
availability and exact provider/model IDs. Model capabilities and prices are
|
|
480
532
|
catalogue fields, not measured quality, total cost or permission to spend.
|
|
481
533
|
The [model-selection skill](../../skills/head/references/model-selection.md)
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
not
|
|
534
|
+
can consult native judge when there is a real tradeoff. Starting a lane requires
|
|
535
|
+
an exact selection, not a judge call or a written justification. A subsequent
|
|
536
|
+
explicit model change still records its source and reason.
|
|
537
|
+
|
|
538
|
+
`lane_models` describes HEAD's profile, not the worker's. For an exact remote
|
|
539
|
+
selection, the lane's Host reports its active, available chat model from its
|
|
540
|
+
own profile. HEAD checks that readback before dispatch; a model absent from
|
|
541
|
+
HEAD need not be installed there. A missing or different worker model is not
|
|
542
|
+
permission to choose a replacement. Named presets still use their stored snapshot.
|
|
487
543
|
|
|
488
544
|
At startup, [preset initialization](../../src/omp/native-presets.ts) inspects native
|
|
489
545
|
`high`, `middle`, `low` presets. If needed the existing head gets one tracked
|
|
@@ -505,7 +561,7 @@ can apply without another config edit. Slow periodic polling also stays
|
|
|
505
561
|
active whenever any source is uncovered or a watcher errors. These labels
|
|
506
562
|
are preset names, not custom roles or tested performance/cost tiers.
|
|
507
563
|
|
|
508
|
-
Each lane records a resolved model, selection
|
|
564
|
+
Each lane records a resolved model, any selection note, and the complete native
|
|
509
565
|
role/thinking preset snapshot if a preset was selected. A later preset/global
|
|
510
566
|
change does not change that snapshot. Resume and reconnect check native
|
|
511
567
|
readback; unavailability or drift holds dispatch without silently selecting a
|
|
@@ -679,8 +735,9 @@ the native notice, subject to native settings and Eval availability, with no
|
|
|
679
735
|
extension-command preflight. Installation, profile load, skill application,
|
|
680
736
|
actual native activation, goal creation, and work completion are separate facts.
|
|
681
737
|
|
|
682
|
-
On upgrade, old ULW invocations remain valid in original user text
|
|
683
|
-
|
|
738
|
+
On upgrade, old ULW invocations remain valid in original user text. The bridge
|
|
739
|
+
preserves that text and supplies a canonical selector to a Host that advertises
|
|
740
|
+
the canonical command. New structured choices use only the canonical values above
|
|
684
741
|
(or `jevify`), not legacy aliases or a `skill://` ID. Existing durable workflow
|
|
685
742
|
records, skill IDs, flags and native journal types are not renamed. A resident
|
|
686
743
|
pre-upgrade Host can still receive the mapped old command if it advertises
|
|
@@ -691,20 +748,36 @@ does not stand in for its missing canonical command.
|
|
|
691
748
|
|
|
692
749
|
[Preparation](../../scripts/prepare-super.ts) runs during `postinstall` or
|
|
693
750
|
`bun run prepare:ulw`, even if OMP is not installed. The
|
|
694
|
-
[declared
|
|
695
|
-
repository
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
751
|
+
[declared source](../../upstream/super.json) is the official `omp-superkit`
|
|
752
|
+
repository's GitHub latest stable release. The installer uses the packaged ZIP,
|
|
753
|
+
not GitHub's source archives or the default branch. The packaging contract was
|
|
754
|
+
verified against [v0.1.0](https://github.com/dbc-hbin/omp-superkit/releases/tag/v0.1.0)
|
|
755
|
+
at `79076625ffc145b757a3b93ece209a0ef667895d`; the ZIP includes the materialized
|
|
756
|
+
frontend references. [Managed installation](../../src/omp/managed-super.ts) and
|
|
757
|
+
duplicate detection recognize both `omp-superkit` and the legacy `omp-ulw` package ID.
|
|
758
|
+
Release metadata is public. CI authenticates that one API request to avoid relying
|
|
759
|
+
on the shared runner's anonymous quota. The token is not sent to asset, Git, or
|
|
760
|
+
dependency downloads, and is removed before CI starts the native test suite.
|
|
761
|
+
|
|
762
|
+
Verify the ZIP against the release asset's SHA-256 and stage it in a project-owned
|
|
763
|
+
immutable package keyed by that digest. Record the release tag, digest and tagged
|
|
764
|
+
commit in the active pointer and provenance. Git resolves the tag and verifies
|
|
765
|
+
ancestry but does not provide installed files. Existing commit-based pointers
|
|
766
|
+
remain readable; the first eligible release is prepared separately, even if it
|
|
767
|
+
tags the same commit. Ignore arbitrary dependency lifecycle scripts and run an
|
|
768
|
+
[offline native prompt-composition probe](../../src/managed-super-probe.ts)
|
|
769
|
+
for ordinary and explicitly activated operation. With identical inputs, the probe
|
|
770
|
+
requires the supported model's instructions to differ from the no-model result,
|
|
771
|
+
without depending on preset wording. For the canonical layout the probe checks
|
|
772
|
+
that native discovery resolves the canonical commands and skills, and that
|
|
773
|
+
workflow pointers identify the invoked command and its installed skill. At
|
|
774
|
+
[upstream `7078efa`](https://github.com/dbc-hbin/omp-superkit/commit/7078efa148)
|
|
775
|
+
Superkit removed the legacy aliases and switched pointer tags to canonical
|
|
776
|
+
names. Older layouts still use the full legacy skills. Serialize preparation via
|
|
705
777
|
the update lock and atomically publish `active.json` only after validation.
|
|
706
|
-
Once installed, activate only
|
|
707
|
-
|
|
778
|
+
Once installed, activate only releases from the same source whose tagged commit
|
|
779
|
+
matches or is a descendant of the active commit. Retain the last valid active
|
|
780
|
+
package and report failures. Do not delete older
|
|
708
781
|
packages or rewrite a user's checkout or global settings.
|
|
709
782
|
|
|
710
783
|
A production Gateway requires a valid active installation before adapter
|
|
@@ -751,18 +824,27 @@ discarding custom commands or enabling disabled extensions.
|
|
|
751
824
|
previously started legacy run on its original host before resolving it.
|
|
752
825
|
See the [operator reference](../OPERATIONS.en.md#scheduled-jobs-cron) for syntax and controls.
|
|
753
826
|
- [Repository PR intake](../../src/cron/cron-pr-intake.ts) is a typed cron job, not
|
|
754
|
-
an executable prompt. Only original configured-owner
|
|
755
|
-
|
|
827
|
+
an executable prompt. Only original configured-owner controls from an allowed
|
|
828
|
+
Discord or Slack parent enroll a repository. Slack PR mutations need a real
|
|
829
|
+
owner message ordered by its physical `ts`, not a native slash invocation.
|
|
830
|
+
Discovery pins the authenticated GitHub owner
|
|
756
831
|
and repository, filters old/self-authored PRs, and records each offer before
|
|
757
832
|
delivery. The separately authenticated registration/mode action sets a bounded
|
|
758
833
|
unattended ceiling: review/comment, safe fix, or protected merge. The confirmed
|
|
759
|
-
bot offer's Discord snowflake identifies the one thread
|
|
834
|
+
bot offer's Discord snowflake or Slack root `ts` identifies the one thread
|
|
835
|
+
for that PR. Slack reuses the verified bot alert without an extra root post.
|
|
836
|
+
Manual Slack mutations must follow the final confirmed message part; a file
|
|
837
|
+
receipt alone cannot prove this order. A
|
|
760
838
|
noninteractive controller receipt admits an exact SHA to a tool-less native
|
|
761
839
|
lane; it is not owner input and cannot serve as a source for manager tools.
|
|
762
840
|
No ordinary scheduled prompt, observed PR text or model answer grants authority.
|
|
763
841
|
Older discovery-only registrations remain manual until the owner opts in.
|
|
764
842
|
[Review control](../../src/pr/pr-intake-review.ts) binds subsequent actions to
|
|
765
843
|
that lane, route, enrollment epoch, review input, delivered answer and SHA.
|
|
844
|
+
A manual Slack review must be a fresh original message physically sent after
|
|
845
|
+
the control that opened the current enrollment epoch, even on history replay.
|
|
846
|
+
An edit to the same verified owner starter does not change its thread identity
|
|
847
|
+
or authorize another command.
|
|
766
848
|
Static review uses a trusted workspace without a contributor checkout. Unlike
|
|
767
849
|
ordinary coding lanes, this restricted local Host must attest a tool-less
|
|
768
850
|
session on a supported native provider before the controller submits patch
|