@sema-agent/core 7.63.0 → 7.65.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 +725 -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.js +25 -5
- package/dist/core/allow-entry.d.ts +4 -0
- package/dist/core/ask-origin.d.ts +1 -1
- package/dist/core/ask-origin.js +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/auto-promote.d.ts +3 -2
- package/dist/core/background-agent-store.d.ts +14 -0
- package/dist/core/background-agent-store.js +3 -0
- package/dist/core/checkpoint-queries.d.ts +9 -6
- package/dist/core/checkpoint-queries.js +8 -3
- package/dist/core/checkpoint-store.d.ts +7 -4
- package/dist/core/context-settings.d.ts +39 -9
- package/dist/core/context-settings.js +32 -10
- package/dist/core/engine-attestation.d.ts +26 -6
- package/dist/core/engine-attestation.js +5 -1
- package/dist/core/engine-notice.d.ts +37 -2
- package/dist/core/engine-notice.js +3 -1
- 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 +30 -2
- package/dist/core/file-history-store.js +48 -9
- package/dist/core/fs-write-gate-policy.js +1 -1
- package/dist/core/gate-fold.js +5 -1
- 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/governance-codes.d.ts +8 -4
- package/dist/core/governance-codes.js +8 -3
- package/dist/core/leg-identity.d.ts +35 -1
- package/dist/core/leg-identity.js +10 -0
- package/dist/core/mailbox-store.d.ts +39 -4
- package/dist/core/mailbox-store.js +14 -2
- package/dist/core/memory-engine/consolidation.d.ts +13 -6
- package/dist/core/memory-engine/consolidation.js +26 -0
- package/dist/core/memory-engine/control-objects.d.ts +58 -0
- package/dist/core/memory-engine/control-objects.js +273 -0
- package/dist/core/memory-engine/control-plane-adoption.d.ts +51 -0
- package/dist/core/memory-engine/control-plane-adoption.js +161 -0
- package/dist/core/memory-engine/delegation-settlement.d.ts +73 -40
- package/dist/core/memory-engine/delegation-settlement.js +271 -107
- package/dist/core/memory-engine/dual-root.d.ts +3 -2
- package/dist/core/memory-engine/dual-root.js +7 -3
- package/dist/core/memory-engine/engine.d.ts +54 -33
- package/dist/core/memory-engine/engine.js +150 -157
- package/dist/core/memory-engine/file-backend.d.ts +58 -76
- package/dist/core/memory-engine/file-backend.js +111 -268
- package/dist/core/memory-engine/index.d.ts +3 -2
- package/dist/core/memory-engine/index.js +2 -1
- package/dist/core/memory-engine/layout.d.ts +135 -50
- package/dist/core/memory-engine/layout.js +214 -89
- package/dist/core/memory-engine/memory-age.d.ts +12 -0
- package/dist/core/memory-engine/memory-age.js +17 -0
- package/dist/core/memory-engine/memory-backend-contract.d.ts +10 -3
- package/dist/core/memory-engine/memory-backend-contract.js +159 -2
- package/dist/core/memory-engine/memory-deployment.d.ts +12 -4
- package/dist/core/memory-engine/memory-deployment.js +31 -6
- package/dist/core/memory-engine/origin-clearance.d.ts +12 -3
- package/dist/core/memory-engine/origin-clearance.js +64 -9
- package/dist/core/memory-engine/session-write-home.d.ts +34 -1
- package/dist/core/memory-engine/session-write-home.js +37 -10
- package/dist/core/memory-engine/tools.d.ts +2 -2
- package/dist/core/memory-engine/tools.js +7 -7
- package/dist/core/memory-engine/types.d.ts +55 -12
- package/dist/core/memory-engine/types.js +2 -1
- package/dist/core/memory-vector.d.ts +6 -14
- package/dist/core/memory.d.ts +0 -462
- package/dist/core/memory.js +0 -333
- 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/tool-call.js +3 -4
- package/dist/core/parent-spec-seat.d.ts +2 -2
- package/dist/core/peer-channel.d.ts +5 -0
- package/dist/core/permission-rule-consent.d.ts +64 -22
- package/dist/core/permission-rule-consent.js +106 -58
- package/dist/core/permission-rule-store.d.ts +56 -21
- package/dist/core/permission-rule-store.js +2 -0
- package/dist/core/refusal-echo.d.ts +20 -0
- package/dist/core/refusal-echo.js +33 -0
- package/dist/core/retention.d.ts +175 -10
- package/dist/core/retention.js +44 -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/classifier-ladder.d.ts +10 -2
- 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 +28 -9
- package/dist/core/runner/delegation-owner.d.ts +2 -3
- package/dist/core/runner/delegation-owner.js +2 -1
- package/dist/core/runner/gate-exit.d.ts +6 -0
- package/dist/core/runner/gate-exit.js +11 -2
- package/dist/core/runner/memory-consolidation-driver.d.ts +4 -2
- package/dist/core/runner/memory-consolidation-driver.js +8 -5
- package/dist/core/runner/prepare-ask-lane.js +3 -3
- package/dist/core/runner/prepare-caps-and-workflow.d.ts +3 -1
- package/dist/core/runner/prepare-caps-and-workflow.js +2 -2
- 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-gate-stations.d.ts +8 -0
- package/dist/core/runner/prepare-gate-stations.js +15 -7
- package/dist/core/runner/prepare-hands-readface.js +1 -1
- package/dist/core/runner/prepare-inherited-gate.d.ts +3 -1
- package/dist/core/runner/prepare-inherited-gate.js +4 -2
- package/dist/core/runner/prepare-memory-engine-session.js +1 -1
- package/dist/core/runner/prepare-memory.d.ts +4 -0
- package/dist/core/runner/prepare-memory.js +22 -28
- package/dist/core/runner/prepare-policy-chain.js +18 -10
- package/dist/core/runner/prepare-prompt-inputs.js +1 -1
- package/dist/core/runner/prepare-task.d.ts +5 -1
- package/dist/core/runner/prepare-task.js +16 -11
- 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/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 +8 -4
- package/dist/core/runner/run-notification-lane.js +23 -23
- package/dist/core/runner/run-recovery-lanes.js +3 -3
- 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/sub-agent-deny-lists.d.ts +19 -0
- package/dist/core/runner/sub-agent-deny-lists.js +25 -0
- 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 +1 -1
- package/dist/core/secret-env.d.ts +2 -2
- package/dist/core/secret-env.js +6 -20
- package/dist/core/session-checkout.d.ts +63 -3
- package/dist/core/session-checkout.js +152 -58
- package/dist/core/session-store.d.ts +6 -6
- package/dist/core/session-store.js +3 -3
- package/dist/core/shell-read-silence.js +8 -0
- package/dist/core/store-contracts/background-agent-store-contract.js +13 -0
- package/dist/core/store-contracts/peer-directory-contract.js +8 -1
- package/dist/core/task-event.d.ts +9 -5
- package/dist/core/task-notification.d.ts +137 -31
- package/dist/core/task-notification.js +198 -100
- package/dist/core/task-registry-agent.d.ts +11 -0
- package/dist/core/task-registry-agent.js +12 -3
- package/dist/core/task-registry-shared.d.ts +11 -0
- package/dist/core/task-registry.d.ts +18 -0
- package/dist/core/task-registry.js +27 -8
- package/dist/core/task-spec.d.ts +7 -2
- package/dist/core/tool-errors.d.ts +17 -9
- package/dist/core/tool-errors.js +1 -1
- package/dist/core/tool-policy.d.ts +18 -1
- package/dist/core/tool-policy.js +16 -7
- package/dist/core/tool-result-store.d.ts +20 -0
- package/dist/core/tool-spec.d.ts +10 -6
- package/dist/core/trace.d.ts +3 -2
- 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/write-protect.d.ts +16 -0
- package/dist/core/write-protect.js +10 -0
- package/dist/engine/compaction/compaction.d.ts +2 -1
- package/dist/engine/harness/types.d.ts +1 -0
- package/dist/engine/session/repo-utils.d.ts +14 -4
- package/dist/engine/session/repo-utils.js +5 -4
- package/dist/engine/session/session.d.ts +7 -1
- package/dist/engine/session/session.js +5 -2
- package/dist/index.d.ts +13 -11
- package/dist/index.js +13 -11
- package/dist/orchestration/run-workflow-tool.d.ts +4 -0
- package/dist/orchestration/run-workflow-tool.js +7 -0
- package/dist/orchestration/workflow-types.d.ts +2 -1
- package/dist/orchestration/workflow.d.ts +3 -0
- package/dist/orchestration/workflow.js +2 -1
- package/dist/prompts/default.d.ts +1 -2
- package/dist/scenarios/full-body.d.ts +1 -1
- package/dist/stores/file/adoption/adopt.d.ts +1 -1
- 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 +12 -16
- package/dist/stores/file/index.js +7 -25
- package/dist/stores/file/permission-rule-store.d.ts +34 -0
- package/dist/stores/file/permission-rule-store.js +104 -9
- package/dist/stores/file/session-store.js +1 -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/read-deny.d.ts +15 -2
- package/dist/tools/fs/read-deny.js +10 -2
- package/dist/tools/fs/shell-read-check.d.ts +8 -2
- package/dist/tools/fs/shell-read-check.js +7 -7
- package/package.json +2 -2
- package/test/export-surface.snapshot.json +71 -73
- package/wire-changes/core-stores-sql@7.64.0.json +30 -0
- package/wire-changes/core-stores-sql@7.65.0.json +30 -0
- package/wire-changes/core@7.64.0.json +2653 -0
- package/wire-changes/core@7.65.0.json +1650 -0
- package/wire-changes/mods-kernel@7.64.0.json +30 -0
- package/wire-changes/mods-kernel@7.65.0.json +30 -0
- package/wire-changes/primitives@7.64.0.json +30 -0
- package/wire-changes/primitives@7.65.0.json +337 -0
- package/dist/core/memory-recall.d.ts +0 -208
- package/dist/core/memory-recall.js +0 -136
- package/dist/stores/file/memory-store.d.ts +0 -124
- package/dist/stores/file/memory-store.js +0 -353
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { EngineNotice } from "../types.js";
|
|
2
2
|
import { type ConsolidationGateRead, type ConsolidationGateRow, type ConsolidationPlanFile, type ConsolidationProposal, type ConsolidationRunStopReason, type ConsolidationWriteGate, type MemoryConsolidationOptions } from "./consolidation.js";
|
|
3
3
|
import { foreignDanglingSessionAccounts, type SessionAccountWrite, type EffectiveSettlement, type HoldRow } from "./delegation-settlement.js";
|
|
4
|
+
import { type SessionWriteHomeReading } from "./session-write-home.js";
|
|
4
5
|
import { type OriginClearanceRow } from "./origin-clearance.js";
|
|
5
6
|
import { type CommittedBinding, type EraseMemoryEntriesInput, type MemoryErasureAttestation, type TransferEvidence } from "./file-backend.js";
|
|
6
7
|
import { type MemoryExportBundle, type MemoryImportReport } from "./export-bundle.js";
|
|
@@ -129,12 +130,14 @@ export declare const MEMORY_PREFERENCE_DISCIPLINE = "When the user confirms a st
|
|
|
129
130
|
* so the correction is a trailing coda, not a rewrite — in two scopes, because the two mounting
|
|
130
131
|
* seats speak about different things (an unqualified "the memory store is not writable" beside
|
|
131
132
|
* another, WRITABLE plane's instruction would negate that plane's guidance):
|
|
132
|
-
* - PLANE scope, attached by `inject()` right after a read-only layering's own
|
|
133
|
+
* - PLANE scope, attached by `inject()` right after a read-only layering's own notices reminder:
|
|
133
134
|
* explicitly local to the immediately preceding notices, so a mixed dual-root merge keeps the
|
|
134
135
|
* writable plane's instruction and announcements fully actionable.
|
|
135
|
-
* - SESSION scope, attached by the runner
|
|
136
|
-
* there is no writable instruction left standing
|
|
137
|
-
* wording is accurate. Name-free by construction (#181 class).
|
|
136
|
+
* - SESSION scope, attached by the runner after all the notices when the whole session cannot
|
|
137
|
+
* persist: there is no writable instruction left standing (it is replaced or absent), so the
|
|
138
|
+
* global wording is accurate. Name-free by construction (#181 class).
|
|
139
|
+
* A coda is its own reminder, minted right after the notices it qualifies (#1123: the notices ride a
|
|
140
|
+
* user message, where an engine sentence outside a reminder would read as the user's words).
|
|
138
141
|
*/
|
|
139
142
|
export declare const MEMORY_ANNOUNCEMENT_READONLY_PLANE_CODA = "The notices immediately above concern a READ-ONLY memory store: any guidance in them to record, update, or tombstone an entry cannot be applied to that store this session \u2014 surface it to the user instead of claiming it done.";
|
|
140
143
|
export declare const MEMORY_ANNOUNCEMENT_READONLY_CODA = "The memory store itself is not writable this session, so any guidance above to record, update, or tombstone a memory entry cannot be applied here \u2014 surface it to the user instead of claiming it done.";
|
|
@@ -195,8 +198,8 @@ export declare const MEMORY_CAPTURE_OPTOUT_NOTICE = "# Memory\n\nMemory capture
|
|
|
195
198
|
* not {@link MEMORY_CAPTURE_OPTOUT_NOTICE} ("at the user's request" would put words in the user's mouth over an
|
|
196
199
|
* outage), not {@link MEMORY_READONLY_NOTICE} (a session-wide categorical claim, false once the store answers or a
|
|
197
200
|
* later run mounts: the honest tense is "right now"). The closing correction folds the announcement-coda duty and is
|
|
198
|
-
*
|
|
199
|
-
* "above"
|
|
201
|
+
* LOCATION-FREE on purpose: the drained notices ride the leg's first request, not this section (#1123), so neither a
|
|
202
|
+
* locator pointing "above" nor one naming "this memory section" would reach them. The second paragraph splices {@link MEMORY_RECALL_FRAMING}.
|
|
200
203
|
*/
|
|
201
204
|
export interface MemoryUnavailableFacts {
|
|
202
205
|
what: "capture-record-unreadable" | "mount-failed";
|
|
@@ -359,15 +362,20 @@ export interface MemoryInjection {
|
|
|
359
362
|
* counterfeit it, tool-name-free because the engine cannot vouch for the roster). Undefined
|
|
360
363
|
* when empty. */
|
|
361
364
|
index?: string;
|
|
362
|
-
/** design/138 S2-B (时机①) — the announcements DRAINED by this inject (queued by
|
|
363
|
-
* session
|
|
364
|
-
* {@link
|
|
365
|
+
/** design/138 S2-B (时机①) — the announcements DRAINED by this inject (queued by a harvest of
|
|
366
|
+
* this or an earlier session / the backend's read-side external-change detection). Rendered into
|
|
367
|
+
* {@link announceBlock}; exposed raw for observability/tests. Absent when the queue was empty. */
|
|
365
368
|
announcements?: MemoryAnnouncement[];
|
|
366
|
-
/** The
|
|
367
|
-
*
|
|
368
|
-
*
|
|
369
|
+
/** The drained announcements, RENDERED: one engine reminder of notices, followed — for a read-only
|
|
370
|
+
* layering — by the plane coda in a reminder of its own. An EVENT, not state (#1123): it is NOT part
|
|
371
|
+
* of {@link block}. The Runner delivers it once, on the leg's first request (ahead of the user's
|
|
372
|
+
* message), so the cached prompt prefix never carries it; a host driving the engine directly places
|
|
373
|
+
* it the same way. Dual-root merging composes from STRUCTURED fields (design/142 S2b). Absent when
|
|
374
|
+
* the queue was empty. */
|
|
369
375
|
announceBlock?: string;
|
|
370
|
-
/** `instruction + index
|
|
376
|
+
/** `instruction + index` — the memory store's STATE, what the Runner mounts in the stable-prefix
|
|
377
|
+
* memory slot. Byte-identical across runs until the state itself changes; the drained notices are
|
|
378
|
+
* {@link announceBlock} (#1123). */
|
|
371
379
|
block: string;
|
|
372
380
|
/**
|
|
373
381
|
* RB-276 — the materialized MEMORY.md whose FULL disk text rides in this injection, for prepare-task
|
|
@@ -1076,9 +1084,9 @@ export declare class MemoryEngine {
|
|
|
1076
1084
|
* ignore it exactly as before.
|
|
1077
1085
|
*/
|
|
1078
1086
|
markSessionPolluted(sessionId: string, reason: string, cause?: import("./types.js").MemoryOriginCause): Promise<SessionPollutionMarkOutcome>;
|
|
1079
|
-
/** The session's pollution record (in-process mark first, then the durable marker
|
|
1080
|
-
* clean. Reads are side-effect-free. */
|
|
1081
|
-
sessionPollution(sessionId: string): SessionPollutionRecord | undefined
|
|
1087
|
+
/** The session's pollution record (in-process mark first, then the durable marker kept by the
|
|
1088
|
+
* governance store) — undefined = clean. Reads are side-effect-free. */
|
|
1089
|
+
sessionPollution(sessionId: string): Promise<SessionPollutionRecord | undefined>;
|
|
1082
1090
|
/** design/383 §2.1b — the record carrier (defaults to the file trio over this control dir). */
|
|
1083
1091
|
private readonly captureRecords;
|
|
1084
1092
|
/** In-process half of the one-way record: a session opted out in THIS process reads opted-out here
|
|
@@ -1263,8 +1271,8 @@ export declare class MemoryEngine {
|
|
|
1263
1271
|
* (conflicts reported, replay converges), and the attestation carries
|
|
1264
1272
|
* `evidenceCapability: "none"` + `custodyState: "capability-absent"` throughout — a silent
|
|
1265
1273
|
* downgrade is the forbidden shape. The read faces show this lane no carrier beyond the deleted
|
|
1266
|
-
* entries, so every store carrier class
|
|
1267
|
-
* degraded lane never answers `complete`. Applied deletes close their lineage rows (the same
|
|
1274
|
+
* entries, so every store carrier class but `quarantineCopy` (its copies deleted by id, {@link eraseQuarantineCopies})
|
|
1275
|
+
* answers `unverified` (and `replay: "unsupported"`): the degraded lane never answers `complete`. Applied deletes close their lineage rows (the same
|
|
1268
1276
|
* space hygiene the organic tombstone path takes).
|
|
1269
1277
|
*
|
|
1270
1278
|
* Authorization: `input.expectedScopes` (the import's seat; contract on its JSDoc). A grant-bearing
|
|
@@ -1320,8 +1328,8 @@ export declare class MemoryEngine {
|
|
|
1320
1328
|
*
|
|
1321
1329
|
* Failure posture is the control plane's existing fail-closed law: a corrupt lineage or challenge
|
|
1322
1330
|
* ledger THROWS (`ControlPlaneCorruptError` — an answer is never assembled over an account whose
|
|
1323
|
-
* integrity is unknown), and the backend's own refusals (
|
|
1324
|
-
* fence) propagate. CAPABILITY ABSENCE is not failure: a backend without the audit faces answers
|
|
1331
|
+
* integrity is unknown), and the backend's own refusals (a ledger it refuses, a contended
|
|
1332
|
+
* snapshot fence) propagate. CAPABILITY ABSENCE is not failure: a backend without the audit faces answers
|
|
1325
1333
|
* `binding: "unknown"` / `contentState: "capability-absent"` / `custody: "capability-absent"` —
|
|
1326
1334
|
* reported honestly, never fabricated and never a throw (#196 absence-reports-not-silent-green).
|
|
1327
1335
|
*/
|
|
@@ -1471,23 +1479,20 @@ export declare class MemoryEngine {
|
|
|
1471
1479
|
resolveSettlement(settleId: string, to: "clean" | "external", requestId: string): Promise<void>;
|
|
1472
1480
|
/** §4.2③ — the hold valve: `"release"` commits the held entry at the next harvest WITH a
|
|
1473
1481
|
* `"static"`-cause marker (a valve release is not a cleanliness proof); `"discard"` disposes it
|
|
1474
|
-
* to quarantine. Audited (requestId required).
|
|
1475
|
-
|
|
1482
|
+
* to quarantine. Audited (requestId required). Answers a Promise: the verdict is written to the hold ledger through
|
|
1483
|
+
* the governance store; a refused call (`memory.hold_resolve_*`) rejects it. */
|
|
1484
|
+
resolveHold(holdId: string, action: "release" | "discard", requestId: string): Promise<void>;
|
|
1476
1485
|
/** §3.6 — the session-account valve: close a dangling foreign row WITHOUT adjudication (the
|
|
1477
1486
|
* residue arm keeps firing until the next full-domain harvest closes normally — a valve close
|
|
1478
1487
|
* must not launder the window it covers). It also ends the session's leg (no live writer of its
|
|
1479
1488
|
* layer any more). Audited (requestId required). */
|
|
1480
1489
|
resolveSessionAccount(sessionId: string, requestId: string): Promise<void>;
|
|
1481
|
-
/** The engine's control-plane directory (the sidecar home: pollution markers, lineage/challenge
|
|
1482
|
-
* ledgers, and the design/336 settlement/hold/session accounts). Exposed so a host (and the
|
|
1483
|
-
* runner's settlement handle) can address the SAME plane the engine writes — a second derivation
|
|
1484
|
-
* would be a drift seam. */
|
|
1485
|
-
get controlPlaneDir(): string;
|
|
1486
1490
|
/** Read face: every delegation settlement row with its folded effective status (host audit). */
|
|
1487
1491
|
readDelegationSettlements(): Promise<EffectiveSettlement[]>;
|
|
1488
|
-
/** Read face: every instruction-hold row (host audit; custody bytes are addressable
|
|
1489
|
-
* `captureName
|
|
1490
|
-
|
|
1492
|
+
/** Read face: every instruction-hold row (host audit; custody bytes are addressable as the governance store's
|
|
1493
|
+
* `hold` object `captureName`, and a disposed hold's as its `quarantine` object `disposition.quarantineName`). Answers
|
|
1494
|
+
* a Promise: the ledger is read through the governance store. */
|
|
1495
|
+
readInstructionHolds(): Promise<HoldRow[]>;
|
|
1491
1496
|
/** Read face: the dangling foreign session-account rows a given session would classify residue
|
|
1492
1497
|
* against (host audit for the §3.6 valve). */
|
|
1493
1498
|
readDanglingSessionAccounts(selfSessionId: string): Promise<Awaited<ReturnType<typeof foreignDanglingSessionAccounts>>>;
|
|
@@ -1710,8 +1715,10 @@ export declare class MemoryEngine {
|
|
|
1710
1715
|
* Host read face: the engine's RESOLVED control-plane directory (the same coordinate a
|
|
1711
1716
|
* directory-pinned backend already publishes as `controlPlaneRoot`; this accessor answers it
|
|
1712
1717
|
* after the engine's own precedence — backend pin > constructor argument > derived default).
|
|
1713
|
-
* The
|
|
1714
|
-
*
|
|
1718
|
+
* The one accessor of that directory: the runner's settlement handle and the capture floor's
|
|
1719
|
+
* plane coordinate read it here, so a host and the runner address the SAME plane the engine
|
|
1720
|
+
* writes (a second derivation would be a drift seam). Path knowledge is not authority — nothing
|
|
1721
|
+
* here bypasses a verb.
|
|
1715
1722
|
*/
|
|
1716
1723
|
get controlPlaneRoot(): string;
|
|
1717
1724
|
/** The store this engine keeps its consolidation state in: the backend's own (`MemoryBackend.governance`) when it
|
|
@@ -1766,6 +1773,15 @@ export declare class MemoryEngine {
|
|
|
1766
1773
|
* Never throws — an unreadable source is an absent key, which IS the answer.
|
|
1767
1774
|
*/
|
|
1768
1775
|
sessionMemoryStatus(sessionId: string): Promise<SessionMemoryStatus>;
|
|
1776
|
+
/**
|
|
1777
|
+
* {@link sessionMemoryStatus} with the reading that named (or failed to name) its `writeHome`, from the same one pass over
|
|
1778
|
+
* the ledgers: what a deployment of several stores needs to choose among the stores' homes by the law each store applies
|
|
1779
|
+
* to its own two sources (`chooseSessionWriteHome`). `status` is exactly what `sessionMemoryStatus` answers. Never throws.
|
|
1780
|
+
*/
|
|
1781
|
+
sessionMemoryStatusRead(sessionId: string): Promise<{
|
|
1782
|
+
readonly status: SessionMemoryStatus;
|
|
1783
|
+
readonly writeHome: SessionWriteHomeReading;
|
|
1784
|
+
}>;
|
|
1769
1785
|
/** The committed, side-effect-free audit read: the adoption-restricted committed view when the
|
|
1770
1786
|
* backend offers one (the File backend — ledger+shadow, no disk adoption), else a non-adopting
|
|
1771
1787
|
* retrieval view where one is offered, else the backend itself (Pg/TiDB shapes — naturally committed
|
|
@@ -1940,6 +1956,10 @@ export declare class MemoryEngine {
|
|
|
1940
1956
|
/** {@link refuseOutsideStore} as a value, for a site whose failure lane is a report row rather than a
|
|
1941
1957
|
* throw: the refusal's text, or `undefined` when the act may proceed. */
|
|
1942
1958
|
private storeActRefusedText;
|
|
1959
|
+
/** Contain the suspect file at `path` (its already-read `content`): keep its copy among the governance store's
|
|
1960
|
+
* `quarantine` objects, then — the anchor read again after that await, at the act — take it off the plane
|
|
1961
|
+
* ({@link clearContainedPath}). A refused act leaves the path untouched and says why in `detail`. */
|
|
1962
|
+
private containSuspect;
|
|
1943
1963
|
/** The memory dir against its anchor ({@link anchorStoreRoot}), read every time: at every mount and at the head
|
|
1944
1964
|
* of every face acting on the memory dir itself; answers the anchored root. With a `handle`, its mount root
|
|
1945
1965
|
* must be the anchored one too (a handle mounted before a re-anchor names a tree the store no longer has). */
|
|
@@ -1992,7 +2012,8 @@ export declare class MemoryEngine {
|
|
|
1992
2012
|
private censusScopeTree;
|
|
1993
2013
|
}
|
|
1994
2014
|
/** Render drained announcements as ONE engine-owned system-reminder block (the lead/frame is
|
|
1995
|
-
* trusted; item identifiers were neutralized at enqueue — see {@link MemoryAnnouncement.items}).
|
|
2015
|
+
* trusted; item identifiers were neutralized at enqueue — see {@link MemoryAnnouncement.items}). The
|
|
2016
|
+
* lead names no session: a notice may be about this session's own harvest (#1123 ②). */
|
|
1996
2017
|
export declare function renderAnnouncements(queue: readonly MemoryAnnouncement[], folded: number, reminderMark?: string): string;
|
|
1997
2018
|
/** Truncate the derived index to the CC injection parameters (200 lines / 25KB). */
|
|
1998
2019
|
export declare function truncateIndex(text: string): string;
|