@sema-agent/core 7.62.0 → 7.64.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 +936 -0
- package/dist/agents/cc-peer-directory.js +1 -0
- package/dist/agents/cc-peer-wire.d.ts +4 -0
- package/dist/agents/cc-peer-wire.js +1 -0
- package/dist/agents/cc-uds-peer-channel.js +5 -0
- package/dist/agents/cross-session-judge.d.ts +3 -1
- package/dist/agents/cross-session-judge.js +4 -1
- package/dist/agents/peer-directory.d.ts +8 -0
- package/dist/agents/peer-directory.js +4 -0
- package/dist/agents/peer-held-queue.d.ts +9 -3
- package/dist/agents/peer-held-queue.js +12 -9
- package/dist/agents/peer-idle.d.ts +20 -1
- package/dist/agents/peer-idle.js +23 -12
- package/dist/agents/peer-notice-route.d.ts +16 -5
- package/dist/agents/peer-notice-route.js +11 -9
- package/dist/agents/peer-notices.d.ts +25 -8
- package/dist/agents/peer-notices.js +6 -1
- package/dist/agents/peer-session-drain.d.ts +32 -6
- package/dist/agents/peer-session-drain.js +100 -26
- package/dist/agents/send-message-tool.d.ts +7 -0
- package/dist/agents/send-message-tool.js +18 -6
- package/dist/agents/subagent-transcript-placement.d.ts +23 -0
- package/dist/agents/subagent-transcript-placement.js +14 -0
- package/dist/agents/subagent.js +102 -54
- package/dist/brain/route-adjudicator.js +9 -4
- package/dist/core/allow-entry.d.ts +4 -0
- package/dist/core/approval-object.js +1 -1
- package/dist/core/arg-summary.js +1 -1
- package/dist/core/ask-origin.d.ts +1 -1
- package/dist/core/ask-origin.js +2 -2
- package/dist/core/ask-question.d.ts +2 -2
- package/dist/core/ask-unresolvable-notice.d.ts +13 -4
- package/dist/core/ask-unresolvable-notice.js +10 -3
- package/dist/core/auto-compaction.d.ts +7 -5
- package/dist/core/background-agent-store.d.ts +7 -0
- package/dist/core/background-agent-store.js +3 -0
- package/dist/core/canonical-json.d.ts +23 -13
- package/dist/core/canonical-json.js +4 -4
- package/dist/core/checkpoint-queries.d.ts +50 -4
- package/dist/core/checkpoint-queries.js +42 -17
- package/dist/core/checkpoint-requirements.d.ts +3 -3
- package/dist/core/checkpoint-requirements.js +2 -1
- package/dist/core/checkpoint-row-verdict.d.ts +15 -4
- package/dist/core/checkpoint-row-verdict.js +22 -2
- package/dist/core/checkpoint-store.d.ts +28 -11
- package/dist/core/checkpoint-store.js +45 -4
- package/dist/core/compliance.d.ts +6 -2
- package/dist/core/compliance.js +3 -3
- package/dist/core/context-settings.d.ts +40 -9
- package/dist/core/context-settings.js +32 -10
- package/dist/core/engine-attestation.d.ts +27 -7
- package/dist/core/engine-attestation.js +5 -1
- package/dist/core/engine-notice.d.ts +43 -5
- package/dist/core/extension-requester.d.ts +9 -0
- package/dist/core/extension-requester.js +7 -0
- package/dist/core/file-history-store.d.ts +28 -0
- package/dist/core/file-history-store.js +48 -5
- package/dist/core/fs-write-gate-policy.js +1 -1
- package/dist/core/gate-fold.js +2 -0
- package/dist/core/gate-lanes.js +2 -0
- package/dist/core/gate-outcome.d.ts +39 -2
- package/dist/core/gate-outcome.js +20 -1
- package/dist/core/git-worktree-env.d.ts +62 -3
- package/dist/core/git-worktree-env.js +91 -30
- package/dist/core/governance-codes.d.ts +9 -3
- package/dist/core/governance-codes.js +17 -3
- package/dist/core/leg-identity.d.ts +19 -1
- package/dist/core/leg-identity.js +12 -0
- package/dist/core/mailbox-store.d.ts +39 -4
- package/dist/core/mailbox-store.js +14 -2
- package/dist/core/memory-engine/consolidation-driver.d.ts +32 -17
- package/dist/core/memory-engine/consolidation-driver.js +99 -98
- package/dist/core/memory-engine/consolidation.d.ts +74 -10
- package/dist/core/memory-engine/consolidation.js +183 -11
- package/dist/core/memory-engine/control-objects.d.ts +25 -0
- package/dist/core/memory-engine/control-objects.js +151 -0
- package/dist/core/memory-engine/control-plane-adoption.d.ts +48 -0
- package/dist/core/memory-engine/control-plane-adoption.js +159 -0
- package/dist/core/memory-engine/data-plane.d.ts +8 -4
- package/dist/core/memory-engine/data-plane.js +11 -6
- package/dist/core/memory-engine/delegation-settlement.d.ts +58 -40
- package/dist/core/memory-engine/delegation-settlement.js +270 -85
- package/dist/core/memory-engine/dual-root.d.ts +12 -6
- package/dist/core/memory-engine/dual-root.js +11 -7
- package/dist/core/memory-engine/engine.d.ts +136 -58
- package/dist/core/memory-engine/engine.js +491 -394
- package/dist/core/memory-engine/entry-scan.d.ts +8 -0
- package/dist/core/memory-engine/entry-scan.js +3 -0
- package/dist/core/memory-engine/file-backend.d.ts +62 -60
- package/dist/core/memory-engine/file-backend.js +122 -198
- package/dist/core/memory-engine/index.d.ts +8 -7
- package/dist/core/memory-engine/index.js +7 -6
- package/dist/core/memory-engine/landing-admission.d.ts +5 -3
- package/dist/core/memory-engine/landing-admission.js +3 -3
- package/dist/core/memory-engine/layout.d.ts +127 -46
- package/dist/core/memory-engine/layout.js +264 -109
- package/dist/core/memory-engine/memory-backend-contract.d.ts +26 -1
- package/dist/core/memory-engine/memory-backend-contract.js +476 -0
- package/dist/core/memory-engine/memory-deployment.d.ts +42 -11
- package/dist/core/memory-engine/memory-deployment.js +54 -15
- package/dist/core/memory-engine/origin-clearance.d.ts +12 -3
- package/dist/core/memory-engine/origin-clearance.js +68 -9
- package/dist/core/memory-engine/scope-contract.d.ts +52 -11
- package/dist/core/memory-engine/scope-contract.js +68 -19
- package/dist/core/memory-engine/session-write-home.d.ts +37 -2
- package/dist/core/memory-engine/session-write-home.js +38 -11
- package/dist/core/memory-engine/sync-client.d.ts +3 -1
- package/dist/core/memory-engine/sync-client.js +7 -0
- package/dist/core/memory-engine/sync-report.d.ts +3 -2
- package/dist/core/memory-engine/sync-report.js +6 -2
- package/dist/core/memory-engine/tools.d.ts +2 -2
- package/dist/core/memory-engine/tools.js +10 -10
- package/dist/core/memory-engine/types.d.ts +155 -19
- package/dist/core/memory-engine/types.js +2 -0
- package/dist/core/memory.js +15 -6
- package/dist/core/mode-policy.js +3 -3
- package/dist/core/mods/agent-stations.d.ts +18 -0
- package/dist/core/mods/agent-stations.js +8 -6
- package/dist/core/mods/extension-call.d.ts +4 -0
- package/dist/core/mods/extension-call.js +8 -0
- package/dist/core/mods/stations.d.ts +20 -1
- package/dist/core/mods/stations.js +21 -2
- package/dist/core/mods/tool-call.js +3 -4
- package/dist/core/parent-spec-seat.d.ts +2 -2
- package/dist/core/park-selfcheck.js +2 -2
- package/dist/core/pause-registry.d.ts +2 -0
- package/dist/core/pause-registry.js +3 -0
- package/dist/core/peer-channel.d.ts +5 -0
- package/dist/core/permission-rule-consent.d.ts +26 -8
- package/dist/core/permission-rule-consent.js +76 -36
- package/dist/core/permission-rule-store.d.ts +72 -13
- package/dist/core/permission-rule-store.js +29 -8
- package/dist/core/read-only-shell.js +3 -2
- package/dist/core/redaction-marks.d.ts +8 -0
- package/dist/core/redaction-marks.js +6 -0
- package/dist/core/refusal-echo.d.ts +20 -0
- package/dist/core/refusal-echo.js +33 -0
- package/dist/core/remote-env.d.ts +12 -1
- package/dist/core/remote-env.js +3 -0
- package/dist/core/retention.d.ts +180 -10
- package/dist/core/retention.js +45 -0
- package/dist/core/retired-keys.d.ts +5 -0
- package/dist/core/retired-keys.js +3 -0
- package/dist/core/rule-offer-read.d.ts +0 -4
- package/dist/core/rule-offer-read.js +2 -18
- package/dist/core/runner/child-tree.d.ts +29 -3
- package/dist/core/runner/child-tree.js +39 -16
- package/dist/core/runner/classifier-ladder.d.ts +7 -1
- package/dist/core/runner/classifier-ladder.js +4 -2
- package/dist/core/runner/compact-session.js +10 -7
- package/dist/core/runner/compaction-call-options.d.ts +7 -7
- package/dist/core/runner/compaction-call-options.js +3 -2
- package/dist/core/runner/contracts.d.ts +39 -11
- package/dist/core/runner/delegation-owner.d.ts +10 -3
- package/dist/core/runner/delegation-owner.js +4 -1
- package/dist/core/runner/gate-exit.d.ts +6 -0
- package/dist/core/runner/gate-exit.js +13 -4
- package/dist/core/runner/inherited-ask-grants.js +1 -1
- package/dist/core/runner/memory-consolidation-driver.d.ts +10 -5
- package/dist/core/runner/memory-consolidation-driver.js +12 -9
- package/dist/core/runner/memory-consolidation-write-judge.d.ts +2 -1
- package/dist/core/runner/memory-consolidation-write-judge.js +3 -2
- package/dist/core/runner/person-path-rows.d.ts +8 -3
- package/dist/core/runner/person-path-rows.js +5 -1
- package/dist/core/runner/placement-fence.d.ts +12 -0
- package/dist/core/runner/placement-fence.js +20 -6
- package/dist/core/runner/prepare-ask-lane.js +5 -5
- package/dist/core/runner/prepare-caps-and-workflow.d.ts +7 -2
- package/dist/core/runner/prepare-caps-and-workflow.js +7 -4
- package/dist/core/runner/prepare-config-doors.js +4 -0
- package/dist/core/runner/prepare-delegation-surface.d.ts +3 -0
- package/dist/core/runner/prepare-delegation-surface.js +2 -2
- package/dist/core/runner/prepare-execution-env.js +17 -6
- package/dist/core/runner/prepare-gate-stations.d.ts +5 -0
- package/dist/core/runner/prepare-gate-stations.js +5 -5
- package/dist/core/runner/prepare-hands-readface.d.ts +2 -1
- package/dist/core/runner/prepare-hands-readface.js +5 -4
- package/dist/core/runner/prepare-inherited-gate.d.ts +13 -9
- package/dist/core/runner/prepare-inherited-gate.js +12 -6
- package/dist/core/runner/prepare-memory-engine-session.d.ts +2 -4
- package/dist/core/runner/prepare-memory-engine-session.js +4 -4
- package/dist/core/runner/prepare-memory.d.ts +7 -2
- package/dist/core/runner/prepare-memory.js +41 -39
- package/dist/core/runner/prepare-park-ask.js +4 -3
- package/dist/core/runner/prepare-policy-chain.js +7 -7
- package/dist/core/runner/prepare-prompt-inputs.js +1 -1
- package/dist/core/runner/prepare-task.js +26 -18
- package/dist/core/runner/prepare-wiring-manifest.d.ts +3 -1
- package/dist/core/runner/prepare-wiring-manifest.js +3 -2
- package/dist/core/runner/prepare-workspace-restore.js +3 -6
- package/dist/core/runner/resume-admission.d.ts +2 -2
- package/dist/core/runner/resume-admission.js +2 -23
- package/dist/core/runner/role-resolution-table.d.ts +98 -0
- package/dist/core/runner/role-resolution-table.js +62 -0
- package/dist/core/runner/run-compaction-machinery.js +2 -2
- package/dist/core/runner/run-identity-wiring.js +12 -9
- package/dist/core/runner/run-leg.js +9 -5
- package/dist/core/runner/run-notification-lane.js +22 -22
- package/dist/core/runner/run-recovery-lanes.js +3 -3
- package/dist/core/runner/run-settle-and-teardown.js +3 -2
- package/dist/core/runner/run-terminal-adoption.js +1 -1
- package/dist/core/runner/run-turn-boundary.js +14 -15
- package/dist/core/runner/runtask.js +1 -1
- package/dist/core/runner/terminal-account.js +1 -1
- package/dist/core/runner/tool-occurrence.d.ts +4 -2
- package/dist/core/runner/tool-occurrence.js +2 -2
- package/dist/core/runner-deps.d.ts +7 -3
- package/dist/core/secret-env.d.ts +1 -1
- package/dist/core/secret-env.js +4 -4
- package/dist/core/session-checkout.d.ts +168 -0
- package/dist/core/session-checkout.js +579 -0
- package/dist/core/session-store.d.ts +12 -4
- package/dist/core/session-store.js +23 -3
- package/dist/core/session.d.ts +16 -2
- package/dist/core/session.js +3 -0
- package/dist/core/shell-read-silence.js +8 -0
- package/dist/core/store-contracts/checkpoint-store-contract.d.ts +0 -12
- package/dist/core/store-contracts/checkpoint-store-contract.js +6 -7
- package/dist/core/store-contracts/peer-directory-contract.js +8 -1
- package/dist/core/store-contracts/session-store-contract.js +39 -0
- package/dist/core/task-event.d.ts +30 -5
- package/dist/core/task-notification.d.ts +119 -32
- package/dist/core/task-notification.js +186 -100
- package/dist/core/task-registry-agent.d.ts +25 -2
- package/dist/core/task-registry-agent.js +56 -22
- package/dist/core/task-registry-shared.d.ts +33 -11
- package/dist/core/task-registry.d.ts +33 -9
- package/dist/core/task-registry.js +36 -18
- package/dist/core/task-spec-members.js +1 -1
- package/dist/core/task-spec.d.ts +27 -2
- package/dist/core/tool-errors.d.ts +14 -6
- package/dist/core/tool-errors.js +1 -1
- package/dist/core/tool-policy.d.ts +32 -13
- package/dist/core/tool-policy.js +27 -17
- package/dist/core/tool-result-store.d.ts +20 -0
- package/dist/core/tool-spec.d.ts +42 -19
- package/dist/core/trace.d.ts +3 -2
- package/dist/core/types.d.ts +1 -1
- package/dist/core/untrusted-egress.d.ts +15 -4
- package/dist/core/untrusted-egress.js +23 -22
- package/dist/core/workflow-journal-store.d.ts +11 -0
- package/dist/core/workflow-journal-store.js +7 -0
- package/dist/core/workflow-run-store.d.ts +9 -0
- package/dist/core/workflow-run-store.js +6 -0
- package/dist/core/workspace-snapshot.d.ts +3 -1
- package/dist/core/workspace-snapshot.js +1 -0
- package/dist/engine/compaction/compaction.d.ts +2 -1
- package/dist/engine/harness/types.d.ts +67 -1
- package/dist/engine/harness/types.js +108 -0
- package/dist/engine/session/import-validate.js +6 -1
- package/dist/engine/session/session.d.ts +30 -1
- package/dist/engine/session/session.js +48 -1
- package/dist/index.d.ts +12 -7
- package/dist/index.js +12 -7
- package/dist/internal/harness-types.d.ts +1 -1
- package/dist/orchestration/run-workflow-tool.d.ts +8 -1
- package/dist/orchestration/run-workflow-tool.js +8 -0
- package/dist/orchestration/workflow-types.d.ts +2 -1
- package/dist/orchestration/workflow.d.ts +6 -0
- package/dist/orchestration/workflow.js +5 -2
- package/dist/stores/file/checkpoint-store.d.ts +6 -0
- package/dist/stores/file/checkpoint-store.js +4 -1
- package/dist/stores/file/file-history-store.d.ts +13 -0
- package/dist/stores/file/file-history-store.js +75 -13
- package/dist/stores/file/index.d.ts +11 -1
- package/dist/stores/file/index.js +7 -11
- package/dist/stores/file/permission-rule-store.d.ts +23 -0
- package/dist/stores/file/permission-rule-store.js +75 -7
- package/dist/stores/file/session-store.js +2 -1
- package/dist/stores/file/tool-result-store.d.ts +14 -0
- package/dist/stores/file/tool-result-store.js +39 -2
- package/dist/stores/file/workflow-journal-store.d.ts +4 -0
- package/dist/stores/file/workflow-journal-store.js +17 -0
- package/dist/stores/file/workflow-run-store.d.ts +3 -0
- package/dist/stores/file/workflow-run-store.js +15 -0
- package/dist/tools/fs/bash-program-position.js +3 -3
- package/dist/tools/fs/program-read-model.d.ts +34 -10
- package/dist/tools/fs/program-read-model.js +37 -7
- package/dist/tools/fs/program-read-model.rows.js +13 -2
- package/dist/tools/fs/read-deny.d.ts +28 -3
- package/dist/tools/fs/read-deny.js +18 -2
- package/dist/tools/fs/removal-targets.js +3 -3
- package/dist/tools/fs/safety.d.ts +2 -0
- package/dist/tools/fs/safety.js +1 -1
- package/dist/tools/fs/shell-read-argv.d.ts +8 -1
- package/dist/tools/fs/shell-read-argv.js +34 -29
- package/dist/tools/fs/shell-read-bindings.d.ts +2 -0
- package/dist/tools/fs/shell-read-bindings.js +5 -1
- package/dist/tools/fs/shell-read-brace.d.ts +18 -0
- package/dist/tools/fs/shell-read-brace.js +79 -0
- package/dist/tools/fs/shell-read-check.d.ts +8 -2
- package/dist/tools/fs/shell-read-check.js +16 -14
- package/dist/tools/fs/shell-read-establish.js +23 -16
- package/dist/tools/fs/shell-read-judge.d.ts +11 -0
- package/dist/tools/fs/shell-read-judge.js +3 -3
- package/dist/tools/fs/shell-read-plan.d.ts +10 -0
- package/dist/tools/fs/shell-read-plan.js +189 -93
- package/dist/tools/fs/shell-read-start.d.ts +19 -9
- package/dist/tools/fs/shell-read-start.js +20 -12
- package/dist/tools/fs/shell-read-word.d.ts +10 -0
- package/dist/tools/fs/shell-read-word.js +9 -5
- package/dist/tools/fs/shell-read-workdir.d.ts +26 -7
- package/dist/tools/fs/shell-read-workdir.js +73 -12
- package/dist/tools/fs/shell-read-write-targets.js +13 -8
- package/dist/tools/worktree.d.ts +3 -2
- package/dist/tools/worktree.js +7 -35
- package/package.json +3 -2
- package/test/export-surface.snapshot.json +135 -11
- package/wire-changes/core-stores-sql@7.63.0.json +30 -0
- package/wire-changes/core-stores-sql@7.64.0.json +30 -0
- package/wire-changes/core@7.63.0.json +3523 -0
- package/wire-changes/core@7.64.0.json +2653 -0
- package/wire-changes/mods-kernel@7.63.0.json +30 -0
- package/wire-changes/mods-kernel@7.64.0.json +30 -0
- package/wire-changes/primitives@7.63.0.json +445 -0
- package/wire-changes/primitives@7.64.0.json +30 -0
- package/dist/core/credential-vocabulary.d.ts +0 -176
- package/dist/core/credential-vocabulary.js +0 -190
- package/dist/core/redaction-passes.d.ts +0 -82
- package/dist/core/redaction-passes.js +0 -377
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* The seat sends the leg-start snapshot when the leg binds its sink, and afterwards a frame only when the snapshot's digest
|
|
6
6
|
* differs from the last frame it sent — the digest is the snapshot's canonical JSON, so every member the projection carries
|
|
7
|
-
* takes part in the comparison with no second list to keep in step. The fixed members (root, project, remote) are leg
|
|
7
|
+
* takes part in the comparison with no second list to keep in step. The fixed members (root, session, project, remote) are leg
|
|
8
8
|
* facts handed in at prepare; the two live ones are read off the leg's own seats at each observation (the tracked cwd, the
|
|
9
9
|
* active EnterWorktree switch), never copied.
|
|
10
10
|
*/
|
|
@@ -29,6 +29,8 @@ export interface WorkspaceFacts {
|
|
|
29
29
|
};
|
|
30
30
|
/** The leg's project verdict (`resolveSessionProject`); absent ⇒ the leg has no project identity. */
|
|
31
31
|
readonly project?: SessionProject;
|
|
32
|
+
/** The session's checkout as the frame reports it (`sessionFrameOf`); absent ⇒ the session declared no workspace. */
|
|
33
|
+
readonly session?: WorkspaceSnapshot["session"];
|
|
32
34
|
/** The leg's one remoteness reading (the restore phase's, the same value `ResolvedWorkspace.remote` carries). */
|
|
33
35
|
readonly remote: boolean;
|
|
34
36
|
}
|
|
@@ -5,6 +5,7 @@ export function workspaceSnapshotOf(facts) {
|
|
|
5
5
|
cwd: facts.cwdRef?.current ?? facts.root,
|
|
6
6
|
root: facts.root,
|
|
7
7
|
...(active !== undefined ? { entered: { dir: active.worktreeDir, ...(active.entered === true ? { byPath: true } : {}) } } : {}),
|
|
8
|
+
...(facts.session !== undefined ? { session: facts.session } : {}),
|
|
8
9
|
...(facts.project !== undefined ? { project: { id: facts.project.id, source: facts.project.source } } : {}),
|
|
9
10
|
remote: facts.remote,
|
|
10
11
|
};
|
|
@@ -90,7 +90,8 @@ export interface CompactionResult<T = unknown> {
|
|
|
90
90
|
}
|
|
91
91
|
/** Compaction thresholds and retention settings. */
|
|
92
92
|
export interface CompactionSettings {
|
|
93
|
-
/**
|
|
93
|
+
/** This pass's own gate (`false` ⇒ the pass is disabled). A run resolves it for each pass from the seat of that pass —
|
|
94
|
+
* `TaskSpec.compaction.autoCompact` for the passes the engine starts, `manualCompact` for a requested one. */
|
|
94
95
|
enabled: boolean;
|
|
95
96
|
/** Tokens reserved below the context window for the TRIGGER threshold (threshold = window −
|
|
96
97
|
* reserve). Historically this single knob ALSO seeded the summary legs' output budget
|
|
@@ -851,6 +851,63 @@ export interface WorkspaceState {
|
|
|
851
851
|
export interface WorkspaceStateEntry extends SessionTreeEntryBase, WorkspaceState {
|
|
852
852
|
type: "workspace_state";
|
|
853
853
|
}
|
|
854
|
+
/** A declared code source, as a session checkout records it: the root it answers for (the task root, or an
|
|
855
|
+
* `additionalDirectories` entry in its declared spelling), the repository URL in its normalized `https` form, the full
|
|
856
|
+
* commit id, and the display label the host gave. */
|
|
857
|
+
export interface SessionCheckoutSource {
|
|
858
|
+
root: "taskRoot" | {
|
|
859
|
+
directory: string;
|
|
860
|
+
};
|
|
861
|
+
remote: string;
|
|
862
|
+
sha: string;
|
|
863
|
+
ref?: string;
|
|
864
|
+
}
|
|
865
|
+
/** The workspace declaration a session checkout was opened under, normalized — what every later leg's declaration is
|
|
866
|
+
* compared with (`config.session_workspace_changed` when they differ). */
|
|
867
|
+
export interface SessionCheckoutDeclared {
|
|
868
|
+
isolation?: "worktree";
|
|
869
|
+
baseRef?: "fresh" | "head";
|
|
870
|
+
name?: string;
|
|
871
|
+
sources?: SessionCheckoutSource[];
|
|
872
|
+
}
|
|
873
|
+
/** One repository of a session checkout. `dir` / `name` / `branch` / `baseRef` are present together iff the repository is
|
|
874
|
+
* isolated (the session's own tree); `source` iff a declared source names this repository. */
|
|
875
|
+
export interface SessionCheckoutCell {
|
|
876
|
+
/** The repository's main worktree root (canonical) — the repository this cell answers for. */
|
|
877
|
+
repository: string;
|
|
878
|
+
/** Which declared root lives in this cell. */
|
|
879
|
+
root: "taskRoot" | {
|
|
880
|
+
directory: string;
|
|
881
|
+
};
|
|
882
|
+
/** The commit this session's code starts from: the tree's base commit, or the declared source's commit. */
|
|
883
|
+
baseSha: string;
|
|
884
|
+
dir?: string;
|
|
885
|
+
name?: string;
|
|
886
|
+
branch?: string;
|
|
887
|
+
baseRef?: "fresh" | "head" | "source";
|
|
888
|
+
source?: {
|
|
889
|
+
remote: string;
|
|
890
|
+
sha: string;
|
|
891
|
+
ref?: string;
|
|
892
|
+
};
|
|
893
|
+
}
|
|
894
|
+
/**
|
|
895
|
+
* design/1456 R1′ (#2292): a session's checkout — an IMMUTABLE allocation, minted ONCE by the session's first leg from its
|
|
896
|
+
* workspace declaration, and written once more only by `releaseSessionCheckout` (the same record with `released: true`).
|
|
897
|
+
* Session-scoped, not branch-scoped: readers scan the whole log, and only an entry whose `sessionId` is the reader's own
|
|
898
|
+
* session counts (a fork's copied entry is the parent's, so a fork does not inherit the checkout). A list of repositories
|
|
899
|
+
* from the start (multi-root sessions add cells, never change the shape).
|
|
900
|
+
*/
|
|
901
|
+
export interface SessionCheckoutRecord {
|
|
902
|
+
allocationId: string;
|
|
903
|
+
sessionId: string;
|
|
904
|
+
declared: SessionCheckoutDeclared;
|
|
905
|
+
checkouts: SessionCheckoutCell[];
|
|
906
|
+
released?: true;
|
|
907
|
+
}
|
|
908
|
+
export interface SessionCheckoutEntry extends SessionTreeEntryBase, SessionCheckoutRecord {
|
|
909
|
+
type: "session_checkout";
|
|
910
|
+
}
|
|
854
911
|
/** Bounded cap for {@link normalizeReminderMark}: the current scheme's value is 22 chars; the bound
|
|
855
912
|
* is deliberately looser (an opaque bounded token) so the STORE never learns the scheme — the real
|
|
856
913
|
* value-shape verify lives in the mint home (core/reminder-mint.ts `isValidReminderMark`), applied
|
|
@@ -942,6 +999,14 @@ export declare const WORKSPACE_STATE_MAX_PATH_CHARS = 4096;
|
|
|
942
999
|
* undefined when the value is not structurally valid.
|
|
943
1000
|
*/
|
|
944
1001
|
export declare function normalizeWorkspaceState(value: unknown): WorkspaceState | undefined;
|
|
1002
|
+
/** Bounds of a session checkout record: one repository per cell, one source per repository. */
|
|
1003
|
+
export declare const SESSION_CHECKOUT_MAX_CELLS = 64;
|
|
1004
|
+
/**
|
|
1005
|
+
* design/1456 (#2292): the strict shape gate of a {@link SessionCheckoutRecord} — the ONE normalization the record's read, its
|
|
1006
|
+
* append and the import door use. `undefined` = not a structurally valid record (the reader REFUSES it, never skips it:
|
|
1007
|
+
* a checkout that cannot be read is a checkout the session cannot use).
|
|
1008
|
+
*/
|
|
1009
|
+
export declare function normalizeSessionCheckout(value: unknown): SessionCheckoutRecord | undefined;
|
|
945
1010
|
/** Bounded caps for {@link normalizeAnnouncedListing} — a roster is dozens of names, never thousands;
|
|
946
1011
|
* a "name" is a short identifier, never a document. Oversize ⇒ structurally invalid (forgery signal). */
|
|
947
1012
|
export declare const ANNOUNCED_LISTING_MAX_NAMES = 500;
|
|
@@ -1010,7 +1075,7 @@ export declare function isSyntheticApiErrorMessage(m: unknown): boolean;
|
|
|
1010
1075
|
export declare function isOptionalDisplayString(v: unknown, max?: number): boolean;
|
|
1011
1076
|
export declare function normalizeAnnouncedListing(v: unknown): AnnouncedListingSnapshot | undefined;
|
|
1012
1077
|
/** All persisted session tree entry variants. */
|
|
1013
|
-
export type SessionTreeEntry = MessageEntry | ThinkingLevelChangeEntry | ModelChangeEntry | CompactionEntry | CustomEntry | CustomMessageEntry | LabelEntry | SessionInfoEntry | LeafEntry | PromptEpochEntry | AnnouncedListingEntry | GitAnnouncementEntry | WorkspaceStateEntry | ReminderMarkEntry;
|
|
1078
|
+
export type SessionTreeEntry = MessageEntry | ThinkingLevelChangeEntry | ModelChangeEntry | CompactionEntry | CustomEntry | CustomMessageEntry | LabelEntry | SessionInfoEntry | LeafEntry | PromptEpochEntry | AnnouncedListingEntry | GitAnnouncementEntry | WorkspaceStateEntry | SessionCheckoutEntry | ReminderMarkEntry;
|
|
1014
1079
|
export interface SessionContext {
|
|
1015
1080
|
messages: AgentMessage[];
|
|
1016
1081
|
thinkingLevel: string;
|
|
@@ -1556,6 +1621,7 @@ export interface CompactResult {
|
|
|
1556
1621
|
}
|
|
1557
1622
|
/** Settings that control automatic context compaction. */
|
|
1558
1623
|
export interface CompactionSettings {
|
|
1624
|
+
/** This pass's own gate (`false` ⇒ the pass is disabled); a run resolves it per pass from the seat of that pass. */
|
|
1559
1625
|
enabled: boolean;
|
|
1560
1626
|
reserveTokens: number;
|
|
1561
1627
|
keepRecentTokens: number;
|
|
@@ -136,6 +136,114 @@ export function normalizeWorkspaceState(value) {
|
|
|
136
136
|
}
|
|
137
137
|
return out;
|
|
138
138
|
}
|
|
139
|
+
export const SESSION_CHECKOUT_MAX_CELLS = 64;
|
|
140
|
+
const FULL_SHA = /^(?:[0-9a-f]{40}|[0-9a-f]{64})$/;
|
|
141
|
+
const CHECKOUT_TOKEN = /^[A-Za-z0-9._:-]{1,128}$/;
|
|
142
|
+
function normalizeCheckoutRoot(value) {
|
|
143
|
+
if (value === "taskRoot")
|
|
144
|
+
return "taskRoot";
|
|
145
|
+
if (value === null || typeof value !== "object" || Array.isArray(value))
|
|
146
|
+
return undefined;
|
|
147
|
+
const keys = Object.keys(value);
|
|
148
|
+
const directory = value.directory;
|
|
149
|
+
if (keys.length !== 1 || typeof directory !== "string" || !directory.startsWith("/") || directory.length > WORKSPACE_STATE_MAX_PATH_CHARS)
|
|
150
|
+
return undefined;
|
|
151
|
+
return { directory };
|
|
152
|
+
}
|
|
153
|
+
function normalizeCheckoutSource(value) {
|
|
154
|
+
if (value === null || typeof value !== "object" || Array.isArray(value))
|
|
155
|
+
return undefined;
|
|
156
|
+
const v = value;
|
|
157
|
+
const root = normalizeCheckoutRoot(v.root);
|
|
158
|
+
if (root === undefined)
|
|
159
|
+
return undefined;
|
|
160
|
+
if (typeof v.remote !== "string" || !v.remote.startsWith("https://") || v.remote.length > 2048)
|
|
161
|
+
return undefined;
|
|
162
|
+
if (typeof v.sha !== "string" || !FULL_SHA.test(v.sha))
|
|
163
|
+
return undefined;
|
|
164
|
+
if (v.ref !== undefined && (typeof v.ref !== "string" || v.ref.length === 0 || v.ref.length > 256))
|
|
165
|
+
return undefined;
|
|
166
|
+
return { root, remote: v.remote, sha: v.sha, ...(v.ref !== undefined ? { ref: v.ref } : {}) };
|
|
167
|
+
}
|
|
168
|
+
export function normalizeSessionCheckout(value) {
|
|
169
|
+
if (value === null || typeof value !== "object")
|
|
170
|
+
return undefined;
|
|
171
|
+
const v = value;
|
|
172
|
+
const okPath = (p) => typeof p === "string" && p.startsWith("/") && p.length <= WORKSPACE_STATE_MAX_PATH_CHARS;
|
|
173
|
+
if (typeof v.allocationId !== "string" || !CHECKOUT_TOKEN.test(v.allocationId))
|
|
174
|
+
return undefined;
|
|
175
|
+
if (typeof v.sessionId !== "string" || v.sessionId.length === 0 || v.sessionId.length > 512)
|
|
176
|
+
return undefined;
|
|
177
|
+
if (v.released !== undefined && v.released !== true)
|
|
178
|
+
return undefined;
|
|
179
|
+
if (v.declared === null || typeof v.declared !== "object" || Array.isArray(v.declared))
|
|
180
|
+
return undefined;
|
|
181
|
+
const d = v.declared;
|
|
182
|
+
if (d.isolation !== undefined && d.isolation !== "worktree")
|
|
183
|
+
return undefined;
|
|
184
|
+
if (d.baseRef !== undefined && d.baseRef !== "fresh" && d.baseRef !== "head")
|
|
185
|
+
return undefined;
|
|
186
|
+
if (d.name !== undefined && (typeof d.name !== "string" || !/^[A-Za-z0-9._/-]{1,64}$/.test(d.name)))
|
|
187
|
+
return undefined;
|
|
188
|
+
let sources;
|
|
189
|
+
if (d.sources !== undefined) {
|
|
190
|
+
if (!Array.isArray(d.sources) || d.sources.length === 0 || d.sources.length > SESSION_CHECKOUT_MAX_CELLS)
|
|
191
|
+
return undefined;
|
|
192
|
+
sources = [];
|
|
193
|
+
for (const s of d.sources) {
|
|
194
|
+
const shaped = normalizeCheckoutSource(s);
|
|
195
|
+
if (shaped === undefined)
|
|
196
|
+
return undefined;
|
|
197
|
+
sources.push(shaped);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
const declared = {
|
|
201
|
+
...(d.isolation !== undefined ? { isolation: "worktree" } : {}),
|
|
202
|
+
...(d.baseRef !== undefined ? { baseRef: d.baseRef } : {}),
|
|
203
|
+
...(d.name !== undefined ? { name: d.name } : {}),
|
|
204
|
+
...(sources !== undefined ? { sources } : {}),
|
|
205
|
+
};
|
|
206
|
+
if (!Array.isArray(v.checkouts) || v.checkouts.length > SESSION_CHECKOUT_MAX_CELLS)
|
|
207
|
+
return undefined;
|
|
208
|
+
const checkouts = [];
|
|
209
|
+
for (const c of v.checkouts) {
|
|
210
|
+
if (c === null || typeof c !== "object" || Array.isArray(c))
|
|
211
|
+
return undefined;
|
|
212
|
+
const cell = c;
|
|
213
|
+
const root = normalizeCheckoutRoot(cell.root);
|
|
214
|
+
if (!okPath(cell.repository) || root === undefined || typeof cell.baseSha !== "string" || !FULL_SHA.test(cell.baseSha))
|
|
215
|
+
return undefined;
|
|
216
|
+
const tree = [cell.dir, cell.name, cell.branch, cell.baseRef];
|
|
217
|
+
const isolated = tree.every((x) => x !== undefined);
|
|
218
|
+
if (!isolated && !tree.every((x) => x === undefined))
|
|
219
|
+
return undefined;
|
|
220
|
+
if (isolated) {
|
|
221
|
+
if (!okPath(cell.dir) || typeof cell.name !== "string" || !/^[A-Za-z0-9._/-]{1,64}$/.test(cell.name))
|
|
222
|
+
return undefined;
|
|
223
|
+
if (typeof cell.branch !== "string" || !/^sema\/[A-Za-z0-9._+-]{1,64}$/.test(cell.branch))
|
|
224
|
+
return undefined;
|
|
225
|
+
if (cell.baseRef !== "fresh" && cell.baseRef !== "head" && cell.baseRef !== "source")
|
|
226
|
+
return undefined;
|
|
227
|
+
}
|
|
228
|
+
let source;
|
|
229
|
+
if (cell.source !== undefined) {
|
|
230
|
+
const s = cell.source;
|
|
231
|
+
if (s === null || typeof s !== "object" || typeof s.remote !== "string" || !s.remote.startsWith("https://") || typeof s.sha !== "string" || !FULL_SHA.test(s.sha))
|
|
232
|
+
return undefined;
|
|
233
|
+
if (s.ref !== undefined && (typeof s.ref !== "string" || s.ref.length === 0 || s.ref.length > 256))
|
|
234
|
+
return undefined;
|
|
235
|
+
source = { remote: s.remote, sha: s.sha, ...(s.ref !== undefined ? { ref: s.ref } : {}) };
|
|
236
|
+
}
|
|
237
|
+
checkouts.push({
|
|
238
|
+
repository: cell.repository,
|
|
239
|
+
root,
|
|
240
|
+
baseSha: cell.baseSha,
|
|
241
|
+
...(isolated ? { dir: cell.dir, name: cell.name, branch: cell.branch, baseRef: cell.baseRef } : {}),
|
|
242
|
+
...(source !== undefined ? { source } : {}),
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
return { allocationId: v.allocationId, sessionId: v.sessionId, declared, checkouts, ...(v.released === true ? { released: true } : {}) };
|
|
246
|
+
}
|
|
139
247
|
export const ANNOUNCED_LISTING_MAX_NAMES = 500;
|
|
140
248
|
export const ANNOUNCED_LISTING_MAX_NAME_CHARS = 200;
|
|
141
249
|
export const ANNOUNCED_MCP_ERROR_MAX_CHARS = 400;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SessionError, normalizeAnnouncedListing, normalizeReminderMark, normalizeGitAnnouncement, normalizeWorkspaceState, normalizeCompactionStateCarrier, isValidThinkingLevelChange, isValidModelChange, isOptionalDisplayString, } from "../harness/types.js";
|
|
1
|
+
import { SessionError, normalizeAnnouncedListing, normalizeReminderMark, normalizeGitAnnouncement, normalizeSessionCheckout, normalizeWorkspaceState, normalizeCompactionStateCarrier, isValidThinkingLevelChange, isValidModelChange, isOptionalDisplayString, } from "../harness/types.js";
|
|
2
2
|
import { leafIdAfterEntry } from "./storage-base.js";
|
|
3
3
|
import { parseSessionTimestampMs } from "./timestamps.js";
|
|
4
4
|
import { flattenableUserText, normalizeEngineSegments } from "../../core/untrusted-text.js";
|
|
@@ -81,6 +81,11 @@ export class StreamingImportValidator {
|
|
|
81
81
|
throw new SessionError("invalid_session", `workspace_state entry "${e.id}" is structurally invalid`);
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
+
else if (e.type === "session_checkout") {
|
|
85
|
+
if (normalizeSessionCheckout(e) === undefined) {
|
|
86
|
+
throw new SessionError("invalid_session", `session_checkout entry "${e.id}" is structurally invalid`);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
84
89
|
else if (e.type === "reminder_mark") {
|
|
85
90
|
if (normalizeReminderMark(e) === undefined) {
|
|
86
91
|
throw new SessionError("invalid_session", `reminder_mark entry "${e.id}" is structurally invalid`);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ImageContent, TextContent } from "../llm/index.js";
|
|
2
2
|
import type { AgentMessage } from "../loop/types.js";
|
|
3
|
-
import type { AnnouncedListingSnapshot, AnnouncedListingSnapshotInput, GitAnnouncementState, Session, SessionContext, SessionMetadata, SessionStorage, SessionTreeEntry, WorkspaceState } from "../harness/types.js";
|
|
3
|
+
import type { AnnouncedListingSnapshot, AnnouncedListingSnapshotInput, GitAnnouncementState, Session, SessionCheckoutRecord, SessionContext, SessionMetadata, SessionStorage, SessionTreeEntry, WorkspaceState } from "../harness/types.js";
|
|
4
4
|
import type { BuildContextOptions } from "../harness/types.js";
|
|
5
5
|
import type { PromptEpochDescriptor, StoredPromptEpoch } from "../../prompt-assembly/epoch.js";
|
|
6
6
|
/** Build model context from the active session branch and its latest state markers.
|
|
@@ -163,3 +163,32 @@ export declare class StoredSession<TMetadata extends SessionMetadata = SessionMe
|
|
|
163
163
|
* rule, both readers). Conservative on damage: an unresolvable firstKeptEntryId reads as invisible.
|
|
164
164
|
*/
|
|
165
165
|
export declare function gitFrameContextVisible(branch: SessionTreeEntry[], entryId: string): boolean;
|
|
166
|
+
/** What reading a session's checkout answered: none minted by this session, the one it minted (with `released` when it was
|
|
167
|
+
* released), or a log the reader cannot vouch for — NOT "none" (a checkout that cannot be read is one the session cannot use).
|
|
168
|
+
* `none` carries `window` when the storage was loaded from a bounded window (F3, `SessionStorage.getFloorId`): no record in the
|
|
169
|
+
* window, and one below `floor` is not ruled out. A consumer that would REMOVE something on "none" reads that as unreadable (the
|
|
170
|
+
* orphan doors do); a leg's open and the release read it as none. */
|
|
171
|
+
export type SessionCheckoutRead = {
|
|
172
|
+
readonly kind: "none";
|
|
173
|
+
readonly window?: {
|
|
174
|
+
readonly floor: string;
|
|
175
|
+
};
|
|
176
|
+
} | {
|
|
177
|
+
readonly kind: "record";
|
|
178
|
+
readonly record: SessionCheckoutRecord;
|
|
179
|
+
} | {
|
|
180
|
+
readonly kind: "unreadable";
|
|
181
|
+
readonly detail: string;
|
|
182
|
+
};
|
|
183
|
+
/**
|
|
184
|
+
* design/1456 R1′ (#2292): THE reader of a session's checkout. Scans the whole log (`findEntries`, never the branch: a rewind
|
|
185
|
+
* to before the allocation must not drop the tree) for `session_checkout` entries minted by THIS session (`sessionId`), so a
|
|
186
|
+
* fork's copied entries — the parent's — are not its own. Never best-effort: a store read that throws, an own entry that is not
|
|
187
|
+
* a structurally valid record, a second allocation, or a release that names another allocation answers `unreadable`.
|
|
188
|
+
*/
|
|
189
|
+
export declare function readSessionCheckout(session: Session, sessionId: string): Promise<SessionCheckoutRead>;
|
|
190
|
+
/** Append a session checkout entry (the allocation, or its one release), shape-gated by {@link normalizeSessionCheckout} and
|
|
191
|
+
* conditioned on a leaf like every typed append: `observedLeafId` (the leaf read BEFORE the caller judged the session had no
|
|
192
|
+
* allocation — so a writer that appended since, another leg allocating at the same time, makes this append fail instead of
|
|
193
|
+
* leaving two allocations), else the current one. */
|
|
194
|
+
export declare function appendSessionCheckout(session: Session, record: SessionCheckoutRecord, observedLeafId?: string | null): Promise<string>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { asAgentMessage, createCompactionSummaryMessage, createCustomMessage, } from "../harness/messages.js";
|
|
2
|
-
import { SessionError, isSyntheticApiErrorMessage, isValidModelChange, normalizeAnnouncedListing, normalizeCompactionStateCarrier, normalizeGitAnnouncement, normalizeReminderMark, normalizeWorkspaceState } from "../harness/types.js";
|
|
2
|
+
import { SessionError, isSyntheticApiErrorMessage, isValidModelChange, normalizeAnnouncedListing, normalizeCompactionStateCarrier, normalizeGitAnnouncement, normalizeReminderMark, normalizeSessionCheckout, normalizeWorkspaceState } from "../harness/types.js";
|
|
3
3
|
import { readStoredPromptEpoch } from "../../prompt-assembly/epoch.js";
|
|
4
4
|
import { budgetInvokedSkillsRetention, readElidedMessages, readRetainedInvokedSkills, readUnsummarizedMessages, renderInvokedSkillsRetention, } from "../compaction/utils.js";
|
|
5
|
+
import { thrownText } from "../../core/thrown-value.js";
|
|
5
6
|
const RETENTION_CLAMP_DEFAULT_CHARS_PER_TOKEN = 3;
|
|
6
7
|
const RETENTION_CLAMP_WINDOW_FRACTION = 0.5;
|
|
7
8
|
export function buildSessionContext(pathEntries, opts) {
|
|
@@ -395,3 +396,49 @@ export function gitFrameContextVisible(branch, entryId) {
|
|
|
395
396
|
const keptIdx = branch.findIndex((e) => e.id === firstKeptId);
|
|
396
397
|
return keptIdx !== -1 && frameIdx >= keptIdx;
|
|
397
398
|
}
|
|
399
|
+
export async function readSessionCheckout(session, sessionId) {
|
|
400
|
+
let entries;
|
|
401
|
+
let floor;
|
|
402
|
+
try {
|
|
403
|
+
const storage = session.getStorage();
|
|
404
|
+
entries = await storage.findEntries("session_checkout");
|
|
405
|
+
floor = storage.getFloorId?.() ?? null;
|
|
406
|
+
}
|
|
407
|
+
catch (err) {
|
|
408
|
+
return { kind: "unreadable", detail: `the session log could not be read (${thrownText(err)})` };
|
|
409
|
+
}
|
|
410
|
+
let allocation;
|
|
411
|
+
const releases = [];
|
|
412
|
+
for (const entry of entries) {
|
|
413
|
+
const shaped = normalizeSessionCheckout(entry);
|
|
414
|
+
if (shaped === undefined) {
|
|
415
|
+
const owner = entry.sessionId;
|
|
416
|
+
if (typeof owner === "string" && owner !== sessionId)
|
|
417
|
+
continue;
|
|
418
|
+
return { kind: "unreadable", detail: `session_checkout entry "${entry.id}" is not a valid checkout record` };
|
|
419
|
+
}
|
|
420
|
+
if (shaped.sessionId !== sessionId)
|
|
421
|
+
continue;
|
|
422
|
+
if (shaped.released === true)
|
|
423
|
+
releases.push(shaped);
|
|
424
|
+
else if (allocation !== undefined)
|
|
425
|
+
return { kind: "unreadable", detail: `the session holds two checkout allocations (${allocation.allocationId}, ${shaped.allocationId})` };
|
|
426
|
+
else
|
|
427
|
+
allocation = shaped;
|
|
428
|
+
}
|
|
429
|
+
if (allocation === undefined)
|
|
430
|
+
return releases.length === 0 ? { kind: "none", ...(floor !== null ? { window: { floor } } : {}) } : { kind: "unreadable", detail: "the session holds a checkout release with no allocation" };
|
|
431
|
+
if (releases.some((r) => r.allocationId !== allocation.allocationId))
|
|
432
|
+
return { kind: "unreadable", detail: "a checkout release names another allocation" };
|
|
433
|
+
return { kind: "record", record: releases.length > 0 ? { ...allocation, released: true } : allocation };
|
|
434
|
+
}
|
|
435
|
+
export async function appendSessionCheckout(session, record, observedLeafId) {
|
|
436
|
+
const shaped = normalizeSessionCheckout(record);
|
|
437
|
+
if (shaped === undefined)
|
|
438
|
+
throw new SessionError("invalid_entry", "appendSessionCheckout: the record is not a structurally valid session checkout");
|
|
439
|
+
const storage = session.getStorage();
|
|
440
|
+
const parentId = observedLeafId !== undefined ? observedLeafId : await storage.getLeafId();
|
|
441
|
+
const entry = { type: "session_checkout", id: await storage.createEntryId(), parentId, timestamp: new Date().toISOString(), ...shaped };
|
|
442
|
+
await storage.appendEntry(entry, { expectedLeafId: entry.parentId });
|
|
443
|
+
return entry.id;
|
|
444
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -90,7 +90,7 @@ export { createSessionRulePolicy } from "./core/runner/session-rule-policy.js";
|
|
|
90
90
|
export { LOCKED_KEY_REGISTRY, resolveLockedKeys, type LockedKey, type LockedConfig } from "./core/locked-config.js";
|
|
91
91
|
export { BUILTIN_COMPLIANCE_DENIES, COMPLIANCE_CAPABILITIES, WEB_FETCH_TOOL_NAME, complianceCallDenial, resolveComplianceDenies, type ComplianceCapability, type CompliancePosture, type ComplianceProfile, } from "./core/compliance.js";
|
|
92
92
|
export { admitMemoryScopes, foldAdmissionFreeze, type DeploymentMemoryScopeRequest, type OwnOrgAdmissionVerdict, type MemoryAdmissionInput, type MemoryAdmissionOutcome, type MemoryAdmissionVerdict, type MemoryScopeAdmission, type MemoryScopeAdmissionInput, type MemoryScopeOrigin, type MemoryScopeRequest, } from "./core/memory-admission.js";
|
|
93
|
-
export { assertRetentionCapability, readRetentionDeclaration, RETENTION_CASCADE_DOMAINS, RETENTION_CASCADE_EXEMPT, type ManagedRetentionCapability, type RetentionDeclaration, type RetentionDeclaring, type RetentionPolicy, type RetentionReceipt, } from "./core/retention.js";
|
|
93
|
+
export { assertRetentionCapability, readRetentionDeclaration, RETENTION_CASCADE, RETENTION_CASCADE_DOMAINS, RETENTION_CASCADE_EXEMPT, RETENTION_SESSION_TREE_STEPS, type ManagedRetentionCapability, type RetentionCascadeDomain, type RetentionCascadeLeg, type RetentionCascadeRow, type RetentionCascadeStores, type RetentionDeclaration, type RetentionDeclaring, type RetentionPolicy, type RetentionReceipt, } from "./core/retention.js";
|
|
94
94
|
export { GOVERNANCE_CODES, governanceRetryClass, TOOL_DECLARATION_CODES, type GovernanceCode, type GovernanceRetryClass, type ToolDeclarationCode } from "./core/governance-codes.js";
|
|
95
95
|
export { NOTICE_AUDIENCE, noticeAudienceOf, ENGINE_NOTICE_CODES, NOTICE_MINTER, type EngineNoticeCode, type NoticeAudience, type NoticeMinter } from "./core/governance-codes.js";
|
|
96
96
|
export { TtlSessionStore, type TtlSessionStoreOptions, type EvictPolicy } from "./core/session-store.js";
|
|
@@ -121,6 +121,7 @@ export { withRetry } from "./core/with-retry.js";
|
|
|
121
121
|
export type { RetryPolicy, RetryResult } from "./core/with-retry.js";
|
|
122
122
|
export type { RemoteExecutionEnv, WorkspaceHandle, SnapshotId, SessionToken, SandboxTier, OutputChunk, ExecStreamOptions, RemoteConnectConfig, VmLifecycleOptions, SecretRef, RemoteExecutionErrorCode, ExecutionEnvFactory, ExecutionEnvFactoryContext, PlacementTarget, } from "./core/remote-env.js";
|
|
123
123
|
export { addWorktree, pruneWorktrees, WORKTREE_PARENT, type AddWorktreeOptions } from "./core/git-worktree-env.js";
|
|
124
|
+
export { listOrphanSessionTrees, probeWorktreeCapability, releaseOrphanSessionTree, releaseSessionCheckout, WORKTREE_INCAPABLE_REASONS, type OrphanSessionTree, type ReleasedTree, type WorkspaceDeclaration, type WorkspaceSourceDeclaration, type WorktreeCapability, type WorktreeIncapableReason, } from "./core/session-checkout.js";
|
|
124
125
|
export { runExecGate } from "./core/exec-gate.js";
|
|
125
126
|
export type { ExecStep, ExecStepResult, ExecGateResult, ExecGateOptions } from "./core/exec-gate.js";
|
|
126
127
|
export { sanitizeUntrustedText, delimitUntrusted, inlineUntrusted, isMintableProbeReason } from "./core/untrusted-text.js";
|
|
@@ -238,12 +239,13 @@ export type { PermissionSeatInputs, PermissionSeatReading } from "./core/mode-po
|
|
|
238
239
|
export type { SkillGateSeats, SkillGrantHit, SkillGrantLane, SkillGrantOrigin, SkillGrantRecord } from "./core/skill-grant.js";
|
|
239
240
|
export { SKILL_GRANT_ORIGINS } from "./core/skill-grant.js";
|
|
240
241
|
export type { BoundSkillGrants } from "./core/skill-grant-binding.js";
|
|
241
|
-
export { ALLOW_ENTRY_INERT_REASONS, readRuleEntry, compileAllowList, renderListEntry, type RuleEntryReading, type AllowEntryInertReason, type AllowEntryInertDetail, type CompiledAllowEntry, type AllowEntryGateSeats, type AllowEntryLane, type AllowEntryHit, type AllowListEntry } from "./core/allow-entry.js";
|
|
242
|
+
export { ALLOW_ENTRY_INERT_REASONS, readRuleEntry, compileAllowList, renderListEntry, screenAllowedToolsValue, type RuleEntryReading, type AllowEntryInertReason, type AllowEntryInertDetail, type CompiledAllowEntry, type AllowEntryGateSeats, type AllowEntryLane, type AllowEntryHit, type AllowListEntry } from "./core/allow-entry.js";
|
|
242
243
|
export { ALLOW_RULE_MEMBERS, type AllowRuleMember, type AllowRuleShadow } from "./core/allow-rule-shadow.js";
|
|
243
244
|
export { mintNamespacePrefix } from "./core/protocol-naming.js";
|
|
244
245
|
export { readDenyClassifierRules, renderClassifierDenyRules, type DerivedDenyRule } from "./core/auto-mode-prompt.js";
|
|
245
246
|
export { AUTO_MODE_DENY_SOURCES, isAutoModeDenySource, type AutoModeDenySource } from "./core/runtime-caps.js";
|
|
246
247
|
export { SETTLEMENT_KINDS, type SettlementKind, isSettlementKind, type Settlement, SETTLEMENT_PARTIES, type SettlementParty, isSettlementParty, HOST_DECIDERS, type HostDecider, type HostDecisionFacts, isHostDecider, DECIDED_VIA, type DecidedVia, SETTLEMENT_IS_REFUSAL, DENIED_BY_VALUES, type DeniedBy, isDeniedBy, DENIED_BY_MAY_VETO, CLASSIFIER_DENY_CAUSES, type ClassifierDenyCause, isClassifierDenyCause, DENIED_BY_MAY_CARRY_CAUSE, type GateDisposition, type GateOutcome, type ModeRelease, type ModeRefusal, screenGateOutcome, RETIRED_MEMBERS, isRetiredMember } from "./core/gate-outcome.js";
|
|
248
|
+
export { REFUSAL_ECHO_KINDS, type RefusalEchoKind, isRefusalEchoKind, type RefusalEcho } from "./core/refusal-echo.js";
|
|
247
249
|
export { ENGINE_BUILTIN_TOOL_NAMES, isEngineBuiltinToolName } from "./core/tool-catalog-entries.js";
|
|
248
250
|
export { policyCannotAnswer, type HeldQuestion } from "./core/real-approval.js";
|
|
249
251
|
export { type AskCarry } from "./core/hooks.js";
|
|
@@ -276,7 +278,7 @@ export { createPermissionRulePolicy, validatePermissionRules, parsePermissionRul
|
|
|
276
278
|
* allowed and widening is not.
|
|
277
279
|
*/
|
|
278
280
|
export { RULE_BEHAVIORS, RULE_BEHAVIOR_PRECEDENCE, RULE_BEHAVIORS_BY_PRECEDENCE, isRuleBehavior, readRowBehavior, adjudicatePersistedRules, adjudicatePersistedPathRules, adjudicatePersistedToolRules, ruleReachesProgramRun, programRunReachOf, PROGRAM_RUN_REACHES, type ProgramRunReachOutcome, pathRuleReachOf, ruleBasesNeeded, PATH_RULE_BASES, PATH_RULE_BASE_LABEL, ruleToolGrammarOf, COMMAND_RULE_TOOL, READ_RULE_TOOL, type PathRuleBase, type PathRuleBases, type RuleBehavior, type PersistedRuleVerdict, parseRuleText, formatRuleText, ruleAdmitsCommand, findAdmittingRule, suggestRulesForCommand, scopeCoversCwd, pathWithinRoot, isRuleLive, renderUntrustedCommandText, stripFormatCharacters, UNCOVERED_SEGMENT_REASON_BASELINE, RULE_OFFERS_ABSENCE_BASELINE, type UncoveredSegmentDetail, PERSISTED_RULE_MATCHES, RULE_OFFER_KINDS, RULE_OFFER_BATCH_MEMBER_KINDS, UNCOVERED_SEGMENT_REASONS, EDITED_RULE_BREADTH_WARNING_CODES, RULE_ADD_ORIGINS, type EditedRuleBreadthWarning, directoryRuleAdmits, BARE_INTERPRETER_NAMES, MAX_RULE_TEXT_CHARS, type PersistedRule, type RuleTombstone, type RuleScope, type RuleDot, type RuleAdd, type RuleAddOrigin, type RuleOffer, type RuleOfferBatchMember, type SegmentRuleSuggestion, type SegmentCoverage, type RuleReject, type RuleRejectCode, type ParsedRule, type PersistedRuleTool, type PersistedRuleMatch, } from "./core/permission-rule-model.js";
|
|
279
|
-
export { removePersistedRule, addPersistedRule, applyTombstones, sameScope, sameRuleIdentity, isValidConsentScope, isValidDurableScope, InMemoryDurableRulePartition, EMPTY_DURABLE_RULE_PARTITION, type DurableRulePartition, type DurableRulePartitionProvider, type RuleWriteOutcome, type StoredRules, type RemoveResult, type AddResult, type PutResult, joinRuleStates, applySyncJoin, type RuleSyncJoinBase, screenRuleSyncState, collectBelowFrontier, ruleSyncVector, joinFrontiers, dotAtOrBelowFrontier, type RuleSyncState, type RuleSyncFrontier, type RuleSyncDrop, type RuleSyncLandingReport, type QuarantinedRuleAdd, PERMISSION_RULE_WRITER, writerOf, foldDelta, addDotsOf, assertDeleteDeltaCarriesNoAdd, assertRedemptionNotQuarantined, assertWriteDeltaScopeDurable, PERMISSION_RULES_LATER_GRAMMAR_CODE, type PermissionRuleWriter, type WritableDurableRulePartition, type RuleWriteDelta, type RuleAddDelta, type RuleTightenAddDelta, type RuleDeleteDelta, type RuleSyncJoinDelta, type RawRuleSyncState, type RedemptionAuthorization, } from "./core/permission-rule-store.js";
|
|
281
|
+
export { removePersistedRule, addPersistedRule, applyTombstones, sameScope, sameRuleIdentity, isValidConsentScope, isValidDurableScope, InMemoryDurableRulePartition, EMPTY_DURABLE_RULE_PARTITION, type DurableRulePartition, type DurableRulePartitionProvider, type RuleWriteOutcome, type StoredRules, type RemoveResult, type AddResult, type PutResult, joinRuleStates, applySyncJoin, type RuleSyncJoinBase, screenRuleSyncState, collectBelowFrontier, ruleSyncVector, joinFrontiers, dotAtOrBelowFrontier, type RuleSyncState, type RuleSyncFrontier, type RuleSyncDrop, type RuleSyncLandingReport, type QuarantinedRuleAdd, PERMISSION_RULE_WRITER, writerOf, foldDelta, addDotsOf, assertDeleteDeltaCarriesNoAdd, assertRedemptionNotQuarantined, assertWriteDeltaScopeDurable, PERMISSION_RULES_LATER_GRAMMAR_CODE, PERMISSION_RULES_DAMAGED_BUCKET_CODE, PERMISSION_RULES_UNREADABLE_BUCKET_CODE, type PermissionRuleWriter, type WritableDurableRulePartition, type RuleWriteDelta, type RuleAddDelta, type RuleTightenAddDelta, type RuleDeleteDelta, type RuleSyncJoinDelta, type RawRuleSyncState, type RedemptionAuthorization, } from "./core/permission-rule-store.js";
|
|
280
282
|
export { readRuleOwner, sameRuleOwner, type RuleOwner, RULE_OWNER_KINDS, } from "./core/rule-owner.js";
|
|
281
283
|
export { principalNameOf } from "./core/principal-name.js";
|
|
282
284
|
export { syncPermissionRules, parseRuleSyncResponse, PERMISSION_RULE_SYNC_PATH, LOCAL_OWNER_UNSYNCABLE_CODE, type PermissionRuleSyncTransport, type PermissionRuleSyncResult, type RuleSyncRequestBody, type RuleSyncResponseBody, } from "./core/permission-rule-sync.js";
|
|
@@ -297,20 +299,22 @@ export type { ClassicEventMap, ClassicEventName, ObservedAnswer, EngineModRegist
|
|
|
297
299
|
export { KERNEL_CONTRACT_VERSION, MOD_TIERS, MOD_SEATS, MOD_EVENT_SIDES, MOD_EVENT_TABLE, MODS_INVALID_CODE, MODS_REGISTRATION_REFUSED_CODE, type ModTier, type ModRegistrationTier, type ModSeat, type ModEventSide, type ModEventName, type ModEventRow, type ModStation, type ModRegistration, type ModUses, type On, type ModHandler, type ModHandlerOptions, type ModNext, type ModOrigin, type ModTraceEntry, type ModCaughtError, type ModDollarBase, type ModEventPayload, type ModMatcher, type ModAdmissionRecord, } from "./core/mods/kernel/index.js";
|
|
298
300
|
export type { AgentSpawnAnswer, EngineDollar, ModelCompleteBlock, SessionAppendAnswer, SessionCompactAnswer, SessionSendAnswer, SessionUsage, SessionVersion, ToolCallAnswer } from "./core/mods/dollar.js";
|
|
299
301
|
export type { ContextOccupancy } from "./core/mods/lifecycle-stations.js";
|
|
300
|
-
export { admitModChain } from "./core/mods/stations.js";
|
|
302
|
+
export { admitModChain, promptScreenDeclaredBy } from "./core/mods/stations.js";
|
|
301
303
|
export { SESSION_APPEND_DOORS, SESSION_APPEND_ORIGIN_KINDS, type SessionAppendDoor, type SessionAppendOrigin } from "./core/mods/session-append.js";
|
|
302
304
|
export { SESSION_RECEIVE_ORIGIN_KINDS, type SessionReceiveOrigin } from "./core/mods/session-receive.js";
|
|
303
305
|
export { SESSION_SEND_ORIGIN_KINDS, type SessionSendOrigin } from "./core/mods/session-send.js";
|
|
304
306
|
export { loadModPackage, type ModPackageHost, type ModPackageRegistration } from "./core/mods/package.js";
|
|
305
307
|
export { CREDENTIAL_REF_KINDS, CREDENTIAL_REF_TRUST, CREDENTIAL_REF_TEXT_MAX, CREDENTIAL_REF_MAP_MAX, CREDENTIAL_REF_PROBLEM_REASONS, readCredentialRef, type CredentialRef, type CredentialRefKind, type CredentialRefRequestAdmission, type CredentialRefProblem, type CredentialRefProblemReason, type CredentialRefReading, } from "@sema-agent/primitives";
|
|
306
308
|
export { InMemoryMemoryStore, composeMemoryBlock, composeLayeredMemoryBlock, normalizeMemorySpec, type NormalizedMemorySpec, type MemorySpecInput, supportsConsolidation, supportsPeriodicConsolidation, firstSentence, expandLexicalTerms, lexicalSearchMatch, type Embedder, classifyPromotable, enforcePromotableWriteGate, guardedMemoryStore, MemoryGateError, MemoryProjectionError, detectSecret, enforceSecretWriteGate, enforceStructuredNoteSecretGate, type UtilityGate, type MemoryVectorMode, type ScoredMemory, type MemoryNoteHeader, type MemoryNoteRecord, type MemoryNoteType, type StructuredNoteInput, MEMORY_PROJECT_KEY_ABSENT_REASONS, type MemoryProjectKeyAbsentReason, type MemoryProjectKey, } from "./core/memory.js";
|
|
307
|
-
export { MemoryEngine, FileMemoryEngineBackend, memoryBackendContract, assertMemoryBackendSearchEquivalence, type MemoryBackendContractHooks, buildMemoryInstruction, writableRootOf, truncateIndex, scanEntryFiles, deriveRepoKey, deriveRepoMemoryDir, deriveControlPlaneDir, deriveRepoControlPlaneDir, resolveMemoryEngineRoot, scopeDirName, ControlPlaneCorruptError, parseEntryFile, serializeEntryFile, computeEntryRev, entryFromFile, MEMORY_ORIGIN_CAUSES, committedOriginOf, originEquals, consolidationExposedFrontmatter, ambiguousOriginRepresentation, type OriginClearanceRow, type OriginClearanceEvent, type OriginClearanceShadow, committedDistilledOf, distilledEquals, type MemoryEntryDistilled, type MemoryEntryDistilledInput, CONSOLIDATION_DEFAULTS, ConsolidationRefusedError, MEMORY_SEARCH_SUPERSEDED_TAG, consolidationTypeEligible, deriveSupersededSet, memorySupersededNote,
|
|
309
|
+
export { MemoryEngine, FileMemoryEngineBackend, readMemoryLedgerForm, memoryBackendContract, assertMemoryBackendSearchEquivalence, type MemoryBackendContractHooks, memoryGovernanceStoreContract, type MemoryGovernanceStoreContractHooks, buildMemoryInstruction, writableRootOf, truncateIndex, scanEntryFiles, deriveRepoKey, deriveRepoMemoryDir, deriveControlPlaneDir, deriveRepoControlPlaneDir, resolveMemoryEngineRoot, scopeDirName, ControlPlaneCorruptError, parseEntryFile, serializeEntryFile, computeEntryRev, entryFromFile, MEMORY_ORIGIN_CAUSES, committedOriginOf, originEquals, consolidationExposedFrontmatter, ambiguousOriginRepresentation, type OriginClearanceRow, type OriginClearanceEvent, type OriginClearanceShadow, committedDistilledOf, distilledEquals, type MemoryEntryDistilled, type MemoryEntryDistilledInput, CONSOLIDATION_DEFAULTS, ConsolidationRefusedError, MEMORY_SEARCH_SUPERSEDED_TAG, consolidationTypeEligible, deriveSupersededSet, memorySupersededNote, supersessionFuseCeiling, DELETION_FUSE_FLOOR, fileGovernanceStore, memoryGovernanceDurability, type MemoryGovernanceDurability, deriveShadowedSet, memoryConsolidationRecommendedNotice, memoryConsolidationCommittedNotice, memoryConsolidationConflictNotice, memoryConsolidationIncompleteNotice, memoryConsolidationRefusedNotice, memoryConsolidationWithheldNotice, type ConsolidationGateRead, type ConsolidationGateRow, type ConsolidationIntent, type ConsolidationIntentCredentialRow, type ConsolidationLeaseSeat, type ConsolidationProductProposal, type ConsolidationProposal, type ConsolidationWriteGate, type MemoryConsolidationOptions, type ConsolidationCommitReceipt, type ConsolidationReconcileReport, type ConsolidationResolveReceipt, type ConsolidationPlanSummary, type ConsolidationPlanFoldEvidence, type SessionMemoryStatus, DISTILLER_DEFAULT_MAX_INPUTS_PER_PRODUCT, LLM_DISTILLER_CONTRACT, LLM_DISTILLER_CONTRACT_DL2, LLM_DISTILLER_CONTRACT_DL3, LLM_DISTILLER_CONTRACTS, MEMORY_DISTILLER_CONTRACT_V1, contractGroupingDiff, driveConsolidationToFixpoint, isAliasModelId, llmPlanDistiller, mintExposurePartitionedPlan, mintLlmConsolidationPlan, MEMORY_DISTILLER_PURITY_CONTRACT_V1, detectCleanArmVerbatimLeak, type CleanArmLeakFinding, type CleanArmLeakVerdict, type MemoryDistillerPurityContract, openAiCompatChatSeat, parseJsonAnswer, planParseRepairs, sanitizeLlmGroups, scheduleUnderFuse, type ConsolidationDistillFn, type ConsolidationDriveCycleRow, type ConsolidationDriveEngine, type ConsolidationDriveResult, type ConsolidationFoldState, type DistillerCandidate, type DistillerChatAnswer, type DistillerChatFn, type DistillerChatRequest, type FuseSchedule, type LlmConsolidationPlan, type LlmConsolidationPlanArm, type LlmConsolidationPlanProduct, type LlmDistillerContract, type MintLlmConsolidationPlanResult, type PlanParseRepairs, type SanitizedLlmGroups, CONSOLIDATION_RUN_STOP_REASONS, CONSOLIDATION_WRITE_REFUSED_CODE, runMemoryConsolidationDriver, type ConsolidationDriverEngine, type ConsolidationDriverRunRow, type ConsolidationRunReceipt, type ConsolidationRunStopReason, type ConsolidationWriteJudge, type ConsolidationWriteTarget, type RunMemoryConsolidationOptions, isInstructionEntry, type MemoryEntryOrigin, type MemoryOriginCause, MEMORY_INSTRUCTION_TEMPLATE, MEMORY_RECALL_DISCIPLINE, MEMORY_PREFERENCE_DISCIPLINE, MEMORY_READONLY_NOTICE, MEMORY_CAPTURE_OPTOUT_NOTICE, memoryCaptureOptedOutNotice, memoryCaptureOptOutUnpersistedNotice, SESSION_CAPTURE_OPTOUT_DIR, markSessionCaptureOptOut, readSessionCaptureOptOut, listSessionCaptureOptOut, fileSessionCaptureRecordStore, type SessionCaptureOptOutRecord, type SessionCaptureOptOutMarkOutcome, type SessionCaptureRecordStore, readV2HeaderHints, type V2HeaderHints, LINEAGE_FILE, CHALLENGES_FILE, CHALLENGED_HISTORY_FILE, CHALLENGE_LEDGER_MAX_EVENTS, rebuildStrictControlPlaneLedger, type ControlPlaneRebuildReceipt, type StrictControlPlaneLedger, type ChallengeAssignment, type ChallengeEvent, type ChallengedHistoryRow, type LineagePendingTxn, type LineagePromotion, MEMORY_INDEX_FILENAME, MEMORY_INDEX_MAX_LINES, MEMORY_INDEX_MAX_BYTES, MEMORY_SEARCH_TOOL_NAME, MEMORY_GET_TOOL_NAME, MEMORY_INDEX_TOOL_NAME, MEMORY_ENGINE_TOOL_NAMES, type MemorySearchDetails, type MemorySearchHit, type CleanMemorySearchHit, type ExposedMemorySearchHit, MEMORY_EXPOSURE_BANNER, MEMORY_EXPOSURE_HANDLE_TAG, memoryExposureIndexRow, type MemoryGetDetails, type MemoryIndexDetails, type MemoryIndexRow, type CleanMemoryIndexRow, type ExposedMemoryIndexRow, STUB_ARCHIVED_LINE, DEFAULT_MAX_MEMORY_FILES, DEFAULT_MAX_ENTRY_DEPTH, DEFAULT_HARVEST_DEADLINE_MS, DEFAULT_HARVEST_FILE_BUDGET, MASS_DELETION_FUSE_RATIO, scanMemoryWrite, scanMemoryFileName, scanRemediation, MEMORY_FILENAME_SEGMENT_RE, renderAnnouncements, enqueueMemoryAnnouncement, drainMemoryAnnouncements, peekMemoryAnnouncements, bumpScanFuse, scanFuseCount, clearScanFuse, ANNOUNCEMENTS_FILE, MEMORY_ANNOUNCEMENTS_MAX, SCAN_FUSE_FILE, SCAN_FUSE_THRESHOLD, type MemoryAnnouncement, type ScanFinding, type MemoryEngineOptions, type MemoryInjection, type EntryProvenanceAccount, type TransferEvidence, type CommittedBinding, type CommittedEntrySnapshot, type CommittedScopeSnapshots, type EntryCustodyReport, erasureSelectHash, type EraseMemoryEntriesInput, type ErasureCarrierAnswer, type ErasureCarrierClass, type ErasureCountAnswer, type ErasureSelect, type ErasedBinding, type MemoryErasureAttestation, computeMemoryBundleHash, type MemoryExportBundle, type MemoryImportReport, type MemoryExportSnapshot, type MemoryBundleImportPlan, type BundleChallengeRow, type BundleLineageRow, type BundlePollutedSession, type MemoryBackend, type MemoryGovernanceStore, MEMORY_GOVERNANCE_DOC_NAMES, type MemoryGovernanceDocName, MEMORY_CONTROL_OBJECT_KINDS, type MemoryControlObjectKind, adoptReplicaControlPlane, replicaControlPlaneStrays, type ControlPlaneAdoptionReport, type ReplicaControlPlaneStrays, type MemoryGovernanceDocs, type ConsolidationTx, type MemoryEntry, type MemoryEntryFrontmatter, type MemoryEntryHeader, type MemoryScopeEnumeration, type ScoredMemoryEntry, type NotePatch, type PatchReport, type MaterializedFile, type MemorySessionHandle, type HarvestReport, type HarvestRejection, type HarvestRejectionCode, type ParsedEntryFile, type ScannedEntryFile, SCOPE_SEGMENT_MAX_ENCODED, PROJECT_MARKER_PATH, encodeScopeSegment, decodeScopeSegment, parseScopeKey, formatUserScope, formatUserLocalScope, formatOrgScope, formatProjScope, formatUserProjScope, isPersonalScope, isReplicableScope, isOrgScopeKey, assertScopeContractPlacement, formatProjectMarker, parseProjectMarker, resolveProjectId, PROJECT_ID_REGEX, type ParsedScopeKey, migrateScope, type MigrateScopeReport, materializeEntriesToFiles, harvestFilesToPatches, projectionsToWriteBack, screenInboundEntries, REMOTE_HARVEST_PER_FILE_BYTES, REMOTE_MASS_DELETION_FUSE_RATIO, type RemoteMemoryFile, type RemoteMemoryBaseline, type RemoteMaterialization, type RemoteHarvestResult, type InboundEntryFinding, deriveProjectMemoryDir, deriveProjectControlDir, recordProjectIdHint, lookupProjectIdHint, PROJECT_ID_HINTS_FILE, reconcileMemoryEntries, nextSyncBaseline, mergeRecallHits, type MemorySyncCursor, type MemorySyncConflict, type MemorySyncPlan, type RecallSource, syncMemoryScope, memorySyncStoreOf, carriesCredential, type MemorySyncTransport, type MemorySyncRequestBody, type MemorySyncResponseBody, type MemorySyncClientConflict, type SyncMemoryScopeOptions, type MemorySyncClientResult, memorySyncReportOf, memoryTravelGapOf, type MemorySyncLayerReport, type MemorySyncRoundReport, } from "./core/memory-engine/index.js";
|
|
308
310
|
export { createConsolidationWriteJudge, deliverWriteRefusal, type ConsolidationWriteJudgeInput } from "./core/runner/memory-consolidation-write-judge.js";
|
|
309
311
|
export { STORE_FORM_REFUSAL_CODES, TARGET_OUTSIDE_STORE, SCOPE_HOME_NOT_DIRECTORY, SCOPE_HOME_FORMS, type StoreFormRefusalCode, type StoreFormRefusalDetail, type StoreFormRefusal, type ScopeHomeForm } from "./core/memory-engine/layout.js";
|
|
310
312
|
export { resolveMemoryScopeStore, type MemoryScopeStore, type MemoryScopeStoreInput } from "./core/memory-engine/dual-root.js";
|
|
311
|
-
export { classifyScopePlanes, scopePlanesOf, type ScopePlanes } from "./core/memory-engine/dual-root.js";
|
|
313
|
+
export { classifyScopePlanes, memoryScopePlaneOf, scopePlanesOf, type ScopePlanes } from "./core/memory-engine/dual-root.js";
|
|
312
314
|
export { createMemoryDeployment, type MemoryDeployment, type MemoryDeploymentInput, type MemoryDeploymentStore, type DeploymentSessionMemoryStatus, } from "./core/memory-engine/memory-deployment.js";
|
|
313
315
|
export { reanchorMemoryStoreRoot, type StoreRootReanchor } from "./core/memory-engine/layout.js";
|
|
316
|
+
export { admittingLandings, cutPerLanding, LandingsNeedAdmission, MAX_LANDING_ADMISSION_ROUNDS, requireLandingsAdmitted, type AdmitLandings, type LandingCut, type PatchLanding, type PatchShare, } from "./core/memory-engine/landing-admission.js";
|
|
317
|
+
export { NON_GOVERNANCE_MEMORY_CODES } from "./core/governance-codes.js";
|
|
314
318
|
export { SHARED_MEMORY_READ_CAP_BYTES, SHARED_MEMORY_LIST_PAGE_SIZE, SharedMemoryStoreError, type SharedMemoryStoreProvider, type SharedMemoryStoreReader, type SharedMemoryPagedList, type SharedMemoryStoreInfo, type SharedMemoryDocumentEntry, type SharedMemorySnapshot, type SharedMemoryRequestContext, type MemoryListDetails, type MemoryReadDetails, } from "./core/shared-memory/types.js";
|
|
315
319
|
export { isSharedMemoryDocumentPath, isSharedMemoryStoreId } from "./core/shared-memory/normalize.js";
|
|
316
320
|
export { sharedMemoryStoreContract, type SharedMemoryFixture, type SharedMemoryStoreContractHooks, } from "./core/shared-memory/contract.js";
|
|
@@ -318,6 +322,7 @@ export { termSet, jaccardDistance, cosineDistance } from "./core/memory-vector.j
|
|
|
318
322
|
export { encodeSurfacedKey, buildManifestText, validateSelectedIds, composeSelectiveBody, formatMemoryAge, resolveLinkedIds, RECALL_CAVEAT, DEFAULT_MAX_SELECTED, DEFAULT_MAX_LINKED, type MemorySelector, type MemorySelectRequest, type SelectiveRecallOptions, type SelectiveRecallResult, type LayeredRecallOptions, type LayeredRecallResult, } from "./core/memory-recall.js";
|
|
319
323
|
export { resolveMemoryConsolidationDriver, autoRunOnRecommendationEffective, // the ONE arming reading (`memory.auto_consolidation.arming_has_one_resolver`) — the seat's absence is not "off"
|
|
320
324
|
type MemoryConsolidationDriverDeps, } from "./core/runner/memory-consolidation-driver.js";
|
|
325
|
+
export { ROLE_RESOLUTION_TABLE, modelFaceResolvable, type ModelFace, type ModelFaceOptions, type ModelFaceTask, type ModelFaceVerdict, type RoleResolutionAbsence, type RoleResolutionRow, type RoleResolutionWhen, } from "./core/runner/role-resolution-table.js";
|
|
321
326
|
export { teardownLegBudget } from "./core/runner/teardown-bounded.js";
|
|
322
327
|
export { DEFAULT_COMPACTION_INSTRUCTIONS } from "./core/auto-compaction.js";
|
|
323
328
|
export { DEFAULT_SYSTEM_PROMPT, CODE_AGENT_PROMPT, SUBAGENT_PROMPT, MEMORY_SAFETY, MEMORY_HYGIENE, OUTPUT_EFFICIENCY, CYBER_RISK, HARNESS_SECTION_ANCHOR, URL_SAFETY, SUMMARIZE_TOOL_RESULTS, EXECUTION_ENVIRONMENT, EXECUTION_ENVIRONMENT_OPEN_READS, executionEnvironmentBlockFor, buildEnvironmentContext, buildGitSnapshot, buildScratchpadSection, GIT_STATUS_MAX_CHARS, formatLocalDate, type EnvironmentFacts, type PromptBlock, } from "./prompts/default.js";
|
|
@@ -383,7 +388,7 @@ export { readAgentState, agentStateSourceOfRecord, agentStateSummary, type Agent
|
|
|
383
388
|
export type { TranscriptStep } from "./agents/subagent-steps.js";
|
|
384
389
|
export type { UnifiedTaskResult } from "./core/task-registry-shared.js";
|
|
385
390
|
export { TASK_OUTPUT_REPLAY_KINDS, type TaskOutputReplay } from "./core/task-registry-shared.js";
|
|
386
|
-
export { REMOVAL_LIVENESS_WORDS, type RemovalLiveness, RULE_WRITE_COMMITTED_WORDS, type RuleWriteCommitted } from "./core/permission-rule-store.js";
|
|
391
|
+
export { REMOVAL_LIVENESS_WORDS, type RemovalLiveness, RULE_REFUSAL_CODES, type RuleRefusalCode, RULE_WRITE_COMMITTED_WORDS, type RuleWriteCommitted } from "./core/permission-rule-store.js";
|
|
387
392
|
export { normalizeReadRootCandidate, READ_ROOT_CANDIDATE_DIR_MAX } from "./core/read-root-candidate.js";
|
|
388
393
|
export { FileBackgroundAgentStore, type FileBackgroundAgentStoreOptions } from "./stores/file/background-agent-store.js";
|
|
389
394
|
export { A2A_TASK_STATES, type A2ATaskState, type A2ATaskStateReversal, type A2ATaskStateReversalFaithful, type A2ATaskStateReversalLossy, toA2ATaskState, fromA2ATaskState, } from "./core/a2a-task-state.js";
|
package/dist/index.js
CHANGED
|
@@ -75,7 +75,7 @@ export { createSessionRulePolicy } from "./core/runner/session-rule-policy.js";
|
|
|
75
75
|
export { LOCKED_KEY_REGISTRY, resolveLockedKeys } from "./core/locked-config.js";
|
|
76
76
|
export { BUILTIN_COMPLIANCE_DENIES, COMPLIANCE_CAPABILITIES, WEB_FETCH_TOOL_NAME, complianceCallDenial, resolveComplianceDenies, } from "./core/compliance.js";
|
|
77
77
|
export { admitMemoryScopes, foldAdmissionFreeze, } from "./core/memory-admission.js";
|
|
78
|
-
export { assertRetentionCapability, readRetentionDeclaration, RETENTION_CASCADE_DOMAINS, RETENTION_CASCADE_EXEMPT, } from "./core/retention.js";
|
|
78
|
+
export { assertRetentionCapability, readRetentionDeclaration, RETENTION_CASCADE, RETENTION_CASCADE_DOMAINS, RETENTION_CASCADE_EXEMPT, RETENTION_SESSION_TREE_STEPS, } from "./core/retention.js";
|
|
79
79
|
export { GOVERNANCE_CODES, governanceRetryClass, TOOL_DECLARATION_CODES } from "./core/governance-codes.js";
|
|
80
80
|
export { NOTICE_AUDIENCE, noticeAudienceOf, ENGINE_NOTICE_CODES, NOTICE_MINTER } from "./core/governance-codes.js";
|
|
81
81
|
export { TtlSessionStore } from "./core/session-store.js";
|
|
@@ -98,6 +98,7 @@ export { confineShellStart } from "./core/shell-confinement.js";
|
|
|
98
98
|
export { RemoteExecutionError, hasDestroy, isRemoteExecutionEnv, isSuspendable, isIsolated, canonicalPathIsAuthoritative, pathsAreHostLocal, keepsReadFloor, missingRestoreSurface, isRetryableRemoteErrorCode, RETRYABLE_REMOTE_ERROR_CODES, } from "./core/remote-env.js";
|
|
99
99
|
export { withRetry } from "./core/with-retry.js";
|
|
100
100
|
export { addWorktree, pruneWorktrees, WORKTREE_PARENT } from "./core/git-worktree-env.js";
|
|
101
|
+
export { listOrphanSessionTrees, probeWorktreeCapability, releaseOrphanSessionTree, releaseSessionCheckout, WORKTREE_INCAPABLE_REASONS, } from "./core/session-checkout.js";
|
|
101
102
|
export { runExecGate } from "./core/exec-gate.js";
|
|
102
103
|
export { sanitizeUntrustedText, delimitUntrusted, inlineUntrusted, isMintableProbeReason } from "./core/untrusted-text.js";
|
|
103
104
|
export { mintReminderMark, isValidReminderMark, openSystemReminder, mintSystemReminder, reminderMarkDeclaration } from "./core/reminder-mint.js";
|
|
@@ -187,12 +188,13 @@ export { PERMISSION_MODES, isPermissionMode, PERMISSION_MODE_RANK, clampPermissi
|
|
|
187
188
|
export { CROSS_BOUNDARY_TAINT_BITS, CROSS_BOUNDARY_POSTURES, BOUNDARY_LEGS, crossBoundaryObligation, CROSS_BOUNDARY_RECORD_TYPE, readCrossBoundaryRecord } from "./core/cross-boundary-taint.js";
|
|
188
189
|
export { modePolicyOf, PERMISSION_MODE_FOLD_REASONS, ACCEPT_EDITS_FILE_COMMANDS, modeAcceptsFileCommand } from "./core/mode-policy.js";
|
|
189
190
|
export { SKILL_GRANT_ORIGINS } from "./core/skill-grant.js";
|
|
190
|
-
export { ALLOW_ENTRY_INERT_REASONS, readRuleEntry, compileAllowList, renderListEntry } from "./core/allow-entry.js";
|
|
191
|
+
export { ALLOW_ENTRY_INERT_REASONS, readRuleEntry, compileAllowList, renderListEntry, screenAllowedToolsValue } from "./core/allow-entry.js";
|
|
191
192
|
export { ALLOW_RULE_MEMBERS } from "./core/allow-rule-shadow.js";
|
|
192
193
|
export { mintNamespacePrefix } from "./core/protocol-naming.js";
|
|
193
194
|
export { readDenyClassifierRules, renderClassifierDenyRules } from "./core/auto-mode-prompt.js";
|
|
194
195
|
export { AUTO_MODE_DENY_SOURCES, isAutoModeDenySource } from "./core/runtime-caps.js";
|
|
195
196
|
export { SETTLEMENT_KINDS, isSettlementKind, SETTLEMENT_PARTIES, isSettlementParty, HOST_DECIDERS, isHostDecider, DECIDED_VIA, SETTLEMENT_IS_REFUSAL, DENIED_BY_VALUES, isDeniedBy, DENIED_BY_MAY_VETO, CLASSIFIER_DENY_CAUSES, isClassifierDenyCause, DENIED_BY_MAY_CARRY_CAUSE, screenGateOutcome, RETIRED_MEMBERS, isRetiredMember } from "./core/gate-outcome.js";
|
|
197
|
+
export { REFUSAL_ECHO_KINDS, isRefusalEchoKind } from "./core/refusal-echo.js";
|
|
196
198
|
export { ENGINE_BUILTIN_TOOL_NAMES, isEngineBuiltinToolName } from "./core/tool-catalog-entries.js";
|
|
197
199
|
export { policyCannotAnswer } from "./core/real-approval.js";
|
|
198
200
|
export {} from "./core/hooks.js";
|
|
@@ -207,7 +209,7 @@ export { AUTO_MODE_ARMING_RECIPE_VERSION, autoModeArmingRecipeOf, sanitizeAutoMo
|
|
|
207
209
|
export { rebuildAutoModeDecider, } from "./core/auto-mode-rebuild.js";
|
|
208
210
|
export { createPermissionRulePolicy, validatePermissionRules, parsePermissionRule, wildcardMatch, isCoveringRuleName, ruleNameCovers, } from "./core/permission-rules.js";
|
|
209
211
|
export { RULE_BEHAVIORS, RULE_BEHAVIOR_PRECEDENCE, RULE_BEHAVIORS_BY_PRECEDENCE, isRuleBehavior, readRowBehavior, adjudicatePersistedRules, adjudicatePersistedPathRules, adjudicatePersistedToolRules, ruleReachesProgramRun, programRunReachOf, PROGRAM_RUN_REACHES, pathRuleReachOf, ruleBasesNeeded, PATH_RULE_BASES, PATH_RULE_BASE_LABEL, ruleToolGrammarOf, COMMAND_RULE_TOOL, READ_RULE_TOOL, parseRuleText, formatRuleText, ruleAdmitsCommand, findAdmittingRule, suggestRulesForCommand, scopeCoversCwd, pathWithinRoot, isRuleLive, renderUntrustedCommandText, stripFormatCharacters, UNCOVERED_SEGMENT_REASON_BASELINE, RULE_OFFERS_ABSENCE_BASELINE, PERSISTED_RULE_MATCHES, RULE_OFFER_KINDS, RULE_OFFER_BATCH_MEMBER_KINDS, UNCOVERED_SEGMENT_REASONS, EDITED_RULE_BREADTH_WARNING_CODES, RULE_ADD_ORIGINS, directoryRuleAdmits, BARE_INTERPRETER_NAMES, MAX_RULE_TEXT_CHARS, } from "./core/permission-rule-model.js";
|
|
210
|
-
export { removePersistedRule, addPersistedRule, applyTombstones, sameScope, sameRuleIdentity, isValidConsentScope, isValidDurableScope, InMemoryDurableRulePartition, EMPTY_DURABLE_RULE_PARTITION, joinRuleStates, applySyncJoin, screenRuleSyncState, collectBelowFrontier, ruleSyncVector, joinFrontiers, dotAtOrBelowFrontier, PERMISSION_RULE_WRITER, writerOf, foldDelta, addDotsOf, assertDeleteDeltaCarriesNoAdd, assertRedemptionNotQuarantined, assertWriteDeltaScopeDurable, PERMISSION_RULES_LATER_GRAMMAR_CODE, } from "./core/permission-rule-store.js";
|
|
212
|
+
export { removePersistedRule, addPersistedRule, applyTombstones, sameScope, sameRuleIdentity, isValidConsentScope, isValidDurableScope, InMemoryDurableRulePartition, EMPTY_DURABLE_RULE_PARTITION, joinRuleStates, applySyncJoin, screenRuleSyncState, collectBelowFrontier, ruleSyncVector, joinFrontiers, dotAtOrBelowFrontier, PERMISSION_RULE_WRITER, writerOf, foldDelta, addDotsOf, assertDeleteDeltaCarriesNoAdd, assertRedemptionNotQuarantined, assertWriteDeltaScopeDurable, PERMISSION_RULES_LATER_GRAMMAR_CODE, PERMISSION_RULES_DAMAGED_BUCKET_CODE, PERMISSION_RULES_UNREADABLE_BUCKET_CODE, } from "./core/permission-rule-store.js";
|
|
211
213
|
export { readRuleOwner, sameRuleOwner, RULE_OWNER_KINDS, } from "./core/rule-owner.js";
|
|
212
214
|
export { principalNameOf } from "./core/principal-name.js";
|
|
213
215
|
export { syncPermissionRules, parseRuleSyncResponse, PERMISSION_RULE_SYNC_PATH, LOCAL_OWNER_UNSYNCABLE_CODE, } from "./core/permission-rule-sync.js";
|
|
@@ -225,26 +227,29 @@ export { AdoptionError, assertAdoptionBootGate, readRootAdoptionFile, writeRootA
|
|
|
225
227
|
export { adoptLocalDataRoot, ackAdoptionConfig, witnessAdoptionConfig, listAdoptionQuarantine, readAdoptionStatus, } from "./stores/file/adoption/adopt.js";
|
|
226
228
|
export { formatHookFeedback, runToolGate, createHookEnvCapabilities, normalizePersistedRuleHit, } from "./core/hooks.js";
|
|
227
229
|
export { KERNEL_CONTRACT_VERSION, MOD_TIERS, MOD_SEATS, MOD_EVENT_SIDES, MOD_EVENT_TABLE, MODS_INVALID_CODE, MODS_REGISTRATION_REFUSED_CODE, } from "./core/mods/kernel/index.js";
|
|
228
|
-
export { admitModChain } from "./core/mods/stations.js";
|
|
230
|
+
export { admitModChain, promptScreenDeclaredBy } from "./core/mods/stations.js";
|
|
229
231
|
export { SESSION_APPEND_DOORS, SESSION_APPEND_ORIGIN_KINDS } from "./core/mods/session-append.js";
|
|
230
232
|
export { SESSION_RECEIVE_ORIGIN_KINDS } from "./core/mods/session-receive.js";
|
|
231
233
|
export { SESSION_SEND_ORIGIN_KINDS } from "./core/mods/session-send.js";
|
|
232
234
|
export { loadModPackage } from "./core/mods/package.js";
|
|
233
235
|
export { CREDENTIAL_REF_KINDS, CREDENTIAL_REF_TRUST, CREDENTIAL_REF_TEXT_MAX, CREDENTIAL_REF_MAP_MAX, CREDENTIAL_REF_PROBLEM_REASONS, readCredentialRef, } from "@sema-agent/primitives";
|
|
234
236
|
export { InMemoryMemoryStore, composeMemoryBlock, composeLayeredMemoryBlock, normalizeMemorySpec, supportsConsolidation, supportsPeriodicConsolidation, firstSentence, expandLexicalTerms, lexicalSearchMatch, classifyPromotable, enforcePromotableWriteGate, guardedMemoryStore, MemoryGateError, MemoryProjectionError, detectSecret, enforceSecretWriteGate, enforceStructuredNoteSecretGate, MEMORY_PROJECT_KEY_ABSENT_REASONS, } from "./core/memory.js";
|
|
235
|
-
export { MemoryEngine, FileMemoryEngineBackend, memoryBackendContract, assertMemoryBackendSearchEquivalence, buildMemoryInstruction, writableRootOf, truncateIndex, scanEntryFiles, deriveRepoKey, deriveRepoMemoryDir, deriveControlPlaneDir, deriveRepoControlPlaneDir, resolveMemoryEngineRoot, scopeDirName, ControlPlaneCorruptError, parseEntryFile, serializeEntryFile, computeEntryRev, entryFromFile, MEMORY_ORIGIN_CAUSES, committedOriginOf, originEquals, consolidationExposedFrontmatter, ambiguousOriginRepresentation, committedDistilledOf, distilledEquals, CONSOLIDATION_DEFAULTS, ConsolidationRefusedError, MEMORY_SEARCH_SUPERSEDED_TAG, consolidationTypeEligible, deriveSupersededSet, memorySupersededNote,
|
|
237
|
+
export { MemoryEngine, FileMemoryEngineBackend, readMemoryLedgerForm, memoryBackendContract, assertMemoryBackendSearchEquivalence, memoryGovernanceStoreContract, buildMemoryInstruction, writableRootOf, truncateIndex, scanEntryFiles, deriveRepoKey, deriveRepoMemoryDir, deriveControlPlaneDir, deriveRepoControlPlaneDir, resolveMemoryEngineRoot, scopeDirName, ControlPlaneCorruptError, parseEntryFile, serializeEntryFile, computeEntryRev, entryFromFile, MEMORY_ORIGIN_CAUSES, committedOriginOf, originEquals, consolidationExposedFrontmatter, ambiguousOriginRepresentation, committedDistilledOf, distilledEquals, CONSOLIDATION_DEFAULTS, ConsolidationRefusedError, MEMORY_SEARCH_SUPERSEDED_TAG, consolidationTypeEligible, deriveSupersededSet, memorySupersededNote, supersessionFuseCeiling, DELETION_FUSE_FLOOR, fileGovernanceStore, memoryGovernanceDurability, deriveShadowedSet, memoryConsolidationRecommendedNotice, memoryConsolidationCommittedNotice, memoryConsolidationConflictNotice, memoryConsolidationIncompleteNotice, memoryConsolidationRefusedNotice, memoryConsolidationWithheldNotice, DISTILLER_DEFAULT_MAX_INPUTS_PER_PRODUCT, LLM_DISTILLER_CONTRACT, LLM_DISTILLER_CONTRACT_DL2, LLM_DISTILLER_CONTRACT_DL3, LLM_DISTILLER_CONTRACTS, MEMORY_DISTILLER_CONTRACT_V1, contractGroupingDiff, driveConsolidationToFixpoint, isAliasModelId, llmPlanDistiller, mintExposurePartitionedPlan, mintLlmConsolidationPlan, MEMORY_DISTILLER_PURITY_CONTRACT_V1, detectCleanArmVerbatimLeak, openAiCompatChatSeat, parseJsonAnswer, planParseRepairs, sanitizeLlmGroups, scheduleUnderFuse, CONSOLIDATION_RUN_STOP_REASONS, CONSOLIDATION_WRITE_REFUSED_CODE, runMemoryConsolidationDriver, isInstructionEntry, MEMORY_INSTRUCTION_TEMPLATE, MEMORY_RECALL_DISCIPLINE, MEMORY_PREFERENCE_DISCIPLINE, MEMORY_READONLY_NOTICE, MEMORY_CAPTURE_OPTOUT_NOTICE, memoryCaptureOptedOutNotice, memoryCaptureOptOutUnpersistedNotice, SESSION_CAPTURE_OPTOUT_DIR, markSessionCaptureOptOut, readSessionCaptureOptOut, listSessionCaptureOptOut, fileSessionCaptureRecordStore, readV2HeaderHints, LINEAGE_FILE, CHALLENGES_FILE, CHALLENGED_HISTORY_FILE, CHALLENGE_LEDGER_MAX_EVENTS, rebuildStrictControlPlaneLedger, MEMORY_INDEX_FILENAME, MEMORY_INDEX_MAX_LINES, MEMORY_INDEX_MAX_BYTES, MEMORY_SEARCH_TOOL_NAME, MEMORY_GET_TOOL_NAME, MEMORY_INDEX_TOOL_NAME, MEMORY_ENGINE_TOOL_NAMES, MEMORY_EXPOSURE_BANNER, MEMORY_EXPOSURE_HANDLE_TAG, memoryExposureIndexRow, STUB_ARCHIVED_LINE, DEFAULT_MAX_MEMORY_FILES, DEFAULT_MAX_ENTRY_DEPTH, DEFAULT_HARVEST_DEADLINE_MS, DEFAULT_HARVEST_FILE_BUDGET, MASS_DELETION_FUSE_RATIO, scanMemoryWrite, scanMemoryFileName, scanRemediation, MEMORY_FILENAME_SEGMENT_RE, renderAnnouncements, enqueueMemoryAnnouncement, drainMemoryAnnouncements, peekMemoryAnnouncements, bumpScanFuse, scanFuseCount, clearScanFuse, ANNOUNCEMENTS_FILE, MEMORY_ANNOUNCEMENTS_MAX, SCAN_FUSE_FILE, SCAN_FUSE_THRESHOLD, erasureSelectHash, computeMemoryBundleHash, MEMORY_GOVERNANCE_DOC_NAMES, MEMORY_CONTROL_OBJECT_KINDS, adoptReplicaControlPlane, replicaControlPlaneStrays, SCOPE_SEGMENT_MAX_ENCODED, PROJECT_MARKER_PATH, encodeScopeSegment, decodeScopeSegment, parseScopeKey, formatUserScope, formatUserLocalScope, formatOrgScope, formatProjScope, formatUserProjScope, isPersonalScope, isReplicableScope, isOrgScopeKey, assertScopeContractPlacement, formatProjectMarker, parseProjectMarker, resolveProjectId, PROJECT_ID_REGEX, migrateScope, materializeEntriesToFiles, harvestFilesToPatches, projectionsToWriteBack, screenInboundEntries, REMOTE_HARVEST_PER_FILE_BYTES, REMOTE_MASS_DELETION_FUSE_RATIO, deriveProjectMemoryDir, deriveProjectControlDir, recordProjectIdHint, lookupProjectIdHint, PROJECT_ID_HINTS_FILE, reconcileMemoryEntries, nextSyncBaseline, mergeRecallHits, syncMemoryScope, memorySyncStoreOf, carriesCredential, memorySyncReportOf, memoryTravelGapOf, } from "./core/memory-engine/index.js";
|
|
236
238
|
export { createConsolidationWriteJudge, deliverWriteRefusal } from "./core/runner/memory-consolidation-write-judge.js";
|
|
237
239
|
export { STORE_FORM_REFUSAL_CODES, TARGET_OUTSIDE_STORE, SCOPE_HOME_NOT_DIRECTORY, SCOPE_HOME_FORMS } from "./core/memory-engine/layout.js";
|
|
238
240
|
export { resolveMemoryScopeStore } from "./core/memory-engine/dual-root.js";
|
|
239
|
-
export { classifyScopePlanes, scopePlanesOf } from "./core/memory-engine/dual-root.js";
|
|
241
|
+
export { classifyScopePlanes, memoryScopePlaneOf, scopePlanesOf } from "./core/memory-engine/dual-root.js";
|
|
240
242
|
export { createMemoryDeployment, } from "./core/memory-engine/memory-deployment.js";
|
|
241
243
|
export { reanchorMemoryStoreRoot } from "./core/memory-engine/layout.js";
|
|
244
|
+
export { admittingLandings, cutPerLanding, LandingsNeedAdmission, MAX_LANDING_ADMISSION_ROUNDS, requireLandingsAdmitted, } from "./core/memory-engine/landing-admission.js";
|
|
245
|
+
export { NON_GOVERNANCE_MEMORY_CODES } from "./core/governance-codes.js";
|
|
242
246
|
export { SHARED_MEMORY_READ_CAP_BYTES, SHARED_MEMORY_LIST_PAGE_SIZE, SharedMemoryStoreError, } from "./core/shared-memory/types.js";
|
|
243
247
|
export { isSharedMemoryDocumentPath, isSharedMemoryStoreId } from "./core/shared-memory/normalize.js";
|
|
244
248
|
export { sharedMemoryStoreContract, } from "./core/shared-memory/contract.js";
|
|
245
249
|
export { termSet, jaccardDistance, cosineDistance } from "./core/memory-vector.js";
|
|
246
250
|
export { encodeSurfacedKey, buildManifestText, validateSelectedIds, composeSelectiveBody, formatMemoryAge, resolveLinkedIds, RECALL_CAVEAT, DEFAULT_MAX_SELECTED, DEFAULT_MAX_LINKED, } from "./core/memory-recall.js";
|
|
247
251
|
export { resolveMemoryConsolidationDriver, autoRunOnRecommendationEffective, } from "./core/runner/memory-consolidation-driver.js";
|
|
252
|
+
export { ROLE_RESOLUTION_TABLE, modelFaceResolvable, } from "./core/runner/role-resolution-table.js";
|
|
248
253
|
export { teardownLegBudget } from "./core/runner/teardown-bounded.js";
|
|
249
254
|
export { DEFAULT_COMPACTION_INSTRUCTIONS } from "./core/auto-compaction.js";
|
|
250
255
|
export { DEFAULT_SYSTEM_PROMPT, CODE_AGENT_PROMPT, SUBAGENT_PROMPT, MEMORY_SAFETY, MEMORY_HYGIENE, OUTPUT_EFFICIENCY, CYBER_RISK, HARNESS_SECTION_ANCHOR, URL_SAFETY, SUMMARIZE_TOOL_RESULTS, EXECUTION_ENVIRONMENT, EXECUTION_ENVIRONMENT_OPEN_READS, executionEnvironmentBlockFor, buildEnvironmentContext, buildGitSnapshot, buildScratchpadSection, GIT_STATUS_MAX_CHARS, formatLocalDate, } from "./prompts/default.js";
|
|
@@ -306,7 +311,7 @@ export { canAccessAgentRecord, STALE_RUNNING_REAP_ATTRIBUTION, BackgroundAgentSt
|
|
|
306
311
|
export { serveDurableAgentRowLane, buildAgentPollDetails, } from "./core/task-registry-agent.js";
|
|
307
312
|
export { readAgentState, agentStateSourceOfRecord, agentStateSummary, } from "./core/agent-state.js";
|
|
308
313
|
export { TASK_OUTPUT_REPLAY_KINDS } from "./core/task-registry-shared.js";
|
|
309
|
-
export { REMOVAL_LIVENESS_WORDS, RULE_WRITE_COMMITTED_WORDS } from "./core/permission-rule-store.js";
|
|
314
|
+
export { REMOVAL_LIVENESS_WORDS, RULE_REFUSAL_CODES, RULE_WRITE_COMMITTED_WORDS } from "./core/permission-rule-store.js";
|
|
310
315
|
export { normalizeReadRootCandidate, READ_ROOT_CANDIDATE_DIR_MAX } from "./core/read-root-candidate.js";
|
|
311
316
|
export { FileBackgroundAgentStore } from "./stores/file/background-agent-store.js";
|
|
312
317
|
export { A2A_TASK_STATES, toA2ATaskState, fromA2ATaskState, } from "./core/a2a-task-state.js";
|