meetsoma 0.3.2 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -194
- package/dist/thin-cli.js +1587 -392
- package/package.json +12 -59
- package/bin/gum +0 -0
- package/dist/bun/cli.d.ts +0 -3
- package/dist/bun/cli.d.ts.map +0 -1
- package/dist/bun/cli.js +0 -7
- package/dist/bun/cli.js.map +0 -1
- package/dist/bun/register-bedrock.d.ts +0 -2
- package/dist/bun/register-bedrock.d.ts.map +0 -1
- package/dist/bun/register-bedrock.js +0 -4
- package/dist/bun/register-bedrock.js.map +0 -1
- package/dist/cli/args.d.ts +0 -49
- package/dist/cli/args.d.ts.map +0 -1
- package/dist/cli/args.js +0 -304
- package/dist/cli/args.js.map +0 -1
- package/dist/cli/config-selector.d.ts +0 -14
- package/dist/cli/config-selector.d.ts.map +0 -1
- package/dist/cli/config-selector.js +0 -31
- package/dist/cli/config-selector.js.map +0 -1
- package/dist/cli/file-processor.d.ts +0 -15
- package/dist/cli/file-processor.d.ts.map +0 -1
- package/dist/cli/file-processor.js +0 -83
- package/dist/cli/file-processor.js.map +0 -1
- package/dist/cli/initial-message.d.ts +0 -18
- package/dist/cli/initial-message.d.ts.map +0 -1
- package/dist/cli/initial-message.js +0 -22
- package/dist/cli/initial-message.js.map +0 -1
- package/dist/cli/list-models.d.ts +0 -9
- package/dist/cli/list-models.d.ts.map +0 -1
- package/dist/cli/list-models.js +0 -92
- package/dist/cli/list-models.js.map +0 -1
- package/dist/cli/session-picker.d.ts +0 -9
- package/dist/cli/session-picker.d.ts.map +0 -1
- package/dist/cli/session-picker.js +0 -35
- package/dist/cli/session-picker.js.map +0 -1
- package/dist/cli.d.ts +0 -3
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js +0 -601
- package/dist/cli.js.map +0 -1
- package/dist/config.d.ts +0 -68
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js +0 -203
- package/dist/config.js.map +0 -1
- package/dist/core/agent-session-runtime.d.ts +0 -134
- package/dist/core/agent-session-runtime.d.ts.map +0 -1
- package/dist/core/agent-session-runtime.js +0 -264
- package/dist/core/agent-session-runtime.js.map +0 -1
- package/dist/core/agent-session.d.ts +0 -585
- package/dist/core/agent-session.d.ts.map +0 -1
- package/dist/core/agent-session.js +0 -2497
- package/dist/core/agent-session.js.map +0 -1
- package/dist/core/auth-storage.d.ts +0 -132
- package/dist/core/auth-storage.d.ts.map +0 -1
- package/dist/core/auth-storage.js +0 -422
- package/dist/core/auth-storage.js.map +0 -1
- package/dist/core/bash-executor.d.ts +0 -46
- package/dist/core/bash-executor.d.ts.map +0 -1
- package/dist/core/bash-executor.js +0 -113
- package/dist/core/bash-executor.js.map +0 -1
- package/dist/core/compaction/branch-summarization.d.ts +0 -88
- package/dist/core/compaction/branch-summarization.d.ts.map +0 -1
- package/dist/core/compaction/branch-summarization.js +0 -243
- package/dist/core/compaction/branch-summarization.js.map +0 -1
- package/dist/core/compaction/compaction.d.ts +0 -121
- package/dist/core/compaction/compaction.d.ts.map +0 -1
- package/dist/core/compaction/compaction.js +0 -613
- package/dist/core/compaction/compaction.js.map +0 -1
- package/dist/core/compaction/index.d.ts +0 -7
- package/dist/core/compaction/index.d.ts.map +0 -1
- package/dist/core/compaction/index.js +0 -7
- package/dist/core/compaction/index.js.map +0 -1
- package/dist/core/compaction/utils.d.ts +0 -38
- package/dist/core/compaction/utils.d.ts.map +0 -1
- package/dist/core/compaction/utils.js +0 -153
- package/dist/core/compaction/utils.js.map +0 -1
- package/dist/core/defaults.d.ts +0 -3
- package/dist/core/defaults.d.ts.map +0 -1
- package/dist/core/defaults.js +0 -2
- package/dist/core/defaults.js.map +0 -1
- package/dist/core/diagnostics.d.ts +0 -15
- package/dist/core/diagnostics.d.ts.map +0 -1
- package/dist/core/diagnostics.js +0 -2
- package/dist/core/diagnostics.js.map +0 -1
- package/dist/core/event-bus.d.ts +0 -9
- package/dist/core/event-bus.d.ts.map +0 -1
- package/dist/core/event-bus.js +0 -25
- package/dist/core/event-bus.js.map +0 -1
- package/dist/core/exec.d.ts +0 -29
- package/dist/core/exec.d.ts.map +0 -1
- package/dist/core/exec.js +0 -75
- package/dist/core/exec.js.map +0 -1
- package/dist/core/export-html/ansi-to-html.d.ts +0 -22
- package/dist/core/export-html/ansi-to-html.d.ts.map +0 -1
- package/dist/core/export-html/ansi-to-html.js +0 -249
- package/dist/core/export-html/ansi-to-html.js.map +0 -1
- package/dist/core/export-html/index.d.ts +0 -37
- package/dist/core/export-html/index.d.ts.map +0 -1
- package/dist/core/export-html/index.js +0 -224
- package/dist/core/export-html/index.js.map +0 -1
- package/dist/core/export-html/template.css +0 -1001
- package/dist/core/export-html/template.html +0 -55
- package/dist/core/export-html/template.js +0 -1690
- package/dist/core/export-html/tool-renderer.d.ts +0 -40
- package/dist/core/export-html/tool-renderer.d.ts.map +0 -1
- package/dist/core/export-html/tool-renderer.js +0 -95
- package/dist/core/export-html/tool-renderer.js.map +0 -1
- package/dist/core/export-html/vendor/highlight.min.js +0 -1213
- package/dist/core/export-html/vendor/marked.min.js +0 -6
- package/dist/core/extensions/index.d.ts +0 -12
- package/dist/core/extensions/index.d.ts.map +0 -1
- package/dist/core/extensions/index.js +0 -9
- package/dist/core/extensions/index.js.map +0 -1
- package/dist/core/extensions/loader.d.ts +0 -25
- package/dist/core/extensions/loader.d.ts.map +0 -1
- package/dist/core/extensions/loader.js +0 -436
- package/dist/core/extensions/loader.js.map +0 -1
- package/dist/core/extensions/runner.d.ts +0 -148
- package/dist/core/extensions/runner.d.ts.map +0 -1
- package/dist/core/extensions/runner.js +0 -700
- package/dist/core/extensions/runner.js.map +0 -1
- package/dist/core/extensions/types.d.ts +0 -1076
- package/dist/core/extensions/types.d.ts.map +0 -1
- package/dist/core/extensions/types.js +0 -35
- package/dist/core/extensions/types.js.map +0 -1
- package/dist/core/extensions/wrapper.d.ts +0 -20
- package/dist/core/extensions/wrapper.d.ts.map +0 -1
- package/dist/core/extensions/wrapper.js +0 -22
- package/dist/core/extensions/wrapper.js.map +0 -1
- package/dist/core/footer-data-provider.d.ts +0 -48
- package/dist/core/footer-data-provider.d.ts.map +0 -1
- package/dist/core/footer-data-provider.js +0 -314
- package/dist/core/footer-data-provider.js.map +0 -1
- package/dist/core/index.d.ts +0 -11
- package/dist/core/index.d.ts.map +0 -1
- package/dist/core/index.js +0 -11
- package/dist/core/index.js.map +0 -1
- package/dist/core/keybindings.d.ts +0 -285
- package/dist/core/keybindings.d.ts.map +0 -1
- package/dist/core/keybindings.js +0 -251
- package/dist/core/keybindings.js.map +0 -1
- package/dist/core/messages.d.ts +0 -77
- package/dist/core/messages.d.ts.map +0 -1
- package/dist/core/messages.js +0 -123
- package/dist/core/messages.js.map +0 -1
- package/dist/core/model-registry.d.ts +0 -132
- package/dist/core/model-registry.d.ts.map +0 -1
- package/dist/core/model-registry.js +0 -583
- package/dist/core/model-registry.js.map +0 -1
- package/dist/core/model-resolver.d.ts +0 -110
- package/dist/core/model-resolver.d.ts.map +0 -1
- package/dist/core/model-resolver.js +0 -486
- package/dist/core/model-resolver.js.map +0 -1
- package/dist/core/output-guard.d.ts +0 -6
- package/dist/core/output-guard.d.ts.map +0 -1
- package/dist/core/output-guard.js +0 -59
- package/dist/core/output-guard.js.map +0 -1
- package/dist/core/package-manager.d.ts +0 -172
- package/dist/core/package-manager.d.ts.map +0 -1
- package/dist/core/package-manager.js +0 -1783
- package/dist/core/package-manager.js.map +0 -1
- package/dist/core/prompt-templates.d.ts +0 -51
- package/dist/core/prompt-templates.d.ts.map +0 -1
- package/dist/core/prompt-templates.js +0 -249
- package/dist/core/prompt-templates.js.map +0 -1
- package/dist/core/resolve-config-value.d.ts +0 -23
- package/dist/core/resolve-config-value.d.ts.map +0 -1
- package/dist/core/resolve-config-value.js +0 -126
- package/dist/core/resolve-config-value.js.map +0 -1
- package/dist/core/resource-loader.d.ts +0 -185
- package/dist/core/resource-loader.d.ts.map +0 -1
- package/dist/core/resource-loader.js +0 -698
- package/dist/core/resource-loader.js.map +0 -1
- package/dist/core/sdk.d.ts +0 -93
- package/dist/core/sdk.d.ts.map +0 -1
- package/dist/core/sdk.js +0 -236
- package/dist/core/sdk.js.map +0 -1
- package/dist/core/session-manager.d.ts +0 -332
- package/dist/core/session-manager.d.ts.map +0 -1
- package/dist/core/session-manager.js +0 -1104
- package/dist/core/session-manager.js.map +0 -1
- package/dist/core/settings-manager.d.ts +0 -237
- package/dist/core/settings-manager.d.ts.map +0 -1
- package/dist/core/settings-manager.js +0 -702
- package/dist/core/settings-manager.js.map +0 -1
- package/dist/core/skills.d.ts +0 -60
- package/dist/core/skills.d.ts.map +0 -1
- package/dist/core/skills.js +0 -409
- package/dist/core/skills.js.map +0 -1
- package/dist/core/slash-commands.d.ts +0 -14
- package/dist/core/slash-commands.d.ts.map +0 -1
- package/dist/core/slash-commands.js +0 -23
- package/dist/core/slash-commands.js.map +0 -1
- package/dist/core/source-info.d.ts +0 -18
- package/dist/core/source-info.d.ts.map +0 -1
- package/dist/core/source-info.js +0 -19
- package/dist/core/source-info.js.map +0 -1
- package/dist/core/system-prompt.d.ts +0 -28
- package/dist/core/system-prompt.d.ts.map +0 -1
- package/dist/core/system-prompt.js +0 -116
- package/dist/core/system-prompt.js.map +0 -1
- package/dist/core/timings.d.ts +0 -8
- package/dist/core/timings.d.ts.map +0 -1
- package/dist/core/timings.js +0 -31
- package/dist/core/timings.js.map +0 -1
- package/dist/core/tools/bash.d.ts +0 -73
- package/dist/core/tools/bash.d.ts.map +0 -1
- package/dist/core/tools/bash.js +0 -342
- package/dist/core/tools/bash.js.map +0 -1
- package/dist/core/tools/edit-diff.d.ts +0 -85
- package/dist/core/tools/edit-diff.d.ts.map +0 -1
- package/dist/core/tools/edit-diff.js +0 -337
- package/dist/core/tools/edit-diff.js.map +0 -1
- package/dist/core/tools/edit.d.ts +0 -53
- package/dist/core/tools/edit.d.ts.map +0 -1
- package/dist/core/tools/edit.js +0 -196
- package/dist/core/tools/edit.js.map +0 -1
- package/dist/core/tools/file-mutation-queue.d.ts +0 -6
- package/dist/core/tools/file-mutation-queue.d.ts.map +0 -1
- package/dist/core/tools/file-mutation-queue.js +0 -37
- package/dist/core/tools/file-mutation-queue.js.map +0 -1
- package/dist/core/tools/find.d.ts +0 -46
- package/dist/core/tools/find.d.ts.map +0 -1
- package/dist/core/tools/find.js +0 -258
- package/dist/core/tools/find.js.map +0 -1
- package/dist/core/tools/grep.d.ts +0 -56
- package/dist/core/tools/grep.d.ts.map +0 -1
- package/dist/core/tools/grep.js +0 -293
- package/dist/core/tools/grep.js.map +0 -1
- package/dist/core/tools/index.d.ts +0 -115
- package/dist/core/tools/index.d.ts.map +0 -1
- package/dist/core/tools/index.js +0 -86
- package/dist/core/tools/index.js.map +0 -1
- package/dist/core/tools/ls.d.ts +0 -46
- package/dist/core/tools/ls.d.ts.map +0 -1
- package/dist/core/tools/ls.js +0 -172
- package/dist/core/tools/ls.js.map +0 -1
- package/dist/core/tools/path-utils.d.ts +0 -8
- package/dist/core/tools/path-utils.d.ts.map +0 -1
- package/dist/core/tools/path-utils.js +0 -81
- package/dist/core/tools/path-utils.js.map +0 -1
- package/dist/core/tools/read.d.ts +0 -46
- package/dist/core/tools/read.d.ts.map +0 -1
- package/dist/core/tools/read.js +0 -225
- package/dist/core/tools/read.js.map +0 -1
- package/dist/core/tools/render-utils.d.ts +0 -21
- package/dist/core/tools/render-utils.d.ts.map +0 -1
- package/dist/core/tools/render-utils.js +0 -49
- package/dist/core/tools/render-utils.js.map +0 -1
- package/dist/core/tools/tool-definition-wrapper.d.ts +0 -14
- package/dist/core/tools/tool-definition-wrapper.d.ts.map +0 -1
- package/dist/core/tools/tool-definition-wrapper.js +0 -32
- package/dist/core/tools/tool-definition-wrapper.js.map +0 -1
- package/dist/core/tools/truncate.d.ts +0 -70
- package/dist/core/tools/truncate.d.ts.map +0 -1
- package/dist/core/tools/truncate.js +0 -205
- package/dist/core/tools/truncate.js.map +0 -1
- package/dist/core/tools/write.d.ts +0 -35
- package/dist/core/tools/write.d.ts.map +0 -1
- package/dist/core/tools/write.js +0 -216
- package/dist/core/tools/write.js.map +0 -1
- package/dist/index.d.ts +0 -28
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -43
- package/dist/index.js.map +0 -1
- package/dist/lib/config.js +0 -22
- package/dist/lib/detect.js +0 -94
- package/dist/lib/display.js +0 -182
- package/dist/main.d.ts +0 -8
- package/dist/main.d.ts.map +0 -1
- package/dist/main.js +0 -806
- package/dist/main.js.map +0 -1
- package/dist/migrations.d.ts +0 -33
- package/dist/migrations.d.ts.map +0 -1
- package/dist/migrations.js +0 -261
- package/dist/migrations.js.map +0 -1
- package/dist/modes/index.d.ts +0 -9
- package/dist/modes/index.d.ts.map +0 -1
- package/dist/modes/index.js +0 -8
- package/dist/modes/index.js.map +0 -1
- package/dist/modes/interactive/components/armin.d.ts +0 -34
- package/dist/modes/interactive/components/armin.d.ts.map +0 -1
- package/dist/modes/interactive/components/armin.js +0 -333
- package/dist/modes/interactive/components/armin.js.map +0 -1
- package/dist/modes/interactive/components/assistant-message.d.ts +0 -18
- package/dist/modes/interactive/components/assistant-message.d.ts.map +0 -1
- package/dist/modes/interactive/components/assistant-message.js +0 -107
- package/dist/modes/interactive/components/assistant-message.js.map +0 -1
- package/dist/modes/interactive/components/bash-execution.d.ts +0 -34
- package/dist/modes/interactive/components/bash-execution.d.ts.map +0 -1
- package/dist/modes/interactive/components/bash-execution.js +0 -175
- package/dist/modes/interactive/components/bash-execution.js.map +0 -1
- package/dist/modes/interactive/components/bordered-loader.d.ts +0 -16
- package/dist/modes/interactive/components/bordered-loader.d.ts.map +0 -1
- package/dist/modes/interactive/components/bordered-loader.js +0 -51
- package/dist/modes/interactive/components/bordered-loader.js.map +0 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts +0 -16
- package/dist/modes/interactive/components/branch-summary-message.d.ts.map +0 -1
- package/dist/modes/interactive/components/branch-summary-message.js +0 -44
- package/dist/modes/interactive/components/branch-summary-message.js.map +0 -1
- package/dist/modes/interactive/components/compaction-summary-message.d.ts +0 -16
- package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +0 -1
- package/dist/modes/interactive/components/compaction-summary-message.js +0 -45
- package/dist/modes/interactive/components/compaction-summary-message.js.map +0 -1
- package/dist/modes/interactive/components/config-selector.d.ts +0 -71
- package/dist/modes/interactive/components/config-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/config-selector.js +0 -479
- package/dist/modes/interactive/components/config-selector.js.map +0 -1
- package/dist/modes/interactive/components/countdown-timer.d.ts +0 -14
- package/dist/modes/interactive/components/countdown-timer.d.ts.map +0 -1
- package/dist/modes/interactive/components/countdown-timer.js +0 -33
- package/dist/modes/interactive/components/countdown-timer.js.map +0 -1
- package/dist/modes/interactive/components/custom-editor.d.ts +0 -21
- package/dist/modes/interactive/components/custom-editor.d.ts.map +0 -1
- package/dist/modes/interactive/components/custom-editor.js +0 -70
- package/dist/modes/interactive/components/custom-editor.js.map +0 -1
- package/dist/modes/interactive/components/custom-message.d.ts +0 -20
- package/dist/modes/interactive/components/custom-message.d.ts.map +0 -1
- package/dist/modes/interactive/components/custom-message.js +0 -79
- package/dist/modes/interactive/components/custom-message.js.map +0 -1
- package/dist/modes/interactive/components/daxnuts.d.ts +0 -23
- package/dist/modes/interactive/components/daxnuts.d.ts.map +0 -1
- package/dist/modes/interactive/components/daxnuts.js +0 -140
- package/dist/modes/interactive/components/daxnuts.js.map +0 -1
- package/dist/modes/interactive/components/diff.d.ts +0 -12
- package/dist/modes/interactive/components/diff.d.ts.map +0 -1
- package/dist/modes/interactive/components/diff.js +0 -133
- package/dist/modes/interactive/components/diff.js.map +0 -1
- package/dist/modes/interactive/components/dynamic-border.d.ts +0 -15
- package/dist/modes/interactive/components/dynamic-border.d.ts.map +0 -1
- package/dist/modes/interactive/components/dynamic-border.js +0 -21
- package/dist/modes/interactive/components/dynamic-border.js.map +0 -1
- package/dist/modes/interactive/components/extension-editor.d.ts +0 -20
- package/dist/modes/interactive/components/extension-editor.d.ts.map +0 -1
- package/dist/modes/interactive/components/extension-editor.js +0 -111
- package/dist/modes/interactive/components/extension-editor.js.map +0 -1
- package/dist/modes/interactive/components/extension-input.d.ts +0 -23
- package/dist/modes/interactive/components/extension-input.d.ts.map +0 -1
- package/dist/modes/interactive/components/extension-input.js +0 -61
- package/dist/modes/interactive/components/extension-input.js.map +0 -1
- package/dist/modes/interactive/components/extension-selector.d.ts +0 -24
- package/dist/modes/interactive/components/extension-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/extension-selector.js +0 -78
- package/dist/modes/interactive/components/extension-selector.js.map +0 -1
- package/dist/modes/interactive/components/footer.d.ts +0 -27
- package/dist/modes/interactive/components/footer.d.ts.map +0 -1
- package/dist/modes/interactive/components/footer.js +0 -201
- package/dist/modes/interactive/components/footer.js.map +0 -1
- package/dist/modes/interactive/components/index.d.ts +0 -32
- package/dist/modes/interactive/components/index.d.ts.map +0 -1
- package/dist/modes/interactive/components/index.js +0 -33
- package/dist/modes/interactive/components/index.js.map +0 -1
- package/dist/modes/interactive/components/keybinding-hints.d.ts +0 -8
- package/dist/modes/interactive/components/keybinding-hints.d.ts.map +0 -1
- package/dist/modes/interactive/components/keybinding-hints.js +0 -22
- package/dist/modes/interactive/components/keybinding-hints.js.map +0 -1
- package/dist/modes/interactive/components/login-dialog.d.ts +0 -42
- package/dist/modes/interactive/components/login-dialog.d.ts.map +0 -1
- package/dist/modes/interactive/components/login-dialog.js +0 -145
- package/dist/modes/interactive/components/login-dialog.js.map +0 -1
- package/dist/modes/interactive/components/model-selector.d.ts +0 -47
- package/dist/modes/interactive/components/model-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/model-selector.js +0 -275
- package/dist/modes/interactive/components/model-selector.js.map +0 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts +0 -19
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/oauth-selector.js +0 -97
- package/dist/modes/interactive/components/oauth-selector.js.map +0 -1
- package/dist/modes/interactive/components/scoped-models-selector.d.ts +0 -49
- package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/scoped-models-selector.js +0 -275
- package/dist/modes/interactive/components/scoped-models-selector.js.map +0 -1
- package/dist/modes/interactive/components/session-selector-search.d.ts +0 -23
- package/dist/modes/interactive/components/session-selector-search.d.ts.map +0 -1
- package/dist/modes/interactive/components/session-selector-search.js +0 -155
- package/dist/modes/interactive/components/session-selector-search.js.map +0 -1
- package/dist/modes/interactive/components/session-selector.d.ts +0 -95
- package/dist/modes/interactive/components/session-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/session-selector.js +0 -848
- package/dist/modes/interactive/components/session-selector.js.map +0 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +0 -58
- package/dist/modes/interactive/components/settings-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/settings-selector.js +0 -301
- package/dist/modes/interactive/components/settings-selector.js.map +0 -1
- package/dist/modes/interactive/components/show-images-selector.d.ts +0 -10
- package/dist/modes/interactive/components/show-images-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/show-images-selector.js +0 -39
- package/dist/modes/interactive/components/show-images-selector.js.map +0 -1
- package/dist/modes/interactive/components/skill-invocation-message.d.ts +0 -17
- package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +0 -1
- package/dist/modes/interactive/components/skill-invocation-message.js +0 -47
- package/dist/modes/interactive/components/skill-invocation-message.js.map +0 -1
- package/dist/modes/interactive/components/theme-selector.d.ts +0 -11
- package/dist/modes/interactive/components/theme-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/theme-selector.js +0 -50
- package/dist/modes/interactive/components/theme-selector.js.map +0 -1
- package/dist/modes/interactive/components/thinking-selector.d.ts +0 -11
- package/dist/modes/interactive/components/thinking-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/thinking-selector.js +0 -51
- package/dist/modes/interactive/components/thinking-selector.js.map +0 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +0 -58
- package/dist/modes/interactive/components/tool-execution.d.ts.map +0 -1
- package/dist/modes/interactive/components/tool-execution.js +0 -274
- package/dist/modes/interactive/components/tool-execution.js.map +0 -1
- package/dist/modes/interactive/components/tree-selector.d.ts +0 -89
- package/dist/modes/interactive/components/tree-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/tree-selector.js +0 -1084
- package/dist/modes/interactive/components/tree-selector.js.map +0 -1
- package/dist/modes/interactive/components/user-message-selector.d.ts +0 -30
- package/dist/modes/interactive/components/user-message-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/user-message-selector.js +0 -113
- package/dist/modes/interactive/components/user-message-selector.js.map +0 -1
- package/dist/modes/interactive/components/user-message.d.ts +0 -9
- package/dist/modes/interactive/components/user-message.d.ts.map +0 -1
- package/dist/modes/interactive/components/user-message.js +0 -28
- package/dist/modes/interactive/components/user-message.js.map +0 -1
- package/dist/modes/interactive/components/visual-truncate.d.ts +0 -24
- package/dist/modes/interactive/components/visual-truncate.d.ts.map +0 -1
- package/dist/modes/interactive/components/visual-truncate.js +0 -33
- package/dist/modes/interactive/components/visual-truncate.js.map +0 -1
- package/dist/modes/interactive/interactive-mode.d.ts +0 -318
- package/dist/modes/interactive/interactive-mode.d.ts.map +0 -1
- package/dist/modes/interactive/interactive-mode.js +0 -3907
- package/dist/modes/interactive/interactive-mode.js.map +0 -1
- package/dist/modes/interactive/theme/dark.json +0 -85
- package/dist/modes/interactive/theme/light.json +0 -84
- package/dist/modes/interactive/theme/theme-schema.json +0 -335
- package/dist/modes/interactive/theme/theme.d.ts +0 -81
- package/dist/modes/interactive/theme/theme.d.ts.map +0 -1
- package/dist/modes/interactive/theme/theme.js +0 -970
- package/dist/modes/interactive/theme/theme.js.map +0 -1
- package/dist/modes/print-mode.d.ts +0 -28
- package/dist/modes/print-mode.d.ts.map +0 -1
- package/dist/modes/print-mode.js +0 -108
- package/dist/modes/print-mode.js.map +0 -1
- package/dist/modes/rpc/jsonl.d.ts +0 -17
- package/dist/modes/rpc/jsonl.d.ts.map +0 -1
- package/dist/modes/rpc/jsonl.js +0 -49
- package/dist/modes/rpc/jsonl.js.map +0 -1
- package/dist/modes/rpc/rpc-client.d.ts +0 -217
- package/dist/modes/rpc/rpc-client.d.ts.map +0 -1
- package/dist/modes/rpc/rpc-client.js +0 -401
- package/dist/modes/rpc/rpc-client.js.map +0 -1
- package/dist/modes/rpc/rpc-mode.d.ts +0 -20
- package/dist/modes/rpc/rpc-mode.d.ts.map +0 -1
- package/dist/modes/rpc/rpc-mode.js +0 -542
- package/dist/modes/rpc/rpc-mode.js.map +0 -1
- package/dist/modes/rpc/rpc-types.d.ts +0 -408
- package/dist/modes/rpc/rpc-types.d.ts.map +0 -1
- package/dist/modes/rpc/rpc-types.js +0 -8
- package/dist/modes/rpc/rpc-types.js.map +0 -1
- package/dist/utils/changelog.d.ts +0 -21
- package/dist/utils/changelog.d.ts.map +0 -1
- package/dist/utils/changelog.js +0 -87
- package/dist/utils/changelog.js.map +0 -1
- package/dist/utils/child-process.d.ts +0 -11
- package/dist/utils/child-process.d.ts.map +0 -1
- package/dist/utils/child-process.js +0 -78
- package/dist/utils/child-process.js.map +0 -1
- package/dist/utils/clipboard-image.d.ts +0 -11
- package/dist/utils/clipboard-image.d.ts.map +0 -1
- package/dist/utils/clipboard-image.js +0 -245
- package/dist/utils/clipboard-image.js.map +0 -1
- package/dist/utils/clipboard-native.d.ts +0 -8
- package/dist/utils/clipboard-native.d.ts.map +0 -1
- package/dist/utils/clipboard-native.js +0 -14
- package/dist/utils/clipboard-native.js.map +0 -1
- package/dist/utils/clipboard.d.ts +0 -2
- package/dist/utils/clipboard.d.ts.map +0 -1
- package/dist/utils/clipboard.js +0 -78
- package/dist/utils/clipboard.js.map +0 -1
- package/dist/utils/exif-orientation.d.ts +0 -5
- package/dist/utils/exif-orientation.d.ts.map +0 -1
- package/dist/utils/exif-orientation.js +0 -158
- package/dist/utils/exif-orientation.js.map +0 -1
- package/dist/utils/frontmatter.d.ts +0 -8
- package/dist/utils/frontmatter.d.ts.map +0 -1
- package/dist/utils/frontmatter.js +0 -26
- package/dist/utils/frontmatter.js.map +0 -1
- package/dist/utils/git.d.ts +0 -26
- package/dist/utils/git.d.ts.map +0 -1
- package/dist/utils/git.js +0 -163
- package/dist/utils/git.js.map +0 -1
- package/dist/utils/image-convert.d.ts +0 -9
- package/dist/utils/image-convert.d.ts.map +0 -1
- package/dist/utils/image-convert.js +0 -39
- package/dist/utils/image-convert.js.map +0 -1
- package/dist/utils/image-resize.d.ts +0 -36
- package/dist/utils/image-resize.d.ts.map +0 -1
- package/dist/utils/image-resize.js +0 -137
- package/dist/utils/image-resize.js.map +0 -1
- package/dist/utils/mime.d.ts +0 -2
- package/dist/utils/mime.d.ts.map +0 -1
- package/dist/utils/mime.js +0 -26
- package/dist/utils/mime.js.map +0 -1
- package/dist/utils/photon.d.ts +0 -21
- package/dist/utils/photon.d.ts.map +0 -1
- package/dist/utils/photon.js +0 -121
- package/dist/utils/photon.js.map +0 -1
- package/dist/utils/shell.d.ts +0 -26
- package/dist/utils/shell.d.ts.map +0 -1
- package/dist/utils/shell.js +0 -186
- package/dist/utils/shell.js.map +0 -1
- package/dist/utils/sleep.d.ts +0 -5
- package/dist/utils/sleep.d.ts.map +0 -1
- package/dist/utils/sleep.js +0 -17
- package/dist/utils/sleep.js.map +0 -1
- package/dist/utils/tools-manager.d.ts +0 -3
- package/dist/utils/tools-manager.d.ts.map +0 -1
- package/dist/utils/tools-manager.js +0 -252
- package/dist/utils/tools-manager.js.map +0 -1
- package/dist/welcome/about.js +0 -50
- package/dist/welcome/auth.js +0 -126
- package/dist/welcome/intro.js +0 -90
- package/dist/welcome/qa.js +0 -131
- package/scripts/install-gum.sh +0 -141
package/dist/cli.js
DELETED
|
@@ -1,601 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* CLI entry point for Soma (meetsoma).
|
|
4
|
-
*
|
|
5
|
-
* Uses Pi's main.ts with AgentSession and new mode modules.
|
|
6
|
-
* Supports auto-rotation: when an extension writes .soma/.rotate-signal
|
|
7
|
-
* and triggers shutdown, we re-exec the process for a fresh session.
|
|
8
|
-
*
|
|
9
|
-
* Test with: npx tsx src/cli-new.ts [args...]
|
|
10
|
-
*/
|
|
11
|
-
process.title = "soma";
|
|
12
|
-
// Soma has its own versioning — skip Pi's upstream version check
|
|
13
|
-
// which compares Soma 0.1.0 against pi-coding-agent 0.57.1 on npm
|
|
14
|
-
process.env.PI_SKIP_VERSION_CHECK = "1";
|
|
15
|
-
import { setBedrockProviderModule } from "@mariozechner/pi-ai";
|
|
16
|
-
import { bedrockProviderModule } from "@mariozechner/pi-ai/bedrock-provider";
|
|
17
|
-
import { EnvHttpProxyAgent, setGlobalDispatcher } from "undici";
|
|
18
|
-
import { main } from "./main.js";
|
|
19
|
-
import { existsSync, unlinkSync, readFileSync, writeFileSync, mkdirSync } from "fs";
|
|
20
|
-
import { join } from "path";
|
|
21
|
-
import { execFileSync } from "child_process";
|
|
22
|
-
setGlobalDispatcher(new EnvHttpProxyAgent());
|
|
23
|
-
setBedrockProviderModule(bedrockProviderModule);
|
|
24
|
-
|
|
25
|
-
// ── Auto-rotation support ──────────────────────────────────────────────
|
|
26
|
-
// When auto-breathe triggers rotation but no command context is available
|
|
27
|
-
// (Pi only exposes newSession() in command handlers), the extension writes
|
|
28
|
-
// .soma/.rotate-signal and calls ctx.shutdown(). Pi's shutdown calls
|
|
29
|
-
// process.exit(0). We intercept that exit to check for the rotation signal
|
|
30
|
-
// and re-exec if found — giving the user a seamless fresh session.
|
|
31
|
-
//
|
|
32
|
-
// The re-exec spawns a NEW process via execFileSync (stdio: inherit),
|
|
33
|
-
// which blocks the parent until the child exits. This means each rotation
|
|
34
|
-
// adds one level of process nesting. SOMA_ROTATION_DEPTH limits this to
|
|
35
|
-
// prevent runaway loops (default: 5).
|
|
36
|
-
// ────────────────────────────────────────────────────────────────────────
|
|
37
|
-
const MAX_ROTATIONS = parseInt(process.env.SOMA_MAX_ROTATIONS || "5", 10);
|
|
38
|
-
const currentDepth = parseInt(process.env.SOMA_ROTATION_DEPTH || "0", 10);
|
|
39
|
-
|
|
40
|
-
const _realExit = process.exit;
|
|
41
|
-
process.exit = function somaRotationExit(code) {
|
|
42
|
-
if (code === 0 && currentDepth < MAX_ROTATIONS) {
|
|
43
|
-
try {
|
|
44
|
-
const signal = join(process.cwd(), ".soma", ".rotate-signal");
|
|
45
|
-
if (existsSync(signal)) {
|
|
46
|
-
// Read signal metadata (optional — for logging)
|
|
47
|
-
let meta = {};
|
|
48
|
-
try { meta = JSON.parse(readFileSync(signal, "utf-8")); } catch {}
|
|
49
|
-
unlinkSync(signal);
|
|
50
|
-
|
|
51
|
-
// Log rotation
|
|
52
|
-
const reason = meta.reason || "auto-breathe";
|
|
53
|
-
process.stderr.write(`\n🫧 Rotating session (${reason})...\n\n`);
|
|
54
|
-
|
|
55
|
-
// Re-exec with incremented depth counter
|
|
56
|
-
try {
|
|
57
|
-
execFileSync(process.execPath, process.argv.slice(1), {
|
|
58
|
-
stdio: "inherit",
|
|
59
|
-
env: {
|
|
60
|
-
...process.env,
|
|
61
|
-
SOMA_ROTATION_DEPTH: String(currentDepth + 1),
|
|
62
|
-
},
|
|
63
|
-
});
|
|
64
|
-
} catch {
|
|
65
|
-
// Child exited non-zero — that's fine, we still exit cleanly
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
_realExit.call(process, 0);
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
} catch {
|
|
72
|
-
// Signal check failed — fall through to normal exit
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
_realExit.call(process, code);
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
// ── Command dispatch ───────────────────────────────────────────────────
|
|
79
|
-
const args = process.argv.slice(2);
|
|
80
|
-
|
|
81
|
-
// Version flag
|
|
82
|
-
if (args[0] === "--version" || args[0] === "-V" || args[0] === "-v") {
|
|
83
|
-
// Delegate to thin-cli which shows both agent + CLI versions
|
|
84
|
-
const { dirname: dn } = await import("path");
|
|
85
|
-
const { fileURLToPath: fu } = await import("url");
|
|
86
|
-
const thisDir = dn(fu(import.meta.url));
|
|
87
|
-
const thinCli = join(thisDir, "thin-cli.js");
|
|
88
|
-
if (existsSync(thinCli)) {
|
|
89
|
-
try { execFileSync(process.execPath, [thinCli, "--version"], { stdio: "inherit" }); }
|
|
90
|
-
catch {}
|
|
91
|
-
} else {
|
|
92
|
-
const { readFileSync: rf } = await import("fs");
|
|
93
|
-
const pkg = JSON.parse(rf(join(thisDir, "..", "package.json"), "utf-8"));
|
|
94
|
-
console.log(`soma v${pkg.version}`);
|
|
95
|
-
}
|
|
96
|
-
process.exit(0);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
// Help flag — Soma-branded help with our commands + Pi options
|
|
100
|
-
if (args[0] === "--help" || args[0] === "-h") {
|
|
101
|
-
const { readFileSync: rf, existsSync: ex, readdirSync: rd } = await import("fs");
|
|
102
|
-
const { fileURLToPath } = await import("url");
|
|
103
|
-
const { dirname, join: j } = await import("path");
|
|
104
|
-
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
105
|
-
const pkg = JSON.parse(rf(j(__dirname, "..", "package.json"), "utf-8"));
|
|
106
|
-
|
|
107
|
-
const b = s => `\x1b[1m${s}\x1b[0m`;
|
|
108
|
-
const d = s => `\x1b[2m${s}\x1b[0m`;
|
|
109
|
-
const g = s => `\x1b[32m${s}\x1b[0m`;
|
|
110
|
-
const c = s => `\x1b[36m${s}\x1b[0m`;
|
|
111
|
-
|
|
112
|
-
const subHelp = args[1];
|
|
113
|
-
|
|
114
|
-
// ── soma --help scripts ──
|
|
115
|
-
if (subHelp === "scripts") {
|
|
116
|
-
const scriptDirs = [
|
|
117
|
-
j(process.cwd(), ".soma", "amps", "scripts"),
|
|
118
|
-
j(process.cwd(), ".soma", "scripts"),
|
|
119
|
-
j(process.env.HOME || "", ".soma", "amps", "scripts"),
|
|
120
|
-
];
|
|
121
|
-
const seen = new Set();
|
|
122
|
-
const scripts = [];
|
|
123
|
-
for (const dir of scriptDirs) {
|
|
124
|
-
if (!ex(dir)) continue;
|
|
125
|
-
for (const f of rd(dir)) {
|
|
126
|
-
if (!f.endsWith(".sh") || seen.has(f)) continue;
|
|
127
|
-
seen.add(f);
|
|
128
|
-
try {
|
|
129
|
-
const content = rf(j(dir, f), "utf-8");
|
|
130
|
-
// Extract description from script header comment
|
|
131
|
-
const descMatch = content.match(/^#\s*([a-z].*?\.)/im)
|
|
132
|
-
|| content.match(/^#\s+soma-\S+\s+[—–-]+\s*(.+)/m)
|
|
133
|
-
|| content.match(/^# USE WHEN:\s*(.+)/m);
|
|
134
|
-
const desc = descMatch ? descMatch[1].trim() : "";
|
|
135
|
-
scripts.push({ name: f, desc, dir });
|
|
136
|
-
} catch { scripts.push({ name: f, desc: "", dir }); }
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
// Also check commands/
|
|
140
|
-
const cmdDirs = [
|
|
141
|
-
j(process.cwd(), ".soma", "amps", "scripts", "commands"),
|
|
142
|
-
j(process.cwd(), ".soma", "scripts", "commands"),
|
|
143
|
-
];
|
|
144
|
-
const commands = [];
|
|
145
|
-
for (const dir of cmdDirs) {
|
|
146
|
-
if (!ex(dir)) continue;
|
|
147
|
-
for (const f of rd(dir)) {
|
|
148
|
-
if (!f.endsWith(".sh") || seen.has(f)) continue;
|
|
149
|
-
seen.add(f);
|
|
150
|
-
try {
|
|
151
|
-
const content = rf(j(dir, f), "utf-8");
|
|
152
|
-
const descMatch = content.match(/^#\s*([a-z].*?\.)/im)
|
|
153
|
-
|| content.match(/^description:\s*["']?(.+?)["']?$/m);
|
|
154
|
-
const desc = descMatch ? descMatch[1].trim() : "";
|
|
155
|
-
commands.push({ name: f.replace(/\.sh$/, ""), desc });
|
|
156
|
-
} catch { commands.push({ name: f.replace(/\.sh$/, ""), desc: "" }); }
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
console.log(``);
|
|
161
|
-
console.log(` ${b("σ Installed Scripts")}`);
|
|
162
|
-
console.log(``);
|
|
163
|
-
if (scripts.length === 0) {
|
|
164
|
-
console.log(` ${d("No scripts found.")} Run ${g("soma init")} to seed bundled scripts.`);
|
|
165
|
-
} else {
|
|
166
|
-
for (const s of scripts) {
|
|
167
|
-
const desc = s.desc ? d(` — ${s.desc}`) : "";
|
|
168
|
-
console.log(` ${g(s.name)}${desc}`);
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
if (commands.length > 0) {
|
|
172
|
-
console.log(``);
|
|
173
|
-
console.log(` ${b("Drop-in Commands")} ${d("(/soma <name> inside TUI)")}`);
|
|
174
|
-
console.log(``);
|
|
175
|
-
for (const cmd of commands) {
|
|
176
|
-
const desc = cmd.desc ? d(` — ${cmd.desc}`) : "";
|
|
177
|
-
console.log(` ${c("/soma " + cmd.name)}${desc}`);
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
console.log(``);
|
|
181
|
-
console.log(` ${d("Install more:")} ${g("soma hub install script <name>")}`);
|
|
182
|
-
console.log(` ${d("Browse available:")} ${g("/hub find script")} ${d("(inside TUI)")}`);
|
|
183
|
-
console.log(``);
|
|
184
|
-
process.exit(0);
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
// ── soma --help commands ──
|
|
188
|
-
if (subHelp === "commands") {
|
|
189
|
-
console.log(``);
|
|
190
|
-
console.log(` ${b("σ All Commands")}`);
|
|
191
|
-
console.log(``);
|
|
192
|
-
console.log(` ${b("CLI")} ${d("(from your shell):")}`);
|
|
193
|
-
console.log(` ${g("soma")} ${d("Fresh session")}`);
|
|
194
|
-
console.log(` ${g("soma inhale")} ${d("Fresh session + last preload")}`);
|
|
195
|
-
console.log(` ${g("soma -c")} ${d("Continue last session")}`);
|
|
196
|
-
console.log(` ${g("soma -r")} ${d("Pick a session to resume")}`);
|
|
197
|
-
console.log(` ${g("soma focus <keyword>")} ${d("Prime for a topic")}`);
|
|
198
|
-
console.log(` ${g("soma map <name>")} ${d("Boot with a MAP")}`);
|
|
199
|
-
console.log(` ${g("soma doctor")} ${d("Project health + migration")}`);
|
|
200
|
-
console.log(` ${g("soma status")} ${d("Infrastructure health check")}`);
|
|
201
|
-
console.log(` ${g("soma --help scripts")} ${d("Show installed scripts")}`);
|
|
202
|
-
console.log(``);
|
|
203
|
-
console.log(` ${b("Session")} ${d("(inside the TUI):")}`);
|
|
204
|
-
console.log(` ${c("/exhale")} ${d("Save state + write preload")}`);
|
|
205
|
-
console.log(` ${c("/breathe")} ${d("Save + rotate to fresh session")}`);
|
|
206
|
-
console.log(` ${c("/inhale")} ${d("Check preload status")}`);
|
|
207
|
-
console.log(` ${c("/rest")} ${d("Disable keepalive + exhale")}`);
|
|
208
|
-
console.log(` ${c("/exit")} ${d("Save + quit")}`);
|
|
209
|
-
console.log(``);
|
|
210
|
-
console.log(` ${b("Heat")} ${d("(inside the TUI):")}`);
|
|
211
|
-
console.log(` ${c("/pin <name>")} ${d("Keep a muscle/protocol hot")}`);
|
|
212
|
-
console.log(` ${c("/kill <name>")} ${d("Drop to cold")}`);
|
|
213
|
-
console.log(``);
|
|
214
|
-
console.log(` ${b("Hub")} ${d("(inside the TUI):")}`);
|
|
215
|
-
console.log(` ${c("/hub install <type> <name>")} ${d("Install from hub")}`);
|
|
216
|
-
console.log(` ${c("/hub find <keywords>")} ${d("Search hub content")}`);
|
|
217
|
-
console.log(` ${c("/hub list [type]")} ${d("Show installed AMPS")}`);
|
|
218
|
-
console.log(` ${c("/hub fork <type> <name>")} ${d("Fork + install")}`);
|
|
219
|
-
console.log(` ${c("/hub share <type> <name>")} ${d("Share to hub")}`);
|
|
220
|
-
console.log(``);
|
|
221
|
-
console.log(` ${b("Info")} ${d("(inside the TUI):")}`);
|
|
222
|
-
console.log(` ${c("/soma")} ${d("Status — identity, protocols, commands")}`);
|
|
223
|
-
console.log(` ${c("/soma prompt")} ${d("Preview compiled system prompt")}`);
|
|
224
|
-
console.log(` ${c("/body")} ${d("Template inspector")}`);
|
|
225
|
-
console.log(` ${c("/status")} ${d("Context %, cache, turns, uptime")}`);
|
|
226
|
-
console.log(` ${c("/scratch")} ${d("Quick notes")}`);
|
|
227
|
-
console.log(` ${c("/code")} ${d("Codebase navigator (wraps soma-code.sh)")}`);
|
|
228
|
-
console.log(``);
|
|
229
|
-
process.exit(0);
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
console.log(``);
|
|
233
|
-
console.log(` ${b("σ Soma")} ${d(`CLI v${pkg.version}`)} ${d("— AI coding agent with self-growing memory")}`);
|
|
234
|
-
console.log(``);
|
|
235
|
-
console.log(` ${b("Usage:")} soma ${d("[command] [options] [@files...] [messages...]")}`);
|
|
236
|
-
console.log(``);
|
|
237
|
-
console.log(` ${b("Session Commands:")}`);
|
|
238
|
-
console.log(` ${g("soma")} ${d("Fresh session — clean slate, no preload")}`);
|
|
239
|
-
console.log(` ${g("soma inhale")} ${d("Fresh session + auto-load last preload")}`);
|
|
240
|
-
console.log(` ${g("soma inhale --list")} ${d("Show available preloads with age")}`);
|
|
241
|
-
console.log(` ${g("soma inhale <name>")} ${d("Load a specific preload by name")}`);
|
|
242
|
-
console.log(` ${g("soma -c")} ${d("Continue last session (full history)")}`);
|
|
243
|
-
console.log(` ${g("soma -r")} ${d("Resume — pick from previous sessions")}`);
|
|
244
|
-
console.log(``);
|
|
245
|
-
console.log(` ${b("Project Commands:")}`);
|
|
246
|
-
console.log(` ${g("soma focus <keyword>")} ${d("Prime next session for a topic")}`);
|
|
247
|
-
console.log(` ${g("soma focus show|clear")} ${d("Check or remove focus state")}`);
|
|
248
|
-
console.log(` ${g("soma map <name>")} ${d("Boot with a MAP workflow loaded")}`);
|
|
249
|
-
console.log(` ${g("soma map --list")} ${d("Show available MAPs")}`);
|
|
250
|
-
console.log(` ${g("soma doctor")} ${d("Project health + migration")}`);
|
|
251
|
-
console.log(` ${g("soma status")} ${d("Infrastructure health check")}`);
|
|
252
|
-
console.log(``);
|
|
253
|
-
console.log(` ${b("Script Commands")} ${d("(discovered from scripts/):")}`);
|
|
254
|
-
console.log(` ${g("soma code <cmd>")} ${d("Codebase navigator — find, map, refs, blast")}`);
|
|
255
|
-
console.log(` ${g("soma verify")} ${d("Project health checks")}`);
|
|
256
|
-
console.log(` ${g("soma refactor <cmd>")} ${d("Dependency graph, blast radius")}`);
|
|
257
|
-
console.log(` ${g("soma <name> [args]")} ${d("Any soma-<name>.sh in scripts/ or .soma/")}`);
|
|
258
|
-
console.log(` ${g("soma --help scripts")} ${d("Show all installed scripts")}`);
|
|
259
|
-
console.log(``);
|
|
260
|
-
console.log(` ${b("Options:")}`);
|
|
261
|
-
console.log(` ${g("--model <pattern>")} ${d("Start with a specific model (e.g. sonnet, gpt-4o)")}`);
|
|
262
|
-
console.log(` ${g("--models <list>")} ${d("Limit Ctrl+P cycling to these models")}`);
|
|
263
|
-
console.log(` ${g("--provider <name>")} ${d("Set the default provider")}`);
|
|
264
|
-
console.log(` ${g("--thinking <level>")} ${d("Thinking: off, minimal, low, medium, high, xhigh")}`);
|
|
265
|
-
console.log(` ${g("--list-models [search]")} ${d("List available models")}`);
|
|
266
|
-
console.log(` ${g("--print, -p")} ${d("Non-interactive: process prompt and exit")}`);
|
|
267
|
-
console.log(` ${g("--no-session")} ${d("Ephemeral session (not saved)")}`);
|
|
268
|
-
console.log(` ${g("--tools <list>")} ${d("Tools to enable (default: read,bash,edit,write)")}`);
|
|
269
|
-
console.log(` ${g("--extension, -e <path>")} ${d("Load an extension file")}`);
|
|
270
|
-
console.log(` ${g("--skill <path>")} ${d("Load a skill file or directory")}`);
|
|
271
|
-
console.log(` ${g("--export [session.jsonl]")} ${d("Export session as HTML")}`);
|
|
272
|
-
console.log(``);
|
|
273
|
-
console.log(` ${b("Session Slash Commands")} ${d("(inside the TUI):")}`);
|
|
274
|
-
console.log(` ${c("/exhale")} ${d("Save state + write preload — ends session")}`);
|
|
275
|
-
console.log(` ${c("/breathe")} ${d("Save state + rotate into fresh session")}`);
|
|
276
|
-
console.log(` ${c("/inhale")} ${d("Check preload status (not the same as")} ${g("soma inhale")}${d("!)")}`);
|
|
277
|
-
console.log(` ${c("/rest")} ${d("Disable keepalive + exhale — for end of day")}`);
|
|
278
|
-
console.log(` ${c("/pin")} ${d("Keep a muscle/protocol hot across sessions")}`);
|
|
279
|
-
console.log(` ${c("/kill")} ${d("Drop a muscle/protocol to cold")}`);
|
|
280
|
-
console.log(` ${c("/hub")} ${d("Install, find, share community content")}`);
|
|
281
|
-
console.log(` ${c("/soma")} ${d("Status, init, prompt, debug, drop-in commands")}`);
|
|
282
|
-
console.log(``);
|
|
283
|
-
console.log(` ${d("Docs: https://soma.gravicity.ai/docs")}`);
|
|
284
|
-
console.log(``);
|
|
285
|
-
process.exit(0);
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
// ── Helpers ─────────────────────────────────────────────────────────────
|
|
289
|
-
|
|
290
|
-
const bold = s => `\x1b[1m${s}\x1b[0m`;
|
|
291
|
-
const dim = s => `\x1b[2m${s}\x1b[0m`;
|
|
292
|
-
const cyan = s => `\x1b[36m${s}\x1b[0m`;
|
|
293
|
-
const green = s => `\x1b[32m${s}\x1b[0m`;
|
|
294
|
-
const yellow = s => `\x1b[33m${s}\x1b[0m`;
|
|
295
|
-
const red = s => `\x1b[31m${s}\x1b[0m`;
|
|
296
|
-
|
|
297
|
-
function writeBootTarget(name) {
|
|
298
|
-
const targetPath = join(process.cwd(), ".soma", ".boot-target");
|
|
299
|
-
mkdirSync(join(process.cwd(), ".soma"), { recursive: true });
|
|
300
|
-
writeFileSync(targetPath, JSON.stringify({ type: "map", name, timestamp: Date.now() }));
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
// ── MAP / Preload targeting (flags — backward compat) ──────────────────
|
|
304
|
-
// soma --map <name> → boot with MAP's prompt-config + targeted preload
|
|
305
|
-
// soma --preload <name> → deprecated alias for --map (use `soma map <name>`)
|
|
306
|
-
let mapTarget = null;
|
|
307
|
-
for (let i = 0; i < args.length; i++) {
|
|
308
|
-
if (args[i] === "--map" && i + 1 < args.length) {
|
|
309
|
-
mapTarget = args[i + 1];
|
|
310
|
-
args.splice(i, 2);
|
|
311
|
-
break;
|
|
312
|
-
}
|
|
313
|
-
if (args[i] === "--preload" && i + 1 < args.length) {
|
|
314
|
-
mapTarget = args[i + 1];
|
|
315
|
-
args.splice(i, 2);
|
|
316
|
-
console.log(` ${yellow("⚠")} ${dim("--preload is deprecated. Use:")} ${green("soma map " + mapTarget)} ${dim("(for MAPs) or")} ${green("soma inhale " + mapTarget)} ${dim("(for preloads)")}`);
|
|
317
|
-
console.log("");
|
|
318
|
-
break;
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
if (mapTarget) {
|
|
323
|
-
process.env.SOMA_INHALE = "1";
|
|
324
|
-
process.env.SOMA_MAP_TARGET = mapTarget;
|
|
325
|
-
writeBootTarget(mapTarget);
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
// ── Focus targeting ────────────────────────────────────────────────────
|
|
329
|
-
// soma focus <keyword> → run soma-focus.sh, then start session
|
|
330
|
-
// soma focus show → show current focus state
|
|
331
|
-
// soma focus clear → remove focus
|
|
332
|
-
if (args[0] === "focus") {
|
|
333
|
-
const focusArgs = args.slice(1);
|
|
334
|
-
// Find soma-focus.sh — check .soma/amps/scripts/ first, then bundled scripts/
|
|
335
|
-
const focusLocations = [
|
|
336
|
-
join(process.cwd(), ".soma", "amps", "scripts", "soma-focus.sh"),
|
|
337
|
-
join(process.cwd(), ".soma", "scripts", "soma-focus.sh"),
|
|
338
|
-
new URL("../scripts/soma-focus.sh", import.meta.url).pathname,
|
|
339
|
-
];
|
|
340
|
-
let focusScript = null;
|
|
341
|
-
for (const loc of focusLocations) {
|
|
342
|
-
if (existsSync(loc)) { focusScript = loc; break; }
|
|
343
|
-
}
|
|
344
|
-
if (!focusScript) {
|
|
345
|
-
console.error("soma-focus.sh not found. Run 'soma init' to seed scripts.");
|
|
346
|
-
process.exit(1);
|
|
347
|
-
}
|
|
348
|
-
try {
|
|
349
|
-
execFileSync("bash", [focusScript, ...focusArgs], { stdio: "inherit" });
|
|
350
|
-
// If focus was set (not show/clear), start a session
|
|
351
|
-
if (focusArgs.length > 0 && focusArgs[0] !== "show" && focusArgs[0] !== "clear" && focusArgs[0] !== "--help") {
|
|
352
|
-
console.log("\nStarting focused session...\n");
|
|
353
|
-
await main([]);
|
|
354
|
-
}
|
|
355
|
-
} catch (err) {
|
|
356
|
-
process.exit(1);
|
|
357
|
-
}
|
|
358
|
-
process.exit(0);
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
// ── soma map <name> — top-level MAP command ────────────────────────────
|
|
362
|
-
// soma map <name> → run a MAP (same as old --map)
|
|
363
|
-
// soma map --list → show available MAPs
|
|
364
|
-
// soma map → show available MAPs (same as --list)
|
|
365
|
-
if (args[0] === "map") {
|
|
366
|
-
const mapArgs = args.slice(1);
|
|
367
|
-
const listFlag = mapArgs.includes("--list") || mapArgs.length === 0;
|
|
368
|
-
|
|
369
|
-
if (listFlag) {
|
|
370
|
-
// List available MAPs
|
|
371
|
-
try {
|
|
372
|
-
const somaDir = join(process.cwd(), ".soma");
|
|
373
|
-
const mapDirs = [
|
|
374
|
-
join(somaDir, "amps", "automations", "maps"),
|
|
375
|
-
join(somaDir, "amps", "automations"),
|
|
376
|
-
join(somaDir, "automations", "maps"),
|
|
377
|
-
join(somaDir, "automations"),
|
|
378
|
-
join(process.env.HOME || "", ".soma", "amps", "automations", "maps"),
|
|
379
|
-
join(process.env.HOME || "", ".soma", "amps", "automations"),
|
|
380
|
-
];
|
|
381
|
-
const seen = new Set();
|
|
382
|
-
const maps = [];
|
|
383
|
-
for (const dir of mapDirs) {
|
|
384
|
-
if (!existsSync(dir)) continue;
|
|
385
|
-
const { readdirSync: rd, readFileSync: rf } = await import("fs");
|
|
386
|
-
for (const f of rd(dir)) {
|
|
387
|
-
if (!f.endsWith(".md") || seen.has(f)) continue;
|
|
388
|
-
seen.add(f);
|
|
389
|
-
const name = f.replace(/\.md$/, "");
|
|
390
|
-
// Extract status from frontmatter
|
|
391
|
-
const content = rf(join(dir, f), "utf-8");
|
|
392
|
-
const statusMatch = content.match(/^status:\s*(.+)/m);
|
|
393
|
-
const descMatch = content.match(/^description:\s*(.+)/m);
|
|
394
|
-
maps.push({
|
|
395
|
-
name,
|
|
396
|
-
status: statusMatch?.[1]?.trim() || "—",
|
|
397
|
-
desc: descMatch?.[1]?.trim() || "",
|
|
398
|
-
});
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
if (maps.length === 0) {
|
|
402
|
-
console.log(`\n ${dim("No MAPs found.")} Install from hub: ${green("soma install <map-name>")}\n`);
|
|
403
|
-
} else {
|
|
404
|
-
console.log(`\n ${bold("Available MAPs")}\n`);
|
|
405
|
-
for (const m of maps) {
|
|
406
|
-
const status = m.status === "active" ? green("●") : dim("○");
|
|
407
|
-
const desc = m.desc ? dim(` — ${m.desc}`) : "";
|
|
408
|
-
console.log(` ${status} ${bold(m.name)}${desc}`);
|
|
409
|
-
}
|
|
410
|
-
console.log(`\n Run: ${green("soma map <name>")} to start a session with a MAP\n`);
|
|
411
|
-
}
|
|
412
|
-
} catch {
|
|
413
|
-
console.log(`\n ${red("✗")} Could not list MAPs\n`);
|
|
414
|
-
}
|
|
415
|
-
process.exit(0);
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
// soma map <name> — run the MAP
|
|
419
|
-
const name = mapArgs.filter(a => !a.startsWith("-"))[0];
|
|
420
|
-
if (name) {
|
|
421
|
-
process.env.SOMA_INHALE = "1";
|
|
422
|
-
process.env.SOMA_MAP_TARGET = name;
|
|
423
|
-
writeBootTarget(name);
|
|
424
|
-
main([]);
|
|
425
|
-
// Don't exit here — main() handles the session
|
|
426
|
-
} else {
|
|
427
|
-
console.log(` Usage: ${green("soma map <name>")} or ${green("soma map --list")}`);
|
|
428
|
-
process.exit(1);
|
|
429
|
-
}
|
|
430
|
-
} else if (args[0] === "init" || args[0] === "content" || args[0] === "install" || args[0] === "list") {
|
|
431
|
-
// soma init / soma content init / soma install / soma list
|
|
432
|
-
// Route to content-cli for project scaffolding and hub operations
|
|
433
|
-
const contentArgs = args[0] === "content" ? args.slice(1) : args;
|
|
434
|
-
let handled = false;
|
|
435
|
-
// Try compiled core (co-located with node_modules for package resolution)
|
|
436
|
-
const agentDir = process.env.SOMA_CODING_AGENT_DIR || join(process.env.HOME || "", ".soma", "agent");
|
|
437
|
-
const compiledCore = join(agentDir, "core-compiled.js");
|
|
438
|
-
try {
|
|
439
|
-
if (existsSync(compiledCore)) {
|
|
440
|
-
const core = await import(compiledCore);
|
|
441
|
-
if (core.handleContentCommand) {
|
|
442
|
-
handled = await core.handleContentCommand(contentArgs);
|
|
443
|
-
}
|
|
444
|
-
}
|
|
445
|
-
} catch (e) {
|
|
446
|
-
// compiled core not available or failed
|
|
447
|
-
}
|
|
448
|
-
if (handled) process.exit(0);
|
|
449
|
-
// Fall through to main if not handled
|
|
450
|
-
main(args);
|
|
451
|
-
} else if (args[0] === "inhale") {
|
|
452
|
-
// ── soma inhale — enhanced preload loading ──────────────────────────
|
|
453
|
-
// soma inhale → load most recent preload (existing)
|
|
454
|
-
// soma inhale --list → show available preloads
|
|
455
|
-
// soma inhale <name> → partial match by name
|
|
456
|
-
// soma inhale --load <path> → load specific file as preload
|
|
457
|
-
const inhaleArgs = args.slice(1);
|
|
458
|
-
const listFlag = inhaleArgs.includes("--list");
|
|
459
|
-
const loadIdx = inhaleArgs.indexOf("--load");
|
|
460
|
-
const loadPath = loadIdx !== -1 ? inhaleArgs[loadIdx + 1] : null;
|
|
461
|
-
const nameArg = inhaleArgs.filter(a => !a.startsWith("-") && a !== loadPath)[0];
|
|
462
|
-
|
|
463
|
-
if (listFlag) {
|
|
464
|
-
// List available preloads
|
|
465
|
-
try {
|
|
466
|
-
const somaDir = join(process.cwd(), ".soma");
|
|
467
|
-
if (!existsSync(somaDir)) {
|
|
468
|
-
console.log(`\n ${dim("No .soma/ found.")} Run ${green("soma init")} first.\n`);
|
|
469
|
-
process.exit(0);
|
|
470
|
-
}
|
|
471
|
-
const preloadDirs = [
|
|
472
|
-
join(somaDir, "memory", "preloads"),
|
|
473
|
-
somaDir,
|
|
474
|
-
join(somaDir, "memory"),
|
|
475
|
-
];
|
|
476
|
-
const seen = new Set();
|
|
477
|
-
const preloads = [];
|
|
478
|
-
const { readdirSync: rd, statSync: st } = await import("fs");
|
|
479
|
-
for (const dir of preloadDirs) {
|
|
480
|
-
if (!existsSync(dir)) continue;
|
|
481
|
-
for (const f of rd(dir)) {
|
|
482
|
-
if (!f.startsWith("preload-") || !f.endsWith(".md") || seen.has(f)) continue;
|
|
483
|
-
seen.add(f);
|
|
484
|
-
try {
|
|
485
|
-
const stat = st(join(dir, f));
|
|
486
|
-
const ageHours = (Date.now() - stat.mtimeMs) / 3600000;
|
|
487
|
-
preloads.push({ name: f, path: join(dir, f), ageHours });
|
|
488
|
-
} catch { /* skip */ }
|
|
489
|
-
}
|
|
490
|
-
}
|
|
491
|
-
preloads.sort((a, b) => a.ageHours - b.ageHours);
|
|
492
|
-
if (preloads.length === 0) {
|
|
493
|
-
console.log(`\n ${dim("No preloads found.")} Run ${green("/exhale")} in a session to create one.\n`);
|
|
494
|
-
} else {
|
|
495
|
-
console.log(`\n ${bold("Available Preloads")} ${dim(`(stale after 48h)`)}\n`);
|
|
496
|
-
for (const p of preloads) {
|
|
497
|
-
const age = p.ageHours;
|
|
498
|
-
const stale = age > 48;
|
|
499
|
-
const ageStr = age < 1 ? `${Math.floor(age * 60)}m ago`
|
|
500
|
-
: age < 24 ? `${Math.floor(age)}h ago`
|
|
501
|
-
: `${Math.floor(age / 24)}d ago`;
|
|
502
|
-
const marker = stale ? yellow("⚠") : green("●");
|
|
503
|
-
const staleTag = stale ? dim(" (stale)") : "";
|
|
504
|
-
console.log(` ${marker} ${bold(p.name)} ${dim(ageStr)}${staleTag}`);
|
|
505
|
-
}
|
|
506
|
-
console.log(`\n Run: ${green("soma inhale <name>")} to load a specific preload`);
|
|
507
|
-
console.log(` ${green("soma inhale")} to load the most recent\n`);
|
|
508
|
-
}
|
|
509
|
-
} catch (err) {
|
|
510
|
-
console.log(`\n ${red("✗")} Could not list preloads: ${err.message}\n`);
|
|
511
|
-
}
|
|
512
|
-
process.exit(0);
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
if (loadPath) {
|
|
516
|
-
// Load a specific file by path
|
|
517
|
-
const { resolve: resolvePath } = await import("path");
|
|
518
|
-
const fullPath = resolvePath(loadPath);
|
|
519
|
-
if (!existsSync(fullPath)) {
|
|
520
|
-
console.log(`\n ${red("✗")} File not found: ${fullPath}\n`);
|
|
521
|
-
process.exit(1);
|
|
522
|
-
}
|
|
523
|
-
process.env.SOMA_INHALE = "1";
|
|
524
|
-
process.env.SOMA_INHALE_PATH = fullPath;
|
|
525
|
-
main([]);
|
|
526
|
-
} else if (nameArg) {
|
|
527
|
-
// Partial name match
|
|
528
|
-
process.env.SOMA_INHALE = "1";
|
|
529
|
-
process.env.SOMA_INHALE_TARGET = nameArg;
|
|
530
|
-
main([]);
|
|
531
|
-
} else {
|
|
532
|
-
// Default: load most recent
|
|
533
|
-
process.env.SOMA_INHALE = "1";
|
|
534
|
-
main([]);
|
|
535
|
-
}
|
|
536
|
-
} else if (args[0] === "doctor" || args[0] === "status" || args[0] === "health" || args[0] === "update") {
|
|
537
|
-
// Route to thin-cli which handles these commands
|
|
538
|
-
// thin-cli has the doctor logic, version checking, health check
|
|
539
|
-
const { dirname: dn } = await import("path");
|
|
540
|
-
const { fileURLToPath: fu } = await import("url");
|
|
541
|
-
const thisDir = dn(fu(import.meta.url));
|
|
542
|
-
const thinCli = join(thisDir, "thin-cli.js");
|
|
543
|
-
if (existsSync(thinCli)) {
|
|
544
|
-
try {
|
|
545
|
-
execFileSync(process.execPath, [thinCli, ...args], { stdio: "inherit" });
|
|
546
|
-
} catch (err) {
|
|
547
|
-
if (err.status) process.exit(err.status);
|
|
548
|
-
}
|
|
549
|
-
} else {
|
|
550
|
-
console.log(`\n ${dim("Command not available — try")} ${green("soma init")}\n`);
|
|
551
|
-
}
|
|
552
|
-
process.exit(0);
|
|
553
|
-
} else {
|
|
554
|
-
// ── Script discovery: soma <name> → soma-<name>.sh ──────────────
|
|
555
|
-
// Before starting a session, check if the first arg matches a script.
|
|
556
|
-
// Chain: bundled (agent/scripts/) → project (.soma/) → global (~/.soma/)
|
|
557
|
-
// CWD-safe: only uses universal paths, no dev-specific assumptions.
|
|
558
|
-
const subcmd = args[0];
|
|
559
|
-
if (subcmd && !subcmd.startsWith("-") && !subcmd.startsWith("@")) {
|
|
560
|
-
const { homedir } = await import("os");
|
|
561
|
-
const scriptName = `soma-${subcmd}.sh`;
|
|
562
|
-
const home = homedir();
|
|
563
|
-
|
|
564
|
-
// For 'dev': route to _dev/soma-dev/ directory (has its own router)
|
|
565
|
-
const agentDir = process.env.SOMA_CODING_AGENT_DIR || join(home, ".soma", "agent");
|
|
566
|
-
// Resolve CORE_DIR: follow symlink if dev mode (core/ → repos/agent/core/)
|
|
567
|
-
const coreDir = existsSync(join(agentDir, "core"))
|
|
568
|
-
? (await import("fs")).realpathSync(join(agentDir, "core"))
|
|
569
|
-
: null;
|
|
570
|
-
const scriptsDir = coreDir ? join(coreDir, "..", "scripts") : null;
|
|
571
|
-
|
|
572
|
-
if (subcmd === "dev" && scriptsDir) {
|
|
573
|
-
const devIndex = join(scriptsDir, "_dev", "soma-dev", "index.sh");
|
|
574
|
-
if (existsSync(devIndex)) {
|
|
575
|
-
try {
|
|
576
|
-
execFileSync("bash", [devIndex, ...args.slice(1)], { stdio: "inherit" });
|
|
577
|
-
} catch (err) { if (err.status) process.exit(err.status); }
|
|
578
|
-
process.exit(0);
|
|
579
|
-
}
|
|
580
|
-
}
|
|
581
|
-
|
|
582
|
-
// General script discovery: bundled → project → global
|
|
583
|
-
const candidates = [
|
|
584
|
-
scriptsDir ? join(scriptsDir, scriptName) : null, // bundled
|
|
585
|
-
join(process.cwd(), ".soma", "amps", "scripts", scriptName), // project
|
|
586
|
-
join(home, ".soma", "amps", "scripts", scriptName), // global
|
|
587
|
-
].filter(Boolean);
|
|
588
|
-
|
|
589
|
-
const script = candidates.find(p => existsSync(p));
|
|
590
|
-
if (script) {
|
|
591
|
-
try {
|
|
592
|
-
execFileSync("bash", [script, ...args.slice(1)], { stdio: "inherit" });
|
|
593
|
-
} catch (err) { if (err.status) process.exit(err.status); }
|
|
594
|
-
process.exit(0);
|
|
595
|
-
}
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
// soma (no subcommand match) — start session
|
|
599
|
-
main(args);
|
|
600
|
-
}
|
|
601
|
-
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;;;GAKG;AACH,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC;AACrB,OAAO,CAAC,WAAW,GAAG,CAAC,GAAG,EAAE,CAAC,EAAC,CAAC,CAA+B,CAAC;AAE/D,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,mBAAmB,CAAC,IAAI,iBAAiB,EAAE,CAAC,CAAC;AAE7C,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\n/**\n * CLI entry point for the refactored coding agent.\n * Uses main.ts with AgentSession and new mode modules.\n *\n * Test with: npx tsx src/cli-new.ts [args...]\n */\nprocess.title = \"pi\";\nprocess.emitWarning = (() => {}) as typeof process.emitWarning;\n\nimport { EnvHttpProxyAgent, setGlobalDispatcher } from \"undici\";\nimport { main } from \"./main.js\";\n\nsetGlobalDispatcher(new EnvHttpProxyAgent());\n\nmain(process.argv.slice(2));\n"]}
|
package/dist/config.d.ts
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Detect if we're running as a Bun compiled binary.
|
|
3
|
-
* Bun binaries have import.meta.url containing "$bunfs", "~BUN", or "%7EBUN" (Bun's virtual filesystem path)
|
|
4
|
-
*/
|
|
5
|
-
export declare const isBunBinary: boolean;
|
|
6
|
-
/** Detect if Bun is the runtime (compiled binary or bun run) */
|
|
7
|
-
export declare const isBunRuntime: boolean;
|
|
8
|
-
export type InstallMethod = "bun-binary" | "npm" | "pnpm" | "yarn" | "bun" | "unknown";
|
|
9
|
-
export declare function detectInstallMethod(): InstallMethod;
|
|
10
|
-
export declare function getUpdateInstruction(packageName: string): string;
|
|
11
|
-
/**
|
|
12
|
-
* Get the base directory for resolving package assets (themes, package.json, README.md, CHANGELOG.md).
|
|
13
|
-
* - For Bun binary: returns the directory containing the executable
|
|
14
|
-
* - For Node.js (dist/): returns __dirname (the dist/ directory)
|
|
15
|
-
* - For tsx (src/): returns parent directory (the package root)
|
|
16
|
-
*/
|
|
17
|
-
export declare function getPackageDir(): string;
|
|
18
|
-
/**
|
|
19
|
-
* Get path to built-in themes directory (shipped with package)
|
|
20
|
-
* - For Bun binary: theme/ next to executable
|
|
21
|
-
* - For Node.js (dist/): dist/modes/interactive/theme/
|
|
22
|
-
* - For tsx (src/): src/modes/interactive/theme/
|
|
23
|
-
*/
|
|
24
|
-
export declare function getThemesDir(): string;
|
|
25
|
-
/**
|
|
26
|
-
* Get path to HTML export template directory (shipped with package)
|
|
27
|
-
* - For Bun binary: export-html/ next to executable
|
|
28
|
-
* - For Node.js (dist/): dist/core/export-html/
|
|
29
|
-
* - For tsx (src/): src/core/export-html/
|
|
30
|
-
*/
|
|
31
|
-
export declare function getExportTemplateDir(): string;
|
|
32
|
-
/** Get path to package.json */
|
|
33
|
-
export declare function getPackageJsonPath(): string;
|
|
34
|
-
/** Get path to README.md */
|
|
35
|
-
export declare function getReadmePath(): string;
|
|
36
|
-
/** Get path to docs directory */
|
|
37
|
-
export declare function getDocsPath(): string;
|
|
38
|
-
/** Get path to examples directory */
|
|
39
|
-
export declare function getExamplesPath(): string;
|
|
40
|
-
/** Get path to CHANGELOG.md */
|
|
41
|
-
export declare function getChangelogPath(): string;
|
|
42
|
-
export declare const APP_NAME: string;
|
|
43
|
-
export declare const CONFIG_DIR_NAME: string;
|
|
44
|
-
export declare const VERSION: string;
|
|
45
|
-
export declare const ENV_AGENT_DIR: string;
|
|
46
|
-
/** Get the share viewer URL for a gist ID */
|
|
47
|
-
export declare function getShareViewerUrl(gistId: string): string;
|
|
48
|
-
/** Get the agent config directory (e.g., ~/.pi/agent/) */
|
|
49
|
-
export declare function getAgentDir(): string;
|
|
50
|
-
/** Get path to user's custom themes directory */
|
|
51
|
-
export declare function getCustomThemesDir(): string;
|
|
52
|
-
/** Get path to models.json */
|
|
53
|
-
export declare function getModelsPath(): string;
|
|
54
|
-
/** Get path to auth.json */
|
|
55
|
-
export declare function getAuthPath(): string;
|
|
56
|
-
/** Get path to settings.json */
|
|
57
|
-
export declare function getSettingsPath(): string;
|
|
58
|
-
/** Get path to tools directory */
|
|
59
|
-
export declare function getToolsDir(): string;
|
|
60
|
-
/** Get path to managed binaries directory (fd, rg) */
|
|
61
|
-
export declare function getBinDir(): string;
|
|
62
|
-
/** Get path to prompt templates directory */
|
|
63
|
-
export declare function getPromptsDir(): string;
|
|
64
|
-
/** Get path to sessions directory */
|
|
65
|
-
export declare function getSessionsDir(): string;
|
|
66
|
-
/** Get path to debug log file */
|
|
67
|
-
export declare function getDebugLogPath(): string;
|
|
68
|
-
//# sourceMappingURL=config.d.ts.map
|