knodin 0.8.2 → 0.8.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 +29 -12
- package/dist/bin/cli.js +20 -3
- package/dist/src/docs-sections.js +1 -0
- package/dist/src/engine/index.js +911 -55
- package/dist/src/init-progress-worker.js +4 -40
- package/dist/src/progress-worker-runtime.js +46 -0
- package/dist/src/repair-progress-worker.js +3 -40
- package/dist/src/resource-reachability.js +456 -0
- package/dist/src/response-budget.js +69 -65
- package/dist/src/tools/knodin-tools.js +12 -7
- package/docs/BEHAVIORAL-CONTRACT.md +47 -5
- package/docs/CLI.md +10 -0
- package/docs/COMPARISON.md +10 -0
- package/docs/DEMO.md +49 -0
- package/docs/MCP.md +5 -0
- package/docs/releases/0.8.3.md +47 -0
- package/package.json +13 -1
- package/roadmap/competitive-roadmap.md +95 -0
package/README.md
CHANGED
|
@@ -31,16 +31,32 @@ one persistent local graph.
|
|
|
31
31
|
- **Adopt locally:** initialize the checkout you already have and use the CLI or
|
|
32
32
|
connect one MCP gateway.
|
|
33
33
|
|
|
34
|
-
The practical
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
34
|
+
The practical value is less manual context assembly and fewer dependencies
|
|
35
|
+
missed during review, with no hosted-service or source-egress overhead. Fewer
|
|
36
|
+
agent round trips are an intended payoff; the narrow C93 replay measured no
|
|
37
|
+
round-trip difference, so knodin does not claim a general productivity effect.
|
|
38
|
+
|
|
39
|
+
Four checked answers define the product rather than a feature-count claim:
|
|
40
|
+
|
|
41
|
+
- **Value:** less manual context assembly and fewer missed dependencies. C93
|
|
42
|
+
records the paired task method; C100 narrows one missed-dependency result from
|
|
43
|
+
a Salesforce class file to the exact Flow-invoked Apex method.
|
|
44
|
+
- **ROI:** the intended mechanism is fewer corrective agent round trips without
|
|
45
|
+
hosted-service, authentication, or source-egress overhead. C93's accepted
|
|
46
|
+
two-task replay measured no round-trip benefit (both arms required one
|
|
47
|
+
correction), so this remains a product hypothesis rather than a measured
|
|
48
|
+
productivity claim. Billed cost and unobserved tokens remain unknown.
|
|
49
|
+
- **Tomorrow:** run `knodin init`, check `knodin status`, then use the local CLI
|
|
50
|
+
or single MCP gateway against the checkout already on disk.
|
|
51
|
+
- **Secret sauce:** stable identity, exact source evidence, explicit freshness,
|
|
52
|
+
and truthful budgets compose behind one compact local tool.
|
|
53
|
+
|
|
54
|
+
The checked [behavioral contract](docs/BEHAVIORAL-CONTRACT.md) release-gates
|
|
55
|
+
that composition. C101 binds the bounded resource-reachability, TypeScript DI,
|
|
56
|
+
and Salesforce Flow-to-Apex evidence to the retained one-process semantic
|
|
57
|
+
design. It rejects stale, truncated, ambiguous, or omission-only output when a
|
|
58
|
+
mutation tries to promote it into a complete or exact claim. These are
|
|
59
|
+
fixture-scoped guarantees with recorded limits, not universal superiority.
|
|
44
60
|
|
|
45
61
|
## How it compares
|
|
46
62
|
|
|
@@ -50,10 +66,11 @@ context over one locally persisted index.
|
|
|
50
66
|
|
|
51
67
|
| Job | Typical specialized tools | knodin |
|
|
52
68
|
|---|---|---|
|
|
53
|
-
| Symbol navigation | CodeGraph, Serena, Sourcegraph | Ambiguity-safe definitions, callers, callees, paths, and verbatim source |
|
|
69
|
+
| Symbol navigation | CodeGraph, Serena, Sourcegraph | Ambiguity-safe definitions, callers, callees, paths, bounded Inversify/tsyringe DI edges, and verbatim source |
|
|
54
70
|
| Change impact and review | code-review-graph, Greptile, Graphify | Diff-aware review, impact traversal, tests, risks, and PR triage |
|
|
55
71
|
| Architecture mapping | Graphify, GitNexus | Communities, hubs, boundaries, flows, wiki, and local visualization |
|
|
56
72
|
| Search and context assembly | Aider repo map, Repomix, semantic search tools | Hybrid search, bounded source packs, and recoverable diagnostic compression |
|
|
73
|
+
| Bounded resource and framework relationships | Code-Graph-RAG and framework-aware analyzers | Literal TS/JS resource paths, declared Inversify/tsyringe wiring, and one exact Salesforce Flow-to-Apex boundary, each with explicit omissions |
|
|
57
74
|
| Deployment | Hosted services or separate local tools | One local process, SQLite graph, CLI, and one MCP gateway |
|
|
58
75
|
|
|
59
76
|
### Measured results
|
|
@@ -159,7 +176,7 @@ knodin repair
|
|
|
159
176
|
| Command | Purpose |
|
|
160
177
|
|---|---|
|
|
161
178
|
| `knodin context` | Compact repository orientation and next-operation hint |
|
|
162
|
-
| `knodin explain <symbol>` | Source, identity, callers,
|
|
179
|
+
| `knodin explain <symbol>` | Source, identity, typed callers/callees, static-analysis omissions, and blast radius |
|
|
163
180
|
| `knodin review` | Itemized graph impact, test gaps, centrality, and bounded Git-history evidence |
|
|
164
181
|
| `knodin query …` | Impact, paths, callers, callees, tests, flows, and structured graph queries |
|
|
165
182
|
| `knodin search <query>` | Explainable structural-first search with a bounded local embedding fallback |
|
package/dist/bin/cli.js
CHANGED
|
@@ -158,7 +158,11 @@ function formatRepairHuman(result) {
|
|
|
158
158
|
return `Repair verified: graph is healthy (${coverage.indexedFiles} indexed files, ${coverage.filesWithSymbols} files with symbols), but lifecycle routing is degraded. Run \`knodin init\`, then \`knodin status\`.\n`;
|
|
159
159
|
return `Repair verified: graph is healthy (${coverage.indexedFiles} indexed files, ${coverage.filesWithSymbols} files with symbols).\n`;
|
|
160
160
|
}
|
|
161
|
-
|
|
161
|
+
const outstanding = result.outstandingIssues?.total ??
|
|
162
|
+
result.after.missing.files.length + result.after.missing.records.length;
|
|
163
|
+
const firstIssue = result.after.missing.files[0] ?? result.after.missing.records[0];
|
|
164
|
+
const detail = firstIssue ? ` First issue: ${firstIssue}.` : "";
|
|
165
|
+
return `Repair finished with ${outstanding.toLocaleString()} remaining issue(s).${detail} Run \`knodin status --deep\` for details.\n`;
|
|
162
166
|
}
|
|
163
167
|
function formatIndexHuman(result) {
|
|
164
168
|
if (result.indexed.length === 0 && result.unchanged.length > 0) {
|
|
@@ -1781,7 +1785,7 @@ async function main() {
|
|
|
1781
1785
|
? ""
|
|
1782
1786
|
: (rest[1] ?? "");
|
|
1783
1787
|
if (!pattern) {
|
|
1784
|
-
process.stderr.write("knodin query requires a <pattern> (lsp_diagnostics|lsp_definitions|lsp_declarations|lsp_implementations|callers_of|callees_of|imports_of|importers_of|import_cycles|file_summary|batch_outline|project_overview|shortest_path|inheritors_of|structural_implementations_of|tests_for|impact|dead_code|large_functions|large_files|rename_preview|flows|flow_of|stats|traverse|feature_path|flow_analysis|knowledge_gaps|surprising_connections|suggested_questions|architecture_overview|community|triggers_of|publishers_of|listeners_of|handlers_of|endpoints_for|consumers_of|children_of|federated_repos|mcp_tools|api_contract_mismatches)\n");
|
|
1788
|
+
process.stderr.write("knodin query requires a <pattern> (lsp_diagnostics|lsp_definitions|lsp_declarations|lsp_implementations|callers_of|callees_of|imports_of|importers_of|import_cycles|file_summary|batch_outline|project_overview|shortest_path|cross_substrate_path|inheritors_of|structural_implementations_of|tests_for|impact|dead_code|large_functions|large_files|rename_preview|flows|flow_of|stats|traverse|feature_path|flow_analysis|resource_reachability|knowledge_gaps|surprising_connections|suggested_questions|architecture_overview|community|triggers_of|publishers_of|listeners_of|handlers_of|endpoints_for|consumers_of|children_of|federated_repos|mcp_tools|api_contract_mismatches)\n");
|
|
1785
1789
|
process.exit(1);
|
|
1786
1790
|
}
|
|
1787
1791
|
const directionValue = selectorValue("--direction");
|
|
@@ -1800,7 +1804,15 @@ async function main() {
|
|
|
1800
1804
|
}
|
|
1801
1805
|
// shortest_path: `knodin query shortest_path <from> <to>`
|
|
1802
1806
|
// rename_preview: `knodin query rename_preview <old> <new>`
|
|
1803
|
-
const to = pattern === "shortest_path" ||
|
|
1807
|
+
const to = pattern === "shortest_path" ||
|
|
1808
|
+
pattern === "cross_substrate_path" ||
|
|
1809
|
+
pattern === "rename_preview"
|
|
1810
|
+
? rest[2]
|
|
1811
|
+
: undefined;
|
|
1812
|
+
if (pattern === "cross_substrate_path" && !to) {
|
|
1813
|
+
process.stderr.write("knodin query cross_substrate_path requires <from> and <to>\n");
|
|
1814
|
+
process.exit(1);
|
|
1815
|
+
}
|
|
1804
1816
|
if (pattern === "rename_preview" && !to) {
|
|
1805
1817
|
process.stderr.write("knodin query rename_preview requires <old> and <new>\n");
|
|
1806
1818
|
process.exit(1);
|
|
@@ -1863,6 +1875,11 @@ async function main() {
|
|
|
1863
1875
|
: undefined,
|
|
1864
1876
|
includeDataFlow: pattern === "traverse" ? rest.includes("--data-flow") : undefined,
|
|
1865
1877
|
flowVariable: pattern === "flow_analysis" ? selectorValue("--variable") : undefined,
|
|
1878
|
+
resourceOffset: pattern === "resource_reachability" && selectorValue("--offset")
|
|
1879
|
+
? Number(selectorValue("--offset"))
|
|
1880
|
+
: undefined,
|
|
1881
|
+
resourceMaxBytes: pattern === "resource_reachability" ? responseBudget.bytes : undefined,
|
|
1882
|
+
resourceMaxTokens: pattern === "resource_reachability" ? responseBudget.tokens : undefined,
|
|
1866
1883
|
architectureFacets: facetsValue,
|
|
1867
1884
|
topN: selectorValue("--top") ? Number(selectorValue("--top")) : undefined,
|
|
1868
1885
|
sort: selectorValue("--sort"),
|
|
@@ -27,6 +27,7 @@ The \`query\` operation lets you ask precise, structured questions about your co
|
|
|
27
27
|
- **tests_for <target>**: Find test files that cover this symbol.
|
|
28
28
|
- **file_summary <target>**: Lists all symbols defined in a file.
|
|
29
29
|
- **shortest_path <from> <to>**: Find the call-graph chain connecting two symbols.
|
|
30
|
+
- **cross_substrate_path <from> <to>**: Prove one bounded static Salesforce Flow action to a uniquely resolved Apex \`@InvocableMethod\`. Returns exact XML and Apex evidence, stable endpoint identities, freshness, explicit omissions, and budget metadata; it does not resolve Terraform, dbt, or arbitrary substrate crossings.
|
|
30
31
|
- **impact <symbol>**: Directional, depth-bounded symbol reach with stable selectors, relation/confidence/test filters, edge evidence, and heuristic summaries. Use \`impactMode: "file"\` explicitly for a distinctly labeled changed-file blast radius.
|
|
31
32
|
- **dead_code**: Surface exported or unexported symbols with zero references.
|
|
32
33
|
- **large_functions / large_files**: Spot complex "god" functions and files exceeding size thresholds.
|