knodin 0.6.0 → 0.7.3
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/README.md +26 -3
- package/dist/bin/cli.js +168 -12
- package/dist/bin/launcher.js +11 -0
- package/dist/src/agent-integration.js +3 -1
- package/dist/src/cli-args.js +8 -1
- package/dist/src/cli-model.js +35 -1
- package/dist/src/codeflow-replay.js +80 -0
- package/dist/src/competitive-cold-mcp.js +40 -0
- package/dist/src/competitive-manifest.js +106 -25
- package/dist/src/competitive-runner.js +37 -3
- package/dist/src/competitive-sandbox.js +1 -1
- package/dist/src/diagnostics.js +449 -0
- package/dist/src/engine/git-history.js +289 -0
- package/dist/src/engine/index.js +417 -70
- package/dist/src/engine/scip-import.js +408 -0
- package/dist/src/execution-profile.js +203 -0
- package/dist/src/failure-diagnosis.js +69 -10
- package/dist/src/hook-manager-integration.js +156 -0
- package/dist/src/init.js +319 -33
- package/dist/src/lifecycle-health.js +42 -4
- package/dist/src/output-telemetry.js +4 -0
- package/dist/src/progressive-evidence.js +473 -0
- package/dist/src/pure-compression-cli.js +101 -0
- package/dist/src/release-preflight.js +510 -0
- package/dist/src/repository-management.js +142 -0
- package/dist/src/response-budget.js +11 -1
- package/dist/src/server.js +22 -2
- package/dist/src/structural-fast-path.js +303 -0
- package/dist/src/structural-snapshot.js +33 -0
- package/dist/src/tools/knodin-tools.js +105 -14
- package/dist/src/update-ceremony.js +158 -0
- package/docs/CLI.md +22 -0
- package/docs/COMMAND-OUTPUT-COMPRESSION.md +31 -15
- package/docs/CONTAINED-EXECUTION.md +77 -0
- package/docs/DIAGNOSTICS.md +45 -0
- package/docs/DOCTOR-AND-UPDATES.md +5 -2
- package/docs/GIT-HISTORY-REVIEW.md +39 -0
- package/docs/MCP.md +15 -0
- package/docs/PROGRESSIVE-EVIDENCE.md +37 -0
- package/docs/REPOSITORIES-AND-WORKTREES.md +30 -0
- package/docs/SCIP-IMPORT.md +57 -0
- package/docs/SIGNED-UPDATES.md +5 -0
- package/docs/TELEMETRY.md +4 -0
- package/docs/releases/0.7.0.md +24 -0
- package/docs/releases/0.7.1.md +21 -0
- package/docs/releases/0.7.2.md +21 -0
- package/docs/releases/0.7.3.md +23 -0
- package/package.json +33 -2
|
@@ -45,7 +45,7 @@ export const COMPETITIVE_MANIFEST = [
|
|
|
45
45
|
id: "graphify",
|
|
46
46
|
name: "Graphify",
|
|
47
47
|
version: "0.9.23",
|
|
48
|
-
roadmap: ["C2", "C3", "C11", "C12", "C13", "C17", "C24", "C26"],
|
|
48
|
+
roadmap: ["C2", "C3", "C11", "C12", "C13", "C17", "C24", "C26", "C41"],
|
|
49
49
|
baseline: "graphify-vs-knodin.raw.json",
|
|
50
50
|
requirements: [
|
|
51
51
|
{ type: "command", value: "graphify" },
|
|
@@ -60,7 +60,7 @@ export const COMPETITIVE_MANIFEST = [
|
|
|
60
60
|
command: bunHarness("graphify-bakeoff.ts"),
|
|
61
61
|
caseMappings: [
|
|
62
62
|
{
|
|
63
|
-
idPattern: "^neighbors-calls-(?:path|default)
|
|
63
|
+
idPattern: "^neighbors-calls-(?:path|default)(?:-cold)?$",
|
|
64
64
|
useCase: "direct call neighbors",
|
|
65
65
|
mode: "warm",
|
|
66
66
|
scope: {
|
|
@@ -70,7 +70,20 @@ export const COMPETITIVE_MANIFEST = [
|
|
|
70
70
|
},
|
|
71
71
|
budgets: { bytes: null, tokens: null, items: 200 },
|
|
72
72
|
reason: "Both sides return direct inbound and outbound call neighbors for createEngine.",
|
|
73
|
-
oracleId: "
|
|
73
|
+
oracleId: "create-engine-both",
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
idPattern: "^god-nodes-10-default(?:-cold)?$",
|
|
77
|
+
useCase: "bounded architectural hubs",
|
|
78
|
+
mode: "warm",
|
|
79
|
+
scope: {
|
|
80
|
+
competitorOperation: "god_nodes",
|
|
81
|
+
knodinOperation: "map:minimal",
|
|
82
|
+
dimensions: ["repository scope", "items=10", "hub ranking"],
|
|
83
|
+
},
|
|
84
|
+
budgets: { bytes: null, tokens: null, items: 10 },
|
|
85
|
+
reason: "Both sides return the ten highest-ranked architectural hubs.",
|
|
86
|
+
oracleId: "architecture-facet",
|
|
74
87
|
},
|
|
75
88
|
],
|
|
76
89
|
},
|
|
@@ -91,7 +104,7 @@ export const COMPETITIVE_MANIFEST = [
|
|
|
91
104
|
id: "codebase-memory",
|
|
92
105
|
name: "codebase-memory-mcp",
|
|
93
106
|
version: "0.9.0",
|
|
94
|
-
roadmap: ["C4", "C10", "C11", "C12", "C13", "C16", "C24", "C25", "C26"],
|
|
107
|
+
roadmap: ["C4", "C10", "C11", "C12", "C13", "C16", "C24", "C25", "C26", "C41"],
|
|
95
108
|
baseline: "codebase-memory-vs-knodin.raw.json",
|
|
96
109
|
requirements: [
|
|
97
110
|
{ type: "command", value: "codebase-memory-mcp" },
|
|
@@ -101,7 +114,7 @@ export const COMPETITIVE_MANIFEST = [
|
|
|
101
114
|
command: bunHarness("codebase-memory-bakeoff.ts"),
|
|
102
115
|
caseMappings: [
|
|
103
116
|
{
|
|
104
|
-
idPattern: "^search-graph-e0-c0
|
|
117
|
+
idPattern: "^search-graph-e0-c0(?:-cold)?$",
|
|
105
118
|
useCase: "bounded graph search",
|
|
106
119
|
mode: "warm",
|
|
107
120
|
scope: {
|
|
@@ -111,10 +124,10 @@ export const COMPETITIVE_MANIFEST = [
|
|
|
111
124
|
},
|
|
112
125
|
budgets: { bytes: null, tokens: null, items: 10 },
|
|
113
126
|
reason: "Both sides run the same unexpanded first-page query with the same item limit.",
|
|
114
|
-
oracleId: "
|
|
127
|
+
oracleId: "create-engine-definition",
|
|
115
128
|
},
|
|
116
129
|
{
|
|
117
|
-
idPattern: "^trace-
|
|
130
|
+
idPattern: "^trace-inbound-calls-r0-t1(?:-cold)?$",
|
|
118
131
|
useCase: "typed call traversal",
|
|
119
132
|
mode: "warm",
|
|
120
133
|
scope: {
|
|
@@ -130,10 +143,48 @@ export const COMPETITIVE_MANIFEST = [
|
|
|
130
143
|
},
|
|
131
144
|
budgets: { bytes: null, tokens: null, items: 100 },
|
|
132
145
|
reason: "Both sides use the same target, direction, call relation, depth, and test scope.",
|
|
133
|
-
oracleId: "
|
|
146
|
+
oracleId: "create-engine-callers",
|
|
134
147
|
},
|
|
135
148
|
{
|
|
136
|
-
idPattern: "^
|
|
149
|
+
idPattern: "^trace-outbound-calls-r0-t1(?:-cold)?$",
|
|
150
|
+
useCase: "typed call traversal",
|
|
151
|
+
mode: "warm",
|
|
152
|
+
scope: {
|
|
153
|
+
competitorOperation: "trace_path",
|
|
154
|
+
knodinOperation: "query:traverse",
|
|
155
|
+
dimensions: [
|
|
156
|
+
"target=createEngine",
|
|
157
|
+
"direction",
|
|
158
|
+
"relation=call",
|
|
159
|
+
"depth=3",
|
|
160
|
+
"include_tests=true",
|
|
161
|
+
],
|
|
162
|
+
},
|
|
163
|
+
budgets: { bytes: null, tokens: null, items: 100 },
|
|
164
|
+
reason: "Both sides use the same target, outbound direction, call relation, depth, and test scope.",
|
|
165
|
+
oracleId: "create-engine-callees",
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
idPattern: "^trace-both-calls-r0-t1(?:-cold)?$",
|
|
169
|
+
useCase: "typed call traversal",
|
|
170
|
+
mode: "warm",
|
|
171
|
+
scope: {
|
|
172
|
+
competitorOperation: "trace_path",
|
|
173
|
+
knodinOperation: "query:traverse",
|
|
174
|
+
dimensions: [
|
|
175
|
+
"target=createEngine",
|
|
176
|
+
"direction",
|
|
177
|
+
"relation=call",
|
|
178
|
+
"depth=3",
|
|
179
|
+
"include_tests=true",
|
|
180
|
+
],
|
|
181
|
+
},
|
|
182
|
+
budgets: { bytes: null, tokens: null, items: 100 },
|
|
183
|
+
reason: "Both sides use the same target, bidirectional scope, call relation, depth, and test scope.",
|
|
184
|
+
oracleId: "create-engine-both",
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
idPattern: "^architecture-(?:languages|packages|entry_points|hotspots|boundaries|layers)(?:-cold)?$",
|
|
137
188
|
useCase: "single architecture facet",
|
|
138
189
|
mode: "warm",
|
|
139
190
|
scope: {
|
|
@@ -143,7 +194,7 @@ export const COMPETITIVE_MANIFEST = [
|
|
|
143
194
|
},
|
|
144
195
|
budgets: { bytes: null, tokens: null, items: null },
|
|
145
196
|
reason: "Each row requests one architecture facet that knodin supports independently.",
|
|
146
|
-
oracleId: "
|
|
197
|
+
oracleId: "engine-package",
|
|
147
198
|
},
|
|
148
199
|
],
|
|
149
200
|
},
|
|
@@ -151,17 +202,21 @@ export const COMPETITIVE_MANIFEST = [
|
|
|
151
202
|
id: "grepai",
|
|
152
203
|
name: "grepai",
|
|
153
204
|
version: "0.35.0",
|
|
154
|
-
roadmap: ["C3", "C11", "C12", "C16", "C17", "C24"],
|
|
205
|
+
roadmap: ["C3", "C11", "C12", "C16", "C17", "C24", "C41"],
|
|
155
206
|
baseline: "grepai-vs-knodin.raw.json",
|
|
156
207
|
requirements: [
|
|
157
208
|
{ type: "command", value: "grepai" },
|
|
158
209
|
{ type: "command", value: "bun" },
|
|
159
210
|
],
|
|
160
211
|
versionCommand: ["grepai", "version"],
|
|
212
|
+
prepare: [
|
|
213
|
+
["grepai", "init", "--provider", "ollama", "--backend", "gob", "--yes"],
|
|
214
|
+
["node", "--import", "tsx", "scripts/wait-grepai-ready.ts"],
|
|
215
|
+
],
|
|
161
216
|
command: bunHarness("grepai-bakeoff.ts"),
|
|
162
217
|
caseMappings: [
|
|
163
218
|
{
|
|
164
|
-
idPattern: "^status-json-v0
|
|
219
|
+
idPattern: "^status-json-v0(?:-cold)?$",
|
|
165
220
|
useCase: "cached index status",
|
|
166
221
|
mode: "warm",
|
|
167
222
|
scope: {
|
|
@@ -171,10 +226,23 @@ export const COMPETITIVE_MANIFEST = [
|
|
|
171
226
|
},
|
|
172
227
|
budgets: { bytes: null, tokens: null, items: null },
|
|
173
228
|
reason: "Both sides return a cached, non-deep index status summary.",
|
|
174
|
-
oracleId: "
|
|
229
|
+
oracleId: "indexed-status",
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
idPattern: "^status-json-v1(?:-cold)?$",
|
|
233
|
+
useCase: "verified index lifecycle audit",
|
|
234
|
+
mode: "warm",
|
|
235
|
+
scope: {
|
|
236
|
+
competitorOperation: "grepai_index_status:verbose",
|
|
237
|
+
knodinOperation: "status:deep",
|
|
238
|
+
dimensions: ["verified deep audit", "repository scope", "verbose"],
|
|
239
|
+
},
|
|
240
|
+
budgets: { bytes: null, tokens: null, items: null },
|
|
241
|
+
reason: "Both sides verify repository index state rather than returning cached summaries.",
|
|
242
|
+
oracleId: "indexed-status",
|
|
175
243
|
},
|
|
176
244
|
{
|
|
177
|
-
idPattern: "^search-json-c0-
|
|
245
|
+
idPattern: "^search-json-c0-l5-all(?:-cold)?$",
|
|
178
246
|
useCase: "bounded semantic search",
|
|
179
247
|
mode: "warm",
|
|
180
248
|
scope: {
|
|
@@ -182,22 +250,35 @@ export const COMPETITIVE_MANIFEST = [
|
|
|
182
250
|
knodinOperation: "search",
|
|
183
251
|
dimensions: ["query=index freshness reconciliation", "repository scope", "items"],
|
|
184
252
|
},
|
|
185
|
-
budgets: { bytes: null, tokens: null, items:
|
|
253
|
+
budgets: { bytes: null, tokens: null, items: 5 },
|
|
186
254
|
reason: "Both sides use the same semantic query, repository scope, and row limit.",
|
|
187
|
-
oracleId: "
|
|
255
|
+
oracleId: "freshness-search",
|
|
188
256
|
},
|
|
189
257
|
{
|
|
190
|
-
idPattern: "^
|
|
258
|
+
idPattern: "^grepai_trace_callers-json-c0(?:-cold)?$",
|
|
191
259
|
useCase: "direct call neighbors",
|
|
192
260
|
mode: "warm",
|
|
193
261
|
scope: {
|
|
194
|
-
competitorOperation: "grepai_trace_callers
|
|
195
|
-
knodinOperation: "query:callers_of
|
|
196
|
-
dimensions: ["target=createEngine", "direction", "depth=1", "relation=call"],
|
|
262
|
+
competitorOperation: "grepai_trace_callers",
|
|
263
|
+
knodinOperation: "query:callers_of",
|
|
264
|
+
dimensions: ["target=createEngine", "direction=callers", "depth=1", "relation=call"],
|
|
197
265
|
},
|
|
198
266
|
budgets: { bytes: null, tokens: null, items: null },
|
|
199
267
|
reason: "Both sides return the same direct call-neighbor direction for createEngine.",
|
|
200
|
-
oracleId: "
|
|
268
|
+
oracleId: "create-engine-callers",
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
idPattern: "^grepai_trace_callees-json-c0(?:-cold)?$",
|
|
272
|
+
useCase: "direct call neighbors",
|
|
273
|
+
mode: "warm",
|
|
274
|
+
scope: {
|
|
275
|
+
competitorOperation: "grepai_trace_callees",
|
|
276
|
+
knodinOperation: "query:callees_of",
|
|
277
|
+
dimensions: ["target=createEngine", "direction=callees", "depth=1", "relation=call"],
|
|
278
|
+
},
|
|
279
|
+
budgets: { bytes: null, tokens: null, items: null },
|
|
280
|
+
reason: "Both sides return direct callees of createEngine.",
|
|
281
|
+
oracleId: "create-engine-callees",
|
|
201
282
|
},
|
|
202
283
|
],
|
|
203
284
|
},
|
|
@@ -205,7 +286,7 @@ export const COMPETITIVE_MANIFEST = [
|
|
|
205
286
|
id: "repomix",
|
|
206
287
|
name: "Repomix",
|
|
207
288
|
version: "1.17.0",
|
|
208
|
-
roadmap: ["C3", "C14", "C24"],
|
|
289
|
+
roadmap: ["C3", "C14", "C24", "C41"],
|
|
209
290
|
baseline: "repomix-vs-knodin.raw.json",
|
|
210
291
|
requirements: [
|
|
211
292
|
{ type: "command", value: "repomix" },
|
|
@@ -215,7 +296,7 @@ export const COMPETITIVE_MANIFEST = [
|
|
|
215
296
|
command: ({ output, fixture }) => ["bun", "scripts/repomix-bakeoff.ts", fixture, output],
|
|
216
297
|
caseMappings: [
|
|
217
298
|
{
|
|
218
|
-
idPattern: "^pack-(?:xml|markdown|json)-c0
|
|
299
|
+
idPattern: "^pack-(?:xml|markdown|json)-c0(?:-cold)?$",
|
|
219
300
|
useCase: "two-file context pack",
|
|
220
301
|
mode: "warm",
|
|
221
302
|
scope: {
|
|
@@ -272,7 +353,7 @@ export const COMPETITIVE_MANIFEST = [
|
|
|
272
353
|
id: "code2prompt",
|
|
273
354
|
name: "code2prompt",
|
|
274
355
|
version: "4.2.0",
|
|
275
|
-
roadmap: ["C3", "C5", "C14", "C24"],
|
|
356
|
+
roadmap: ["C3", "C5", "C14", "C24", "C41"],
|
|
276
357
|
baseline: "code2prompt-vs-knodin.raw.json",
|
|
277
358
|
requirements: [
|
|
278
359
|
{ type: "command", value: "code2prompt" },
|
|
@@ -282,7 +363,7 @@ export const COMPETITIVE_MANIFEST = [
|
|
|
282
363
|
command: bunHarness("code2prompt-bakeoff.ts"),
|
|
283
364
|
caseMappings: [
|
|
284
365
|
{
|
|
285
|
-
idPattern: "^format-(?:markdown|json|xml)-l(?:0|1)-t0-a0-c1
|
|
366
|
+
idPattern: "^format-(?:markdown|json|xml)-l(?:0|1)-t0-a0-c1(?:-cold)?$",
|
|
286
367
|
useCase: "two-file context pack",
|
|
287
368
|
mode: "warm",
|
|
288
369
|
scope: {
|
|
@@ -41,6 +41,32 @@ function runCheckedInOracle(oracleId, test, competitor) {
|
|
|
41
41
|
case "contains-create-engine":
|
|
42
42
|
passed = bothContain(/create[\s_-]*engine/i);
|
|
43
43
|
break;
|
|
44
|
+
case "create-engine-definition":
|
|
45
|
+
passed = bothContain(/create[\s_-]*engine/i) && bothContain(/src\/engine\/index\.ts/i);
|
|
46
|
+
break;
|
|
47
|
+
case "create-engine-callers":
|
|
48
|
+
passed = bothContain(/create[\s_-]*engine/i) && bothContain(/\bmain\b/i);
|
|
49
|
+
break;
|
|
50
|
+
case "create-engine-callees":
|
|
51
|
+
passed = bothContain(/create[\s_-]*engine/i) && bothContain(/withStaleness/i);
|
|
52
|
+
break;
|
|
53
|
+
case "create-engine-both":
|
|
54
|
+
passed =
|
|
55
|
+
bothContain(/create[\s_-]*engine/i) &&
|
|
56
|
+
bothContain(/\bmain\b/i) &&
|
|
57
|
+
bothContain(/withStaleness/i);
|
|
58
|
+
break;
|
|
59
|
+
case "freshness-search":
|
|
60
|
+
passed = bothContain(/index/i) && bothContain(/fresh(?:ness)?/i);
|
|
61
|
+
break;
|
|
62
|
+
case "engine-package":
|
|
63
|
+
passed = bothContain(/engine/i) && bothContain(/(?:package|module|community)/i);
|
|
64
|
+
break;
|
|
65
|
+
case "indexed-status": {
|
|
66
|
+
const indexed = (response) => /(?:total_files|indexedFiles)"?\s*:\s*[1-9]\d*/i.test(response);
|
|
67
|
+
passed = indexed(contenderResponse) && indexed(knodinResponse);
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
44
70
|
case "contains-index":
|
|
45
71
|
passed = bothContain(/index|fresh|status/i);
|
|
46
72
|
break;
|
|
@@ -84,7 +110,8 @@ export function applyCompetitiveCaseContracts(competitor, raw, fixtureRevision)
|
|
|
84
110
|
return {
|
|
85
111
|
...source,
|
|
86
112
|
results: results.map((test) => {
|
|
87
|
-
const
|
|
113
|
+
const caseId = String(test.id ?? "");
|
|
114
|
+
const mapping = mappings.find((candidate) => new RegExp(candidate.idPattern).test(caseId));
|
|
88
115
|
if (!mapping) {
|
|
89
116
|
return {
|
|
90
117
|
...test,
|
|
@@ -109,13 +136,20 @@ export function applyCompetitiveCaseContracts(competitor, raw, fixtureRevision)
|
|
|
109
136
|
},
|
|
110
137
|
};
|
|
111
138
|
}
|
|
139
|
+
const dimensions = [...mapping.scope.dimensions];
|
|
140
|
+
const direction = caseId.match(/^trace-(inbound|outbound|both)-/)?.[1];
|
|
141
|
+
if (direction)
|
|
142
|
+
dimensions.push(`direction=${direction}`);
|
|
143
|
+
const facet = caseId.match(/^architecture-([a-z_]+)/)?.[1];
|
|
144
|
+
if (facet)
|
|
145
|
+
dimensions.push(`facet=${facet}`);
|
|
112
146
|
return {
|
|
113
147
|
...test,
|
|
114
148
|
caseContract: {
|
|
115
149
|
useCase: mapping.useCase,
|
|
116
150
|
fixtureRevision,
|
|
117
|
-
mode: mapping.mode,
|
|
118
|
-
scope: mapping.scope,
|
|
151
|
+
mode: caseId.endsWith("-cold") ? "cold" : mapping.mode,
|
|
152
|
+
scope: { ...mapping.scope, dimensions },
|
|
119
153
|
budgets: mapping.budgets,
|
|
120
154
|
disposition: { status: "comparable", reason: mapping.reason },
|
|
121
155
|
oracle: runCheckedInOracle(mapping.oracleId, test, competitor),
|
|
@@ -74,7 +74,7 @@ export function createCompetitiveSandbox(sourceRepository, sourceFixture, compet
|
|
|
74
74
|
fs.writeFileSync(bunShim, `#!/bin/sh
|
|
75
75
|
if [ "$1" = "src/server.ts" ]; then
|
|
76
76
|
shift
|
|
77
|
-
exec node --import tsx "$
|
|
77
|
+
exec node --import tsx "$PWD/src/server.ts" "$@"
|
|
78
78
|
fi
|
|
79
79
|
exec "$KNODIN_BENCHMARK_REAL_BUN" "$@"
|
|
80
80
|
`, { mode: 0o755 });
|