@sema-agent/core 7.71.1 → 7.73.0
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/CHANGELOG.md +500 -0
- package/dist/agents/cross-session-ref.d.ts +2 -2
- package/dist/agents/cross-session-ref.js +7 -2
- package/dist/agents/inherited-tool-pool.d.ts +30 -2
- package/dist/agents/inherited-tool-pool.js +53 -7
- package/dist/agents/parked-resume-drive.d.ts +10 -0
- package/dist/agents/parked-resume-drive.js +9 -0
- package/dist/agents/retain-ledger.d.ts +3 -0
- package/dist/agents/send-message-tool.js +7 -2
- package/dist/agents/send-user-message-tool.d.ts +12 -0
- package/dist/agents/send-user-message-tool.js +67 -0
- package/dist/agents/subagent-steps.d.ts +9 -0
- package/dist/agents/subagent-steps.js +38 -0
- package/dist/agents/subagent.d.ts +2 -0
- package/dist/agents/subagent.js +47 -12
- package/dist/agents/verify.js +23 -7
- package/dist/agents/yield-adoption.js +3 -1
- package/dist/brain/anthropic.js +14 -9
- package/dist/brain/open-responses.js +4 -5
- package/dist/brain/openai.js +30 -23
- package/dist/brain/stream-engine.js +159 -151
- package/dist/core/a2a.d.ts +24 -3
- package/dist/core/a2a.js +27 -8
- package/dist/core/actions-digest.d.ts +43 -0
- package/dist/core/actions-digest.js +22 -0
- package/dist/core/agent-state.d.ts +28 -7
- package/dist/core/agent-state.js +19 -6
- package/dist/core/allow-entry.js +3 -3
- package/dist/core/approval-object.d.ts +7 -3
- package/dist/core/approval-object.js +30 -9
- package/dist/core/auto-mode.d.ts +7 -9
- package/dist/core/auto-mode.js +114 -8
- package/dist/core/checkpoint-features.d.ts +16 -5
- package/dist/core/checkpoint-features.js +35 -6
- package/dist/core/checkpoint-rekey.d.ts +1 -1
- package/dist/core/checkpoint-rekey.js +6 -1
- package/dist/core/checkpoint-requirements.d.ts +23 -3
- package/dist/core/checkpoint-requirements.js +5 -1
- package/dist/core/checkpoint-row-verdict.d.ts +1 -1
- package/dist/core/checkpoint-row-verdict.js +10 -4
- package/dist/core/checkpoint-store.d.ts +24 -2
- package/dist/core/checkpoint-store.js +1 -0
- package/dist/core/child-clamp-seats.d.ts +15 -0
- package/dist/core/child-clamp-seats.js +15 -0
- package/dist/core/delegation-frames.d.ts +1 -0
- package/dist/core/delegation-frames.js +1 -1
- package/dist/core/effective-path-target.d.ts +19 -0
- package/dist/core/effective-path-target.js +95 -38
- package/dist/core/engine-capabilities.d.ts +5 -1
- package/dist/core/engine-capabilities.js +1 -1
- package/dist/core/engine-notice.d.ts +34 -23
- package/dist/core/engine-version.js +1 -1
- package/dist/core/entries-not-applied.d.ts +19 -7
- package/dist/core/entries-not-applied.js +33 -1
- package/dist/core/file-history-store.d.ts +15 -4
- package/dist/core/file-history-store.js +53 -23
- package/dist/core/gate-fold.js +3 -1
- package/dist/core/governance-codes.d.ts +10 -1
- package/dist/core/governance-codes.js +17 -5
- package/dist/core/hooks.d.ts +3 -0
- package/dist/core/hooks.js +1 -0
- package/dist/core/host-instance.d.ts +23 -0
- package/dist/core/host-instance.js +69 -0
- package/dist/core/instruction-preview.d.ts +63 -0
- package/dist/core/instruction-preview.js +406 -0
- package/dist/core/judged-read.d.ts +57 -0
- package/dist/core/judged-read.js +1 -0
- package/dist/core/leg-budget.d.ts +26 -0
- package/dist/core/leg-budget.js +9 -0
- package/dist/core/leg-identity.d.ts +51 -1
- package/dist/core/leg-identity.js +45 -2
- package/dist/core/manager-launch-check.d.ts +48 -0
- package/dist/core/manager-launch-check.js +64 -0
- package/dist/core/mcp-call-meta.d.ts +2 -2
- package/dist/core/mcp-host-seat.d.ts +5 -0
- package/dist/core/mcp-host-seat.js +7 -1
- package/dist/core/mcp-injection-drop.d.ts +20 -10
- package/dist/core/mcp-injection-drop.js +9 -3
- package/dist/core/mcp-server-spec.d.ts +2 -1
- package/dist/core/mcp.js +3 -1
- package/dist/core/member-outcome.d.ts +3 -2
- package/dist/core/member-outcome.js +1 -1
- package/dist/core/memory-engine/deletion-record.d.ts +46 -0
- package/dist/core/memory-engine/deletion-record.js +96 -0
- package/dist/core/memory-engine/engine.js +24 -16
- package/dist/core/memory-engine/file-backend.js +7 -5
- package/dist/core/memory-engine/index.d.ts +1 -1
- package/dist/core/memory-engine/index.js +1 -1
- package/dist/core/memory-engine/layout.js +6 -4
- package/dist/core/memory-engine/projection-ledger.d.ts +1 -1
- package/dist/core/memory-engine/projection-ledger.js +1 -1
- package/dist/core/memory-engine/scope-contract.d.ts +69 -11
- package/dist/core/memory-engine/scope-contract.js +99 -34
- package/dist/core/memory-engine/sync-client.js +26 -6
- package/dist/core/memory-engine/sync.d.ts +20 -2
- package/dist/core/memory-engine/sync.js +18 -17
- package/dist/core/mode-policy.d.ts +21 -6
- package/dist/core/mode-policy.js +15 -6
- package/dist/core/mounted-mcp.d.ts +7 -2
- package/dist/core/mounted-mcp.js +10 -1
- package/dist/core/own-property-receipt.js +11 -4
- package/dist/core/param-rule-reach.d.ts +8 -3
- package/dist/core/param-rule-reach.js +9 -1
- package/dist/core/parent-spec-seat.d.ts +13 -1
- package/dist/core/parent-spec-seat.js +18 -0
- package/dist/core/peer-registration.d.ts +52 -0
- package/dist/core/peer-registration.js +37 -0
- package/dist/core/peer-seat.d.ts +3 -1
- package/dist/core/peer-seat.js +3 -3
- package/dist/core/peer-task-store.d.ts +365 -0
- package/dist/core/peer-task-store.js +682 -0
- package/dist/core/permission-rule-consent.js +6 -11
- package/dist/core/permission-rule-model.d.ts +27 -0
- package/dist/core/permission-rule-model.js +34 -6
- package/dist/core/permission-rule-provider.d.ts +35 -33
- package/dist/core/permission-rule-provider.js +38 -295
- package/dist/core/permission-rule-store.d.ts +181 -8
- package/dist/core/permission-rule-store.js +420 -17
- package/dist/core/permission-rule-sync.js +15 -1
- package/dist/core/project-seat.d.ts +55 -0
- package/dist/core/project-seat.js +96 -0
- package/dist/core/protocol-http-auth.d.ts +3 -2
- package/dist/core/protocol-http-auth.js +26 -18
- package/dist/core/remote-env.d.ts +4 -4
- package/dist/core/retired-keys.js +1 -0
- package/dist/core/rule-offer-read.d.ts +1 -1
- package/dist/core/rule-offer-read.js +32 -4
- package/dist/core/run-ledger-seat.d.ts +66 -0
- package/dist/core/run-ledger-seat.js +70 -0
- package/dist/core/run-ledger.d.ts +332 -0
- package/dist/core/run-ledger.js +550 -0
- package/dist/core/runner/chain-mismatch.d.ts +32 -0
- package/dist/core/runner/chain-mismatch.js +29 -0
- package/dist/core/runner/changes-history.d.ts +1 -0
- package/dist/core/runner/changes-history.js +2 -2
- package/dist/core/runner/checkpoint-scope.d.ts +13 -3
- package/dist/core/runner/checkpoint-scope.js +12 -4
- package/dist/core/runner/construction-doors.js +6 -0
- package/dist/core/runner/contracts.d.ts +22 -3
- package/dist/core/runner/delegation-owner.d.ts +30 -0
- package/dist/core/runner/delegation-owner.js +20 -4
- package/dist/core/runner/file-history-restore.d.ts +3 -1
- package/dist/core/runner/file-history-restore.js +9 -6
- package/dist/core/runner/finish-reason-seat.js +4 -2
- package/dist/core/runner/leg-frame.js +3 -0
- package/dist/core/runner/loaded-skills.d.ts +2 -0
- package/dist/core/runner/loaded-skills.js +10 -0
- package/dist/core/runner/nested-memory-lane.d.ts +22 -5
- package/dist/core/runner/nested-memory-lane.js +91 -30
- package/dist/core/runner/person-path-rows.d.ts +23 -20
- package/dist/core/runner/person-path-rows.js +82 -18
- package/dist/core/runner/prepare-caps-and-workflow.d.ts +4 -0
- package/dist/core/runner/prepare-caps-and-workflow.js +105 -90
- package/dist/core/runner/prepare-config-doors.d.ts +1 -0
- package/dist/core/runner/prepare-config-doors.js +5 -3
- package/dist/core/runner/prepare-context-lane.js +1 -0
- package/dist/core/runner/prepare-delegation-surface.d.ts +3 -0
- package/dist/core/runner/prepare-delegation-surface.js +6 -0
- package/dist/core/runner/prepare-execution-env.d.ts +3 -3
- package/dist/core/runner/prepare-file-history.js +1 -1
- package/dist/core/runner/prepare-hands-readface.d.ts +10 -2
- package/dist/core/runner/prepare-hands-readface.js +36 -22
- package/dist/core/runner/prepare-inherited-gate.d.ts +8 -5
- package/dist/core/runner/prepare-inherited-gate.js +14 -6
- package/dist/core/runner/prepare-memory-engine-session.d.ts +2 -2
- package/dist/core/runner/prepare-memory-engine-session.js +2 -2
- package/dist/core/runner/prepare-memory.js +3 -15
- package/dist/core/runner/prepare-project-context.d.ts +1 -1
- package/dist/core/runner/prepare-project-context.js +3 -7
- package/dist/core/runner/prepare-protocol-tools.d.ts +5 -0
- package/dist/core/runner/prepare-protocol-tools.js +2 -2
- package/dist/core/runner/prepare-run-refs.d.ts +1 -1
- package/dist/core/runner/prepare-run-refs.js +3 -2
- package/dist/core/runner/prepare-suspend-saga.d.ts +6 -2
- package/dist/core/runner/prepare-suspend-saga.js +4 -2
- package/dist/core/runner/prepare-task.js +50 -37
- package/dist/core/runner/prepare-turn-wiring.d.ts +4 -3
- package/dist/core/runner/prepare-turn-wiring.js +2 -1
- package/dist/core/runner/prepare-wiring-manifest.d.ts +5 -1
- package/dist/core/runner/prepare-wiring-manifest.js +8 -4
- package/dist/core/runner/read-session-changes.js +1 -1
- package/dist/core/runner/resume-apply.js +11 -5
- package/dist/core/runner/resume-checkpoint-screen.d.ts +8 -7
- package/dist/core/runner/resume-checkpoint-screen.js +7 -6
- package/dist/core/runner/resume-review-outcome.d.ts +3 -0
- package/dist/core/runner/resume-review-outcome.js +24 -1
- package/dist/core/runner/rewind-files.js +3 -2
- package/dist/core/runner/run-harness-handlers.js +3 -0
- package/dist/core/runner/run-identity-wiring.js +3 -2
- package/dist/core/runner/run-leg.js +9 -2
- package/dist/core/runner/run-notification-lane.js +20 -1
- package/dist/core/runner/run-settle-and-teardown.js +21 -12
- package/dist/core/runner/run-stop-and-final-verify.js +6 -0
- package/dist/core/runner/run-telemetry-and-budget-seats.js +1 -1
- package/dist/core/runner/runtask.d.ts +6 -2
- package/dist/core/runner/runtask.js +21 -9
- package/dist/core/runner/shell-env-withheld.d.ts +3 -2
- package/dist/core/runner/shell-env-withheld.js +1 -2
- package/dist/core/runner/stop-tail-notice.d.ts +10 -2
- package/dist/core/runner/stop-tail-notice.js +9 -2
- package/dist/core/runner/stream-settle-backstop.d.ts +1 -0
- package/dist/core/runner/stream-settle-backstop.js +1 -0
- package/dist/core/runner/task-start-doors.js +6 -3
- package/dist/core/runner/terminal-account.d.ts +10 -1
- package/dist/core/runner/terminal-account.js +23 -3
- package/dist/core/runner/tool-face-overlay.d.ts +2 -11
- package/dist/core/runner/tool-face-overlay.js +39 -0
- package/dist/core/runner/trim-stretch.js +7 -2
- package/dist/core/runner/unreadable-person-rows.d.ts +2 -1
- package/dist/core/runner-deps.d.ts +13 -10
- package/dist/core/scheduler.d.ts +47 -7
- package/dist/core/scheduler.js +19 -7
- package/dist/core/secret-env.d.ts +60 -37
- package/dist/core/secret-env.js +45 -48
- package/dist/core/sensitive-path-policy.js +14 -7
- package/dist/core/session-checkout.d.ts +3 -0
- package/dist/core/session-checkout.js +1 -0
- package/dist/core/session-store.d.ts +12 -6
- package/dist/core/session-store.js +26 -6
- package/dist/core/session.d.ts +31 -8
- package/dist/core/shell-read-silence.js +1 -0
- package/dist/core/store-contracts/checkpoint-store-contract.js +17 -0
- package/dist/core/store-contracts/peer-task-store-contract.d.ts +21 -0
- package/dist/core/store-contracts/peer-task-store-contract.js +516 -0
- package/dist/core/store-contracts/session-store-contract.d.ts +15 -2
- package/dist/core/store-contracts/session-store-contract.js +87 -3
- package/dist/core/store-contracts/workflow-journal-store-contract.d.ts +19 -1
- package/dist/core/store-contracts/workflow-journal-store-contract.js +89 -1
- package/dist/core/task-event.d.ts +11 -3
- package/dist/core/task-notification.d.ts +97 -10
- package/dist/core/task-notification.js +129 -5
- package/dist/core/task-registry-shared.d.ts +12 -1
- package/dist/core/task-registry-shared.js +3 -1
- package/dist/core/task-registry-workflow.d.ts +1 -1
- package/dist/core/task-registry-workflow.js +9 -1
- package/dist/core/task-registry.d.ts +39 -2
- package/dist/core/task-registry.js +76 -12
- package/dist/core/task-result.d.ts +13 -0
- package/dist/core/task-spec-members.d.ts +3 -1
- package/dist/core/task-spec-members.js +11 -3
- package/dist/core/task-spec.d.ts +57 -23
- package/dist/core/tool-catalog-entries.js +4 -0
- package/dist/core/tool-face-reader.js +1 -1
- package/dist/core/tool-face.d.ts +7 -0
- package/dist/core/tool-face.js +1 -0
- package/dist/core/tool-mount-facts.d.ts +5 -3
- package/dist/core/tool-mount-facts.js +4 -3
- package/dist/core/tool-mount-plan.d.ts +7 -3
- package/dist/core/tool-mount-plan.js +11 -5
- package/dist/core/tool-mount-static.d.ts +2 -2
- package/dist/core/tool-mount-static.js +28 -14
- package/dist/core/tool-registry.d.ts +33 -1
- package/dist/core/tool-registry.js +33 -0
- package/dist/core/tool-result-store.d.ts +19 -2
- package/dist/core/tool-result-store.js +51 -2
- package/dist/core/tool-roster.d.ts +16 -0
- package/dist/core/tool-roster.js +6 -0
- package/dist/core/tool-spec.d.ts +13 -4
- package/dist/core/tools.d.ts +6 -0
- package/dist/core/tools.js +1 -1
- package/dist/core/user-attachment.d.ts +5 -1
- package/dist/core/user-attachment.js +14 -7
- package/dist/core/wiring-manifest.d.ts +89 -29
- package/dist/core/wiring-manifest.js +44 -4
- package/dist/core/workflow-journal-store.d.ts +53 -10
- package/dist/core/workflow-journal-store.js +27 -4
- package/dist/core/workflow-run-store-contract.js +16 -0
- package/dist/core/workflow-run-store.d.ts +9 -7
- package/dist/core/workflow-run-store.js +4 -1
- package/dist/engine/execution-env/node-execution-env.js +3 -1
- package/dist/engine/harness/messages.d.ts +1 -1
- package/dist/engine/harness/messages.js +2 -1
- package/dist/engine/harness/types.d.ts +24 -1
- package/dist/engine/harness/types.js +10 -0
- package/dist/engine/llm/types.d.ts +5 -7
- package/dist/engine/loop/types.d.ts +2 -0
- package/dist/engine/lsp/node-lsp-manager.js +2 -1
- package/dist/engine/session/import-validate.js +6 -1
- package/dist/engine/session/session.d.ts +15 -2
- package/dist/engine/session/session.js +35 -5
- package/dist/index.d.ts +27 -12
- package/dist/index.js +20 -8
- package/dist/orchestration/run-workflow-tool.js +40 -32
- package/dist/orchestration/workflow-park-adoption.d.ts +51 -12
- package/dist/orchestration/workflow-park-adoption.js +47 -12
- package/dist/orchestration/workflow-stop.d.ts +128 -0
- package/dist/orchestration/workflow-stop.js +156 -0
- package/dist/orchestration/workflow.d.ts +30 -6
- package/dist/orchestration/workflow.js +117 -54
- package/dist/prompts/manager-recipe.d.ts +18 -0
- package/dist/prompts/manager-recipe.js +24 -0
- package/dist/stores/file/adoption/marker.d.ts +2 -27
- package/dist/stores/file/adoption/marker.js +12 -0
- package/dist/stores/file/index.d.ts +1 -1
- package/dist/stores/file/index.js +1 -1
- package/dist/stores/file/permission-rule-store.d.ts +3 -1
- package/dist/stores/file/permission-rule-store.js +0 -1
- package/dist/stores/file/workflow-journal-store.d.ts +16 -3
- package/dist/stores/file/workflow-journal-store.js +93 -5
- package/dist/stores/file/workflow-run-store.d.ts +1 -1
- package/dist/tools/artifact/artifact-tool.js +11 -6
- package/dist/tools/fs/file-read-check.d.ts +45 -11
- package/dist/tools/fs/file-read-check.js +200 -57
- package/dist/tools/fs/file-write-check.js +9 -3
- package/dist/tools/fs/index.d.ts +8 -7
- package/dist/tools/fs/index.js +4 -4
- package/dist/tools/fs/judged-reads.d.ts +51 -0
- package/dist/tools/fs/judged-reads.js +68 -0
- package/dist/tools/fs/read-deny-home.d.ts +1 -1
- package/dist/tools/fs/read-deny-home.js +5 -5
- package/dist/tools/fs/read-deny.d.ts +33 -8
- package/dist/tools/fs/read-deny.js +114 -25
- package/dist/tools/fs/safety.d.ts +12 -1
- package/dist/tools/fs/safety.js +16 -3
- package/dist/tools/fs/shell-read-check.d.ts +25 -5
- package/dist/tools/fs/shell-read-check.js +100 -15
- package/dist/tools/fs/shell-read-establish.d.ts +9 -0
- package/dist/tools/fs/shell-read-establish.js +34 -14
- package/dist/tools/fs/shell-read-judge.d.ts +13 -1
- package/dist/tools/fs/shell-read-judge.js +26 -7
- package/dist/tools/fs/shell-read-plan.d.ts +5 -0
- package/dist/tools/fs/shell-read-write-targets.js +17 -9
- package/dist/tools/scheduler-store-move.d.ts +74 -0
- package/dist/tools/scheduler-store-move.js +103 -0
- package/dist/tools/scheduler-tools.d.ts +43 -29
- package/dist/tools/scheduler-tools.js +161 -118
- package/package.json +2 -2
- package/test/export-surface.snapshot.json +173 -3
- package/wire-changes/answers/core-stores-sql@7.72.0.json +12 -0
- package/wire-changes/answers/core-stores-sql@7.73.0.json +28 -0
- package/wire-changes/answers/core@7.72.0.json +84 -0
- package/wire-changes/answers/core@7.73.0.json +216 -0
- package/wire-changes/answers/mods-kernel@7.72.0.json +7 -0
- package/wire-changes/answers/mods-kernel@7.73.0.json +7 -0
- package/wire-changes/answers/primitives@7.72.0.json +6 -0
- package/wire-changes/answers/primitives@7.73.0.json +12 -0
- package/wire-changes/answers/wiki-gate@7.72.0.json +7 -0
- package/wire-changes/answers/wiki-gate@7.73.0.json +7 -0
- package/wire-changes/core-stores-sql@7.72.0.json +215 -0
- package/wire-changes/core-stores-sql@7.73.0.json +326 -0
- package/wire-changes/core@7.72.0.json +2426 -0
- package/wire-changes/core@7.73.0.json +6480 -0
- package/wire-changes/mods-kernel@7.72.0.json +147 -0
- package/wire-changes/mods-kernel@7.73.0.json +147 -0
- package/wire-changes/primitives@7.72.0.json +143 -0
- package/wire-changes/primitives@7.73.0.json +227 -0
- package/wire-changes/wiki-gate@7.72.0.json +145 -0
- package/wire-changes/wiki-gate@7.73.0.json +145 -0
|
@@ -25,10 +25,17 @@ import { type CheckpointSeat } from "./checkpoint-seat.js";
|
|
|
25
25
|
import type { CheckpointGate } from "./checkpoint-store.js";
|
|
26
26
|
import { type ResourceLimitReason } from "./resource-limit-reasons.js";
|
|
27
27
|
import { type CheckpointIdMissing } from "./checkpoint-identity.js";
|
|
28
|
+
import type { AssertAllKeysHandled } from "@sema-agent/primitives";
|
|
28
29
|
/** The park card's state: the checkpoint row's own `status`, plus `missing` (the row names no card, or
|
|
29
|
-
* the store holds none under its token) and `unreadable` (
|
|
30
|
-
*
|
|
30
|
+
* the store holds none under its token) and `unreadable` (why is stated by {@link AgentPark.unreadableCause}:
|
|
31
|
+
* `no_seat`, `store_failed`, or `status_unknown`). The same five answers the parked-row reconciliation sweep
|
|
32
|
+
* gives the same question. */
|
|
31
33
|
export type AgentParkState = "pending" | "resolved" | "expired" | "missing" | "unreadable";
|
|
34
|
+
/** Why an `unreadable` park card could not be read: `no_seat` — this face was given no checkpoint store;
|
|
35
|
+
* `store_failed` — the checkpoint store threw on this read; `status_unknown` — the card was read, and its
|
|
36
|
+
* status word is one this engine version does not know (`pending`, `resolved`, `expired`). */
|
|
37
|
+
export declare const AGENT_PARK_UNREADABLE_CAUSES: readonly ["no_seat", "store_failed", "status_unknown"];
|
|
38
|
+
export type AgentParkUnreadableCause = (typeof AGENT_PARK_UNREADABLE_CAUSES)[number];
|
|
32
39
|
/** What a parked agent waits on — its checkpoint's gate, reduced to the non-secret kind (and, for a resource
|
|
33
40
|
* limit, the closed reason word; the other kinds' free-text reason never leaves the card). */
|
|
34
41
|
export type AgentParkGate = {
|
|
@@ -40,6 +47,11 @@ export type AgentParkGate = {
|
|
|
40
47
|
/** The checkpoint a parked agent waits on. */
|
|
41
48
|
export interface AgentPark {
|
|
42
49
|
state: AgentParkState;
|
|
50
|
+
/** Why {@link state} is `unreadable` ({@link AGENT_PARK_UNREADABLE_CAUSES}): `no_seat` — this face was given no
|
|
51
|
+
* checkpoint store; `store_failed` — the checkpoint store threw on this read; `status_unknown` — the card was
|
|
52
|
+
* read, and its status word is one this engine version does not know. Present exactly when {@link state} is
|
|
53
|
+
* `unreadable`; absent otherwise. */
|
|
54
|
+
unreadableCause?: AgentParkUnreadableCause;
|
|
43
55
|
/** What the park waits on, read off the checkpoint. Present when the card was read and carries a known gate. */
|
|
44
56
|
gate?: AgentParkGate;
|
|
45
57
|
/** The checkpoint's non-secret identity (the card id a person sees in an approval inbox). Present when
|
|
@@ -122,15 +134,24 @@ export declare function agentActivityClause(s: AgentState): string;
|
|
|
122
134
|
/** `<what it waits on> <card id> <state>[ (deadline in <age> | deadline passed <age> ago)]` — facts only; a pending
|
|
123
135
|
* yield adds when it continues (nobody decides it: its owner's next run does). */
|
|
124
136
|
export declare function agentParkClause(p: AgentPark, readAt: number): string;
|
|
137
|
+
declare const AGENT_PARK_UNREADABLE_SENTENCES: {
|
|
138
|
+
readonly no_seat: "This run keeps no record of parked steps, so whether the agent is waiting on a decision cannot be read here, and asking again will not change that; it may be waiting for an approval decision.";
|
|
139
|
+
readonly store_failed: "The record of the parked step could not be read just now (a later read may succeed, and if it keeps failing the record itself may be damaged); it may be waiting for an approval decision.";
|
|
140
|
+
readonly status_unknown: "The parked step carries a state this engine version does not know; it may be waiting for an approval decision.";
|
|
141
|
+
};
|
|
142
|
+
export type UnreadableSentencesCoverEveryCause = AssertAllKeysHandled<Exclude<AgentParkUnreadableCause, keyof typeof AGENT_PARK_UNREADABLE_SENTENCES>>;
|
|
125
143
|
/**
|
|
126
144
|
* The sentence under a parked agent's state line, read off the park card's gate — the same card, the same table, as the
|
|
127
145
|
* state line. A yield (`resource_limit` / `preempt`) is not an approval: the agent left with its owner and continues when its
|
|
128
|
-
* owner runs again. Any other resource limit says it paused at that limit. A card that cannot be read
|
|
129
|
-
* a
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
*
|
|
146
|
+
* owner runs again. Any other resource limit says it paused at that limit. A card that cannot be read keeps the one
|
|
147
|
+
* possibility a reader must not lose — a person may be waiting to decide an approval: an `unreadable` card carrying
|
|
148
|
+
* {@link AgentPark.unreadableCause} states which of the three causes happened (`no_seat`, `store_failed`, `status_unknown`),
|
|
149
|
+
* while `missing`, an absent park, an `unreadable` card without the member, or a `pending` card with no known gate keeps
|
|
150
|
+
* the general blind sentence. A card that WAS read and is no longer pending (decided, or expired), whatever gate it carries
|
|
151
|
+
* or lacks, promises nothing about what happens next, as the state line's park clause promises no continuation for one: the
|
|
152
|
+
* sentence and the line read the card's state alike.
|
|
133
153
|
*/
|
|
134
154
|
export declare function agentParkSentence(p: AgentPark | undefined): string;
|
|
135
155
|
/** The one-line state sentence: `<status> · <activity clause>[ · <park clause>]`. */
|
|
136
156
|
export declare function agentStateSummary(s: AgentState): string;
|
|
157
|
+
export {};
|
package/dist/core/agent-state.js
CHANGED
|
@@ -6,6 +6,7 @@ import { deliverEngineNotice } from "./engine-notice.js";
|
|
|
6
6
|
import { inlineUntrusted } from "./untrusted-text.js";
|
|
7
7
|
import { ANONYMOUS_SCOPE } from "./isolation-scope.js";
|
|
8
8
|
const STATUS_WORDS = { pending: true, running: true, parked: true, completed: true, failed: true, killed: true, cancelled: true };
|
|
9
|
+
export const AGENT_PARK_UNREADABLE_CAUSES = Object.freeze(["no_seat", "store_failed", "status_unknown"]);
|
|
9
10
|
export function agentStateSourceOfHandle(h) {
|
|
10
11
|
return {
|
|
11
12
|
status: h.status,
|
|
@@ -56,7 +57,7 @@ async function readParkCard(store, token, agent) {
|
|
|
56
57
|
cp = (await store.get(token));
|
|
57
58
|
}
|
|
58
59
|
catch {
|
|
59
|
-
return { state: "unreadable" };
|
|
60
|
+
return { state: "unreadable", unreadableCause: "store_failed" };
|
|
60
61
|
}
|
|
61
62
|
if (cp === null || cp === undefined)
|
|
62
63
|
return { state: "missing" };
|
|
@@ -67,6 +68,7 @@ async function readParkCard(store, token, agent) {
|
|
|
67
68
|
announceUntrustedCardId(agent);
|
|
68
69
|
return {
|
|
69
70
|
state,
|
|
71
|
+
...(state === "unreadable" ? { unreadableCause: "status_unknown" } : {}),
|
|
70
72
|
...(gate !== undefined ? { gate } : {}),
|
|
71
73
|
...identity,
|
|
72
74
|
...(finite(cp.deadline) ? { deadline: cp.deadline } : {}),
|
|
@@ -98,7 +100,7 @@ export function readAgentState(src, seat, now) {
|
|
|
98
100
|
return { ...base, park: { state: "missing" } };
|
|
99
101
|
const store = checkpointStoreOfSeat(seat);
|
|
100
102
|
if (store === undefined)
|
|
101
|
-
return { ...base, park: { state: "unreadable" } };
|
|
103
|
+
return { ...base, park: { state: "unreadable", unreadableCause: "no_seat" } };
|
|
102
104
|
return readParkCard(store, src.parkedCheckpointToken, src).then((park) => ({ ...base, park }));
|
|
103
105
|
}
|
|
104
106
|
export function formatAgo(ms) {
|
|
@@ -140,15 +142,26 @@ export function agentParkClause(p, readAt) {
|
|
|
140
142
|
const continues = p.state === "pending" && p.gate?.kind === "resource_limit" && p.gate.reason === "preempt" ? " — continues when its owner runs again" : "";
|
|
141
143
|
return `${parkWord(p.gate)}${id} ${p.state}${deadline}${continues}`;
|
|
142
144
|
}
|
|
145
|
+
const PARK_BLIND_CLOSING = "it may be waiting for an approval decision.";
|
|
146
|
+
const PARK_BLIND_SENTENCE = `What this agent is waiting on cannot be read here; ${PARK_BLIND_CLOSING}`;
|
|
147
|
+
const AGENT_PARK_UNREADABLE_SENTENCES = {
|
|
148
|
+
no_seat: `This run keeps no record of parked steps, so whether the agent is waiting on a decision cannot be read here, and asking again will not change that; ${PARK_BLIND_CLOSING}`,
|
|
149
|
+
store_failed: `The record of the parked step could not be read just now (a later read may succeed, and if it keeps failing the record itself may be damaged); ${PARK_BLIND_CLOSING}`,
|
|
150
|
+
status_unknown: `The parked step carries a state this engine version does not know; ${PARK_BLIND_CLOSING}`,
|
|
151
|
+
};
|
|
143
152
|
export function agentParkSentence(p) {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
153
|
+
if (p === undefined || p.state === "missing")
|
|
154
|
+
return PARK_BLIND_SENTENCE;
|
|
155
|
+
if (p.state === "unreadable") {
|
|
156
|
+
return p.unreadableCause !== undefined && Object.hasOwn(AGENT_PARK_UNREADABLE_SENTENCES, p.unreadableCause)
|
|
157
|
+
? AGENT_PARK_UNREADABLE_SENTENCES[p.unreadableCause]
|
|
158
|
+
: PARK_BLIND_SENTENCE;
|
|
159
|
+
}
|
|
147
160
|
if (p.state !== "pending")
|
|
148
161
|
return "What this agent waited on is no longer pending (the state line says how it ended); its row has not been settled yet.";
|
|
149
162
|
const gate = p.gate;
|
|
150
163
|
if (gate === undefined)
|
|
151
|
-
return
|
|
164
|
+
return PARK_BLIND_SENTENCE;
|
|
152
165
|
if (gate.kind !== "resource_limit")
|
|
153
166
|
return PARK_GATE_SENTENCES[gate.kind];
|
|
154
167
|
if (gate.reason === "preempt")
|
package/dist/core/allow-entry.js
CHANGED
|
@@ -17,7 +17,7 @@ import { inlineUntrusted, isMintableProbeReason } from "./untrusted-text.js";
|
|
|
17
17
|
import { callerKey } from "./caller-text.js";
|
|
18
18
|
import { valueTypeLabel } from "./tool-name-list.js";
|
|
19
19
|
import { deliverEngineNotice } from "./engine-notice.js";
|
|
20
|
-
import { entriesNotAppliedDetail } from "./entries-not-applied.js";
|
|
20
|
+
import { entriesNotAppliedDetail, orderEntriesBySeverity } from "./entries-not-applied.js";
|
|
21
21
|
export const ALLOW_ENTRY_INERT_REASONS = Object.freeze(["wildcard_all", "namespace_wildcard", "content_unsupported", "grammar", "tool_name", "near_miss", "earlier_grammar"]);
|
|
22
22
|
const INERT_REASON_WORDS = {
|
|
23
23
|
wildcard_all: "a bare wildcard",
|
|
@@ -634,8 +634,8 @@ function inertEntriesListed(of) {
|
|
|
634
634
|
export function allowedToolsNotGrantedNotices(inert, sessionId) {
|
|
635
635
|
const entryOf = (e) => ({ ...e, entry: noticeRuleText(e.entry) });
|
|
636
636
|
const route = sessionId !== undefined ? { sessionId } : {};
|
|
637
|
-
const refusing = inert.filter((e) => "list" in e && e.list === "disallowed-tools");
|
|
638
|
-
const granting = inert.filter((e) => !("list" in e && e.list === "disallowed-tools"));
|
|
637
|
+
const refusing = orderEntriesBySeverity(inert.filter((e) => "list" in e && e.list === "disallowed-tools"));
|
|
638
|
+
const granting = orderEntriesBySeverity(inert.filter((e) => !("list" in e && e.list === "disallowed-tools")));
|
|
639
639
|
const notices = [];
|
|
640
640
|
if (granting.length > 0) {
|
|
641
641
|
notices.push({
|
|
@@ -13,10 +13,11 @@ export declare const APPROVAL_TARGET_ROLES: readonly ["protective", "declared"];
|
|
|
13
13
|
export type ApprovalTargetRole = (typeof APPROVAL_TARGET_ROLES)[number];
|
|
14
14
|
/** The row's `targets` member: per role, the location the target RESOLVED to when the card was asked (the canonical
|
|
15
15
|
* view of that reading), or `null` when the environment was asked and did not answer — an unresolved target binds
|
|
16
|
-
* "unresolved", so a later resolution is a move. A
|
|
17
|
-
*
|
|
16
|
+
* "unresolved", so a later resolution is a move. A slot that names several targets (`pathTarget.each`) records the list of
|
|
17
|
+
* its elements' locations, in slot order. A role the environment was not asked about is absent; a row with no such role
|
|
18
|
+
* carries none. */
|
|
18
19
|
export type ApprovalTargets = {
|
|
19
|
-
readonly [R in ApprovalTargetRole]?: string | null;
|
|
20
|
+
readonly [R in ApprovalTargetRole]?: string | null | readonly (string | null)[];
|
|
20
21
|
};
|
|
21
22
|
/** The row's `targetReads` member: per read candidate the shell read station judged for the parked bytes (its key's
|
|
22
23
|
* digest), where it landed (its settled targets' digest — a pattern lands on a set). A sibling of `targets`, not a key
|
|
@@ -94,6 +95,9 @@ export interface LiveApprovalObject {
|
|
|
94
95
|
readonly targetReading?: CallTargetReading | undefined;
|
|
95
96
|
/** execution: where this leg's shell read station found those bytes' reads land (`undefined`: it holds no judgment of them). */
|
|
96
97
|
readonly reads?: readonly ReadLanding[] | undefined;
|
|
98
|
+
/** execution: where this leg's file read station judged a declared read's targets land, in slot order — the keys its port opens.
|
|
99
|
+
* When present the targets member is judged on THEM (one reading for the admission and the comparison), not on `targetReading`. */
|
|
100
|
+
readonly landings?: readonly string[] | undefined;
|
|
97
101
|
/** execution: the bytes the decision rewrote the call to, as the tool reads them; absent when it rewrote nothing. When
|
|
98
102
|
* the row's binding does not cover them ({@link licenseCovers}, the one judge of "are these the approved bytes") the
|
|
99
103
|
* person approved bytes whose target the row never recorded, and the targets member is not judged. */
|
|
@@ -30,10 +30,18 @@ export function approvalObjectOf(row) {
|
|
|
30
30
|
}
|
|
31
31
|
export function approvalTargetsOf(reading, reads) {
|
|
32
32
|
const targets = {};
|
|
33
|
+
const landing = (view) => (view?.kind === "path" && (view.canonical !== undefined || view.unread === true) ? (view.canonical ?? null) : undefined);
|
|
33
34
|
for (const role of APPROVAL_TARGET_ROLES) {
|
|
34
|
-
const
|
|
35
|
-
if (
|
|
36
|
-
|
|
35
|
+
const several = reading?.each?.[role];
|
|
36
|
+
if (several === undefined) {
|
|
37
|
+
const one = landing(reading?.[role]);
|
|
38
|
+
if (one !== undefined)
|
|
39
|
+
targets[role] = one;
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
42
|
+
const all = several.map(landing);
|
|
43
|
+
if (all.length > 0 && all.every((l) => l !== undefined))
|
|
44
|
+
targets[role] = Object.freeze(all);
|
|
37
45
|
}
|
|
38
46
|
return { ...(Object.keys(targets).length > 0 ? { targets } : {}), ...(reads !== undefined ? { targetReads: Object.fromEntries(reads.map((r) => [r.key, r.landing])) } : {}) };
|
|
39
47
|
}
|
|
@@ -51,7 +59,7 @@ function faceKey(face) {
|
|
|
51
59
|
const pt = face.pathTarget;
|
|
52
60
|
if (k !== "pathTarget")
|
|
53
61
|
return face[k] ?? null;
|
|
54
|
-
return pt === undefined ? null : { param: pt.param, access: pt.access, aliases: [...(pt.aliases ?? [])], ...pathTargetResolutionOf(pt), patternParam: pt.patternParam ?? null, skillScopeEligible: pt.skillScopeEligible === true };
|
|
62
|
+
return pt === undefined ? null : { param: pt.param, access: pt.access, aliases: [...(pt.aliases ?? [])], ...pathTargetResolutionOf(pt), patternParam: pt.patternParam ?? null, skillScopeEligible: pt.skillScopeEligible === true, ...(pt.each === true ? { each: true } : {}) };
|
|
55
63
|
};
|
|
56
64
|
return canonicalize(Object.fromEntries(FACE_MEMBERS.map((k) => [k, resolved(k)])));
|
|
57
65
|
}
|
|
@@ -78,7 +86,7 @@ function judgeTool(row, live, station) {
|
|
|
78
86
|
}
|
|
79
87
|
if (bound.declarationDigest === toolDeclarationDigestOf(entry))
|
|
80
88
|
return undefined;
|
|
81
|
-
return { member: "tool", disposition: "veto", code: "resume.target_moved", message: vetoed(row.toolName, "the tool's declaration (what it does, reaches and trusts: its effect, egress, irreversibility, content origin, boundary legs, rule face or model gate) changed after the approval") };
|
|
89
|
+
return { member: "tool", disposition: "veto", code: "resume.target_moved", message: vetoed(row.toolName, "the tool's declaration (what it does, reaches and trusts: its effect, egress, irreversibility, content origin, its peer's registration, boundary legs, rule face or model gate) changed after the approval") };
|
|
82
90
|
}
|
|
83
91
|
function judgeTargets(row, live) {
|
|
84
92
|
if ((row.targets === undefined && row.targetReads === undefined) || ("decided" in live && !licenseCovers(row.boundInputHash, row.toolName, live.decided)))
|
|
@@ -90,16 +98,29 @@ const DIGEST = /^[0-9a-f]{64}$/;
|
|
|
90
98
|
function landedElsewhere(bound, boundReads, live) {
|
|
91
99
|
if (bound !== undefined) {
|
|
92
100
|
const roles = typeof bound === "object" && bound !== null && !Array.isArray(bound) ? Object.entries(bound) : [];
|
|
93
|
-
const
|
|
101
|
+
const located = (v) => v === null || (typeof v === "string" && v.length > 0);
|
|
102
|
+
const whole = roles.length > 0 && roles.every(([k, v]) => APPROVAL_TARGET_ROLES.includes(k) && (located(v) || (Array.isArray(v) && v.length > 0 && v.every(located))));
|
|
94
103
|
if (!whole)
|
|
95
104
|
return "the target member of the approval on its checkpoint row is damaged (not a reading → resolved location record)";
|
|
96
|
-
const now =
|
|
105
|
+
const now = live.landings !== undefined
|
|
106
|
+
? Object.fromEntries(roles.map(([role, was]) => [role, Array.isArray(was) || live.landings.length !== 1 ? live.landings : live.landings[0]]))
|
|
107
|
+
: (approvalTargetsOf(live.targetReading).targets ?? {});
|
|
97
108
|
const where = (p) => (p === null ? "did not resolve" : `resolved to ${shown(p)}`);
|
|
98
109
|
for (const [role, was] of roles) {
|
|
99
110
|
const is = now[role];
|
|
100
|
-
if (is === was)
|
|
111
|
+
if (canonicalize(is) === canonicalize(was))
|
|
101
112
|
continue;
|
|
102
|
-
|
|
113
|
+
if (is === undefined)
|
|
114
|
+
return `where its target resolves (it ${typeof was === "object" && was !== null ? "named several" : where(was)} when the card was asked) could not be established on this leg`;
|
|
115
|
+
if (Array.isArray(was) || Array.isArray(is)) {
|
|
116
|
+
const a = (Array.isArray(was) ? was : [was]);
|
|
117
|
+
const b = (Array.isArray(is) ? is : [is]);
|
|
118
|
+
const i = a.findIndex((w, j) => b[j] !== w);
|
|
119
|
+
if (i < 0 || b[i] === undefined)
|
|
120
|
+
return `the call names ${b.length} target(s) now and named ${a.length} when the card was asked`;
|
|
121
|
+
return `its target ${i + 1} ${b[i] === null ? "does not resolve" : `resolves to ${shown(b[i])}`} now and ${where(a[i] ?? null)} when the card was asked`;
|
|
122
|
+
}
|
|
123
|
+
return `its target ${is === null ? "does not resolve" : `resolves to ${shown(is)}`} now and ${where(was)} when the card was asked`;
|
|
103
124
|
}
|
|
104
125
|
}
|
|
105
126
|
if (boundReads === undefined)
|
package/dist/core/auto-mode.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { RunnerDeps } from "./runner-deps.js";
|
|
1
2
|
import { type ClassifierCategory } from "./classifier-category.js";
|
|
2
3
|
import type { PermissionResult, ToolCallRequest } from "./tool-policy.js";
|
|
3
4
|
/**
|
|
@@ -537,15 +538,12 @@ export interface AutoModeDenialTracker {
|
|
|
537
538
|
};
|
|
538
539
|
}
|
|
539
540
|
export declare function autoModeDenialLimitOf(v: unknown): Required<AutoModeDenialLimitOptions>;
|
|
540
|
-
/** The
|
|
541
|
-
*
|
|
542
|
-
*
|
|
543
|
-
export declare function
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
readonly denialLimit?: unknown;
|
|
547
|
-
readonly rateLimitBreakAfter?: unknown;
|
|
548
|
-
}): void;
|
|
541
|
+
/** The ONE door for `RunnerDeps.autoMode` at both `new Runner` and prepare: receives a plain object of the ten known
|
|
542
|
+
* members, refuses stray or malformed members by field name (`config.invalid_argument`, or each existing knob's own
|
|
543
|
+
* code), and returns an isolated frozen copy. */
|
|
544
|
+
export declare function receiveAutoModeFace(given: unknown, subject?: string): RunnerDeps["autoMode"];
|
|
545
|
+
/** Screens `RunnerDeps.autoMode` through {@link receiveAutoModeFace} (the one door at construction and prepare). */
|
|
546
|
+
export declare function screenAutoModeKnobs(face: unknown): void;
|
|
549
547
|
/** Build the per-run tracker over {@link autoModeDenialLimitOf}'s bounds (a bad knob refuses there). */
|
|
550
548
|
export declare function createAutoModeDenialTracker(opts?: AutoModeDenialLimitOptions): AutoModeDenialTracker;
|
|
551
549
|
/** The fallback ask's text — CC's sentence family, single-sourced for every mint site (the main gate
|
package/dist/core/auto-mode.js
CHANGED
|
@@ -3,7 +3,7 @@ import { withStatusSeat } from "../brain/status-sink.js";
|
|
|
3
3
|
import { thrownIs } from "./thrown-value.js";
|
|
4
4
|
import { describeRejectedValue } from "./tool-search-setting.js";
|
|
5
5
|
import { isPlainRecord } from "./mods/kernel/receive.js";
|
|
6
|
-
import { optionKeys, receiveMembers } from "./own-property-receipt.js";
|
|
6
|
+
import { optionKeys, receiptRefusal, receiveMembers, refuseProxy } from "./own-property-receipt.js";
|
|
7
7
|
import { callerKey } from "./caller-text.js";
|
|
8
8
|
import { foreignLine } from "./protocol-http-auth.js";
|
|
9
9
|
import { classifierCategoryOf, isClassifierCategory } from "./classifier-category.js";
|
|
@@ -440,14 +440,14 @@ function countsOf(fallback) {
|
|
|
440
440
|
return { consecutive: fallback.consecutive, total: fallback.total, limit: fallback.limit };
|
|
441
441
|
}
|
|
442
442
|
const DENIAL_LIMIT_KEYS = optionKeys()({ maxConsecutive: 0, maxTotal: 0, autoDenyAfterMs: 0 });
|
|
443
|
-
|
|
443
|
+
function readDenialLimit(v) {
|
|
444
444
|
const refuse = (what) => {
|
|
445
445
|
const e = new Error(`RunnerDeps.autoMode.denialLimit${what}`);
|
|
446
446
|
e.code = "config.auto_mode_denial_limit_invalid";
|
|
447
447
|
throw e;
|
|
448
448
|
};
|
|
449
449
|
if (v === undefined)
|
|
450
|
-
return { ...AUTO_MODE_DENIAL_LIMIT_DEFAULTS, autoDenyAfterMs: AUTO_MODE_DENIAL_AUTO_DENY_DEFAULT_MS };
|
|
450
|
+
return { resolved: { ...AUTO_MODE_DENIAL_LIMIT_DEFAULTS, autoDenyAfterMs: AUTO_MODE_DENIAL_AUTO_DENY_DEFAULT_MS }, given: undefined };
|
|
451
451
|
if (typeof v !== "object" || v === null || Array.isArray(v))
|
|
452
452
|
return refuse(` must be a record of bounds (got ${describeRejectedValue(v)}) — omit it for the defaults`);
|
|
453
453
|
const opts = receiveMembers(v, { subject: "RunnerDeps.autoMode.denialLimit", unit: "member", moment: "when the knob is read" }, DENIAL_LIMIT_KEYS, (_, [stray]) => refuse(` has no member ${callerKey(stray)} — its members are maxConsecutive, maxTotal and autoDenyAfterMs`));
|
|
@@ -463,13 +463,119 @@ export function autoModeDenialLimitOf(v) {
|
|
|
463
463
|
: typeof w === "number" && Number.isInteger(w) && w >= 0 && w <= MAX_TIMER_DELAY_MS
|
|
464
464
|
? w
|
|
465
465
|
: refuse(`.autoDenyAfterMs must be an integer between 0 and ${MAX_TIMER_DELAY_MS} (got ${describeRejectedValue(w)}) — 0 disarms the window; omit it for the default ${AUTO_MODE_DENIAL_AUTO_DENY_DEFAULT_MS}`);
|
|
466
|
-
|
|
466
|
+
const maxConsecutive = bound("maxConsecutive", AUTO_MODE_DENIAL_LIMIT_DEFAULTS.maxConsecutive);
|
|
467
|
+
const maxTotal = bound("maxTotal", AUTO_MODE_DENIAL_LIMIT_DEFAULTS.maxTotal);
|
|
468
|
+
return {
|
|
469
|
+
resolved: { maxConsecutive, maxTotal, autoDenyAfterMs },
|
|
470
|
+
given: Object.freeze({
|
|
471
|
+
...(opts["maxConsecutive"] !== undefined ? { maxConsecutive } : {}),
|
|
472
|
+
...(opts["maxTotal"] !== undefined ? { maxTotal } : {}),
|
|
473
|
+
...(w !== undefined ? { autoDenyAfterMs } : {}),
|
|
474
|
+
}),
|
|
475
|
+
};
|
|
476
|
+
}
|
|
477
|
+
export function autoModeDenialLimitOf(v) {
|
|
478
|
+
return readDenialLimit(v).resolved;
|
|
479
|
+
}
|
|
480
|
+
const AUTO_MODE_FACE_KEYS = optionKeys()({
|
|
481
|
+
rules: 0,
|
|
482
|
+
settingsDenyRules: 0,
|
|
483
|
+
sessionContext: 0,
|
|
484
|
+
window: 0,
|
|
485
|
+
timeoutMs: 0,
|
|
486
|
+
classifierFallback: 0,
|
|
487
|
+
rateLimitBreakAfter: 0,
|
|
488
|
+
denialLimit: 0,
|
|
489
|
+
persistArming: 0,
|
|
490
|
+
settingsEpoch: 0,
|
|
491
|
+
});
|
|
492
|
+
const AUTO_MODE_RULES_KEYS = optionKeys()({ allow: 0, softDeny: 0, hardDeny: 0, environment: 0 });
|
|
493
|
+
const AUTO_MODE_WINDOW_KEYS = optionKeys()({ maxEntries: 0, maxCharsPerEntry: 0 });
|
|
494
|
+
function receiveStringList(v, path) {
|
|
495
|
+
if (v === undefined)
|
|
496
|
+
return undefined;
|
|
497
|
+
if (typeof v === "object" && v !== null)
|
|
498
|
+
refuseProxy(v, { subject: path, unit: "entry", moment: "when the auto-mode face is received" });
|
|
499
|
+
if (!Array.isArray(v))
|
|
500
|
+
throw receiptRefusal(`${path} must be a list of strings (got ${describeRejectedValue(v)})`);
|
|
501
|
+
const out = [];
|
|
502
|
+
for (let i = 0; i < v.length; i++) {
|
|
503
|
+
const held = i in v;
|
|
504
|
+
const item = held ? v[i] : undefined;
|
|
505
|
+
if (!held || typeof item !== "string") {
|
|
506
|
+
throw receiptRefusal(`${path}[${i}] must be a string (got ${!held ? "an empty slot" : describeRejectedValue(item)})`);
|
|
507
|
+
}
|
|
508
|
+
out.push(item);
|
|
509
|
+
}
|
|
510
|
+
return Object.freeze(out);
|
|
511
|
+
}
|
|
512
|
+
function receiveAutoModeRules(v, path) {
|
|
513
|
+
if (v === undefined)
|
|
514
|
+
return undefined;
|
|
515
|
+
if (typeof v !== "object" || v === null || Array.isArray(v))
|
|
516
|
+
throw receiptRefusal(`${path} must be a plain object of rule lists (got ${describeRejectedValue(v)})`);
|
|
517
|
+
const copy = receiveMembers(v, { subject: path, unit: "section", moment: "when the auto-mode face is received" }, AUTO_MODE_RULES_KEYS);
|
|
518
|
+
const out = {};
|
|
519
|
+
for (const k of AUTO_MODE_RULES_KEYS) {
|
|
520
|
+
const list = receiveStringList(copy[k], `${path}.${k}`);
|
|
521
|
+
if (list !== undefined)
|
|
522
|
+
out[k] = list;
|
|
523
|
+
}
|
|
524
|
+
return Object.freeze(out);
|
|
525
|
+
}
|
|
526
|
+
function receiveAutoModeWindow(v, path) {
|
|
527
|
+
if (v === undefined)
|
|
528
|
+
return undefined;
|
|
529
|
+
if (typeof v !== "object" || v === null || Array.isArray(v))
|
|
530
|
+
throw receiptRefusal(`${path} must be a plain object of window bounds (got ${describeRejectedValue(v)})`);
|
|
531
|
+
const copy = receiveMembers(v, { subject: path, unit: "bound", moment: "when the auto-mode face is received" }, AUTO_MODE_WINDOW_KEYS);
|
|
532
|
+
const out = {};
|
|
533
|
+
for (const k of AUTO_MODE_WINDOW_KEYS) {
|
|
534
|
+
const b = copy[k];
|
|
535
|
+
if (b === undefined)
|
|
536
|
+
continue;
|
|
537
|
+
if (typeof b !== "number" || !Number.isInteger(b) || b < 0)
|
|
538
|
+
throw receiptRefusal(`${path}.${k} must be a whole number >= 0 (got ${describeRejectedValue(b)})`);
|
|
539
|
+
out[k] = b;
|
|
540
|
+
}
|
|
541
|
+
return Object.freeze(out);
|
|
542
|
+
}
|
|
543
|
+
export function receiveAutoModeFace(given, subject = "RunnerDeps.autoMode") {
|
|
544
|
+
if (given === undefined)
|
|
545
|
+
return undefined;
|
|
546
|
+
if (typeof given !== "object" || given === null || Array.isArray(given)) {
|
|
547
|
+
throw receiptRefusal(`${subject} must be a plain object (got ${describeRejectedValue(given)}) — omit it to leave auto mode unarmed`);
|
|
548
|
+
}
|
|
549
|
+
const copy = receiveMembers(given, { subject, unit: "member", moment: "when the auto-mode face is received" }, AUTO_MODE_FACE_KEYS);
|
|
550
|
+
const timeoutMs = copy.timeoutMs !== undefined ? autoModeTimeoutMsOf(copy.timeoutMs) : undefined;
|
|
551
|
+
const classifierFallback = copy.classifierFallback !== undefined ? autoModeClassifierFallbackOf(copy.classifierFallback) : undefined;
|
|
552
|
+
const rateLimitBreakAfter = copy.rateLimitBreakAfter !== undefined ? autoModeRateLimitBreakAfterOf(copy.rateLimitBreakAfter) : undefined;
|
|
553
|
+
const denialLimit = readDenialLimit(copy.denialLimit).given;
|
|
554
|
+
const rules = receiveAutoModeRules(copy.rules, `${subject}.rules`);
|
|
555
|
+
const settingsDenyRules = receiveStringList(copy.settingsDenyRules, `${subject}.settingsDenyRules`);
|
|
556
|
+
const sessionContext = receiveStringList(copy.sessionContext, `${subject}.sessionContext`);
|
|
557
|
+
const window = receiveAutoModeWindow(copy.window, `${subject}.window`);
|
|
558
|
+
if (copy.persistArming !== undefined && typeof copy.persistArming !== "boolean") {
|
|
559
|
+
throw receiptRefusal(`${subject}.persistArming must be a boolean (got ${describeRejectedValue(copy.persistArming)}) — omit it for false`);
|
|
560
|
+
}
|
|
561
|
+
if (copy.settingsEpoch !== undefined && typeof copy.settingsEpoch !== "string") {
|
|
562
|
+
throw receiptRefusal(`${subject}.settingsEpoch must be a string (got ${describeRejectedValue(copy.settingsEpoch)}) — omit it when undeclared`);
|
|
563
|
+
}
|
|
564
|
+
return Object.freeze({
|
|
565
|
+
...(rules !== undefined ? { rules } : {}),
|
|
566
|
+
...(settingsDenyRules !== undefined ? { settingsDenyRules } : {}),
|
|
567
|
+
...(sessionContext !== undefined ? { sessionContext } : {}),
|
|
568
|
+
...(window !== undefined ? { window } : {}),
|
|
569
|
+
...(timeoutMs !== undefined ? { timeoutMs } : {}),
|
|
570
|
+
...(classifierFallback !== undefined ? { classifierFallback } : {}),
|
|
571
|
+
...(rateLimitBreakAfter !== undefined ? { rateLimitBreakAfter } : {}),
|
|
572
|
+
...(denialLimit !== undefined ? { denialLimit } : {}),
|
|
573
|
+
...(copy.persistArming !== undefined ? { persistArming: copy.persistArming } : {}),
|
|
574
|
+
...(copy.settingsEpoch !== undefined ? { settingsEpoch: copy.settingsEpoch } : {}),
|
|
575
|
+
});
|
|
467
576
|
}
|
|
468
577
|
export function screenAutoModeKnobs(face) {
|
|
469
|
-
|
|
470
|
-
autoModeClassifierFallbackOf(face.classifierFallback);
|
|
471
|
-
autoModeDenialLimitOf(face.denialLimit);
|
|
472
|
-
autoModeRateLimitBreakAfterOf(face.rateLimitBreakAfter);
|
|
578
|
+
void receiveAutoModeFace(face);
|
|
473
579
|
}
|
|
474
580
|
export function createAutoModeDenialTracker(opts) {
|
|
475
581
|
const { maxConsecutive, maxTotal, autoDenyAfterMs } = autoModeDenialLimitOf(opts);
|
|
@@ -185,6 +185,13 @@ export type CheckpointErrorReason = "version_newer" | "env_factory_missing" | "g
|
|
|
185
185
|
* no installation record (a chain written before the record existed) / a record that does not cover the chain entry for
|
|
186
186
|
* entry / a record member naming no absolute root. */
|
|
187
187
|
| "installation_record_absent" | "installation_record_misaligned" | "installation_record_invalid"
|
|
188
|
+
/** On `resume.parent_constraint_mismatch` — its other three causes: the chain the resume runs under is not the one the row
|
|
189
|
+
* recorded (`"constraint_changed"`: another layer count, or a layer whose facts or frozen deny data differ — hand back the chain
|
|
190
|
+
* as it was at the park, or deny the card); the row's own recorded chain does not match the digest it records
|
|
191
|
+
* (`"constraint_chain_damaged"`: the row is damaged — expire it); the chain could not be judged (`"constraint_unjudgeable"`: an
|
|
192
|
+
* entry that is neither one caller policy nor one installation, or a judgment that threw — the host checks the chain it hands).
|
|
193
|
+
* Every refusal the engine answers on the code names one of its six causes. */
|
|
194
|
+
| "constraint_changed" | "constraint_chain_damaged" | "constraint_unjudgeable"
|
|
188
195
|
/** On `checkpoint.config_refused` with `detail.code` `config.tool_face_control` — the arm prepare's own refusal carries as its `detail.reason`:
|
|
189
196
|
* a tool-name list the row recorded is not a list / has a member that is not a string / has a spelling no tool name can have / is not in
|
|
190
197
|
* the one spelling a row records (`"not_a_list"`, `"not_a_string"`, `"unknown_name"`, `"unsupported_pattern"`; the re-supplied config's own four lists —
|
|
@@ -229,11 +236,12 @@ export type CheckpointErrorReason = "version_newer" | "env_factory_missing" | "g
|
|
|
229
236
|
* roster, its answer face, the approval seat's value, whether the posture's human is reachable) still refuses after the claim, each for a stated reason (INTEGRATION-CORE, "A resume's two doors").
|
|
230
237
|
* The re-supplied config's one read (`readCallerSpec`, the read a run takes of its spec) refuses with its own two words, last in the set:
|
|
231
238
|
* a member whose read throws (`config.spec_member_unreadable`) and a key the engine does not read (`config.spec_unknown_key`); its third,
|
|
232
|
-
* a retired key, is `config.spec_retired_key` (first).
|
|
239
|
+
* a retired key, is `config.spec_retired_key` (first); the project seat it screens refuses as `config.invalid_argument` or, for an `id` that
|
|
240
|
+
* is no UUID, `config.project_id_invalid` (last).
|
|
233
241
|
*
|
|
234
242
|
* A SUBSET of {@link CONFIG_REFUSAL_CODES}, the family's whole refusal vocabulary: the words a resume's screen can produce, held to that set at compile time.
|
|
235
243
|
*/
|
|
236
|
-
export declare const CHECKPOINT_CONFIG_REFUSAL_CODES: readonly ["config.spec_retired_key", "config.output_style_invalid", "config.language_invalid", "config.permission_mode_invalid", "config.shell_gate_value_retired", "config.approval_reach_invalid", "config.run_origin_invalid", "config.user_invoked_skill_unknown", "config.skill_deny_unreadable", "config.user_attachment_invalid", "config.tool_face_control", "config.deps_retired_key", "config.peer_presence_invalid", "config.tool_model_gate_invalid", "config.microcompact_invalid", "config.prompt_selector_invalid", "resume_at.conflicts_resume", "resume_at.mode_without_target", "config.read_face_invalid", "config.write_face_invalid", "config.invalid_argument", "config.tool_face_invalid", "config.memory_delegation_evidence", "config.memory_provenance", "config.memory_capture_policy", "config.cross_boundary_posture", "config.advisor_tool_invalid", "config.advisor_model_invalid", "config.auto_consolidation", "config.unknown_role", "config.tool_materialize_invalid", "config.memory_persistence_invalid", "config.tool_materialize_unreachable", "config.locked_registry", "config.locked_key", "config.mcp_content_class", "config.skill_listing_budget_invalid", "config.limit_unknown_key", "config.limit_invalid", "config.attachment_invalid", "config.usage_window_invalid", "config.brain_call_guardrail_invalid", "config.retention_policy", "config.retention_capability", "config.invalid_checkpoint_store", "config.invalid_session_store", "config.skill_base_dir_invalid", "config.host_floor_invalid", "config.credential_in_declaration", "config.credential_ref_invalid", "config.peer_seat_missing", "config.interaction_posture", "config.agents.no_delegation_tool", "config.spec_member_unreadable", "config.spec_unknown_key", "config.agent_config_dir_invalid", "config.agent_home_dir_invalid"];
|
|
244
|
+
export declare const CHECKPOINT_CONFIG_REFUSAL_CODES: readonly ["config.spec_retired_key", "config.output_style_invalid", "config.language_invalid", "config.permission_mode_invalid", "config.shell_gate_value_retired", "config.approval_reach_invalid", "config.run_origin_invalid", "config.user_invoked_skill_unknown", "config.skill_deny_unreadable", "config.user_attachment_invalid", "config.tool_face_control", "config.deps_retired_key", "config.peer_presence_invalid", "config.tool_model_gate_invalid", "config.microcompact_invalid", "config.prompt_selector_invalid", "resume_at.conflicts_resume", "resume_at.mode_without_target", "config.read_face_invalid", "config.write_face_invalid", "config.invalid_argument", "config.tool_face_invalid", "config.memory_delegation_evidence", "config.memory_provenance", "config.memory_capture_policy", "config.cross_boundary_posture", "config.advisor_tool_invalid", "config.advisor_model_invalid", "config.auto_consolidation", "config.unknown_role", "config.tool_materialize_invalid", "config.memory_persistence_invalid", "config.tool_materialize_unreachable", "config.locked_registry", "config.locked_key", "config.mcp_content_class", "config.skill_listing_budget_invalid", "config.limit_unknown_key", "config.limit_invalid", "config.attachment_invalid", "config.usage_window_invalid", "config.brain_call_guardrail_invalid", "config.retention_policy", "config.retention_capability", "config.invalid_checkpoint_store", "config.invalid_session_store", "config.skill_base_dir_invalid", "config.host_floor_invalid", "config.credential_in_declaration", "config.credential_ref_invalid", "config.peer_seat_missing", "config.interaction_posture", "config.agents.no_delegation_tool", "config.spec_member_unreadable", "config.spec_unknown_key", "config.agent_config_dir_invalid", "config.agent_home_dir_invalid", "config.project_id_invalid"];
|
|
237
245
|
export type CheckpointConfigRefusalCode = (typeof CHECKPOINT_CONFIG_REFUSAL_CODES)[number];
|
|
238
246
|
export declare const isCheckpointConfigRefusalCode: (word: unknown) => word is CheckpointConfigRefusalCode;
|
|
239
247
|
/** The words of a {@link CheckpointError}'s optional `detail.field` (what each means: the `detail` member's doc). A CLOSED SET with one home, registered in
|
|
@@ -400,9 +408,12 @@ export declare class CheckpointError extends Error {
|
|
|
400
408
|
} | undefined);
|
|
401
409
|
}
|
|
402
410
|
/** THE copy mint: a second throw of an existing refusal — a new `CheckpointError` with the instance's own code, message, detail and
|
|
403
|
-
* `cause
|
|
404
|
-
* it does not spell (scripts/verify-closed-sets.mjs `COPY_MINT`); a construction
|
|
405
|
-
|
|
411
|
+
* `cause` (with `reason` given, `detail.reason` is that word). Its code is one the instance's mint was judged for, so this is the one
|
|
412
|
+
* construction `gate:closed-sets` reads with a code it does not spell (scripts/verify-closed-sets.mjs `COPY_MINT`); a construction
|
|
413
|
+
* anywhere else still spells its code. The instance may be a host's (the class is exported): its message, its detail's members and
|
|
414
|
+
* its `cause` are each read once under a guard, and one that throws when read is not carried — the copy keeps the code, never the
|
|
415
|
+
* host's failure. */
|
|
416
|
+
export declare function copyOfCheckpointError(refusal: CheckpointError, reason?: CheckpointErrorReason): CheckpointError;
|
|
406
417
|
/**
|
|
407
418
|
* Project an already-captured value onto what a backend of the given {@link StoreFidelity} can hold, so
|
|
408
419
|
* everything minted from it — the row's args, the approval preview, the binding hash, the risk
|
|
@@ -75,7 +75,7 @@ export const MAX_SUPPORTED_CHECKPOINT_VERSION = 10;
|
|
|
75
75
|
export function checkpointVersionOf(cp) {
|
|
76
76
|
return cp.version ?? 0;
|
|
77
77
|
}
|
|
78
|
-
export const CHECKPOINT_CONFIG_REFUSAL_CODES = Object.freeze(["config.spec_retired_key", "config.output_style_invalid", "config.language_invalid", "config.permission_mode_invalid", "config.shell_gate_value_retired", "config.approval_reach_invalid", "config.run_origin_invalid", "config.user_invoked_skill_unknown", "config.skill_deny_unreadable", "config.user_attachment_invalid", "config.tool_face_control", "config.deps_retired_key", "config.peer_presence_invalid", "config.tool_model_gate_invalid", "config.microcompact_invalid", "config.prompt_selector_invalid", "resume_at.conflicts_resume", "resume_at.mode_without_target", "config.read_face_invalid", "config.write_face_invalid", "config.invalid_argument", "config.tool_face_invalid", "config.memory_delegation_evidence", "config.memory_provenance", "config.memory_capture_policy", "config.cross_boundary_posture", "config.advisor_tool_invalid", "config.advisor_model_invalid", "config.auto_consolidation", "config.unknown_role", "config.tool_materialize_invalid", "config.memory_persistence_invalid", "config.tool_materialize_unreachable", "config.locked_registry", "config.locked_key", "config.mcp_content_class", "config.skill_listing_budget_invalid", "config.limit_unknown_key", "config.limit_invalid", "config.attachment_invalid", "config.usage_window_invalid", "config.brain_call_guardrail_invalid", "config.retention_policy", "config.retention_capability", "config.invalid_checkpoint_store", "config.invalid_session_store", "config.skill_base_dir_invalid", "config.host_floor_invalid", "config.credential_in_declaration", "config.credential_ref_invalid", "config.peer_seat_missing", "config.interaction_posture", "config.agents.no_delegation_tool", "config.spec_member_unreadable", "config.spec_unknown_key", "config.agent_config_dir_invalid", "config.agent_home_dir_invalid"]);
|
|
78
|
+
export const CHECKPOINT_CONFIG_REFUSAL_CODES = Object.freeze(["config.spec_retired_key", "config.output_style_invalid", "config.language_invalid", "config.permission_mode_invalid", "config.shell_gate_value_retired", "config.approval_reach_invalid", "config.run_origin_invalid", "config.user_invoked_skill_unknown", "config.skill_deny_unreadable", "config.user_attachment_invalid", "config.tool_face_control", "config.deps_retired_key", "config.peer_presence_invalid", "config.tool_model_gate_invalid", "config.microcompact_invalid", "config.prompt_selector_invalid", "resume_at.conflicts_resume", "resume_at.mode_without_target", "config.read_face_invalid", "config.write_face_invalid", "config.invalid_argument", "config.tool_face_invalid", "config.memory_delegation_evidence", "config.memory_provenance", "config.memory_capture_policy", "config.cross_boundary_posture", "config.advisor_tool_invalid", "config.advisor_model_invalid", "config.auto_consolidation", "config.unknown_role", "config.tool_materialize_invalid", "config.memory_persistence_invalid", "config.tool_materialize_unreachable", "config.locked_registry", "config.locked_key", "config.mcp_content_class", "config.skill_listing_budget_invalid", "config.limit_unknown_key", "config.limit_invalid", "config.attachment_invalid", "config.usage_window_invalid", "config.brain_call_guardrail_invalid", "config.retention_policy", "config.retention_capability", "config.invalid_checkpoint_store", "config.invalid_session_store", "config.skill_base_dir_invalid", "config.host_floor_invalid", "config.credential_in_declaration", "config.credential_ref_invalid", "config.peer_seat_missing", "config.interaction_posture", "config.agents.no_delegation_tool", "config.spec_member_unreadable", "config.spec_unknown_key", "config.agent_config_dir_invalid", "config.agent_home_dir_invalid", "config.project_id_invalid"]);
|
|
79
79
|
export const isCheckpointConfigRefusalCode = (word) => CHECKPOINT_CONFIG_REFUSAL_CODES.some((w) => w === word);
|
|
80
80
|
export const CHECKPOINT_ERROR_CODES = Object.freeze([
|
|
81
81
|
"checkpoint.already_exists",
|
|
@@ -124,11 +124,40 @@ export class CheckpointError extends Error {
|
|
|
124
124
|
this.name = "CheckpointError";
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
|
-
export function copyOfCheckpointError(refusal) {
|
|
128
|
-
const
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
127
|
+
export function copyOfCheckpointError(refusal, reason) {
|
|
128
|
+
const guarded = (read) => {
|
|
129
|
+
try {
|
|
130
|
+
return { ok: true, value: read() };
|
|
131
|
+
}
|
|
132
|
+
catch {
|
|
133
|
+
return { ok: false };
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
const message = guarded(() => refusal.message);
|
|
137
|
+
const members = guarded(() => {
|
|
138
|
+
const d = refusal.detail;
|
|
139
|
+
return typeof d === "object" && d !== null ? Object.keys(d).map((k) => [k, guarded(() => d[k])]) : [];
|
|
140
|
+
});
|
|
141
|
+
const kept = members.ok ? members.value.flatMap(([k, v]) => (v.ok && v.value !== undefined ? [[k, v.value]] : [])) : [];
|
|
142
|
+
const detail = Object.fromEntries([...kept.filter(([k]) => reason === undefined || k !== "reason"), ...(reason !== undefined ? [["reason", reason]] : [])]);
|
|
143
|
+
const cause = guarded(() => ("cause" in refusal ? { value: refusal.cause } : undefined));
|
|
144
|
+
const made = copy(new RefusalReading(refusal.code, message.ok && typeof message.value === "string" ? message.value : "", Object.keys(detail ?? {}).length > 0 ? detail : undefined));
|
|
145
|
+
if (cause.ok && cause.value !== undefined)
|
|
146
|
+
Object.defineProperty(made, "cause", { value: cause.value.value, writable: true, configurable: true, enumerable: false });
|
|
147
|
+
return made;
|
|
148
|
+
function copy(p) {
|
|
149
|
+
return new CheckpointError(p.code, p.message, p.detail);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
class RefusalReading {
|
|
153
|
+
code;
|
|
154
|
+
message;
|
|
155
|
+
detail;
|
|
156
|
+
constructor(code, message, detail) {
|
|
157
|
+
this.code = code;
|
|
158
|
+
this.message = message;
|
|
159
|
+
this.detail = detail;
|
|
160
|
+
}
|
|
132
161
|
}
|
|
133
162
|
export function encodeAtFidelity(fidelity, value) {
|
|
134
163
|
if (fidelity === "structured-clone")
|
|
@@ -20,7 +20,7 @@ import { type IdentityRekeyMap } from "./identity-rekey.js";
|
|
|
20
20
|
*/
|
|
21
21
|
export declare const CHECKPOINT_IDENTITY_MEMBERS: Readonly<{
|
|
22
22
|
readonly principal: readonly ["principal", "state.inheritedGate.ancestorRules[].principal"];
|
|
23
|
-
readonly scope: readonly ["scope", "state.legScope", "durableApproval.scope"];
|
|
23
|
+
readonly scope: readonly ["scope", "state.legScope", "durableApproval.scope", "state.legIdentity.rootSessionScope"];
|
|
24
24
|
readonly partition: readonly ["isolationScope"];
|
|
25
25
|
}>;
|
|
26
26
|
/**
|
|
@@ -7,7 +7,7 @@ import { isPlainRecord } from "./mods/kernel/receive.js";
|
|
|
7
7
|
import { rekeyOwnerIdentity } from "./identity-rekey.js";
|
|
8
8
|
export const CHECKPOINT_IDENTITY_MEMBERS = Object.freeze({
|
|
9
9
|
principal: Object.freeze(["principal", "state.inheritedGate.ancestorRules[].principal"]),
|
|
10
|
-
scope: Object.freeze(["scope", "state.legScope", "durableApproval.scope"]),
|
|
10
|
+
scope: Object.freeze(["scope", "state.legScope", "durableApproval.scope", "state.legIdentity.rootSessionScope"]),
|
|
11
11
|
partition: Object.freeze(["isolationScope"]),
|
|
12
12
|
});
|
|
13
13
|
export const CHECKPOINT_NON_IDENTITY_MEMBERS = Object.freeze({
|
|
@@ -26,6 +26,11 @@ export const CHECKPOINT_NON_IDENTITY_MEMBERS = Object.freeze({
|
|
|
26
26
|
"state.compositionLeg": "a composition leg's own names and host session id: ids, not an identity",
|
|
27
27
|
"state.placementRootSessionId": "the placement root's session id: an id, not an identity",
|
|
28
28
|
"state.rowTaskId": "the task a resumed leg runs as: an id, not an identity",
|
|
29
|
+
"state.legIdentity.declaredTaskId": "the task id the leg's host declared: an id, not an identity",
|
|
30
|
+
"state.legIdentity.parentTaskId": "the task that spawned the leg: an id, not an identity",
|
|
31
|
+
"state.legIdentity.rootSessionId": "a session id (the delegation tree's root): an id, not an identity",
|
|
32
|
+
"state.legIdentity.rootSessionIncarnation": "the occupant the tree's root session held: an id, not an identity",
|
|
33
|
+
"state.legIdentity.spawnName": "the leg's explicit spawn name: a name the spawning model or host chose, not an identity",
|
|
29
34
|
"state.workspaceHandle": "the parked workspace's sandbox, snapshot and device ids: ids, not an identity",
|
|
30
35
|
"state.handsHome": "an operating-system path: renaming a person moves no path",
|
|
31
36
|
"state.inheritedGate.pathRuleAnchors": "operating-system paths the path rules anchor at: renaming a person moves no path",
|