@ruverd/julius 0.0.0-stage → 0.24.1
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 +47 -0
- package/CREDITS.md +25 -0
- package/LICENSE +21 -0
- package/PROVENANCE.md +9 -0
- package/README.md +229 -2
- package/dist/ai/crux.d.ts +60 -0
- package/dist/ai/crux.d.ts.map +1 -0
- package/dist/ai/crux.js +141 -0
- package/dist/ai/crux.js.map +1 -0
- package/dist/ai/failure.d.ts +60 -0
- package/dist/ai/failure.d.ts.map +1 -0
- package/dist/ai/failure.js +86 -0
- package/dist/ai/failure.js.map +1 -0
- package/dist/ai/llm/anthropic.d.ts +37 -0
- package/dist/ai/llm/anthropic.d.ts.map +1 -0
- package/dist/ai/llm/anthropic.js +144 -0
- package/dist/ai/llm/anthropic.js.map +1 -0
- package/dist/ai/llm/factory.d.ts +28 -0
- package/dist/ai/llm/factory.d.ts.map +1 -0
- package/dist/ai/llm/factory.js +36 -0
- package/dist/ai/llm/factory.js.map +1 -0
- package/dist/ai/llm/litellm.d.ts +34 -0
- package/dist/ai/llm/litellm.d.ts.map +1 -0
- package/dist/ai/llm/litellm.js +45 -0
- package/dist/ai/llm/litellm.js.map +1 -0
- package/dist/ai/llm/openai.d.ts +44 -0
- package/dist/ai/llm/openai.d.ts.map +1 -0
- package/dist/ai/llm/openai.js +239 -0
- package/dist/ai/llm/openai.js.map +1 -0
- package/dist/ai/llm/orcarouter.d.ts +34 -0
- package/dist/ai/llm/orcarouter.d.ts.map +1 -0
- package/dist/ai/llm/orcarouter.js +45 -0
- package/dist/ai/llm/orcarouter.js.map +1 -0
- package/dist/ai/llm/recover-tool.d.ts +19 -0
- package/dist/ai/llm/recover-tool.d.ts.map +1 -0
- package/dist/ai/llm/recover-tool.js +109 -0
- package/dist/ai/llm/recover-tool.js.map +1 -0
- package/dist/ai/llm/types.d.ts +122 -0
- package/dist/ai/llm/types.d.ts.map +1 -0
- package/dist/ai/llm/types.js +33 -0
- package/dist/ai/llm/types.js.map +1 -0
- package/dist/ai/providers.d.ts +59 -0
- package/dist/ai/providers.d.ts.map +1 -0
- package/dist/ai/providers.js +54 -0
- package/dist/ai/providers.js.map +1 -0
- package/dist/ai/summarize.d.ts +25 -0
- package/dist/ai/summarize.d.ts.map +1 -0
- package/dist/ai/summarize.js +34 -0
- package/dist/ai/summarize.js.map +1 -0
- package/dist/ai/synthesize.d.ts +40 -0
- package/dist/ai/synthesize.d.ts.map +1 -0
- package/dist/ai/synthesize.js +131 -0
- package/dist/ai/synthesize.js.map +1 -0
- package/dist/app/checkout.d.ts +46 -0
- package/dist/app/checkout.d.ts.map +1 -0
- package/dist/app/checkout.js +223 -0
- package/dist/app/checkout.js.map +1 -0
- package/dist/app/events.d.ts +44 -0
- package/dist/app/events.d.ts.map +1 -0
- package/dist/app/events.js +64 -0
- package/dist/app/events.js.map +1 -0
- package/dist/app/identity.d.ts +54 -0
- package/dist/app/identity.d.ts.map +1 -0
- package/dist/app/identity.js +96 -0
- package/dist/app/identity.js.map +1 -0
- package/dist/app/main.d.ts +2 -0
- package/dist/app/main.d.ts.map +1 -0
- package/dist/app/main.js +62 -0
- package/dist/app/main.js.map +1 -0
- package/dist/app/pages.d.ts +56 -0
- package/dist/app/pages.d.ts.map +1 -0
- package/dist/app/pages.js +193 -0
- package/dist/app/pages.js.map +1 -0
- package/dist/app/queue.d.ts +40 -0
- package/dist/app/queue.d.ts.map +1 -0
- package/dist/app/queue.js +68 -0
- package/dist/app/queue.js.map +1 -0
- package/dist/app/review-process.d.ts +66 -0
- package/dist/app/review-process.d.ts.map +1 -0
- package/dist/app/review-process.js +200 -0
- package/dist/app/review-process.js.map +1 -0
- package/dist/app/review-worker.d.ts +2 -0
- package/dist/app/review-worker.d.ts.map +1 -0
- package/dist/app/review-worker.js +108 -0
- package/dist/app/review-worker.js.map +1 -0
- package/dist/app/review.d.ts +23 -0
- package/dist/app/review.d.ts.map +1 -0
- package/dist/app/review.js +142 -0
- package/dist/app/review.js.map +1 -0
- package/dist/app/server.d.ts +49 -0
- package/dist/app/server.d.ts.map +1 -0
- package/dist/app/server.js +123 -0
- package/dist/app/server.js.map +1 -0
- package/dist/ask/ask.d.ts +195 -0
- package/dist/ask/ask.d.ts.map +1 -0
- package/dist/ask/ask.js +1252 -0
- package/dist/ask/ask.js.map +1 -0
- package/dist/ask/file-rank.d.ts +72 -0
- package/dist/ask/file-rank.d.ts.map +1 -0
- package/dist/ask/file-rank.js +160 -0
- package/dist/ask/file-rank.js.map +1 -0
- package/dist/ask/file-selection.d.ts +22 -0
- package/dist/ask/file-selection.d.ts.map +1 -0
- package/dist/ask/file-selection.js +66 -0
- package/dist/ask/file-selection.js.map +1 -0
- package/dist/ask/fuse.d.ts +195 -0
- package/dist/ask/fuse.d.ts.map +1 -0
- package/dist/ask/fuse.js +344 -0
- package/dist/ask/fuse.js.map +1 -0
- package/dist/ask/graphrank.d.ts +61 -0
- package/dist/ask/graphrank.d.ts.map +1 -0
- package/dist/ask/graphrank.js +130 -0
- package/dist/ask/graphrank.js.map +1 -0
- package/dist/ask/index-file.d.ts +44 -0
- package/dist/ask/index-file.d.ts.map +1 -0
- package/dist/ask/index-file.js +128 -0
- package/dist/ask/index-file.js.map +1 -0
- package/dist/bin/julius.d.ts +3 -0
- package/dist/bin/julius.d.ts.map +1 -0
- package/dist/bin/julius.js +4 -0
- package/dist/bin/julius.js.map +1 -0
- package/dist/blast/blast-cli.d.ts +35 -0
- package/dist/blast/blast-cli.d.ts.map +1 -0
- package/dist/blast/blast-cli.js +155 -0
- package/dist/blast/blast-cli.js.map +1 -0
- package/dist/blast/blast.d.ts +128 -0
- package/dist/blast/blast.d.ts.map +1 -0
- package/dist/blast/blast.js +383 -0
- package/dist/blast/blast.js.map +1 -0
- package/dist/blast/diff.d.ts +53 -0
- package/dist/blast/diff.d.ts.map +1 -0
- package/dist/blast/diff.js +193 -0
- package/dist/blast/diff.js.map +1 -0
- package/dist/blast/evidence.d.ts +51 -0
- package/dist/blast/evidence.d.ts.map +1 -0
- package/dist/blast/evidence.js +162 -0
- package/dist/blast/evidence.js.map +1 -0
- package/dist/blast/modules.d.ts +33 -0
- package/dist/blast/modules.d.ts.map +1 -0
- package/dist/blast/modules.js +83 -0
- package/dist/blast/modules.js.map +1 -0
- package/dist/blast/name.d.ts +74 -0
- package/dist/blast/name.d.ts.map +1 -0
- package/dist/blast/name.js +269 -0
- package/dist/blast/name.js.map +1 -0
- package/dist/blast/owners.d.ts +85 -0
- package/dist/blast/owners.d.ts.map +1 -0
- package/dist/blast/owners.js +272 -0
- package/dist/blast/owners.js.map +1 -0
- package/dist/blast/render.d.ts +46 -0
- package/dist/blast/render.d.ts.map +1 -0
- package/dist/blast/render.js +422 -0
- package/dist/blast/render.js.map +1 -0
- package/dist/blast/viz.d.ts +37 -0
- package/dist/blast/viz.d.ts.map +1 -0
- package/dist/blast/viz.js +180 -0
- package/dist/blast/viz.js.map +1 -0
- package/dist/brand.d.ts +13 -0
- package/dist/brand.d.ts.map +1 -0
- package/dist/brand.js +43 -0
- package/dist/brand.js.map +1 -0
- package/dist/check/learning-edits.d.ts +9 -0
- package/dist/check/learning-edits.d.ts.map +1 -0
- package/dist/check/learning-edits.js +62 -0
- package/dist/check/learning-edits.js.map +1 -0
- package/dist/check/local-check.d.ts +104 -0
- package/dist/check/local-check.d.ts.map +1 -0
- package/dist/check/local-check.js +830 -0
- package/dist/check/local-check.js.map +1 -0
- package/dist/check/types.d.ts +31 -0
- package/dist/check/types.d.ts.map +1 -0
- package/dist/check/types.js +2 -0
- package/dist/check/types.js.map +1 -0
- package/dist/claude/build-progress.d.ts +29 -0
- package/dist/claude/build-progress.d.ts.map +1 -0
- package/dist/claude/build-progress.js +76 -0
- package/dist/claude/build-progress.js.map +1 -0
- package/dist/claude/format.d.ts +131 -0
- package/dist/claude/format.d.ts.map +1 -0
- package/dist/claude/format.js +328 -0
- package/dist/claude/format.js.map +1 -0
- package/dist/claude/hook-layers.d.ts +8 -0
- package/dist/claude/hook-layers.d.ts.map +1 -0
- package/dist/claude/hook-layers.js +74 -0
- package/dist/claude/hook-layers.js.map +1 -0
- package/dist/claude/hooks.d.ts +101 -0
- package/dist/claude/hooks.d.ts.map +1 -0
- package/dist/claude/hooks.js +849 -0
- package/dist/claude/hooks.js.map +1 -0
- package/dist/claude/init.d.ts +70 -0
- package/dist/claude/init.d.ts.map +1 -0
- package/dist/claude/init.js +207 -0
- package/dist/claude/init.js.map +1 -0
- package/dist/claude/note-signals.d.ts +28 -0
- package/dist/claude/note-signals.d.ts.map +1 -0
- package/dist/claude/note-signals.js +325 -0
- package/dist/claude/note-signals.js.map +1 -0
- package/dist/claude/paths.d.ts +9 -0
- package/dist/claude/paths.d.ts.map +1 -0
- package/dist/claude/paths.js +22 -0
- package/dist/claude/paths.js.map +1 -0
- package/dist/claude/session-metrics.d.ts +73 -0
- package/dist/claude/session-metrics.d.ts.map +1 -0
- package/dist/claude/session-metrics.js +209 -0
- package/dist/claude/session-metrics.js.map +1 -0
- package/dist/claude/settings-merge.d.ts +66 -0
- package/dist/claude/settings-merge.d.ts.map +1 -0
- package/dist/claude/settings-merge.js +249 -0
- package/dist/claude/settings-merge.js.map +1 -0
- package/dist/claude/shim-template.d.ts +18 -0
- package/dist/claude/shim-template.d.ts.map +1 -0
- package/dist/claude/shim-template.js +226 -0
- package/dist/claude/shim-template.js.map +1 -0
- package/dist/claude/skill-template.d.ts +12 -0
- package/dist/claude/skill-template.d.ts.map +1 -0
- package/dist/claude/skill-template.js +294 -0
- package/dist/claude/skill-template.js.map +1 -0
- package/dist/claude/state.d.ts +73 -0
- package/dist/claude/state.d.ts.map +1 -0
- package/dist/claude/state.js +33 -0
- package/dist/claude/state.js.map +1 -0
- package/dist/claude/stats.d.ts +5 -0
- package/dist/claude/stats.d.ts.map +1 -0
- package/dist/claude/stats.js +24 -0
- package/dist/claude/stats.js.map +1 -0
- package/dist/claude/statusline.d.ts +14 -0
- package/dist/claude/statusline.d.ts.map +1 -0
- package/dist/claude/statusline.js +45 -0
- package/dist/claude/statusline.js.map +1 -0
- package/dist/claude/sync-run.d.ts +3 -0
- package/dist/claude/sync-run.d.ts.map +1 -0
- package/dist/claude/sync-run.js +46 -0
- package/dist/claude/sync-run.js.map +1 -0
- package/dist/claude/tally.d.ts +50 -0
- package/dist/claude/tally.d.ts.map +1 -0
- package/dist/claude/tally.js +211 -0
- package/dist/claude/tally.js.map +1 -0
- package/dist/cli-epilogue.d.ts +12 -0
- package/dist/cli-epilogue.d.ts.map +1 -0
- package/dist/cli-epilogue.js +55 -0
- package/dist/cli-epilogue.js.map +1 -0
- package/dist/cli-meta.d.ts +45 -0
- package/dist/cli-meta.d.ts.map +1 -0
- package/dist/cli-meta.js +145 -0
- package/dist/cli-meta.js.map +1 -0
- package/dist/cli-picker.d.ts +129 -0
- package/dist/cli-picker.d.ts.map +1 -0
- package/dist/cli-picker.js +432 -0
- package/dist/cli-picker.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +2213 -0
- package/dist/cli.js.map +1 -0
- package/dist/cloud/diff.d.ts +20 -0
- package/dist/cloud/diff.d.ts.map +1 -0
- package/dist/cloud/diff.js +59 -0
- package/dist/cloud/diff.js.map +1 -0
- package/dist/cloud/nudge.d.ts +66 -0
- package/dist/cloud/nudge.d.ts.map +1 -0
- package/dist/cloud/nudge.js +268 -0
- package/dist/cloud/nudge.js.map +1 -0
- package/dist/cloud/workspace-sync.d.ts +58 -0
- package/dist/cloud/workspace-sync.d.ts.map +1 -0
- package/dist/cloud/workspace-sync.js +268 -0
- package/dist/cloud/workspace-sync.js.map +1 -0
- package/dist/cloud/workspace.d.ts +159 -0
- package/dist/cloud/workspace.d.ts.map +1 -0
- package/dist/cloud/workspace.js +134 -0
- package/dist/cloud/workspace.js.map +1 -0
- package/dist/context/build.d.ts +52 -0
- package/dist/context/build.d.ts.map +1 -0
- package/dist/context/build.js +362 -0
- package/dist/context/build.js.map +1 -0
- package/dist/context/check.d.ts +42 -0
- package/dist/context/check.d.ts.map +1 -0
- package/dist/context/check.js +162 -0
- package/dist/context/check.js.map +1 -0
- package/dist/context/map-dir.d.ts +4 -0
- package/dist/context/map-dir.d.ts.map +1 -0
- package/dist/context/map-dir.js +6 -0
- package/dist/context/map-dir.js.map +1 -0
- package/dist/context/node-file.d.ts +109 -0
- package/dist/context/node-file.d.ts.map +1 -0
- package/dist/context/node-file.js +362 -0
- package/dist/context/node-file.js.map +1 -0
- package/dist/context/price.d.ts +49 -0
- package/dist/context/price.d.ts.map +1 -0
- package/dist/context/price.js +83 -0
- package/dist/context/price.js.map +1 -0
- package/dist/context/savings.d.ts +26 -0
- package/dist/context/savings.d.ts.map +1 -0
- package/dist/context/savings.js +59 -0
- package/dist/context/savings.js.map +1 -0
- package/dist/economy/cli.d.ts +3 -0
- package/dist/economy/cli.d.ts.map +1 -0
- package/dist/economy/cli.js +52 -0
- package/dist/economy/cli.js.map +1 -0
- package/dist/economy/delivery.d.ts +49 -0
- package/dist/economy/delivery.d.ts.map +1 -0
- package/dist/economy/delivery.js +176 -0
- package/dist/economy/delivery.js.map +1 -0
- package/dist/economy/index.d.ts +68 -0
- package/dist/economy/index.d.ts.map +1 -0
- package/dist/economy/index.js +524 -0
- package/dist/economy/index.js.map +1 -0
- package/dist/engine.d.ts +83 -0
- package/dist/engine.d.ts.map +1 -0
- package/dist/engine.js +122 -0
- package/dist/engine.js.map +1 -0
- package/dist/evaluation/index.d.ts +41 -0
- package/dist/evaluation/index.d.ts.map +1 -0
- package/dist/evaluation/index.js +61 -0
- package/dist/evaluation/index.js.map +1 -0
- package/dist/graph/bindings.d.ts +64 -0
- package/dist/graph/bindings.d.ts.map +1 -0
- package/dist/graph/bindings.js +713 -0
- package/dist/graph/bindings.js.map +1 -0
- package/dist/graph/build.d.ts +88 -0
- package/dist/graph/build.d.ts.map +1 -0
- package/dist/graph/build.js +375 -0
- package/dist/graph/build.js.map +1 -0
- package/dist/graph/cards.d.ts +46 -0
- package/dist/graph/cards.d.ts.map +1 -0
- package/dist/graph/cards.js +280 -0
- package/dist/graph/cards.js.map +1 -0
- package/dist/graph/check.d.ts +25 -0
- package/dist/graph/check.d.ts.map +1 -0
- package/dist/graph/check.js +192 -0
- package/dist/graph/check.js.map +1 -0
- package/dist/graph/container.d.ts +63 -0
- package/dist/graph/container.d.ts.map +1 -0
- package/dist/graph/container.js +190 -0
- package/dist/graph/container.js.map +1 -0
- package/dist/graph/enrich.d.ts +62 -0
- package/dist/graph/enrich.d.ts.map +1 -0
- package/dist/graph/enrich.js +253 -0
- package/dist/graph/enrich.js.map +1 -0
- package/dist/graph/extract-cache.d.ts +101 -0
- package/dist/graph/extract-cache.d.ts.map +1 -0
- package/dist/graph/extract-cache.js +199 -0
- package/dist/graph/extract-cache.js.map +1 -0
- package/dist/graph/extract.d.ts +85 -0
- package/dist/graph/extract.d.ts.map +1 -0
- package/dist/graph/extract.js +2376 -0
- package/dist/graph/extract.js.map +1 -0
- package/dist/graph/fingerprint.d.ts +76 -0
- package/dist/graph/fingerprint.d.ts.map +1 -0
- package/dist/graph/fingerprint.js +160 -0
- package/dist/graph/fingerprint.js.map +1 -0
- package/dist/graph/generic.d.ts +74 -0
- package/dist/graph/generic.d.ts.map +1 -0
- package/dist/graph/generic.js +580 -0
- package/dist/graph/generic.js.map +1 -0
- package/dist/graph/invariants.d.ts +33 -0
- package/dist/graph/invariants.d.ts.map +1 -0
- package/dist/graph/invariants.js +52 -0
- package/dist/graph/invariants.js.map +1 -0
- package/dist/graph/load.d.ts +29 -0
- package/dist/graph/load.d.ts.map +1 -0
- package/dist/graph/load.js +97 -0
- package/dist/graph/load.js.map +1 -0
- package/dist/graph/lsp/client.d.ts +43 -0
- package/dist/graph/lsp/client.d.ts.map +1 -0
- package/dist/graph/lsp/client.js +179 -0
- package/dist/graph/lsp/client.js.map +1 -0
- package/dist/graph/lsp/enrich.d.ts +11 -0
- package/dist/graph/lsp/enrich.d.ts.map +1 -0
- package/dist/graph/lsp/enrich.js +155 -0
- package/dist/graph/lsp/enrich.js.map +1 -0
- package/dist/graph/lsp/registry.d.ts +15 -0
- package/dist/graph/lsp/registry.d.ts.map +1 -0
- package/dist/graph/lsp/registry.js +46 -0
- package/dist/graph/lsp/registry.js.map +1 -0
- package/dist/graph/map.d.ts +107 -0
- package/dist/graph/map.d.ts.map +1 -0
- package/dist/graph/map.js +239 -0
- package/dist/graph/map.js.map +1 -0
- package/dist/graph/native.d.ts +38 -0
- package/dist/graph/native.d.ts.map +1 -0
- package/dist/graph/native.js +169 -0
- package/dist/graph/native.js.map +1 -0
- package/dist/graph/queries/c.scm +13 -0
- package/dist/graph/queries/c_sharp.scm +19 -0
- package/dist/graph/queries/clojure.scm +58 -0
- package/dist/graph/queries/cpp.scm +23 -0
- package/dist/graph/queries/dart.scm +42 -0
- package/dist/graph/queries/elixir.scm +54 -0
- package/dist/graph/queries/java.scm +20 -0
- package/dist/graph/queries/kotlin.scm +43 -0
- package/dist/graph/queries/lua.scm +36 -0
- package/dist/graph/queries/nix.scm +32 -0
- package/dist/graph/queries/php.scm +40 -0
- package/dist/graph/queries/ruby.scm +65 -0
- package/dist/graph/queries/rust.scm +41 -0
- package/dist/graph/queries/scala.scm +66 -0
- package/dist/graph/queries/solidity.scm +43 -0
- package/dist/graph/queries/swift.scm +51 -0
- package/dist/graph/refresh.d.ts +49 -0
- package/dist/graph/refresh.d.ts.map +1 -0
- package/dist/graph/refresh.js +255 -0
- package/dist/graph/refresh.js.map +1 -0
- package/dist/graph/relations.d.ts +14 -0
- package/dist/graph/relations.d.ts.map +1 -0
- package/dist/graph/relations.js +8 -0
- package/dist/graph/relations.js.map +1 -0
- package/dist/graph/resolve.d.ts +17 -0
- package/dist/graph/resolve.d.ts.map +1 -0
- package/dist/graph/resolve.js +654 -0
- package/dist/graph/resolve.js.map +1 -0
- package/dist/graph/root.d.ts +11 -0
- package/dist/graph/root.d.ts.map +1 -0
- package/dist/graph/root.js +40 -0
- package/dist/graph/root.js.map +1 -0
- package/dist/graph/scopes.d.ts +42 -0
- package/dist/graph/scopes.d.ts.map +1 -0
- package/dist/graph/scopes.js +342 -0
- package/dist/graph/scopes.js.map +1 -0
- package/dist/graph/seed.d.ts +38 -0
- package/dist/graph/seed.d.ts.map +1 -0
- package/dist/graph/seed.js +226 -0
- package/dist/graph/seed.js.map +1 -0
- package/dist/graph/source-files.d.ts +40 -0
- package/dist/graph/source-files.d.ts.map +1 -0
- package/dist/graph/source-files.js +85 -0
- package/dist/graph/source-files.js.map +1 -0
- package/dist/graph/traverse-cli.d.ts +55 -0
- package/dist/graph/traverse-cli.d.ts.map +1 -0
- package/dist/graph/traverse-cli.js +189 -0
- package/dist/graph/traverse-cli.js.map +1 -0
- package/dist/graph/traverse.d.ts +112 -0
- package/dist/graph/traverse.d.ts.map +1 -0
- package/dist/graph/traverse.js +192 -0
- package/dist/graph/traverse.js.map +1 -0
- package/dist/graph/types.d.ts +78 -0
- package/dist/graph/types.d.ts.map +1 -0
- package/dist/graph/types.js +14 -0
- package/dist/graph/types.js.map +1 -0
- package/dist/graph/workspace-cli.d.ts +48 -0
- package/dist/graph/workspace-cli.d.ts.map +1 -0
- package/dist/graph/workspace-cli.js +102 -0
- package/dist/graph/workspace-cli.js.map +1 -0
- package/dist/graph/workspace.d.ts +135 -0
- package/dist/graph/workspace.d.ts.map +1 -0
- package/dist/graph/workspace.js +598 -0
- package/dist/graph/workspace.js.map +1 -0
- package/dist/graph/write.d.ts +13 -0
- package/dist/graph/write.d.ts.map +1 -0
- package/dist/graph/write.js +86 -0
- package/dist/graph/write.js.map +1 -0
- package/dist/hosts/antigravity.d.ts +8 -0
- package/dist/hosts/antigravity.d.ts.map +1 -0
- package/dist/hosts/antigravity.js +42 -0
- package/dist/hosts/antigravity.js.map +1 -0
- package/dist/hosts/claude-global.d.ts +36 -0
- package/dist/hosts/claude-global.d.ts.map +1 -0
- package/dist/hosts/claude-global.js +153 -0
- package/dist/hosts/claude-global.js.map +1 -0
- package/dist/hosts/codex-hooks.d.ts +11 -0
- package/dist/hosts/codex-hooks.d.ts.map +1 -0
- package/dist/hosts/codex-hooks.js +80 -0
- package/dist/hosts/codex-hooks.js.map +1 -0
- package/dist/hosts/config-write.d.ts +36 -0
- package/dist/hosts/config-write.d.ts.map +1 -0
- package/dist/hosts/config-write.js +64 -0
- package/dist/hosts/config-write.js.map +1 -0
- package/dist/hosts/cursor-hooks.d.ts +21 -0
- package/dist/hosts/cursor-hooks.d.ts.map +1 -0
- package/dist/hosts/cursor-hooks.js +103 -0
- package/dist/hosts/cursor-hooks.js.map +1 -0
- package/dist/hosts/init.d.ts +26 -0
- package/dist/hosts/init.d.ts.map +1 -0
- package/dist/hosts/init.js +82 -0
- package/dist/hosts/init.js.map +1 -0
- package/dist/hosts/install.d.ts +12 -0
- package/dist/hosts/install.d.ts.map +1 -0
- package/dist/hosts/install.js +347 -0
- package/dist/hosts/install.js.map +1 -0
- package/dist/hosts/instructions.d.ts +7 -0
- package/dist/hosts/instructions.d.ts.map +1 -0
- package/dist/hosts/instructions.js +71 -0
- package/dist/hosts/instructions.js.map +1 -0
- package/dist/hosts/investigation-instructions.d.ts +2 -0
- package/dist/hosts/investigation-instructions.d.ts.map +1 -0
- package/dist/hosts/investigation-instructions.js +2 -0
- package/dist/hosts/investigation-instructions.js.map +1 -0
- package/dist/hosts/mcp-config.d.ts +59 -0
- package/dist/hosts/mcp-config.d.ts.map +1 -0
- package/dist/hosts/mcp-config.js +229 -0
- package/dist/hosts/mcp-config.js.map +1 -0
- package/dist/hosts/plan.d.ts +32 -0
- package/dist/hosts/plan.d.ts.map +1 -0
- package/dist/hosts/plan.js +77 -0
- package/dist/hosts/plan.js.map +1 -0
- package/dist/hosts/registry.d.ts +35 -0
- package/dist/hosts/registry.d.ts.map +1 -0
- package/dist/hosts/registry.js +157 -0
- package/dist/hosts/registry.js.map +1 -0
- package/dist/hosts/retract.d.ts +47 -0
- package/dist/hosts/retract.d.ts.map +1 -0
- package/dist/hosts/retract.js +541 -0
- package/dist/hosts/retract.js.map +1 -0
- package/dist/hosts/sections.d.ts +46 -0
- package/dist/hosts/sections.d.ts.map +1 -0
- package/dist/hosts/sections.js +126 -0
- package/dist/hosts/sections.js.map +1 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +33 -0
- package/dist/index.js.map +1 -0
- package/dist/ingest/fs.d.ts +79 -0
- package/dist/ingest/fs.d.ts.map +1 -0
- package/dist/ingest/fs.js +307 -0
- package/dist/ingest/fs.js.map +1 -0
- package/dist/init-guard.d.ts +11 -0
- package/dist/init-guard.d.ts.map +1 -0
- package/dist/init-guard.js +21 -0
- package/dist/init-guard.js.map +1 -0
- package/dist/investigation/index.d.ts +57 -0
- package/dist/investigation/index.d.ts.map +1 -0
- package/dist/investigation/index.js +346 -0
- package/dist/investigation/index.js.map +1 -0
- package/dist/mcp/compact.d.ts +9 -0
- package/dist/mcp/compact.d.ts.map +1 -0
- package/dist/mcp/compact.js +133 -0
- package/dist/mcp/compact.js.map +1 -0
- package/dist/mcp/instructions.d.ts +5 -0
- package/dist/mcp/instructions.d.ts.map +1 -0
- package/dist/mcp/instructions.js +57 -0
- package/dist/mcp/instructions.js.map +1 -0
- package/dist/mcp/server.d.ts +7 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +128 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/tool-names.d.ts +20 -0
- package/dist/mcp/tool-names.d.ts.map +1 -0
- package/dist/mcp/tool-names.js +36 -0
- package/dist/mcp/tool-names.js.map +1 -0
- package/dist/mcp/tools.d.ts +22 -0
- package/dist/mcp/tools.d.ts.map +1 -0
- package/dist/mcp/tools.js +300 -0
- package/dist/mcp/tools.js.map +1 -0
- package/dist/notes/ask-notes.d.ts +8 -0
- package/dist/notes/ask-notes.d.ts.map +1 -0
- package/dist/notes/ask-notes.js +19 -0
- package/dist/notes/ask-notes.js.map +1 -0
- package/dist/notes/branches.d.ts +102 -0
- package/dist/notes/branches.d.ts.map +1 -0
- package/dist/notes/branches.js +304 -0
- package/dist/notes/branches.js.map +1 -0
- package/dist/notes/cold-start.d.ts +177 -0
- package/dist/notes/cold-start.d.ts.map +1 -0
- package/dist/notes/cold-start.js +537 -0
- package/dist/notes/cold-start.js.map +1 -0
- package/dist/notes/edit-overlap.d.ts +62 -0
- package/dist/notes/edit-overlap.d.ts.map +1 -0
- package/dist/notes/edit-overlap.js +202 -0
- package/dist/notes/edit-overlap.js.map +1 -0
- package/dist/notes/git-facts.d.ts +21 -0
- package/dist/notes/git-facts.d.ts.map +1 -0
- package/dist/notes/git-facts.js +121 -0
- package/dist/notes/git-facts.js.map +1 -0
- package/dist/notes/home.d.ts +87 -0
- package/dist/notes/home.d.ts.map +1 -0
- package/dist/notes/home.js +430 -0
- package/dist/notes/home.js.map +1 -0
- package/dist/notes/learning-fields.d.ts +102 -0
- package/dist/notes/learning-fields.d.ts.map +1 -0
- package/dist/notes/learning-fields.js +217 -0
- package/dist/notes/learning-fields.js.map +1 -0
- package/dist/notes/note-gate.d.ts +42 -0
- package/dist/notes/note-gate.d.ts.map +1 -0
- package/dist/notes/note-gate.js +181 -0
- package/dist/notes/note-gate.js.map +1 -0
- package/dist/notes/notes.d.ts +214 -0
- package/dist/notes/notes.d.ts.map +1 -0
- package/dist/notes/notes.js +591 -0
- package/dist/notes/notes.js.map +1 -0
- package/dist/notes/pr-reviews.d.ts +108 -0
- package/dist/notes/pr-reviews.d.ts.map +1 -0
- package/dist/notes/pr-reviews.js +325 -0
- package/dist/notes/pr-reviews.js.map +1 -0
- package/dist/notes/repo-julius.d.ts +18 -0
- package/dist/notes/repo-julius.d.ts.map +1 -0
- package/dist/notes/repo-julius.js +111 -0
- package/dist/notes/repo-julius.js.map +1 -0
- package/dist/notes/session-cost.d.ts +35 -0
- package/dist/notes/session-cost.d.ts.map +1 -0
- package/dist/notes/session-cost.js +276 -0
- package/dist/notes/session-cost.js.map +1 -0
- package/dist/search/grep-cli.d.ts +37 -0
- package/dist/search/grep-cli.d.ts.map +1 -0
- package/dist/search/grep-cli.js +119 -0
- package/dist/search/grep-cli.js.map +1 -0
- package/dist/search/grep.d.ts +60 -0
- package/dist/search/grep.d.ts.map +1 -0
- package/dist/search/grep.js +176 -0
- package/dist/search/grep.js.map +1 -0
- package/dist/search/ignored-code.d.ts +9 -0
- package/dist/search/ignored-code.d.ts.map +1 -0
- package/dist/search/ignored-code.js +73 -0
- package/dist/search/ignored-code.js.map +1 -0
- package/dist/skills/skills.d.ts +118 -0
- package/dist/skills/skills.d.ts.map +1 -0
- package/dist/skills/skills.js +370 -0
- package/dist/skills/skills.js.map +1 -0
- package/dist/telemetry/contract.d.ts +103 -0
- package/dist/telemetry/contract.d.ts.map +1 -0
- package/dist/telemetry/contract.js +270 -0
- package/dist/telemetry/contract.js.map +1 -0
- package/dist/telemetry/flush.d.ts +21 -0
- package/dist/telemetry/flush.d.ts.map +1 -0
- package/dist/telemetry/flush.js +85 -0
- package/dist/telemetry/flush.js.map +1 -0
- package/dist/telemetry/gate.d.ts +30 -0
- package/dist/telemetry/gate.d.ts.map +1 -0
- package/dist/telemetry/gate.js +81 -0
- package/dist/telemetry/gate.js.map +1 -0
- package/dist/telemetry/identity.d.ts +40 -0
- package/dist/telemetry/identity.d.ts.map +1 -0
- package/dist/telemetry/identity.js +80 -0
- package/dist/telemetry/identity.js.map +1 -0
- package/dist/telemetry/index.d.ts +18 -0
- package/dist/telemetry/index.d.ts.map +1 -0
- package/dist/telemetry/index.js +16 -0
- package/dist/telemetry/index.js.map +1 -0
- package/dist/telemetry/key.d.ts +4 -0
- package/dist/telemetry/key.d.ts.map +1 -0
- package/dist/telemetry/key.js +4 -0
- package/dist/telemetry/key.js.map +1 -0
- package/dist/telemetry/notice.d.ts +19 -0
- package/dist/telemetry/notice.d.ts.map +1 -0
- package/dist/telemetry/notice.js +93 -0
- package/dist/telemetry/notice.js.map +1 -0
- package/dist/telemetry/queue.d.ts +35 -0
- package/dist/telemetry/queue.d.ts.map +1 -0
- package/dist/telemetry/queue.js +162 -0
- package/dist/telemetry/queue.js.map +1 -0
- package/dist/telemetry/send.d.ts +19 -0
- package/dist/telemetry/send.d.ts.map +1 -0
- package/dist/telemetry/send.js +84 -0
- package/dist/telemetry/send.js.map +1 -0
- package/dist/telemetry/sessions.d.ts +25 -0
- package/dist/telemetry/sessions.d.ts.map +1 -0
- package/dist/telemetry/sessions.js +104 -0
- package/dist/telemetry/sessions.js.map +1 -0
- package/dist/telemetry/track.d.ts +62 -0
- package/dist/telemetry/track.d.ts.map +1 -0
- package/dist/telemetry/track.js +142 -0
- package/dist/telemetry/track.js.map +1 -0
- package/dist/upkeep-run.d.ts +15 -0
- package/dist/upkeep-run.d.ts.map +1 -0
- package/dist/upkeep-run.js +71 -0
- package/dist/upkeep-run.js.map +1 -0
- package/dist/upkeep.d.ts +125 -0
- package/dist/upkeep.d.ts.map +1 -0
- package/dist/upkeep.js +255 -0
- package/dist/upkeep.js.map +1 -0
- package/dist/util/browser.d.ts +3 -0
- package/dist/util/browser.d.ts.map +1 -0
- package/dist/util/browser.js +14 -0
- package/dist/util/browser.js.map +1 -0
- package/dist/util/front-matter.d.ts +19 -0
- package/dist/util/front-matter.d.ts.map +1 -0
- package/dist/util/front-matter.js +21 -0
- package/dist/util/front-matter.js.map +1 -0
- package/dist/util/id.d.ts +7 -0
- package/dist/util/id.d.ts.map +1 -0
- package/dist/util/id.js +14 -0
- package/dist/util/id.js.map +1 -0
- package/dist/util/paths.d.ts +29 -0
- package/dist/util/paths.d.ts.map +1 -0
- package/dist/util/paths.js +71 -0
- package/dist/util/paths.js.map +1 -0
- package/dist/util/source.d.ts +4 -0
- package/dist/util/source.d.ts.map +1 -0
- package/dist/util/source.js +12 -0
- package/dist/util/source.js.map +1 -0
- package/dist/util/spinner.d.ts +15 -0
- package/dist/util/spinner.d.ts.map +1 -0
- package/dist/util/spinner.js +52 -0
- package/dist/util/spinner.js.map +1 -0
- package/dist/util/state.d.ts +100 -0
- package/dist/util/state.d.ts.map +1 -0
- package/dist/util/state.js +186 -0
- package/dist/util/state.js.map +1 -0
- package/dist/viewer/app.js +2 -0
- package/dist/viewer/index.html +49 -0
- package/dist/viewer/style.css +154 -0
- package/dist/viz/assemble.d.ts +83 -0
- package/dist/viz/assemble.d.ts.map +1 -0
- package/dist/viz/assemble.js +101 -0
- package/dist/viz/assemble.js.map +1 -0
- package/dist/viz/export.d.ts +39 -0
- package/dist/viz/export.d.ts.map +1 -0
- package/dist/viz/export.js +98 -0
- package/dist/viz/export.js.map +1 -0
- package/dist/viz/serve.d.ts +12 -0
- package/dist/viz/serve.d.ts.map +1 -0
- package/dist/viz/serve.js +129 -0
- package/dist/viz/serve.js.map +1 -0
- package/docs/assets/context-benchmark.svg +31 -0
- package/docs/assets/julius-hero.png +0 -0
- package/docs/upstream-changelog.md +785 -0
- package/package.json +138 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
Julius releases follow [Semantic Versioning](https://semver.org/).
|
|
4
|
+
The unchanged upstream history is in [upstream-changelog.md](docs/upstream-changelog.md).
|
|
5
|
+
|
|
6
|
+
## [Unreleased]
|
|
7
|
+
|
|
8
|
+
## 0.24.1
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- Honor complete delivery for retained context byte ranges while preserving explicit budgets and original-object integrity.
|
|
13
|
+
- Return complete impact identity indexes with shared provenance before falling back to partial detailed evidence.
|
|
14
|
+
- Reduce repeated span and incoming-edge notation in MCP search while retaining every symbol's source location.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- Refresh README benchmark evidence against the release candidate: 235,134 versus 463,332 protocol tokens across ten synthetic task types, including discovery, invocation and exact-byte recovery traffic.
|
|
19
|
+
- Record 78,291 tokens for no-hint recovery and 13,062 for composed impact, below the corresponding upstream aggregates; retain the per-language Python recovery regression.
|
|
20
|
+
- Retain source coverage, uncertainty and detailed investigation reports for follow-up retrieval.
|
|
21
|
+
|
|
22
|
+
Benchmark results are offline protocol counts, not provider token usage, billing or coding accuracy.
|
|
23
|
+
|
|
24
|
+
## 0.24.0
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
|
|
28
|
+
- First public npm distribution of `@ruverd/julius`, with the `julius` executable and `Julius` API.
|
|
29
|
+
- Compact MCP discovery, local change-impact and failure-localization investigations.
|
|
30
|
+
- Recoverable context delivery with explicit budgets, literal focus and complete retrieval.
|
|
31
|
+
- Transactional MCP setup for Claude Code, Cursor, Codex and the native xAI Grok CLI.
|
|
32
|
+
- Tag-based release automation, npm trusted publishing, package installation smoke tests and release metadata checks.
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
|
|
36
|
+
- Keep runtime state under `.julius`, with local graph refresh and shared learnings.
|
|
37
|
+
- Preserve MIT licensing, upstream credits and the original changelog in every npm package.
|
|
38
|
+
- Publish stable versions to `latest` and alpha, beta or release candidates to `next`.
|
|
39
|
+
- Exclude development scripts, tests, local state and experiment traces from the npm archive.
|
|
40
|
+
|
|
41
|
+
### Fixed
|
|
42
|
+
|
|
43
|
+
- Resolve the Node entry point for `vscode-jsonrpc` in packaged installations.
|
|
44
|
+
- Bound selective evidence delivery at UTF-8 boundaries and distinguish missing literals from oversized matches.
|
|
45
|
+
|
|
46
|
+
This release does not measure provider token usage or billing. Recorded benchmark
|
|
47
|
+
results refer to the historical revision identified in the README.
|
package/CREDITS.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Credits
|
|
2
|
+
|
|
3
|
+
## Language support
|
|
4
|
+
|
|
5
|
+
The graft map's multi-language support was shaped by community contributors who opened
|
|
6
|
+
language pull requests. That wave of one-language-at-a-time PRs is exactly what
|
|
7
|
+
motivated the generic breadth tier (one tree-sitter grammar + `tags.scm` per
|
|
8
|
+
language) that now covers most of them. With gratitude to:
|
|
9
|
+
|
|
10
|
+
- **@muneebshere** (#38) — Dart & Kotlin. Both are now supported via the breadth tier.
|
|
11
|
+
- **@reinhardtb** (#46) — C#.
|
|
12
|
+
- **@jhouserizer** (#53) and **@dbianco** (#83) — Java.
|
|
13
|
+
- **@qoole** (#59) — Rust; (#58) — PowerShell; (#40) — the tree-sitter 0.25 runtime bump.
|
|
14
|
+
- **@williamdes** (#64) — PHP.
|
|
15
|
+
- **@edrethardo** (#67) — C/C++ and the "fail loudly on unsupported languages" idea (#66),
|
|
16
|
+
which the breadth tier addresses by routing unknown extensions to a generic
|
|
17
|
+
extractor instead of skipping them.
|
|
18
|
+
- **@kapelner** (#69) — C/C++; (#70) — R.
|
|
19
|
+
- **@CroissantEdit** (#187) — Lua.
|
|
20
|
+
- **@Ansh-Sonkusare** (#159) — Nix.
|
|
21
|
+
- **@shovelmn12** (#130) — Kotlin, promoted to full-fidelity depth extraction.
|
|
22
|
+
- **@mattstrayer** (#219) — Swift.
|
|
23
|
+
|
|
24
|
+
If you contributed a language PR and aren't listed here, please open an issue —
|
|
25
|
+
the omission is an oversight, not a slight.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Context Graph Engine contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/PROVENANCE.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Julius source provenance
|
|
2
|
+
|
|
3
|
+
Julius (`@ruverd/julius`) is an independent fork of [Trail-Code](https://github.com/trailhq/Trail-Code), previously also distributed as Graft.
|
|
4
|
+
|
|
5
|
+
The exact upstream source imported on October 21, 2026 is commit `b1211efd3eef0efa121b93800e5dd8e547aead77`. Import commit `6ecba95` records the exact upstream tree with both the previous Julius history and the upstream commit as parents. The MIT LICENSE and upstream CREDITS.md are preserved unchanged. [docs/upstream-changelog.md](docs/upstream-changelog.md) is the unchanged historical upstream changelog and retains its original names. [CHANGELOG.md](CHANGELOG.md) records Julius releases, starting at 0.24.0.
|
|
6
|
+
|
|
7
|
+
The previous Python/Rust Julius product was replaced with the user's approval. It remains available in the remote branch `archive/pre-trail-20261021`.
|
|
8
|
+
|
|
9
|
+
Julius changes the package, CLI, API, state directories and integration names; consolidates the former dual-brand behavior; and removes upstream deployment, publication and telemetry stamping machinery. It has no default hosted cloud service or telemetry endpoint. Its graph, code navigation, host integrations and local learning functionality originate in the pinned upstream source.
|
package/README.md
CHANGED
|
@@ -1,3 +1,230 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="docs/assets/julius-hero.png" alt="Black-and-white ASCII portrait of Julius holding a floating data cube, with connected cubes, a thick white outline, and a transparent background." width="960">
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
<h1 align="center">Julius</h1>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<strong>"That's 50,000 tokens of context. Do you think tokens grow on trees?"</strong><br>
|
|
9
|
+
Local code intelligence and recoverable context for coding agents.
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
<p align="center">
|
|
13
|
+
<a href="#install">Install</a> ·
|
|
14
|
+
<a href="#how-it-works">How it works</a> ·
|
|
15
|
+
<a href="#benchmarks">Benchmarks</a> ·
|
|
16
|
+
<a href="#documentation">Documentation</a>
|
|
17
|
+
</p>
|
|
18
|
+
|
|
19
|
+
Your agent needs to find a function, follow its callers, or locate a failure in a
|
|
20
|
+
long log. Julius builds a local repository graph and returns evidence within a
|
|
21
|
+
context budget. Omitted output stays on disk, ready to recover when the agent
|
|
22
|
+
needs it.
|
|
23
|
+
|
|
24
|
+
Structural indexing and context recovery run locally, without a model key.
|
|
25
|
+
After MCP setup, keep asking normal coding questions. The agent discovers and
|
|
26
|
+
calls Julius through two tools.
|
|
27
|
+
|
|
28
|
+
## Install
|
|
29
|
+
|
|
30
|
+
Requires **Node.js 20+** and npm.
|
|
31
|
+
|
|
32
|
+
```sh
|
|
33
|
+
npm install -g @ruverd/julius
|
|
34
|
+
julius install --dry-run
|
|
35
|
+
julius install
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
To update an existing installation:
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
npm install -g @ruverd/julius@latest
|
|
42
|
+
julius --version
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Restart or reconnect the client's MCP session after updating. Run `julius install`
|
|
46
|
+
again if the Node executable or installed package path changes. To select an
|
|
47
|
+
exact version, use `npm install -g @ruverd/julius@0.24.0`.
|
|
48
|
+
|
|
49
|
+
### Install from source
|
|
50
|
+
|
|
51
|
+
```sh
|
|
52
|
+
git clone https://github.com/ruverd/julius.git
|
|
53
|
+
cd julius
|
|
54
|
+
npm ci
|
|
55
|
+
npm run build
|
|
56
|
+
npm pack --pack-destination .
|
|
57
|
+
npm install -g ./ruverd-julius-0.24.0.tgz
|
|
58
|
+
julius install --dry-run
|
|
59
|
+
julius install
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Setup detects Claude Code, Cursor, Codex, and the native xAI Grok CLI. To select
|
|
63
|
+
hosts explicitly, use `julius install --hosts claude,cursor,codex,grok`.
|
|
64
|
+
Restart or reconnect the client's MCP session after setup.
|
|
65
|
+
|
|
66
|
+
Then open a repository in your coding client and ask:
|
|
67
|
+
|
|
68
|
+
```text
|
|
69
|
+
What calls handleRequest, and what could this change affect?
|
|
70
|
+
Find the code near this failure: "expected 403 received 200".
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
The host must start MCP in the repository's working directory. Julius indexes
|
|
74
|
+
that repository on demand. Tool selection and permissions belong to the host
|
|
75
|
+
agent; configuration and stdio tests do not establish live client compatibility.
|
|
76
|
+
|
|
77
|
+
Keep the installed Node executable and package path in place. If either moves,
|
|
78
|
+
run setup again. To undo global setup, run `julius uninstall --global`.
|
|
79
|
+
See [installation and migration](docs/installation.md) for rollback, ownership
|
|
80
|
+
conflicts, and repository-specific setup with `julius init`.
|
|
81
|
+
|
|
82
|
+
## How it works
|
|
83
|
+
|
|
84
|
+
Julius gives agents a structural view of the code and control over how much
|
|
85
|
+
evidence enters the conversation.
|
|
86
|
+
|
|
87
|
+
| When the agent needs to… | Julius provides… |
|
|
88
|
+
| --- | --- |
|
|
89
|
+
| Find code | Ranked search, file signatures, and source locations |
|
|
90
|
+
| Understand dependencies | Call tracing, reference edges, and repository maps |
|
|
91
|
+
| Investigate a change or failure | Experimental change-impact and literal failure-localization reports |
|
|
92
|
+
| Read a large result | Bounded previews, literal focus, or explicit complete delivery |
|
|
93
|
+
| Recover omitted evidence | Local SHA-256 handles, byte ranges, and exact-text search |
|
|
94
|
+
| Keep repository knowledge | Shared learnings under `.julius/learnings/` |
|
|
95
|
+
|
|
96
|
+
The default MCP server advertises `julius_discover` and `julius_call`. The agent
|
|
97
|
+
discovers an operation's schema, invokes it, and retrieves more evidence as needed.
|
|
98
|
+
Results default to a 1,200-token text budget using the offline `cl100k_base`
|
|
99
|
+
encoding. Explicit complete delivery without a budget returns all captured bytes.
|
|
100
|
+
|
|
101
|
+
Graph evidence has limits. Dynamic calls, ignored files, and unsupported syntax
|
|
102
|
+
can be missing. A dependency is a candidate for investigation, not proof of a
|
|
103
|
+
breakage. See [investigations and limitations](docs/investigations.md).
|
|
104
|
+
|
|
105
|
+
## Benchmarks
|
|
106
|
+
|
|
107
|
+
**49.3% fewer protocol tokens** in the recorded offline comparison with the
|
|
108
|
+
[pinned upstream executable](PROVENANCE.md). This result describes a specific
|
|
109
|
+
synthetic task mix, not a prediction of your bill.
|
|
110
|
+
|
|
111
|
+
The measured source commit is `625693a046ebc011d2c29ec09e0a03385a1b2a46`, prepared for
|
|
112
|
+
`0.24.1`. The [report](docs/strategy/recovery-impact-comparison.json) records
|
|
113
|
+
source, compiled-output and lockfile hashes; subsequent documentation updates
|
|
114
|
+
preserve the measured source tree.
|
|
115
|
+
|
|
116
|
+

|
|
117
|
+
|
|
118
|
+
The experiment runs ten synthetic evidence tasks in TypeScript, Python, and Go,
|
|
119
|
+
with three repetitions per task and language. Each compared arm has 90 executions.
|
|
120
|
+
Counts include MCP initialization, discovery, invocation, and every recovery call.
|
|
121
|
+
The Julius arm follows the recorded selective/complete policy, including complete
|
|
122
|
+
range recovery after a preview.
|
|
123
|
+
|
|
124
|
+
Complete recovery avoids repeated pages. Composed impact reports group every
|
|
125
|
+
identity while retaining detailed evidence locally:
|
|
126
|
+
|
|
127
|
+
| Task, summed across nine executions | Pinned upstream | Julius |
|
|
128
|
+
| --- | ---: | ---: |
|
|
129
|
+
| Retrieve one required fact | 78,903 | 8,274 |
|
|
130
|
+
| Request complete output explicitly | 78,903 | 63,789 |
|
|
131
|
+
| Recover all output without a hint | 78,903 | 78,291 |
|
|
132
|
+
| Investigate impact with a composed report | 15,186 | 13,062 |
|
|
133
|
+
| **All ten task types** | **463,332** | **235,134** |
|
|
134
|
+
|
|
135
|
+
These are offline `cl100k_base` counts over JSON-RPC NDJSON traffic. No model runs,
|
|
136
|
+
provider billing, or coding-task accuracy were measured. Aggregate savings do not
|
|
137
|
+
hold for every language: Python's no-hint recovery still costs more than upstream.
|
|
138
|
+
Local timing is uncontrolled; the checks verify synthetic evidence recovery,
|
|
139
|
+
not the correctness or speed of a code change.
|
|
140
|
+
|
|
141
|
+
Read the [method, all task results, limitations, and reproduction steps](docs/strategy/recovery-impact-comparison.md)
|
|
142
|
+
or inspect the [recorded JSON](docs/strategy/recovery-impact-comparison.json).
|
|
143
|
+
The [earlier comparison](docs/strategy/performance-comparison.md) remains available.
|
|
144
|
+
Regenerate this chart with `node scripts/render-readme-benchmark.mjs`.
|
|
145
|
+
|
|
146
|
+
## Local navigation
|
|
147
|
+
|
|
148
|
+
The CLI also works directly, without an MCP client or a model key:
|
|
149
|
+
|
|
150
|
+
```sh
|
|
151
|
+
julius build /path/to/repo
|
|
152
|
+
julius ask "Where is authentication checked?" --source /path/to/repo
|
|
153
|
+
julius map /path/to/repo
|
|
154
|
+
julius callers handleRequest /path/to/repo
|
|
155
|
+
julius skeleton src/index.ts /path/to/repo
|
|
156
|
+
julius build --check /path/to/repo
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Graph data lives in `.julius/cache/`, shared learnings in `.julius/learnings/`,
|
|
160
|
+
and machine state in `~/.julius`. `--deep` explicitly enables model-assisted
|
|
161
|
+
analysis. Run `julius --help` for the command list.
|
|
162
|
+
|
|
163
|
+
`julius grep` accepts JavaScript regular expressions, including lookbehind and
|
|
164
|
+
backreferences. Use `--fixed` for literal text. Compilation and matching each file
|
|
165
|
+
have a 1,000 ms limit; exceeding it aborts the search with an error.
|
|
166
|
+
|
|
167
|
+
### Recoverable context economy
|
|
168
|
+
|
|
169
|
+
Keep noisy command output out of the conversation until you need it:
|
|
170
|
+
|
|
171
|
+
```sh
|
|
172
|
+
julius run --budget 512 -- npm test
|
|
173
|
+
julius capture --file build.log --budget 512
|
|
174
|
+
julius read sha256:<digest> --search 'error' --budget 512
|
|
175
|
+
julius economy stats
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
`run` executes its command once and preserves its exit status or signal. Handles
|
|
179
|
+
recover captured bytes exactly, up to the 8 MiB capture ceiling. Follow-up reads
|
|
180
|
+
add to delivery cost, so savings can become negative. Local payload counts are
|
|
181
|
+
not provider measurements. See [context economy](docs/context-economy.md) for
|
|
182
|
+
limits, retention, accounting, and the exported API.
|
|
183
|
+
|
|
184
|
+
### Public API
|
|
185
|
+
|
|
186
|
+
```ts
|
|
187
|
+
import { Julius } from '@ruverd/julius';
|
|
188
|
+
|
|
189
|
+
const engine = new Julius();
|
|
190
|
+
await engine.graph('/path/to/repo');
|
|
191
|
+
const drift = engine.check('/path/to/repo');
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
## Documentation
|
|
195
|
+
|
|
196
|
+
| Guide | What it covers |
|
|
197
|
+
| --- | --- |
|
|
198
|
+
| [Installation and migration](docs/installation.md) | Host setup, rollback, ownership, and migration |
|
|
199
|
+
| [Investigations](docs/investigations.md) | Change impact, failure localization, freshness, and coverage |
|
|
200
|
+
| [Compact MCP](docs/compact-mcp.md) | Discovery, budgets, delivery controls, and recovery |
|
|
201
|
+
| [Context economy](docs/context-economy.md) | Capture, command output, storage, accounting, and API |
|
|
202
|
+
| [Executable comparison](docs/strategy/performance-comparison.md) | Recorded benchmark results and counterexamples |
|
|
203
|
+
| [Fixture benchmark](docs/economy-benchmark.md) | Offline payload accounting and exact-byte recovery |
|
|
204
|
+
| [Research notes](docs/research.md) | Local context techniques and research boundaries |
|
|
205
|
+
| [External services](TELEMETRY.md) | Optional configuration and network behavior |
|
|
206
|
+
|
|
207
|
+
There is no default Julius cloud service, telemetry collector, or automatic npm
|
|
208
|
+
check. Optional external services require explicit configuration. A command you
|
|
209
|
+
explicitly run through Julius can access the network.
|
|
210
|
+
|
|
211
|
+
## Development
|
|
212
|
+
|
|
213
|
+
```sh
|
|
214
|
+
npm ci
|
|
215
|
+
npm run build
|
|
216
|
+
npm test
|
|
217
|
+
node dist/bin/julius.js --help
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
Run `npm run benchmark:economy` after building for the separate offline fixture
|
|
221
|
+
experiment. See [releasing](docs/releasing.md) for versioning, release checks,
|
|
222
|
+
npm trusted publishing and recovery. Julius release notes live in
|
|
223
|
+
[CHANGELOG.md](CHANGELOG.md).
|
|
224
|
+
|
|
225
|
+
## License and provenance
|
|
226
|
+
|
|
227
|
+
Julius is an independent TypeScript fork of Trail-Code, distributed under the
|
|
228
|
+
[MIT license](LICENSE). Upstream copyright and credits are preserved. See
|
|
229
|
+
[source provenance](PROVENANCE.md) for the pinned source, fork history, and the
|
|
230
|
+
archived earlier Julius product.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tier-2 "meaning" call for the code graph — batched one request per file.
|
|
3
|
+
*
|
|
4
|
+
* Given a source file (with 1-based line numbers) and the list of definitions in
|
|
5
|
+
* it, one call returns, for each definition:
|
|
6
|
+
* 1. `summary` — one plain-English sentence: what the symbol is *for*, at the
|
|
7
|
+
* business-logic level, not a restatement of its signature.
|
|
8
|
+
* 2. `crux_start`/`crux_end` — the smallest contiguous range of FILE line
|
|
9
|
+
* numbers (inside that symbol's own span) that a reviewer must read to see
|
|
10
|
+
* the decision or rule the code encodes. `0/0` means there is no single
|
|
11
|
+
* crux (a trivial getter, a plain data holder).
|
|
12
|
+
*
|
|
13
|
+
* Batching per file means N definitions cost one request, not N — and the model
|
|
14
|
+
* sees each symbol's neighbours, which sharpens the summaries. Line numbers are
|
|
15
|
+
* consumed once, at write time, to slice the crux text verbatim from source.
|
|
16
|
+
*/
|
|
17
|
+
import type { ChatModel, ChatResponse } from "./llm/types.js";
|
|
18
|
+
import type { Kind } from "../graph/types.js";
|
|
19
|
+
/** One definition we want described, located by its line span within the file. */
|
|
20
|
+
export interface NodeRef {
|
|
21
|
+
id: string;
|
|
22
|
+
kind: Kind;
|
|
23
|
+
signature: string | null;
|
|
24
|
+
startLine: number;
|
|
25
|
+
endLine: number;
|
|
26
|
+
}
|
|
27
|
+
export interface FileCruxInput {
|
|
28
|
+
path: string;
|
|
29
|
+
source: string;
|
|
30
|
+
nodes: NodeRef[];
|
|
31
|
+
}
|
|
32
|
+
export interface NodeCrux {
|
|
33
|
+
id: string;
|
|
34
|
+
summary: string;
|
|
35
|
+
crux_start: number;
|
|
36
|
+
crux_end: number;
|
|
37
|
+
}
|
|
38
|
+
export interface CruxSummarizer {
|
|
39
|
+
describeFile(input: FileCruxInput): Promise<NodeCrux[]>;
|
|
40
|
+
/** Set by {@link ChatCruxSummarizer} after each call; optional on fakes. */
|
|
41
|
+
lastMiss?: CruxMiss | null;
|
|
42
|
+
}
|
|
43
|
+
/** Why a crux call produced no usable summaries (#235). */
|
|
44
|
+
export type CruxMissKind = "empty-toolCalls" | "unparseable" | "truncated" | "empty-parsed";
|
|
45
|
+
export interface CruxMiss {
|
|
46
|
+
kind: CruxMissKind;
|
|
47
|
+
finishReason: string | null;
|
|
48
|
+
}
|
|
49
|
+
/** Classify an empty/unusable crux reply. `null` means at least one usable summary. */
|
|
50
|
+
export declare function classifyCruxMiss(res: ChatResponse, parsed: NodeCrux[]): CruxMiss | null;
|
|
51
|
+
/** Per-file error text: miss class + the provider's finish_reason (#235). */
|
|
52
|
+
export declare function formatCruxMiss(kind: CruxMissKind, finishReason: string | null): string;
|
|
53
|
+
/** Crux summarizer backed by any {@link ChatModel} via forced tool calling. */
|
|
54
|
+
export declare class ChatCruxSummarizer implements CruxSummarizer {
|
|
55
|
+
private model;
|
|
56
|
+
lastMiss: CruxMiss | null;
|
|
57
|
+
constructor(model: ChatModel);
|
|
58
|
+
describeFile(input: FileCruxInput): Promise<NodeCrux[]>;
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=crux.d.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IAAI,CASvF;AAED,6EAA6E;AAC7E,wBAAgB,cAAc,CAAC,IAAI,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAGtF;AA+FD,+EAA+E;AAC/E,qBAAa,kBAAmB,YAAW,cAAc;IAG3C,OAAO,CAAC,KAAK;IAFzB,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAQ;IAEjC,YAAoB,KAAK,EAAE,SAAS,EAAI;IAElC,YAAY,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CAsB5D;CACF"}
|
package/dist/ai/crux.js
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { recoverToolArgsFromContent, warnToolChoiceIgnored } from "./llm/recover-tool.js";
|
|
2
|
+
function isTruncatedStop(reason) {
|
|
3
|
+
if (!reason)
|
|
4
|
+
return false;
|
|
5
|
+
const r = reason.toLowerCase();
|
|
6
|
+
return r === "length" || r === "max_tokens";
|
|
7
|
+
}
|
|
8
|
+
/** Classify an empty/unusable crux reply. `null` means at least one usable summary. */
|
|
9
|
+
export function classifyCruxMiss(res, parsed) {
|
|
10
|
+
const finishReason = res.stopReason;
|
|
11
|
+
if (parsed.some((p) => p.summary.trim()))
|
|
12
|
+
return null;
|
|
13
|
+
if (isTruncatedStop(finishReason))
|
|
14
|
+
return { kind: "truncated", finishReason };
|
|
15
|
+
if (parsed.length > 0)
|
|
16
|
+
return { kind: "empty-parsed", finishReason };
|
|
17
|
+
const emptyTools = res.toolCalls.length === 0;
|
|
18
|
+
const emptyText = !res.text?.trim();
|
|
19
|
+
if (emptyTools && emptyText)
|
|
20
|
+
return { kind: "empty-toolCalls", finishReason };
|
|
21
|
+
return { kind: "unparseable", finishReason };
|
|
22
|
+
}
|
|
23
|
+
/** Per-file error text: miss class + the provider's finish_reason (#235). */
|
|
24
|
+
export function formatCruxMiss(kind, finishReason) {
|
|
25
|
+
const fr = finishReason == null || finishReason === "" ? "null" : finishReason;
|
|
26
|
+
return `model returned no usable symbol summaries [${kind}, finish_reason=${fr}]`;
|
|
27
|
+
}
|
|
28
|
+
const SYSTEM_PROMPT = `You explain code definitions for a code graph that helps engineers navigate a codebase.
|
|
29
|
+
|
|
30
|
+
You are given ONE source file with 1-based line numbers, and a list of TARGET definitions in it. Describe EVERY target via the record_symbols tool.
|
|
31
|
+
|
|
32
|
+
Rules:
|
|
33
|
+
- Return EXACTLY ONE entry for EVERY target id, using that id verbatim. The number of entries you return MUST equal the number of targets. Never omit a target: a reply missing any id is invalid and will be re-requested.
|
|
34
|
+
- A trivial symbol is NOT an exception. You still return it — with a one-sentence summary and crux 0/0 (see below). "Skip" means "give it no crux span", NEVER "leave it out".
|
|
35
|
+
- summary: ONE sentence — what the symbol is FOR at the business-logic level (the problem it solves or the rule it enforces), not a restatement of its signature.
|
|
36
|
+
- crux_start / crux_end: FILE line numbers (as shown), inside that symbol's own line range. Pick the SINGLE most important contiguous span — the core branch, formula, guard, or state change — at most ~8 lines, and NEVER the whole function. When there is no single focal span (a trivial getter, a plain data holder, a one-line delegation, or logic spread evenly), use crux_start: 0 and crux_end: 0. That 0/0 IS the answer — do not drop the entry.`;
|
|
37
|
+
const RECORD_TOOL = "record_symbols";
|
|
38
|
+
const SYMBOLS_SCHEMA = {
|
|
39
|
+
type: "object",
|
|
40
|
+
properties: {
|
|
41
|
+
symbols: {
|
|
42
|
+
type: "array",
|
|
43
|
+
items: {
|
|
44
|
+
type: "object",
|
|
45
|
+
properties: {
|
|
46
|
+
id: { type: "string" },
|
|
47
|
+
summary: { type: "string" },
|
|
48
|
+
crux_start: { type: "number" },
|
|
49
|
+
crux_end: { type: "number" },
|
|
50
|
+
},
|
|
51
|
+
required: ["id", "summary", "crux_start", "crux_end"],
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
required: ["symbols"],
|
|
56
|
+
};
|
|
57
|
+
/** Cap the file text sent per request so one huge file can't blow the context. */
|
|
58
|
+
const MAX_CODE_CHARS = 18_000;
|
|
59
|
+
function numberLines(source) {
|
|
60
|
+
const clipped = source.length > MAX_CODE_CHARS ? `${source.slice(0, MAX_CODE_CHARS)}\n… (truncated)` : source;
|
|
61
|
+
return clipped
|
|
62
|
+
.split("\n")
|
|
63
|
+
.map((line, i) => `${i + 1}\t${line}`)
|
|
64
|
+
.join("\n");
|
|
65
|
+
}
|
|
66
|
+
function userContent(input) {
|
|
67
|
+
const targets = input.nodes
|
|
68
|
+
.map((n) => `- id=${n.id} | ${n.kind} | lines L${n.startLine}-L${n.endLine}` +
|
|
69
|
+
(n.signature ? ` | ${n.signature}` : ""))
|
|
70
|
+
.join("\n");
|
|
71
|
+
const n = input.nodes.length;
|
|
72
|
+
return `FILE: ${input.path}\n\n${numberLines(input.source)}\n\nTARGETS (${n} — return all ${n}, one entry per id):\n${targets}`;
|
|
73
|
+
}
|
|
74
|
+
/** Normalize the tool's parsed argument object into a {@link NodeCrux} list. */
|
|
75
|
+
function parseResults(obj) {
|
|
76
|
+
if (!obj || !Array.isArray(obj.symbols))
|
|
77
|
+
return [];
|
|
78
|
+
const num = (v) => (typeof v === "number" && Number.isFinite(v) ? Math.trunc(v) : 0);
|
|
79
|
+
return obj.symbols
|
|
80
|
+
.map((s) => s)
|
|
81
|
+
.filter((s) => typeof s.id === "string")
|
|
82
|
+
.map((s) => ({
|
|
83
|
+
id: s.id,
|
|
84
|
+
summary: typeof s.summary === "string" ? s.summary.trim() : "",
|
|
85
|
+
crux_start: num(s.crux_start),
|
|
86
|
+
crux_end: num(s.crux_end),
|
|
87
|
+
}));
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Some OpenAI-compatible gateways ignore forced `tool_choice` and put the tool
|
|
91
|
+
* payload in `content` instead (plain `{symbols:…}`, fenced JSON, or an emulated
|
|
92
|
+
* `[{name, parameters}]` array). Without this recovery the meaning pass sees an
|
|
93
|
+
* empty `toolCalls` list, leaves every node `pending`, and `julius check` loops
|
|
94
|
+
* on "run --deep" forever (#172; same trigger as #129 for the crux path).
|
|
95
|
+
*/
|
|
96
|
+
function argsFromResponse(res) {
|
|
97
|
+
const call = res.toolCalls.find((c) => c.name === RECORD_TOOL) ?? res.toolCalls[0];
|
|
98
|
+
if (call?.args && typeof call.args === "object" && !Array.isArray(call.args)) {
|
|
99
|
+
return call.args;
|
|
100
|
+
}
|
|
101
|
+
const recovered = recoverToolArgsFromContent(res.text, {
|
|
102
|
+
toolNames: [RECORD_TOOL, "emit_json"],
|
|
103
|
+
payloadKey: "symbols",
|
|
104
|
+
});
|
|
105
|
+
if (!recovered)
|
|
106
|
+
warnToolChoiceIgnored("crux", res.text?.trim() ? "unparsed" : "empty");
|
|
107
|
+
return recovered;
|
|
108
|
+
}
|
|
109
|
+
/** Crux summarizer backed by any {@link ChatModel} via forced tool calling. */
|
|
110
|
+
export class ChatCruxSummarizer {
|
|
111
|
+
model;
|
|
112
|
+
lastMiss = null;
|
|
113
|
+
constructor(model) {
|
|
114
|
+
this.model = model;
|
|
115
|
+
}
|
|
116
|
+
async describeFile(input) {
|
|
117
|
+
this.lastMiss = null;
|
|
118
|
+
if (input.nodes.length === 0)
|
|
119
|
+
return [];
|
|
120
|
+
const res = await this.model.create({
|
|
121
|
+
temperature: 0,
|
|
122
|
+
maxTokens: 8192,
|
|
123
|
+
tools: [
|
|
124
|
+
{
|
|
125
|
+
name: RECORD_TOOL,
|
|
126
|
+
description: "Record each target definition's purpose and crux line range.",
|
|
127
|
+
parameters: SYMBOLS_SCHEMA,
|
|
128
|
+
},
|
|
129
|
+
],
|
|
130
|
+
responseFormat: { kind: "tool", name: RECORD_TOOL },
|
|
131
|
+
messages: [
|
|
132
|
+
{ role: "system", content: SYSTEM_PROMPT },
|
|
133
|
+
{ role: "user", content: userContent(input) },
|
|
134
|
+
],
|
|
135
|
+
});
|
|
136
|
+
const parsed = parseResults(argsFromResponse(res));
|
|
137
|
+
this.lastMiss = classifyCruxMiss(res, parsed);
|
|
138
|
+
return parsed;
|
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Y,CAAC,KAAoB;QACrC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACrB,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC;QACxC,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;YAClC,WAAW,EAAE,CAAC;YACd,SAAS,EAAE,IAAI;YACf,KAAK,EAAE;gBACL;oBACE,IAAI,EAAE,WAAW;oBACjB,WAAW,EAAE,8DAA8D;oBAC3E,UAAU,EAAE,cAAoD;iBACjE;aACF;YACD,cAAc,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE;YACnD,QAAQ,EAAE;gBACR,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE;gBAC1C,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,EAAE;aAC9C;SACF,CAAC,CAAC;QACH,MAAM,MAAM,GAAG,YAAY,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC;QACnD,IAAI,CAAC,QAAQ,GAAG,gBAAgB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;QAC9C,OAAO,MAAM,CAAC;IAChB,CAAC;CACF"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* When to stop calling a provider that is failing (#127).
|
|
3
|
+
*
|
|
4
|
+
* Both LLM passes of `build --deep` — the per-file concept summaries
|
|
5
|
+
* (`context/build.ts`) and the per-file crux pass (`graph/enrich.ts`) — used to
|
|
6
|
+
* catch every error per file, keep going, and finish with a clean exit. On an
|
|
7
|
+
* 884-file repo behind a gateway whose token quota was spent that produced 1,617
|
|
8
|
+
* failed calls, a normal success footer, and a graph whose meaning tier was
|
|
9
|
+
* missing; the degradation surfaced days later as bad `ask` results.
|
|
10
|
+
*
|
|
11
|
+
* One gate, shared by both passes, so they agree on what "the provider stopped
|
|
12
|
+
* working" means and a caller can report it once.
|
|
13
|
+
*
|
|
14
|
+
* Content-quality misses (empty/unusable crux, #235) still count as failed files
|
|
15
|
+
* so they are not cached as success (#177), but they do not increment the
|
|
16
|
+
* consecutive-failure cutoff — the provider is answering, just not usefully for
|
|
17
|
+
* those files. Quota/auth stay immediately terminal (#127).
|
|
18
|
+
*/
|
|
19
|
+
/** Consecutive failures that end a pass. One flaky file is normal; five in a row is
|
|
20
|
+
* a provider that is not going to start working, and each further call is spend
|
|
21
|
+
* with no chance of a result. */
|
|
22
|
+
export declare const MAX_CONSECUTIVE_FAILURES = 5;
|
|
23
|
+
/**
|
|
24
|
+
* Errors no amount of retrying fixes: the key is wrong, or the account/quota is
|
|
25
|
+
* spent. Matched on the message because that is all a provider-neutral transport
|
|
26
|
+
* carries — over-matching costs a build that was going to fail anyway, while
|
|
27
|
+
* under-matching just falls back to the consecutive-failure cutoff.
|
|
28
|
+
*/
|
|
29
|
+
export declare function terminalReason(message: string): string | null;
|
|
30
|
+
/**
|
|
31
|
+
* Failure bookkeeping for one LLM pass: how many units failed, how many were
|
|
32
|
+
* skipped once it gave up, and the human-readable reason it did.
|
|
33
|
+
*
|
|
34
|
+
* Single-threaded by construction — every mutation happens between awaits in the
|
|
35
|
+
* pass's own worker — so no locking is needed despite the concurrency above it.
|
|
36
|
+
*/
|
|
37
|
+
export declare class LlmFailureGate {
|
|
38
|
+
/** Units (files) whose call failed. */
|
|
39
|
+
failed: number;
|
|
40
|
+
/** Units never attempted because the pass had already given up. */
|
|
41
|
+
skipped: number;
|
|
42
|
+
/** Why the pass stopped, when it did. */
|
|
43
|
+
fatal?: string;
|
|
44
|
+
private consecutive;
|
|
45
|
+
/** True once the pass should stop issuing calls. */
|
|
46
|
+
get stopped(): boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Record a failed unit; sets {@link fatal} when this failure is the last straw.
|
|
49
|
+
* Pass `{ quality: true }` for a content-quality miss (#235): counted, not fatal,
|
|
50
|
+
* unless the message is quota/auth (those still stop immediately).
|
|
51
|
+
*/
|
|
52
|
+
record(message: string, opts?: {
|
|
53
|
+
quality?: boolean;
|
|
54
|
+
}): void;
|
|
55
|
+
/** Record a success — a failure run only counts while it is unbroken. */
|
|
56
|
+
succeeded(): void;
|
|
57
|
+
/** Record a unit that was not attempted because the pass had stopped. */
|
|
58
|
+
skip(): void;
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=failure.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"failure.d.ts","sourceRoot":"","sources":["../../src/ai/failure.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH;;iCAEiC;AACjC,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAE1C;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAS7D;AAED;;;;;;GAMG;AACH,qBAAa,cAAc;IACzB,uCAAuC;IACvC,MAAM,SAAK;IACX,mEAAmE;IACnE,OAAO,SAAK;IACZ,yCAAyC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,WAAW,CAAK;IAExB,oDAAoD;IACpD,IAAI,OAAO,IAAI,OAAO,CAErB;IAED;;;;OAIG;IACH,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAY1D;IAED,yEAAyE;IACzE,SAAS,IAAI,IAAI,CAEhB;IAED,yEAAyE;IACzE,IAAI,IAAI,IAAI,CAEX;CACF"}
|