@nodetool-ai/cli 0.8.8 → 0.8.9-beta.2
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 +61 -109
- package/dist/.nodetool-build-stamp +1 -1
- package/dist/chat.d.ts +3 -0
- package/dist/chat.d.ts.map +1 -0
- package/dist/chat.js +8 -0
- package/dist/chat.js.map +1 -0
- package/dist/index.d.ts +1 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -231
- package/dist/index.js.map +1 -1
- package/dist/lean/commandFeatures.d.ts +3 -0
- package/dist/lean/commandFeatures.d.ts.map +1 -0
- package/dist/lean/commandFeatures.js +21 -0
- package/dist/lean/commandFeatures.js.map +1 -0
- package/dist/lean/errors.d.ts +19 -0
- package/dist/lean/errors.d.ts.map +1 -0
- package/dist/lean/errors.js +20 -0
- package/dist/lean/errors.js.map +1 -0
- package/dist/lean/program.d.ts +12 -0
- package/dist/lean/program.d.ts.map +1 -0
- package/dist/lean/program.js +398 -0
- package/dist/lean/program.js.map +1 -0
- package/dist/nodetool.js +6 -29
- package/dist/nodetool.js.map +1 -1
- package/package.json +14 -67
- package/dist/ExecutionTree.d.ts +0 -20
- package/dist/ExecutionTree.d.ts.map +0 -1
- package/dist/ExecutionTree.js +0 -100
- package/dist/ExecutionTree.js.map +0 -1
- package/dist/affected/affected.d.ts +0 -48
- package/dist/affected/affected.d.ts.map +0 -1
- package/dist/affected/affected.js +0 -167
- package/dist/affected/affected.js.map +0 -1
- package/dist/agent-toolbelt.d.ts +0 -15
- package/dist/agent-toolbelt.d.ts.map +0 -1
- package/dist/agent-toolbelt.js +0 -28
- package/dist/agent-toolbelt.js.map +0 -1
- package/dist/api-client.d.ts +0 -12
- package/dist/api-client.d.ts.map +0 -1
- package/dist/api-client.js +0 -21
- package/dist/api-client.js.map +0 -1
- package/dist/app-build/bundle.d.ts +0 -15
- package/dist/app-build/bundle.d.ts.map +0 -1
- package/dist/app-build/bundle.js +0 -45
- package/dist/app-build/bundle.js.map +0 -1
- package/dist/app-build/watch.d.ts +0 -13
- package/dist/app-build/watch.d.ts.map +0 -1
- package/dist/app-build/watch.js +0 -25
- package/dist/app-build/watch.js.map +0 -1
- package/dist/app-debug/app-target.d.ts +0 -14
- package/dist/app-debug/app-target.d.ts.map +0 -1
- package/dist/app-debug/app-target.js +0 -120
- package/dist/app-debug/app-target.js.map +0 -1
- package/dist/app-debug/harness.d.ts +0 -29
- package/dist/app-debug/harness.d.ts.map +0 -1
- package/dist/app-debug/harness.js +0 -116
- package/dist/app-debug/harness.js.map +0 -1
- package/dist/app-debug/index.d.ts +0 -12
- package/dist/app-debug/index.d.ts.map +0 -1
- package/dist/app-debug/index.js +0 -9
- package/dist/app-debug/index.js.map +0 -1
- package/dist/app.d.ts +0 -40
- package/dist/app.d.ts.map +0 -1
- package/dist/app.js +0 -1070
- package/dist/app.js.map +0 -1
- package/dist/bash-tool.d.ts +0 -13
- package/dist/bash-tool.d.ts.map +0 -1
- package/dist/bash-tool.js +0 -85
- package/dist/bash-tool.js.map +0 -1
- package/dist/chat-codeact.d.ts +0 -93
- package/dist/chat-codeact.d.ts.map +0 -1
- package/dist/chat-codeact.js +0 -179
- package/dist/chat-codeact.js.map +0 -1
- package/dist/chat-context.d.ts +0 -18
- package/dist/chat-context.d.ts.map +0 -1
- package/dist/chat-context.js +0 -32
- package/dist/chat-context.js.map +0 -1
- package/dist/chat-media.d.ts +0 -3
- package/dist/chat-media.d.ts.map +0 -1
- package/dist/chat-media.js +0 -46
- package/dist/chat-media.js.map +0 -1
- package/dist/chat-prompts.d.ts +0 -20
- package/dist/chat-prompts.d.ts.map +0 -1
- package/dist/chat-prompts.js +0 -42
- package/dist/chat-prompts.js.map +0 -1
- package/dist/chat-sessions.d.ts +0 -25
- package/dist/chat-sessions.d.ts.map +0 -1
- package/dist/chat-sessions.js +0 -153
- package/dist/chat-sessions.js.map +0 -1
- package/dist/child-exit.d.ts +0 -3
- package/dist/child-exit.d.ts.map +0 -1
- package/dist/child-exit.js +0 -17
- package/dist/child-exit.js.map +0 -1
- package/dist/command-errors.d.ts +0 -8
- package/dist/command-errors.d.ts.map +0 -1
- package/dist/command-errors.js +0 -49
- package/dist/command-errors.js.map +0 -1
- package/dist/commands/__tests__/jtbd.test.d.ts +0 -2
- package/dist/commands/__tests__/jtbd.test.d.ts.map +0 -1
- package/dist/commands/__tests__/jtbd.test.js +0 -120
- package/dist/commands/__tests__/jtbd.test.js.map +0 -1
- package/dist/commands/__tests__/runtime.test.d.ts +0 -2
- package/dist/commands/__tests__/runtime.test.d.ts.map +0 -1
- package/dist/commands/__tests__/runtime.test.js +0 -129
- package/dist/commands/__tests__/runtime.test.js.map +0 -1
- package/dist/commands/__tests__/timeline-render-audio.test.d.ts +0 -2
- package/dist/commands/__tests__/timeline-render-audio.test.d.ts.map +0 -1
- package/dist/commands/__tests__/timeline-render-audio.test.js +0 -53
- package/dist/commands/__tests__/timeline-render-audio.test.js.map +0 -1
- package/dist/commands/__tests__/timeline-render-completeness.test.d.ts +0 -2
- package/dist/commands/__tests__/timeline-render-completeness.test.d.ts.map +0 -1
- package/dist/commands/__tests__/timeline-render-completeness.test.js +0 -117
- package/dist/commands/__tests__/timeline-render-completeness.test.js.map +0 -1
- package/dist/commands/__tests__/timeline-render.test.d.ts +0 -2
- package/dist/commands/__tests__/timeline-render.test.d.ts.map +0 -1
- package/dist/commands/__tests__/timeline-render.test.js +0 -115
- package/dist/commands/__tests__/timeline-render.test.js.map +0 -1
- package/dist/commands/__tests__/timeline-score.test.d.ts +0 -2
- package/dist/commands/__tests__/timeline-score.test.d.ts.map +0 -1
- package/dist/commands/__tests__/timeline-score.test.js +0 -100
- package/dist/commands/__tests__/timeline-score.test.js.map +0 -1
- package/dist/commands/affected.d.ts +0 -9
- package/dist/commands/affected.d.ts.map +0 -1
- package/dist/commands/affected.js +0 -127
- package/dist/commands/affected.js.map +0 -1
- package/dist/commands/agent.d.ts +0 -33
- package/dist/commands/agent.d.ts.map +0 -1
- package/dist/commands/agent.js +0 -514
- package/dist/commands/agent.js.map +0 -1
- package/dist/commands/app.d.ts +0 -3
- package/dist/commands/app.d.ts.map +0 -1
- package/dist/commands/app.js +0 -406
- package/dist/commands/app.js.map +0 -1
- package/dist/commands/apps.d.ts +0 -15
- package/dist/commands/apps.d.ts.map +0 -1
- package/dist/commands/apps.js +0 -274
- package/dist/commands/apps.js.map +0 -1
- package/dist/commands/auth.d.ts +0 -12
- package/dist/commands/auth.d.ts.map +0 -1
- package/dist/commands/auth.js +0 -154
- package/dist/commands/auth.js.map +0 -1
- package/dist/commands/authorized-pack-install.d.ts +0 -7
- package/dist/commands/authorized-pack-install.d.ts.map +0 -1
- package/dist/commands/authorized-pack-install.js +0 -20
- package/dist/commands/authorized-pack-install.js.map +0 -1
- package/dist/commands/collections.d.ts +0 -10
- package/dist/commands/collections.d.ts.map +0 -1
- package/dist/commands/collections.js +0 -257
- package/dist/commands/collections.js.map +0 -1
- package/dist/commands/costs.d.ts +0 -15
- package/dist/commands/costs.d.ts.map +0 -1
- package/dist/commands/costs.js +0 -201
- package/dist/commands/costs.js.map +0 -1
- package/dist/commands/db.d.ts +0 -3
- package/dist/commands/db.d.ts.map +0 -1
- package/dist/commands/db.js +0 -176
- package/dist/commands/db.js.map +0 -1
- package/dist/commands/debug-summary-output.d.ts +0 -22
- package/dist/commands/debug-summary-output.d.ts.map +0 -1
- package/dist/commands/debug-summary-output.js +0 -28
- package/dist/commands/debug-summary-output.js.map +0 -1
- package/dist/commands/debug.d.ts +0 -13
- package/dist/commands/debug.d.ts.map +0 -1
- package/dist/commands/debug.js +0 -150
- package/dist/commands/debug.js.map +0 -1
- package/dist/commands/deploy-helpers.d.ts +0 -85
- package/dist/commands/deploy-helpers.d.ts.map +0 -1
- package/dist/commands/deploy-helpers.js +0 -217
- package/dist/commands/deploy-helpers.js.map +0 -1
- package/dist/commands/deploy.d.ts +0 -7
- package/dist/commands/deploy.d.ts.map +0 -1
- package/dist/commands/deploy.js +0 -449
- package/dist/commands/deploy.js.map +0 -1
- package/dist/commands/errors.d.ts +0 -11
- package/dist/commands/errors.d.ts.map +0 -1
- package/dist/commands/errors.js +0 -177
- package/dist/commands/errors.js.map +0 -1
- package/dist/commands/eval.d.ts +0 -152
- package/dist/commands/eval.d.ts.map +0 -1
- package/dist/commands/eval.js +0 -693
- package/dist/commands/eval.js.map +0 -1
- package/dist/commands/extension.d.ts +0 -12
- package/dist/commands/extension.d.ts.map +0 -1
- package/dist/commands/extension.js +0 -30
- package/dist/commands/extension.js.map +0 -1
- package/dist/commands/game-benchmark.d.ts +0 -48
- package/dist/commands/game-benchmark.d.ts.map +0 -1
- package/dist/commands/game-benchmark.js +0 -108
- package/dist/commands/game-benchmark.js.map +0 -1
- package/dist/commands/game-smoke.d.ts +0 -3
- package/dist/commands/game-smoke.d.ts.map +0 -1
- package/dist/commands/game-smoke.js +0 -23
- package/dist/commands/game-smoke.js.map +0 -1
- package/dist/commands/game.d.ts +0 -4
- package/dist/commands/game.d.ts.map +0 -1
- package/dist/commands/game.js +0 -856
- package/dist/commands/game.js.map +0 -1
- package/dist/commands/generate.d.ts +0 -17
- package/dist/commands/generate.d.ts.map +0 -1
- package/dist/commands/generate.js +0 -326
- package/dist/commands/generate.js.map +0 -1
- package/dist/commands/generations.d.ts +0 -17
- package/dist/commands/generations.d.ts.map +0 -1
- package/dist/commands/generations.js +0 -408
- package/dist/commands/generations.js.map +0 -1
- package/dist/commands/harness.d.ts +0 -90
- package/dist/commands/harness.d.ts.map +0 -1
- package/dist/commands/harness.js +0 -892
- package/dist/commands/harness.js.map +0 -1
- package/dist/commands/install-missing-packs.d.ts +0 -21
- package/dist/commands/install-missing-packs.d.ts.map +0 -1
- package/dist/commands/install-missing-packs.js +0 -48
- package/dist/commands/install-missing-packs.js.map +0 -1
- package/dist/commands/js-script-validation-output.d.ts +0 -7
- package/dist/commands/js-script-validation-output.d.ts.map +0 -1
- package/dist/commands/js-script-validation-output.js +0 -5
- package/dist/commands/js-script-validation-output.js.map +0 -1
- package/dist/commands/js-script-versions.d.ts +0 -53
- package/dist/commands/js-script-versions.d.ts.map +0 -1
- package/dist/commands/js-script-versions.js +0 -89
- package/dist/commands/js-script-versions.js.map +0 -1
- package/dist/commands/js-script.d.ts +0 -29
- package/dist/commands/js-script.d.ts.map +0 -1
- package/dist/commands/js-script.js +0 -240
- package/dist/commands/js-script.js.map +0 -1
- package/dist/commands/jtbd.d.ts +0 -38
- package/dist/commands/jtbd.d.ts.map +0 -1
- package/dist/commands/jtbd.js +0 -261
- package/dist/commands/jtbd.js.map +0 -1
- package/dist/commands/local-db.d.ts +0 -16
- package/dist/commands/local-db.d.ts.map +0 -1
- package/dist/commands/local-db.js +0 -33
- package/dist/commands/local-db.js.map +0 -1
- package/dist/commands/mcp.d.ts +0 -21
- package/dist/commands/mcp.d.ts.map +0 -1
- package/dist/commands/mcp.js +0 -166
- package/dist/commands/mcp.js.map +0 -1
- package/dist/commands/migrate-code-inputs.d.ts +0 -24
- package/dist/commands/migrate-code-inputs.d.ts.map +0 -1
- package/dist/commands/migrate-code-inputs.js +0 -120
- package/dist/commands/migrate-code-inputs.js.map +0 -1
- package/dist/commands/models-hf.d.ts +0 -9
- package/dist/commands/models-hf.d.ts.map +0 -1
- package/dist/commands/models-hf.js +0 -235
- package/dist/commands/models-hf.js.map +0 -1
- package/dist/commands/models-recommended.d.ts +0 -10
- package/dist/commands/models-recommended.d.ts.map +0 -1
- package/dist/commands/models-recommended.js +0 -120
- package/dist/commands/models-recommended.js.map +0 -1
- package/dist/commands/node.d.ts +0 -10
- package/dist/commands/node.d.ts.map +0 -1
- package/dist/commands/node.js +0 -130
- package/dist/commands/node.js.map +0 -1
- package/dist/commands/output.d.ts +0 -32
- package/dist/commands/output.d.ts.map +0 -1
- package/dist/commands/output.js +0 -150
- package/dist/commands/output.js.map +0 -1
- package/dist/commands/pack-install-authorization.d.ts +0 -40
- package/dist/commands/pack-install-authorization.d.ts.map +0 -1
- package/dist/commands/pack-install-authorization.js +0 -131
- package/dist/commands/pack-install-authorization.js.map +0 -1
- package/dist/commands/pack-management.d.ts +0 -26
- package/dist/commands/pack-management.d.ts.map +0 -1
- package/dist/commands/pack-management.js +0 -74
- package/dist/commands/pack-management.js.map +0 -1
- package/dist/commands/package-helpers.d.ts +0 -8
- package/dist/commands/package-helpers.d.ts.map +0 -1
- package/dist/commands/package-helpers.js +0 -53
- package/dist/commands/package-helpers.js.map +0 -1
- package/dist/commands/package.d.ts +0 -3
- package/dist/commands/package.d.ts.map +0 -1
- package/dist/commands/package.js +0 -258
- package/dist/commands/package.js.map +0 -1
- package/dist/commands/packs.d.ts +0 -14
- package/dist/commands/packs.d.ts.map +0 -1
- package/dist/commands/packs.js +0 -65
- package/dist/commands/packs.js.map +0 -1
- package/dist/commands/projects.d.ts +0 -11
- package/dist/commands/projects.d.ts.map +0 -1
- package/dist/commands/projects.js +0 -145
- package/dist/commands/projects.js.map +0 -1
- package/dist/commands/reliability.d.ts +0 -14
- package/dist/commands/reliability.d.ts.map +0 -1
- package/dist/commands/reliability.js +0 -81
- package/dist/commands/reliability.js.map +0 -1
- package/dist/commands/resource-read.d.ts +0 -28
- package/dist/commands/resource-read.d.ts.map +0 -1
- package/dist/commands/resource-read.js +0 -314
- package/dist/commands/resource-read.js.map +0 -1
- package/dist/commands/runs.d.ts +0 -7
- package/dist/commands/runs.d.ts.map +0 -1
- package/dist/commands/runs.js +0 -302
- package/dist/commands/runs.js.map +0 -1
- package/dist/commands/runtime.d.ts +0 -3
- package/dist/commands/runtime.d.ts.map +0 -1
- package/dist/commands/runtime.js +0 -169
- package/dist/commands/runtime.js.map +0 -1
- package/dist/commands/sketch-render.d.ts +0 -46
- package/dist/commands/sketch-render.d.ts.map +0 -1
- package/dist/commands/sketch-render.js +0 -131
- package/dist/commands/sketch-render.js.map +0 -1
- package/dist/commands/sketch-validation-output.d.ts +0 -7
- package/dist/commands/sketch-validation-output.d.ts.map +0 -1
- package/dist/commands/sketch-validation-output.js +0 -5
- package/dist/commands/sketch-validation-output.js.map +0 -1
- package/dist/commands/sketch-versions.d.ts +0 -66
- package/dist/commands/sketch-versions.d.ts.map +0 -1
- package/dist/commands/sketch-versions.js +0 -108
- package/dist/commands/sketch-versions.js.map +0 -1
- package/dist/commands/sketch.d.ts +0 -22
- package/dist/commands/sketch.d.ts.map +0 -1
- package/dist/commands/sketch.js +0 -101
- package/dist/commands/sketch.js.map +0 -1
- package/dist/commands/storage.d.ts +0 -24
- package/dist/commands/storage.d.ts.map +0 -1
- package/dist/commands/storage.js +0 -112
- package/dist/commands/storage.js.map +0 -1
- package/dist/commands/telegram.d.ts +0 -11
- package/dist/commands/telegram.d.ts.map +0 -1
- package/dist/commands/telegram.js +0 -66
- package/dist/commands/telegram.js.map +0 -1
- package/dist/commands/telemetry.d.ts +0 -24
- package/dist/commands/telemetry.d.ts.map +0 -1
- package/dist/commands/telemetry.js +0 -116
- package/dist/commands/telemetry.js.map +0 -1
- package/dist/commands/timeline-render.d.ts +0 -75
- package/dist/commands/timeline-render.d.ts.map +0 -1
- package/dist/commands/timeline-render.js +0 -465
- package/dist/commands/timeline-render.js.map +0 -1
- package/dist/commands/timeline-score.d.ts +0 -16
- package/dist/commands/timeline-score.d.ts.map +0 -1
- package/dist/commands/timeline-score.js +0 -89
- package/dist/commands/timeline-score.js.map +0 -1
- package/dist/commands/timeline-validation-output.d.ts +0 -7
- package/dist/commands/timeline-validation-output.d.ts.map +0 -1
- package/dist/commands/timeline-validation-output.js +0 -9
- package/dist/commands/timeline-validation-output.js.map +0 -1
- package/dist/commands/timeline-versions.d.ts +0 -72
- package/dist/commands/timeline-versions.d.ts.map +0 -1
- package/dist/commands/timeline-versions.js +0 -108
- package/dist/commands/timeline-versions.js.map +0 -1
- package/dist/commands/timeline.d.ts +0 -22
- package/dist/commands/timeline.d.ts.map +0 -1
- package/dist/commands/timeline.js +0 -103
- package/dist/commands/timeline.js.map +0 -1
- package/dist/commands/tools.d.ts +0 -11
- package/dist/commands/tools.d.ts.map +0 -1
- package/dist/commands/tools.js +0 -206
- package/dist/commands/tools.js.map +0 -1
- package/dist/commands/validate.d.ts +0 -24
- package/dist/commands/validate.d.ts.map +0 -1
- package/dist/commands/validate.js +0 -132
- package/dist/commands/validate.js.map +0 -1
- package/dist/commands/validation-output.d.ts +0 -25
- package/dist/commands/validation-output.d.ts.map +0 -1
- package/dist/commands/validation-output.js +0 -29
- package/dist/commands/validation-output.js.map +0 -1
- package/dist/commands/version-commands.d.ts +0 -91
- package/dist/commands/version-commands.d.ts.map +0 -1
- package/dist/commands/version-commands.js +0 -222
- package/dist/commands/version-commands.js.map +0 -1
- package/dist/commands/worker-models.d.ts +0 -13
- package/dist/commands/worker-models.d.ts.map +0 -1
- package/dist/commands/worker-models.js +0 -207
- package/dist/commands/worker-models.js.map +0 -1
- package/dist/commands/worker.d.ts +0 -23
- package/dist/commands/worker.d.ts.map +0 -1
- package/dist/commands/worker.js +0 -374
- package/dist/commands/worker.js.map +0 -1
- package/dist/debug/browser-runner.d.ts +0 -21
- package/dist/debug/browser-runner.d.ts.map +0 -1
- package/dist/debug/browser-runner.js +0 -196
- package/dist/debug/browser-runner.js.map +0 -1
- package/dist/debug/collector.d.ts +0 -9
- package/dist/debug/collector.d.ts.map +0 -1
- package/dist/debug/collector.js +0 -9
- package/dist/debug/collector.js.map +0 -1
- package/dist/debug/diff.d.ts +0 -48
- package/dist/debug/diff.d.ts.map +0 -1
- package/dist/debug/diff.js +0 -68
- package/dist/debug/diff.js.map +0 -1
- package/dist/debug/harness.d.ts +0 -11
- package/dist/debug/harness.d.ts.map +0 -1
- package/dist/debug/harness.js +0 -103
- package/dist/debug/harness.js.map +0 -1
- package/dist/debug/index.d.ts +0 -17
- package/dist/debug/index.d.ts.map +0 -1
- package/dist/debug/index.js +0 -16
- package/dist/debug/index.js.map +0 -1
- package/dist/debug/markdown.d.ts +0 -3
- package/dist/debug/markdown.d.ts.map +0 -1
- package/dist/debug/markdown.js +0 -127
- package/dist/debug/markdown.js.map +0 -1
- package/dist/debug/server-runner.d.ts +0 -24
- package/dist/debug/server-runner.d.ts.map +0 -1
- package/dist/debug/server-runner.js +0 -211
- package/dist/debug/server-runner.js.map +0 -1
- package/dist/debug/target.d.ts +0 -34
- package/dist/debug/target.d.ts.map +0 -1
- package/dist/debug/target.js +0 -95
- package/dist/debug/target.js.map +0 -1
- package/dist/debug/trace.d.ts +0 -30
- package/dist/debug/trace.d.ts.map +0 -1
- package/dist/debug/trace.js +0 -87
- package/dist/debug/trace.js.map +0 -1
- package/dist/debug/types.d.ts +0 -82
- package/dist/debug/types.d.ts.map +0 -1
- package/dist/debug/types.js +0 -13
- package/dist/debug/types.js.map +0 -1
- package/dist/debug/verdict.d.ts +0 -3
- package/dist/debug/verdict.d.ts.map +0 -1
- package/dist/debug/verdict.js +0 -78
- package/dist/debug/verdict.js.map +0 -1
- package/dist/debug/watch.d.ts +0 -23
- package/dist/debug/watch.d.ts.map +0 -1
- package/dist/debug/watch.js +0 -68
- package/dist/debug/watch.js.map +0 -1
- package/dist/debug-bundle.d.ts +0 -12
- package/dist/debug-bundle.d.ts.map +0 -1
- package/dist/debug-bundle.js +0 -23
- package/dist/debug-bundle.js.map +0 -1
- package/dist/diagnose.d.ts +0 -139
- package/dist/diagnose.d.ts.map +0 -1
- package/dist/diagnose.js +0 -418
- package/dist/diagnose.js.map +0 -1
- package/dist/document-json.d.ts +0 -11
- package/dist/document-json.d.ts.map +0 -1
- package/dist/document-json.js +0 -27
- package/dist/document-json.js.map +0 -1
- package/dist/evals/graph-runner.d.ts +0 -8
- package/dist/evals/graph-runner.d.ts.map +0 -1
- package/dist/evals/graph-runner.js +0 -136
- package/dist/evals/graph-runner.js.map +0 -1
- package/dist/harness/capability-coverage.d.ts +0 -163
- package/dist/harness/capability-coverage.d.ts.map +0 -1
- package/dist/harness/capability-coverage.js +0 -295
- package/dist/harness/capability-coverage.js.map +0 -1
- package/dist/harness/capability-table.d.ts +0 -17
- package/dist/harness/capability-table.d.ts.map +0 -1
- package/dist/harness/capability-table.js +0 -3925
- package/dist/harness/capability-table.js.map +0 -1
- package/dist/harness/changed-files.d.ts +0 -20
- package/dist/harness/changed-files.d.ts.map +0 -1
- package/dist/harness/changed-files.js +0 -90
- package/dist/harness/changed-files.js.map +0 -1
- package/dist/harness/declared-capabilities.d.ts +0 -12
- package/dist/harness/declared-capabilities.d.ts.map +0 -1
- package/dist/harness/declared-capabilities.js +0 -21
- package/dist/harness/declared-capabilities.js.map +0 -1
- package/dist/harness/registry.d.ts +0 -190
- package/dist/harness/registry.d.ts.map +0 -1
- package/dist/harness/registry.js +0 -2341
- package/dist/harness/registry.js.map +0 -1
- package/dist/install-lock.d.ts +0 -12
- package/dist/install-lock.d.ts.map +0 -1
- package/dist/install-lock.js +0 -139
- package/dist/install-lock.js.map +0 -1
- package/dist/interaction-script.d.ts +0 -40
- package/dist/interaction-script.d.ts.map +0 -1
- package/dist/interaction-script.js +0 -104
- package/dist/interaction-script.js.map +0 -1
- package/dist/js-script-debug/harness.d.ts +0 -146
- package/dist/js-script-debug/harness.d.ts.map +0 -1
- package/dist/js-script-debug/harness.js +0 -220
- package/dist/js-script-debug/harness.js.map +0 -1
- package/dist/js-script-debug/index.d.ts +0 -9
- package/dist/js-script-debug/index.d.ts.map +0 -1
- package/dist/js-script-debug/index.js +0 -9
- package/dist/js-script-debug/index.js.map +0 -1
- package/dist/js-script-debug/interactions.d.ts +0 -19
- package/dist/js-script-debug/interactions.d.ts.map +0 -1
- package/dist/js-script-debug/interactions.js +0 -17
- package/dist/js-script-debug/interactions.js.map +0 -1
- package/dist/js-script-debug/target.d.ts +0 -20
- package/dist/js-script-debug/target.d.ts.map +0 -1
- package/dist/js-script-debug/target.js +0 -55
- package/dist/js-script-debug/target.js.map +0 -1
- package/dist/local-model-interfaces.d.ts +0 -20
- package/dist/local-model-interfaces.d.ts.map +0 -1
- package/dist/local-model-interfaces.js +0 -41
- package/dist/local-model-interfaces.js.map +0 -1
- package/dist/local-secrets.d.ts +0 -3
- package/dist/local-secrets.d.ts.map +0 -1
- package/dist/local-secrets.js +0 -16
- package/dist/local-secrets.js.map +0 -1
- package/dist/markdown.d.ts +0 -9
- package/dist/markdown.d.ts.map +0 -1
- package/dist/markdown.js +0 -53
- package/dist/markdown.js.map +0 -1
- package/dist/node/run-node.d.ts +0 -31
- package/dist/node/run-node.d.ts.map +0 -1
- package/dist/node/run-node.js +0 -92
- package/dist/node/run-node.js.map +0 -1
- package/dist/node-registry.d.ts +0 -29
- package/dist/node-registry.d.ts.map +0 -1
- package/dist/node-registry.js +0 -38
- package/dist/node-registry.js.map +0 -1
- package/dist/nodetool-main.d.ts +0 -15
- package/dist/nodetool-main.d.ts.map +0 -1
- package/dist/nodetool-main.js +0 -1456
- package/dist/nodetool-main.js.map +0 -1
- package/dist/npm-runner.d.ts +0 -23
- package/dist/npm-runner.d.ts.map +0 -1
- package/dist/npm-runner.js +0 -160
- package/dist/npm-runner.js.map +0 -1
- package/dist/numeric-options.d.ts +0 -22
- package/dist/numeric-options.d.ts.map +0 -1
- package/dist/numeric-options.js +0 -45
- package/dist/numeric-options.js.map +0 -1
- package/dist/optional-node-root.d.ts +0 -10
- package/dist/optional-node-root.d.ts.map +0 -1
- package/dist/optional-node-root.js +0 -26
- package/dist/optional-node-root.js.map +0 -1
- package/dist/package-assets.d.ts +0 -8
- package/dist/package-assets.d.ts.map +0 -1
- package/dist/package-assets.js +0 -21
- package/dist/package-assets.js.map +0 -1
- package/dist/packs/command-service.d.ts +0 -14
- package/dist/packs/command-service.d.ts.map +0 -1
- package/dist/packs/command-service.js +0 -195
- package/dist/packs/command-service.js.map +0 -1
- package/dist/packs/doctor-lock.d.ts +0 -8
- package/dist/packs/doctor-lock.d.ts.map +0 -1
- package/dist/packs/doctor-lock.js +0 -50
- package/dist/packs/doctor-lock.js.map +0 -1
- package/dist/packs/doctor.d.ts +0 -25
- package/dist/packs/doctor.d.ts.map +0 -1
- package/dist/packs/doctor.js +0 -12
- package/dist/packs/doctor.js.map +0 -1
- package/dist/packs/global-bootstrap.d.ts +0 -11
- package/dist/packs/global-bootstrap.d.ts.map +0 -1
- package/dist/packs/global-bootstrap.js +0 -72
- package/dist/packs/global-bootstrap.js.map +0 -1
- package/dist/packs/host.d.ts +0 -17
- package/dist/packs/host.d.ts.map +0 -1
- package/dist/packs/host.js +0 -79
- package/dist/packs/host.js.map +0 -1
- package/dist/packs/install-manifests.d.ts +0 -2
- package/dist/packs/install-manifests.d.ts.map +0 -1
- package/dist/packs/install-manifests.js +0 -30
- package/dist/packs/install-manifests.js.map +0 -1
- package/dist/packs/install-process.d.ts +0 -4
- package/dist/packs/install-process.d.ts.map +0 -1
- package/dist/packs/install-process.js +0 -11
- package/dist/packs/install-process.js.map +0 -1
- package/dist/packs/install-selection.d.ts +0 -39
- package/dist/packs/install-selection.d.ts.map +0 -1
- package/dist/packs/install-selection.js +0 -67
- package/dist/packs/install-selection.js.map +0 -1
- package/dist/packs/install-state.d.ts +0 -21
- package/dist/packs/install-state.d.ts.map +0 -1
- package/dist/packs/install-state.js +0 -44
- package/dist/packs/install-state.js.map +0 -1
- package/dist/packs/install-tree.d.ts +0 -35
- package/dist/packs/install-tree.d.ts.map +0 -1
- package/dist/packs/install-tree.js +0 -253
- package/dist/packs/install-tree.js.map +0 -1
- package/dist/packs/install-verification.d.ts +0 -12
- package/dist/packs/install-verification.d.ts.map +0 -1
- package/dist/packs/install-verification.js +0 -76
- package/dist/packs/install-verification.js.map +0 -1
- package/dist/packs/installed.d.ts +0 -36
- package/dist/packs/installed.d.ts.map +0 -1
- package/dist/packs/installed.js +0 -87
- package/dist/packs/installed.js.map +0 -1
- package/dist/packs/installer-load-check.d.ts +0 -4
- package/dist/packs/installer-load-check.d.ts.map +0 -1
- package/dist/packs/installer-load-check.js +0 -52
- package/dist/packs/installer-load-check.js.map +0 -1
- package/dist/packs/installer.d.ts +0 -16
- package/dist/packs/installer.d.ts.map +0 -1
- package/dist/packs/installer.js +0 -142
- package/dist/packs/installer.js.map +0 -1
- package/dist/packs/management.d.ts +0 -51
- package/dist/packs/management.d.ts.map +0 -1
- package/dist/packs/management.js +0 -81
- package/dist/packs/management.js.map +0 -1
- package/dist/packs/mode.d.ts +0 -42
- package/dist/packs/mode.d.ts.map +0 -1
- package/dist/packs/mode.js +0 -215
- package/dist/packs/mode.js.map +0 -1
- package/dist/packs/owned-replay-plan.d.ts +0 -5
- package/dist/packs/owned-replay-plan.d.ts.map +0 -1
- package/dist/packs/owned-replay-plan.js +0 -68
- package/dist/packs/owned-replay-plan.js.map +0 -1
- package/dist/packs/removal-selection.d.ts +0 -12
- package/dist/packs/removal-selection.d.ts.map +0 -1
- package/dist/packs/removal-selection.js +0 -169
- package/dist/packs/removal-selection.js.map +0 -1
- package/dist/packs/removal.d.ts +0 -12
- package/dist/packs/removal.d.ts.map +0 -1
- package/dist/packs/removal.js +0 -138
- package/dist/packs/removal.js.map +0 -1
- package/dist/packs/repair.d.ts +0 -2
- package/dist/packs/repair.d.ts.map +0 -1
- package/dist/packs/repair.js +0 -2
- package/dist/packs/repair.js.map +0 -1
- package/dist/packs/serve.d.ts +0 -2
- package/dist/packs/serve.d.ts.map +0 -1
- package/dist/packs/serve.js +0 -14
- package/dist/packs/serve.js.map +0 -1
- package/dist/permission-gate.d.ts +0 -55
- package/dist/permission-gate.d.ts.map +0 -1
- package/dist/permission-gate.js +0 -118
- package/dist/permission-gate.js.map +0 -1
- package/dist/predicates.d.ts +0 -6
- package/dist/predicates.d.ts.map +0 -1
- package/dist/predicates.js +0 -6
- package/dist/predicates.js.map +0 -1
- package/dist/providers.d.ts +0 -117
- package/dist/providers.d.ts.map +0 -1
- package/dist/providers.js +0 -491
- package/dist/providers.js.map +0 -1
- package/dist/readline-input.d.ts +0 -23
- package/dist/readline-input.d.ts.map +0 -1
- package/dist/readline-input.js +0 -210
- package/dist/readline-input.js.map +0 -1
- package/dist/run-budget.d.ts +0 -40
- package/dist/run-budget.d.ts.map +0 -1
- package/dist/run-budget.js +0 -119
- package/dist/run-budget.js.map +0 -1
- package/dist/run-dsl-supervised.d.ts +0 -11
- package/dist/run-dsl-supervised.d.ts.map +0 -1
- package/dist/run-dsl-supervised.js +0 -89
- package/dist/run-dsl-supervised.js.map +0 -1
- package/dist/run-dsl.d.ts +0 -40
- package/dist/run-dsl.d.ts.map +0 -1
- package/dist/run-dsl.js +0 -65
- package/dist/run-dsl.js.map +0 -1
- package/dist/run-json.d.ts +0 -24
- package/dist/run-json.d.ts.map +0 -1
- package/dist/run-json.js +0 -132
- package/dist/run-json.js.map +0 -1
- package/dist/runtime-env.d.ts +0 -4
- package/dist/runtime-env.d.ts.map +0 -1
- package/dist/runtime-env.js +0 -31
- package/dist/runtime-env.js.map +0 -1
- package/dist/sandbox-catalog.d.ts +0 -26
- package/dist/sandbox-catalog.d.ts.map +0 -1
- package/dist/sandbox-catalog.js +0 -83
- package/dist/sandbox-catalog.js.map +0 -1
- package/dist/settings.d.ts +0 -19
- package/dist/settings.d.ts.map +0 -1
- package/dist/settings.js +0 -146
- package/dist/settings.js.map +0 -1
- package/dist/sketch-debug/harness.d.ts +0 -101
- package/dist/sketch-debug/harness.d.ts.map +0 -1
- package/dist/sketch-debug/harness.js +0 -118
- package/dist/sketch-debug/harness.js.map +0 -1
- package/dist/sketch-debug/index.d.ts +0 -9
- package/dist/sketch-debug/index.d.ts.map +0 -1
- package/dist/sketch-debug/index.js +0 -9
- package/dist/sketch-debug/index.js.map +0 -1
- package/dist/sketch-debug/interactions.d.ts +0 -19
- package/dist/sketch-debug/interactions.d.ts.map +0 -1
- package/dist/sketch-debug/interactions.js +0 -17
- package/dist/sketch-debug/interactions.js.map +0 -1
- package/dist/sketch-debug/target.d.ts +0 -48
- package/dist/sketch-debug/target.d.ts.map +0 -1
- package/dist/sketch-debug/target.js +0 -115
- package/dist/sketch-debug/target.js.map +0 -1
- package/dist/stdin.d.ts +0 -52
- package/dist/stdin.d.ts.map +0 -1
- package/dist/stdin.js +0 -363
- package/dist/stdin.js.map +0 -1
- package/dist/supervisor.d.ts +0 -97
- package/dist/supervisor.d.ts.map +0 -1
- package/dist/supervisor.js +0 -194
- package/dist/supervisor.js.map +0 -1
- package/dist/telemetry.d.ts +0 -38
- package/dist/telemetry.d.ts.map +0 -1
- package/dist/telemetry.js +0 -158
- package/dist/telemetry.js.map +0 -1
- package/dist/terminal-clipboard.d.ts +0 -3
- package/dist/terminal-clipboard.d.ts.map +0 -1
- package/dist/terminal-clipboard.js +0 -24
- package/dist/terminal-clipboard.js.map +0 -1
- package/dist/terminal-mouse.d.ts +0 -24
- package/dist/terminal-mouse.d.ts.map +0 -1
- package/dist/terminal-mouse.js +0 -84
- package/dist/terminal-mouse.js.map +0 -1
- package/dist/terminal-screen.d.ts +0 -41
- package/dist/terminal-screen.d.ts.map +0 -1
- package/dist/terminal-screen.js +0 -228
- package/dist/terminal-screen.js.map +0 -1
- package/dist/timeline-debug/harness.d.ts +0 -93
- package/dist/timeline-debug/harness.d.ts.map +0 -1
- package/dist/timeline-debug/harness.js +0 -100
- package/dist/timeline-debug/harness.js.map +0 -1
- package/dist/timeline-debug/index.d.ts +0 -9
- package/dist/timeline-debug/index.d.ts.map +0 -1
- package/dist/timeline-debug/index.js +0 -9
- package/dist/timeline-debug/index.js.map +0 -1
- package/dist/timeline-debug/interactions.d.ts +0 -19
- package/dist/timeline-debug/interactions.d.ts.map +0 -1
- package/dist/timeline-debug/interactions.js +0 -17
- package/dist/timeline-debug/interactions.js.map +0 -1
- package/dist/timeline-debug/target.d.ts +0 -34
- package/dist/timeline-debug/target.d.ts.map +0 -1
- package/dist/timeline-debug/target.js +0 -109
- package/dist/timeline-debug/target.js.map +0 -1
- package/dist/tool-format.d.ts +0 -54
- package/dist/tool-format.d.ts.map +0 -1
- package/dist/tool-format.js +0 -360
- package/dist/tool-format.js.map +0 -1
- package/dist/useExecutionState.d.ts +0 -44
- package/dist/useExecutionState.d.ts.map +0 -1
- package/dist/useExecutionState.js +0 -285
- package/dist/useExecutionState.js.map +0 -1
- package/dist/validate/index.d.ts +0 -29
- package/dist/validate/index.d.ts.map +0 -1
- package/dist/validate/index.js +0 -79
- package/dist/validate/index.js.map +0 -1
- package/dist/websocket-client.d.ts +0 -163
- package/dist/websocket-client.d.ts.map +0 -1
- package/dist/websocket-client.js +0 -677
- package/dist/websocket-client.js.map +0 -1
- package/dist/workflow-file.d.ts +0 -3
- package/dist/workflow-file.d.ts.map +0 -1
- package/dist/workflow-file.js +0 -176
- package/dist/workflow-file.js.map +0 -1
package/dist/packs/removal.js
DELETED
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import { realpath, rm } from "node:fs/promises";
|
|
2
|
-
import { dirname, relative, resolve, sep } from "node:path";
|
|
3
|
-
import { z } from "zod";
|
|
4
|
-
import { acquireInstallLock } from "../install-lock.js";
|
|
5
|
-
import { assertLiveInstallAuthorization, assertInstallAuthorizationScope } from "../commands/pack-install-authorization.js";
|
|
6
|
-
import { DEFAULT_INSTALLER_OPERATIONS } from "./installer.js";
|
|
7
|
-
import { preparePackRemoval } from "./removal-selection.js";
|
|
8
|
-
import { prepareTreeVerification } from "./install-verification.js";
|
|
9
|
-
import { captureInstallManifests } from "./install-manifests.js";
|
|
10
|
-
import { writeDesiredState } from "./install-state.js";
|
|
11
|
-
import { snapshotInstallTree, assertTreePins, assertSharedIdentities, installTreeRestored, parseInstallPlan } from "./install-tree.js";
|
|
12
|
-
const removalEntry = z.object({ name: z.string(), version: z.string(), path: z.string().optional() });
|
|
13
|
-
function folderName(entry) { return entry.path.split("node_modules/").at(-1); }
|
|
14
|
-
async function removeOwnedDirectories(root, nodeModules, paths, before) {
|
|
15
|
-
const modules = await realpath(nodeModules);
|
|
16
|
-
if (modules !== resolve(root, "node_modules")) {
|
|
17
|
-
throw new Error("Removal root differs from the admitted tree");
|
|
18
|
-
}
|
|
19
|
-
const protectedAncestors = new Set();
|
|
20
|
-
for (const entry of before.filter((entry) => !paths.has(entry.path))) {
|
|
21
|
-
let prefix = "";
|
|
22
|
-
for (const segment of entry.path.split("/")) {
|
|
23
|
-
prefix = prefix ? `${prefix}/${segment}` : segment;
|
|
24
|
-
protectedAncestors.add(prefix);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
const current = await snapshotInstallTree(root);
|
|
28
|
-
const removed = new Set();
|
|
29
|
-
for (const entry of current.filter((entry) => paths.has(entry.path)).sort((a, b) => a.path.length - b.path.length)) {
|
|
30
|
-
let prefix = "";
|
|
31
|
-
let covered = false;
|
|
32
|
-
for (const segment of entry.path.split("/")) {
|
|
33
|
-
prefix = prefix ? `${prefix}/${segment}` : segment;
|
|
34
|
-
if (removed.has(prefix)) {
|
|
35
|
-
covered = true;
|
|
36
|
-
break;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
if (covered) {
|
|
40
|
-
continue;
|
|
41
|
-
}
|
|
42
|
-
if (protectedAncestors.has(entry.path)) {
|
|
43
|
-
throw new Error(`Removal path contains a retained package: ${entry.path}`);
|
|
44
|
-
}
|
|
45
|
-
const target = resolve(root, entry.path);
|
|
46
|
-
const within = relative(modules, target);
|
|
47
|
-
if (!within || within === ".." || within.startsWith(`..${sep}`) || target !== await realpath(target) || dirname(target) !== await realpath(dirname(target))) { // key-boundary-ok: sep anchors the parent path component on this platform.
|
|
48
|
-
throw new Error(`Removal path escapes the admitted tree: ${entry.path}`);
|
|
49
|
-
}
|
|
50
|
-
await rm(target, { recursive: true });
|
|
51
|
-
removed.add(entry.path);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
/** Explicit removal mutates only packages exclusively owned by its authorized IDs. */
|
|
55
|
-
export async function removePacks(request, authorization, operations = DEFAULT_INSTALLER_OPERATIONS) {
|
|
56
|
-
const { mode } = request;
|
|
57
|
-
if (mode.kind !== "global" && mode.kind !== "local") {
|
|
58
|
-
throw new Error(mode.reason);
|
|
59
|
-
}
|
|
60
|
-
assertLiveInstallAuthorization(authorization);
|
|
61
|
-
const initial = await preparePackRemoval(request);
|
|
62
|
-
assertInstallAuthorizationScope(authorization, initial.authorization, "remove");
|
|
63
|
-
const release = await acquireInstallLock(mode.nodeModulesRoot, ".nodetool-packs.lock", { signal: request.signal });
|
|
64
|
-
try {
|
|
65
|
-
const removal = await preparePackRemoval(request);
|
|
66
|
-
const selection = removal.authorization;
|
|
67
|
-
assertInstallAuthorizationScope(authorization, selection, "remove");
|
|
68
|
-
const { root, before, previous, initialGlobalLockMissing } = selection;
|
|
69
|
-
const removedIds = new Set(removal.remove);
|
|
70
|
-
const surviving = { ...selection, packs: selection.packs.filter((pack) => !removedIds.has(pack.id)),
|
|
71
|
-
runtimeLibraries: selection.runtimeLibraries.filter((id) => !removedIds.has(id)), before: before.filter((entry) => !removal.removePaths.has(entry.path)) };
|
|
72
|
-
const verification = await prepareTreeVerification(surviving, mode.cliRoot);
|
|
73
|
-
const desired = { root, coreVersion: mode.coreVersion,
|
|
74
|
-
packs: previous.packs.filter((id) => !removedIds.has(id)), runtimeLibraries: previous.runtimeLibraries.filter((id) => !removedIds.has(id)) };
|
|
75
|
-
if (!removal.npmNames.length) {
|
|
76
|
-
await writeDesiredState(request.stateFile, desired);
|
|
77
|
-
return { desired, removed: removal.remove, kept: removal.kept, restartRequired: true };
|
|
78
|
-
}
|
|
79
|
-
const version = await operations.npmVersion(root, request.signal, request.onWarning);
|
|
80
|
-
const plan = parseInstallPlan(await operations.npm(root, ["uninstall", ...removal.npmNames, ...(Number(version.split(".")[0]) >= 11 ? ["--json"] : [])], { mode: "local", dryRun: true, signal: request.signal, onWarning: request.onWarning }), version);
|
|
81
|
-
if (plan.add.length || plan.change.length) {
|
|
82
|
-
throw new Error("Removal plan adds or changes installed packages");
|
|
83
|
-
}
|
|
84
|
-
for (const raw of plan.remove) {
|
|
85
|
-
const text = z.string().safeParse(raw);
|
|
86
|
-
const parsed = text.success ? /^\s*remove\s+(\S+)\s+(\S+)/.exec(text.data) : null;
|
|
87
|
-
const entry = parsed ? { name: parsed[1], version: parsed[2] } : removalEntry.parse(raw);
|
|
88
|
-
const matches = before.filter((old) => (old.name === entry.name || folderName(old) === entry.name) && old.version === entry.version &&
|
|
89
|
-
(!entry.path || resolve(entry.path) === old.realPath));
|
|
90
|
-
if (!matches.length || matches.some((old) => !removal.removePaths.has(old.path))) {
|
|
91
|
-
throw new Error(`Removal plan affects a retained package: ${entry.name}`);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
const restoreManifests = await captureInstallManifests(root);
|
|
95
|
-
try {
|
|
96
|
-
await operations.npm(root, ["uninstall", ...removal.npmNames], { mode: "local", signal: request.signal, onWarning: request.onWarning });
|
|
97
|
-
await removeOwnedDirectories(root, mode.nodeModulesRoot, removal.removePaths, before);
|
|
98
|
-
if (mode.kind === "global") {
|
|
99
|
-
await restoreManifests();
|
|
100
|
-
}
|
|
101
|
-
const after = await snapshotInstallTree(root);
|
|
102
|
-
const expected = before.filter((entry) => !removal.removePaths.has(entry.path));
|
|
103
|
-
if (!installTreeRestored(expected, after, initialGlobalLockMissing)) {
|
|
104
|
-
throw new Error("Removal changed a retained package or left an owned package installed");
|
|
105
|
-
}
|
|
106
|
-
const shared = verification.shared.filter((pin) => after.some((entry) => entry.name === pin.name));
|
|
107
|
-
assertTreePins(expected, after, [...verification.pins, ...shared], verification.coreNames, mode.coreVersion, initialGlobalLockMissing);
|
|
108
|
-
await assertSharedIdentities(after, shared);
|
|
109
|
-
await operations.loadCheck(mode, removal.remainingPackIds, request.signal);
|
|
110
|
-
await writeDesiredState(request.stateFile, desired);
|
|
111
|
-
return { desired, removed: removal.remove, kept: removal.kept, restartRequired: true };
|
|
112
|
-
}
|
|
113
|
-
catch (cause) {
|
|
114
|
-
let restored = false;
|
|
115
|
-
try {
|
|
116
|
-
await restoreManifests();
|
|
117
|
-
const replay = before.filter((entry) => !entry.path.slice("node_modules/".length).includes("/node_modules/")).map((entry) => folderName(entry) === entry.name ? `${entry.name}@${entry.version}` : `${folderName(entry)}@npm:${entry.name}@${entry.version}`);
|
|
118
|
-
await operations.npm(root, ["install", ...replay], { mode: mode.kind, onWarning: request.onWarning });
|
|
119
|
-
restored = installTreeRestored(before, await snapshotInstallTree(root), initialGlobalLockMissing);
|
|
120
|
-
if (restored) {
|
|
121
|
-
await restoreManifests();
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
catch {
|
|
125
|
-
restored = false;
|
|
126
|
-
}
|
|
127
|
-
if (!restored) {
|
|
128
|
-
await writeDesiredState(request.stateFile, { ...previous, dirty: true });
|
|
129
|
-
throw new Error("Pack removal failed and rollback did not restore the tree. Run nodetool packs doctor --repair.", { cause });
|
|
130
|
-
}
|
|
131
|
-
throw cause;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
finally {
|
|
135
|
-
await release();
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
//# sourceMappingURL=removal.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"removal.js","sourceRoot":"","sources":["../../src/packs/removal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAC5D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,8BAA8B,EAAE,+BAA+B,EAA6B,MAAM,2CAA2C,CAAC;AACvJ,OAAO,EAAE,4BAA4B,EAA4B,MAAM,gBAAgB,CAAC;AAExF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,cAA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;IACH,CAAC;YAAS,CAAC;QAAC,MAAM,OAAO,EAAE,CAAC;IAAC,CAAC;AAChC,CAAC"}
|
package/dist/packs/repair.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"repair.d.ts","sourceRoot":"","sources":["../../src/packs/repair.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/packs/repair.js
DELETED
package/dist/packs/repair.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"repair.js","sourceRoot":"","sources":["../../src/packs/repair.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/packs/serve.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../../src/packs/serve.ts"],"names":[],"mappings":""}
|
package/dist/packs/serve.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { initializeCliRuntime } from "../runtime-env.js";
|
|
2
|
-
import { configureCliPackHost, getCliPackSource } from "./host.js";
|
|
3
|
-
import { refusePackInstallsInProcess } from "./install-process.js";
|
|
4
|
-
refusePackInstallsInProcess("serve");
|
|
5
|
-
const entryUrl = new URL(import.meta.url.endsWith(".ts") ? "../nodetool.ts" : "../nodetool.js", import.meta.url).href;
|
|
6
|
-
initializeCliRuntime(entryUrl);
|
|
7
|
-
configureCliPackHost(entryUrl);
|
|
8
|
-
const packSource = await getCliPackSource();
|
|
9
|
-
if (!packSource) {
|
|
10
|
-
throw new Error("CLI serve requires an installed pack source");
|
|
11
|
-
}
|
|
12
|
-
const { startServer } = await import("@nodetool-ai/websocket/server");
|
|
13
|
-
await startServer({ packSource });
|
|
14
|
-
//# sourceMappingURL=serve.js.map
|
package/dist/packs/serve.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"serve.js","sourceRoot":"","sources":["../../src/packs/serve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AACnE,OAAO,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AAEnE,2BAA2B,CAAC,OAAO,CAAC,CAAC;AACrC,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,gBAAgB,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;AACtH,oBAAoB,CAAC,QAAQ,CAAC,CAAC;AAC/B,oBAAoB,CAAC,QAAQ,CAAC,CAAC;AAC/B,MAAM,UAAU,GAAG,MAAM,gBAAgB,EAAE,CAAC;AAC5C,IAAI,CAAC,UAAU,EAAE,CAAC;IAChB,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;AACjE,CAAC;AACD,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,MAAM,CAAC,+BAA+B,CAAC,CAAC;AACtE,MAAM,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The CLI's end of the one permission ladder.
|
|
3
|
-
*
|
|
4
|
-
* Every host builds the same `PermissionGateOptions` and hands it to the same
|
|
5
|
-
* `decidePermission` ladder (invariant I-1); what differs is who answers when
|
|
6
|
-
* the ladder asks. In a terminal that is the person who typed the command, so
|
|
7
|
-
* `requestApproval` prints the call on **stderr** — stdout carries the run's
|
|
8
|
-
* result and must stay parseable — and reads one line back.
|
|
9
|
-
*
|
|
10
|
-
* Behind a pipe there is nobody to ask. The run then takes the headless gate
|
|
11
|
-
* from `@nodetool-ai/agents`: `auto`, which the ladder lets through outright,
|
|
12
|
-
* with every escalation denied and named. The refusal is printed once up
|
|
13
|
-
* front rather than per call, so a user reading the transcript later knows why
|
|
14
|
-
* an escalated call was refused instead of inferring it from the denial.
|
|
15
|
-
*/
|
|
16
|
-
import { type PermissionGateOptions, type PermissionMode } from "@nodetool-ai/agents";
|
|
17
|
-
/** The modes `--permission-mode` accepts, in the order the help text lists. */
|
|
18
|
-
export declare const PERMISSION_MODE_NAMES: readonly ["default", "auto", "plan"];
|
|
19
|
-
/**
|
|
20
|
-
* Read a `--permission-mode` value, or throw naming what is accepted.
|
|
21
|
-
*
|
|
22
|
-
* An unrecognized mode is refused rather than falling back to a default: the
|
|
23
|
-
* flag is the user's only say over what the model may do, and a typo that
|
|
24
|
-
* silently ran `auto` would be the one failure this whole path exists to
|
|
25
|
-
* prevent.
|
|
26
|
-
*/
|
|
27
|
-
export declare function parsePermissionMode(value: string | undefined): PermissionMode | undefined;
|
|
28
|
-
export interface CliPermissionGateOptions {
|
|
29
|
-
/** Names this host in the refusal a headless run prints and returns. */
|
|
30
|
-
hostName: string;
|
|
31
|
-
/** The requested mode. Undefined resolves from whether anyone can answer. */
|
|
32
|
-
mode?: PermissionMode;
|
|
33
|
-
/** Whether a person is at the terminal to answer a prompt. */
|
|
34
|
-
interactive: boolean;
|
|
35
|
-
/**
|
|
36
|
-
* Where the notice and the prompts go, one line per call, no trailing
|
|
37
|
-
* newline. Defaults to stderr; `--json` routes it into the event stream so
|
|
38
|
-
* that stream stays one JSON object per line.
|
|
39
|
-
*/
|
|
40
|
-
write?: (text: string) => void;
|
|
41
|
-
/** Where an answer is read from. Defaults to stdin. */
|
|
42
|
-
input?: NodeJS.ReadableStream;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* The gate a CLI run gates through: a terminal prompt, or the headless gate.
|
|
46
|
-
*
|
|
47
|
-
* `sessionAllow` is created here, once per run, and shared by reference with
|
|
48
|
-
* every loop the run starts — the belt, each delegated capability run, and the
|
|
49
|
-
* context every child reads its gate off. That sharing is what makes `a`
|
|
50
|
-
* ("allow for the rest of this session") outlive the call that answered it:
|
|
51
|
-
* the ladder records the tool name in this Set, and the next loop consults the
|
|
52
|
-
* same one rather than a copy.
|
|
53
|
-
*/
|
|
54
|
-
export declare function createCliPermissionGate(options: CliPermissionGateOptions): PermissionGateOptions;
|
|
55
|
-
//# sourceMappingURL=permission-gate.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"permission-gate.d.ts","sourceRoot":"","sources":["../src/permission-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAML,KAAK,qBAAqB,EAC1B,KAAK,cAAc,EACpB,MAAM,qBAAqB,CAAC;AAE7B,+EAA+E;AAC/E,eAAO,MAAM,qBAAqB,YAAI,SAAS,EAAE,MAAM,EAAE,MAAM,CAAU,CAAC;AAM1E;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,MAAM,GAAG,SAAS,GACxB,cAAc,GAAG,SAAS,CAQ5B;AAWD,MAAM,WAAW,wBAAwB;IACvC,wEAAwE;IACxE,QAAQ,EAAE,MAAM,CAAC;IACjB,6EAA6E;IAC7E,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,8DAA8D;IAC9D,WAAW,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC,cAAc,CAAC;CAC/B;AAuBD;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,wBAAwB,GAChC,qBAAqB,CAgDvB"}
|
package/dist/permission-gate.js
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The CLI's end of the one permission ladder.
|
|
3
|
-
*
|
|
4
|
-
* Every host builds the same `PermissionGateOptions` and hands it to the same
|
|
5
|
-
* `decidePermission` ladder (invariant I-1); what differs is who answers when
|
|
6
|
-
* the ladder asks. In a terminal that is the person who typed the command, so
|
|
7
|
-
* `requestApproval` prints the call on **stderr** — stdout carries the run's
|
|
8
|
-
* result and must stay parseable — and reads one line back.
|
|
9
|
-
*
|
|
10
|
-
* Behind a pipe there is nobody to ask. The run then takes the headless gate
|
|
11
|
-
* from `@nodetool-ai/agents`: `auto`, which the ladder lets through outright,
|
|
12
|
-
* with every escalation denied and named. The refusal is printed once up
|
|
13
|
-
* front rather than per call, so a user reading the transcript later knows why
|
|
14
|
-
* an escalated call was refused instead of inferring it from the denial.
|
|
15
|
-
*/
|
|
16
|
-
import readline from "node:readline";
|
|
17
|
-
import { EXECUTE_CODE_TOOL_NAME, headlessDenialReason, headlessGate } from "@nodetool-ai/agents";
|
|
18
|
-
/** The modes `--permission-mode` accepts, in the order the help text lists. */
|
|
19
|
-
export const PERMISSION_MODE_NAMES = ["default", "auto", "plan"];
|
|
20
|
-
function isPermissionMode(value) {
|
|
21
|
-
return value === "default" || value === "auto" || value === "plan";
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Read a `--permission-mode` value, or throw naming what is accepted.
|
|
25
|
-
*
|
|
26
|
-
* An unrecognized mode is refused rather than falling back to a default: the
|
|
27
|
-
* flag is the user's only say over what the model may do, and a typo that
|
|
28
|
-
* silently ran `auto` would be the one failure this whole path exists to
|
|
29
|
-
* prevent.
|
|
30
|
-
*/
|
|
31
|
-
export function parsePermissionMode(value) {
|
|
32
|
-
if (value === undefined)
|
|
33
|
-
return undefined;
|
|
34
|
-
const mode = value.trim().toLowerCase();
|
|
35
|
-
if (isPermissionMode(mode))
|
|
36
|
-
return mode;
|
|
37
|
-
throw new Error(`--permission-mode must be one of ${PERMISSION_MODE_NAMES.join(", ")} ` +
|
|
38
|
-
`(got "${value}")`);
|
|
39
|
-
}
|
|
40
|
-
/** What a single keystroke at the prompt means. */
|
|
41
|
-
const ANSWERS = {
|
|
42
|
-
y: "allow",
|
|
43
|
-
yes: "allow",
|
|
44
|
-
n: "deny",
|
|
45
|
-
no: "deny",
|
|
46
|
-
a: "allow_for_chat"
|
|
47
|
-
};
|
|
48
|
-
/**
|
|
49
|
-
* Pull one line at a time from `input`, opening the reader on first use.
|
|
50
|
-
*
|
|
51
|
-
* Lazy because `agent run` reads a piped objective off stdin itself: opening
|
|
52
|
-
* a reader a headless run never prompts through would consume it.
|
|
53
|
-
*/
|
|
54
|
-
function lineReader(input) {
|
|
55
|
-
let lines = null;
|
|
56
|
-
return async () => {
|
|
57
|
-
if (lines === null) {
|
|
58
|
-
lines = readline
|
|
59
|
-
.createInterface({ input, terminal: false })[Symbol.asyncIterator]();
|
|
60
|
-
}
|
|
61
|
-
const next = await lines.next();
|
|
62
|
-
return next.done === true ? null : next.value;
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* The gate a CLI run gates through: a terminal prompt, or the headless gate.
|
|
67
|
-
*
|
|
68
|
-
* `sessionAllow` is created here, once per run, and shared by reference with
|
|
69
|
-
* every loop the run starts — the belt, each delegated capability run, and the
|
|
70
|
-
* context every child reads its gate off. That sharing is what makes `a`
|
|
71
|
-
* ("allow for the rest of this session") outlive the call that answered it:
|
|
72
|
-
* the ladder records the tool name in this Set, and the next loop consults the
|
|
73
|
-
* same one rather than a copy.
|
|
74
|
-
*/
|
|
75
|
-
export function createCliPermissionGate(options) {
|
|
76
|
-
const write = options.write ??
|
|
77
|
-
((text) => {
|
|
78
|
-
process.stderr.write(`${text}\n`);
|
|
79
|
-
});
|
|
80
|
-
const mode = options.mode ?? (options.interactive ? "default" : "auto");
|
|
81
|
-
if (!options.interactive || mode === "auto") {
|
|
82
|
-
// Once per run, not per call: the reason is the same every time, and a
|
|
83
|
-
// line repeated per denied call buries the calls themselves.
|
|
84
|
-
write(headlessDenialReason(options.hostName));
|
|
85
|
-
// The requested mode still governs the ladder — a piped `--permission-mode
|
|
86
|
-
// plan` blocks what plan mode blocks. Only the approver changes, and a
|
|
87
|
-
// host with no user denies (invariant I-4).
|
|
88
|
-
const gate = { ...headlessGate(options.hostName), mode };
|
|
89
|
-
// A code action that declares no `risk` reads as high, and in `auto` the
|
|
90
|
-
// ladder asks the approver for it. Nobody is there to ask: the person
|
|
91
|
-
// launched the command with the objective, which is the approval, the
|
|
92
|
-
// same way an MCP client shows its user the code before sending. What a
|
|
93
|
-
// run escalates on its own still reaches the approver and is denied.
|
|
94
|
-
gate.sessionAllow.add(EXECUTE_CODE_TOOL_NAME);
|
|
95
|
-
return gate;
|
|
96
|
-
}
|
|
97
|
-
const readLine = lineReader(options.input ?? process.stdin);
|
|
98
|
-
const askOnTerminal = async (request) => {
|
|
99
|
-
for (;;) {
|
|
100
|
-
write(`\n${request.message}\n ${request.toolName} (${request.category})` +
|
|
101
|
-
`\n allow? [y] yes [n] no [a] yes for the rest of this session`);
|
|
102
|
-
const line = await readLine();
|
|
103
|
-
// Stdin closed mid-run: there is no longer anyone to ask, so the answer
|
|
104
|
-
// is the one a host with no user gives.
|
|
105
|
-
if (line === null)
|
|
106
|
-
return "deny";
|
|
107
|
-
const answer = ANSWERS[line.trim().toLowerCase()];
|
|
108
|
-
if (answer !== undefined)
|
|
109
|
-
return answer;
|
|
110
|
-
}
|
|
111
|
-
};
|
|
112
|
-
return {
|
|
113
|
-
mode,
|
|
114
|
-
sessionAllow: new Set(),
|
|
115
|
-
requestApproval: askOnTerminal
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
//# sourceMappingURL=permission-gate.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"permission-gate.js","sourceRoot":"","sources":["../src/permission-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,QAAQ,MAAM,eAAe,CAAC;AACrC,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,YAAY,EAKb,MAAM,qBAAqB,CAAC;AAE7B,+EAA+E;AAC/E,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AwE;YACxE,wCAAwC;YACxC,IAAI,IAAI,KAAK,IAAI;gBAAE,OAAO,MAAM,CAAC;YACjC,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC;YAClD,IAAI,MAAM,KAAK,SAAS;gBAAE,OAAO,MAAM,CAAC;QAC1C,CAAC;IACH,CAAC,CAAC;IAEF,OAAO;QACL,IAAI;QACJ,YAAY,EAAE,IAAI,GAAG,EAAU;QAC/B,eAAe,EAAE,aAAa;KAC/B,CAAC;AACJ,CAAC"}
|
package/dist/predicates.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The workspace's named type predicates, re-exported for the CLI's call sites.
|
|
3
|
-
* The definitions live in `@nodetool-ai/protocol`.
|
|
4
|
-
*/
|
|
5
|
-
export { isBoolean, isFiniteNumber, isNonBlankString, isNonEmptyString, isNumber, isObjectLike, isPositiveFiniteNumber, isRecord, isString, isCallable as isFunctionValue } from "@nodetool-ai/protocol";
|
|
6
|
-
//# sourceMappingURL=predicates.d.ts.map
|
package/dist/predicates.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"predicates.d.ts","sourceRoot":"","sources":["../src/predicates.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,sBAAsB,EACtB,QAAQ,EACR,QAAQ,EACR,UAAU,IAAI,eAAe,EAC9B,MAAM,uBAAuB,CAAC"}
|
package/dist/predicates.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The workspace's named type predicates, re-exported for the CLI's call sites.
|
|
3
|
-
* The definitions live in `@nodetool-ai/protocol`.
|
|
4
|
-
*/
|
|
5
|
-
export { isBoolean, isFiniteNumber, isNonBlankString, isNonEmptyString, isNumber, isObjectLike, isPositiveFiniteNumber, isRecord, isString, isCallable as isFunctionValue } from "@nodetool-ai/protocol";
|
|
6
|
-
//# sourceMappingURL=predicates.js.map
|
package/dist/predicates.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"predicates.js","sourceRoot":"","sources":["../src/predicates.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,sBAAsB,EACtB,QAAQ,EACR,QAAQ,EACR,UAAU,IAAI,eAAe,EAC9B,MAAM,uBAAuB,CAAC"}
|
package/dist/providers.d.ts
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Provider factory for the chat CLI.
|
|
3
|
-
*
|
|
4
|
-
* Construction and credential wiring are delegated to the runtime provider
|
|
5
|
-
* registry (`@nodetool-ai/runtime`), so every provider registered there is
|
|
6
|
-
* reachable from the CLI without a hand-maintained switch. The curated lists
|
|
7
|
-
* below (`KNOWN_PROVIDERS`, `DEFAULT_MODELS`) only drive the interactive
|
|
8
|
-
* autocomplete and default-model hints for the common chat providers.
|
|
9
|
-
*/
|
|
10
|
-
import type { BaseProvider, Message, ProviderStreamItem, ProviderTool } from "@nodetool-ai/runtime";
|
|
11
|
-
import { BaseProvider as BaseProviderClass } from "@nodetool-ai/runtime";
|
|
12
|
-
import { type UnifiedModel } from "@nodetool-ai/protocol";
|
|
13
|
-
import type { WebSocketChatClient } from "./websocket-client.js";
|
|
14
|
-
/**
|
|
15
|
-
* Chat-capable providers surfaced in interactive autocomplete (`/provider <tab>`)
|
|
16
|
-
* and the `--provider` help text. This is a curated subset of the registry —
|
|
17
|
-
* the well-known LLM chat APIs plus the local servers. Any other registered
|
|
18
|
-
* provider (evolink, vllm, llama_cpp, …) still works when passed explicitly via
|
|
19
|
-
* `--provider <id>`; it just isn't listed here.
|
|
20
|
-
*/
|
|
21
|
-
export declare const KNOWN_PROVIDERS: readonly ["anthropic", "claude_agent_sdk", "antigravity", "openai", "codex", "gemini", "xai", "groq", "mistral", "deepseek", "moonshot", "minimax", "cerebras", "gmi", "meta", "alibaba", "together", "openrouter", "requesty", "opper", "api_route", "huggingface", "replicate", "kie", "aki", "ollama", "lmstudio", "mlx", "node_llama_cpp"];
|
|
22
|
-
export type KnownProvider = (typeof KNOWN_PROVIDERS)[number];
|
|
23
|
-
/** Default model shown when switching to a provider in interactive mode. */
|
|
24
|
-
export declare const DEFAULT_MODELS: Record<string, string>;
|
|
25
|
-
/**
|
|
26
|
-
* Stop the Python worker if this process started one. The worker is a child
|
|
27
|
-
* process, so a command that leaves it running never exits.
|
|
28
|
-
*/
|
|
29
|
-
export declare function closePythonProviders(): void;
|
|
30
|
-
export declare function ensureCustomProvidersRegistered(): Promise<void>;
|
|
31
|
-
/** Build a registered provider, rejecting unknown ids instead of falling back. */
|
|
32
|
-
export declare function createProviderStrict(providerId: string): Promise<BaseProvider>;
|
|
33
|
-
/** Build a provider, preserving the chat CLI's Ollama fallback for unknown ids. */
|
|
34
|
-
export declare function createProvider(providerId: string): Promise<BaseProvider>;
|
|
35
|
-
/**
|
|
36
|
-
* The secret/env key a provider needs (e.g. `"OPENROUTER_API_KEY"`), or null
|
|
37
|
-
* for local/keyless providers. Used to tell the user which key to set when a
|
|
38
|
-
* provider can't be constructed.
|
|
39
|
-
*/
|
|
40
|
-
export declare function providerSecretKey(providerId: string): string | null;
|
|
41
|
-
/**
|
|
42
|
-
* Build a map of `{providerId -> BaseProvider}` for use by the agent's
|
|
43
|
-
* `find_model` tool and media tool dispatch. Includes every registered
|
|
44
|
-
* provider whose required credentials resolve (local providers have none, so
|
|
45
|
-
* they're always present). Construction failures are skipped silently.
|
|
46
|
-
*/
|
|
47
|
-
export declare function buildConfiguredProviders(options?: {
|
|
48
|
-
includePython?: boolean;
|
|
49
|
-
}): Promise<Record<string, BaseProvider>>;
|
|
50
|
-
export type ProviderModelKind = "llm" | "image" | "tts" | "asr" | "video" | "embedding";
|
|
51
|
-
export declare function listConfiguredProviderInfo(): Promise<Array<{
|
|
52
|
-
provider: string;
|
|
53
|
-
capabilities: string[];
|
|
54
|
-
}>>;
|
|
55
|
-
export interface ConfiguredLanguageModel {
|
|
56
|
-
readonly id: string;
|
|
57
|
-
readonly name: string;
|
|
58
|
-
readonly provider: string;
|
|
59
|
-
}
|
|
60
|
-
export interface ConfiguredLanguageModelCatalog {
|
|
61
|
-
readonly providers: readonly string[];
|
|
62
|
-
readonly models: readonly ConfiguredLanguageModel[];
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Language models exposed by every configured provider. A provider whose
|
|
66
|
-
* catalog is temporarily unavailable remains selectable by an explicit
|
|
67
|
-
* `provider/model` spec, while the other providers still populate the picker.
|
|
68
|
-
*/
|
|
69
|
-
export declare function listConfiguredLanguageModels(): Promise<ConfiguredLanguageModelCatalog>;
|
|
70
|
-
export declare function listProviderModels(providerId: string, kind: ProviderModelKind): Promise<UnifiedModel[]>;
|
|
71
|
-
/**
|
|
72
|
-
* The full model catalog assembled locally, mirroring the server's
|
|
73
|
-
* `models.all` endpoint without a running server: the recommended models, the
|
|
74
|
-
* language models of every configured provider (tagged with tool support), and
|
|
75
|
-
* the locally cached HuggingFace repos. Provider and cache failures are skipped
|
|
76
|
-
* so one broken provider never sinks the whole list.
|
|
77
|
-
*/
|
|
78
|
-
export declare function listAllModels(): Promise<UnifiedModel[]>;
|
|
79
|
-
/** Ollama's locally installed language models, read straight from the daemon. */
|
|
80
|
-
export declare function listOllamaModels(): Promise<UnifiedModel[]>;
|
|
81
|
-
/**
|
|
82
|
-
* The set of chat providers currently usable: local/keyless providers plus any
|
|
83
|
-
* hosted provider whose key resolves from the encrypted DB or env. Async
|
|
84
|
-
* because it consults the secret store; the interactive picker uses this to
|
|
85
|
-
* disable providers that can't be selected. Mirrors `availableProviders()` but
|
|
86
|
-
* also picks up DB-stored keys (not just env).
|
|
87
|
-
*/
|
|
88
|
-
export declare function configuredProviderIds(): Promise<Set<string>>;
|
|
89
|
-
/**
|
|
90
|
-
* Which chat providers have credentials configured (env-only — a fast sync
|
|
91
|
-
* check used by autocomplete). Local providers are always listed, with
|
|
92
|
-
* `ollama` kept last for stable display ordering.
|
|
93
|
-
*/
|
|
94
|
-
export declare function availableProviders(): string[];
|
|
95
|
-
/**
|
|
96
|
-
* A provider that routes all inference through the NodeTool WebSocket server.
|
|
97
|
-
* Used in agent mode when --url is passed: the server handles LLM calls,
|
|
98
|
-
* so no local API keys are required.
|
|
99
|
-
*/
|
|
100
|
-
export declare class WebSocketProvider extends BaseProviderClass {
|
|
101
|
-
private readonly client;
|
|
102
|
-
private readonly defaultModel;
|
|
103
|
-
private readonly providerId;
|
|
104
|
-
constructor(client: WebSocketChatClient, defaultModel: string, providerId: string);
|
|
105
|
-
generateMessage(args: {
|
|
106
|
-
messages: Message[];
|
|
107
|
-
model: string;
|
|
108
|
-
tools?: ProviderTool[];
|
|
109
|
-
maxTokens?: number;
|
|
110
|
-
}): Promise<Message>;
|
|
111
|
-
generateMessages(args: {
|
|
112
|
-
messages: Message[];
|
|
113
|
-
model: string;
|
|
114
|
-
tools?: ProviderTool[];
|
|
115
|
-
}): AsyncGenerator<ProviderStreamItem>;
|
|
116
|
-
}
|
|
117
|
-
//# sourceMappingURL=providers.d.ts.map
|
package/dist/providers.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../src/providers.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,YAAY,EAEZ,OAAO,EACP,kBAAkB,EAClB,YAAY,EACb,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,YAAY,IAAI,iBAAiB,EAWlC,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAGL,KAAK,YAAY,EAClB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE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