@holmes-lab/holmes-kit 0.19.5 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +135 -0
- package/README.md +17 -1
- package/dist/.build-id +1 -1
- package/dist/holmes/cli/approve-status.d.ts +24 -0
- package/dist/holmes/cli/approve-status.js +166 -0
- package/dist/holmes/cli/approve-watch.d.ts +6 -0
- package/dist/holmes/cli/approve-watch.js +6 -0
- package/dist/holmes/cli/approve.d.ts +27 -0
- package/dist/holmes/cli/approve.js +68 -7
- package/dist/holmes/cli/cli-execution.d.ts +2 -0
- package/dist/holmes/cli/cli-execution.js +24 -0
- package/dist/holmes/cli/gitignore-merge.d.ts +0 -5
- package/dist/holmes/cli/gitignore-merge.js +6 -2
- package/dist/holmes/cli/index.js +176 -139
- package/dist/holmes/cli/playbook-skills.d.ts +2 -22
- package/dist/holmes/cli/playbook-skills.js +10 -54
- package/dist/holmes/governance/approval-grants.d.ts +22 -0
- package/dist/holmes/governance/approval-grants.js +55 -1
- package/dist/holmes/governance/approval-queue.d.ts +43 -4
- package/dist/holmes/governance/approval-queue.js +86 -12
- package/dist/holmes/governance/display-id-aliases.d.ts +29 -0
- package/dist/holmes/governance/display-id-aliases.js +86 -0
- package/dist/holmes/governance/ledger-store.d.ts +42 -14
- package/dist/holmes/governance/ledger-store.js +49 -3
- package/dist/holmes/governance/ledger-timeline.d.ts +3 -1
- package/dist/holmes/governance/ledger-timeline.js +11 -1
- package/dist/holmes/governance/provenance-chain.d.ts +2 -0
- package/dist/holmes/governance/provenance-chain.js +13 -2
- package/dist/holmes/governance/provenance-ledger.d.ts +28 -0
- package/dist/holmes/governance/provenance-ledger.js +69 -16
- package/dist/holmes/governance/session-context.d.ts +3 -0
- package/dist/holmes/governance/session-context.js +26 -8
- package/dist/holmes/guardrail/risk-classifier.js +2 -2
- package/dist/holmes/guardrail/write-target.js +2 -1
- package/dist/holmes/hooks/pre-tool-use.js +12 -1
- package/dist/holmes/hooks/stop.js +14 -3
- package/dist/holmes/mcp/handlers/adoption.d.ts +118 -0
- package/dist/holmes/mcp/handlers/adoption.js +186 -0
- package/dist/holmes/mcp/handlers/entity-integration.d.ts +100 -0
- package/dist/holmes/mcp/handlers/entity-integration.js +324 -0
- package/dist/holmes/mcp/handlers/entity-renumber.d.ts +137 -0
- package/dist/holmes/mcp/handlers/entity-renumber.js +228 -0
- package/dist/holmes/mcp/handlers/entity-store.d.ts +78 -0
- package/dist/holmes/mcp/handlers/entity-store.js +212 -0
- package/dist/holmes/mcp/handlers/graph-operations.d.ts +90 -0
- package/dist/holmes/mcp/handlers/graph-operations.js +260 -0
- package/dist/holmes/mcp/handlers/maintenance-analysis.d.ts +34 -0
- package/dist/holmes/mcp/handlers/maintenance-analysis.js +288 -0
- package/dist/holmes/mcp/handlers/maintenance-evidence.d.ts +40 -0
- package/dist/holmes/mcp/handlers/maintenance-evidence.js +104 -0
- package/dist/holmes/mcp/handlers/operator-inspection.d.ts +167 -0
- package/dist/holmes/mcp/handlers/operator-inspection.js +284 -0
- package/dist/holmes/mcp/handlers/phase-queries.d.ts +34 -0
- package/dist/holmes/mcp/handlers/phase-queries.js +86 -0
- package/dist/holmes/mcp/handlers/review-evidence.d.ts +47 -0
- package/dist/holmes/mcp/handlers/review-evidence.js +370 -0
- package/dist/holmes/mcp/handlers/review-queries.d.ts +68 -0
- package/dist/holmes/mcp/handlers/review-queries.js +79 -0
- package/dist/holmes/mcp/handlers/risk-assessment.d.ts +25 -0
- package/dist/holmes/mcp/handlers/risk-assessment.js +181 -0
- package/dist/holmes/mcp/handlers/slice-orchestration.d.ts +55 -0
- package/dist/holmes/mcp/handlers/slice-orchestration.js +324 -0
- package/dist/holmes/mcp/handlers/spec-approval.d.ts +105 -0
- package/dist/holmes/mcp/handlers/spec-approval.js +504 -0
- package/dist/holmes/mcp/handlers/spec-authoring.d.ts +57 -0
- package/dist/holmes/mcp/handlers/spec-authoring.js +326 -0
- package/dist/holmes/mcp/handlers/spec-lifecycle.d.ts +122 -0
- package/dist/holmes/mcp/handlers/spec-lifecycle.js +339 -0
- package/dist/holmes/mcp/handlers/spec-queries.d.ts +30 -0
- package/dist/holmes/mcp/handlers/spec-queries.js +74 -0
- package/dist/holmes/mcp/handlers/taint-screening.d.ts +48 -0
- package/dist/holmes/mcp/handlers/taint-screening.js +183 -0
- package/dist/holmes/mcp/handlers/test-execution.d.ts +63 -0
- package/dist/holmes/mcp/handlers/test-execution.js +210 -0
- package/dist/holmes/mcp/handlers/workspace-identity.d.ts +30 -0
- package/dist/holmes/mcp/handlers/workspace-identity.js +68 -0
- package/dist/holmes/mcp/handlers/workspace-queries.d.ts +77 -0
- package/dist/holmes/mcp/handlers/workspace-queries.js +193 -0
- package/dist/holmes/mcp/handlers.d.ts +653 -424
- package/dist/holmes/mcp/handlers.js +267 -3250
- package/dist/holmes/mcp/server.js +2 -1
- package/dist/holmes/mcp/tool-schemas.js +43 -2
- package/dist/holmes/project/execution-context.d.ts +17 -0
- package/dist/holmes/project/execution-context.js +120 -0
- package/dist/holmes/project/installer-markers.d.ts +34 -0
- package/dist/holmes/project/installer-markers.js +65 -0
- package/dist/holmes/project/root.d.ts +3 -1
- package/dist/holmes/project/root.js +4 -3
- package/dist/holmes/project/workspace-identity.d.ts +29 -0
- package/dist/holmes/project/workspace-identity.js +181 -0
- package/dist/holmes/review/test-outcomes.d.ts +6 -1
- package/dist/holmes/review/test-outcomes.js +23 -5
- package/dist/holmes/review/test-runner.d.ts +18 -0
- package/dist/holmes/review/test-runner.js +132 -4
- package/dist/holmes/rtm/graph-store.d.ts +50 -1
- package/dist/holmes/rtm/graph-store.js +244 -3
- package/dist/holmes/rtm/incremental.d.ts +1 -0
- package/dist/holmes/rtm/incremental.js +12 -3
- package/dist/holmes/rtm/localize.js +7 -0
- package/dist/holmes/rtm/rtm-graph.d.ts +9 -0
- package/dist/holmes/rtm/rtm-graph.js +13 -0
- package/dist/holmes/semantic/vector-cache.d.ts +16 -1
- package/dist/holmes/semantic/vector-cache.js +155 -19
- package/dist/holmes/spec/approval-status.d.ts +10 -0
- package/dist/holmes/spec/approval-status.js +7 -3
- package/dist/holmes/spec/entity-git-snapshot.d.ts +50 -0
- package/dist/holmes/spec/entity-git-snapshot.js +276 -0
- package/dist/holmes/spec/entity-integration-discharge.d.ts +73 -0
- package/dist/holmes/spec/entity-integration-discharge.js +233 -0
- package/dist/holmes/spec/entity-integration-transaction.d.ts +179 -0
- package/dist/holmes/spec/entity-integration-transaction.js +1221 -0
- package/dist/holmes/spec/entity-integration.d.ts +207 -0
- package/dist/holmes/spec/entity-integration.js +747 -0
- package/dist/holmes/spec/entity-renumber-transaction.d.ts +82 -0
- package/dist/holmes/spec/entity-renumber-transaction.js +711 -0
- package/dist/holmes/spec/entity-renumber.d.ts +32 -0
- package/dist/holmes/spec/entity-renumber.js +156 -0
- package/dist/holmes/spec/entity-store.d.ts +135 -0
- package/dist/holmes/spec/entity-store.js +1051 -0
- package/dist/holmes/spec/entity-transaction.d.ts +89 -0
- package/dist/holmes/spec/entity-transaction.js +701 -0
- package/dist/holmes/spec/renumber.d.ts +58 -0
- package/dist/holmes/spec/renumber.js +200 -1
- package/dist/holmes/spec/spec-store.d.ts +3 -2
- package/dist/holmes/spec/spec-store.js +23 -2
- package/dist/holmes/spec/transition-policy.d.ts +36 -0
- package/dist/holmes/spec/transition-policy.js +135 -0
- package/package.json +1 -1
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import { EntityGitInputs, EntityGitSnapshot } from './entity-git-snapshot';
|
|
2
|
+
import { EntityRenumberProposal } from './entity-renumber';
|
|
3
|
+
type Entity = EntityGitSnapshot['entities'][number];
|
|
4
|
+
export interface EntityGitFileVersion {
|
|
5
|
+
mode: string;
|
|
6
|
+
bytes: Buffer;
|
|
7
|
+
}
|
|
8
|
+
export type EntityGitObject = {
|
|
9
|
+
commit: string;
|
|
10
|
+
oid: string;
|
|
11
|
+
mode: string;
|
|
12
|
+
path: string;
|
|
13
|
+
} | null;
|
|
14
|
+
export type EntityGitSideRecord<T> = Record<'base' | 'left' | 'right', T>;
|
|
15
|
+
/** @implements A-SPEC-636 — a source-level conflict with the immutable per-side objects of the involved path. */
|
|
16
|
+
export interface EntityGitSourceEvidence {
|
|
17
|
+
kind: 'source';
|
|
18
|
+
file: string;
|
|
19
|
+
reason: string;
|
|
20
|
+
target?: string;
|
|
21
|
+
other?: string;
|
|
22
|
+
objects: EntityGitSideRecord<EntityGitObject>;
|
|
23
|
+
}
|
|
24
|
+
/** @implements A-SPEC-636 — an entity-level numbering, document, reference or mirror conflict with per-side facts. */
|
|
25
|
+
export type EntityGitNumberingEvidence = {
|
|
26
|
+
kind: 'numbering';
|
|
27
|
+
entityId: string;
|
|
28
|
+
reason: 'concurrent-display-id';
|
|
29
|
+
displayIds: EntityGitSideRecord<string | null>;
|
|
30
|
+
} | {
|
|
31
|
+
kind: 'document';
|
|
32
|
+
entityId: string;
|
|
33
|
+
reason: 'unsupported-type' | 'id-mismatch' | 'unsupported-display-id';
|
|
34
|
+
displayIds: EntityGitSideRecord<string | null>;
|
|
35
|
+
} | {
|
|
36
|
+
kind: 'reference';
|
|
37
|
+
entityId: string;
|
|
38
|
+
reference: string;
|
|
39
|
+
reason: 'ambiguous' | 'unresolved' | 'deleted-target';
|
|
40
|
+
targets: EntityGitSideRecord<string | null>;
|
|
41
|
+
} | {
|
|
42
|
+
kind: 'mirror';
|
|
43
|
+
entityIds: string[];
|
|
44
|
+
reason: 'incompatible-mirror-numbers';
|
|
45
|
+
displayIds: Record<string, EntityGitSideRecord<string | null>>;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* @implements A-SPEC-637 — non-regular entries (symlinks, gitlinks) identical in base, left and right:
|
|
49
|
+
* excluded from integration and never read as blobs. Anything else non-regular is a refusal.
|
|
50
|
+
*/
|
|
51
|
+
export declare function unchangedNonRegular(inputs: EntityGitInputs): Map<string, string>;
|
|
52
|
+
export interface EntityGitMergedSources {
|
|
53
|
+
ok: boolean;
|
|
54
|
+
conflicts: string[];
|
|
55
|
+
evidence: EntityGitSourceEvidence[];
|
|
56
|
+
commits: Record<'base' | 'left' | 'right', string>;
|
|
57
|
+
normalization: EntityGitSources;
|
|
58
|
+
validation: {
|
|
59
|
+
diagnostics: Array<{
|
|
60
|
+
file: string;
|
|
61
|
+
reason: string;
|
|
62
|
+
}>;
|
|
63
|
+
proseCandidates: Array<{
|
|
64
|
+
file: string;
|
|
65
|
+
line: number;
|
|
66
|
+
text: string;
|
|
67
|
+
}>;
|
|
68
|
+
anchors: Array<{
|
|
69
|
+
file: string;
|
|
70
|
+
displayId: string;
|
|
71
|
+
entityId: string;
|
|
72
|
+
}>;
|
|
73
|
+
};
|
|
74
|
+
files: Array<{
|
|
75
|
+
file: string;
|
|
76
|
+
merge: EntityGitFileMerge;
|
|
77
|
+
objects: Record<'base' | 'left' | 'right', {
|
|
78
|
+
commit: string;
|
|
79
|
+
oid: string;
|
|
80
|
+
mode: string;
|
|
81
|
+
path: string;
|
|
82
|
+
} | null>;
|
|
83
|
+
}>;
|
|
84
|
+
excluded: Array<{
|
|
85
|
+
file: string;
|
|
86
|
+
reason: string;
|
|
87
|
+
}>;
|
|
88
|
+
}
|
|
89
|
+
/** Ordinary tracked files only; excluded canonical paths remain obligations of the integration executor. */
|
|
90
|
+
export declare function planEntityGitMergedSources(root: string, revisions: {
|
|
91
|
+
base: string;
|
|
92
|
+
left: string;
|
|
93
|
+
right: string;
|
|
94
|
+
}, storeLocator: string): Promise<EntityGitMergedSources>;
|
|
95
|
+
export interface EntityGitFileMerge {
|
|
96
|
+
ok: boolean;
|
|
97
|
+
result: EntityGitFileVersion | null;
|
|
98
|
+
reason: string;
|
|
99
|
+
inputs: {
|
|
100
|
+
base: EntityGitFileVersion | null;
|
|
101
|
+
left: EntityGitFileVersion | null;
|
|
102
|
+
right: EntityGitFileVersion | null;
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
/** Merge already-normalized bytes. Scratch files are not a materialized Holmes workspace. */
|
|
106
|
+
export declare function mergeEntityGitFile(base: EntityGitFileVersion | null, left: EntityGitFileVersion | null, right: EntityGitFileVersion | null): EntityGitFileMerge;
|
|
107
|
+
export interface EntityGitSourceBranch {
|
|
108
|
+
files: Array<{
|
|
109
|
+
file: string;
|
|
110
|
+
oid: string;
|
|
111
|
+
mode: string;
|
|
112
|
+
before: string;
|
|
113
|
+
after: string;
|
|
114
|
+
anchors: Array<{
|
|
115
|
+
displayId: string;
|
|
116
|
+
entityId: string;
|
|
117
|
+
newDisplayId: string;
|
|
118
|
+
targetDeleted?: true;
|
|
119
|
+
}>;
|
|
120
|
+
}>;
|
|
121
|
+
diagnostics: Array<{
|
|
122
|
+
file: string;
|
|
123
|
+
reason: string;
|
|
124
|
+
}>;
|
|
125
|
+
proseCandidates: Array<{
|
|
126
|
+
file: string;
|
|
127
|
+
line: number;
|
|
128
|
+
text: string;
|
|
129
|
+
}>;
|
|
130
|
+
}
|
|
131
|
+
export interface EntityGitSources {
|
|
132
|
+
ok: boolean;
|
|
133
|
+
conflicts: string[];
|
|
134
|
+
evidence?: EntityGitNumberingEvidence[];
|
|
135
|
+
branches: {
|
|
136
|
+
base: EntityGitSourceBranch;
|
|
137
|
+
left: EntityGitSourceBranch;
|
|
138
|
+
right: EntityGitSourceBranch;
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
/** Branch proposals retain provenance; ordinary three-way source merging and publication follow separately. */
|
|
142
|
+
export declare function planEntityGitSources(root: string, revisions: {
|
|
143
|
+
base: string;
|
|
144
|
+
left: string;
|
|
145
|
+
right: string;
|
|
146
|
+
}, storeLocator: string): Promise<EntityGitSources>;
|
|
147
|
+
export interface EntityGitNumbering {
|
|
148
|
+
ok: boolean;
|
|
149
|
+
assignments: Array<{
|
|
150
|
+
entityId: string;
|
|
151
|
+
oldDisplayId: string;
|
|
152
|
+
newDisplayId: string;
|
|
153
|
+
}>;
|
|
154
|
+
conflicts: string[];
|
|
155
|
+
/** @implements A-SPEC-636 — one structured record per conflict string, with per-side facts; present only when refused. */
|
|
156
|
+
evidence?: EntityGitNumberingEvidence[];
|
|
157
|
+
}
|
|
158
|
+
export interface EntityGitDocuments {
|
|
159
|
+
ok: boolean;
|
|
160
|
+
conflicts: string[];
|
|
161
|
+
evidence?: EntityGitNumberingEvidence[];
|
|
162
|
+
documents: Array<EntityRenumberProposal['entries'][number] & {
|
|
163
|
+
source: 'base' | 'left' | 'right';
|
|
164
|
+
sourceCommit: string;
|
|
165
|
+
}>;
|
|
166
|
+
branches?: {
|
|
167
|
+
base: EntityRenumberProposal;
|
|
168
|
+
left: EntityRenumberProposal;
|
|
169
|
+
right: EntityRenumberProposal;
|
|
170
|
+
};
|
|
171
|
+
approval?: {
|
|
172
|
+
targets: Array<{
|
|
173
|
+
entityId: string;
|
|
174
|
+
displayId: string;
|
|
175
|
+
reasons: string[];
|
|
176
|
+
}>;
|
|
177
|
+
unsealOrder: string[];
|
|
178
|
+
approveOrder: string[];
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
/** Keep each original namespace until references have been rewritten; never merge ID maps first. */
|
|
182
|
+
export declare function planEntityGitDocuments(inputs: EntityGitInputs): EntityGitDocuments;
|
|
183
|
+
/** Namespace proposal only: these assignments still need reference rewriting, authorization and publication. */
|
|
184
|
+
export declare function planEntityGitNumbering(inputs: EntityGitInputs): EntityGitNumbering;
|
|
185
|
+
export interface EntityGitClassification {
|
|
186
|
+
schema: 'holmes-entity-git-classification/1';
|
|
187
|
+
commits: {
|
|
188
|
+
base: string;
|
|
189
|
+
left: string;
|
|
190
|
+
right: string;
|
|
191
|
+
};
|
|
192
|
+
decisions: Array<{
|
|
193
|
+
entityId: string;
|
|
194
|
+
outcome: 'unchanged' | 'left' | 'right' | 'equal' | 'deleted' | 'conflict';
|
|
195
|
+
reason: string;
|
|
196
|
+
base: Entity | null;
|
|
197
|
+
left: Entity | null;
|
|
198
|
+
right: Entity | null;
|
|
199
|
+
}>;
|
|
200
|
+
collisions: Array<{
|
|
201
|
+
displayId: string;
|
|
202
|
+
entityIds: string[];
|
|
203
|
+
}>;
|
|
204
|
+
}
|
|
205
|
+
/** Exact remains the default; meaning mode changes comparison, never retained inputs. */
|
|
206
|
+
export declare function classifyEntityGitChanges(inputs: EntityGitInputs, comparison?: 'exact' | 'meaning'): EntityGitClassification;
|
|
207
|
+
export {};
|