knodin 0.7.4 → 0.7.6

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.
Files changed (104) hide show
  1. package/README.md +4 -1
  2. package/dist/bin/cli.js +108 -1859
  3. package/dist/bin/launcher.js +3 -10
  4. package/dist/chunks/chunk-DMQAGX77.js +654 -0
  5. package/dist/chunks/chunk-F4Z3Z766.js +4 -0
  6. package/dist/chunks/chunk-SIJAQVSX.js +3 -0
  7. package/dist/chunks/chunk-X6M4HUUE.js +2 -0
  8. package/dist/chunks/chunk-YPRMY2LP.js +8 -0
  9. package/dist/chunks/pure-compression-cli-4TA2TQD5.js +5 -0
  10. package/dist/chunks/server-7EDF4CBY.js +14 -0
  11. package/dist/chunks/structural-fast-path-KD5KQSPX.js +4 -0
  12. package/dist/src/init-progress-worker.js +2 -106
  13. package/dist/src/repair-progress-worker.js +2 -120
  14. package/docs/INSTALLATION.md +17 -1
  15. package/docs/releases/0.7.6.md +25 -0
  16. package/package.json +1 -110
  17. package/dist/src/agent-integration.js +0 -238
  18. package/dist/src/artifact-refresh.js +0 -81
  19. package/dist/src/cli-args.js +0 -274
  20. package/dist/src/cli-model.js +0 -358
  21. package/dist/src/codeflow-replay.js +0 -80
  22. package/dist/src/compact-structural.js +0 -96
  23. package/dist/src/competitive-cold-mcp.js +0 -40
  24. package/dist/src/competitive-constraints.js +0 -20
  25. package/dist/src/competitive-manifest.js +0 -411
  26. package/dist/src/competitive-measurement.js +0 -183
  27. package/dist/src/competitive-runner.js +0 -487
  28. package/dist/src/competitive-sandbox.js +0 -108
  29. package/dist/src/context-export.js +0 -422
  30. package/dist/src/context.js +0 -102
  31. package/dist/src/diagnostics.js +0 -449
  32. package/dist/src/docs-sections.js +0 -141
  33. package/dist/src/doctor.js +0 -380
  34. package/dist/src/engine/ann-hnsw.js +0 -271
  35. package/dist/src/engine/embeddings.js +0 -193
  36. package/dist/src/engine/file-walker.js +0 -43
  37. package/dist/src/engine/git-history.js +0 -289
  38. package/dist/src/engine/index.js +0 -13377
  39. package/dist/src/engine/perf.js +0 -115
  40. package/dist/src/engine/prune.js +0 -112
  41. package/dist/src/engine/scip-import.js +0 -408
  42. package/dist/src/engine/source-policy.js +0 -69
  43. package/dist/src/engine/sqlite.js +0 -71
  44. package/dist/src/engine/symbol-delete.js +0 -58
  45. package/dist/src/execution-profile.js +0 -203
  46. package/dist/src/failure-diagnosis.js +0 -649
  47. package/dist/src/fleet.js +0 -7
  48. package/dist/src/git-executable.js +0 -31
  49. package/dist/src/graph-query-health.js +0 -115
  50. package/dist/src/hook-manager-integration.js +0 -156
  51. package/dist/src/index-activity.js +0 -125
  52. package/dist/src/init-progress.js +0 -155
  53. package/dist/src/init.js +0 -1254
  54. package/dist/src/lifecycle-health.js +0 -250
  55. package/dist/src/lsp-readonly.js +0 -217
  56. package/dist/src/output-compression.js +0 -629
  57. package/dist/src/output-telemetry.js +0 -363
  58. package/dist/src/pr-triage.js +0 -638
  59. package/dist/src/progressive-evidence.js +0 -473
  60. package/dist/src/pure-compression-cli.js +0 -101
  61. package/dist/src/relationship-adapters.js +0 -370
  62. package/dist/src/release-attestation.js +0 -533
  63. package/dist/src/release-preflight.js +0 -510
  64. package/dist/src/repair-progress.js +0 -262
  65. package/dist/src/repository-init-process.js +0 -173
  66. package/dist/src/repository-management.js +0 -1231
  67. package/dist/src/response-budget.js +0 -194
  68. package/dist/src/server.js +0 -73
  69. package/dist/src/structural-fast-path.js +0 -338
  70. package/dist/src/structural-snapshot.js +0 -33
  71. package/dist/src/system-config.js +0 -615
  72. package/dist/src/terminal-help.js +0 -83
  73. package/dist/src/tools/knodin-tools.js +0 -1529
  74. package/dist/src/update-ceremony.js +0 -158
  75. package/dist/src/update-policy.js +0 -944
  76. package/dist/src/update-trust.js +0 -503
  77. package/dist/src/version.js +0 -13
  78. package/dist/src/visualization.js +0 -162
  79. package/dist/src/wait-for-fresh.js +0 -98
  80. package/dist/src/worktree-lifecycle.js +0 -231
  81. package/docs/CONTAINED-EXECUTION.md +0 -77
  82. package/docs/DIAGNOSTICS.md +0 -45
  83. package/docs/GIT-HISTORY-REVIEW.md +0 -39
  84. package/docs/PROGRESSIVE-EVIDENCE.md +0 -37
  85. package/docs/PT-ACCESS-RECOMMENDATION.md +0 -91
  86. package/docs/RELEASE-0.3-EVIDENCE.md +0 -73
  87. package/docs/SCIP-IMPORT.md +0 -57
  88. package/docs/SIGNED-UPDATES.md +0 -151
  89. package/docs/TELEMETRY.md +0 -46
  90. package/docs/assets/knodin-favicon.svg +0 -4
  91. package/docs/releases/0.3.0.md +0 -46
  92. package/docs/releases/0.4.0.md +0 -68
  93. package/docs/releases/0.4.1.md +0 -28
  94. package/docs/releases/0.4.2.md +0 -27
  95. package/docs/releases/0.4.3.md +0 -23
  96. package/docs/releases/0.5.0.md +0 -29
  97. package/docs/releases/0.5.1.md +0 -17
  98. package/docs/releases/0.6.0.md +0 -18
  99. package/docs/releases/0.7.0.md +0 -24
  100. package/docs/releases/0.7.1.md +0 -21
  101. package/docs/releases/0.7.2.md +0 -21
  102. package/docs/releases/0.7.3.md +0 -23
  103. package/docs/releases/0.7.4.md +0 -17
  104. package/schemas/release-attestation-v1.schema.json +0 -210
