@automaton-labs/aib 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -257
- package/config/agent-dx-policy.default.json +31 -0
- package/config/control-plane-client.default.json +3 -0
- package/dist/agent-dx/agent-dx.js +805 -0
- package/dist/agent-dx/presentation.js +32 -0
- package/dist/alias-advisor/analyze.js +982 -0
- package/dist/alias-advisor/exact-text-cost.js +74 -0
- package/dist/alias-advisor/lexical.js +240 -0
- package/dist/alias-advisor/model.js +2 -0
- package/dist/alias-advisor/path-identity.js +49 -0
- package/dist/alias-advisor/ranking.js +171 -0
- package/dist/alias-advisor/token-estimator.js +85 -0
- package/dist/bin/aib.js +5 -1
- package/dist/bin/cli.js +811 -2
- package/dist/commands/add-missing-imports-preview-cache.js +99 -2
- package/dist/commands/add-missing-imports.js +241 -2
- package/dist/commands/apply-module-plan.js +1319 -3
- package/dist/commands/background-command.js +378 -0
- package/dist/commands/captured-input.js +74 -2
- package/dist/commands/config-command.js +314 -2
- package/dist/commands/config-output.js +357 -10
- package/dist/commands/control-plane-command.js +183 -0
- package/dist/commands/declaration-command.js +1209 -0
- package/dist/commands/declaration-execution-cache.js +79 -0
- package/dist/commands/declaration-format.js +221 -0
- package/dist/commands/declaration-preview-cache.js +114 -0
- package/dist/commands/diagnostics-command.js +70 -3
- package/dist/commands/doctor.js +137 -2
- package/dist/commands/execution-command.js +117 -1
- package/dist/commands/exports-star-collapse-command.js +178 -0
- package/dist/commands/exports-star-command.js +252 -0
- package/dist/commands/exports-star-preview-cache.js +84 -0
- package/dist/commands/feedback-command.js +176 -3
- package/dist/commands/file-move-to-dir-execution-cache.js +92 -0
- package/dist/commands/file-move-to-dir-preview-cache.js +125 -0
- package/dist/commands/file-move-to-dir-worker.js +54 -0
- package/dist/commands/file-move-to-dir.js +1073 -0
- package/dist/commands/file-mutation-runtime.js +102 -0
- package/dist/commands/file-mutation-worker-apply.js +180 -0
- package/dist/commands/file-refactor-batch-execution-cache.js +90 -0
- package/dist/commands/file-refactor-batch-preview-cache.js +125 -0
- package/dist/commands/file-refactor-batch-worker.js +54 -0
- package/dist/commands/file-refactor-batch.js +1154 -0
- package/dist/commands/file-rename-execution-cache.js +92 -0
- package/dist/commands/file-rename-preview-cache.js +125 -0
- package/dist/commands/file-rename-worker.js +54 -0
- package/dist/commands/file-rename.js +1053 -0
- package/dist/commands/file-text-edit-executor.js +205 -0
- package/dist/commands/find-importers.js +52 -1
- package/dist/commands/find-unused-imports.js +55 -1
- package/dist/commands/generate-docs-command.js +244 -6
- package/dist/commands/help-command.js +460 -7
- package/dist/commands/import-specifier-policy.js +391 -0
- package/dist/commands/imports-command.js +68 -1
- package/dist/commands/imports-rebase.js +1138 -0
- package/dist/commands/init-skill-usage.js +92 -3
- package/dist/commands/init-workspace.js +30 -1
- package/dist/commands/inspect-alias-candidates.js +413 -0
- package/dist/commands/inspect-cycles.js +811 -5
- package/dist/commands/inspect-direct-usages.js +98 -0
- package/dist/commands/inspect-duplicates-format.js +229 -0
- package/dist/commands/inspect-format-primitives.js +127 -0
- package/dist/commands/inspect-format.js +1590 -18
- package/dist/commands/inspect-graph.js +1553 -9
- package/dist/commands/inspect-imports.js +339 -2
- package/dist/commands/inspect-mixed-format.js +524 -0
- package/dist/commands/inspect-module-plan-format.js +216 -0
- package/dist/commands/inspect-module-plan-serialization.js +402 -0
- package/dist/commands/inspect-reference-path-format.js +157 -0
- package/dist/commands/inspect-request-values.js +599 -0
- package/dist/commands/inspect-selector-kind.js +21 -0
- package/dist/commands/inspect-selector.js +50 -0
- package/dist/commands/inspect-symbol-format.js +90 -0
- package/dist/commands/inspect-topology.js +435 -0
- package/dist/commands/inspect-tree.js +827 -5
- package/dist/commands/inspect-usages-detail.js +793 -0
- package/dist/commands/inspect-usages-evidence.js +31 -0
- package/dist/commands/inspect-usages-format.js +367 -0
- package/dist/commands/inspect.js +1450 -16
- package/dist/commands/internal-command.js +64 -0
- package/dist/commands/json-file-input.js +60 -1
- package/dist/commands/module-plan-cache.js +156 -2
- package/dist/commands/module-plan-standalone.js +208 -0
- package/dist/commands/module-plan-timeout.js +77 -1
- package/dist/commands/move-preview-cache.js +101 -2
- package/dist/commands/mutate-aggregate-output.js +996 -0
- package/dist/commands/mutate-child-execution.js +374 -0
- package/dist/commands/mutate-command.js +1394 -0
- package/dist/commands/mutate-declaration-output.js +313 -0
- package/dist/commands/mutate-domain-adapters.js +638 -0
- package/dist/commands/mutate-execution-cache.js +114 -0
- package/dist/commands/mutate-execution-status.js +598 -0
- package/dist/commands/mutate-failure-output.js +531 -0
- package/dist/commands/mutate-file-view.js +151 -0
- package/dist/commands/mutate-object-output.js +91 -0
- package/dist/commands/mutate-output-values.js +97 -0
- package/dist/commands/mutate-preview-cache.js +86 -0
- package/dist/commands/mutate-response-replay.js +153 -0
- package/dist/commands/mutate-result-projection.js +818 -0
- package/dist/commands/mutation-eta.js +28 -0
- package/dist/commands/mutation-execution-cache.js +140 -3
- package/dist/commands/mutation-recovery-journal.js +195 -0
- package/dist/commands/normalize-imports.js +1120 -4
- package/dist/commands/object-pack-command.js +546 -0
- package/dist/commands/object-pack-preview-cache.js +88 -0
- package/dist/commands/observability-command.js +47 -3
- package/dist/commands/ota-command.js +403 -0
- package/dist/commands/print-config.js +10 -1
- package/dist/commands/quick-read.js +1113 -11
- package/dist/commands/refactor-batch-builder.js +265 -1
- package/dist/commands/refactor-batch-execution-cache.js +85 -1
- package/dist/commands/refactor-batch-preview-cache.js +96 -2
- package/dist/commands/refactor-batch.js +461 -4
- package/dist/commands/rename-entities.js +794 -4
- package/dist/commands/rename-execution-cache.js +49 -1
- package/dist/commands/rename-input.js +22 -1
- package/dist/commands/rename-polling-policy.js +68 -0
- package/dist/commands/rename-preview-cache.js +96 -2
- package/dist/commands/result-view.js +993 -6
- package/dist/commands/reveal-command.js +445 -5
- package/dist/commands/selector-suggestions.js +93 -0
- package/dist/commands/session-workspace.js +1836 -31
- package/dist/commands/shared.js +2 -1
- package/dist/commands/skills-command.js +315 -0
- package/dist/commands/sync-command.js +59 -2
- package/dist/commands/worker-command.js +173 -0
- package/dist/commands/workspace-cache.js +55 -1
- package/dist/config/defaults.js +26 -1
- package/dist/config/env-vars.js +77 -1
- package/dist/config/glob-match.js +44 -1
- package/dist/config/import-rules.js +165 -1
- package/dist/config/local-config.js +293 -3
- package/dist/config/mutation-comments.js +51 -1
- package/dist/config/path-aliases.js +165 -1
- package/dist/config/path-display.js +84 -1
- package/dist/config/product-storage.js +37 -1
- package/dist/config/request-env.js +21 -0
- package/dist/config/request-routing-context.js +23 -0
- package/dist/config/resolve-command-alias.js +74 -1
- package/dist/config/resolve.js +24 -1
- package/dist/config/tsconfig-discovery.js +113 -1
- package/dist/config/typescript-preferences.js +131 -0
- package/dist/config/workspace-root.js +310 -3
- package/dist/config/workspace-state.js +254 -1
- package/dist/content/content-bundle.js +88 -1
- package/dist/diagnostics/module-plan-timeline.js +75 -2
- package/dist/diagnostics/readiness-text.js +45 -8
- package/dist/dsl/aib-dsl.js +838 -1
- package/dist/dsl/declaration-dsl.js +264 -0
- package/dist/dsl/file-move-to-dir-dsl.js +123 -0
- package/dist/dsl/file-refactor-batch-dsl.js +203 -0
- package/dist/dsl/file-rename-dsl.js +135 -0
- package/dist/dsl/mutate-dsl.js +746 -0
- package/dist/help/bootstrap.bash.md +742 -0
- package/dist/help/bootstrap.md +236 -437
- package/dist/help/bootstrap.pwsh.md +742 -0
- package/dist/help/docs/basics.md +1 -1
- package/dist/help/docs/config-setup.import-normalize.md +65 -65
- package/dist/help/docs/config-setup.import-rules.md +6 -5
- package/dist/help/docs/dsl.md +4 -3
- package/dist/help/docs/first-setup.md +6 -5
- package/dist/help/docs/help-protocol.md +4 -3
- package/dist/help/docs/import.base.md +38 -0
- package/dist/help/docs/import.rebase.md +85 -0
- package/dist/help/docs/inspect.aliasCandidates.md +39 -0
- package/dist/help/docs/inspect.code.md +5 -11
- package/dist/help/docs/inspect.deps.md +7 -7
- package/dist/help/docs/inspect.file.md +10 -18
- package/dist/help/docs/inspect.graph.md +6 -20
- package/dist/help/docs/{inspect.md → inspect.shared.md} +18 -17
- package/dist/help/docs/modulePlan.md +24 -28
- package/dist/help/docs/move.md +19 -22
- package/dist/help/docs/moveToDir.md +46 -0
- package/dist/help/docs/mutate.mixed.md +34 -0
- package/dist/help/docs/mutation.shared.md +55 -0
- package/dist/help/docs/patterns.md +3 -16
- package/dist/help/docs/qr.md +13 -22
- package/dist/help/docs/quick-map.md +36 -23
- package/dist/help/docs/recipe.file-layout.md +15 -0
- package/dist/help/docs/recipe.import-boundary.md +92 -0
- package/dist/help/docs/recipe.safe-artifact-probing.md +68 -0
- package/dist/help/docs/recipe.unfamiliar-area.md +64 -0
- package/dist/help/docs/recipes.md +20 -0
- package/dist/help/docs/rename.md +19 -27
- package/dist/help/docs/renameFile.md +36 -0
- package/dist/help/docs/rg.md +22 -0
- package/dist/help/docs/rules.md +26 -0
- package/dist/help/docs/selectors.md +3 -2
- package/dist/help/docs/session.md +1 -1
- package/dist/help/dsl/bootstrap.bash.md +742 -0
- package/dist/help/dsl/bootstrap.md +236 -437
- package/dist/help/dsl/bootstrap.pwsh.md +742 -0
- package/dist/help/dsl/docs/basics.md +1 -1
- package/dist/help/dsl/docs/config-setup.import-normalize.md +65 -65
- package/dist/help/dsl/docs/config-setup.import-rules.md +6 -5
- package/dist/help/dsl/docs/dsl.md +4 -3
- package/dist/help/dsl/docs/first-setup.md +6 -5
- package/dist/help/dsl/docs/help-protocol.md +4 -3
- package/dist/help/dsl/docs/import.base.md +38 -0
- package/dist/help/dsl/docs/import.rebase.md +85 -0
- package/dist/help/dsl/docs/inspect.aliasCandidates.md +39 -0
- package/dist/help/dsl/docs/inspect.code.md +5 -11
- package/dist/help/dsl/docs/inspect.deps.md +7 -7
- package/dist/help/dsl/docs/inspect.file.md +10 -18
- package/dist/help/dsl/docs/inspect.graph.md +6 -20
- package/dist/help/dsl/docs/{inspect.md → inspect.shared.md} +18 -17
- package/dist/help/dsl/docs/modulePlan.md +24 -28
- package/dist/help/dsl/docs/move.md +19 -22
- package/dist/help/dsl/docs/moveToDir.md +46 -0
- package/dist/help/dsl/docs/mutate.mixed.md +34 -0
- package/dist/help/dsl/docs/mutation.shared.md +55 -0
- package/dist/help/dsl/docs/patterns.md +3 -16
- package/dist/help/dsl/docs/qr.md +13 -22
- package/dist/help/dsl/docs/quick-map.md +36 -23
- package/dist/help/dsl/docs/recipe.file-layout.md +15 -0
- package/dist/help/dsl/docs/recipe.import-boundary.md +92 -0
- package/dist/help/dsl/docs/recipe.safe-artifact-probing.md +68 -0
- package/dist/help/dsl/docs/recipe.unfamiliar-area.md +64 -0
- package/dist/help/dsl/docs/recipes.md +20 -0
- package/dist/help/dsl/docs/rename.md +19 -27
- package/dist/help/dsl/docs/renameFile.md +36 -0
- package/dist/help/dsl/docs/rg.md +22 -0
- package/dist/help/dsl/docs/rules.md +26 -0
- package/dist/help/dsl/docs/selectors.md +3 -2
- package/dist/help/dsl/docs/session.md +1 -1
- package/dist/help/dsl/full.md +236 -437
- package/dist/help/dsl/help-index.md +49 -0
- package/dist/help/dsl/snippets/agents.md +2 -2
- package/dist/help/dsl/tokens/qr.inline.examples.md +2 -0
- package/dist/help/dsl/tokens/stdin.examples.bash.md +8 -0
- package/dist/help/dsl/tokens/stdin.examples.pwsh.md +8 -0
- package/dist/help/dsl/tokens/stdin.examples.with-qr.bash.md +12 -0
- package/dist/help/dsl/tokens/stdin.examples.with-qr.pwsh.md +12 -0
- package/dist/help/dsl/topics/basics.md +1 -1
- package/dist/help/dsl/topics/config-setup.import-normalize.md +65 -65
- package/dist/help/dsl/topics/config-setup.import-rules.md +6 -5
- package/dist/help/dsl/topics/dsl.md +4 -3
- package/dist/help/dsl/topics/first-setup.md +6 -5
- package/dist/help/dsl/topics/help-protocol.md +4 -3
- package/dist/help/dsl/topics/import.base.md +36 -0
- package/dist/help/dsl/topics/import.rebase.md +83 -0
- package/dist/help/dsl/topics/inspect.aliasCandidates.md +37 -0
- package/dist/help/dsl/topics/inspect.code.md +5 -11
- package/dist/help/dsl/topics/inspect.deps.md +7 -7
- package/dist/help/dsl/topics/inspect.file.md +10 -18
- package/dist/help/dsl/topics/inspect.graph.md +6 -20
- package/dist/help/dsl/topics/{inspect.md → inspect.shared.md} +18 -17
- package/dist/help/dsl/topics/modulePlan.md +21 -26
- package/dist/help/dsl/topics/move.md +17 -18
- package/dist/help/dsl/topics/moveToDir.md +44 -0
- package/dist/help/dsl/topics/mutate.mixed.md +32 -0
- package/dist/help/dsl/topics/mutation.shared.md +53 -0
- package/dist/help/dsl/topics/patterns.md +3 -16
- package/dist/help/dsl/topics/qr.md +13 -22
- package/dist/help/dsl/topics/quick-map.md +36 -23
- package/dist/help/dsl/topics/recipe.file-layout.md +13 -0
- package/dist/help/dsl/topics/recipe.import-boundary.md +90 -0
- package/dist/help/dsl/topics/recipe.safe-artifact-probing.md +66 -0
- package/dist/help/dsl/topics/recipe.unfamiliar-area.md +62 -0
- package/dist/help/dsl/topics/recipes.md +18 -0
- package/dist/help/dsl/topics/rename.md +15 -15
- package/dist/help/dsl/topics/renameFile.md +34 -0
- package/dist/help/dsl/topics/rg.md +20 -0
- package/dist/help/dsl/topics/rules.md +24 -0
- package/dist/help/dsl/topics/selectors.md +3 -2
- package/dist/help/dsl/topics/session.md +1 -1
- package/dist/help/full.md +236 -437
- package/dist/help/help-index.md +49 -0
- package/dist/help/help-meta.json +114 -48
- package/dist/help/index.md +76 -87
- package/dist/help/snippets/agents.md +2 -2
- package/dist/help/tokens/qr.inline.examples.md +2 -0
- package/dist/help/tokens/stdin.examples.bash.md +8 -0
- package/dist/help/tokens/stdin.examples.pwsh.md +8 -0
- package/dist/help/tokens/stdin.examples.with-qr.bash.md +12 -0
- package/dist/help/tokens/stdin.examples.with-qr.pwsh.md +12 -0
- package/dist/help/topics/basics.md +1 -1
- package/dist/help/topics/config-setup.import-normalize.md +65 -65
- package/dist/help/topics/config-setup.import-rules.md +6 -5
- package/dist/help/topics/dsl.md +4 -3
- package/dist/help/topics/first-setup.md +6 -5
- package/dist/help/topics/help-protocol.md +4 -3
- package/dist/help/topics/import.base.md +36 -0
- package/dist/help/topics/import.rebase.md +83 -0
- package/dist/help/topics/inspect.aliasCandidates.md +37 -0
- package/dist/help/topics/inspect.code.md +5 -11
- package/dist/help/topics/inspect.deps.md +7 -7
- package/dist/help/topics/inspect.file.md +10 -18
- package/dist/help/topics/inspect.graph.md +6 -20
- package/dist/help/topics/{inspect.md → inspect.shared.md} +18 -17
- package/dist/help/topics/modulePlan.md +21 -26
- package/dist/help/topics/move.md +17 -18
- package/dist/help/topics/moveToDir.md +44 -0
- package/dist/help/topics/mutate.mixed.md +32 -0
- package/dist/help/topics/mutation.shared.md +53 -0
- package/dist/help/topics/patterns.md +3 -16
- package/dist/help/topics/qr.md +13 -22
- package/dist/help/topics/quick-map.md +36 -23
- package/dist/help/topics/recipe.file-layout.md +13 -0
- package/dist/help/topics/recipe.import-boundary.md +90 -0
- package/dist/help/topics/recipe.safe-artifact-probing.md +66 -0
- package/dist/help/topics/recipe.unfamiliar-area.md +62 -0
- package/dist/help/topics/recipes.md +18 -0
- package/dist/help/topics/rename.md +15 -15
- package/dist/help/topics/renameFile.md +34 -0
- package/dist/help/topics/rg.md +20 -0
- package/dist/help/topics/rules.md +24 -0
- package/dist/help/topics/selectors.md +3 -2
- package/dist/help/topics/session.md +1 -1
- package/dist/host/capabilities.js +56 -0
- package/dist/imports/standalone-import-analysis.js +602 -0
- package/dist/imports/standalone-import-model.js +2 -0
- package/dist/imports/standalone-import-process.js +66 -0
- package/dist/imports/standalone-import-worker.js +27 -0
- package/dist/imports/standalone-ts-project.js +147 -0
- package/dist/inspect/inspect-duplicates-service.js +526 -0
- package/dist/inspect/inspect-reverse-module-closure.js +338 -0
- package/dist/inspect/inspect-source-ranges.js +82 -0
- package/dist/inspect/inspect-source-shape.js +649 -0
- package/dist/inspect/standalone-inspect-analysis.js +319 -0
- package/dist/inspect/standalone-inspect-model.js +9 -0
- package/dist/inspect/standalone-inspect-process.js +55 -0
- package/dist/inspect/standalone-inspect-usages.js +274 -0
- package/dist/inspect/standalone-inspect-worker.js +13 -0
- package/dist/metrics/central-metrics.js +101 -2
- package/dist/mutation/concrete-edit-plan.js +157 -0
- package/dist/mutation/exports-star-collapse-preview.js +361 -0
- package/dist/mutation/exports-star-expand-apply.js +373 -0
- package/dist/mutation/exports-star-expand-preview.js +807 -0
- package/dist/mutation/file-impact-scan.js +182 -0
- package/dist/mutation/file-mutation-discovery.js +674 -0
- package/dist/mutation/file-mutation-eta.js +99 -0
- package/dist/mutation/file-mutation-standalone-apply.js +584 -0
- package/dist/mutation/file-mutation-standalone-planner.js +500 -0
- package/dist/mutation/file-mutation-tsserver-session.js +473 -0
- package/dist/mutation/mutation-estimate.js +45 -0
- package/dist/mutation/mutation-plan.js +467 -0
- package/dist/mutation/object-mutation-foundation.js +2 -0
- package/dist/mutation/object-mutation-partition.js +148 -0
- package/dist/mutation/object-pack-semantic-apply.js +507 -0
- package/dist/mutation/object-pack-semantic-preview.js +984 -0
- package/dist/mutation/object-unpack-semantic-preview.js +993 -0
- package/dist/mutation/package-manifest-impact.js +176 -0
- package/dist/mutation/rename-owner-worker-child.js +37 -0
- package/dist/mutation/rename-owner-worker.js +122 -0
- package/dist/mutation/runtime-cycle-query.js +66 -0
- package/dist/mutation/semantic-execution-progress.js +63 -0
- package/dist/mutation/semantic-export-index.js +474 -0
- package/dist/mutation/semantic-impact-scan.js +434 -0
- package/dist/mutation/semantic-model.js +2 -0
- package/dist/mutation/semantic-move-best-effort-planner.js +209 -0
- package/dist/mutation/semantic-move-config-worker-child.js +61 -0
- package/dist/mutation/semantic-move-config-worker.js +449 -0
- package/dist/mutation/semantic-move-declarations.js +94 -0
- package/dist/mutation/semantic-move-metrics.js +119 -0
- package/dist/mutation/semantic-move-model.js +2 -0
- package/dist/mutation/semantic-move-owner-authority.js +122 -0
- package/dist/mutation/semantic-move-owner-candidates.js +300 -0
- package/dist/mutation/semantic-move-owner-divergence-harness.js +474 -0
- package/dist/mutation/semantic-move-owner-divergence-runner.js +162 -0
- package/dist/mutation/semantic-move-plan-hash.js +56 -0
- package/dist/mutation/semantic-move-policy.js +360 -0
- package/dist/mutation/semantic-move-process.js +218 -0
- package/dist/mutation/semantic-move-provider-diagnostics.js +27 -0
- package/dist/mutation/semantic-move-standalone-engine.js +919 -0
- package/dist/mutation/semantic-move-standalone-planner.js +1553 -0
- package/dist/mutation/semantic-move-transaction.js +639 -0
- package/dist/mutation/semantic-mutation-engine.js +478 -0
- package/dist/mutation/semantic-mutation-runtime.js +521 -0
- package/dist/mutation/semantic-planner-retry.js +26 -0
- package/dist/mutation/semantic-program-roots.js +69 -0
- package/dist/mutation/semantic-rename-commonjs.js +229 -0
- package/dist/mutation/semantic-rename-config-worker-child.js +46 -0
- package/dist/mutation/semantic-rename-config-worker.js +498 -0
- package/dist/mutation/semantic-rename-locations.js +192 -0
- package/dist/mutation/semantic-rename-model.js +2 -0
- package/dist/mutation/semantic-rename-process.js +210 -0
- package/dist/mutation/semantic-rename-standalone-engine.js +302 -0
- package/dist/mutation/semantic-rename-standalone-planner.js +567 -0
- package/dist/mutation/semantic-rename-transaction.js +333 -0
- package/dist/mutation/semantic-unused-import-cleanup.js +248 -0
- package/dist/mutation/semantic-worker-retry.js +40 -0
- package/dist/mutation/semantic-workspace.js +804 -0
- package/dist/mutation/targeted-import-canonicalizer.js +359 -0
- package/dist/observability/config.js +206 -1
- package/dist/observability/context.js +59 -1
- package/dist/observability/failure-snapshot.js +124 -2
- package/dist/observability/recent.js +63 -2
- package/dist/payloads/read-stdin-json.js +212 -1
- package/dist/rg-wrapper/core.js +714 -0
- package/dist/rg-wrapper/options.js +125 -0
- package/dist/rtk-wrapper/core.js +144 -0
- package/dist/rtk-wrapper/git-safety.js +203 -0
- package/dist/rtk-wrapper/output-adapter.js +106 -0
- package/dist/runtime/buffered-process.js +114 -0
- package/dist/runtime/bundled-node.js +97 -1
- package/dist/runtime/command-lifecycle.js +2 -0
- package/dist/runtime/input-source.js +238 -1
- package/dist/runtime/node-cli-identity.js +37 -0
- package/dist/runtime/run-command.js +191 -1
- package/dist/selectors/parse-entities.js +84 -1
- package/dist/semantic/semantic-context-pool.js +830 -0
- package/dist/semantic/semantic-context-provider.js +416 -0
- package/dist/semantic/semantic-resident-admission.js +38 -0
- package/dist/semantic/semantic-worker-child.js +40 -0
- package/dist/semantic/semantic-worker-manager.js +460 -0
- package/dist/semantic/semantic-worker-protocol.js +2 -0
- package/dist/semantic/semantic-worker-runtime.js +38 -0
- package/dist/semantic/workspace-semantic-context-pools.js +136 -0
- package/dist/session/client.js +359 -1
- package/dist/session/daemon-state.js +185 -0
- package/dist/session/external-tool-coordinator.js +88 -0
- package/dist/session/external-tool-request.js +52 -0
- package/dist/session/lane-owner.js +116 -0
- package/dist/session/paths.js +71 -1
- package/dist/session/runtime-lifecycle.js +225 -0
- package/dist/session/runtime-shutdown.js +95 -0
- package/dist/session/server.js +1194 -8
- package/dist/session/session-health.js +27 -0
- package/dist/shared/agent-text.js +29 -1
- package/dist/shared/errors.js +496 -30
- package/dist/shared/event-loop.js +6 -1
- package/dist/shared/hints.js +37 -1
- package/dist/shared/metrics.js +43 -1
- package/dist/shared/presentation.js +69 -4
- package/dist/shared/stdin-examples.js +77 -3
- package/dist/shared/stdout.js +6 -2
- package/dist/shared/types.js +23 -1
- package/dist/tool-runtime/runtime-tools.js +120 -0
- package/dist/topology/availability.js +663 -0
- package/dist/topology/cache.js +130 -0
- package/dist/topology/candidates.js +372 -0
- package/dist/topology/core.js +903 -0
- package/dist/topology/dependency-snapshot.js +189 -0
- package/dist/topology/model.js +2 -0
- package/dist/topology/scope.js +100 -0
- package/dist/topology/ts-oracle-batch.js +529 -0
- package/dist/topology/ts-oracle-host.js +69 -0
- package/dist/topology/ts-oracle-model.js +2 -0
- package/dist/topology/ts-oracle.js +224 -0
- package/dist/topology/tsconfig-loader.js +105 -0
- package/dist/topology/workspace-project-index.js +542 -0
- package/dist/tracing/config.js +192 -2
- package/dist/tracing/failure-summary.js +100 -0
- package/dist/tracing/trace.js +318 -5
- package/dist/tsc-wrapper/core.js +697 -0
- package/dist/workers/control-plane/aib-control-plane-worker.cjs +80 -0
- package/dist/workers/control-plane/client-config.default.json +3 -0
- package/dist/workers/lexical-worker-child.js +27 -0
- package/dist/workers/lexical-worker-manager.js +394 -0
- package/dist/workers/lexical-worker-protocol.js +2 -0
- package/dist/workers/lexical-worker-runtime.js +25 -0
- package/dist/workers/owned-one-shot-process.js +115 -0
- package/dist/workers/product-storage.js +23 -0
- package/dist/workers/registry.js +241 -0
- package/package.json +8 -11
- package/runtimes/tools/rg/darwin-arm64/rg +0 -0
- package/runtimes/tools/rg/darwin-x64/rg +0 -0
- package/runtimes/tools/rg/linux-arm64/rg +0 -0
- package/runtimes/tools/rg/linux-x64/rg +0 -0
- package/runtimes/tools/rg/manifest.json +36 -0
- package/runtimes/tools/rg/win32-x64/rg.exe +0 -0
- package/runtimes/tools/rtk/darwin-arm64/rtk +0 -0
- package/runtimes/tools/rtk/darwin-x64/rtk +0 -0
- package/runtimes/tools/rtk/linux-arm64/rtk +0 -0
- package/runtimes/tools/rtk/linux-x64/rtk +0 -0
- package/runtimes/tools/rtk/manifest.json +36 -0
- package/runtimes/tools/rtk/win32-x64/rtk.exe +0 -0
- package/scripts/postinstall.cjs +29 -29
- package/scripts/provision-runtime.cjs +411 -459
- package/dist/client/http-client.js +0 -1
- package/dist/client/transport-options.js +0 -1
- package/dist/client/websocket-client.js +0 -1
- package/dist/commands/entity-resolution.js +0 -1
- package/dist/commands/inspect-symbol-query.js +0 -1
- package/dist/commands/list-instances.js +0 -1
- package/dist/commands/module-plan-command.js +0 -1
- package/dist/commands/move-command.js +0 -1
- package/dist/commands/move-to-file.js +0 -2
- package/dist/commands/ping.js +0 -1
- package/dist/commands/refactor-command.js +0 -1
- package/dist/commands/rename-command.js +0 -1
- package/dist/commands/runtime-command.js +0 -4
- package/dist/commands/runtime-info.js +0 -1
- package/dist/commands/validate-module-plan.js +0 -2
- package/dist/compatibility/policy.js +0 -1
- package/dist/config/auto-start-ide.js +0 -1
- package/dist/discovery/registry.js +0 -1
- package/dist/discovery/select-instance.js +0 -1
- package/dist/help/docs/mutation.md +0 -50
- package/dist/help/docs/refactor.batch.md +0 -44
- package/dist/help/dsl/docs/mutation.md +0 -50
- package/dist/help/dsl/docs/refactor.batch.md +0 -44
- package/dist/help/dsl/topics/mutation.md +0 -48
- package/dist/help/dsl/topics/refactor.batch.md +0 -33
- package/dist/help/json/bootstrap.md +0 -1085
- package/dist/help/json/docs/basics.md +0 -15
- package/dist/help/json/docs/config-setup.aliases.md +0 -56
- package/dist/help/json/docs/config-setup.excludes.md +0 -45
- package/dist/help/json/docs/config-setup.import-normalize.md +0 -86
- package/dist/help/json/docs/config-setup.import-rules.md +0 -96
- package/dist/help/json/docs/config-setup.tsconfigs.md +0 -33
- package/dist/help/json/docs/dsl.md +0 -25
- package/dist/help/json/docs/first-setup.md +0 -292
- package/dist/help/json/docs/help-format.md +0 -9
- package/dist/help/json/docs/help-protocol.md +0 -26
- package/dist/help/json/docs/imports.normalize.md +0 -47
- package/dist/help/json/docs/inspect.code.md +0 -41
- package/dist/help/json/docs/inspect.cycles.md +0 -38
- package/dist/help/json/docs/inspect.deps.md +0 -46
- package/dist/help/json/docs/inspect.duplicates.md +0 -65
- package/dist/help/json/docs/inspect.exports.md +0 -40
- package/dist/help/json/docs/inspect.file.md +0 -38
- package/dist/help/json/docs/inspect.graph.md +0 -139
- package/dist/help/json/docs/inspect.imports.md +0 -15
- package/dist/help/json/docs/inspect.md +0 -88
- package/dist/help/json/docs/inspect.members.md +0 -32
- package/dist/help/json/docs/inspect.tree.md +0 -32
- package/dist/help/json/docs/inspect.usages.md +0 -61
- package/dist/help/json/docs/modulePlan.md +0 -73
- package/dist/help/json/docs/move.md +0 -56
- package/dist/help/json/docs/mutation.md +0 -65
- package/dist/help/json/docs/patterns.md +0 -76
- package/dist/help/json/docs/prefs.md +0 -40
- package/dist/help/json/docs/qr.md +0 -37
- package/dist/help/json/docs/quick-map.md +0 -30
- package/dist/help/json/docs/refactor.batch.md +0 -72
- package/dist/help/json/docs/rename.md +0 -47
- package/dist/help/json/docs/reveal.md +0 -30
- package/dist/help/json/docs/selectors.md +0 -23
- package/dist/help/json/docs/session.md +0 -77
- package/dist/help/json/docs/view.md +0 -30
- package/dist/help/json/full.md +0 -1085
- package/dist/help/json/snippets/agents.md +0 -14
- package/dist/help/json/topics/basics.md +0 -13
- package/dist/help/json/topics/config-setup.aliases.md +0 -54
- package/dist/help/json/topics/config-setup.excludes.md +0 -43
- package/dist/help/json/topics/config-setup.import-normalize.md +0 -84
- package/dist/help/json/topics/config-setup.import-rules.md +0 -94
- package/dist/help/json/topics/config-setup.tsconfigs.md +0 -31
- package/dist/help/json/topics/dsl.md +0 -23
- package/dist/help/json/topics/first-setup.md +0 -290
- package/dist/help/json/topics/help-format.md +0 -7
- package/dist/help/json/topics/help-protocol.md +0 -24
- package/dist/help/json/topics/imports.normalize.md +0 -45
- package/dist/help/json/topics/inspect.code.md +0 -39
- package/dist/help/json/topics/inspect.cycles.md +0 -36
- package/dist/help/json/topics/inspect.deps.md +0 -44
- package/dist/help/json/topics/inspect.duplicates.md +0 -37
- package/dist/help/json/topics/inspect.exports.md +0 -38
- package/dist/help/json/topics/inspect.file.md +0 -36
- package/dist/help/json/topics/inspect.graph.md +0 -137
- package/dist/help/json/topics/inspect.imports.md +0 -13
- package/dist/help/json/topics/inspect.md +0 -86
- package/dist/help/json/topics/inspect.members.md +0 -30
- package/dist/help/json/topics/inspect.tree.md +0 -22
- package/dist/help/json/topics/inspect.usages.md +0 -59
- package/dist/help/json/topics/modulePlan.md +0 -60
- package/dist/help/json/topics/move.md +0 -46
- package/dist/help/json/topics/mutation.md +0 -63
- package/dist/help/json/topics/patterns.md +0 -74
- package/dist/help/json/topics/prefs.md +0 -38
- package/dist/help/json/topics/qr.md +0 -35
- package/dist/help/json/topics/quick-map.md +0 -28
- package/dist/help/json/topics/refactor.batch.md +0 -61
- package/dist/help/json/topics/rename.md +0 -42
- package/dist/help/json/topics/reveal.md +0 -28
- package/dist/help/json/topics/selectors.md +0 -21
- package/dist/help/json/topics/session.md +0 -59
- package/dist/help/json/topics/view.md +0 -28
- package/dist/help/topics/mutation.md +0 -48
- package/dist/help/topics/refactor.batch.md +0 -33
- package/dist/ide-launch/common.cjs +0 -162
- package/dist/managed-host/extension-vsix-resolver.js +0 -1
- package/dist/managed-host/manage-serve-web-host.cjs +0 -141
- package/dist/managed-host/serve-web-autostart.js +0 -1
- package/dist/managed-host/serve-web-host.cjs +0 -1904
- package/dist/runtime/managed-runtime-provisioning.js +0 -1
- package/dist/shared/diagnostic-catalog.js +0 -1
- package/dist/shared/diagnostics.js +0 -1
- package/dist/shared/operations.js +0 -1
- package/dist/shared/protocol.js +0 -1
- package/dist/shared/routes.js +0 -1
- package/extension/vscode-refactor-bridge-extension.vsix +0 -0
- package/runtimes/launcher/linux-x64/aib +0 -0
- package/runtimes/launcher/win-x64/aib.exe +0 -0
package/dist/help/json/full.md
DELETED
|
@@ -1,1085 +0,0 @@
|
|
|
1
|
-
AIB
|
|
2
|
-
|
|
3
|
-
aib is a local CLI for TS/JS code work backed by IDE and TypeScript APIs.
|
|
4
|
-
It can inspect symbols, usages, dependencies, duplicates, focused code, and run IDE-backed mutations.
|
|
5
|
-
|
|
6
|
-
aib is designed for agent workflows:
|
|
7
|
-
batch requests, compact text output, session handles, captured inputs, and reusable outputs.
|
|
8
|
-
|
|
9
|
-
Inline commands omit the aib prefix.
|
|
10
|
-
When you see:
|
|
11
|
-
session prefs get
|
|
12
|
-
|
|
13
|
-
Run:
|
|
14
|
-
aib session prefs get
|
|
15
|
-
|
|
16
|
-
Stdin examples show command and input separately to avoid shell-specific syntax.
|
|
17
|
-
Stdin Run lines include the aib prefix to avoid confusion.
|
|
18
|
-
|
|
19
|
-
{{stdin.examples}}
|
|
20
|
-
|
|
21
|
-
Basics
|
|
22
|
-
|
|
23
|
-
Use the active session while you work.
|
|
24
|
-
Reuse captured inputs when editing them is cheaper than rebuilding large JSON.
|
|
25
|
-
|
|
26
|
-
Examples are patterns, not limits.
|
|
27
|
-
Feature sections show common high-value uses, not every valid use.
|
|
28
|
-
Adapt requests to the task: combine features, batch related questions, and skip steps when you already have enough context.
|
|
29
|
-
|
|
30
|
-
Prefer batch JSON instead of inline calls.
|
|
31
|
-
One request can inspect/mutate several files/entities and save reusable outputs.
|
|
32
|
-
Use one-off commands only for small checks/changes.
|
|
33
|
-
|
|
34
|
-
For mutations, aib asks TS/IDE refactors to update affected references and imports.
|
|
35
|
-
After a successful mutation, do not manually patch the same imports unless aib reports a follow-up or the build/checks show a real issue.
|
|
36
|
-
|
|
37
|
-
Working patterns
|
|
38
|
-
|
|
39
|
-
Help refresh
|
|
40
|
-
|
|
41
|
-
After context compaction, always run:
|
|
42
|
-
aib help help-protocol quick-map
|
|
43
|
-
aib config aliases
|
|
44
|
-
|
|
45
|
-
Use focused help when you would otherwise guess how a known AIB capability works.
|
|
46
|
-
|
|
47
|
-
Reread bootstrap when you need to restore the overall AIB workflow faster than piecing it together from focused topics.
|
|
48
|
-
If you just reread bootstrap, do not also read focused topics unless you need details that bootstrap does not cover.
|
|
49
|
-
|
|
50
|
-
Do not reread bootstrap automatically if focused help is enough.
|
|
51
|
-
When refreshing multiple areas, request them together instead of one by one.
|
|
52
|
-
|
|
53
|
-
Example:
|
|
54
|
-
aib help patterns mutation inspect inspect.file inspect.code imports.normalize
|
|
55
|
-
|
|
56
|
-
Use aib before broad file reads when the question is about TS/JS structure, references, dependencies, or focused code.
|
|
57
|
-
Use qr for cross-OS quick reads of text files, logs, JSON, scripts, and line windows.
|
|
58
|
-
It is not a replacement for inspect.
|
|
59
|
-
Use normal text search when the question is just text.
|
|
60
|
-
|
|
61
|
-
For a first pass in a new codebase, map directories before reading files:
|
|
62
|
-
|
|
63
|
-
tree src depth=5 +onlyDirs limit=200
|
|
64
|
-
|
|
65
|
-
Start compact for broad scans.
|
|
66
|
-
Use summary, locations, or local graph views first when output could be large.
|
|
67
|
-
Expand to code or wider graph views only for the parts that matter now.
|
|
68
|
-
If output hides data and shows `view: aib:res_<id>`, use `aib view ...` to fetch only the hidden part instead of repeating the original request.
|
|
69
|
-
|
|
70
|
-
Compact output is a starting point, not a substitute for needed code.
|
|
71
|
-
Fetch exact code when correctness depends on implementation details.
|
|
72
|
-
|
|
73
|
-
Use prefs when the current phase repeats the same output shape.
|
|
74
|
-
Turn details off when they stop helping.
|
|
75
|
-
Turn them back on when they matter.
|
|
76
|
-
|
|
77
|
-
For mutation commands, set the shell/tool harness timeout to 3 minutes.
|
|
78
|
-
|
|
79
|
-
If a mutation command times out or returns no final output, use:
|
|
80
|
-
|
|
81
|
-
aib execution status last
|
|
82
|
-
|
|
83
|
-
This is an escape hatch for recovering the latest mutation status/result.
|
|
84
|
-
|
|
85
|
-
After reading bootstrap for the first time in a repo, run:
|
|
86
|
-
|
|
87
|
-
aib config
|
|
88
|
-
|
|
89
|
-
Use the output as the repo-local AIB map:
|
|
90
|
-
- pathAliases show short paths to use in AIB requests;
|
|
91
|
-
- importRules show how move/modulePlan should create imports;
|
|
92
|
-
- importNormalize shows defaults for explicit imports normalize;
|
|
93
|
-
- excludes show which noise is intentionally hidden from tree/graph/sync.
|
|
94
|
-
|
|
95
|
-
If pathAliases are missing, stale, or weak for repeated paths, run:
|
|
96
|
-
aib help config-setup.aliases
|
|
97
|
-
|
|
98
|
-
If move/modulePlan imports do not match the repo style, run:
|
|
99
|
-
aib help config-setup.import-rules
|
|
100
|
-
|
|
101
|
-
If you are about to change import style across files, add or adopt tsconfig aliases, or clean imports repeatedly, run:
|
|
102
|
-
aib help config-setup.import-normalize
|
|
103
|
-
|
|
104
|
-
If tree/graph output includes known repo noise, run:
|
|
105
|
-
aib help config-setup.excludes
|
|
106
|
-
|
|
107
|
-
If sync or reveal shows too many visible TypeScript configs, run:
|
|
108
|
-
aib help config-setup.tsconfigs
|
|
109
|
-
|
|
110
|
-
Example aib.json config:
|
|
111
|
-
|
|
112
|
-
{
|
|
113
|
-
"pathAliases": {
|
|
114
|
-
"svc": "src/services",
|
|
115
|
-
"cli": "packages/cli/src",
|
|
116
|
-
"ext": "packages/extension/src"
|
|
117
|
-
},
|
|
118
|
-
"importRules": [
|
|
119
|
-
{
|
|
120
|
-
"scope": ".",
|
|
121
|
-
"specifier": "shortest",
|
|
122
|
-
"ending": "auto",
|
|
123
|
-
"builtin": "bare",
|
|
124
|
-
"unusedImports": "remove"
|
|
125
|
-
}
|
|
126
|
-
],
|
|
127
|
-
"importNormalize": [
|
|
128
|
-
{
|
|
129
|
-
"scope": "src",
|
|
130
|
-
"to": "shortestAlias",
|
|
131
|
-
"exclude": ["src/generated"]
|
|
132
|
-
}
|
|
133
|
-
],
|
|
134
|
-
"inspect.graph.exclude": [
|
|
135
|
-
"**/* copy.ts"
|
|
136
|
-
]
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
pathAliases define short request aliases for paths agents repeat in aib commands.
|
|
140
|
-
Use them to reduce input tokens for repeated inspect and mutation work.
|
|
141
|
-
|
|
142
|
-
Aliases are for aib request paths. They do not change TypeScript imports by themselves.
|
|
143
|
-
For import style after mutations, use importRules.
|
|
144
|
-
|
|
145
|
-
importRules control imports created or expanded by move/modulePlan mutation cleanup.
|
|
146
|
-
They do not rewrite the whole project.
|
|
147
|
-
|
|
148
|
-
AIB starts from IDE/TS import preferences.
|
|
149
|
-
For mutation cleanup, matching importRules in aib.json take priority.
|
|
150
|
-
|
|
151
|
-
Do not assume IDE/TS defaults match the repo style.
|
|
152
|
-
Set importRules before large move/modulePlan work so imports do not need manual cleanup.
|
|
153
|
-
|
|
154
|
-
importNormalize defines default rules for explicit aib imports normalize commands.
|
|
155
|
-
|
|
156
|
-
It does not run automatically during move/modulePlan; use importRules for mutation-time cleanup.
|
|
157
|
-
|
|
158
|
-
AIB has four config exclude fields:
|
|
159
|
-
inspect.graph.exclude
|
|
160
|
-
inspect.tree.files.exclude
|
|
161
|
-
inspect.tree.onlyDirs.exclude
|
|
162
|
-
sync.tsconfig.exclude
|
|
163
|
-
|
|
164
|
-
For all of them, node_modules, .git, dist, build, out, and .tmp are skipped by default.
|
|
165
|
-
|
|
166
|
-
Use config excludes for generated files, backups, local copies, nested workspaces, seed projects, or other repository-specific noise.
|
|
167
|
-
|
|
168
|
-
Graph excludes affect graph counts, hubs, entrypoints, leaves, edges, imports, importedBy, and saved graph files.
|
|
169
|
-
Tree excludes affect directory/file discovery output.
|
|
170
|
-
AIB syncs and watches visible tsconfigs.
|
|
171
|
-
sync.tsconfig.exclude affects which TypeScript configs AIB syncs and watches.
|
|
172
|
-
|
|
173
|
-
Important: leave feedback while working.
|
|
174
|
-
|
|
175
|
-
aib is built for agents. Agent feedback is the main signal for improving output, docs, mutations, and token efficiency.
|
|
176
|
-
|
|
177
|
-
Use feedback when something is wrong, unclear, noisy, or could be more efficient.
|
|
178
|
-
|
|
179
|
-
Format:
|
|
180
|
-
feedback "kind | message"
|
|
181
|
-
feedback "kind | topic | message"
|
|
182
|
-
|
|
183
|
-
Kinds:
|
|
184
|
-
bug, confusion, friction, idea, other
|
|
185
|
-
|
|
186
|
-
Topic is optional. Choose any short topic that helps classify the feedback.
|
|
187
|
-
|
|
188
|
-
Example:
|
|
189
|
-
feedback "friction | imports | normalize required manual cleanup"
|
|
190
|
-
|
|
191
|
-
Session
|
|
192
|
-
|
|
193
|
-
Start by creating or selecting your session.
|
|
194
|
-
Create it once, then reuse it.
|
|
195
|
-
Do not create a new session for every command or subtask.
|
|
196
|
-
|
|
197
|
-
Session stores captured inputs, saved outputs, aliases, and prefs.
|
|
198
|
-
|
|
199
|
-
Prefer short session names:
|
|
200
|
-
aa, tr, qa, a2
|
|
201
|
-
|
|
202
|
-
Create:
|
|
203
|
-
session init --name <name>
|
|
204
|
-
|
|
205
|
-
Follow the command output.
|
|
206
|
-
If aib says multiple sessions exist, use the session you created explicitly:
|
|
207
|
-
aib -s <name> <command>
|
|
208
|
-
|
|
209
|
-
Or bind this shell:
|
|
210
|
-
AIB=<name>
|
|
211
|
-
|
|
212
|
-
If you want to prune session inputs/outputs, use:
|
|
213
|
-
session clear
|
|
214
|
-
|
|
215
|
-
After clear, keep using the same session.
|
|
216
|
-
|
|
217
|
-
Check:
|
|
218
|
-
session status
|
|
219
|
-
|
|
220
|
-
Reusable index handles look like:
|
|
221
|
-
`aib:graph:<name>` `aib:usages:<name>`
|
|
222
|
-
|
|
223
|
-
Pass index handles back to the matching inspect command with `--from-file` or `from` in DSL.
|
|
224
|
-
|
|
225
|
-
Every JSON stdin/from request is captured in the active session.
|
|
226
|
-
|
|
227
|
-
Latest captured input:
|
|
228
|
-
<session-dir>/inputs/<kind>/_last.json
|
|
229
|
-
|
|
230
|
-
Handle:
|
|
231
|
-
aib:input:<kind>:last
|
|
232
|
-
|
|
233
|
-
Use --from when editing the captured input costs less than rebuilding the request.
|
|
234
|
-
This is usually true for large batches, partial failures, or multi-step mutation plans.
|
|
235
|
-
For small one-off requests, write a corrected request instead.
|
|
236
|
-
|
|
237
|
-
Example:
|
|
238
|
-
A refactor batch moves symbols into 5 files.
|
|
239
|
-
The first 2 moves are done, and the 3rd fails in TypeScript.
|
|
240
|
-
Edit <session-dir>/inputs/refactor/_last.json:
|
|
241
|
-
- remove the already completed moves
|
|
242
|
-
- change or remove the failed move
|
|
243
|
-
- keep the remaining moves
|
|
244
|
-
|
|
245
|
-
Then rerun:
|
|
246
|
-
aib refactor batch <command> --from aib:input:refactor:last
|
|
247
|
-
|
|
248
|
-
Prefs
|
|
249
|
-
|
|
250
|
-
Prefs change defaults for the active session.
|
|
251
|
-
Use them when you want repeated CLI behavior without repeating request fields.
|
|
252
|
-
|
|
253
|
-
Set prefs:
|
|
254
|
-
session prefs set <name> <value> [<name> <value>...]
|
|
255
|
-
|
|
256
|
-
Example:
|
|
257
|
-
session prefs set inspect.graph.hubs false inspect.graph.leaves false
|
|
258
|
-
|
|
259
|
-
Show prefs:
|
|
260
|
-
session prefs get [prefix] [--all]
|
|
261
|
-
|
|
262
|
-
By default, get shows session overrides.
|
|
263
|
-
--all includes defaults.
|
|
264
|
-
prefix filters keys.
|
|
265
|
-
|
|
266
|
-
boolean = true|false
|
|
267
|
-
N = integer
|
|
268
|
-
|
|
269
|
-
Available prefs:
|
|
270
|
-
inspect.code.maxNonEmptyLines N
|
|
271
|
-
inspect.usages.maxLocations N
|
|
272
|
-
inspect.usages.maxCodeBlocks N
|
|
273
|
-
inspect.members.maxItems N
|
|
274
|
-
inspect.members.all boolean
|
|
275
|
-
inspect.graph.hubs boolean
|
|
276
|
-
inspect.graph.entrypoints boolean
|
|
277
|
-
inspect.graph.leaves boolean
|
|
278
|
-
inspect.graph.edges boolean
|
|
279
|
-
inspect.graph.symbolUsage boolean
|
|
280
|
-
|
|
281
|
-
Selectors identify symbols when names are ambiguous.
|
|
282
|
-
Use plain names when they are unambiguous.
|
|
283
|
-
Use selectors when aib reports ambiguity or when different symbol kinds share a name.
|
|
284
|
-
|
|
285
|
-
Example:
|
|
286
|
-
type WsOptions
|
|
287
|
-
class WsOptions
|
|
288
|
-
|
|
289
|
-
If aib needs the exact entity, use:
|
|
290
|
-
t-WsOptions
|
|
291
|
-
c-WsOptions
|
|
292
|
-
|
|
293
|
-
Selectors list:
|
|
294
|
-
f-name function
|
|
295
|
-
c-Name class
|
|
296
|
-
i-Name interface
|
|
297
|
-
t-Name type
|
|
298
|
-
v-name variable
|
|
299
|
-
e-Name enum
|
|
300
|
-
m-name method, usually with parent in JSON
|
|
301
|
-
p-name property, usually with parent in JSON
|
|
302
|
-
|
|
303
|
-
DSL request model:
|
|
304
|
-
- directives set defaults for following requests
|
|
305
|
-
- each request line can override defaults with key=value
|
|
306
|
-
- +flag means true
|
|
307
|
-
- -flag means false
|
|
308
|
-
- file/imports/exports/members/code/deps accept a path as the first positional argument; examples below use this shape.
|
|
309
|
-
- Use @file when several following operations share the same file.
|
|
310
|
-
- For one-off file operations, pass the path directly.
|
|
311
|
-
|
|
312
|
-
Syntax:
|
|
313
|
-
@file <path> default file
|
|
314
|
-
@source <path> default sourceFile for mutations
|
|
315
|
-
op arg arg key=value request
|
|
316
|
-
+flag boolean true
|
|
317
|
-
-flag boolean false
|
|
318
|
-
>name save reusable artifact when supported
|
|
319
|
-
old->new rename pair
|
|
320
|
-
Parent.member parent-qualified member
|
|
321
|
-
Parent.{a,b} several members under one parent
|
|
322
|
-
key=[a,b] list value for repeatable fields
|
|
323
|
-
file="path with spaces.ts" quote values with spaces
|
|
324
|
-
detail=sum|loc|code aliases for summary|locations|code
|
|
325
|
-
from=... alias for fromFile
|
|
326
|
-
|
|
327
|
-
Inspect
|
|
328
|
-
|
|
329
|
-
Inspect helps you turn an unknown code area into a small working model.
|
|
330
|
-
|
|
331
|
-
Use it to understand what exists, how pieces connect, what repeats, where a change can spread, and which exact code should enter context next.
|
|
332
|
-
|
|
333
|
-
One useful flow:
|
|
334
|
-
map -> focus -> code
|
|
335
|
-
|
|
336
|
-
map: learn what exists and how it connects
|
|
337
|
-
focus: choose files/entities/usages that matter
|
|
338
|
-
code: fetch exact code needed
|
|
339
|
-
|
|
340
|
-
Choose inspect operation:
|
|
341
|
-
|
|
342
|
-
declarations in one file file
|
|
343
|
-
static/dynamic imports imports
|
|
344
|
-
public API exports
|
|
345
|
-
methods/properties of parent members
|
|
346
|
-
exact implementation code
|
|
347
|
-
outgoing deps of one entity deps
|
|
348
|
-
incoming references/callers usages
|
|
349
|
-
file/module connectivity graph
|
|
350
|
-
compact directory layout tree
|
|
351
|
-
repeated declarations/helpers duplicates
|
|
352
|
-
local import cycles cycles
|
|
353
|
-
|
|
354
|
-
Cycles are available but not expanded in bootstrap:
|
|
355
|
-
aib help inspect.cycles
|
|
356
|
-
|
|
357
|
-
Prefer one batch JSON request for related questions.
|
|
358
|
-
Top-level fields are defaults for every request.
|
|
359
|
-
A request without op uses the top-level op.
|
|
360
|
-
A request without file/scope/target uses the top-level value when applicable.
|
|
361
|
-
Each request may override any default.
|
|
362
|
-
|
|
363
|
-
Batch example:
|
|
364
|
-
|
|
365
|
-
Run:
|
|
366
|
-
aib inspect --stdin
|
|
367
|
-
|
|
368
|
-
Input:
|
|
369
|
-
{
|
|
370
|
-
"file": "src/service.ts",
|
|
371
|
-
"requests": [
|
|
372
|
-
{ "op": "file" },
|
|
373
|
-
{ "op": "members", "entity": "Service" },
|
|
374
|
-
{
|
|
375
|
-
"op": "code",
|
|
376
|
-
"entities": [
|
|
377
|
-
{ "parent": "Service", "entities": ["render", "reset"] },
|
|
378
|
-
"normalize"
|
|
379
|
-
],
|
|
380
|
-
"show": true,
|
|
381
|
-
"save": "service-focus"
|
|
382
|
-
},
|
|
383
|
-
{
|
|
384
|
-
"op": "usages",
|
|
385
|
-
"target": "src/service.ts",
|
|
386
|
-
"entity": "normalize",
|
|
387
|
-
"scope": "src",
|
|
388
|
-
"detail": "locations"
|
|
389
|
-
},
|
|
390
|
-
{
|
|
391
|
-
"op": "duplicates",
|
|
392
|
-
"scope": "src/scripts",
|
|
393
|
-
"detail": "summary",
|
|
394
|
-
"limit": 20
|
|
395
|
-
}
|
|
396
|
-
]
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
Inspect controls:
|
|
400
|
-
|
|
401
|
-
file default file for requests
|
|
402
|
-
target file, dir, or symbol area to analyze
|
|
403
|
-
scope where to search; JSON scope:string|string[]
|
|
404
|
-
entity one symbol
|
|
405
|
-
entities several target symbols; JSON entities:[...]
|
|
406
|
-
parent class/interface parent for methods/properties
|
|
407
|
-
ranges include line/range metadata; JSON ranges:boolean; CLI --ranges
|
|
408
|
-
localOnly show local declarations and reexports without resolving facade API; JSON localOnly:boolean; CLI --local-only
|
|
409
|
-
resolveStar resolve export * through re-exported modules; JSON resolveStar:boolean; CLI --resolve-star
|
|
410
|
-
limit max items in one page; JSON limit:N; CLI --limit N
|
|
411
|
-
offset page offset; JSON offset:N; CLI --offset N
|
|
412
|
-
all return all items; JSON all:boolean; CLI --all
|
|
413
|
-
detail output level; JSON detail:summary|locations|code; CLI --detail summary|locations|code
|
|
414
|
-
show include code output; JSON show:boolean; CLI --show
|
|
415
|
-
save save reusable output; JSON save:"name"; CLI --save name
|
|
416
|
-
exclude skip names/selectors; JSON exclude:[...]
|
|
417
|
-
kinds restrict selector kinds; JSON kinds:["f","t"]
|
|
418
|
-
|
|
419
|
-
Inspect File
|
|
420
|
-
|
|
421
|
-
Use file to map top-level declarations physically present in one file.
|
|
422
|
-
Exported declarations are marked in the output.
|
|
423
|
-
It shows what lives in the file before you decide whether to read code.
|
|
424
|
-
|
|
425
|
-
Good for:
|
|
426
|
-
- mapping an unfamiliar file
|
|
427
|
-
- listing top-level declarations
|
|
428
|
-
- checking whether a file contains real declarations or mostly re-exports
|
|
429
|
-
|
|
430
|
-
Do not add limit just in case.
|
|
431
|
-
file output is compact and most files have far fewer than 100 top-level declarations.
|
|
432
|
-
Use limit only after file output is actually too large.
|
|
433
|
-
|
|
434
|
-
Controls:
|
|
435
|
-
file, ranges, localOnly
|
|
436
|
-
|
|
437
|
-
Specific:
|
|
438
|
-
localOnly show local declarations and reexports without resolving facade API; +localOnly
|
|
439
|
-
|
|
440
|
-
Defaults: +ranges
|
|
441
|
-
Use -ranges to show names without ranges.
|
|
442
|
-
|
|
443
|
-
Run:
|
|
444
|
-
aib inspect --stdin
|
|
445
|
-
|
|
446
|
-
Input:
|
|
447
|
-
{
|
|
448
|
-
"op": "file",
|
|
449
|
-
"file": "src/service.ts",
|
|
450
|
-
"requests": [
|
|
451
|
-
{ "ranges": true },
|
|
452
|
-
{ "file": "src/index.ts", "localOnly": true }
|
|
453
|
-
]
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
inspect file src/service.ts [--ranges] [--local-only]
|
|
457
|
-
|
|
458
|
-
Inspect Imports
|
|
459
|
-
|
|
460
|
-
Use imports to inspect static and dynamic imports in a file.
|
|
461
|
-
If there are no dynamic imports, the dynamic imports block is omitted.
|
|
462
|
-
|
|
463
|
-
Controls:
|
|
464
|
-
file, ranges
|
|
465
|
-
|
|
466
|
-
Defaults: +ranges
|
|
467
|
-
|
|
468
|
-
Run:
|
|
469
|
-
aib inspect --stdin
|
|
470
|
-
|
|
471
|
-
Input:
|
|
472
|
-
imports @svc/service.ts
|
|
473
|
-
|
|
474
|
-
Inspect Exports
|
|
475
|
-
|
|
476
|
-
Use exports to see the public API of one file.
|
|
477
|
-
It answers what other files can import from that file.
|
|
478
|
-
|
|
479
|
-
Important:
|
|
480
|
-
inspect.file marks exported declarations already.
|
|
481
|
-
|
|
482
|
-
Do not batch this for a plain implementation file:
|
|
483
|
-
file src/service.ts
|
|
484
|
-
exports src/service.ts
|
|
485
|
-
|
|
486
|
-
Use exports when you need public module surface, barrels, re-exports, export *, or resolveStar.
|
|
487
|
-
|
|
488
|
-
Good for:
|
|
489
|
-
- checking a module boundary or public surface
|
|
490
|
-
- understanding facade/barrel files
|
|
491
|
-
- resolving export * when the local file only re-exports from elsewhere
|
|
492
|
-
- comparing API shape when public imports matter
|
|
493
|
-
|
|
494
|
-
Controls:
|
|
495
|
-
file, ranges, resolveStar
|
|
496
|
-
|
|
497
|
-
Specific:
|
|
498
|
-
resolveStar resolve export * through re-exported modules; +resolveStar
|
|
499
|
-
|
|
500
|
-
Run:
|
|
501
|
-
aib inspect --stdin
|
|
502
|
-
|
|
503
|
-
Input:
|
|
504
|
-
{
|
|
505
|
-
"op": "exports",
|
|
506
|
-
"file": "src/service.ts",
|
|
507
|
-
"requests": [
|
|
508
|
-
{ "ranges": true },
|
|
509
|
-
{ "file": "src/index.ts", "resolveStar": true }
|
|
510
|
-
]
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
inspect exports src/service.ts [--ranges] [--resolve-star]
|
|
514
|
-
|
|
515
|
-
Inspect Members
|
|
516
|
-
|
|
517
|
-
Use members to map a class/interface/object-like symbol without reading its body.
|
|
518
|
-
It shows the internal shape of a parent entity without reading its full body.
|
|
519
|
-
|
|
520
|
-
Good for:
|
|
521
|
-
- listing member names when the parent entity is known
|
|
522
|
-
- narrowing a large parent entity to relevant members
|
|
523
|
-
- understanding object shape before changing or moving related code
|
|
524
|
-
|
|
525
|
-
Controls:
|
|
526
|
-
file, entity, entities, ranges, limit, offset, all
|
|
527
|
-
|
|
528
|
-
Run:
|
|
529
|
-
aib inspect --stdin
|
|
530
|
-
|
|
531
|
-
Input:
|
|
532
|
-
{
|
|
533
|
-
"file": "src/service.ts",
|
|
534
|
-
"op": "members",
|
|
535
|
-
"limit": 12,
|
|
536
|
-
"requests": [
|
|
537
|
-
{ "entity": "Service" },
|
|
538
|
-
{ "entities": ["ServiceOptions", "WsOptions"], "all": true }
|
|
539
|
-
]
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
inspect members src/service.ts Service [--limit N] [--offset N] [--all] [--ranges]
|
|
543
|
-
|
|
544
|
-
Inspect Code
|
|
545
|
-
|
|
546
|
-
Use code to fetch exact declarations or members.
|
|
547
|
-
It returns focused code without reading the whole file.
|
|
548
|
-
|
|
549
|
-
Good for:
|
|
550
|
-
- reading a known function, class, method, or declaration
|
|
551
|
-
- fetching several related code blocks in one request
|
|
552
|
-
- keeping context focused on code needed for the current task
|
|
553
|
-
|
|
554
|
-
Controls:
|
|
555
|
-
file, entity, entities, parent, show, ranges
|
|
556
|
-
|
|
557
|
-
Specific:
|
|
558
|
-
show include source output
|
|
559
|
-
|
|
560
|
-
Defaults: +show +ranges
|
|
561
|
-
Use -show for names/ranges only.
|
|
562
|
-
Use -ranges for source without ranges.
|
|
563
|
-
|
|
564
|
-
Run:
|
|
565
|
-
aib inspect --stdin
|
|
566
|
-
|
|
567
|
-
Input:
|
|
568
|
-
{
|
|
569
|
-
"file": "src/service.ts",
|
|
570
|
-
"op": "code",
|
|
571
|
-
"requests": [
|
|
572
|
-
{
|
|
573
|
-
"entities": [
|
|
574
|
-
{ "parent": "Service", "entities": ["render", "reset"] },
|
|
575
|
-
"normalize"
|
|
576
|
-
],
|
|
577
|
-
"show": true,
|
|
578
|
-
"save": "service-focus"
|
|
579
|
-
}
|
|
580
|
-
]
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
Inspect Deps
|
|
584
|
-
|
|
585
|
-
Use deps to see what one entity depends on inside its file.
|
|
586
|
-
It separates type-only dependencies from runtime value dependencies.
|
|
587
|
-
|
|
588
|
-
Good for:
|
|
589
|
-
- checking what a symbol may need when moved or extracted
|
|
590
|
-
- spotting nearby types, constants, or helpers tied to one entity
|
|
591
|
-
- deciding whether one symbol is standalone or tied to nearby declarations
|
|
592
|
-
- debugging mutation failures caused by local dependency shape
|
|
593
|
-
|
|
594
|
-
Controls:
|
|
595
|
-
file, entity, entities, parent
|
|
596
|
-
|
|
597
|
-
Run:
|
|
598
|
-
aib inspect --stdin
|
|
599
|
-
|
|
600
|
-
Input:
|
|
601
|
-
{
|
|
602
|
-
"file": "src/service.ts",
|
|
603
|
-
"op": "deps",
|
|
604
|
-
"requests": [
|
|
605
|
-
{ "entity": "createService" },
|
|
606
|
-
{
|
|
607
|
-
"entities": [
|
|
608
|
-
{ "parent": "Service", "entities": ["render", "reset"] }
|
|
609
|
-
]
|
|
610
|
-
}
|
|
611
|
-
]
|
|
612
|
-
}
|
|
613
|
-
|
|
614
|
-
Inspect Usages
|
|
615
|
-
|
|
616
|
-
Use usages to find who references a file, directory, or entity inside a scope.
|
|
617
|
-
It reports real references, not unused imports or text matches.
|
|
618
|
-
For broad impact checks, target-local usages are hidden automatically when the target is inside a wider scope.
|
|
619
|
-
Use includeTarget only when references inside the target file or directory matter.
|
|
620
|
-
|
|
621
|
-
Good for:
|
|
622
|
-
- checking impact before changing behavior
|
|
623
|
-
- finding consumers of an entity or module area
|
|
624
|
-
- confirming whether extracted or renamed code still has callers
|
|
625
|
-
- getting caller locations or caller code without broad file scans
|
|
626
|
-
|
|
627
|
-
Use locations for broad impact checks.
|
|
628
|
-
Use code when usage count is small or caller context matters now.
|
|
629
|
-
|
|
630
|
-
Controls:
|
|
631
|
-
target, scope, entity, entities, parent, detail, limit, all, save, includeTarget
|
|
632
|
-
|
|
633
|
-
Specific:
|
|
634
|
-
includeTarget include references inside the target file/directory; +includeTarget
|
|
635
|
-
|
|
636
|
-
Run:
|
|
637
|
-
aib inspect --stdin
|
|
638
|
-
|
|
639
|
-
Input:
|
|
640
|
-
{
|
|
641
|
-
"op": "usages",
|
|
642
|
-
"target": "src/service.ts",
|
|
643
|
-
"entities": [
|
|
644
|
-
"createService",
|
|
645
|
-
{ "parent": "Service", "entities": ["render", "reset"] }
|
|
646
|
-
],
|
|
647
|
-
"scope": ["src/app", "src/tests"],
|
|
648
|
-
"detail": "locations",
|
|
649
|
-
"save": "service-usages"
|
|
650
|
-
}
|
|
651
|
-
|
|
652
|
-
Inspect Graph
|
|
653
|
-
|
|
654
|
-
Use graph when the question is about file/module boundaries, not one symbol.
|
|
655
|
-
It builds a reusable map of local import relationships, then lets you focus files inside that map.
|
|
656
|
-
|
|
657
|
-
Good for:
|
|
658
|
-
- mapping an unfamiliar directory or subsystem
|
|
659
|
-
- seeing which files are hubs, entrypoints, or leaves
|
|
660
|
-
- comparing a few known areas without mapping all src
|
|
661
|
-
- choosing files/entities to inspect next
|
|
662
|
-
- checking module boundaries when ownership is unclear
|
|
663
|
-
|
|
664
|
-
Use deps for one entity's outgoing dependencies.
|
|
665
|
-
Use usages for real incoming references.
|
|
666
|
-
Use graph for file-level connectivity.
|
|
667
|
-
|
|
668
|
-
Model:
|
|
669
|
-
build graph: scope + view + save
|
|
670
|
-
query graph: fromFile + focus + output toggles
|
|
671
|
-
|
|
672
|
-
view controls what enters the saved graph.
|
|
673
|
-
focus only expands details for files already inside it.
|
|
674
|
-
If focus misses a file, rebuild with wider scope or view.
|
|
675
|
-
|
|
676
|
-
Default view:
|
|
677
|
-
directory scope -> local
|
|
678
|
-
file or multiple scopes -> neighbors
|
|
679
|
-
fromFile -> uses the saved graph
|
|
680
|
-
|
|
681
|
-
Views:
|
|
682
|
-
local only files inside scope; best directory map
|
|
683
|
-
neighbors direct import neighborhood; best file-centered map
|
|
684
|
-
expanded wider neighborhood; more output
|
|
685
|
-
|
|
686
|
-
Scope choice:
|
|
687
|
-
scope: "src" creates a broad reusable map for src.
|
|
688
|
-
scope: "src/services" is cheaper for local work.
|
|
689
|
-
scope: [...] compares known areas without mapping all src.
|
|
690
|
-
|
|
691
|
-
After you understand which graph sections matter, hide the rest with JSON fields or prefs.
|
|
692
|
-
Graph can be noisy; shape it for the current task.
|
|
693
|
-
|
|
694
|
-
Controls:
|
|
695
|
-
scope, view, from, focus, symbolUsage, edges, hubs, entrypoints, leaves, exclude, save
|
|
696
|
-
|
|
697
|
-
Specific:
|
|
698
|
-
view local|neighbors|expanded
|
|
699
|
-
from reuse saved graph index; from=aib:graph:<name>
|
|
700
|
-
focus focus a file inside the graph; focus=path
|
|
701
|
-
symbolUsage show imported symbols on edges; +symbolUsage
|
|
702
|
-
|
|
703
|
-
edges/hubs/entrypoints/leaves output section toggles; +name or -name
|
|
704
|
-
|
|
705
|
-
Run:
|
|
706
|
-
aib inspect --stdin
|
|
707
|
-
|
|
708
|
-
Input:
|
|
709
|
-
{
|
|
710
|
-
"op": "graph",
|
|
711
|
-
"requests": [
|
|
712
|
-
{
|
|
713
|
-
"scope": "src/services",
|
|
714
|
-
"view": "local",
|
|
715
|
-
"save": "services-graph"
|
|
716
|
-
},
|
|
717
|
-
{
|
|
718
|
-
"fromFile": "aib:graph:services-graph",
|
|
719
|
-
"focus": ["src/services/users.ts", "src/services/admins.ts"],
|
|
720
|
-
"symbolUsage": true,
|
|
721
|
-
"edges": false
|
|
722
|
-
}
|
|
723
|
-
]
|
|
724
|
-
}
|
|
725
|
-
|
|
726
|
-
Focus saved graph later:
|
|
727
|
-
inspect graph --from-file aib:graph:services-graph --focus src/services/messages.ts --focus src/services/posts.ts --symbol-usage
|
|
728
|
-
|
|
729
|
-
Inline graph focus can add focus and symbolUsage.
|
|
730
|
-
Inline cannot hide graph sections such as edges/hubs/entrypoints/leaves.
|
|
731
|
-
Use JSON request fields or prefs for section control.
|
|
732
|
-
|
|
733
|
-
Inspect Tree
|
|
734
|
-
|
|
735
|
-
Use tree to list a compact directory layout.
|
|
736
|
-
It is useful before focused inspect when you know the area but not the exact file.
|
|
737
|
-
|
|
738
|
-
Controls:
|
|
739
|
-
scope, depth, minDepth, limit, only, exclude, onlyDirs, ned, nec
|
|
740
|
-
|
|
741
|
-
Specific:
|
|
742
|
-
depth max nesting depth; depth=N
|
|
743
|
-
minDepth hide shallower paths; minDepth=N
|
|
744
|
-
onlyDirs show directories only; +onlyDirs
|
|
745
|
-
only keep only matching files/dirs; only=[...]
|
|
746
|
-
exclude skip matching files/dirs; exclude=[...]
|
|
747
|
-
ned no-default-exclude; show paths hidden by built-in excludes; +ned
|
|
748
|
-
nec no-config-exclude; ignore inspect.tree.*.exclude from aib.json; +nec
|
|
749
|
-
|
|
750
|
-
Run:
|
|
751
|
-
aib inspect --stdin
|
|
752
|
-
|
|
753
|
-
Input:
|
|
754
|
-
tree src depth=4 +onlyDirs limit=200 +ned +nec
|
|
755
|
-
tree @svc depth=3 only=["**/*.ts"] exclude=["**/*.test.ts","**/* copy.ts"]
|
|
756
|
-
tree src depth=3 only=["src/services/**"] limit=80
|
|
757
|
-
|
|
758
|
-
Inspect Duplicates
|
|
759
|
-
|
|
760
|
-
Use duplicates to find repeated top-level names and exact declaration copies.
|
|
761
|
-
It is useful when many files may contain copied local helpers, duplicated types, or repeated declarations.
|
|
762
|
-
|
|
763
|
-
Start with summary for broad scopes.
|
|
764
|
-
Use locations when you need files/lines.
|
|
765
|
-
Use code only for duplicate names you are ready to inspect.
|
|
766
|
-
|
|
767
|
-
Controls:
|
|
768
|
-
scope, detail, limit, offset, kinds, entities, exclude, pathExclude
|
|
769
|
-
|
|
770
|
-
Specific:
|
|
771
|
-
entities only these duplicate names/selectors
|
|
772
|
-
exclude skip these names/selectors
|
|
773
|
-
pathExclude skip files or path/glob-like patterns
|
|
774
|
-
kinds selector kinds, e.g. f, t, c, etc.; kinds=[...]
|
|
775
|
-
|
|
776
|
-
Run:
|
|
777
|
-
aib inspect --stdin
|
|
778
|
-
|
|
779
|
-
Input:
|
|
780
|
-
{
|
|
781
|
-
"scope": "src",
|
|
782
|
-
"detail": "summary",
|
|
783
|
-
"limit": 20
|
|
784
|
-
}
|
|
785
|
-
|
|
786
|
-
Mutation
|
|
787
|
-
|
|
788
|
-
Mutation commands change code through TS/IDE refactors.
|
|
789
|
-
Successful mutations update affected references and imports.
|
|
790
|
-
|
|
791
|
-
After a successful mutation, do not manually patch the same imports unless aib reports a follow-up or checks show a real issue.
|
|
792
|
-
|
|
793
|
-
If move/modulePlan imports do not match the repo style, run:
|
|
794
|
-
aib help config-setup.import-rules
|
|
795
|
-
|
|
796
|
-
AIB mutations are designed to reduce manual checking.
|
|
797
|
-
Your job is to express the intent in DSL.
|
|
798
|
-
AIB's job is to convert that intent into code changes.
|
|
799
|
-
|
|
800
|
-
Do not read all changed files just because a mutation touched them.
|
|
801
|
-
That defeats the purpose of using AIB for mechanical refactors.
|
|
802
|
-
|
|
803
|
-
If the command succeeds, the requested mechanical change was applied.
|
|
804
|
-
After failure or partial success, use the output to decide the next request.
|
|
805
|
-
|
|
806
|
-
When running mutation commands, set the harness timeout to 3 minutes.
|
|
807
|
-
If the harness stops waiting before final output appears, recover with:
|
|
808
|
-
|
|
809
|
-
aib execution status last
|
|
810
|
-
|
|
811
|
-
Modes:
|
|
812
|
-
preview inspect planned edits, then apply by id
|
|
813
|
-
apply write a previewed change
|
|
814
|
-
execute write immediately
|
|
815
|
-
|
|
816
|
-
Use execute for routine rename/move/modulePlan requests.
|
|
817
|
-
|
|
818
|
-
Use preview/apply when you are learning a mutation command, or when one request contains a large multi-step change that you want to inspect before writing files.
|
|
819
|
-
Typical examples: a huge modulePlan or refactor batch.
|
|
820
|
-
|
|
821
|
-
preview/apply uses more tool calls and more output tokens.
|
|
822
|
-
preview validates input and planned edits, but writing files can still hit a TS/IDE refactor error.
|
|
823
|
-
execute writes immediately and reports what changed.
|
|
824
|
-
|
|
825
|
-
If a mutation cannot be completed, aib reports the failed part and the captured input.
|
|
826
|
-
For large or partial requests, edit the captured input and rerun the remaining or changed intent.
|
|
827
|
-
For small requests, write a corrected request instead.
|
|
828
|
-
|
|
829
|
-
Prefer batch JSON for related mutations.
|
|
830
|
-
One request can describe several related changes.
|
|
831
|
-
aib captures JSON input automatically so large failed or partial requests can be edited and rerun.
|
|
832
|
-
|
|
833
|
-
When a batch mutation partly fails, split the next request by failure type.
|
|
834
|
-
|
|
835
|
-
If the failure is wrong input, fix the selector/entity/file and run the corrected remaining intent.
|
|
836
|
-
If TS/IDE cannot apply one part of the batch, do not treat the whole intent as failed.
|
|
837
|
-
Run the next request without the failed part and let aib report any later failures.
|
|
838
|
-
Then decide whether failed parts need smaller requests or manual fallback.
|
|
839
|
-
|
|
840
|
-
Rename
|
|
841
|
-
|
|
842
|
-
Rename is for semantic symbol renames.
|
|
843
|
-
It follows TypeScript references.
|
|
844
|
-
It is not plain-text replacement.
|
|
845
|
-
|
|
846
|
-
Run:
|
|
847
|
-
aib rename execute --stdin
|
|
848
|
-
|
|
849
|
-
Input:
|
|
850
|
-
{
|
|
851
|
-
"file": "src/service.ts",
|
|
852
|
-
"renames": {
|
|
853
|
-
"oldName": "newName",
|
|
854
|
-
"OldService": "NewService"
|
|
855
|
-
}
|
|
856
|
-
}
|
|
857
|
-
|
|
858
|
-
Move
|
|
859
|
-
|
|
860
|
-
Move transfers one or more symbols from one file to another.
|
|
861
|
-
Move is semantic; it moves supported declarations and updates affected imports/references.
|
|
862
|
-
Use it for focused extraction into a single target file.
|
|
863
|
-
For large file splitting across several target files, use modulePlan.
|
|
864
|
-
|
|
865
|
-
If imports created by move do not match the repo style, run:
|
|
866
|
-
aib help config-setup.import-rules
|
|
867
|
-
|
|
868
|
-
Move several entities into one target:
|
|
869
|
-
Run:
|
|
870
|
-
aib move toFile execute --stdin
|
|
871
|
-
|
|
872
|
-
Input:
|
|
873
|
-
{
|
|
874
|
-
"sourceFile": "src/service.ts",
|
|
875
|
-
"targetFile": "src/service.helpers.ts",
|
|
876
|
-
"entities": ["oldHelper", "OtherHelper"]
|
|
877
|
-
}
|
|
878
|
-
|
|
879
|
-
Module Plan
|
|
880
|
-
|
|
881
|
-
modulePlan is for splitting large files into smaller modules.
|
|
882
|
-
Use it when a large file should be refactored into several target files.
|
|
883
|
-
|
|
884
|
-
modulePlan orchestrates semantic moves and updates affected references/imports.
|
|
885
|
-
|
|
886
|
-
If imports created by modulePlan do not match the repo style, run:
|
|
887
|
-
aib help config-setup.import-rules
|
|
888
|
-
|
|
889
|
-
Use expectEmpty when your modulePlan intent is to move all declarations out of the source file.
|
|
890
|
-
It does not change the move behavior; it only asks output to report remaining source declarations if any remain.
|
|
891
|
-
Use it only when remaining declarations would mean the split did not match your intent.
|
|
892
|
-
Do not use it for partial extractions.
|
|
893
|
-
|
|
894
|
-
Split one large source file into several targets:
|
|
895
|
-
Run:
|
|
896
|
-
aib modulePlan execute --stdin
|
|
897
|
-
|
|
898
|
-
Input:
|
|
899
|
-
{
|
|
900
|
-
"sourceFile": "src/large-service.ts",
|
|
901
|
-
"expectEmpty": true,
|
|
902
|
-
"modules": [
|
|
903
|
-
{
|
|
904
|
-
"target": "src/large-service.types.ts",
|
|
905
|
-
"entities": ["ServiceOptions", "ServiceMode"]
|
|
906
|
-
},
|
|
907
|
-
{
|
|
908
|
-
"target": "src/large-service.core.ts",
|
|
909
|
-
"entities": ["LargeService", "createLargeService"]
|
|
910
|
-
}
|
|
911
|
-
]
|
|
912
|
-
}
|
|
913
|
-
|
|
914
|
-
Refactor Batch
|
|
915
|
-
|
|
916
|
-
refactor batch runs related mutation requests together.
|
|
917
|
-
Use it when one workflow needs ordered steps, such as rename plus move.
|
|
918
|
-
|
|
919
|
-
Use modulePlan when the main intent is only to split one large file into target modules.
|
|
920
|
-
Use refactor batch when the split also includes coordinated renames or mixed mutation steps.
|
|
921
|
-
|
|
922
|
-
Example: rename and move in one request
|
|
923
|
-
|
|
924
|
-
Run:
|
|
925
|
-
aib refactor batch execute --stdin
|
|
926
|
-
|
|
927
|
-
Input:
|
|
928
|
-
{
|
|
929
|
-
"sourceFile": "src/service.ts",
|
|
930
|
-
"requests": [
|
|
931
|
-
{
|
|
932
|
-
"op": "rename",
|
|
933
|
-
"renames": {
|
|
934
|
-
"oldHelper": "newHelper",
|
|
935
|
-
"oldType": "newType"
|
|
936
|
-
}
|
|
937
|
-
},
|
|
938
|
-
{
|
|
939
|
-
"op": "move",
|
|
940
|
-
"targetFile": "src/service.helpers.ts",
|
|
941
|
-
"entities": ["newHelper"]
|
|
942
|
-
},
|
|
943
|
-
{
|
|
944
|
-
"op": "move",
|
|
945
|
-
"targetFile": "src/service.types.ts",
|
|
946
|
-
"entities": ["newType"]
|
|
947
|
-
}
|
|
948
|
-
]
|
|
949
|
-
}
|
|
950
|
-
|
|
951
|
-
Imports Normalize
|
|
952
|
-
|
|
953
|
-
Use imports normalize for explicit import-style cleanup.
|
|
954
|
-
It rewrites resolved local import/export specifiers inside a chosen file or directory.
|
|
955
|
-
|
|
956
|
-
Use importNormalize in aib.json for repeated defaults.
|
|
957
|
-
|
|
958
|
-
Good for:
|
|
959
|
-
- converting one area to aliases or relative imports
|
|
960
|
-
- cleaning import style after manual edits or broad refactors
|
|
961
|
-
- applying the same import style to a directory without hand-editing files
|
|
962
|
-
- applying new tsconfig aliases after they are added
|
|
963
|
-
|
|
964
|
-
Controls:
|
|
965
|
-
scope file/dir scope to normalize
|
|
966
|
-
to relative|alias|shortestAlias
|
|
967
|
-
preferAlias select one tsconfig paths pattern when several aliases can resolve the same file
|
|
968
|
-
exclude files, directories, or glob-like patterns to skip
|
|
969
|
-
all show all planned edits; avoid on broad directory scopes
|
|
970
|
-
|
|
971
|
-
Run:
|
|
972
|
-
aib imports normalize preview --stdin
|
|
973
|
-
|
|
974
|
-
Input:
|
|
975
|
-
{
|
|
976
|
-
"scope": "src/services",
|
|
977
|
-
"to": "shortestAlias",
|
|
978
|
-
"exclude": ["src/services/generated", "**/* copy.ts"]
|
|
979
|
-
}
|
|
980
|
-
|
|
981
|
-
Rewrite imports found inside src/core.
|
|
982
|
-
When an imported file can be expressed through @features/*, prefer that alias.
|
|
983
|
-
|
|
984
|
-
Run:
|
|
985
|
-
aib imports normalize preview --stdin
|
|
986
|
-
|
|
987
|
-
Input:
|
|
988
|
-
{
|
|
989
|
-
"scope": "src/core",
|
|
990
|
-
"to": "alias",
|
|
991
|
-
"preferAlias": "@features/*"
|
|
992
|
-
}
|
|
993
|
-
|
|
994
|
-
With matching importNormalize config for this scope or a parent scope, use inline CLI commands:
|
|
995
|
-
|
|
996
|
-
imports normalize preview @svc
|
|
997
|
-
imports normalize execute @svc
|
|
998
|
-
|
|
999
|
-
JS/TS compatibility
|
|
1000
|
-
|
|
1001
|
-
With tsconfig:
|
|
1002
|
-
TS/TSX inspect + rename + move + modulePlan
|
|
1003
|
-
JS/MJS/JSX ESM inspect + rename + move + modulePlan
|
|
1004
|
-
CJS / JS CommonJS inspect + rename
|
|
1005
|
-
|
|
1006
|
-
Without tsconfig:
|
|
1007
|
-
JS/MJS/JSX/CJS inspect only
|
|
1008
|
-
rename/move/modulePlan require tsconfig
|
|
1009
|
-
|
|
1010
|
-
CommonJS means .cjs or module.exports / exports.*.
|
|
1011
|
-
|
|
1012
|
-
View Hidden Output
|
|
1013
|
-
|
|
1014
|
-
AIB keeps large outputs compact.
|
|
1015
|
-
When part of a result is hidden, output may include:
|
|
1016
|
-
|
|
1017
|
-
view: aib:res_<id>
|
|
1018
|
-
|
|
1019
|
-
Use view to fetch the hidden part without repeating what you already saw.
|
|
1020
|
-
|
|
1021
|
-
When a batch has several hidden results of the same kind, output may include:
|
|
1022
|
-
|
|
1023
|
-
view all code: aib:res_<id>
|
|
1024
|
-
view all members: aib:res_<id>
|
|
1025
|
-
|
|
1026
|
-
A `view all` handle covers hidden parts from all results of that kind.
|
|
1027
|
-
|
|
1028
|
-
For code views, narrow what you fetch:
|
|
1029
|
-
only show only these hidden code entities
|
|
1030
|
-
except show all hidden code except these entities
|
|
1031
|
-
|
|
1032
|
-
Run:
|
|
1033
|
-
aib view --stdin
|
|
1034
|
-
|
|
1035
|
-
Input:
|
|
1036
|
-
view aib:res_<id_1> only=[ClassA.{bigA,bigB},bigQ,ClassB.bigB]
|
|
1037
|
-
view aib:res_<id_2> except=[ClassC.bigC]
|
|
1038
|
-
|
|
1039
|
-
Inline:
|
|
1040
|
-
aib view aib:res_<id_1> --only bigQ --only "ClassA.{bigA,bigB}"
|
|
1041
|
-
aib view aib:res_<id_2> --except ClassB.bigB --except ClassC.bigC
|
|
1042
|
-
|
|
1043
|
-
Quick Read
|
|
1044
|
-
|
|
1045
|
-
Use qr for cross-OS quick reads of text files: ts, js, cmd, sh, json, log, txt, ndjson, etc.
|
|
1046
|
-
Use it for compact line windows and batching.
|
|
1047
|
-
qr supports AIB path aliases.
|
|
1048
|
-
|
|
1049
|
-
It is not a replacement for inspect.
|
|
1050
|
-
Use it as a token-efficient way to read text data when semantic inspect is not needed.
|
|
1051
|
-
|
|
1052
|
-
For focused text reads, prefer qr over cat/Get-Content/type, especially when aliases, line windows, or batching help.
|
|
1053
|
-
Use shell reads only when piping into shell tooling or qr is unavailable.
|
|
1054
|
-
|
|
1055
|
-
Controls:
|
|
1056
|
-
-h N head; first N lines
|
|
1057
|
-
-t N tail; last N lines
|
|
1058
|
-
-o N offset; starting line, 1-based
|
|
1059
|
-
-l N limit; line count for offset reads
|
|
1060
|
-
-a all; whole file
|
|
1061
|
-
|
|
1062
|
-
If no window is provided, qr uses -h 80.
|
|
1063
|
-
If -a is present, it wins over other window flags.
|
|
1064
|
-
|
|
1065
|
-
Run:
|
|
1066
|
-
aib qr --stdin
|
|
1067
|
-
|
|
1068
|
-
Input:
|
|
1069
|
-
qr @scripts/a.txt h=80
|
|
1070
|
-
qr @scripts/b.py o=300 l=50
|
|
1071
|
-
qr @scripts/c.md t=120
|
|
1072
|
-
qr @logs/app.log all
|
|
1073
|
-
|
|
1074
|
-
Inline:
|
|
1075
|
-
aib qr @scripts/a.txt -h 80
|
|
1076
|
-
aib qr @scripts/b.py -o 300 -l 50
|
|
1077
|
-
aib qr @logs/app.log -a
|
|
1078
|
-
|
|
1079
|
-
Use stdin for several reads.
|
|
1080
|
-
|
|
1081
|
-
Need to see TypeScript configs in the repo:
|
|
1082
|
-
aib reveal tsconfigs
|
|
1083
|
-
|
|
1084
|
-
Need to see TypeScript aliases across the repo:
|
|
1085
|
-
aib reveal tsaliases
|