@sema-agent/core 7.61.0 → 7.63.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 +840 -0
- package/dist/agents/cascade.d.ts +11 -3
- package/dist/agents/cascade.js +1 -1
- package/dist/agents/peer-held-queue.d.ts +27 -4
- package/dist/agents/peer-held-queue.js +81 -36
- package/dist/agents/peer-session-drain.js +13 -3
- package/dist/agents/subagent-transcript-placement.d.ts +23 -0
- package/dist/agents/subagent-transcript-placement.js +14 -0
- package/dist/agents/subagent.d.ts +6 -1
- package/dist/agents/subagent.js +143 -58
- package/dist/agents/suspend-guard.d.ts +38 -16
- package/dist/agents/suspend-guard.js +9 -4
- package/dist/agents/verify.js +4 -3
- package/dist/brain/route-adjudicator.js +9 -4
- package/dist/core/approval-object.js +1 -1
- package/dist/core/arg-summary.js +1 -1
- package/dist/core/ask-question.d.ts +2 -2
- package/dist/core/canonical-json.d.ts +23 -13
- package/dist/core/canonical-json.js +4 -4
- package/dist/core/checkpoint-features.d.ts +722 -0
- package/dist/core/checkpoint-features.js +98 -0
- package/dist/core/checkpoint-queries.d.ts +47 -4
- package/dist/core/checkpoint-queries.js +36 -16
- package/dist/core/checkpoint-requirements.d.ts +12 -5
- package/dist/core/checkpoint-requirements.js +11 -5
- package/dist/core/checkpoint-row-verdict.d.ts +110 -0
- package/dist/core/checkpoint-row-verdict.js +245 -0
- package/dist/core/checkpoint-store.d.ts +76 -753
- package/dist/core/checkpoint-store.js +83 -144
- package/dist/core/compliance.d.ts +6 -2
- package/dist/core/compliance.js +3 -3
- package/dist/core/engine-attestation.d.ts +1 -1
- package/dist/core/engine-notice.d.ts +38 -7
- package/dist/core/engine-notice.js +9 -2
- package/dist/core/gate-fold.js +2 -2
- 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 +16 -3
- package/dist/core/hooks.d.ts +13 -0
- package/dist/core/human-input-projection.d.ts +1 -0
- package/dist/core/human-input-projection.js +3 -0
- package/dist/core/image-admission.d.ts +1 -1
- package/dist/core/locked-config.d.ts +2 -2
- package/dist/core/mcp-host-seat.js +6 -1
- package/dist/core/memory-engine/consolidation-driver.d.ts +33 -18
- package/dist/core/memory-engine/consolidation-driver.js +99 -98
- package/dist/core/memory-engine/consolidation.d.ts +73 -10
- package/dist/core/memory-engine/consolidation.js +167 -11
- 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 +37 -35
- package/dist/core/memory-engine/delegation-settlement.js +53 -59
- package/dist/core/memory-engine/dual-root.d.ts +12 -6
- package/dist/core/memory-engine/dual-root.js +9 -5
- package/dist/core/memory-engine/engine.d.ts +98 -35
- package/dist/core/memory-engine/engine.js +477 -380
- 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 +29 -3
- package/dist/core/memory-engine/file-backend.js +66 -35
- package/dist/core/memory-engine/index.d.ts +7 -7
- package/dist/core/memory-engine/index.js +6 -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 +121 -45
- package/dist/core/memory-engine/layout.js +252 -102
- package/dist/core/memory-engine/memory-backend-contract.d.ts +19 -1
- package/dist/core/memory-engine/memory-backend-contract.js +320 -0
- package/dist/core/memory-engine/memory-deployment.d.ts +31 -8
- package/dist/core/memory-engine/memory-deployment.js +26 -12
- 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 +3 -1
- package/dist/core/memory-engine/session-write-home.js +1 -1
- 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 +118 -19
- package/dist/core/memory-engine/types.js +1 -0
- package/dist/core/memory-vector.d.ts +1 -1
- package/dist/core/memory.d.ts +10 -10
- package/dist/core/memory.js +15 -6
- package/dist/core/mode-policy.js +1 -1
- package/dist/core/mods/classic-events.d.ts +9 -1
- package/dist/core/mods/dollar.d.ts +32 -1
- package/dist/core/mods/dollar.js +13 -1
- package/dist/core/mods/kernel/events.d.ts +11 -3
- package/dist/core/mods/kernel/events.js +13 -10
- package/dist/core/mods/lifecycle-stations.d.ts +36 -4
- package/dist/core/mods/lifecycle-stations.js +44 -9
- package/dist/core/mods/session-append.d.ts +4 -1
- package/dist/core/mods/session-append.js +7 -0
- package/dist/core/mods/session-receive.js +12 -15
- package/dist/core/mods/stations.d.ts +70 -6
- package/dist/core/mods/stations.js +144 -1
- package/dist/core/own-property-receipt.d.ts +7 -0
- package/dist/core/own-property-receipt.js +3 -0
- 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/permission-rule-consent.d.ts +10 -3
- package/dist/core/permission-rule-consent.js +37 -24
- package/dist/core/permission-rule-store.d.ts +35 -1
- package/dist/core/permission-rule-store.js +27 -8
- package/dist/core/read-only-shell.js +3 -2
- package/dist/core/read-root-candidate.js +1 -1
- package/dist/core/redaction-marks.d.ts +8 -0
- package/dist/core/redaction-marks.js +6 -0
- package/dist/core/remote-env.d.ts +12 -1
- package/dist/core/remote-env.js +3 -0
- package/dist/core/resume-startup-cause.d.ts +5 -4
- package/dist/core/runner/child-tree.d.ts +29 -3
- package/dist/core/runner/child-tree.js +39 -16
- package/dist/core/runner/compact-session.js +5 -2
- package/dist/core/runner/contracts.d.ts +36 -17
- package/dist/core/runner/delegation-owner.d.ts +43 -0
- package/dist/core/runner/delegation-owner.js +59 -0
- package/dist/core/runner/gate-exit.js +2 -2
- package/dist/core/runner/inherited-ask-grants.js +1 -1
- package/dist/core/runner/lineage-reroot-view.d.ts +56 -0
- package/dist/core/runner/lineage-reroot-view.js +108 -0
- package/dist/core/runner/memory-consolidation-driver.d.ts +6 -3
- package/dist/core/runner/memory-consolidation-driver.js +4 -4
- 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/permission-rule-lanes.d.ts +2 -1
- package/dist/core/runner/permission-rule-lanes.js +2 -2
- package/dist/core/runner/person-path-rows.d.ts +23 -3
- package/dist/core/runner/person-path-rows.js +31 -4
- package/dist/core/runner/placement-fence.d.ts +12 -0
- package/dist/core/runner/placement-fence.js +20 -6
- package/dist/core/runner/prepare-acquire-reconcile.d.ts +4 -1
- package/dist/core/runner/prepare-acquire-reconcile.js +7 -2
- package/dist/core/runner/prepare-ask-lane.js +2 -2
- package/dist/core/runner/prepare-caps-and-workflow.d.ts +5 -1
- package/dist/core/runner/prepare-caps-and-workflow.js +6 -3
- package/dist/core/runner/prepare-config-doors.d.ts +6 -6
- package/dist/core/runner/prepare-config-doors.js +3 -4
- package/dist/core/runner/prepare-execution-env.js +17 -6
- package/dist/core/runner/prepare-hands-readface.d.ts +3 -2
- package/dist/core/runner/prepare-hands-readface.js +32 -10
- package/dist/core/runner/prepare-inherited-gate.d.ts +12 -8
- package/dist/core/runner/prepare-inherited-gate.js +14 -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 +3 -2
- package/dist/core/runner/prepare-memory.js +28 -20
- package/dist/core/runner/prepare-park-ask.js +4 -3
- package/dist/core/runner/prepare-task.js +22 -16
- package/dist/core/runner/prepare-workspace-restore.js +3 -6
- package/dist/core/runner/resume-admission.d.ts +3 -3
- package/dist/core/runner/resume-admission.js +6 -3
- package/dist/core/runner/resume-apply.d.ts +4 -0
- package/dist/core/runner/resume-apply.js +11 -4
- package/dist/core/runner/resume-checkpoint-screen.d.ts +9 -0
- package/dist/core/runner/resume-checkpoint-screen.js +4 -84
- package/dist/core/runner/run-git-lane.d.ts +2 -0
- package/dist/core/runner/run-git-lane.js +4 -1
- package/dist/core/runner/run-harness-handlers.d.ts +2 -0
- package/dist/core/runner/run-harness-handlers.js +3 -2
- package/dist/core/runner/run-leg.js +25 -8
- package/dist/core/runner/run-settle-and-teardown.js +6 -4
- package/dist/core/runner/run-stop-and-final-verify.js +2 -1
- package/dist/core/runner/run-turn-boundary.js +7 -4
- package/dist/core/runner/runtask.js +6 -6
- package/dist/core/runner/steering-preview.d.ts +9 -0
- package/dist/core/runner/steering-preview.js +5 -0
- package/dist/core/runner/stream-steer-verb.js +8 -0
- package/dist/core/runner/terminal-account.js +1 -1
- package/dist/core/runner/tool-face-overlay.js +2 -0
- package/dist/core/runner/turn-attachments.d.ts +5 -0
- package/dist/core/runner/turn-attachments.js +1 -1
- package/dist/core/runner-deps.d.ts +8 -4
- package/dist/core/secret-env.d.ts +9 -6
- package/dist/core/secret-env.js +41 -22
- package/dist/core/session-checkout.d.ts +108 -0
- package/dist/core/session-checkout.js +485 -0
- package/dist/core/session-store.d.ts +13 -5
- package/dist/core/session-store.js +28 -4
- package/dist/core/session.d.ts +29 -5
- package/dist/core/session.js +3 -0
- package/dist/core/store-contracts/checkpoint-store-contract.d.ts +6 -12
- package/dist/core/store-contracts/checkpoint-store-contract.js +73 -6
- package/dist/core/store-contracts/session-store-contract.js +61 -8
- package/dist/core/task-event.d.ts +28 -1
- package/dist/core/task-notification.d.ts +9 -1
- package/dist/core/task-notification.js +8 -1
- package/dist/core/task-registry-agent.d.ts +40 -8
- package/dist/core/task-registry-agent.js +57 -24
- package/dist/core/task-registry-shared.d.ts +33 -11
- package/dist/core/task-registry-workflow.js +4 -3
- package/dist/core/task-registry.d.ts +27 -10
- package/dist/core/task-registry.js +19 -13
- package/dist/core/task-result.d.ts +5 -5
- package/dist/core/task-spec-members.js +1 -1
- package/dist/core/task-spec.d.ts +21 -1
- package/dist/core/terminal-cause.d.ts +6 -6
- package/dist/core/tool-face.d.ts +6 -2
- package/dist/core/tool-face.js +1 -1
- package/dist/core/tool-policy.d.ts +16 -13
- package/dist/core/tool-policy.js +11 -10
- package/dist/core/tool-roster.d.ts +4 -4
- package/dist/core/tool-spec.d.ts +42 -19
- package/dist/core/types.d.ts +2 -2
- package/dist/core/types.js +1 -1
- package/dist/core/untrusted-egress.d.ts +15 -4
- package/dist/core/untrusted-egress.js +23 -22
- package/dist/core/workspace-snapshot.d.ts +3 -1
- package/dist/core/workspace-snapshot.js +1 -0
- package/dist/engine/execution-env/node-execution-env.d.ts +3 -0
- package/dist/engine/execution-env/node-execution-env.js +12 -5
- package/dist/engine/harness/types.d.ts +77 -1
- package/dist/engine/harness/types.js +108 -0
- package/dist/engine/session/import-validate.js +6 -1
- package/dist/engine/session/parent-chain-guard.d.ts +3 -3
- package/dist/engine/session/parent-chain-guard.js +1 -1
- package/dist/engine/session/path-to-root.d.ts +18 -3
- package/dist/engine/session/path-to-root.js +15 -1
- package/dist/engine/session/repo-utils.d.ts +12 -1
- package/dist/engine/session/repo-utils.js +41 -0
- package/dist/engine/session/session.d.ts +24 -1
- package/dist/engine/session/session.js +46 -2
- package/dist/engine/session/storage-base.d.ts +20 -0
- package/dist/engine/session/storage-base.js +28 -9
- package/dist/index.d.ts +16 -12
- package/dist/index.js +11 -8
- package/dist/internal/harness-types.d.ts +1 -1
- package/dist/internal/harness.d.ts +4 -3
- package/dist/internal/harness.js +3 -2
- package/dist/orchestration/run-workflow-tool.d.ts +7 -1
- package/dist/orchestration/run-workflow-tool.js +28 -11
- package/dist/orchestration/workflow-governance.d.ts +1 -1
- package/dist/orchestration/workflow.d.ts +6 -0
- package/dist/orchestration/workflow.js +5 -8
- package/dist/stores/file/checkpoint-store.d.ts +2 -0
- package/dist/stores/file/checkpoint-store.js +7 -6
- package/dist/stores/file/fs-atomic.d.ts +0 -22
- package/dist/stores/file/fs-atomic.js +0 -17
- package/dist/stores/file/index.d.ts +2 -9
- package/dist/stores/file/index.js +2 -4
- package/dist/stores/file/session-store.d.ts +13 -7
- package/dist/stores/file/session-store.js +42 -18
- package/dist/tools/fs/bash-program-position.d.ts +3 -2
- package/dist/tools/fs/bash-program-position.js +10 -10
- 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 +13 -1
- package/dist/tools/fs/read-deny.js +10 -2
- package/dist/tools/fs/removal-targets.js +5 -5
- 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 +11 -2
- package/dist/tools/fs/shell-read-argv.js +45 -29
- package/dist/tools/fs/shell-read-bindings.d.ts +20 -2
- package/dist/tools/fs/shell-read-bindings.js +153 -69
- 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.js +29 -11
- package/dist/tools/fs/shell-read-establish.js +43 -22
- package/dist/tools/fs/shell-read-functions.js +2 -2
- 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-object-path.d.ts +59 -0
- package/dist/tools/fs/shell-read-object-path.js +119 -0
- package/dist/tools/fs/shell-read-plan.d.ts +18 -0
- package/dist/tools/fs/shell-read-plan.js +217 -104
- package/dist/tools/fs/shell-read-start.d.ts +76 -13
- package/dist/tools/fs/shell-read-start.js +97 -17
- 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 +54 -14
- package/dist/tools/fs/shell-read-workdir.js +103 -19
- 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 +93 -43
- package/wire-changes/core-stores-sql@7.62.0.json +30 -0
- package/wire-changes/core-stores-sql@7.63.0.json +30 -0
- package/wire-changes/core@7.62.0.json +2181 -0
- package/wire-changes/core@7.63.0.json +3523 -0
- package/wire-changes/mods-kernel@7.62.0.json +42 -0
- package/wire-changes/mods-kernel@7.63.0.json +30 -0
- package/wire-changes/primitives@7.62.0.json +30 -0
- package/wire-changes/primitives@7.63.0.json +445 -0
- package/dist/core/consolidate-scope.d.ts +0 -93
- package/dist/core/consolidate-scope.js +0 -98
- 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
- package/dist/core/runner/memory-consolidation.d.ts +0 -109
- package/dist/core/runner/memory-consolidation.js +0 -251
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"repo": "core",
|
|
3
|
+
"package": "@sema-agent/mods-kernel",
|
|
4
|
+
"version": "7.62.0",
|
|
5
|
+
"from": "039e5ecf552494dca0785926ba9a11b578b76fc6",
|
|
6
|
+
"to": "v7.62.0",
|
|
7
|
+
"added": [],
|
|
8
|
+
"removed": [],
|
|
9
|
+
"changed": [],
|
|
10
|
+
"narrowed": [],
|
|
11
|
+
"closedSetMembers": [],
|
|
12
|
+
"closedSetsUnreadable": [],
|
|
13
|
+
"typeKeys": [],
|
|
14
|
+
"typeKeysUnreadableArms": [],
|
|
15
|
+
"typeKeysFlattenedCount": 1,
|
|
16
|
+
"signatures": [],
|
|
17
|
+
"versionLiterals": [
|
|
18
|
+
{
|
|
19
|
+
"name": "KERNEL_CONTRACT_VERSION",
|
|
20
|
+
"kind": "constant",
|
|
21
|
+
"from": "7",
|
|
22
|
+
"to": "8",
|
|
23
|
+
"at": "src/events.ts:43",
|
|
24
|
+
"criteriaCovered": false,
|
|
25
|
+
"breaking": true
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"declarationMoves": [],
|
|
29
|
+
"mintMoves": [],
|
|
30
|
+
"criteriaObserves": [],
|
|
31
|
+
"consumersHint": {
|
|
32
|
+
"cli": [],
|
|
33
|
+
"server": [],
|
|
34
|
+
"sdk": [],
|
|
35
|
+
"note": "scanned cli@96d121f5 server@a1dd9533 sdk@2a96276 — a name listed is MENTIONED there today, which is evidence of consumption, not proof of it"
|
|
36
|
+
},
|
|
37
|
+
"breakingCount": 1,
|
|
38
|
+
"breakingItems": [
|
|
39
|
+
"version literal changed: KERNEL_CONTRACT_VERSION 7 -> 8"
|
|
40
|
+
],
|
|
41
|
+
"toResolvedAt": "e7a79c60b2661009601ead4ccf2c8b48451ff5ed"
|
|
42
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"repo": "core",
|
|
3
|
+
"package": "@sema-agent/mods-kernel",
|
|
4
|
+
"version": "7.63.0",
|
|
5
|
+
"from": "146310a6a53a10cdb03a4f42718cf7e51b0ae509",
|
|
6
|
+
"to": "v7.63.0",
|
|
7
|
+
"added": [],
|
|
8
|
+
"removed": [],
|
|
9
|
+
"changed": [],
|
|
10
|
+
"narrowed": [],
|
|
11
|
+
"closedSetMembers": [],
|
|
12
|
+
"closedSetsUnreadable": [],
|
|
13
|
+
"typeKeys": [],
|
|
14
|
+
"typeKeysUnreadableArms": [],
|
|
15
|
+
"typeKeysFlattenedCount": 1,
|
|
16
|
+
"signatures": [],
|
|
17
|
+
"versionLiterals": [],
|
|
18
|
+
"declarationMoves": [],
|
|
19
|
+
"mintMoves": [],
|
|
20
|
+
"criteriaObserves": [],
|
|
21
|
+
"consumersHint": {
|
|
22
|
+
"cli": [],
|
|
23
|
+
"server": [],
|
|
24
|
+
"sdk": [],
|
|
25
|
+
"note": "scanned cli@f973e484 server@96a91d82 sdk@d5aed66 — a name listed is MENTIONED there today, which is evidence of consumption, not proof of it"
|
|
26
|
+
},
|
|
27
|
+
"breakingCount": 0,
|
|
28
|
+
"breakingItems": [],
|
|
29
|
+
"toResolvedAt": "578c77b1a5e127bea88d7f7c05ce56f250c46446"
|
|
30
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"repo": "core",
|
|
3
|
+
"package": "@sema-agent/primitives",
|
|
4
|
+
"version": "7.62.0",
|
|
5
|
+
"from": "039e5ecf552494dca0785926ba9a11b578b76fc6",
|
|
6
|
+
"to": "v7.62.0",
|
|
7
|
+
"added": [],
|
|
8
|
+
"removed": [],
|
|
9
|
+
"changed": [],
|
|
10
|
+
"narrowed": [],
|
|
11
|
+
"closedSetMembers": [],
|
|
12
|
+
"closedSetsUnreadable": [],
|
|
13
|
+
"typeKeys": [],
|
|
14
|
+
"typeKeysUnreadableArms": [],
|
|
15
|
+
"typeKeysFlattenedCount": 1,
|
|
16
|
+
"signatures": [],
|
|
17
|
+
"versionLiterals": [],
|
|
18
|
+
"declarationMoves": [],
|
|
19
|
+
"mintMoves": [],
|
|
20
|
+
"criteriaObserves": [],
|
|
21
|
+
"consumersHint": {
|
|
22
|
+
"cli": [],
|
|
23
|
+
"server": [],
|
|
24
|
+
"sdk": [],
|
|
25
|
+
"note": "scanned cli@96d121f5 server@a1dd9533 sdk@2a96276 — a name listed is MENTIONED there today, which is evidence of consumption, not proof of it"
|
|
26
|
+
},
|
|
27
|
+
"breakingCount": 0,
|
|
28
|
+
"breakingItems": [],
|
|
29
|
+
"toResolvedAt": "e7a79c60b2661009601ead4ccf2c8b48451ff5ed"
|
|
30
|
+
}
|
|
@@ -0,0 +1,445 @@
|
|
|
1
|
+
{
|
|
2
|
+
"repo": "core",
|
|
3
|
+
"package": "@sema-agent/primitives",
|
|
4
|
+
"version": "7.63.0",
|
|
5
|
+
"from": "146310a6a53a10cdb03a4f42718cf7e51b0ae509",
|
|
6
|
+
"to": "v7.63.0",
|
|
7
|
+
"added": [
|
|
8
|
+
{
|
|
9
|
+
"name": "CREDENTIAL_MIN_CHARS",
|
|
10
|
+
"kind": "variable",
|
|
11
|
+
"tier": null,
|
|
12
|
+
"at": [
|
|
13
|
+
"src/index.ts:18",
|
|
14
|
+
"src/secret-vocabulary.ts:129"
|
|
15
|
+
],
|
|
16
|
+
"criteriaCovered": false,
|
|
17
|
+
"breaking": false
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "CREDENTIAL_VOCABULARY",
|
|
21
|
+
"kind": "variable",
|
|
22
|
+
"tier": null,
|
|
23
|
+
"at": [
|
|
24
|
+
"src/index.ts:17",
|
|
25
|
+
"src/secret-vocabulary.ts:221"
|
|
26
|
+
],
|
|
27
|
+
"criteriaCovered": false,
|
|
28
|
+
"breaking": false
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"name": "CredentialVocabulary",
|
|
32
|
+
"kind": "interface",
|
|
33
|
+
"tier": null,
|
|
34
|
+
"at": [
|
|
35
|
+
"src/index.ts:24",
|
|
36
|
+
"src/secret-vocabulary.ts:71"
|
|
37
|
+
],
|
|
38
|
+
"criteriaCovered": false,
|
|
39
|
+
"breaking": false
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"name": "CredentialWordPosition",
|
|
43
|
+
"kind": "type",
|
|
44
|
+
"tier": null,
|
|
45
|
+
"at": [
|
|
46
|
+
"src/index.ts:27",
|
|
47
|
+
"src/secret-vocabulary.ts:59"
|
|
48
|
+
],
|
|
49
|
+
"criteriaCovered": false,
|
|
50
|
+
"breaking": false
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"name": "CredentialWordRow",
|
|
54
|
+
"kind": "interface",
|
|
55
|
+
"tier": null,
|
|
56
|
+
"at": [
|
|
57
|
+
"src/index.ts:26",
|
|
58
|
+
"src/secret-vocabulary.ts:62"
|
|
59
|
+
],
|
|
60
|
+
"criteriaCovered": false,
|
|
61
|
+
"breaking": false
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"name": "EnvNameView",
|
|
65
|
+
"kind": "interface",
|
|
66
|
+
"tier": null,
|
|
67
|
+
"at": [
|
|
68
|
+
"src/index.ts:28",
|
|
69
|
+
"src/secret-vocabulary.ts:372"
|
|
70
|
+
],
|
|
71
|
+
"criteriaCovered": false,
|
|
72
|
+
"breaking": false
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"name": "RecordKeyView",
|
|
76
|
+
"kind": "interface",
|
|
77
|
+
"tier": null,
|
|
78
|
+
"at": [
|
|
79
|
+
"src/index.ts:29",
|
|
80
|
+
"src/secret-vocabulary.ts:436"
|
|
81
|
+
],
|
|
82
|
+
"criteriaCovered": false,
|
|
83
|
+
"breaking": false
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"name": "RedactionConfidence",
|
|
87
|
+
"kind": "type",
|
|
88
|
+
"tier": null,
|
|
89
|
+
"at": [
|
|
90
|
+
"src/index.ts:30",
|
|
91
|
+
"src/secret-vocabulary.ts:24"
|
|
92
|
+
],
|
|
93
|
+
"criteriaCovered": false,
|
|
94
|
+
"breaking": false
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"name": "RedactionFinding",
|
|
98
|
+
"kind": "interface",
|
|
99
|
+
"tier": null,
|
|
100
|
+
"at": [
|
|
101
|
+
"src/index.ts:46",
|
|
102
|
+
"src/secret-scan.ts:24"
|
|
103
|
+
],
|
|
104
|
+
"criteriaCovered": false,
|
|
105
|
+
"breaking": false
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"name": "RedactionPass",
|
|
109
|
+
"kind": "interface",
|
|
110
|
+
"tier": null,
|
|
111
|
+
"at": [
|
|
112
|
+
"src/index.ts:45",
|
|
113
|
+
"src/secret-scan.ts:52"
|
|
114
|
+
],
|
|
115
|
+
"criteriaCovered": false,
|
|
116
|
+
"breaking": false
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"name": "RedactionReport",
|
|
120
|
+
"kind": "interface",
|
|
121
|
+
"tier": null,
|
|
122
|
+
"at": [
|
|
123
|
+
"src/index.ts:47",
|
|
124
|
+
"src/secret-scan.ts:45"
|
|
125
|
+
],
|
|
126
|
+
"criteriaCovered": false,
|
|
127
|
+
"breaking": false
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"name": "RedactionSource",
|
|
131
|
+
"kind": "type",
|
|
132
|
+
"tier": null,
|
|
133
|
+
"at": [
|
|
134
|
+
"src/index.ts:31",
|
|
135
|
+
"src/secret-vocabulary.ts:28"
|
|
136
|
+
],
|
|
137
|
+
"criteriaCovered": false,
|
|
138
|
+
"breaking": false
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"name": "RenderOptions",
|
|
142
|
+
"kind": "interface",
|
|
143
|
+
"tier": null,
|
|
144
|
+
"at": [
|
|
145
|
+
"src/index.ts:44",
|
|
146
|
+
"src/secret-scan.ts:588"
|
|
147
|
+
],
|
|
148
|
+
"criteriaCovered": false,
|
|
149
|
+
"breaking": false
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"name": "SECRET_READING_KINDS",
|
|
153
|
+
"kind": "variable",
|
|
154
|
+
"tier": null,
|
|
155
|
+
"at": [
|
|
156
|
+
"src/index.ts:34",
|
|
157
|
+
"src/secret-scan.ts:536"
|
|
158
|
+
],
|
|
159
|
+
"criteriaCovered": false,
|
|
160
|
+
"breaking": false
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"name": "SecretGrade",
|
|
164
|
+
"kind": "type",
|
|
165
|
+
"tier": null,
|
|
166
|
+
"at": [
|
|
167
|
+
"src/index.ts:38",
|
|
168
|
+
"src/secret-scan.ts:530"
|
|
169
|
+
],
|
|
170
|
+
"criteriaCovered": false,
|
|
171
|
+
"breaking": false
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"name": "SecretNotation",
|
|
175
|
+
"kind": "interface",
|
|
176
|
+
"tier": null,
|
|
177
|
+
"at": [
|
|
178
|
+
"src/index.ts:41",
|
|
179
|
+
"src/secret-scan.ts:560"
|
|
180
|
+
],
|
|
181
|
+
"criteriaCovered": false,
|
|
182
|
+
"breaking": false
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"name": "SecretReading",
|
|
186
|
+
"kind": "type",
|
|
187
|
+
"tier": null,
|
|
188
|
+
"at": [
|
|
189
|
+
"src/index.ts:39",
|
|
190
|
+
"src/secret-scan.ts:538"
|
|
191
|
+
],
|
|
192
|
+
"criteriaCovered": false,
|
|
193
|
+
"breaking": false
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"name": "SecretScan",
|
|
197
|
+
"kind": "type",
|
|
198
|
+
"tier": null,
|
|
199
|
+
"at": [
|
|
200
|
+
"src/index.ts:42",
|
|
201
|
+
"src/secret-scan.ts:582"
|
|
202
|
+
],
|
|
203
|
+
"criteriaCovered": false,
|
|
204
|
+
"breaking": false
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"name": "SecretScanPolicy",
|
|
208
|
+
"kind": "interface",
|
|
209
|
+
"tier": null,
|
|
210
|
+
"at": [
|
|
211
|
+
"src/index.ts:40",
|
|
212
|
+
"src/secret-scan.ts:549"
|
|
213
|
+
],
|
|
214
|
+
"criteriaCovered": false,
|
|
215
|
+
"breaking": false
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"name": "SecretSpan",
|
|
219
|
+
"kind": "interface",
|
|
220
|
+
"tier": null,
|
|
221
|
+
"at": [
|
|
222
|
+
"src/index.ts:43",
|
|
223
|
+
"src/secret-scan.ts:569"
|
|
224
|
+
],
|
|
225
|
+
"criteriaCovered": false,
|
|
226
|
+
"breaking": false
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"name": "SummarizableFinding",
|
|
230
|
+
"kind": "interface",
|
|
231
|
+
"tier": null,
|
|
232
|
+
"at": [
|
|
233
|
+
"src/index.ts:48",
|
|
234
|
+
"src/secret-scan.ts:35"
|
|
235
|
+
],
|
|
236
|
+
"criteriaCovered": false,
|
|
237
|
+
"breaking": false
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"name": "URL_OF_ANY_SCHEME",
|
|
241
|
+
"kind": "variable",
|
|
242
|
+
"tier": null,
|
|
243
|
+
"at": [
|
|
244
|
+
"src/index.ts:19",
|
|
245
|
+
"src/secret-vocabulary.ts:124"
|
|
246
|
+
],
|
|
247
|
+
"criteriaCovered": false,
|
|
248
|
+
"breaking": false
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"name": "ValueFamilyRow",
|
|
252
|
+
"kind": "interface",
|
|
253
|
+
"tier": null,
|
|
254
|
+
"at": [
|
|
255
|
+
"src/index.ts:25",
|
|
256
|
+
"src/secret-vocabulary.ts:31"
|
|
257
|
+
],
|
|
258
|
+
"criteriaCovered": false,
|
|
259
|
+
"breaking": false
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"name": "envNameView",
|
|
263
|
+
"kind": "function",
|
|
264
|
+
"tier": null,
|
|
265
|
+
"at": [
|
|
266
|
+
"src/index.ts:20",
|
|
267
|
+
"src/secret-vocabulary.ts:407"
|
|
268
|
+
],
|
|
269
|
+
"criteriaCovered": false,
|
|
270
|
+
"breaking": false
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"name": "isSecretShaped",
|
|
274
|
+
"kind": "function",
|
|
275
|
+
"tier": null,
|
|
276
|
+
"at": [
|
|
277
|
+
"src/index.ts:36",
|
|
278
|
+
"src/secret-scan.ts:854"
|
|
279
|
+
],
|
|
280
|
+
"criteriaCovered": false,
|
|
281
|
+
"breaking": false
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"name": "isSensitiveHeaderName",
|
|
285
|
+
"kind": "function",
|
|
286
|
+
"tier": null,
|
|
287
|
+
"at": [
|
|
288
|
+
"src/index.ts:23",
|
|
289
|
+
"src/secret-vocabulary.ts:512"
|
|
290
|
+
],
|
|
291
|
+
"criteriaCovered": false,
|
|
292
|
+
"breaking": false
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"name": "isSensitiveRecordKey",
|
|
296
|
+
"kind": "function",
|
|
297
|
+
"tier": null,
|
|
298
|
+
"at": [
|
|
299
|
+
"src/index.ts:22",
|
|
300
|
+
"src/secret-vocabulary.ts:501"
|
|
301
|
+
],
|
|
302
|
+
"criteriaCovered": false,
|
|
303
|
+
"breaking": false
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
"name": "renderSecrets",
|
|
307
|
+
"kind": "function",
|
|
308
|
+
"tier": null,
|
|
309
|
+
"at": [
|
|
310
|
+
"src/index.ts:37",
|
|
311
|
+
"src/secret-scan.ts:757"
|
|
312
|
+
],
|
|
313
|
+
"criteriaCovered": false,
|
|
314
|
+
"breaking": false
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"name": "scanSecrets",
|
|
318
|
+
"kind": "function",
|
|
319
|
+
"tier": null,
|
|
320
|
+
"at": [
|
|
321
|
+
"src/index.ts:35",
|
|
322
|
+
"src/secret-scan.ts:832"
|
|
323
|
+
],
|
|
324
|
+
"criteriaCovered": false,
|
|
325
|
+
"breaking": false
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
"name": "splitCamelCase",
|
|
329
|
+
"kind": "function",
|
|
330
|
+
"tier": null,
|
|
331
|
+
"at": [
|
|
332
|
+
"src/index.ts:21",
|
|
333
|
+
"src/secret-vocabulary.ts:422"
|
|
334
|
+
],
|
|
335
|
+
"criteriaCovered": false,
|
|
336
|
+
"breaking": false
|
|
337
|
+
}
|
|
338
|
+
],
|
|
339
|
+
"removed": [],
|
|
340
|
+
"changed": [],
|
|
341
|
+
"narrowed": [],
|
|
342
|
+
"closedSetMembers": [
|
|
343
|
+
{
|
|
344
|
+
"set": "CredentialWordPosition",
|
|
345
|
+
"at": [
|
|
346
|
+
"src/secret-vocabulary.ts:59"
|
|
347
|
+
],
|
|
348
|
+
"newSet": true,
|
|
349
|
+
"added": [
|
|
350
|
+
"counted-plural",
|
|
351
|
+
"embedded",
|
|
352
|
+
"leading",
|
|
353
|
+
"plural",
|
|
354
|
+
"separated"
|
|
355
|
+
],
|
|
356
|
+
"removed": [],
|
|
357
|
+
"breaking": false,
|
|
358
|
+
"criteriaCovered": false
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
"set": "RedactionConfidence",
|
|
362
|
+
"at": [
|
|
363
|
+
"src/secret-vocabulary.ts:24"
|
|
364
|
+
],
|
|
365
|
+
"newSet": true,
|
|
366
|
+
"added": [
|
|
367
|
+
"high",
|
|
368
|
+
"low",
|
|
369
|
+
"medium"
|
|
370
|
+
],
|
|
371
|
+
"removed": [],
|
|
372
|
+
"breaking": false,
|
|
373
|
+
"criteriaCovered": false
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
"set": "RedactionSource",
|
|
377
|
+
"at": [
|
|
378
|
+
"src/secret-vocabulary.ts:28"
|
|
379
|
+
],
|
|
380
|
+
"newSet": true,
|
|
381
|
+
"added": [
|
|
382
|
+
"arg-summary",
|
|
383
|
+
"secret-env",
|
|
384
|
+
"untrusted-egress"
|
|
385
|
+
],
|
|
386
|
+
"removed": [],
|
|
387
|
+
"breaking": false,
|
|
388
|
+
"criteriaCovered": false
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
"set": "SECRET_READING_KINDS",
|
|
392
|
+
"at": [
|
|
393
|
+
"src/secret-scan.ts:536"
|
|
394
|
+
],
|
|
395
|
+
"newSet": true,
|
|
396
|
+
"added": [
|
|
397
|
+
"format-free",
|
|
398
|
+
"raw"
|
|
399
|
+
],
|
|
400
|
+
"removed": [],
|
|
401
|
+
"breaking": false,
|
|
402
|
+
"criteriaCovered": false
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
"set": "SecretGrade",
|
|
406
|
+
"at": [
|
|
407
|
+
"src/secret-scan.ts:530"
|
|
408
|
+
],
|
|
409
|
+
"newSet": true,
|
|
410
|
+
"added": [
|
|
411
|
+
"strict",
|
|
412
|
+
"wide"
|
|
413
|
+
],
|
|
414
|
+
"removed": [],
|
|
415
|
+
"breaking": false,
|
|
416
|
+
"criteriaCovered": false
|
|
417
|
+
}
|
|
418
|
+
],
|
|
419
|
+
"closedSetsUnreadable": [],
|
|
420
|
+
"typeKeys": [],
|
|
421
|
+
"typeKeysUnreadableArms": [],
|
|
422
|
+
"typeKeysFlattenedCount": 1,
|
|
423
|
+
"signatures": [],
|
|
424
|
+
"versionLiterals": [],
|
|
425
|
+
"declarationMoves": [],
|
|
426
|
+
"mintMoves": [],
|
|
427
|
+
"criteriaObserves": [],
|
|
428
|
+
"consumersHint": {
|
|
429
|
+
"cli": [
|
|
430
|
+
"CredentialWordPosition",
|
|
431
|
+
"RedactionFinding",
|
|
432
|
+
"RedactionReport",
|
|
433
|
+
"RenderOptions"
|
|
434
|
+
],
|
|
435
|
+
"server": [
|
|
436
|
+
"SecretSpan",
|
|
437
|
+
"SummarizableFinding"
|
|
438
|
+
],
|
|
439
|
+
"sdk": [],
|
|
440
|
+
"note": "scanned cli@f973e484 server@96a91d82 sdk@d5aed66 — a name listed is MENTIONED there today, which is evidence of consumption, not proof of it. Ledger files (**/docs/core-consumption/**, **/docs/wire-consumption/**, **/*LEDGER*.json) are not evidence of use — server: 4 name(s) matched ONLY in bookkeeping files and were set aside (RedactionConfidence, RedactionFinding, RedactionReport, RedactionSource)"
|
|
441
|
+
},
|
|
442
|
+
"breakingCount": 0,
|
|
443
|
+
"breakingItems": [],
|
|
444
|
+
"toResolvedAt": "578c77b1a5e127bea88d7f7c05ce56f250c46446"
|
|
445
|
+
}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import type { MemoryStore } from "./memory.js";
|
|
2
|
-
import { type ConsolidationLLM, type ConsolidationStats } from "./runner/memory-consolidation.js";
|
|
3
|
-
/**
|
|
4
|
-
* design/84 Seam B (M6+M10) — **cursor-incremental scope consolidation**. A thin function over the pure
|
|
5
|
-
* {@link runMemoryConsolidation}: it reads the scope's persisted cursor, feeds ONLY the notes appended
|
|
6
|
-
* AFTER it (the incremental batch) into one reconcile pass, then — IFF the whole pass succeeds — advances
|
|
7
|
-
* the cursor to the high-water mark it observed. This is the externally-triggerable periodic path (a
|
|
8
|
-
* deployment's timer / N-session gate fires it); the TRIGGER and any cross-process LOCK live OUTSIDE this
|
|
9
|
-
* function (the deployment shell's exec/persist axes — see {@link ConsolidateScopeOptions.acquire}).
|
|
10
|
-
*
|
|
11
|
-
* **Cursor marker semantics (no-miss / no-dup):** the cursor is an OPAQUE ordering marker the STORE defines
|
|
12
|
-
* (this core never parses it). In the three reference stores it is a note **id** — `uuidv7`, which is
|
|
13
|
-
* lexicographically time-sortable, so "after the cursor" is a string `>` comparison and the high-water mark
|
|
14
|
-
* is the lexicographic MAX. Each pass:
|
|
15
|
-
* - reads `cursor = getConsolidationCursor(scope)` (undefined ⇒ whole scope pending),
|
|
16
|
-
* - lists the scope's note headers (stable store ordering) and keeps those with `id > cursor` AND not
|
|
17
|
-
* already `consolidationGenerated` (a prior pass's own output — excluded so it is never re-merged),
|
|
18
|
-
* - reconciles that incremental batch via `runMemoryConsolidation` (which itself re-excludes
|
|
19
|
-
* `consolidationGenerated` + this-batch ids from each note's candidate set),
|
|
20
|
-
* - advances the cursor to the high-water mark of the fed batch ∪ `stats.addedIds`, but capped STRICTLY
|
|
21
|
-
* BELOW the smallest note this pass FAILED to process (`stats.failedIds`) — a contiguous successful-prefix
|
|
22
|
-
* marker, not the plain max (the MAJOR1 BLOCKER: a single max marker cannot keep a sub-max failed note
|
|
23
|
-
* pending; see {@link cappedHighWater}).
|
|
24
|
-
* No-dup: a note with `id <= cursor` is never re-fed. No-miss: a note appended after the advance, or one at/
|
|
25
|
-
* above a failure floor this pass, keeps `id > cursor` (uuidv7 monotonic) and is picked up by a later pass. A
|
|
26
|
-
* pass's own ADDs carry `consolidationGenerated:true` AND (when below the failure floor) are folded into the
|
|
27
|
-
* high-water mark, so they are excluded twice over.
|
|
28
|
-
*
|
|
29
|
-
* **Whole-pass advance (decision 3):** the cursor advances (up to the success boundary) ONLY when the pass
|
|
30
|
-
* returns (no throw). A pass that THROWS (LLM hard failure) does NOT advance at all — the batch is fully
|
|
31
|
-
* retried next time. A pass that returns with per-note failures advances only past the contiguous successful
|
|
32
|
-
* prefix below the smallest failure (fail-open: at worst a near-duplicate survives an extra pass, never data
|
|
33
|
-
* loss; consistent with the memory-store contract).
|
|
34
|
-
*
|
|
35
|
-
* **No-op safety (the BLOCKER §2 closes):** when the store lacks the cursor pair
|
|
36
|
-
* ({@link supportsPeriodicConsolidation} false) this is a NO-OP that calls `onWarn` — it NEVER degrades into a
|
|
37
|
-
* full re-consolidation of the whole scope (which would re-merge already-consolidated notes forever). It is
|
|
38
|
-
* also a no-op when the store can't consolidate at all ({@link supportsConsolidation} false) or the manifest
|
|
39
|
-
* read pair ({@link MemoryStore.listStructuredNotes} / {@link MemoryStore.getByIds}) is incomplete.
|
|
40
|
-
*/
|
|
41
|
-
export interface ConsolidateScopeDeps {
|
|
42
|
-
store: MemoryStore;
|
|
43
|
-
llm: ConsolidationLLM;
|
|
44
|
-
/** Routes diagnostics (skipped decisions, no-op-because-unsupported, lock-busy) — same sink as the Runner's
|
|
45
|
-
* `onError(phase:"memory")`. Never throws back into this function. */
|
|
46
|
-
onWarn?: (err: unknown) => void;
|
|
47
|
-
/**
|
|
48
|
-
* design/84 Seam B (TOC profile) — OPTIONAL cross-process consolidation lock. When provided,
|
|
49
|
-
* {@link consolidateScope} acquires it for `scope` before the pass and releases it after; a `release` of
|
|
50
|
-
* `undefined` (lock busy) makes the pass a NO-OP (another process is already consolidating this scope).
|
|
51
|
-
* The implementation (writeThenLink + stale-PID prune) lives in the deployment shell (`stores/file`), NOT
|
|
52
|
-
* core — core only DEFINES the injection point (the constitutional persist/exec-axis split).
|
|
53
|
-
*/
|
|
54
|
-
acquire?: (scope: string) => Promise<(() => void) | undefined> | (() => void) | undefined;
|
|
55
|
-
}
|
|
56
|
-
/** Tuning for one {@link consolidateScope} pass (mirrors the inline consolidation settings; all optional). */
|
|
57
|
-
export interface ConsolidateScopeOptions {
|
|
58
|
-
band?: {
|
|
59
|
-
lo: number;
|
|
60
|
-
hi: number;
|
|
61
|
-
};
|
|
62
|
-
searchLimit?: number;
|
|
63
|
-
/** Cap on notes fed into ONE pass (token bound). The cursor advances only past the contiguous SUCCESSFUL
|
|
64
|
-
* prefix of the FED batch (the first `maxNotes` pending) — never past the un-fed tail beyond the cap, and
|
|
65
|
-
* never past a note this pass FAILED to process — so a backlog larger than `maxNotes`, and any failed note,
|
|
66
|
-
* keep `id > cursor` and drain over successive passes without ever re-feeding the notes already handled. */
|
|
67
|
-
maxNotes?: number;
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Run ONE cursor-incremental consolidation pass for `scope` (design/84 Seam B). Returns the pass stats
|
|
71
|
-
* (or `undefined` when it was a no-op: unsupported store, empty incremental batch, or lock busy). Never
|
|
72
|
-
* throws for a no-op reason; a hard LLM failure inside `runMemoryConsolidation` propagates (the caller's
|
|
73
|
-
* fire-and-forget envelope catches it) and the cursor is left UN-advanced (the batch retries next pass).
|
|
74
|
-
*/
|
|
75
|
-
export declare function consolidateScope(scope: string, deps: ConsolidateScopeDeps, opts?: ConsolidateScopeOptions): Promise<ConsolidationStats | undefined>;
|
|
76
|
-
/**
|
|
77
|
-
* design/84 Seam B (切片 4) — advance ONLY the cursor after an INLINE (task-end) consolidation pass has
|
|
78
|
-
* already run, so a later periodic {@link consolidateScope} starts from the inline-processed high-water mark
|
|
79
|
-
* (it does NOT re-consolidate the notes the inline pass just handled). The inline path consolidates the
|
|
80
|
-
* notes the model saved THIS task (the newest, highest-id notes); advancing the cursor over the PROCESSED
|
|
81
|
-
* ids ∪ addedIds makes inline and periodic share ONE cursor.
|
|
82
|
-
*
|
|
83
|
-
* **MAJOR1 BLOCKER:** the advance caps STRICTLY BELOW the smallest FAILED note (`failedIds`). A single
|
|
84
|
-
* max-marker cursor cannot keep a sub-max failed note pending, so a low-id note whose handling failed must
|
|
85
|
-
* stop the cursor below it even when a higher-id sibling succeeded — otherwise the failed note (id <= the
|
|
86
|
-
* plain max) would lose `id > cursor` and be exiled from consolidation forever. Pass the pass's
|
|
87
|
-
* `stats.consolidatedIds` (processed), `stats.addedIds`, and `stats.failedIds`.
|
|
88
|
-
*
|
|
89
|
-
* No-op when the store lacks the cursor pair (back-compat, RL-1654-consolidate-scope: an old store keeps the pure-inline behavior).
|
|
90
|
-
* Never throws — a cursor-advance failure routes to `onWarn` (the inline notes are already durable; the
|
|
91
|
-
* worst case is the next periodic pass re-sees them, which `runMemoryConsolidation` handles idempotently).
|
|
92
|
-
*/
|
|
93
|
-
export declare function advanceCursorAfterInline(store: MemoryStore, scope: string, seenNoteIds: ReadonlyArray<string | undefined>, addedIds: ReadonlyArray<string>, failedIds?: ReadonlyArray<string>, onWarn?: (err: unknown) => void): Promise<void>;
|