@ruverd/julius 0.0.0-stage → 0.24.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/CHANGELOG.md +31 -0
- package/CREDITS.md +25 -0
- package/LICENSE +21 -0
- package/PROVENANCE.md +9 -0
- package/README.md +225 -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 +67 -0
- package/dist/economy/index.d.ts.map +1 -0
- package/dist/economy/index.js +519 -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 +315 -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 +35 -0
- package/dist/search/grep-cli.d.ts.map +1 -0
- package/dist/search/grep-cli.js +115 -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
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/** A source file a node was derived from, with its content hash at generation time. */
|
|
2
|
+
export interface SourceRef {
|
|
3
|
+
path: string;
|
|
4
|
+
hash: string;
|
|
5
|
+
}
|
|
6
|
+
/** A directed edge to another node (by slug). */
|
|
7
|
+
export interface NodeLink {
|
|
8
|
+
to: string;
|
|
9
|
+
relation: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
}
|
|
12
|
+
/** A single node in the graph — one markdown file. */
|
|
13
|
+
export interface ContextNode {
|
|
14
|
+
name: string;
|
|
15
|
+
slug: string;
|
|
16
|
+
/** Coarse category from extraction: system | service | api | concept | … */
|
|
17
|
+
type: string;
|
|
18
|
+
/** Prose description that becomes the node body. */
|
|
19
|
+
summary: string;
|
|
20
|
+
/** Source files that produced this node (empty only for hand-authored nodes). */
|
|
21
|
+
sources: SourceRef[];
|
|
22
|
+
/** sha256 over the sorted `path:hash` lines of {@link sources}. */
|
|
23
|
+
sourcesDigest: string;
|
|
24
|
+
/** Outbound edges. */
|
|
25
|
+
links: NodeLink[];
|
|
26
|
+
/** Free-form region below the generated block, preserved across re-runs. */
|
|
27
|
+
human: string;
|
|
28
|
+
}
|
|
29
|
+
/** The generated index written alongside the node files. */
|
|
30
|
+
export interface Manifest {
|
|
31
|
+
version: number;
|
|
32
|
+
/** Human label for the model that built the graph, e.g. "openrouter:openai/gpt-4o-mini". */
|
|
33
|
+
model: string;
|
|
34
|
+
/** sha256 over every source file's `path:hash` — the whole-graph fingerprint. */
|
|
35
|
+
repoDigest: string;
|
|
36
|
+
/** Every source file `init` processed, with its hash. The staleness ground-truth. */
|
|
37
|
+
files: SourceRef[];
|
|
38
|
+
/** Node roster (a subset of each node's frontmatter, for fast reads). */
|
|
39
|
+
nodes: Array<{
|
|
40
|
+
slug: string;
|
|
41
|
+
name: string;
|
|
42
|
+
type: string;
|
|
43
|
+
sources: string[];
|
|
44
|
+
sourcesDigest: string;
|
|
45
|
+
}>;
|
|
46
|
+
}
|
|
47
|
+
export declare const MANIFEST_VERSION = 1;
|
|
48
|
+
/** Gitignored cache dir (per-file summaries + extractions), never committed. */
|
|
49
|
+
export declare const CACHE_DIR = ".cache";
|
|
50
|
+
/** Turn a display name into a stable, filesystem- and link-safe slug. */
|
|
51
|
+
export declare function slugify(name: string): string;
|
|
52
|
+
/** sha256 over the sorted `path:hash` lines of a set of sources. */
|
|
53
|
+
export declare function digestSources(sources: SourceRef[]): string;
|
|
54
|
+
/** Absolute path of a repo's code map: `julius/`, or `.julius/cache/` in a repo
|
|
55
|
+
* on julius (see context/map-dir.ts). An explicit `--dir` wins. `julius/` is
|
|
56
|
+
* visible (not dot-prefixed) on purpose: default ripgrep skips hidden dirs, so
|
|
57
|
+
* a grep can land on its cards; under julius the hooks name the path instead. */
|
|
58
|
+
export declare function contextDirFor(root: string, override?: string): string;
|
|
59
|
+
/** Why `.julius/` is ignored, which is a different reason: not that it is cheap
|
|
60
|
+
* to regenerate, but that it holds a token. */
|
|
61
|
+
export declare const LINK_NOTE = "julius's brain link \u2014 holds a read token, never commit it.";
|
|
62
|
+
export declare function ensureGitignored(root: string, contextDir: string, note?: string): void;
|
|
63
|
+
/**
|
|
64
|
+
* Keep the card tree greppable even though it's gitignored, by writing a root
|
|
65
|
+
* `.ignore` that re-admits it.
|
|
66
|
+
*
|
|
67
|
+
* The cards exist so that a `grep <symbol>` lands on a ~150-token card instead of
|
|
68
|
+
* a whole source file. Making the graph a local cache (and so gitignored) silently
|
|
69
|
+
* broke that: **ripgrep honours `.gitignore`**, and every ripgrep-backed search
|
|
70
|
+
* tool inherits the blind spot — verified by a card that names a symbol which
|
|
71
|
+
* default `rg` will not return and `rg -uu` finds instantly. `.ignore` is read at
|
|
72
|
+
* higher precedence than `.gitignore`, so re-admitting the tree there restores
|
|
73
|
+
* search without git ever tracking a byte of it.
|
|
74
|
+
*
|
|
75
|
+
* The two negative entries matter as much as the positive one: `.cache/` holds a
|
|
76
|
+
* multi-MB parse memo and `.graph/` holds `wiring.json`, and dropping either into
|
|
77
|
+
* every repo-wide search would be worse than the problem being fixed.
|
|
78
|
+
*
|
|
79
|
+
* Same contract as {@link ensureGitignored}: idempotent, skips a context dir
|
|
80
|
+
* outside `root`, and swallows write failures — a build that already succeeded
|
|
81
|
+
* must not fail over a convenience file.
|
|
82
|
+
*/
|
|
83
|
+
export declare function ensureSearchable(root: string, contextDir: string): void;
|
|
84
|
+
/** Serialize a node to its full markdown file contents. */
|
|
85
|
+
export declare function renderNodeFile(node: ContextNode): string;
|
|
86
|
+
/**
|
|
87
|
+
* Write a node file, preserving any existing human region. Returns the file
|
|
88
|
+
* path written.
|
|
89
|
+
*/
|
|
90
|
+
export declare function writeNode(dir: string, node: ContextNode): string;
|
|
91
|
+
/** A node file parsed back off disk (frontmatter only; body is not needed for `check`). */
|
|
92
|
+
export interface ParsedNode {
|
|
93
|
+
slug: string;
|
|
94
|
+
name: string;
|
|
95
|
+
type: string;
|
|
96
|
+
sources: SourceRef[];
|
|
97
|
+
sourcesDigest: string;
|
|
98
|
+
links: NodeLink[];
|
|
99
|
+
}
|
|
100
|
+
/** Read and parse every concept-node `.md` in a context dir (skips INDEX.md
|
|
101
|
+
* and root-level per-file cards). */
|
|
102
|
+
export declare function readNodes(dir: string): ParsedNode[];
|
|
103
|
+
/** List the node files present (slug → filename), for pruning deleted nodes. */
|
|
104
|
+
export declare function existingNodeSlugs(dir: string): Set<string>;
|
|
105
|
+
/** Delete a node file by slug. */
|
|
106
|
+
export declare function deleteNode(dir: string, slug: string): void;
|
|
107
|
+
export declare function writeManifest(dir: string, manifest: Manifest): void;
|
|
108
|
+
export declare function readManifest(dir: string): Manifest | undefined;
|
|
109
|
+
//# sourceMappingURL=node-file.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-file.d.ts","sourceRoot":"","sources":["../../src/context/node-file.ts"],"names":[],"mappings":"AAkCA,uFAAuF;AACvF,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,iDAAiD;AACjD,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,sDAAsD;AACtD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,4EAA4E;IAC5E,IAAI,EAAE,MAAM,CAAC;IACb,oDAAoD;IACpD,OAAO,EAAE,MAAM,CAAC;IAChB,iFAAiF;IACjF,OAAO,EAAE,SAAS,EAAE,CAAC;IACrB,mEAAmE;IACnE,aAAa,EAAE,MAAM,CAAC;IACtB,sBAAsB;IACtB,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,4EAA4E;IAC5E,KAAK,EAAE,MAAM,CAAC;CACf;AAED,4DAA4D;AAC5D,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,4FAA4F;IAC5F,KAAK,EAAE,MAAM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IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,SAAS,EAAE,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,QAAQ,EAAE,CAAC;CACnB;AA0DD;qCACqC;AACrC,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,EAAE,CAoBnD;AAED,gFAAgF;AAChF,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAO1D;AAED,kCAAkC;AAClC,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAG1D;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAGnE;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAQ9D"}
|
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The on-disk format of the context graph: a folder of plain markdown files
|
|
3
|
+
* under `.context/`, one per node. The files ARE the graph — the frontmatter
|
|
4
|
+
* carries the machine-readable node (identity, source provenance, edges) and
|
|
5
|
+
* the body is human/agent-readable prose. There is no database.
|
|
6
|
+
*
|
|
7
|
+
* Layout of a node file:
|
|
8
|
+
*
|
|
9
|
+
* --- ← YAML frontmatter (canonical, machine-owned)
|
|
10
|
+
* name / slug / type
|
|
11
|
+
* sources: [{path, hash}] ← provenance + the staleness key
|
|
12
|
+
* sources_digest
|
|
13
|
+
* links: [{to, relation}] ← edges (canonical form)
|
|
14
|
+
* ---
|
|
15
|
+
* <!-- context:generated:start -->
|
|
16
|
+
* ## Summary … ## Related … ← regenerated on every `init`
|
|
17
|
+
* <!-- context:generated:end -->
|
|
18
|
+
* ## Notes … ← anything a human writes is preserved verbatim
|
|
19
|
+
*
|
|
20
|
+
* `.context/manifest.json` is a generated index over all nodes plus the full
|
|
21
|
+
* file→hash map `init` saw, so `check` can detect drift in O(files) without an
|
|
22
|
+
* LLM and without re-reading every node body.
|
|
23
|
+
*/
|
|
24
|
+
import { readFileSync, writeFileSync, mkdirSync, existsSync, readdirSync, rmSync } from "node:fs";
|
|
25
|
+
import { spawnSync } from "node:child_process";
|
|
26
|
+
import { join } from "node:path";
|
|
27
|
+
import { matter } from "../util/front-matter.js";
|
|
28
|
+
import { contentHash, normalizeName } from "../util/id.js";
|
|
29
|
+
import { relPosix, stripTrailingSlashes } from "../util/paths.js";
|
|
30
|
+
// Value-only import of a constant; `write.ts` pulls in nothing from here, so no cycle.
|
|
31
|
+
import { GRAPH_DIR } from "../graph/write.js";
|
|
32
|
+
import { mapDirFor, isJuliusMapDir } from "./map-dir.js";
|
|
33
|
+
import { ignoreInJuliusDir } from "../notes/repo-julius.js";
|
|
34
|
+
export const MANIFEST_VERSION = 1;
|
|
35
|
+
const GEN_START = "<!-- context:generated:start -->";
|
|
36
|
+
const GEN_END = "<!-- context:generated:end -->";
|
|
37
|
+
const MANIFEST_FILE = "manifest.json";
|
|
38
|
+
/** Gitignored cache dir (per-file summaries + extractions), never committed. */
|
|
39
|
+
export const CACHE_DIR = ".cache";
|
|
40
|
+
/** Env kill switch — same truthy parsing as `JULIUS_NO_REFRESH` in ../graph/refresh.ts. */
|
|
41
|
+
function envTruthy(name) {
|
|
42
|
+
const v = process.env[name];
|
|
43
|
+
return v !== undefined && v !== "" && v !== "0" && v !== "false";
|
|
44
|
+
}
|
|
45
|
+
/** Turn a display name into a stable, filesystem- and link-safe slug. */
|
|
46
|
+
export function slugify(name) {
|
|
47
|
+
const base = normalizeName(name)
|
|
48
|
+
.replace(/[^a-z0-9]+/g, "-")
|
|
49
|
+
.replace(/^-+|-+$/g, "");
|
|
50
|
+
return base || "node";
|
|
51
|
+
}
|
|
52
|
+
/** sha256 over the sorted `path:hash` lines of a set of sources. */
|
|
53
|
+
export function digestSources(sources) {
|
|
54
|
+
const lines = sources
|
|
55
|
+
.map((s) => `${s.path}:${s.hash}`)
|
|
56
|
+
.sort()
|
|
57
|
+
.join("\n");
|
|
58
|
+
return contentHash(lines);
|
|
59
|
+
}
|
|
60
|
+
/** Absolute path of a repo's code map: `julius/`, or `.julius/cache/` in a repo
|
|
61
|
+
* on julius (see context/map-dir.ts). An explicit `--dir` wins. `julius/` is
|
|
62
|
+
* visible (not dot-prefixed) on purpose: default ripgrep skips hidden dirs, so
|
|
63
|
+
* a grep can land on its cards; under julius the hooks name the path instead. */
|
|
64
|
+
export function contextDirFor(root, override) {
|
|
65
|
+
if (override)
|
|
66
|
+
return override;
|
|
67
|
+
return mapDirFor(root);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Make sure the repo's root `.gitignore` ignores the julius output dir. The
|
|
71
|
+
* graph is a local, regenerable cache (like `node_modules`), not a committed
|
|
72
|
+
* artifact, so every `julius build` adds the entry itself the first time — the
|
|
73
|
+
* user never has to think about it. No-ops when the entry is already present,
|
|
74
|
+
* when git already ignores the dir by other means (`.git/info/exclude`, a parent
|
|
75
|
+
* `.gitignore`, `core.excludesFile`), or when the dir lives outside `root` (a
|
|
76
|
+
* custom `--dir` elsewhere, which can't be expressed as a repo-relative ignore).
|
|
77
|
+
* Best-effort: an unwritable `.gitignore` must never abort a build, so write
|
|
78
|
+
* failures are swallowed.
|
|
79
|
+
*/
|
|
80
|
+
const GRAPH_CACHE_NOTE = "julius's local graph cache — regenerable, not committed (run `julius build`).";
|
|
81
|
+
/** Why `.julius/` is ignored, which is a different reason: not that it is cheap
|
|
82
|
+
* to regenerate, but that it holds a token. */
|
|
83
|
+
export const LINK_NOTE = "julius's brain link — holds a read token, never commit it.";
|
|
84
|
+
export function ensureGitignored(root, contextDir, note = GRAPH_CACHE_NOTE) {
|
|
85
|
+
if (envTruthy("JULIUS_NO_GITIGNORE"))
|
|
86
|
+
return;
|
|
87
|
+
// julius's map: `.julius/.gitignore` keeps it out, and the repo's own file is never touched.
|
|
88
|
+
if (isJuliusMapDir(root, contextDir)) {
|
|
89
|
+
try {
|
|
90
|
+
ignoreInJuliusDir(root, "cache/");
|
|
91
|
+
}
|
|
92
|
+
catch { /* best-effort */ }
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
const rel = relPosix(root, contextDir);
|
|
96
|
+
if (rel === "" || rel.startsWith(".."))
|
|
97
|
+
return; // dir is at/above the repo root — nothing sane to ignore
|
|
98
|
+
const bare = stripTrailingSlashes(rel); // "julius" (or a `--dir` subpath like "tools/ctx")
|
|
99
|
+
// Root-ANCHORED, so it ignores exactly this repo's `julius/` and not a directory named
|
|
100
|
+
// `julius` at any depth. An unanchored `julius/` also matched `.claude/skills/julius/`, so
|
|
101
|
+
// committing the skill julius just wrote was silently dropped (#79). `rel` is always
|
|
102
|
+
// repo-relative here, so a leading `/` is always safe (incl. a `--dir` subpath).
|
|
103
|
+
const entry = `/${bare}/`;
|
|
104
|
+
const path = join(root, ".gitignore");
|
|
105
|
+
let current = "";
|
|
106
|
+
try {
|
|
107
|
+
current = readFileSync(path, "utf8");
|
|
108
|
+
}
|
|
109
|
+
catch { /* no .gitignore yet — we create one */ }
|
|
110
|
+
// Accept the anchored form AND the older unanchored `julius/` / `julius`, so existing
|
|
111
|
+
// repos aren't double-appended and a hand-anchored entry survives the next build.
|
|
112
|
+
const present = current.split("\n").some((l) => {
|
|
113
|
+
const t = l.trim();
|
|
114
|
+
return t === entry || t === `${bare}/` || t === bare;
|
|
115
|
+
});
|
|
116
|
+
if (present)
|
|
117
|
+
return;
|
|
118
|
+
if (gitAlreadyIgnores(root, bare))
|
|
119
|
+
return;
|
|
120
|
+
const gap = current === "" ? "" : current.endsWith("\n") ? "\n" : "\n\n";
|
|
121
|
+
const block = `${gap}# ${note}\n${entry}\n`;
|
|
122
|
+
try {
|
|
123
|
+
writeFileSync(path, current + block);
|
|
124
|
+
}
|
|
125
|
+
catch { /* best-effort — build already succeeded */ }
|
|
126
|
+
}
|
|
127
|
+
const GIT_REPO_ENV = [
|
|
128
|
+
"GIT_DIR", "GIT_WORK_TREE", "GIT_INDEX_FILE", "GIT_COMMON_DIR", "GIT_OBJECT_DIRECTORY", "GIT_NAMESPACE",
|
|
129
|
+
];
|
|
130
|
+
function gitAlreadyIgnores(root, rel) {
|
|
131
|
+
try {
|
|
132
|
+
const env = { ...process.env };
|
|
133
|
+
for (const key of GIT_REPO_ENV)
|
|
134
|
+
delete env[key];
|
|
135
|
+
const result = spawnSync("git", ["-c", "core.fsmonitor=false", "check-ignore", "-q", "--", `${rel}/`], {
|
|
136
|
+
cwd: root, env, stdio: "ignore", timeout: 5000, windowsHide: true,
|
|
137
|
+
});
|
|
138
|
+
return result.status === 0;
|
|
139
|
+
}
|
|
140
|
+
catch {
|
|
141
|
+
return false;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Keep the card tree greppable even though it's gitignored, by writing a root
|
|
146
|
+
* `.ignore` that re-admits it.
|
|
147
|
+
*
|
|
148
|
+
* The cards exist so that a `grep <symbol>` lands on a ~150-token card instead of
|
|
149
|
+
* a whole source file. Making the graph a local cache (and so gitignored) silently
|
|
150
|
+
* broke that: **ripgrep honours `.gitignore`**, and every ripgrep-backed search
|
|
151
|
+
* tool inherits the blind spot — verified by a card that names a symbol which
|
|
152
|
+
* default `rg` will not return and `rg -uu` finds instantly. `.ignore` is read at
|
|
153
|
+
* higher precedence than `.gitignore`, so re-admitting the tree there restores
|
|
154
|
+
* search without git ever tracking a byte of it.
|
|
155
|
+
*
|
|
156
|
+
* The two negative entries matter as much as the positive one: `.cache/` holds a
|
|
157
|
+
* multi-MB parse memo and `.graph/` holds `wiring.json`, and dropping either into
|
|
158
|
+
* every repo-wide search would be worse than the problem being fixed.
|
|
159
|
+
*
|
|
160
|
+
* Same contract as {@link ensureGitignored}: idempotent, skips a context dir
|
|
161
|
+
* outside `root`, and swallows write failures — a build that already succeeded
|
|
162
|
+
* must not fail over a convenience file.
|
|
163
|
+
*/
|
|
164
|
+
export function ensureSearchable(root, contextDir) {
|
|
165
|
+
if (envTruthy("JULIUS_NO_IGNORE"))
|
|
166
|
+
return;
|
|
167
|
+
// julius's map is reached by the path the hooks name, not by a grep from the root: no `.ignore`.
|
|
168
|
+
if (isJuliusMapDir(root, contextDir))
|
|
169
|
+
return;
|
|
170
|
+
const rel = relPosix(root, contextDir);
|
|
171
|
+
if (rel === "" || rel.startsWith(".."))
|
|
172
|
+
return; // outside the repo — nothing to re-admit
|
|
173
|
+
const dir = stripTrailingSlashes(rel);
|
|
174
|
+
const entry = `!${dir}/`;
|
|
175
|
+
const path = join(root, ".ignore");
|
|
176
|
+
let current = "";
|
|
177
|
+
try {
|
|
178
|
+
current = readFileSync(path, "utf8");
|
|
179
|
+
}
|
|
180
|
+
catch { /* no .ignore yet — we create one */ }
|
|
181
|
+
// Any mention of the negation means a human (or a previous build) has already
|
|
182
|
+
// had an opinion here; leave it alone rather than append a second copy.
|
|
183
|
+
if (current.split("\n").some((l) => l.trim() === entry))
|
|
184
|
+
return;
|
|
185
|
+
const gap = current === "" ? "" : current.endsWith("\n") ? "\n" : "\n\n";
|
|
186
|
+
const block = `${gap}# julius's cards are gitignored but should stay greppable: ripgrep reads\n` +
|
|
187
|
+
`# .ignore before .gitignore, so this re-admits the tree to search only.\n` +
|
|
188
|
+
`${entry}\n${dir}/${CACHE_DIR}/\n${dir}/${GRAPH_DIR}/\n`;
|
|
189
|
+
try {
|
|
190
|
+
writeFileSync(path, current + block);
|
|
191
|
+
}
|
|
192
|
+
catch { /* best-effort */ }
|
|
193
|
+
}
|
|
194
|
+
/** Render the generated body (Summary + Related) for a node. */
|
|
195
|
+
function renderGenerated(node) {
|
|
196
|
+
const lines = [`## Summary`, ``, node.summary.trim() || "_(no summary)_", ``];
|
|
197
|
+
if (node.links.length > 0) {
|
|
198
|
+
lines.push(`## Related`, ``);
|
|
199
|
+
for (const link of [...node.links].sort((a, b) => a.to.localeCompare(b.to))) {
|
|
200
|
+
const rel = link.relation.replace(/_/g, " ");
|
|
201
|
+
const tail = link.description ? ` — ${link.description}` : "";
|
|
202
|
+
lines.push(`- ${rel} [[${link.to}]]${tail}`);
|
|
203
|
+
}
|
|
204
|
+
lines.push(``);
|
|
205
|
+
}
|
|
206
|
+
return lines.join("\n");
|
|
207
|
+
}
|
|
208
|
+
/** Default human region for a brand-new node (preserved verbatim afterwards). */
|
|
209
|
+
function defaultHuman() {
|
|
210
|
+
return `\n## Notes\n\n_Anything written below the generated block is preserved when the graph is regenerated._\n`;
|
|
211
|
+
}
|
|
212
|
+
/** Serialize a node to its full markdown file contents. */
|
|
213
|
+
export function renderNodeFile(node) {
|
|
214
|
+
const data = {
|
|
215
|
+
name: node.name,
|
|
216
|
+
slug: node.slug,
|
|
217
|
+
type: node.type,
|
|
218
|
+
sources: node.sources.map((s) => ({ path: s.path, hash: s.hash })),
|
|
219
|
+
sources_digest: node.sourcesDigest,
|
|
220
|
+
links: node.links.map((l) => l.description ? { to: l.to, relation: l.relation, description: l.description } : { to: l.to, relation: l.relation }),
|
|
221
|
+
generator: { version: MANIFEST_VERSION },
|
|
222
|
+
};
|
|
223
|
+
const body = `${GEN_START}\n${renderGenerated(node)}${GEN_END}\n${node.human}`;
|
|
224
|
+
// gray-matter appends a trailing newline; keep output stable across runs.
|
|
225
|
+
return matter.stringify(body, data);
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Extract the human region (everything after the generated-end marker) from an
|
|
229
|
+
* existing node file so it survives regeneration. If the markers are missing
|
|
230
|
+
* (a hand-deleted or foreign file), returns a fresh default region.
|
|
231
|
+
*/
|
|
232
|
+
function preserveHuman(existingContent) {
|
|
233
|
+
const idx = existingContent.indexOf(GEN_END);
|
|
234
|
+
if (idx === -1)
|
|
235
|
+
return defaultHuman();
|
|
236
|
+
return existingContent.slice(idx + GEN_END.length).replace(/^\n/, "");
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Write a node file, preserving any existing human region. Returns the file
|
|
240
|
+
* path written.
|
|
241
|
+
*/
|
|
242
|
+
export function writeNode(dir, node) {
|
|
243
|
+
mkdirSync(dir, { recursive: true });
|
|
244
|
+
const path = join(dir, `${node.slug}.md`);
|
|
245
|
+
if (existsSync(path)) {
|
|
246
|
+
const parsed = matter(readFileSync(path, "utf8"));
|
|
247
|
+
node = { ...node, human: preserveHuman(parsed.content) };
|
|
248
|
+
}
|
|
249
|
+
else {
|
|
250
|
+
node = { ...node, human: node.human || defaultHuman() };
|
|
251
|
+
}
|
|
252
|
+
writeFileSync(path, renderNodeFile(node));
|
|
253
|
+
return path;
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Stems of per-file wiring cards that sit at the julius/ top level — i.e. cards
|
|
257
|
+
* for source files in the repo root. Those cards share a directory with concept
|
|
258
|
+
* nodes (`julius/<stem>.md`) but are recorded in `manifest.files`, not
|
|
259
|
+
* `manifest.nodes`. Nested file cards live in subdirs and are never scanned here.
|
|
260
|
+
*
|
|
261
|
+
* Incomplete on its own (#261): the graph can write a root card for a source
|
|
262
|
+
* that the concept pipeline never recorded (different extension lists), so the
|
|
263
|
+
* stem is absent from `manifest.files`. Combined with isRootFileCard().
|
|
264
|
+
*/
|
|
265
|
+
function rootFileCardStems(dir) {
|
|
266
|
+
const manifest = readManifest(dir);
|
|
267
|
+
if (!manifest)
|
|
268
|
+
return new Set();
|
|
269
|
+
const stems = new Set();
|
|
270
|
+
for (const f of manifest.files) {
|
|
271
|
+
if (f.path.includes("/"))
|
|
272
|
+
continue;
|
|
273
|
+
stems.add(f.path.replace(/\.[^./]+$/, ""));
|
|
274
|
+
}
|
|
275
|
+
return stems;
|
|
276
|
+
}
|
|
277
|
+
function hasConceptSlug(fm) {
|
|
278
|
+
return fm.slug != null && String(fm.slug).length > 0;
|
|
279
|
+
}
|
|
280
|
+
/** `writeCovers` used to stamp `covers: []` onto slug-less root file cards. */
|
|
281
|
+
function isCoversOnlyFileCard(fm) {
|
|
282
|
+
if (hasConceptSlug(fm) || !("covers" in fm))
|
|
283
|
+
return false;
|
|
284
|
+
return fm.name == null && fm.type == null && fm.sources == null;
|
|
285
|
+
}
|
|
286
|
+
/** Wiring cards start with `# <source path with extension>`, optionally followed
|
|
287
|
+
* by ` · [[slug]]` up-links. A hand-dropped `notes.md` does not. */
|
|
288
|
+
function isWiringCardHeading(content) {
|
|
289
|
+
const line = content.trimStart().split(/\r?\n/, 1)[0] ?? "";
|
|
290
|
+
return /^# [^\s#]+\.[A-Za-z0-9]{1,12}(?:\s|$)/.test(line);
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* A top-level `.md` that is a per-file wiring card, not a concept node.
|
|
294
|
+
* Real concepts always carry `slug` in frontmatter and are never skipped.
|
|
295
|
+
* A hand-dropped `notes.md` has no slug, no `covers`, and no file-path heading,
|
|
296
|
+
* so it still surfaces as indexDrift (#215 / #261).
|
|
297
|
+
*/
|
|
298
|
+
function isRootFileCard(stem, fm, content, fileCardStems) {
|
|
299
|
+
if (hasConceptSlug(fm))
|
|
300
|
+
return false;
|
|
301
|
+
if (fileCardStems.has(stem))
|
|
302
|
+
return true;
|
|
303
|
+
if (isCoversOnlyFileCard(fm))
|
|
304
|
+
return true;
|
|
305
|
+
return isWiringCardHeading(content);
|
|
306
|
+
}
|
|
307
|
+
/** Read and parse every concept-node `.md` in a context dir (skips INDEX.md
|
|
308
|
+
* and root-level per-file cards). */
|
|
309
|
+
export function readNodes(dir) {
|
|
310
|
+
if (!existsSync(dir))
|
|
311
|
+
return [];
|
|
312
|
+
const fileCardStems = rootFileCardStems(dir);
|
|
313
|
+
const out = [];
|
|
314
|
+
for (const entry of readdirSync(dir)) {
|
|
315
|
+
if (!entry.endsWith(".md") || entry === "INDEX.md")
|
|
316
|
+
continue;
|
|
317
|
+
const parsed = matter(readFileSync(join(dir, entry), "utf8"));
|
|
318
|
+
const fm = parsed.data;
|
|
319
|
+
const fallbackSlug = entry.replace(/\.md$/, "");
|
|
320
|
+
if (isRootFileCard(fallbackSlug, fm, parsed.content, fileCardStems))
|
|
321
|
+
continue;
|
|
322
|
+
out.push({
|
|
323
|
+
slug: String(fm.slug ?? fallbackSlug),
|
|
324
|
+
name: String(fm.name ?? ""),
|
|
325
|
+
type: String(fm.type ?? ""),
|
|
326
|
+
sources: Array.isArray(fm.sources) ? fm.sources : [],
|
|
327
|
+
sourcesDigest: String(fm.sources_digest ?? ""),
|
|
328
|
+
links: Array.isArray(fm.links) ? fm.links : [],
|
|
329
|
+
});
|
|
330
|
+
}
|
|
331
|
+
return out;
|
|
332
|
+
}
|
|
333
|
+
/** List the node files present (slug → filename), for pruning deleted nodes. */
|
|
334
|
+
export function existingNodeSlugs(dir) {
|
|
335
|
+
if (!existsSync(dir))
|
|
336
|
+
return new Set();
|
|
337
|
+
return new Set(readdirSync(dir)
|
|
338
|
+
.filter((e) => e.endsWith(".md") && e !== "INDEX.md")
|
|
339
|
+
.map((e) => e.replace(/\.md$/, "")));
|
|
340
|
+
}
|
|
341
|
+
/** Delete a node file by slug. */
|
|
342
|
+
export function deleteNode(dir, slug) {
|
|
343
|
+
const path = join(dir, `${slug}.md`);
|
|
344
|
+
if (existsSync(path))
|
|
345
|
+
rmSync(path);
|
|
346
|
+
}
|
|
347
|
+
export function writeManifest(dir, manifest) {
|
|
348
|
+
mkdirSync(dir, { recursive: true });
|
|
349
|
+
writeFileSync(join(dir, MANIFEST_FILE), JSON.stringify(manifest, null, 2) + "\n");
|
|
350
|
+
}
|
|
351
|
+
export function readManifest(dir) {
|
|
352
|
+
const path = join(dir, MANIFEST_FILE);
|
|
353
|
+
if (!existsSync(path))
|
|
354
|
+
return undefined;
|
|
355
|
+
try {
|
|
356
|
+
return JSON.parse(readFileSync(path, "utf8"));
|
|
357
|
+
}
|
|
358
|
+
catch {
|
|
359
|
+
return undefined;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
//# sourceMappingURL=node-file.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"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,MAAM,UAAU,aAAa,CAAC,GAAW,EAAE,QAAkB;IAC3D,SAAS,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACpC,aAAa,CAAC,IAAI,CAAC,GAAG,EAAE,aAAa,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;AACpF,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,GAAW;IACtC,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,EAAE,aAAa,CAAC,CAAC;IACtC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;QAAE,OAAO,SAAS,CAAC;IACxC,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAa,CAAC;IAC5D,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a saved token was actually worth, in dollars.
|
|
3
|
+
*
|
|
4
|
+
* `savings.ts` answers "how many input tokens did julius keep out of the
|
|
5
|
+
* context"; this answers "what does an input token cost here". The two are
|
|
6
|
+
* deliberately separate: the token count is arithmetic over file sizes and is
|
|
7
|
+
* true everywhere, while the price depends on which model the session ran and
|
|
8
|
+
* how much of its context was served from cache — facts only the host's
|
|
9
|
+
* transcript knows.
|
|
10
|
+
*
|
|
11
|
+
* Nothing here guesses. There is no default rate and no env override: a model
|
|
12
|
+
* we don't have a price for yields null, and the callers then render the token
|
|
13
|
+
* count alone rather than a dollar figure we made up. A wrong number on the
|
|
14
|
+
* statusline is worse than no number.
|
|
15
|
+
*/
|
|
16
|
+
/** List input price for a model id, or null when we don't know it — a model
|
|
17
|
+
* released after this table was written, or a host reporting something else
|
|
18
|
+
* entirely. Null propagates all the way to "render tokens only". */
|
|
19
|
+
export declare function inputUsdPerMtok(model: unknown): number | null;
|
|
20
|
+
/** One turn's input-token usage, as the host's transcript reports it. */
|
|
21
|
+
export interface TurnUsage {
|
|
22
|
+
model: string;
|
|
23
|
+
/** Fresh tokens, billed at the list rate. */
|
|
24
|
+
input: number;
|
|
25
|
+
/** Written to the cache this turn — a 25% premium over list. */
|
|
26
|
+
cacheCreate: number;
|
|
27
|
+
/** Served from cache — a tenth of list, and usually the bulk of a long turn. */
|
|
28
|
+
cacheRead: number;
|
|
29
|
+
}
|
|
30
|
+
/** What this turn's input tokens cost, in micro-dollars, or null on a model we
|
|
31
|
+
* have no price for. */
|
|
32
|
+
export declare function turnInputCostMicros(usage: TurnUsage): number | null;
|
|
33
|
+
/** Every input token this turn was billed for, cached or not — the denominator
|
|
34
|
+
* of the blended rate. */
|
|
35
|
+
export declare function turnInputTokens(usage: TurnUsage): number;
|
|
36
|
+
/**
|
|
37
|
+
* Dollars saved, at the rate the session has actually been paying.
|
|
38
|
+
*
|
|
39
|
+
* `costMicros / tokensBilled` is the blended price of one input token here —
|
|
40
|
+
* model and cache-hit ratio already folded in — so this re-blends as the
|
|
41
|
+
* session goes rather than freezing turn one's rate. Returns null when nothing
|
|
42
|
+
* has been sampled yet (turn one, or a host whose hooks name no transcript).
|
|
43
|
+
*/
|
|
44
|
+
export declare function dollarsSaved(savedTokens: number, costMicros: number | undefined, tokensBilled: number | undefined): number | null;
|
|
45
|
+
/** `$1.23`, or `<$0.01` for a real but sub-cent saving. Never `$0.00`: a
|
|
46
|
+
* rounded-to-nothing number reads as "julius saved you nothing", which is a
|
|
47
|
+
* different claim from "julius saved you less than a cent". */
|
|
48
|
+
export declare function formatDollars(usd: number): string;
|
|
49
|
+
//# sourceMappingURL=price.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"price.d.ts","sourceRoot":"","sources":["../../src/context/price.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAYH;;oEAEoE;AACpE,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAI7D;AAED,yEAAyE;AACzE,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,gEAAgE;IAChE,WAAW,EAAE,MAAM,CAAC;IACpB,gFAAgF;IAChF,SAAS,EAAE,MAAM,CAAC;CACnB;AAWD;wBACwB;AACxB,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,GAAG,IAAI,CAQnE;AAED;0BAC0B;AAC1B,wBAAgB,eAAe,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAExD;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAC1B,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,YAAY,EAAE,MAAM,GAAG,SAAS,GAC/B,MAAM,GAAG,IAAI,CAMf;AAED;;+DAE+D;AAC/D,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAGjD"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a saved token was actually worth, in dollars.
|
|
3
|
+
*
|
|
4
|
+
* `savings.ts` answers "how many input tokens did julius keep out of the
|
|
5
|
+
* context"; this answers "what does an input token cost here". The two are
|
|
6
|
+
* deliberately separate: the token count is arithmetic over file sizes and is
|
|
7
|
+
* true everywhere, while the price depends on which model the session ran and
|
|
8
|
+
* how much of its context was served from cache — facts only the host's
|
|
9
|
+
* transcript knows.
|
|
10
|
+
*
|
|
11
|
+
* Nothing here guesses. There is no default rate and no env override: a model
|
|
12
|
+
* we don't have a price for yields null, and the callers then render the token
|
|
13
|
+
* count alone rather than a dollar figure we made up. A wrong number on the
|
|
14
|
+
* statusline is worse than no number.
|
|
15
|
+
*/
|
|
16
|
+
/** Input $/Mtok, list price, per model family. Output tokens are irrelevant —
|
|
17
|
+
* what julius saves is context the agent would otherwise have read IN. */
|
|
18
|
+
const INPUT_USD_PER_MTOK = [
|
|
19
|
+
[/^claude-(fable|mythos)-5/, 10],
|
|
20
|
+
[/^claude-opus-(5|4-[678])/, 5],
|
|
21
|
+
[/^claude-sonnet-5/, 2],
|
|
22
|
+
[/^claude-sonnet-4-6/, 3],
|
|
23
|
+
[/^claude-haiku-4-5/, 1],
|
|
24
|
+
];
|
|
25
|
+
/** List input price for a model id, or null when we don't know it — a model
|
|
26
|
+
* released after this table was written, or a host reporting something else
|
|
27
|
+
* entirely. Null propagates all the way to "render tokens only". */
|
|
28
|
+
export function inputUsdPerMtok(model) {
|
|
29
|
+
if (typeof model !== 'string')
|
|
30
|
+
return null;
|
|
31
|
+
for (const [pattern, usd] of INPUT_USD_PER_MTOK)
|
|
32
|
+
if (pattern.test(model))
|
|
33
|
+
return usd;
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
/** Cache-write costs 1.25x list, a cache read a tenth of it. The multipliers are
|
|
37
|
+
* why a measured rate beats an assumed one: a session deep into a long
|
|
38
|
+
* conversation pays nearer $0.50/Mtok than the $5.00 its model lists at. */
|
|
39
|
+
const CACHE_CREATE_MULTIPLIER = 1.25;
|
|
40
|
+
const CACHE_READ_MULTIPLIER = 0.1;
|
|
41
|
+
/** Micro-dollars, so a running total stays an integer and never drifts. */
|
|
42
|
+
const MICROS_PER_USD = 1_000_000;
|
|
43
|
+
/** What this turn's input tokens cost, in micro-dollars, or null on a model we
|
|
44
|
+
* have no price for. */
|
|
45
|
+
export function turnInputCostMicros(usage) {
|
|
46
|
+
const list = inputUsdPerMtok(usage.model);
|
|
47
|
+
if (list === null)
|
|
48
|
+
return null;
|
|
49
|
+
const weighted = usage.input +
|
|
50
|
+
usage.cacheCreate * CACHE_CREATE_MULTIPLIER +
|
|
51
|
+
usage.cacheRead * CACHE_READ_MULTIPLIER;
|
|
52
|
+
return Math.round((weighted * list * MICROS_PER_USD) / 1_000_000);
|
|
53
|
+
}
|
|
54
|
+
/** Every input token this turn was billed for, cached or not — the denominator
|
|
55
|
+
* of the blended rate. */
|
|
56
|
+
export function turnInputTokens(usage) {
|
|
57
|
+
return usage.input + usage.cacheCreate + usage.cacheRead;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Dollars saved, at the rate the session has actually been paying.
|
|
61
|
+
*
|
|
62
|
+
* `costMicros / tokensBilled` is the blended price of one input token here —
|
|
63
|
+
* model and cache-hit ratio already folded in — so this re-blends as the
|
|
64
|
+
* session goes rather than freezing turn one's rate. Returns null when nothing
|
|
65
|
+
* has been sampled yet (turn one, or a host whose hooks name no transcript).
|
|
66
|
+
*/
|
|
67
|
+
export function dollarsSaved(savedTokens, costMicros, tokensBilled) {
|
|
68
|
+
if (!costMicros || !tokensBilled || savedTokens <= 0)
|
|
69
|
+
return null;
|
|
70
|
+
const usd = (savedTokens * (costMicros / tokensBilled)) / MICROS_PER_USD;
|
|
71
|
+
// Belt and braces against a non-finite accumulator reaching a rendered
|
|
72
|
+
// surface: "$NaN" on the statusline is worse than no dollar figure at all.
|
|
73
|
+
return Number.isFinite(usd) ? usd : null;
|
|
74
|
+
}
|
|
75
|
+
/** `$1.23`, or `<$0.01` for a real but sub-cent saving. Never `$0.00`: a
|
|
76
|
+
* rounded-to-nothing number reads as "julius saved you nothing", which is a
|
|
77
|
+
* different claim from "julius saved you less than a cent". */
|
|
78
|
+
export function formatDollars(usd) {
|
|
79
|
+
if (usd < 0.01)
|
|
80
|
+
return '<$0.01';
|
|
81
|
+
return `$${usd.toFixed(2)}`;
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=price.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"price.js","sourceRoot":"","sources":["../../src/context/price.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;0EAC0E;AAC1E,MAAM,kBAAkB,GAA6C;IACnE,CAAC,0BAA0B,EAAE,EAAE,CAAC;IACh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