knodin 0.9.0 → 0.10.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/dist/bin/cli.js +35 -7
- package/dist/fixtures/update-verification/fixture.json +1 -1
- package/dist/src/cli-model.js +14 -0
- package/dist/src/engine/index.js +919 -355
- package/dist/src/engine/parse-pool-resources.js +96 -0
- package/dist/src/engine/parse-pool.js +352 -0
- package/dist/src/engine/parse-protocol.js +1 -0
- package/dist/src/engine/parse-worker.js +51 -0
- package/dist/src/engine/reflink-copy.js +23 -0
- package/dist/src/engine/seal-command.js +116 -0
- package/dist/src/engine/seal.js +270 -0
- package/dist/src/engine/sealed-open.js +116 -0
- package/dist/src/engine/sealed-query.js +49 -0
- package/dist/src/init.js +29 -4
- package/dist/src/shared-index/selection.js +1 -1
- package/dist/src/tools/knodin-tools.js +16 -3
- package/dist/src/update-executor.js +29 -10
- package/dist/src/worktree-seed.js +172 -0
- package/docs/SHARED-INDEX-CONTRACT.md +9 -0
- package/docs/releases/0.10.0.md +127 -0
- package/package.json +2 -1
package/dist/bin/cli.js
CHANGED
|
@@ -27,7 +27,9 @@ import { exportContext, grepPackedArtifact, readPackedArtifact } from "../src/co
|
|
|
27
27
|
import { clearDiagnostics, collectDiagnostics, diagnosticsStatus, disableDiagnostics, enableDiagnostics, inspectDiagnosticsBundle, persistDiagnosticsPreview, recordDiagnosticFailure, } from "../src/diagnostics.js";
|
|
28
28
|
import { getDocSection, listDocTopics } from "../src/docs-sections.js";
|
|
29
29
|
import { diagnoseInstallation } from "../src/doctor.js";
|
|
30
|
-
import { createEngine, REPO_WIDE_QUERY_PATTERNS, } from "../src/engine/index.js";
|
|
30
|
+
import { createEngine, KNODIN_SCHEMA_VERSION, REPO_WIDE_QUERY_PATTERNS, } from "../src/engine/index.js";
|
|
31
|
+
import { runSeal } from "../src/engine/seal-command.js";
|
|
32
|
+
import { runSealedQuery } from "../src/engine/sealed-query.js";
|
|
31
33
|
import { resolveDbPath } from "../src/engine/state-paths.js";
|
|
32
34
|
import { diagnoseFailure, } from "../src/failure-diagnosis.js";
|
|
33
35
|
import { gitExecutable } from "../src/git-executable.js";
|
|
@@ -58,6 +60,7 @@ import { KNODIN_VERSION } from "../src/version.js";
|
|
|
58
60
|
import { writeVisualization, } from "../src/visualization.js";
|
|
59
61
|
import { waitForFresh } from "../src/wait-for-fresh.js";
|
|
60
62
|
import { inspectWorktrees, reconcileWorktrees, removeManagedWorktree, } from "../src/worktree-lifecycle.js";
|
|
63
|
+
import { indexOrSeed } from "../src/worktree-seed.js";
|
|
61
64
|
function explicitScope(args) {
|
|
62
65
|
const index = args.indexOf("--scope");
|
|
63
66
|
if (index >= 0) {
|
|
@@ -618,7 +621,7 @@ async function main() {
|
|
|
618
621
|
depth: 0,
|
|
619
622
|
include: [repository],
|
|
620
623
|
command: resolveCliRuntimeCommand(process),
|
|
621
|
-
index: (
|
|
624
|
+
index: indexOrSeed(engine, KNODIN_SCHEMA_VERSION),
|
|
622
625
|
status: (target) => engine.status(target),
|
|
623
626
|
agents: detectSupportedAgents(),
|
|
624
627
|
indexMode: (target) => indexModeForPath(loadSystemConfiguration(target), target),
|
|
@@ -762,7 +765,7 @@ async function main() {
|
|
|
762
765
|
depth: plan.depth,
|
|
763
766
|
dryRun: plan.dryRun,
|
|
764
767
|
worktrees: plan.worktrees,
|
|
765
|
-
index: (
|
|
768
|
+
index: indexOrSeed(engine, KNODIN_SCHEMA_VERSION),
|
|
766
769
|
status: (target) => engine.status(target),
|
|
767
770
|
agents: detectSupportedAgents(),
|
|
768
771
|
indexMode: (target) => indexModeForPath(systemConfig, target),
|
|
@@ -870,7 +873,7 @@ async function main() {
|
|
|
870
873
|
manifestPath: plan.manifestPath,
|
|
871
874
|
include: plan.include,
|
|
872
875
|
exclude: plan.exclude,
|
|
873
|
-
index: (
|
|
876
|
+
index: indexOrSeed(engine, KNODIN_SCHEMA_VERSION),
|
|
874
877
|
status: (target) => engine.status(target),
|
|
875
878
|
agents: detectSupportedAgents(),
|
|
876
879
|
indexMode: (target) => indexModeForPath(systemConfig, target),
|
|
@@ -1867,7 +1870,7 @@ async function main() {
|
|
|
1867
1870
|
continue;
|
|
1868
1871
|
await initializeRepository(checkout, {
|
|
1869
1872
|
command: runtimeCommand,
|
|
1870
|
-
index: (
|
|
1873
|
+
index: indexOrSeed(engine, KNODIN_SCHEMA_VERSION),
|
|
1871
1874
|
scope: "personal",
|
|
1872
1875
|
agents: [],
|
|
1873
1876
|
});
|
|
@@ -2073,7 +2076,7 @@ async function main() {
|
|
|
2073
2076
|
}
|
|
2074
2077
|
paths = await initializeRepository(repo, {
|
|
2075
2078
|
command: runtimeCommand,
|
|
2076
|
-
index: (
|
|
2079
|
+
index: indexOrSeed(engine, KNODIN_SCHEMA_VERSION),
|
|
2077
2080
|
scope,
|
|
2078
2081
|
agents,
|
|
2079
2082
|
configureIntegration: requestedScope !== null,
|
|
@@ -2121,7 +2124,7 @@ async function main() {
|
|
|
2121
2124
|
const agents = scope === "team" ? [] : integrationAgents(repo);
|
|
2122
2125
|
const paths = await initializeRepository(repo, {
|
|
2123
2126
|
command: runtimeCommand,
|
|
2124
|
-
index: (
|
|
2127
|
+
index: indexOrSeed(engine, KNODIN_SCHEMA_VERSION),
|
|
2125
2128
|
scope,
|
|
2126
2129
|
agents,
|
|
2127
2130
|
allowTrackedTransition: true,
|
|
@@ -2426,6 +2429,29 @@ async function main() {
|
|
|
2426
2429
|
}));
|
|
2427
2430
|
break;
|
|
2428
2431
|
}
|
|
2432
|
+
case "seal": {
|
|
2433
|
+
const output = selectorValue("--output");
|
|
2434
|
+
if (!output)
|
|
2435
|
+
throw new Error("knodin seal requires --output <path.sqlite>");
|
|
2436
|
+
result = await runSeal({
|
|
2437
|
+
repoPath: repo,
|
|
2438
|
+
outputPath: output,
|
|
2439
|
+
// Embeddings dominate artifact size and code lookup is served
|
|
2440
|
+
// lexically plus by graph traversal, so they are stripped unless
|
|
2441
|
+
// asked for.
|
|
2442
|
+
stripEmbeddings: !rest.includes("--keep-embeddings"),
|
|
2443
|
+
includeExcluded: rest.includes("--include-excluded"),
|
|
2444
|
+
});
|
|
2445
|
+
break;
|
|
2446
|
+
}
|
|
2447
|
+
case "sealed": {
|
|
2448
|
+
if (!rest[0])
|
|
2449
|
+
throw new Error("knodin sealed requires an artifact path");
|
|
2450
|
+
result = await runSealedQuery(rest[0], rest[1], {
|
|
2451
|
+
strictCompat: rest.includes("--strict-compat"),
|
|
2452
|
+
});
|
|
2453
|
+
break;
|
|
2454
|
+
}
|
|
2429
2455
|
case "pack": {
|
|
2430
2456
|
const action = rest[0];
|
|
2431
2457
|
const diffScope = selectorValue("--diff-scope");
|
|
@@ -2939,6 +2965,8 @@ catch (err) {
|
|
|
2939
2965
|
"wiki",
|
|
2940
2966
|
"visualize",
|
|
2941
2967
|
"pack",
|
|
2968
|
+
"seal",
|
|
2969
|
+
"sealed",
|
|
2942
2970
|
"compress",
|
|
2943
2971
|
"prs",
|
|
2944
2972
|
"worktrees",
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
"expected": {
|
|
113
113
|
"symbol": "Update_Verification",
|
|
114
114
|
"file": "force-app/main/default/flows/Update_Verification.flow-meta.xml",
|
|
115
|
-
"kind": "
|
|
115
|
+
"kind": "salesforce_flow",
|
|
116
116
|
"evidenceQuality": "parser-grounded"
|
|
117
117
|
}
|
|
118
118
|
},
|
package/dist/src/cli-model.js
CHANGED
|
@@ -228,6 +228,20 @@ function addArtifactCommands(program, capture) {
|
|
|
228
228
|
leaf(pack, "grep <artifact> <regex>", "search an artifact with a linear-time regex", capture)
|
|
229
229
|
.option("--flags <flags>", "regular-expression flags")
|
|
230
230
|
.addOption(option("--limit <count>", "match limit", "integer"));
|
|
231
|
+
program
|
|
232
|
+
.command("seal")
|
|
233
|
+
.description("seal the index into a portable database that answers with no checkout")
|
|
234
|
+
.requiredOption("--output <path>", "artifact destination (.sqlite)")
|
|
235
|
+
.option("--keep-embeddings", "retain symbol embeddings (much larger artifact)")
|
|
236
|
+
.option("--include-excluded", "embed policy-excluded source such as profiles")
|
|
237
|
+
.action((...values) => capture(values.at(-1)));
|
|
238
|
+
program
|
|
239
|
+
.command("sealed")
|
|
240
|
+
.description("inspect or query a sealed artifact, with no checkout")
|
|
241
|
+
.argument("<artifact>", "path to a sealed .sqlite")
|
|
242
|
+
.argument("[symbol]", "symbol to explain; omit to inspect the artifact only")
|
|
243
|
+
.option("--strict-compat", "reject a knodin-version mismatch instead of degrading")
|
|
244
|
+
.action((...values) => capture(values.at(-1)));
|
|
231
245
|
const compress = program.command("compress").description("compress already-produced output");
|
|
232
246
|
compress
|
|
233
247
|
.argument("[input]")
|