@cleocode/contracts 2026.9.7 → 2026.9.9
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/dist/__tests__/acceptance-gate.test.js +242 -1
- package/dist/__tests__/acceptance-gate.test.js.map +1 -1
- package/dist/__tests__/evidence-atom-schema.test.js +17 -14
- package/dist/__tests__/evidence-atom-schema.test.js.map +1 -1
- package/dist/__tests__/memory-wire-shapes.test.js.map +1 -1
- package/dist/__tests__/operations-registry.test.js +18 -0
- package/dist/__tests__/operations-registry.test.js.map +1 -1
- package/dist/acceptance-gate-schema.d.ts +60 -2
- package/dist/acceptance-gate-schema.d.ts.map +1 -1
- package/dist/acceptance-gate-schema.js +273 -1
- package/dist/acceptance-gate-schema.js.map +1 -1
- package/dist/acceptance-gate.d.ts +122 -11
- package/dist/acceptance-gate.d.ts.map +1 -1
- package/dist/acceptance-gate.js +3 -3
- package/dist/audit.d.ts +71 -2
- package/dist/audit.d.ts.map +1 -1
- package/dist/backup-manifest.d.ts +80 -0
- package/dist/backup-manifest.d.ts.map +1 -1
- package/dist/caamp-markers.d.ts +20 -0
- package/dist/caamp-markers.d.ts.map +1 -1
- package/dist/capabilities.d.ts +282 -0
- package/dist/capabilities.d.ts.map +1 -1
- package/dist/changesets.d.ts +4 -4
- package/dist/code-symbol.d.ts +33 -0
- package/dist/code-symbol.d.ts.map +1 -1
- package/dist/daemon/health.d.ts +3 -3
- package/dist/data-accessor.d.ts +15 -0
- package/dist/data-accessor.d.ts.map +1 -1
- package/dist/data-accessor.js.map +1 -1
- package/dist/dispatch/__tests__/tasks-gateway-crud-ops.test.js +19 -1
- package/dist/dispatch/__tests__/tasks-gateway-crud-ops.test.js.map +1 -1
- package/dist/dispatch/operations-registry.d.ts.map +1 -1
- package/dist/dispatch/operations-registry.js +684 -3
- package/dist/dispatch/operations-registry.js.map +1 -1
- package/dist/docs-taxonomy.d.ts +25 -0
- package/dist/docs-taxonomy.d.ts.map +1 -1
- package/dist/docs-taxonomy.js.map +1 -1
- package/dist/evidence-atom-schema.d.ts +7 -6
- package/dist/evidence-atom-schema.d.ts.map +1 -1
- package/dist/evidence-atom-schema.js +10 -9
- package/dist/evidence-atom-schema.js.map +1 -1
- package/dist/graph.d.ts +283 -2
- package/dist/graph.d.ts.map +1 -1
- package/dist/index.d.ts +6 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/invariants/adr-070-orchestration.d.ts.map +1 -1
- package/dist/invariants/adr-070-orchestration.js +1 -1
- package/dist/invariants/adr-070-orchestration.js.map +1 -1
- package/dist/invariants/adr-073-saga.js +2 -2
- package/dist/invariants/adr-073-saga.js.map +1 -1
- package/dist/jobs.d.ts +329 -3
- package/dist/jobs.d.ts.map +1 -1
- package/dist/knowledge-health.d.ts +695 -0
- package/dist/knowledge-health.d.ts.map +1 -0
- package/dist/knowledge-health.js +8 -0
- package/dist/knowledge-health.js.map +1 -0
- package/dist/llm/catalog-schema.d.ts +4 -4
- package/dist/memory/observe.d.ts +4 -2
- package/dist/memory/observe.d.ts.map +1 -1
- package/dist/memory/search.d.ts +4 -0
- package/dist/memory/search.d.ts.map +1 -1
- package/dist/nexus-living-brain-ops.d.ts +28 -3
- package/dist/nexus-living-brain-ops.d.ts.map +1 -1
- package/dist/nexus-tasks-bridge-ops.d.ts +11 -0
- package/dist/nexus-tasks-bridge-ops.d.ts.map +1 -1
- package/dist/operations/admin.d.ts +10 -4
- package/dist/operations/admin.d.ts.map +1 -1
- package/dist/operations/docs.d.ts +138 -0
- package/dist/operations/docs.d.ts.map +1 -1
- package/dist/operations/docs.js +47 -0
- package/dist/operations/docs.js.map +1 -1
- package/dist/operations/focus.d.ts +7 -0
- package/dist/operations/focus.d.ts.map +1 -1
- package/dist/operations/nexus.d.ts +7 -2
- package/dist/operations/nexus.d.ts.map +1 -1
- package/dist/operations/output-contracts-data.d.ts.map +1 -1
- package/dist/operations/output-contracts-data.js +31 -3
- package/dist/operations/output-contracts-data.js.map +1 -1
- package/dist/operations/research.d.ts +33 -0
- package/dist/operations/research.d.ts.map +1 -1
- package/dist/operations/tasks.d.ts +107 -4
- package/dist/operations/tasks.d.ts.map +1 -1
- package/dist/operations/tasks.js +5 -0
- package/dist/operations/tasks.js.map +1 -1
- package/dist/package-artifact.d.ts +112 -0
- package/dist/package-artifact.d.ts.map +1 -0
- package/dist/package-artifact.js +8 -0
- package/dist/package-artifact.js.map +1 -0
- package/dist/release/evidence-atoms.d.ts +10 -0
- package/dist/release/evidence-atoms.d.ts.map +1 -1
- package/dist/release/evidence-atoms.js +6 -0
- package/dist/release/evidence-atoms.js.map +1 -1
- package/dist/release/plan.d.ts +6 -6
- package/dist/resource-governor.d.ts +114 -0
- package/dist/resource-governor.d.ts.map +1 -1
- package/dist/resource-governor.js.map +1 -1
- package/dist/supervisor-ipc/messages.d.ts +6 -6
- package/dist/task-record.d.ts +25 -4
- package/dist/task-record.d.ts.map +1 -1
- package/dist/task.d.ts +55 -36
- package/dist/task.d.ts.map +1 -1
- package/dist/task.js.map +1 -1
- package/dist/tasks/archive.d.ts +3 -3
- package/dist/templates/manifest.d.ts +1 -1
- package/dist/workgraph.d.ts +5 -3
- package/dist/workgraph.d.ts.map +1 -1
- package/dist/workgraph.js +19 -0
- package/dist/workgraph.js.map +1 -1
- package/package.json +2 -2
- package/schemas/gate-result.schema.json +350 -1
- package/src/__tests__/__snapshots__/operations-registry.test.ts.snap +1 -1
- package/src/__tests__/acceptance-gate.test.ts +282 -1
- package/src/__tests__/evidence-atom-schema.test.ts +17 -14
- package/src/__tests__/memory-wire-shapes.test.ts +2 -0
- package/src/__tests__/operations-registry.test.ts +26 -0
- package/src/acceptance-gate-schema.ts +320 -14
- package/src/acceptance-gate.ts +133 -11
- package/src/audit.ts +72 -2
- package/src/backup-manifest.ts +88 -0
- package/src/caamp-markers.ts +22 -0
- package/src/capabilities.ts +311 -0
- package/src/code-symbol.ts +37 -0
- package/src/data-accessor.ts +16 -0
- package/src/dispatch/__tests__/tasks-gateway-crud-ops.test.ts +31 -1
- package/src/dispatch/operations-registry.ts +689 -3
- package/src/docs-taxonomy.ts +26 -0
- package/src/evidence-atom-schema.ts +10 -9
- package/src/graph.ts +326 -2
- package/src/index.ts +43 -1
- package/src/invariants/adr-070-orchestration.ts +2 -1
- package/src/invariants/adr-073-saga.ts +2 -2
- package/src/jobs.ts +382 -3
- package/src/knowledge-health.ts +748 -0
- package/src/memory/observe.ts +4 -2
- package/src/memory/search.ts +4 -0
- package/src/nexus-living-brain-ops.ts +34 -3
- package/src/nexus-tasks-bridge-ops.ts +12 -0
- package/src/operations/admin.ts +11 -4
- package/src/operations/docs.ts +153 -0
- package/src/operations/focus.ts +11 -0
- package/src/operations/nexus.ts +7 -1
- package/src/operations/output-contracts-data.ts +33 -3
- package/src/operations/research.ts +36 -0
- package/src/operations/tasks.ts +116 -4
- package/src/package-artifact.ts +127 -0
- package/src/release/evidence-atoms.ts +6 -0
- package/src/resource-governor.ts +132 -0
- package/src/task-record.ts +27 -4
- package/src/task.ts +58 -36
- package/src/workgraph.ts +19 -0
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* Acceptance gate discriminated union and result types.
|
|
3
3
|
*
|
|
4
4
|
* A machine-verifiable acceptance gate. Gates coexist with free-text criteria
|
|
5
|
-
* in `Task.acceptance
|
|
6
|
-
*
|
|
5
|
+
* in `Task.acceptance`. The runner returns observed results; persistence and
|
|
6
|
+
* completion binding require the caller's explicit verification workflow.
|
|
7
7
|
*
|
|
8
8
|
* Six gate kinds are supported:
|
|
9
|
-
* - `test` — run a command and assert exit code
|
|
9
|
+
* - `test` — run a command and assert exit code; unmeasured test-count requirements remain errors
|
|
10
10
|
* - `file` — assert properties of a file on disk
|
|
11
11
|
* - `command` — run any CLI command and assert exit code / stdout
|
|
12
12
|
* - `lint` — run a static-analysis tool and require a clean result
|
|
@@ -18,6 +18,31 @@
|
|
|
18
18
|
* @task T779
|
|
19
19
|
* @see {@link https://github.com/kryptobaseddev/cleo} T760 RCASD hardening
|
|
20
20
|
*/
|
|
21
|
+
import type { OperationExecutionContext, OperationExecutionIdentity } from './jobs.js';
|
|
22
|
+
import type { ProcessCaptureOptions, ProcessCaptureResult, SystemdControlContext } from './resource-governor.js';
|
|
23
|
+
/**
|
|
24
|
+
* Captured options for evaluating acceptance gates without renewing operation authority.
|
|
25
|
+
* @remarks An absent execution context receives a two-second shared foreground budget.
|
|
26
|
+
* Per-gate timeouts can tighten it; long work requires explicit runtime admission.
|
|
27
|
+
* @example
|
|
28
|
+
* ```typescript
|
|
29
|
+
* const options: AcceptanceGateRunOptions = { projectRoot: '/project', execution };
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export interface AcceptanceGateRunOptions extends Pick<ProcessCaptureOptions, 'memoryMaxMb' | 'tasksMax'> {
|
|
33
|
+
/** Explicit project root, or the captured operation's project root. */
|
|
34
|
+
projectRoot?: string;
|
|
35
|
+
/** Manual gates remain skipped and never become machine proof. */
|
|
36
|
+
skipManual?: boolean;
|
|
37
|
+
/** Original admitted operation, including project identity, deadline and cancellation. */
|
|
38
|
+
execution?: OperationExecutionContext;
|
|
39
|
+
/** Explicit captured environment; defaults to a copy of the calling environment. */
|
|
40
|
+
env?: Readonly<Record<string, string | undefined>>;
|
|
41
|
+
/** Aggregate process output and file-content read bound per gate. */
|
|
42
|
+
maxOutputBytes?: number;
|
|
43
|
+
/** Existing manager context, separate from the child environment. */
|
|
44
|
+
systemdControl?: SystemdControlContext;
|
|
45
|
+
}
|
|
21
46
|
/** Fields every gate variant carries. */
|
|
22
47
|
export interface GateBase {
|
|
23
48
|
/**
|
|
@@ -42,13 +67,13 @@ export interface GateBase {
|
|
|
42
67
|
/**
|
|
43
68
|
* Gate timeout in milliseconds.
|
|
44
69
|
*
|
|
45
|
-
* @defaultValue
|
|
70
|
+
* @defaultValue 60_000 (further bounded by the shared operation deadline)
|
|
46
71
|
*/
|
|
47
72
|
timeoutMs?: number;
|
|
48
73
|
}
|
|
49
74
|
/**
|
|
50
|
-
* Run a command
|
|
51
|
-
*
|
|
75
|
+
* Run a command and verify its actual exit status. Positive `minCount` requires
|
|
76
|
+
* a structured test-count capability and currently returns an explicit error. Designed for test suites:
|
|
52
77
|
* `{ kind: 'test', command: 'pnpm test', expect: 'pass' }`.
|
|
53
78
|
*/
|
|
54
79
|
export interface TestGate extends GateBase {
|
|
@@ -62,7 +87,7 @@ export interface TestGate extends GateBase {
|
|
|
62
87
|
* - `"exit0"`: exit code 0 only (permissive mode).
|
|
63
88
|
*/
|
|
64
89
|
expect: 'pass' | 'exit0';
|
|
65
|
-
/** Minimum
|
|
90
|
+
/** Minimum test count; unsupported count evidence must return error, never infer a count from exit zero. */
|
|
66
91
|
minCount?: number;
|
|
67
92
|
/** Working directory relative to project root. Default `.`. */
|
|
68
93
|
cwd?: string;
|
|
@@ -177,8 +202,8 @@ export interface LintGate extends GateBase {
|
|
|
177
202
|
}
|
|
178
203
|
/**
|
|
179
204
|
* Hit a URL and assert HTTP status and optional body match. For tasks that
|
|
180
|
-
* ship a webapp or API.
|
|
181
|
-
*
|
|
205
|
+
* ship a webapp or API. Probing an existing service is supported; `startCommand`
|
|
206
|
+
* currently returns an explicit error pending an admitted owned service lifetime.
|
|
182
207
|
*/
|
|
183
208
|
export interface HttpGate extends GateBase {
|
|
184
209
|
kind: 'http';
|
|
@@ -298,16 +323,89 @@ export type GateResultDetails = {
|
|
|
298
323
|
/** Whether the reviewer accepted (`true`) or rejected (`false`) the gate. */
|
|
299
324
|
accepted: boolean;
|
|
300
325
|
};
|
|
326
|
+
/**
|
|
327
|
+
* Exact bytes observed for one declared task input or resolved verification harness.
|
|
328
|
+
* @remarks A missing input is explicit, with both digest and size null. This inventory
|
|
329
|
+
* does not claim coverage of undeclared runtime dependencies or external services.
|
|
330
|
+
* @example
|
|
331
|
+
* ```typescript
|
|
332
|
+
* const input: AcceptanceGateArtifact = { path: '/project/check.mjs', sha256: 'a'.repeat(64), bytes: 42 };
|
|
333
|
+
* ```
|
|
334
|
+
*/
|
|
335
|
+
export interface AcceptanceGateArtifact {
|
|
336
|
+
/** Captured absolute input path, resolved within the admitted project scope. */
|
|
337
|
+
path: string;
|
|
338
|
+
/** SHA-256 of actual input bytes; null only for an observed absent path. */
|
|
339
|
+
sha256: string | null;
|
|
340
|
+
/** Exact byte length, or null alongside an absent digest. */
|
|
341
|
+
bytes: number | null;
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* Executable invocation captured before launching a typed verification gate.
|
|
345
|
+
* @remarks Environment values are represented only by a digest; credentials must
|
|
346
|
+
* not be duplicated into receipts. The verifier compares actual launch inputs.
|
|
347
|
+
* @example
|
|
348
|
+
* ```typescript
|
|
349
|
+
* const invocation: AcceptanceGateInvocation = { command: 'node', args: ['check.mjs'], cwd: '/project', environmentHash: 'b'.repeat(64) };
|
|
350
|
+
* ```
|
|
351
|
+
*/
|
|
352
|
+
export interface AcceptanceGateInvocation {
|
|
353
|
+
/** Exact executable passed to the existing process port. */
|
|
354
|
+
command: string;
|
|
355
|
+
/** Ordered arguments, without shell re-interpretation. */
|
|
356
|
+
args: string[];
|
|
357
|
+
/** Captured absolute process working directory. */
|
|
358
|
+
cwd: string;
|
|
359
|
+
/** SHA-256 of the canonically ordered effective environment. */
|
|
360
|
+
environmentHash: string;
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* Task and input binding attached to an explicitly verified acceptance result.
|
|
364
|
+
* @remarks This is provenance, not authority by itself. Persistence and completion
|
|
365
|
+
* must compare current canonical task/AC rows, input bytes and captured execution.
|
|
366
|
+
* No gate runs implicitly on task creation or editing. Historical unbound results
|
|
367
|
+
* remain readable but do not establish typed requirement completion.
|
|
368
|
+
* @example
|
|
369
|
+
* ```typescript
|
|
370
|
+
* const owner = result.binding?.identity.projectId;
|
|
371
|
+
* ```
|
|
372
|
+
*/
|
|
373
|
+
export interface AcceptanceGateBinding {
|
|
374
|
+
/** Version of the captured binding contract. */
|
|
375
|
+
version: 1;
|
|
376
|
+
/** Unique verification attempt whose result and receipt commit atomically. */
|
|
377
|
+
verificationId: string;
|
|
378
|
+
/** Existing captured operation identity, including actor and retry identity. */
|
|
379
|
+
identity: OperationExecutionIdentity;
|
|
380
|
+
/** Exact canonical task owning this criterion. */
|
|
381
|
+
taskId: string;
|
|
382
|
+
/** Current normalized acceptance row identifier. */
|
|
383
|
+
criterionId: string;
|
|
384
|
+
/** SHA-256 over the criterion's canonical persisted payload. */
|
|
385
|
+
criterionHash: string;
|
|
386
|
+
/** SHA-256 over the complete canonical gate, including REQ and launch options. */
|
|
387
|
+
gateHash: string;
|
|
388
|
+
/** ISO time of input capture before execution. */
|
|
389
|
+
capturedAt: string;
|
|
390
|
+
/** Original admitted absolute deadline in epoch milliseconds; never renewed. */
|
|
391
|
+
deadlineAt: number;
|
|
392
|
+
/** Actual process inputs; required for executable gate kinds. */
|
|
393
|
+
invocation?: AcceptanceGateInvocation;
|
|
394
|
+
/** Explicit bounded input inventory, including untracked harness/task files. */
|
|
395
|
+
artifacts: AcceptanceGateArtifact[];
|
|
396
|
+
}
|
|
301
397
|
/**
|
|
302
398
|
* Result of running one acceptance gate.
|
|
303
399
|
*
|
|
304
|
-
*
|
|
305
|
-
*
|
|
400
|
+
* Returned by the runner. Canonical verification explicitly persists bound results;
|
|
401
|
+
* the result shape alone does not prove persistence or authorize completion.
|
|
306
402
|
*
|
|
307
403
|
* NOTE: Named `AcceptanceGateResult` (not `GateResult`) for historical
|
|
308
404
|
* clarity — it describes acceptance-criterion gate outcomes specifically.
|
|
309
405
|
*/
|
|
310
406
|
export interface AcceptanceGateResult {
|
|
407
|
+
/** Explicit verification binding; absent on historical/unpersisted runner observations. */
|
|
408
|
+
binding?: AcceptanceGateBinding;
|
|
311
409
|
/** Zero-based index in the task's acceptance array. */
|
|
312
410
|
index: number;
|
|
313
411
|
/** REQ-ID if the gate had one, else `undefined`. */
|
|
@@ -335,6 +433,8 @@ export interface AcceptanceGateResult {
|
|
|
335
433
|
result: 'pass' | 'fail' | 'warn' | 'skipped' | 'error';
|
|
336
434
|
/** Wall-clock duration of the gate execution in milliseconds. */
|
|
337
435
|
durationMs: number;
|
|
436
|
+
/** Actual process outcome and containment evidence; wrapper status is not target proof. */
|
|
437
|
+
execution?: ProcessCaptureResult;
|
|
338
438
|
/**
|
|
339
439
|
* Typed kind-specific detail payload.
|
|
340
440
|
*
|
|
@@ -363,4 +463,15 @@ export interface AcceptanceGateResult {
|
|
|
363
463
|
/** Agent identifier or `"human"` that ran or attested the gate. */
|
|
364
464
|
checkedBy: string;
|
|
365
465
|
}
|
|
466
|
+
/** Canonical typed-verification audit details stored with results in the task transaction. */
|
|
467
|
+
export interface AcceptanceGateVerificationReceipt {
|
|
468
|
+
/** One admitted verification batch identity shared by every result. */
|
|
469
|
+
verificationId: string;
|
|
470
|
+
/** SHA-256 of the exact persisted result-array JSON bytes. */
|
|
471
|
+
resultHash: string;
|
|
472
|
+
/** Explicit verification operation; never inferred from generic completion evidence. */
|
|
473
|
+
operation: 'check.gate.verify';
|
|
474
|
+
/** Overall generic-plus-typed verification outcome at this observation. */
|
|
475
|
+
passed: boolean;
|
|
476
|
+
}
|
|
366
477
|
//# sourceMappingURL=acceptance-gate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acceptance-gate.d.ts","sourceRoot":"","sources":["../src/acceptance-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;
|
|
1
|
+
{"version":3,"file":"acceptance-gate.d.ts","sourceRoot":"","sources":["../src/acceptance-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAC;AACvF,OAAO,KAAK,EACV,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,wBAAwB,CAAC;AAEhC;;;;;;;;GAQG;AACH,MAAM,WAAW,wBACf,SAAQ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IACvD,iEAAiE;IACjE,UAAU,EAAE,MAAM,CAAC;IACnB,2FAA2F;IAC3F,SAAS,CAAC,EAAE,oBAAoB,CAAC;IACjC;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iFAAiF;IACjF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gDAAgD;IAChD,SAAS,EAAE,MAAM,CAAC;IAClB,mEAAmE;IACnE,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,8FAA8F;AAC9F,MAAM,WAAW,iCAAiC;IAChD,uEAAuE;IACvE,cAAc,EAAE,MAAM,CAAC;IACvB,8DAA8D;IAC9D,UAAU,EAAE,MAAM,CAAC;IACnB,wFAAwF;IACxF,SAAS,EAAE,mBAAmB,CAAC;IAC/B,2EAA2E;IAC3E,MAAM,EAAE,OAAO,CAAC;CACjB"}
|
package/dist/acceptance-gate.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* Acceptance gate discriminated union and result types.
|
|
3
3
|
*
|
|
4
4
|
* A machine-verifiable acceptance gate. Gates coexist with free-text criteria
|
|
5
|
-
* in `Task.acceptance
|
|
6
|
-
*
|
|
5
|
+
* in `Task.acceptance`. The runner returns observed results; persistence and
|
|
6
|
+
* completion binding require the caller's explicit verification workflow.
|
|
7
7
|
*
|
|
8
8
|
* Six gate kinds are supported:
|
|
9
|
-
* - `test` — run a command and assert exit code
|
|
9
|
+
* - `test` — run a command and assert exit code; unmeasured test-count requirements remain errors
|
|
10
10
|
* - `file` — assert properties of a file on disk
|
|
11
11
|
* - `command` — run any CLI command and assert exit code / stdout
|
|
12
12
|
* - `lint` — run a static-analysis tool and require a clean result
|
package/dist/audit.d.ts
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* @task T1322
|
|
13
13
|
* @epic T1216
|
|
14
14
|
*/
|
|
15
|
+
import type { ProcessCaptureResult, ProcessLaunchExecution } from './resource-governor.js';
|
|
15
16
|
/**
|
|
16
17
|
* A single commit entry extracted from git log.
|
|
17
18
|
*/
|
|
@@ -48,15 +49,19 @@ export interface ReleaseTagEntry {
|
|
|
48
49
|
* necessarily from the task DB.
|
|
49
50
|
*/
|
|
50
51
|
export interface ReconstructResult {
|
|
52
|
+
/** Assessment provenance; absent only on legacy results. New assessments always emit it.
|
|
53
|
+
* @defaultValue undefined on legacy records only
|
|
54
|
+
*/
|
|
55
|
+
assessment?: ReconstructAssessment;
|
|
51
56
|
/** The task ID being reconstructed (e.g. `T991`). */
|
|
52
57
|
taskId: string;
|
|
53
58
|
/**
|
|
54
59
|
* Commits whose message directly references `taskId`.
|
|
55
|
-
*
|
|
60
|
+
* Exact word-boundary task tokens in the full subject and body, never numeric prefixes.
|
|
56
61
|
*/
|
|
57
62
|
directCommits: CommitEntry[];
|
|
58
63
|
/**
|
|
59
|
-
* Numeric child ID range inferred from commit-message mining and
|
|
64
|
+
* Numeric child ID range inferred from commit-message mining and numeric proximity (not authoritative containment).
|
|
60
65
|
* Both bounds are inclusive. `null` when no children could be inferred.
|
|
61
66
|
*/
|
|
62
67
|
childIdRange: {
|
|
@@ -94,4 +99,68 @@ export interface ReconstructResult {
|
|
|
94
99
|
*/
|
|
95
100
|
inferredChildren: string[];
|
|
96
101
|
}
|
|
102
|
+
/** Options for bounded Git-backed lineage assessment.
|
|
103
|
+
* @remarks These options may shorten but never extend an inherited operation lifetime.
|
|
104
|
+
* @example
|
|
105
|
+
* ```ts
|
|
106
|
+
* const options: ReconstructOptions = { execution: { deadlineAt: Date.now() + 1000 } };
|
|
107
|
+
* ```
|
|
108
|
+
*/
|
|
109
|
+
export interface ReconstructOptions {
|
|
110
|
+
/** Original caller deadline and cancellation.
|
|
111
|
+
* @defaultValue inherited context, otherwise one two-second foreground budget
|
|
112
|
+
*/
|
|
113
|
+
execution?: ProcessLaunchExecution;
|
|
114
|
+
/** Combined capture byte ceiling across all commands.
|
|
115
|
+
* @defaultValue 8388608
|
|
116
|
+
*/
|
|
117
|
+
maxOutputBytes?: number;
|
|
118
|
+
}
|
|
119
|
+
/** Observed bounded command outcome without duplicating captured Git history.
|
|
120
|
+
* @remarks Target outcome and cleanup evidence remain distinct.
|
|
121
|
+
* @example
|
|
122
|
+
* ```ts
|
|
123
|
+
* const stopped = command.stopped;
|
|
124
|
+
* ```
|
|
125
|
+
*/
|
|
126
|
+
export interface ReconstructCommand extends Omit<ProcessCaptureResult, 'stdout' | 'stderr'> {
|
|
127
|
+
/** Exact requested Git arguments. */
|
|
128
|
+
args: readonly string[];
|
|
129
|
+
/** Diagnostic stderr, bounded by the shared output limit. */
|
|
130
|
+
stderr: string;
|
|
131
|
+
}
|
|
132
|
+
/** Coverage and failure truth for a lineage assessment.
|
|
133
|
+
* @remarks Current means the observed local Git scope was assessed, not complete remote history
|
|
134
|
+
* or proven task containment. Partial results must not authorize provenance repair.
|
|
135
|
+
* @example
|
|
136
|
+
* ```ts
|
|
137
|
+
* if (result.assessment?.coverage !== 'current') return;
|
|
138
|
+
* ```
|
|
139
|
+
*/
|
|
140
|
+
export interface ReconstructAssessment {
|
|
141
|
+
/** Absolute repository root captured before asynchronous work. */
|
|
142
|
+
repositoryRoot: string;
|
|
143
|
+
/** One absolute execution deadline, shared with every command and computation stage. */
|
|
144
|
+
deadlineAt: number;
|
|
145
|
+
/** Completeness of the observed local Git history and release-tag assessment. */
|
|
146
|
+
coverage: 'current' | 'partial' | 'failed';
|
|
147
|
+
/** Shallow history is explicitly incomplete; null means the probe did not complete. */
|
|
148
|
+
shallow: boolean | null;
|
|
149
|
+
/** Number of commits parsed from the bounded history, not total remote commits. */
|
|
150
|
+
observedCommits: number;
|
|
151
|
+
/** Whether all history records were parsed successfully. */
|
|
152
|
+
historyComplete: boolean;
|
|
153
|
+
/** Whether every commit-targeting tag was assessed successfully. */
|
|
154
|
+
tagsComplete: boolean;
|
|
155
|
+
/** Captured process verdicts and cleanup observations. */
|
|
156
|
+
commands: ReconstructCommand[];
|
|
157
|
+
/** Explicit failures and incomplete-scope reasons; never replaced with healthy empty arrays. */
|
|
158
|
+
diagnostics: Array<{
|
|
159
|
+
code: string;
|
|
160
|
+
stage: string;
|
|
161
|
+
message: string;
|
|
162
|
+
}>;
|
|
163
|
+
/** Non-authoritative inference and local-scope limitations retained even for current coverage. */
|
|
164
|
+
limitations: string[];
|
|
165
|
+
}
|
|
97
166
|
//# sourceMappingURL=audit.d.ts.map
|
package/dist/audit.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../src/audit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,oCAAoC;IACpC,GAAG,EAAE,MAAM,CAAC;IACZ,oCAAoC;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,4BAA4B;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,gCAAgC;IAChC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,4CAA4C;IAC5C,GAAG,EAAE,MAAM,CAAC;IACZ,wCAAwC;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,4EAA4E;IAC5E,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,iBAAiB;IAChC,qDAAqD;IACrD,MAAM,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,aAAa,EAAE,WAAW,EAAE,CAAC;IAE7B;;;OAGG;IACH,YAAY,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAElD;;;OAGG;IACH,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC;IAE5C;;;OAGG;IACH,WAAW,EAAE,eAAe,EAAE,CAAC;IAE/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M,EAAE,CAAC;CACvB"}
|
|
@@ -152,4 +152,84 @@ export interface BackupManifest {
|
|
|
152
152
|
/** Bundle integrity metadata (algorithm, checksums file, manifest self-hash). */
|
|
153
153
|
integrity: BackupIntegrity;
|
|
154
154
|
}
|
|
155
|
+
/** Lossless SQLite value representation for an authentic observation payload. */
|
|
156
|
+
export type BackupObservationValue = {
|
|
157
|
+
type: 'null';
|
|
158
|
+
} | {
|
|
159
|
+
type: 'integer';
|
|
160
|
+
decimal: string;
|
|
161
|
+
} | {
|
|
162
|
+
type: 'real';
|
|
163
|
+
ieee754Hex: string;
|
|
164
|
+
} | {
|
|
165
|
+
type: 'text' | 'blob';
|
|
166
|
+
bytesBase64: string;
|
|
167
|
+
};
|
|
168
|
+
/** Explicit inputs for inspecting one snapshot; no ambient live-store routing. */
|
|
169
|
+
export interface BackupObservationInspectOptions {
|
|
170
|
+
/** Absolute path to one authorized SQLite snapshot, never a live-store role. */
|
|
171
|
+
snapshotPath: string;
|
|
172
|
+
/** Exact observation identity; no substring or semantic matching. */
|
|
173
|
+
recordId: string;
|
|
174
|
+
/** Original caller-supplied backup label; advisory, never used for routing. */
|
|
175
|
+
label?: string;
|
|
176
|
+
/** Stable expected project identity, compared only with recorded project_id. */
|
|
177
|
+
expectedProjectId?: string;
|
|
178
|
+
/** Source byte ceiling, at most 1 GiB; default 512 MiB. */
|
|
179
|
+
maxSnapshotBytes?: number;
|
|
180
|
+
/** Sum of SQLite CAST(value AS BLOB) lengths; at most 16 MiB, default 1 MiB. */
|
|
181
|
+
maxPayloadBytes?: number;
|
|
182
|
+
}
|
|
183
|
+
/** Supported diagnostic categories; none establish absence of a historical record. */
|
|
184
|
+
export type BackupObservationInspectFailure = 'INVALID_INPUT' | 'UNSUPPORTED_SOURCE' | 'SOURCE_CHANGED' | 'JOURNAL_PRESENT' | 'SOURCE_LIMIT' | 'PAYLOAD_LIMIT' | 'INVALID_SNAPSHOT' | 'UNSUPPORTED_SCHEMA' | 'AMBIGUOUS_RECORD' | 'PROJECT_MISMATCH';
|
|
185
|
+
/** Authentic observation extracted from one exact, ordinary indexed table. */
|
|
186
|
+
export interface BackupObservationRecord {
|
|
187
|
+
/** Actual table containing the row, independent of snapshot filename. */
|
|
188
|
+
table: 'brain_observations' | 'observations';
|
|
189
|
+
/** Exact column names mapped to lossless tagged SQLite values. */
|
|
190
|
+
payload: Record<string, BackupObservationValue>;
|
|
191
|
+
/** SHA256 of UTF-8 JSON for column-name-sorted [name, taggedValue] pairs. */
|
|
192
|
+
payloadSha256: string;
|
|
193
|
+
/** Sum of SQLite CAST(value AS BLOB) lengths before JSON/base64 expansion. */
|
|
194
|
+
payloadBytes: number;
|
|
195
|
+
}
|
|
196
|
+
/** Scoped read-only result; not-found never means all backups were searched. */
|
|
197
|
+
export interface BackupObservationInspection {
|
|
198
|
+
/** Whether this exact ID occurred in a supported table in this snapshot. */
|
|
199
|
+
status: 'found' | 'not-found';
|
|
200
|
+
/** Exact requested identity. */
|
|
201
|
+
recordId: string;
|
|
202
|
+
/** Canonical source path and byte identity, rechecked after inspection. */
|
|
203
|
+
source: {
|
|
204
|
+
path: string;
|
|
205
|
+
label: string | null;
|
|
206
|
+
sha256: string;
|
|
207
|
+
bytes: number;
|
|
208
|
+
mtimeNs: string;
|
|
209
|
+
ctimeNs: string;
|
|
210
|
+
/** Observed access time before reading; not a content-mutation precondition. */
|
|
211
|
+
atimeNs: string;
|
|
212
|
+
/** Observed access time at the final identity/content-metadata recheck. */
|
|
213
|
+
atimeAfterNs: string;
|
|
214
|
+
/** Whether access time changed; this does not identify the responsible reader. */
|
|
215
|
+
atimeChanged: boolean;
|
|
216
|
+
};
|
|
217
|
+
/** Actual SQLite schema marker; not an inferred product/schema version. */
|
|
218
|
+
userVersion: number;
|
|
219
|
+
/** Database encoding used by the preserved TEXT bytes. */
|
|
220
|
+
textEncoding: 'UTF-8' | 'UTF-16le' | 'UTF-16be';
|
|
221
|
+
/** Every supported table found and queried with indexed exact equality. */
|
|
222
|
+
inspectedTables: Array<'brain_observations' | 'observations'>;
|
|
223
|
+
/** Caller expectation is separate from recorded identity and never fills it in. */
|
|
224
|
+
projectIdentity: {
|
|
225
|
+
expected: string | null;
|
|
226
|
+
recorded: string | null;
|
|
227
|
+
status: 'matched' | 'recorded' | 'unknown';
|
|
228
|
+
evidence: string | null;
|
|
229
|
+
};
|
|
230
|
+
/** Full authentic row, or null only after eligible tables were inspected. */
|
|
231
|
+
record: BackupObservationRecord | null;
|
|
232
|
+
/** Explicit boundaries on completeness, identity and synchronous execution. */
|
|
233
|
+
limitations: string[];
|
|
234
|
+
}
|
|
155
235
|
//# sourceMappingURL=backup-manifest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backup-manifest.d.ts","sourceRoot":"","sources":["../src/backup-manifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAMH,iFAAiF;AACjF,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,QAAQ,GAAG,KAAK,CAAC;AAMvD;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,0DAA0D;IAC1D,SAAS,EAAE,MAAM,CAAC;IAClB,kEAAkE;IAClE,SAAS,EAAE,MAAM,CAAC;IAClB,qDAAqD;IACrD,KAAK,EAAE,WAAW,CAAC;IACnB,kDAAkD;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;OAGG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAC3B,yDAAyD;IACzD,WAAW,EAAE,MAAM,CAAC;IACpB,uDAAuD;IACvD,SAAS,EAAE,OAAO,CAAC;CACpB;AAMD;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,6BAA6B;IAC7B,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,YAAY,CAAC;IAC7D,mEAAmE;IACnE,QAAQ,EAAE,MAAM,CAAC;I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G,UAAU,GAAG,UAAU,CAAC;IAChD,2EAA2E;IAC3E,eAAe,EAAE,KAAK,CAAC,oBAAoB,GAAG,cAAc,CAAC,CAAC;IAC9D,mFAAmF;IACnF,eAAe,EAAE;QACf,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;QACxB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;QACxB,MAAM,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;QAC3C,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;KACzB,CAAC;IACF,6EAA6E;IAC7E,MAAM,EAAE,uBAAuB,GAAG,IAAI,CAAC;IACvC,+EAA+E;IAC/E,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB"}
|
package/dist/caamp-markers.d.ts
CHANGED
|
@@ -96,4 +96,24 @@ export type CaampInjectionAction = 'created' | 'added' | 'repaired' | 'consolida
|
|
|
96
96
|
* across a batch of files.
|
|
97
97
|
*/
|
|
98
98
|
export declare const CAAMP_INJECTION_ACTIONS: readonly ["created", "added", "repaired", "consolidated", "updated", "intact"];
|
|
99
|
+
/** A delivery defect that must remain visible rather than pretending instructions loaded. */
|
|
100
|
+
export interface InstructionDeliveryFinding {
|
|
101
|
+
/** Defect found during deterministic reference expansion. */
|
|
102
|
+
kind: 'missing-reference' | 'cycle' | 'duplicate' | 'limit' | 'stale';
|
|
103
|
+
/** Referenced source path or managed destination. */
|
|
104
|
+
path: string;
|
|
105
|
+
/** Human-readable evidence for the finding. */
|
|
106
|
+
reason: string;
|
|
107
|
+
}
|
|
108
|
+
/** Self-contained instruction delivery with explicit static verification limits. */
|
|
109
|
+
export interface InstructionDelivery {
|
|
110
|
+
/** Resolved content with no reliance on provider reference expansion. */
|
|
111
|
+
content: string;
|
|
112
|
+
/** Sources actually read during expansion. */
|
|
113
|
+
sources: string[];
|
|
114
|
+
/** Defects preventing trustworthy delivery. */
|
|
115
|
+
findings: InstructionDeliveryFinding[];
|
|
116
|
+
/** Static expansion is not a live provider behavior evaluation. */
|
|
117
|
+
liveEvaluation: 'unverified';
|
|
118
|
+
}
|
|
99
119
|
//# sourceMappingURL=caamp-markers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"caamp-markers.d.ts","sourceRoot":"","sources":["../src/caamp-markers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,yDAAyD;AACzD,eAAO,MAAM,kBAAkB,yBAAyB,CAAC;AAEzD,yDAAyD;AACzD,eAAO,MAAM,gBAAgB,uBAAuB,CAAC;AAErD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,0BAA0B,uDAAuD,CAAC;AAiC/F;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,kCAAkC,QAA+B,CAAC;AAE/E;;;;;GAKG;AACH,eAAO,MAAM,gCAAgC,QAA6B,CAAC;AAE3E;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,oBAAoB,GAC5B,SAAS,GACT,OAAO,GACP,UAAU,GACV,cAAc,GACd,SAAS,GACT,QAAQ,CAAC;AAEb;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,gFAO1B,CAAC"}
|
|
1
|
+
{"version":3,"file":"caamp-markers.d.ts","sourceRoot":"","sources":["../src/caamp-markers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,yDAAyD;AACzD,eAAO,MAAM,kBAAkB,yBAAyB,CAAC;AAEzD,yDAAyD;AACzD,eAAO,MAAM,gBAAgB,uBAAuB,CAAC;AAErD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,0BAA0B,uDAAuD,CAAC;AAiC/F;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,kCAAkC,QAA+B,CAAC;AAE/E;;;;;GAKG;AACH,eAAO,MAAM,gCAAgC,QAA6B,CAAC;AAE3E;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,oB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