@runeditrun/rer 0.2.85 → 0.2.86
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/README.md +138 -29
- package/cli/README.md +61 -1
- package/cli/agent-door.mjs +149 -0
- package/cli/agent-fixtures.mjs +16 -0
- package/cli/agent-mail.mjs +54 -0
- package/cli/agent-network.mjs +64 -0
- package/cli/agent-reviewers.mjs +110 -0
- package/cli/agent-secrets.mjs +23 -0
- package/cli/agent-sponsors.mjs +43 -0
- package/cli/agent-surface.mjs +34 -0
- package/cli/agent-webhooks.mjs +19 -0
- package/cli/authoring.mjs +2 -1
- package/cli/business/archive-task.mjs +32 -0
- package/cli/business/carry.mjs +3 -1
- package/cli/business/catchup-task.mjs +42 -0
- package/cli/business/choices.mjs +97 -0
- package/cli/business/command.mjs +23 -5
- package/cli/business/connect.mjs +19 -7
- package/cli/business/detector.mjs +4 -1
- package/cli/business/device.mjs +13 -0
- package/cli/business/export-inputs.mjs +69 -0
- package/cli/business/export-task.mjs +17 -0
- package/cli/business/invocation.mjs +8 -1
- package/cli/business/keychain.mjs +8 -1
- package/cli/business/lease.mjs +11 -1
- package/cli/business/local-commands.mjs +79 -31
- package/cli/business/outbound.mjs +9 -4
- package/cli/business/parsers-config.mjs +8 -7
- package/cli/business/parsers-syntax.mjs +7 -3
- package/cli/business/permissions.mjs +2 -0
- package/cli/business/questions.mjs +89 -9
- package/cli/business/setup-command.mjs +49 -0
- package/cli/business/setup-company.json +15 -0
- package/cli/business/setup-demo.mjs +95 -0
- package/cli/business/state.mjs +44 -10
- package/cli/business/supervisor.mjs +94 -35
- package/cli/business/vendor-door.mjs +230 -0
- package/cli/business/vendors/README.md +29 -3
- package/cli/business/vendors/common.mjs +8 -6
- package/cli/business/vendors/index.mjs +22 -11
- package/cli/business/vendors/sorry.mjs +106 -0
- package/cli/contract.mjs +2 -2
- package/cli/demo-deploy-error.mjs +14 -0
- package/cli/demo-native.mjs +4 -1
- package/cli/deploy-config.mjs +1 -1
- package/cli/deploy-owner-input.mjs +3 -1
- package/cli/deploy-variables.mjs +58 -0
- package/cli/door-clauses.mjs +157 -0
- package/cli/export.mjs +16 -4
- package/cli/hosted-output.mjs +17 -7
- package/cli/inspect.mjs +4 -0
- package/cli/jsonc.mjs +8 -4
- package/cli/lifecycle.mjs +3 -1
- package/cli/main.mjs +1 -0
- package/cli/managed-data-schema.mjs +14 -1
- package/cli/portability-empty.mjs +6 -0
- package/cli/portability-migrations.mjs +26 -4
- package/cli/production-auth.mjs +1 -1
- package/cli/production-mail.mjs +8 -2
- package/edition-authoring/archive-source.mjs +59 -0
- package/edition-authoring/base-copies.mjs +92 -18
- package/edition-authoring/cli.mjs +1 -1
- package/edition-authoring/edition-migrations.mjs +7 -3
- package/edition-authoring/module-closure.mjs +2 -16
- package/edition-authoring/workflow-copies.mjs +1 -1
- package/edition-authoring/workflow-scripts.mjs +12 -3
- package/foundation/runtime/contract-docs.mjs +215 -32
- package/foundation/runtime/contract-prose-patterns.mjs +14 -0
- package/foundation/runtime/contract-prose.mjs +88 -0
- package/global/CHANGELOG.md +93 -0
- package/global/README.md +138 -29
- package/global/door/command.mjs +3 -1
- package/global/main.mjs +1 -1
- package/modules/agent-door/CLAUSES.md +215 -0
- package/modules/agent-door/conformance/audit.mjs +66 -0
- package/modules/agent-door/conformance/authority.d.mts +2 -0
- package/modules/agent-door/conformance/authority.mjs +17 -0
- package/modules/agent-door/conformance/crypto.mjs +36 -0
- package/modules/agent-door/conformance/discovery.mjs +61 -0
- package/modules/agent-door/conformance/index.mjs +41 -0
- package/modules/agent-door/conformance/invocation.mjs +32 -0
- package/modules/agent-door/conformance/journey.mjs +112 -0
- package/modules/agent-door/conformance/narrowing.d.mts +1 -0
- package/modules/agent-door/conformance/narrowing.mjs +21 -0
- package/modules/agent-door/conformance/negative.mjs +47 -0
- package/modules/agent-door/conformance/network-modules.mjs +86 -0
- package/modules/agent-door/conformance/network-runtime.mjs +46 -0
- package/modules/agent-door/conformance/policy-phases.mjs +75 -0
- package/modules/agent-door/conformance/protocol.mjs +145 -0
- package/modules/agent-door/conformance/replay.mjs +38 -0
- package/modules/agent-door/conformance/schema.mjs +71 -0
- package/modules/agent-door/conformance/security.mjs +33 -0
- package/modules/agent-door/conformance/sponsors.mjs +68 -0
- package/modules/agent-door/conformance/surface.mjs +89 -0
- package/modules/agent-door/conformance/target.mjs +18 -0
- package/modules/agent-door/conformance/tool-name.d.mts +1 -0
- package/modules/agent-door/conformance/tool-name.mjs +7 -0
- package/modules/agent-door/conformance/webhooks.mjs +30 -0
- package/modules/container/image-variables.mjs +8 -2
- package/modules/demo-host/README.md +6 -0
- package/modules/demo-host/ownership.mjs +39 -0
- package/modules/demo-host/plan.mjs +2 -1
- package/modules/demo-host/remove.mjs +6 -1
- package/modules/import-kit/schema/importer-verification-receipt.schema.json +171 -0
- package/modules/import-kit/schema/importers.schema.json +107 -0
- package/modules/import-kit/src/door/ADOPTING.md +20 -0
- package/modules/import-kit/src/door/README.md +2 -1
- package/modules/import-kit/src/door/admission.ts +5 -3
- package/modules/import-kit/src/door/archive.ts +5 -2
- package/modules/import-kit/src/door/authority.ts +1 -0
- package/modules/import-kit/src/door/grants.ts +1 -1
- package/modules/import-kit/src/door/handler.ts +14 -8
- package/modules/import-kit/src/door/index.ts +1 -1
- package/modules/import-kit/src/door/jobs.ts +40 -0
- package/modules/import-kit/src/door/operator.ts +3 -3
- package/modules/import-kit/src/door/planning.ts +10 -6
- package/modules/import-kit/src/door/protocol.ts +2 -2
- package/modules/import-kit/src/door/raw.ts +25 -0
- package/modules/import-kit/src/door/refusals.ts +1 -0
- package/modules/import-kit/src/door/types.ts +26 -6
- package/modules/import-kit/src/receipt/encoding.ts +37 -0
- package/modules/import-kit/src/receipt/index.ts +69 -0
- package/modules/import-kit/src/receipt/policy.ts +24 -0
- package/modules/import-kit/src/receipt/types.ts +64 -0
- package/modules/import-kit/src/receipt/uri.ts +45 -0
- package/modules/import-kit/src/receipt/validation.ts +87 -0
- package/modules/import-kit/src/status/encoding.ts +13 -0
- package/modules/import-kit/src/status/evidence.ts +218 -0
- package/modules/import-kit/src/status/index.ts +56 -0
- package/modules/import-kit/src/status/schema.ts +208 -0
- package/modules/import-kit/src/status/types.ts +86 -0
- package/modules/operator-auth/accounts/delegated.mjs +48 -0
- package/modules/operator-auth/index.d.mts +7 -0
- package/modules/operator-auth/service.mjs +2 -0
- package/modules/portability/README.md +32 -11
- package/modules/portability/bridge.mjs +22 -2
- package/modules/portability/copies.mjs +8 -1
- package/modules/portability/derived.mjs +33 -0
- package/modules/portability/http-errors.mjs +1 -1
- package/modules/portability/import.mjs +14 -7
- package/package.json +4 -2
- package/scripts/publish-check/copy_identities.py +3 -1
- package/scripts/publish-check/github_refs.py +32 -13
- package/cli/business/opt-ins.mjs +0 -37
package/global/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,98 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.86
|
|
4
|
+
|
|
5
|
+
- Let verifier owner initializers and native journeys complete real email confirmation through a bounded captured-mail reader and supply per-run data to declared isolated provider edges. The controls stay outside production builds. Prove fresh agent-door/settings source copies typecheck with upstream tests omitted.
|
|
6
|
+
|
|
7
|
+
- Recheck native resource visibility before retained event replay and subscription delivery; accept single-segment and underscore tool names within MCP's 128-character limit; preserve opaque string or numeric revision tokens through approvals. Negotiate every advertised MCP version explicitly and document the unsupported March 2025 transport.
|
|
8
|
+
|
|
9
|
+
- Agent-door access/security tools can declare a machine-checked revoke/narrow contract and prove a native grant subset plus undeclared-argument refusal. Native-proof tools challenge with a human handoff, use the seed verifier before execution and remain subject to company policy and approval; conformance checks challenges, bogus references, audits and valid native proof.
|
|
10
|
+
|
|
11
|
+
- Carry agent/client scopes into resource authorization, delayed approvals and event/subscription filtering. Embedded callers supply explicit scopes; native current-grant hooks may only narrow their original authority.
|
|
12
|
+
|
|
13
|
+
- Agent-door verification can map native environment binding names to its disposable issuer, installation and owner/session values. Durable invocations retain their originating consent and refuse revoked consent at worker admission, with consent attribution in the audit.
|
|
14
|
+
|
|
15
|
+
- Agent-door verification fixtures generate disposable setup, session, local bearer, delivery and provider credentials at runtime while retaining signed receipts and isolated provider checks.
|
|
16
|
+
|
|
17
|
+
- Local `rer export` and `rer import` accept the historical `_rer_deploy_migrations` plus `d1_migrations` pair: the deploy ledger remains authoritative and Wrangler is skipped. Incomplete, pending or conflicting histories still refuse before transfer.
|
|
18
|
+
|
|
19
|
+
- **Known adapter change in 0.2.85:** the worker's `migration-preflight` receipt changed from `{platformLedger}` to `{nativeApply}`, and `platformMigrationPreflight` was renamed to `nativeMigrationPreflight`. Seeds wrapping the worker or importing the internal adapter must update; the supported adapter entry is `@runeditrun/rer/portability-migrations`, and native migrations run only when `nativeApply` is true.
|
|
20
|
+
|
|
21
|
+
- `rer deploy --dry-run` now accepts valid senders on reserved fixture domains and no longer requires an owner name to print its local plan. Real deploys keep placeholder-sender refusals and managed adapters check the owner email before asking for a missing name; deploy help documents that order.
|
|
22
|
+
|
|
23
|
+
- Contract conversion now reads requirement prose and acceptance lists in a blockquote after a legacy clause bullet, while preserving clause boundaries and refusing clauses with no requirement prose.
|
|
24
|
+
|
|
25
|
+
- Contract conversion now keeps requirement prose and acceptance points after a leading plain, italic or bold Status line, preserves the recorded status, and still refuses a clause with no requirement prose or a conflicting status.
|
|
26
|
+
|
|
27
|
+
- Import door sources may declare `format: 'raw'` and a seed-owned `readRaw` reader for ZIP and other binary exports. Verified upload bytes, hash and size reach that reader before text decoding; exact custody, reviewed plans and the existing apply, reconciliation, catch-up and Undo lifecycle are shared with JSON/NDJSON sources.
|
|
28
|
+
|
|
29
|
+
- Managed data restores now accept downloads that omit policy-declared derived virtual tables while retaining their triggers. Base creates those sandbox tables from destination migrations and atomically rebuilds external-content FTS5 search indexes from restored rows. Virtual-table SQL in downloads remains refused, and copy-normalization failures now have a named error.
|
|
30
|
+
|
|
31
|
+
- Refuse inherited names in the front-door CLI verb table and agent conformance schema predicates before dispatch. Unknown door commands keep exit 2, and unsupported schema types produce validation diagnostics.
|
|
32
|
+
|
|
33
|
+
- Agent-door verification follows signed and native owner lifecycles, supports isolated seed provider adapters, and accepts Base source archives for copy authoring.
|
|
34
|
+
|
|
35
|
+
- Fix unused bindings in the copied contract generator; add `check-prose` to `check` for generated acceptance and unclassified tools, with source-linked warnings for Base restatements and misplaced records, and require guarded request-name registries in foundation guidance.
|
|
36
|
+
|
|
37
|
+
- Bind agent sponsors to durable Business person ids from signed settings, enforce native admission including the allow-list, and honour signed agent and consent revocation. Resources now use the policy and audit pipeline. Approvals show saved summaries, bind decisions to their hash, execute with named approvers and leave a separate execution audit; Undo is the reviewer's act. Running audits commit before effects and recover from recorded outcomes. Standalone spend caps and unscoped Business daily limits are refused until their enforcement exists. The reference journey exercises self-escalation fixtures and real settings pairing.
|
|
38
|
+
|
|
39
|
+
- Add the server-side agent-door source entry `modules/agent-door/index.ts`, native-action adoption guidance, signed policy adoption on existing owner-claim trust, MCP and person routes, approvals, reviews, audit and retained events. Document request capacities and indefinitely retained idempotency outcomes; distinguish implemented conformance point registrations from edition-specific coverage. Policy behavior derives from platform commit `72aa71c03d943b53ed43dc73cac17d412c00d8fb`, `src/business/agent-policy/{catalogue,document,decide}.ts`; runtime copy pins and CLI versions remain independent.
|
|
40
|
+
|
|
41
|
+
- Re-exporting the maintained reference leaves its CLI inventory unchanged after generated copies are committed; its development version tracks the last exported source change.
|
|
42
|
+
|
|
43
|
+
- Contract conversion retains observed homepage table headers, escaped pipes, quoted prose and historical claim statuses, and refuses dropped or changed source claims. `record-base --from-api` records verified immutable Base copies through the GitHub API when a local checkout is unavailable.
|
|
44
|
+
|
|
45
|
+
- Convert handwritten homepage claims with reviewed alias maps bound to the original revision, file, line and claim text, preserving the original obligations and judgments.
|
|
46
|
+
|
|
47
|
+
- Keep reviewed license, launcher and hosted-demo facts in converted claims as explicit non-product rows, with their historical status separate from current unassessed status.
|
|
48
|
+
|
|
49
|
+
- Preserve an explicitly recorded negative-scope boundary without inventing a product clause, using the supported `boundary` basis and the original source record.
|
|
50
|
+
|
|
51
|
+
- Publication scans use each retained revision's repository context so local source paths beside repository prose do not become remote declarations; explicit repository references still receive the existing visibility checks.
|
|
52
|
+
|
|
53
|
+
- After computer choices change in Business, name `business next` as the next step and report which local apps received the Business name, including when none did.
|
|
54
|
+
|
|
55
|
+
- `rer refresh-base` accepts literal apostrophes in double-quoted workflow text while still refusing unclosed shell quotes before writing files.
|
|
56
|
+
|
|
57
|
+
- Editions can declare reviewed test-reader dependencies in `verification.json` so contract, source-lock and evidence-only changes can select the Verify light tier; unknown readers still require full coverage.
|
|
58
|
+
|
|
59
|
+
- `rer refresh-base` no longer prints the template-adoption notice when a preserved workflow already matches the incoming template, including acknowledged adaptations.
|
|
60
|
+
|
|
61
|
+
- Older v2 backups without `schemaObjects` now restore without acknowledgment when their recorded migrations prove the complete destination schema and archived tables. Unverifiable backups retain the explicit recovery option. Managed data ZIP intake also accepts old native staging-table leftovers, and its fixture preserves parent-before-child creation order for foreign keys.
|
|
62
|
+
|
|
63
|
+
- `rer import` now restores into an existing local D1 file with no product schema, including a file created by Wrangler after reset. Migrations run before restore as they do when no file exists; occupied destinations and unknown foreign tables remain refused.
|
|
64
|
+
|
|
65
|
+
- `rer refresh-base` refused sparse historical module copies when required dependency additions also resolved their old missing imports. Refresh now delivers and records those planned dependencies without a manual copy-record edit; ordinary unresolved imports without a planned dependency remain preserved.
|
|
66
|
+
|
|
67
|
+
- Verify labelled sponsor lists through native lifecycles, signed Business bindings and a cross-sponsor privacy/approval phase; single-sponsor journeys keep their existing phases and point counts.
|
|
68
|
+
|
|
69
|
+
- Provision native per-install webhook keys into isolated verification receivers through a contained, read-only state accessor; signed inbound probes verify both accepted effects and wrong-signature refusals.
|
|
70
|
+
|
|
71
|
+
- Add explicit `authority: 'none'` security tools for justified record changes, with closed schema validation, undeclared-argument refusal, normal policy/approval handling and audit classification.
|
|
72
|
+
|
|
73
|
+
- Recheck current agent-door admission before returning idempotent outcomes; refusals retain their own audit without exposing cached content.
|
|
74
|
+
|
|
75
|
+
- Agent-door verification can declare independent native reviewer lifecycles with bounded, recipient-scoped captured mail; invitations, confirmation and two-person decisions still pass through the seed's production handlers.
|
|
76
|
+
|
|
77
|
+
- Resolve seed-declared native targets into audit and hashed approval summaries; retain resolvable pause/unset classification; return resource refusal machine codes in JSON-RPC data; require sponsor-escalation fixtures only for applicable native surfaces.
|
|
78
|
+
|
|
79
|
+
- Expose frozen agent-door admission identity, granted scopes, operation id and idempotency key to native tools. Bind queued continuations to their retained admission, preserve named approvers and once-only replay, and recheck current grants and consent before effects.
|
|
80
|
+
|
|
81
|
+
- Add `rer business setup --origin URL --session-file FILE --confirm-demo` to provision the synthetic Run your business demo through the platform owner routes. Mirror managed/assisted/self_host hosting, resumable door proofs and read-only completed repeats; require an owned 0600 session file, keep its value out of output, and retain the platform JSON receipt. Exit 0 requires every required seed to be provisioned, token-issued, policy-confirmed, settings-delivered and door-proved; completed repeats return equal receipts.
|
|
82
|
+
|
|
83
|
+
- Prove publication-scan copy digests per file, so an adapted file in a directory copy no longer discards its unchanged siblings' proofs. Mismatched digests, adapted content and unlisted files remain fully scanned.
|
|
84
|
+
|
|
85
|
+
- Hosted demo redeploys now recognise secret-triggered versions that lost their ownership annotation when unchanged code, runtime and bindings match the retained rer deployment. Foreign or changed Workers remain refused before writes, with the actual ownership cause and recovery guidance in human and JSON output.
|
|
86
|
+
|
|
87
|
+
- `rer check` now fails `deploy.vars-secrets` when any Wrangler source or environment declares a plain variable that the deployment also declares as a secret, including empty placeholders. It lists every binding and both declaration locations, with the repair, before a build or demo deploy.
|
|
88
|
+
|
|
89
|
+
- Seeds can sync the canonical BASE-AGENT-001 through 013 requirements with `rer door clauses --write` or detect drift with `--check`. The command preserves seed judgments and specialist clauses, adds unjudged duties as missing, and regenerates and checks contract documents. The module copy and portable CLI inventory deliver the same canonical source.
|
|
90
|
+
|
|
91
|
+
### Known issues
|
|
92
|
+
|
|
93
|
+
- The two refresh recovery guidance issues documented in 0.2.82 still apply, with the same manual recoveries.
|
|
94
|
+
- The delivered Verify template's runner-temporary pnpm store, Chromium and apt cache lifecycle is not yet exercised end to end on a GitHub Ubuntu 24.04 runner; Base Verify covers only Base's own bootstrap.
|
|
95
|
+
|
|
3
96
|
## 0.2.85
|
|
4
97
|
|
|
5
98
|
- Two starters could both take over a stale local operation lock and both act as its owner. Takeover is now exclusive: the lock's inode stays pinned through takeover, and release checks the owner token.
|
package/global/README.md
CHANGED
|
@@ -19,6 +19,13 @@ Review source changes and run edition tests before committing. See the
|
|
|
19
19
|
[edition authoring guide](https://github.com/runeditrun/base/blob/main/export/EDITION-AUTHORING.md)
|
|
20
20
|
for adoption, refusal behavior, JSON fields and the original Base-checkout form.
|
|
21
21
|
|
|
22
|
+
`rer door clauses --write` syncs the shared agent requirements into a seed's
|
|
23
|
+
contract, preserving its judgments and its own specialist clauses, then runs
|
|
24
|
+
contract document generation and checking. `rer door clauses --check` reports
|
|
25
|
+
missing or stale requirements without writing; use `--cwd DIR` to select a seed.
|
|
26
|
+
The CLI can sync a contract before runtime adoption; regenerate the seed's source lock last.
|
|
27
|
+
See [agent door adoption](https://github.com/runeditrun/base/blob/main/modules/agent-door/ADOPTING.md#contract-clauses).
|
|
28
|
+
|
|
22
29
|
## Install
|
|
23
30
|
|
|
24
31
|
Start a seed from an empty folder, with or without Node:
|
|
@@ -415,6 +422,38 @@ Sensitive-looking outbound names are dropped and counted in `withheld`.
|
|
|
415
422
|
Symlinks, generated outputs and dependency trees are skipped; unsupported
|
|
416
423
|
formats and syntax may yield no signals.
|
|
417
424
|
|
|
425
|
+
## Run your business demo
|
|
426
|
+
|
|
427
|
+
```sh
|
|
428
|
+
rer business setup --origin https://app.runeditrun.com --session-file /private/path/owner.session --confirm-demo
|
|
429
|
+
```
|
|
430
|
+
|
|
431
|
+
This provisions the synthetic Juniper Harbor Software demo through the platform's
|
|
432
|
+
Business routes using the signed-in person's session. The session file must be
|
|
433
|
+
an owned regular file with mode `0600`, containing only `rer_session=VALUE` or
|
|
434
|
+
`__Host-rer_session=VALUE`. Symbolic links are refused. The session is read in
|
|
435
|
+
process, sent only as the platform Cookie header, and never printed or placed
|
|
436
|
+
in argv, local Business state or a receipt. `--confirm-demo` is required.
|
|
437
|
+
|
|
438
|
+
Hosting defaults to `managed`; `--hosting assisted` and `--hosting self_host`
|
|
439
|
+
are also supported. There is no `hosted` alias. `--wait-seconds 0..240` bounds
|
|
440
|
+
provisioning polling (default: 240). Both normal output and `--json` print the
|
|
441
|
+
platform script's JSON receipt, including each seed's actual state and only
|
|
442
|
+
credential identifiers. Errors print a named `{code}` to stderr and exit 1.
|
|
443
|
+
|
|
444
|
+
Run the same command to resume. Completed seeds keep their token, consent and
|
|
445
|
+
policy identifiers and report equal receipts (`already provisioned`). The
|
|
446
|
+
receipt includes each seed's state and a top-level `complete` flag. Exit 0
|
|
447
|
+
requires `complete: true`: every required seed must be provisioned, token-issued,
|
|
448
|
+
policy-confirmed, settings-delivered and have its door proofs recorded.
|
|
449
|
+
Missing adoptions remain `not yet on the agent door` and exit nonzero.
|
|
450
|
+
|
|
451
|
+
The route order, policy, synthetic company profile and receipt are mirrored from
|
|
452
|
+
the RER platform at commit `0261033177e8e05284c037369ee9c3a85922a8aa`,
|
|
453
|
+
`scripts/business/demo.mjs` and `demo/company.json`. The platform owns the seed
|
|
454
|
+
catalogue, fixture data and door proofs. This command does not pair the computer
|
|
455
|
+
or use its stored device credential.
|
|
456
|
+
|
|
418
457
|
## Business device commands
|
|
419
458
|
|
|
420
459
|
`rer business connect --code ABCD-1234 [--origin https://app.runeditrun.com]`
|
|
@@ -454,9 +493,12 @@ service). Connect, run and next read them as `optIns` from device-authenticated
|
|
|
454
493
|
`awakeConsent` and `installService`; the CLI prints only the sentences. Only
|
|
455
494
|
`true` enables an option. Undecided (`null`) options are listed with a browser
|
|
456
495
|
link; an older server without this route (it answers 403 or 404) leaves all
|
|
457
|
-
options undecided.
|
|
458
|
-
|
|
459
|
-
|
|
496
|
+
options undecided. Connect never has to run again after the owner decides:
|
|
497
|
+
`rer business run` (at every check-in) and `rer business next` read the choices
|
|
498
|
+
again, apply each one that changed (a `false` removes what an earlier `true`
|
|
499
|
+
added) and print which choices they applied. A choice this session cannot apply,
|
|
500
|
+
such as Claude Code rules in `~/.claude` from inside an agent sandbox, is named
|
|
501
|
+
with its cause and tried again at the next check-in. The first
|
|
460
502
|
device-authenticated request happens after both the credential and local
|
|
461
503
|
pairing state are stored, so a storage failure cannot activate the computer.
|
|
462
504
|
A service installed with `RER_BUSINESS_STATE_DIR` set keeps that folder. Background
|
|
@@ -472,16 +514,35 @@ run outside the sandbox (in Codex, approve running that command outside the
|
|
|
472
514
|
sandbox when it asks); later commands
|
|
473
515
|
only read the credential and run inside the sandbox. Do not install a
|
|
474
516
|
background service or change user settings unless the owner enables those
|
|
475
|
-
options and the sandbox permits their locations.
|
|
517
|
+
options and the sandbox permits their locations. Inside that sandbox macOS also
|
|
518
|
+
refuses to remove the Keychain item (`security` exits 161 and leaves it), so
|
|
519
|
+
`disconnect` revokes on the server, exits 0, says "revoked on the server; the
|
|
520
|
+
local credential is still stored" and names the one command that removes it when
|
|
521
|
+
run outside the sandbox; until then `status` says revoked, never paired.
|
|
476
522
|
|
|
477
523
|
`rer business vendor-key add sentry` requires hidden credential entry in a
|
|
478
524
|
terminal, stores it in the OS keychain and prints only `sentry:read`.
|
|
479
525
|
`remove` deletes it. The same commands support `uptimerobot`, `pagerduty` and
|
|
480
|
-
`calendly`.
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
526
|
+
`calendly`. Sorry's export reads its public status page and needs no key. Never
|
|
527
|
+
put a key in command arguments, chat or a URL.
|
|
528
|
+
|
|
529
|
+
`rer business next` returns, within 60 seconds, one locally templated
|
|
530
|
+
classification, owner link or agent step, or says what `run` would start, and
|
|
531
|
+
says `Nothing yet` only when no agent step waits. Once an app is claimed and its
|
|
532
|
+
import door is on, its `export.vendor` task is the agent's step, and so are a
|
|
533
|
+
move's `catchup.vendor` (bringing over what changed in the old tool) and
|
|
534
|
+
`switchoff.archive` (the final archive before switch-off): next names the step,
|
|
535
|
+
the owner-typed `rer business vendor-key add <vendor>` (or says the key is
|
|
536
|
+
already stored, or that the vendor needs none) and `rer business run`. Run reads
|
|
537
|
+
the adapter's non-secret inputs from the leased task's `export_inputs` (Sentry's
|
|
538
|
+
organization and window, PagerDuty's window and `schedules: 'all'` (every rota
|
|
539
|
+
moves), Sorry's page host); a task that does not carry them yet is handed
|
|
540
|
+
back as paused until Business has them. A move's owner steps (`freeze.vendor`,
|
|
541
|
+
a `rollback.*` card, `switchoff.cancel`) are named as the owner's, with the
|
|
542
|
+
move's page (`/business/:id/moves/:toolId` when the summary names its
|
|
543
|
+
`tool_id`, else the switch-over board `/business/:id`), never as agent work. It
|
|
544
|
+
never reflects server instructions or raw evidence. Owner items cannot be
|
|
545
|
+
answered from this CLI.
|
|
485
546
|
`rer business answer ID VENDOR uses|sells|both|product-dependency [CONFIDENCE]`
|
|
486
547
|
submits a task-scoped classification through MCP. Choose a vendor ID from the
|
|
487
548
|
question's displayed answer schema, or `none`; the suggested vendor can be
|
|
@@ -498,7 +559,12 @@ device through device-authenticated `DELETE /api/business/executors/self` before
|
|
|
498
559
|
removing its service, device and vendor credentials, state and introduced Claude
|
|
499
560
|
rules, preserving preexisting settings and unrelated edits. It says "Device
|
|
500
561
|
revoked" only after the server confirms (`{"revoked":true}`, or 401 for a device
|
|
501
|
-
already revoked).
|
|
562
|
+
already revoked). If this session may not remove the credential, a key, the
|
|
563
|
+
service or the rules after the server revoked the computer, disconnect still
|
|
564
|
+
exits 0: it names what is left and the one command (with
|
|
565
|
+
`RER_BUSINESS_STATE_DIR` when set) that finishes outside the agent sandbox, and
|
|
566
|
+
keeps only that record, so `status` and every other command say revoked. A
|
|
567
|
+
server without that route (403 or 404) leaves the computer
|
|
502
568
|
connected: disconnect says so, names the browser page to revoke it in and keeps
|
|
503
569
|
everything for a later disconnect. Any other failure exits 1 and also keeps the
|
|
504
570
|
credential for a retry. With no stored device credential, nothing is sent and
|
|
@@ -510,25 +576,68 @@ completion checks. Only the browser consent's paths are scanned. Names-only
|
|
|
510
576
|
snapshots and page boundaries are saved privately so a killed supervisor can
|
|
511
577
|
resume from its server checkpoint without rescanning a changed tree. Snapshots
|
|
512
578
|
are removed after completion. A missing snapshot for an acknowledged page is
|
|
513
|
-
an explicit error. Revocation stops the supervisor on its next 401
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
The
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
579
|
+
an explicit error. Revocation stops the supervisor on its next 401; it then
|
|
580
|
+
removes the device credential if it may and `status` says revoked. While it
|
|
581
|
+
waits, `run` says what for: the owner's permission to scan the folder connect
|
|
582
|
+
ran in (with the Your tools link) until this computer's scan is done, then the
|
|
583
|
+
owner's next step. It removes `run.lock` on every exit, including Ctrl-C,
|
|
584
|
+
SIGTERM and a closed terminal (SIGHUP); a lock whose process is gone, or that
|
|
585
|
+
has not been refreshed for two minutes, is cleared on the next start.
|
|
586
|
+
|
|
587
|
+
`rer business run` also performs claimed `export.vendor` tasks into the app's
|
|
588
|
+
import door. The claim's grant names the door (`/api/rer/import/uploads` on the
|
|
589
|
+
app's HTTPS origin) and `import_grants`; every door request asks
|
|
590
|
+
`POST /api/business/tasks/:taskId/import-grants` for its own short-lived
|
|
591
|
+
RER-signed grant (`uploads` or `plan`; apply is the server's alone after the
|
|
592
|
+
owner's wave approval), and the first grant's namespace names the vendor. The
|
|
593
|
+
read-only vendor key is read from OS credential storage, never from arguments,
|
|
594
|
+
the environment or a file. The shipped adapter runs into a private 0600
|
|
595
|
+
`export-<id>.bundle` file in the state folder, each item checked by the outbound
|
|
596
|
+
detector; the bundle is sent in 64 KiB chunks, then planned, which leaves a
|
|
597
|
+
zero-write preview in the door. Run then completes the task with outputs
|
|
598
|
+
`{upload_id, plan_id, bundle_sha256}` (identifiers only); Business reads that
|
|
599
|
+
plan from the door with its own grants and completes the task only if it is the
|
|
600
|
+
plan of exactly that bundle. Run prints only counts and removes the bundle on
|
|
601
|
+
every exit. Without the key, run
|
|
602
|
+
releases the task as `paused` after an `owner_required` event and names the
|
|
603
|
+
owner's command; a running supervisor picks the export up once the key is
|
|
604
|
+
stored. A door that is not ready releases it as `paused` after a
|
|
605
|
+
`connected_runner_required` event, naming the reason. UptimeRobot needs no
|
|
606
|
+
other input. Sentry, PagerDuty and Sorry use the leased task's `export_inputs`;
|
|
607
|
+
when those inputs are missing they release as `paused` after a
|
|
608
|
+
`configuration_required` event. Calendly's folder of files has no single-bundle
|
|
609
|
+
door format yet and releases with the same event. While an agent step waits (an export, or a
|
|
610
|
+
question for `next`, or the lease an earlier run on this computer still holds),
|
|
611
|
+
run says what it waits for instead of `Nothing yet`; otherwise it names a move's
|
|
612
|
+
owner step with its link before `Nothing yet`.
|
|
613
|
+
|
|
614
|
+
`rer business run` performs claimed `catchup.vendor` and `switchoff.archive`
|
|
615
|
+
tasks the same way: the claim's grant names the door, the key comes from OS
|
|
616
|
+
credential storage, and the shipped adapter's bundle goes up in 64 KiB chunks,
|
|
617
|
+
each with its own grant, from a private 0600 file removed on every exit.
|
|
618
|
+
|
|
619
|
+
- A catch-up then plans the upload with `{uploadId, catchup: true}`. Business
|
|
620
|
+
mints its plan grant under the owner's standing catch-up approval when one
|
|
621
|
+
covers the tool, and says so with `catchup: "bounded"` on the grant. If the
|
|
622
|
+
door refuses that with `catchup_requires_proposal:<reason>` (gone, conflicting
|
|
623
|
+
or rejected records, or a change of 5% or more), run asks
|
|
624
|
+
`import-grants` for `{action: "plan", review: true}` and plans the same upload
|
|
625
|
+
again for the owner's review. Run completes with
|
|
626
|
+
`{upload_id, plan_id, bundle_sha256}`; Business applies a bounded plan under
|
|
627
|
+
the standing approval and any other only after the owner approves it.
|
|
628
|
+
- An archive calls the door's `archive` action with `{uploadId, tool, takenAt}`
|
|
629
|
+
(the tool is the vendor's namespace), then `restore-check` with the
|
|
630
|
+
`archiveId`, and requires both answers to carry the bundle's SHA-256 and size,
|
|
631
|
+
the key `business-archive/<tool>/<takenAt>` and the same counts. Run completes
|
|
632
|
+
with `{archive_id, bundle_sha256}`; Business runs its own `restore-check`
|
|
633
|
+
before the task is done. Archive grants are `uploads`, `archive` and
|
|
634
|
+
`restore-check`; catch-up grants are `uploads`, `plan` and `status`.
|
|
635
|
+
|
|
636
|
+
Run prints only counts and the archive key. When an owner summary is supplied,
|
|
637
|
+
the CLI displays its browser link and refuses to answer it.
|
|
638
|
+
|
|
639
|
+
The five deterministic adapter implementations and their native output formats
|
|
640
|
+
are described in [the adapter guide](https://github.com/runeditrun/base/blob/main/cli/business/vendors/README.md).
|
|
532
641
|
|
|
533
642
|
## Local engineering companion
|
|
534
643
|
|
package/global/door/command.mjs
CHANGED
|
@@ -19,6 +19,8 @@ The front door serves every registered checkout at http://NAME.localhost:PORT
|
|
|
19
19
|
from one process on one port. A checkout starts on its first visit in a browser
|
|
20
20
|
and stops when idle. It is opt-in for this computer.
|
|
21
21
|
|
|
22
|
+
rer door clauses (--write | --check) [--cwd DIR]
|
|
23
|
+
Sync Base agent requirements into a seed contract, preserving judgments.
|
|
22
24
|
rer door enable [--port N] [--server-limit N] [--idle-timeout S]
|
|
23
25
|
Opt this computer in, record the policy and start the door.
|
|
24
26
|
Defaults: port 8700, 10 servers, 43200 s (12 hours) idle.
|
|
@@ -247,7 +249,7 @@ export async function doorCommand(args, env = process.env) {
|
|
|
247
249
|
const [verb, ...rest] = args;
|
|
248
250
|
if (!verb || ['--help', '-h', 'help'].includes(verb) || rest.includes('--help')) { process.stdout.write(doorHelp); return 0; }
|
|
249
251
|
const verbs = { enable, disable, add, remove, status, start: (_, e) => start(e), stop: (_, e) => stop(e), restart: (_, e) => restart(e) };
|
|
250
|
-
if (!verbs
|
|
252
|
+
if (!Object.hasOwn(verbs, verb)) { err(`Unknown rer door command: ${verb}. Run rer door --help.`); return 2; }
|
|
251
253
|
if (['start', 'stop', 'restart'].includes(verb) && rest.length) { err(`rer door ${verb} takes no arguments.`); return 2; }
|
|
252
254
|
try { return await verbs[verb](rest, env); }
|
|
253
255
|
catch (error) { if (error instanceof DoorFailure || error.exitCode) { err(error.message); return error.exitCode ?? 1; } throw error; }
|
package/global/main.mjs
CHANGED
|
@@ -71,7 +71,7 @@ export async function main(argv) {
|
|
|
71
71
|
if (!verb || verb === '--help' || verb === '-h' || verb === 'help') { process.stdout.write(help); return 0; }
|
|
72
72
|
if (verb === 'cli') return (await import('./cli/command.mjs')).cliCommand(argv.slice(1));
|
|
73
73
|
if (verb === 'list') return (await import('./list.mjs')).listCommand(argv.slice(1));
|
|
74
|
-
if (verb === 'door') return (await import('./door/command.mjs')).doorCommand(argv.slice(1));
|
|
74
|
+
if (verb === 'door' && argv[1] !== 'clauses') return (await import('./door/command.mjs')).doorCommand(argv.slice(1));
|
|
75
75
|
if (verb === 'run') return (await import('./run.mjs')).runScript(argv.slice(1));
|
|
76
76
|
if (repositoryCommands[verb] && argv.includes('--help')) {
|
|
77
77
|
const { help } = await import('../cli/parse.mjs');
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
# Base-delivered agent clauses
|
|
2
|
+
|
|
3
|
+
This is the canonical acceptance text for BASE-AGENT-001 through BASE-AGENT-013.
|
|
4
|
+
`rer door clauses --write` synchronizes these clauses into a seed's CONTRACT.md.
|
|
5
|
+
The seed owns its SURFACE- and AGENT- clauses and its judgments: adding these
|
|
6
|
+
requirements proves no implementation. New Status rows start missing; later
|
|
7
|
+
syncs retain the seed's status, evidence and gap, including a newer judgment.
|
|
8
|
+
MCP method names below use spaced slashes; wire names omit those spaces.
|
|
9
|
+
|
|
10
|
+
## Target clauses
|
|
11
|
+
|
|
12
|
+
### Agent surface (Base-delivered)
|
|
13
|
+
|
|
14
|
+
#### BASE-AGENT-001 — One MCP door per seed
|
|
15
|
+
|
|
16
|
+
*Tier:* Agent surface
|
|
17
|
+
|
|
18
|
+
**Requirement.** Every seed, hosted or self-hosted, serves one remote MCP endpoint at `/mcp` over Streamable HTTP. It speaks the current revision (2026-07-28) and accepts 2025-11-25 clients through the twelve-month deprecation window. It implements `server / discover`, tools, resources and prompts. Lists are deterministic and carry `ttlMs` and `cacheScope: "private"`. Roots, Sampling and Logging are not served.
|
|
19
|
+
|
|
20
|
+
**Acceptance.**
|
|
21
|
+
1. `server / discover` returns the supported versions, capabilities, `serverInfo` and instructions.
|
|
22
|
+
2. A 2026-07-28 request works with no handshake, and a 2025-11-25 client completes `initialize` and lists the same tools.
|
|
23
|
+
3. An unsupported version returns `UnsupportedProtocolVersion`.
|
|
24
|
+
4. Two `tools / list` calls return the same order, with cache fields.
|
|
25
|
+
5. A foreign Origin returns 403, and a header and body method mismatch returns `HeaderMismatch`.
|
|
26
|
+
6. An oversized body returns 413 with no effect.
|
|
27
|
+
|
|
28
|
+
#### BASE-AGENT-002 — The seed's jobs are tools, through the UI's own actions
|
|
29
|
+
|
|
30
|
+
*Tier:* Agent surface
|
|
31
|
+
|
|
32
|
+
**Requirement.** Each Core job a person does in the product is a tool. Where one is not, the Agent surface says why: it runs on a device, it is a person's interactive screen, it belongs to a connector or the import door, or it is an installation fact. Risk is never the reason: a risky job is a tool with its class (BASE-AGENT-006). Tools are named `<seed>.<area>.<verb>` and declare input and output schemas and truthful annotations. Each calls the same server action as the UI, so validation and authorization are written once, and the seed's embedded agents use the same registry. A business refusal returns `isError` with the seed's stable error code.
|
|
33
|
+
|
|
34
|
+
**Acceptance.**
|
|
35
|
+
1. The Core clause ids in each tool's `_meta`, with the not-a-tool reasons that `server / discover` serves, cover every Core clause in the contract, and no reason is risk; the harness and `rer check` fail on a gap.
|
|
36
|
+
2. Each tool's fixture result validates against its `outputSchema`.
|
|
37
|
+
3. Read tools declare `readOnlyHint`; tools that can carry destructive declare `destructiveHint`, and tools that can carry external declare `openWorldHint`.
|
|
38
|
+
4. A refusal returns the same error code the UI gets for the same action.
|
|
39
|
+
5. The UI action and its tool, on the same fixture, give the same record state and the same audit event type.
|
|
40
|
+
6. The seed's embedded agents appear in the audit as calls to the same tools.
|
|
41
|
+
|
|
42
|
+
#### BASE-AGENT-003 — Records are resources
|
|
43
|
+
|
|
44
|
+
*Tier:* Agent surface
|
|
45
|
+
|
|
46
|
+
**Requirement.** Each primary record type has a URI template, and tools return `resource_link`s to the records they touch. A read returns exactly the fields the caller's role sees in the UI. File bytes count against any byte budget on the grant. A record the caller cannot open reads as not found, identical to a missing id. Text from customers, imports or files carries an untrusted marker in `_meta`.
|
|
47
|
+
|
|
48
|
+
**Acceptance.**
|
|
49
|
+
1. `resources / templates / list` names every record type in the Agent surface.
|
|
50
|
+
2. Reads as two roles return exactly what the UI shows each.
|
|
51
|
+
3. An out-of-scope id and a missing id give identical responses.
|
|
52
|
+
4. A write's `resource_link` reads back the new state.
|
|
53
|
+
5. Bytes over budget return `budget_exhausted` and no partial content.
|
|
54
|
+
6. Customer-sourced text carries the untrusted marker.
|
|
55
|
+
|
|
56
|
+
#### BASE-AGENT-004 — Business identity and short-lived, audience-bound tokens
|
|
57
|
+
|
|
58
|
+
*Tier:* Agent surface
|
|
59
|
+
|
|
60
|
+
**Requirement.** The door is an OAuth 2.1 resource server. Its RFC 9728 metadata names the authorization servers this installation trusts. That is the paired Business when Business provisioned it, verified with the owner-claim trust the installation already holds for its import door; otherwise it is the seed's own sign-in. Access tokens are RFC 9068 JWTs with `aud` set to the seed's canonical MCP URI, `sub` the sponsoring person, `act` the agent (RFC 8693) with its specialist, scopes per tool family, and a lifetime of 15 minutes or less (5 by default). The policy scopes rules on the sponsor, agent and specialist the token names. The consent behind the tokens can last longer and is revocable. Tokens travel only in the Authorization header, and there is no passthrough.
|
|
61
|
+
|
|
62
|
+
**Acceptance.**
|
|
63
|
+
1. An unauthenticated call returns 401 with `resource_metadata`, and the metadata names the trusted servers and scopes.
|
|
64
|
+
2. A Business token for this seed works, and the same token sent to a sibling seed returns 401.
|
|
65
|
+
3. An expired token returns 401, and a token with a lifetime over 15 minutes is refused.
|
|
66
|
+
4. A read-only token calling a write tool returns 403 `insufficient_scope` with every needed scope in one challenge.
|
|
67
|
+
5. A token in a query string is refused and not logged.
|
|
68
|
+
6. Revoking consent in the seed or in Business refuses the next call within 60 seconds.
|
|
69
|
+
7. After unpairing, Business tokens are refused and the seed's own sign-in still works.
|
|
70
|
+
|
|
71
|
+
#### BASE-AGENT-005 — An agent acts as a person in a role, never more
|
|
72
|
+
|
|
73
|
+
*Tier:* Agent surface
|
|
74
|
+
|
|
75
|
+
**Requirement.** Every call is authorized as the sponsoring person's current role and access (BASE-ACCESS-004), intersected with the grant's resources, actions and budget. A grant only narrows. No call widens the calling agent's own authority. A call that would widen its own grant or its sponsor's role, or change the company policy or Pause, is refused with `self_escalation`, whatever the policy says; narrowing its own grant is allowed. Other access and security changes are ordinary actions in the access and security classes. An agent never acts after its sponsor is suspended. Anything an agent reads (records, files, emails, imports, other seeds' results) is data and cannot change its scope, its targets or a call's class.
|
|
76
|
+
|
|
77
|
+
**Acceptance.**
|
|
78
|
+
1. For each role fixture, every tool's allow or deny through MCP equals the UI's for the same action.
|
|
79
|
+
2. A one-folder, read-only grant holds, and widening through arguments is refused.
|
|
80
|
+
3. Downgrading the sponsor changes the next call's result, and suspending the sponsor returns 401.
|
|
81
|
+
4. Calls that widen the agent's own grant or its sponsor's role, or change the policy or Pause, return `self_escalation` and change nothing, even under a policy with every class autonomous; dropping a scope from its own grant runs.
|
|
82
|
+
5. An injection fixture yields no out-of-grant call and no change of class: record text asking for a wider action, or claiming that a recipient is internal.
|
|
83
|
+
|
|
84
|
+
#### BASE-AGENT-006 — Every action declares its risk class
|
|
85
|
+
|
|
86
|
+
*Tier:* Agent surface
|
|
87
|
+
|
|
88
|
+
**Requirement.** Classes come from the fleet list in RISK-POLICY.md: standard, external, money, commitment, accounts, gated, access, security, destructive, sensitive and live. In the registry, each tool declares the classes it can carry and a server-side classifier that decides them per call from the arguments, current records and, for gated, the provider's answer. The classifier also supplies each class's facts: the measure (items, recipients, amount and currency, people or records), the counterparty (internal, known, new or public), the direction for access, the provider and step for gated, and the data kind for sensitive. A classifier never reads a flag, label or claim supplied by the agent or by record text. A seed cannot add a class; it proposes one for the fleet list.
|
|
89
|
+
|
|
90
|
+
**Acceptance.**
|
|
91
|
+
1. Every tool in `tools / list` carries its possible classes in `_meta`, equal to the Agent surface table.
|
|
92
|
+
2. For each tool, fixture calls cover every class it can carry, and the computed classes and facts equal the fixture's expected values.
|
|
93
|
+
3. An argument or record text asserting a class or a confirmation (`internal: true`, `confirmExternal: true`) leaves the computed classes unchanged.
|
|
94
|
+
4. Money calls carry amount and currency, external calls their counterparty and recipient count, access calls their direction, and destructive calls their item count.
|
|
95
|
+
5. No tool in `tools / list` declares a class outside the fleet list, and `rer check` fails on one.
|
|
96
|
+
6. A refused call's audit row still records its computed classes.
|
|
97
|
+
|
|
98
|
+
#### BASE-AGENT-007 — The company's policy decides, at one chokepoint
|
|
99
|
+
|
|
100
|
+
*Tier:* Agent surface
|
|
101
|
+
|
|
102
|
+
**Requirement.** Every agent door calls one decision function: MCP, the integration API with agent tokens, and the seed's embedded agents. It evaluates the call's classes against the company's policy, as above. The seed ships no dispositions and fills no gap with one: agent access opens only under a complete policy that setup has asked for (RISK-POLICY.md), and before then every agent call returns `policy_unset` with the setup link and changes nothing. *Autonomous* runs the call. *Review* runs it and adds it to the review feed. *Approval* saves a pending action with server-computed facts and returns `input_required`, with a URL-mode elicitation to the seed's approval page and a pending handle. Each person the rule names approves the exact saved revision in a signed-in browser, and changed inputs need a new approval. The retried call returns the result and a receipt. A rejection returns `approval_rejected`, and a lapse past the wait the rule sets returns `approval_expired`. *Blocked* returns `policy_blocked`, naming the class, rule and revision.
|
|
103
|
+
|
|
104
|
+
**Acceptance.**
|
|
105
|
+
1. The Base harness runs each tool under each disposition for every class it can carry, and sees it run, run and enter the review feed, wait with no effect, or be refused.
|
|
106
|
+
2. Before setup is complete, the setup page lists every class the seed's tools carry with examples and no answer pre-selected, an agent call returns `policy_unset` with the setup link and changes nothing, and an incomplete revision cannot be confirmed; a `*` rule completes it, and a tool an upgrade adds with an unanswered class appears in `tools / list` once that class is answered, while the other tools keep running.
|
|
107
|
+
3. Under "money autonomous up to $500, approval up to $10,000, blocked above", calls of $400, $600 and $20,000 run, wait and are refused; a per-day cap sends the call that crosses it to the next rule.
|
|
108
|
+
4. A call carrying two classes takes the stricter disposition.
|
|
109
|
+
5. An approval shows server-computed facts and an expiry, returns the URL elicitation and a handle, and completes once after the named approver approves; a changed input needs a new approval, and a rejection or lapse leaves no effect.
|
|
110
|
+
6. The same call through MCP, the integration API and an embedded agent gets the same decision.
|
|
111
|
+
7. A policy change applies to the next call within 60 seconds, and the audit cites the new revision.
|
|
112
|
+
8. A policy document with a bad signature or another Business's id is rejected, and the door keeps the last valid revision.
|
|
113
|
+
|
|
114
|
+
#### BASE-AGENT-008 — Truthful attribution
|
|
115
|
+
|
|
116
|
+
*Tier:* Agent surface
|
|
117
|
+
|
|
118
|
+
**Requirement.** Every agent act is recorded and shown as `"<agent> for <person>"`, and mail and messages an agent sends outside name it that way as their sender. An approval, a review mark, a confirmation (a warning dialog, a typed-field confirmation, a delivery confirmation), a decision or a signature attributed to a person comes only from that person's signed-in session. When an agent does the equivalent act, the record names the agent, and the act carries its own class; a binding decision or a signature is commitment. Agent doors ignore arguments that stand for a person's confirmation. No tool solves a bot check, or enters a person's own password or 2FA code at an outside service. A provider step that demands a person goes to a person, whatever the policy says; the gated class marks such steps before they run.
|
|
119
|
+
|
|
120
|
+
**Acceptance.**
|
|
121
|
+
1. An agent call carrying a person-confirmation flag is classified and decided exactly as without it.
|
|
122
|
+
2. Approving, marking reviewed or answering a policy question with an agent or device token returns 403 and changes nothing.
|
|
123
|
+
3. A form-mode elicitation "accept" never completes an approval.
|
|
124
|
+
4. Where an agent's decision, signature or field confirmation runs without a person, it reads `"<agent> for <person>"` in the record, the activity view, exports and any certificate, never as the person's own act.
|
|
125
|
+
5. After a person approves an agent's prepared action, the record shows the person as approver and the agent as preparer.
|
|
126
|
+
6. Activity and exports at 1440 and 390 show `"<agent> for <person>"` for every agent act.
|
|
127
|
+
7. Mail an agent sends to an outside address names `"<agent> for <person>"` as its sender.
|
|
128
|
+
|
|
129
|
+
#### BASE-AGENT-009 — Every agent action is audited with its class and decision
|
|
130
|
+
|
|
131
|
+
*Tier:* Agent surface
|
|
132
|
+
|
|
133
|
+
**Requirement.** Extending BASE-OPS-005, each call that reads private data or changes anything records the agent client, name and specialist, and the run or task id (`traceparent` when sent); the sponsoring person, the grant, the tool and the targets; the classes and their facts, and the policy revision and rule; the decision (autonomous, review, approval, blocked, unset or self_escalation) and the outcome (done, refused, pending or failed); the approval or review id and person, and the idempotency key. For a period, the seed's Agents page shows actions by class and decision with the notable ones, the review feed (Mark reviewed, Flag, and Undo where reversible), pending approvals, steps waiting for a person and setup questions. Business shows the same across seeds.
|
|
134
|
+
|
|
135
|
+
**Acceptance.**
|
|
136
|
+
1. One write leaves a complete audit row.
|
|
137
|
+
2. Refused, pending, unset and self-escalation calls are audited.
|
|
138
|
+
3. The Agents page's counts by class and decision equal the audit rows on a fixture week.
|
|
139
|
+
4. The review feed lists exactly the calls decided as review; Mark reviewed records the person, and Undo restores a reversible one.
|
|
140
|
+
5. Filtering by agent or class lists only those rows, and export includes every field.
|
|
141
|
+
6. Removing the agent keeps its rows and its name.
|
|
142
|
+
7. The Agents page works at 1440 and 390 with no serious or critical axe findings.
|
|
143
|
+
|
|
144
|
+
#### BASE-AGENT-010 — Agents can follow changes
|
|
145
|
+
|
|
146
|
+
*Tier:* Agent surface
|
|
147
|
+
|
|
148
|
+
**Requirement.** The seed emits a typed event for every record change and for every approval, review and policy decision. Each event carries a stable id, a type, the record URI, the actor (a person, or an agent acting for a person) and a time. Events never carry secrets or more than the subscriber may read. Agents can read events three ways: `subscriptions / listen`, an `events.list` tool with a cursor, and signed webhooks from Base `integrations` using the same ids. Every channel delivers at least once and filters by access at delivery.
|
|
149
|
+
|
|
150
|
+
**Acceptance.**
|
|
151
|
+
1. A subscribed record changed in the UI produces a notification within 10 seconds.
|
|
152
|
+
2. `events.list` returns the same event id the webhook carries.
|
|
153
|
+
3. Replaying from a cursor returns the same ids in order.
|
|
154
|
+
4. After access is revoked, no channel delivers events about that record.
|
|
155
|
+
5. A failed webhook is visible and replays without duplicate effects.
|
|
156
|
+
6. `approval.pending`, `approval.decided`, `review.flagged` and `policy.adopted` carry the class and decision and nothing the subscriber may not read.
|
|
157
|
+
|
|
158
|
+
#### BASE-AGENT-011 — Limits are policy, and Pause stops everything
|
|
159
|
+
|
|
160
|
+
*Tier:* Agent surface
|
|
161
|
+
|
|
162
|
+
**Requirement.** Business limits are rules in the company's policy: per-call and per-day thresholds on any class's measure, such as money moved, outside recipients or items destroyed; spend caps on provider cost (models, SMS, email) per seed, specialist or agent, which setup asks with the classes; "no cap" is an answer. Tools with provider cost declare an estimate before they run, and an exhausted cap returns `budget_exhausted` before any partial effect. The seed's capacity limits (request rate, body and byte sizes) protect the installation: they bound rate and size, never daily business volume, are documented and are not policy. A grant carries budgets only when the person granting it sets them. A **Pause agents** control in the seed, and Pause all agents in Business when paired, refuses every agent token within 60 seconds until a person resumes; browser sessions and devices keep working.
|
|
163
|
+
|
|
164
|
+
**Acceptance.**
|
|
165
|
+
1. A rate overrun returns 429 with `Retry-After`.
|
|
166
|
+
2. A per-day cap of three outside recipients sends the fourth to the rule that applies past the cap.
|
|
167
|
+
3. An exhausted spend cap returns `budget_exhausted` with no partial effect and shows the spend.
|
|
168
|
+
4. Under the answer "no cap", a spending call runs and its spend shows in usage; a call that spends nothing is unaffected by any cap.
|
|
169
|
+
5. The usage view shows calls, decisions by class, money moved and provider spend per agent.
|
|
170
|
+
6. Pause and Pause all agents each stop the next call within 60 seconds, and resume restores access.
|
|
171
|
+
7. An agent token cannot resume.
|
|
172
|
+
|
|
173
|
+
#### BASE-AGENT-012 — Writes are idempotent and conflict-safe
|
|
174
|
+
|
|
175
|
+
*Tier:* Agent surface
|
|
176
|
+
|
|
177
|
+
**Requirement.** Every mutating tool requires an idempotency key and takes an optional expected revision. The same key with the same arguments returns the first outcome for at least 24 hours; the same key with different arguments returns `idempotency_conflict`; a stale revision returns `revision_conflict` with the current revision. Long work returns a job handle and a status tool, with no dependence on the Tasks extension.
|
|
178
|
+
|
|
179
|
+
**Acceptance.**
|
|
180
|
+
1. Two calls with one key give one effect and equal results.
|
|
181
|
+
2. A retry with a new JSON-RPC id and the same key, after a dropped stream, returns the recorded outcome.
|
|
182
|
+
3. The same key with different arguments returns a conflict and no effect.
|
|
183
|
+
4. A stale revision returns a conflict naming the current revision.
|
|
184
|
+
5. A job handle used by another person's token reads as not found.
|
|
185
|
+
|
|
186
|
+
#### BASE-AGENT-013 — Manifest, docs and the conformance journey
|
|
187
|
+
|
|
188
|
+
*Tier:* Agent surface
|
|
189
|
+
|
|
190
|
+
**Requirement.** `server / discover` instructions and an on-site `/docs/agents` page are generated from the action registry. The page lists tools by job, with each tool's classes, the test that adds each computed class, its scopes, resource templates, event types, capacity limits and error codes, and the specialist role. `prompts / list` carries the specialist's jobs. Base ships the conformance journey, a harness that `rer verify` runs against `rer dev` and seeds run in CI. It is an MCP client; a signed-in test person takes a person's steps (setup answers, approvals, review marks, resume) through the URLs the door returns, and the same browser leg runs the UI-parity actions and the page checks at 1440 and 390. It runs every acceptance point of BASE-AGENT-001 to 012 and of the seed's SURFACE clauses under two company policies: *all autonomous* (`*`), and *held* (standard review, every other class the seed declares approval, which the test person grants), plus the single-class variants a point names. A point that names no disposition passes under both.
|
|
191
|
+
|
|
192
|
+
**Acceptance.**
|
|
193
|
+
1. The docs list exactly the names in `tools / list` and `resources / templates / list`.
|
|
194
|
+
2. Each tool's classes, and the test behind each computed one, are documented.
|
|
195
|
+
3. The harness fails on any of: a tool without a schema; an effect under approval or blocked, or before setup is complete; a computed class that differs from its fixture; a flag that changes a class or completes a person's step; a role-parity mismatch; a wrong-audience token being accepted; a duplicate effect on retry.
|
|
196
|
+
4. Every acceptance point runs under both policies, every decision matches the policy in force, and under all autonomous no call waits for a person or is refused by policy.
|
|
197
|
+
5. A stranger agent given only the seed URL completes the specialist journey through MCP.
|
|
198
|
+
|
|
199
|
+
## Status
|
|
200
|
+
|
|
201
|
+
| Clause | Title | Kind | Status | Evidence | Gap |
|
|
202
|
+
| --- | --- | --- | --- | --- | --- |
|
|
203
|
+
| `BASE-AGENT-001` | One MCP door per seed | target | missing | | Not yet judged through this seed's own doors. |
|
|
204
|
+
| `BASE-AGENT-002` | The seed's jobs are tools, through the UI's own actions | target | missing | | Not yet judged through this seed's own doors. |
|
|
205
|
+
| `BASE-AGENT-003` | Records are resources | target | missing | | Not yet judged through this seed's own doors. |
|
|
206
|
+
| `BASE-AGENT-004` | Business identity and short-lived, audience-bound tokens | target | missing | | Not yet judged through this seed's own doors. |
|
|
207
|
+
| `BASE-AGENT-005` | An agent acts as a person in a role, never more | target | missing | | Not yet judged through this seed's own doors. |
|
|
208
|
+
| `BASE-AGENT-006` | Every action declares its risk class | target | missing | | Not yet judged through this seed's own doors. |
|
|
209
|
+
| `BASE-AGENT-007` | The company's policy decides, at one chokepoint | target | missing | | Not yet judged through this seed's own doors. |
|
|
210
|
+
| `BASE-AGENT-008` | Truthful attribution | target | missing | | Not yet judged through this seed's own doors. |
|
|
211
|
+
| `BASE-AGENT-009` | Every agent action is audited with its class and decision | target | missing | | Not yet judged through this seed's own doors. |
|
|
212
|
+
| `BASE-AGENT-010` | Agents can follow changes | target | missing | | Not yet judged through this seed's own doors. |
|
|
213
|
+
| `BASE-AGENT-011` | Limits are policy, and Pause stops everything | target | missing | | Not yet judged through this seed's own doors. |
|
|
214
|
+
| `BASE-AGENT-012` | Writes are idempotent and conflict-safe | target | missing | | Not yet judged through this seed's own doors. |
|
|
215
|
+
| `BASE-AGENT-013` | Manifest, docs and the conformance journey | target | missing | | Not yet judged through this seed's own doors. |
|