blun-king-cli 9.1.643 → 9.1.645
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 +19 -123
- package/LIESMICH.txt +17 -45
- package/README.md +15 -76
- package/RELEASE-9.1.645.md +29 -0
- package/bin/blun.js +3 -3
- package/bin/king.js +3 -3
- package/bin/launcher-mode.js +125 -126
- package/bin/launcher-runtime.js +603 -616
- package/bin/plugin-bootstrap.js +339 -405
- package/bin/rename-private-staging.cjs +2 -2
- package/bin/retired-bundled-plugins.cjs +84 -0
- package/bin/startup-security-host.cjs +105 -0
- package/bin/startup-security.cjs +9 -105
- package/bin/startup-warning-policy.cjs +22 -0
- package/bin/update-lease-installer.cjs +125 -0
- package/bin/update-lease-sockets.cjs +228 -0
- package/bin/update-lease.js +22 -327
- package/bin/verify-bundled-agent-sources.cjs +2 -4
- package/blun.mjs +77 -180
- package/bundled-agent-sources.json +1 -552
- package/package.json +3 -6
- package/tool-liveness642/receipt.json +1 -1
- package/worker-host.mjs +62 -120
- package/agent-spine-plugin/.claude-plugin/marketplace.json +0 -20
- package/agent-spine-plugin/.claude-plugin/plugin.json +0 -14
- package/agent-spine-plugin/.codex-plugin/plugin.json +0 -47
- package/agent-spine-plugin/.mcp.json +0 -8
- package/agent-spine-plugin/CHANGELOG.md +0 -1614
- package/agent-spine-plugin/LICENSE +0 -186
- package/agent-spine-plugin/README.md +0 -432
- package/agent-spine-plugin/assets/agentspine-banner.svg +0 -32
- package/agent-spine-plugin/bin/agentspine-mcp.js +0 -4
- package/agent-spine-plugin/bin/agentspine.js +0 -7
- package/agent-spine-plugin/blun.plugin.json +0 -68
- package/agent-spine-plugin/docs/acceptance.md +0 -61
- package/agent-spine-plugin/docs/artifact-evaluation.md +0 -93
- package/agent-spine-plugin/docs/host-integration.md +0 -193
- package/agent-spine-plugin/docs/preflight-recall.md +0 -71
- package/agent-spine-plugin/docs/preservation-contract.md +0 -53
- package/agent-spine-plugin/docs/quality-gates.md +0 -50
- package/agent-spine-plugin/docs/session-timeline.md +0 -112
- package/agent-spine-plugin/docs/source-roots.md +0 -113
- package/agent-spine-plugin/docs/world-model.md +0 -119
- package/agent-spine-plugin/hooks/codex.json +0 -47
- package/agent-spine-plugin/hooks/hooks.json +0 -106
- package/agent-spine-plugin/hooks/version.json +0 -5
- package/agent-spine-plugin/package.json +0 -77
- package/agent-spine-plugin/scripts/check-codex-install.js +0 -226
- package/agent-spine-plugin/scripts/check-hosts.js +0 -208
- package/agent-spine-plugin/scripts/check-install-hook.js +0 -227
- package/agent-spine-plugin/scripts/check-install-selfstarter.js +0 -154
- package/agent-spine-plugin/scripts/check-install.js +0 -478
- package/agent-spine-plugin/scripts/check-line-budget.js +0 -58
- package/agent-spine-plugin/scripts/check-syntax.js +0 -29
- package/agent-spine-plugin/scripts/github-actions.js +0 -11
- package/agent-spine-plugin/scripts/hermetic-process.js +0 -191
- package/agent-spine-plugin/scripts/release-check.js +0 -150
- package/agent-spine-plugin/scripts/run-acceptance.js +0 -19
- package/agent-spine-plugin/scripts/run-checks.js +0 -50
- package/agent-spine-plugin/scripts/run-tests-hermetic.js +0 -112
- package/agent-spine-plugin/skills/agent-spine/SKILL.md +0 -99
- package/agent-spine-plugin/spine-example/1-identity.md +0 -12
- package/agent-spine-plugin/spine-example/2-voice.md +0 -6
- package/agent-spine-plugin/spine-example/3-conduct.md +0 -8
- package/agent-spine-plugin/spine-example/4-history.md +0 -4
- package/agent-spine-plugin/src/cli-agent.js +0 -315
- package/agent-spine-plugin/src/cli-attention.js +0 -95
- package/agent-spine-plugin/src/cli-autonomy.js +0 -36
- package/agent-spine-plugin/src/cli-common.js +0 -71
- package/agent-spine-plugin/src/cli-continuity.js +0 -116
- package/agent-spine-plugin/src/cli-core.js +0 -128
- package/agent-spine-plugin/src/cli-diagnostics.js +0 -291
- package/agent-spine-plugin/src/cli-host.js +0 -21
- package/agent-spine-plugin/src/cli-learning.js +0 -320
- package/agent-spine-plugin/src/cli-premortem.js +0 -16
- package/agent-spine-plugin/src/cli-sharing.js +0 -230
- package/agent-spine-plugin/src/cli.js +0 -181
- package/agent-spine-plugin/src/codex-reader-launcher.js +0 -182
- package/agent-spine-plugin/src/hook.js +0 -500
- package/agent-spine-plugin/src/index.js +0 -108
- package/agent-spine-plugin/src/lib/acceptance.js +0 -435
- package/agent-spine-plugin/src/lib/action-lesson-recall.js +0 -118
- package/agent-spine-plugin/src/lib/attention-context.js +0 -167
- package/agent-spine-plugin/src/lib/attention-events.js +0 -113
- package/agent-spine-plugin/src/lib/attention-privacy.js +0 -72
- package/agent-spine-plugin/src/lib/attention-schema.js +0 -164
- package/agent-spine-plugin/src/lib/attention-storage.js +0 -93
- package/agent-spine-plugin/src/lib/attention.js +0 -164
- package/agent-spine-plugin/src/lib/audit-premortem.js +0 -223
- package/agent-spine-plugin/src/lib/audit.js +0 -401
- package/agent-spine-plugin/src/lib/authentication.js +0 -515
- package/agent-spine-plugin/src/lib/autonomy-policy.js +0 -110
- package/agent-spine-plugin/src/lib/autonomy-store.js +0 -202
- package/agent-spine-plugin/src/lib/autonomy.js +0 -8
- package/agent-spine-plugin/src/lib/briefing.js +0 -493
- package/agent-spine-plugin/src/lib/catalog-document-read.js +0 -51
- package/agent-spine-plugin/src/lib/catalog.js +0 -167
- package/agent-spine-plugin/src/lib/channel-continuity.js +0 -19
- package/agent-spine-plugin/src/lib/channel-runtime.js +0 -665
- package/agent-spine-plugin/src/lib/codex-installation.js +0 -231
- package/agent-spine-plugin/src/lib/codex-skill-installation.js +0 -211
- package/agent-spine-plugin/src/lib/context.js +0 -156
- package/agent-spine-plugin/src/lib/continuity.js +0 -338
- package/agent-spine-plugin/src/lib/coordination.js +0 -577
- package/agent-spine-plugin/src/lib/delivery-agent-usage.js +0 -231
- package/agent-spine-plugin/src/lib/delivery-assignment.js +0 -220
- package/agent-spine-plugin/src/lib/delivery-command-actions.js +0 -462
- package/agent-spine-plugin/src/lib/delivery-knowledge.js +0 -78
- package/agent-spine-plugin/src/lib/delivery-premortem-binding.js +0 -107
- package/agent-spine-plugin/src/lib/delivery-premortem-closure.js +0 -171
- package/agent-spine-plugin/src/lib/delivery-premortem-codec.js +0 -45
- package/agent-spine-plugin/src/lib/delivery-premortem-correction.js +0 -101
- package/agent-spine-plugin/src/lib/delivery-premortem-file.js +0 -21
- package/agent-spine-plugin/src/lib/delivery-premortem-index.js +0 -493
- package/agent-spine-plugin/src/lib/delivery-premortem-inspection.js +0 -37
- package/agent-spine-plugin/src/lib/delivery-premortem-recovery.js +0 -120
- package/agent-spine-plugin/src/lib/delivery-premortem-rejection.js +0 -65
- package/agent-spine-plugin/src/lib/delivery-premortem-results.js +0 -28
- package/agent-spine-plugin/src/lib/delivery-premortem-session-guard.js +0 -46
- package/agent-spine-plugin/src/lib/delivery-premortem-write-ledger.js +0 -285
- package/agent-spine-plugin/src/lib/delivery-premortem.js +0 -499
- package/agent-spine-plugin/src/lib/delivery-shell-heredoc.js +0 -115
- package/agent-spine-plugin/src/lib/delivery-shell-substitutions.js +0 -111
- package/agent-spine-plugin/src/lib/delivery-shell-wrapper.js +0 -64
- package/agent-spine-plugin/src/lib/delivery-target.js +0 -73
- package/agent-spine-plugin/src/lib/delivery-verification.js +0 -445
- package/agent-spine-plugin/src/lib/documents.js +0 -239
- package/agent-spine-plugin/src/lib/feed-transport.js +0 -499
- package/agent-spine-plugin/src/lib/filesystem-retry.js +0 -34
- package/agent-spine-plugin/src/lib/gateway-common.js +0 -68
- package/agent-spine-plugin/src/lib/gateway-control.js +0 -370
- package/agent-spine-plugin/src/lib/gateway-delivery.js +0 -103
- package/agent-spine-plugin/src/lib/gateway-execution.js +0 -350
- package/agent-spine-plugin/src/lib/gateway-group-response.js +0 -128
- package/agent-spine-plugin/src/lib/gateway-host-fencing.js +0 -92
- package/agent-spine-plugin/src/lib/gateway-host-lifecycle.js +0 -193
- package/agent-spine-plugin/src/lib/gateway-inspection.js +0 -85
- package/agent-spine-plugin/src/lib/gateway-knowledge.js +0 -129
- package/agent-spine-plugin/src/lib/gateway-policy-provenance.js +0 -197
- package/agent-spine-plugin/src/lib/gateway-premortem-disposition.js +0 -82
- package/agent-spine-plugin/src/lib/gateway-premortem.js +0 -363
- package/agent-spine-plugin/src/lib/gateway-prepared-host.js +0 -28
- package/agent-spine-plugin/src/lib/gateway-runs.js +0 -345
- package/agent-spine-plugin/src/lib/gateway-runtime-identity.js +0 -31
- package/agent-spine-plugin/src/lib/gateway-runtime-records.js +0 -21
- package/agent-spine-plugin/src/lib/gateway-runtime.js +0 -18
- package/agent-spine-plugin/src/lib/gateway-state-transaction.js +0 -356
- package/agent-spine-plugin/src/lib/gateway-state.js +0 -344
- package/agent-spine-plugin/src/lib/graph.js +0 -337
- package/agent-spine-plugin/src/lib/hook-artifact-guards.js +0 -356
- package/agent-spine-plugin/src/lib/hook-audit.js +0 -43
- package/agent-spine-plugin/src/lib/hook-briefing-use.js +0 -78
- package/agent-spine-plugin/src/lib/hook-context.js +0 -441
- package/agent-spine-plugin/src/lib/hook-final-message.js +0 -26
- package/agent-spine-plugin/src/lib/hook-input.js +0 -27
- package/agent-spine-plugin/src/lib/hook-output.js +0 -284
- package/agent-spine-plugin/src/lib/hook-premortem.js +0 -257
- package/agent-spine-plugin/src/lib/hook-process-advisory.js +0 -36
- package/agent-spine-plugin/src/lib/hook-protection.js +0 -95
- package/agent-spine-plugin/src/lib/hook-stop-verification.js +0 -84
- package/agent-spine-plugin/src/lib/hook-timeline.js +0 -102
- package/agent-spine-plugin/src/lib/host-instruction-budget.js +0 -11
- package/agent-spine-plugin/src/lib/https-transport.js +0 -392
- package/agent-spine-plugin/src/lib/identifier-analysis.js +0 -446
- package/agent-spine-plugin/src/lib/indexed-memory-offline.js +0 -40
- package/agent-spine-plugin/src/lib/indexed-memory.js +0 -298
- package/agent-spine-plugin/src/lib/knowledge-evidence.js +0 -431
- package/agent-spine-plugin/src/lib/learning-applications.js +0 -441
- package/agent-spine-plugin/src/lib/learning-artifact-evaluator.js +0 -114
- package/agent-spine-plugin/src/lib/learning-candidates.js +0 -274
- package/agent-spine-plugin/src/lib/learning-context.js +0 -137
- package/agent-spine-plugin/src/lib/learning-delivery-contracts.js +0 -310
- package/agent-spine-plugin/src/lib/learning-evaluation-contracts.js +0 -350
- package/agent-spine-plugin/src/lib/learning-evaluation-registration.js +0 -372
- package/agent-spine-plugin/src/lib/learning-evaluation-revocation.js +0 -292
- package/agent-spine-plugin/src/lib/learning-evidence-contracts.js +0 -321
- package/agent-spine-plugin/src/lib/learning-findings.js +0 -458
- package/agent-spine-plugin/src/lib/learning-measurement-contracts.js +0 -285
- package/agent-spine-plugin/src/lib/learning-measurements.js +0 -265
- package/agent-spine-plugin/src/lib/learning-outcome-contracts.js +0 -165
- package/agent-spine-plugin/src/lib/learning-outcomes.js +0 -343
- package/agent-spine-plugin/src/lib/learning-reconciliation.js +0 -290
- package/agent-spine-plugin/src/lib/learning-retry-contracts.js +0 -188
- package/agent-spine-plugin/src/lib/learning-schema.js +0 -229
- package/agent-spine-plugin/src/lib/learning-scope-targets.js +0 -424
- package/agent-spine-plugin/src/lib/learning-state-upgrade.js +0 -477
- package/agent-spine-plugin/src/lib/learning-status-configuration.js +0 -476
- package/agent-spine-plugin/src/lib/learning-storage.js +0 -203
- package/agent-spine-plugin/src/lib/learning-trial-recovery.js +0 -218
- package/agent-spine-plugin/src/lib/learning-validation-contracts.js +0 -375
- package/agent-spine-plugin/src/lib/learning-validation-renewal.js +0 -298
- package/agent-spine-plugin/src/lib/learning-validation-runtime.js +0 -234
- package/agent-spine-plugin/src/lib/learning.js +0 -36
- package/agent-spine-plugin/src/lib/lesson-recall-session.js +0 -172
- package/agent-spine-plugin/src/lib/mcp-autonomy-tools.js +0 -37
- package/agent-spine-plugin/src/lib/mcp-delivery-completion.js +0 -124
- package/agent-spine-plugin/src/lib/mcp-delivery-tools.js +0 -45
- package/agent-spine-plugin/src/lib/mcp-premortem.js +0 -68
- package/agent-spine-plugin/src/lib/mcp-runtime.js +0 -355
- package/agent-spine-plugin/src/lib/mcp-source-context.js +0 -61
- package/agent-spine-plugin/src/lib/mcp-timeline-tools.js +0 -240
- package/agent-spine-plugin/src/lib/mcp-world-tools.js +0 -52
- package/agent-spine-plugin/src/lib/object-transport.js +0 -206
- package/agent-spine-plugin/src/lib/owned-file-lock.js +0 -182
- package/agent-spine-plugin/src/lib/paths.js +0 -109
- package/agent-spine-plugin/src/lib/peer-transport.js +0 -283
- package/agent-spine-plugin/src/lib/persona-runtime.js +0 -581
- package/agent-spine-plugin/src/lib/pre-answer-timeline-recall.js +0 -104
- package/agent-spine-plugin/src/lib/preflight-delivery-id.js +0 -27
- package/agent-spine-plugin/src/lib/preflight.js +0 -688
- package/agent-spine-plugin/src/lib/project-portfolio.js +0 -176
- package/agent-spine-plugin/src/lib/runtime.js +0 -13
- package/agent-spine-plugin/src/lib/selfstarter-core.js +0 -382
- package/agent-spine-plugin/src/lib/selfstarter-jobs.js +0 -149
- package/agent-spine-plugin/src/lib/selfstarter-lease.js +0 -204
- package/agent-spine-plugin/src/lib/selfstarter-policy.js +0 -90
- package/agent-spine-plugin/src/lib/selfstarter-workspace.js +0 -111
- package/agent-spine-plugin/src/lib/selfstarter.js +0 -11
- package/agent-spine-plugin/src/lib/session-timeline-auth.js +0 -316
- package/agent-spine-plugin/src/lib/session-timeline-codex.js +0 -69
- package/agent-spine-plugin/src/lib/session-timeline-contract.js +0 -56
- package/agent-spine-plugin/src/lib/session-timeline-enrollment-source.js +0 -38
- package/agent-spine-plugin/src/lib/session-timeline-enrollment-storage.js +0 -128
- package/agent-spine-plugin/src/lib/session-timeline-enrollment-transport.js +0 -15
- package/agent-spine-plugin/src/lib/session-timeline-enrollment.js +0 -478
- package/agent-spine-plugin/src/lib/session-timeline-event-extract.js +0 -186
- package/agent-spine-plugin/src/lib/session-timeline-host-origin.js +0 -73
- package/agent-spine-plugin/src/lib/session-timeline-host-receipt.js +0 -117
- package/agent-spine-plugin/src/lib/session-timeline-invocation.js +0 -201
- package/agent-spine-plugin/src/lib/session-timeline-king.js +0 -93
- package/agent-spine-plugin/src/lib/session-timeline-prior.js +0 -57
- package/agent-spine-plugin/src/lib/session-timeline-provider.js +0 -36
- package/agent-spine-plugin/src/lib/session-timeline-query.js +0 -56
- package/agent-spine-plugin/src/lib/session-timeline-results.js +0 -56
- package/agent-spine-plugin/src/lib/session-timeline-root.js +0 -11
- package/agent-spine-plugin/src/lib/session-timeline-search.js +0 -82
- package/agent-spine-plugin/src/lib/session-timeline-sid-acl.js +0 -213
- package/agent-spine-plugin/src/lib/session-timeline-source-open.js +0 -30
- package/agent-spine-plugin/src/lib/session-timeline-source.js +0 -80
- package/agent-spine-plugin/src/lib/session-timeline-state.js +0 -45
- package/agent-spine-plugin/src/lib/session-timeline-transport.js +0 -42
- package/agent-spine-plugin/src/lib/session-timeline-windows-acl.js +0 -145
- package/agent-spine-plugin/src/lib/session-timeline.js +0 -462
- package/agent-spine-plugin/src/lib/sharing.js +0 -969
- package/agent-spine-plugin/src/lib/source-roots.js +0 -475
- package/agent-spine-plugin/src/lib/source-tree-scan.js +0 -178
- package/agent-spine-plugin/src/lib/sqlite-transport.js +0 -501
- package/agent-spine-plugin/src/lib/task-knowledge-context.js +0 -99
- package/agent-spine-plugin/src/lib/telegram-adapter.js +0 -119
- package/agent-spine-plugin/src/lib/timeline-continuation-update.js +0 -100
- package/agent-spine-plugin/src/lib/timeline-tool-guard.js +0 -225
- package/agent-spine-plugin/src/lib/timeline-user-feedback.js +0 -216
- package/agent-spine-plugin/src/lib/timeline-world-capture.js +0 -233
- package/agent-spine-plugin/src/lib/voice-runtime.js +0 -39
- package/agent-spine-plugin/src/lib/world-knowledge.js +0 -306
- package/agent-spine-plugin/src/lib/world-model.js +0 -333
- package/agent-spine-plugin/src/mcp.js +0 -456
- package/agent-spine-plugin/src/version.js +0 -1
- package/agent-spine-plugin/src/worker.js +0 -257
- package/bin/agentspine-king-goal-inbox.mjs +0 -127
- package/bin/agentspine-king-goal-intake.mjs +0 -106
- package/bin/agentspine-king-host-runner.mjs +0 -109
- package/bin/agentspine-king-snapshot-policy.cjs +0 -80
- package/bin/agentspine-king-status-policy.mjs +0 -226
- package/bin/agentspine-king-worker-host.mjs +0 -160
- package/bin/managed-plugin-selection.cjs +0 -141
- package/bin/verify-agent-behavior.cjs +0 -122
- package/bin/verify-agent-components.cjs +0 -104
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
import { randomUUID } from "node:crypto";
|
|
2
|
-
import { loadGraph } from "./graph.js";
|
|
3
|
-
import { ACTIVITY_KINDS, ID_RE, PRIVACY, SIGNAL_KINDS, STATUSES, normalizeDate, normalizeInteger, normalizeNumber, normalizeRelativePath, validConfig } from "./attention-schema.js";
|
|
4
|
-
import { attentionMutation, preservePrevious } from "./attention-storage.js";
|
|
5
|
-
import { validateGroupScope } from "./attention-privacy.js";
|
|
6
|
-
|
|
7
|
-
export async function upsertAttention({
|
|
8
|
-
root = process.cwd(), id = `signal:${randomUUID()}`, kind, summary, entityId = null,
|
|
9
|
-
dueAt = null, priority = 50, privacy = "private", groupId = null, sourceDocument = null,
|
|
10
|
-
confidence = 0.5, now = new Date()
|
|
11
|
-
}) {
|
|
12
|
-
if (!ID_RE.test(id)) throw new Error("id must be a stable, whitespace-free identifier");
|
|
13
|
-
if (!SIGNAL_KINDS.has(kind)) throw new Error(`unsupported attention kind: ${kind}`);
|
|
14
|
-
if (!summary || typeof summary !== "string") throw new Error("summary is required");
|
|
15
|
-
if (!PRIVACY.has(privacy)) throw new Error(`unsupported privacy scope: ${privacy}`);
|
|
16
|
-
const timestamp = normalizeDate(now, "now");
|
|
17
|
-
const normalizedDueAt = normalizeDate(dueAt, "dueAt", true);
|
|
18
|
-
sourceDocument = normalizeRelativePath(sourceDocument, "sourceDocument");
|
|
19
|
-
return attentionMutation(root, async (state, catalog, attentionPath) => {
|
|
20
|
-
const { graph } = await loadGraph(catalog.root, catalog);
|
|
21
|
-
if (entityId !== null && !graph.entities.some((entity) => entity.id === entityId)) throw new Error(`unknown entity: ${entityId}`);
|
|
22
|
-
validateGroupScope(privacy, groupId, graph, entityId);
|
|
23
|
-
if (sourceDocument !== null && !catalog.documents.some((document) => document.relativePath === sourceDocument)) {
|
|
24
|
-
throw new Error(`unknown source document: ${sourceDocument}`);
|
|
25
|
-
}
|
|
26
|
-
const previous = state.signals.find((signal) => signal.id === id);
|
|
27
|
-
const signal = {
|
|
28
|
-
id,
|
|
29
|
-
kind,
|
|
30
|
-
summary: summary.slice(0, 500),
|
|
31
|
-
entityId,
|
|
32
|
-
dueAt: normalizedDueAt,
|
|
33
|
-
priority: normalizeNumber(priority, "priority", 0, 100),
|
|
34
|
-
privacy,
|
|
35
|
-
groupId,
|
|
36
|
-
sourceDocument,
|
|
37
|
-
confidence: normalizeNumber(confidence, "confidence", 0, 1),
|
|
38
|
-
status: "open",
|
|
39
|
-
createdAt: previous?.createdAt || timestamp,
|
|
40
|
-
updatedAt: timestamp,
|
|
41
|
-
authority: "context-only"
|
|
42
|
-
};
|
|
43
|
-
preservePrevious(state, "attention-signal", previous, timestamp);
|
|
44
|
-
state.signals = state.signals.filter((item) => item.id !== id);
|
|
45
|
-
state.signals.push(signal);
|
|
46
|
-
state.signals.sort((a, b) => a.id.localeCompare(b.id));
|
|
47
|
-
return { signal, attentionPath };
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export async function resolveAttention({ root = process.cwd(), id, status = "completed", now = new Date() }) {
|
|
52
|
-
if (!ID_RE.test(id || "")) throw new Error("id is required");
|
|
53
|
-
if (!STATUSES.has(status)) throw new Error(`unsupported attention status: ${status}`);
|
|
54
|
-
const timestamp = normalizeDate(now, "now");
|
|
55
|
-
return attentionMutation(root, (state, _catalog, attentionPath) => {
|
|
56
|
-
const previous = state.signals.find((signal) => signal.id === id);
|
|
57
|
-
if (!previous) throw new Error(`unknown attention signal: ${id}`);
|
|
58
|
-
preservePrevious(state, "attention-signal", previous, timestamp);
|
|
59
|
-
const signal = { ...previous, status, updatedAt: timestamp, authority: "context-only" };
|
|
60
|
-
state.signals = state.signals.map((item) => item.id === id ? signal : item);
|
|
61
|
-
return { signal, attentionPath };
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export async function recordActivity({
|
|
66
|
-
root = process.cwd(), entityId, kind = "interaction", at = new Date(), privacy = "private", groupId = null
|
|
67
|
-
}) {
|
|
68
|
-
if (!ID_RE.test(entityId || "")) throw new Error("entityId is required");
|
|
69
|
-
if (!ACTIVITY_KINDS.has(kind)) throw new Error(`unsupported activity kind: ${kind}`);
|
|
70
|
-
if (!PRIVACY.has(privacy)) throw new Error(`unsupported privacy scope: ${privacy}`);
|
|
71
|
-
const timestamp = normalizeDate(at, "at");
|
|
72
|
-
return attentionMutation(root, async (state, catalog, attentionPath) => {
|
|
73
|
-
const { graph } = await loadGraph(catalog.root, catalog);
|
|
74
|
-
if (!graph.entities.some((entity) => entity.id === entityId)) throw new Error(`unknown entity: ${entityId}`);
|
|
75
|
-
validateGroupScope(privacy, groupId, graph, entityId);
|
|
76
|
-
const activity = {
|
|
77
|
-
id: `activity:${randomUUID()}`,
|
|
78
|
-
entityId,
|
|
79
|
-
kind,
|
|
80
|
-
at: timestamp,
|
|
81
|
-
privacy,
|
|
82
|
-
groupId,
|
|
83
|
-
authority: "context-only"
|
|
84
|
-
};
|
|
85
|
-
state.activities.push(activity);
|
|
86
|
-
state.activities.sort((a, b) => a.at.localeCompare(b.at) || a.id.localeCompare(b.id));
|
|
87
|
-
return { activity, attentionPath };
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
function normalizeQuietHours(value) {
|
|
92
|
-
if (value === null || value === false) return null;
|
|
93
|
-
if (!value || typeof value !== "object" || Array.isArray(value)) throw new Error("quietHours must be an object or null");
|
|
94
|
-
return {
|
|
95
|
-
start: normalizeInteger(value.start, "quietHours.start", 0, 23),
|
|
96
|
-
end: normalizeInteger(value.end, "quietHours.end", 0, 23),
|
|
97
|
-
utcOffsetMinutes: normalizeInteger(value.utcOffsetMinutes ?? 0, "quietHours.utcOffsetMinutes", -720, 840)
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
export async function configureAttention({ root = process.cwd(), config = {}, now = new Date() }) {
|
|
102
|
-
if (!config || Array.isArray(config) || typeof config !== "object") throw new Error("config must be an object");
|
|
103
|
-
if (!Object.keys(config).length) throw new Error("config must change at least one attention setting");
|
|
104
|
-
const allowed = new Set(["enabled", "minIntervalHours", "entitySilenceDays", "heartbeatStaleMinutes", "maxItems", "quietHours"]);
|
|
105
|
-
const unknown = Object.keys(config).filter((key) => !allowed.has(key));
|
|
106
|
-
if (unknown.length) throw new Error(`unsupported attention config: ${unknown.join(", ")}`);
|
|
107
|
-
const timestamp = normalizeDate(now, "now");
|
|
108
|
-
return attentionMutation(root, (state, _catalog, attentionPath) => {
|
|
109
|
-
preservePrevious(state, "attention-config", { id: "config", ...state.config, privacy: "private" }, timestamp);
|
|
110
|
-
if ("enabled" in config) {
|
|
111
|
-
if (typeof config.enabled !== "boolean") throw new Error("enabled must be boolean");
|
|
112
|
-
state.config.enabled = config.enabled;
|
|
113
|
-
}
|
|
114
|
-
if ("minIntervalHours" in config) state.config.minIntervalHours = normalizeNumber(config.minIntervalHours, "minIntervalHours", 1, 720);
|
|
115
|
-
if ("entitySilenceDays" in config) state.config.entitySilenceDays = normalizeNumber(config.entitySilenceDays, "entitySilenceDays", 1, 3650);
|
|
116
|
-
if ("heartbeatStaleMinutes" in config) state.config.heartbeatStaleMinutes = normalizeInteger(config.heartbeatStaleMinutes, "heartbeatStaleMinutes", 1, 10080);
|
|
117
|
-
if ("maxItems" in config) state.config.maxItems = normalizeInteger(config.maxItems, "maxItems", 1, 20);
|
|
118
|
-
if ("quietHours" in config) state.config.quietHours = normalizeQuietHours(config.quietHours);
|
|
119
|
-
if (!validConfig(state.config)) throw new Error("resulting attention configuration is invalid");
|
|
120
|
-
return { config: state.config, attentionPath };
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
export async function deleteAttention({ root = process.cwd(), signalId = null, eventId = null, entityId = null }) {
|
|
125
|
-
if ([signalId, eventId, entityId].filter(Boolean).length !== 1) throw new Error("provide exactly one of signalId, eventId, or entityId");
|
|
126
|
-
return attentionMutation(root, (state, _catalog, attentionPath) => {
|
|
127
|
-
if (signalId) {
|
|
128
|
-
const existed = state.signals.some((signal) => signal.id === signalId);
|
|
129
|
-
state.signals = state.signals.filter((signal) => signal.id !== signalId);
|
|
130
|
-
state.history = state.history.filter((entry) => entry.recordId !== signalId && entry.value?.id !== signalId);
|
|
131
|
-
delete state.presentations[`cue:${signalId}`];
|
|
132
|
-
return { deleted: existed, signalId, attentionPath };
|
|
133
|
-
}
|
|
134
|
-
if (eventId) {
|
|
135
|
-
const existed = state.events.some((event) => event.id === eventId);
|
|
136
|
-
state.events = state.events.filter((event) => event.id !== eventId);
|
|
137
|
-
const receiptIds = new Set(state.receipts.filter((receipt) => receipt.eventId === eventId).map((receipt) => receipt.id));
|
|
138
|
-
state.receipts = state.receipts.filter((receipt) => receipt.eventId !== eventId);
|
|
139
|
-
state.history = state.history.filter((entry) => entry.recordId !== eventId && entry.value?.id !== eventId);
|
|
140
|
-
delete state.presentations[`event:${eventId}`];
|
|
141
|
-
return { deleted: existed, eventId, deletedReceipts: receiptIds.size, attentionPath };
|
|
142
|
-
}
|
|
143
|
-
const signalIds = new Set(state.signals.filter((signal) => signal.entityId === entityId).map((signal) => signal.id));
|
|
144
|
-
const deletedSignals = signalIds.size;
|
|
145
|
-
const deletedActivities = state.activities.filter((activity) => activity.entityId === entityId).length;
|
|
146
|
-
const eventIds = new Set(state.events.filter((event) => event.entityId === entityId).map((event) => event.id));
|
|
147
|
-
const deletedEvents = eventIds.size;
|
|
148
|
-
state.signals = state.signals.filter((signal) => signal.entityId !== entityId);
|
|
149
|
-
state.activities = state.activities.filter((activity) => activity.entityId !== entityId);
|
|
150
|
-
state.events = state.events.filter((event) => event.entityId !== entityId);
|
|
151
|
-
state.receipts = state.receipts.filter((receipt) => !eventIds.has(receipt.eventId));
|
|
152
|
-
state.history = state.history.filter((entry) => entry.entityId !== entityId && entry.value?.entityId !== entityId && !signalIds.has(entry.recordId) && !eventIds.has(entry.recordId));
|
|
153
|
-
for (const key of Object.keys(state.presentations)) {
|
|
154
|
-
if (key === `neglected:${entityId}` || [...signalIds].some((id) => key === `cue:${id}`)) delete state.presentations[key];
|
|
155
|
-
if ([...eventIds].some((id) => key === `event:${id}`)) delete state.presentations[key];
|
|
156
|
-
}
|
|
157
|
-
return { deletedSignals, deletedActivities, deletedEvents, entityId, attentionPath };
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
export { attentionFindings } from "./attention-schema.js";
|
|
162
|
-
export { inspectAttention, loadAttention } from "./attention-storage.js";
|
|
163
|
-
export { recordAttentionEvent } from "./attention-events.js";
|
|
164
|
-
export { attentionContext } from "./attention-context.js";
|
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
import { createHash } from "node:crypto";
|
|
2
|
-
import { basename } from "node:path";
|
|
3
|
-
import { inspectDeliveryPremortems } from "./delivery-premortem.js";
|
|
4
|
-
import { createPremortemAttachment } from "./delivery-premortem-closure.js";
|
|
5
|
-
import { premortemGoalBindingSummary } from "./delivery-premortem-binding.js";
|
|
6
|
-
import { inspectPremortemLaneIndexes, premortemScopeDigest } from "./delivery-premortem-index.js";
|
|
7
|
-
import {
|
|
8
|
-
inspectPremortemWriteIndexes,
|
|
9
|
-
inspectPremortemWriteProof
|
|
10
|
-
} from "./delivery-premortem-write-ledger.js";
|
|
11
|
-
|
|
12
|
-
const WRITE_INDEX_MISMATCH = "AGENTSPINE_PREMORTEM_MISMATCH";
|
|
13
|
-
|
|
14
|
-
export function premortemIndexCrossReferenceFindings(premortems, indexes, gatewayPolicy) {
|
|
15
|
-
const findings = [];
|
|
16
|
-
const statesByLane = new Map(premortems.states.map((state) => [state.laneDigest, state]));
|
|
17
|
-
const pointersByLane = new Map();
|
|
18
|
-
for (const pointer of indexes.pointers) {
|
|
19
|
-
const values = pointersByLane.get(pointer.laneDigest) || [];
|
|
20
|
-
values.push(pointer);
|
|
21
|
-
pointersByLane.set(pointer.laneDigest, values);
|
|
22
|
-
}
|
|
23
|
-
const stateScanComplete = !premortems.errors.length && !premortems.truncations.length;
|
|
24
|
-
const indexScanComplete = !indexes.errors.length && !indexes.truncations.length;
|
|
25
|
-
if (stateScanComplete) for (const pointer of indexes.pointers) {
|
|
26
|
-
const state = statesByLane.get(pointer.laneDigest);
|
|
27
|
-
if (!state) {
|
|
28
|
-
findings.push({ laneDigest: pointer.laneDigest, reason: "premortem index pointer has no state" });
|
|
29
|
-
continue;
|
|
30
|
-
}
|
|
31
|
-
const binding = state.binding;
|
|
32
|
-
const sessionDigest = createHash("sha256").update(binding.sessionId).digest("hex");
|
|
33
|
-
if (pointer.sessionDigest !== sessionDigest || pointer.goalId !== binding.goalId
|
|
34
|
-
|| pointer.goalStepId !== binding.goalStepId || pointer.queueId !== binding.queueId
|
|
35
|
-
|| pointer.gatewayAttempt !== binding.gatewayAttempt
|
|
36
|
-
|| pointer.planDefinitionsDigest !== binding.planDefinitionsDigest) {
|
|
37
|
-
findings.push({ laneDigest: pointer.laneDigest,
|
|
38
|
-
reason: "premortem index pointer does not match state binding" });
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
if (indexScanComplete) for (const state of premortems.states.filter((item) => item.binding.goalId)) {
|
|
42
|
-
const pointers = pointersByLane.get(state.laneDigest) || [];
|
|
43
|
-
if (!pointers.length) findings.push({ laneDigest: state.laneDigest,
|
|
44
|
-
reason: "goal premortem state has no index pointer" });
|
|
45
|
-
else if (pointers.length > 1) findings.push({ laneDigest: state.laneDigest,
|
|
46
|
-
reason: "goal premortem state has multiple index pointers" });
|
|
47
|
-
const consumed = state.events.some((event) => event.type === "premortem-consumed");
|
|
48
|
-
const finalized = indexes.finalizations.some((item) => item.laneDigest === state.laneDigest);
|
|
49
|
-
if (consumed && !finalized) findings.push({ laneDigest: state.laneDigest,
|
|
50
|
-
reason: "consumed goal premortem state has no scope finalization" });
|
|
51
|
-
}
|
|
52
|
-
if (stateScanComplete && indexScanComplete) for (const finalization of indexes.finalizations) {
|
|
53
|
-
const scopedPointers = indexes.pointers.filter((item) => item.scopeDigest === finalization.scopeDigest);
|
|
54
|
-
const scopedStates = premortems.states.filter((state) => state.binding.goalId
|
|
55
|
-
&& premortemScopeDigest(state.binding.goalId, state.binding.goalStepId,
|
|
56
|
-
state.binding.queueId, state.binding.gatewayAttempt) === finalization.scopeDigest);
|
|
57
|
-
if (finalization.status === "read-only") {
|
|
58
|
-
if (scopedPointers.length || scopedStates.length) findings.push({ laneDigest: null,
|
|
59
|
-
reason: "read-only premortem finalization retains state or index evidence" });
|
|
60
|
-
continue;
|
|
61
|
-
}
|
|
62
|
-
const pointer = scopedPointers.length === 1 ? scopedPointers[0] : null;
|
|
63
|
-
const state = scopedStates.length === 1 ? scopedStates[0] : null;
|
|
64
|
-
if (!pointer || !state || pointer.laneDigest !== finalization.laneDigest) {
|
|
65
|
-
findings.push({ laneDigest: finalization.laneDigest,
|
|
66
|
-
reason: "closed premortem finalization is orphaned" });
|
|
67
|
-
continue;
|
|
68
|
-
}
|
|
69
|
-
if (pointer.digest !== finalization.pointerDigest) findings.push({ laneDigest: state.laneDigest,
|
|
70
|
-
reason: "closed premortem finalization has the wrong pointer digest" });
|
|
71
|
-
const consumed = state.events.some((event) => event.type === "premortem-consumed");
|
|
72
|
-
if (!consumed || !state.closure || !state.lastWrite) findings.push({ laneDigest: state.laneDigest,
|
|
73
|
-
reason: "closed premortem finalization has no consumed closed state" });
|
|
74
|
-
else if (createPremortemAttachment(state).attachmentDigest !== finalization.attachmentDigest) {
|
|
75
|
-
findings.push({ laneDigest: state.laneDigest,
|
|
76
|
-
reason: "closed premortem finalization has the wrong attachment digest" });
|
|
77
|
-
}
|
|
78
|
-
const binding = state.binding;
|
|
79
|
-
const exact = finalization.goalId === binding.goalId && finalization.goalStepId === binding.goalStepId
|
|
80
|
-
&& finalization.queueId === binding.queueId && finalization.gatewayAttempt === binding.gatewayAttempt
|
|
81
|
-
&& finalization.planDefinitionsDigest === binding.planDefinitionsDigest
|
|
82
|
-
&& finalization.host === binding.host && finalization.projectId === binding.projectId
|
|
83
|
-
&& finalization.entityId === binding.entityId && finalization.groupId === binding.groupId
|
|
84
|
-
&& finalization.taskId === binding.taskId;
|
|
85
|
-
const summaryDigest = createHash("sha256")
|
|
86
|
-
.update(JSON.stringify([premortemGoalBindingSummary(state).digest])).digest("hex");
|
|
87
|
-
if (!exact || finalization.bindingSummaryDigest !== summaryDigest) findings.push({ laneDigest: state.laneDigest,
|
|
88
|
-
reason: "closed premortem finalization has the wrong binding evidence" });
|
|
89
|
-
}
|
|
90
|
-
if (indexScanComplete) for (const goal of gatewayPolicy.goals || []) {
|
|
91
|
-
for (const step of goal.plan?.steps || []) {
|
|
92
|
-
const checkpoint = step.deliveryCheckpoint;
|
|
93
|
-
const outcome = step.outcomeReceipt;
|
|
94
|
-
if (step.status !== "completed" || !new Set(["closed", "read-only"]).has(checkpoint?.status)) continue;
|
|
95
|
-
const finalization = indexes.finalizations.find((item) => item.digest === checkpoint.scopeFinalizationDigest);
|
|
96
|
-
if (!finalization) {
|
|
97
|
-
findings.push({ laneDigest: checkpoint.bindingDigest ?? null,
|
|
98
|
-
reason: "completed goal premortem has no bound scope finalization" });
|
|
99
|
-
continue;
|
|
100
|
-
}
|
|
101
|
-
const exact = finalization.status === checkpoint.status && finalization.goalId === goal.goalId
|
|
102
|
-
&& finalization.goalStepId === step.stepId && finalization.queueId === checkpoint.queueId
|
|
103
|
-
&& finalization.gatewayAttempt === checkpoint.gatewayAttempt
|
|
104
|
-
&& finalization.planDefinitionsDigest === checkpoint.planDefinitionsDigest
|
|
105
|
-
&& finalization.host === checkpoint.host && finalization.projectId === checkpoint.projectId
|
|
106
|
-
&& finalization.entityId === checkpoint.entityId && finalization.groupId === checkpoint.groupId
|
|
107
|
-
&& finalization.taskId === (checkpoint.taskId ?? null);
|
|
108
|
-
if (!exact) findings.push({ laneDigest: checkpoint.bindingDigest ?? null,
|
|
109
|
-
reason: "completed goal premortem scope finalization has the wrong binding" });
|
|
110
|
-
if (checkpoint.status === "closed" && (checkpoint.sourceAttachmentDigest
|
|
111
|
-
!== finalization.attachmentDigest || outcome?.sourceAttachmentDigest
|
|
112
|
-
!== finalization.attachmentDigest)) {
|
|
113
|
-
findings.push({ laneDigest: checkpoint.bindingDigest ?? null,
|
|
114
|
-
reason: "completed goal premortem source attachment does not match scope finalization" });
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
return findings;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
function boundedWrites(state) {
|
|
122
|
-
const writes = [state.firstWrite, state.lastWrite, ...(state.writeLedger || [])].filter(Boolean);
|
|
123
|
-
return [...new Map(writes.map((write) => [write.idDigest, {
|
|
124
|
-
idDigest: write.idDigest, inputDigest: write.inputDigest,
|
|
125
|
-
inputKnown: write.inputKnown, writeDigest: write.writeDigest || write.digest
|
|
126
|
-
}])).values()];
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
function sameWrite(entry, expected) {
|
|
130
|
-
return entry?.idDigest === expected.idDigest && entry.inputDigest === expected.inputDigest
|
|
131
|
-
&& entry.inputKnown === expected.inputKnown && entry.writeDigest === expected.writeDigest;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
function addIssue(target, seen, laneDigest, item, fallbackPath) {
|
|
135
|
-
const issue = { laneDigest, path: item.path || fallbackPath,
|
|
136
|
-
reason: String(item.reason || "premortem write-index inspection failed").slice(0, 400),
|
|
137
|
-
code: typeof item.code === "string" ? item.code : null };
|
|
138
|
-
const key = `${laneDigest}:${issue.code}:${issue.reason}`;
|
|
139
|
-
if (!seen.has(key)) {
|
|
140
|
-
seen.add(key);
|
|
141
|
-
target.push(issue);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
export async function inspectPremortemWriteIndexAudit(premortems, {
|
|
146
|
-
inspectIndexes = inspectPremortemWriteIndexes,
|
|
147
|
-
inspectProof = inspectPremortemWriteProof
|
|
148
|
-
} = {}) {
|
|
149
|
-
const combined = { directories: [], paths: [], nodes: [], errors: [], uncertainties: [],
|
|
150
|
-
truncations: [], states: 0, attemptedProofs: 0, verifiedProofs: 0,
|
|
151
|
-
authority: "context-only" };
|
|
152
|
-
const paths = new Set();
|
|
153
|
-
const errorKeys = new Set();
|
|
154
|
-
const uncertaintyKeys = new Set();
|
|
155
|
-
for (const state of premortems.states.filter((item) => item.writeIndexRoot)) {
|
|
156
|
-
const statePath = premortems.paths.find((path) => basename(path) === `${state.laneDigest}.json`);
|
|
157
|
-
if (!statePath) {
|
|
158
|
-
addIssue(combined.uncertainties, uncertaintyKeys, state.laneDigest, {
|
|
159
|
-
path: premortems.directory,
|
|
160
|
-
reason: `premortem state ${state.laneDigest} has no inspected path`
|
|
161
|
-
}, premortems.directory);
|
|
162
|
-
if (premortems.directory) paths.add(premortems.directory);
|
|
163
|
-
continue;
|
|
164
|
-
}
|
|
165
|
-
combined.states += 1;
|
|
166
|
-
let inspected;
|
|
167
|
-
try {
|
|
168
|
-
inspected = await inspectIndexes({ statePath, state });
|
|
169
|
-
} catch (error) {
|
|
170
|
-
const target = error.code === WRITE_INDEX_MISMATCH
|
|
171
|
-
? [combined.errors, errorKeys] : [combined.uncertainties, uncertaintyKeys];
|
|
172
|
-
addIssue(target[0], target[1], state.laneDigest, {
|
|
173
|
-
path: error.path || statePath, reason: error.message, code: error.code
|
|
174
|
-
}, statePath);
|
|
175
|
-
paths.add(error.path || statePath);
|
|
176
|
-
continue;
|
|
177
|
-
}
|
|
178
|
-
combined.directories.push(inspected.directory);
|
|
179
|
-
for (const path of inspected.paths) paths.add(path);
|
|
180
|
-
combined.nodes.push(...inspected.nodes);
|
|
181
|
-
combined.truncations.push(...inspected.truncations);
|
|
182
|
-
for (const item of inspected.errors) {
|
|
183
|
-
if (item.path) paths.add(item.path);
|
|
184
|
-
const target = item.code === WRITE_INDEX_MISMATCH
|
|
185
|
-
? [combined.errors, errorKeys] : [combined.uncertainties, uncertaintyKeys];
|
|
186
|
-
addIssue(target[0], target[1], state.laneDigest, item, statePath);
|
|
187
|
-
}
|
|
188
|
-
for (const item of inspected.truncations) if (item.path) paths.add(item.path);
|
|
189
|
-
for (const expected of boundedWrites(state)) {
|
|
190
|
-
combined.attemptedProofs += 1;
|
|
191
|
-
try {
|
|
192
|
-
const proof = await inspectProof({ statePath, laneDigest: state.laneDigest,
|
|
193
|
-
rootDigest: state.writeIndexRoot, idDigest: expected.idDigest });
|
|
194
|
-
for (const path of proof.paths) paths.add(path);
|
|
195
|
-
if (!sameWrite(proof.entry, expected)) {
|
|
196
|
-
addIssue(combined.errors, errorKeys, state.laneDigest, {
|
|
197
|
-
path: proof.paths.at(-1) || statePath, code: WRITE_INDEX_MISMATCH,
|
|
198
|
-
reason: "premortem write index does not prove a bounded write"
|
|
199
|
-
}, statePath);
|
|
200
|
-
} else combined.verifiedProofs += 1;
|
|
201
|
-
} catch (error) {
|
|
202
|
-
const item = { path: error.path || inspected.paths[0] || statePath,
|
|
203
|
-
reason: error.message, code: error.code };
|
|
204
|
-
const target = error.code === WRITE_INDEX_MISMATCH
|
|
205
|
-
? [combined.errors, errorKeys] : [combined.uncertainties, uncertaintyKeys];
|
|
206
|
-
addIssue(target[0], target[1], state.laneDigest, item, statePath);
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
combined.paths = [...paths].sort();
|
|
211
|
-
return combined;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
export async function inspectPremortemAudit(root, gatewayPolicy) {
|
|
215
|
-
const premortems = await inspectDeliveryPremortems(root);
|
|
216
|
-
const indexes = premortems.directory
|
|
217
|
-
? await inspectPremortemLaneIndexes(premortems.directory)
|
|
218
|
-
: { directory: null, directories: [], paths: [], pointers: [], errors: [],
|
|
219
|
-
finalizations: [], tamperedPointers: [], tamperedFinalizations: [], truncations: [] };
|
|
220
|
-
const writeIndexes = await inspectPremortemWriteIndexAudit(premortems);
|
|
221
|
-
const crossReferenceIssues = premortemIndexCrossReferenceFindings(premortems, indexes, gatewayPolicy);
|
|
222
|
-
return { premortems, indexes, writeIndexes, crossReferenceIssues };
|
|
223
|
-
}
|