@@ -1,11 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import { tryStructuralFastPath } from "../src/structural-fast-path.js";
3
- const argv = process.argv.slice(2);
4
- const fast = tryStructuralFastPath(argv);
5
- if (!fast) {
6
- const { tryPureCompressionFastPath } = await import("../src/pure-compression-cli.js");
7
- if (!(await tryPureCompressionFastPath(argv)))
8
- await import("./cli.js");
9
- }
10
- if (process.env.KNODIN_BENCH_PROCESS_UPTIME === "1")
11
- process.stderr.write(`KNODIN_PROCESS_UPTIME_MS=${(process.uptime() * 1000).toFixed(3)}\n`);
2
+ import{spawnSync as w}from"node:child_process";import g from"node:fs";import O from"node:os";import M from"node:path";var S=24;function T(e){let r=e?.trim().match(/^v?(\d+)(?:\.|$)/);if(!r)return;let t=Number(r[1]);return Number.isSafeInteger(t)?t:void 0}function h(e){return(T(e)??0)>=S}function y(e,r){let t=e.replace(/^v/,"").split(".").map(Number),n=r.replace(/^v/,"").split(".").map(Number);for(let o=0;o<Math.max(t.length,n.length);o+=1){let s=(n[o]??0)-(t[o]??0);if(s!==0)return s}return r.localeCompare(e)}function P(e,r,t){for(let n of(e.env.PATH??"").split(e.pathApi.delimiter))n&&e.pathApi.isAbsolute(n)&&t(e.pathApi.join(n,r))}function x(e,r){return e.platform==="darwin"?e.pathApi.join(e.homeDirectory,"Library","Application Support","fnm"):e.platform==="win32"&&r?e.pathApi.join(r,"fnm"):e.pathApi.join(e.homeDirectory,".local","share","fnm")}function K(e,r,t,n,o){if(e.platform==="darwin"&&(n("/opt/homebrew/opt/node@24/bin/node"),n("/opt/homebrew/opt/node/bin/node"),n("/usr/local/opt/node@24/bin/node"),n("/usr/local/opt/node/bin/node")),e.platform==="win32"){o(t(e.env.NVM_HOME),[]);let s=t(e.env.ProgramFiles);n(s?e.pathApi.join(s,"nodejs",r):void 0)}}function U(e){let{env:r,homeDirectory:t,pathApi:n,platform:o}=e,s=o==="win32"?"node.exe":"node",f=[],m=new Set([e.currentExecutable]),l=i=>{!i||m.has(i)||(m.add(i),f.push(i))},a=(i,A)=>{if(!(!i||!n.isAbsolute(i)))for(let R of e.listDirectories(i).sort(y))l(n.join(i,R,...A,s))};if(r.KNODIN_NODE_RUNTIME&&!n.isAbsolute(r.KNODIN_NODE_RUNTIME))throw new Error("KNODIN_NODE_RUNTIME must be an absolute path to a Node.js executable.");l(r.KNODIN_NODE_RUNTIME),P(e,s,l);let c=i=>i&&n.isAbsolute(i)?i:void 0,E=c(r.MISE_DATA_DIR)??n.join(t,".local","share","mise"),u=o==="win32"?[]:["bin"];a(n.join(E,"installs","node"),u),a(n.join(t,".mise","installs","node"),u);let p=c(r.NVM_DIR);a(p?n.join(p,"versions","node"):void 0,u),a(n.join(t,".nvm","versions","node"),u);let _=c(r.APPDATA),j=x(e,_),N=c(r.FNM_DIR);a(N?n.join(N,"node-versions"):void 0,o==="win32"?["installation"]:["installation","bin"]),a(n.join(j,"node-versions"),o==="win32"?["installation"]:["installation","bin"]);let v=c(r.ASDF_DATA_DIR)??n.join(t,".asdf");a(n.join(v,"installs","nodejs"),u);let I=c(r.VOLTA_HOME)??n.join(t,".volta");return a(n.join(I,"tools","image","node"),u),K(e,s,c,l,a),f}function C(e){if(h(e.currentVersion))return{kind:"current"};let r=e.env.KNODIN_NODE_RUNTIME;if(r===e.currentExecutable)throw new Error(`KNODIN_NODE_RUNTIME points to the active Node.js ${e.currentVersion} executable; Node.js 24 or newer is required.`);for(let t of U(e)){let n=e.probe(t);if(!h(n)){if(t===r)throw new Error(`KNODIN_NODE_RUNTIME points to ${t}, but it reports ${n??"no usable Node.js version"}; Node.js 24 or newer is required.`);continue}let o=e.spawn(t,e.launcherArguments,{env:e.env,stdio:"inherit"});if(o.error)throw new Error(`Unable to launch Knodin with ${t}: ${o.error.message}`);if(o.status===null&&o.signal===null)throw new Error(`Knodin's Node.js 24+ runtime at ${t} exited without a status.`);return{kind:"relaunched",status:o.status,signal:o.signal}}throw new Error(`Knodin requires Node.js 24 or newer, but the active runtime is ${e.currentVersion}. Install Node.js 24+ with Homebrew or your version manager, or set KNODIN_NODE_RUNTIME=/absolute/path/to/node. Your project may remain pinned to Node.js 20.`)}function V(e){try{return g.readdirSync(e,{withFileTypes:!0}).filter(r=>r.isDirectory()||r.isSymbolicLink()).map(r=>r.name)}catch{return[]}}function $(e){let r=w(e,["-p","process.versions.node"],{encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:2e3});return r.status===0?r.stdout.trim():void 0}function b(){return C({currentExecutable:process.execPath,currentVersion:process.versions.node,env:process.env,homeDirectory:O.homedir(),platform:process.platform,launcherArguments:process.argv.slice(1),probe:$,spawn:(e,r,t)=>w(e,r,t),pathApi:M,listDirectories:V})}var d;try{d=b()}catch(e){let r=e instanceof Error?e.message:String(e);process.stderr.write(`knodin: ${r}
3
+ `),process.exit(1)}d.kind==="relaunched"&&(d.signal&&process.kill(process.pid,d.signal),process.exit(d.status??1));var D=process.argv.slice(2),{tryStructuralFastPath:F}=await import("../chunks/structural-fast-path-KD5KQSPX.js"),k=F(D);if(!k){let{tryPureCompressionFastPath:e}=await import("../chunks/pure-compression-cli-4TA2TQD5.js");await e(D)||await import("./cli.js")}process.env.KNODIN_BENCH_PROCESS_UPTIME==="1"&&process.stderr.write(`KNODIN_PROCESS_UPTIME_MS=${(process.uptime()*1e3).toFixed(3)}
4
+ `);