@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,71 @@
|
|
|
1
|
+
import { INVESTIGATION_WORKFLOW } from './investigation-instructions.js';
|
|
2
|
+
import { juliusSpelling } from '../claude/skill-template.js';
|
|
3
|
+
function inName(text, name) {
|
|
4
|
+
return juliusSpelling(text);
|
|
5
|
+
}
|
|
6
|
+
export function instructionBody(name = 'julius') {
|
|
7
|
+
return inName(juliusBody(), name);
|
|
8
|
+
}
|
|
9
|
+
function juliusBody() {
|
|
10
|
+
return `## Julius — repo context graph
|
|
11
|
+
|
|
12
|
+
${INVESTIGATION_WORKFLOW}
|
|
13
|
+
|
|
14
|
+
This repo is indexed in \`julius/\`: small linked markdown nodes that explain each
|
|
15
|
+
system and carry exact file:line spans, kept in sync with the code through git.
|
|
16
|
+
|
|
17
|
+
For ANY task here — understanding how something works, finding where code lives,
|
|
18
|
+
or scoping a change — get context from the graph before grepping or opening
|
|
19
|
+
source files. Re-ask freely (it's cheap) and reuse literal identifiers you
|
|
20
|
+
already have (symbol, error string, file name) as the query. New to this repo?
|
|
21
|
+
Run \`julius map\` first — a token-budgeted orientation (dir clusters, hubs,
|
|
22
|
+
hotspots), no LLM, no key.
|
|
23
|
+
|
|
24
|
+
- Run \`julius ask "<your question>" --source\` → ranked nodes with the relevant
|
|
25
|
+
code spans inlined (each hit's ≤8-line crux by default; \`--full\` for whole
|
|
26
|
+
definitions when the crux isn't enough). Match the tool to the task shape:
|
|
27
|
+
for understanding or editing, the top node IS the answer — cite its
|
|
28
|
+
\`covers:\` file:line spans and edit straight from \`--source\`. For
|
|
29
|
+
exhaustive tasks ("every occurrence / every caller of this pattern"), ranked
|
|
30
|
+
results are top-N, not complete — run \`julius grep "<literal>"\` instead
|
|
31
|
+
(exhaustive over indexed files, grouped by enclosing symbol), falling back
|
|
32
|
+
to raw \`grep -rn\` only for unindexed files.
|
|
33
|
+
- \`julius skeleton <file>\` → every definition's signature + span, ~10× cheaper
|
|
34
|
+
than reading the file; use it to skim an API surface.
|
|
35
|
+
- \`julius callers <symbol>\` gives precomputed, exact edges — who calls this.
|
|
36
|
+
Add \`--direction out\` for what it calls, or \`--depth N\` to walk
|
|
37
|
+
transitively for the full blast radius. For structural questions, skip
|
|
38
|
+
ranking and use this directly.
|
|
39
|
+
- Or browse: \`julius/INDEX.md\` lists every node; follow the links.
|
|
40
|
+
- Monorepos and folders of multiple repos rank fairly across sub-projects —
|
|
41
|
+
hits carry \`[scope/]\` labels naming which one they're from. Narrow with
|
|
42
|
+
\`julius ask "<task>" --in <scope>/\` once you know where you're working.
|
|
43
|
+
|
|
44
|
+
If a returned span is truncated ("+N more lines"), open the file at that exact
|
|
45
|
+
range before finalizing. Only open source files when a node genuinely lacks a
|
|
46
|
+
needed detail, and then at the exact file:line the node points to — never
|
|
47
|
+
re-read whole files.
|
|
48
|
+
|
|
49
|
+
After big code changes, refresh the graph with \`julius build\` (deterministic,
|
|
50
|
+
no API key, $0).`;
|
|
51
|
+
}
|
|
52
|
+
export function cursorRule(name = 'julius') {
|
|
53
|
+
return inName(`---
|
|
54
|
+
description: Use the Julius context graph in julius/ before exploring source
|
|
55
|
+
alwaysApply: true
|
|
56
|
+
---
|
|
57
|
+
${juliusBody()}
|
|
58
|
+
`, name);
|
|
59
|
+
}
|
|
60
|
+
export function kiroSteering(name = 'julius') {
|
|
61
|
+
return inName(`---
|
|
62
|
+
inclusion: always
|
|
63
|
+
---
|
|
64
|
+
${juliusBody()}
|
|
65
|
+
`, name);
|
|
66
|
+
}
|
|
67
|
+
export function windsurfRule(name = 'julius') {
|
|
68
|
+
return inName(`${juliusBody()}
|
|
69
|
+
`, name);
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=instructions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../src/hosts/instructions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAGzE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D,SAAS,MAAM,CAAC,IAAY,EAAE,IAAW;IACvC,OAAO,cAAc,CAAC,IAAI,CAAC,CAAC;AAC9B,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,IAAI,GAAU,QAAQ;IACpD,OAAO,MAAM,CAAC,UAAU,EAAE,EAAE,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,UAAU;IACjB,OAAO;;EAEP,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAsCP,CAAC;AAClB,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,IAAI,GAAU,QAAQ;IAC/C,OAAO,MAAM,CAAC;;;;EAId,UAAU,EAAE;CACb,EAAE,IAAI,CAAC,CAAC;AACT,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,IAAI,GAAU,QAAQ;IACjD,OAAO,MAAM,CAAC;;;EAGd,UAAU,EAAE;CACb,EAAE,IAAI,CAAC,CAAC;AACT,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,IAAI,GAAU,QAAQ;IACjD,OAAO,MAAM,CAAC,GAAG,UAAU,EAAE;CAC9B,EAAE,IAAI,CAAC,CAAC;AACT,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const INVESTIGATION_WORKFLOW = "Use Julius MCP during normal conversation: discover investigation.execute, then julius_call with change-impact (exact paths) or failure-localization (literal diagnostic). Use focus for a required literal; delivery complete without budget returns all captured bytes. Recover through context.read at next.start or with search. match false means no literal matched. Graph creation and freshness are automatic; never ask the user to run Julius commands or slash commands. Inspect uncertainty and omissions; use source tools when needed. These MCP instructions take precedence over CLI examples below; CLI is an agent-operated fallback.";
|
|
2
|
+
//# sourceMappingURL=investigation-instructions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"investigation-instructions.d.ts","sourceRoot":"","sources":["../../src/hosts/investigation-instructions.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,4nBAA4nB,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export const INVESTIGATION_WORKFLOW = `Use Julius MCP during normal conversation: discover investigation.execute, then julius_call with change-impact (exact paths) or failure-localization (literal diagnostic). Use focus for a required literal; delivery complete without budget returns all captured bytes. Recover through context.read at next.start or with search. match false means no literal matched. Graph creation and freshness are automatic; never ask the user to run Julius commands or slash commands. Inspect uncertainty and omissions; use source tools when needed. These MCP instructions take precedence over CLI examples below; CLI is an agent-operated fallback.`;
|
|
2
|
+
//# sourceMappingURL=investigation-instructions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"investigation-instructions.js","sourceRoot":"","sources":["../../src/hosts/investigation-instructions.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,sBAAsB,GAAG,ynBAAynB,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { PlannedWrite } from './plan.js';
|
|
2
|
+
import { type ConfigWrite } from './config-write.js';
|
|
3
|
+
import { type Brand } from '../brand.js';
|
|
4
|
+
/** MCP registration reports the same write-result record every installer does. */
|
|
5
|
+
export type McpWrite = ConfigWrite;
|
|
6
|
+
/** A planned MCP write, plus the detail needed to actually perform it. */
|
|
7
|
+
export interface McpTarget extends PlannedWrite {
|
|
8
|
+
format: 'json' | 'toml';
|
|
9
|
+
/** JSON only: the top-level key holding the server map. */
|
|
10
|
+
topKey?: string;
|
|
11
|
+
/** JSON only: the server entry to merge in under `key`. */
|
|
12
|
+
entry?: object;
|
|
13
|
+
/** The server's name in the file: `julius`, or `julius` in a repo that uses julius. */
|
|
14
|
+
key: Brand;
|
|
15
|
+
}
|
|
16
|
+
export declare function serverEntry(opts?: {
|
|
17
|
+
onPath?: boolean;
|
|
18
|
+
brand?: Brand;
|
|
19
|
+
}): {
|
|
20
|
+
command: string;
|
|
21
|
+
args: string[];
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* `key` is the server's name in the file (`julius`, or `julius` in a repo that
|
|
25
|
+
* uses julius); `drop` names entries this write replaces, so a repo moving to
|
|
26
|
+
* julius doesn't start the same server twice.
|
|
27
|
+
*/
|
|
28
|
+
export declare function mergeJsonKey(id: string, path: string, topKey: string, entry: object, key?: string, drop?: string[]): McpWrite;
|
|
29
|
+
/**
|
|
30
|
+
* Remove the `[mcp_servers.julius]` table (or `name`'s) from a TOML config, returning the rest.
|
|
31
|
+
*
|
|
32
|
+
* Line-based on purpose: a real parse-and-reserialize would reformat the user's
|
|
33
|
+
* whole file. The table runs from its header to the next `[`-header or EOF, which
|
|
34
|
+
* is exactly the shape {@link upsertCodexToml} appends. Exported so the writer and
|
|
35
|
+
* `retract.ts` can never disagree about what "julius's section" means.
|
|
36
|
+
*/
|
|
37
|
+
export declare function stripTomlSection(text: string, name?: Brand): {
|
|
38
|
+
rest: string;
|
|
39
|
+
found: boolean;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* The MCP config files selecting these hosts would touch — pure, no writes.
|
|
43
|
+
* Codex's target is the user-level `~/.codex/config.toml`, so it is scoped
|
|
44
|
+
* 'global': registering there affects every project on the machine.
|
|
45
|
+
*
|
|
46
|
+
* `name` is the repo's name for the tool: under julius the server is `julius`,
|
|
47
|
+
* launched as `julius mcp` (or `npx -y @ruverd/julius mcp`). The files
|
|
48
|
+
* are the same either way.
|
|
49
|
+
*/
|
|
50
|
+
export declare function mcpTargets(repo: string, ids: string[], opts?: {
|
|
51
|
+
home?: string;
|
|
52
|
+
name?: Brand;
|
|
53
|
+
}): McpTarget[];
|
|
54
|
+
export declare function registerMcpConfigs(repo: string, ids: string[], opts?: {
|
|
55
|
+
home?: string;
|
|
56
|
+
global?: boolean;
|
|
57
|
+
name?: Brand;
|
|
58
|
+
}): McpWrite[];
|
|
59
|
+
//# sourceMappingURL=mcp-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-config.d.ts","sourceRoot":"","sources":["../../src/hosts/mcp-config.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAkB,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,EAAgB,KAAK,KAAK,EAAE,MAAM,aAAa,CAAC;AAEvD,kFAAkF;AAClF,MAAM,MAAM,QAAQ,GAAG,WAAW,CAAC;AAEnC,0EAA0E;AAC1E,MAAM,WAAW,SAAU,SAAQ,YAAY;IAC7C,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,2DAA2D;IAC3D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,2DAA2D;IAC3D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uFAAuF;IACvF,GAAG,EAAE,KAAK,CAAC;CACZ;AAqBD,wBAAgB,WAAW,CAAC,IAAI,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CAAO,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,CAI/G;AAYD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,SAAW,EAAE,IAAI,GAAE,MAAM,EAAO,GAAG,QAAQ,CAgBnI;AAOD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,KAAgB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CAYvG;AAiDD;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CACxB,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,EAAE,EACb,IAAI,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,KAAK,CAAA;CAAO,GACzC,SAAS,EAAE,CAqDb;AAoBD,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,EAAE,EACb,IAAI,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,KAAK,CAAA;CAAO,GAC3D,QAAQ,EAAE,CAUZ"}
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Register the julius MCP server in each host's config.
|
|
3
|
+
* JSON hosts get a keyed merge (other servers preserved; unparseable files
|
|
4
|
+
* are never rewritten). The TOML host gets an append-if-absent section.
|
|
5
|
+
*
|
|
6
|
+
* `mcpTargets()` is the pure "which files would this touch" half, so `julius
|
|
7
|
+
* init --dry-run` and the picker can report paths without writing;
|
|
8
|
+
* `registerMcpConfigs()` walks that same list to do the writing.
|
|
9
|
+
*/
|
|
10
|
+
import { readFileSync, writeFileSync, mkdirSync, existsSync, statSync } from 'node:fs';
|
|
11
|
+
import { dirname, join } from 'node:path';
|
|
12
|
+
import { homedir } from 'node:os';
|
|
13
|
+
import { readJsonObject } from './config-write.js';
|
|
14
|
+
import { juliusOnPath } from '../brand.js';
|
|
15
|
+
/**
|
|
16
|
+
* How to launch the MCP server, decided once at init time.
|
|
17
|
+
*
|
|
18
|
+
* `npx -y` resolves the package before it can serve: measured at a 211 ms
|
|
19
|
+
* spawn→`initialize` handshake against 80 ms for the installed binary, five runs
|
|
20
|
+
* each. The harness registers a server's tools only once that handshake lands, and
|
|
21
|
+
* a slow one can miss the first request entirely — in a traced session julius's
|
|
22
|
+
* tools arrived 13.9 s in, four model turns too late to shape the approach. (That
|
|
23
|
+
* 13.9 s is NOT explained by 130 ms; the gap's cause is still unknown. This is the
|
|
24
|
+
* cheap half of the fix, not the whole of it.)
|
|
25
|
+
*
|
|
26
|
+
* Deliberately a bare command name, never an absolute path: these files get
|
|
27
|
+
* committed and shared, and this repo carried the scar of the alternative — a
|
|
28
|
+
* checked-in hook shim with another machine's home directory baked into it. A
|
|
29
|
+
* bare `julius` works on any machine that has it installed; `npx` remains the
|
|
30
|
+
* fallback for machines that don't.
|
|
31
|
+
*/
|
|
32
|
+
const NPX_LAUNCH = { command: 'npx', args: ['-y', '@ruverd/julius', 'mcp'] };
|
|
33
|
+
const BIN_LAUNCH = { command: 'julius', args: ['mcp'] };
|
|
34
|
+
export function serverEntry(opts = {}) {
|
|
35
|
+
const forced = process.env.JULIUS_MCP_NPX;
|
|
36
|
+
if (forced !== undefined && forced !== '' && forced !== '0' && forced !== 'false')
|
|
37
|
+
return NPX_LAUNCH;
|
|
38
|
+
return (opts.onPath ?? juliusOnPath()) ? BIN_LAUNCH : NPX_LAUNCH;
|
|
39
|
+
}
|
|
40
|
+
function opencodeEntry(name = 'julius') {
|
|
41
|
+
const { command, args } = serverEntry({ brand: name });
|
|
42
|
+
return { type: 'local', command: [command, ...args], enabled: true };
|
|
43
|
+
}
|
|
44
|
+
function dirExists(p) {
|
|
45
|
+
try {
|
|
46
|
+
return statSync(p).isDirectory();
|
|
47
|
+
}
|
|
48
|
+
catch {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* `key` is the server's name in the file (`julius`, or `julius` in a repo that
|
|
54
|
+
* uses julius); `drop` names entries this write replaces, so a repo moving to
|
|
55
|
+
* julius doesn't start the same server twice.
|
|
56
|
+
*/
|
|
57
|
+
export function mergeJsonKey(id, path, topKey, entry, key = 'julius', drop = []) {
|
|
58
|
+
const loaded = readJsonObject(path);
|
|
59
|
+
if (loaded === 'unparseable')
|
|
60
|
+
return { id, path, action: 'skipped-unparseable' };
|
|
61
|
+
const { root, existed } = loaded;
|
|
62
|
+
const bucket = (root[topKey] ??= {});
|
|
63
|
+
if (typeof bucket !== 'object' || bucket === null || Array.isArray(bucket)) {
|
|
64
|
+
return { id, path, action: 'skipped-unparseable' };
|
|
65
|
+
}
|
|
66
|
+
const dropping = drop.filter((k) => k !== key && k in bucket);
|
|
67
|
+
if (JSON.stringify(bucket[key]) === JSON.stringify(entry) && dropping.length === 0)
|
|
68
|
+
return { id, path, action: 'unchanged' };
|
|
69
|
+
const action = existed ? 'updated' : 'created';
|
|
70
|
+
for (const k of dropping)
|
|
71
|
+
delete bucket[k];
|
|
72
|
+
bucket[key] = entry;
|
|
73
|
+
mkdirSync(dirname(path), { recursive: true });
|
|
74
|
+
writeFileSync(path, `${JSON.stringify(root, null, 2)}\n`);
|
|
75
|
+
return { id, path, action };
|
|
76
|
+
}
|
|
77
|
+
/** The `[mcp_servers.julius]` (or `.julius`) table header, as written and as matched. */
|
|
78
|
+
function tomlHeader(name) {
|
|
79
|
+
return `[mcp_servers.${name}]`;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Remove the `[mcp_servers.julius]` table (or `name`'s) from a TOML config, returning the rest.
|
|
83
|
+
*
|
|
84
|
+
* Line-based on purpose: a real parse-and-reserialize would reformat the user's
|
|
85
|
+
* whole file. The table runs from its header to the next `[`-header or EOF, which
|
|
86
|
+
* is exactly the shape {@link upsertCodexToml} appends. Exported so the writer and
|
|
87
|
+
* `retract.ts` can never disagree about what "julius's section" means.
|
|
88
|
+
*/
|
|
89
|
+
export function stripTomlSection(text, name = 'julius') {
|
|
90
|
+
const lines = text.split('\n');
|
|
91
|
+
const header = tomlHeader(name);
|
|
92
|
+
const start = lines.findIndex((l) => l.trim() === header);
|
|
93
|
+
if (start === -1)
|
|
94
|
+
return { rest: text, found: false };
|
|
95
|
+
let end = start + 1;
|
|
96
|
+
while (end < lines.length && !lines[end].trimStart().startsWith('['))
|
|
97
|
+
end++;
|
|
98
|
+
const rest = [...lines.slice(0, start), ...lines.slice(end)]
|
|
99
|
+
.join('\n')
|
|
100
|
+
.replace(/\n{3,}/g, '\n\n')
|
|
101
|
+
.replace(/^\n+/, '');
|
|
102
|
+
return { rest, found: true };
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Register julius in a TOML config, replacing any section a previous version left.
|
|
106
|
+
*
|
|
107
|
+
* The old behaviour was to skip entirely once the header existed, which froze the
|
|
108
|
+
* launch command at whatever the first init wrote: a repo wired when julius wasn't
|
|
109
|
+
* on PATH kept the slow `npx` form forever, and no upgrade could correct it. Strip
|
|
110
|
+
* and re-append instead, so this converges like every other writer — foreign
|
|
111
|
+
* tables are untouched either way.
|
|
112
|
+
*/
|
|
113
|
+
function upsertCodexToml(id, path, name = 'julius') {
|
|
114
|
+
const existed = existsSync(path);
|
|
115
|
+
const text = existed ? readFileSync(path, 'utf8') : '';
|
|
116
|
+
const { command, args } = serverEntry({ brand: name });
|
|
117
|
+
const argList = args.map((a) => JSON.stringify(a)).join(", ");
|
|
118
|
+
const section = `${tomlHeader(name)}\ncommand = \"${command}\"\nargs = [${argList}]\n`;
|
|
119
|
+
const own = stripTomlSection(text, name);
|
|
120
|
+
// Under julius, julius's table goes: the same server, listed once.
|
|
121
|
+
const { rest } = own;
|
|
122
|
+
const found = own.found;
|
|
123
|
+
// Byte-identical already: don't rewrite the file just to reorder it.
|
|
124
|
+
if (found && text === appendSection(rest, section))
|
|
125
|
+
return { id, path, action: 'unchanged' };
|
|
126
|
+
mkdirSync(dirname(path), { recursive: true });
|
|
127
|
+
writeFileSync(path, appendSection(rest, section));
|
|
128
|
+
return { id, path, action: existed ? 'updated' : 'created' };
|
|
129
|
+
}
|
|
130
|
+
/** Append a section after exactly one blank line, or at the top of an empty file. */
|
|
131
|
+
function appendSection(text, section) {
|
|
132
|
+
if (text.trim() === '')
|
|
133
|
+
return section;
|
|
134
|
+
const sep = text.endsWith('\n\n') ? '' : text.endsWith('\n') ? '\n' : '\n\n';
|
|
135
|
+
return `${text}${sep}${section}`;
|
|
136
|
+
}
|
|
137
|
+
function jsonTarget(hostId, id, path, topKey, entry, scope = 'repo', key = 'julius') {
|
|
138
|
+
return { hostId, id, path, scope, kind: 'mcp', what: `${topKey}.${key}`, format: 'json', topKey, entry, key };
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* The MCP config files selecting these hosts would touch — pure, no writes.
|
|
142
|
+
* Codex's target is the user-level `~/.codex/config.toml`, so it is scoped
|
|
143
|
+
* 'global': registering there affects every project on the machine.
|
|
144
|
+
*
|
|
145
|
+
* `name` is the repo's name for the tool: under julius the server is `julius`,
|
|
146
|
+
* launched as `julius mcp` (or `npx -y @ruverd/julius mcp`). The files
|
|
147
|
+
* are the same either way.
|
|
148
|
+
*/
|
|
149
|
+
export function mcpTargets(repo, ids, opts = {}) {
|
|
150
|
+
const home = opts.home ?? homedir();
|
|
151
|
+
const name = opts.name ?? 'julius';
|
|
152
|
+
const entry = serverEntry({ brand: name });
|
|
153
|
+
const json = (hostId, id, path, topKey, e, scope = 'repo') => jsonTarget(hostId, id, path, topKey, e, scope, name);
|
|
154
|
+
const out = [];
|
|
155
|
+
for (const id of ids) {
|
|
156
|
+
switch (id) {
|
|
157
|
+
case 'cursor':
|
|
158
|
+
out.push(json(id, id, join(repo, '.cursor', 'mcp.json'), 'mcpServers', entry));
|
|
159
|
+
break;
|
|
160
|
+
case 'gemini':
|
|
161
|
+
out.push(json(id, id, join(repo, '.gemini', 'settings.json'), 'mcpServers', entry));
|
|
162
|
+
break;
|
|
163
|
+
case 'antigravity':
|
|
164
|
+
// Antigravity reads MCP from its OWN registry, separate from Gemini CLI's
|
|
165
|
+
// `.gemini/settings.json` — a global `~/.gemini/config/mcp_config.json` (the
|
|
166
|
+
// gap #62 reported). Standard `{command,args}` under `mcpServers`. Global
|
|
167
|
+
// scope: it applies to every workspace opened in Antigravity.
|
|
168
|
+
out.push(json(id, 'antigravity', join(home, '.gemini', 'config', 'mcp_config.json'), 'mcpServers', entry, 'global'));
|
|
169
|
+
break;
|
|
170
|
+
case 'kiro':
|
|
171
|
+
out.push(json(id, id, join(repo, '.kiro', 'settings', 'mcp.json'), 'mcpServers', entry));
|
|
172
|
+
break;
|
|
173
|
+
case 'grok':
|
|
174
|
+
// Grok reads MCP from repo-level `.grok/config.toml` (`[mcp_servers.<name>]`),
|
|
175
|
+
// the same TOML shape Codex uses at ~/.codex/config.toml.
|
|
176
|
+
out.push({
|
|
177
|
+
hostId: id, id: 'grok', path: join(repo, '.grok', 'config.toml'),
|
|
178
|
+
scope: 'repo', kind: 'mcp', what: tomlHeader(name), format: 'toml', key: name,
|
|
179
|
+
});
|
|
180
|
+
break;
|
|
181
|
+
case 'agents':
|
|
182
|
+
// Guarded on the CLI actually being installed, so a plan only ever
|
|
183
|
+
// lists files a real run would touch.
|
|
184
|
+
if (dirExists(join(home, '.codex'))) {
|
|
185
|
+
out.push({
|
|
186
|
+
hostId: id, id: 'codex', path: join(home, '.codex', 'config.toml'),
|
|
187
|
+
scope: 'global', kind: 'mcp', what: tomlHeader(name), format: 'toml', key: name,
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
if (dirExists(join(home, '.config', 'opencode'))) {
|
|
191
|
+
out.push(json(id, 'opencode', join(repo, 'opencode.json'), 'mcp', opencodeEntry(name)));
|
|
192
|
+
}
|
|
193
|
+
break;
|
|
194
|
+
default:
|
|
195
|
+
break; // copilot / windsurf / adal: no MCP target in this phase
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
return out;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Whether a machine-wide config already runs the server under julius's name.
|
|
202
|
+
* Every repo on the machine reads it, and `julius mcp` serves a repo still on
|
|
203
|
+
* julius too, so a julius repo leaves it alone rather than list the server twice.
|
|
204
|
+
*/
|
|
205
|
+
function juliusServerIn(t) {
|
|
206
|
+
if (t.format === 'toml') {
|
|
207
|
+
try {
|
|
208
|
+
return stripTomlSection(readFileSync(t.path, 'utf8'), 'julius').found;
|
|
209
|
+
}
|
|
210
|
+
catch {
|
|
211
|
+
return false;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
const loaded = readJsonObject(t.path);
|
|
215
|
+
const bucket = loaded === 'unparseable' ? undefined : loaded.root[t.topKey];
|
|
216
|
+
return typeof bucket === 'object' && bucket !== null && !Array.isArray(bucket) && 'julius' in bucket;
|
|
217
|
+
}
|
|
218
|
+
export function registerMcpConfigs(repo, ids, opts = {}) {
|
|
219
|
+
const name = opts.name ?? 'julius';
|
|
220
|
+
return mcpTargets(repo, ids, opts)
|
|
221
|
+
.filter((t) => opts.global !== false || t.scope !== 'global')
|
|
222
|
+
.map((t) => {
|
|
223
|
+
;
|
|
224
|
+
return t.format === 'toml'
|
|
225
|
+
? upsertCodexToml(t.id, t.path, name)
|
|
226
|
+
: mergeJsonKey(t.id, t.path, t.topKey, t.entry, name);
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
//# sourceMappingURL=mcp-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-config.js","sourceRoot":"","sources":["../../src/hosts/mcp-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE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AI,CAAC,CAAC;IAC5D,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/** Where a write lands. 'global' = outside the repo, affects every project. */
|
|
2
|
+
export type WriteScope = 'repo' | 'global';
|
|
3
|
+
export interface PlannedWrite {
|
|
4
|
+
/** The selectable host this write belongs to ('claude', 'agents', 'cursor', …). */
|
|
5
|
+
hostId: string;
|
|
6
|
+
/** Reporting id — differs from hostId where one host writes several configs
|
|
7
|
+
* (the 'agents' host covers both 'codex' and 'opencode'). */
|
|
8
|
+
id: string;
|
|
9
|
+
path: string;
|
|
10
|
+
scope: WriteScope;
|
|
11
|
+
kind: 'instruction' | 'mcp' | 'hook' | 'claude' | 'skill';
|
|
12
|
+
/** Short human label for what changes in that file. */
|
|
13
|
+
what: string;
|
|
14
|
+
}
|
|
15
|
+
export interface HostPlan {
|
|
16
|
+
id: string;
|
|
17
|
+
name: string;
|
|
18
|
+
detected: boolean;
|
|
19
|
+
writes: PlannedWrite[];
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Every host julius can wire, each with the full set of files selecting it would
|
|
23
|
+
* touch. Claude Code comes first — it's the deep integration and the picker's
|
|
24
|
+
* default. `ids`, when given, restricts the plan to those hosts.
|
|
25
|
+
*/
|
|
26
|
+
export declare function planInit(repo: string, opts?: {
|
|
27
|
+
home?: string;
|
|
28
|
+
ids?: string[];
|
|
29
|
+
}): HostPlan[];
|
|
30
|
+
/** Flatten a plan down to the writes for the selected host ids. */
|
|
31
|
+
export declare function selectedWrites(plan: HostPlan[], ids: string[]): PlannedWrite[];
|
|
32
|
+
//# sourceMappingURL=plan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../src/hosts/plan.ts"],"names":[],"mappings":"AAqBA,+EAA+E;AAC/E,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,QAAQ,CAAC;AAE3C,MAAM,WAAW,YAAY;IAC3B,mFAAmF;IACnF,MAAM,EAAE,MAAM,CAAC;IACf;kEAC8D;IAC9D,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,UAAU,CAAC;IAClB,IAAI,EAAE,aAAa,GAAG,KAAK,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC1D,uDAAuD;IACvD,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,YAAY,EAAE,CAAC;CACxB;AAqBD;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,EAAE,CAAA;CAAO,GAAG,QAAQ,EAAE,CA0B/F;AAED,mEAAmE;AACnE,wBAAgB,cAAc,CAAC,IAAI,EAAE,QAAQ,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,YAAY,EAAE,CAE9E"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What `julius init` *would* write, computed before anything is written.
|
|
3
|
+
*
|
|
4
|
+
* The picker and `--dry-run` both need the exact path list up front, so every
|
|
5
|
+
* writer in the init path (instruction files, MCP configs, hooks, the Claude
|
|
6
|
+
* Code layer) exposes a pure `*Targets()` function and then consumes that same
|
|
7
|
+
* list to do its writing. One source of truth, so a plan can never drift from
|
|
8
|
+
* what a real run touches.
|
|
9
|
+
*/
|
|
10
|
+
import { join } from 'node:path';
|
|
11
|
+
import { homedir } from 'node:os';
|
|
12
|
+
import { statSync } from 'node:fs';
|
|
13
|
+
import { HOSTS, detectHosts, hostRelPath, hostWiringName } from './registry.js';
|
|
14
|
+
import { mcpTargets } from './mcp-config.js';
|
|
15
|
+
import { hookTargets } from './codex-hooks.js';
|
|
16
|
+
import { cursorHookTargets } from './cursor-hooks.js';
|
|
17
|
+
import { antigravitySkillTargets } from './antigravity.js';
|
|
18
|
+
import { claudeTargetsFor } from '../claude/init.js';
|
|
19
|
+
import { brand } from '../brand.js';
|
|
20
|
+
import { claudeGlobalTargets } from './claude-global.js';
|
|
21
|
+
function probeFor(home, repo) {
|
|
22
|
+
return {
|
|
23
|
+
home, repo,
|
|
24
|
+
dirExists: (p) => { try {
|
|
25
|
+
return statSync(p).isDirectory();
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
return false;
|
|
29
|
+
} },
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/** The instruction-file write for one host, derived from its registry entry. */
|
|
33
|
+
function instructionTarget(repo, host, name) {
|
|
34
|
+
return {
|
|
35
|
+
hostId: host.id,
|
|
36
|
+
id: host.id,
|
|
37
|
+
path: join(repo, hostRelPath(host, name)),
|
|
38
|
+
scope: 'repo',
|
|
39
|
+
kind: 'instruction',
|
|
40
|
+
what: host.kind === 'owned' ? `${name}-owned file` : `fenced ${name} section`,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Every host julius can wire, each with the full set of files selecting it would
|
|
45
|
+
* touch. Claude Code comes first — it's the deep integration and the picker's
|
|
46
|
+
* default. `ids`, when given, restricts the plan to those hosts.
|
|
47
|
+
*/
|
|
48
|
+
export function planInit(repo, opts = {}) {
|
|
49
|
+
const home = opts.home ?? homedir();
|
|
50
|
+
const probe = probeFor(home, repo);
|
|
51
|
+
const detected = new Set(detectHosts(probe).map((h) => h.id));
|
|
52
|
+
const name = hostWiringName(repo, brand());
|
|
53
|
+
const plans = [
|
|
54
|
+
// Repo writes plus the user-level copy under `~/.claude` — the picker and
|
|
55
|
+
// `--dry-run` render 'global' writes in their own section, so a user sees
|
|
56
|
+
// what lands outside the repo before agreeing to it.
|
|
57
|
+
{ id: 'claude', name: 'Claude Code', detected: true, writes: [...claudeTargetsFor(repo, brand(), home), ...claudeGlobalTargets(home, brand())] },
|
|
58
|
+
...HOSTS.map((host) => ({
|
|
59
|
+
id: host.id,
|
|
60
|
+
name: host.name,
|
|
61
|
+
detected: detected.has(host.id),
|
|
62
|
+
writes: [
|
|
63
|
+
instructionTarget(repo, host, name),
|
|
64
|
+
...mcpTargets(repo, [host.id], { home, name }),
|
|
65
|
+
...(host.id === 'agents' ? hookTargets(home) : []),
|
|
66
|
+
...(host.id === 'cursor' ? cursorHookTargets(repo, name) : []),
|
|
67
|
+
...(host.id === 'antigravity' ? antigravitySkillTargets(home, name) : []),
|
|
68
|
+
],
|
|
69
|
+
})),
|
|
70
|
+
];
|
|
71
|
+
return opts.ids ? plans.filter((p) => opts.ids.includes(p.id)) : plans;
|
|
72
|
+
}
|
|
73
|
+
/** Flatten a plan down to the writes for the selected host ids. */
|
|
74
|
+
export function selectedWrites(plan, ids) {
|
|
75
|
+
return plan.filter((p) => ids.includes(p.id)).flatMap((p) => p.writes);
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=plan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan.js","sourceRoot":"","sources":["../../src/hosts/plan.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAqC,MAAM,eAAe,CAAC;AACnH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAE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CAAC;KACJ,CAAC;IAEF,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;AAC1E,CAAC;AAED,mEAAmE;AACnE,MAAM,UAAU,cAAc,CAAC,IAAgB,EAAE,GAAa;IAC5D,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;AACzE,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type Brand } from '../brand.js';
|
|
2
|
+
export interface DetectProbe {
|
|
3
|
+
home: string;
|
|
4
|
+
repo: string;
|
|
5
|
+
dirExists(path: string): boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface HostTarget {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
kind: 'section' | 'owned';
|
|
11
|
+
/** Target file, relative to the repo root, under julius's names (see `hostRelPath`). */
|
|
12
|
+
relPath: string;
|
|
13
|
+
/** The text, in the spelling of the repo's name for the tool. */
|
|
14
|
+
content(name?: Brand): string;
|
|
15
|
+
detect(probe: DetectProbe): boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare const HOSTS: HostTarget[];
|
|
18
|
+
export declare function hostIds(): string[];
|
|
19
|
+
export declare function detectHosts(probe: DetectProbe): HostTarget[];
|
|
20
|
+
/**
|
|
21
|
+
* A host's file under `name`. A file the tool owns carries its name, like
|
|
22
|
+
* Claude Code's skill and shims do (`.cursor/rules/julius.mdc`,
|
|
23
|
+
* `.adal/skills/julius/SKILL.md`); a shared file is the same file either way.
|
|
24
|
+
*/
|
|
25
|
+
export declare function hostRelPath(host: HostTarget, name: Brand): string;
|
|
26
|
+
/** Cursor's hooks shim is repo-local, so it carries the repo's name too. */
|
|
27
|
+
export declare function cursorHookShimRelPath(name: Brand): string;
|
|
28
|
+
/**
|
|
29
|
+
* Whether another agent's files in `repo` are already under julius's names: a
|
|
30
|
+
* julius-named file, or a shared file holding julius's block.
|
|
31
|
+
*/
|
|
32
|
+
export declare function hostsWiredForJulius(repo: string): boolean;
|
|
33
|
+
/** The single identity used for host wiring. */
|
|
34
|
+
export declare function hostWiringName(repo: string, initBrand?: Brand): Brand;
|
|
35
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/hosts/registry.ts"],"names":[],"mappings":"AAaA,OAAO,EAAsB,KAAK,KAAK,EAAE,MAAM,aAAa,CAAC;AAE7D,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;CAClC;AAED,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC;IAC1B,wFAAwF;IACxF,OAAO,EAAE,MAAM,CAAC;IAChB,iEAAiE;IACjE,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAC9B,MAAM,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC;CACrC;AAED,eAAO,MAAM,KAAK,EAAE,UAAU,EA+F7B,CAAC;AAEF,wBAAgB,OAAO,IAAI,MAAM,EAAE,CAElC;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,WAAW,GAAG,UAAU,EAAE,CAE5D;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,GAAG,MAAM,CAEjE;AAED,4EAA4E;AAC5E,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,KAAK,GAAG,MAAM,CAEzD;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAkBzD;AAED,gDAAgD;AAChD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,KAAK,GAAG,KAAK,CAErE"}
|