@oh-my-pi/pi-coding-agent 17.2.4 → 17.2.5
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 +51 -0
- package/dist/{CHANGELOG-bpmhv26t.md → CHANGELOG-q2w43aw3.md} +51 -0
- package/dist/cli.js +4148 -3717
- package/dist/{template-8vdv6xb4.js → template-c2hyaytt.js} +8 -26
- package/dist/types/cli/args.d.ts +4 -1
- package/dist/types/cli/browser-relay-cli.d.ts +15 -0
- package/dist/types/cli/command-help.d.ts +99 -0
- package/dist/types/cli/help-extra.d.ts +2 -0
- package/dist/types/cli/thinking-levels.d.ts +5 -0
- package/dist/types/cli/update-cli.d.ts +13 -0
- package/dist/types/commands/browser-relay.d.ts +38 -0
- package/dist/types/commands/commit.d.ts +3 -0
- package/dist/types/commands/complete.d.ts +1 -1
- package/dist/types/commands/completions.d.ts +6 -0
- package/dist/types/commands/grep.d.ts +3 -0
- package/dist/types/commands/join.d.ts +4 -0
- package/dist/types/commands/launch-help.d.ts +171 -0
- package/dist/types/commands/launch.d.ts +5 -1
- package/dist/types/commands/models.d.ts +3 -0
- package/dist/types/commands/say.d.ts +10 -0
- package/dist/types/commands/worktree.d.ts +3 -0
- package/dist/types/config/keybindings.d.ts +5 -0
- package/dist/types/config/model-discovery.d.ts +2 -2
- package/dist/types/config/models-config-schema-bundle.d.ts +3 -0
- package/dist/types/config/models-config-schema.d.ts +2 -0
- package/dist/types/config/models-config.d.ts +1 -0
- package/dist/types/config/service-tier.d.ts +2 -0
- package/dist/types/config/settings-schema.d.ts +69 -21
- package/dist/types/cursor-bridge-tools.d.ts +1 -1
- package/dist/types/cursor.d.ts +7 -4
- package/dist/types/edit/index.d.ts +3 -3
- package/dist/types/edit/modes/replace.d.ts +22 -15
- package/dist/types/edit/renderer.d.ts +1 -1
- package/dist/types/eval/py/kernel.d.ts +3 -1
- package/dist/types/eval/py/spawn-options.d.ts +12 -16
- package/dist/types/extensibility/legacy-pi-ai-shim.d.ts +8 -1
- package/dist/types/extensibility/legacy-pi-coding-agent-shim.d.ts +1 -1
- package/dist/types/extensibility/plugins/legacy-pi-compat.d.ts +2 -0
- package/dist/types/launch/broker.d.ts +1 -1
- package/dist/types/launch/client.d.ts +6 -3
- package/dist/types/launch/ensure.d.ts +8 -0
- package/dist/types/launch/paths.d.ts +1 -1
- package/dist/types/launch/protocol.d.ts +2 -2
- package/dist/types/lsp/client.d.ts +2 -0
- package/dist/types/lsp/mux/daemon.d.ts +15 -0
- package/dist/types/lsp/mux/protocol.d.ts +57 -0
- package/dist/types/lsp/mux/server.d.ts +18 -0
- package/dist/types/lsp/types.d.ts +22 -2
- package/dist/types/main.d.ts +2 -0
- package/dist/types/mnemopi/embed-client.d.ts +1 -1
- package/dist/types/mnemopi/state.d.ts +0 -23
- package/dist/types/modes/components/assistant-message.d.ts +2 -0
- package/dist/types/modes/components/custom-editor.d.ts +2 -1
- package/dist/types/modes/components/read-tool-group.d.ts +2 -0
- package/dist/types/modes/components/stripped-tool-calls-placeholder.d.ts +12 -0
- package/dist/types/modes/components/tool-execution.d.ts +2 -0
- package/dist/types/modes/controllers/input-controller.d.ts +1 -0
- package/dist/types/modes/interactive-mode.d.ts +1 -0
- package/dist/types/modes/types.d.ts +1 -0
- package/dist/types/modes/workflow.d.ts +2 -1
- package/dist/types/sdk.d.ts +3 -1
- package/dist/types/secrets/index.d.ts +1 -1
- package/dist/types/session/agent-session-types.d.ts +3 -1
- package/dist/types/session/indexed-session-storage.d.ts +1 -0
- package/dist/types/session/session-advisors.d.ts +1 -1
- package/dist/types/session/session-context.d.ts +2 -1
- package/dist/types/session/session-maintenance.d.ts +1 -0
- package/dist/types/session/session-manager.d.ts +16 -11
- package/dist/types/session/session-stats.d.ts +10 -0
- package/dist/types/session/session-storage.d.ts +15 -3
- package/dist/types/system-prompt.d.ts +4 -1
- package/dist/types/task/index.d.ts +2 -1
- package/dist/types/task/spawn-policy.d.ts +5 -0
- package/dist/types/thinking.d.ts +1 -7
- package/dist/types/tools/ast-grep.d.ts +1 -1
- package/dist/types/tools/browser/registry.d.ts +2 -1
- package/dist/types/tools/browser/relay/bridge.d.ts +35 -0
- package/dist/types/tools/browser/relay/daemon.d.ts +16 -0
- package/dist/types/tools/browser/relay/kind.d.ts +19 -0
- package/dist/types/tools/browser/relay/protocol.d.ts +97 -0
- package/dist/types/tools/browser/relay/server.d.ts +35 -0
- package/dist/types/tools/browser/render.d.ts +1 -0
- package/dist/types/tools/browser.d.ts +3 -0
- package/dist/types/tools/computer/exposure.d.ts +9 -7
- package/dist/types/tools/computer/protocol.d.ts +70 -17
- package/dist/types/tools/computer/supervisor.d.ts +23 -10
- package/dist/types/tools/computer/worker-entry.d.ts +1 -0
- package/dist/types/tools/computer/worker.d.ts +42 -7
- package/dist/types/tools/computer-renderer.d.ts +7 -5
- package/dist/types/tools/computer.d.ts +25 -44
- package/dist/types/tools/context.d.ts +3 -0
- package/dist/types/tools/glob.d.ts +1 -1
- package/dist/types/tools/grep.d.ts +1 -1
- package/dist/types/tools/render-utils.d.ts +2 -0
- package/dist/types/tools/{browser/run-cancellation.d.ts → run-scope.d.ts} +8 -8
- package/dist/types/tools/tool-timeouts.d.ts +5 -0
- package/dist/types/tools/xdev.d.ts +8 -0
- package/dist/types/utils/clipboard.d.ts +2 -2
- package/dist/types/web/kagi.d.ts +1 -0
- package/dist/types/web/search/index.d.ts +1 -1
- package/dist/types/web/search/providers/anthropic.d.ts +1 -0
- package/dist/types/web/search/providers/base.d.ts +2 -0
- package/dist/types/web/search/providers/brave.d.ts +1 -0
- package/dist/types/web/search/providers/browser-page.d.ts +1 -0
- package/dist/types/web/search/providers/codex.d.ts +1 -0
- package/dist/types/web/search/providers/exa.d.ts +1 -0
- package/dist/types/web/search/providers/firecrawl.d.ts +1 -0
- package/dist/types/web/search/providers/gemini.d.ts +1 -0
- package/dist/types/web/search/providers/jina.d.ts +1 -0
- package/dist/types/web/search/providers/kagi.d.ts +1 -0
- package/dist/types/web/search/providers/kimi.d.ts +1 -0
- package/dist/types/web/search/providers/parallel.d.ts +1 -0
- package/dist/types/web/search/providers/perplexity.d.ts +1 -0
- package/dist/types/web/search/providers/searxng.d.ts +1 -0
- package/dist/types/web/search/providers/tavily.d.ts +1 -0
- package/dist/types/web/search/providers/tinyfish.d.ts +1 -0
- package/dist/types/web/search/providers/utils.d.ts +6 -9
- package/dist/types/web/search/providers/zai.d.ts +1 -0
- package/dist/types/web/search/types.d.ts +4 -0
- package/package.json +12 -12
- package/src/cli/args.ts +7 -87
- package/src/cli/browser-relay-cli.ts +119 -0
- package/src/cli/command-help.ts +103 -0
- package/src/cli/completion-gen.ts +5 -5
- package/src/cli/flag-tables.ts +9 -0
- package/src/cli/help-extra.ts +89 -0
- package/src/cli/setup-cli.ts +13 -21
- package/src/cli/thinking-levels.ts +7 -0
- package/src/cli/update-cli.ts +26 -7
- package/src/cli-commands.ts +170 -33
- package/src/cli.ts +17 -5
- package/src/commands/acp.ts +3 -1
- package/src/commands/agents.ts +3 -2
- package/src/commands/auth-broker.ts +3 -2
- package/src/commands/auth-gateway.ts +3 -2
- package/src/commands/bench.ts +2 -3
- package/src/commands/browser-relay.ts +53 -0
- package/src/commands/cleanse.ts +2 -2
- package/src/commands/commit.ts +3 -2
- package/src/commands/complete.ts +2 -1
- package/src/commands/completions.ts +3 -2
- package/src/commands/config.ts +3 -2
- package/src/commands/dry-balance.ts +2 -2
- package/src/commands/gallery.ts +3 -2
- package/src/commands/gc.ts +3 -2
- package/src/commands/grep.ts +3 -2
- package/src/commands/grievances.ts +3 -2
- package/src/commands/install.ts +2 -2
- package/src/commands/join.ts +3 -2
- package/src/commands/launch-help.ts +116 -0
- package/src/commands/launch.ts +7 -191
- package/src/commands/models.ts +3 -2
- package/src/commands/plugin.ts +3 -2
- package/src/commands/read.ts +3 -2
- package/src/commands/say.ts +3 -2
- package/src/commands/setup.ts +3 -2
- package/src/commands/shell.ts +3 -2
- package/src/commands/ssh.ts +3 -2
- package/src/commands/stats.ts +3 -2
- package/src/commands/tiny-models.ts +2 -2
- package/src/commands/token.ts +2 -2
- package/src/commands/ttsr.ts +2 -2
- package/src/commands/update.ts +3 -2
- package/src/commands/usage.ts +3 -2
- package/src/commands/web-search.ts +3 -2
- package/src/commands/worktree.ts +3 -2
- package/src/config/keybindings.ts +5 -0
- package/src/config/model-discovery.ts +30 -13
- package/src/config/model-registry.ts +9 -5
- package/src/config/models-config-schema-bundle.ts +9 -0
- package/src/config/resolve-config-value.ts +2 -1
- package/src/config/service-tier.ts +5 -0
- package/src/config/settings-schema.ts +72 -20
- package/src/cursor-bridge-tools.ts +1 -1
- package/src/cursor.ts +10 -14
- package/src/edit/diff.ts +17 -8
- package/src/edit/index.ts +20 -7
- package/src/edit/modes/replace.ts +93 -40
- package/src/edit/renderer.ts +1 -1
- package/src/edit/streaming.ts +14 -17
- package/src/eval/py/kernel.ts +2 -1
- package/src/eval/py/spawn-options.ts +24 -29
- package/src/export/html/template.js +8 -26
- package/src/extensibility/extensions/wrapper.ts +1 -0
- package/src/extensibility/legacy-pi-ai-shim.ts +22 -1
- package/src/extensibility/legacy-pi-coding-agent-shim.ts +7 -6
- package/src/extensibility/plugins/legacy-pi-compat.ts +124 -57
- package/src/extensibility/skills.ts +11 -0
- package/src/extensibility/utils.ts +10 -2
- package/src/launch/broker.ts +1 -1
- package/src/launch/client.ts +32 -13
- package/src/launch/ensure.ts +73 -0
- package/src/launch/paths.ts +1 -1
- package/src/launch/protocol.ts +2 -2
- package/src/lsp/client.ts +23 -2
- package/src/lsp/index.ts +8 -0
- package/src/lsp/mux/daemon.ts +348 -0
- package/src/lsp/mux/protocol.ts +96 -0
- package/src/lsp/mux/server.ts +797 -0
- package/src/lsp/types.ts +28 -2
- package/src/main.ts +7 -2
- package/src/mcp/oauth-flow.ts +11 -1
- package/src/mnemopi/embed-client.ts +49 -2
- package/src/mnemopi/state.ts +57 -23
- package/src/modes/components/assistant-message.ts +11 -0
- package/src/modes/components/chat-transcript-builder.ts +4 -0
- package/src/modes/components/custom-editor.ts +9 -0
- package/src/modes/components/read-tool-group.ts +10 -0
- package/src/modes/components/status-line/component.ts +1 -1
- package/src/modes/components/stripped-tool-calls-placeholder.ts +35 -0
- package/src/modes/components/tool-execution.ts +8 -0
- package/src/modes/components/tree-selector.ts +46 -48
- package/src/modes/controllers/event-controller.ts +17 -0
- package/src/modes/controllers/input-controller.ts +39 -1
- package/src/modes/controllers/mcp-command-controller.ts +11 -5
- package/src/modes/controllers/selector-controller.ts +20 -0
- package/src/modes/interactive-mode.ts +2 -0
- package/src/modes/types.ts +1 -0
- package/src/modes/utils/hotkeys-markdown.ts +1 -0
- package/src/modes/utils/interactive-context-helpers.ts +1 -0
- package/src/modes/utils/ui-helpers.ts +6 -10
- package/src/modes/workflow.ts +8 -2
- package/src/prompts/agents/init.md +1 -1
- package/src/prompts/system/plan-mode-active.md +2 -2
- package/src/prompts/system/system-prompt.md +26 -52
- package/src/prompts/system/workflow-notice.md +3 -3
- package/src/prompts/tools/ast-grep.md +1 -1
- package/src/prompts/tools/bash.md +1 -1
- package/src/prompts/tools/browser.md +1 -0
- package/src/prompts/tools/computer.md +21 -21
- package/src/prompts/tools/glob.md +1 -1
- package/src/prompts/tools/grep.md +1 -1
- package/src/prompts/tools/replace.md +5 -4
- package/src/prompts/tools/task.md +4 -4
- package/src/sdk.ts +34 -6
- package/src/secrets/index.ts +1 -1
- package/src/session/agent-session-types.ts +3 -1
- package/src/session/agent-session.ts +13 -1
- package/src/session/indexed-session-storage.ts +9 -0
- package/src/session/prewalk.ts +24 -2
- package/src/session/session-advisors.ts +2 -2
- package/src/session/session-context.ts +16 -12
- package/src/session/session-dump-format.ts +1 -1
- package/src/session/session-maintenance.ts +38 -4
- package/src/session/session-manager.ts +102 -67
- package/src/session/session-paths.ts +118 -55
- package/src/session/session-stats.ts +48 -3
- package/src/session/session-storage.ts +30 -22
- package/src/session/stream-guards.ts +1 -1
- package/src/slash-commands/builtin-registry.ts +27 -24
- package/src/system-prompt.ts +8 -3
- package/src/task/index.ts +23 -8
- package/src/task/spawn-policy.ts +14 -0
- package/src/thinking.ts +2 -8
- package/src/tools/ast-grep.ts +10 -4
- package/src/tools/browser/cmux/cmux-tab.ts +5 -10
- package/src/tools/browser/cmux/rpc.ts +2 -8
- package/src/tools/browser/registry.ts +53 -2
- package/src/tools/browser/relay/bridge.ts +945 -0
- package/src/tools/browser/relay/daemon.ts +117 -0
- package/src/tools/browser/relay/extension-assets/background.js.txt +242 -0
- package/src/tools/browser/relay/extension-assets/manifest.json.txt +14 -0
- package/src/tools/browser/relay/extension-assets/options.html.txt +53 -0
- package/src/tools/browser/relay/extension-assets/options.js.txt +23 -0
- package/src/tools/browser/relay/kind.ts +41 -0
- package/src/tools/browser/relay/protocol.ts +54 -0
- package/src/tools/browser/relay/server.ts +141 -0
- package/src/tools/browser/render.ts +4 -1
- package/src/tools/browser/shared-daemon.ts +7 -58
- package/src/tools/browser/tab-supervisor.ts +5 -4
- package/src/tools/browser/tab-worker.ts +33 -12
- package/src/tools/browser.ts +26 -1
- package/src/tools/computer/exposure.ts +11 -35
- package/src/tools/computer/protocol.ts +51 -10
- package/src/tools/computer/supervisor.ts +227 -124
- package/src/tools/computer/worker-entry.ts +11 -6
- package/src/tools/computer/worker.ts +695 -81
- package/src/tools/computer-renderer.ts +104 -65
- package/src/tools/computer.ts +134 -428
- package/src/tools/context.ts +3 -0
- package/src/tools/glob.ts +9 -2
- package/src/tools/grep.ts +12 -6
- package/src/tools/inspect-image.ts +32 -6
- package/src/tools/render-utils.ts +2 -0
- package/src/tools/{browser/run-cancellation.ts → run-scope.ts} +11 -11
- package/src/tools/tool-timeouts.ts +1 -0
- package/src/tools/xdev.ts +29 -2
- package/src/utils/clipboard.ts +40 -14
- package/src/utils/command-args.ts +26 -28
- package/src/utils/tool-choice.ts +0 -13
- package/src/web/kagi.ts +2 -1
- package/src/web/search/index.ts +18 -2
- package/src/web/search/providers/anthropic.ts +4 -1
- package/src/web/search/providers/base.ts +2 -0
- package/src/web/search/providers/brave.ts +3 -1
- package/src/web/search/providers/browser-page.ts +6 -4
- package/src/web/search/providers/codex.ts +4 -1
- package/src/web/search/providers/duckduckgo.ts +2 -1
- package/src/web/search/providers/ecosia.ts +2 -1
- package/src/web/search/providers/exa.ts +4 -2
- package/src/web/search/providers/firecrawl.ts +3 -1
- package/src/web/search/providers/gemini.ts +8 -2
- package/src/web/search/providers/google.ts +2 -1
- package/src/web/search/providers/jina.ts +12 -2
- package/src/web/search/providers/kagi.ts +3 -0
- package/src/web/search/providers/kimi.ts +5 -1
- package/src/web/search/providers/mojeek.ts +2 -1
- package/src/web/search/providers/parallel.ts +5 -1
- package/src/web/search/providers/perplexity.ts +6 -3
- package/src/web/search/providers/public.ts +1 -1
- package/src/web/search/providers/searxng.ts +11 -5
- package/src/web/search/providers/startpage.ts +10 -4
- package/src/web/search/providers/synthetic.ts +11 -5
- package/src/web/search/providers/tavily.ts +3 -1
- package/src/web/search/providers/tinyfish.ts +3 -1
- package/src/web/search/providers/utils.ts +12 -10
- package/src/web/search/providers/xai.ts +2 -2
- package/src/web/search/providers/zai.ts +18 -3
- package/src/web/search/types.ts +6 -0
package/src/commands/gallery.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Render every built-in tool's renderer across its lifecycle states.
|
|
3
3
|
*/
|
|
4
|
+
|
|
4
5
|
import { Command, Flags } from "@oh-my-pi/pi-utils/cli";
|
|
6
|
+
import { galleryHelp as commandHelp } from "../cli/command-help";
|
|
5
7
|
import { GALLERY_STATE_TOKENS, type GalleryState, parseGalleryStates, runGalleryCommand } from "../cli/gallery-cli";
|
|
6
8
|
|
|
7
9
|
export default class Gallery extends Command {
|
|
8
|
-
static description =
|
|
9
|
-
|
|
10
|
+
static description = commandHelp.description;
|
|
10
11
|
static flags = {
|
|
11
12
|
tool: Flags.string({ char: "t", description: "Render a single tool by name" }),
|
|
12
13
|
state: Flags.string({
|
package/src/commands/gc.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Run on-disk storage maintenance.
|
|
3
3
|
*/
|
|
4
|
+
|
|
4
5
|
import { Command, Flags } from "@oh-my-pi/pi-utils/cli";
|
|
6
|
+
import { gcHelp as commandHelp } from "../cli/command-help";
|
|
5
7
|
import { collectGcErrors, type GcCommandArgs, runGcCommand } from "../cli/gc-cli";
|
|
6
8
|
|
|
7
9
|
export default class Gc extends Command {
|
|
8
|
-
static description =
|
|
9
|
-
|
|
10
|
+
static description = commandHelp.description;
|
|
10
11
|
static flags = {
|
|
11
12
|
apply: Flags.boolean({ description: "Apply changes (default is dry-run)" }),
|
|
12
13
|
json: Flags.boolean({ description: "Output JSON" }),
|
package/src/commands/grep.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Test grep tool.
|
|
3
3
|
*/
|
|
4
|
+
|
|
4
5
|
import { GrepOutputMode } from "@oh-my-pi/pi-natives";
|
|
5
6
|
import { Args, Command, Flags } from "@oh-my-pi/pi-utils/cli";
|
|
7
|
+
import { grepHelp as commandHelp } from "../cli/command-help";
|
|
6
8
|
import { type GrepCommandArgs, runGrepCommand } from "../cli/grep-cli";
|
|
7
9
|
import { initTheme } from "../modes/theme/theme";
|
|
8
10
|
|
|
9
11
|
export default class Grep extends Command {
|
|
10
|
-
static description =
|
|
11
|
-
|
|
12
|
+
static description = commandHelp.description;
|
|
12
13
|
static args = {
|
|
13
14
|
pattern: Args.string({ description: "Regex pattern to search for", required: false }),
|
|
14
15
|
path: Args.string({ description: "Directory or file to search", required: false }),
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* View, clean, and push reported tool issues from automated QA.
|
|
3
3
|
*/
|
|
4
|
+
|
|
4
5
|
import { Args, Command, Flags } from "@oh-my-pi/pi-utils/cli";
|
|
6
|
+
import { grievancesHelp as commandHelp } from "../cli/command-help";
|
|
5
7
|
import { cleanGrievances, listGrievances, pushGrievances } from "../cli/grievances-cli";
|
|
6
8
|
|
|
7
9
|
export default class Grievances extends Command {
|
|
8
|
-
static description =
|
|
9
|
-
|
|
10
|
+
static description = commandHelp.description;
|
|
10
11
|
static args = {
|
|
11
12
|
// Positional action: "list" (default), "clean", or "push". A positional
|
|
12
13
|
// arg keeps the historical `omp grievances` invocation working unchanged
|
package/src/commands/install.ts
CHANGED
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
import { existsSync } from "node:fs";
|
|
22
22
|
import * as path from "node:path";
|
|
23
23
|
import { Args, Command, Flags } from "@oh-my-pi/pi-utils/cli";
|
|
24
|
+
import { installHelp as commandHelp } from "../cli/command-help";
|
|
24
25
|
import { type PluginAction, type PluginCommandArgs, runPluginCommand } from "../cli/plugin-cli";
|
|
25
26
|
import { initTheme } from "../modes/theme/theme";
|
|
26
27
|
|
|
@@ -41,8 +42,7 @@ export function looksLikeLocalPath(target: string, cwd?: string): boolean {
|
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
export default class Install extends Command {
|
|
44
|
-
static description =
|
|
45
|
-
|
|
45
|
+
static description = commandHelp.description;
|
|
46
46
|
static args = {
|
|
47
47
|
targets: Args.string({
|
|
48
48
|
description: "Local path, npm spec, or marketplace ref (e.g. ./my-ext, my-pkg@1.2.3, name@marketplace)",
|
package/src/commands/join.ts
CHANGED
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
* Join a shared collab session from the CLI: launches the interactive TUI and
|
|
3
3
|
* immediately runs `/join <link>`.
|
|
4
4
|
*/
|
|
5
|
+
|
|
5
6
|
import { APP_NAME } from "@oh-my-pi/pi-utils";
|
|
6
7
|
import { Args, Command } from "@oh-my-pi/pi-utils/cli";
|
|
7
8
|
import { parseArgs } from "../cli/args";
|
|
9
|
+
import { joinHelp as commandHelp } from "../cli/command-help";
|
|
8
10
|
import { runRootCommand } from "../main";
|
|
9
11
|
|
|
10
12
|
export default class Join extends Command {
|
|
11
|
-
static description =
|
|
12
|
-
|
|
13
|
+
static description = commandHelp.description;
|
|
13
14
|
static args = {
|
|
14
15
|
link: Args.string({
|
|
15
16
|
description: "Collab link shared by the host (/collab)",
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { Args, type CommandMetadata, Flags } from "@oh-my-pi/pi-utils/cli";
|
|
2
|
+
import { APP_NAME } from "@oh-my-pi/pi-utils/dirs";
|
|
3
|
+
import { CLI_THINKING_LEVELS } from "../cli/thinking-levels";
|
|
4
|
+
import { SERVICE_TIER_OPENAI_VALUES } from "../config/service-tier";
|
|
5
|
+
|
|
6
|
+
export const launchHelp = {
|
|
7
|
+
description: "AI coding assistant",
|
|
8
|
+
hidden: true,
|
|
9
|
+
args: {
|
|
10
|
+
messages: Args.string({
|
|
11
|
+
description: "Messages to send (prefix files with @)",
|
|
12
|
+
required: false,
|
|
13
|
+
multiple: true,
|
|
14
|
+
}),
|
|
15
|
+
},
|
|
16
|
+
flags: {
|
|
17
|
+
model: Flags.string({
|
|
18
|
+
description: 'Model to use (fuzzy match: "opus", "gpt-5.2", or "openai/gpt-5.2")',
|
|
19
|
+
}),
|
|
20
|
+
smol: Flags.string({ description: "Smol/fast model for lightweight tasks (or PI_SMOL_MODEL env)" }),
|
|
21
|
+
slow: Flags.string({ description: "Slow/reasoning model for thorough analysis (or PI_SLOW_MODEL env)" }),
|
|
22
|
+
plan: Flags.string({ description: "Plan model for architectural planning (or PI_PLAN_MODEL env)" }),
|
|
23
|
+
prewalk: Flags.boolean({
|
|
24
|
+
description:
|
|
25
|
+
"Switch from the active model to a fast/cheap model at the first edit/write after the plan's todo list exists (default off; see prewalk.enabled)",
|
|
26
|
+
}),
|
|
27
|
+
"no-prewalk": Flags.boolean({ description: "Disable prewalk even if prewalk.enabled is set" }),
|
|
28
|
+
"prewalk-into": Flags.string({ description: 'Target model for prewalk (default the "smol" role)' }),
|
|
29
|
+
"plan-yolo": Flags.boolean({
|
|
30
|
+
description:
|
|
31
|
+
"Force read-only plan mode at start, auto-approve the plan on the model's first resolve call, then switch to --plan-yolo-into to implement it",
|
|
32
|
+
}),
|
|
33
|
+
"plan-yolo-into": Flags.string({ description: 'Target model for plan-yolo execution (default the "smol" role)' }),
|
|
34
|
+
provider: Flags.string({ description: "Provider to use (legacy; prefer --model)" }),
|
|
35
|
+
"api-key": Flags.string({ description: "API key (defaults to env vars)" }),
|
|
36
|
+
"system-prompt": Flags.string({ description: "System prompt (default: coding assistant prompt)" }),
|
|
37
|
+
"append-system-prompt": Flags.string({ description: "Append text or file contents to the system prompt" }),
|
|
38
|
+
"allow-home": Flags.boolean({ description: "Allow starting in ~ without auto-switching to a temp dir" }),
|
|
39
|
+
profile: Flags.string({ description: "Use an isolated profile for auth, sessions, settings, and caches" }),
|
|
40
|
+
alias: Flags.string({ description: "Create a shell shortcut for the selected profile and exit" }),
|
|
41
|
+
cwd: Flags.string({ description: "Directory to start in (overrides the launch cwd)" }),
|
|
42
|
+
mode: Flags.string({
|
|
43
|
+
description: "Output mode: text (default), json, rpc, or rpc-ui",
|
|
44
|
+
options: ["text", "json", "rpc", "acp", "rpc-ui"],
|
|
45
|
+
}),
|
|
46
|
+
config: Flags.string({
|
|
47
|
+
description: "Load an extra config.yml-style overlay for this run (repeatable)",
|
|
48
|
+
multiple: true,
|
|
49
|
+
}),
|
|
50
|
+
"add-dir": Flags.string({
|
|
51
|
+
description: "Add a workspace directory beyond the working directory (repeatable)",
|
|
52
|
+
multiple: true,
|
|
53
|
+
}),
|
|
54
|
+
print: Flags.boolean({ char: "p", description: "Non-interactive mode: process prompt and exit" }),
|
|
55
|
+
continue: Flags.boolean({ char: "c", description: "Continue previous session" }),
|
|
56
|
+
resume: Flags.string({ char: "r", description: "Resume a session (by ID prefix, path, or picker if omitted)" }),
|
|
57
|
+
"from-claude": Flags.boolean({ description: "Import a Claude Code session into OMP" }),
|
|
58
|
+
"from-codex": Flags.boolean({ description: "Import a Codex session into OMP" }),
|
|
59
|
+
"session-dir": Flags.string({ description: "Directory for session storage and lookup" }),
|
|
60
|
+
"no-session": Flags.boolean({ description: "Don't save session (ephemeral)" }),
|
|
61
|
+
models: Flags.string({ description: "Comma-separated model patterns for Ctrl+P cycling" }),
|
|
62
|
+
"no-tools": Flags.boolean({ description: "Disable all built-in tools" }),
|
|
63
|
+
"no-lsp": Flags.boolean({ description: "Disable LSP tools, formatting, and diagnostics" }),
|
|
64
|
+
"no-pty": Flags.boolean({ description: "Disable PTY-based interactive bash execution" }),
|
|
65
|
+
tools: Flags.string({ description: "Comma-separated list of tools to enable (default: all)" }),
|
|
66
|
+
thinking: Flags.string({
|
|
67
|
+
description: `Set thinking level: ${CLI_THINKING_LEVELS.join(", ")}`,
|
|
68
|
+
options: [...CLI_THINKING_LEVELS],
|
|
69
|
+
}),
|
|
70
|
+
"service-tier": Flags.string({
|
|
71
|
+
description: "OpenAI service tier for this session (none omits service_tier)",
|
|
72
|
+
options: [...SERVICE_TIER_OPENAI_VALUES],
|
|
73
|
+
}),
|
|
74
|
+
"hide-thinking": Flags.boolean({
|
|
75
|
+
description: "Hide thinking blocks in TUI output (display only, does not disable model thinking)",
|
|
76
|
+
}),
|
|
77
|
+
advisor: Flags.boolean({
|
|
78
|
+
description: "Enable the advisor runtime (passively reviews each turn and injects notes)",
|
|
79
|
+
}),
|
|
80
|
+
hook: Flags.string({ description: "Load a hook/extension file (can be used multiple times)", multiple: true }),
|
|
81
|
+
extension: Flags.string({
|
|
82
|
+
char: "e",
|
|
83
|
+
description: "Load an extension file (can be used multiple times)",
|
|
84
|
+
multiple: true,
|
|
85
|
+
}),
|
|
86
|
+
"no-extensions": Flags.boolean({
|
|
87
|
+
description: "Disable extension discovery (explicit -e paths still work)",
|
|
88
|
+
}),
|
|
89
|
+
"no-skills": Flags.boolean({ description: "Disable skills discovery and loading" }),
|
|
90
|
+
skills: Flags.string({ description: "Comma-separated glob patterns to filter skills (e.g., git-*,docker)" }),
|
|
91
|
+
"no-rules": Flags.boolean({ description: "Disable rules discovery and loading" }),
|
|
92
|
+
export: Flags.string({ description: "Export session file to HTML and exit" }),
|
|
93
|
+
"no-title": Flags.boolean({ description: "Disable title auto-generation" }),
|
|
94
|
+
"print-thoughts": Flags.boolean({ description: "Include thinking blocks in print mode text output" }),
|
|
95
|
+
"max-time": Flags.string({ description: "Stop the session after this duration (e.g., 600, 10m, 1h)" }),
|
|
96
|
+
"auto-approve": Flags.boolean({
|
|
97
|
+
aliases: ["yolo"],
|
|
98
|
+
description: "Auto-approve all tool calls (skip approval prompts)",
|
|
99
|
+
}),
|
|
100
|
+
"approval-mode": Flags.string({
|
|
101
|
+
options: ["always-ask", "write", "yolo"],
|
|
102
|
+
description: "Override tools.approvalMode for this session (always-ask|write|yolo)",
|
|
103
|
+
}),
|
|
104
|
+
},
|
|
105
|
+
examples: [
|
|
106
|
+
`# Interactive mode\n ${APP_NAME}`,
|
|
107
|
+
`# Interactive mode with initial prompt\n ${APP_NAME} "List all .ts files in src/"`,
|
|
108
|
+
`# Include files in initial message\n ${APP_NAME} @prompt.md @image.png "What color is the sky?"`,
|
|
109
|
+
`# Non-interactive mode (process and exit)\n ${APP_NAME} -p "List all .ts files in src/"`,
|
|
110
|
+
`# Continue previous session\n ${APP_NAME} --continue "What did we discuss?"`,
|
|
111
|
+
`# Create a shell shortcut for a work profile\n ${APP_NAME} --profile work --alias omp-work`,
|
|
112
|
+
`# Use different model (fuzzy matching)\n ${APP_NAME} --model opus "Help me refactor this code"`,
|
|
113
|
+
`# Limit model cycling to specific models\n ${APP_NAME} --models claude-sonnet,claude-haiku,gpt-4o`,
|
|
114
|
+
`# Export a session file to HTML\n ${APP_NAME} --export ~/.omp/agent/sessions/--path--/session.jsonl`,
|
|
115
|
+
],
|
|
116
|
+
} satisfies CommandMetadata;
|
package/src/commands/launch.ts
CHANGED
|
@@ -2,202 +2,18 @@
|
|
|
2
2
|
* Root command for the coding agent CLI.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import { Args, Command, Flags } from "@oh-my-pi/pi-utils/cli";
|
|
5
|
+
import { Command } from "@oh-my-pi/pi-utils/cli";
|
|
7
6
|
import { type Args as ParsedArgs, parseArgs, reportCliUsageError } from "../cli/args";
|
|
8
7
|
import { runRootCommand } from "../main";
|
|
9
8
|
import { prepareAcpTerminalAuthArgs } from "../modes/acp/terminal-auth";
|
|
10
|
-
import {
|
|
9
|
+
import { launchHelp } from "./launch-help";
|
|
11
10
|
|
|
12
11
|
export default class Index extends Command {
|
|
13
|
-
static description =
|
|
14
|
-
static hidden =
|
|
15
|
-
|
|
16
|
-
static
|
|
17
|
-
|
|
18
|
-
description: "Messages to send (prefix files with @)",
|
|
19
|
-
required: false,
|
|
20
|
-
multiple: true,
|
|
21
|
-
}),
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
static flags = {
|
|
25
|
-
model: Flags.string({
|
|
26
|
-
description: 'Model to use (fuzzy match: "opus", "gpt-5.2", or "openai/gpt-5.2")',
|
|
27
|
-
}),
|
|
28
|
-
smol: Flags.string({
|
|
29
|
-
description: "Smol/fast model for lightweight tasks (or PI_SMOL_MODEL env)",
|
|
30
|
-
}),
|
|
31
|
-
slow: Flags.string({
|
|
32
|
-
description: "Slow/reasoning model for thorough analysis (or PI_SLOW_MODEL env)",
|
|
33
|
-
}),
|
|
34
|
-
plan: Flags.string({
|
|
35
|
-
description: "Plan model for architectural planning (or PI_PLAN_MODEL env)",
|
|
36
|
-
}),
|
|
37
|
-
prewalk: Flags.boolean({
|
|
38
|
-
description:
|
|
39
|
-
"Switch from the active model to a fast/cheap model at the first edit/write after the plan's todo list exists (default off; see prewalk.enabled)",
|
|
40
|
-
}),
|
|
41
|
-
"no-prewalk": Flags.boolean({
|
|
42
|
-
description: "Disable prewalk even if prewalk.enabled is set",
|
|
43
|
-
}),
|
|
44
|
-
"prewalk-into": Flags.string({
|
|
45
|
-
description: 'Target model for prewalk (default the "smol" role)',
|
|
46
|
-
}),
|
|
47
|
-
"plan-yolo": Flags.boolean({
|
|
48
|
-
description:
|
|
49
|
-
"Force read-only plan mode at start, auto-approve the plan on the model's first resolve call, then switch to --plan-yolo-into to implement it",
|
|
50
|
-
}),
|
|
51
|
-
"plan-yolo-into": Flags.string({
|
|
52
|
-
description: 'Target model for plan-yolo execution (default the "smol" role)',
|
|
53
|
-
}),
|
|
54
|
-
provider: Flags.string({
|
|
55
|
-
description: "Provider to use (legacy; prefer --model)",
|
|
56
|
-
}),
|
|
57
|
-
"api-key": Flags.string({
|
|
58
|
-
description: "API key (defaults to env vars)",
|
|
59
|
-
}),
|
|
60
|
-
"system-prompt": Flags.string({
|
|
61
|
-
description: "System prompt (default: coding assistant prompt)",
|
|
62
|
-
}),
|
|
63
|
-
"append-system-prompt": Flags.string({
|
|
64
|
-
description: "Append text or file contents to the system prompt",
|
|
65
|
-
}),
|
|
66
|
-
"allow-home": Flags.boolean({
|
|
67
|
-
description: "Allow starting in ~ without auto-switching to a temp dir",
|
|
68
|
-
}),
|
|
69
|
-
profile: Flags.string({
|
|
70
|
-
description: "Use an isolated profile for auth, sessions, settings, and caches",
|
|
71
|
-
}),
|
|
72
|
-
alias: Flags.string({
|
|
73
|
-
description: "Create a shell shortcut for the selected profile and exit",
|
|
74
|
-
}),
|
|
75
|
-
cwd: Flags.string({
|
|
76
|
-
description: "Directory to start in (overrides the launch cwd)",
|
|
77
|
-
}),
|
|
78
|
-
mode: Flags.string({
|
|
79
|
-
description: "Output mode: text (default), json, rpc, or rpc-ui",
|
|
80
|
-
options: ["text", "json", "rpc", "acp", "rpc-ui"],
|
|
81
|
-
}),
|
|
82
|
-
config: Flags.string({
|
|
83
|
-
description: "Load an extra config.yml-style overlay for this run (repeatable)",
|
|
84
|
-
multiple: true,
|
|
85
|
-
}),
|
|
86
|
-
"add-dir": Flags.string({
|
|
87
|
-
description: "Add a workspace directory beyond the working directory (repeatable)",
|
|
88
|
-
multiple: true,
|
|
89
|
-
}),
|
|
90
|
-
print: Flags.boolean({
|
|
91
|
-
char: "p",
|
|
92
|
-
description: "Non-interactive mode: process prompt and exit",
|
|
93
|
-
}),
|
|
94
|
-
continue: Flags.boolean({
|
|
95
|
-
char: "c",
|
|
96
|
-
description: "Continue previous session",
|
|
97
|
-
}),
|
|
98
|
-
resume: Flags.string({
|
|
99
|
-
char: "r",
|
|
100
|
-
description: "Resume a session (by ID prefix, path, or picker if omitted)",
|
|
101
|
-
}),
|
|
102
|
-
"from-claude": Flags.boolean({
|
|
103
|
-
description: "Import a Claude Code session into OMP",
|
|
104
|
-
}),
|
|
105
|
-
"from-codex": Flags.boolean({
|
|
106
|
-
description: "Import a Codex session into OMP",
|
|
107
|
-
}),
|
|
108
|
-
"session-dir": Flags.string({
|
|
109
|
-
description: "Directory for session storage and lookup",
|
|
110
|
-
}),
|
|
111
|
-
"no-session": Flags.boolean({
|
|
112
|
-
description: "Don't save session (ephemeral)",
|
|
113
|
-
}),
|
|
114
|
-
models: Flags.string({
|
|
115
|
-
description: "Comma-separated model patterns for Ctrl+P cycling",
|
|
116
|
-
}),
|
|
117
|
-
"no-tools": Flags.boolean({
|
|
118
|
-
description: "Disable all built-in tools",
|
|
119
|
-
}),
|
|
120
|
-
"no-lsp": Flags.boolean({
|
|
121
|
-
description: "Disable LSP tools, formatting, and diagnostics",
|
|
122
|
-
}),
|
|
123
|
-
"no-pty": Flags.boolean({
|
|
124
|
-
description: "Disable PTY-based interactive bash execution",
|
|
125
|
-
}),
|
|
126
|
-
tools: Flags.string({
|
|
127
|
-
description: "Comma-separated list of tools to enable (default: all)",
|
|
128
|
-
}),
|
|
129
|
-
thinking: Flags.string({
|
|
130
|
-
description: `Set thinking level: ${CLI_THINKING_LEVELS.join(", ")}`,
|
|
131
|
-
options: [...CLI_THINKING_LEVELS],
|
|
132
|
-
}),
|
|
133
|
-
"hide-thinking": Flags.boolean({
|
|
134
|
-
description: "Hide thinking blocks in TUI output (display only, does not disable model thinking)",
|
|
135
|
-
}),
|
|
136
|
-
advisor: Flags.boolean({
|
|
137
|
-
description: "Enable the advisor runtime (passively reviews each turn and injects notes)",
|
|
138
|
-
}),
|
|
139
|
-
hook: Flags.string({
|
|
140
|
-
description: "Load a hook/extension file (can be used multiple times)",
|
|
141
|
-
multiple: true,
|
|
142
|
-
}),
|
|
143
|
-
extension: Flags.string({
|
|
144
|
-
char: "e",
|
|
145
|
-
description: "Load an extension file (can be used multiple times)",
|
|
146
|
-
multiple: true,
|
|
147
|
-
}),
|
|
148
|
-
"no-extensions": Flags.boolean({
|
|
149
|
-
description: "Disable extension discovery (explicit -e paths still work)",
|
|
150
|
-
}),
|
|
151
|
-
"no-skills": Flags.boolean({
|
|
152
|
-
description: "Disable skills discovery and loading",
|
|
153
|
-
}),
|
|
154
|
-
skills: Flags.string({
|
|
155
|
-
description: "Comma-separated glob patterns to filter skills (e.g., git-*,docker)",
|
|
156
|
-
}),
|
|
157
|
-
"no-rules": Flags.boolean({
|
|
158
|
-
description: "Disable rules discovery and loading",
|
|
159
|
-
}),
|
|
160
|
-
export: Flags.string({
|
|
161
|
-
description: "Export session file to HTML and exit",
|
|
162
|
-
}),
|
|
163
|
-
"no-title": Flags.boolean({
|
|
164
|
-
description: "Disable title auto-generation",
|
|
165
|
-
}),
|
|
166
|
-
"print-thoughts": Flags.boolean({
|
|
167
|
-
description: "Include thinking blocks in print mode text output",
|
|
168
|
-
}),
|
|
169
|
-
"max-time": Flags.string({
|
|
170
|
-
description: "Stop the session after this duration (e.g., 600, 10m, 1h)",
|
|
171
|
-
}),
|
|
172
|
-
// `--auto-approve` / `--yolo`: declared here so oclif's auto-generated `--help` lists it.
|
|
173
|
-
// Runtime parsing happens in `cli/args.ts parseArgs` (line 176 in that file) — `runRootCommand`
|
|
174
|
-
// consumes the manual-parser output, not these oclif flag values. If you rename or remove
|
|
175
|
-
// either form, update both call sites in lockstep.
|
|
176
|
-
"auto-approve": Flags.boolean({
|
|
177
|
-
aliases: ["yolo"],
|
|
178
|
-
description: "Auto-approve all tool calls (skip approval prompts)",
|
|
179
|
-
}),
|
|
180
|
-
// `--approval-mode`: declared here so oclif's auto-generated `--help` lists it; runtime parsing
|
|
181
|
-
// happens in `cli/args.ts parseArgs`. The value is applied via `Settings.override("tools.approvalMode", …)`
|
|
182
|
-
// in `main.ts` after the `Settings` instance is constructed, so every `settings.get("tools.approvalMode")`
|
|
183
|
-
// site (wrapper, `/settings` UI) observes the same value.
|
|
184
|
-
"approval-mode": Flags.string({
|
|
185
|
-
options: ["always-ask", "write", "yolo"],
|
|
186
|
-
description: "Override tools.approvalMode for this session (always-ask|write|yolo)",
|
|
187
|
-
}),
|
|
188
|
-
};
|
|
189
|
-
|
|
190
|
-
static examples = [
|
|
191
|
-
`# Interactive mode\n ${APP_NAME}`,
|
|
192
|
-
`# Interactive mode with initial prompt\n ${APP_NAME} "List all .ts files in src/"`,
|
|
193
|
-
`# Include files in initial message\n ${APP_NAME} @prompt.md @image.png "What color is the sky?"`,
|
|
194
|
-
`# Non-interactive mode (process and exit)\n ${APP_NAME} -p "List all .ts files in src/"`,
|
|
195
|
-
`# Continue previous session\n ${APP_NAME} --continue "What did we discuss?"`,
|
|
196
|
-
`# Create a shell shortcut for a work profile\n ${APP_NAME} --profile work --alias omp-work`,
|
|
197
|
-
`# Use different model (fuzzy matching)\n ${APP_NAME} --model opus "Help me refactor this code"`,
|
|
198
|
-
`# Limit model cycling to specific models\n ${APP_NAME} --models claude-sonnet,claude-haiku,gpt-4o`,
|
|
199
|
-
`# Export a session file to HTML\n ${APP_NAME} --export ~/.omp/agent/sessions/--path--/session.jsonl`,
|
|
200
|
-
];
|
|
12
|
+
static description = launchHelp.description;
|
|
13
|
+
static hidden = launchHelp.hidden;
|
|
14
|
+
static args = launchHelp.args;
|
|
15
|
+
static flags = launchHelp.flags;
|
|
16
|
+
static examples = launchHelp.examples;
|
|
201
17
|
|
|
202
18
|
static strict = false;
|
|
203
19
|
|
package/src/commands/models.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* List, search, and refresh available models.
|
|
3
3
|
*/
|
|
4
|
+
|
|
4
5
|
import { APP_NAME } from "@oh-my-pi/pi-utils";
|
|
5
6
|
import { Args, Command, Flags } from "@oh-my-pi/pi-utils/cli";
|
|
7
|
+
import { modelsHelp as commandHelp } from "../cli/command-help";
|
|
6
8
|
import { resolveModelsArgs, runModelsCommand } from "../cli/models-cli";
|
|
7
9
|
|
|
8
10
|
export default class Models extends Command {
|
|
9
|
-
static description =
|
|
10
|
-
|
|
11
|
+
static description = commandHelp.description;
|
|
11
12
|
static args = {
|
|
12
13
|
action: Args.string({
|
|
13
14
|
description: "ls (default) | find | refresh | <provider>",
|
package/src/commands/plugin.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Manage plugins (install, uninstall, list, etc.).
|
|
3
3
|
*/
|
|
4
|
+
|
|
4
5
|
import { Args, Command, Flags } from "@oh-my-pi/pi-utils/cli";
|
|
6
|
+
import { pluginHelp as commandHelp } from "../cli/command-help";
|
|
5
7
|
import { type PluginAction, type PluginCommandArgs, runPluginCommand } from "../cli/plugin-cli";
|
|
6
8
|
import { initTheme } from "../modes/theme/theme";
|
|
7
9
|
|
|
@@ -21,8 +23,7 @@ const ACTIONS: PluginAction[] = [
|
|
|
21
23
|
];
|
|
22
24
|
|
|
23
25
|
export default class Plugin extends Command {
|
|
24
|
-
static description =
|
|
25
|
-
|
|
26
|
+
static description = commandHelp.description;
|
|
26
27
|
static args = {
|
|
27
28
|
action: Args.string({
|
|
28
29
|
description: "Plugin action",
|
package/src/commands/read.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Show what the read tool will return for a path, URL, or internal URI.
|
|
3
3
|
*/
|
|
4
|
+
|
|
4
5
|
import { Args, Command } from "@oh-my-pi/pi-utils/cli";
|
|
6
|
+
import { readHelp as commandHelp } from "../cli/command-help";
|
|
5
7
|
import { type ReadCommandArgs, runReadCommand } from "../cli/read-cli";
|
|
6
8
|
import { initTheme } from "../modes/theme/theme";
|
|
7
9
|
|
|
8
10
|
export default class Read extends Command {
|
|
9
|
-
static description =
|
|
10
|
-
|
|
11
|
+
static description = commandHelp.description;
|
|
11
12
|
static args = {
|
|
12
13
|
path: Args.string({
|
|
13
14
|
description:
|
package/src/commands/say.ts
CHANGED
|
@@ -8,9 +8,11 @@
|
|
|
8
8
|
* streamed segments into one WAV. The first run downloads the configured local
|
|
9
9
|
* model into the worker's cache.
|
|
10
10
|
*/
|
|
11
|
+
|
|
11
12
|
import { getProjectDir } from "@oh-my-pi/pi-utils";
|
|
12
13
|
import { Args, Command, Flags } from "@oh-my-pi/pi-utils/cli";
|
|
13
14
|
import chalk from "chalk";
|
|
15
|
+
import { sayHelp as commandHelp } from "../cli/command-help";
|
|
14
16
|
import { Settings, settings } from "../config/settings";
|
|
15
17
|
import { TTS_LOCAL_VOICE_VALUES } from "../tts/models";
|
|
16
18
|
import { SpeakableStream } from "../tts/speakable";
|
|
@@ -19,8 +21,7 @@ import { shutdownTtsClient, ttsClient } from "../tts/tts-client";
|
|
|
19
21
|
import { encodeWav } from "../tts/wav";
|
|
20
22
|
|
|
21
23
|
export default class Say extends Command {
|
|
22
|
-
static description =
|
|
23
|
-
|
|
24
|
+
static description = commandHelp.description;
|
|
24
25
|
static args = {
|
|
25
26
|
text: Args.string({ description: "Text to speak (or use --file)" }),
|
|
26
27
|
};
|
package/src/commands/setup.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Run onboarding setup or install dependencies for optional features.
|
|
3
3
|
*/
|
|
4
|
+
|
|
4
5
|
import { Args, Command, Flags, renderCommandHelp } from "@oh-my-pi/pi-utils/cli";
|
|
5
6
|
import { parseArgs } from "../cli/args";
|
|
7
|
+
import { setupHelp as commandHelp } from "../cli/command-help";
|
|
6
8
|
import { runSetupCommand, type SetupCommandArgs, type SetupComponent } from "../cli/setup-cli";
|
|
7
9
|
import { runRootCommand } from "../main";
|
|
8
10
|
import { initTheme } from "../modes/theme/theme";
|
|
@@ -29,8 +31,7 @@ export async function runOnboardingSetup(deps: OnboardingSetupDependencies = {})
|
|
|
29
31
|
}
|
|
30
32
|
|
|
31
33
|
export default class Setup extends Command {
|
|
32
|
-
static description =
|
|
33
|
-
|
|
34
|
+
static description = commandHelp.description;
|
|
34
35
|
static args = {
|
|
35
36
|
component: Args.string({
|
|
36
37
|
description: "Optional component to install",
|
package/src/commands/shell.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Interactive shell console.
|
|
3
3
|
*/
|
|
4
|
+
|
|
4
5
|
import { Command, Flags } from "@oh-my-pi/pi-utils/cli";
|
|
6
|
+
import { shellHelp as commandHelp } from "../cli/command-help";
|
|
5
7
|
import { runShellCommand, type ShellCommandArgs } from "../cli/shell-cli";
|
|
6
8
|
import { initTheme } from "../modes/theme/theme";
|
|
7
9
|
|
|
8
10
|
export default class Shell extends Command {
|
|
9
|
-
static description =
|
|
10
|
-
|
|
11
|
+
static description = commandHelp.description;
|
|
11
12
|
static flags = {
|
|
12
13
|
cwd: Flags.string({ char: "C", description: "Set working directory for commands" }),
|
|
13
14
|
timeout: Flags.integer({ char: "t", description: "Timeout per command in milliseconds" }),
|
package/src/commands/ssh.ts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Manage SSH host configurations.
|
|
3
3
|
*/
|
|
4
|
+
|
|
4
5
|
import { Args, Command, Flags } from "@oh-my-pi/pi-utils/cli";
|
|
6
|
+
import { sshHelp as commandHelp } from "../cli/command-help";
|
|
5
7
|
import { runSSHCommand, type SSHAction, type SSHCommandArgs } from "../cli/ssh-cli";
|
|
6
8
|
import { initTheme } from "../modes/theme/theme";
|
|
7
9
|
|
|
8
10
|
const ACTIONS: SSHAction[] = ["add", "remove", "list"];
|
|
9
11
|
|
|
10
12
|
export default class SSH extends Command {
|
|
11
|
-
static description =
|
|
12
|
-
|
|
13
|
+
static description = commandHelp.description;
|
|
13
14
|
static args = {
|
|
14
15
|
action: Args.string({
|
|
15
16
|
description: "SSH action",
|
package/src/commands/stats.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* View usage statistics dashboard.
|
|
3
3
|
*/
|
|
4
|
+
|
|
4
5
|
import { Command, Flags } from "@oh-my-pi/pi-utils/cli";
|
|
6
|
+
import { statsHelp as commandHelp } from "../cli/command-help";
|
|
5
7
|
import { runStatsCommand, type StatsCommandArgs } from "../cli/stats-cli";
|
|
6
8
|
import { initTheme } from "../modes/theme/theme";
|
|
7
9
|
|
|
8
10
|
export default class Stats extends Command {
|
|
9
|
-
static description =
|
|
10
|
-
|
|
11
|
+
static description = commandHelp.description;
|
|
11
12
|
static flags = {
|
|
12
13
|
port: Flags.integer({ char: "p", description: "Port for the dashboard server", default: 3847 }),
|
|
13
14
|
json: Flags.boolean({ char: "j", description: "Output stats as JSON", default: false }),
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Args, Command, Flags } from "@oh-my-pi/pi-utils/cli";
|
|
2
|
+
import { tinyModelsHelp as commandHelp } from "../cli/command-help";
|
|
2
3
|
import { runTinyModelsCommand, type TinyModelsAction, type TinyModelsCommandArgs } from "../cli/tiny-models-cli";
|
|
3
4
|
|
|
4
5
|
const ACTIONS: TinyModelsAction[] = ["download", "list"];
|
|
5
6
|
|
|
6
7
|
export default class TinyModels extends Command {
|
|
7
|
-
static description =
|
|
8
|
-
|
|
8
|
+
static description = commandHelp.description;
|
|
9
9
|
static args = {
|
|
10
10
|
action: Args.string({
|
|
11
11
|
description: "Action to perform",
|
package/src/commands/token.ts
CHANGED
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
import { PROVIDER_REGISTRY } from "@oh-my-pi/pi-ai";
|
|
6
6
|
import { Args, Command, Flags } from "@oh-my-pi/pi-utils/cli";
|
|
7
7
|
import chalk from "chalk";
|
|
8
|
+
import { tokenHelp as commandHelp } from "../cli/command-help";
|
|
8
9
|
import { isAuthenticated, ModelRegistry } from "../config/model-registry";
|
|
9
10
|
import { discoverAuthStorage } from "../sdk";
|
|
10
11
|
import { getAvailableAuthMethods } from "../web/search/providers/perplexity-auth";
|
|
11
12
|
|
|
12
13
|
export default class Token extends Command {
|
|
13
|
-
static description =
|
|
14
|
-
|
|
14
|
+
static description = commandHelp.description;
|
|
15
15
|
static args = {
|
|
16
16
|
provider: Args.string({
|
|
17
17
|
description: "Provider ID (e.g. anthropic, openai)",
|
package/src/commands/ttsr.ts
CHANGED
|
@@ -8,6 +8,7 @@ import * as path from "node:path";
|
|
|
8
8
|
* shows every TTSR-registered rule the current project/user config would load.
|
|
9
9
|
*/
|
|
10
10
|
import { Args, Command, Flags } from "@oh-my-pi/pi-utils/cli";
|
|
11
|
+
import { ttsrHelp as commandHelp } from "../cli/command-help";
|
|
11
12
|
import {
|
|
12
13
|
runTtsrCommand,
|
|
13
14
|
TTSR_ACTIONS,
|
|
@@ -19,8 +20,7 @@ import {
|
|
|
19
20
|
import type { TtsrMatchSource } from "../export/ttsr";
|
|
20
21
|
|
|
21
22
|
export default class Ttsr extends Command {
|
|
22
|
-
static description =
|
|
23
|
-
|
|
23
|
+
static description = commandHelp.description;
|
|
24
24
|
static args = {
|
|
25
25
|
action: Args.string({
|
|
26
26
|
description: "TTSR action",
|
package/src/commands/update.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Check for and install updates.
|
|
3
3
|
*/
|
|
4
|
+
|
|
4
5
|
import { Command, Flags } from "@oh-my-pi/pi-utils/cli";
|
|
6
|
+
import { updateHelp as commandHelp } from "../cli/command-help";
|
|
5
7
|
import * as pluginCli from "../cli/plugin-cli";
|
|
6
8
|
import * as updateCli from "../cli/update-cli";
|
|
7
9
|
import { initTheme } from "../modes/theme/theme";
|
|
8
10
|
|
|
9
11
|
export default class Update extends Command {
|
|
10
|
-
static description =
|
|
11
|
-
|
|
12
|
+
static description = commandHelp.description;
|
|
12
13
|
static flags = {
|
|
13
14
|
force: Flags.boolean({ char: "f", description: "Force update", default: false }),
|
|
14
15
|
check: Flags.boolean({ char: "c", description: "Check for updates without installing", default: false }),
|