@holmes-lab/holmes-kit 0.39.0 → 0.40.1
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 +578 -6
- package/README.md +120 -41
- package/dist/.build-id +1 -1
- package/dist/holmes/admission/core/admission-policy.d.ts +37 -0
- package/dist/holmes/admission/core/admission-policy.js +147 -0
- package/dist/holmes/admission/core/bounded-reader.d.ts +56 -0
- package/dist/holmes/admission/core/bounded-reader.js +135 -0
- package/dist/holmes/admission/core/change-classifier.d.ts +34 -0
- package/dist/holmes/admission/core/change-classifier.js +278 -0
- package/dist/holmes/admission/core/config-loader.d.ts +30 -0
- package/dist/holmes/admission/core/config-loader.js +145 -0
- package/dist/holmes/admission/core/event-judgement.d.ts +37 -0
- package/dist/holmes/admission/core/event-judgement.js +251 -0
- package/dist/holmes/admission/core/path-rules.d.ts +35 -0
- package/dist/holmes/admission/core/path-rules.js +88 -0
- package/dist/holmes/admission/core/pin.d.ts +7 -0
- package/dist/holmes/admission/core/pin.js +29 -0
- package/dist/holmes/admission/core/ports.d.ts +48 -0
- package/dist/holmes/admission/core/ports.js +11 -0
- package/dist/holmes/admission/core/range-resolver.d.ts +32 -0
- package/dist/holmes/admission/core/range-resolver.js +51 -0
- package/dist/holmes/admission/core/self-containment.d.ts +1 -0
- package/dist/holmes/admission/core/self-containment.js +125 -0
- package/dist/holmes/admission/core/signature-source.d.ts +9 -0
- package/dist/holmes/admission/core/signature-source.js +4 -0
- package/dist/holmes/admission/core/transition-planner.d.ts +15 -0
- package/dist/holmes/admission/core/transition-planner.js +14 -0
- package/dist/holmes/admission/core/verdict.d.ts +38 -0
- package/dist/holmes/admission/core/verdict.js +17 -0
- package/dist/holmes/admission/core/wiring.d.ts +44 -0
- package/dist/holmes/admission/core/wiring.js +618 -0
- package/dist/holmes/admission/forge/git-object-port.d.ts +4 -0
- package/dist/holmes/admission/forge/git-object-port.js +132 -0
- package/dist/holmes/assoc/assoc-arm.d.ts +1 -1
- package/dist/holmes/assoc/assoc-arm.js +1 -1
- package/dist/holmes/cli/agents.d.ts +8 -0
- package/dist/holmes/cli/agents.js +9 -5
- package/dist/holmes/cli/approve-cli.d.ts +2 -0
- package/dist/holmes/cli/approve-cli.js +392 -0
- package/dist/holmes/cli/approve-ref.d.ts +13 -7
- package/dist/holmes/cli/approve-ref.js +30 -10
- package/dist/holmes/cli/approve-status.d.ts +26 -2
- package/dist/holmes/cli/approve-status.js +98 -18
- package/dist/holmes/cli/approve-watch.d.ts +5 -0
- package/dist/holmes/cli/approve-watch.js +10 -5
- package/dist/holmes/cli/approve.d.ts +49 -13
- package/dist/holmes/cli/approve.js +249 -67
- package/dist/holmes/cli/attest.js +2 -1
- package/dist/holmes/cli/autonomy.d.ts +4 -1
- package/dist/holmes/cli/autonomy.js +17 -10
- package/dist/holmes/cli/codex-oracle.d.ts +11 -0
- package/dist/holmes/cli/codex-oracle.js +5 -1
- package/dist/holmes/cli/codex-toml.d.ts +10 -0
- package/dist/holmes/cli/codex-toml.js +36 -2
- package/dist/holmes/cli/doctor-boundary.d.ts +76 -0
- package/dist/holmes/cli/doctor-boundary.js +308 -0
- package/dist/holmes/cli/doctor-locks.d.ts +15 -0
- package/dist/holmes/cli/doctor-locks.js +119 -0
- package/dist/holmes/cli/doctor.d.ts +2 -0
- package/dist/holmes/cli/doctor.js +34 -5
- package/dist/holmes/cli/flags.d.ts +23 -0
- package/dist/holmes/cli/flags.js +89 -0
- package/dist/holmes/cli/index.d.ts +5 -1
- package/dist/holmes/cli/index.js +226 -442
- package/dist/holmes/cli/init.js +33 -0
- package/dist/holmes/cli/interactive-prompt.d.ts +39 -2
- package/dist/holmes/cli/interactive-prompt.js +98 -16
- package/dist/holmes/cli/lock-recover.d.ts +5 -0
- package/dist/holmes/cli/lock-recover.js +126 -0
- package/dist/holmes/cli/mcp-processes.js +1 -1
- package/dist/holmes/cli/release-docs.js +1 -1
- package/dist/holmes/cli/run-exec.d.ts +141 -0
- package/dist/holmes/cli/run-exec.js +1435 -0
- package/dist/holmes/cli/run-provision.d.ts +3 -1
- package/dist/holmes/cli/run-provision.js +255 -44
- package/dist/holmes/cli/run-wiring.d.ts +69 -0
- package/dist/holmes/cli/run-wiring.js +270 -0
- package/dist/holmes/cli/run.d.ts +21 -0
- package/dist/holmes/cli/run.js +341 -92
- package/dist/holmes/cli/runtime-binding-approval.js +32 -19
- package/dist/holmes/cli/screen-safe.d.ts +3 -92
- package/dist/holmes/cli/screen-safe.js +18 -756
- package/dist/holmes/config/config.d.ts +19 -0
- package/dist/holmes/config/config.js +18 -3
- package/dist/holmes/cpg/foundation/language-matrix.js +2 -2
- package/dist/holmes/cpg/import-resolver.js +1 -1
- package/dist/holmes/governance/approval-decisions.d.ts +47 -0
- package/dist/holmes/governance/approval-decisions.js +29 -0
- package/dist/holmes/governance/approval-grants.d.ts +220 -1
- package/dist/holmes/governance/approval-grants.js +612 -33
- package/dist/holmes/governance/approval-queue.d.ts +26 -0
- package/dist/holmes/governance/approval-queue.js +109 -11
- package/dist/holmes/governance/approval-spend.d.ts +95 -0
- package/dist/holmes/governance/approval-spend.js +191 -0
- package/dist/holmes/governance/autonomous-shell.d.ts +61 -0
- package/dist/holmes/governance/autonomous-shell.js +332 -0
- package/dist/holmes/governance/autonomy.d.ts +12 -0
- package/dist/holmes/governance/autonomy.js +51 -15
- package/dist/holmes/governance/constitution.d.ts +5 -0
- package/dist/holmes/governance/constitution.js +32 -12
- package/dist/holmes/governance/full-autonomy.d.ts +10 -0
- package/dist/holmes/governance/full-autonomy.js +103 -7
- package/dist/holmes/governance/harness-catalog.d.ts +103 -0
- package/dist/holmes/governance/harness-catalog.js +348 -0
- package/dist/holmes/governance/human-channel.d.ts +38 -0
- package/dist/holmes/governance/human-channel.js +49 -0
- package/dist/holmes/governance/install-manifest.d.ts +22 -0
- package/dist/holmes/governance/install-manifest.js +160 -0
- package/dist/holmes/governance/ledger-rechain.js +2 -0
- package/dist/holmes/governance/ledger-store.conformance.d.ts +7 -1
- package/dist/holmes/governance/ledger-store.conformance.js +66 -0
- package/dist/holmes/governance/ledger-store.d.ts +88 -11
- package/dist/holmes/governance/ledger-store.js +186 -8
- package/dist/holmes/governance/provenance-chain.d.ts +16 -4
- package/dist/holmes/governance/provenance-chain.js +19 -4
- package/dist/holmes/governance/provenance-ledger.d.ts +6 -3
- package/dist/holmes/governance/provenance-ledger.js +53 -18
- package/dist/holmes/governance/push-gate-runner.d.ts +2 -0
- package/dist/holmes/governance/push-gate-runner.js +50 -9
- package/dist/holmes/governance/push-gate.d.ts +13 -2
- package/dist/holmes/governance/push-gate.js +106 -14
- package/dist/holmes/governance/recorded-pairs.d.ts +96 -0
- package/dist/holmes/governance/recorded-pairs.js +522 -0
- package/dist/holmes/governance/replica-id.d.ts +1 -1
- package/dist/holmes/governance/replica-id.js +1 -1
- package/dist/holmes/governance/spec-seam.d.ts +59 -0
- package/dist/holmes/governance/spec-seam.js +587 -0
- package/dist/holmes/governance/spend-kinds.d.ts +16 -0
- package/dist/holmes/governance/spend-kinds.js +18 -0
- package/dist/holmes/guardrail/advisory-line.d.ts +102 -0
- package/dist/holmes/guardrail/advisory-line.js +718 -0
- package/dist/holmes/guardrail/decision-ledger.d.ts +2 -1
- package/dist/holmes/guardrail/decision-ledger.js +2 -1
- package/dist/holmes/guardrail/impact-gate.d.ts +7 -0
- package/dist/holmes/guardrail/impact-gate.js +33 -6
- package/dist/holmes/guardrail/line-continuation.d.ts +8 -0
- package/dist/holmes/guardrail/line-continuation.js +39 -0
- package/dist/holmes/guardrail/operator-person.d.ts +28 -4
- package/dist/holmes/guardrail/operator-person.js +57 -11
- package/dist/holmes/guardrail/refusal-codes.d.ts +8 -3
- package/dist/holmes/guardrail/refusal-codes.js +64 -10
- package/dist/holmes/guardrail/risk-classifier.d.ts +15 -9
- package/dist/holmes/guardrail/risk-classifier.js +228 -16
- package/dist/holmes/guardrail/risk-gate.d.ts +2 -8
- package/dist/holmes/guardrail/risk-gate.js +7 -34
- package/dist/holmes/guardrail/risk-types.d.ts +10 -0
- package/dist/holmes/guardrail/run-plan-scope.js +3 -1
- package/dist/holmes/guardrail/run-refusals.js +24 -8
- package/dist/holmes/guardrail/run-stages.d.ts +5 -0
- package/dist/holmes/guardrail/run-stages.js +25 -5
- package/dist/holmes/guardrail/scope-judgment.js +1 -1
- package/dist/holmes/guardrail/shell-words.js +24 -3
- package/dist/holmes/guardrail/unresolved-write.d.ts +40 -0
- package/dist/holmes/guardrail/unresolved-write.js +556 -0
- package/dist/holmes/guardrail/write-target.d.ts +3 -0
- package/dist/holmes/guardrail/write-target.js +26 -5
- package/dist/holmes/hooks/pre-tool-use.d.ts +116 -1
- package/dist/holmes/hooks/pre-tool-use.js +1176 -170
- package/dist/holmes/hooks/rtm-refresh-child.d.ts +1 -1
- package/dist/holmes/hooks/rtm-refresh-child.js +1 -1
- package/dist/holmes/hooks/session-start.js +17 -1
- package/dist/holmes/hooks/stop.d.ts +23 -0
- package/dist/holmes/hooks/stop.js +86 -33
- package/dist/holmes/mcp/approval-adapters.js +3 -1
- package/dist/holmes/mcp/approval-commit.js +3 -2
- package/dist/holmes/mcp/approval-policy.d.ts +2 -1
- package/dist/holmes/mcp/approval-policy.js +3 -1
- package/dist/holmes/mcp/handlers/adoption.d.ts +1 -1
- package/dist/holmes/mcp/handlers/approval-ask.d.ts +3 -0
- package/dist/holmes/mcp/handlers/approval-ask.js +18 -7
- package/dist/holmes/mcp/handlers/entity-integration.d.ts +3 -3
- package/dist/holmes/mcp/handlers/entity-integration.js +29 -11
- package/dist/holmes/mcp/handlers/entity-renumber.d.ts +4 -4
- package/dist/holmes/mcp/handlers/entity-renumber.js +29 -11
- package/dist/holmes/mcp/handlers/entity-store.d.ts +2 -2
- package/dist/holmes/mcp/handlers/entity-store.js +133 -59
- package/dist/holmes/mcp/handlers/maintenance-analysis.d.ts +13 -0
- package/dist/holmes/mcp/handlers/maintenance-analysis.js +59 -2
- package/dist/holmes/mcp/handlers/operator-inspection.d.ts +9 -5
- package/dist/holmes/mcp/handlers/operator-inspection.js +79 -16
- package/dist/holmes/mcp/handlers/phase-queries.d.ts +1 -1
- package/dist/holmes/mcp/handlers/requirement-triage.d.ts +4 -4
- package/dist/holmes/mcp/handlers/review-evidence.d.ts +2 -2
- package/dist/holmes/mcp/handlers/review-evidence.js +35 -11
- package/dist/holmes/mcp/handlers/review-queries.d.ts +5 -0
- package/dist/holmes/mcp/handlers/review-queries.js +8 -1
- package/dist/holmes/mcp/handlers/review-verdict.d.ts +3 -0
- package/dist/holmes/mcp/handlers/review-verdict.js +10 -3
- package/dist/holmes/mcp/handlers/risk-assessment.d.ts +7 -2
- package/dist/holmes/mcp/handlers/risk-assessment.js +34 -12
- package/dist/holmes/mcp/handlers/runtime-binding-tool.d.ts +2 -2
- package/dist/holmes/mcp/handlers/slice-orchestration.d.ts +6 -1
- package/dist/holmes/mcp/handlers/slice-orchestration.js +14 -1
- package/dist/holmes/mcp/handlers/spec-approval.d.ts +15 -3
- package/dist/holmes/mcp/handlers/spec-approval.js +32 -5
- package/dist/holmes/mcp/handlers/spec-authoring.d.ts +2 -2
- package/dist/holmes/mcp/handlers/spec-authoring.js +19 -2
- package/dist/holmes/mcp/handlers/spec-lifecycle.d.ts +11 -38
- package/dist/holmes/mcp/handlers/spec-lifecycle.js +441 -94
- package/dist/holmes/mcp/handlers/spec-queries.d.ts +2 -2
- package/dist/holmes/mcp/handlers/taint-screening.d.ts +1 -1
- package/dist/holmes/mcp/handlers/taint-screening.js +2 -2
- package/dist/holmes/mcp/handlers/test-execution.d.ts +471 -4
- package/dist/holmes/mcp/handlers/test-execution.js +199 -21
- package/dist/holmes/mcp/handlers/workspace-queries.d.ts +2 -2
- package/dist/holmes/mcp/handlers.d.ts +557 -82
- package/dist/holmes/mcp/handlers.js +74 -23
- package/dist/holmes/mcp/harness-attestation.d.ts +78 -5
- package/dist/holmes/mcp/harness-attestation.js +325 -53
- package/dist/holmes/mcp/maintenance-analyze.d.ts +6 -1
- package/dist/holmes/mcp/maintenance-analyze.js +13 -11
- package/dist/holmes/mcp/maintenance-evidence.d.ts +9 -0
- package/dist/holmes/mcp/maintenance-evidence.js +35 -3
- package/dist/holmes/mcp/requirement-triage-evidence.js +22 -13
- package/dist/holmes/mcp/server-staleness.js +1 -1
- package/dist/holmes/mcp/server.js +9 -8
- package/dist/holmes/mcp/spec-id-guard.js +1 -1
- package/dist/holmes/mcp/tool-schemas.d.ts +13 -0
- package/dist/holmes/mcp/tool-schemas.js +42 -9
- package/dist/holmes/project/act-root.d.ts +19 -0
- package/dist/holmes/project/act-root.js +100 -0
- package/dist/holmes/project/baseline.d.ts +15 -2
- package/dist/holmes/project/baseline.js +14 -8
- package/dist/holmes/project/bounded-group.d.ts +47 -0
- package/dist/holmes/project/bounded-group.js +140 -0
- package/dist/holmes/project/bounded-io.d.ts +51 -2
- package/dist/holmes/project/bounded-io.js +140 -6
- package/dist/holmes/project/change-source.d.ts +4 -0
- package/dist/holmes/project/change-source.js +14 -6
- package/dist/holmes/project/instance-id.d.ts +10 -0
- package/dist/holmes/project/instance-id.js +233 -0
- package/dist/holmes/project/machine-identity.d.ts +25 -0
- package/dist/holmes/project/machine-identity.js +133 -0
- package/dist/holmes/project/owned-lock.d.ts +84 -0
- package/dist/holmes/project/owned-lock.js +263 -0
- package/dist/holmes/project/plain-lock-fs.d.ts +2 -0
- package/dist/holmes/project/plain-lock-fs.js +126 -0
- package/dist/holmes/project/request-lock.d.ts +85 -0
- package/dist/holmes/project/request-lock.js +459 -0
- package/dist/holmes/project/root.d.ts +12 -4
- package/dist/holmes/project/root.js +29 -8
- package/dist/holmes/project/run-records.d.ts +19 -0
- package/dist/holmes/project/run-records.js +94 -12
- package/dist/holmes/project/screen-text.d.ts +94 -0
- package/dist/holmes/project/screen-text.js +763 -0
- package/dist/holmes/project/spend-lock.d.ts +82 -0
- package/dist/holmes/project/spend-lock.js +413 -0
- package/dist/holmes/refresh/freshness-coordinator.d.ts +1 -1
- package/dist/holmes/refresh/freshness-coordinator.js +1 -1
- package/dist/holmes/review/condition-hunk-replay.js +4 -2
- package/dist/holmes/review/confidence-calibration.d.ts +1 -1
- package/dist/holmes/review/confidence-calibration.js +1 -1
- package/dist/holmes/review/content-verify.js +1 -1
- package/dist/holmes/review/evidence-mode.d.ts +21 -0
- package/dist/holmes/review/evidence-mode.js +33 -0
- package/dist/holmes/review/head-worktree.d.ts +55 -0
- package/dist/holmes/review/head-worktree.js +329 -0
- package/dist/holmes/review/hop-ablation.d.ts +4 -4
- package/dist/holmes/review/hop-ablation.js +5 -5
- package/dist/holmes/review/mrp.js +13 -3
- package/dist/holmes/review/point-in-time-replay.js +12 -3
- package/dist/holmes/review/rank-diagnosis.d.ts +2 -2
- package/dist/holmes/review/rank-diagnosis.js +1 -1
- package/dist/holmes/review/replay-corpus.d.ts +10 -4
- package/dist/holmes/review/replay-corpus.js +25 -9
- package/dist/holmes/review/requirement-triage.js +2 -2
- package/dist/holmes/review/run-provenance.d.ts +45 -0
- package/dist/holmes/review/run-provenance.js +314 -0
- package/dist/holmes/review/semantic-arm.d.ts +3 -3
- package/dist/holmes/review/semantic-arm.js +3 -3
- package/dist/holmes/review/test-evidence.d.ts +174 -0
- package/dist/holmes/review/test-evidence.js +330 -2
- package/dist/holmes/review/test-outcomes.js +3 -1
- package/dist/holmes/review/test-reports.d.ts +94 -0
- package/dist/holmes/review/test-reports.js +382 -0
- package/dist/holmes/review/test-runner.d.ts +180 -58
- package/dist/holmes/review/test-runner.js +560 -324
- package/dist/holmes/review/test-selection-breadth.js +2 -2
- package/dist/holmes/review/test-units.d.ts +159 -0
- package/dist/holmes/review/test-units.js +814 -0
- package/dist/holmes/review/verdicts.d.ts +105 -8
- package/dist/holmes/review/verdicts.js +640 -36
- package/dist/holmes/rtm/anchor-census.d.ts +9 -0
- package/dist/holmes/rtm/anchor-census.js +151 -0
- package/dist/holmes/rtm/anchor-ids.d.ts +25 -1
- package/dist/holmes/rtm/anchor-ids.js +45 -2
- package/dist/holmes/rtm/comment-ranges.d.ts +2 -0
- package/dist/holmes/rtm/comment-ranges.js +104 -0
- package/dist/holmes/rtm/counted-tests.d.ts +1 -0
- package/dist/holmes/rtm/counted-tests.js +63 -0
- package/dist/holmes/rtm/impact-advisory.d.ts +1 -1
- package/dist/holmes/rtm/known-defects.js +1 -1
- package/dist/holmes/rtm/localize.js +1 -1
- package/dist/holmes/rtm/taint-benchmark.d.ts +1 -1
- package/dist/holmes/rtm/taint-vocabulary.d.ts +1 -1
- package/dist/holmes/rtm/test-scope.d.ts +31 -0
- package/dist/holmes/rtm/test-scope.js +166 -5
- package/dist/holmes/rtm/trace-gaps.js +1 -1
- package/dist/holmes/runtime/dispatch.d.ts +10 -0
- package/dist/holmes/runtime/dispatch.js +12 -1
- package/dist/holmes/semantic/cloud-usage.d.ts +1 -1
- package/dist/holmes/semantic/cloud-usage.js +1 -1
- package/dist/holmes/semantic/unreadable-paths.d.ts +1 -1
- package/dist/holmes/semantic/unreadable-paths.js +1 -1
- package/dist/holmes/spec/approval-blockers.js +1 -1
- package/dist/holmes/spec/entity-store.d.ts +6 -1
- package/dist/holmes/spec/entity-store.js +16 -2
- package/dist/holmes/spec/entity-transaction.d.ts +7 -2
- package/dist/holmes/spec/entity-transaction.js +87 -170
- package/dist/holmes/spec/spec-store.d.ts +12 -6
- package/dist/holmes/spec/spec-store.js +4 -2
- package/dist/holmes/spec/spec-types.js +1 -1
- package/dist/holmes/spec/succession-guard.d.ts +56 -0
- package/dist/holmes/spec/succession-guard.js +187 -0
- package/dist/holmes/spec/succession.d.ts +70 -0
- package/dist/holmes/spec/succession.js +171 -0
- package/dist/holmes/spec/transition-policy.d.ts +2 -2
- package/docs/install-guide.md +9 -3
- package/docs/language-support.md +78 -0
- package/package.json +4 -3
- package/playbooks/author-slice/PLAYBOOK.md +1 -1
- package/playbooks/promote-slice/PLAYBOOK.md +5 -1
- package/playbooks/publish/PLAYBOOK.md +47 -34
- package/dist/holmes/review/manual-baseline.d.ts +0 -209
- package/dist/holmes/review/manual-baseline.js +0 -2847
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { type ProcLookup } from '../mcp/harness-attestation';
|
|
1
|
+
import { type HarnessRule, type ProcLookup } from '../mcp/harness-attestation';
|
|
2
|
+
import { type HarnessCatalog } from '../governance/harness-catalog';
|
|
3
|
+
import { LedgerActor } from '../governance/human-channel';
|
|
2
4
|
/** @implements A-SPEC-102.7 — the S·O·L·I·D checklist: each item compliant, violation or n-a, with its evidence. */
|
|
3
5
|
export type SolidItem = 'S' | 'O' | 'L' | 'I' | 'D';
|
|
4
6
|
export type SolidChecklist = Record<SolidItem, {
|
|
@@ -28,6 +30,7 @@ export interface VerdictRecord {
|
|
|
28
30
|
person: boolean;
|
|
29
31
|
channel?: string;
|
|
30
32
|
harness?: string;
|
|
33
|
+
harnessSources?: string[];
|
|
31
34
|
ancestry?: string;
|
|
32
35
|
};
|
|
33
36
|
authors: string[];
|
|
@@ -46,7 +49,13 @@ export interface VerdictInput {
|
|
|
46
49
|
session?: string;
|
|
47
50
|
solid?: SolidChecklist;
|
|
48
51
|
}
|
|
49
|
-
|
|
52
|
+
/**
|
|
53
|
+
* @implements A-SPEC-102.7 — the environment marker of an agent tool call: the harnesses set these in the processes
|
|
54
|
+
* their tools start. @implements A-SPEC-102.8 — agy: any ANTIGRAVITY_* variable (which one was not measured).
|
|
55
|
+
* @implements A-SPEC-102.27 — the markers are the harness catalog's (cursor-agent and opencode among them); a user or
|
|
56
|
+
* project file may only add to them. @implements A-SPEC-102.29 — the catalog is the caller's: no default reads cwd or home
|
|
57
|
+
*/
|
|
58
|
+
export declare function agentHarnessMarker(env: NodeJS.ProcessEnv, catalog: HarnessCatalog): string | null;
|
|
50
59
|
/**
|
|
51
60
|
* @implements A-SPEC-102.8 — whether an agent harness is among the ancestors of `pid`. Variables are what the agent
|
|
52
61
|
* controls (`env -u CLAUDECODE …`); the process tree above the CLI is not. A name match is enough here: a false match
|
|
@@ -58,11 +67,17 @@ export type HarnessAncestry = {
|
|
|
58
67
|
kind: 'harness';
|
|
59
68
|
harness: string;
|
|
60
69
|
chain: string[];
|
|
70
|
+
sources?: readonly string[];
|
|
61
71
|
} | {
|
|
62
72
|
kind: 'unreadable';
|
|
63
73
|
reason: string;
|
|
64
74
|
};
|
|
65
|
-
export declare function harnessAncestor(pid: number, lookup: ProcLookup, maxDepth
|
|
75
|
+
export declare function harnessAncestor(pid: number, lookup: ProcLookup, rule: HarnessRule, maxDepth: number, catalog: HarnessCatalog): HarnessAncestry;
|
|
76
|
+
/**
|
|
77
|
+
* @implements A-SPEC-732.2 — the walk the operator-act guard and review independence run: any claude version path counts
|
|
78
|
+
* (an agent under a version-path session with its markers removed passed an operator act as the person; reproduced)
|
|
79
|
+
*/
|
|
80
|
+
export declare function operatorAncestry(pid: number, catalog: HarnessCatalog, lookup?: ProcLookup): HarnessAncestry;
|
|
66
81
|
/**
|
|
67
82
|
* @implements A-SPEC-102.7 — the files a resolved range changes and the A-SPEC anchors that speak for it: each changed
|
|
68
83
|
* file's line-1 claim and the claims on the lines the range adds. A file's every inline anchor would make one hub file
|
|
@@ -80,11 +95,32 @@ export interface VerdictContext {
|
|
|
80
95
|
cwd?: string;
|
|
81
96
|
interactive: boolean;
|
|
82
97
|
now?: () => Date;
|
|
83
|
-
ancestry?: () => HarnessAncestry;
|
|
98
|
+
ancestry?: (catalog: HarnessCatalog) => HarnessAncestry;
|
|
84
99
|
/** @implements A-SPEC-102.9 — the form channel a person answered this verdict through; only review_verdict passes it. */
|
|
85
|
-
answeredBy?:
|
|
100
|
+
answeredBy?: LedgerActor;
|
|
86
101
|
}
|
|
87
102
|
export declare const verdictsFile: (main: string) => string;
|
|
103
|
+
/**
|
|
104
|
+
* @implements A-SPEC-102.22, A-SPEC-102.26 — the git of a judgment reads the repository as stored: no inherited GIT_* variable (a
|
|
105
|
+
* shallow file, an object directory, alternates, config entries or a namespace all steered it), replace objects off,
|
|
106
|
+
* no grafts file (A-SPEC-102.22) and no prompt.
|
|
107
|
+
*/
|
|
108
|
+
export declare function judgmentGitEnv(env?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
|
|
109
|
+
/**
|
|
110
|
+
* @implements A-SPEC-102.22 — the sha256 of the common dir's `shallow` and `info/grafts` (null when absent); null when
|
|
111
|
+
* the common dir or a present file cannot be read. Run start records it; a run review compares it.
|
|
112
|
+
*/
|
|
113
|
+
export declare function historyFiles(main: string): {
|
|
114
|
+
shallow: string | null;
|
|
115
|
+
grafts: string | null;
|
|
116
|
+
alternates: string | null;
|
|
117
|
+
http_alternates: string | null;
|
|
118
|
+
} | null;
|
|
119
|
+
/**
|
|
120
|
+
* @implements A-SPEC-102.25 — the history files, among those `atStart` recorded, that differ now (all of them when they
|
|
121
|
+
* cannot be read now). A key `atStart` does not hold is not compared: a record made before it was read.
|
|
122
|
+
*/
|
|
123
|
+
export declare function historyMoved(main: string, atStart: Record<string, unknown>): string[];
|
|
88
124
|
/** Both revisions as full commit ids, or the one that does not resolve. */
|
|
89
125
|
export declare function resolveRange(root: string, base: string, head: string): {
|
|
90
126
|
base: string;
|
|
@@ -92,8 +128,68 @@ export declare function resolveRange(root: string, base: string, head: string):
|
|
|
92
128
|
} | {
|
|
93
129
|
error: string;
|
|
94
130
|
};
|
|
95
|
-
/**
|
|
96
|
-
|
|
131
|
+
/**
|
|
132
|
+
* @implements A-SPEC-102.11 — authorship is the commits a run made, recorded when it stops, not the head it sits on.
|
|
133
|
+
* A run stopped earlier left its line in the main checkout's authors ledger.
|
|
134
|
+
*/
|
|
135
|
+
export declare const authorsFile: (main: string) => string;
|
|
136
|
+
type RunLike = {
|
|
137
|
+
run_id: string;
|
|
138
|
+
worktree: string;
|
|
139
|
+
engine?: unknown;
|
|
140
|
+
base?: unknown;
|
|
141
|
+
started?: unknown;
|
|
142
|
+
git_dir?: unknown;
|
|
143
|
+
};
|
|
144
|
+
/** `unreadable`: git could not read what the run made (A-SPEC-102.16), so it is taken as the author of the range. */
|
|
145
|
+
export interface Author {
|
|
146
|
+
run: string;
|
|
147
|
+
engine?: string;
|
|
148
|
+
unreadable?: true;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* @implements A-SPEC-102.13 — the commits a run made: its whole `base..HEAD` and every reflog entry but its base, with
|
|
152
|
+
* no message, time or branch filter (each was an escape: Fast-forward, a backdated committer date, a branch keeping a
|
|
153
|
+
* detached commit — measured). Over-attribution errs on the blocking side. Null for a record without a base.
|
|
154
|
+
*/
|
|
155
|
+
export declare function runAuthoredCommits(rec: RunLike): string[] | null;
|
|
156
|
+
/**
|
|
157
|
+
* @implements A-SPEC-102.16 — a run's authored commits (A-SPEC-102.13/102.15) and whether git could not read them: its
|
|
158
|
+
* HEAD, its reflog or its base..HEAD did not answer, or its pointer names another git dir (A-SPEC-102.17). An unreadable
|
|
159
|
+
* run never reads as "made nothing". Null for a record without a base.
|
|
160
|
+
*/
|
|
161
|
+
export declare function runAuthorship(rec: RunLike, main?: string, objects?: Set<string> | null): {
|
|
162
|
+
commits: string[];
|
|
163
|
+
unreadable: boolean;
|
|
164
|
+
candidates: string[];
|
|
165
|
+
snapshotRead: boolean;
|
|
166
|
+
} | null;
|
|
167
|
+
/** @implements A-SPEC-102.19 — where run start keeps a run's commit snapshot: the main checkout, out of the engine's reach. */
|
|
168
|
+
export declare const commitSnapshotFile: (main: string, runId: string) => string;
|
|
169
|
+
/** @implements A-SPEC-102.19 — every commit object in the store `cwd` reads (loose, packed and alternates); null when git cannot list them. */
|
|
170
|
+
export declare function commitObjects(cwd: string): Set<string> | null;
|
|
171
|
+
/** @implements A-SPEC-102.19 — run start's snapshot of the store's commit objects; false when it could not be written. */
|
|
172
|
+
export declare function snapshotRunCommits(main: string, runId: string): boolean;
|
|
173
|
+
/** @implements A-SPEC-102.15 — the number of entries in a worktree's HEAD reflog, recorded at run start. */
|
|
174
|
+
export declare function reflogLength(worktree: string): number;
|
|
175
|
+
/** Appends the stopped run's authored commits to the authors ledger; false when they could not be recorded. */
|
|
176
|
+
export declare function recordRunAuthorship(main: string, rec: RunLike, now?: () => Date): boolean;
|
|
177
|
+
/**
|
|
178
|
+
* The runs that authored a commit of `base..head` (`head` alone without a base), by sha or stable patch-id: active
|
|
179
|
+
* runs first, then the ledger. An active run without a recorded base keeps the old rule: its worktree HEAD is the head.
|
|
180
|
+
*/
|
|
181
|
+
export declare function rangeAuthors(main: string, headSha: string, base?: string): Author[];
|
|
182
|
+
/**
|
|
183
|
+
* @implements A-SPEC-102.19 — the authors of `base..head` and the commits of it no recorded run made: attributed by sha
|
|
184
|
+
* or stable patch-id to an active run's authorship (its snapshot delta included) or an authors ledger line. A run whose
|
|
185
|
+
* authorship is unreadable is an author of the ranges from its base (A-SPEC-102.16) but attributes no commit (102.20).
|
|
186
|
+
*/
|
|
187
|
+
export declare function rangeAuthorship(main: string, headSha: string, base?: string): {
|
|
188
|
+
authors: Author[];
|
|
189
|
+
unattributed: string[];
|
|
190
|
+
};
|
|
191
|
+
/** The ids of the runs that authored `base..head` (`head` alone without a base). */
|
|
192
|
+
export declare function authorRuns(main: string, headSha: string, base?: string): string[];
|
|
97
193
|
export declare function readVerdicts(main: string): VerdictRecord[];
|
|
98
194
|
export declare function recordVerdict(root: string, input: VerdictInput, ctx: VerdictContext): {
|
|
99
195
|
ok: true;
|
|
@@ -112,7 +208,7 @@ export declare function gateRange(root: string, base: string, head: string, opts
|
|
|
112
208
|
* @implements A-SPEC-102.10 — the run's review rounds that failed: independent `fail` verdicts on the run's base, across
|
|
113
209
|
* every head the remediation moved to. Returned oldest first, so the last carries the findings still unresolved.
|
|
114
210
|
*/
|
|
115
|
-
export declare function failingRounds(main: string, base: string): VerdictRecord[];
|
|
211
|
+
export declare function failingRounds(main: string, base: string, head?: string, cwd?: string, rec?: RunLike): VerdictRecord[];
|
|
116
212
|
export declare function rangeStatus(root: string, base: string, head: string): {
|
|
117
213
|
base: string;
|
|
118
214
|
head: string;
|
|
@@ -124,3 +220,4 @@ export declare function rangeStatus(root: string, base: string, head: string): {
|
|
|
124
220
|
} | {
|
|
125
221
|
error: string;
|
|
126
222
|
};
|
|
223
|
+
export {};
|