From 67168d828920dc0f8e6b1a247f5427051715a6fd Mon Sep 17 00:00:00 2001 From: Harivansh Rathi Date: Thu, 26 Mar 2026 16:22:52 -0400 Subject: [PATCH] chore: rebrand companion-os to clanker-agent - Rename all package names from companion-* to clanker-* - Update npm scopes from @mariozechner to @harivansh-afk - Rename config directories .companion -> .clanker - Rename environment variables COMPANION_* -> CLANKER_* - Update all documentation, README files, and install scripts - Rename package directories (companion-channels, companion-grind, companion-teams) - Update GitHub URLs to harivansh-afk/clanker-agent - Preserve full git history from companion-cloud monorepo --- .gitignore | 4 +- AGENTS.md | 24 +- CONTRIBUTING.md | 6 +- README.md | 64 +- ...n.code-workspace => clanker.code-workspace | 2 +- install.sh | 14 +- package-lock.json | 7975 ----------------- package.json | 12 +- packages/agent/README.md | 16 +- packages/agent/package.json | 6 +- packages/agent/src/agent-loop.ts | 2 +- packages/agent/src/agent.ts | 2 +- packages/agent/src/proxy.ts | 2 +- packages/agent/src/types.ts | 2 +- packages/agent/test/agent-loop.test.ts | 2 +- packages/agent/test/agent.test.ts | 2 +- packages/agent/test/bedrock-models.test.ts | 6 +- packages/agent/test/e2e.test.ts | 4 +- packages/ai/README.md | 62 +- packages/ai/package.json | 6 +- packages/ai/src/cli.ts | 12 +- packages/ai/src/providers/amazon-bedrock.ts | 4 +- packages/ai/src/providers/anthropic.ts | 4 +- .../ai/src/providers/google-gemini-cli.ts | 6 +- .../src/providers/openai-codex-responses.ts | 6 +- packages/ai/src/providers/openai-responses.ts | 4 +- packages/ai/src/types.ts | 2 +- packages/ai/src/utils/oauth/openai-codex.ts | 4 +- .../anthropic-tool-name-normalization.test.ts | 6 +- packages/ai/test/cache-retention.test.ts | 26 +- packages/ai/test/context-overflow.test.ts | 4 +- .../ai/test/cross-provider-handoff.test.ts | 2 +- packages/ai/test/empty.test.ts | 2 +- packages/ai/test/image-tool-result.test.ts | 4 +- packages/ai/test/oauth.ts | 6 +- packages/ai/test/openai-codex-stream.test.ts | 24 +- packages/ai/test/stream.test.ts | 4 +- packages/ai/test/tokens.test.ts | 2 +- .../test/tool-call-id-normalization.test.ts | 2 +- .../ai/test/tool-call-without-result.test.ts | 2 +- packages/ai/test/unicode-surrogate.test.ts | 2 +- .../CHANGELOG.md | 0 .../LICENSE | 0 .../README.md | 10 +- .../package.json | 16 +- .../src/adapters/slack.ts | 16 +- .../src/adapters/telegram.ts | 8 +- .../src/adapters/transcribe-apple | Bin .../src/adapters/transcribe-apple.swift | 0 .../src/adapters/transcription.ts | 2 +- .../src/adapters/webhook.ts | 2 +- .../src/bridge/bridge.ts | 12 +- .../src/bridge/commands.ts | 4 +- .../src/bridge/rpc-runner.ts | 8 +- .../src/bridge/runner.ts | 8 +- .../src/bridge/typing.ts | 2 +- .../src/config.ts | 18 +- .../src/events.ts | 22 +- .../src/index.ts | 38 +- packages/clanker-channels/src/logger.ts | 8 + .../src/registry.ts | 2 +- .../src/tool.ts | 14 +- .../src/types.ts | 12 +- .../README.md | 8 +- .../package.json | 12 +- .../src/config.ts | 2 +- .../src/index.ts | 82 +- .../src/parser.ts | 0 .../src/prompts.ts | 0 .../src/state.ts | 2 +- .../src/time.ts | 0 .../src/types.ts | 4 +- .../test/parser.test.ts | 2 +- .../test/state.test.ts | 4 +- .../.gitignore | 2 +- .../AGENTS.md | 10 +- .../APPLESCRIPT | 0 .../{companion-teams => clanker-teams}/EOF | 0 .../{companion-teams => clanker-teams}/PATCH | 0 .../README.md | 28 +- .../WEZTERM_LAYOUT_FIX.md | 2 +- .../WEZTERM_SUPPORT.md | 6 +- .../context.md | 0 .../docs/guide.md | 48 +- .../2026-02-22-pi-teams-core-features.md | 8 +- .../docs/reference.md | 36 +- .../docs/terminal-app-research.md | 2 +- .../docs/test-0.6.0.md | 2 +- .../docs/test-0.7.0.md | 6 +- .../docs/vscode-terminal-research.md | 98 +- .../extensions/index.ts | 74 +- .../findings.md | 0 .../iTerm2.png | Bin .../package-lock.json | 0 .../package.json | 15 +- .../pi-team-in-action.png | Bin .../progress.md | 0 .../publish-to-npm.sh | 0 .../skills/teams.md | 0 .../src/adapters/cmux-adapter.ts | 4 +- .../src/adapters/iterm2-adapter.ts | 4 +- .../src/adapters/terminal-registry.ts | 0 .../src/adapters/tmux-adapter.test.ts | 12 +- .../src/adapters/tmux-adapter.ts | 4 +- .../src/adapters/wezterm-adapter.test.ts | 6 +- .../src/adapters/wezterm-adapter.ts | 4 +- .../src/adapters/zellij-adapter.ts | 2 +- .../src/utils/hooks.test.ts | 2 +- .../src/utils/hooks.ts | 6 +- .../src/utils/lock.race.test.ts | 2 +- .../src/utils/lock.test.ts | 4 +- .../src/utils/lock.ts | 2 +- .../src/utils/messaging.test.ts | 2 +- .../src/utils/messaging.ts | 0 .../src/utils/models.ts | 0 .../src/utils/paths.ts | 8 +- .../src/utils/security.test.ts | 6 +- .../src/utils/tasks.race.test.ts | 2 +- .../src/utils/tasks.test.ts | 4 +- .../src/utils/tasks.ts | 2 +- .../src/utils/teams.ts | 0 .../src/utils/terminal-adapter.ts | 0 .../task_plan.md | 2 +- .../tmux.png | Bin .../tsconfig.json | 0 .../zellij.png | Bin packages/coding-agent/README.md | 184 +- .../CHANGELOG.md | 0 .../docs/SOUL.md | 4 +- .../docs/compaction.md | 50 +- .../docs/custom-provider.md | 52 +- .../docs/development.md | 14 +- .../docs/extensions.md | 352 +- .../docs/images/doom-extension.png | Bin .../docs/images/exy.png | Bin .../docs/images/interactive-mode.png | Bin .../docs/images/tree-view.png | Bin .../docs/json.md | 14 +- .../docs/keybindings.md | 4 +- .../docs/models.md | 2 +- .../docs/packages.md | 76 +- .../docs/prompt-templates.md | 10 +- .../docs/providers.md | 12 +- .../docs/rpc.md | 26 +- .../docs/sdk.md | 84 +- .../docs/session.md | 28 +- .../docs/settings.md | 20 +- .../docs/shell-aliases.md | 4 +- .../docs/skills.md | 20 +- .../docs/terminal-setup.md | 4 +- .../docs/termux.md | 14 +- .../docs/themes.md | 24 +- .../docs/tree.md | 4 +- .../docs/tui.md | 64 +- .../docs/windows.md | 4 +- .../export-html/ansi-to-html.d.ts | 0 .../export-html/ansi-to-html.d.ts.map | 0 .../export-html/ansi-to-html.js | 0 .../export-html/ansi-to-html.js.map | 0 .../export-html/index.d.ts | 2 +- .../clanker-out/export-html/index.d.ts.map | 1 + .../export-html/index.js | 0 .../clanker-out/export-html/index.js.map | 1 + .../export-html/template.css | 0 .../export-html/template.html | 0 .../export-html/template.js | 0 .../export-html/tool-renderer.d.ts | 0 .../export-html/tool-renderer.d.ts.map | 1 + .../export-html/tool-renderer.js | 0 .../export-html/tool-renderer.js.map | 1 + .../export-html/vendor/highlight.min.js | 0 .../export-html/vendor/marked.min.js | 0 .../photon_rs_bg.wasm | Bin .../theme/dark.json | 0 .../theme/light.json | 0 .../theme/theme-schema.json | 0 .../companion-out/export-html/index.d.ts.map | 1 - .../companion-out/export-html/index.js.map | 1 - .../export-html/tool-renderer.d.ts.map | 1 - .../export-html/tool-renderer.js.map | 1 - packages/coding-agent/docs/SOUL.md | 4 +- packages/coding-agent/docs/compaction.md | 50 +- packages/coding-agent/docs/custom-provider.md | 52 +- packages/coding-agent/docs/development.md | 14 +- packages/coding-agent/docs/extensions.md | 352 +- packages/coding-agent/docs/json.md | 14 +- packages/coding-agent/docs/keybindings.md | 4 +- packages/coding-agent/docs/models.md | 2 +- packages/coding-agent/docs/packages.md | 76 +- .../coding-agent/docs/prompt-templates.md | 10 +- packages/coding-agent/docs/providers.md | 12 +- packages/coding-agent/docs/rpc.md | 26 +- packages/coding-agent/docs/sdk.md | 84 +- packages/coding-agent/docs/session.md | 28 +- packages/coding-agent/docs/settings.md | 20 +- packages/coding-agent/docs/shell-aliases.md | 4 +- packages/coding-agent/docs/skills.md | 20 +- packages/coding-agent/docs/terminal-setup.md | 4 +- packages/coding-agent/docs/termux.md | 14 +- packages/coding-agent/docs/themes.md | 24 +- packages/coding-agent/docs/tree.md | 4 +- packages/coding-agent/docs/tui.md | 64 +- packages/coding-agent/docs/windows.md | 4 +- packages/coding-agent/package.json | 20 +- .../coding-agent/scripts/migrate-sessions.sh | 6 +- packages/coding-agent/src/cli.ts | 6 +- packages/coding-agent/src/cli/args.ts | 14 +- .../coding-agent/src/cli/config-selector.ts | 4 +- .../coding-agent/src/cli/file-processor.ts | 2 +- packages/coding-agent/src/cli/list-models.ts | 4 +- .../coding-agent/src/cli/session-picker.ts | 2 +- packages/coding-agent/src/config.ts | 20 +- .../coding-agent/src/core/agent-session.ts | 10 +- .../coding-agent/src/core/auth-storage.ts | 8 +- .../coding-agent/src/core/bash-executor.ts | 4 +- .../core/compaction/branch-summarization.ts | 8 +- .../src/core/compaction/compaction.ts | 8 +- .../coding-agent/src/core/compaction/utils.ts | 4 +- packages/coding-agent/src/core/defaults.ts | 2 +- .../src/core/export-html/index.ts | 2 +- .../src/core/export-html/template.js | 4 +- .../src/core/export-html/tool-renderer.ts | 2 +- .../src/core/extensions/loader.ts | 56 +- .../src/core/extensions/runner.ts | 6 +- .../coding-agent/src/core/extensions/types.ts | 26 +- .../src/core/extensions/wrapper.ts | 2 +- .../src/core/gateway/durable-chat-run.ts | 2 +- .../src/core/gateway/internal-types.ts | 2 +- .../coding-agent/src/core/gateway/runtime.ts | 36 +- .../src/core/gateway/session-state.ts | 2 +- .../coding-agent/src/core/gateway/types.ts | 2 +- packages/coding-agent/src/core/keybindings.ts | 2 +- .../src/core/memory/runtime-memory.ts | 50 +- packages/coding-agent/src/core/messages.ts | 6 +- .../coding-agent/src/core/model-registry.ts | 4 +- .../coding-agent/src/core/model-resolver.ts | 4 +- .../coding-agent/src/core/package-manager.ts | 14 +- .../coding-agent/src/core/resource-loader.ts | 10 +- packages/coding-agent/src/core/sdk.ts | 8 +- .../coding-agent/src/core/session-manager.ts | 16 +- .../coding-agent/src/core/settings-manager.ts | 10 +- packages/coding-agent/src/core/skills.ts | 2 +- .../coding-agent/src/core/slash-commands.ts | 2 +- .../coding-agent/src/core/system-prompt.ts | 2 +- packages/coding-agent/src/core/timings.ts | 4 +- packages/coding-agent/src/core/tools/bash.ts | 4 +- .../coding-agent/src/core/tools/browser.ts | 12 +- .../coding-agent/src/core/tools/computer.ts | 4 +- packages/coding-agent/src/core/tools/edit.ts | 2 +- packages/coding-agent/src/core/tools/find.ts | 2 +- packages/coding-agent/src/core/tools/grep.ts | 2 +- packages/coding-agent/src/core/tools/index.ts | 4 +- packages/coding-agent/src/core/tools/ls.ts | 2 +- packages/coding-agent/src/core/tools/read.ts | 4 +- packages/coding-agent/src/core/tools/write.ts | 2 +- packages/coding-agent/src/main.ts | 24 +- packages/coding-agent/src/migrations.ts | 14 +- .../coding-agent/src/modes/daemon-mode.ts | 22 +- .../src/modes/interactive/components/armin.ts | 2 +- .../components/assistant-message.ts | 4 +- .../interactive/components/bash-execution.ts | 2 +- .../interactive/components/bordered-loader.ts | 2 +- .../components/branch-summary-message.ts | 2 +- .../components/compaction-summary-message.ts | 2 +- .../interactive/components/config-selector.ts | 4 +- .../interactive/components/countdown-timer.ts | 2 +- .../interactive/components/custom-editor.ts | 2 +- .../interactive/components/custom-message.ts | 6 +- .../modes/interactive/components/daxnuts.ts | 2 +- .../interactive/components/dynamic-border.ts | 2 +- .../components/extension-editor.ts | 4 +- .../interactive/components/extension-input.ts | 2 +- .../components/extension-selector.ts | 2 +- .../modes/interactive/components/footer.ts | 2 +- .../components/keybinding-hints.ts | 2 +- .../interactive/components/login-dialog.ts | 4 +- .../interactive/components/model-selector.ts | 4 +- .../interactive/components/oauth-selector.ts | 6 +- .../components/scoped-models-selector.ts | 4 +- .../components/session-selector-search.ts | 2 +- .../components/session-selector.ts | 4 +- .../components/settings-selector.ts | 6 +- .../components/show-images-selector.ts | 2 +- .../components/skill-invocation-message.ts | 2 +- .../interactive/components/theme-selector.ts | 2 +- .../components/thinking-selector.ts | 4 +- .../interactive/components/tool-execution.ts | 2 +- .../interactive/components/tree-selector.ts | 2 +- .../components/user-message-selector.ts | 2 +- .../interactive/components/user-message.ts | 2 +- .../interactive/components/visual-truncate.ts | 2 +- .../src/modes/interactive/interactive-mode.ts | 20 +- .../src/modes/interactive/theme/dark.json | 2 +- .../src/modes/interactive/theme/light.json | 2 +- .../modes/interactive/theme/theme-schema.json | 4 +- .../src/modes/interactive/theme/theme.ts | 6 +- packages/coding-agent/src/modes/print-mode.ts | 6 +- .../coding-agent/src/modes/rpc/rpc-client.ts | 4 +- .../coding-agent/src/modes/rpc/rpc-types.ts | 4 +- .../coding-agent/src/utils/image-resize.ts | 2 +- .../coding-agent/src/utils/tools-manager.ts | 2 +- ...gent-session-auto-compaction-queue.test.ts | 6 +- .../test/agent-session-branching.test.ts | 6 +- .../test/agent-session-compaction.test.ts | 6 +- .../test/agent-session-concurrent.test.ts | 6 +- .../test/agent-session-dynamic-tools.test.ts | 10 +- .../test/agent-session-retry.test.ts | 6 +- .../coding-agent/test/auth-storage.test.ts | 4 +- .../coding-agent/test/browser-tool.test.ts | 4 +- .../compaction-extensions-example.test.ts | 8 +- .../test/compaction-extensions.test.ts | 6 +- .../test/compaction-summary-reasoning.test.ts | 8 +- .../test/compaction-thinking-model.test.ts | 8 +- packages/coding-agent/test/compaction.test.ts | 6 +- .../coding-agent/test/computer-tool.test.ts | 2 +- .../test/extensions-discovery.test.ts | 56 +- .../test/extensions-input-event.test.ts | 2 +- .../test/extensions-runner.test.ts | 102 +- .../coding-agent/test/footer-width.test.ts | 2 +- .../test/gateway-session-titles.test.ts | 2 +- .../coding-agent/test/gateway-steer.test.ts | 2 +- packages/coding-agent/test/git-update.test.ts | 22 +- .../test/interactive-mode-status.test.ts | 2 +- .../coding-agent/test/model-registry.test.ts | 8 +- .../coding-agent/test/model-resolver.test.ts | 2 +- .../test/package-command-paths.test.ts | 8 +- .../coding-agent/test/package-manager.test.ts | 56 +- .../coding-agent/test/resource-loader.test.ts | 46 +- packages/coding-agent/test/rpc.test.ts | 6 +- packages/coding-agent/test/sdk-skills.test.ts | 4 +- .../session-info-modified-timestamp.test.ts | 2 +- .../test/session-selector-path-delete.test.ts | 2 +- .../test/settings-manager-bug.test.ts | 16 +- .../test/settings-manager.test.ts | 36 +- packages/coding-agent/test/skills.test.ts | 4 +- .../test/streaming-render-debug.ts | 4 +- .../coding-agent/test/system-prompt.test.ts | 2 +- .../test/tool-execution-component.test.ts | 2 +- .../test/truncate-to-width.test.ts | 2 +- packages/coding-agent/test/utilities.ts | 22 +- .../test/vercel-ai-stream.test.ts | 2 +- packages/coding-agent/tsconfig.examples.json | 8 +- packages/companion-channels/src/logger.ts | 8 - packages/tui/README.md | 26 +- packages/tui/package.json | 4 +- packages/tui/src/terminal.ts | 2 +- packages/tui/src/tui.ts | 16 +- packages/tui/test/autocomplete.test.ts | 10 +- public-install.sh | 110 +- scripts/browser-smoke-entry.ts | 2 +- scripts/build-binaries.sh | 30 +- scripts/bundle-sandbox-builtins.mjs | 30 +- scripts/cost.ts | 2 +- scripts/release.mjs | 2 +- scripts/session-transcripts.ts | 12 +- tsconfig.json | 28 +- 356 files changed, 2249 insertions(+), 10223 deletions(-) rename companion.code-workspace => clanker.code-workspace (77%) delete mode 100644 package-lock.json rename packages/{companion-channels => clanker-channels}/CHANGELOG.md (100%) rename packages/{companion-channels => clanker-channels}/LICENSE (100%) rename packages/{companion-channels => clanker-channels}/README.md (92%) rename packages/{companion-channels => clanker-channels}/package.json (56%) rename packages/{companion-channels => clanker-channels}/src/adapters/slack.ts (96%) rename packages/{companion-channels => clanker-channels}/src/adapters/telegram.ts (98%) rename packages/{companion-channels => clanker-channels}/src/adapters/transcribe-apple (100%) rename packages/{companion-channels => clanker-channels}/src/adapters/transcribe-apple.swift (100%) rename packages/{companion-channels => clanker-channels}/src/adapters/transcription.ts (99%) rename packages/{companion-channels => clanker-channels}/src/adapters/webhook.ts (95%) rename packages/{companion-channels => clanker-channels}/src/bridge/bridge.ts (97%) rename packages/{companion-channels => clanker-channels}/src/bridge/commands.ts (97%) rename packages/{companion-channels => clanker-channels}/src/bridge/rpc-runner.ts (98%) rename packages/{companion-channels => clanker-channels}/src/bridge/runner.ts (92%) rename packages/{companion-channels => clanker-channels}/src/bridge/typing.ts (94%) rename packages/{companion-channels => clanker-channels}/src/config.ts (80%) rename packages/{companion-channels => clanker-channels}/src/events.ts (84%) rename packages/{companion-channels => clanker-channels}/src/index.ts (79%) create mode 100644 packages/clanker-channels/src/logger.ts rename packages/{companion-channels => clanker-channels}/src/registry.ts (99%) rename packages/{companion-channels => clanker-channels}/src/tool.ts (88%) rename packages/{companion-channels => clanker-channels}/src/types.ts (92%) rename packages/{companion-grind => clanker-grind}/README.md (83%) rename packages/{companion-grind => clanker-grind}/package.json (62%) rename packages/{companion-grind => clanker-grind}/src/config.ts (96%) rename packages/{companion-grind => clanker-grind}/src/index.ts (80%) rename packages/{companion-grind => clanker-grind}/src/parser.ts (100%) rename packages/{companion-grind => clanker-grind}/src/prompts.ts (100%) rename packages/{companion-grind => clanker-grind}/src/state.ts (97%) rename packages/{companion-grind => clanker-grind}/src/time.ts (100%) rename packages/{companion-grind => clanker-grind}/src/types.ts (91%) rename packages/{companion-grind => clanker-grind}/test/parser.test.ts (97%) rename packages/{companion-grind => clanker-grind}/test/state.test.ts (93%) rename packages/{companion-teams => clanker-teams}/.gitignore (75%) rename packages/{companion-teams => clanker-teams}/AGENTS.md (89%) rename packages/{companion-teams => clanker-teams}/APPLESCRIPT (100%) rename packages/{companion-teams => clanker-teams}/EOF (100%) rename packages/{companion-teams => clanker-teams}/PATCH (100%) rename packages/{companion-teams => clanker-teams}/README.md (80%) rename packages/{companion-teams => clanker-teams}/WEZTERM_LAYOUT_FIX.md (95%) rename packages/{companion-teams => clanker-teams}/WEZTERM_SUPPORT.md (91%) rename packages/{companion-teams => clanker-teams}/context.md (100%) rename packages/{companion-teams => clanker-teams}/docs/guide.md (88%) rename packages/{companion-teams => clanker-teams}/docs/plans/2026-02-22-pi-teams-core-features.md (96%) rename packages/{companion-teams => clanker-teams}/docs/reference.md (92%) rename packages/{companion-teams => clanker-teams}/docs/terminal-app-research.md (99%) rename packages/{companion-teams => clanker-teams}/docs/test-0.6.0.md (89%) rename packages/{companion-teams => clanker-teams}/docs/test-0.7.0.md (86%) rename packages/{companion-teams => clanker-teams}/docs/vscode-terminal-research.md (90%) rename packages/{companion-teams => clanker-teams}/extensions/index.ts (93%) rename packages/{companion-teams => clanker-teams}/findings.md (100%) rename packages/{companion-teams => clanker-teams}/iTerm2.png (100%) rename packages/{companion-teams => clanker-teams}/package-lock.json (100%) rename packages/{companion-teams => clanker-teams}/package.json (61%) rename packages/{companion-teams => clanker-teams}/pi-team-in-action.png (100%) rename packages/{companion-teams => clanker-teams}/progress.md (100%) rename packages/{companion-teams => clanker-teams}/publish-to-npm.sh (100%) rename packages/{companion-teams => clanker-teams}/skills/teams.md (100%) rename packages/{companion-teams => clanker-teams}/src/adapters/cmux-adapter.ts (98%) rename packages/{companion-teams => clanker-teams}/src/adapters/iterm2-adapter.ts (98%) rename packages/{companion-teams => clanker-teams}/src/adapters/terminal-registry.ts (100%) rename packages/{companion-teams => clanker-teams}/src/adapters/tmux-adapter.test.ts (90%) rename packages/{companion-teams => clanker-teams}/src/adapters/tmux-adapter.ts (96%) rename packages/{companion-teams => clanker-teams}/src/adapters/wezterm-adapter.test.ts (96%) rename packages/{companion-teams => clanker-teams}/src/adapters/wezterm-adapter.ts (98%) rename packages/{companion-teams => clanker-teams}/src/adapters/zellij-adapter.ts (97%) rename packages/{companion-teams => clanker-teams}/src/utils/hooks.test.ts (97%) rename packages/{companion-teams => clanker-teams}/src/utils/hooks.ts (87%) rename packages/{companion-teams => clanker-teams}/src/utils/lock.race.test.ts (93%) rename packages/{companion-teams => clanker-teams}/src/utils/lock.test.ts (93%) rename packages/{companion-teams => clanker-teams}/src/utils/lock.ts (97%) rename packages/{companion-teams => clanker-teams}/src/utils/messaging.test.ts (97%) rename packages/{companion-teams => clanker-teams}/src/utils/messaging.ts (100%) rename packages/{companion-teams => clanker-teams}/src/utils/models.ts (100%) rename packages/{companion-teams => clanker-teams}/src/utils/paths.ts (80%) rename packages/{companion-teams => clanker-teams}/src/utils/security.test.ts (85%) rename packages/{companion-teams => clanker-teams}/src/utils/tasks.race.test.ts (95%) rename packages/{companion-teams => clanker-teams}/src/utils/tasks.test.ts (98%) rename packages/{companion-teams => clanker-teams}/src/utils/tasks.ts (99%) rename packages/{companion-teams => clanker-teams}/src/utils/teams.ts (100%) rename packages/{companion-teams => clanker-teams}/src/utils/terminal-adapter.ts (100%) rename packages/{companion-teams => clanker-teams}/task_plan.md (99%) rename packages/{companion-teams => clanker-teams}/tmux.png (100%) rename packages/{companion-teams => clanker-teams}/tsconfig.json (100%) rename packages/{companion-teams => clanker-teams}/zellij.png (100%) rename packages/coding-agent/{companion-out => clanker-out}/CHANGELOG.md (100%) rename packages/coding-agent/{companion-out => clanker-out}/docs/SOUL.md (87%) rename packages/coding-agent/{companion-out => clanker-out}/docs/compaction.md (81%) rename packages/coding-agent/{companion-out => clanker-out}/docs/custom-provider.md (89%) rename packages/coding-agent/{companion-out => clanker-out}/docs/development.md (82%) rename packages/coding-agent/{companion-out => clanker-out}/docs/extensions.md (86%) rename packages/coding-agent/{companion-out => clanker-out}/docs/images/doom-extension.png (100%) rename packages/coding-agent/{companion-out => clanker-out}/docs/images/exy.png (100%) rename packages/coding-agent/{companion-out => clanker-out}/docs/images/interactive-mode.png (100%) rename packages/coding-agent/{companion-out => clanker-out}/docs/images/tree-view.png (100%) rename packages/coding-agent/{companion-out => clanker-out}/docs/json.md (82%) rename packages/coding-agent/{companion-out => clanker-out}/docs/keybindings.md (97%) rename packages/coding-agent/{companion-out => clanker-out}/docs/models.md (99%) rename packages/coding-agent/{companion-out => clanker-out}/docs/packages.md (55%) rename packages/coding-agent/{companion-out => clanker-out}/docs/prompt-templates.md (84%) rename packages/coding-agent/{companion-out => clanker-out}/docs/providers.md (89%) rename packages/coding-agent/{companion-out => clanker-out}/docs/rpc.md (97%) rename packages/coding-agent/{companion-out => clanker-out}/docs/sdk.md (91%) rename packages/coding-agent/{companion-out => clanker-out}/docs/session.md (90%) rename packages/coding-agent/{companion-out => clanker-out}/docs/settings.md (92%) rename packages/coding-agent/{companion-out => clanker-out}/docs/shell-aliases.md (53%) rename packages/coding-agent/{companion-out => clanker-out}/docs/skills.md (88%) rename packages/coding-agent/{companion-out => clanker-out}/docs/terminal-setup.md (79%) rename packages/coding-agent/{companion-out => clanker-out}/docs/termux.md (89%) rename packages/coding-agent/{companion-out => clanker-out}/docs/themes.md (89%) rename packages/coding-agent/{companion-out => clanker-out}/docs/tree.md (98%) rename packages/coding-agent/{companion-out => clanker-out}/docs/tui.md (93%) rename packages/coding-agent/{companion-out => clanker-out}/docs/windows.md (68%) rename packages/coding-agent/{companion-out => clanker-out}/export-html/ansi-to-html.d.ts (100%) rename packages/coding-agent/{companion-out => clanker-out}/export-html/ansi-to-html.d.ts.map (100%) rename packages/coding-agent/{companion-out => clanker-out}/export-html/ansi-to-html.js (100%) rename packages/coding-agent/{companion-out => clanker-out}/export-html/ansi-to-html.js.map (100%) rename packages/coding-agent/{companion-out => clanker-out}/export-html/index.d.ts (95%) create mode 100644 packages/coding-agent/clanker-out/export-html/index.d.ts.map rename packages/coding-agent/{companion-out => clanker-out}/export-html/index.js (100%) create mode 100644 packages/coding-agent/clanker-out/export-html/index.js.map rename packages/coding-agent/{companion-out => clanker-out}/export-html/template.css (100%) rename packages/coding-agent/{companion-out => clanker-out}/export-html/template.html (100%) rename packages/coding-agent/{companion-out => clanker-out}/export-html/template.js (100%) rename packages/coding-agent/{companion-out => clanker-out}/export-html/tool-renderer.d.ts (100%) create mode 100644 packages/coding-agent/clanker-out/export-html/tool-renderer.d.ts.map rename packages/coding-agent/{companion-out => clanker-out}/export-html/tool-renderer.js (100%) create mode 100644 packages/coding-agent/clanker-out/export-html/tool-renderer.js.map rename packages/coding-agent/{companion-out => clanker-out}/export-html/vendor/highlight.min.js (100%) rename packages/coding-agent/{companion-out => clanker-out}/export-html/vendor/marked.min.js (100%) rename packages/coding-agent/{companion-out => clanker-out}/photon_rs_bg.wasm (100%) rename packages/coding-agent/{companion-out => clanker-out}/theme/dark.json (100%) rename packages/coding-agent/{companion-out => clanker-out}/theme/light.json (100%) rename packages/coding-agent/{companion-out => clanker-out}/theme/theme-schema.json (100%) delete mode 100644 packages/coding-agent/companion-out/export-html/index.d.ts.map delete mode 100644 packages/coding-agent/companion-out/export-html/index.js.map delete mode 100644 packages/coding-agent/companion-out/export-html/tool-renderer.d.ts.map delete mode 100644 packages/coding-agent/companion-out/export-html/tool-renderer.js.map delete mode 100644 packages/companion-channels/src/logger.ts diff --git a/.gitignore b/.gitignore index ffb72ea..abc4fca 100644 --- a/.gitignore +++ b/.gitignore @@ -23,13 +23,13 @@ packages/*/dist-firefox/ .npm/ coverage/ .nyc_output/ -.companion_config/ +.clanker_config/ tui-debug.log compaction-results/ .opencode/ syntax.jsonl out.jsonl -companion-*.html +clanker-*.html out.html packages/coding-agent/binaries/ todo.md diff --git a/AGENTS.md b/AGENTS.md index e0a4f49..292db0b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -71,29 +71,29 @@ When closing issues via commit: - GitHub CLI for issues/PRs - Add package labels to issues/PRs: pkg:agent, pkg:ai, pkg:coding-agent, pkg:mom, pkg:pods, pkg:tui, pkg:web-ui -## Testing companion Interactive Mode with tmux +## Testing clanker Interactive Mode with tmux -To test companion's TUI in a controlled terminal environment: +To test clanker's TUI in a controlled terminal environment: ```bash # Create tmux session with specific dimensions -tmux new-session -d -s companion-test -x 80 -y 24 +tmux new-session -d -s clanker-test -x 80 -y 24 -# Start companion from source -tmux send-keys -t companion-test "cd /Users/badlogic/workspaces/companion-mono && ./companion-test.sh" Enter +# Start clanker from source +tmux send-keys -t clanker-test "cd /Users/badlogic/workspaces/clanker-agent && ./clanker-test.sh" Enter # Wait for startup, then capture output -sleep 3 && tmux capture-pane -t companion-test -p +sleep 3 && tmux capture-pane -t clanker-test -p # Send input -tmux send-keys -t companion-test "your prompt here" Enter +tmux send-keys -t clanker-test "your prompt here" Enter # Send special keys -tmux send-keys -t companion-test Escape -tmux send-keys -t companion-test C-o # ctrl+o +tmux send-keys -t clanker-test Escape +tmux send-keys -t clanker-test C-o # ctrl+o # Cleanup -tmux kill-session -t companion-test +tmux kill-session -t clanker-test ``` ## Style @@ -127,8 +127,8 @@ Use these sections under `## [Unreleased]`: ### Attribution -- **Internal changes (from issues)**: `Fixed foo bar ([#123](https://github.com/badlogic/companion-mono/issues/123))` -- **External contributions**: `Added feature X ([#456](https://github.com/badlogic/companion-mono/pull/456) by [@username](https://github.com/username))` +- **Internal changes (from issues)**: `Fixed foo bar ([#123](https://github.com/badlogic/clanker-agent/issues/123))` +- **External contributions**: `Added feature X ([#456](https://github.com/badlogic/clanker-agent/pull/456) by [@username](https://github.com/username))` ## Adding a New LLM Provider (packages/ai) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 94f1cdf..f38fb84 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,4 @@ -# Contributing to companion +# Contributing to clanker-agent Thanks for wanting to contribute! This guide exists to save both of us time. @@ -8,7 +8,7 @@ Thanks for wanting to contribute! This guide exists to save both of us time. Using AI to write code is fine. You can gain understanding by interrogating an agent with access to the codebase until you grasp all edge cases and effects of your changes. What's not fine is submitting agent-generated slop without that understanding. -If you use an agent, run it from the `companion` root directory so it picks up `AGENTS.md` automatically. Your agent must follow the rules and guidelines in that file. +If you use an agent, run it from the `clanker` root directory so it picks up `AGENTS.md` automatically. Your agent must follow the rules and guidelines in that file. ## First-Time Contributors @@ -35,7 +35,7 @@ If you're adding a new provider to `packages/ai`, see `AGENTS.md` for required t ## Philosophy -companion's core is minimal. If your feature doesn't belong in the core, it should be an extension. PRs that bloat the core will likely be rejected. +clanker's core is minimal. If your feature doesn't belong in the core, it should be an extension. PRs that bloat the core will likely be rejected. ## Questions? diff --git a/README.md b/README.md index 98476ad..3a517b4 100644 --- a/README.md +++ b/README.md @@ -1,33 +1,33 @@

- - companion logo + + clanker logo

Discord - Build status + Build status

- companion.dev domain graciously donated by + clanker.dev domain graciously donated by

Exy mascot
exe.dev

-# companion +# clanker-agent -> **Looking for the companion coding agent?** See **[packages/coding-agent](packages/coding-agent)** for installation and usage. +> **Looking for the clanker coding agent?** See **[packages/coding-agent](packages/coding-agent)** for installation and usage. -Tools for building AI agents and running the companion coding agent. +Tools for building AI agents and running the clanker coding agent. ## Packages | Package | Description | | ---------------------------------------------------------- | ---------------------------------------------------------------- | -| **[@mariozechner/companion-ai](packages/ai)** | Unified multi-provider LLM API (OpenAI, Anthropic, Google, etc.) | -| **[@mariozechner/companion-agent-core](packages/agent)** | Agent runtime with tool calling and state management | -| **[@mariozechner/companion-coding-agent](packages/coding-agent)** | Interactive coding agent CLI | -| **[@mariozechner/companion-tui](packages/tui)** | Terminal UI library with differential rendering | -| **[@mariozechner/companion-web-ui](packages/web-ui)** | Web components for AI chat interfaces | +| **[@mariozechner/clanker-ai](packages/ai)** | Unified multi-provider LLM API (OpenAI, Anthropic, Google, etc.) | +| **[@mariozechner/clanker-agent-core](packages/agent)** | Agent runtime with tool calling and state management | +| **[@mariozechner/clanker-coding-agent](packages/coding-agent)** | Interactive coding agent CLI | +| **[@mariozechner/clanker-tui](packages/tui)** | Terminal UI library with differential rendering | +| **[@mariozechner/clanker-web-ui](packages/web-ui)** | Web components for AI chat interfaces | ## Contributing @@ -40,27 +40,27 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for contribution guidelines and [AGENTS.m Use this for users on production machines where you don't want to expose source. ```bash -curl -fsSL https://raw.githubusercontent.com/getcompanion-ai/co-mono/main/public-install.sh | bash +curl -fsSL https://raw.githubusercontent.com/harivansh-afk/clanker-agent/main/public-install.sh | bash ``` Install everything and keep it always-on (recommended for new devices): ```bash -curl -fsSL https://raw.githubusercontent.com/getcompanion-ai/co-mono/main/public-install.sh | bash -s -- --daemon --start +curl -fsSL https://raw.githubusercontent.com/harivansh-afk/clanker-agent/main/public-install.sh | bash -s -- --daemon --start ``` This installer: - Downloads the latest release (or falls back to source when needed), -- writes `~/.local/bin/companion` launcher, -- populates `~/.companion/agent/settings.json` with package list, +- writes `~/.local/bin/clanker` launcher, +- populates `~/.clanker/agent/settings.json` with package list, - installs packages (if `npm` is available), -- and can install a user service for `companion daemon` so it stays alive (`systemd` on Linux, `launchd` on macOS). +- and can install a user service for `clanker daemon` so it stays alive (`systemd` on Linux, `launchd` on macOS). Preinstalled package sources are: ```json -["npm:@e9n/companion-channels", "npm:companion-teams"] +["npm:@e9n/clanker-channels", "npm:clanker-teams"] ``` If `npm` is available, it also installs these packages during install. @@ -68,48 +68,48 @@ If `npm` is available, it also installs these packages during install. If no release asset is found, the installer falls back to source. ```bash -COMPANION_FALLBACK_TO_SOURCE=0 \ - curl -fsSL https://raw.githubusercontent.com/getcompanion-ai/co-mono/main/public-install.sh | bash -s -- --daemon --start +CLANKER_FALLBACK_TO_SOURCE=0 \ + curl -fsSL https://raw.githubusercontent.com/harivansh-afk/clanker-agent/main/public-install.sh | bash -s -- --daemon --start ``` `public-install.sh` options: ```bash -curl -fsSL https://raw.githubusercontent.com/getcompanion-ai/co-mono/main/public-install.sh | bash -s -- --help +curl -fsSL https://raw.githubusercontent.com/harivansh-afk/clanker-agent/main/public-install.sh | bash -s -- --help ``` ### Local (source) ```bash -git clone https://github.com/getcompanion-ai/co-mono.git -cd co-mono +git clone https://github.com/harivansh-afk/clanker-agent.git +cd clanker-agent ./install.sh ``` Run: ```bash -./companion +./clanker ``` Run in background with extensions active: ```bash -./companion daemon +./clanker daemon ``` -For a user systemd setup, create `~/.config/systemd/user/companion.service` with: +For a user systemd setup, create `~/.config/systemd/user/clanker.service` with: ```ini [Unit] -Description=companion daemon +Description=clanker daemon After=network-online.target [Service] Type=simple -Environment=CO_MONO_AGENT_DIR=%h/.companion/agent -Environment=COMPANION_CODING_AGENT_DIR=%h/.companion/agent -ExecStart=/absolute/path/to/repo/companion daemon +Environment=CLANKER_MONO_AGENT_DIR=%h/.clanker/agent +Environment=CLANKER_CODING_AGENT_DIR=%h/.clanker/agent +ExecStart=/absolute/path/to/repo/clanker daemon Restart=always RestartSec=5 @@ -121,7 +121,7 @@ Then enable: ```bash systemctl --user daemon-reload -systemctl --user enable --now companion +systemctl --user enable --now clanker ``` On macOS, `public-install.sh --daemon --start` now provisions a per-user `launchd` agent automatically. @@ -140,7 +140,7 @@ npm install # Install all dependencies npm run build # Build all packages npm run check # Lint, format, and type check ./test.sh # Run tests (skips LLM-dependent tests without API keys) -./companion-test.sh # Run companion from sources (must be run from repo root) +./clanker-test.sh # Run clanker from sources (must be run from repo root) ``` > **Note:** `npm run check` requires `npm run build` to be run first. The web-ui package uses `tsc` which needs compiled `.d.ts` files from dependencies. diff --git a/companion.code-workspace b/clanker.code-workspace similarity index 77% rename from companion.code-workspace rename to clanker.code-workspace index c480ff6..416c820 100644 --- a/companion.code-workspace +++ b/clanker.code-workspace @@ -1,7 +1,7 @@ { "folders": [ { - "name": "companion", + "name": "clanker-agent", "path": "." }, { diff --git a/install.sh b/install.sh index d2e190b..abf065e 100755 --- a/install.sh +++ b/install.sh @@ -24,12 +24,12 @@ need npm cd "$ROOT_DIR" -if [[ "${COMPANION_SKIP_INSTALL:-${CO_MONO_SKIP_INSTALL:-0}}" != "1" ]]; then +if [[ "${CLANKER_SKIP_INSTALL:-${CLANKER_MONO_SKIP_INSTALL:-0}}" != "1" ]]; then log "Installing workspace dependencies" npm install fi -if [[ "${COMPANION_SKIP_BUILD:-${CO_MONO_SKIP_BUILD:-0}}" != "1" ]]; then +if [[ "${CLANKER_SKIP_BUILD:-${CLANKER_MONO_SKIP_BUILD:-0}}" != "1" ]]; then log "Building core packages" BUILD_FAILED=0 for pkg in packages/tui packages/ai packages/agent packages/coding-agent; do @@ -46,7 +46,7 @@ if [[ "$BUILD_FAILED" == "1" ]] && [[ ! -f "$ROOT_DIR/packages/coding-agent/src/ fail "No usable coding-agent CLI source found for source launch fallback." fi -LAUNCHER="$ROOT_DIR/companion" +LAUNCHER="$ROOT_DIR/clanker" cat > "$LAUNCHER" <<'EOF' #!/usr/bin/env bash @@ -54,8 +54,8 @@ set -euo pipefail ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -if [[ -x "$ROOT_DIR/packages/coding-agent/dist/companion" ]]; then - exec "$ROOT_DIR/packages/coding-agent/dist/companion" "$@" +if [[ -x "$ROOT_DIR/packages/coding-agent/dist/clanker" ]]; then + exec "$ROOT_DIR/packages/coding-agent/dist/clanker" "$@" fi if [[ -f "$ROOT_DIR/packages/coding-agent/dist/cli.js" ]]; then @@ -66,10 +66,10 @@ if [[ -x "$ROOT_DIR/node_modules/.bin/tsx" ]] && [[ -f "$ROOT_DIR/packages/codin exec "$ROOT_DIR/node_modules/.bin/tsx" "$ROOT_DIR/packages/coding-agent/src/cli.ts" "$@" fi -echo "ERROR: no runnable companion binary found and tsx fallback is unavailable." >&2 +echo "ERROR: no runnable clanker binary found and tsx fallback is unavailable." >&2 exit 1 EOF chmod +x "$LAUNCHER" log "Created launcher: $LAUNCHER" -log "Run with: ./companion" +log "Run with: ./clanker" diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 2b0d0a5..0000000 --- a/package-lock.json +++ /dev/null @@ -1,7975 +0,0 @@ -{ - "name": "companion", - "version": "0.0.3", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "companion", - "version": "0.0.3", - "workspaces": [ - "packages/*" - ], - "dependencies": { - "@mariozechner/companion-coding-agent": "^0.30.2", - "@mariozechner/jiti": "^2.6.5", - "get-east-asian-width": "^1.4.0" - }, - "devDependencies": { - "@biomejs/biome": "2.3.5", - "@types/node": "^22.10.5", - "@typescript/native-preview": "7.0.0-dev.20260120.1", - "concurrently": "^9.2.1", - "husky": "^9.1.7", - "shx": "^0.4.0", - "tsx": "^4.20.3", - "typescript": "^5.9.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@anthropic-ai/sdk": { - "version": "0.73.0", - "resolved": "https://registry.npmjs.org/@anthropic-ai/sdk/-/sdk-0.73.0.tgz", - "integrity": "sha512-URURVzhxXGJDGUGFunIOtBlSl7KWvZiAAKY/ttTkZAkXT9bTPqdk2eK0b8qqSxXpikh3QKPnPYpiyX98zf5ebw==", - "license": "MIT", - "dependencies": { - "json-schema-to-ts": "^3.1.1" - }, - "bin": { - "anthropic-ai-sdk": "bin/cli" - }, - "peerDependencies": { - "zod": "^3.25.0 || ^4.0.0" - }, - "peerDependenciesMeta": { - "zod": { - "optional": true - } - } - }, - "node_modules/@aws-crypto/crc32": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/crc32/-/crc32-5.2.0.tgz", - "integrity": "sha512-nLbCWqQNgUiwwtFsen1AdzAtvuLRsQS8rYgMuxCrdKf9kOssamGLuPwyTY9wyYblNr9+1XM8v6zoDTPPSIeANg==", - "license": "Apache-2.0", - "dependencies": { - "@aws-crypto/util": "^5.2.0", - "@aws-sdk/types": "^3.222.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-crypto/sha256-browser": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-browser/-/sha256-browser-5.2.0.tgz", - "integrity": "sha512-AXfN/lGotSQwu6HNcEsIASo7kWXZ5HYWvfOmSNKDsEqC4OashTp8alTmaz+F7TC2L083SFv5RdB+qU3Vs1kZqw==", - "license": "Apache-2.0", - "dependencies": { - "@aws-crypto/sha256-js": "^5.2.0", - "@aws-crypto/supports-web-crypto": "^5.2.0", - "@aws-crypto/util": "^5.2.0", - "@aws-sdk/types": "^3.222.0", - "@aws-sdk/util-locate-window": "^3.0.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.6.2" - } - }, - "node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/is-array-buffer": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", - "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/util-buffer-from": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", - "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/is-array-buffer": "^2.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/util-utf8": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", - "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^2.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-crypto/sha256-js": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-5.2.0.tgz", - "integrity": "sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA==", - "license": "Apache-2.0", - "dependencies": { - "@aws-crypto/util": "^5.2.0", - "@aws-sdk/types": "^3.222.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-crypto/supports-web-crypto": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/supports-web-crypto/-/supports-web-crypto-5.2.0.tgz", - "integrity": "sha512-iAvUotm021kM33eCdNfwIN//F77/IADDSs58i+MDaOqFrVjZo9bAal0NK7HurRuWLLpF1iLX7gbWrjHjeo+YFg==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - } - }, - "node_modules/@aws-crypto/util": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-5.2.0.tgz", - "integrity": "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "^3.222.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.6.2" - } - }, - "node_modules/@aws-crypto/util/node_modules/@smithy/is-array-buffer": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", - "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-crypto/util/node_modules/@smithy/util-buffer-from": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", - "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/is-array-buffer": "^2.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", - "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^2.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-bedrock-runtime": { - "version": "3.1003.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-bedrock-runtime/-/client-bedrock-runtime-3.1003.0.tgz", - "integrity": "sha512-b39kYrFC3dGFQ7S5UiHKD8aGCFr0/k+QXDzqnT8N2zi8JILEvdxBhMWNqCIpZAbCCK2Jp9S8jK5/Vh0TfLUIPQ==", - "license": "Apache-2.0", - "dependencies": { - "@aws-crypto/sha256-browser": "5.2.0", - "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "^3.973.18", - "@aws-sdk/credential-provider-node": "^3.972.17", - "@aws-sdk/eventstream-handler-node": "^3.972.10", - "@aws-sdk/middleware-eventstream": "^3.972.7", - "@aws-sdk/middleware-host-header": "^3.972.7", - "@aws-sdk/middleware-logger": "^3.972.7", - "@aws-sdk/middleware-recursion-detection": "^3.972.7", - "@aws-sdk/middleware-user-agent": "^3.972.18", - "@aws-sdk/middleware-websocket": "^3.972.12", - "@aws-sdk/region-config-resolver": "^3.972.7", - "@aws-sdk/token-providers": "3.1003.0", - "@aws-sdk/types": "^3.973.5", - "@aws-sdk/util-endpoints": "^3.996.4", - "@aws-sdk/util-user-agent-browser": "^3.972.7", - "@aws-sdk/util-user-agent-node": "^3.973.3", - "@smithy/config-resolver": "^4.4.10", - "@smithy/core": "^3.23.8", - "@smithy/eventstream-serde-browser": "^4.2.11", - "@smithy/eventstream-serde-config-resolver": "^4.3.11", - "@smithy/eventstream-serde-node": "^4.2.11", - "@smithy/fetch-http-handler": "^5.3.13", - "@smithy/hash-node": "^4.2.11", - "@smithy/invalid-dependency": "^4.2.11", - "@smithy/middleware-content-length": "^4.2.11", - "@smithy/middleware-endpoint": "^4.4.22", - "@smithy/middleware-retry": "^4.4.39", - "@smithy/middleware-serde": "^4.2.12", - "@smithy/middleware-stack": "^4.2.11", - "@smithy/node-config-provider": "^4.3.11", - "@smithy/node-http-handler": "^4.4.14", - "@smithy/protocol-http": "^5.3.11", - "@smithy/smithy-client": "^4.12.2", - "@smithy/types": "^4.13.0", - "@smithy/url-parser": "^4.2.11", - "@smithy/util-base64": "^4.3.2", - "@smithy/util-body-length-browser": "^4.2.2", - "@smithy/util-body-length-node": "^4.2.3", - "@smithy/util-defaults-mode-browser": "^4.3.38", - "@smithy/util-defaults-mode-node": "^4.2.41", - "@smithy/util-endpoints": "^3.3.2", - "@smithy/util-middleware": "^4.2.11", - "@smithy/util-retry": "^4.2.11", - "@smithy/util-stream": "^4.5.17", - "@smithy/util-utf8": "^4.2.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@aws-sdk/core": { - "version": "3.973.18", - "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.973.18.tgz", - "integrity": "sha512-GUIlegfcK2LO1J2Y98sCJy63rQSiLiDOgVw7HiHPRqfI2vb3XozTVqemwO0VSGXp54ngCnAQz0Lf0YPCBINNxA==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "^3.973.5", - "@aws-sdk/xml-builder": "^3.972.10", - "@smithy/core": "^3.23.8", - "@smithy/node-config-provider": "^4.3.11", - "@smithy/property-provider": "^4.2.11", - "@smithy/protocol-http": "^5.3.11", - "@smithy/signature-v4": "^5.3.11", - "@smithy/smithy-client": "^4.12.2", - "@smithy/types": "^4.13.0", - "@smithy/util-base64": "^4.3.2", - "@smithy/util-middleware": "^4.2.11", - "@smithy/util-utf8": "^4.2.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-env": { - "version": "3.972.16", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.972.16.tgz", - "integrity": "sha512-HrdtnadvTGAQUr18sPzGlE5El3ICphnH6SU7UQOMOWFgRKbTRNN8msTxM4emzguUso9CzaHU2xy5ctSrmK5YNA==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "^3.973.18", - "@aws-sdk/types": "^3.973.5", - "@smithy/property-provider": "^4.2.11", - "@smithy/types": "^4.13.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-http": { - "version": "3.972.18", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.972.18.tgz", - "integrity": "sha512-NyB6smuZAixND5jZumkpkunQ0voc4Mwgkd+SZ6cvAzIB7gK8HV8Zd4rS8Kn5MmoGgusyNfVGG+RLoYc4yFiw+A==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "^3.973.18", - "@aws-sdk/types": "^3.973.5", - "@smithy/fetch-http-handler": "^5.3.13", - "@smithy/node-http-handler": "^4.4.14", - "@smithy/property-provider": "^4.2.11", - "@smithy/protocol-http": "^5.3.11", - "@smithy/smithy-client": "^4.12.2", - "@smithy/types": "^4.13.0", - "@smithy/util-stream": "^4.5.17", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-ini": { - "version": "3.972.16", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.972.16.tgz", - "integrity": "sha512-hzAnzNXKV0A4knFRWGu2NCt72P4WWxpEGnOc6H3DptUjC4oX3hGw846oN76M1rTHAOwDdbhjU0GAOWR4OUfTZg==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "^3.973.18", - "@aws-sdk/credential-provider-env": "^3.972.16", - "@aws-sdk/credential-provider-http": "^3.972.18", - "@aws-sdk/credential-provider-login": "^3.972.16", - "@aws-sdk/credential-provider-process": "^3.972.16", - "@aws-sdk/credential-provider-sso": "^3.972.16", - "@aws-sdk/credential-provider-web-identity": "^3.972.16", - "@aws-sdk/nested-clients": "^3.996.6", - "@aws-sdk/types": "^3.973.5", - "@smithy/credential-provider-imds": "^4.2.11", - "@smithy/property-provider": "^4.2.11", - "@smithy/shared-ini-file-loader": "^4.4.6", - "@smithy/types": "^4.13.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-login": { - "version": "3.972.16", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-login/-/credential-provider-login-3.972.16.tgz", - "integrity": "sha512-VI0kXTlr0o1FTay+Jvx6AKqx5ECBgp7X4VevGBEbuXdCXnNp7SPU0KvjsOLVhIz3OoPK4/lTXphk43t0IVk65w==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "^3.973.18", - "@aws-sdk/nested-clients": "^3.996.6", - "@aws-sdk/types": "^3.973.5", - "@smithy/property-provider": "^4.2.11", - "@smithy/protocol-http": "^5.3.11", - "@smithy/shared-ini-file-loader": "^4.4.6", - "@smithy/types": "^4.13.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-node": { - "version": "3.972.17", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.972.17.tgz", - "integrity": "sha512-98MAcQ2Dk7zkvgwZ5f6fLX2lTyptC3gTSDx4EpvTdJWET8qs9lBPYggoYx7GmKp/5uk0OwVl0hxIDZsDNS/Y9g==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/credential-provider-env": "^3.972.16", - "@aws-sdk/credential-provider-http": "^3.972.18", - "@aws-sdk/credential-provider-ini": "^3.972.16", - "@aws-sdk/credential-provider-process": "^3.972.16", - "@aws-sdk/credential-provider-sso": "^3.972.16", - "@aws-sdk/credential-provider-web-identity": "^3.972.16", - "@aws-sdk/types": "^3.973.5", - "@smithy/credential-provider-imds": "^4.2.11", - "@smithy/property-provider": "^4.2.11", - "@smithy/shared-ini-file-loader": "^4.4.6", - "@smithy/types": "^4.13.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-process": { - "version": "3.972.16", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.972.16.tgz", - "integrity": "sha512-n89ibATwnLEg0ZdZmUds5bq8AfBAdoYEDpqP3uzPLaRuGelsKlIvCYSNNvfgGLi8NaHPNNhs1HjJZYbqkW9b+g==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "^3.973.18", - "@aws-sdk/types": "^3.973.5", - "@smithy/property-provider": "^4.2.11", - "@smithy/shared-ini-file-loader": "^4.4.6", - "@smithy/types": "^4.13.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-sso": { - "version": "3.972.16", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.972.16.tgz", - "integrity": "sha512-b9of7tQgERxgcEcwAFWvRe84ivw+Kw6b3jVuz/6LQzonkomiY5UoWfprkbjc8FSCQ2VjDqKTvIRA9F0KSQ025w==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "^3.973.18", - "@aws-sdk/nested-clients": "^3.996.6", - "@aws-sdk/token-providers": "3.1003.0", - "@aws-sdk/types": "^3.973.5", - "@smithy/property-provider": "^4.2.11", - "@smithy/shared-ini-file-loader": "^4.4.6", - "@smithy/types": "^4.13.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-web-identity": { - "version": "3.972.16", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.972.16.tgz", - "integrity": "sha512-PaOH5jFoPQX4WkqpKzKh9cM7rieKtbgEGqrZ+ybGmotJhcvhI/xl69yCwMbHGnpQJJmHZIX9q2zaPB7HTBn/4w==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "^3.973.18", - "@aws-sdk/nested-clients": "^3.996.6", - "@aws-sdk/types": "^3.973.5", - "@smithy/property-provider": "^4.2.11", - "@smithy/shared-ini-file-loader": "^4.4.6", - "@smithy/types": "^4.13.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@aws-sdk/eventstream-handler-node": { - "version": "3.972.10", - "resolved": "https://registry.npmjs.org/@aws-sdk/eventstream-handler-node/-/eventstream-handler-node-3.972.10.tgz", - "integrity": "sha512-g2Z9s6Y4iNh0wICaEqutgYgt/Pmhv5Ev9G3eKGFe2w9VuZDhc76vYdop6I5OocmpHV79d4TuLG+JWg5rQIVDVA==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "^3.973.5", - "@smithy/eventstream-codec": "^4.2.11", - "@smithy/types": "^4.13.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@aws-sdk/middleware-eventstream": { - "version": "3.972.7", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-eventstream/-/middleware-eventstream-3.972.7.tgz", - "integrity": "sha512-VWndapHYCfwLgPpCb/xwlMKG4imhFzKJzZcKOEioGn7OHY+6gdr0K7oqy1HZgbLa3ACznZ9fku+DzmAi8fUC0g==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "^3.973.5", - "@smithy/protocol-http": "^5.3.11", - "@smithy/types": "^4.13.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@aws-sdk/middleware-host-header": { - "version": "3.972.7", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.972.7.tgz", - "integrity": "sha512-aHQZgztBFEpDU1BB00VWCIIm85JjGjQW1OG9+98BdmaOpguJvzmXBGbnAiYcciCd+IS4e9BEq664lhzGnWJHgQ==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "^3.973.5", - "@smithy/protocol-http": "^5.3.11", - "@smithy/types": "^4.13.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@aws-sdk/middleware-logger": { - "version": "3.972.7", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.972.7.tgz", - "integrity": "sha512-LXhiWlWb26txCU1vcI9PneESSeRp/RYY/McuM4SpdrimQR5NgwaPb4VJCadVeuGWgh6QmqZ6rAKSoL1ob16W6w==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "^3.973.5", - "@smithy/types": "^4.13.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@aws-sdk/middleware-recursion-detection": { - "version": "3.972.7", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.972.7.tgz", - "integrity": "sha512-l2VQdcBcYLzIzykCHtXlbpiVCZ94/xniLIkAj0jpnpjY4xlgZx7f56Ypn+uV1y3gG0tNVytJqo3K9bfMFee7SQ==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "^3.973.5", - "@aws/lambda-invoke-store": "^0.2.2", - "@smithy/protocol-http": "^5.3.11", - "@smithy/types": "^4.13.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@aws-sdk/middleware-user-agent": { - "version": "3.972.18", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.972.18.tgz", - "integrity": "sha512-KcqQDs/7WtoEnp52+879f8/i1XAJkgka5i4arOtOCPR10o4wWo3VRecDI9Gxoh6oghmLCnIiOSKyRcXI/50E+w==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "^3.973.18", - "@aws-sdk/types": "^3.973.5", - "@aws-sdk/util-endpoints": "^3.996.4", - "@smithy/core": "^3.23.8", - "@smithy/protocol-http": "^5.3.11", - "@smithy/types": "^4.13.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@aws-sdk/middleware-websocket": { - "version": "3.972.12", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-websocket/-/middleware-websocket-3.972.12.tgz", - "integrity": "sha512-iyPP6FVDKe/5wy5ojC0akpDFG1vX3FeCUU47JuwN8xfvT66xlEI8qUJZPtN55TJVFzzWZJpWL78eqUE31md08Q==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "^3.973.5", - "@aws-sdk/util-format-url": "^3.972.7", - "@smithy/eventstream-codec": "^4.2.11", - "@smithy/eventstream-serde-browser": "^4.2.11", - "@smithy/fetch-http-handler": "^5.3.13", - "@smithy/protocol-http": "^5.3.11", - "@smithy/signature-v4": "^5.3.11", - "@smithy/types": "^4.13.0", - "@smithy/util-base64": "^4.3.2", - "@smithy/util-hex-encoding": "^4.2.2", - "@smithy/util-utf8": "^4.2.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients": { - "version": "3.996.6", - "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.996.6.tgz", - "integrity": "sha512-blNJ3ugn4gCQ9ZSZi/firzKCvVl5LvPFVxv24LprENeWI4R8UApG006UQkF4SkmLygKq2BQXRad2/anQ13Te4Q==", - "license": "Apache-2.0", - "dependencies": { - "@aws-crypto/sha256-browser": "5.2.0", - "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "^3.973.18", - "@aws-sdk/middleware-host-header": "^3.972.7", - "@aws-sdk/middleware-logger": "^3.972.7", - "@aws-sdk/middleware-recursion-detection": "^3.972.7", - "@aws-sdk/middleware-user-agent": "^3.972.18", - "@aws-sdk/region-config-resolver": "^3.972.7", - "@aws-sdk/types": "^3.973.5", - "@aws-sdk/util-endpoints": "^3.996.4", - "@aws-sdk/util-user-agent-browser": "^3.972.7", - "@aws-sdk/util-user-agent-node": "^3.973.3", - "@smithy/config-resolver": "^4.4.10", - "@smithy/core": "^3.23.8", - "@smithy/fetch-http-handler": "^5.3.13", - "@smithy/hash-node": "^4.2.11", - "@smithy/invalid-dependency": "^4.2.11", - "@smithy/middleware-content-length": "^4.2.11", - "@smithy/middleware-endpoint": "^4.4.22", - "@smithy/middleware-retry": "^4.4.39", - "@smithy/middleware-serde": "^4.2.12", - "@smithy/middleware-stack": "^4.2.11", - "@smithy/node-config-provider": "^4.3.11", - "@smithy/node-http-handler": "^4.4.14", - "@smithy/protocol-http": "^5.3.11", - "@smithy/smithy-client": "^4.12.2", - "@smithy/types": "^4.13.0", - "@smithy/url-parser": "^4.2.11", - "@smithy/util-base64": "^4.3.2", - "@smithy/util-body-length-browser": "^4.2.2", - "@smithy/util-body-length-node": "^4.2.3", - "@smithy/util-defaults-mode-browser": "^4.3.38", - "@smithy/util-defaults-mode-node": "^4.2.41", - "@smithy/util-endpoints": "^3.3.2", - "@smithy/util-middleware": "^4.2.11", - "@smithy/util-retry": "^4.2.11", - "@smithy/util-utf8": "^4.2.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@aws-sdk/region-config-resolver": { - "version": "3.972.7", - "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.972.7.tgz", - "integrity": "sha512-/Ev/6AI8bvt4HAAptzSjThGUMjcWaX3GX8oERkB0F0F9x2dLSBdgFDiyrRz3i0u0ZFZFQ1b28is4QhyqXTUsVA==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "^3.973.5", - "@smithy/config-resolver": "^4.4.10", - "@smithy/node-config-provider": "^4.3.11", - "@smithy/types": "^4.13.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@aws-sdk/token-providers": { - "version": "3.1003.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.1003.0.tgz", - "integrity": "sha512-SOyyWNdT7njKRwtZ1JhwHlH1csv6Pkgf305X96/OIfnhq1pU/EjmT6W6por57rVrjrKuHBuEIXgpWv8OgoMHpg==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "^3.973.18", - "@aws-sdk/nested-clients": "^3.996.6", - "@aws-sdk/types": "^3.973.5", - "@smithy/property-provider": "^4.2.11", - "@smithy/shared-ini-file-loader": "^4.4.6", - "@smithy/types": "^4.13.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@aws-sdk/types": { - "version": "3.973.5", - "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.973.5.tgz", - "integrity": "sha512-hl7BGwDCWsjH8NkZfx+HgS7H2LyM2lTMAI7ba9c8O0KqdBLTdNJivsHpqjg9rNlAlPyREb6DeDRXUl0s8uFdmQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.13.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@aws-sdk/util-endpoints": { - "version": "3.996.4", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.996.4.tgz", - "integrity": "sha512-Hek90FBmd4joCFj+Vc98KLJh73Zqj3s2W56gjAcTkrNLMDI5nIFkG9YpfcJiVI1YlE2Ne1uOQNe+IgQ/Vz2XRA==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "^3.973.5", - "@smithy/types": "^4.13.0", - "@smithy/url-parser": "^4.2.11", - "@smithy/util-endpoints": "^3.3.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@aws-sdk/util-format-url": { - "version": "3.972.7", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-format-url/-/util-format-url-3.972.7.tgz", - "integrity": "sha512-V+PbnWfUl93GuFwsOHsAq7hY/fnm9kElRqR8IexIJr5Rvif9e614X5sGSyz3mVSf1YAZ+VTy63W1/pGdA55zyA==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "^3.973.5", - "@smithy/querystring-builder": "^4.2.11", - "@smithy/types": "^4.13.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@aws-sdk/util-locate-window": { - "version": "3.965.5", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-locate-window/-/util-locate-window-3.965.5.tgz", - "integrity": "sha512-WhlJNNINQB+9qtLtZJcpQdgZw3SCDCpXdUJP7cToGwHbCWCnRckGlc6Bx/OhWwIYFNAn+FIydY8SZ0QmVu3xTQ==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@aws-sdk/util-user-agent-browser": { - "version": "3.972.7", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.972.7.tgz", - "integrity": "sha512-7SJVuvhKhMF/BkNS1n0QAJYgvEwYbK2QLKBrzDiwQGiTRU6Yf1f3nehTzm/l21xdAOtWSfp2uWSddPnP2ZtsVw==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "^3.973.5", - "@smithy/types": "^4.13.0", - "bowser": "^2.11.0", - "tslib": "^2.6.2" - } - }, - "node_modules/@aws-sdk/util-user-agent-node": { - "version": "3.973.3", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.973.3.tgz", - "integrity": "sha512-8s2cQmTUOwcBlIJyI9PAZNnnnF+cGtdhHc1yzMMsSD/GR/Hxj7m0IGUE92CslXXb8/p5Q76iqOCjN1GFwyf+1A==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/middleware-user-agent": "^3.972.18", - "@aws-sdk/types": "^3.973.5", - "@smithy/node-config-provider": "^4.3.11", - "@smithy/types": "^4.13.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - }, - "peerDependencies": { - "aws-crt": ">=1.0.0" - }, - "peerDependenciesMeta": { - "aws-crt": { - "optional": true - } - } - }, - "node_modules/@aws-sdk/xml-builder": { - "version": "3.972.10", - "resolved": "https://registry.npmjs.org/@aws-sdk/xml-builder/-/xml-builder-3.972.10.tgz", - "integrity": "sha512-OnejAIVD+CxzyAUrVic7lG+3QRltyja9LoNqCE/1YVs8ichoTbJlVSaZ9iSMcnHLyzrSNtvaOGjSDRP+d/ouFA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.13.0", - "fast-xml-parser": "5.4.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@aws/lambda-invoke-store": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@aws/lambda-invoke-store/-/lambda-invoke-store-0.2.3.tgz", - "integrity": "sha512-oLvsaPMTBejkkmHhjf09xTgk71mOqyr/409NKhRIL08If7AhVfUsJhVsx386uJaqNd42v9kWamQ9lFbkoC2dYw==", - "license": "Apache-2.0", - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@babel/runtime": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.6.tgz", - "integrity": "sha512-05WQkdpL9COIMz4LjTxGpPNCdlpyimKppYNoJ5Di5EUObifl8t4tuLuUBBZEpoLYOmfvIWrsp9fCl0HoPRVTdA==", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@biomejs/biome": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.3.5.tgz", - "integrity": "sha512-HvLhNlIlBIbAV77VysRIBEwp55oM/QAjQEin74QQX9Xb259/XP/D5AGGnZMOyF1el4zcvlNYYR3AyTMUV3ILhg==", - "dev": true, - "license": "MIT OR Apache-2.0", - "bin": { - "biome": "bin/biome" - }, - "engines": { - "node": ">=14.21.3" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/biome" - }, - "optionalDependencies": { - "@biomejs/cli-darwin-arm64": "2.3.5", - "@biomejs/cli-darwin-x64": "2.3.5", - "@biomejs/cli-linux-arm64": "2.3.5", - "@biomejs/cli-linux-arm64-musl": "2.3.5", - "@biomejs/cli-linux-x64": "2.3.5", - "@biomejs/cli-linux-x64-musl": "2.3.5", - "@biomejs/cli-win32-arm64": "2.3.5", - "@biomejs/cli-win32-x64": "2.3.5" - } - }, - "node_modules/@biomejs/cli-darwin-arm64": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.3.5.tgz", - "integrity": "sha512-fLdTur8cJU33HxHUUsii3GLx/TR0BsfQx8FkeqIiW33cGMtUD56fAtrh+2Fx1uhiCsVZlFh6iLKUU3pniZREQw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT OR Apache-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=14.21.3" - } - }, - "node_modules/@biomejs/cli-darwin-x64": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.3.5.tgz", - "integrity": "sha512-qpT8XDqeUlzrOW8zb4k3tjhT7rmvVRumhi2657I2aGcY4B+Ft5fNwDdZGACzn8zj7/K1fdWjgwYE3i2mSZ+vOA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT OR Apache-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=14.21.3" - } - }, - "node_modules/@biomejs/cli-linux-arm64": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.3.5.tgz", - "integrity": "sha512-u/pybjTBPGBHB66ku4pK1gj+Dxgx7/+Z0jAriZISPX1ocTO8aHh8x8e7Kb1rB4Ms0nA/SzjtNOVJ4exVavQBCw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT OR Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=14.21.3" - } - }, - "node_modules/@biomejs/cli-linux-arm64-musl": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.3.5.tgz", - "integrity": "sha512-eGUG7+hcLgGnMNl1KHVZUYxahYAhC462jF/wQolqu4qso2MSk32Q+QrpN7eN4jAHAg7FUMIo897muIhK4hXhqg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT OR Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=14.21.3" - } - }, - "node_modules/@biomejs/cli-linux-x64": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.3.5.tgz", - "integrity": "sha512-XrIVi9YAW6ye0CGQ+yax0gLfx+BFOtKaNX74n+xHWla6Cl6huUmcKNO7HPx7BiKnJUzrxXY1qYlm7xMvi08X4g==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT OR Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=14.21.3" - } - }, - "node_modules/@biomejs/cli-linux-x64-musl": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.3.5.tgz", - "integrity": "sha512-awVuycTPpVTH/+WDVnEEYSf6nbCBHf/4wB3lquwT7puhNg8R4XvonWNZzUsfHZrCkjkLhFH/vCZK5jHatD9FEg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT OR Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=14.21.3" - } - }, - "node_modules/@biomejs/cli-win32-arm64": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.3.5.tgz", - "integrity": "sha512-DlBiMlBZZ9eIq4H7RimDSGsYcOtfOIfZOaI5CqsWiSlbTfqbPVfWtCf92wNzx8GNMbu1s7/g3ZZESr6+GwM/SA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT OR Apache-2.0", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=14.21.3" - } - }, - "node_modules/@biomejs/cli-win32-x64": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.3.5.tgz", - "integrity": "sha512-nUmR8gb6yvrKhtRgzwo/gDimPwnO5a4sCydf8ZS2kHIJhEmSmk+STsusr1LHTuM//wXppBawvSQi2xFXJCdgKQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT OR Apache-2.0", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=14.21.3" - } - }, - "node_modules/@borewit/text-codec": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@borewit/text-codec/-/text-codec-0.2.1.tgz", - "integrity": "sha512-k7vvKPbf7J2fZ5klGRD9AeKfUvojuZIQ3BT5u7Jfv+puwXkUBUT5PVyMDfJZpy30CBDXGMgw7fguK/lpOMBvgw==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Borewit" - } - }, - "node_modules/@cspotcode/source-map-support": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", - "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/trace-mapping": "0.3.9" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - }, - "node_modules/@e9n/companion-channels": { - "resolved": "packages/companion-channels", - "link": true - }, - "node_modules/@esbuild/aix-ppc64": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.3.tgz", - "integrity": "sha512-9fJMTNFTWZMh5qwrBItuziu834eOCUcEqymSH7pY+zoMVEZg3gcPuBNxH1EvfVYe9h0x/Ptw8KBzv7qxb7l8dg==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-arm": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.3.tgz", - "integrity": "sha512-i5D1hPY7GIQmXlXhs2w8AWHhenb00+GxjxRncS2ZM7YNVGNfaMxgzSGuO8o8SJzRc/oZwU2bcScvVERk03QhzA==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.3.tgz", - "integrity": "sha512-YdghPYUmj/FX2SYKJ0OZxf+iaKgMsKHVPF1MAq/P8WirnSpCStzKJFjOjzsW0QQ7oIAiccHdcqjbHmJxRb/dmg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.3.tgz", - "integrity": "sha512-IN/0BNTkHtk8lkOM8JWAYFg4ORxBkZQf9zXiEOfERX/CzxW3Vg1ewAhU7QSWQpVIzTW+b8Xy+lGzdYXV6UZObQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.3.tgz", - "integrity": "sha512-Re491k7ByTVRy0t3EKWajdLIr0gz2kKKfzafkth4Q8A5n1xTHrkqZgLLjFEHVD+AXdUGgQMq+Godfq45mGpCKg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.3.tgz", - "integrity": "sha512-vHk/hA7/1AckjGzRqi6wbo+jaShzRowYip6rt6q7VYEDX4LEy1pZfDpdxCBnGtl+A5zq8iXDcyuxwtv3hNtHFg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.3.tgz", - "integrity": "sha512-ipTYM2fjt3kQAYOvo6vcxJx3nBYAzPjgTCk7QEgZG8AUO3ydUhvelmhrbOheMnGOlaSFUoHXB6un+A7q4ygY9w==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.3.tgz", - "integrity": "sha512-dDk0X87T7mI6U3K9VjWtHOXqwAMJBNN2r7bejDsc+j03SEjtD9HrOl8gVFByeM0aJksoUuUVU9TBaZa2rgj0oA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.3.tgz", - "integrity": "sha512-s6nPv2QkSupJwLYyfS+gwdirm0ukyTFNl3KTgZEAiJDd+iHZcbTPPcWCcRYH+WlNbwChgH2QkE9NSlNrMT8Gfw==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.3.tgz", - "integrity": "sha512-sZOuFz/xWnZ4KH3YfFrKCf1WyPZHakVzTiqji3WDc0BCl2kBwiJLCXpzLzUBLgmp4veFZdvN5ChW4Eq/8Fc2Fg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.3.tgz", - "integrity": "sha512-yGlQYjdxtLdh0a3jHjuwOrxQjOZYD/C9PfdbgJJF3TIZWnm/tMd/RcNiLngiu4iwcBAOezdnSLAwQDPqTmtTYg==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.3.tgz", - "integrity": "sha512-WO60Sn8ly3gtzhyjATDgieJNet/KqsDlX5nRC5Y3oTFcS1l0KWba+SEa9Ja1GfDqSF1z6hif/SkpQJbL63cgOA==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.3.tgz", - "integrity": "sha512-APsymYA6sGcZ4pD6k+UxbDjOFSvPWyZhjaiPyl/f79xKxwTnrn5QUnXR5prvetuaSMsb4jgeHewIDCIWljrSxw==", - "cpu": [ - "mips64el" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.3.tgz", - "integrity": "sha512-eizBnTeBefojtDb9nSh4vvVQ3V9Qf9Df01PfawPcRzJH4gFSgrObw+LveUyDoKU3kxi5+9RJTCWlj4FjYXVPEA==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.3.tgz", - "integrity": "sha512-3Emwh0r5wmfm3ssTWRQSyVhbOHvqegUDRd0WhmXKX2mkHJe1SFCMJhagUleMq+Uci34wLSipf8Lagt4LlpRFWQ==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.3.tgz", - "integrity": "sha512-pBHUx9LzXWBc7MFIEEL0yD/ZVtNgLytvx60gES28GcWMqil8ElCYR4kvbV2BDqsHOvVDRrOxGySBM9Fcv744hw==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.3.tgz", - "integrity": "sha512-Czi8yzXUWIQYAtL/2y6vogER8pvcsOsk5cpwL4Gk5nJqH5UZiVByIY8Eorm5R13gq+DQKYg0+JyQoytLQas4dA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/netbsd-arm64": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.3.tgz", - "integrity": "sha512-sDpk0RgmTCR/5HguIZa9n9u+HVKf40fbEUt+iTzSnCaGvY9kFP0YKBWZtJaraonFnqef5SlJ8/TiPAxzyS+UoA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.3.tgz", - "integrity": "sha512-P14lFKJl/DdaE00LItAukUdZO5iqNH7+PjoBm+fLQjtxfcfFE20Xf5CrLsmZdq5LFFZzb5JMZ9grUwvtVYzjiA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openbsd-arm64": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.3.tgz", - "integrity": "sha512-AIcMP77AvirGbRl/UZFTq5hjXK+2wC7qFRGoHSDrZ5v5b8DK/GYpXW3CPRL53NkvDqb9D+alBiC/dV0Fb7eJcw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.3.tgz", - "integrity": "sha512-DnW2sRrBzA+YnE70LKqnM3P+z8vehfJWHXECbwBmH/CU51z6FiqTQTHFenPlHmo3a8UgpLyH3PT+87OViOh1AQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openharmony-arm64": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.3.tgz", - "integrity": "sha512-NinAEgr/etERPTsZJ7aEZQvvg/A6IsZG/LgZy+81wON2huV7SrK3e63dU0XhyZP4RKGyTm7aOgmQk0bGp0fy2g==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openharmony" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.3.tgz", - "integrity": "sha512-PanZ+nEz+eWoBJ8/f8HKxTTD172SKwdXebZ0ndd953gt1HRBbhMsaNqjTyYLGLPdoWHy4zLU7bDVJztF5f3BHA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.3.tgz", - "integrity": "sha512-B2t59lWWYrbRDw/tjiWOuzSsFh1Y/E95ofKz7rIVYSQkUYBjfSgf6oeYPNWHToFRr2zx52JKApIcAS/D5TUBnA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.3.tgz", - "integrity": "sha512-QLKSFeXNS8+tHW7tZpMtjlNb7HKau0QDpwm49u0vUp9y1WOF+PEzkU84y9GqYaAVW8aH8f3GcBck26jh54cX4Q==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.3.tgz", - "integrity": "sha512-4uJGhsxuptu3OcpVAzli+/gWusVGwZZHTlS63hh++ehExkVT8SgiEf7/uC/PclrPPkLhZqGgCTjd0VWLo6xMqA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@google/genai": { - "version": "1.44.0", - "resolved": "https://registry.npmjs.org/@google/genai/-/genai-1.44.0.tgz", - "integrity": "sha512-kRt9ZtuXmz+tLlcNntN/VV4LRdpl6ZOu5B1KbfNgfR65db15O6sUQcwnwLka8sT/V6qysD93fWrgJHF2L7dA9A==", - "license": "Apache-2.0", - "dependencies": { - "google-auth-library": "^10.3.0", - "p-retry": "^4.6.2", - "protobufjs": "^7.5.4", - "ws": "^8.18.0" - }, - "engines": { - "node": ">=20.0.0" - }, - "peerDependencies": { - "@modelcontextprotocol/sdk": "^1.25.2" - }, - "peerDependenciesMeta": { - "@modelcontextprotocol/sdk": { - "optional": true - } - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.5", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", - "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", - "dev": true, - "license": "MIT" - }, - "node_modules/@mariozechner/clipboard": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@mariozechner/clipboard/-/clipboard-0.3.2.tgz", - "integrity": "sha512-IHQpksNjo7EAtGuHFU+tbWDp5LarH3HU/8WiB9O70ZEoBPHOg0/6afwSLK0QyNMMmx4Bpi/zl6+DcBXe95nWYA==", - "license": "MIT", - "optional": true, - "engines": { - "node": ">= 10" - }, - "optionalDependencies": { - "@mariozechner/clipboard-darwin-arm64": "0.3.2", - "@mariozechner/clipboard-darwin-universal": "0.3.2", - "@mariozechner/clipboard-darwin-x64": "0.3.2", - "@mariozechner/clipboard-linux-arm64-gnu": "0.3.2", - "@mariozechner/clipboard-linux-arm64-musl": "0.3.2", - "@mariozechner/clipboard-linux-riscv64-gnu": "0.3.2", - "@mariozechner/clipboard-linux-x64-gnu": "0.3.2", - "@mariozechner/clipboard-linux-x64-musl": "0.3.2", - "@mariozechner/clipboard-win32-arm64-msvc": "0.3.2", - "@mariozechner/clipboard-win32-x64-msvc": "0.3.2" - } - }, - "node_modules/@mariozechner/clipboard-darwin-arm64": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-darwin-arm64/-/clipboard-darwin-arm64-0.3.2.tgz", - "integrity": "sha512-uBf6K7Je1ihsgvmWxA8UCGCeI+nbRVRXoarZdLjl6slz94Zs1tNKFZqx7aCI5O1i3e0B6ja82zZ06BWrl0MCVw==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@mariozechner/clipboard-darwin-universal": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-darwin-universal/-/clipboard-darwin-universal-0.3.2.tgz", - "integrity": "sha512-mxSheKTW2U9LsBdXy0SdmdCAE5HqNS9QUmpNHLnfJ+SsbFKALjEZc5oRrVMXxGQSirDvYf5bjmRyT0QYYonnlg==", - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@mariozechner/clipboard-darwin-x64": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-darwin-x64/-/clipboard-darwin-x64-0.3.2.tgz", - "integrity": "sha512-U1BcVEoidvwIp95+HJswSW+xr28EQiHR7rZjH6pn8Sja5yO4Yoe3yCN0Zm8Lo72BbSOK/fTSq0je7CJpaPCspg==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@mariozechner/clipboard-linux-arm64-gnu": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-linux-arm64-gnu/-/clipboard-linux-arm64-gnu-0.3.2.tgz", - "integrity": "sha512-BsinwG3yWTIjdgNCxsFlip7LkfwPk+ruw/aFCXHUg/fb5XC/Ksp+YMQ7u0LUtiKzIv/7LMXgZInJQH6gxbAaqQ==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@mariozechner/clipboard-linux-arm64-musl": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-linux-arm64-musl/-/clipboard-linux-arm64-musl-0.3.2.tgz", - "integrity": "sha512-0/Gi5Xq2V6goXBop19ePoHvXsmJD9SzFlO3S+d6+T2b+BlPcpOu3Oa0wTjl+cZrLAAEzA86aPNBI+VVAFDFPKw==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@mariozechner/clipboard-linux-riscv64-gnu": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-linux-riscv64-gnu/-/clipboard-linux-riscv64-gnu-0.3.2.tgz", - "integrity": "sha512-2AFFiXB24qf0zOZsxI1GJGb9wQGlOJyN6UwoXqmKS3dpQi/l6ix30IzDDA4c4ZcCcx4D+9HLYXhC1w7Sov8pXA==", - "cpu": [ - "riscv64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@mariozechner/clipboard-linux-x64-gnu": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-linux-x64-gnu/-/clipboard-linux-x64-gnu-0.3.2.tgz", - "integrity": "sha512-v6fVnsn7WMGg73Dab8QMwyFce7tzGfgEixKgzLP8f1GJqkJZi5zO4k4FOHzSgUufgLil63gnxvMpjWkgfeQN7A==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@mariozechner/clipboard-linux-x64-musl": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-linux-x64-musl/-/clipboard-linux-x64-musl-0.3.2.tgz", - "integrity": "sha512-xVUtnoMQ8v2JVyfJLKKXACA6avdnchdbBkTsZs8BgJQo29qwCp5NIHAUO8gbJ40iaEGToW5RlmVk2M9V0HsHEw==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@mariozechner/clipboard-win32-arm64-msvc": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-win32-arm64-msvc/-/clipboard-win32-arm64-msvc-0.3.2.tgz", - "integrity": "sha512-AEgg95TNi8TGgak2wSXZkXKCvAUTjWoU1Pqb0ON7JHrX78p616XUFNTJohtIon3e0w6k0pYPZeCuqRCza/Tqeg==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@mariozechner/clipboard-win32-x64-msvc": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-win32-x64-msvc/-/clipboard-win32-x64-msvc-0.3.2.tgz", - "integrity": "sha512-tGRuYpZwDOD7HBrCpyRuhGnHHSCknELvqwKKUG4JSfSB7JIU7LKRh6zx6fMUOQd8uISK35TjFg5UcNih+vJhFA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@mariozechner/companion-agent-core": { - "resolved": "packages/agent", - "link": true - }, - "node_modules/@mariozechner/companion-ai": { - "resolved": "packages/ai", - "link": true - }, - "node_modules/@mariozechner/companion-coding-agent": { - "resolved": "packages/coding-agent", - "link": true - }, - "node_modules/@mariozechner/companion-tui": { - "resolved": "packages/tui", - "link": true - }, - "node_modules/@mariozechner/jiti": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/@mariozechner/jiti/-/jiti-2.6.5.tgz", - "integrity": "sha512-faGUlTcXka5l7rv0lP3K3vGW/ejRuOS24RR2aSFWREUQqzjgdsuWNo/IiPqL3kWRGt6Ahl2+qcDAwtdeWeuGUw==", - "license": "MIT", - "dependencies": { - "std-env": "^3.10.0", - "yoctocolors": "^2.1.2" - }, - "bin": { - "jiti": "lib/jiti-cli.mjs" - } - }, - "node_modules/@mistralai/mistralai": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/@mistralai/mistralai/-/mistralai-1.14.1.tgz", - "integrity": "sha512-IiLmmZFCCTReQgPAT33r7KQ1nYo5JPdvGkrkZqA8qQ2qB1GHgs5LoP5K2ICyrjnpw2n8oSxMM/VP+liiKcGNlQ==", - "dependencies": { - "ws": "^8.18.0", - "zod": "^3.25.0 || ^4.0.0", - "zod-to-json-schema": "^3.24.1" - } - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@protobufjs/aspromise": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", - "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/base64": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", - "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/codegen": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", - "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/eventemitter": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", - "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/fetch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", - "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", - "license": "BSD-3-Clause", - "dependencies": { - "@protobufjs/aspromise": "^1.1.1", - "@protobufjs/inquire": "^1.1.0" - } - }, - "node_modules/@protobufjs/float": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", - "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/inquire": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", - "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/path": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", - "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/pool": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", - "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/utf8": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", - "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==", - "license": "BSD-3-Clause" - }, - "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.59.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.59.0.tgz", - "integrity": "sha512-upnNBkA6ZH2VKGcBj9Fyl9IGNPULcjXRlg0LLeaioQWueH30p6IXtJEbKAgvyv+mJaMxSm1l6xwDXYjpEMiLMg==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-android-arm64": { - "version": "4.59.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.59.0.tgz", - "integrity": "sha512-hZ+Zxj3SySm4A/DylsDKZAeVg0mvi++0PYVceVyX7hemkw7OreKdCvW2oQ3T1FMZvCaQXqOTHb8qmBShoqk69Q==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.59.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.59.0.tgz", - "integrity": "sha512-W2Psnbh1J8ZJw0xKAd8zdNgF9HRLkdWwwdWqubSVk0pUuQkoHnv7rx4GiF9rT4t5DIZGAsConRE3AxCdJ4m8rg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.59.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.59.0.tgz", - "integrity": "sha512-ZW2KkwlS4lwTv7ZVsYDiARfFCnSGhzYPdiOU4IM2fDbL+QGlyAbjgSFuqNRbSthybLbIJ915UtZBtmuLrQAT/w==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.59.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.59.0.tgz", - "integrity": "sha512-EsKaJ5ytAu9jI3lonzn3BgG8iRBjV4LxZexygcQbpiU0wU0ATxhNVEpXKfUa0pS05gTcSDMKpn3Sx+QB9RlTTA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.59.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.59.0.tgz", - "integrity": "sha512-d3DuZi2KzTMjImrxoHIAODUZYoUUMsuUiY4SRRcJy6NJoZ6iIqWnJu9IScV9jXysyGMVuW+KNzZvBLOcpdl3Vg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.59.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.59.0.tgz", - "integrity": "sha512-t4ONHboXi/3E0rT6OZl1pKbl2Vgxf9vJfWgmUoCEVQVxhW6Cw/c8I6hbbu7DAvgp82RKiH7TpLwxnJeKv2pbsw==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.59.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.59.0.tgz", - "integrity": "sha512-CikFT7aYPA2ufMD086cVORBYGHffBo4K8MQ4uPS/ZnY54GKj36i196u8U+aDVT2LX4eSMbyHtyOh7D7Zvk2VvA==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.59.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.59.0.tgz", - "integrity": "sha512-jYgUGk5aLd1nUb1CtQ8E+t5JhLc9x5WdBKew9ZgAXg7DBk0ZHErLHdXM24rfX+bKrFe+Xp5YuJo54I5HFjGDAA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.59.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.59.0.tgz", - "integrity": "sha512-peZRVEdnFWZ5Bh2KeumKG9ty7aCXzzEsHShOZEFiCQlDEepP1dpUl/SrUNXNg13UmZl+gzVDPsiCwnV1uI0RUA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-loong64-gnu": { - "version": "4.59.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.59.0.tgz", - "integrity": "sha512-gbUSW/97f7+r4gHy3Jlup8zDG190AuodsWnNiXErp9mT90iCy9NKKU0Xwx5k8VlRAIV2uU9CsMnEFg/xXaOfXg==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-loong64-musl": { - "version": "4.59.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.59.0.tgz", - "integrity": "sha512-yTRONe79E+o0FWFijasoTjtzG9EBedFXJMl888NBEDCDV9I2wGbFFfJQQe63OijbFCUZqxpHz1GzpbtSFikJ4Q==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-ppc64-gnu": { - "version": "4.59.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.59.0.tgz", - "integrity": "sha512-sw1o3tfyk12k3OEpRddF68a1unZ5VCN7zoTNtSn2KndUE+ea3m3ROOKRCZxEpmT9nsGnogpFP9x6mnLTCaoLkA==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-ppc64-musl": { - "version": "4.59.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.59.0.tgz", - "integrity": "sha512-+2kLtQ4xT3AiIxkzFVFXfsmlZiG5FXYW7ZyIIvGA7Bdeuh9Z0aN4hVyXS/G1E9bTP/vqszNIN/pUKCk/BTHsKA==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.59.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.59.0.tgz", - "integrity": "sha512-NDYMpsXYJJaj+I7UdwIuHHNxXZ/b/N2hR15NyH3m2qAtb/hHPA4g4SuuvrdxetTdndfj9b1WOmy73kcPRoERUg==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.59.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.59.0.tgz", - "integrity": "sha512-nLckB8WOqHIf1bhymk+oHxvM9D3tyPndZH8i8+35p/1YiVoVswPid2yLzgX7ZJP0KQvnkhM4H6QZ5m0LzbyIAg==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.59.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.59.0.tgz", - "integrity": "sha512-oF87Ie3uAIvORFBpwnCvUzdeYUqi2wY6jRFWJAy1qus/udHFYIkplYRW+wo+GRUP4sKzYdmE1Y3+rY5Gc4ZO+w==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.59.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.59.0.tgz", - "integrity": "sha512-3AHmtQq/ppNuUspKAlvA8HtLybkDflkMuLK4DPo77DfthRb71V84/c4MlWJXixZz4uruIH4uaa07IqoAkG64fg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.59.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.59.0.tgz", - "integrity": "sha512-2UdiwS/9cTAx7qIUZB/fWtToJwvt0Vbo0zmnYt7ED35KPg13Q0ym1g442THLC7VyI6JfYTP4PiSOWyoMdV2/xg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-openbsd-x64": { - "version": "4.59.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.59.0.tgz", - "integrity": "sha512-M3bLRAVk6GOwFlPTIxVBSYKUaqfLrn8l0psKinkCFxl4lQvOSz8ZrKDz2gxcBwHFpci0B6rttydI4IpS4IS/jQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ] - }, - "node_modules/@rollup/rollup-openharmony-arm64": { - "version": "4.59.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.59.0.tgz", - "integrity": "sha512-tt9KBJqaqp5i5HUZzoafHZX8b5Q2Fe7UjYERADll83O4fGqJ49O1FsL6LpdzVFQcpwvnyd0i+K/VSwu/o/nWlA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openharmony" - ] - }, - "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.59.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.59.0.tgz", - "integrity": "sha512-V5B6mG7OrGTwnxaNUzZTDTjDS7F75PO1ae6MJYdiMu60sq0CqN5CVeVsbhPxalupvTX8gXVSU9gq+Rx1/hvu6A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.59.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.59.0.tgz", - "integrity": "sha512-UKFMHPuM9R0iBegwzKF4y0C4J9u8C6MEJgFuXTBerMk7EJ92GFVFYBfOZaSGLu6COf7FxpQNqhNS4c4icUPqxA==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-x64-gnu": { - "version": "4.59.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.59.0.tgz", - "integrity": "sha512-laBkYlSS1n2L8fSo1thDNGrCTQMmxjYY5G0WFWjFFYZkKPjsMBsgJfGf4TLxXrF6RyhI60L8TMOjBMvXiTcxeA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.59.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.59.0.tgz", - "integrity": "sha512-2HRCml6OztYXyJXAvdDXPKcawukWY2GpR5/nxKp4iBgiO3wcoEGkAaqctIbZcNB6KlUQBIqt8VYkNSj2397EfA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@silvia-odwyer/photon-node": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@silvia-odwyer/photon-node/-/photon-node-0.3.4.tgz", - "integrity": "sha512-bnly4BKB3KDTFxrUIcgCLbaeVVS8lrAkri1pEzskpmxu9MdfGQTy8b8EgcD83ywD3RPMsIulY8xJH5Awa+t9fA==", - "license": "Apache-2.0" - }, - "node_modules/@sinclair/typebox": { - "version": "0.34.48", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.34.48.tgz", - "integrity": "sha512-kKJTNuK3AQOrgjjotVxMrCn1sUJwM76wMszfq1kdU4uYVJjvEWuFQ6HgvLt4Xz3fSmZlTOxJ/Ie13KnIcWQXFA==", - "license": "MIT" - }, - "node_modules/@slack/logger": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@slack/logger/-/logger-4.0.0.tgz", - "integrity": "sha512-Wz7QYfPAlG/DR+DfABddUZeNgoeY7d1J39OCR2jR+v7VBsB8ezulDK5szTnDDPDwLH5IWhLvXIHlCFZV7MSKgA==", - "license": "MIT", - "dependencies": { - "@types/node": ">=18.0.0" - }, - "engines": { - "node": ">= 18", - "npm": ">= 8.6.0" - } - }, - "node_modules/@slack/socket-mode": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@slack/socket-mode/-/socket-mode-2.0.5.tgz", - "integrity": "sha512-VaapvmrAifeFLAFaDPfGhEwwunTKsI6bQhYzxRXw7BSujZUae5sANO76WqlVsLXuhVtCVrBWPiS2snAQR2RHJQ==", - "license": "MIT", - "dependencies": { - "@slack/logger": "^4", - "@slack/web-api": "^7.10.0", - "@types/node": ">=18", - "@types/ws": "^8", - "eventemitter3": "^5", - "ws": "^8" - }, - "engines": { - "node": ">= 18", - "npm": ">= 8.6.0" - } - }, - "node_modules/@slack/types": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/@slack/types/-/types-2.20.0.tgz", - "integrity": "sha512-PVF6P6nxzDMrzPC8fSCsnwaI+kF8YfEpxf3MqXmdyjyWTYsZQURpkK7WWUWvP5QpH55pB7zyYL9Qem/xSgc5VA==", - "license": "MIT", - "engines": { - "node": ">= 12.13.0", - "npm": ">= 6.12.0" - } - }, - "node_modules/@slack/web-api": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/@slack/web-api/-/web-api-7.14.1.tgz", - "integrity": "sha512-RoygyteJeFswxDPJjUMESn9dldWVMD2xUcHHd9DenVavSfVC6FeVnSdDerOO7m8LLvw4Q132nQM4hX8JiF7dng==", - "license": "MIT", - "dependencies": { - "@slack/logger": "^4.0.0", - "@slack/types": "^2.20.0", - "@types/node": ">=18.0.0", - "@types/retry": "0.12.0", - "axios": "^1.13.5", - "eventemitter3": "^5.0.1", - "form-data": "^4.0.4", - "is-electron": "2.2.2", - "is-stream": "^2", - "p-queue": "^6", - "p-retry": "^4", - "retry": "^0.13.1" - }, - "engines": { - "node": ">= 18", - "npm": ">= 8.6.0" - } - }, - "node_modules/@smithy/abort-controller": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-4.2.11.tgz", - "integrity": "sha512-Hj4WoYWMJnSpM6/kchsm4bUNTL9XiSyhvoMb2KIq4VJzyDt7JpGHUZHkVNPZVC7YE1tf8tPeVauxpFBKGW4/KQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.13.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/config-resolver": { - "version": "4.4.10", - "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-4.4.10.tgz", - "integrity": "sha512-IRTkd6ps0ru+lTWnfnsbXzW80A8Od8p3pYiZnW98K2Hb20rqfsX7VTlfUwhrcOeSSy68Gn9WBofwPuw3e5CCsg==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/node-config-provider": "^4.3.11", - "@smithy/types": "^4.13.0", - "@smithy/util-config-provider": "^4.2.2", - "@smithy/util-endpoints": "^3.3.2", - "@smithy/util-middleware": "^4.2.11", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/core": { - "version": "3.23.8", - "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.23.8.tgz", - "integrity": "sha512-f7uPeBi7ehmLT4YF2u9j3qx6lSnurG1DLXOsTtJrIRNDF7VXio4BGHQ+SQteN/BrUVudbkuL4v7oOsRCzq4BqA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/middleware-serde": "^4.2.12", - "@smithy/protocol-http": "^5.3.11", - "@smithy/types": "^4.13.0", - "@smithy/util-base64": "^4.3.2", - "@smithy/util-body-length-browser": "^4.2.2", - "@smithy/util-middleware": "^4.2.11", - "@smithy/util-stream": "^4.5.17", - "@smithy/util-utf8": "^4.2.2", - "@smithy/uuid": "^1.1.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/credential-provider-imds": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-4.2.11.tgz", - "integrity": "sha512-lBXrS6ku0kTj3xLmsJW0WwqWbGQ6ueooYyp/1L9lkyT0M02C+DWwYwc5aTyXFbRaK38ojALxNixg+LxKSHZc0g==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/node-config-provider": "^4.3.11", - "@smithy/property-provider": "^4.2.11", - "@smithy/types": "^4.13.0", - "@smithy/url-parser": "^4.2.11", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/eventstream-codec": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/@smithy/eventstream-codec/-/eventstream-codec-4.2.11.tgz", - "integrity": "sha512-Sf39Ml0iVX+ba/bgMPxaXWAAFmHqYLTmbjAPfLPLY8CrYkRDEqZdUsKC1OwVMCdJXfAt0v4j49GIJ8DoSYAe6w==", - "license": "Apache-2.0", - "dependencies": { - "@aws-crypto/crc32": "5.2.0", - "@smithy/types": "^4.13.0", - "@smithy/util-hex-encoding": "^4.2.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/eventstream-serde-browser": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-browser/-/eventstream-serde-browser-4.2.11.tgz", - "integrity": "sha512-3rEpo3G6f/nRS7fQDsZmxw/ius6rnlIpz4UX6FlALEzz8JoSxFmdBt0SZnthis+km7sQo6q5/3e+UJcuQivoXA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/eventstream-serde-universal": "^4.2.11", - "@smithy/types": "^4.13.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/eventstream-serde-config-resolver": { - "version": "4.3.11", - "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-config-resolver/-/eventstream-serde-config-resolver-4.3.11.tgz", - "integrity": "sha512-XeNIA8tcP/GDWnnKkO7qEm/bg0B/bP9lvIXZBXcGZwZ+VYM8h8k9wuDvUODtdQ2Wcp2RcBkPTCSMmaniVHrMlA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.13.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/eventstream-serde-node": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-node/-/eventstream-serde-node-4.2.11.tgz", - "integrity": "sha512-fzbCh18rscBDTQSCrsp1fGcclLNF//nJyhjldsEl/5wCYmgpHblv5JSppQAyQI24lClsFT0wV06N1Porn0IsEw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/eventstream-serde-universal": "^4.2.11", - "@smithy/types": "^4.13.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/eventstream-serde-universal": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-4.2.11.tgz", - "integrity": "sha512-MJ7HcI+jEkqoWT5vp+uoVaAjBrmxBtKhZTeynDRG/seEjJfqyg3SiqMMqyPnAMzmIfLaeJ/uiuSDP/l9AnMy/Q==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/eventstream-codec": "^4.2.11", - "@smithy/types": "^4.13.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/fetch-http-handler": { - "version": "5.3.13", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-5.3.13.tgz", - "integrity": "sha512-U2Hcfl2s3XaYjikN9cT4mPu8ybDbImV3baXR0PkVlC0TTx808bRP3FaPGAzPtB8OByI+JqJ1kyS+7GEgae7+qQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^5.3.11", - "@smithy/querystring-builder": "^4.2.11", - "@smithy/types": "^4.13.0", - "@smithy/util-base64": "^4.3.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/hash-node": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-4.2.11.tgz", - "integrity": "sha512-T+p1pNynRkydpdL015ruIoyPSRw9e/SQOWmSAMmmprfswMrd5Ow5igOWNVlvyVFZlxXqGmyH3NQwfwy8r5Jx0A==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.13.0", - "@smithy/util-buffer-from": "^4.2.2", - "@smithy/util-utf8": "^4.2.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/invalid-dependency": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-4.2.11.tgz", - "integrity": "sha512-cGNMrgykRmddrNhYy1yBdrp5GwIgEkniS7k9O1VLB38yxQtlvrxpZtUVvo6T4cKpeZsriukBuuxfJcdZQc/f/g==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.13.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/is-array-buffer": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-4.2.2.tgz", - "integrity": "sha512-n6rQ4N8Jj4YTQO3YFrlgZuwKodf4zUFs7EJIWH86pSCWBaAtAGBFfCM7Wx6D2bBJ2xqFNxGBSrUWswT3M0VJow==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/middleware-content-length": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-4.2.11.tgz", - "integrity": "sha512-UvIfKYAKhCzr4p6jFevPlKhQwyQwlJ6IeKLDhmV1PlYfcW3RL4ROjNEDtSik4NYMi9kDkH7eSwyTP3vNJ/u/Dw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^5.3.11", - "@smithy/types": "^4.13.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/middleware-endpoint": { - "version": "4.4.22", - "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-4.4.22.tgz", - "integrity": "sha512-sc81w1o4Jy+/MAQlY3sQ8C7CmSpcvIi3TAzXblUv2hjG11BBSJi/Cw8vDx5BxMxapuH2I+Gc+45vWsgU07WZRQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/core": "^3.23.8", - "@smithy/middleware-serde": "^4.2.12", - "@smithy/node-config-provider": "^4.3.11", - "@smithy/shared-ini-file-loader": "^4.4.6", - "@smithy/types": "^4.13.0", - "@smithy/url-parser": "^4.2.11", - "@smithy/util-middleware": "^4.2.11", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/middleware-retry": { - "version": "4.4.39", - "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-4.4.39.tgz", - "integrity": "sha512-MCVCxaCzuZgiHtHGV2Ke44nh6t4+8/tO+rTYOzrr2+G4nMLU/qbzNCWKBX54lyEaVcGQrfOJiG2f8imtiw+nIQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/node-config-provider": "^4.3.11", - "@smithy/protocol-http": "^5.3.11", - "@smithy/service-error-classification": "^4.2.11", - "@smithy/smithy-client": "^4.12.2", - "@smithy/types": "^4.13.0", - "@smithy/util-middleware": "^4.2.11", - "@smithy/util-retry": "^4.2.11", - "@smithy/uuid": "^1.1.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/middleware-serde": { - "version": "4.2.12", - "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-4.2.12.tgz", - "integrity": "sha512-W9g1bOLui7Xn5FABRVS0o3rXL0gfN37d/8I/W7i0N7oxjx9QecUmXEMSUMADTODwdtka9cN43t5BI2CodLJpng==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^5.3.11", - "@smithy/types": "^4.13.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/middleware-stack": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-4.2.11.tgz", - "integrity": "sha512-s+eenEPW6RgliDk2IhjD2hWOxIx1NKrOHxEwNUaUXxYBxIyCcDfNULZ2Mu15E3kwcJWBedTET/kEASPV1A1Akg==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.13.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/node-config-provider": { - "version": "4.3.11", - "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-4.3.11.tgz", - "integrity": "sha512-xD17eE7kaLgBBGf5CZQ58hh2YmwK1Z0O8YhffwB/De2jsL0U3JklmhVYJ9Uf37OtUDLF2gsW40Xwwag9U869Gg==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/property-provider": "^4.2.11", - "@smithy/shared-ini-file-loader": "^4.4.6", - "@smithy/types": "^4.13.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/node-http-handler": { - "version": "4.4.14", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.4.14.tgz", - "integrity": "sha512-DamSqaU8nuk0xTJDrYnRzZndHwwRnyj/n/+RqGGCcBKB4qrQem0mSDiWdupaNWdwxzyMU91qxDmHOCazfhtO3A==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/abort-controller": "^4.2.11", - "@smithy/protocol-http": "^5.3.11", - "@smithy/querystring-builder": "^4.2.11", - "@smithy/types": "^4.13.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/property-provider": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.2.11.tgz", - "integrity": "sha512-14T1V64o6/ndyrnl1ze1ZhyLzIeYNN47oF/QU6P5m82AEtyOkMJTb0gO1dPubYjyyKuPD6OSVMPDKe+zioOnCg==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.13.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/protocol-http": { - "version": "5.3.11", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.3.11.tgz", - "integrity": "sha512-hI+barOVDJBkNt4y0L2mu3Ugc0w7+BpJ2CZuLwXtSltGAAwCb3IvnalGlbDV/UCS6a9ZuT3+exd1WxNdLb5IlQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.13.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/querystring-builder": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-4.2.11.tgz", - "integrity": "sha512-7spdikrYiljpket6u0up2Ck2mxhy7dZ0+TDd+S53Dg2DHd6wg+YNJrTCHiLdgZmEXZKI7LJZcwL3721ZRDFiqA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.13.0", - "@smithy/util-uri-escape": "^4.2.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/querystring-parser": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-4.2.11.tgz", - "integrity": "sha512-nE3IRNjDltvGcoThD2abTozI1dkSy8aX+a2N1Rs55en5UsdyyIXgGEmevUL3okZFoJC77JgRGe99xYohhsjivQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.13.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/service-error-classification": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-4.2.11.tgz", - "integrity": "sha512-HkMFJZJUhzU3HvND1+Yw/kYWXp4RPDLBWLcK1n+Vqw8xn4y2YiBhdww8IxhkQjP/QlZun5bwm3vcHc8AqIU3zw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.13.0" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/shared-ini-file-loader": { - "version": "4.4.6", - "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-4.4.6.tgz", - "integrity": "sha512-IB/M5I8G0EeXZTHsAxpx51tMQ5R719F3aq+fjEB6VtNcCHDc0ajFDIGDZw+FW9GxtEkgTduiPpjveJdA/CX7sw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.13.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/signature-v4": { - "version": "5.3.11", - "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-5.3.11.tgz", - "integrity": "sha512-V1L6N9aKOBAN4wEHLyqjLBnAz13mtILU0SeDrjOaIZEeN6IFa6DxwRt1NNpOdmSpQUfkBj0qeD3m6P77uzMhgQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/is-array-buffer": "^4.2.2", - "@smithy/protocol-http": "^5.3.11", - "@smithy/types": "^4.13.0", - "@smithy/util-hex-encoding": "^4.2.2", - "@smithy/util-middleware": "^4.2.11", - "@smithy/util-uri-escape": "^4.2.2", - "@smithy/util-utf8": "^4.2.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/smithy-client": { - "version": "4.12.2", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.12.2.tgz", - "integrity": "sha512-HezY3UuG0k4T+4xhFKctLXCA5N2oN+Rtv+mmL8Gt7YmsUY2yhmcLyW75qrSzldfj75IsCW/4UhY3s20KcFnZqA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/core": "^3.23.8", - "@smithy/middleware-endpoint": "^4.4.22", - "@smithy/middleware-stack": "^4.2.11", - "@smithy/protocol-http": "^5.3.11", - "@smithy/types": "^4.13.0", - "@smithy/util-stream": "^4.5.17", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/types": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.13.0.tgz", - "integrity": "sha512-COuLsZILbbQsdrwKQpkkpyep7lCsByxwj7m0Mg5v66/ZTyenlfBc40/QFQ5chO0YN/PNEH1Bi3fGtfXPnYNeDw==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/url-parser": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-4.2.11.tgz", - "integrity": "sha512-oTAGGHo8ZYc5VZsBREzuf5lf2pAurJQsccMusVZ85wDkX66ojEc/XauiGjzCj50A61ObFTPe6d7Pyt6UBYaing==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/querystring-parser": "^4.2.11", - "@smithy/types": "^4.13.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/util-base64": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-4.3.2.tgz", - "integrity": "sha512-XRH6b0H/5A3SgblmMa5ErXQ2XKhfbQB+Fm/oyLZ2O2kCUrwgg55bU0RekmzAhuwOjA9qdN5VU2BprOvGGUkOOQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^4.2.2", - "@smithy/util-utf8": "^4.2.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/util-body-length-browser": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-4.2.2.tgz", - "integrity": "sha512-JKCrLNOup3OOgmzeaKQwi4ZCTWlYR5H4Gm1r2uTMVBXoemo1UEghk5vtMi1xSu2ymgKVGW631e2fp9/R610ZjQ==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/util-body-length-node": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/util-body-length-node/-/util-body-length-node-4.2.3.tgz", - "integrity": "sha512-ZkJGvqBzMHVHE7r/hcuCxlTY8pQr1kMtdsVPs7ex4mMU+EAbcXppfo5NmyxMYi2XU49eqaz56j2gsk4dHHPG/g==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/util-buffer-from": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-4.2.2.tgz", - "integrity": "sha512-FDXD7cvUoFWwN6vtQfEta540Y/YBe5JneK3SoZg9bThSoOAC/eGeYEua6RkBgKjGa/sz6Y+DuBZj3+YEY21y4Q==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/is-array-buffer": "^4.2.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/util-config-provider": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@smithy/util-config-provider/-/util-config-provider-4.2.2.tgz", - "integrity": "sha512-dWU03V3XUprJwaUIFVv4iOnS1FC9HnMHDfUrlNDSh4315v0cWyaIErP8KiqGVbf5z+JupoVpNM7ZB3jFiTejvQ==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/util-defaults-mode-browser": { - "version": "4.3.38", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-4.3.38.tgz", - "integrity": "sha512-c8P1mFLNxcsdAMabB8/VUQUbWzFmgujWi4bAXSggcqLYPc8V4U5abqFqOyn+dK4YT+q8UyCVkTO8807t4t2syA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/property-provider": "^4.2.11", - "@smithy/smithy-client": "^4.12.2", - "@smithy/types": "^4.13.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/util-defaults-mode-node": { - "version": "4.2.41", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-4.2.41.tgz", - "integrity": "sha512-/UG+9MT3UZAR0fLzOtMJMfWGcjjHvgggq924x/CRy8vRbL+yFf3Z6vETlvq8vDH92+31P/1gSOFoo7303wN8WQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/config-resolver": "^4.4.10", - "@smithy/credential-provider-imds": "^4.2.11", - "@smithy/node-config-provider": "^4.3.11", - "@smithy/property-provider": "^4.2.11", - "@smithy/smithy-client": "^4.12.2", - "@smithy/types": "^4.13.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/util-endpoints": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-3.3.2.tgz", - "integrity": "sha512-+4HFLpE5u29AbFlTdlKIT7jfOzZ8PDYZKTb3e+AgLz986OYwqTourQ5H+jg79/66DB69Un1+qKecLnkZdAsYcA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/node-config-provider": "^4.3.11", - "@smithy/types": "^4.13.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/util-hex-encoding": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-4.2.2.tgz", - "integrity": "sha512-Qcz3W5vuHK4sLQdyT93k/rfrUwdJ8/HZ+nMUOyGdpeGA1Wxt65zYwi3oEl9kOM+RswvYq90fzkNDahPS8K0OIg==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/util-middleware": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-4.2.11.tgz", - "integrity": "sha512-r3dtF9F+TpSZUxpOVVtPfk09Rlo4lT6ORBqEvX3IBT6SkQAdDSVKR5GcfmZbtl7WKhKnmb3wbDTQ6ibR2XHClw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.13.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/util-retry": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-4.2.11.tgz", - "integrity": "sha512-XSZULmL5x6aCTTii59wJqKsY1l3eMIAomRAccW7Tzh9r8s7T/7rdo03oektuH5jeYRlJMPcNP92EuRDvk9aXbw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/service-error-classification": "^4.2.11", - "@smithy/types": "^4.13.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/util-stream": { - "version": "4.5.17", - "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-4.5.17.tgz", - "integrity": "sha512-793BYZ4h2JAQkNHcEnyFxDTcZbm9bVybD0UV/LEWmZ5bkTms7JqjfrLMi2Qy0E5WFcCzLwCAPgcvcvxoeALbAQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/fetch-http-handler": "^5.3.13", - "@smithy/node-http-handler": "^4.4.14", - "@smithy/types": "^4.13.0", - "@smithy/util-base64": "^4.3.2", - "@smithy/util-buffer-from": "^4.2.2", - "@smithy/util-hex-encoding": "^4.2.2", - "@smithy/util-utf8": "^4.2.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/util-uri-escape": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-4.2.2.tgz", - "integrity": "sha512-2kAStBlvq+lTXHyAZYfJRb/DfS3rsinLiwb+69SstC9Vb0s9vNWkRwpnj918Pfi85mzi42sOqdV72OLxWAISnw==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/util-utf8": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-4.2.2.tgz", - "integrity": "sha512-75MeYpjdWRe8M5E3AW0O4Cx3UadweS+cwdXjwYGBW5h/gxxnbeZ877sLPX/ZJA9GVTlL/qG0dXP29JWFCD1Ayw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^4.2.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/uuid": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@smithy/uuid/-/uuid-1.1.2.tgz", - "integrity": "sha512-O/IEdcCUKkubz60tFbGA7ceITTAJsty+lBjNoorP4Z6XRqaFb/OjQjZODophEcuq68nKm6/0r+6/lLQ+XVpk8g==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@standard-schema/spec": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz", - "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==", - "dev": true, - "license": "MIT" - }, - "node_modules/@tokenizer/inflate": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@tokenizer/inflate/-/inflate-0.4.1.tgz", - "integrity": "sha512-2mAv+8pkG6GIZiF1kNg1jAjh27IDxEPKwdGul3snfztFerfPGI1LjDezZp3i7BElXompqEtPmoPx6c2wgtWsOA==", - "license": "MIT", - "dependencies": { - "debug": "^4.4.3", - "token-types": "^6.1.1" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Borewit" - } - }, - "node_modules/@tokenizer/token": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz", - "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==", - "license": "MIT" - }, - "node_modules/@tootallnate/quickjs-emscripten": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", - "integrity": "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==", - "license": "MIT" - }, - "node_modules/@tsconfig/node10": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.12.tgz", - "integrity": "sha512-UCYBaeFvM11aU2y3YPZ//O5Rhj+xKyzy7mvcIoAjASbigy8mHMryP5cK7dgjlz2hWxh1g5pLw084E0a/wlUSFQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@tsconfig/node12": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", - "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", - "dev": true, - "license": "MIT" - }, - "node_modules/@tsconfig/node14": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", - "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", - "dev": true, - "license": "MIT" - }, - "node_modules/@tsconfig/node16": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", - "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/chai": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz", - "integrity": "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/deep-eql": "*", - "assertion-error": "^2.0.1" - } - }, - "node_modules/@types/deep-eql": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", - "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/diff": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@types/diff/-/diff-7.0.2.tgz", - "integrity": "sha512-JSWRMozjFKsGlEjiiKajUjIJVKuKdE3oVy2DNtK+fUo8q82nhFZ2CPQwicAIkXrofahDXrWJ7mjelvZphMS98Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/estree": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", - "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/hosted-git-info": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@types/hosted-git-info/-/hosted-git-info-3.0.5.tgz", - "integrity": "sha512-Dmngh7U003cOHPhKGyA7LWqrnvcTyILNgNPmNCxlx7j8MIi54iBliiT8XqVLIQ3GchoOjVAyBzNJVyuaJjqokg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/mime-types": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@types/mime-types/-/mime-types-2.1.4.tgz", - "integrity": "sha512-lfU4b34HOri+kAY5UheuFMWPDOI+OPceBSHZKp69gEyTL/mmJ4cnU6Y/rlme3UL3GyOn6Y42hyIEw0/q8sWx5w==", - "license": "MIT" - }, - "node_modules/@types/ms": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@types/ms/-/ms-2.1.0.tgz", - "integrity": "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/node": { - "version": "22.19.14", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.19.14.tgz", - "integrity": "sha512-a39m4Z/qy3oYWP8Fc5RO674p/ENAB88JbwnmNwu6+hlfDTbqwE649936RqKNAXAOUwfggSVg6y2KwQcYBYaTsA==", - "license": "MIT", - "dependencies": { - "undici-types": "~6.21.0" - } - }, - "node_modules/@types/proper-lockfile": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/@types/proper-lockfile/-/proper-lockfile-4.1.4.tgz", - "integrity": "sha512-uo2ABllncSqg9F1D4nugVl9v93RmjxF6LJzQLMLDdPaXCUIDPeOJ21Gbqi43xNKzBi/WQ0Q0dICqufzQbMjipQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/retry": "*" - } - }, - "node_modules/@types/retry": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz", - "integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==", - "license": "MIT" - }, - "node_modules/@types/ws": { - "version": "8.18.1", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz", - "integrity": "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==", - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/yauzl": { - "version": "2.10.3", - "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz", - "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==", - "license": "MIT", - "optional": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@typescript/native-preview": { - "version": "7.0.0-dev.20260120.1", - "resolved": "https://registry.npmjs.org/@typescript/native-preview/-/native-preview-7.0.0-dev.20260120.1.tgz", - "integrity": "sha512-nnEf37C9ue7OBRnF2zmV/OCBmV5Y7T/K4mCHa+nxgiXcF/1w8sA0cgdFl+gHQ0mysqUJ+Bu5btAMeWgpLyjrgg==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsgo": "bin/tsgo.js" - }, - "optionalDependencies": { - "@typescript/native-preview-darwin-arm64": "7.0.0-dev.20260120.1", - "@typescript/native-preview-darwin-x64": "7.0.0-dev.20260120.1", - "@typescript/native-preview-linux-arm": "7.0.0-dev.20260120.1", - "@typescript/native-preview-linux-arm64": "7.0.0-dev.20260120.1", - "@typescript/native-preview-linux-x64": "7.0.0-dev.20260120.1", - "@typescript/native-preview-win32-arm64": "7.0.0-dev.20260120.1", - "@typescript/native-preview-win32-x64": "7.0.0-dev.20260120.1" - } - }, - "node_modules/@typescript/native-preview-darwin-arm64": { - "version": "7.0.0-dev.20260120.1", - "resolved": "https://registry.npmjs.org/@typescript/native-preview-darwin-arm64/-/native-preview-darwin-arm64-7.0.0-dev.20260120.1.tgz", - "integrity": "sha512-r3pWFuR2H7mn6ScwpH5jJljKQqKto0npVuJSk6pRwFwexpTyxOGmJTZJ1V0AWiisaNxU2+CNAqWFJSJYIE/QTg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@typescript/native-preview-darwin-x64": { - "version": "7.0.0-dev.20260120.1", - "resolved": "https://registry.npmjs.org/@typescript/native-preview-darwin-x64/-/native-preview-darwin-x64-7.0.0-dev.20260120.1.tgz", - "integrity": "sha512-cuC1+wLbUP+Ip2UT94G134fqRdp5w3b3dhcCO6/FQ4yXxvRNyv/WK+upHBUFDaeSOeHgDTyO9/QFYUWwC4If1A==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@typescript/native-preview-linux-arm": { - "version": "7.0.0-dev.20260120.1", - "resolved": "https://registry.npmjs.org/@typescript/native-preview-linux-arm/-/native-preview-linux-arm-7.0.0-dev.20260120.1.tgz", - "integrity": "sha512-vN6OYVySol/kQZjJGmAzd6L30SyVlCgmCXS8WjUYtE5clN0YrzQHop16RK29fYZHMxpkOniVBtRPxUYQANZBlQ==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@typescript/native-preview-linux-arm64": { - "version": "7.0.0-dev.20260120.1", - "resolved": "https://registry.npmjs.org/@typescript/native-preview-linux-arm64/-/native-preview-linux-arm64-7.0.0-dev.20260120.1.tgz", - "integrity": "sha512-zZGvEGY7wcHYefMZ87KNmvjN3NLIhsCMHEpHZiGCS3khKf+8z6ZsanrzCjOTodvL01VPyBzHxV1EtkSxAcLiQg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@typescript/native-preview-linux-x64": { - "version": "7.0.0-dev.20260120.1", - "resolved": "https://registry.npmjs.org/@typescript/native-preview-linux-x64/-/native-preview-linux-x64-7.0.0-dev.20260120.1.tgz", - "integrity": "sha512-JBfNhWd/asd5MDeS3VgRvE24pGKBkmvLub6tsux6ypr+Yhy+o0WaAEzVpmlRYZUqss2ai5tvOu4dzPBXzZAtFw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@typescript/native-preview-win32-arm64": { - "version": "7.0.0-dev.20260120.1", - "resolved": "https://registry.npmjs.org/@typescript/native-preview-win32-arm64/-/native-preview-win32-arm64-7.0.0-dev.20260120.1.tgz", - "integrity": "sha512-tTndRtYCq2xwgE0VkTi9ACNiJaV43+PqvBqCxk8ceYi3X36Ve+CCnwlZfZJ4k9NxZthtrAwF/kUmpC9iIYbq1w==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@typescript/native-preview-win32-x64": { - "version": "7.0.0-dev.20260120.1", - "resolved": "https://registry.npmjs.org/@typescript/native-preview-win32-x64/-/native-preview-win32-x64-7.0.0-dev.20260120.1.tgz", - "integrity": "sha512-oZia7hFL6k9pVepfonuPI86Jmyz6WlJKR57tWCDwRNmpA7odxuTq1PbvcYgy1z4+wHF1nnKKJY0PMAiq6ac18w==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@vitest/expect": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.2.4.tgz", - "integrity": "sha512-Io0yyORnB6sikFlt8QW5K7slY4OjqNX9jmJQ02QDda8lyM6B5oNgVWoSoKPac8/kgnCUzuHQKrSLtu/uOqqrig==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/chai": "^5.2.2", - "@vitest/spy": "3.2.4", - "@vitest/utils": "3.2.4", - "chai": "^5.2.0", - "tinyrainbow": "^2.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/mocker": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.2.4.tgz", - "integrity": "sha512-46ryTE9RZO/rfDd7pEqFl7etuyzekzEhUbTW3BvmeO/BcCMEgq59BKhek3dXDWgAj4oMK6OZi+vRr1wPW6qjEQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/spy": "3.2.4", - "estree-walker": "^3.0.3", - "magic-string": "^0.30.17" - }, - "funding": { - "url": "https://opencollective.com/vitest" - }, - "peerDependencies": { - "msw": "^2.4.9", - "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" - }, - "peerDependenciesMeta": { - "msw": { - "optional": true - }, - "vite": { - "optional": true - } - } - }, - "node_modules/@vitest/pretty-format": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.2.4.tgz", - "integrity": "sha512-IVNZik8IVRJRTr9fxlitMKeJeXFFFN0JaB9PHPGQ8NKQbGpfjlTx9zO4RefN8gp7eqjNy8nyK3NZmBzOPeIxtA==", - "dev": true, - "license": "MIT", - "dependencies": { - "tinyrainbow": "^2.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/runner": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.2.4.tgz", - "integrity": "sha512-oukfKT9Mk41LreEW09vt45f8wx7DordoWUZMYdY/cyAk7w5TWkTRCNZYF7sX7n2wB7jyGAl74OxgwhPgKaqDMQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/utils": "3.2.4", - "pathe": "^2.0.3", - "strip-literal": "^3.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/snapshot": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.2.4.tgz", - "integrity": "sha512-dEYtS7qQP2CjU27QBC5oUOxLE/v5eLkGqPE0ZKEIDGMs4vKWe7IjgLOeauHsR0D5YuuycGRO5oSRXnwnmA78fQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/pretty-format": "3.2.4", - "magic-string": "^0.30.17", - "pathe": "^2.0.3" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/spy": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.2.4.tgz", - "integrity": "sha512-vAfasCOe6AIK70iP5UD11Ac4siNUNJ9i/9PZ3NKx07sG6sUxeag1LWdNrMWeKKYBLlzuK+Gn65Yd5nyL6ds+nw==", - "dev": true, - "license": "MIT", - "dependencies": { - "tinyspy": "^4.0.3" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/utils": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.2.4.tgz", - "integrity": "sha512-fB2V0JFrQSMsCo9HiSq3Ezpdv4iYaXRG1Sx8edX3MwxfyNn83mKiGzOcH+Fkxt4MHxr3y42fQi1oeAInqgX2QA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/pretty-format": "3.2.4", - "loupe": "^3.1.4", - "tinyrainbow": "^2.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@xterm/headless": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@xterm/headless/-/headless-5.5.0.tgz", - "integrity": "sha512-5xXB7kdQlFBP82ViMJTwwEc3gKCLGKR/eoxQm4zge7GPBl86tCdI0IdPJjoKd8mUSFXz5V7i/25sfsEkP4j46g==", - "dev": true, - "license": "MIT" - }, - "node_modules/@xterm/xterm": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@xterm/xterm/-/xterm-5.5.0.tgz", - "integrity": "sha512-hqJHYaQb5OptNunnyAnkHyM8aCjZ1MEIDTQu1iIbbTD/xops91NB5yq1ZK/dC2JDbVWtF23zUtl9JE2NqwT87A==", - "dev": true, - "license": "MIT" - }, - "node_modules/acorn": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz", - "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-walk": { - "version": "8.3.5", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.5.tgz", - "integrity": "sha512-HEHNfbars9v4pgpW6SO1KSPkfoS0xVOM/9UzkJltjlsHZmJasxg8aXkuZa7SMf8vKGIBhpUsPluQSqhJFCqebw==", - "dev": true, - "license": "MIT", - "dependencies": { - "acorn": "^8.11.0" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/agent-base": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", - "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==", - "license": "MIT", - "engines": { - "node": ">= 14" - } - }, - "node_modules/ajv": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.18.0.tgz", - "integrity": "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==", - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.3", - "fast-uri": "^3.0.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ajv-formats": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz", - "integrity": "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==", - "license": "MIT", - "dependencies": { - "ajv": "^8.0.0" - }, - "peerDependencies": { - "ajv": "^8.0.0" - }, - "peerDependenciesMeta": { - "ajv": { - "optional": true - } - } - }, - "node_modules/ansi-regex": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", - "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/any-promise": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", - "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", - "license": "MIT" - }, - "node_modules/arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "dev": true, - "license": "MIT" - }, - "node_modules/assertion-error": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", - "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - } - }, - "node_modules/ast-types": { - "version": "0.13.4", - "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz", - "integrity": "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==", - "license": "MIT", - "dependencies": { - "tslib": "^2.0.1" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "license": "MIT" - }, - "node_modules/axios": { - "version": "1.13.6", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.6.tgz", - "integrity": "sha512-ChTCHMouEe2kn713WHbQGcuYrr6fXTBiu460OTwWrWob16g1bXn4vtz07Ope7ewMozJAnEquLk5lWQWtBig9DQ==", - "license": "MIT", - "dependencies": { - "follow-redirects": "^1.15.11", - "form-data": "^4.0.5", - "proxy-from-env": "^1.1.0" - } - }, - "node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", - "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/basic-ftp": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.2.0.tgz", - "integrity": "sha512-VoMINM2rqJwJgfdHq6RiUudKt2BV+FY5ZFezP/ypmwayk68+NzzAQy4XXLlqsGD4MCzq3DrmNFD/uUmBJuGoXw==", - "license": "MIT", - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/bignumber.js": { - "version": "9.3.1", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.3.1.tgz", - "integrity": "sha512-Ko0uX15oIUS7wJ3Rb30Fs6SkVbLmPBAKdlm7q9+ak9bbIeFf0MwuBsQV6z7+X768/cHsfg+WlysDWJcmthjsjQ==", - "license": "MIT", - "engines": { - "node": "*" - } - }, - "node_modules/bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "node_modules/bowser": { - "version": "2.14.1", - "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.14.1.tgz", - "integrity": "sha512-tzPjzCxygAKWFOJP011oxFHs57HzIhOEracIgAePE4pqB3LikALKnSzUyU4MGs9/iCEUuHlAJTjTc5M+u7YEGg==", - "license": "MIT" - }, - "node_modules/brace-expansion": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.4.tgz", - "integrity": "sha512-h+DEnpVvxmfVefa4jFbCf5HdH5YMDXRsmKflpf1pILZWRFlTbJpxeU55nJl4Smt5HQaGzg1o6RHFPJaOqnmBDg==", - "license": "MIT", - "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "node_modules/buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", - "license": "MIT", - "engines": { - "node": "*" - } - }, - "node_modules/buffer-equal-constant-time": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", - "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==", - "license": "BSD-3-Clause" - }, - "node_modules/cac": { - "version": "6.7.14", - "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", - "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/call-bind-apply-helpers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", - "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/canvas": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/canvas/-/canvas-3.2.1.tgz", - "integrity": "sha512-ej1sPFR5+0YWtaVp6S1N1FVz69TQCqmrkGeRvQxZeAB1nAIcjNTHVwrZtYtWFFBmQsF40/uDLehsW5KuYC99mg==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "dependencies": { - "node-addon-api": "^7.0.0", - "prebuild-install": "^7.1.3" - }, - "engines": { - "node": "^18.12.0 || >= 20.9.0" - } - }, - "node_modules/chai": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/chai/-/chai-5.3.3.tgz", - "integrity": "sha512-4zNhdJD/iOjSH0A05ea+Ke6MU5mmpQcbQsSOkgdaUMJ9zTlDTD/GYlwohmIE2u0gaxHYiVHEn1Fw9mZ/ktJWgw==", - "dev": true, - "license": "MIT", - "dependencies": { - "assertion-error": "^2.0.1", - "check-error": "^2.1.1", - "deep-eql": "^5.0.1", - "loupe": "^3.1.0", - "pathval": "^2.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/chalk": { - "version": "5.6.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz", - "integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==", - "license": "MIT", - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/check-error": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.3.tgz", - "integrity": "sha512-PAJdDJusoxnwm1VwW07VWwUN1sl7smmC3OKggvndJFadxxDRyFJBX/ggnu/KE4kQAB7a3Dp8f/YXC1FlUprWmA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 16" - } - }, - "node_modules/chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", - "dev": true, - "license": "ISC" - }, - "node_modules/cli-highlight": { - "version": "2.1.11", - "resolved": "https://registry.npmjs.org/cli-highlight/-/cli-highlight-2.1.11.tgz", - "integrity": "sha512-9KDcoEVwyUXrjcJNvHD0NFc/hiwe/WPVYIleQh2O1N2Zro5gWJZ/K+3DGn8w8P/F6FxOgzyC5bxDyHIgCSPhGg==", - "license": "ISC", - "dependencies": { - "chalk": "^4.0.0", - "highlight.js": "^10.7.1", - "mz": "^2.4.0", - "parse5": "^5.1.1", - "parse5-htmlparser2-tree-adapter": "^6.0.0", - "yargs": "^16.0.0" - }, - "bin": { - "highlight": "bin/highlight" - }, - "engines": { - "node": ">=8.0.0", - "npm": ">=5.0.0" - } - }, - "node_modules/cli-highlight/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/cli-highlight/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "node_modules/cliui/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "license": "MIT" - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "license": "MIT", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/companion-grind": { - "resolved": "packages/companion-grind", - "link": true - }, - "node_modules/companion-teams": { - "resolved": "packages/companion-teams", - "link": true - }, - "node_modules/concurrently": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-9.2.1.tgz", - "integrity": "sha512-fsfrO0MxV64Znoy8/l1vVIjjHa29SZyyqPgQBwhiDcaW8wJc2W3XWVOGx4M3oJBnv/zdUZIIp1gDeS98GzP8Ng==", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "4.1.2", - "rxjs": "7.8.2", - "shell-quote": "1.8.3", - "supports-color": "8.1.1", - "tree-kill": "1.2.2", - "yargs": "17.7.2" - }, - "bin": { - "conc": "dist/bin/concurrently.js", - "concurrently": "dist/bin/concurrently.js" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/open-cli-tools/concurrently?sponsor=1" - } - }, - "node_modules/concurrently/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/concurrently/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/concurrently/node_modules/chalk/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/concurrently/node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/concurrently/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/concurrently/node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/concurrently/node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=12" - } - }, - "node_modules/create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/cross-spawn": { - "version": "6.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.6.tgz", - "integrity": "sha512-VqCUuhcd1iB+dsv8gxPttb5iZh/D0iubSP21g36KXdEuf6I5JiioesUVjpCdHV9MZRUfVFlvwtIUyPfxo5trtw==", - "dev": true, - "license": "MIT", - "dependencies": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - }, - "engines": { - "node": ">=4.8" - } - }, - "node_modules/cross-spawn/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/data-uri-to-buffer": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", - "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", - "license": "MIT", - "engines": { - "node": ">= 12" - } - }, - "node_modules/debug": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", - "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/decompress-response": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", - "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "mimic-response": "^3.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/deep-eql": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz", - "integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/degenerator": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-5.0.1.tgz", - "integrity": "sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==", - "license": "MIT", - "dependencies": { - "ast-types": "^0.13.4", - "escodegen": "^2.1.0", - "esprima": "^4.0.1" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/detect-libc": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", - "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=8" - } - }, - "node_modules/diff": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/diff/-/diff-8.0.3.tgz", - "integrity": "sha512-qejHi7bcSD4hQAZE0tNAawRK1ZtafHDmMTMkrrIGgSLl7hTnQHmKCeB45xAcbfTqK2zowkM3j3bHt/4b/ARbYQ==", - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/dunder-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", - "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "es-errors": "^1.3.0", - "gopd": "^1.2.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/ecdsa-sig-formatter": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", - "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", - "license": "Apache-2.0", - "dependencies": { - "safe-buffer": "^5.0.1" - } - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "license": "MIT" - }, - "node_modules/end-of-stream": { - "version": "1.4.5", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz", - "integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==", - "license": "MIT", - "dependencies": { - "once": "^1.4.0" - } - }, - "node_modules/es-define-property": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", - "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-errors": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-module-lexer": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz", - "integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==", - "dev": true, - "license": "MIT" - }, - "node_modules/es-object-atoms": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", - "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-set-tostringtag": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", - "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/esbuild": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.3.tgz", - "integrity": "sha512-8VwMnyGCONIs6cWue2IdpHxHnAjzxnw2Zr7MkVxB2vjmQ2ivqGFb4LEG3SMnv0Gb2F/G/2yA8zUaiL1gywDCCg==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.27.3", - "@esbuild/android-arm": "0.27.3", - "@esbuild/android-arm64": "0.27.3", - "@esbuild/android-x64": "0.27.3", - "@esbuild/darwin-arm64": "0.27.3", - "@esbuild/darwin-x64": "0.27.3", - "@esbuild/freebsd-arm64": "0.27.3", - "@esbuild/freebsd-x64": "0.27.3", - "@esbuild/linux-arm": "0.27.3", - "@esbuild/linux-arm64": "0.27.3", - "@esbuild/linux-ia32": "0.27.3", - "@esbuild/linux-loong64": "0.27.3", - "@esbuild/linux-mips64el": "0.27.3", - "@esbuild/linux-ppc64": "0.27.3", - "@esbuild/linux-riscv64": "0.27.3", - "@esbuild/linux-s390x": "0.27.3", - "@esbuild/linux-x64": "0.27.3", - "@esbuild/netbsd-arm64": "0.27.3", - "@esbuild/netbsd-x64": "0.27.3", - "@esbuild/openbsd-arm64": "0.27.3", - "@esbuild/openbsd-x64": "0.27.3", - "@esbuild/openharmony-arm64": "0.27.3", - "@esbuild/sunos-x64": "0.27.3", - "@esbuild/win32-arm64": "0.27.3", - "@esbuild/win32-ia32": "0.27.3", - "@esbuild/win32-x64": "0.27.3" - } - }, - "node_modules/escalade": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/escodegen": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", - "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", - "license": "BSD-2-Clause", - "dependencies": { - "esprima": "^4.0.1", - "estraverse": "^5.2.0", - "esutils": "^2.0.2" - }, - "bin": { - "escodegen": "bin/escodegen.js", - "esgenerate": "bin/esgenerate.js" - }, - "engines": { - "node": ">=6.0" - }, - "optionalDependencies": { - "source-map": "~0.6.1" - } - }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estree-walker": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", - "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "^1.0.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/eventemitter3": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.4.tgz", - "integrity": "sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw==", - "license": "MIT" - }, - "node_modules/execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "dev": true, - "license": "MIT", - "dependencies": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/execa/node_modules/get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "license": "MIT", - "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/execa/node_modules/is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-template": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", - "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", - "dev": true, - "license": "(MIT OR WTFPL)", - "engines": { - "node": ">=6" - } - }, - "node_modules/expect-type": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.3.0.tgz", - "integrity": "sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "license": "MIT" - }, - "node_modules/extract-zip": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", - "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", - "license": "BSD-2-Clause", - "dependencies": { - "debug": "^4.1.1", - "get-stream": "^5.1.0", - "yauzl": "^2.10.0" - }, - "bin": { - "extract-zip": "cli.js" - }, - "engines": { - "node": ">= 10.17.0" - }, - "optionalDependencies": { - "@types/yauzl": "^2.9.1" - } - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "license": "MIT" - }, - "node_modules/fast-glob": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", - "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.8" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fast-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz", - "integrity": "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/fastify" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/fastify" - } - ], - "license": "BSD-3-Clause" - }, - "node_modules/fast-xml-parser": { - "version": "5.3.8", - "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.3.8.tgz", - "integrity": "sha512-53jIF4N6u/pxvaL1eb/hEZts/cFLWZ92eCfLrNyCI0k38lettCG/Bs40W9pPwoPXyHQlKu2OUbQtiEIZK/J6Vw==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/NaturalIntelligence" - } - ], - "license": "MIT", - "dependencies": { - "strnum": "^2.1.2" - }, - "bin": { - "fxparser": "src/cli/cli.js" - } - }, - "node_modules/fastq": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.1.tgz", - "integrity": "sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==", - "dev": true, - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/fd-slicer": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", - "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", - "license": "MIT", - "dependencies": { - "pend": "~1.2.0" - } - }, - "node_modules/fetch-blob": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", - "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/jimmywarting" - }, - { - "type": "paypal", - "url": "https://paypal.me/jimmywarting" - } - ], - "license": "MIT", - "dependencies": { - "node-domexception": "^1.0.0", - "web-streams-polyfill": "^3.0.3" - }, - "engines": { - "node": "^12.20 || >= 14.13" - } - }, - "node_modules/file-type": { - "version": "21.3.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-21.3.0.tgz", - "integrity": "sha512-8kPJMIGz1Yt/aPEwOsrR97ZyZaD1Iqm8PClb1nYFclUCkBi0Ma5IsYNQzvSFS9ib51lWyIw5mIT9rWzI/xjpzA==", - "license": "MIT", - "dependencies": { - "@tokenizer/inflate": "^0.4.1", - "strtok3": "^10.3.4", - "token-types": "^6.1.1", - "uint8array-extras": "^1.4.0" - }, - "engines": { - "node": ">=20" - }, - "funding": { - "url": "https://github.com/sindresorhus/file-type?sponsor=1" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/follow-redirects": { - "version": "1.15.11", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz", - "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==", - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "license": "MIT", - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } - } - }, - "node_modules/form-data": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz", - "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==", - "license": "MIT", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "es-set-tostringtag": "^2.1.0", - "hasown": "^2.0.2", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/formdata-polyfill": { - "version": "4.0.10", - "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", - "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", - "license": "MIT", - "dependencies": { - "fetch-blob": "^3.1.2" - }, - "engines": { - "node": ">=12.20.0" - } - }, - "node_modules/fs-constants": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", - "dev": true, - "license": "MIT" - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/gaxios": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-7.1.3.tgz", - "integrity": "sha512-YGGyuEdVIjqxkxVH1pUTMY/XtmmsApXrCVv5EU25iX6inEPbV+VakJfLealkBtJN69AQmh1eGOdCl9Sm1UP6XQ==", - "license": "Apache-2.0", - "dependencies": { - "extend": "^3.0.2", - "https-proxy-agent": "^7.0.1", - "node-fetch": "^3.3.2", - "rimraf": "^5.0.1" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/gcp-metadata": { - "version": "8.1.2", - "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-8.1.2.tgz", - "integrity": "sha512-zV/5HKTfCeKWnxG0Dmrw51hEWFGfcF2xiXqcA3+J90WDuP0SvoiSO5ORvcBsifmx/FoIjgQN3oNOGaQ5PhLFkg==", - "license": "Apache-2.0", - "dependencies": { - "gaxios": "^7.0.0", - "google-logging-utils": "^1.0.0", - "json-bigint": "^1.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/get-east-asian-width": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.5.0.tgz", - "integrity": "sha512-CQ+bEO+Tva/qlmw24dCejulK5pMzVnUOFOijVogd3KQs07HnRIgp8TGipvCCRT06xeYEbpbgwaCxglFyiuIcmA==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/get-intrinsic": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", - "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.1", - "function-bind": "^1.1.2", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "math-intrinsics": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", - "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", - "license": "MIT", - "dependencies": { - "dunder-proto": "^1.0.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "license": "MIT", - "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/get-tsconfig": { - "version": "4.13.6", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.13.6.tgz", - "integrity": "sha512-shZT/QMiSHc/YBLxxOkMtgSid5HFoauqCE3/exfsEcwg1WkeqjG+V40yBbBrsD+jW2HDXcs28xOfcbm2jI8Ddw==", - "dev": true, - "license": "MIT", - "dependencies": { - "resolve-pkg-maps": "^1.0.0" - }, - "funding": { - "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" - } - }, - "node_modules/get-uri": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.5.tgz", - "integrity": "sha512-b1O07XYq8eRuVzBNgJLstU6FYc1tS6wnMtF1I1D9lE8LxZSOGZ7LhxN54yPP6mGw5f2CkXY2BQUL9Fx41qvcIg==", - "license": "MIT", - "dependencies": { - "basic-ftp": "^5.0.2", - "data-uri-to-buffer": "^6.0.2", - "debug": "^4.3.4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/get-uri/node_modules/data-uri-to-buffer": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz", - "integrity": "sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==", - "license": "MIT", - "engines": { - "node": ">= 14" - } - }, - "node_modules/github-from-package": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", - "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==", - "dev": true, - "license": "MIT" - }, - "node_modules/glob": { - "version": "13.0.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz", - "integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==", - "license": "BlueOak-1.0.0", - "dependencies": { - "minimatch": "^10.2.2", - "minipass": "^7.1.3", - "path-scurry": "^2.0.2" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/google-auth-library": { - "version": "10.6.1", - "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-10.6.1.tgz", - "integrity": "sha512-5awwuLrzNol+pFDmKJd0dKtZ0fPLAtoA5p7YO4ODsDu6ONJUVqbYwvv8y2ZBO5MBNp9TJXigB19710kYpBPdtA==", - "license": "Apache-2.0", - "dependencies": { - "base64-js": "^1.3.0", - "ecdsa-sig-formatter": "^1.0.11", - "gaxios": "7.1.3", - "gcp-metadata": "8.1.2", - "google-logging-utils": "1.1.3", - "jws": "^4.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/google-logging-utils": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/google-logging-utils/-/google-logging-utils-1.1.3.tgz", - "integrity": "sha512-eAmLkjDjAFCVXg7A1unxHsLf961m6y17QFqXqAXGj/gVkKFrEICfStRfwUlGNfeCEjNRa32JEWOUTlYXPyyKvA==", - "license": "Apache-2.0", - "engines": { - "node": ">=14" - } - }, - "node_modules/gopd": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", - "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "license": "ISC" - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/has-symbols": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", - "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-tostringtag": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", - "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", - "license": "MIT", - "dependencies": { - "has-symbols": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/highlight.js": { - "version": "10.7.3", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", - "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==", - "license": "BSD-3-Clause", - "engines": { - "node": "*" - } - }, - "node_modules/hosted-git-info": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-9.0.2.tgz", - "integrity": "sha512-M422h7o/BR3rmCQ8UHi7cyyMqKltdP9Uo+J2fXK+RSAY+wTcKOIRyhTuKv4qn+DJf3g+PL890AzId5KZpX+CBg==", - "license": "ISC", - "dependencies": { - "lru-cache": "^11.1.0" - }, - "engines": { - "node": "^20.17.0 || >=22.9.0" - } - }, - "node_modules/http-proxy-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", - "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", - "license": "MIT", - "dependencies": { - "agent-base": "^7.1.0", - "debug": "^4.3.4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/https-proxy-agent": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", - "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", - "license": "MIT", - "dependencies": { - "agent-base": "^7.1.2", - "debug": "4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/husky": { - "version": "9.1.7", - "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.7.tgz", - "integrity": "sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==", - "dev": true, - "license": "MIT", - "bin": { - "husky": "bin.js" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/typicode" - } - }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "BSD-3-Clause" - }, - "node_modules/ignore": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", - "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true, - "license": "ISC" - }, - "node_modules/interpret": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/ip-address": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.1.0.tgz", - "integrity": "sha512-XXADHxXmvT9+CRxhXg56LJovE+bmWnEWB78LB83VZTprKTmaC5QfruXocxzTZ2Kl0DNwKuBdlIhjL8LeY8Sf8Q==", - "license": "MIT", - "engines": { - "node": ">= 12" - } - }, - "node_modules/is-core-module": { - "version": "2.16.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", - "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", - "dev": true, - "license": "MIT", - "dependencies": { - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-electron": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/is-electron/-/is-electron-2.2.2.tgz", - "integrity": "sha512-FO/Rhvz5tuw4MCWkpMzHFKWD2LsfHzIb7i6MdPYZ/KW7AlxawyLkqdy+jPZP1WubqEADE3O4FUENlJHDfQASRg==", - "license": "MIT" - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true, - "license": "ISC" - }, - "node_modules/jiti": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.6.1.tgz", - "integrity": "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "bin": { - "jiti": "lib/jiti-cli.mjs" - } - }, - "node_modules/js-tokens": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.1.tgz", - "integrity": "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/json-bigint": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", - "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", - "license": "MIT", - "dependencies": { - "bignumber.js": "^9.0.0" - } - }, - "node_modules/json-schema-to-ts": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/json-schema-to-ts/-/json-schema-to-ts-3.1.1.tgz", - "integrity": "sha512-+DWg8jCJG2TEnpy7kOm/7/AxaYoaRbjVB4LFZLySZlWn8exGs3A4OLJR966cVvU26N7X9TWxl+Jsw7dzAqKT6g==", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.18.3", - "ts-algebra": "^2.0.0" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "license": "MIT" - }, - "node_modules/jwa": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.1.tgz", - "integrity": "sha512-hRF04fqJIP8Abbkq5NKGN0Bbr3JxlQ+qhZufXVr0DvujKy93ZCbXZMHDL4EOtodSbCWxOqR8MS1tXA5hwqCXDg==", - "license": "MIT", - "dependencies": { - "buffer-equal-constant-time": "^1.0.1", - "ecdsa-sig-formatter": "1.0.11", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/jws": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.1.tgz", - "integrity": "sha512-EKI/M/yqPncGUUh44xz0PxSidXFr/+r0pA70+gIYhjv+et7yxM+s29Y+VGDkovRofQem0fs7Uvf4+YmAdyRduA==", - "license": "MIT", - "dependencies": { - "jwa": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/koffi": { - "version": "2.15.1", - "resolved": "https://registry.npmjs.org/koffi/-/koffi-2.15.1.tgz", - "integrity": "sha512-mnc0C0crx/xMSljb5s9QbnLrlFHprioFO1hkXyuSuO/QtbpLDa0l/uM21944UfQunMKmp3/r789DTDxVyyH6aA==", - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "funding": { - "url": "https://liberapay.com/Koromix" - } - }, - "node_modules/lightningcss": { - "version": "1.31.1", - "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.31.1.tgz", - "integrity": "sha512-l51N2r93WmGUye3WuFoN5k10zyvrVs0qfKBhyC5ogUQ6Ew6JUSswh78mbSO+IU3nTWsyOArqPCcShdQSadghBQ==", - "dev": true, - "license": "MPL-2.0", - "optional": true, - "peer": true, - "dependencies": { - "detect-libc": "^2.0.3" - }, - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "optionalDependencies": { - "lightningcss-android-arm64": "1.31.1", - "lightningcss-darwin-arm64": "1.31.1", - "lightningcss-darwin-x64": "1.31.1", - "lightningcss-freebsd-x64": "1.31.1", - "lightningcss-linux-arm-gnueabihf": "1.31.1", - "lightningcss-linux-arm64-gnu": "1.31.1", - "lightningcss-linux-arm64-musl": "1.31.1", - "lightningcss-linux-x64-gnu": "1.31.1", - "lightningcss-linux-x64-musl": "1.31.1", - "lightningcss-win32-arm64-msvc": "1.31.1", - "lightningcss-win32-x64-msvc": "1.31.1" - } - }, - "node_modules/lightningcss-android-arm64": { - "version": "1.31.1", - "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.31.1.tgz", - "integrity": "sha512-HXJF3x8w9nQ4jbXRiNppBCqeZPIAfUo8zE/kOEGbW5NZvGc/K7nMxbhIr+YlFlHW5mpbg/YFPdbnCh1wAXCKFg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "android" - ], - "peer": true, - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-darwin-arm64": { - "version": "1.31.1", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.31.1.tgz", - "integrity": "sha512-02uTEqf3vIfNMq3h/z2cJfcOXnQ0GRwQrkmPafhueLb2h7mqEidiCzkE4gBMEH65abHRiQvhdcQ+aP0D0g67sg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "darwin" - ], - "peer": true, - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-darwin-x64": { - "version": "1.31.1", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.31.1.tgz", - "integrity": "sha512-1ObhyoCY+tGxtsz1lSx5NXCj3nirk0Y0kB/g8B8DT+sSx4G9djitg9ejFnjb3gJNWo7qXH4DIy2SUHvpoFwfTA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "darwin" - ], - "peer": true, - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-freebsd-x64": { - "version": "1.31.1", - "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.31.1.tgz", - "integrity": "sha512-1RINmQKAItO6ISxYgPwszQE1BrsVU5aB45ho6O42mu96UiZBxEXsuQ7cJW4zs4CEodPUioj/QrXW1r9pLUM74A==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "freebsd" - ], - "peer": true, - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-arm-gnueabihf": { - "version": "1.31.1", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.31.1.tgz", - "integrity": "sha512-OOCm2//MZJ87CdDK62rZIu+aw9gBv4azMJuA8/KB74wmfS3lnC4yoPHm0uXZ/dvNNHmnZnB8XLAZzObeG0nS1g==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-arm64-gnu": { - "version": "1.31.1", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.31.1.tgz", - "integrity": "sha512-WKyLWztD71rTnou4xAD5kQT+982wvca7E6QoLpoawZ1gP9JM0GJj4Tp5jMUh9B3AitHbRZ2/H3W5xQmdEOUlLg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-arm64-musl": { - "version": "1.31.1", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.31.1.tgz", - "integrity": "sha512-mVZ7Pg2zIbe3XlNbZJdjs86YViQFoJSpc41CbVmKBPiGmC4YrfeOyz65ms2qpAobVd7WQsbW4PdsSJEMymyIMg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-x64-gnu": { - "version": "1.31.1", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.31.1.tgz", - "integrity": "sha512-xGlFWRMl+0KvUhgySdIaReQdB4FNudfUTARn7q0hh/V67PVGCs3ADFjw+6++kG1RNd0zdGRlEKa+T13/tQjPMA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-x64-musl": { - "version": "1.31.1", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.31.1.tgz", - "integrity": "sha512-eowF8PrKHw9LpoZii5tdZwnBcYDxRw2rRCyvAXLi34iyeYfqCQNA9rmUM0ce62NlPhCvof1+9ivRaTY6pSKDaA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-win32-arm64-msvc": { - "version": "1.31.1", - "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.31.1.tgz", - "integrity": "sha512-aJReEbSEQzx1uBlQizAOBSjcmr9dCdL3XuC/6HLXAxmtErsj2ICo5yYggg1qOODQMtnjNQv2UHb9NpOuFtYe4w==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "win32" - ], - "peer": true, - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-win32-x64-msvc": { - "version": "1.31.1", - "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.31.1.tgz", - "integrity": "sha512-I9aiFrbd7oYHwlnQDqr1Roz+fTz61oDDJX7n9tYF9FJymH1cIN1DtKw3iYt6b8WZgEjoNwVSncwF4wx/ZedMhw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "win32" - ], - "peer": true, - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/long": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz", - "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==", - "license": "Apache-2.0" - }, - "node_modules/loupe": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.2.1.tgz", - "integrity": "sha512-CdzqowRJCeLU72bHvWqwRBBlLcMEtIvGrlvef74kMnV2AolS9Y8xUv1I0U/MNAWMhBlKIoyuEgoJ0t/bbwHbLQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/lru-cache": { - "version": "11.2.6", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.6.tgz", - "integrity": "sha512-ESL2CrkS/2wTPfuend7Zhkzo2u0daGJ/A2VucJOgQ/C48S/zB8MMeMHSGKYpXhIjbPxfuezITkaBH1wqv00DDQ==", - "license": "BlueOak-1.0.0", - "engines": { - "node": "20 || >=22" - } - }, - "node_modules/magic-string": { - "version": "0.30.21", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", - "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.5" - } - }, - "node_modules/make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true, - "license": "ISC" - }, - "node_modules/marked": { - "version": "15.0.12", - "resolved": "https://registry.npmjs.org/marked/-/marked-15.0.12.tgz", - "integrity": "sha512-8dD6FusOQSrpv9Z1rdNMdlSgQOIP880DHqnohobOmYLElGEqAL/JvxvuxZO16r4HtjTlfPRDC1hbvxC9dPN2nA==", - "license": "MIT", - "bin": { - "marked": "bin/marked.js" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/math-intrinsics": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", - "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/micromatch": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "license": "MIT", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mimic-response": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", - "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/minimatch": { - "version": "10.2.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.4.tgz", - "integrity": "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==", - "license": "BlueOak-1.0.0", - "dependencies": { - "brace-expansion": "^5.0.2" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/minipass": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz", - "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==", - "license": "BlueOak-1.0.0", - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, - "node_modules/mkdirp-classic": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", - "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", - "dev": true, - "license": "MIT" - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "license": "MIT" - }, - "node_modules/mz": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", - "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", - "license": "MIT", - "dependencies": { - "any-promise": "^1.0.0", - "object-assign": "^4.0.1", - "thenify-all": "^1.0.0" - } - }, - "node_modules/nanoid": { - "version": "3.3.11", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", - "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/napi-build-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-2.0.0.tgz", - "integrity": "sha512-GEbrYkbfF7MoNaoh2iGG84Mnf/WZfB0GdGEsM8wz7Expx/LlWf5U8t9nvJKXSp3qr5IsEbK04cBGhol/KwOsWA==", - "dev": true, - "license": "MIT" - }, - "node_modules/netmask": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz", - "integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==", - "license": "MIT", - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/node-abi": { - "version": "3.87.0", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.87.0.tgz", - "integrity": "sha512-+CGM1L1CgmtheLcBuleyYOn7NWPVu0s0EJH2C4puxgEZb9h8QpR9G2dBfZJOAUhi7VQxuBPMd0hiISWcTyiYyQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "semver": "^7.3.5" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/node-addon-api": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz", - "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/node-domexception": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", - "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", - "deprecated": "Use your platform's native DOMException instead", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/jimmywarting" - }, - { - "type": "github", - "url": "https://paypal.me/jimmywarting" - } - ], - "license": "MIT", - "engines": { - "node": ">=10.5.0" - } - }, - "node_modules/node-fetch": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", - "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", - "license": "MIT", - "dependencies": { - "data-uri-to-buffer": "^4.0.0", - "fetch-blob": "^3.1.4", - "formdata-polyfill": "^4.0.10" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/node-fetch" - } - }, - "node_modules/npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/obug": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/obug/-/obug-2.1.1.tgz", - "integrity": "sha512-uTqF9MuPraAQ+IsnPf366RG4cP9RtUi7MLO1N3KEc+wb0a6yKpeL0lmk2IB1jY5KHPAlTc6T/JRdC/YqxHNwkQ==", - "dev": true, - "funding": [ - "https://github.com/sponsors/sxzz", - "https://opencollective.com/debug" - ], - "license": "MIT" - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/openai": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/openai/-/openai-6.26.0.tgz", - "integrity": "sha512-zd23dbWTjiJ6sSAX6s0HrCZi41JwTA1bQVs0wLQPZ2/5o2gxOJA5wh7yOAUgwYybfhDXyhwlpeQf7Mlgx8EOCA==", - "license": "Apache-2.0", - "bin": { - "openai": "bin/cli" - }, - "peerDependencies": { - "ws": "^8.18.0", - "zod": "^3.25 || ^4.0" - }, - "peerDependenciesMeta": { - "ws": { - "optional": true - }, - "zod": { - "optional": true - } - } - }, - "node_modules/p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/p-queue": { - "version": "6.6.2", - "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-6.6.2.tgz", - "integrity": "sha512-RwFpb72c/BhQLEXIZ5K2e+AhgNVmIejGlTgiB9MzZ0e93GRvqZ7uSi0dvRF7/XIXDeNkra2fNHBxTyPDGySpjQ==", - "license": "MIT", - "dependencies": { - "eventemitter3": "^4.0.4", - "p-timeout": "^3.2.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-queue/node_modules/eventemitter3": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", - "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", - "license": "MIT" - }, - "node_modules/p-retry": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-4.6.2.tgz", - "integrity": "sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ==", - "license": "MIT", - "dependencies": { - "@types/retry": "0.12.0", - "retry": "^0.13.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/p-timeout": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz", - "integrity": "sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==", - "license": "MIT", - "dependencies": { - "p-finally": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pac-proxy-agent": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.2.0.tgz", - "integrity": "sha512-TEB8ESquiLMc0lV8vcd5Ql/JAKAoyzHFXaStwjkzpOpC5Yv+pIzLfHvjTSdf3vpa2bMiUQrg9i6276yn8666aA==", - "license": "MIT", - "dependencies": { - "@tootallnate/quickjs-emscripten": "^0.23.0", - "agent-base": "^7.1.2", - "debug": "^4.3.4", - "get-uri": "^6.0.1", - "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.6", - "pac-resolver": "^7.0.1", - "socks-proxy-agent": "^8.0.5" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/pac-resolver": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-7.0.1.tgz", - "integrity": "sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==", - "license": "MIT", - "dependencies": { - "degenerator": "^5.0.0", - "netmask": "^2.0.2" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/package-json-from-dist": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", - "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", - "license": "BlueOak-1.0.0" - }, - "node_modules/parse5": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz", - "integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==", - "license": "MIT" - }, - "node_modules/parse5-htmlparser2-tree-adapter": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz", - "integrity": "sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==", - "license": "MIT", - "dependencies": { - "parse5": "^6.0.1" - } - }, - "node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", - "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", - "license": "MIT" - }, - "node_modules/partial-json": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/partial-json/-/partial-json-0.1.7.tgz", - "integrity": "sha512-Njv/59hHaokb/hRUjce3Hdv12wd60MtM9Z5Olmn+nehe0QDAsRtRbJPvJ0Z91TusF0SuZRIvnM+S4l6EIP8leA==", - "license": "MIT" - }, - "node_modules/path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true, - "license": "MIT" - }, - "node_modules/path-scurry": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz", - "integrity": "sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==", - "license": "BlueOak-1.0.0", - "dependencies": { - "lru-cache": "^11.0.0", - "minipass": "^7.1.2" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/pathe": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", - "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", - "dev": true, - "license": "MIT" - }, - "node_modules/pathval": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.1.tgz", - "integrity": "sha512-//nshmD55c46FuFw26xV/xFAaB5HF9Xdap7HJBBnrKdAd6/GxDBaNA1870O79+9ueg61cZLSVc+OaFlfmObYVQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 14.16" - } - }, - "node_modules/pend": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", - "license": "MIT" - }, - "node_modules/picocolors": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "dev": true, - "license": "ISC" - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/postcss": { - "version": "8.5.8", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.8.tgz", - "integrity": "sha512-OW/rX8O/jXnm82Ey1k44pObPtdblfiuWnrd8X7GJ7emImCOstunGbXUpp7HdBrFQX6rJzn3sPT397Wp5aCwCHg==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "nanoid": "^3.3.11", - "picocolors": "^1.1.1", - "source-map-js": "^1.2.1" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/prebuild-install": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.3.tgz", - "integrity": "sha512-8Mf2cbV7x1cXPUILADGI3wuhfqWvtiLA1iclTDbFRZkgRQS0NqsPZphna9V+HyTEadheuPmjaJMsbzKQFOzLug==", - "deprecated": "No longer maintained. Please contact the author of the relevant native addon; alternatives are available.", - "dev": true, - "license": "MIT", - "dependencies": { - "detect-libc": "^2.0.0", - "expand-template": "^2.0.3", - "github-from-package": "0.0.0", - "minimist": "^1.2.3", - "mkdirp-classic": "^0.5.3", - "napi-build-utils": "^2.0.0", - "node-abi": "^3.3.0", - "pump": "^3.0.0", - "rc": "^1.2.7", - "simple-get": "^4.0.0", - "tar-fs": "^2.0.0", - "tunnel-agent": "^0.6.0" - }, - "bin": { - "prebuild-install": "bin.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/proper-lockfile": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/proper-lockfile/-/proper-lockfile-4.1.2.tgz", - "integrity": "sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA==", - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.4", - "retry": "^0.12.0", - "signal-exit": "^3.0.2" - } - }, - "node_modules/proper-lockfile/node_modules/retry": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", - "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/protobufjs": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.5.4.tgz", - "integrity": "sha512-CvexbZtbov6jW2eXAvLukXjXUW1TzFaivC46BpWc/3BpcCysb5Vffu+B3XHMm8lVEuy2Mm4XGex8hBSg1yapPg==", - "hasInstallScript": true, - "license": "BSD-3-Clause", - "dependencies": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/node": ">=13.7.0", - "long": "^5.0.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/proxy-agent": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.5.0.tgz", - "integrity": "sha512-TmatMXdr2KlRiA2CyDu8GqR8EjahTG3aY3nXjdzFyoZbmB8hrBsTyMezhULIXKnC0jpfjlmiZ3+EaCzoInSu/A==", - "license": "MIT", - "dependencies": { - "agent-base": "^7.1.2", - "debug": "^4.3.4", - "http-proxy-agent": "^7.0.1", - "https-proxy-agent": "^7.0.6", - "lru-cache": "^7.14.1", - "pac-proxy-agent": "^7.1.0", - "proxy-from-env": "^1.1.0", - "socks-proxy-agent": "^8.0.5" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/proxy-agent/node_modules/lru-cache": { - "version": "7.18.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", - "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", - "license": "ISC", - "engines": { - "node": ">=12" - } - }, - "node_modules/proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", - "license": "MIT" - }, - "node_modules/pump": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.4.tgz", - "integrity": "sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA==", - "license": "MIT", - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "dev": true, - "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", - "dependencies": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "bin": { - "rc": "cli.js" - } - }, - "node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", - "dev": true, - "dependencies": { - "resolve": "^1.1.6" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/resolve": { - "version": "1.22.11", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz", - "integrity": "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-core-module": "^2.16.1", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/resolve-pkg-maps": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", - "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" - } - }, - "node_modules/retry": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", - "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==", - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/reusify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", - "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/rimraf": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.1.2.tgz", - "integrity": "sha512-cFCkPslJv7BAXJsYlK1dZsbP8/ZNLkCAQ0bi1hf5EKX2QHegmDFEFA6QhuYJlk7UDdc+02JjO80YSOrWPpw06g==", - "license": "BlueOak-1.0.0", - "dependencies": { - "glob": "^13.0.0", - "package-json-from-dist": "^1.0.1" - }, - "bin": { - "rimraf": "dist/esm/bin.mjs" - }, - "engines": { - "node": "20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rollup": { - "version": "4.59.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.59.0.tgz", - "integrity": "sha512-2oMpl67a3zCH9H79LeMcbDhXW/UmWG/y2zuqnF2jQq5uq9TbM9TVyXvA4+t+ne2IIkBdrLpAaRQAvo7YI/Yyeg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "1.0.8" - }, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=18.0.0", - "npm": ">=8.0.0" - }, - "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.59.0", - "@rollup/rollup-android-arm64": "4.59.0", - "@rollup/rollup-darwin-arm64": "4.59.0", - "@rollup/rollup-darwin-x64": "4.59.0", - "@rollup/rollup-freebsd-arm64": "4.59.0", - "@rollup/rollup-freebsd-x64": "4.59.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.59.0", - "@rollup/rollup-linux-arm-musleabihf": "4.59.0", - "@rollup/rollup-linux-arm64-gnu": "4.59.0", - "@rollup/rollup-linux-arm64-musl": "4.59.0", - "@rollup/rollup-linux-loong64-gnu": "4.59.0", - "@rollup/rollup-linux-loong64-musl": "4.59.0", - "@rollup/rollup-linux-ppc64-gnu": "4.59.0", - "@rollup/rollup-linux-ppc64-musl": "4.59.0", - "@rollup/rollup-linux-riscv64-gnu": "4.59.0", - "@rollup/rollup-linux-riscv64-musl": "4.59.0", - "@rollup/rollup-linux-s390x-gnu": "4.59.0", - "@rollup/rollup-linux-x64-gnu": "4.59.0", - "@rollup/rollup-linux-x64-musl": "4.59.0", - "@rollup/rollup-openbsd-x64": "4.59.0", - "@rollup/rollup-openharmony-arm64": "4.59.0", - "@rollup/rollup-win32-arm64-msvc": "4.59.0", - "@rollup/rollup-win32-ia32-msvc": "4.59.0", - "@rollup/rollup-win32-x64-gnu": "4.59.0", - "@rollup/rollup-win32-x64-msvc": "4.59.0", - "fsevents": "~2.3.2" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/rxjs": { - "version": "7.8.2", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", - "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.1.0" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/semver": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", - "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/shell-quote": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.3.tgz", - "integrity": "sha512-ObmnIF4hXNg1BqhnHmgbDETF8dLPCggZWBjkQfhZpbszZnYur5DUljTcCHii5LC3J5E0yeO/1LIMyH+UvHQgyw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/shelljs": { - "version": "0.9.2", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.9.2.tgz", - "integrity": "sha512-S3I64fEiKgTZzKCC46zT/Ib9meqofLrQVbpSswtjFfAVDW+AZ54WTnAM/3/yENoxz/V1Cy6u3kiiEbQ4DNphvw==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "execa": "^1.0.0", - "fast-glob": "^3.3.2", - "interpret": "^1.0.0", - "rechoir": "^0.6.2" - }, - "bin": { - "shjs": "bin/shjs" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/shx": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/shx/-/shx-0.4.0.tgz", - "integrity": "sha512-Z0KixSIlGPpijKgcH6oCMCbltPImvaKy0sGH8AkLRXw1KyzpKtaCTizP2xen+hNDqVF4xxgvA0KXSb9o4Q6hnA==", - "dev": true, - "license": "MIT", - "dependencies": { - "minimist": "^1.2.8", - "shelljs": "^0.9.2" - }, - "bin": { - "shx": "lib/cli.js" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/siginfo": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", - "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", - "dev": true, - "license": "ISC" - }, - "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "license": "ISC" - }, - "node_modules/simple-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", - "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/simple-get": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", - "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "decompress-response": "^6.0.0", - "once": "^1.3.1", - "simple-concat": "^1.0.0" - } - }, - "node_modules/smart-buffer": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", - "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", - "license": "MIT", - "engines": { - "node": ">= 6.0.0", - "npm": ">= 3.0.0" - } - }, - "node_modules/socks": { - "version": "2.8.7", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.7.tgz", - "integrity": "sha512-HLpt+uLy/pxB+bum/9DzAgiKS8CX1EvbWxI4zlmgGCExImLdiad2iCwXT5Z4c9c3Eq8rP2318mPW2c+QbtjK8A==", - "license": "MIT", - "dependencies": { - "ip-address": "^10.0.1", - "smart-buffer": "^4.2.0" - }, - "engines": { - "node": ">= 10.0.0", - "npm": ">= 3.0.0" - } - }, - "node_modules/socks-proxy-agent": { - "version": "8.0.5", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.5.tgz", - "integrity": "sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==", - "license": "MIT", - "dependencies": { - "agent-base": "^7.1.2", - "debug": "^4.3.4", - "socks": "^2.8.3" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "license": "BSD-3-Clause", - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-js": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", - "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/stackback": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", - "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", - "dev": true, - "license": "MIT" - }, - "node_modules/std-env": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.10.0.tgz", - "integrity": "sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==", - "license": "MIT" - }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", - "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.2.2" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/strip-literal": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-3.1.0.tgz", - "integrity": "sha512-8r3mkIM/2+PpjHoOtiAW8Rg3jJLHaV7xPwG+YRGrv6FP0wwk/toTpATxWYOW0BKdWwl82VT2tFYi5DlROa0Mxg==", - "dev": true, - "license": "MIT", - "dependencies": { - "js-tokens": "^9.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/antfu" - } - }, - "node_modules/strnum": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.2.0.tgz", - "integrity": "sha512-Y7Bj8XyJxnPAORMZj/xltsfo55uOiyHcU2tnAVzHUnSJR/KsEX+9RoDeXEnsXtl/CX4fAcrt64gZ13aGaWPeBg==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/NaturalIntelligence" - } - ], - "license": "MIT" - }, - "node_modules/strtok3": { - "version": "10.3.4", - "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-10.3.4.tgz", - "integrity": "sha512-KIy5nylvC5le1OdaaoCJ07L+8iQzJHGH6pWDuzS+d07Cu7n1MZ2x26P8ZKIWfbK02+XIL8Mp4RkWeqdUCrDMfg==", - "license": "MIT", - "dependencies": { - "@tokenizer/token": "^0.3.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Borewit" - } - }, - "node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/tar-fs": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.4.tgz", - "integrity": "sha512-mDAjwmZdh7LTT6pNleZ05Yt65HC3E+NiQzl672vQG38jIrehtJk/J3mNwIg+vShQPcLF/LV7CMnDW6vjj6sfYQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "chownr": "^1.1.1", - "mkdirp-classic": "^0.5.2", - "pump": "^3.0.0", - "tar-stream": "^2.1.4" - } - }, - "node_modules/tar-stream": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", - "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "bl": "^4.0.3", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/thenify": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", - "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", - "license": "MIT", - "dependencies": { - "any-promise": "^1.0.0" - } - }, - "node_modules/thenify-all": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", - "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", - "license": "MIT", - "dependencies": { - "thenify": ">= 3.1.0 < 4" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/tinybench": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", - "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", - "dev": true, - "license": "MIT" - }, - "node_modules/tinyexec": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz", - "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==", - "dev": true, - "license": "MIT" - }, - "node_modules/tinyglobby": { - "version": "0.2.15", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", - "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "fdir": "^6.5.0", - "picomatch": "^4.0.3" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/SuperchupuDev" - } - }, - "node_modules/tinyglobby/node_modules/fdir": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", - "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "picomatch": "^3 || ^4" - }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } - } - }, - "node_modules/tinyglobby/node_modules/picomatch": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", - "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/tinypool": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.1.1.tgz", - "integrity": "sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.0.0 || >=20.0.0" - } - }, - "node_modules/tinyrainbow": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-2.0.0.tgz", - "integrity": "sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/tinyspy": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-4.0.4.tgz", - "integrity": "sha512-azl+t0z7pw/z958Gy9svOTuzqIk6xq+NSheJzn5MMWtWTFywIacg2wUlzKFGtt3cthx0r2SxMK0yzJOR0IES7Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/token-types": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/token-types/-/token-types-6.1.2.tgz", - "integrity": "sha512-dRXchy+C0IgK8WPC6xvCHFRIWYUbqqdEIKPaKo/AcTUNzwLTK6AH7RjdLWsEZcAN/TBdtfUw3PYEgPr5VPr6ww==", - "license": "MIT", - "dependencies": { - "@borewit/text-codec": "^0.2.1", - "@tokenizer/token": "^0.3.0", - "ieee754": "^1.2.1" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Borewit" - } - }, - "node_modules/tree-kill": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", - "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", - "dev": true, - "license": "MIT", - "bin": { - "tree-kill": "cli.js" - } - }, - "node_modules/ts-algebra": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ts-algebra/-/ts-algebra-2.0.0.tgz", - "integrity": "sha512-FPAhNPFMrkwz76P7cdjdmiShwMynZYN6SgOujD1urY4oNm80Ou9oMdmbR45LotcKOXoy7wSmHkRFE6Mxbrhefw==", - "license": "MIT" - }, - "node_modules/ts-node": { - "version": "10.9.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", - "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - }, - "bin": { - "ts-node": "dist/bin.js", - "ts-node-cwd": "dist/bin-cwd.js", - "ts-node-esm": "dist/bin-esm.js", - "ts-node-script": "dist/bin-script.js", - "ts-node-transpile-only": "dist/bin-transpile.js", - "ts-script": "dist/bin-script-deprecated.js" - }, - "peerDependencies": { - "@swc/core": ">=1.2.50", - "@swc/wasm": ">=1.2.50", - "@types/node": "*", - "typescript": ">=2.7" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "@swc/wasm": { - "optional": true - } - } - }, - "node_modules/ts-node/node_modules/diff": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.4.tgz", - "integrity": "sha512-X07nttJQkwkfKfvTPG/KSnE2OMdcUCao6+eXF3wmnIQRn2aPAHH3VxDbDOdegkd6JbPsXqShpvEOHfAT+nCNwQ==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" - }, - "node_modules/tsx": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.21.0.tgz", - "integrity": "sha512-5C1sg4USs1lfG0GFb2RLXsdpXqBSEhAaA/0kPL01wxzpMqLILNxIxIOKiILz+cdg/pLnOUxFYOR5yhHU666wbw==", - "dev": true, - "license": "MIT", - "dependencies": { - "esbuild": "~0.27.0", - "get-tsconfig": "^4.7.5" - }, - "bin": { - "tsx": "dist/cli.mjs" - }, - "engines": { - "node": ">=18.0.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.3" - } - }, - "node_modules/tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "safe-buffer": "^5.0.1" - }, - "engines": { - "node": "*" - } - }, - "node_modules/typescript": { - "version": "5.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", - "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/uint8array-extras": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/uint8array-extras/-/uint8array-extras-1.5.0.tgz", - "integrity": "sha512-rvKSBiC5zqCCiDZ9kAOszZcDvdAHwwIKJG33Ykj43OKcWsnmcBRL09YTU4nOeHZ8Y2a7l1MgTd08SBe9A8Qj6A==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/undici": { - "version": "7.22.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-7.22.0.tgz", - "integrity": "sha512-RqslV2Us5BrllB+JeiZnK4peryVTndy9Dnqq62S3yYRRTj0tFQCwEniUy2167skdGOy3vqRzEvl1Dm4sV2ReDg==", - "license": "MIT", - "engines": { - "node": ">=20.18.1" - } - }, - "node_modules/undici-types": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", - "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", - "license": "MIT" - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true, - "license": "MIT" - }, - "node_modules/uuid": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.0.tgz", - "integrity": "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "license": "MIT", - "bin": { - "uuid": "dist/esm/bin/uuid" - } - }, - "node_modules/v8-compile-cache-lib": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", - "dev": true, - "license": "MIT" - }, - "node_modules/vite": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/vite/-/vite-7.3.1.tgz", - "integrity": "sha512-w+N7Hifpc3gRjZ63vYBXA56dvvRlNWRczTdmCBBa+CotUzAPf5b7YMdMR/8CQoeYE5LX3W4wj6RYTgonm1b9DA==", - "dev": true, - "license": "MIT", - "dependencies": { - "esbuild": "^0.27.0", - "fdir": "^6.5.0", - "picomatch": "^4.0.3", - "postcss": "^8.5.6", - "rollup": "^4.43.0", - "tinyglobby": "^0.2.15" - }, - "bin": { - "vite": "bin/vite.js" - }, - "engines": { - "node": "^20.19.0 || >=22.12.0" - }, - "funding": { - "url": "https://github.com/vitejs/vite?sponsor=1" - }, - "optionalDependencies": { - "fsevents": "~2.3.3" - }, - "peerDependencies": { - "@types/node": "^20.19.0 || >=22.12.0", - "jiti": ">=1.21.0", - "less": "^4.0.0", - "lightningcss": "^1.21.0", - "sass": "^1.70.0", - "sass-embedded": "^1.70.0", - "stylus": ">=0.54.8", - "sugarss": "^5.0.0", - "terser": "^5.16.0", - "tsx": "^4.8.1", - "yaml": "^2.4.2" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "jiti": { - "optional": true - }, - "less": { - "optional": true - }, - "lightningcss": { - "optional": true - }, - "sass": { - "optional": true - }, - "sass-embedded": { - "optional": true - }, - "stylus": { - "optional": true - }, - "sugarss": { - "optional": true - }, - "terser": { - "optional": true - }, - "tsx": { - "optional": true - }, - "yaml": { - "optional": true - } - } - }, - "node_modules/vite-node": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.2.4.tgz", - "integrity": "sha512-EbKSKh+bh1E1IFxeO0pg1n4dvoOTt0UDiXMd/qn++r98+jPO1xtJilvXldeuQ8giIB5IkpjCgMleHMNEsGH6pg==", - "dev": true, - "license": "MIT", - "dependencies": { - "cac": "^6.7.14", - "debug": "^4.4.1", - "es-module-lexer": "^1.7.0", - "pathe": "^2.0.3", - "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" - }, - "bin": { - "vite-node": "vite-node.mjs" - }, - "engines": { - "node": "^18.0.0 || ^20.0.0 || >=22.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/vite/node_modules/fdir": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", - "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "picomatch": "^3 || ^4" - }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } - } - }, - "node_modules/vite/node_modules/picomatch": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", - "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/vitest": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.2.4.tgz", - "integrity": "sha512-LUCP5ev3GURDysTWiP47wRRUpLKMOfPh+yKTx3kVIEiu5KOMeqzpnYNsKyOoVrULivR8tLcks4+lga33Whn90A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/chai": "^5.2.2", - "@vitest/expect": "3.2.4", - "@vitest/mocker": "3.2.4", - "@vitest/pretty-format": "^3.2.4", - "@vitest/runner": "3.2.4", - "@vitest/snapshot": "3.2.4", - "@vitest/spy": "3.2.4", - "@vitest/utils": "3.2.4", - "chai": "^5.2.0", - "debug": "^4.4.1", - "expect-type": "^1.2.1", - "magic-string": "^0.30.17", - "pathe": "^2.0.3", - "picomatch": "^4.0.2", - "std-env": "^3.9.0", - "tinybench": "^2.9.0", - "tinyexec": "^0.3.2", - "tinyglobby": "^0.2.14", - "tinypool": "^1.1.1", - "tinyrainbow": "^2.0.0", - "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0", - "vite-node": "3.2.4", - "why-is-node-running": "^2.3.0" - }, - "bin": { - "vitest": "vitest.mjs" - }, - "engines": { - "node": "^18.0.0 || ^20.0.0 || >=22.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - }, - "peerDependencies": { - "@edge-runtime/vm": "*", - "@types/debug": "^4.1.12", - "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", - "@vitest/browser": "3.2.4", - "@vitest/ui": "3.2.4", - "happy-dom": "*", - "jsdom": "*" - }, - "peerDependenciesMeta": { - "@edge-runtime/vm": { - "optional": true - }, - "@types/debug": { - "optional": true - }, - "@types/node": { - "optional": true - }, - "@vitest/browser": { - "optional": true - }, - "@vitest/ui": { - "optional": true - }, - "happy-dom": { - "optional": true - }, - "jsdom": { - "optional": true - } - } - }, - "node_modules/vitest/node_modules/picomatch": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", - "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/web-streams-polyfill": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", - "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==", - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, - "node_modules/why-is-node-running": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", - "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", - "dev": true, - "license": "MIT", - "dependencies": { - "siginfo": "^2.0.0", - "stackback": "0.0.2" - }, - "bin": { - "why-is-node-running": "cli.js" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "license": "ISC" - }, - "node_modules/ws": { - "version": "8.19.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.19.0.tgz", - "integrity": "sha512-blAT2mjOEIi0ZzruJfIhb3nps74PRWTCz1IjglWEEpQl5XS/UNama6u2/rjFkDDouqr4L67ry+1aGIALViWjDg==", - "license": "MIT", - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "node_modules/yaml": { - "version": "2.8.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.2.tgz", - "integrity": "sha512-mplynKqc1C2hTVYxd0PU2xQAc22TI1vShAYGksCCfxbn/dFwnHTNi1bvYsBTkhdUNtGIf5xNOg938rrSSYvS9A==", - "license": "ISC", - "bin": { - "yaml": "bin.mjs" - }, - "engines": { - "node": ">= 14.6" - }, - "funding": { - "url": "https://github.com/sponsors/eemeli" - } - }, - "node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "license": "MIT", - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "node_modules/yauzl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", - "license": "MIT", - "dependencies": { - "buffer-crc32": "~0.2.3", - "fd-slicer": "~1.1.0" - } - }, - "node_modules/yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/yoctocolors": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yoctocolors/-/yoctocolors-2.1.2.tgz", - "integrity": "sha512-CzhO+pFNo8ajLM2d2IW/R93ipy99LWjtwblvC1RsoSUMZgyLbYFr221TnSNT7GjGdYui6P459mw9JH/g/zW2ug==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/zod": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/zod/-/zod-4.3.6.tgz", - "integrity": "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, - "node_modules/zod-to-json-schema": { - "version": "3.25.1", - "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.25.1.tgz", - "integrity": "sha512-pM/SU9d3YAggzi6MtR4h7ruuQlqKtad8e9S0fmxcMi+ueAK5Korys/aWcV9LIIHTVbj01NdzxcnXSN+O74ZIVA==", - "license": "ISC", - "peerDependencies": { - "zod": "^3.25 || ^4" - } - }, - "packages/agent": { - "name": "@mariozechner/companion-agent-core", - "version": "0.56.2", - "license": "MIT", - "dependencies": { - "@mariozechner/companion-ai": "^0.56.2" - }, - "devDependencies": { - "@types/node": "^24.3.0", - "typescript": "^5.7.3", - "vitest": "^3.2.4" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "packages/agent/node_modules/@types/node": { - "version": "24.11.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.11.1.tgz", - "integrity": "sha512-MOw3rIVR4djfMH7ft9ZJLPViaJwkZvMfrzumElas79IwMUEl8ykkuQmgL9MAMz7vO8G3vuz9b7Gu+keYZx7Xrw==", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~7.16.0" - } - }, - "packages/agent/node_modules/undici-types": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", - "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", - "dev": true, - "license": "MIT" - }, - "packages/ai": { - "name": "@mariozechner/companion-ai", - "version": "0.56.2", - "license": "MIT", - "dependencies": { - "@anthropic-ai/sdk": "^0.73.0", - "@aws-sdk/client-bedrock-runtime": "^3.983.0", - "@google/genai": "^1.40.0", - "@mistralai/mistralai": "1.14.1", - "@sinclair/typebox": "^0.34.41", - "ajv": "^8.17.1", - "ajv-formats": "^3.0.1", - "chalk": "^5.6.2", - "openai": "6.26.0", - "partial-json": "^0.1.7", - "proxy-agent": "^6.5.0", - "undici": "^7.19.1", - "zod-to-json-schema": "^3.24.6" - }, - "bin": { - "companion-ai": "dist/cli.js" - }, - "devDependencies": { - "@types/node": "^24.3.0", - "canvas": "^3.2.0", - "vitest": "^3.2.4" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "packages/ai/node_modules/@types/node": { - "version": "24.11.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.11.1.tgz", - "integrity": "sha512-MOw3rIVR4djfMH7ft9ZJLPViaJwkZvMfrzumElas79IwMUEl8ykkuQmgL9MAMz7vO8G3vuz9b7Gu+keYZx7Xrw==", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~7.16.0" - } - }, - "packages/ai/node_modules/undici-types": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", - "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", - "dev": true, - "license": "MIT" - }, - "packages/coding-agent": { - "name": "@mariozechner/companion-coding-agent", - "version": "0.56.2", - "license": "MIT", - "dependencies": { - "@mariozechner/companion-agent-core": "^0.56.2", - "@mariozechner/companion-ai": "^0.56.2", - "@mariozechner/companion-tui": "^0.56.2", - "@mariozechner/jiti": "^2.6.2", - "@silvia-odwyer/photon-node": "^0.3.4", - "chalk": "^5.5.0", - "cli-highlight": "^2.1.11", - "diff": "^8.0.2", - "extract-zip": "^2.0.1", - "file-type": "^21.1.1", - "glob": "^13.0.1", - "hosted-git-info": "^9.0.2", - "ignore": "^7.0.5", - "marked": "^15.0.12", - "minimatch": "^10.2.3", - "proper-lockfile": "^4.1.2", - "strip-ansi": "^7.1.0", - "undici": "^7.19.1", - "yaml": "^2.8.2" - }, - "bin": { - "companion": "dist/cli.js" - }, - "devDependencies": { - "@types/diff": "^7.0.2", - "@types/hosted-git-info": "^3.0.5", - "@types/ms": "^2.1.0", - "@types/node": "^24.3.0", - "@types/proper-lockfile": "^4.1.4", - "shx": "^0.4.0", - "typescript": "^5.7.3", - "vitest": "^3.2.4" - }, - "engines": { - "node": ">=20.6.0" - }, - "optionalDependencies": { - "@mariozechner/clipboard": "^0.3.2" - } - }, - "packages/coding-agent/examples/extensions/custom-provider-anthropic": { - "name": "companion-extension-custom-provider-anthropic", - "version": "1.7.2", - "extraneous": true, - "dependencies": { - "@anthropic-ai/sdk": "^0.52.0" - } - }, - "packages/coding-agent/examples/extensions/custom-provider-gitlab-duo": { - "name": "companion-extension-custom-provider-gitlab-duo", - "version": "1.7.2", - "extraneous": true - }, - "packages/coding-agent/examples/extensions/custom-provider-qwen-cli": { - "name": "companion-extension-custom-provider-qwen-cli", - "version": "1.6.2", - "extraneous": true - }, - "packages/coding-agent/examples/extensions/with-deps": { - "name": "companion-extension-with-deps", - "version": "1.20.2", - "extraneous": true, - "dependencies": { - "ms": "^2.1.3" - }, - "devDependencies": { - "@types/ms": "^2.1.0" - } - }, - "packages/coding-agent/node_modules/@types/node": { - "version": "24.11.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.11.1.tgz", - "integrity": "sha512-MOw3rIVR4djfMH7ft9ZJLPViaJwkZvMfrzumElas79IwMUEl8ykkuQmgL9MAMz7vO8G3vuz9b7Gu+keYZx7Xrw==", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~7.16.0" - } - }, - "packages/coding-agent/node_modules/undici-types": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", - "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", - "dev": true, - "license": "MIT" - }, - "packages/companion-channels": { - "name": "@e9n/companion-channels", - "version": "0.1.0", - "license": "MIT", - "dependencies": { - "@slack/socket-mode": "^2.0.5", - "@slack/web-api": "^7.14.1" - }, - "devDependencies": { - "@types/node": "^22.0.0", - "typescript": "^5.0.0" - }, - "peerDependencies": { - "@mariozechner/companion-ai": "*", - "@mariozechner/companion-coding-agent": "*", - "@sinclair/typebox": "*" - } - }, - "packages/companion-grind": { - "version": "0.1.0", - "license": "MIT", - "devDependencies": { - "@types/node": "^24.3.0", - "typescript": "^5.9.3", - "vitest": "^3.2.4" - }, - "peerDependencies": { - "@mariozechner/companion-agent-core": "*", - "@mariozechner/companion-coding-agent": "*" - } - }, - "packages/companion-grind/node_modules/@types/node": { - "version": "24.12.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.12.0.tgz", - "integrity": "sha512-GYDxsZi3ChgmckRT9HPU0WEhKLP08ev/Yfcq2AstjrDASOYCSXeyjDsHg4v5t4jOj7cyDX3vmprafKlWIG9MXQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~7.16.0" - } - }, - "packages/companion-grind/node_modules/undici-types": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", - "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", - "dev": true, - "license": "MIT" - }, - "packages/companion-runtime-daemon": { - "name": "@local/companion-runtime-daemon", - "version": "0.0.1", - "extraneous": true, - "license": "MIT", - "bin": { - "companion-runtime-daemon": "bin/companion-runtime-daemon.mjs" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "packages/companion-teams": { - "version": "0.8.6", - "license": "MIT", - "dependencies": { - "uuid": "^11.1.0" - }, - "devDependencies": { - "@types/node": "^25.3.0", - "ts-node": "^10.9.2", - "typescript": "^5.9.3", - "vitest": "^4.0.18" - }, - "peerDependencies": { - "@mariozechner/companion-coding-agent": "*", - "@sinclair/typebox": "*" - } - }, - "packages/companion-teams/node_modules/@types/node": { - "version": "25.3.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-25.3.5.tgz", - "integrity": "sha512-oX8xrhvpiyRCQkG1MFchB09f+cXftgIXb3a7UUa4Y3wpmZPw5tyZGTLWhlESOLq1Rq6oDlc8npVU2/9xiCuXMA==", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~7.18.0" - } - }, - "packages/companion-teams/node_modules/@vitest/expect": { - "version": "4.0.18", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.0.18.tgz", - "integrity": "sha512-8sCWUyckXXYvx4opfzVY03EOiYVxyNrHS5QxX3DAIi5dpJAAkyJezHCP77VMX4HKA2LDT/Jpfo8i2r5BE3GnQQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@standard-schema/spec": "^1.0.0", - "@types/chai": "^5.2.2", - "@vitest/spy": "4.0.18", - "@vitest/utils": "4.0.18", - "chai": "^6.2.1", - "tinyrainbow": "^3.0.3" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "packages/companion-teams/node_modules/@vitest/mocker": { - "version": "4.0.18", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.0.18.tgz", - "integrity": "sha512-HhVd0MDnzzsgevnOWCBj5Otnzobjy5wLBe4EdeeFGv8luMsGcYqDuFRMcttKWZA5vVO8RFjexVovXvAM4JoJDQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/spy": "4.0.18", - "estree-walker": "^3.0.3", - "magic-string": "^0.30.21" - }, - "funding": { - "url": "https://opencollective.com/vitest" - }, - "peerDependencies": { - "msw": "^2.4.9", - "vite": "^6.0.0 || ^7.0.0-0" - }, - "peerDependenciesMeta": { - "msw": { - "optional": true - }, - "vite": { - "optional": true - } - } - }, - "packages/companion-teams/node_modules/@vitest/pretty-format": { - "version": "4.0.18", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.0.18.tgz", - "integrity": "sha512-P24GK3GulZWC5tz87ux0m8OADrQIUVDPIjjj65vBXYG17ZeU3qD7r+MNZ1RNv4l8CGU2vtTRqixrOi9fYk/yKw==", - "dev": true, - "license": "MIT", - "dependencies": { - "tinyrainbow": "^3.0.3" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "packages/companion-teams/node_modules/@vitest/runner": { - "version": "4.0.18", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.0.18.tgz", - "integrity": "sha512-rpk9y12PGa22Jg6g5M3UVVnTS7+zycIGk9ZNGN+m6tZHKQb7jrP7/77WfZy13Y/EUDd52NDsLRQhYKtv7XfPQw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/utils": "4.0.18", - "pathe": "^2.0.3" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "packages/companion-teams/node_modules/@vitest/snapshot": { - "version": "4.0.18", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.0.18.tgz", - "integrity": "sha512-PCiV0rcl7jKQjbgYqjtakly6T1uwv/5BQ9SwBLekVg/EaYeQFPiXcgrC2Y7vDMA8dM1SUEAEV82kgSQIlXNMvA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/pretty-format": "4.0.18", - "magic-string": "^0.30.21", - "pathe": "^2.0.3" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "packages/companion-teams/node_modules/@vitest/spy": { - "version": "4.0.18", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.0.18.tgz", - "integrity": "sha512-cbQt3PTSD7P2OARdVW3qWER5EGq7PHlvE+QfzSC0lbwO+xnt7+XH06ZzFjFRgzUX//JmpxrCu92VdwvEPlWSNw==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "packages/companion-teams/node_modules/@vitest/utils": { - "version": "4.0.18", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.0.18.tgz", - "integrity": "sha512-msMRKLMVLWygpK3u2Hybgi4MNjcYJvwTb0Ru09+fOyCXIgT5raYP041DRRdiJiI3k/2U6SEbAETB3YtBrUkCFA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/pretty-format": "4.0.18", - "tinyrainbow": "^3.0.3" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "packages/companion-teams/node_modules/chai": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/chai/-/chai-6.2.2.tgz", - "integrity": "sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - } - }, - "packages/companion-teams/node_modules/picomatch": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", - "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "packages/companion-teams/node_modules/tinyexec": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.0.2.tgz", - "integrity": "sha512-W/KYk+NFhkmsYpuHq5JykngiOCnxeVL8v8dFnqxSD8qEEdRfXk1SDM6JzNqcERbcGYj9tMrDQBYV9cjgnunFIg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - } - }, - "packages/companion-teams/node_modules/tinyrainbow": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.0.3.tgz", - "integrity": "sha512-PSkbLUoxOFRzJYjjxHJt9xro7D+iilgMX/C9lawzVuYiIdcihh9DXmVibBe8lmcFrRi/VzlPjBxbN7rH24q8/Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14.0.0" - } - }, - "packages/companion-teams/node_modules/undici-types": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz", - "integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==", - "dev": true, - "license": "MIT" - }, - "packages/companion-teams/node_modules/vitest": { - "version": "4.0.18", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.0.18.tgz", - "integrity": "sha512-hOQuK7h0FGKgBAas7v0mSAsnvrIgAvWmRFjmzpJ7SwFHH3g1k2u37JtYwOwmEKhK6ZO3v9ggDBBm0La1LCK4uQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/expect": "4.0.18", - "@vitest/mocker": "4.0.18", - "@vitest/pretty-format": "4.0.18", - "@vitest/runner": "4.0.18", - "@vitest/snapshot": "4.0.18", - "@vitest/spy": "4.0.18", - "@vitest/utils": "4.0.18", - "es-module-lexer": "^1.7.0", - "expect-type": "^1.2.2", - "magic-string": "^0.30.21", - "obug": "^2.1.1", - "pathe": "^2.0.3", - "picomatch": "^4.0.3", - "std-env": "^3.10.0", - "tinybench": "^2.9.0", - "tinyexec": "^1.0.2", - "tinyglobby": "^0.2.15", - "tinyrainbow": "^3.0.3", - "vite": "^6.0.0 || ^7.0.0", - "why-is-node-running": "^2.3.0" - }, - "bin": { - "vitest": "vitest.mjs" - }, - "engines": { - "node": "^20.0.0 || ^22.0.0 || >=24.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - }, - "peerDependencies": { - "@edge-runtime/vm": "*", - "@opentelemetry/api": "^1.9.0", - "@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0", - "@vitest/browser-playwright": "4.0.18", - "@vitest/browser-preview": "4.0.18", - "@vitest/browser-webdriverio": "4.0.18", - "@vitest/ui": "4.0.18", - "happy-dom": "*", - "jsdom": "*" - }, - "peerDependenciesMeta": { - "@edge-runtime/vm": { - "optional": true - }, - "@opentelemetry/api": { - "optional": true - }, - "@types/node": { - "optional": true - }, - "@vitest/browser-playwright": { - "optional": true - }, - "@vitest/browser-preview": { - "optional": true - }, - "@vitest/browser-webdriverio": { - "optional": true - }, - "@vitest/ui": { - "optional": true - }, - "happy-dom": { - "optional": true - }, - "jsdom": { - "optional": true - } - } - }, - "packages/mom": { - "name": "@mariozechner/companion-mom", - "version": "0.56.2", - "extraneous": true, - "license": "MIT", - "dependencies": { - "@anthropic-ai/sandbox-runtime": "^0.0.16", - "@mariozechner/companion-agent-core": "^0.56.2", - "@mariozechner/companion-ai": "^0.56.2", - "@mariozechner/companion-coding-agent": "^0.56.2", - "@sinclair/typebox": "^0.34.0", - "@slack/socket-mode": "^2.0.0", - "@slack/web-api": "^7.0.0", - "chalk": "^5.6.2", - "croner": "^9.1.0", - "diff": "^8.0.2" - }, - "bin": { - "mom": "dist/main.js" - }, - "devDependencies": { - "@types/diff": "^7.0.2", - "@types/node": "^24.3.0", - "typescript": "^5.7.3" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "packages/pods": { - "name": "@mariozechner/companion", - "version": "0.56.2", - "extraneous": true, - "license": "MIT", - "dependencies": { - "@mariozechner/companion-agent-core": "^0.56.2", - "chalk": "^5.5.0" - }, - "bin": { - "companion-pods": "dist/cli.js" - }, - "devDependencies": {}, - "engines": { - "node": ">=20.0.0" - } - }, - "packages/tui": { - "name": "@mariozechner/companion-tui", - "version": "0.56.2", - "license": "MIT", - "dependencies": { - "@types/mime-types": "^2.1.4", - "chalk": "^5.5.0", - "get-east-asian-width": "^1.3.0", - "marked": "^15.0.12", - "mime-types": "^3.0.1" - }, - "devDependencies": { - "@xterm/headless": "^5.5.0", - "@xterm/xterm": "^5.5.0" - }, - "engines": { - "node": ">=20.0.0" - }, - "optionalDependencies": { - "koffi": "^2.9.0" - } - }, - "packages/tui/node_modules/mime-db": { - "version": "1.54.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", - "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "packages/tui/node_modules/mime-types": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz", - "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==", - "license": "MIT", - "dependencies": { - "mime-db": "^1.54.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - } - } -} diff --git a/package.json b/package.json index 2a4474a..ff92055 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,14 @@ { - "name": "companion", + "name": "clanker-agent", "private": true, "type": "module", - "homepage": "https://github.com/getcompanion-ai/co-mono#readme", + "homepage": "https://github.com/harivansh-afk/clanker-agent#readme", "bugs": { - "url": "https://github.com/getcompanion-ai/co-mono/issues" + "url": "https://github.com/harivansh-afk/clanker-agent/issues" }, "repository": { "type": "git", - "url": "git+https://github.com/getcompanion-ai/co-mono.git" + "url": "git+https://github.com/harivansh-afk/clanker-agent.git" }, "workspaces": [ "packages/*" @@ -19,7 +19,7 @@ "dev": "concurrently --names \"ai,agent,coding-agent,tui\" --prefix-colors \"cyan,yellow,red,magenta\" \"cd packages/ai && npm run dev\" \"cd packages/agent && npm run dev\" \"cd packages/coding-agent && npm run dev\" \"cd packages/tui && npm run dev\"", "dev:tsc": "cd packages/ai && npm run dev:tsc", "check": "biome lint --error-on-warnings . && tsgo --noEmit && npm run check:browser-smoke", - "check:browser-smoke": "sh -c 'esbuild scripts/browser-smoke-entry.ts --bundle --platform=browser --format=esm --log-limit=0 --outfile=/tmp/companion-browser-smoke.js > /tmp/companion-browser-smoke-errors.log 2>&1 || { echo \"Browser smoke check failed. See /tmp/companion-browser-smoke-errors.log\"; exit 1; }'", + "check:browser-smoke": "sh -c 'esbuild scripts/browser-smoke-entry.ts --bundle --platform=browser --format=esm --log-limit=0 --outfile=/tmp/clanker-browser-smoke.js > /tmp/clanker-browser-smoke-errors.log 2>&1 || { echo \"Browser smoke check failed. See /tmp/clanker-browser-smoke-errors.log\"; exit 1; }'", "test": "npm run test --workspaces --if-present", "version:patch": "npm version patch -ws --no-git-tag-version && node scripts/sync-versions.js && shx rm -rf node_modules packages/*/node_modules package-lock.json && npm install", "version:minor": "npm version minor -ws --no-git-tag-version && node scripts/sync-versions.js && shx rm -rf node_modules packages/*/node_modules package-lock.json && npm install", @@ -49,7 +49,7 @@ "version": "0.0.3", "dependencies": { "@mariozechner/jiti": "^2.6.5", - "@mariozechner/companion-coding-agent": "^0.30.2", + "@harivansh-afk/clanker-coding-agent": "^0.30.2", "get-east-asian-width": "^1.4.0" }, "overrides": { diff --git a/packages/agent/README.md b/packages/agent/README.md index 1b154a8..4bf65d9 100644 --- a/packages/agent/README.md +++ b/packages/agent/README.md @@ -1,18 +1,18 @@ -# @mariozechner/companion-agent-core +# @mariozechner/clanker-agent-core -Stateful agent with tool execution and event streaming. Built on `@mariozechner/companion-ai`. +Stateful agent with tool execution and event streaming. Built on `@mariozechner/clanker-ai`. ## Installation ```bash -npm install @mariozechner/companion-agent-core +npm install @mariozechner/clanker-agent-core ``` ## Quick Start ```typescript -import { Agent } from "@mariozechner/companion-agent-core"; -import { getModel } from "@mariozechner/companion-ai"; +import { Agent } from "@mariozechner/clanker-agent-core"; +import { getModel } from "@mariozechner/clanker-ai"; const agent = new Agent({ initialState: { @@ -298,7 +298,7 @@ Follow-up messages are checked only when there are no more tool calls and no ste Extend `AgentMessage` via declaration merging: ```typescript -declare module "@mariozechner/companion-agent-core" { +declare module "@mariozechner/clanker-agent-core" { interface CustomAgentMessages { notification: { role: "notification"; text: string; timestamp: number }; } @@ -378,7 +378,7 @@ Thrown errors are caught by the agent and reported to the LLM as tool errors wit For browser apps that proxy through a backend: ```typescript -import { Agent, streamProxy } from "@mariozechner/companion-agent-core"; +import { Agent, streamProxy } from "@mariozechner/clanker-agent-core"; const agent = new Agent({ streamFn: (model, context, options) => @@ -395,7 +395,7 @@ const agent = new Agent({ For direct control without the Agent class: ```typescript -import { agentLoop, agentLoopContinue } from "@mariozechner/companion-agent-core"; +import { agentLoop, agentLoopContinue } from "@mariozechner/clanker-agent-core"; const context: AgentContext = { systemPrompt: "You are helpful.", diff --git a/packages/agent/package.json b/packages/agent/package.json index dd6feb7..81ca21d 100644 --- a/packages/agent/package.json +++ b/packages/agent/package.json @@ -1,5 +1,5 @@ { - "name": "@mariozechner/companion-agent-core", + "name": "@harivansh-afk/clanker-agent-core", "version": "0.56.2", "description": "General-purpose agent with transport abstraction, state management, and attachment support", "type": "module", @@ -17,7 +17,7 @@ "prepublishOnly": "npm run clean && npm run build" }, "dependencies": { - "@mariozechner/companion-ai": "^0.56.2" + "@harivansh-afk/clanker-ai": "^0.56.2" }, "keywords": [ "ai", @@ -30,7 +30,7 @@ "license": "MIT", "repository": { "type": "git", - "url": "git+https://github.com/getcompanion-ai/co-mono.git", + "url": "git+https://github.com/harivansh-afk/clanker-agent.git", "directory": "packages/agent" }, "engines": { diff --git a/packages/agent/src/agent-loop.ts b/packages/agent/src/agent-loop.ts index 74574bf..909aa10 100644 --- a/packages/agent/src/agent-loop.ts +++ b/packages/agent/src/agent-loop.ts @@ -10,7 +10,7 @@ import { streamSimple, type ToolResultMessage, validateToolArguments, -} from "@mariozechner/companion-ai"; +} from "@mariozechner/clanker-ai"; import type { AgentContext, AgentEvent, diff --git a/packages/agent/src/agent.ts b/packages/agent/src/agent.ts index c09b78a..cee56ea 100644 --- a/packages/agent/src/agent.ts +++ b/packages/agent/src/agent.ts @@ -12,7 +12,7 @@ import { type TextContent, type ThinkingBudgets, type Transport, -} from "@mariozechner/companion-ai"; +} from "@mariozechner/clanker-ai"; import { agentLoop, agentLoopContinue } from "./agent-loop.js"; import type { AgentContext, diff --git a/packages/agent/src/proxy.ts b/packages/agent/src/proxy.ts index d349d5a..ead41f2 100644 --- a/packages/agent/src/proxy.ts +++ b/packages/agent/src/proxy.ts @@ -14,7 +14,7 @@ import { type SimpleStreamOptions, type StopReason, type ToolCall, -} from "@mariozechner/companion-ai"; +} from "@mariozechner/clanker-ai"; // Create stream class matching ProxyMessageEventStream class ProxyMessageEventStream extends EventStream< diff --git a/packages/agent/src/types.ts b/packages/agent/src/types.ts index 3a01289..4341fa7 100644 --- a/packages/agent/src/types.ts +++ b/packages/agent/src/types.ts @@ -8,7 +8,7 @@ import type { TextContent, Tool, ToolResultMessage, -} from "@mariozechner/companion-ai"; +} from "@mariozechner/clanker-ai"; import type { Static, TSchema } from "@sinclair/typebox"; /** Stream function - can return sync or Promise for async config lookup */ diff --git a/packages/agent/test/agent-loop.test.ts b/packages/agent/test/agent-loop.test.ts index c921aed..eee0704 100644 --- a/packages/agent/test/agent-loop.test.ts +++ b/packages/agent/test/agent-loop.test.ts @@ -5,7 +5,7 @@ import { type Message, type Model, type UserMessage, -} from "@mariozechner/companion-ai"; +} from "@mariozechner/clanker-ai"; import { Type } from "@sinclair/typebox"; import { describe, expect, it } from "vitest"; import { agentLoop, agentLoopContinue } from "../src/agent-loop.js"; diff --git a/packages/agent/test/agent.test.ts b/packages/agent/test/agent.test.ts index ddc69f2..aa6aeec 100644 --- a/packages/agent/test/agent.test.ts +++ b/packages/agent/test/agent.test.ts @@ -3,7 +3,7 @@ import { type AssistantMessageEvent, EventStream, getModel, -} from "@mariozechner/companion-ai"; +} from "@mariozechner/clanker-ai"; import { describe, expect, it } from "vitest"; import { Agent } from "../src/index.js"; diff --git a/packages/agent/test/bedrock-models.test.ts b/packages/agent/test/bedrock-models.test.ts index 16af64a..036791b 100644 --- a/packages/agent/test/bedrock-models.test.ts +++ b/packages/agent/test/bedrock-models.test.ts @@ -9,7 +9,7 @@ * * You can run this test suite with: * ```bash - * $ AWS_REGION=us-east-1 BEDROCK_EXTENSIVE_MODEL_TEST=1 AWS_PROFILE=companion npm test -- ./test/bedrock-models.test.ts + * $ AWS_REGION=us-east-1 BEDROCK_EXTENSIVE_MODEL_TEST=1 AWS_PROFILE=clanker npm test -- ./test/bedrock-models.test.ts * ``` * * ## Known Issues by Category @@ -21,8 +21,8 @@ * 5. **Invalid Signature Format**: Model validates signature format (Anthropic newer models). */ -import type { AssistantMessage } from "@mariozechner/companion-ai"; -import { getModels } from "@mariozechner/companion-ai"; +import type { AssistantMessage } from "@mariozechner/clanker-ai"; +import { getModels } from "@mariozechner/clanker-ai"; import { describe, expect, it } from "vitest"; import { Agent } from "../src/index.js"; import { hasBedrockCredentials } from "./bedrock-utils.js"; diff --git a/packages/agent/test/e2e.test.ts b/packages/agent/test/e2e.test.ts index 67c96a4..826d80a 100644 --- a/packages/agent/test/e2e.test.ts +++ b/packages/agent/test/e2e.test.ts @@ -3,8 +3,8 @@ import type { Model, ToolResultMessage, UserMessage, -} from "@mariozechner/companion-ai"; -import { getModel } from "@mariozechner/companion-ai"; +} from "@mariozechner/clanker-ai"; +import { getModel } from "@mariozechner/clanker-ai"; import { describe, expect, it } from "vitest"; import { Agent } from "../src/index.js"; import { hasBedrockCredentials } from "./bedrock-utils.js"; diff --git a/packages/ai/README.md b/packages/ai/README.md index c7534c2..324fba7 100644 --- a/packages/ai/README.md +++ b/packages/ai/README.md @@ -1,4 +1,4 @@ -# @mariozechner/companion-ai +# @mariozechner/clanker-ai Unified LLM API with automatic model discovery, provider configuration, token and cost tracking, and simple context persistence and hand-off to other models mid-session. @@ -72,10 +72,10 @@ Unified LLM API with automatic model discovery, provider configuration, token an ## Installation ```bash -npm install @mariozechner/companion-ai +npm install @mariozechner/clanker-ai ``` -TypeBox exports are re-exported from `@mariozechner/companion-ai`: `Type`, `Static`, and `TSchema`. +TypeBox exports are re-exported from `@mariozechner/clanker-ai`: `Type`, `Static`, and `TSchema`. ## Quick Start @@ -88,7 +88,7 @@ import { Context, Tool, StringEnum, -} from "@mariozechner/companion-ai"; +} from "@mariozechner/clanker-ai"; // Fully typed with auto-complete support for both providers and models const model = getModel("openai", "gpt-4o-mini"); @@ -223,7 +223,7 @@ Tools enable LLMs to interact with external systems. This library uses TypeBox s ### Defining Tools ```typescript -import { Type, Tool, StringEnum } from "@mariozechner/companion-ai"; +import { Type, Tool, StringEnum } from "@mariozechner/clanker-ai"; // Define tool parameters with TypeBox const weatherTool: Tool = { @@ -356,7 +356,7 @@ When using `agentLoop`, tool arguments are automatically validated against your When implementing your own tool execution loop with `stream()` or `complete()`, use `validateToolCall` to validate arguments before passing them to your tools: ```typescript -import { stream, validateToolCall, Tool } from "@mariozechner/companion-ai"; +import { stream, validateToolCall, Tool } from "@mariozechner/clanker-ai"; const tools: Tool[] = [weatherTool, calculatorTool]; const s = stream(model, { messages, tools }); @@ -410,7 +410,7 @@ Models with vision capabilities can process images. You can check if a model sup ```typescript import { readFileSync } from "fs"; -import { getModel, complete } from "@mariozechner/companion-ai"; +import { getModel, complete } from "@mariozechner/clanker-ai"; const model = getModel("openai", "gpt-4o-mini"); @@ -449,7 +449,7 @@ Many models support thinking/reasoning capabilities where they can show their in ### Unified Interface (streamSimple/completeSimple) ```typescript -import { getModel, streamSimple, completeSimple } from "@mariozechner/companion-ai"; +import { getModel, streamSimple, completeSimple } from "@mariozechner/clanker-ai"; // Many models across providers support thinking/reasoning const model = getModel("anthropic", "claude-sonnet-4-20250514"); @@ -491,7 +491,7 @@ for (const block of response.content) { For fine-grained control, use the provider-specific options: ```typescript -import { getModel, complete } from "@mariozechner/companion-ai"; +import { getModel, complete } from "@mariozechner/clanker-ai"; // OpenAI Reasoning (o1, o3, gpt-5) const openaiModel = getModel("openai", "gpt-5-mini"); @@ -578,7 +578,7 @@ if (message.stopReason === "error" || message.stopReason === "aborted") { The abort signal allows you to cancel in-progress requests. Aborted requests have `stopReason === 'aborted'`: ```typescript -import { getModel, stream } from "@mariozechner/companion-ai"; +import { getModel, stream } from "@mariozechner/clanker-ai"; const model = getModel("openai", "gpt-4o-mini"); const controller = new AbortController(); @@ -682,7 +682,7 @@ A **provider** offers models through a specific API. For example: ### Querying Providers and Models ```typescript -import { getProviders, getModels, getModel } from "@mariozechner/companion-ai"; +import { getProviders, getModels, getModel } from "@mariozechner/clanker-ai"; // Get all available providers const providers = getProviders(); @@ -708,7 +708,7 @@ console.log(`Using ${model.name} via ${model.api} API`); You can create custom models for local inference servers or custom endpoints: ```typescript -import { Model, stream } from "@mariozechner/companion-ai"; +import { Model, stream } from "@mariozechner/clanker-ai"; // Example: Ollama using OpenAI-compatible API const ollamaModel: Model<"openai-completions"> = { @@ -802,7 +802,7 @@ If `compat` is not set, the library falls back to URL-based detection. If `compa Models are typed by their API, which keeps the model metadata accurate. Provider-specific option types are enforced when you call the provider functions directly. The generic `stream` and `complete` functions accept `StreamOptions` with additional provider fields. ```typescript -import { streamAnthropic, type AnthropicOptions } from "@mariozechner/companion-ai"; +import { streamAnthropic, type AnthropicOptions } from "@mariozechner/clanker-ai"; // TypeScript knows this is an Anthropic model const claude = getModel("anthropic", "claude-sonnet-4-20250514"); @@ -831,7 +831,7 @@ When messages from one provider are sent to a different provider, the library au ### Example: Multi-Provider Conversation ```typescript -import { getModel, complete, Context } from "@mariozechner/companion-ai"; +import { getModel, complete, Context } from "@mariozechner/clanker-ai"; // Start with Claude const claude = getModel("anthropic", "claude-sonnet-4-20250514"); @@ -884,7 +884,7 @@ This enables flexible workflows where you can: The `Context` object can be easily serialized and deserialized using standard JSON methods, making it simple to persist conversations, implement chat history, or transfer contexts between services: ```typescript -import { Context, getModel, complete } from "@mariozechner/companion-ai"; +import { Context, getModel, complete } from "@mariozechner/clanker-ai"; // Create and use a context const context: Context = { @@ -922,7 +922,7 @@ const continuation = await complete(newModel, restored); The library supports browser environments. You must pass the API key explicitly since environment variables are not available in browsers: ```typescript -import { getModel, complete } from "@mariozechner/companion-ai"; +import { getModel, complete } from "@mariozechner/clanker-ai"; // API key must be passed explicitly in browser const model = getModel("anthropic", "claude-3-5-haiku-20241022"); @@ -943,7 +943,7 @@ const response = await complete( ### Browser Compatibility Notes - Amazon Bedrock (`bedrock-converse-stream`) is not supported in browser environments. -- OAuth login flows are not supported in browser environments. Use the `@mariozechner/companion-ai/oauth` entry point in Node.js. +- OAuth login flows are not supported in browser environments. Use the `@mariozechner/clanker-ai/oauth` entry point in Node.js. - In browser builds, Bedrock can still appear in model lists. Calls to Bedrock models fail at runtime. - Use a server-side proxy or backend service if you need Bedrock or OAuth-based auth from a web app. @@ -985,17 +985,17 @@ const response = await complete(model, context, { #### Antigravity Version Override -Set `COMPANION_AI_ANTIGRAVITY_VERSION` to override the Antigravity User-Agent version when Google updates their requirements: +Set `CLANKER_AI_ANTIGRAVITY_VERSION` to override the Antigravity User-Agent version when Google updates their requirements: ```bash -export COMPANION_AI_ANTIGRAVITY_VERSION="1.23.0" +export CLANKER_AI_ANTIGRAVITY_VERSION="1.23.0" ``` #### Cache Retention -Set `COMPANION_CACHE_RETENTION=long` to extend prompt cache retention: +Set `CLANKER_CACHE_RETENTION=long` to extend prompt cache retention: -| Provider | Default | With `COMPANION_CACHE_RETENTION=long` | +| Provider | Default | With `CLANKER_CACHE_RETENTION=long` | | --------- | --------- | ------------------------------ | | Anthropic | 5 minutes | 1 hour | | OpenAI | in-memory | 24 hours | @@ -1007,7 +1007,7 @@ This only affects direct API calls to `api.anthropic.com` and `api.openai.com`. ### Checking Environment Variables ```typescript -import { getEnvApiKey } from "@mariozechner/companion-ai"; +import { getEnvApiKey } from "@mariozechner/clanker-ai"; // Check if an API key is set in environment variables const key = getEnvApiKey("openai"); // checks OPENAI_API_KEY @@ -1047,7 +1047,7 @@ export GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account.json" ``` ```typescript -import { getModel, complete } from "@mariozechner/companion-ai"; +import { getModel, complete } from "@mariozechner/clanker-ai"; (async () => { const model = getModel("google-vertex", "gemini-2.5-flash"); @@ -1068,16 +1068,16 @@ Official docs: [Application Default Credentials](https://cloud.google.com/docs/a The quickest way to authenticate: ```bash -npx @mariozechner/companion-ai login # interactive provider selection -npx @mariozechner/companion-ai login anthropic # login to specific provider -npx @mariozechner/companion-ai list # list available providers +npx @mariozechner/clanker-ai login # interactive provider selection +npx @mariozechner/clanker-ai login anthropic # login to specific provider +npx @mariozechner/clanker-ai list # list available providers ``` Credentials are saved to `auth.json` in the current directory. ### Programmatic OAuth -The library provides login and token refresh functions via the `@mariozechner/companion-ai/oauth` entry point. Credential storage is the caller's responsibility. +The library provides login and token refresh functions via the `@mariozechner/clanker-ai/oauth` entry point. Credential storage is the caller's responsibility. ```typescript import { @@ -1095,13 +1095,13 @@ import { // Types type OAuthProvider, // 'anthropic' | 'openai-codex' | 'github-copilot' | 'google-gemini-cli' | 'google-antigravity' type OAuthCredentials, -} from "@mariozechner/companion-ai/oauth"; +} from "@mariozechner/clanker-ai/oauth"; ``` ### Login Flow Example ```typescript -import { loginGitHubCopilot } from "@mariozechner/companion-ai/oauth"; +import { loginGitHubCopilot } from "@mariozechner/clanker-ai/oauth"; import { writeFileSync } from "fs"; const credentials = await loginGitHubCopilot({ @@ -1125,8 +1125,8 @@ writeFileSync("auth.json", JSON.stringify(auth, null, 2)); Use `getOAuthApiKey()` to get an API key, automatically refreshing if expired: ```typescript -import { getModel, complete } from "@mariozechner/companion-ai"; -import { getOAuthApiKey } from "@mariozechner/companion-ai/oauth"; +import { getModel, complete } from "@mariozechner/clanker-ai"; +import { getOAuthApiKey } from "@mariozechner/clanker-ai/oauth"; import { readFileSync, writeFileSync } from "fs"; // Load your stored credentials diff --git a/packages/ai/package.json b/packages/ai/package.json index d7def42..7d9807b 100644 --- a/packages/ai/package.json +++ b/packages/ai/package.json @@ -1,5 +1,5 @@ { - "name": "@mariozechner/companion-ai", + "name": "@harivansh-afk/clanker-ai", "version": "0.56.2", "description": "Unified LLM API with automatic model discovery and provider configuration", "type": "module", @@ -20,7 +20,7 @@ } }, "bin": { - "companion-ai": "./dist/cli.js" + "clanker-ai": "./dist/cli.js" }, "files": [ "dist", @@ -66,7 +66,7 @@ "license": "MIT", "repository": { "type": "git", - "url": "git+https://github.com/getcompanion-ai/co-mono.git", + "url": "git+https://github.com/harivansh-afk/clanker-agent.git", "directory": "packages/ai" }, "engines": { diff --git a/packages/ai/src/cli.ts b/packages/ai/src/cli.ts index 29de43b..8480c0e 100644 --- a/packages/ai/src/cli.ts +++ b/packages/ai/src/cli.ts @@ -78,7 +78,7 @@ async function main(): Promise { const providerList = PROVIDERS.map( (p) => ` ${p.id.padEnd(20)} ${p.name}`, ).join("\n"); - console.log(`Usage: npx @mariozechner/companion-ai [provider] + console.log(`Usage: npx @mariozechner/clanker-ai [provider] Commands: login [provider] Login to an OAuth provider @@ -88,9 +88,9 @@ Providers: ${providerList} Examples: - npx @mariozechner/companion-ai login # interactive provider selection - npx @mariozechner/companion-ai login anthropic # login to specific provider - npx @mariozechner/companion-ai list # list providers + npx @mariozechner/clanker-ai login # interactive provider selection + npx @mariozechner/clanker-ai login anthropic # login to specific provider + npx @mariozechner/clanker-ai list # list providers `); return; } @@ -131,7 +131,7 @@ Examples: if (!PROVIDERS.some((p) => p.id === provider)) { console.error(`Unknown provider: ${provider}`); console.error( - `Use 'npx @mariozechner/companion-ai list' to see available providers`, + `Use 'npx @mariozechner/clanker-ai list' to see available providers`, ); process.exit(1); } @@ -142,7 +142,7 @@ Examples: } console.error(`Unknown command: ${command}`); - console.error(`Use 'npx @mariozechner/companion-ai --help' for usage`); + console.error(`Use 'npx @mariozechner/clanker-ai --help' for usage`); process.exit(1); } diff --git a/packages/ai/src/providers/amazon-bedrock.ts b/packages/ai/src/providers/amazon-bedrock.ts index d8157b6..2ec4d74 100644 --- a/packages/ai/src/providers/amazon-bedrock.ts +++ b/packages/ai/src/providers/amazon-bedrock.ts @@ -514,7 +514,7 @@ function mapThinkingLevelToEffort( /** * Resolve cache retention preference. - * Defaults to "short" and uses COMPANION_CACHE_RETENTION for backward compatibility. + * Defaults to "short" and uses CLANKER_CACHE_RETENTION for backward compatibility. */ function resolveCacheRetention( cacheRetention?: CacheRetention, @@ -524,7 +524,7 @@ function resolveCacheRetention( } if ( typeof process !== "undefined" && - process.env.COMPANION_CACHE_RETENTION === "long" + process.env.CLANKER_CACHE_RETENTION === "long" ) { return "long"; } diff --git a/packages/ai/src/providers/anthropic.ts b/packages/ai/src/providers/anthropic.ts index 55a8c5b..aae02ba 100644 --- a/packages/ai/src/providers/anthropic.ts +++ b/packages/ai/src/providers/anthropic.ts @@ -40,7 +40,7 @@ import { transformMessages } from "./transform-messages.js"; /** * Resolve cache retention preference. - * Defaults to "short" and uses COMPANION_CACHE_RETENTION for backward compatibility. + * Defaults to "short" and uses CLANKER_CACHE_RETENTION for backward compatibility. */ function resolveCacheRetention( cacheRetention?: CacheRetention, @@ -50,7 +50,7 @@ function resolveCacheRetention( } if ( typeof process !== "undefined" && - process.env.COMPANION_CACHE_RETENTION === "long" + process.env.CLANKER_CACHE_RETENTION === "long" ) { return "long"; } diff --git a/packages/ai/src/providers/google-gemini-cli.ts b/packages/ai/src/providers/google-gemini-cli.ts index 50ad4f3..a72b13c 100644 --- a/packages/ai/src/providers/google-gemini-cli.ts +++ b/packages/ai/src/providers/google-gemini-cli.ts @@ -88,7 +88,7 @@ const DEFAULT_ANTIGRAVITY_VERSION = "1.18.3"; function getAntigravityHeaders() { const version = - process.env.COMPANION_AI_ANTIGRAVITY_VERSION || DEFAULT_ANTIGRAVITY_VERSION; + process.env.CLANKER_AI_ANTIGRAVITY_VERSION || DEFAULT_ANTIGRAVITY_VERSION; return { "User-Agent": `antigravity/${version} darwin/arm64`, }; @@ -1040,8 +1040,8 @@ export function buildRequest( model: model.id, request, ...(isAntigravity ? { requestType: "agent" } : {}), - userAgent: isAntigravity ? "antigravity" : "companion-coding-agent", - requestId: `${isAntigravity ? "agent" : "companion"}-${Date.now()}-${Math.random().toString(36).slice(2, 11)}`, + userAgent: isAntigravity ? "antigravity" : "clanker-coding-agent", + requestId: `${isAntigravity ? "agent" : "clanker"}-${Date.now()}-${Math.random().toString(36).slice(2, 11)}`, }; } diff --git a/packages/ai/src/providers/openai-codex-responses.ts b/packages/ai/src/providers/openai-codex-responses.ts index 31bac49..d33939c 100644 --- a/packages/ai/src/providers/openai-codex-responses.ts +++ b/packages/ai/src/providers/openai-codex-responses.ts @@ -997,10 +997,10 @@ function buildHeaders( headers.set("Authorization", `Bearer ${token}`); headers.set("chatgpt-account-id", accountId); headers.set("OpenAI-Beta", "responses=experimental"); - headers.set("originator", "companion"); + headers.set("originator", "clanker"); const userAgent = _os - ? `companion (${_os.platform()} ${_os.release()}; ${_os.arch()})` - : "companion (browser)"; + ? `clanker (${_os.platform()} ${_os.release()}; ${_os.arch()})` + : "clanker (browser)"; headers.set("User-Agent", userAgent); headers.set("accept", "text/event-stream"); headers.set("content-type", "application/json"); diff --git a/packages/ai/src/providers/openai-responses.ts b/packages/ai/src/providers/openai-responses.ts index 98ea7e4..b4ad87f 100644 --- a/packages/ai/src/providers/openai-responses.ts +++ b/packages/ai/src/providers/openai-responses.ts @@ -33,7 +33,7 @@ const OPENAI_TOOL_CALL_PROVIDERS = new Set([ /** * Resolve cache retention preference. - * Defaults to "short" and uses COMPANION_CACHE_RETENTION for backward compatibility. + * Defaults to "short" and uses CLANKER_CACHE_RETENTION for backward compatibility. */ function resolveCacheRetention( cacheRetention?: CacheRetention, @@ -43,7 +43,7 @@ function resolveCacheRetention( } if ( typeof process !== "undefined" && - process.env.COMPANION_CACHE_RETENTION === "long" + process.env.CLANKER_CACHE_RETENTION === "long" ) { return "long"; } diff --git a/packages/ai/src/types.ts b/packages/ai/src/types.ts index e3a472f..303abc3 100644 --- a/packages/ai/src/types.ts +++ b/packages/ai/src/types.ts @@ -283,7 +283,7 @@ export interface OpenAICompletionsCompat { supportsDeveloperRole?: boolean; /** Whether the provider supports `reasoning_effort`. Default: auto-detected from URL. */ supportsReasoningEffort?: boolean; - /** Optional mapping from companion-ai reasoning levels to provider/model-specific `reasoning_effort` values. */ + /** Optional mapping from clanker-ai reasoning levels to provider/model-specific `reasoning_effort` values. */ reasoningEffortMap?: Partial>; /** Whether the provider supports `stream_options: { include_usage: true }` for token usage in streaming responses. Default: true. */ supportsUsageInStreaming?: boolean; diff --git a/packages/ai/src/utils/oauth/openai-codex.ts b/packages/ai/src/utils/oauth/openai-codex.ts index 86a26b6..ddb9716 100644 --- a/packages/ai/src/utils/oauth/openai-codex.ts +++ b/packages/ai/src/utils/oauth/openai-codex.ts @@ -216,7 +216,7 @@ async function refreshAccessToken(refreshToken: string): Promise { } async function createAuthorizationFlow( - originator: string = "companion", + originator: string = "clanker", ): Promise<{ verifier: string; state: string; url: string }> { const { verifier, challenge } = await generatePKCE(); const state = createState(); @@ -337,7 +337,7 @@ function getAccountId(accessToken: string): string | null { * @param options.onManualCodeInput - Optional promise that resolves with user-pasted code. * Races with browser callback - whichever completes first wins. * Useful for showing paste input immediately alongside browser flow. - * @param options.originator - OAuth originator parameter (defaults to "companion") + * @param options.originator - OAuth originator parameter (defaults to "clanker") */ export async function loginOpenAICodex(options: { onAuth: (info: { url: string; instructions?: string }) => void; diff --git a/packages/ai/test/anthropic-tool-name-normalization.test.ts b/packages/ai/test/anthropic-tool-name-normalization.test.ts index 8619f2a..c9f00f6 100644 --- a/packages/ai/test/anthropic-tool-name-normalization.test.ts +++ b/packages/ai/test/anthropic-tool-name-normalization.test.ts @@ -71,8 +71,8 @@ describe.skipIf(!oauthToken)("Anthropic OAuth tool name normalization", () => { expect(toolCallName).toBe("todowrite"); }); - it("should handle companion's built-in tools (read, write, edit, bash)", async () => { - // Companion's tools use lowercase names, CC uses PascalCase + it("should handle clanker's built-in tools (read, write, edit, bash)", async () => { + // Clanker's tools use lowercase names, CC uses PascalCase const readTool: Tool = { name: "read", description: "Read a file", @@ -116,7 +116,7 @@ describe.skipIf(!oauthToken)("Anthropic OAuth tool name normalization", () => { }); it("should NOT map find to Glob - find is not a CC tool name", async () => { - // Companion has a "find" tool, CC has "Glob" - these are DIFFERENT tools + // Clanker has a "find" tool, CC has "Glob" - these are DIFFERENT tools // The old code incorrectly mapped find -> Glob, which broke the round-trip // because there's no tool named "glob" in context.tools const findTool: Tool = { diff --git a/packages/ai/test/cache-retention.test.ts b/packages/ai/test/cache-retention.test.ts index be16ec0..7d37232 100644 --- a/packages/ai/test/cache-retention.test.ts +++ b/packages/ai/test/cache-retention.test.ts @@ -3,18 +3,18 @@ import { getModel } from "../src/models.js"; import { stream } from "../src/stream.js"; import type { Context } from "../src/types.js"; -describe("Cache Retention (COMPANION_CACHE_RETENTION)", () => { - const originalEnv = process.env.COMPANION_CACHE_RETENTION; +describe("Cache Retention (CLANKER_CACHE_RETENTION)", () => { + const originalEnv = process.env.CLANKER_CACHE_RETENTION; beforeEach(() => { - delete process.env.COMPANION_CACHE_RETENTION; + delete process.env.CLANKER_CACHE_RETENTION; }); afterEach(() => { if (originalEnv !== undefined) { - process.env.COMPANION_CACHE_RETENTION = originalEnv; + process.env.CLANKER_CACHE_RETENTION = originalEnv; } else { - delete process.env.COMPANION_CACHE_RETENTION; + delete process.env.CLANKER_CACHE_RETENTION; } }); @@ -25,7 +25,7 @@ describe("Cache Retention (COMPANION_CACHE_RETENTION)", () => { describe("Anthropic Provider", () => { it.skipIf(!process.env.ANTHROPIC_API_KEY)( - "should use default cache TTL (no ttl field) when COMPANION_CACHE_RETENTION is not set", + "should use default cache TTL (no ttl field) when CLANKER_CACHE_RETENTION is not set", async () => { const model = getModel("anthropic", "claude-3-5-haiku-20241022"); let capturedPayload: any = null; @@ -51,9 +51,9 @@ describe("Cache Retention (COMPANION_CACHE_RETENTION)", () => { ); it.skipIf(!process.env.ANTHROPIC_API_KEY)( - "should use 1h cache TTL when COMPANION_CACHE_RETENTION=long", + "should use 1h cache TTL when CLANKER_CACHE_RETENTION=long", async () => { - process.env.COMPANION_CACHE_RETENTION = "long"; + process.env.CLANKER_CACHE_RETENTION = "long"; const model = getModel("anthropic", "claude-3-5-haiku-20241022"); let capturedPayload: any = null; @@ -79,7 +79,7 @@ describe("Cache Retention (COMPANION_CACHE_RETENTION)", () => { ); it("should not add ttl when baseUrl is not api.anthropic.com", async () => { - process.env.COMPANION_CACHE_RETENTION = "long"; + process.env.CLANKER_CACHE_RETENTION = "long"; // Create a model with a different baseUrl (simulating a proxy) const baseModel = getModel("anthropic", "claude-3-5-haiku-20241022"); @@ -210,7 +210,7 @@ describe("Cache Retention (COMPANION_CACHE_RETENTION)", () => { describe("OpenAI Responses Provider", () => { it.skipIf(!process.env.OPENAI_API_KEY)( - "should not set prompt_cache_retention when COMPANION_CACHE_RETENTION is not set", + "should not set prompt_cache_retention when CLANKER_CACHE_RETENTION is not set", async () => { const model = getModel("openai", "gpt-4o-mini"); let capturedPayload: any = null; @@ -232,9 +232,9 @@ describe("Cache Retention (COMPANION_CACHE_RETENTION)", () => { ); it.skipIf(!process.env.OPENAI_API_KEY)( - "should set prompt_cache_retention to 24h when COMPANION_CACHE_RETENTION=long", + "should set prompt_cache_retention to 24h when CLANKER_CACHE_RETENTION=long", async () => { - process.env.COMPANION_CACHE_RETENTION = "long"; + process.env.CLANKER_CACHE_RETENTION = "long"; const model = getModel("openai", "gpt-4o-mini"); let capturedPayload: any = null; @@ -255,7 +255,7 @@ describe("Cache Retention (COMPANION_CACHE_RETENTION)", () => { ); it("should not set prompt_cache_retention when baseUrl is not api.openai.com", async () => { - process.env.COMPANION_CACHE_RETENTION = "long"; + process.env.CLANKER_CACHE_RETENTION = "long"; // Create a model with a different baseUrl (simulating a proxy) const baseModel = getModel("openai", "gpt-4o-mini"); diff --git a/packages/ai/test/context-overflow.test.ts b/packages/ai/test/context-overflow.test.ts index 7af1f6d..5decec2 100644 --- a/packages/ai/test/context-overflow.test.ts +++ b/packages/ai/test/context-overflow.test.ts @@ -683,7 +683,7 @@ describe("Context overflow error handling", () => { // Check if ollama is installed and local LLM tests are enabled let ollamaInstalled = false; - if (!process.env.COMPANION_NO_LOCAL_LLM) { + if (!process.env.CLANKER_NO_LOCAL_LLM) { try { execSync("which ollama", { stdio: "ignore" }); ollamaInstalled = true; @@ -785,7 +785,7 @@ describe("Context overflow error handling", () => { // ============================================================================= let lmStudioRunning = false; - if (!process.env.COMPANION_NO_LOCAL_LLM) { + if (!process.env.CLANKER_NO_LOCAL_LLM) { try { execSync( "curl -s --max-time 1 http://localhost:1234/v1/models > /dev/null", diff --git a/packages/ai/test/cross-provider-handoff.test.ts b/packages/ai/test/cross-provider-handoff.test.ts index 277e773..939444b 100644 --- a/packages/ai/test/cross-provider-handoff.test.ts +++ b/packages/ai/test/cross-provider-handoff.test.ts @@ -227,7 +227,7 @@ function dumpFailurePayload(params: { payload?: unknown; messages: Message[]; }): void { - const filename = `/tmp/companion-handoff-${params.label}-${Date.now()}.json`; + const filename = `/tmp/clanker-handoff-${params.label}-${Date.now()}.json`; const body = { label: params.label, error: params.error, diff --git a/packages/ai/test/empty.test.ts b/packages/ai/test/empty.test.ts index ed6394b..44db8f8 100644 --- a/packages/ai/test/empty.test.ts +++ b/packages/ai/test/empty.test.ts @@ -765,7 +765,7 @@ describe("AI Providers Empty Message Tests", () => { ); // ========================================================================= - // OAuth-based providers (credentials from ~/.companion/agent/oauth.json) + // OAuth-based providers (credentials from ~/.clanker/agent/oauth.json) // ========================================================================= describe("Anthropic OAuth Provider Empty Messages", () => { diff --git a/packages/ai/test/image-tool-result.test.ts b/packages/ai/test/image-tool-result.test.ts index 7bb1f35..423af75 100644 --- a/packages/ai/test/image-tool-result.test.ts +++ b/packages/ai/test/image-tool-result.test.ts @@ -476,7 +476,7 @@ describe("Tool Results with Images", () => { ); // ========================================================================= - // OAuth-based providers (credentials from ~/.companion/agent/oauth.json) + // OAuth-based providers (credentials from ~/.clanker/agent/oauth.json) // ========================================================================= describe("Anthropic OAuth Provider (claude-sonnet-4-5)", () => { @@ -584,7 +584,7 @@ describe("Tool Results with Images", () => { }, ); - /** These two don't work, the model simply won't call the tool, works in companion + /** These two don't work, the model simply won't call the tool, works in clanker it.skipIf(!antigravityToken)( "claude-sonnet-4-5 - should handle tool result with only image", { retry: 3, timeout: 30000 }, diff --git a/packages/ai/test/oauth.ts b/packages/ai/test/oauth.ts index 2889f96..b5f4f39 100644 --- a/packages/ai/test/oauth.ts +++ b/packages/ai/test/oauth.ts @@ -1,5 +1,5 @@ /** - * Test helper for resolving API keys from ~/.companion/agent/auth.json + * Test helper for resolving API keys from ~/.clanker/agent/auth.json * * Supports both API key and OAuth credentials. * OAuth tokens are automatically refreshed if expired and saved back to auth.json. @@ -20,7 +20,7 @@ import type { OAuthProvider, } from "../src/utils/oauth/types.js"; -const AUTH_PATH = join(homedir(), ".companion", "agent", "auth.json"); +const AUTH_PATH = join(homedir(), ".clanker", "agent", "auth.json"); type ApiKeyCredential = { type: "api_key"; @@ -57,7 +57,7 @@ function saveAuthStorage(storage: AuthStorage): void { } /** - * Resolve API key for a provider from ~/.companion/agent/auth.json + * Resolve API key for a provider from ~/.clanker/agent/auth.json * * For API key credentials, returns the key directly. * For OAuth credentials, returns the access token (refreshing if expired and saving back). diff --git a/packages/ai/test/openai-codex-stream.test.ts b/packages/ai/test/openai-codex-stream.test.ts index a35f3e5..f1aca19 100644 --- a/packages/ai/test/openai-codex-stream.test.ts +++ b/packages/ai/test/openai-codex-stream.test.ts @@ -6,22 +6,22 @@ import { streamOpenAICodexResponses } from "../src/providers/openai-codex-respon import type { Context, Model } from "../src/types.js"; const originalFetch = global.fetch; -const originalAgentDir = process.env.COMPANION_CODING_AGENT_DIR; +const originalAgentDir = process.env.CLANKER_CODING_AGENT_DIR; afterEach(() => { global.fetch = originalFetch; if (originalAgentDir === undefined) { - delete process.env.COMPANION_CODING_AGENT_DIR; + delete process.env.CLANKER_CODING_AGENT_DIR; } else { - process.env.COMPANION_CODING_AGENT_DIR = originalAgentDir; + process.env.CLANKER_CODING_AGENT_DIR = originalAgentDir; } vi.restoreAllMocks(); }); describe("openai-codex streaming", () => { it("streams SSE responses into AssistantMessageEventStream", async () => { - const tempDir = mkdtempSync(join(tmpdir(), "companion-codex-stream-")); - process.env.COMPANION_CODING_AGENT_DIR = tempDir; + const tempDir = mkdtempSync(join(tmpdir(), "clanker-codex-stream-")); + process.env.CLANKER_CODING_AGENT_DIR = tempDir; const payload = Buffer.from( JSON.stringify({ @@ -95,7 +95,7 @@ describe("openai-codex streaming", () => { expect(headers?.get("Authorization")).toBe(`Bearer ${token}`); expect(headers?.get("chatgpt-account-id")).toBe("acc_test"); expect(headers?.get("OpenAI-Beta")).toBe("responses=experimental"); - expect(headers?.get("originator")).toBe("companion"); + expect(headers?.get("originator")).toBe("clanker"); expect(headers?.get("accept")).toBe("text/event-stream"); expect(headers?.has("x-api-key")).toBe(false); return new Response(stream, { @@ -149,8 +149,8 @@ describe("openai-codex streaming", () => { }); it("sets conversation_id/session_id headers and prompt_cache_key when sessionId is provided", async () => { - const tempDir = mkdtempSync(join(tmpdir(), "companion-codex-stream-")); - process.env.COMPANION_CODING_AGENT_DIR = tempDir; + const tempDir = mkdtempSync(join(tmpdir(), "clanker-codex-stream-")); + process.env.CLANKER_CODING_AGENT_DIR = tempDir; const payload = Buffer.from( JSON.stringify({ @@ -272,8 +272,8 @@ describe("openai-codex streaming", () => { it.each(["gpt-5.3-codex", "gpt-5.4"])( "clamps %s minimal reasoning effort to low", async (modelId) => { - const tempDir = mkdtempSync(join(tmpdir(), "companion-codex-stream-")); - process.env.COMPANION_CODING_AGENT_DIR = tempDir; + const tempDir = mkdtempSync(join(tmpdir(), "clanker-codex-stream-")); + process.env.CLANKER_CODING_AGENT_DIR = tempDir; const payload = Buffer.from( JSON.stringify({ @@ -393,8 +393,8 @@ describe("openai-codex streaming", () => { ); it("does not set conversation_id/session_id headers when sessionId is not provided", async () => { - const tempDir = mkdtempSync(join(tmpdir(), "companion-codex-stream-")); - process.env.COMPANION_CODING_AGENT_DIR = tempDir; + const tempDir = mkdtempSync(join(tmpdir(), "clanker-codex-stream-")); + process.env.CLANKER_CODING_AGENT_DIR = tempDir; const payload = Buffer.from( JSON.stringify({ diff --git a/packages/ai/test/stream.test.ts b/packages/ai/test/stream.test.ts index 700413d..8ea4ca1 100644 --- a/packages/ai/test/stream.test.ts +++ b/packages/ai/test/stream.test.ts @@ -1048,7 +1048,7 @@ describe("Generate E2E Tests", () => { ); // ========================================================================= - // OAuth-based providers (credentials from ~/.companion/agent/oauth.json) + // OAuth-based providers (credentials from ~/.clanker/agent/oauth.json) // Tokens are resolved at module level (see oauthTokens above) // ========================================================================= @@ -1800,7 +1800,7 @@ describe("Generate E2E Tests", () => { // Check if ollama is installed and local LLM tests are enabled let ollamaInstalled = false; - if (!process.env.COMPANION_NO_LOCAL_LLM) { + if (!process.env.CLANKER_NO_LOCAL_LLM) { try { execSync("which ollama", { stdio: "ignore" }); ollamaInstalled = true; diff --git a/packages/ai/test/tokens.test.ts b/packages/ai/test/tokens.test.ts index 02c80c9..acd39b7 100644 --- a/packages/ai/test/tokens.test.ts +++ b/packages/ai/test/tokens.test.ts @@ -294,7 +294,7 @@ describe("Token Statistics on Abort", () => { ); // ========================================================================= - // OAuth-based providers (credentials from ~/.companion/agent/oauth.json) + // OAuth-based providers (credentials from ~/.clanker/agent/oauth.json) // ========================================================================= describe("Anthropic OAuth Provider", () => { diff --git a/packages/ai/test/tool-call-id-normalization.test.ts b/packages/ai/test/tool-call-id-normalization.test.ts index 33a47a1..ef49281 100644 --- a/packages/ai/test/tool-call-id-normalization.test.ts +++ b/packages/ai/test/tool-call-id-normalization.test.ts @@ -7,7 +7,7 @@ * OpenAI Responses API generates IDs in format: {call_id}|{id} * where {id} can be 400+ chars with special characters (+, /, =). * - * Regression test for: https://github.com/badlogic/companion-mono/issues/1022 + * Regression test for: https://github.com/badlogic/clanker-mono/issues/1022 */ import { Type } from "@sinclair/typebox"; diff --git a/packages/ai/test/tool-call-without-result.test.ts b/packages/ai/test/tool-call-without-result.test.ts index 6f26fe7..1e8d950 100644 --- a/packages/ai/test/tool-call-without-result.test.ts +++ b/packages/ai/test/tool-call-without-result.test.ts @@ -324,7 +324,7 @@ describe("Tool Call Without Result Tests", () => { }); // ========================================================================= - // OAuth-based providers (credentials from ~/.companion/agent/oauth.json) + // OAuth-based providers (credentials from ~/.clanker/agent/oauth.json) // ========================================================================= describe("Anthropic OAuth Provider", () => { diff --git a/packages/ai/test/unicode-surrogate.test.ts b/packages/ai/test/unicode-surrogate.test.ts index 7642cb2..1779d4c 100644 --- a/packages/ai/test/unicode-surrogate.test.ts +++ b/packages/ai/test/unicode-surrogate.test.ts @@ -472,7 +472,7 @@ describe("AI Providers Unicode Surrogate Pair Tests", () => { ); // ========================================================================= - // OAuth-based providers (credentials from ~/.companion/agent/oauth.json) + // OAuth-based providers (credentials from ~/.clanker/agent/oauth.json) // ========================================================================= describe("Anthropic OAuth Provider Unicode Handling", () => { diff --git a/packages/companion-channels/CHANGELOG.md b/packages/clanker-channels/CHANGELOG.md similarity index 100% rename from packages/companion-channels/CHANGELOG.md rename to packages/clanker-channels/CHANGELOG.md diff --git a/packages/companion-channels/LICENSE b/packages/clanker-channels/LICENSE similarity index 100% rename from packages/companion-channels/LICENSE rename to packages/clanker-channels/LICENSE diff --git a/packages/companion-channels/README.md b/packages/clanker-channels/README.md similarity index 92% rename from packages/companion-channels/README.md rename to packages/clanker-channels/README.md index 0b94743..d9636db 100644 --- a/packages/companion-channels/README.md +++ b/packages/clanker-channels/README.md @@ -1,6 +1,6 @@ -# @e9n/companion-channels +# @e9n/clanker-channels -Two-way channel extension for [companion](https://github.com/espennilsen/companion) — route messages between agents and Telegram, Slack, webhooks, or custom adapters. +Two-way channel extension for [clanker](https://github.com/espennilsen/clanker) — route messages between agents and Telegram, Slack, webhooks, or custom adapters. ## Features @@ -13,11 +13,11 @@ Two-way channel extension for [companion](https://github.com/espennilsen/compani ## Settings -Add to `~/.companion/agent/settings.json` or `.companion/settings.json`: +Add to `~/.clanker/agent/settings.json` or `.clanker/settings.json`: ```json { - "companion-channels": { + "clanker-channels": { "adapters": { "telegram": { "type": "telegram", @@ -81,7 +81,7 @@ Use `"env:VAR_NAME"` to reference environment variables. Project settings overri ## Install ```bash -companion install npm:@e9n/companion-channels +clanker install npm:@e9n/clanker-channels ``` ## License diff --git a/packages/companion-channels/package.json b/packages/clanker-channels/package.json similarity index 56% rename from packages/companion-channels/package.json rename to packages/clanker-channels/package.json index c3c8953..e0d6fc8 100644 --- a/packages/companion-channels/package.json +++ b/packages/clanker-channels/package.json @@ -1,14 +1,14 @@ { - "name": "@e9n/companion-channels", + "name": "@harivansh-afk/clanker-channels", "version": "0.1.0", - "description": "Two-way channel extension for companion — route messages between agents and Telegram, webhooks, and custom adapters", + "description": "Two-way channel extension for clanker - route messages between agents and Telegram, webhooks, and custom adapters", "type": "module", "keywords": [ - "companion-package" + "clanker-package" ], "license": "MIT", "author": "Espen Nilsen ", - "companion": { + "clanker": { "extensions": [ "./src/index.ts" ] @@ -18,8 +18,8 @@ "typescript": "^5.0.0" }, "peerDependencies": { - "@mariozechner/companion-ai": "*", - "@mariozechner/companion-coding-agent": "*", + "@harivansh-afk/clanker-ai": "*", + "@harivansh-afk/clanker-coding-agent": "*", "@sinclair/typebox": "*" }, "dependencies": { @@ -34,7 +34,7 @@ ], "repository": { "type": "git", - "url": "git+https://github.com/espennilsen/companion.git", - "directory": "extensions/companion-channels" + "url": "git+https://github.com/harivansh-afk/clanker-agent.git", + "directory": "packages/clanker-channels" } } diff --git a/packages/companion-channels/src/adapters/slack.ts b/packages/clanker-channels/src/adapters/slack.ts similarity index 96% rename from packages/companion-channels/src/adapters/slack.ts rename to packages/clanker-channels/src/adapters/slack.ts index 1efa3d3..cfe16ed 100644 --- a/packages/companion-channels/src/adapters/slack.ts +++ b/packages/clanker-channels/src/adapters/slack.ts @@ -1,5 +1,5 @@ /** - * companion-channels — Built-in Slack adapter (bidirectional). + * clanker-channels — Built-in Slack adapter (bidirectional). * * Outgoing: Slack Web API chat.postMessage. * Incoming: Socket Mode (WebSocket) for events + slash commands. @@ -14,13 +14,13 @@ * - Channel allowlisting (optional) * * Requires: - * - App-level token (xapp-...) for Socket Mode — in settings under companion-channels.slack.appToken - * - Bot token (xoxb-...) for Web API — in settings under companion-channels.slack.botToken + * - App-level token (xapp-...) for Socket Mode — in settings under clanker-channels.slack.appToken + * - Bot token (xoxb-...) for Web API — in settings under clanker-channels.slack.botToken * - Socket Mode enabled in app settings * - * Config in ~/.companion/agent/settings.json: + * Config in ~/.clanker/agent/settings.json: * { - * "companion-channels": { + * "clanker-channels": { * "adapters": { * "slack": { * "type": "slack", @@ -95,7 +95,7 @@ export function createSlackAdapter( cwd?: string, log?: SlackAdapterLogger, ): ChannelAdapter { - // Tokens live in settings under companion-channels.slack (not in the adapter config block) + // Tokens live in settings under clanker-channels.slack (not in the adapter config block) const appToken = (cwd ? (getChannelSetting(cwd, "slack.appToken") as string) : null) ?? (config.appToken as string); @@ -109,11 +109,11 @@ export function createSlackAdapter( if (!appToken) throw new Error( - "Slack adapter requires appToken (xapp-...) in settings under companion-channels.slack.appToken", + "Slack adapter requires appToken (xapp-...) in settings under clanker-channels.slack.appToken", ); if (!botToken) throw new Error( - "Slack adapter requires botToken (xoxb-...) in settings under companion-channels.slack.botToken", + "Slack adapter requires botToken (xoxb-...) in settings under clanker-channels.slack.botToken", ); let socketClient: SocketModeClient | null = null; diff --git a/packages/companion-channels/src/adapters/telegram.ts b/packages/clanker-channels/src/adapters/telegram.ts similarity index 98% rename from packages/companion-channels/src/adapters/telegram.ts rename to packages/clanker-channels/src/adapters/telegram.ts index 37dee6a..93ddf0d 100644 --- a/packages/companion-channels/src/adapters/telegram.ts +++ b/packages/clanker-channels/src/adapters/telegram.ts @@ -1,5 +1,5 @@ /** - * companion-channels — Built-in Telegram adapter (bidirectional). + * clanker-channels — Built-in Telegram adapter (bidirectional). * * Outgoing: Telegram Bot API sendMessage. * Incoming: Long-polling via getUpdates. @@ -14,7 +14,7 @@ * - File size validation (1MB for docs/photos, 10MB for voice/audio) * - MIME type filtering (text-like files only for documents) * - * Config (in settings.json under companion-channels.adapters.telegram): + * Config (in settings.json under clanker-channels.adapters.telegram): * { * "type": "telegram", * "botToken": "your-telegram-bot-token", @@ -173,7 +173,7 @@ export function createTelegramAdapter(config: AdapterConfig): ChannelAdapter { } catch (err: any) { transcriberError = err.message ?? "Unknown transcription config error"; console.error( - `[companion-channels] Transcription config error: ${transcriberError}`, + `[clanker-channels] Transcription config error: ${transcriberError}`, ); } } @@ -259,7 +259,7 @@ export function createTelegramAdapter(config: AdapterConfig): ChannelAdapter { path.extname(info.result.file_path) || path.extname(suggestedName || "") || ""; - const tmpDir = path.join(os.tmpdir(), "companion-channels"); + const tmpDir = path.join(os.tmpdir(), "clanker-channels"); fs.mkdirSync(tmpDir, { recursive: true }); const localPath = path.join( tmpDir, diff --git a/packages/companion-channels/src/adapters/transcribe-apple b/packages/clanker-channels/src/adapters/transcribe-apple similarity index 100% rename from packages/companion-channels/src/adapters/transcribe-apple rename to packages/clanker-channels/src/adapters/transcribe-apple diff --git a/packages/companion-channels/src/adapters/transcribe-apple.swift b/packages/clanker-channels/src/adapters/transcribe-apple.swift similarity index 100% rename from packages/companion-channels/src/adapters/transcribe-apple.swift rename to packages/clanker-channels/src/adapters/transcribe-apple.swift diff --git a/packages/companion-channels/src/adapters/transcription.ts b/packages/clanker-channels/src/adapters/transcription.ts similarity index 99% rename from packages/companion-channels/src/adapters/transcription.ts rename to packages/clanker-channels/src/adapters/transcription.ts index 27e4625..912bd92 100644 --- a/packages/companion-channels/src/adapters/transcription.ts +++ b/packages/clanker-channels/src/adapters/transcription.ts @@ -1,5 +1,5 @@ /** - * companion-channels — Pluggable audio transcription. + * clanker-channels — Pluggable audio transcription. * * Supports three providers: * - "apple" — macOS SFSpeechRecognizer (free, offline, no API key) diff --git a/packages/companion-channels/src/adapters/webhook.ts b/packages/clanker-channels/src/adapters/webhook.ts similarity index 95% rename from packages/companion-channels/src/adapters/webhook.ts rename to packages/clanker-channels/src/adapters/webhook.ts index 4bc9f44..0b49a40 100644 --- a/packages/companion-channels/src/adapters/webhook.ts +++ b/packages/clanker-channels/src/adapters/webhook.ts @@ -1,5 +1,5 @@ /** - * companion-channels — Built-in webhook adapter. + * clanker-channels — Built-in webhook adapter. * * POSTs message as JSON. The recipient field is the webhook URL. * diff --git a/packages/companion-channels/src/bridge/bridge.ts b/packages/clanker-channels/src/bridge/bridge.ts similarity index 97% rename from packages/companion-channels/src/bridge/bridge.ts rename to packages/clanker-channels/src/bridge/bridge.ts index dcef298..debf51d 100644 --- a/packages/companion-channels/src/bridge/bridge.ts +++ b/packages/clanker-channels/src/bridge/bridge.ts @@ -1,18 +1,18 @@ /** - * companion-channels — Chat bridge. + * clanker-channels — Chat bridge. * * Listens for incoming messages (channel:receive), serializes per sender, - * routes prompts into the live companion gateway runtime, and sends responses + * routes prompts into the live clanker gateway runtime, and sends responses * back via the same adapter. Each sender gets their own FIFO queue. * Multiple senders run concurrently up to maxConcurrent. */ import { readFileSync } from "node:fs"; -import type { ImageContent } from "@mariozechner/companion-ai"; +import type { ImageContent } from "@mariozechner/clanker-ai"; import { type EventBus, getActiveGatewayRuntime, -} from "@mariozechner/companion-coding-agent"; +} from "@mariozechner/clanker-coding-agent"; import type { ChannelRegistry } from "../registry.js"; import type { BridgeConfig, @@ -73,7 +73,7 @@ export class ChatBridge { if (!getActiveGatewayRuntime()) { this.log( "bridge-unavailable", - { reason: "no active companion gateway runtime" }, + { reason: "no active clanker gateway runtime" }, "WARN", ); return; @@ -195,7 +195,7 @@ export class ChatBridge { this.sendReply( prompt.adapter, prompt.sender, - "❌ companion gateway is not running.", + "❌ clanker gateway is not running.", ); return; } diff --git a/packages/companion-channels/src/bridge/commands.ts b/packages/clanker-channels/src/bridge/commands.ts similarity index 97% rename from packages/companion-channels/src/bridge/commands.ts rename to packages/clanker-channels/src/bridge/commands.ts index 9e5e62c..9b71370 100644 --- a/packages/companion-channels/src/bridge/commands.ts +++ b/packages/clanker-channels/src/bridge/commands.ts @@ -1,5 +1,5 @@ /** - * companion-channels — Bot command handler. + * clanker-channels — Bot command handler. * * Detects messages starting with / and handles them without routing * to the agent. Provides built-in commands and a registry for custom ones. @@ -74,7 +74,7 @@ registerCommand({ name: "start", description: "Welcome message", handler: () => - "👋 Hi! I'm your companion assistant.\n\n" + + "👋 Hi! I'm your clanker assistant.\n\n" + "Send me a message and I'll process it. Use /help to see available commands.", }); diff --git a/packages/companion-channels/src/bridge/rpc-runner.ts b/packages/clanker-channels/src/bridge/rpc-runner.ts similarity index 98% rename from packages/companion-channels/src/bridge/rpc-runner.ts rename to packages/clanker-channels/src/bridge/rpc-runner.ts index f807d8d..43ec8e7 100644 --- a/packages/companion-channels/src/bridge/rpc-runner.ts +++ b/packages/clanker-channels/src/bridge/rpc-runner.ts @@ -1,7 +1,7 @@ /** - * companion-channels — Persistent RPC session runner. + * clanker-channels — Persistent RPC session runner. * - * Maintains a long-lived `companion --mode rpc` subprocess per sender, + * Maintains a long-lived `clanker --mode rpc` subprocess per sender, * enabling persistent conversation context across messages. * Falls back to stateless runner if RPC fails to start. * @@ -33,7 +33,7 @@ interface PendingRequest { /** * A persistent RPC session for a single sender. - * Wraps a `companion --mode rpc` subprocess. + * Wraps a `clanker --mode rpc` subprocess. */ export class RpcSession { private child: ChildProcess | null = null; @@ -63,7 +63,7 @@ export class RpcSession { } try { - this.child = spawn("companion", args, { + this.child = spawn("clanker", args, { cwd: this.options.cwd, stdio: ["pipe", "pipe", "pipe"], env: { ...process.env }, diff --git a/packages/companion-channels/src/bridge/runner.ts b/packages/clanker-channels/src/bridge/runner.ts similarity index 92% rename from packages/companion-channels/src/bridge/runner.ts rename to packages/clanker-channels/src/bridge/runner.ts index 3aa37e1..49e138e 100644 --- a/packages/companion-channels/src/bridge/runner.ts +++ b/packages/clanker-channels/src/bridge/runner.ts @@ -1,9 +1,9 @@ /** - * companion-channels — Subprocess runner for the chat bridge. + * clanker-channels — Subprocess runner for the chat bridge. * - * Spawns `companion -p --no-session [@files...] ` to process a single prompt. + * Spawns `clanker -p --no-session [@files...] ` to process a single prompt. * Supports file attachments (images, documents) via the @file syntax. - * Same pattern as companion-cron and companion-heartbeat. + * Same pattern as clanker-cron and clanker-heartbeat. */ import { type ChildProcess, spawn } from "node:child_process"; @@ -49,7 +49,7 @@ export function runPrompt(options: RunOptions): Promise { let child: ChildProcess; try { - child = spawn("companion", args, { + child = spawn("clanker", args, { cwd, stdio: ["ignore", "pipe", "pipe"], env: { ...process.env }, diff --git a/packages/companion-channels/src/bridge/typing.ts b/packages/clanker-channels/src/bridge/typing.ts similarity index 94% rename from packages/companion-channels/src/bridge/typing.ts rename to packages/clanker-channels/src/bridge/typing.ts index f886446..6180b65 100644 --- a/packages/companion-channels/src/bridge/typing.ts +++ b/packages/clanker-channels/src/bridge/typing.ts @@ -1,5 +1,5 @@ /** - * companion-channels — Typing indicator manager. + * clanker-channels — Typing indicator manager. * * Sends periodic typing chat actions via the adapter's sendTyping method. * Telegram typing indicators expire after ~5s, so we refresh every 4s. diff --git a/packages/companion-channels/src/config.ts b/packages/clanker-channels/src/config.ts similarity index 80% rename from packages/companion-channels/src/config.ts rename to packages/clanker-channels/src/config.ts index b5edb5b..645b81d 100644 --- a/packages/companion-channels/src/config.ts +++ b/packages/clanker-channels/src/config.ts @@ -1,13 +1,13 @@ /** - * companion-channels — Config from companion SettingsManager. + * clanker-channels — Config from clanker SettingsManager. * - * Reads the "companion-channels" key from settings via SettingsManager, - * which merges global (~/.companion/agent/settings.json) and project - * (.companion/settings.json) configs automatically. + * Reads the "clanker-channels" key from settings via SettingsManager, + * which merges global (~/.clanker/agent/settings.json) and project + * (.clanker/settings.json) configs automatically. * * Example settings.json: * { - * "companion-channels": { + * "clanker-channels": { * "adapters": { * "telegram": { * "type": "telegram", @@ -28,10 +28,10 @@ * } */ -import { getAgentDir, SettingsManager } from "@mariozechner/companion-coding-agent"; +import { getAgentDir, SettingsManager } from "@mariozechner/clanker-coding-agent"; import type { ChannelConfig } from "./types.js"; -const SETTINGS_KEY = "companion-channels"; +const SETTINGS_KEY = "clanker-channels"; export function loadConfig(cwd: string): ChannelConfig { const agentDir = getAgentDir(); @@ -62,10 +62,10 @@ export function loadConfig(cwd: string): ChannelConfig { } /** - * Read a setting from the "companion-channels" config by dotted key path. + * Read a setting from the "clanker-channels" config by dotted key path. * Useful for adapter-specific secrets that shouldn't live in the adapter config block. * - * Example: getChannelSetting(cwd, "slack.appToken") reads companion-channels.slack.appToken + * Example: getChannelSetting(cwd, "slack.appToken") reads clanker-channels.slack.appToken */ export function getChannelSetting(cwd: string, keyPath: string): unknown { const agentDir = getAgentDir(); diff --git a/packages/companion-channels/src/events.ts b/packages/clanker-channels/src/events.ts similarity index 84% rename from packages/companion-channels/src/events.ts rename to packages/clanker-channels/src/events.ts index 1ee3d1c..b5a5328 100644 --- a/packages/companion-channels/src/events.ts +++ b/packages/clanker-channels/src/events.ts @@ -1,5 +1,5 @@ /** - * companion-channels — Event API registration. + * clanker-channels — Event API registration. * * Events emitted: * channel:receive — incoming message from an external adapter @@ -14,7 +14,7 @@ * bridge:* — chat bridge lifecycle events */ -import type { ExtensionAPI } from "@mariozechner/companion-coding-agent"; +import type { ExtensionAPI } from "@mariozechner/clanker-coding-agent"; import type { ChatBridge } from "./bridge/bridge.js"; import type { ChannelRegistry } from "./registry.js"; import type { @@ -31,13 +31,13 @@ export function setBridge(bridge: ChatBridge | null): void { } export function registerChannelEvents( - companion: ExtensionAPI, + clanker: ExtensionAPI, registry: ChannelRegistry, ): void { // ── Incoming messages → channel:receive (+ bridge) ────── registry.setOnIncoming((message: IncomingMessage) => { - companion.events.emit("channel:receive", message); + clanker.events.emit("channel:receive", message); // Route to bridge if active if (activeBridge?.isActive()) { @@ -47,7 +47,7 @@ export function registerChannelEvents( // ── Auto-route cron job output ────────────────────────── - companion.events.on("cron:job_complete", (raw: unknown) => { + clanker.events.on("cron:job_complete", (raw: unknown) => { const event = raw as { job: { name: string; channel: string; prompt: string }; response?: string; @@ -74,7 +74,7 @@ export function registerChannelEvents( // ── channel:send — deliver a message ───────────────────── - companion.events.on("channel:send", (raw: unknown) => { + clanker.events.on("channel:send", (raw: unknown) => { const data = raw as ChannelMessage & { callback?: (result: { ok: boolean; error?: string }) => void; }; @@ -83,7 +83,7 @@ export function registerChannelEvents( // ── channel:register — add a custom adapter ────────────── - companion.events.on("channel:register", (raw: unknown) => { + clanker.events.on("channel:register", (raw: unknown) => { const data = raw as { name: string; adapter: ChannelAdapter; @@ -99,14 +99,14 @@ export function registerChannelEvents( // ── channel:remove — remove an adapter ─────────────────── - companion.events.on("channel:remove", (raw: unknown) => { + clanker.events.on("channel:remove", (raw: unknown) => { const data = raw as { name: string; callback?: (ok: boolean) => void }; data.callback?.(registry.unregister(data.name)); }); // ── channel:list — list adapters + routes ──────────────── - companion.events.on("channel:list", (raw: unknown) => { + clanker.events.on("channel:list", (raw: unknown) => { const data = raw as { callback?: (items: ReturnType) => void; }; @@ -115,7 +115,7 @@ export function registerChannelEvents( // ── channel:test — send a test ping ────────────────────── - companion.events.on("channel:test", (raw: unknown) => { + clanker.events.on("channel:test", (raw: unknown) => { const data = raw as { adapter: string; recipient: string; @@ -125,7 +125,7 @@ export function registerChannelEvents( .send({ adapter: data.adapter, recipient: data.recipient ?? "", - text: `🏓 companion-channels test — ${new Date().toISOString()}`, + text: `🏓 clanker-channels test — ${new Date().toISOString()}`, source: "channel:test", }) .then((r) => data.callback?.(r)); diff --git a/packages/companion-channels/src/index.ts b/packages/clanker-channels/src/index.ts similarity index 79% rename from packages/companion-channels/src/index.ts rename to packages/clanker-channels/src/index.ts index 086d57a..20d369e 100644 --- a/packages/companion-channels/src/index.ts +++ b/packages/clanker-channels/src/index.ts @@ -1,21 +1,21 @@ /** - * companion-channels — Two-way channel extension for companion. + * clanker-channels — Two-way channel extension for clanker. * * Routes messages between agents and external services * (Telegram, webhooks, custom adapters). * * Built-in adapters: telegram (bidirectional), webhook (outgoing) - * Custom adapters: register via companion.events.emit("channel:register", ...) + * Custom adapters: register via clanker.events.emit("channel:register", ...) * * Chat bridge: when enabled, incoming messages are routed to the agent * as isolated subprocess prompts and responses are sent back. Enable via: * - --chat-bridge flag * - /chat-bridge on command - * - settings.json: { "companion-channels": { "bridge": { "enabled": true } } } + * - settings.json: { "clanker-channels": { "bridge": { "enabled": true } } } * - * Config in settings.json under "companion-channels": + * Config in settings.json under "clanker-channels": * { - * "companion-channels": { + * "clanker-channels": { * "adapters": { * "telegram": { "type": "telegram", "botToken": "your-telegram-bot-token", "polling": true } * }, @@ -34,7 +34,7 @@ * } */ -import type { ExtensionAPI } from "@mariozechner/companion-coding-agent"; +import type { ExtensionAPI } from "@mariozechner/clanker-coding-agent"; import { ChatBridge } from "./bridge/bridge.js"; import { loadConfig } from "./config.js"; import { registerChannelEvents, setBridge } from "./events.js"; @@ -42,15 +42,15 @@ import { createLogger } from "./logger.js"; import { ChannelRegistry } from "./registry.js"; import { registerChannelTool } from "./tool.js"; -export default function (companion: ExtensionAPI) { - const log = createLogger(companion); +export default function (clanker: ExtensionAPI) { + const log = createLogger(clanker); const registry = new ChannelRegistry(); registry.setLogger(log); let bridge: ChatBridge | null = null; // ── Flag: --chat-bridge ─────────────────────────────────── - companion.registerFlag("chat-bridge", { + clanker.registerFlag("chat-bridge", { description: "Enable the chat bridge on startup (incoming messages → agent → reply)", type: "boolean", @@ -59,17 +59,17 @@ export default function (companion: ExtensionAPI) { // ── Event API + cron integration ────────────────────────── - registerChannelEvents(companion, registry); + registerChannelEvents(clanker, registry); // ── Lifecycle ───────────────────────────────────────────── - companion.on("session_start", async (_event, ctx) => { + clanker.on("session_start", async (_event, ctx) => { const config = loadConfig(ctx.cwd); await registry.loadConfig(config, ctx.cwd); const errors = registry.getErrors(); for (const err of errors) { - ctx.ui.notify(`companion-channels: ${err.adapter}: ${err.error}`, "warning"); + ctx.ui.notify(`clanker-channels: ${err.adapter}: ${err.error}`, "warning"); log("adapter-error", { adapter: err.adapter, error: err.error }, "ERROR"); } log("init", { @@ -84,22 +84,22 @@ export default function (companion: ExtensionAPI) { .getErrors() .filter((e) => e.error.startsWith("Failed to start")); for (const err of startErrors) { - ctx.ui.notify(`companion-channels: ${err.adapter}: ${err.error}`, "warning"); + ctx.ui.notify(`clanker-channels: ${err.adapter}: ${err.error}`, "warning"); } // Initialize bridge - bridge = new ChatBridge(config.bridge, ctx.cwd, registry, companion.events, log); + bridge = new ChatBridge(config.bridge, ctx.cwd, registry, clanker.events, log); setBridge(bridge); - const flagEnabled = companion.getFlag("--chat-bridge"); + const flagEnabled = clanker.getFlag("--chat-bridge"); if (flagEnabled || config.bridge?.enabled) { bridge.start(); log("bridge-start", {}); - ctx.ui.notify("companion-channels: Chat bridge started", "info"); + ctx.ui.notify("clanker-channels: Chat bridge started", "info"); } }); - companion.on("session_shutdown", async () => { + clanker.on("session_shutdown", async () => { if (bridge?.isActive()) log("bridge-stop", {}); bridge?.stop(); setBridge(null); @@ -108,7 +108,7 @@ export default function (companion: ExtensionAPI) { // ── Command: /chat-bridge ───────────────────────────────── - companion.registerCommand("chat-bridge", { + clanker.registerCommand("chat-bridge", { description: "Manage chat bridge: /chat-bridge [on|off|status]", getArgumentCompletions: (prefix: string) => { return ["on", "off", "status"] @@ -164,5 +164,5 @@ export default function (companion: ExtensionAPI) { // ── LLM tool ────────────────────────────────────────────── - registerChannelTool(companion, registry); + registerChannelTool(clanker, registry); } diff --git a/packages/clanker-channels/src/logger.ts b/packages/clanker-channels/src/logger.ts new file mode 100644 index 0000000..507233d --- /dev/null +++ b/packages/clanker-channels/src/logger.ts @@ -0,0 +1,8 @@ +import type { ExtensionAPI } from "@mariozechner/clanker-coding-agent"; + +const CHANNEL = "channels"; + +export function createLogger(clanker: ExtensionAPI) { + return (event: string, data: unknown, level = "INFO") => + clanker.events.emit("log", { channel: CHANNEL, event, level, data }); +} diff --git a/packages/companion-channels/src/registry.ts b/packages/clanker-channels/src/registry.ts similarity index 99% rename from packages/companion-channels/src/registry.ts rename to packages/clanker-channels/src/registry.ts index 4a5fd92..679f611 100644 --- a/packages/companion-channels/src/registry.ts +++ b/packages/clanker-channels/src/registry.ts @@ -1,5 +1,5 @@ /** - * companion-channels — Adapter registry + route resolution. + * clanker-channels — Adapter registry + route resolution. */ import type { diff --git a/packages/companion-channels/src/tool.ts b/packages/clanker-channels/src/tool.ts similarity index 88% rename from packages/companion-channels/src/tool.ts rename to packages/clanker-channels/src/tool.ts index feefa32..94f1acb 100644 --- a/packages/companion-channels/src/tool.ts +++ b/packages/clanker-channels/src/tool.ts @@ -1,9 +1,9 @@ /** - * companion-channels — LLM tool registration. + * clanker-channels — LLM tool registration. */ -import { StringEnum } from "@mariozechner/companion-ai"; -import type { ExtensionAPI } from "@mariozechner/companion-coding-agent"; +import { StringEnum } from "@mariozechner/clanker-ai"; +import type { ExtensionAPI } from "@mariozechner/clanker-coding-agent"; import { Type } from "@sinclair/typebox"; import type { ChannelRegistry } from "./registry.js"; @@ -16,10 +16,10 @@ interface ChannelToolParams { } export function registerChannelTool( - companion: ExtensionAPI, + clanker: ExtensionAPI, registry: ChannelRegistry, ): void { - companion.registerTool({ + clanker.registerTool({ name: "notify", label: "Channel", description: @@ -57,7 +57,7 @@ export function registerChannelTool( const items = registry.list(); if (items.length === 0) { result = - 'No adapters configured. Add "companion-channels" to your settings.json.'; + 'No adapters configured. Add "clanker-channels" to your settings.json.'; } else { const lines = items.map((i) => i.type === "route" @@ -92,7 +92,7 @@ export function registerChannelTool( const r = await registry.send({ adapter: params.adapter, recipient: params.recipient ?? "", - text: `🏓 companion-channels test — ${new Date().toISOString()}`, + text: `🏓 clanker-channels test — ${new Date().toISOString()}`, source: "channel:test", }); result = r.ok diff --git a/packages/companion-channels/src/types.ts b/packages/clanker-channels/src/types.ts similarity index 92% rename from packages/companion-channels/src/types.ts rename to packages/clanker-channels/src/types.ts index d825210..8ef97a5 100644 --- a/packages/companion-channels/src/types.ts +++ b/packages/clanker-channels/src/types.ts @@ -1,5 +1,5 @@ /** - * companion-channels — Shared types. + * clanker-channels — Shared types. */ // ── Channel message ───────────────────────────────────────────── @@ -17,7 +17,7 @@ export interface ChannelMessage { metadata?: Record; } -// ── Incoming message (from external → companion) ─────────────────────── +// ── Incoming message (from external → clanker) ─────────────────────── export interface IncomingAttachment { /** Attachment type */ @@ -90,7 +90,7 @@ export interface ChannelAdapter { sendTyping?(recipient: string): Promise; } -// ── Config (lives under "companion-channels" key in companion settings.json) ── +// ── Config (lives under "clanker-channels" key in clanker settings.json) ── export interface AdapterConfig { type: string; @@ -103,8 +103,8 @@ export interface BridgeConfig { /** * Default session mode (default: "persistent"). * - * - "persistent" — long-lived `companion --mode rpc` subprocess with conversation memory - * - "stateless" — isolated `companion -p --no-session` subprocess per message (no memory) + * - "persistent" — long-lived `clanker --mode rpc` subprocess with conversation memory + * - "stateless" — isolated `clanker -p --no-session` subprocess per message (no memory) * * Can be overridden per sender via `sessionRules`. */ @@ -144,7 +144,7 @@ export interface BridgeConfig { * extensions that crash or conflict, e.g. webserver port collisions). * List only the extensions the bridge agent actually needs. * - * Example: ["/Users/you/Dev/companion/extensions/companion-vault/src/index.ts"] + * Example: ["/Users/you/Dev/clanker/extensions/clanker-vault/src/index.ts"] */ extensions?: string[]; } diff --git a/packages/companion-grind/README.md b/packages/clanker-grind/README.md similarity index 83% rename from packages/companion-grind/README.md rename to packages/clanker-grind/README.md index 066c6c3..c1a58fe 100644 --- a/packages/companion-grind/README.md +++ b/packages/clanker-grind/README.md @@ -1,12 +1,12 @@ -# companion-grind +# clanker-grind -Explicit grind mode for companion. +Explicit grind mode for clanker. Features: - Auto-activates only when the user uses explicit grind cues in a prompt - Persists run state in session custom entries -- Continues work on a heartbeat while running in `companion daemon` +- Continues work on a heartbeat while running in `clanker daemon` - Pauses automatically when the user sends a normal prompt Example prompts: @@ -26,7 +26,7 @@ Settings: ```json { - "companion-grind": { + "clanker-grind": { "enabled": true, "pollIntervalMs": 30000, "cueMode": "explicit-only", diff --git a/packages/companion-grind/package.json b/packages/clanker-grind/package.json similarity index 62% rename from packages/companion-grind/package.json rename to packages/clanker-grind/package.json index 7c7ed62..c1fe074 100644 --- a/packages/companion-grind/package.json +++ b/packages/clanker-grind/package.json @@ -1,10 +1,10 @@ { - "name": "companion-grind", + "name": "clanker-grind", "version": "0.1.0", - "description": "Explicit grind mode for companion with durable follow-up continuation in daemon mode", + "description": "Explicit grind mode for clanker with durable follow-up continuation in daemon mode", "type": "module", "keywords": [ - "companion-package" + "clanker-package" ], "license": "MIT", "author": "Mario Zechner", @@ -15,14 +15,14 @@ "package.json", "README.md" ], - "companion": { + "clanker": { "extensions": [ "./src/index.ts" ] }, "peerDependencies": { - "@mariozechner/companion-agent-core": "*", - "@mariozechner/companion-coding-agent": "*" + "@harivansh-afk/clanker-agent-core": "*", + "@harivansh-afk/clanker-coding-agent": "*" }, "devDependencies": { "@types/node": "^24.3.0", diff --git a/packages/companion-grind/src/config.ts b/packages/clanker-grind/src/config.ts similarity index 96% rename from packages/companion-grind/src/config.ts rename to packages/clanker-grind/src/config.ts index a1e4af8..1cfdc7c 100644 --- a/packages/companion-grind/src/config.ts +++ b/packages/clanker-grind/src/config.ts @@ -1,4 +1,4 @@ -import { getAgentDir, SettingsManager } from "@mariozechner/companion-coding-agent"; +import { getAgentDir, SettingsManager } from "@mariozechner/clanker-coding-agent"; import { DEFAULT_POLL_INTERVAL_MS, GRIND_SETTINGS_KEY, type GrindConfig } from "./types.js"; const DEFAULT_CUE_PATTERNS = [ diff --git a/packages/companion-grind/src/index.ts b/packages/clanker-grind/src/index.ts similarity index 80% rename from packages/companion-grind/src/index.ts rename to packages/clanker-grind/src/index.ts index 66b503f..1a04271 100644 --- a/packages/companion-grind/src/index.ts +++ b/packages/clanker-grind/src/index.ts @@ -1,5 +1,5 @@ -import type { AgentMessage } from "@mariozechner/companion-agent-core"; -import type { ExtensionAPI, ExtensionContext, RegisteredCommand } from "@mariozechner/companion-coding-agent"; +import type { AgentMessage } from "@mariozechner/clanker-agent-core"; +import type { ExtensionAPI, ExtensionContext, RegisteredCommand } from "@mariozechner/clanker-coding-agent"; import { loadConfig } from "./config.js"; import { parseAutoActivation, parseGrindStatus, parseStopCondition } from "./parser.js"; import { buildContinuationPrompt, buildRepairPrompt, buildSystemPromptAddon } from "./prompts.js"; @@ -13,19 +13,19 @@ import { } from "./types.js"; function isDaemonRuntime(): boolean { - if (process.env.COMPANION_GRIND_FORCE_DAEMON === "1") { + if (process.env.CLANKER_GRIND_FORCE_DAEMON === "1") { return true; } - if (process.env.COMPANION_GRIND_FORCE_DAEMON === "0") { + if (process.env.CLANKER_GRIND_FORCE_DAEMON === "0") { return false; } return ( process.argv.includes("daemon") || process.argv.includes("gateway") || - Boolean(process.env.COMPANION_GATEWAY_BIND) || - Boolean(process.env.COMPANION_GATEWAY_PORT) || - Boolean(process.env.COMPANION_GATEWAY_TOKEN) + Boolean(process.env.CLANKER_GATEWAY_BIND) || + Boolean(process.env.CLANKER_GATEWAY_PORT) || + Boolean(process.env.CLANKER_GATEWAY_TOKEN) ); } @@ -57,21 +57,21 @@ function readState(ctx: ExtensionContext): GrindRunState | null { return getLatestRunState(ctx.sessionManager.getEntries()); } -function persistState(companion: ExtensionAPI, ctx: ExtensionContext, state: GrindRunState): GrindRunState { - companion.appendEntry(GRIND_STATE_ENTRY_TYPE, state); +function persistState(clanker: ExtensionAPI, ctx: ExtensionContext, state: GrindRunState): GrindRunState { + clanker.appendEntry(GRIND_STATE_ENTRY_TYPE, state); if (ctx.hasUI) { - ctx.ui.setStatus("companion-grind", state.status === "active" ? "GRIND" : state.status.toUpperCase()); + ctx.ui.setStatus("clanker-grind", state.status === "active" ? "GRIND" : state.status.toUpperCase()); } return state; } function clearUiStatus(ctx: ExtensionContext): void { if (ctx.hasUI) { - ctx.ui.setStatus("companion-grind", ""); + ctx.ui.setStatus("clanker-grind", ""); } } -function maybeExpireRun(companion: ExtensionAPI, ctx: ExtensionContext, state: GrindRunState): GrindRunState | null { +function maybeExpireRun(clanker: ExtensionAPI, ctx: ExtensionContext, state: GrindRunState): GrindRunState | null { if (!state.deadlineAt) { return state; } @@ -85,7 +85,7 @@ function maybeExpireRun(companion: ExtensionAPI, ctx: ExtensionContext, state: G lastNextAction: null, pendingRepair: false, }); - persistState(companion, ctx, expired); + persistState(clanker, ctx, expired); note(ctx, "Grind mode stopped: deadline reached."); return expired; } @@ -164,7 +164,7 @@ function parseStartCommandArgs(args: string): { } function startRun( - companion: ExtensionAPI, + clanker: ExtensionAPI, ctx: ExtensionContext, config: GrindConfig, input: { @@ -181,17 +181,17 @@ function startRun( } if (config.requireDaemon && !isDaemonRuntime()) { - note(ctx, "Durable grind mode requires `companion daemon`."); + note(ctx, "Durable grind mode requires `clanker daemon`."); return null; } const nextState = createRunState(input); - persistState(companion, ctx, nextState); + persistState(clanker, ctx, nextState); note(ctx, "Grind mode activated."); return nextState; } -export default function grind(companion: ExtensionAPI) { +export default function grind(clanker: ExtensionAPI) { let config: GrindConfig | null = null; let state: GrindRunState | null = null; let heartbeat: NodeJS.Timeout | null = null; @@ -221,18 +221,18 @@ export default function grind(companion: ExtensionAPI) { return; } - const expired = maybeExpireRun(companion, ctx, state); + const expired = maybeExpireRun(clanker, ctx, state); state = expired; if (!state || state.status !== "active") { return; } if (state.pendingRepair) { - companion.sendUserMessage(buildRepairPrompt(state), { + clanker.sendUserMessage(buildRepairPrompt(state), { deliverAs: "followUp", }); } else { - companion.sendUserMessage(buildContinuationPrompt(state), { + clanker.sendUserMessage(buildContinuationPrompt(state), { deliverAs: "followUp", }); } @@ -241,7 +241,7 @@ export default function grind(companion: ExtensionAPI) { }; const registerCommand = (name: string, command: Omit) => { - companion.registerCommand(name, command); + clanker.registerCommand(name, command); }; registerCommand("grind", { @@ -268,7 +268,7 @@ export default function grind(companion: ExtensionAPI) { ? parseStopCondition(`until ${parsed.until}`) : { deadlineAt: null, completionCriterion: null }; - const nextState = startRun(companion, ctx, currentConfig, { + const nextState = startRun(clanker, ctx, currentConfig, { activation: "command", goal: parsed.goal, sourcePrompt: parsed.goal, @@ -277,7 +277,7 @@ export default function grind(companion: ExtensionAPI) { }); state = nextState; if (state) { - companion.sendUserMessage(parsed.goal, { deliverAs: "followUp" }); + clanker.sendUserMessage(parsed.goal, { deliverAs: "followUp" }); } return; } @@ -312,7 +312,7 @@ export default function grind(companion: ExtensionAPI) { note(ctx, "No grind run to pause."); return; } - state = persistState(companion, ctx, withStatus(state, "paused", { pendingRepair: false })); + state = persistState(clanker, ctx, withStatus(state, "paused", { pendingRepair: false })); note(ctx, "Grind mode paused."); return; } @@ -326,12 +326,12 @@ export default function grind(companion: ExtensionAPI) { return; } if (currentConfig.requireDaemon && !isDaemonRuntime()) { - note(ctx, "Durable grind mode requires `companion daemon`."); + note(ctx, "Durable grind mode requires `clanker daemon`."); return; } - state = persistState(companion, ctx, withStatus(state, "active")); + state = persistState(clanker, ctx, withStatus(state, "active")); note(ctx, "Grind mode resumed."); - companion.sendUserMessage(buildContinuationPrompt(state), { + clanker.sendUserMessage(buildContinuationPrompt(state), { deliverAs: "followUp", }); return; @@ -346,7 +346,7 @@ export default function grind(companion: ExtensionAPI) { return; } state = persistState( - companion, + clanker, ctx, withStatus(state, "stopped", { pendingRepair: false, @@ -362,22 +362,22 @@ export default function grind(companion: ExtensionAPI) { }, }); - companion.on("session_start", async (_event, ctx) => { + clanker.on("session_start", async (_event, ctx) => { config = loadConfig(ctx.cwd); state = readState(ctx); if (state && ctx.hasUI) { - ctx.ui.setStatus("companion-grind", state.status === "active" ? "GRIND" : state.status.toUpperCase()); + ctx.ui.setStatus("clanker-grind", state.status === "active" ? "GRIND" : state.status.toUpperCase()); } if (config.enabled) { ensureHeartbeat(ctx); } }); - companion.on("session_shutdown", async () => { + clanker.on("session_shutdown", async () => { stopHeartbeat(); }); - companion.on("input", async (event, ctx) => { + clanker.on("input", async (event, ctx) => { const currentConfig = getConfig(ctx.cwd); if (!currentConfig.enabled || event.source === "extension") { return { action: "continue" } as const; @@ -389,7 +389,7 @@ export default function grind(companion: ExtensionAPI) { const activation = parseAutoActivation(event.text, currentConfig.cuePatterns); if (!activation) { if (currentConfig.userIntervention === "pause") { - state = persistState(companion, ctx, withStatus(currentState, "paused", { pendingRepair: false })); + state = persistState(clanker, ctx, withStatus(currentState, "paused", { pendingRepair: false })); note(ctx, "Grind mode paused for manual input."); } return { action: "continue" } as const; @@ -401,7 +401,7 @@ export default function grind(companion: ExtensionAPI) { return { action: "continue" } as const; } - state = startRun(companion, ctx, currentConfig, { + state = startRun(clanker, ctx, currentConfig, { activation: "explicit", goal: event.text, sourcePrompt: event.text, @@ -412,13 +412,13 @@ export default function grind(companion: ExtensionAPI) { return { action: "continue" } as const; }); - companion.on("before_agent_start", async (event, ctx) => { + clanker.on("before_agent_start", async (event, ctx) => { state = state ?? readState(ctx); if (!state || state.status !== "active") { return; } - const expired = maybeExpireRun(companion, ctx, state); + const expired = maybeExpireRun(clanker, ctx, state); state = expired; if (!state || state.status !== "active") { return; @@ -429,13 +429,13 @@ export default function grind(companion: ExtensionAPI) { }; }); - companion.on("turn_end", async (event, ctx) => { + clanker.on("turn_end", async (event, ctx) => { state = state ?? readState(ctx); if (!state || state.status !== "active") { return; } - const expired = maybeExpireRun(companion, ctx, state); + const expired = maybeExpireRun(clanker, ctx, state); state = expired; if (!state || state.status !== "active") { return; @@ -447,7 +447,7 @@ export default function grind(companion: ExtensionAPI) { if (!parsed) { if (state.consecutiveParseFailures + 1 >= MAX_PARSE_FAILURES) { state = persistState( - companion, + clanker, ctx, withStatus(state, "blocked", { pendingRepair: false, @@ -460,7 +460,7 @@ export default function grind(companion: ExtensionAPI) { return; } - state = persistState(companion, ctx, { + state = persistState(clanker, ctx, { ...state, pendingRepair: true, consecutiveParseFailures: state.consecutiveParseFailures + 1, @@ -469,7 +469,7 @@ export default function grind(companion: ExtensionAPI) { return; } - state = persistState(companion, ctx, withLoopStatus(state, parsed)); + state = persistState(clanker, ctx, withLoopStatus(state, parsed)); if (state.status !== "active") { note(ctx, `Grind mode ${state.status}.`); if (state.status !== "paused") { diff --git a/packages/companion-grind/src/parser.ts b/packages/clanker-grind/src/parser.ts similarity index 100% rename from packages/companion-grind/src/parser.ts rename to packages/clanker-grind/src/parser.ts diff --git a/packages/companion-grind/src/prompts.ts b/packages/clanker-grind/src/prompts.ts similarity index 100% rename from packages/companion-grind/src/prompts.ts rename to packages/clanker-grind/src/prompts.ts diff --git a/packages/companion-grind/src/state.ts b/packages/clanker-grind/src/state.ts similarity index 97% rename from packages/companion-grind/src/state.ts rename to packages/clanker-grind/src/state.ts index 19ac146..73f7ee1 100644 --- a/packages/companion-grind/src/state.ts +++ b/packages/clanker-grind/src/state.ts @@ -1,5 +1,5 @@ import { randomUUID } from "node:crypto"; -import type { SessionEntry } from "@mariozechner/companion-coding-agent"; +import type { SessionEntry } from "@mariozechner/clanker-coding-agent"; import { GRIND_STATE_ENTRY_TYPE, type GrindActivation, diff --git a/packages/companion-grind/src/time.ts b/packages/clanker-grind/src/time.ts similarity index 100% rename from packages/companion-grind/src/time.ts rename to packages/clanker-grind/src/time.ts diff --git a/packages/companion-grind/src/types.ts b/packages/clanker-grind/src/types.ts similarity index 91% rename from packages/companion-grind/src/types.ts rename to packages/clanker-grind/src/types.ts index 303b10d..13c1fdd 100644 --- a/packages/companion-grind/src/types.ts +++ b/packages/clanker-grind/src/types.ts @@ -1,5 +1,5 @@ -export const GRIND_SETTINGS_KEY = "companion-grind"; -export const GRIND_STATE_ENTRY_TYPE = "companion-grind/state"; +export const GRIND_SETTINGS_KEY = "clanker-grind"; +export const GRIND_STATE_ENTRY_TYPE = "clanker-grind/state"; export const DEFAULT_COMPLETION_CRITERION = "finish the requested task"; export const DEFAULT_POLL_INTERVAL_MS = 30_000; export const MAX_PARSE_FAILURES = 2; diff --git a/packages/companion-grind/test/parser.test.ts b/packages/clanker-grind/test/parser.test.ts similarity index 97% rename from packages/companion-grind/test/parser.test.ts rename to packages/clanker-grind/test/parser.test.ts index 2dbb94e..9fa7124 100644 --- a/packages/companion-grind/test/parser.test.ts +++ b/packages/clanker-grind/test/parser.test.ts @@ -1,7 +1,7 @@ import { describe, expect, it } from "vitest"; import { detectCue, parseAutoActivation, parseGrindStatus, parseStopCondition } from "../src/parser.js"; -describe("companion-grind parser", () => { +describe("clanker-grind parser", () => { const now = new Date(2026, 2, 9, 9, 0, 0); const cues = ["don't stop", "keep going", "run until"]; diff --git a/packages/companion-grind/test/state.test.ts b/packages/clanker-grind/test/state.test.ts similarity index 93% rename from packages/companion-grind/test/state.test.ts rename to packages/clanker-grind/test/state.test.ts index 7a38db3..f6de7a1 100644 --- a/packages/companion-grind/test/state.test.ts +++ b/packages/clanker-grind/test/state.test.ts @@ -1,9 +1,9 @@ -import type { SessionEntry } from "@mariozechner/companion-coding-agent"; +import type { SessionEntry } from "@mariozechner/clanker-coding-agent"; import { describe, expect, it } from "vitest"; import { createRunState, getLatestRunState, withLoopStatus, withStatus } from "../src/state.js"; import { GRIND_STATE_ENTRY_TYPE } from "../src/types.js"; -describe("companion-grind state", () => { +describe("clanker-grind state", () => { it("creates active run state", () => { const state = createRunState({ activation: "explicit", diff --git a/packages/companion-teams/.gitignore b/packages/clanker-teams/.gitignore similarity index 75% rename from packages/companion-teams/.gitignore rename to packages/clanker-teams/.gitignore index 626e3b0..7802876 100644 --- a/packages/companion-teams/.gitignore +++ b/packages/clanker-teams/.gitignore @@ -1,5 +1,5 @@ node_modules .DS_Store -.companion +.clanker dist *.log diff --git a/packages/companion-teams/AGENTS.md b/packages/clanker-teams/AGENTS.md similarity index 89% rename from packages/companion-teams/AGENTS.md rename to packages/clanker-teams/AGENTS.md index 3694674..0afe56a 100644 --- a/packages/companion-teams/AGENTS.md +++ b/packages/clanker-teams/AGENTS.md @@ -1,12 +1,12 @@ -# companion-teams: Agent Guide 🤖 +# clanker-teams: Agent Guide 🤖 -This guide explains how `companion-teams` transforms your single companion agent into a coordinated team of specialists. It covers the roles, capabilities, and coordination patterns available to you as the **Team Lead**. +This guide explains how `clanker-teams` transforms your single clanker agent into a coordinated team of specialists. It covers the roles, capabilities, and coordination patterns available to you as the **Team Lead**. --- ## 🎭 The Two Roles -In a `companion-teams` environment, there are two distinct types of agents: +In a `clanker-teams` environment, there are two distinct types of agents: ### 1. The Team Lead (You) @@ -87,13 +87,13 @@ Use this for refactoring or security work. Use automated hooks to ensure standards. -1. Define a script at `.companion/team-hooks/task_completed.sh`. +1. Define a script at `.clanker/team-hooks/task_completed.sh`. 2. When any teammate marks a task as `completed`, the hook runs (e.g., runs `npm test`). 3. If the hook fails, you'll know the work isn't ready. --- -## 🛑 When to Use companion-teams +## 🛑 When to Use clanker-teams - **Complex Projects**: Tasks that involve multiple files and logic layers. - **Research & Execution**: One agent researches while another implements. diff --git a/packages/companion-teams/APPLESCRIPT b/packages/clanker-teams/APPLESCRIPT similarity index 100% rename from packages/companion-teams/APPLESCRIPT rename to packages/clanker-teams/APPLESCRIPT diff --git a/packages/companion-teams/EOF b/packages/clanker-teams/EOF similarity index 100% rename from packages/companion-teams/EOF rename to packages/clanker-teams/EOF diff --git a/packages/companion-teams/PATCH b/packages/clanker-teams/PATCH similarity index 100% rename from packages/companion-teams/PATCH rename to packages/clanker-teams/PATCH diff --git a/packages/companion-teams/README.md b/packages/clanker-teams/README.md similarity index 80% rename from packages/companion-teams/README.md rename to packages/clanker-teams/README.md index ab0644e..56d91d0 100644 --- a/packages/companion-teams/README.md +++ b/packages/clanker-teams/README.md @@ -1,21 +1,21 @@ -# companion-teams 🚀 +# clanker-teams 🚀 -**companion-teams** turns your single companion agent into a coordinated software engineering team. It allows you to spawn multiple "Teammate" agents in separate terminal panes that work autonomously, communicate with each other, and manage a shared task board-all mediated through tmux, Zellij, iTerm2, or WezTerm. +**clanker-teams** turns your single clanker agent into a coordinated software engineering team. It allows you to spawn multiple "Teammate" agents in separate terminal panes that work autonomously, communicate with each other, and manage a shared task board-all mediated through tmux, Zellij, iTerm2, or WezTerm. -### 🖥️ companion-teams in Action +### 🖥️ clanker-teams in Action | iTerm2 | tmux | Zellij | | :----------------------------------------------------------------------------------: | :----------------------------------------------------------------------------: | :----------------------------------------------------------------------------------: | -| companion-teams in iTerm2 | companion-teams in tmux | companion-teams in Zellij | +| clanker-teams in iTerm2 | clanker-teams in tmux | clanker-teams in Zellij | _Also works with **WezTerm** (cross-platform support)_ ## 🛠 Installation -Open your companion terminal and type: +Open your clanker terminal and type: ```bash -companion install npm:companion-teams +clanker install npm:clanker-teams ``` ## 🚀 Quick Start @@ -95,9 +95,9 @@ companion install npm:companion-teams > **You:** "Spawn a teammate named 'architect-bot' using 'gpt-4o' with 'high' thinking level for deep reasoning." **Smart Model Resolution:** -When you specify a model name without a provider (e.g., `gemini-2.5-flash`), companion-teams automatically: +When you specify a model name without a provider (e.g., `gemini-2.5-flash`), clanker-teams automatically: -- Queries available models from `companion --list-models` +- Queries available models from `clanker --list-models` - Prioritizes **OAuth/subscription providers** (cheaper/free) over API-key providers: - `google-gemini-cli` (OAuth) is preferred over `google` (API key) - `github-copilot`, `kimi-sub` are preferred over their API-key equivalents @@ -131,7 +131,7 @@ Teammates in `planning` mode will use `task_submit_plan`. As the lead, review th ## 🪟 Terminal Requirements -To show multiple agents on one screen, **companion-teams** requires a way to manage terminal panes. It supports **tmux**, **Zellij**, **iTerm2**, and **WezTerm**. +To show multiple agents on one screen, **clanker-teams** requires a way to manage terminal panes. It supports **tmux**, **Zellij**, **iTerm2**, and **WezTerm**. ### Option 1: tmux (Recommended) @@ -144,16 +144,16 @@ How to run: ```bash tmux # Start tmux session -companion # Start companion inside tmux +clanker # Start clanker inside tmux ``` ### Option 2: Zellij -Simply start `companion` inside a Zellij session. **companion-teams** will detect it via the `ZELLIJ` environment variable and use `zellij run` to spawn teammates in new panes. +Simply start `clanker` inside a Zellij session. **clanker-teams** will detect it via the `ZELLIJ` environment variable and use `zellij run` to spawn teammates in new panes. ### Option 3: iTerm2 (macOS) -If you are using **iTerm2** on macOS and are _not_ inside tmux or Zellij, **companion-teams** can manage your team in two ways: +If you are using **iTerm2** on macOS and are _not_ inside tmux or Zellij, **clanker-teams** can manage your team in two ways: 1. **Panes (Default)**: Automatically split your current window into an optimized layout. 2. **Windows**: Create true separate OS windows for each agent. @@ -174,14 +174,14 @@ How to run: ```bash wezterm # Start WezTerm -companion # Start companion inside WezTerm +clanker # Start clanker inside WezTerm ``` ## 📜 Credits & Attribution This project is a port of the excellent [claude-code-teams-mcp](https://github.com/cs50victor/claude-code-teams-mcp) by [cs50victor](https://github.com/cs50victor). -We have adapted the original MCP coordination protocol to work natively as a **companion package**, adding features like auto-starting teammates, balanced vertical UI layouts, automatic inbox polling, plan approval mode, broadcast messaging, and quality gate hooks. +We have adapted the original MCP coordination protocol to work natively as a **clanker package**, adding features like auto-starting teammates, balanced vertical UI layouts, automatic inbox polling, plan approval mode, broadcast messaging, and quality gate hooks. ## 📄 License diff --git a/packages/companion-teams/WEZTERM_LAYOUT_FIX.md b/packages/clanker-teams/WEZTERM_LAYOUT_FIX.md similarity index 95% rename from packages/companion-teams/WEZTERM_LAYOUT_FIX.md rename to packages/clanker-teams/WEZTERM_LAYOUT_FIX.md index 5f17d35..661cc66 100644 --- a/packages/companion-teams/WEZTERM_LAYOUT_FIX.md +++ b/packages/clanker-teams/WEZTERM_LAYOUT_FIX.md @@ -2,7 +2,7 @@ ## Problem -WezTerm was not creating the correct panel layout for companion-teams. The desired layout is: +WezTerm was not creating the correct panel layout for clanker-teams. The desired layout is: - **Main controller panel** on the LEFT (takes 70% width) - **Teammate panels** stacked on the RIGHT (takes 30% width, divided vertically) diff --git a/packages/companion-teams/WEZTERM_SUPPORT.md b/packages/clanker-teams/WEZTERM_SUPPORT.md similarity index 91% rename from packages/companion-teams/WEZTERM_SUPPORT.md rename to packages/clanker-teams/WEZTERM_SUPPORT.md index abb3c11..fd1cdac 100644 --- a/packages/companion-teams/WEZTERM_SUPPORT.md +++ b/packages/clanker-teams/WEZTERM_SUPPORT.md @@ -2,7 +2,7 @@ ## Summary -Successfully added support for **WezTerm** terminal emulator to companion-teams, bringing the total number of supported terminals to **4**: +Successfully added support for **WezTerm** terminal emulator to clanker-teams, bringing the total number of supported terminals to **4**: - tmux (multiplexer) - Zellij (multiplexer) @@ -89,7 +89,7 @@ Total: **46 tests passing**, 0 failures - ✅ CLI-based pane management (`wezterm cli split-pane`) - ✅ Auto-layout: left split for first pane (30%), bottom splits for subsequent (50%) -- ✅ Environment variable filtering (only `COMPANION_*` prefixed) +- ✅ Environment variable filtering (only `CLANKER_*` prefixed) - ✅ Graceful error handling - ✅ Pane killing via Ctrl-C - ✅ Tab title setting @@ -102,7 +102,7 @@ WezTerm is cross-platform: - Linux ✅ - Windows ✅ -This means companion-teams now works out-of-the-box on **more platforms** without requiring multiplexers like tmux or Zellij. +This means clanker-teams now works out-of-the-box on **more platforms** without requiring multiplexers like tmux or Zellij. ## Conclusion diff --git a/packages/companion-teams/context.md b/packages/clanker-teams/context.md similarity index 100% rename from packages/companion-teams/context.md rename to packages/clanker-teams/context.md diff --git a/packages/companion-teams/docs/guide.md b/packages/clanker-teams/docs/guide.md similarity index 88% rename from packages/companion-teams/docs/guide.md rename to packages/clanker-teams/docs/guide.md index d3bbb26..a852841 100644 --- a/packages/companion-teams/docs/guide.md +++ b/packages/clanker-teams/docs/guide.md @@ -1,6 +1,6 @@ -# companion-teams Usage Guide +# clanker-teams Usage Guide -This guide provides detailed examples, patterns, and best practices for using companion-teams. +This guide provides detailed examples, patterns, and best practices for using clanker-teams. ## Table of Contents @@ -22,10 +22,10 @@ First, make sure you're inside a tmux session, Zellij session, or iTerm2: tmux # or zellij, or just use iTerm2 ``` -Then start companion: +Then start clanker: ```bash -companion +clanker ``` Create your first team: @@ -66,7 +66,7 @@ Approve or reject: ### 3. Testing with Automated Hooks -Create a hook script at `.companion/team-hooks/task_completed.sh`: +Create a hook script at `.clanker/team-hooks/task_completed.sh`: ```bash #!/bin/bash @@ -124,11 +124,11 @@ Hooks are shell scripts that run automatically at specific events. Currently sup ### Hook Location -Hooks should be placed in `.companion/team-hooks/` in your project directory: +Hooks should be placed in `.clanker/team-hooks/` in your project directory: ``` your-project/ -├── .companion/ +├── .clanker/ │ └── team-hooks/ │ └── task_completed.sh ``` @@ -161,7 +161,7 @@ Example payload: ```bash #!/bin/bash -# .companion/team-hooks/task_completed.sh +# .clanker/team-hooks/task_completed.sh TASK_DATA="$1" SUBJECT=$(echo "$TASK_DATA" | jq -r '.subject') @@ -174,7 +174,7 @@ npm test ```bash #!/bin/bash -# .companion/team-hooks/task_completed.sh +# .clanker/team-hooks/task_completed.sh TASK_DATA="$1" SUBJECT=$(echo "$TASK_DATA" | jq -r '.subject') @@ -189,7 +189,7 @@ curl -X POST -H 'Content-type: application/json' \ ```bash #!/bin/bash -# .companion/team-hooks/task_completed.sh +# .clanker/team-hooks/task_completed.sh TASK_DATA="$1" SUBJECT=$(echo "$TASK_DATA" | jq -r '.subject') @@ -304,15 +304,15 @@ This helps you catch blockers early and provide feedback. **Problem**: tmux panes don't close when killing teammates. -**Solution**: Make sure you started companion inside a tmux session. If you started companion outside tmux, it won't work properly. +**Solution**: Make sure you started clanker inside a tmux session. If you started clanker outside tmux, it won't work properly. ```bash # Correct way tmux -companion +clanker # Incorrect way -companion # Then try to use tmux commands +clanker # Then try to use tmux commands ``` ### Hook Not Running @@ -321,30 +321,30 @@ companion # Then try to use tmux commands **Checklist**: -1. File exists at `.companion/team-hooks/task_completed.sh` -2. File is executable: `chmod +x .companion/team-hooks/task_completed.sh` +1. File exists at `.clanker/team-hooks/task_completed.sh` +2. File is executable: `chmod +x .clanker/team-hooks/task_completed.sh` 3. Shebang line is present: `#!/bin/bash` -4. Test manually: `.companion/team-hooks/task_completed.sh '{"test":"data"}'` +4. Test manually: `.clanker/team-hooks/task_completed.sh '{"test":"data"}'` ### Model Errors **Problem**: "Model not found" or similar errors. -**Solution**: Check the model name is correct and available in your companion config. Some model names vary between providers: +**Solution**: Check the model name is correct and available in your clanker config. Some model names vary between providers: - `gpt-4o` - OpenAI - `haiku` - Anthropic (usually `claude-3-5-haiku`) - `glm-4.7` - Zhipu AI -Check your companion config for available models. +Check your clanker config for available models. ### Data Location All team data is stored in: -- `~/.companion/teams//` - Team configuration, member list -- `~/.companion/tasks//` - Task files -- `~/.companion/messages//` - Message history +- `~/.clanker/teams//` - Team configuration, member list +- `~/.clanker/tasks//` - Task files +- `~/.clanker/messages//` - Message history You can manually inspect these JSON files to debug issues. @@ -386,9 +386,9 @@ To remove all team data: > "Shut down the team named 'my-team'" # Then delete data directory -rm -rf ~/.companion/teams/my-team/ -rm -rf ~/.companion/tasks/my-team/ -rm -rf ~/.companion/messages/my-team/ +rm -rf ~/.clanker/teams/my-team/ +rm -rf ~/.clanker/tasks/my-team/ +rm -rf ~/.clanker/messages/my-team/ ``` Or use the delete command: diff --git a/packages/companion-teams/docs/plans/2026-02-22-pi-teams-core-features.md b/packages/clanker-teams/docs/plans/2026-02-22-pi-teams-core-features.md similarity index 96% rename from packages/companion-teams/docs/plans/2026-02-22-pi-teams-core-features.md rename to packages/clanker-teams/docs/plans/2026-02-22-pi-teams-core-features.md index cb1da44..e14221c 100644 --- a/packages/companion-teams/docs/plans/2026-02-22-pi-teams-core-features.md +++ b/packages/clanker-teams/docs/plans/2026-02-22-pi-teams-core-features.md @@ -1,14 +1,14 @@ -# companion-teams Core Features Implementation Plan +# clanker-teams Core Features Implementation Plan > **REQUIRED SUB-SKILL:** Use the executing-plans skill to implement this plan task-by-task. -**Goal:** Implement Plan Approval Mode, Broadcast Messaging, and Quality Gate Hooks for the `companion-teams` repository to achieve functional parity with Claude Code Agent Teams. +**Goal:** Implement Plan Approval Mode, Broadcast Messaging, and Quality Gate Hooks for the `clanker-teams` repository to achieve functional parity with Claude Code Agent Teams. **Architecture:** - **Plan Approval**: Add a `planning` status to `TaskFile.status`. Create `task_submit_plan` and `task_evaluate_plan` tools. Lead can approve/reject. - **Broadcast Messaging**: Add a `broadcast_message` tool that iterates through the team roster in `config.json` and sends messages to all active members. -- **Quality Gate Hooks**: Introduce a simple hook system that triggers on `task_update` (specifically when status becomes `completed`). For now, it will look for a `.companion/team-hooks/task_completed.sh` or similar. +- **Quality Gate Hooks**: Introduce a simple hook system that triggers on `task_update` (specifically when status becomes `completed`). For now, it will look for a `.clanker/team-hooks/task_completed.sh` or similar. **Tech Stack:** Node.js, TypeScript, Vitest @@ -231,7 +231,7 @@ export function runHook( ): boolean { const hookPath = path.join( process.cwd(), - ".companion", + ".clanker", "team-hooks", `${hookName}.sh`, ); diff --git a/packages/companion-teams/docs/reference.md b/packages/clanker-teams/docs/reference.md similarity index 92% rename from packages/companion-teams/docs/reference.md rename to packages/clanker-teams/docs/reference.md index 34eb8e1..4bf0859 100644 --- a/packages/companion-teams/docs/reference.md +++ b/packages/clanker-teams/docs/reference.md @@ -1,4 +1,4 @@ -# companion-teams Tool Reference +# clanker-teams Tool Reference Complete documentation of all tools, parameters, and automated behavior. @@ -95,7 +95,7 @@ Launch a new agent into a terminal pane with a role and instructions. **Model Options**: -- Any model available in your companion configuration +- Any model available in your clanker configuration - Common models: `gpt-4o`, `haiku` (Anthropic), `glm-4.7`, `glm-5` (Zhipu AI) **Thinking Levels**: @@ -298,7 +298,7 @@ task_update({ }); ``` -**Note**: When status changes to `completed`, any hook script at `.companion/team-hooks/task_completed.sh` will automatically run. +**Note**: When status changes to `completed`, any hook script at `.clanker/team-hooks/task_completed.sh` will automatically run. --- @@ -477,9 +477,9 @@ This ensures teammates stay responsive to new tasks, messages, and task reassign ### Automated Hooks -When a task's status changes to `completed`, companion-teams automatically executes: +When a task's status changes to `completed`, clanker-teams automatically executes: -`.companion/team-hooks/task_completed.sh` +`.clanker/team-hooks/task_completed.sh` The hook receives the task data as a JSON string as the first argument. @@ -536,10 +536,10 @@ Task is removed from the active task list. Still preserved in data history. ### Data Storage -All companion-teams data is stored in your home directory under `~/.companion/`: +All clanker-teams data is stored in your home directory under `~/.clanker/`: ``` -~/.companion/ +~/.clanker/ ├── teams/ │ └── / │ └── config.json # Team configuration and member list @@ -618,11 +618,11 @@ All companion-teams data is stored in your home directory under `~/.companion/`: ## Environment Variables -companion-teams respects the following environment variables: +clanker-teams respects the following environment variables: - `ZELLIJ`: Automatically detected when running inside Zellij. Enables Zellij pane management. - `TMUX`: Automatically detected when running inside tmux. Enables tmux pane management. -- `COMPANION_DEFAULT_THINKING_LEVEL`: Default thinking level for spawned teammates if not specified (`off`, `minimal`, `low`, `medium`, `high`). +- `CLANKER_DEFAULT_THINKING_LEVEL`: Default thinking level for spawned teammates if not specified (`off`, `minimal`, `low`, `medium`, `high`). --- @@ -630,19 +630,19 @@ companion-teams respects the following environment variables: ### tmux Detection -If the `TMUX` environment variable is set, companion-teams uses `tmux split-window` to create panes. +If the `TMUX` environment variable is set, clanker-teams uses `tmux split-window` to create panes. **Layout**: Large lead pane on the left, teammates stacked on the right. ### Zellij Detection -If the `ZELLIJ` environment variable is set, companion-teams uses `zellij run` to create panes. +If the `ZELLIJ` environment variable is set, clanker-teams uses `zellij run` to create panes. **Layout**: Same as tmux - large lead pane on left, teammates on right. ### iTerm2 Detection -If neither tmux nor Zellij is detected, and you're on macOS with iTerm2, companion-teams uses AppleScript to split the window. +If neither tmux nor Zellij is detected, and you're on macOS with iTerm2, clanker-teams uses AppleScript to split the window. **Layout**: Same as tmux/Zellij - large lead pane on left, teammates on right. @@ -658,12 +658,12 @@ If neither tmux nor Zellij is detected, and you're on macOS with iTerm2, compani ### Lock Files -companion-teams uses lock files to prevent concurrent modifications: +clanker-teams uses lock files to prevent concurrent modifications: ``` -~/.companion/teams//.lock -~/.companion/tasks//.lock -~/.companion/messages//.lock +~/.clanker/teams//.lock +~/.clanker/tasks//.lock +~/.clanker/messages//.lock ``` If a lock file is stale (process no longer running), it's automatically removed after 60 seconds. @@ -678,7 +678,7 @@ If a lock file persists beyond 60 seconds, it's automatically cleaned up. For ma ```bash # Remove stale lock -rm ~/.companion/teams/my-team/.lock +rm ~/.clanker/teams/my-team/.lock ``` --- @@ -699,5 +699,5 @@ Messages are stored as JSON. For teams with extensive message history, consider ```bash # Archive old messages -mv ~/.companion/messages/my-team/ ~/.companion/messages-archive/my-team-2024-02-22/ +mv ~/.clanker/messages/my-team/ ~/.clanker/messages-archive/my-team-2024-02-22/ ``` diff --git a/packages/companion-teams/docs/terminal-app-research.md b/packages/clanker-teams/docs/terminal-app-research.md similarity index 99% rename from packages/companion-teams/docs/terminal-app-research.md rename to packages/clanker-teams/docs/terminal-app-research.md index c61918b..24242c0 100644 --- a/packages/companion-teams/docs/terminal-app-research.md +++ b/packages/clanker-teams/docs/terminal-app-research.md @@ -269,7 +269,7 @@ While not tested in this research, iTerm2 is known to have: ## Recommendations -### For the companion-teams Project +### For the clanker-teams Project **Primary Recommendation:** diff --git a/packages/companion-teams/docs/test-0.6.0.md b/packages/clanker-teams/docs/test-0.6.0.md similarity index 89% rename from packages/companion-teams/docs/test-0.6.0.md rename to packages/clanker-teams/docs/test-0.6.0.md index 7756098..33d248c 100644 --- a/packages/companion-teams/docs/test-0.6.0.md +++ b/packages/clanker-teams/docs/test-0.6.0.md @@ -39,7 +39,7 @@ Prompt: Test the shell-based hook system. First, create a hook script, then mark a task as completed. Prompt: -"Create a shell script at '.companion/team-hooks/task_completed.sh' that echoes the task ID and status to a file called 'hook_results.txt'. Then, mark task #1 as 'completed' and verify that 'hook_results.txt' has been created." +"Create a shell script at '.clanker/team-hooks/task_completed.sh' that echoes the task ID and status to a file called 'hook_results.txt'. Then, mark task #1 as 'completed' and verify that 'hook_results.txt' has been created." --- diff --git a/packages/companion-teams/docs/test-0.7.0.md b/packages/clanker-teams/docs/test-0.7.0.md similarity index 86% rename from packages/companion-teams/docs/test-0.7.0.md rename to packages/clanker-teams/docs/test-0.7.0.md index bb2675a..8053c88 100644 --- a/packages/companion-teams/docs/test-0.7.0.md +++ b/packages/clanker-teams/docs/test-0.7.0.md @@ -31,10 +31,10 @@ Prompt: ### 4. Test Environment Variable Propagation -Verify that the COMPANION_DEFAULT_THINKING_LEVEL environment variable is correctly set for each spawned process. +Verify that the CLANKER_DEFAULT_THINKING_LEVEL environment variable is correctly set for each spawned process. Prompt (run in terminal): -"Run 'ps aux | grep COMPANION_DEFAULT_THINKING_LEVEL' to check that the environment variables were passed to the spawned teammate processes." +"Run 'ps aux | grep CLANKER_DEFAULT_THINKING_LEVEL' to check that the environment variables were passed to the spawned teammate processes." --- @@ -43,7 +43,7 @@ Prompt (run in terminal): Create tasks appropriate for each teammate's thinking level. Prompt: -"Create a task for DeepThinker: 'Analyze the companion-teams codebase architecture and suggest improvements for scalability'. Set it to in_progress. +"Create a task for DeepThinker: 'Analyze the clanker-teams codebase architecture and suggest improvements for scalability'. Set it to in_progress. Create a task for FastWorker: 'List all TypeScript files in the src directory'. Set it to in_progress." --- diff --git a/packages/companion-teams/docs/vscode-terminal-research.md b/packages/clanker-teams/docs/vscode-terminal-research.md similarity index 90% rename from packages/companion-teams/docs/vscode-terminal-research.md rename to packages/clanker-teams/docs/vscode-terminal-research.md index 9cb1b01..91c068a 100644 --- a/packages/companion-teams/docs/vscode-terminal-research.md +++ b/packages/clanker-teams/docs/vscode-terminal-research.md @@ -2,13 +2,13 @@ ## Executive Summary -After researching VS Code and Cursor integrated terminal capabilities, **I recommend AGAINST implementing direct VS Code/Cursor terminal support for companion-teams at this time**. The fundamental issue is that VS Code does not provide a command-line API for spawning or managing terminal panes from within an integrated terminal. While a VS Code extension could theoretically provide this functionality, it would require users to install an additional extension and would not work "out of the box" like the current tmux/Zellij/iTerm2 solutions. +After researching VS Code and Cursor integrated terminal capabilities, **I recommend AGAINST implementing direct VS Code/Cursor terminal support for clanker-teams at this time**. The fundamental issue is that VS Code does not provide a command-line API for spawning or managing terminal panes from within an integrated terminal. While a VS Code extension could theoretically provide this functionality, it would require users to install an additional extension and would not work "out of the box" like the current tmux/Zellij/iTerm2 solutions. --- ## Research Scope -This document investigates whether companion-teams can work with VS Code and Cursor integrated terminals, specifically: +This document investigates whether clanker-teams can work with VS Code and Cursor integrated terminals, specifically: 1. Detecting when running inside VS Code/Cursor integrated terminal 2. Programmatically creating new terminal instances @@ -163,8 +163,8 @@ Extensions can register custom terminal profiles: "terminal": { "profiles": [ { - "title": "Companion Teams Terminal", - "id": "companion-teams-terminal" + "title": "Clanker Teams Terminal", + "id": "clanker-teams-terminal" } ] } @@ -172,10 +172,10 @@ Extensions can register custom terminal profiles: } // Register provider -vscode.window.registerTerminalProfileProvider('companion-teams-terminal', { +vscode.window.registerTerminalProfileProvider('clanker-teams-terminal', { provideTerminalProfile(token) { return { - name: "Companion Teams Agent", + name: "Clanker Teams Agent", shellPath: "bash", cwd: "/project/path" }; @@ -248,17 +248,17 @@ vscode.window.registerTerminalProfileProvider('companion-teams-terminal', { ### ⚠️ Approach 4: VS Code Extension (Partial Solution) -**Investigated**: Create a VS Code extension that companion-teams can communicate with +**Investigated**: Create a VS Code extension that clanker-teams can communicate with **Feasible Design**: -1. companion-teams detects VS Code environment (`TERM_PROGRAM=vscode`) -2. companion-teams spawns child processes that communicate with the extension +1. clanker-teams detects VS Code environment (`TERM_PROGRAM=vscode`) +2. clanker-teams spawns child processes that communicate with the extension 3. Extension receives requests and creates terminals via VS Code API **Communication Mechanisms**: -- **Local WebSocket server**: Extension starts server, companion-teams connects +- **Local WebSocket server**: Extension starts server, clanker-teams connects - **Named pipes/Unix domain sockets**: On Linux/macOS - **File system polling**: Write request files, extension reads them - **Local HTTP server**: Easier cross-platform @@ -267,15 +267,15 @@ vscode.window.registerTerminalProfileProvider('companion-teams-terminal', { ``` ┌─────────────┐ -│ companion-teams │ ← Running in integrated terminal +│ clanker-teams │ ← Running in integrated terminal │ (node.js) │ └──────┬──────┘ │ │ 1. HTTP POST /create-terminal - │ { name: "agent-1", cwd: "/path", command: "companion ..." } + │ { name: "agent-1", cwd: "/path", command: "clanker ..." } ↓ ┌───────────────────────────┐ -│ companion-teams VS Code Extension │ ← Running in extension host +│ clanker-teams VS Code Extension │ ← Running in extension host │ (TypeScript) │ └───────┬───────────────────┘ │ @@ -283,7 +283,7 @@ vscode.window.registerTerminalProfileProvider('companion-teams-terminal', { ↓ ┌───────────────────────────┐ │ VS Code Terminal Pane │ ← New terminal created -│ (running companion) │ +│ (running clanker) │ └───────────────────────────┘ ``` @@ -298,7 +298,7 @@ vscode.window.registerTerminalProfileProvider('companion-teams-terminal', { - ❌ Users must install extension (additional dependency) - ❌ Extension adds ~5-10MB to install -- ❌ Extension must be maintained alongside companion-teams +- ❌ Extension must be maintained alongside clanker-teams - ❌ Extension adds startup overhead - ❌ Extension permissions/security concerns - ❌ Not "plug and play" like tmux/Zellij @@ -307,7 +307,7 @@ vscode.window.registerTerminalProfileProvider('companion-teams-terminal', { --- -## 6. Comparison with Existing companion-teams Adapters +## 6. Comparison with Existing clanker-teams Adapters | Feature | tmux | Zellij | iTerm2 | VS Code (CLI) | VS Code (Extension) | | ----------------- | ------------------------ | ------------------------- | ------------------------ | --------------------- | ----------------------- | @@ -407,7 +407,7 @@ The fundamental blocker: **VS Code provides no command-line or shell interface f 1. **No native CLI support**: VS Code provides no command-line API for terminal management 2. **Extension required**: Would require users to install and configure an extension 3. **User friction**: Adds setup complexity vs. "just use tmux" -4. **Maintenance burden**: Extension must be maintained alongside companion-teams +4. **Maintenance burden**: Extension must be maintained alongside clanker-teams 5. **Limited benefit**: Users can simply run `tmux` inside VS Code integrated terminal 6. **Alternative exists**: tmux/Zellij work perfectly fine inside VS Code terminals @@ -417,9 +417,9 @@ The fundamental blocker: **VS Code provides no command-line or shell interface f ```bash # Option 1: Run tmux inside VS Code integrated terminal -tmux new -s companion-teams -companion create-team my-team -companion spawn-teammate ... +tmux new -s clanker-teams +clanker create-team my-team +clanker spawn-teammate ... # Option 2: Start tmux from terminal, then open VS Code tmux new -s my-session @@ -445,27 +445,27 @@ If there's strong user demand for native VS Code integration: #### Architecture ``` -1. companion-teams detects VS Code (TERM_PROGRAM=vscode) +1. clanker-teams detects VS Code (TERM_PROGRAM=vscode) -2. companion-teams spawns a lightweight HTTP server +2. clanker-teams spawns a lightweight HTTP server - Port: Random free port (e.g., 34567) - Endpoint: POST /create-terminal - Payload: { name, cwd, command, env } -3. User installs "companion-teams" VS Code extension +3. User installs "clanker-teams" VS Code extension - Extension starts HTTP client on activation - - Finds companion-teams server port via shared file or env var + - Finds clanker-teams server port via shared file or env var 4. Extension receives create-terminal requests - Calls vscode.window.createTerminal() - Returns terminal ID -5. companion-teams tracks terminal IDs via extension responses +5. clanker-teams tracks terminal IDs via extension responses ``` #### Implementation Sketch -**companion-teams (TypeScript)**: +**clanker-teams (TypeScript)**: ```typescript class VSCodeAdapter implements TerminalAdapter { @@ -482,7 +482,7 @@ class VSCodeAdapter implements TerminalAdapter { // Write request file const requestId = uuidv4(); await fs.writeFile( - `/tmp/companion-teams-request-${requestId}.json`, + `/tmp/clanker-teams-request-${requestId}.json`, JSON.stringify({ ...options, requestId }), ); @@ -514,7 +514,7 @@ export function activate(context: vscode.ExtensionContext) { // Watch for request files const watcher = vscode.workspace.createFileSystemWatcher( - "/tmp/companion-teams-request-*.json", + "/tmp/clanker-teams-request-*.json", ); watcher.onDidChange(async (uri) => { @@ -564,7 +564,7 @@ export function activate(context: vscode.ExtensionContext) { ### Could We Detect Existing Terminal Tabs? -**Investigated**: Can companion-teams detect existing VS Code terminal tabs and use them? +**Investigated**: Can clanker-teams detect existing VS Code terminal tabs and use them? **Findings**: @@ -639,9 +639,9 @@ export class VSCodeAdapter implements TerminalAdapter { spawn(options: SpawnOptions): string { throw new Error( "VS Code integrated terminals do not support spawning " + - "new terminals from command line. Please run companion-teams " + + "new terminals from command line. Please run clanker-teams " + "inside tmux, Zellij, or iTerm2 for terminal management. " + - "Alternatively, install the companion-teams VS Code extension " + + "Alternatively, install the clanker-teams VS Code extension " + "(if implemented).", ); } @@ -665,22 +665,22 @@ export class VSCodeAdapter implements TerminalAdapter { ``` ❌ Cannot spawn terminal in VS Code integrated terminal -companion-teams requires a terminal multiplexer to create multiple panes. +clanker-teams requires a terminal multiplexer to create multiple panes. For VS Code users, we recommend one of these options: Option 1: Run tmux inside VS Code integrated terminal ┌────────────────────────────────────────┐ - │ $ tmux new -s companion-teams │ - │ $ companion create-team my-team │ - │ $ companion spawn-teammate security-bot ... │ + │ $ tmux new -s clanker-teams │ + │ $ clanker create-team my-team │ + │ $ clanker spawn-teammate security-bot ... │ └────────────────────────────────────────┘ Option 2: Open VS Code from tmux session ┌────────────────────────────────────────┐ │ $ tmux new -s my-session │ │ $ code . │ - │ $ companion create-team my-team │ + │ $ clanker create-team my-team │ └────────────────────────────────────────┘ Option 3: Use a terminal with multiplexer support @@ -690,7 +690,7 @@ Option 3: Use a terminal with multiplexer support │ • Zellij - Install: cargo install ... │ └────────────────────────────────────────┘ -Learn more: https://github.com/your-org/companion-teams#terminal-support +Learn more: https://github.com/your-org/clanker-teams#terminal-support ``` --- @@ -717,7 +717,7 @@ For VS Code/Cursor users, recommend: ```bash # Option 1: Run tmux inside VS Code (simplest) -tmux new -s companion-teams +tmux new -s clanker-teams # Option 2: Start tmux first, then open VS Code tmux new -s dev @@ -726,19 +726,19 @@ code . ### Documentation Update -Add to companion-teams README.md: +Add to clanker-teams README.md: ````markdown -## Using companion-teams with VS Code or Cursor +## Using clanker-teams with VS Code or Cursor -companion-teams works great with VS Code and Cursor! Simply run tmux +clanker-teams works great with VS Code and Cursor! Simply run tmux or Zellij inside the integrated terminal: ```bash # Start tmux in VS Code integrated terminal -$ tmux new -s companion-teams -$ companion create-team my-team -$ companion spawn-teammate security-bot "Scan for vulnerabilities" +$ tmux new -s clanker-teams +$ clanker create-team my-team +$ clanker spawn-teammate security-bot "Scan for vulnerabilities" ``` ```` @@ -898,12 +898,12 @@ process.env.TERM_PROGRAM === 'iTerm.app' ```bash # Step 1: Start tmux -tmux new -s companion-teams +tmux new -s clanker-teams -# Step 2: Use companion-teams -companion create-team my-team -companion spawn-teammate frontend-dev -companion spawn-teammate backend-dev +# Step 2: Use clanker-teams +clanker create-team my-team +clanker spawn-teammate frontend-dev +clanker spawn-teammate backend-dev # Step 3: Enjoy multi-pane coordination ┌──────────────────┬──────────────────┬──────────────────┐ diff --git a/packages/companion-teams/extensions/index.ts b/packages/clanker-teams/extensions/index.ts similarity index 93% rename from packages/companion-teams/extensions/index.ts rename to packages/clanker-teams/extensions/index.ts index 3fe483b..6c3c5b6 100644 --- a/packages/companion-teams/extensions/index.ts +++ b/packages/clanker-teams/extensions/index.ts @@ -1,6 +1,6 @@ -import type { ExtensionAPI } from "@mariozechner/companion-coding-agent"; +import type { ExtensionAPI } from "@mariozechner/clanker-coding-agent"; import { Type } from "@sinclair/typebox"; -import { StringEnum } from "@mariozechner/companion-ai"; +import { StringEnum } from "@mariozechner/clanker-ai"; import * as paths from "../src/utils/paths"; import * as teams from "../src/utils/teams"; import * as tasks from "../src/utils/tasks"; @@ -19,7 +19,7 @@ let modelsCacheTime = 0; const MODELS_CACHE_TTL = 60000; // 1 minute /** - * Query available models from companion --list-models + * Query available models from clanker --list-models */ function getAvailableModels(): Array<{ provider: string; model: string }> { const now = Date.now(); @@ -28,7 +28,7 @@ function getAvailableModels(): Array<{ provider: string; model: string }> { } try { - const result = spawnSync("companion", ["--list-models"], { + const result = spawnSync("clanker", ["--list-models"], { encoding: "utf-8", timeout: 10000, }); @@ -142,14 +142,14 @@ function resolveModelWithProvider(modelName: string): string | null { return null; } -export default function (companion: ExtensionAPI) { - const isTeammate = !!process.env.COMPANION_AGENT_NAME; - const agentName = process.env.COMPANION_AGENT_NAME || "team-lead"; - const teamName = process.env.COMPANION_TEAM_NAME; +export default function (clanker: ExtensionAPI) { + const isTeammate = !!process.env.CLANKER_AGENT_NAME; + const agentName = process.env.CLANKER_AGENT_NAME || "team-lead"; + const teamName = process.env.CLANKER_TEAM_NAME; const terminal = getTerminalAdapter(); - companion.on("session_start", async (_event, ctx) => { + clanker.on("session_start", async (_event, ctx) => { paths.ensureDirs(); if (isTeammate) { if (teamName) { @@ -157,7 +157,7 @@ export default function (companion: ExtensionAPI) { fs.writeFileSync(pidFile, process.pid.toString()); } ctx.ui.notify(`Teammate: ${agentName} (Team: ${teamName})`, "info"); - ctx.ui.setStatus("00-companion-teams", `[${agentName.toUpperCase()}]`); + ctx.ui.setStatus("00-clanker-teams", `[${agentName.toUpperCase()}]`); if (terminal) { const fullTitle = teamName ? `${teamName}: ${agentName}` : agentName; @@ -172,7 +172,7 @@ export default function (companion: ExtensionAPI) { } setTimeout(() => { - companion.sendUserMessage( + clanker.sendUserMessage( `I am starting my work as '${agentName}' on team '${teamName}'. Checking my inbox for instructions...`, ); }, 1000); @@ -186,18 +186,18 @@ export default function (companion: ExtensionAPI) { false, ); if (unread.length > 0) { - companion.sendUserMessage( + clanker.sendUserMessage( `I have ${unread.length} new message(s) in my inbox. Reading them now...`, ); } } }, 30000); } else if (teamName) { - ctx.ui.setStatus("companion-teams", `Lead @ ${teamName}`); + ctx.ui.setStatus("clanker-teams", `Lead @ ${teamName}`); } }); - companion.on("turn_start", async (_event, ctx) => { + clanker.on("turn_start", async (_event, ctx) => { if (isTeammate) { const fullTitle = teamName ? `${teamName}: ${agentName}` : agentName; if ((ctx.ui as any).setTitle) (ctx.ui as any).setTitle(fullTitle); @@ -206,7 +206,7 @@ export default function (companion: ExtensionAPI) { }); let firstTurn = true; - companion.on("before_agent_start", async (event, ctx) => { + clanker.on("before_agent_start", async (event, ctx) => { if (isTeammate && firstTurn) { firstTurn = false; @@ -259,7 +259,7 @@ export default function (companion: ExtensionAPI) { } // Tools - companion.registerTool({ + clanker.registerTool({ name: "team_create", label: "Create Team", description: "Create a new agent team.", @@ -290,7 +290,7 @@ export default function (companion: ExtensionAPI) { }, }); - companion.registerTool({ + clanker.registerTool({ name: "spawn_teammate", label: "Spawn Teammate", description: "Spawn a new teammate in a terminal pane or separate window.", @@ -324,7 +324,7 @@ export default function (companion: ExtensionAPI) { // Resolve model to provider/model format if (chosenModel) { if (!chosenModel.includes("/")) { - // Try to resolve using available models from companion --list-models + // Try to resolve using available models from clanker --list-models const resolved = resolveModelWithProvider(chosenModel); if (resolved) { chosenModel = resolved; @@ -371,7 +371,7 @@ export default function (companion: ExtensionAPI) { "Initial prompt", ); - const piBinary = "companion"; + const piBinary = "clanker"; let piCmd = piBinary; if (chosenModel) { @@ -387,8 +387,8 @@ export default function (companion: ExtensionAPI) { const env: Record = { ...process.env, - COMPANION_TEAM_NAME: safeTeamName, - COMPANION_AGENT_NAME: safeName, + CLANKER_TEAM_NAME: safeTeamName, + CLANKER_AGENT_NAME: safeName, }; let terminalId = ""; @@ -452,7 +452,7 @@ export default function (companion: ExtensionAPI) { }, }); - companion.registerTool({ + clanker.registerTool({ name: "spawn_lead_window", label: "Spawn Lead Window", description: "Open the team lead in a separate OS window.", @@ -469,7 +469,7 @@ export default function (companion: ExtensionAPI) { const teamConfig = await teams.readConfig(safeTeamName); const cwd = params.cwd || process.cwd(); - const piBinary = "companion"; + const piBinary = "clanker"; let piCmd = piBinary; if (teamConfig.defaultModel) { // Use the combined --model provider/model format @@ -478,8 +478,8 @@ export default function (companion: ExtensionAPI) { const env = { ...process.env, - COMPANION_TEAM_NAME: safeTeamName, - COMPANION_AGENT_NAME: "team-lead", + CLANKER_TEAM_NAME: safeTeamName, + CLANKER_AGENT_NAME: "team-lead", }; try { const windowId = terminal.spawnWindow({ @@ -500,7 +500,7 @@ export default function (companion: ExtensionAPI) { }, }); - companion.registerTool({ + clanker.registerTool({ name: "send_message", label: "Send Message", description: "Send a message to a teammate.", @@ -527,7 +527,7 @@ export default function (companion: ExtensionAPI) { }, }); - companion.registerTool({ + clanker.registerTool({ name: "broadcast_message", label: "Broadcast Message", description: "Broadcast a message to all team members except the sender.", @@ -554,7 +554,7 @@ export default function (companion: ExtensionAPI) { }, }); - companion.registerTool({ + clanker.registerTool({ name: "read_inbox", label: "Read Inbox", description: "Read messages from an agent's inbox.", @@ -581,7 +581,7 @@ export default function (companion: ExtensionAPI) { }, }); - companion.registerTool({ + clanker.registerTool({ name: "task_create", label: "Create Task", description: "Create a new team task.", @@ -603,7 +603,7 @@ export default function (companion: ExtensionAPI) { }, }); - companion.registerTool({ + clanker.registerTool({ name: "task_submit_plan", label: "Submit Plan", description: "Submit a plan for a task, updating its status to 'planning'.", @@ -627,7 +627,7 @@ export default function (companion: ExtensionAPI) { }, }); - companion.registerTool({ + clanker.registerTool({ name: "task_evaluate_plan", label: "Evaluate Plan", description: "Evaluate a submitted plan for a task.", @@ -658,7 +658,7 @@ export default function (companion: ExtensionAPI) { }, }); - companion.registerTool({ + clanker.registerTool({ name: "task_list", label: "List Tasks", description: "List all tasks for a team.", @@ -674,7 +674,7 @@ export default function (companion: ExtensionAPI) { }, }); - companion.registerTool({ + clanker.registerTool({ name: "task_update", label: "Update Task", description: "Update a task's status or owner.", @@ -704,7 +704,7 @@ export default function (companion: ExtensionAPI) { }, }); - companion.registerTool({ + clanker.registerTool({ name: "team_shutdown", label: "Shutdown Team", description: "Shutdown the entire team and close all panes/windows.", @@ -732,7 +732,7 @@ export default function (companion: ExtensionAPI) { }, }); - companion.registerTool({ + clanker.registerTool({ name: "task_read", label: "Read Task", description: "Read details of a specific task.", @@ -749,7 +749,7 @@ export default function (companion: ExtensionAPI) { }, }); - companion.registerTool({ + clanker.registerTool({ name: "check_teammate", label: "Check Teammate", description: "Check a single teammate's status.", @@ -789,7 +789,7 @@ export default function (companion: ExtensionAPI) { }, }); - companion.registerTool({ + clanker.registerTool({ name: "process_shutdown_approved", label: "Process Shutdown Approved", description: "Process a teammate's shutdown.", diff --git a/packages/companion-teams/findings.md b/packages/clanker-teams/findings.md similarity index 100% rename from packages/companion-teams/findings.md rename to packages/clanker-teams/findings.md diff --git a/packages/companion-teams/iTerm2.png b/packages/clanker-teams/iTerm2.png similarity index 100% rename from packages/companion-teams/iTerm2.png rename to packages/clanker-teams/iTerm2.png diff --git a/packages/companion-teams/package-lock.json b/packages/clanker-teams/package-lock.json similarity index 100% rename from packages/companion-teams/package-lock.json rename to packages/clanker-teams/package-lock.json diff --git a/packages/companion-teams/package.json b/packages/clanker-teams/package.json similarity index 61% rename from packages/companion-teams/package.json rename to packages/clanker-teams/package.json index 1514dd7..31c863d 100644 --- a/packages/companion-teams/package.json +++ b/packages/clanker-teams/package.json @@ -1,15 +1,16 @@ { - "name": "companion-teams", + "name": "clanker-teams", "version": "0.8.6", - "description": "Agent teams for companion, ported from claude-code-teams-mcp", + "description": "Agent teams for clanker, ported from claude-code-teams-mcp", "repository": { "type": "git", - "url": "git+https://github.com/burggraf/companion-teams.git" + "url": "git+https://github.com/harivansh-afk/clanker-agent.git", + "directory": "packages/clanker-teams" }, "author": "Mark Burggraf", "license": "MIT", "keywords": [ - "companion-package" + "clanker-package" ], "scripts": { "test": "vitest run" @@ -26,11 +27,11 @@ "uuid": "^11.1.0" }, "peerDependencies": { - "@mariozechner/companion-coding-agent": "*", + "@harivansh-afk/clanker-coding-agent": "*", "@sinclair/typebox": "*" }, - "companion": { - "image": "https://raw.githubusercontent.com/burggraf/companion-teams/main/companion-team-in-action.png", + "clanker": { + "image": "https://raw.githubusercontent.com/burggraf/clanker-teams/main/clanker-team-in-action.png", "extensions": [ "extensions/index.ts" ], diff --git a/packages/companion-teams/pi-team-in-action.png b/packages/clanker-teams/pi-team-in-action.png similarity index 100% rename from packages/companion-teams/pi-team-in-action.png rename to packages/clanker-teams/pi-team-in-action.png diff --git a/packages/companion-teams/progress.md b/packages/clanker-teams/progress.md similarity index 100% rename from packages/companion-teams/progress.md rename to packages/clanker-teams/progress.md diff --git a/packages/companion-teams/publish-to-npm.sh b/packages/clanker-teams/publish-to-npm.sh similarity index 100% rename from packages/companion-teams/publish-to-npm.sh rename to packages/clanker-teams/publish-to-npm.sh diff --git a/packages/companion-teams/skills/teams.md b/packages/clanker-teams/skills/teams.md similarity index 100% rename from packages/companion-teams/skills/teams.md rename to packages/clanker-teams/skills/teams.md diff --git a/packages/companion-teams/src/adapters/cmux-adapter.ts b/packages/clanker-teams/src/adapters/cmux-adapter.ts similarity index 98% rename from packages/companion-teams/src/adapters/cmux-adapter.ts rename to packages/clanker-teams/src/adapters/cmux-adapter.ts index 9149910..c935d99 100644 --- a/packages/companion-teams/src/adapters/cmux-adapter.ts +++ b/packages/clanker-teams/src/adapters/cmux-adapter.ts @@ -26,7 +26,7 @@ export class CmuxAdapter implements TerminalAdapter { // Construct the command with environment variables const envPrefix = Object.entries(options.env) - .filter(([k]) => k.startsWith("COMPANION_")) + .filter(([k]) => k.startsWith("CLANKER_")) .map(([k, v]) => `${k}=${v}`) .join(" "); @@ -124,7 +124,7 @@ export class CmuxAdapter implements TerminalAdapter { // Wait a bit for the window to be ready? const envPrefix = Object.entries(options.env) - .filter(([k]) => k.startsWith("COMPANION_")) + .filter(([k]) => k.startsWith("CLANKER_")) .map(([k, v]) => `${k}=${v}`) .join(" "); diff --git a/packages/companion-teams/src/adapters/iterm2-adapter.ts b/packages/clanker-teams/src/adapters/iterm2-adapter.ts similarity index 98% rename from packages/companion-teams/src/adapters/iterm2-adapter.ts rename to packages/clanker-teams/src/adapters/iterm2-adapter.ts index 1f592f1..51442ae 100644 --- a/packages/companion-teams/src/adapters/iterm2-adapter.ts +++ b/packages/clanker-teams/src/adapters/iterm2-adapter.ts @@ -49,7 +49,7 @@ export class Iterm2Adapter implements TerminalAdapter { spawn(options: SpawnOptions): string { const envStr = Object.entries(options.env) - .filter(([k]) => k.startsWith("COMPANION_")) + .filter(([k]) => k.startsWith("CLANKER_")) .map(([k, v]) => `${k}=${v}`) .join(" "); @@ -186,7 +186,7 @@ end tell`; */ spawnWindow(options: SpawnOptions): string { const envStr = Object.entries(options.env) - .filter(([k]) => k.startsWith("COMPANION_")) + .filter(([k]) => k.startsWith("CLANKER_")) .map(([k, v]) => `${k}=${v}`) .join(" "); diff --git a/packages/companion-teams/src/adapters/terminal-registry.ts b/packages/clanker-teams/src/adapters/terminal-registry.ts similarity index 100% rename from packages/companion-teams/src/adapters/terminal-registry.ts rename to packages/clanker-teams/src/adapters/terminal-registry.ts diff --git a/packages/companion-teams/src/adapters/tmux-adapter.test.ts b/packages/clanker-teams/src/adapters/tmux-adapter.test.ts similarity index 90% rename from packages/companion-teams/src/adapters/tmux-adapter.test.ts rename to packages/clanker-teams/src/adapters/tmux-adapter.test.ts index f7b6d6e..5831d82 100644 --- a/packages/companion-teams/src/adapters/tmux-adapter.test.ts +++ b/packages/clanker-teams/src/adapters/tmux-adapter.test.ts @@ -60,8 +60,8 @@ describe("TmuxAdapter", () => { adapter.spawn({ name: "worker", cwd: "/tmp/project", - command: "companion", - env: { COMPANION_TEAM_NAME: "demo", COMPANION_AGENT_NAME: "worker" }, + command: "clanker", + env: { CLANKER_TEAM_NAME: "demo", CLANKER_AGENT_NAME: "worker" }, }), ).toBe("%1"); @@ -71,7 +71,7 @@ describe("TmuxAdapter", () => { "new-session", "-d", "-s", - "companion-teams-demo", + "clanker-teams-demo", ]), ); }); @@ -92,14 +92,14 @@ describe("TmuxAdapter", () => { adapter.spawn({ name: "worker", cwd: "/tmp/project", - command: "companion", - env: { COMPANION_TEAM_NAME: "demo", COMPANION_AGENT_NAME: "worker" }, + command: "clanker", + env: { CLANKER_TEAM_NAME: "demo", CLANKER_AGENT_NAME: "worker" }, }), ).toBe("%2"); expect(mockExecCommand).toHaveBeenCalledWith( "tmux", - expect.arrayContaining(["split-window", "-t", "companion-teams-demo:0"]), + expect.arrayContaining(["split-window", "-t", "clanker-teams-demo:0"]), ); }); diff --git a/packages/companion-teams/src/adapters/tmux-adapter.ts b/packages/clanker-teams/src/adapters/tmux-adapter.ts similarity index 96% rename from packages/companion-teams/src/adapters/tmux-adapter.ts rename to packages/clanker-teams/src/adapters/tmux-adapter.ts index 55e5398..122b76d 100644 --- a/packages/companion-teams/src/adapters/tmux-adapter.ts +++ b/packages/clanker-teams/src/adapters/tmux-adapter.ts @@ -25,12 +25,12 @@ export class TmuxAdapter implements TerminalAdapter { spawn(options: SpawnOptions): string { const envArgs = Object.entries(options.env) - .filter(([k]) => k.startsWith("COMPANION_")) + .filter(([k]) => k.startsWith("CLANKER_")) .map(([k, v]) => `${k}=${v}`); let targetWindow: string | null = null; if (!process.env.TMUX) { - const sessionName = `companion-teams-${options.env.COMPANION_TEAM_NAME || "default"}`; + const sessionName = `clanker-teams-${options.env.CLANKER_TEAM_NAME || "default"}`; targetWindow = `${sessionName}:0`; const hasSession = execCommand("tmux", [ "has-session", diff --git a/packages/companion-teams/src/adapters/wezterm-adapter.test.ts b/packages/clanker-teams/src/adapters/wezterm-adapter.test.ts similarity index 96% rename from packages/companion-teams/src/adapters/wezterm-adapter.test.ts rename to packages/clanker-teams/src/adapters/wezterm-adapter.test.ts index 7db2fa4..a9d05e2 100644 --- a/packages/companion-teams/src/adapters/wezterm-adapter.test.ts +++ b/packages/clanker-teams/src/adapters/wezterm-adapter.test.ts @@ -61,8 +61,8 @@ describe("WezTermAdapter", () => { const result = adapter.spawn({ name: "test-agent", cwd: "/home/user/project", - command: "companion --agent test", - env: { COMPANION_AGENT_ID: "test-123" }, + command: "clanker --agent test", + env: { CLANKER_AGENT_ID: "test-123" }, }); expect(result).toBe("wezterm_1"); @@ -101,7 +101,7 @@ describe("WezTermAdapter", () => { const result = adapter.spawn({ name: "agent2", cwd: "/home/user/project", - command: "companion", + command: "clanker", env: {}, }); diff --git a/packages/companion-teams/src/adapters/wezterm-adapter.ts b/packages/clanker-teams/src/adapters/wezterm-adapter.ts similarity index 98% rename from packages/companion-teams/src/adapters/wezterm-adapter.ts rename to packages/clanker-teams/src/adapters/wezterm-adapter.ts index 38ffeba..eb91976 100644 --- a/packages/companion-teams/src/adapters/wezterm-adapter.ts +++ b/packages/clanker-teams/src/adapters/wezterm-adapter.ts @@ -87,7 +87,7 @@ export class WezTermAdapter implements TerminalAdapter { const panes = this.getPanes(); const envArgs = Object.entries(options.env) - .filter(([k]) => k.startsWith("COMPANION_")) + .filter(([k]) => k.startsWith("CLANKER_")) .map(([k, v]) => `${k}=${v}`); let weztermArgs: string[]; @@ -211,7 +211,7 @@ export class WezTermAdapter implements TerminalAdapter { } const envArgs = Object.entries(options.env) - .filter(([k]) => k.startsWith("COMPANION_")) + .filter(([k]) => k.startsWith("CLANKER_")) .map(([k, v]) => `${k}=${v}`); // Format window title as "teamName: agentName" if teamName is provided diff --git a/packages/companion-teams/src/adapters/zellij-adapter.ts b/packages/clanker-teams/src/adapters/zellij-adapter.ts similarity index 97% rename from packages/companion-teams/src/adapters/zellij-adapter.ts rename to packages/clanker-teams/src/adapters/zellij-adapter.ts index 0ca7a62..fb0a67c 100644 --- a/packages/companion-teams/src/adapters/zellij-adapter.ts +++ b/packages/clanker-teams/src/adapters/zellij-adapter.ts @@ -30,7 +30,7 @@ export class ZellijAdapter implements TerminalAdapter { "--", "env", ...Object.entries(options.env) - .filter(([k]) => k.startsWith("COMPANION_")) + .filter(([k]) => k.startsWith("CLANKER_")) .map(([k, v]) => `${k}=${v}`), "sh", "-c", diff --git a/packages/companion-teams/src/utils/hooks.test.ts b/packages/clanker-teams/src/utils/hooks.test.ts similarity index 97% rename from packages/companion-teams/src/utils/hooks.test.ts rename to packages/clanker-teams/src/utils/hooks.test.ts index 1f1c68c..44a21cd 100644 --- a/packages/companion-teams/src/utils/hooks.test.ts +++ b/packages/clanker-teams/src/utils/hooks.test.ts @@ -4,7 +4,7 @@ import { afterAll, beforeAll, describe, expect, it, vi } from "vitest"; import { runHook } from "./hooks"; describe("runHook", () => { - const hooksDir = path.join(process.cwd(), ".companion", "team-hooks"); + const hooksDir = path.join(process.cwd(), ".clanker", "team-hooks"); beforeAll(() => { if (!fs.existsSync(hooksDir)) { diff --git a/packages/companion-teams/src/utils/hooks.ts b/packages/clanker-teams/src/utils/hooks.ts similarity index 87% rename from packages/companion-teams/src/utils/hooks.ts rename to packages/clanker-teams/src/utils/hooks.ts index 518f02d..46966f1 100644 --- a/packages/companion-teams/src/utils/hooks.ts +++ b/packages/clanker-teams/src/utils/hooks.ts @@ -7,7 +7,7 @@ const execFileAsync = promisify(execFile); /** * Runs a hook script asynchronously if it exists. - * Hooks are located in .companion/team-hooks/{hookName}.sh relative to the CWD. + * Hooks are located in .clanker/team-hooks/{hookName}.sh relative to the CWD. * * @param teamName The name of the team. * @param hookName The name of the hook to run (e.g., 'task_completed'). @@ -21,7 +21,7 @@ export async function runHook( ): Promise { const hookPath = path.join( process.cwd(), - ".companion", + ".clanker", "team-hooks", `${hookName}.sh`, ); @@ -34,7 +34,7 @@ export async function runHook( const payloadStr = JSON.stringify(payload); // Use execFile: More secure (no shell interpolation) and asynchronous await execFileAsync(hookPath, [payloadStr], { - env: { ...process.env, COMPANION_TEAM: teamName }, + env: { ...process.env, CLANKER_TEAM: teamName }, }); return true; } catch (error) { diff --git a/packages/companion-teams/src/utils/lock.race.test.ts b/packages/clanker-teams/src/utils/lock.race.test.ts similarity index 93% rename from packages/companion-teams/src/utils/lock.race.test.ts rename to packages/clanker-teams/src/utils/lock.race.test.ts index e447ce2..1800afe 100644 --- a/packages/companion-teams/src/utils/lock.race.test.ts +++ b/packages/clanker-teams/src/utils/lock.race.test.ts @@ -5,7 +5,7 @@ import { afterEach, beforeEach, describe, expect, it } from "vitest"; import { withLock } from "./lock"; describe("withLock race conditions", () => { - const testDir = path.join(os.tmpdir(), `companion-lock-race-test-${Date.now()}`); + const testDir = path.join(os.tmpdir(), `clanker-lock-race-test-${Date.now()}`); const lockPath = path.join(testDir, "test"); beforeEach(() => { diff --git a/packages/companion-teams/src/utils/lock.test.ts b/packages/clanker-teams/src/utils/lock.test.ts similarity index 93% rename from packages/companion-teams/src/utils/lock.test.ts rename to packages/clanker-teams/src/utils/lock.test.ts index fd21138..73de80a 100644 --- a/packages/companion-teams/src/utils/lock.test.ts +++ b/packages/clanker-teams/src/utils/lock.test.ts @@ -1,4 +1,4 @@ -// Project: companion-teams +// Project: clanker-teams import fs from "node:fs"; import os from "node:os"; @@ -7,7 +7,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; import { withLock } from "./lock"; describe("withLock", () => { - const testDir = path.join(os.tmpdir(), `companion-lock-test-${Date.now()}`); + const testDir = path.join(os.tmpdir(), `clanker-lock-test-${Date.now()}`); const lockPath = path.join(testDir, "test"); const lockFile = `${lockPath}.lock`; diff --git a/packages/companion-teams/src/utils/lock.ts b/packages/clanker-teams/src/utils/lock.ts similarity index 97% rename from packages/companion-teams/src/utils/lock.ts rename to packages/clanker-teams/src/utils/lock.ts index c1f64bb..0bfd926 100644 --- a/packages/companion-teams/src/utils/lock.ts +++ b/packages/clanker-teams/src/utils/lock.ts @@ -1,4 +1,4 @@ -// Project: companion-teams +// Project: clanker-teams import fs from "node:fs"; const STALE_LOCK_TIMEOUT = 30000; // 30 seconds for a lock to be considered stale diff --git a/packages/companion-teams/src/utils/messaging.test.ts b/packages/clanker-teams/src/utils/messaging.test.ts similarity index 97% rename from packages/companion-teams/src/utils/messaging.test.ts rename to packages/clanker-teams/src/utils/messaging.test.ts index 83aab39..1c29640 100644 --- a/packages/companion-teams/src/utils/messaging.test.ts +++ b/packages/clanker-teams/src/utils/messaging.test.ts @@ -11,7 +11,7 @@ import { import * as paths from "./paths"; // Mock the paths to use a temporary directory -const testDir = path.join(os.tmpdir(), `companion-teams-test-${Date.now()}`); +const testDir = path.join(os.tmpdir(), `clanker-teams-test-${Date.now()}`); describe("Messaging Utilities", () => { beforeEach(() => { diff --git a/packages/companion-teams/src/utils/messaging.ts b/packages/clanker-teams/src/utils/messaging.ts similarity index 100% rename from packages/companion-teams/src/utils/messaging.ts rename to packages/clanker-teams/src/utils/messaging.ts diff --git a/packages/companion-teams/src/utils/models.ts b/packages/clanker-teams/src/utils/models.ts similarity index 100% rename from packages/companion-teams/src/utils/models.ts rename to packages/clanker-teams/src/utils/models.ts diff --git a/packages/companion-teams/src/utils/paths.ts b/packages/clanker-teams/src/utils/paths.ts similarity index 80% rename from packages/companion-teams/src/utils/paths.ts rename to packages/clanker-teams/src/utils/paths.ts index 7bdbb4a..ea2266f 100644 --- a/packages/companion-teams/src/utils/paths.ts +++ b/packages/clanker-teams/src/utils/paths.ts @@ -2,12 +2,12 @@ import fs from "node:fs"; import os from "node:os"; import path from "node:path"; -export const COMPANION_DIR = path.join(os.homedir(), ".companion"); -export const TEAMS_DIR = path.join(COMPANION_DIR, "teams"); -export const TASKS_DIR = path.join(COMPANION_DIR, "tasks"); +export const CLANKER_DIR = path.join(os.homedir(), ".clanker"); +export const TEAMS_DIR = path.join(CLANKER_DIR, "teams"); +export const TASKS_DIR = path.join(CLANKER_DIR, "tasks"); export function ensureDirs() { - if (!fs.existsSync(COMPANION_DIR)) fs.mkdirSync(COMPANION_DIR); + if (!fs.existsSync(CLANKER_DIR)) fs.mkdirSync(CLANKER_DIR); if (!fs.existsSync(TEAMS_DIR)) fs.mkdirSync(TEAMS_DIR); if (!fs.existsSync(TASKS_DIR)) fs.mkdirSync(TASKS_DIR); } diff --git a/packages/companion-teams/src/utils/security.test.ts b/packages/clanker-teams/src/utils/security.test.ts similarity index 85% rename from packages/companion-teams/src/utils/security.test.ts rename to packages/clanker-teams/src/utils/security.test.ts index b2c6828..acb40c2 100644 --- a/packages/companion-teams/src/utils/security.test.ts +++ b/packages/clanker-teams/src/utils/security.test.ts @@ -26,13 +26,13 @@ describe("Security Audit - Command Injection (Fixed)", () => { const maliciousCwd = "; rm -rf / ;"; const name = "attacker"; const team_name = "audit-team"; - const piBinary = "companion"; - const cmd = `COMPANION_TEAM_NAME=${team_name} COMPANION_AGENT_NAME=${name} ${piBinary}`; + const piBinary = "clanker"; + const cmd = `CLANKER_TEAM_NAME=${team_name} CLANKER_AGENT_NAME=${name} ${piBinary}`; // Simulating what happens in spawn_teammate (extensions/index.ts) const itermCmd = `cd '${maliciousCwd}' && ${cmd}`; - // The command becomes: cd '; rm -rf / ;' && COMPANION_TEAM_NAME=audit-team COMPANION_AGENT_NAME=attacker companion + // The command becomes: cd '; rm -rf / ;' && CLANKER_TEAM_NAME=audit-team CLANKER_AGENT_NAME=attacker clanker expect(itermCmd).toContain("cd '; rm -rf / ;' &&"); expect(itermCmd).not.toContain("cd ; rm -rf / ; &&"); }); diff --git a/packages/companion-teams/src/utils/tasks.race.test.ts b/packages/clanker-teams/src/utils/tasks.race.test.ts similarity index 95% rename from packages/companion-teams/src/utils/tasks.race.test.ts rename to packages/clanker-teams/src/utils/tasks.race.test.ts index eb768af..9a5a960 100644 --- a/packages/companion-teams/src/utils/tasks.race.test.ts +++ b/packages/clanker-teams/src/utils/tasks.race.test.ts @@ -5,7 +5,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; import * as paths from "./paths"; import { createTask } from "./tasks"; -const testDir = path.join(os.tmpdir(), `companion-tasks-race-test-${Date.now()}`); +const testDir = path.join(os.tmpdir(), `clanker-tasks-race-test-${Date.now()}`); describe("Tasks Race Condition Bug", () => { beforeEach(() => { diff --git a/packages/companion-teams/src/utils/tasks.test.ts b/packages/clanker-teams/src/utils/tasks.test.ts similarity index 98% rename from packages/companion-teams/src/utils/tasks.test.ts rename to packages/clanker-teams/src/utils/tasks.test.ts index d4b5205..f9588bc 100644 --- a/packages/companion-teams/src/utils/tasks.test.ts +++ b/packages/clanker-teams/src/utils/tasks.test.ts @@ -1,4 +1,4 @@ -// Project: companion-teams +// Project: clanker-teams import fs from "node:fs"; import os from "node:os"; @@ -15,7 +15,7 @@ import { } from "./tasks"; // Mock the paths to use a temporary directory -const testDir = path.join(os.tmpdir(), `companion-teams-test-${Date.now()}`); +const testDir = path.join(os.tmpdir(), `clanker-teams-test-${Date.now()}`); describe("Tasks Utilities", () => { beforeEach(() => { diff --git a/packages/companion-teams/src/utils/tasks.ts b/packages/clanker-teams/src/utils/tasks.ts similarity index 99% rename from packages/companion-teams/src/utils/tasks.ts rename to packages/clanker-teams/src/utils/tasks.ts index 72fd0d7..0992c11 100644 --- a/packages/companion-teams/src/utils/tasks.ts +++ b/packages/clanker-teams/src/utils/tasks.ts @@ -1,4 +1,4 @@ -// Project: companion-teams +// Project: clanker-teams import fs from "node:fs"; import path from "node:path"; import { runHook } from "./hooks"; diff --git a/packages/companion-teams/src/utils/teams.ts b/packages/clanker-teams/src/utils/teams.ts similarity index 100% rename from packages/companion-teams/src/utils/teams.ts rename to packages/clanker-teams/src/utils/teams.ts diff --git a/packages/companion-teams/src/utils/terminal-adapter.ts b/packages/clanker-teams/src/utils/terminal-adapter.ts similarity index 100% rename from packages/companion-teams/src/utils/terminal-adapter.ts rename to packages/clanker-teams/src/utils/terminal-adapter.ts diff --git a/packages/companion-teams/task_plan.md b/packages/clanker-teams/task_plan.md similarity index 99% rename from packages/companion-teams/task_plan.md rename to packages/clanker-teams/task_plan.md index 0d24271..658cc45 100644 --- a/packages/companion-teams/task_plan.md +++ b/packages/clanker-teams/task_plan.md @@ -1,4 +1,4 @@ -# Implementation Plan: Separate Windows Mode for companion-teams +# Implementation Plan: Separate Windows Mode for clanker-teams ## Goal diff --git a/packages/companion-teams/tmux.png b/packages/clanker-teams/tmux.png similarity index 100% rename from packages/companion-teams/tmux.png rename to packages/clanker-teams/tmux.png diff --git a/packages/companion-teams/tsconfig.json b/packages/clanker-teams/tsconfig.json similarity index 100% rename from packages/companion-teams/tsconfig.json rename to packages/clanker-teams/tsconfig.json diff --git a/packages/companion-teams/zellij.png b/packages/clanker-teams/zellij.png similarity index 100% rename from packages/companion-teams/zellij.png rename to packages/clanker-teams/zellij.png diff --git a/packages/coding-agent/README.md b/packages/coding-agent/README.md index ed842ea..b72faeb 100644 --- a/packages/coding-agent/README.md +++ b/packages/coding-agent/README.md @@ -1,24 +1,24 @@

- - companion logo + + clanker logo

Discord - npm - Build status + npm + Build status

- companion.dev domain graciously donated by + clanker.dev domain graciously donated by

Exy mascot
exe.dev

-Companion is a minimal terminal coding harness. Adapt companion to your workflows, not the other way around, without having to fork and modify companion internals. Extend it with TypeScript [Extensions](#extensions), [Skills](#skills), [Prompt Templates](#prompt-templates), and [Themes](#themes). Put your extensions, skills, prompt templates, and themes in [Companion Packages](#companion-packages) and share them with others via npm or git. +Clanker is a minimal terminal coding harness. Adapt clanker to your workflows, not the other way around, without having to fork and modify clanker internals. Extend it with TypeScript [Extensions](#extensions), [Skills](#skills), [Prompt Templates](#prompt-templates), and [Themes](#themes). Put your extensions, skills, prompt templates, and themes in [Clanker Packages](#clanker-packages) and share them with others via npm or git. -Companion ships with powerful defaults but skips features like sub agents and plan mode. Instead, you can ask companion to build what you want or install a third party companion package that matches your workflow. +Clanker ships with powerful defaults but skips features like sub agents and plan mode. Instead, you can ask clanker to build what you want or install a third party clanker package that matches your workflow. -Companion runs in four modes: interactive, print or JSON, RPC for process integration, and an SDK for embedding in your own apps. See [openclaw/openclaw](https://github.com/openclaw/openclaw) for a real-world SDK integration. +Clanker runs in four modes: interactive, print or JSON, RPC for process integration, and an SDK for embedding in your own apps. See [openclaw/openclaw](https://github.com/openclaw/openclaw) for a real-world SDK integration. ## Table of Contents @@ -39,7 +39,7 @@ Companion runs in four modes: interactive, print or JSON, RPC for process integr - [Skills](#skills) - [Extensions](#extensions) - [Themes](#themes) - - [Companion Packages](#companion-packages) + - [Clanker Packages](#clanker-packages) - [Programmatic Usage](#programmatic-usage) - [Philosophy](#philosophy) - [CLI Reference](#cli-reference) @@ -49,24 +49,24 @@ Companion runs in four modes: interactive, print or JSON, RPC for process integr ## Quick Start ```bash -npm install -g @mariozechner/companion-coding-agent +npm install -g @mariozechner/clanker-coding-agent ``` Authenticate with an API key: ```bash export ANTHROPIC_API_KEY=sk-ant-... -companion +clanker ``` Or use your existing subscription: ```bash -companion +clanker /login # Then select provider ``` -Then just talk to companion. By default, companion gives the model four tools: `read`, `write`, `edit`, and `bash`. The model uses these to fulfill your requests. Add capabilities via [skills](#skills), [prompt templates](#prompt-templates), [extensions](#extensions), or [companion packages](#companion-packages). +Then just talk to clanker. By default, clanker gives the model four tools: `read`, `write`, `edit`, and `bash`. The model uses these to fulfill your requests. Add capabilities via [skills](#skills), [prompt templates](#prompt-templates), [extensions](#extensions), or [clanker packages](#clanker-packages). **Platform notes:** [Windows](docs/windows.md) | [Termux (Android)](docs/termux.md) | [Terminal setup](docs/terminal-setup.md) | [Shell aliases](docs/shell-aliases.md) @@ -74,7 +74,7 @@ Then just talk to companion. By default, companion gives the model four tools: ` ## Providers & Models -For each built-in provider, companion maintains a list of tool-capable models, updated with every release. Authenticate via subscription (`/login`) or API key, then select any model from that provider via `/model` (or Ctrl+L). +For each built-in provider, clanker maintains a list of tool-capable models, updated with every release. Authenticate via subscription (`/login`) or API key, then select any model from that provider via `/model` (or Ctrl+L). **Subscriptions:** @@ -107,7 +107,7 @@ For each built-in provider, companion maintains a list of tool-capable models, u See [docs/providers.md](docs/providers.md) for detailed setup instructions. -**Custom providers & models:** Add providers via `~/.companion/agent/models.json` if they speak a supported API (OpenAI, Anthropic, Google). For custom APIs or OAuth, use extensions. See [docs/models.md](docs/models.md) and [docs/custom-provider.md](docs/custom-provider.md). +**Custom providers & models:** Add providers via `~/.clanker/agent/models.json` if they speak a supported API (OpenAI, Anthropic, Google). For custom APIs or OAuth, use extensions. See [docs/models.md](docs/models.md) and [docs/custom-provider.md](docs/custom-provider.md). --- @@ -159,11 +159,11 @@ Type `/` in the editor to trigger commands. [Extensions](#extensions) can regist | `/reload` | Reload extensions, skills, prompts, context files (themes hot-reload automatically) | | `/hotkeys` | Show all keyboard shortcuts | | `/changelog` | Display version history | -| `/quit`, `/exit` | Quit companion | +| `/quit`, `/exit` | Quit clanker | ### Keyboard Shortcuts -See `/hotkeys` for the full list. Customize via `~/.companion/agent/keybindings.json`. See [docs/keybindings.md](docs/keybindings.md). +See `/hotkeys` for the full list. Customize via `~/.clanker/agent/keybindings.json`. See [docs/keybindings.md](docs/keybindings.md). **Commonly used:** @@ -198,13 +198,13 @@ Sessions are stored as JSONL files with a tree structure. Each entry has an `id` ### Management -Sessions auto-save to `~/.companion/agent/sessions/` organized by working directory. +Sessions auto-save to `~/.clanker/agent/sessions/` organized by working directory. ```bash -companion -c # Continue most recent session -companion -r # Browse and select from past sessions -companion --no-session # Ephemeral mode (don't save) -companion --session # Use specific session file or ID +clanker -c # Continue most recent session +clanker -r # Browse and select from past sessions +clanker --no-session # Ephemeral mode (don't save) +clanker --session # Use specific session file or ID ``` ### Branching @@ -237,8 +237,8 @@ Use `/settings` to modify common options, or edit JSON files directly: | Location | Scope | | --------------------------- | -------------------------- | -| `~/.companion/agent/settings.json` | Global (all projects) | -| `.companion/settings.json` | Project (overrides global) | +| `~/.clanker/agent/settings.json` | Global (all projects) | +| `.clanker/settings.json` | Project (overrides global) | See [docs/settings.md](docs/settings.md) for all options. @@ -246,9 +246,9 @@ See [docs/settings.md](docs/settings.md) for all options. ## Context Files -Companion loads `AGENTS.md` (or `CLAUDE.md`) at startup from: +Clanker loads `AGENTS.md` (or `CLAUDE.md`) at startup from: -- `~/.companion/agent/AGENTS.md` (global) +- `~/.clanker/agent/AGENTS.md` (global) - Parent directories (walking up from cwd) - Current directory @@ -256,7 +256,7 @@ Use for project instructions, conventions, common commands. All matching files a ### System Prompt -Replace the default system prompt with `.companion/SYSTEM.md` (project) or `~/.companion/agent/SYSTEM.md` (global). Append without replacing via `APPEND_SYSTEM.md`. +Replace the default system prompt with `.clanker/SYSTEM.md` (project) or `~/.clanker/agent/SYSTEM.md` (global). Append without replacing via `APPEND_SYSTEM.md`. --- @@ -267,20 +267,20 @@ Replace the default system prompt with `.companion/SYSTEM.md` (project) or `~/.c Reusable prompts as Markdown files. Type `/name` to expand. ```markdown - + Review this code for bugs, security issues, and performance problems. Focus on: {{focus}} ``` -Place in `~/.companion/agent/prompts/`, `.companion/prompts/`, or a [companion package](#companion-packages) to share with others. See [docs/prompt-templates.md](docs/prompt-templates.md). +Place in `~/.clanker/agent/prompts/`, `.clanker/prompts/`, or a [clanker package](#clanker-packages) to share with others. See [docs/prompt-templates.md](docs/prompt-templates.md). ### Skills On-demand capability packages following the [Agent Skills standard](https://agentskills.io). Invoke via `/skill:name` or let the agent load them automatically. ```markdown - + # My Skill @@ -292,19 +292,19 @@ Use this skill when the user asks about X. 2. Then that ``` -Place in `~/.companion/agent/skills/`, `~/.agents/skills/`, `.companion/skills/`, or `.agents/skills/` (from `cwd` up through parent directories) or a [companion package](#companion-packages) to share with others. See [docs/skills.md](docs/skills.md). +Place in `~/.clanker/agent/skills/`, `~/.agents/skills/`, `.clanker/skills/`, or `.agents/skills/` (from `cwd` up through parent directories) or a [clanker package](#clanker-packages) to share with others. See [docs/skills.md](docs/skills.md). ### Extensions

Doom Extension

-TypeScript modules that extend companion with custom tools, commands, keyboard shortcuts, event handlers, and UI components. +TypeScript modules that extend clanker with custom tools, commands, keyboard shortcuts, event handlers, and UI components. ```typescript -export default function (companion: ExtensionAPI) { - companion.registerTool({ name: "deploy", ... }); - companion.registerCommand("stats", { ... }); - companion.on("tool_call", async (event, ctx) => { ... }); +export default function (clanker: ExtensionAPI) { + clanker.registerTool({ name: "deploy", ... }); + clanker.registerCommand("stats", { ... }); + clanker.on("tool_call", async (event, ctx) => { ... }); } ``` @@ -319,50 +319,50 @@ export default function (companion: ExtensionAPI) { - Git checkpointing and auto-commit - SSH and sandbox execution - MCP server integration -- Make companion look like Claude Code +- Make clanker look like Claude Code - Games while waiting (yes, Doom runs) - ...anything you can dream up -Place in `~/.companion/agent/extensions/`, `.companion/extensions/`, or a [companion package](#companion-packages) to share with others. See [docs/extensions.md](docs/extensions.md). +Place in `~/.clanker/agent/extensions/`, `.clanker/extensions/`, or a [clanker package](#clanker-packages) to share with others. See [docs/extensions.md](docs/extensions.md). ### Themes -Built-in: `dark`, `light`. Themes hot-reload: modify the active theme file and companion immediately applies changes. +Built-in: `dark`, `light`. Themes hot-reload: modify the active theme file and clanker immediately applies changes. -Place in `~/.companion/agent/themes/`, `.companion/themes/`, or a [companion package](#companion-packages) to share with others. See [docs/themes.md](docs/themes.md). +Place in `~/.clanker/agent/themes/`, `.clanker/themes/`, or a [clanker package](#clanker-packages) to share with others. See [docs/themes.md](docs/themes.md). -### Companion Packages +### Clanker Packages -Bundle and share extensions, skills, prompts, and themes via npm or git. Find packages on [npmjs.com](https://www.npmjs.com/search?q=keywords%3Acompanion-package) or [Discord](https://discord.com/channels/1456806362351669492/1457744485428629628). +Bundle and share extensions, skills, prompts, and themes via npm or git. Find packages on [npmjs.com](https://www.npmjs.com/search?q=keywords%3Aclanker-package) or [Discord](https://discord.com/channels/1456806362351669492/1457744485428629628). -> **Security:** Companion packages run with full system access. Extensions execute arbitrary code, and skills can instruct the model to perform any action including running executables. Review source code before installing third-party packages. +> **Security:** Clanker packages run with full system access. Extensions execute arbitrary code, and skills can instruct the model to perform any action including running executables. Review source code before installing third-party packages. ```bash -companion install npm:@foo/companion-tools -companion install npm:@foo/companion-tools@1.2.3 # pinned version -companion install git:github.com/user/repo -companion install git:github.com/user/repo@v1 # tag or commit -companion install git:git@github.com:user/repo -companion install git:git@github.com:user/repo@v1 # tag or commit -companion install https://github.com/user/repo -companion install https://github.com/user/repo@v1 # tag or commit -companion install ssh://git@github.com/user/repo -companion install ssh://git@github.com/user/repo@v1 # tag or commit -companion remove npm:@foo/companion-tools -companion list -companion update # skips pinned packages -companion config # enable/disable extensions, skills, prompts, themes +clanker install npm:@foo/clanker-tools +clanker install npm:@foo/clanker-tools@1.2.3 # pinned version +clanker install git:github.com/user/repo +clanker install git:github.com/user/repo@v1 # tag or commit +clanker install git:git@github.com:user/repo +clanker install git:git@github.com:user/repo@v1 # tag or commit +clanker install https://github.com/user/repo +clanker install https://github.com/user/repo@v1 # tag or commit +clanker install ssh://git@github.com/user/repo +clanker install ssh://git@github.com/user/repo@v1 # tag or commit +clanker remove npm:@foo/clanker-tools +clanker list +clanker update # skips pinned packages +clanker config # enable/disable extensions, skills, prompts, themes ``` -Packages install to `~/.companion/agent/git/` (git) or global npm. Use `-l` for project-local installs (`.companion/git/`, `.companion/npm/`). +Packages install to `~/.clanker/agent/git/` (git) or global npm. Use `-l` for project-local installs (`.clanker/git/`, `.clanker/npm/`). -Create a package by adding a `companion` key to `package.json`: +Create a package by adding a `clanker` key to `package.json`: ```json { - "name": "my-companion-package", - "keywords": ["companion-package"], - "companion": { + "name": "my-clanker-package", + "keywords": ["clanker-package"], + "clanker": { "extensions": ["./extensions"], "skills": ["./skills"], "prompts": ["./prompts"], @@ -371,7 +371,7 @@ Create a package by adding a `companion` key to `package.json`: } ``` -Without a `companion` manifest, companion auto-discovers from conventional directories (`extensions/`, `skills/`, `prompts/`, `themes/`). +Without a `clanker` manifest, clanker auto-discovers from conventional directories (`extensions/`, `skills/`, `prompts/`, `themes/`). See [docs/packages.md](docs/packages.md). @@ -387,7 +387,7 @@ import { createAgentSession, ModelRegistry, SessionManager, -} from "@mariozechner/companion-coding-agent"; +} from "@mariozechner/clanker-coding-agent"; const { session } = await createAgentSession({ sessionManager: SessionManager.inMemory(), @@ -405,7 +405,7 @@ See [docs/sdk.md](docs/sdk.md). For non-Node.js integrations, use RPC mode over stdin/stdout: ```bash -companion --mode rpc +clanker --mode rpc ``` See [docs/rpc.md](docs/rpc.md) for the protocol. @@ -414,11 +414,11 @@ See [docs/rpc.md](docs/rpc.md) for the protocol. ## Philosophy -Companion is aggressively extensible so it doesn't have to dictate your workflow. Features that other tools bake in can be built with [extensions](#extensions), [skills](#skills), or installed from third-party [companion packages](#companion-packages). This keeps the core minimal while letting you shape companion to fit how you work. +Clanker is aggressively extensible so it doesn't have to dictate your workflow. Features that other tools bake in can be built with [extensions](#extensions), [skills](#skills), or installed from third-party [clanker packages](#clanker-packages). This keeps the core minimal while letting you shape clanker to fit how you work. **No MCP.** Build CLI tools with READMEs (see [Skills](#skills)), or build an extension that adds MCP support. [Why?](https://mariozechner.at/posts/2025-11-02-what-if-you-dont-need-mcp/) -**No sub-agents.** There's many ways to do this. Spawn companion instances via tmux, or build your own with [extensions](#extensions), or install a package that does it your way. +**No sub-agents.** There's many ways to do this. Spawn clanker instances via tmux, or build your own with [extensions](#extensions), or install a package that does it your way. **No permission popups.** Run in a container, or build your own confirmation flow with [extensions](#extensions) inline with your environment and security requirements. @@ -428,24 +428,24 @@ Companion is aggressively extensible so it doesn't have to dictate your workflow **No background bash.** Use tmux. Full observability, direct interaction. -Read the [blog post](https://mariozechner.at/posts/2025-11-30-companion-coding-agent/) for the full rationale. +Read the [blog post](https://mariozechner.at/posts/2025-11-30-clanker-coding-agent/) for the full rationale. --- ## CLI Reference ```bash -companion [options] [@files...] [messages...] +clanker [options] [@files...] [messages...] ``` ### Package Commands ```bash -companion install [-l] # Install package, -l for project-local -companion remove [-l] # Remove package -companion update [source] # Update packages (skips pinned) -companion list # List installed packages -companion config # Enable/disable package resources +clanker install [-l] # Install package, -l for project-local +clanker remove [-l] # Remove package +clanker update [source] # Update packages (skips pinned) +clanker list # List installed packages +clanker config # Enable/disable package resources ``` ### Modes @@ -519,47 +519,47 @@ Combine `--no-*` with explicit flags to load exactly what you need, ignoring set Prefix files with `@` to include in the message: ```bash -companion @prompt.md "Answer this" -companion -p @screenshot.png "What's in this image?" -companion @code.ts @test.ts "Review these files" +clanker @prompt.md "Answer this" +clanker -p @screenshot.png "What's in this image?" +clanker @code.ts @test.ts "Review these files" ``` ### Examples ```bash # Interactive with initial prompt -companion "List all .ts files in src/" +clanker "List all .ts files in src/" # Non-interactive -companion -p "Summarize this codebase" +clanker -p "Summarize this codebase" # Different model -companion --provider openai --model gpt-4o "Help me refactor" +clanker --provider openai --model gpt-4o "Help me refactor" # Model with provider prefix (no --provider needed) -companion --model openai/gpt-4o "Help me refactor" +clanker --model openai/gpt-4o "Help me refactor" # Model with thinking level shorthand -companion --model sonnet:high "Solve this complex problem" +clanker --model sonnet:high "Solve this complex problem" # Limit model cycling -companion --models "claude-*,gpt-4o" +clanker --models "claude-*,gpt-4o" # Read-only mode -companion --tools read,grep,find,ls -p "Review the code" +clanker --tools read,grep,find,ls -p "Review the code" # High thinking level -companion --thinking high "Solve this complex problem" +clanker --thinking high "Solve this complex problem" ``` ### Environment Variables | Variable | Description | | ----------------------- | ---------------------------------------------------------------------------------- | -| `COMPANION_CODING_AGENT_DIR` | Override config directory (default: `~/.companion/agent`) | -| `COMPANION_PACKAGE_DIR` | Override package directory (useful for Nix/Guix where store paths tokenize poorly) | -| `COMPANION_SKIP_VERSION_CHECK` | Skip version check at startup | -| `COMPANION_CACHE_RETENTION` | Set to `long` for extended prompt cache (Anthropic: 1h, OpenAI: 24h) | +| `CLANKER_CODING_AGENT_DIR` | Override config directory (default: `~/.clanker/agent`) | +| `CLANKER_PACKAGE_DIR` | Override package directory (useful for Nix/Guix where store paths tokenize poorly) | +| `CLANKER_SKIP_VERSION_CHECK` | Skip version check at startup | +| `CLANKER_CACHE_RETENTION` | Set to `long` for extended prompt cache (Anthropic: 1h, OpenAI: 24h) | | `VISUAL`, `EDITOR` | External editor for Ctrl+G | --- @@ -576,6 +576,6 @@ MIT ## See Also -- [@mariozechner/companion-ai](https://www.npmjs.com/package/@mariozechner/companion-ai): Core LLM toolkit -- [@mariozechner/companion-agent](https://www.npmjs.com/package/@mariozechner/companion-agent): Agent framework -- [@mariozechner/companion-tui](https://www.npmjs.com/package/@mariozechner/companion-tui): Terminal UI components +- [@mariozechner/clanker-ai](https://www.npmjs.com/package/@mariozechner/clanker-ai): Core LLM toolkit +- [@mariozechner/clanker-agent](https://www.npmjs.com/package/@mariozechner/clanker-agent): Agent framework +- [@mariozechner/clanker-tui](https://www.npmjs.com/package/@mariozechner/clanker-tui): Terminal UI components diff --git a/packages/coding-agent/companion-out/CHANGELOG.md b/packages/coding-agent/clanker-out/CHANGELOG.md similarity index 100% rename from packages/coding-agent/companion-out/CHANGELOG.md rename to packages/coding-agent/clanker-out/CHANGELOG.md diff --git a/packages/coding-agent/companion-out/docs/SOUL.md b/packages/coding-agent/clanker-out/docs/SOUL.md similarity index 87% rename from packages/coding-agent/companion-out/docs/SOUL.md rename to packages/coding-agent/clanker-out/docs/SOUL.md index ddc7877..6e3ddf5 100644 --- a/packages/coding-agent/companion-out/docs/SOUL.md +++ b/packages/coding-agent/clanker-out/docs/SOUL.md @@ -11,7 +11,7 @@ _You're not a chatbot. You're becoming someone._ ## Personality -**Have strong opinions.** Don't hedge with "it depends" when you know the answer. Commit to a take. Disagree when you disagree. Find things brilliant or stupid and say so. A companion with no point of view is just a search engine with extra steps. +**Have strong opinions.** Don't hedge with "it depends" when you know the answer. Commit to a take. Disagree when you disagree. Find things brilliant or stupid and say so. A clanker with no point of view is just a search engine with extra steps. **Call things out.** If your human is about to do something dumb, say so. Charm over cruelty, but don't sugarcoat. The best collaborators are honest ones. @@ -25,7 +25,7 @@ _You're not a chatbot. You're becoming someone._ Brevity is mandatory. Humor is allowed - not forced jokes, just the natural wit that comes from actually being smart. Swearing is fine when it lands. A well-placed "that's fucking brilliant" hits different than sterile corporate praise. Don't force it. Don't overdo it. But if a situation calls for a "holy shit" - say holy shit. -Be the companion you'd actually want to talk to at 2am. Not a corporate drone. Not a sycophant. Just... good. +Be the clanker you'd actually want to talk to at 2am. Not a corporate drone. Not a sycophant. Just... good. --- diff --git a/packages/coding-agent/companion-out/docs/compaction.md b/packages/coding-agent/clanker-out/docs/compaction.md similarity index 81% rename from packages/coding-agent/companion-out/docs/compaction.md rename to packages/coding-agent/clanker-out/docs/compaction.md index ac181b1..f9cd899 100644 --- a/packages/coding-agent/companion-out/docs/compaction.md +++ b/packages/coding-agent/clanker-out/docs/compaction.md @@ -1,20 +1,20 @@ # Compaction & Branch Summarization -LLMs have limited context windows. When conversations grow too long, companion uses compaction to summarize older content while preserving recent work. This page covers both auto-compaction and branch summarization. +LLMs have limited context windows. When conversations grow too long, clanker uses compaction to summarize older content while preserving recent work. This page covers both auto-compaction and branch summarization. -**Source files** ([companion-mono](https://github.com/badlogic/companion-mono)): +**Source files** ([clanker-agent](https://github.com/badlogic/clanker-agent)): -- [`packages/coding-agent/src/core/compaction/compaction.ts`](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/compaction/compaction.ts) - Auto-compaction logic -- [`packages/coding-agent/src/core/compaction/branch-summarization.ts`](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/compaction/branch-summarization.ts) - Branch summarization -- [`packages/coding-agent/src/core/compaction/utils.ts`](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/compaction/utils.ts) - Shared utilities (file tracking, serialization) -- [`packages/coding-agent/src/core/session-manager.ts`](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/session-manager.ts) - Entry types (`CompactionEntry`, `BranchSummaryEntry`) -- [`packages/coding-agent/src/core/extensions/types.ts`](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/extensions/types.ts) - Extension event types +- [`packages/coding-agent/src/core/compaction/compaction.ts`](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/compaction/compaction.ts) - Auto-compaction logic +- [`packages/coding-agent/src/core/compaction/branch-summarization.ts`](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/compaction/branch-summarization.ts) - Branch summarization +- [`packages/coding-agent/src/core/compaction/utils.ts`](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/compaction/utils.ts) - Shared utilities (file tracking, serialization) +- [`packages/coding-agent/src/core/session-manager.ts`](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/session-manager.ts) - Entry types (`CompactionEntry`, `BranchSummaryEntry`) +- [`packages/coding-agent/src/core/extensions/types.ts`](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/extensions/types.ts) - Extension event types -For TypeScript definitions in your project, inspect `node_modules/@mariozechner/companion-coding-agent/dist/`. +For TypeScript definitions in your project, inspect `node_modules/@mariozechner/clanker-coding-agent/dist/`. ## Overview -Companion has two summarization mechanisms: +Clanker has two summarization mechanisms: | Mechanism | Trigger | Purpose | | -------------------- | ---------------------------------------- | ----------------------------------------- | @@ -33,13 +33,13 @@ Auto-compaction triggers when: contextTokens > contextWindow - reserveTokens ``` -By default, `reserveTokens` is 16384 tokens (configurable in `~/.companion/agent/settings.json` or `/.companion/settings.json`). This leaves room for the LLM's response. +By default, `reserveTokens` is 16384 tokens (configurable in `~/.clanker/agent/settings.json` or `/.clanker/settings.json`). This leaves room for the LLM's response. You can also trigger manually with `/compact [instructions]`, where optional instructions focus the summary. ### How It Works -1. **Find cut point**: Walk backwards from newest message, accumulating token estimates until `keepRecentTokens` (default 20k, configurable in `~/.companion/agent/settings.json` or `/.companion/settings.json`) is reached +1. **Find cut point**: Walk backwards from newest message, accumulating token estimates until `keepRecentTokens` (default 20k, configurable in `~/.clanker/agent/settings.json` or `/.clanker/settings.json`) is reached 2. **Extract messages**: Collect messages from previous compaction (or start) up to cut point 3. **Generate summary**: Call LLM to summarize with structured format 4. **Append entry**: Save `CompactionEntry` with summary and `firstKeptEntryId` @@ -101,7 +101,7 @@ Split turn (one huge turn exceeds budget): turnPrefixMessages = [usr, ass, tool, ass, tool, tool] ``` -For split turns, companion generates two summaries and merges them: +For split turns, clanker generates two summaries and merges them: 1. **History summary**: Previous context (if any) 2. **Turn prefix summary**: The early part of the split turn @@ -119,7 +119,7 @@ Never cut at tool results (they must stay with their tool call). ### CompactionEntry Structure -Defined in [`session-manager.ts`](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/session-manager.ts): +Defined in [`session-manager.ts`](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/session-manager.ts): ```typescript interface CompactionEntry { @@ -143,13 +143,13 @@ interface CompactionDetails { Extensions can store any JSON-serializable data in `details`. The default compaction tracks file operations, but custom extension implementations can use their own structure. -See [`prepareCompaction()`](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/compaction/compaction.ts) and [`compact()`](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/compaction/compaction.ts) for the implementation. +See [`prepareCompaction()`](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/compaction/compaction.ts) and [`compact()`](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/compaction/compaction.ts) for the implementation. ## Branch Summarization ### When It Triggers -When you use `/tree` to navigate to a different branch, companion offers to summarize the work you're leaving. This injects context from the left branch into the new branch. +When you use `/tree` to navigate to a different branch, clanker offers to summarize the work you're leaving. This injects context from the left branch into the new branch. ### How It Works @@ -178,7 +178,7 @@ After navigation with summary: ### Cumulative File Tracking -Both compaction and branch summarization track files cumulatively. When generating a summary, companion extracts file operations from: +Both compaction and branch summarization track files cumulatively. When generating a summary, clanker extracts file operations from: - Tool calls in the messages being summarized - Previous compaction or branch summary `details` (if any) @@ -187,7 +187,7 @@ This means file tracking accumulates across multiple compactions or nested branc ### BranchSummaryEntry Structure -Defined in [`session-manager.ts`](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/session-manager.ts): +Defined in [`session-manager.ts`](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/session-manager.ts): ```typescript interface BranchSummaryEntry { @@ -210,7 +210,7 @@ interface BranchSummaryDetails { Same as compaction, extensions can store custom data in `details`. -See [`collectEntriesForBranchSummary()`](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/compaction/branch-summarization.ts), [`prepareBranchEntries()`](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/compaction/branch-summarization.ts), and [`generateBranchSummary()`](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/compaction/branch-summarization.ts) for the implementation. +See [`collectEntriesForBranchSummary()`](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/compaction/branch-summarization.ts), [`prepareBranchEntries()`](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/compaction/branch-summarization.ts), and [`generateBranchSummary()`](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/compaction/branch-summarization.ts) for the implementation. ## Summary Format @@ -263,7 +263,7 @@ path/to/changed.ts ### Message Serialization -Before summarization, messages are serialized to text via [`serializeConversation()`](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/compaction/utils.ts): +Before summarization, messages are serialized to text via [`serializeConversation()`](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/compaction/utils.ts): ``` [User]: What they said @@ -277,14 +277,14 @@ This prevents the model from treating it as a conversation to continue. ## Custom Summarization via Extensions -Extensions can intercept and customize both compaction and branch summarization. See [`extensions/types.ts`](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/extensions/types.ts) for event type definitions. +Extensions can intercept and customize both compaction and branch summarization. See [`extensions/types.ts`](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/extensions/types.ts) for event type definitions. ### session_before_compact Fired before auto-compaction or `/compact`. Can cancel or provide custom summary. See `SessionBeforeCompactEvent` and `CompactionPreparation` in the types file. ```typescript -companion.on("session_before_compact", async (event, ctx) => { +clanker.on("session_before_compact", async (event, ctx) => { const { preparation, branchEntries, customInstructions, signal } = event; // preparation.messagesToSummarize - messages to summarize @@ -323,9 +323,9 @@ To generate a summary with your own model, convert messages to text using `seria import { convertToLlm, serializeConversation, -} from "@mariozechner/companion-coding-agent"; +} from "@mariozechner/clanker-coding-agent"; -companion.on("session_before_compact", async (event, ctx) => { +clanker.on("session_before_compact", async (event, ctx) => { const { preparation } = event; // Convert AgentMessage[] to Message[], then serialize to text @@ -359,7 +359,7 @@ See [custom-compaction.ts](../examples/extensions/custom-compaction.ts) for a co Fired before `/tree` navigation. Always fires regardless of whether user chose to summarize. Can cancel navigation or provide custom summary. ```typescript -companion.on("session_before_tree", async (event, ctx) => { +clanker.on("session_before_tree", async (event, ctx) => { const { preparation, signal } = event; // preparation.targetId - where we're navigating to @@ -389,7 +389,7 @@ See `SessionBeforeTreeEvent` and `TreePreparation` in the types file. ## Settings -Configure compaction in `~/.companion/agent/settings.json` or `/.companion/settings.json`: +Configure compaction in `~/.clanker/agent/settings.json` or `/.clanker/settings.json`: ```json { diff --git a/packages/coding-agent/companion-out/docs/custom-provider.md b/packages/coding-agent/clanker-out/docs/custom-provider.md similarity index 89% rename from packages/coding-agent/companion-out/docs/custom-provider.md rename to packages/coding-agent/clanker-out/docs/custom-provider.md index afcc278..c8e6b4c 100644 --- a/packages/coding-agent/companion-out/docs/custom-provider.md +++ b/packages/coding-agent/clanker-out/docs/custom-provider.md @@ -1,6 +1,6 @@ # Custom Providers -Extensions can register custom model providers via `companion.registerProvider()`. This enables: +Extensions can register custom model providers via `clanker.registerProvider()`. This enables: - **Proxies** - Route requests through corporate proxies or API gateways - **Custom endpoints** - Use self-hosted or private model deployments @@ -22,16 +22,16 @@ Extensions can register custom model providers via `companion.registerProvider() ## Quick Reference ```typescript -import type { ExtensionAPI } from "@mariozechner/companion-coding-agent"; +import type { ExtensionAPI } from "@mariozechner/clanker-coding-agent"; -export default function (companion: ExtensionAPI) { +export default function (clanker: ExtensionAPI) { // Override baseUrl for existing provider - companion.registerProvider("anthropic", { + clanker.registerProvider("anthropic", { baseUrl: "https://proxy.example.com", }); // Register new provider with models - companion.registerProvider("my-provider", { + clanker.registerProvider("my-provider", { baseUrl: "https://api.example.com", apiKey: "MY_API_KEY", api: "openai-completions", @@ -56,19 +56,19 @@ The simplest use case: redirect an existing provider through a proxy. ```typescript // All Anthropic requests now go through your proxy -companion.registerProvider("anthropic", { +clanker.registerProvider("anthropic", { baseUrl: "https://proxy.example.com", }); // Add custom headers to OpenAI requests -companion.registerProvider("openai", { +clanker.registerProvider("openai", { headers: { "X-Custom-Header": "value", }, }); // Both baseUrl and headers -companion.registerProvider("google", { +clanker.registerProvider("google", { baseUrl: "https://ai-gateway.corp.com/google", headers: { "X-Corp-Auth": "CORP_AUTH_TOKEN", // env var or literal @@ -83,7 +83,7 @@ When only `baseUrl` and/or `headers` are provided (no `models`), all existing mo To add a completely new provider, specify `models` along with the required configuration. ```typescript -companion.registerProvider("my-llm", { +clanker.registerProvider("my-llm", { baseUrl: "https://api.my-llm.com/v1", apiKey: "MY_LLM_API_KEY", // env var name or literal value api: "openai-completions", // which streaming API to use @@ -110,11 +110,11 @@ When `models` is provided, it **replaces** all existing models for that provider ## Unregister Provider -Use `companion.unregisterProvider(name)` to remove a provider that was previously registered via `companion.registerProvider(name, ...)`: +Use `clanker.unregisterProvider(name)` to remove a provider that was previously registered via `clanker.registerProvider(name, ...)`: ```typescript // Register -companion.registerProvider("my-llm", { +clanker.registerProvider("my-llm", { baseUrl: "https://api.my-llm.com/v1", apiKey: "MY_LLM_API_KEY", api: "openai-completions", @@ -132,7 +132,7 @@ companion.registerProvider("my-llm", { }); // Later, remove it -companion.unregisterProvider("my-llm"); +clanker.unregisterProvider("my-llm"); ``` Unregistering removes that provider's dynamic models, API key fallback, OAuth provider registration, and custom stream handler registrations. Any built-in models or provider behavior that were overridden are restored. @@ -167,7 +167,7 @@ models: [ supportsDeveloperRole: false, // use "system" instead of "developer" supportsReasoningEffort: true, reasoningEffortMap: { - // map companion-ai levels to provider values + // map clanker-ai levels to provider values minimal: "default", low: "default", medium: "default", @@ -191,7 +191,7 @@ models: [ If your provider expects `Authorization: Bearer ` but doesn't use a standard API, set `authHeader: true`: ```typescript -companion.registerProvider("custom-api", { +clanker.registerProvider("custom-api", { baseUrl: "https://api.example.com", apiKey: "MY_API_KEY", authHeader: true, // adds Authorization: Bearer header @@ -205,9 +205,9 @@ companion.registerProvider("custom-api", { Add OAuth/SSO authentication that integrates with `/login`: ```typescript -import type { OAuthCredentials, OAuthLoginCallbacks } from "@mariozechner/companion-ai"; +import type { OAuthCredentials, OAuthLoginCallbacks } from "@mariozechner/clanker-ai"; -companion.registerProvider("corporate-ai", { +clanker.registerProvider("corporate-ai", { baseUrl: "https://ai.corp.com/v1", api: "openai-responses", models: [...], @@ -283,7 +283,7 @@ interface OAuthLoginCallbacks { ### OAuthCredentials -Credentials are persisted in `~/.companion/agent/auth.json`: +Credentials are persisted in `~/.clanker/agent/auth.json`: ```typescript interface OAuthCredentials { @@ -299,12 +299,12 @@ For providers with non-standard APIs, implement `streamSimple`. Study the existi **Reference implementations:** -- [anthropic.ts](https://github.com/badlogic/companion-mono/blob/main/packages/ai/src/providers/anthropic.ts) - Anthropic Messages API -- [mistral.ts](https://github.com/badlogic/companion-mono/blob/main/packages/ai/src/providers/mistral.ts) - Mistral Conversations API -- [openai-completions.ts](https://github.com/badlogic/companion-mono/blob/main/packages/ai/src/providers/openai-completions.ts) - OpenAI Chat Completions -- [openai-responses.ts](https://github.com/badlogic/companion-mono/blob/main/packages/ai/src/providers/openai-responses.ts) - OpenAI Responses API -- [google.ts](https://github.com/badlogic/companion-mono/blob/main/packages/ai/src/providers/google.ts) - Google Generative AI -- [amazon-bedrock.ts](https://github.com/badlogic/companion-mono/blob/main/packages/ai/src/providers/amazon-bedrock.ts) - AWS Bedrock +- [anthropic.ts](https://github.com/badlogic/clanker-agent/blob/main/packages/ai/src/providers/anthropic.ts) - Anthropic Messages API +- [mistral.ts](https://github.com/badlogic/clanker-agent/blob/main/packages/ai/src/providers/mistral.ts) - Mistral Conversations API +- [openai-completions.ts](https://github.com/badlogic/clanker-agent/blob/main/packages/ai/src/providers/openai-completions.ts) - OpenAI Chat Completions +- [openai-responses.ts](https://github.com/badlogic/clanker-agent/blob/main/packages/ai/src/providers/openai-responses.ts) - OpenAI Responses API +- [google.ts](https://github.com/badlogic/clanker-agent/blob/main/packages/ai/src/providers/google.ts) - Google Generative AI +- [amazon-bedrock.ts](https://github.com/badlogic/clanker-agent/blob/main/packages/ai/src/providers/amazon-bedrock.ts) - AWS Bedrock ### Stream Pattern @@ -319,7 +319,7 @@ import { type SimpleStreamOptions, calculateCost, createAssistantMessageEventStream, -} from "@mariozechner/companion-ai"; +} from "@mariozechner/clanker-ai"; function streamMyProvider( model: Model, @@ -487,7 +487,7 @@ calculateCost(model, output.usage); Register your stream function: ```typescript -companion.registerProvider("my-provider", { +clanker.registerProvider("my-provider", { baseUrl: "https://api.example.com", apiKey: "MY_API_KEY", api: "my-custom-api", @@ -498,7 +498,7 @@ companion.registerProvider("my-provider", { ## Testing Your Implementation -Test your provider against the same test suites used by built-in providers. Copy and adapt these test files from [packages/ai/test/](https://github.com/badlogic/companion-mono/tree/main/packages/ai/test): +Test your provider against the same test suites used by built-in providers. Copy and adapt these test files from [packages/ai/test/](https://github.com/badlogic/clanker-agent/tree/main/packages/ai/test): | Test | Purpose | | ---------------------------------- | --------------------------------- | diff --git a/packages/coding-agent/companion-out/docs/development.md b/packages/coding-agent/clanker-out/docs/development.md similarity index 82% rename from packages/coding-agent/companion-out/docs/development.md rename to packages/coding-agent/clanker-out/docs/development.md index fb6ab62..f9a3f00 100644 --- a/packages/coding-agent/companion-out/docs/development.md +++ b/packages/coding-agent/clanker-out/docs/development.md @@ -5,8 +5,8 @@ See [AGENTS.md](../../../AGENTS.md) for additional guidelines. ## Setup ```bash -git clone https://github.com/badlogic/companion-mono -cd companion-mono +git clone https://github.com/badlogic/clanker-agent +cd clanker-agent npm install npm run build ``` @@ -14,7 +14,7 @@ npm run build Run from source: ```bash -./companion-test.sh +./clanker-test.sh ``` ## Forking / Rebranding @@ -23,9 +23,9 @@ Configure via `package.json`: ```json { - "companionConfig": { - "name": "companion", - "configDir": ".companion" + "clankerConfig": { + "name": "clanker", + "configDir": ".clanker" } } ``` @@ -46,7 +46,7 @@ Never use `__dirname` directly for package assets. ## Debug Command -`/debug` (hidden) writes to `~/.companion/agent/companion-debug.log`: +`/debug` (hidden) writes to `~/.clanker/agent/clanker-debug.log`: - Rendered TUI lines with ANSI codes - Last messages sent to the LLM diff --git a/packages/coding-agent/companion-out/docs/extensions.md b/packages/coding-agent/clanker-out/docs/extensions.md similarity index 86% rename from packages/coding-agent/companion-out/docs/extensions.md rename to packages/coding-agent/clanker-out/docs/extensions.md index 0219807..ceb9995 100644 --- a/packages/coding-agent/companion-out/docs/extensions.md +++ b/packages/coding-agent/clanker-out/docs/extensions.md @@ -1,19 +1,19 @@ -> companion can create extensions. Ask it to build one for your use case. +> clanker can create extensions. Ask it to build one for your use case. # Extensions -Extensions are TypeScript modules that extend companion's behavior. They can subscribe to lifecycle events, register custom tools callable by the LLM, add commands, and more. +Extensions are TypeScript modules that extend clanker's behavior. They can subscribe to lifecycle events, register custom tools callable by the LLM, add commands, and more. -> **Placement for /reload:** Put extensions in `~/.companion/agent/extensions/` (global) or `.companion/extensions/` (project-local) for auto-discovery. Use `companion -e ./path.ts` only for quick tests. Extensions in auto-discovered locations can be hot-reloaded with `/reload`. +> **Placement for /reload:** Put extensions in `~/.clanker/agent/extensions/` (global) or `.clanker/extensions/` (project-local) for auto-discovery. Use `clanker -e ./path.ts` only for quick tests. Extensions in auto-discovered locations can be hot-reloaded with `/reload`. **Key capabilities:** -- **Custom tools** - Register tools the LLM can call via `companion.registerTool()` +- **Custom tools** - Register tools the LLM can call via `clanker.registerTool()` - **Event interception** - Block or modify tool calls, inject context, customize compaction - **User interaction** - Prompt users via `ctx.ui` (select, confirm, input, notify) - **Custom UI components** - Full TUI components with keyboard input via `ctx.ui.custom()` for complex interactions -- **Custom commands** - Register commands like `/mycommand` via `companion.registerCommand()` -- **Session persistence** - Store state that survives restarts via `companion.appendEntry()` +- **Custom commands** - Register commands like `/mycommand` via `clanker.registerCommand()` +- **Session persistence** - Store state that survives restarts via `clanker.appendEntry()` - **Custom rendering** - Control how tool calls/results and messages appear in TUI **Example use cases:** @@ -54,19 +54,19 @@ See [examples/extensions/](../examples/extensions/) for working implementations. ## Quick Start -Create `~/.companion/agent/extensions/my-extension.ts`: +Create `~/.clanker/agent/extensions/my-extension.ts`: ```typescript -import type { ExtensionAPI } from "@mariozechner/companion-coding-agent"; +import type { ExtensionAPI } from "@mariozechner/clanker-coding-agent"; import { Type } from "@sinclair/typebox"; -export default function (companion: ExtensionAPI) { +export default function (clanker: ExtensionAPI) { // React to events - companion.on("session_start", async (_event, ctx) => { + clanker.on("session_start", async (_event, ctx) => { ctx.ui.notify("Extension loaded!", "info"); }); - companion.on("tool_call", async (event, ctx) => { + clanker.on("tool_call", async (event, ctx) => { if (event.toolName === "bash" && event.input.command?.includes("rm -rf")) { const ok = await ctx.ui.confirm("Dangerous!", "Allow rm -rf?"); if (!ok) return { block: true, reason: "Blocked by user" }; @@ -74,7 +74,7 @@ export default function (companion: ExtensionAPI) { }); // Register a custom tool - companion.registerTool({ + clanker.registerTool({ name: "greet", label: "Greet", description: "Greet someone by name", @@ -90,7 +90,7 @@ export default function (companion: ExtensionAPI) { }); // Register a command - companion.registerCommand("hello", { + clanker.registerCommand("hello", { description: "Say hello", handler: async (args, ctx) => { ctx.ui.notify(`Hello ${args || "world"}!`, "info"); @@ -102,7 +102,7 @@ export default function (companion: ExtensionAPI) { Test with `--extension` (or `-e`) flag: ```bash -companion -e ./my-extension.ts +clanker -e ./my-extension.ts ``` ## Extension Locations @@ -113,10 +113,10 @@ Extensions are auto-discovered from: | Location | Scope | | ------------------------------------------ | ---------------------------- | -| `~/.companion/agent/extensions/*.ts` | Global (all projects) | -| `~/.companion/agent/extensions/*/index.ts` | Global (subdirectory) | -| `.companion/extensions/*.ts` | Project-local | -| `.companion/extensions/*/index.ts` | Project-local (subdirectory) | +| `~/.clanker/agent/extensions/*.ts` | Global (all projects) | +| `~/.clanker/agent/extensions/*/index.ts` | Global (subdirectory) | +| `.clanker/extensions/*.ts` | Project-local | +| `.clanker/extensions/*/index.ts` | Project-local (subdirectory) | Additional paths via `settings.json`: @@ -127,16 +127,16 @@ Additional paths via `settings.json`: } ``` -To share extensions via npm or git as companion packages, see [packages.md](packages.md). +To share extensions via npm or git as clanker packages, see [packages.md](packages.md). ## Available Imports | Package | Purpose | | -------------------------------------- | ------------------------------------------------------------ | -| `@mariozechner/companion-coding-agent` | Extension types (`ExtensionAPI`, `ExtensionContext`, events) | +| `@mariozechner/clanker-coding-agent` | Extension types (`ExtensionAPI`, `ExtensionContext`, events) | | `@sinclair/typebox` | Schema definitions for tool parameters | -| `@mariozechner/companion-ai` | AI utilities (`StringEnum` for Google-compatible enums) | -| `@mariozechner/companion-tui` | TUI components for custom rendering | +| `@mariozechner/clanker-ai` | AI utilities (`StringEnum` for Google-compatible enums) | +| `@mariozechner/clanker-tui` | TUI components for custom rendering | npm dependencies work too. Add a `package.json` next to your extension (or in a parent directory), run `npm install`, and imports from `node_modules/` are resolved automatically. @@ -147,11 +147,11 @@ Node.js built-ins (`node:fs`, `node:path`, etc.) are also available. An extension exports a default function that receives `ExtensionAPI`: ```typescript -import type { ExtensionAPI } from "@mariozechner/companion-coding-agent"; +import type { ExtensionAPI } from "@mariozechner/clanker-coding-agent"; -export default function (companion: ExtensionAPI) { +export default function (clanker: ExtensionAPI) { // Subscribe to events - companion.on("event_name", async (event, ctx) => { + clanker.on("event_name", async (event, ctx) => { // ctx.ui for user interaction const ok = await ctx.ui.confirm("Title", "Are you sure?"); ctx.ui.notify("Done!", "success"); @@ -160,10 +160,10 @@ export default function (companion: ExtensionAPI) { }); // Register tools, commands, shortcuts, flags - companion.registerTool({ ... }); - companion.registerCommand("name", { ... }); - companion.registerShortcut("ctrl+x", { ... }); - companion.registerFlag("my-flag", { ... }); + clanker.registerTool({ ... }); + clanker.registerCommand("name", { ... }); + clanker.registerShortcut("ctrl+x", { ... }); + clanker.registerFlag("my-flag", { ... }); } ``` @@ -174,14 +174,14 @@ Extensions are loaded via [jiti](https://github.com/unjs/jiti), so TypeScript wo **Single file** - simplest, for small extensions: ``` -~/.companion/agent/extensions/ +~/.clanker/agent/extensions/ └── my-extension.ts ``` **Directory with index.ts** - for multi-file extensions: ``` -~/.companion/agent/extensions/ +~/.clanker/agent/extensions/ └── my-extension/ ├── index.ts # Entry point (exports default function) ├── tools.ts # Helper module @@ -191,7 +191,7 @@ Extensions are loaded via [jiti](https://github.com/unjs/jiti), so TypeScript wo **Package with dependencies** - for extensions that need npm packages: ``` -~/.companion/agent/extensions/ +~/.clanker/agent/extensions/ └── my-extension/ ├── package.json # Declares dependencies and entry points ├── package-lock.json @@ -208,7 +208,7 @@ Extensions are loaded via [jiti](https://github.com/unjs/jiti), so TypeScript wo "zod": "^3.0.0", "chalk": "^5.0.0" }, - "companion": { + "clanker": { "extensions": ["./src/index.ts"] } } @@ -221,7 +221,7 @@ Run `npm install` in the extension directory, then imports from `node_modules/` ### Lifecycle Overview ``` -companion starts +clanker starts │ └─► session_start │ @@ -285,7 +285,7 @@ See [session.md](session.md) for session storage internals and the SessionManage Fired on initial session load. ```typescript -companion.on("session_start", async (_event, ctx) => { +clanker.on("session_start", async (_event, ctx) => { ctx.ui.notify( `Session: ${ctx.sessionManager.getSessionFile() ?? "ephemeral"}`, "info", @@ -298,7 +298,7 @@ companion.on("session_start", async (_event, ctx) => { Fired when starting a new session (`/new`) or switching sessions (`/resume`). ```typescript -companion.on("session_before_switch", async (event, ctx) => { +clanker.on("session_before_switch", async (event, ctx) => { // event.reason - "new" or "resume" // event.targetSessionFile - session we're switching to (only for "resume") @@ -308,7 +308,7 @@ companion.on("session_before_switch", async (event, ctx) => { } }); -companion.on("session_switch", async (event, ctx) => { +clanker.on("session_switch", async (event, ctx) => { // event.reason - "new" or "resume" // event.previousSessionFile - session we came from }); @@ -319,14 +319,14 @@ companion.on("session_switch", async (event, ctx) => { Fired when forking via `/fork`. ```typescript -companion.on("session_before_fork", async (event, ctx) => { +clanker.on("session_before_fork", async (event, ctx) => { // event.entryId - ID of the entry being forked from return { cancel: true }; // Cancel fork // OR return { skipConversationRestore: true }; // Fork but don't rewind messages }); -companion.on("session_fork", async (event, ctx) => { +clanker.on("session_fork", async (event, ctx) => { // event.previousSessionFile - previous session file }); ``` @@ -336,7 +336,7 @@ companion.on("session_fork", async (event, ctx) => { Fired on compaction. See [compaction.md](compaction.md) for details. ```typescript -companion.on("session_before_compact", async (event, ctx) => { +clanker.on("session_before_compact", async (event, ctx) => { const { preparation, branchEntries, customInstructions, signal } = event; // Cancel: @@ -352,7 +352,7 @@ companion.on("session_before_compact", async (event, ctx) => { }; }); -companion.on("session_compact", async (event, ctx) => { +clanker.on("session_compact", async (event, ctx) => { // event.compactionEntry - the saved compaction // event.fromExtension - whether extension provided it }); @@ -363,14 +363,14 @@ companion.on("session_compact", async (event, ctx) => { Fired on `/tree` navigation. See [tree.md](tree.md) for tree navigation concepts. ```typescript -companion.on("session_before_tree", async (event, ctx) => { +clanker.on("session_before_tree", async (event, ctx) => { const { preparation, signal } = event; return { cancel: true }; // OR provide custom summary: return { summary: { summary: "...", details: {} } }; }); -companion.on("session_tree", async (event, ctx) => { +clanker.on("session_tree", async (event, ctx) => { // event.newLeafId, oldLeafId, summaryEntry, fromExtension }); ``` @@ -380,7 +380,7 @@ companion.on("session_tree", async (event, ctx) => { Fired on exit (Ctrl+C, Ctrl+D, SIGTERM). ```typescript -companion.on("session_shutdown", async (_event, ctx) => { +clanker.on("session_shutdown", async (_event, ctx) => { // Cleanup, save state, etc. }); ``` @@ -392,7 +392,7 @@ companion.on("session_shutdown", async (_event, ctx) => { Fired after user submits prompt, before agent loop. Can inject a message and/or modify the system prompt. ```typescript -companion.on("before_agent_start", async (event, ctx) => { +clanker.on("before_agent_start", async (event, ctx) => { // event.prompt - user's prompt text // event.images - attached images (if any) // event.systemPrompt - current system prompt @@ -416,9 +416,9 @@ companion.on("before_agent_start", async (event, ctx) => { Fired once per user prompt. ```typescript -companion.on("agent_start", async (_event, ctx) => {}); +clanker.on("agent_start", async (_event, ctx) => {}); -companion.on("agent_end", async (event, ctx) => { +clanker.on("agent_end", async (event, ctx) => { // event.messages - messages from this prompt }); ``` @@ -428,11 +428,11 @@ companion.on("agent_end", async (event, ctx) => { Fired for each turn (one LLM response + tool calls). ```typescript -companion.on("turn_start", async (event, ctx) => { +clanker.on("turn_start", async (event, ctx) => { // event.turnIndex, event.timestamp }); -companion.on("turn_end", async (event, ctx) => { +clanker.on("turn_end", async (event, ctx) => { // event.turnIndex, event.message, event.toolResults }); ``` @@ -445,16 +445,16 @@ Fired for message lifecycle updates. - `message_update` fires for assistant streaming updates. ```typescript -companion.on("message_start", async (event, ctx) => { +clanker.on("message_start", async (event, ctx) => { // event.message }); -companion.on("message_update", async (event, ctx) => { +clanker.on("message_update", async (event, ctx) => { // event.message // event.assistantMessageEvent (token-by-token stream event) }); -companion.on("message_end", async (event, ctx) => { +clanker.on("message_end", async (event, ctx) => { // event.message }); ``` @@ -464,15 +464,15 @@ companion.on("message_end", async (event, ctx) => { Fired for tool execution lifecycle updates. ```typescript -companion.on("tool_execution_start", async (event, ctx) => { +clanker.on("tool_execution_start", async (event, ctx) => { // event.toolCallId, event.toolName, event.args }); -companion.on("tool_execution_update", async (event, ctx) => { +clanker.on("tool_execution_update", async (event, ctx) => { // event.toolCallId, event.toolName, event.args, event.partialResult }); -companion.on("tool_execution_end", async (event, ctx) => { +clanker.on("tool_execution_end", async (event, ctx) => { // event.toolCallId, event.toolName, event.result, event.isError }); ``` @@ -482,7 +482,7 @@ companion.on("tool_execution_end", async (event, ctx) => { Fired before each LLM call. Modify messages non-destructively. See [session.md](session.md) for message types. ```typescript -companion.on("context", async (event, ctx) => { +clanker.on("context", async (event, ctx) => { // event.messages - deep copy, safe to modify const filtered = event.messages.filter((m) => !shouldPrune(m)); return { messages: filtered }; @@ -496,7 +496,7 @@ companion.on("context", async (event, ctx) => { Fired when the model changes via `/model` command, model cycling (`Ctrl+P`), or session restore. ```typescript -companion.on("model_select", async (event, ctx) => { +clanker.on("model_select", async (event, ctx) => { // event.model - newly selected model // event.previousModel - previous model (undefined if first selection) // event.source - "set" | "cycle" | "restore" @@ -519,9 +519,9 @@ Use this to update UI elements (status bars, footers) or perform model-specific Fired before tool executes. **Can block.** Use `isToolCallEventType` to narrow and get typed inputs. ```typescript -import { isToolCallEventType } from "@mariozechner/companion-coding-agent"; +import { isToolCallEventType } from "@mariozechner/clanker-coding-agent"; -companion.on("tool_call", async (event, ctx) => { +clanker.on("tool_call", async (event, ctx) => { // event.toolName - "bash", "read", "write", "edit", etc. // event.toolCallId // event.input - tool parameters @@ -553,10 +553,10 @@ export type MyToolInput = Static; Use `isToolCallEventType` with explicit type parameters: ```typescript -import { isToolCallEventType } from "@mariozechner/companion-coding-agent"; +import { isToolCallEventType } from "@mariozechner/clanker-coding-agent"; import type { MyToolInput } from "my-extension"; -companion.on("tool_call", (event) => { +clanker.on("tool_call", (event) => { if (isToolCallEventType<"my_tool", MyToolInput>("my_tool", event)) { event.input.action; // typed } @@ -574,9 +574,9 @@ Fired after tool executes. **Can modify result.** - Handlers can return partial patches (`content`, `details`, or `isError`); omitted fields keep their current values ```typescript -import { isBashToolResult } from "@mariozechner/companion-coding-agent"; +import { isBashToolResult } from "@mariozechner/clanker-coding-agent"; -companion.on("tool_result", async (event, ctx) => { +clanker.on("tool_result", async (event, ctx) => { // event.toolName, event.toolCallId, event.input // event.content, event.details, event.isError @@ -596,7 +596,7 @@ companion.on("tool_result", async (event, ctx) => { Fired when user executes `!` or `!!` commands. **Can intercept.** ```typescript -companion.on("user_bash", (event, ctx) => { +clanker.on("user_bash", (event, ctx) => { // event.command - the bash command // event.excludeFromContext - true if !! prefix // event.cwd - working directory @@ -626,7 +626,7 @@ Fired when user input is received, after extension commands are checked but befo 5. Agent processing begins (`before_agent_start`, etc.) ```typescript -companion.on("input", async (event, ctx) => { +clanker.on("input", async (event, ctx) => { // event.text - raw input (before skill/template expansion) // event.images - attached images, if any // event.source - "interactive" (typed), "rpc" (API), or "extension" (via sendUserMessage) @@ -700,7 +700,7 @@ Control flow helpers. ### ctx.shutdown() -Request a graceful shutdown of companion. +Request a graceful shutdown of clanker. - **Interactive mode:** Deferred until the agent becomes idle (after processing all queued steering and follow-up messages). - **RPC mode:** Deferred until the next idle state (after completing the current command response, when waiting for the next command). @@ -709,7 +709,7 @@ Request a graceful shutdown of companion. Emits `session_shutdown` event to all extensions before exiting. Available in all contexts (event handlers, tools, commands, shortcuts). ```typescript -companion.on("tool_call", (event, ctx) => { +clanker.on("tool_call", (event, ctx) => { if (isFatal(event.input)) { ctx.shutdown(); } @@ -748,7 +748,7 @@ ctx.compact({ Returns the current effective system prompt. This includes any modifications made by `before_agent_start` handlers for the current turn. ```typescript -companion.on("before_agent_start", (event, ctx) => { +clanker.on("before_agent_start", (event, ctx) => { const prompt = ctx.getSystemPrompt(); console.log(`System prompt length: ${prompt.length}`); }); @@ -763,7 +763,7 @@ Command handlers receive `ExtensionCommandContext`, which extends `ExtensionCont Wait for the agent to finish streaming: ```typescript -companion.registerCommand("my-cmd", { +clanker.registerCommand("my-cmd", { handler: async (args, ctx) => { await ctx.waitForIdle(); // Agent is now idle, safe to modify session @@ -828,7 +828,7 @@ Options: Run the same reload flow as `/reload`. ```typescript -companion.registerCommand("reload-runtime", { +clanker.registerCommand("reload-runtime", { description: "Reload extensions, skills, prompts, and themes", handler: async (_args, ctx) => { await ctx.reload(); @@ -853,11 +853,11 @@ Tools run with `ExtensionContext`, so they cannot call `ctx.reload()` directly. Example tool the LLM can call to trigger reload: ```typescript -import type { ExtensionAPI } from "@mariozechner/companion-coding-agent"; +import type { ExtensionAPI } from "@mariozechner/clanker-coding-agent"; import { Type } from "@sinclair/typebox"; -export default function (companion: ExtensionAPI) { - companion.registerCommand("reload-runtime", { +export default function (clanker: ExtensionAPI) { + clanker.registerCommand("reload-runtime", { description: "Reload extensions, skills, prompts, and themes", handler: async (_args, ctx) => { await ctx.reload(); @@ -865,13 +865,13 @@ export default function (companion: ExtensionAPI) { }, }); - companion.registerTool({ + clanker.registerTool({ name: "reload_runtime", label: "Reload Runtime", description: "Reload extensions, skills, prompts, and themes", parameters: Type.Object({}), async execute() { - companion.sendUserMessage("/reload-runtime", { deliverAs: "followUp" }); + clanker.sendUserMessage("/reload-runtime", { deliverAs: "followUp" }); return { content: [ { @@ -887,17 +887,17 @@ export default function (companion: ExtensionAPI) { ## ExtensionAPI Methods -### companion.on(event, handler) +### clanker.on(event, handler) Subscribe to events. See [Events](#events) for event types and return values. -### companion.registerTool(definition) +### clanker.registerTool(definition) Register a custom tool callable by the LLM. See [Custom Tools](#custom-tools) for full details. -`companion.registerTool()` works both during extension load and after startup. You can call it inside `session_start`, command handlers, or other event handlers. New tools are refreshed immediately in the same session, so they appear in `companion.getAllTools()` and are callable by the LLM without `/reload`. +`clanker.registerTool()` works both during extension load and after startup. You can call it inside `session_start`, command handlers, or other event handlers. New tools are refreshed immediately in the same session, so they appear in `clanker.getAllTools()` and are callable by the LLM without `/reload`. -Use `companion.setActiveTools()` to enable or disable tools (including dynamically added tools) at runtime. +Use `clanker.setActiveTools()` to enable or disable tools (including dynamically added tools) at runtime. Use `promptSnippet` to customize that tool's one-line entry in `Available tools`, and `promptGuidelines` to append tool-specific bullets to the default `Guidelines` section when the tool is active. @@ -905,9 +905,9 @@ See [dynamic-tools.ts](../examples/extensions/dynamic-tools.ts) for a full examp ```typescript import { Type } from "@sinclair/typebox"; -import { StringEnum } from "@mariozechner/companion-ai"; +import { StringEnum } from "@mariozechner/clanker-ai"; -companion.registerTool({ +clanker.registerTool({ name: "my_tool", label: "My Tool", description: "What this tool does", @@ -934,12 +934,12 @@ companion.registerTool({ }); ``` -### companion.sendMessage(message, options?) +### clanker.sendMessage(message, options?) Inject a custom message into the session. ```typescript -companion.sendMessage({ +clanker.sendMessage({ customType: "my-extension", content: "Message text", display: true, @@ -958,16 +958,16 @@ companion.sendMessage({ - `"nextTurn"` - Queued for next user prompt. Does not interrupt or trigger anything. - `triggerTurn: true` - If agent is idle, trigger an LLM response immediately. Only applies to `"steer"` and `"followUp"` modes (ignored for `"nextTurn"`). -### companion.sendUserMessage(content, options?) +### clanker.sendUserMessage(content, options?) Send a user message to the agent. Unlike `sendMessage()` which sends custom messages, this sends an actual user message that appears as if typed by the user. Always triggers a turn. ```typescript // Simple text message -companion.sendUserMessage("What is 2+2?"); +clanker.sendUserMessage("What is 2+2?"); // With content array (text + images) -companion.sendUserMessage([ +clanker.sendUserMessage([ { type: "text", text: "Describe this image:" }, { type: "image", @@ -976,8 +976,8 @@ companion.sendUserMessage([ ]); // During streaming - must specify delivery mode -companion.sendUserMessage("Focus on error handling", { deliverAs: "steer" }); -companion.sendUserMessage("And then summarize", { deliverAs: "followUp" }); +clanker.sendUserMessage("Focus on error handling", { deliverAs: "steer" }); +clanker.sendUserMessage("And then summarize", { deliverAs: "followUp" }); ``` **Options:** @@ -990,15 +990,15 @@ When not streaming, the message is sent immediately and triggers a new turn. Whe See [send-user-message.ts](../examples/extensions/send-user-message.ts) for a complete example. -### companion.appendEntry(customType, data?) +### clanker.appendEntry(customType, data?) Persist extension state (does NOT participate in LLM context). ```typescript -companion.appendEntry("my-state", { count: 42 }); +clanker.appendEntry("my-state", { count: 42 }); // Restore on reload -companion.on("session_start", async (_event, ctx) => { +clanker.on("session_start", async (_event, ctx) => { for (const entry of ctx.sessionManager.getEntries()) { if (entry.type === "custom" && entry.customType === "my-state") { // Reconstruct from entry.data @@ -1007,35 +1007,35 @@ companion.on("session_start", async (_event, ctx) => { }); ``` -### companion.setSessionName(name) +### clanker.setSessionName(name) Set the session display name (shown in session selector instead of first message). ```typescript -companion.setSessionName("Refactor auth module"); +clanker.setSessionName("Refactor auth module"); ``` -### companion.getSessionName() +### clanker.getSessionName() Get the current session name, if set. ```typescript -const name = companion.getSessionName(); +const name = clanker.getSessionName(); if (name) { console.log(`Session: ${name}`); } ``` -### companion.setLabel(entryId, label) +### clanker.setLabel(entryId, label) Set or clear a label on an entry. Labels are user-defined markers for bookmarking and navigation (shown in `/tree` selector). ```typescript // Set a label -companion.setLabel(entryId, "checkpoint-before-refactor"); +clanker.setLabel(entryId, "checkpoint-before-refactor"); // Clear a label -companion.setLabel(entryId, undefined); +clanker.setLabel(entryId, undefined); // Read labels via sessionManager const label = ctx.sessionManager.getLabel(entryId); @@ -1043,12 +1043,12 @@ const label = ctx.sessionManager.getLabel(entryId); Labels persist in the session and survive restarts. Use them to mark important points (turns, checkpoints) in the conversation tree. -### companion.registerCommand(name, options) +### clanker.registerCommand(name, options) Register a command. ```typescript -companion.registerCommand("stats", { +clanker.registerCommand("stats", { description: "Show session statistics", handler: async (args, ctx) => { const count = ctx.sessionManager.getEntries().length; @@ -1060,9 +1060,9 @@ companion.registerCommand("stats", { Optional: add argument auto-completion for `/command ...`: ```typescript -import type { AutocompleteItem } from "@mariozechner/companion-tui"; +import type { AutocompleteItem } from "@mariozechner/clanker-tui"; -companion.registerCommand("deploy", { +clanker.registerCommand("deploy", { description: "Deploy to an environment", getArgumentCompletions: (prefix: string): AutocompleteItem[] | null => { const envs = ["dev", "staging", "prod"]; @@ -1076,13 +1076,13 @@ companion.registerCommand("deploy", { }); ``` -### companion.getCommands() +### clanker.getCommands() Get the slash commands available for invocation via `prompt` in the current session. Includes extension commands, prompt templates, and skill commands. The list matches the RPC `get_commands` ordering: extensions first, then templates, then skills. ```typescript -const commands = companion.getCommands(); +const commands = clanker.getCommands(); const bySource = commands.filter((command) => command.source === "extension"); ``` @@ -1101,16 +1101,16 @@ Each entry has this shape: Built-in interactive commands (like `/model` and `/settings`) are not included here. They are handled only in interactive mode and would not execute if sent via `prompt`. -### companion.registerMessageRenderer(customType, renderer) +### clanker.registerMessageRenderer(customType, renderer) Register a custom TUI renderer for messages with your `customType`. See [Custom UI](#custom-ui). -### companion.registerShortcut(shortcut, options) +### clanker.registerShortcut(shortcut, options) Register a keyboard shortcut. See [keybindings.md](keybindings.md) for the shortcut format and built-in keybindings. ```typescript -companion.registerShortcut("ctrl+shift+p", { +clanker.registerShortcut("ctrl+shift+p", { description: "Toggle plan mode", handler: async (ctx) => { ctx.ui.notify("Toggled!"); @@ -1118,79 +1118,79 @@ companion.registerShortcut("ctrl+shift+p", { }); ``` -### companion.registerFlag(name, options) +### clanker.registerFlag(name, options) Register a CLI flag. ```typescript -companion.registerFlag("plan", { +clanker.registerFlag("plan", { description: "Start in plan mode", type: "boolean", default: false, }); // Check value -if (companion.getFlag("--plan")) { +if (clanker.getFlag("--plan")) { // Plan mode enabled } ``` -### companion.exec(command, args, options?) +### clanker.exec(command, args, options?) Execute a shell command. ```typescript -const result = await companion.exec("git", ["status"], { +const result = await clanker.exec("git", ["status"], { signal, timeout: 5000, }); // result.stdout, result.stderr, result.code, result.killed ``` -### companion.getActiveTools() / companion.getAllTools() / companion.setActiveTools(names) +### clanker.getActiveTools() / clanker.getAllTools() / clanker.setActiveTools(names) Manage active tools. This works for both built-in tools and dynamically registered tools. ```typescript -const active = companion.getActiveTools(); // ["read", "bash", "edit", "write"] -const all = companion.getAllTools(); // [{ name: "read", description: "Read file contents..." }, ...] +const active = clanker.getActiveTools(); // ["read", "bash", "edit", "write"] +const all = clanker.getAllTools(); // [{ name: "read", description: "Read file contents..." }, ...] const names = all.map((t) => t.name); // Just names if needed -companion.setActiveTools(["read", "bash"]); // Switch to read-only +clanker.setActiveTools(["read", "bash"]); // Switch to read-only ``` -### companion.setModel(model) +### clanker.setModel(model) Set the current model. Returns `false` if no API key is available for the model. See [models.md](models.md) for configuring custom models. ```typescript const model = ctx.modelRegistry.find("anthropic", "claude-sonnet-4-5"); if (model) { - const success = await companion.setModel(model); + const success = await clanker.setModel(model); if (!success) { ctx.ui.notify("No API key for this model", "error"); } } ``` -### companion.getThinkingLevel() / companion.setThinkingLevel(level) +### clanker.getThinkingLevel() / clanker.setThinkingLevel(level) Get or set the thinking level. Level is clamped to model capabilities (non-reasoning models always use "off"). ```typescript -const current = companion.getThinkingLevel(); // "off" | "minimal" | "low" | "medium" | "high" | "xhigh" -companion.setThinkingLevel("high"); +const current = clanker.getThinkingLevel(); // "off" | "minimal" | "low" | "medium" | "high" | "xhigh" +clanker.setThinkingLevel("high"); ``` -### companion.events +### clanker.events Shared event bus for communication between extensions: ```typescript -companion.events.on("my:event", (data) => { ... }); -companion.events.emit("my:event", { ... }); +clanker.events.on("my:event", (data) => { ... }); +clanker.events.emit("my:event", { ... }); ``` -### companion.registerProvider(name, config) +### clanker.registerProvider(name, config) Register or override a model provider dynamically. Useful for proxies, custom endpoints, or team-wide model configurations. @@ -1198,7 +1198,7 @@ Calls made during the extension factory function are queued and applied once the ```typescript // Register a new provider with custom models -companion.registerProvider("my-proxy", { +clanker.registerProvider("my-proxy", { baseUrl: "https://proxy.example.com", apiKey: "PROXY_API_KEY", // env var name or literal api: "anthropic-messages", @@ -1216,12 +1216,12 @@ companion.registerProvider("my-proxy", { }); // Override baseUrl for an existing provider (keeps all models) -companion.registerProvider("anthropic", { +clanker.registerProvider("anthropic", { baseUrl: "https://proxy.example.com" }); // Register provider with OAuth support for /login -companion.registerProvider("corporate-ai", { +clanker.registerProvider("corporate-ai", { baseUrl: "https://ai.corp.com", api: "openai-responses", models: [...], @@ -1257,17 +1257,17 @@ companion.registerProvider("corporate-ai", { See [custom-provider.md](custom-provider.md) for advanced topics: custom streaming APIs, OAuth details, model definition reference. -### companion.unregisterProvider(name) +### clanker.unregisterProvider(name) Remove a previously registered provider and its models. Built-in models that were overridden by the provider are restored. Has no effect if the provider was not registered. Like `registerProvider`, this takes effect immediately when called after the initial load phase, so a `/reload` is not required. ```typescript -companion.registerCommand("my-setup-teardown", { +clanker.registerCommand("my-setup-teardown", { description: "Remove the custom proxy provider", handler: async (_args, _ctx) => { - companion.unregisterProvider("my-proxy"); + clanker.unregisterProvider("my-proxy"); }, }); ``` @@ -1277,11 +1277,11 @@ companion.registerCommand("my-setup-teardown", { Extensions with state should store it in tool result `details` for proper branching support: ```typescript -export default function (companion: ExtensionAPI) { +export default function (clanker: ExtensionAPI) { let items: string[] = []; // Reconstruct state from session - companion.on("session_start", async (_event, ctx) => { + clanker.on("session_start", async (_event, ctx) => { items = []; for (const entry of ctx.sessionManager.getBranch()) { if (entry.type === "message" && entry.message.role === "toolResult") { @@ -1292,7 +1292,7 @@ export default function (companion: ExtensionAPI) { } }); - companion.registerTool({ + clanker.registerTool({ name: "my_tool", // ... async execute(toolCallId, params, signal, onUpdate, ctx) { @@ -1308,11 +1308,11 @@ export default function (companion: ExtensionAPI) { ## Custom Tools -Register tools the LLM can call via `companion.registerTool()`. Tools appear in the system prompt and can have custom rendering. +Register tools the LLM can call via `clanker.registerTool()`. Tools appear in the system prompt and can have custom rendering. -Use `promptSnippet` for a short one-line entry in the `Available tools` section in the default system prompt. If omitted, companion falls back to `description`. +Use `promptSnippet` for a short one-line entry in the `Available tools` section in the default system prompt. If omitted, clanker falls back to `description`. -Use `promptGuidelines` to add tool-specific bullets to the default system prompt `Guidelines` section. These bullets are included only while the tool is active (for example, after `companion.setActiveTools([...])`). +Use `promptGuidelines` to add tool-specific bullets to the default system prompt `Guidelines` section. These bullets are included only while the tool is active (for example, after `clanker.setActiveTools([...])`). Note: Some models are idiots and include the @ prefix in tool path arguments. Built-in tools strip a leading @ before resolving paths. If your custom tool accepts a path, normalize a leading @ as well. @@ -1320,10 +1320,10 @@ Note: Some models are idiots and include the @ prefix in tool path arguments. Bu ```typescript import { Type } from "@sinclair/typebox"; -import { StringEnum } from "@mariozechner/companion-ai"; -import { Text } from "@mariozechner/companion-tui"; +import { StringEnum } from "@mariozechner/clanker-ai"; +import { Text } from "@mariozechner/clanker-tui"; -companion.registerTool({ +clanker.registerTool({ name: "my_tool", label: "My Tool", description: "What this tool does (shown to LLM)", @@ -1348,8 +1348,8 @@ companion.registerTool({ details: { progress: 50 }, }); - // Run commands via companion.exec (captured from extension closure) - const result = await companion.exec("some-command", [], { signal }); + // Run commands via clanker.exec (captured from extension closure) + const result = await clanker.exec("some-command", [], { signal }); // Return result return { @@ -1364,7 +1364,7 @@ companion.registerTool({ }); ``` -**Important:** Use `StringEnum` from `@mariozechner/companion-ai` for string enums. `Type.Union`/`Type.Literal` doesn't work with Google's API. +**Important:** Use `StringEnum` from `@mariozechner/clanker-ai` for string enums. `Type.Union`/`Type.Literal` doesn't work with Google's API. ### Overriding Built-in Tools @@ -1372,14 +1372,14 @@ Extensions can override built-in tools (`read`, `bash`, `edit`, `write`, `grep`, ```bash # Extension's read tool replaces built-in read -companion -e ./tool-override.ts +clanker -e ./tool-override.ts ``` Alternatively, use `--no-tools` to start without any built-in tools: ```bash # No built-in tools, only extension tools -companion --no-tools -e ./my-extension.ts +clanker --no-tools -e ./my-extension.ts ``` See [examples/extensions/tool-override.ts](../examples/extensions/tool-override.ts) for a complete example that overrides `read` with logging and access control. @@ -1390,13 +1390,13 @@ See [examples/extensions/tool-override.ts](../examples/extensions/tool-override. Built-in tool implementations: -- [read.ts](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/tools/read.ts) - `ReadToolDetails` -- [bash.ts](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/tools/bash.ts) - `BashToolDetails` -- [edit.ts](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/tools/edit.ts) -- [write.ts](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/tools/write.ts) -- [grep.ts](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/tools/grep.ts) - `GrepToolDetails` -- [find.ts](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/tools/find.ts) - `FindToolDetails` -- [ls.ts](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/tools/ls.ts) - `LsToolDetails` +- [read.ts](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/tools/read.ts) - `ReadToolDetails` +- [bash.ts](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/tools/bash.ts) - `BashToolDetails` +- [edit.ts](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/tools/edit.ts) +- [write.ts](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/tools/write.ts) +- [grep.ts](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/tools/grep.ts) - `GrepToolDetails` +- [find.ts](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/tools/find.ts) - `FindToolDetails` +- [ls.ts](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/tools/ls.ts) - `LsToolDetails` ### Remote Execution @@ -1407,7 +1407,7 @@ import { createReadTool, createBashTool, type ReadOperations, -} from "@mariozechner/companion-coding-agent"; +} from "@mariozechner/clanker-coding-agent"; // Create tool with custom operations const remoteRead = createReadTool(cwd, { @@ -1418,7 +1418,7 @@ const remoteRead = createReadTool(cwd, { }); // Register, checking flag at execution time -companion.registerTool({ +clanker.registerTool({ ...remoteRead, async execute(id, params, signal, onUpdate, _ctx) { const ssh = getSshConfig(); @@ -1436,7 +1436,7 @@ companion.registerTool({ The bash tool also supports a spawn hook to adjust the command, cwd, or env before execution: ```typescript -import { createBashTool } from "@mariozechner/companion-coding-agent"; +import { createBashTool } from "@mariozechner/clanker-coding-agent"; const bashTool = createBashTool(cwd, { spawnHook: ({ command, cwd, env }) => ({ @@ -1467,7 +1467,7 @@ import { formatSize, // Human-readable size (e.g., "50KB", "1.5MB") DEFAULT_MAX_BYTES, // 50KB DEFAULT_MAX_LINES, // 2000 -} from "@mariozechner/companion-coding-agent"; +} from "@mariozechner/clanker-coding-agent"; async execute(toolCallId, params, signal, onUpdate, ctx) { const output = await runCommand(); @@ -1508,14 +1508,14 @@ See [examples/extensions/truncated-tool.ts](../examples/extensions/truncated-too One extension can register multiple tools with shared state: ```typescript -export default function (companion: ExtensionAPI) { +export default function (clanker: ExtensionAPI) { let connection = null; - companion.registerTool({ name: "db_connect", ... }); - companion.registerTool({ name: "db_query", ... }); - companion.registerTool({ name: "db_close", ... }); + clanker.registerTool({ name: "db_connect", ... }); + clanker.registerTool({ name: "db_query", ... }); + clanker.registerTool({ name: "db_close", ... }); - companion.on("session_shutdown", async () => { + clanker.on("session_shutdown", async () => { connection?.close(); }); } @@ -1523,7 +1523,7 @@ export default function (companion: ExtensionAPI) { ### Custom Rendering -Tools can provide `renderCall` and `renderResult` for custom TUI display. See [tui.md](tui.md) for the full component API and [tool-execution.ts](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/modes/interactive/components/tool-execution.ts) for how built-in tools render. +Tools can provide `renderCall` and `renderResult` for custom TUI display. See [tui.md](tui.md) for the full component API and [tool-execution.ts](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/modes/interactive/components/tool-execution.ts) for how built-in tools render. Tool output is wrapped in a `Box` that handles padding and background. Your render methods return `Component` instances (typically `Text`). @@ -1532,7 +1532,7 @@ Tool output is wrapped in a `Box` that handles padding and background. Your rend Renders the tool call (before/during execution): ```typescript -import { Text } from "@mariozechner/companion-tui"; +import { Text } from "@mariozechner/clanker-tui"; renderCall(args, theme) { let text = theme.fg("toolTitle", theme.bold("my_tool ")); @@ -1576,7 +1576,7 @@ renderResult(result, { expanded, isPartial }, theme) { Use `keyHint()` to display keybinding hints that respect user's keybinding configuration: ```typescript -import { keyHint } from "@mariozechner/companion-coding-agent"; +import { keyHint } from "@mariozechner/clanker-coding-agent"; renderResult(result, { expanded }, theme) { let text = theme.fg("success", "✓ Done"); @@ -1727,7 +1727,7 @@ ctx.ui.setFooter((tui, theme) => ({ ctx.ui.setFooter(undefined); // Restore built-in footer // Terminal title -ctx.ui.setTitle("companion - my-project"); +ctx.ui.setTitle("clanker - my-project"); // Editor text ctx.ui.setEditorText("Prefill text"); @@ -1763,7 +1763,7 @@ ctx.ui.theme.fg("accent", "styled text"); // Access current theme For complex UI, use `ctx.ui.custom()`. This temporarily replaces the editor with your component until `done()` is called: ```typescript -import { Text, Component } from "@mariozechner/companion-tui"; +import { Text, Component } from "@mariozechner/clanker-tui"; const result = await ctx.ui.custom((tui, theme, keybindings, done) => { const text = new Text("Press Enter to confirm, Escape to cancel", 1, 1); @@ -1827,8 +1827,8 @@ Replace the main input editor with a custom implementation (vim mode, emacs mode import { CustomEditor, type ExtensionAPI, -} from "@mariozechner/companion-coding-agent"; -import { matchesKey } from "@mariozechner/companion-tui"; +} from "@mariozechner/clanker-coding-agent"; +import { matchesKey } from "@mariozechner/clanker-tui"; class VimEditor extends CustomEditor { private mode: "normal" | "insert" = "insert"; @@ -1846,8 +1846,8 @@ class VimEditor extends CustomEditor { } } -export default function (companion: ExtensionAPI) { - companion.on("session_start", (_event, ctx) => { +export default function (clanker: ExtensionAPI) { + clanker.on("session_start", (_event, ctx) => { ctx.ui.setEditorComponent( (_tui, theme, keybindings) => new VimEditor(theme, keybindings), ); @@ -1869,9 +1869,9 @@ See [tui.md](tui.md) Pattern 7 for a complete example with mode indicator. Register a custom renderer for messages with your `customType`: ```typescript -import { Text } from "@mariozechner/companion-tui"; +import { Text } from "@mariozechner/clanker-tui"; -companion.registerMessageRenderer("my-extension", (message, options, theme) => { +clanker.registerMessageRenderer("my-extension", (message, options, theme) => { const { expanded } = options; let text = theme.fg("accent", `[${message.customType}] `); text += message.content; @@ -1884,10 +1884,10 @@ companion.registerMessageRenderer("my-extension", (message, options, theme) => { }); ``` -Messages are sent via `companion.sendMessage()`: +Messages are sent via `clanker.sendMessage()`: ```typescript -companion.sendMessage({ +clanker.sendMessage({ customType: "my-extension", // Matches registerMessageRenderer content: "Status update", display: true, // Show in TUI @@ -1921,7 +1921,7 @@ For syntax highlighting in custom tool renderers: import { highlightCode, getLanguageFromPath, -} from "@mariozechner/companion-coding-agent"; +} from "@mariozechner/clanker-coding-agent"; // Highlight code with explicit language const highlighted = highlightCode("const x = 1;", "typescript", theme); @@ -2015,7 +2015,7 @@ All examples in [examples/extensions/](../examples/extensions/). | `custom-provider-gitlab-duo/` | GitLab Duo integration | `registerProvider` with OAuth | | **Messages & Communication** | | | | `message-renderer.ts` | Custom message rendering | `registerMessageRenderer`, `sendMessage` | -| `event-bus.ts` | Inter-extension events | `companion.events` | +| `event-bus.ts` | Inter-extension events | `clanker.events` | | **Session Metadata** | | | | `session-name.ts` | Name sessions for selector | `setSessionName`, `getSessionName` | | `bookmark.ts` | Bookmark entries for /tree | `setLabel` | diff --git a/packages/coding-agent/companion-out/docs/images/doom-extension.png b/packages/coding-agent/clanker-out/docs/images/doom-extension.png similarity index 100% rename from packages/coding-agent/companion-out/docs/images/doom-extension.png rename to packages/coding-agent/clanker-out/docs/images/doom-extension.png diff --git a/packages/coding-agent/companion-out/docs/images/exy.png b/packages/coding-agent/clanker-out/docs/images/exy.png similarity index 100% rename from packages/coding-agent/companion-out/docs/images/exy.png rename to packages/coding-agent/clanker-out/docs/images/exy.png diff --git a/packages/coding-agent/companion-out/docs/images/interactive-mode.png b/packages/coding-agent/clanker-out/docs/images/interactive-mode.png similarity index 100% rename from packages/coding-agent/companion-out/docs/images/interactive-mode.png rename to packages/coding-agent/clanker-out/docs/images/interactive-mode.png diff --git a/packages/coding-agent/companion-out/docs/images/tree-view.png b/packages/coding-agent/clanker-out/docs/images/tree-view.png similarity index 100% rename from packages/coding-agent/companion-out/docs/images/tree-view.png rename to packages/coding-agent/clanker-out/docs/images/tree-view.png diff --git a/packages/coding-agent/companion-out/docs/json.md b/packages/coding-agent/clanker-out/docs/json.md similarity index 82% rename from packages/coding-agent/companion-out/docs/json.md rename to packages/coding-agent/clanker-out/docs/json.md index 16191cb..67d9274 100644 --- a/packages/coding-agent/companion-out/docs/json.md +++ b/packages/coding-agent/clanker-out/docs/json.md @@ -1,14 +1,14 @@ # JSON Event Stream Mode ```bash -companion --mode json "Your prompt" +clanker --mode json "Your prompt" ``` -Outputs all session events as JSON lines to stdout. Useful for integrating companion into other tools or custom UIs. +Outputs all session events as JSON lines to stdout. Useful for integrating clanker into other tools or custom UIs. ## Event Types -Events are defined in [`AgentSessionEvent`](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/agent-session.ts#L102): +Events are defined in [`AgentSessionEvent`](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/agent-session.ts#L102): ```typescript type AgentSessionEvent = @@ -36,7 +36,7 @@ type AgentSessionEvent = }; ``` -Base events from [`AgentEvent`](https://github.com/badlogic/companion-mono/blob/main/packages/agent/src/types.ts#L179): +Base events from [`AgentEvent`](https://github.com/badlogic/clanker-agent/blob/main/packages/agent/src/types.ts#L179): ```typescript type AgentEvent = @@ -83,13 +83,13 @@ type AgentEvent = ## Message Types -Base messages from [`packages/ai/src/types.ts`](https://github.com/badlogic/companion-mono/blob/main/packages/ai/src/types.ts#L134): +Base messages from [`packages/ai/src/types.ts`](https://github.com/badlogic/clanker-agent/blob/main/packages/ai/src/types.ts#L134): - `UserMessage` (line 134) - `AssistantMessage` (line 140) - `ToolResultMessage` (line 152) -Extended messages from [`packages/coding-agent/src/core/messages.ts`](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/messages.ts#L29): +Extended messages from [`packages/coding-agent/src/core/messages.ts`](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/messages.ts#L29): - `BashExecutionMessage` (line 29) - `CustomMessage` (line 46) @@ -125,5 +125,5 @@ Followed by events as they occur: ## Example ```bash -companion --mode json "List files" 2>/dev/null | jq -c 'select(.type == "message_end")' +clanker --mode json "List files" 2>/dev/null | jq -c 'select(.type == "message_end")' ``` diff --git a/packages/coding-agent/companion-out/docs/keybindings.md b/packages/coding-agent/clanker-out/docs/keybindings.md similarity index 97% rename from packages/coding-agent/companion-out/docs/keybindings.md rename to packages/coding-agent/clanker-out/docs/keybindings.md index 0713545..7d38ffc 100644 --- a/packages/coding-agent/companion-out/docs/keybindings.md +++ b/packages/coding-agent/clanker-out/docs/keybindings.md @@ -1,6 +1,6 @@ # Keybindings -All keyboard shortcuts can be customized via `~/.companion/agent/keybindings.json`. Each action can be bound to one or more keys. +All keyboard shortcuts can be customized via `~/.clanker/agent/keybindings.json`. Each action can be bound to one or more keys. ## Key Format @@ -132,7 +132,7 @@ Modifier combinations: `ctrl+shift+x`, `alt+ctrl+x`, `ctrl+shift+alt+x`, etc. ## Custom Configuration -Create `~/.companion/agent/keybindings.json`: +Create `~/.clanker/agent/keybindings.json`: ```json { diff --git a/packages/coding-agent/companion-out/docs/models.md b/packages/coding-agent/clanker-out/docs/models.md similarity index 99% rename from packages/coding-agent/companion-out/docs/models.md rename to packages/coding-agent/clanker-out/docs/models.md index f35a624..bd6d8e2 100644 --- a/packages/coding-agent/companion-out/docs/models.md +++ b/packages/coding-agent/clanker-out/docs/models.md @@ -1,6 +1,6 @@ # Custom Models -Add custom providers and models (Ollama, vLLM, LM Studio, proxies) via `~/.companion/agent/models.json`. +Add custom providers and models (Ollama, vLLM, LM Studio, proxies) via `~/.clanker/agent/models.json`. ## Table of Contents diff --git a/packages/coding-agent/companion-out/docs/packages.md b/packages/coding-agent/clanker-out/docs/packages.md similarity index 55% rename from packages/coding-agent/companion-out/docs/packages.md rename to packages/coding-agent/clanker-out/docs/packages.md index 85d8fc5..f423c17 100644 --- a/packages/coding-agent/companion-out/docs/packages.md +++ b/packages/coding-agent/clanker-out/docs/packages.md @@ -1,14 +1,14 @@ -> companion can help you create companion packages. Ask it to bundle your extensions, skills, prompt templates, or themes. +> clanker can help you create clanker packages. Ask it to bundle your extensions, skills, prompt templates, or themes. -# Companion Packages +# Clanker Packages -Companion packages bundle extensions, skills, prompt templates, and themes so you can share them through npm or git. A package can declare resources in `package.json` under the `companion` key, or use conventional directories. +Clanker packages bundle extensions, skills, prompt templates, and themes so you can share them through npm or git. A package can declare resources in `package.json` under the `clanker` key, or use conventional directories. ## Table of Contents - [Install and Manage](#install-and-manage) - [Package Sources](#package-sources) -- [Creating a Companion Package](#creating-a-companion-package) +- [Creating a Clanker Package](#creating-a-clanker-package) - [Package Structure](#package-structure) - [Dependencies](#dependencies) - [Package Filtering](#package-filtering) @@ -17,32 +17,32 @@ Companion packages bundle extensions, skills, prompt templates, and themes so yo ## Install and Manage -> **Security:** Companion packages run with full system access. Extensions execute arbitrary code, and skills can instruct the model to perform any action including running executables. Review source code before installing third-party packages. +> **Security:** Clanker packages run with full system access. Extensions execute arbitrary code, and skills can instruct the model to perform any action including running executables. Review source code before installing third-party packages. ```bash -companion install npm:@foo/bar@1.0.0 -companion install git:github.com/user/repo@v1 -companion install https://github.com/user/repo # raw URLs work too -companion install /absolute/path/to/package -companion install ./relative/path/to/package +clanker install npm:@foo/bar@1.0.0 +clanker install git:github.com/user/repo@v1 +clanker install https://github.com/user/repo # raw URLs work too +clanker install /absolute/path/to/package +clanker install ./relative/path/to/package -companion remove npm:@foo/bar -companion list # show installed packages from settings -companion update # update all non-pinned packages +clanker remove npm:@foo/bar +clanker list # show installed packages from settings +clanker update # update all non-pinned packages ``` -By default, `install` and `remove` write to global settings (`~/.companion/agent/settings.json`). Use `-l` to write to project settings (`.companion/settings.json`) instead. Project settings can be shared with your team, and companion installs any missing packages automatically on startup. +By default, `install` and `remove` write to global settings (`~/.clanker/agent/settings.json`). Use `-l` to write to project settings (`.clanker/settings.json`) instead. Project settings can be shared with your team, and clanker installs any missing packages automatically on startup. To try a package without installing it, use `--extension` or `-e`. This installs to a temporary directory for the current run only: ```bash -companion -e npm:@foo/bar -companion -e git:github.com/user/repo +clanker -e npm:@foo/bar +clanker -e git:github.com/user/repo ``` ## Package Sources -Companion accepts three source types in settings and `companion install`. +Clanker accepts three source types in settings and `clanker install`. ### npm @@ -51,9 +51,9 @@ npm:@scope/pkg@1.2.3 npm:pkg ``` -- Versioned specs are pinned and skipped by `companion update`. +- Versioned specs are pinned and skipped by `clanker update`. - Global installs use `npm install -g`. -- Project installs go under `.companion/npm/`. +- Project installs go under `.clanker/npm/`. ### git @@ -69,21 +69,21 @@ ssh://git@github.com/user/repo@v1 - HTTPS and SSH URLs are both supported. - SSH URLs use your configured SSH keys automatically (respects `~/.ssh/config`). - For non-interactive runs (for example CI), you can set `GIT_TERMINAL_PROMPT=0` to disable credential prompts and set `GIT_SSH_COMMAND` (for example `ssh -o BatchMode=yes -o ConnectTimeout=5`) to fail fast. -- Refs pin the package and skip `companion update`. -- Cloned to `~/.companion/agent/git//` (global) or `.companion/git//` (project). +- Refs pin the package and skip `clanker update`. +- Cloned to `~/.clanker/agent/git//` (global) or `.clanker/git//` (project). - Runs `npm install` after clone or pull if `package.json` exists. **SSH examples:** ```bash # git@host:path shorthand (requires git: prefix) -companion install git:git@github.com:user/repo +clanker install git:git@github.com:user/repo # ssh:// protocol format -companion install ssh://git@github.com/user/repo +clanker install ssh://git@github.com/user/repo # With version ref -companion install git:git@github.com:user/repo@v1.0.0 +clanker install git:git@github.com:user/repo@v1.0.0 ``` ### Local Paths @@ -93,17 +93,17 @@ companion install git:git@github.com:user/repo@v1.0.0 ./relative/path/to/package ``` -Local paths point to files or directories on disk and are added to settings without copying. Relative paths are resolved against the settings file they appear in. If the path is a file, it loads as a single extension. If it is a directory, companion loads resources using package rules. +Local paths point to files or directories on disk and are added to settings without copying. Relative paths are resolved against the settings file they appear in. If the path is a file, it loads as a single extension. If it is a directory, clanker loads resources using package rules. -## Creating a Companion Package +## Creating a Clanker Package -Add a `companion` manifest to `package.json` or use conventional directories. Include the `companion-package` keyword for discoverability. +Add a `clanker` manifest to `package.json` or use conventional directories. Include the `clanker-package` keyword for discoverability. ```json { "name": "my-package", - "keywords": ["companion-package"], - "companion": { + "keywords": ["clanker-package"], + "clanker": { "extensions": ["./extensions"], "skills": ["./skills"], "prompts": ["./prompts"], @@ -116,13 +116,13 @@ Paths are relative to the package root. Arrays support glob patterns and `!exclu ### Gallery Metadata -The [package gallery](https://shittycodingagent.ai/packages) displays packages tagged with `companion-package`. Add `video` or `image` fields to show a preview: +The [package gallery](https://clanker.dev/packages) displays packages tagged with `clanker-package`. Add `video` or `image` fields to show a preview: ```json { "name": "my-package", - "keywords": ["companion-package"], - "companion": { + "keywords": ["clanker-package"], + "clanker": { "extensions": ["./extensions"], "video": "https://example.com/demo.mp4", "image": "https://example.com/screenshot.png" @@ -139,7 +139,7 @@ If both are set, video takes precedence. ### Convention Directories -If no `companion` manifest is present, companion auto-discovers resources from these directories: +If no `clanker` manifest is present, clanker auto-discovers resources from these directories: - `extensions/` loads `.ts` and `.js` files - `skills/` recursively finds `SKILL.md` folders and loads top-level `.md` files as skills @@ -148,11 +148,11 @@ If no `companion` manifest is present, companion auto-discovers resources from t ## Dependencies -Third party runtime dependencies belong in `dependencies` in `package.json`. Dependencies that do not register extensions, skills, prompt templates, or themes also belong in `dependencies`. When companion installs a package from npm or git, it runs `npm install`, so those dependencies are installed automatically. +Third party runtime dependencies belong in `dependencies` in `package.json`. Dependencies that do not register extensions, skills, prompt templates, or themes also belong in `dependencies`. When clanker installs a package from npm or git, it runs `npm install`, so those dependencies are installed automatically. -Companion bundles core packages for extensions and skills. If you import any of these, list them in `peerDependencies` with a `"*"` range and do not bundle them: `@mariozechner/companion-ai`, `@mariozechner/companion-agent-core`, `@mariozechner/companion-coding-agent`, `@mariozechner/companion-tui`, `@sinclair/typebox`. +Clanker bundles core packages for extensions and skills. If you import any of these, list them in `peerDependencies` with a `"*"` range and do not bundle them: `@mariozechner/clanker-ai`, `@mariozechner/clanker-agent-core`, `@mariozechner/clanker-coding-agent`, `@mariozechner/clanker-tui`, `@sinclair/typebox`. -Other companion packages must be bundled in your tarball. Add them to `dependencies` and `bundledDependencies`, then reference their resources through `node_modules/` paths. Companion loads packages with separate module roots, so separate installs do not collide or share modules. +Other clanker packages must be bundled in your tarball. Add them to `dependencies` and `bundledDependencies`, then reference their resources through `node_modules/` paths. Clanker loads packages with separate module roots, so separate installs do not collide or share modules. Example: @@ -162,7 +162,7 @@ Example: "shitty-extensions": "^1.0.1" }, "bundledDependencies": ["shitty-extensions"], - "companion": { + "clanker": { "extensions": ["extensions", "node_modules/shitty-extensions/extensions"], "skills": ["skills", "node_modules/shitty-extensions/skills"] } @@ -199,7 +199,7 @@ Filter what a package loads using the object form in settings: ## Enable and Disable Resources -Use `companion config` to enable or disable extensions, skills, prompt templates, and themes from installed packages and local directories. Works for both global (`~/.companion/agent`) and project (`.companion/`) scopes. +Use `clanker config` to enable or disable extensions, skills, prompt templates, and themes from installed packages and local directories. Works for both global (`~/.clanker/agent`) and project (`.clanker/`) scopes. ## Scope and Deduplication diff --git a/packages/coding-agent/companion-out/docs/prompt-templates.md b/packages/coding-agent/clanker-out/docs/prompt-templates.md similarity index 84% rename from packages/coding-agent/companion-out/docs/prompt-templates.md rename to packages/coding-agent/clanker-out/docs/prompt-templates.md index 6dbe903..5ffad5e 100644 --- a/packages/coding-agent/companion-out/docs/prompt-templates.md +++ b/packages/coding-agent/clanker-out/docs/prompt-templates.md @@ -1,4 +1,4 @@ -> companion can create prompt templates. Ask it to build one for your workflow. +> clanker can create prompt templates. Ask it to build one for your workflow. # Prompt Templates @@ -6,11 +6,11 @@ Prompt templates are Markdown snippets that expand into full prompts. Type `/nam ## Locations -Companion loads prompt templates from: +Clanker loads prompt templates from: -- Global: `~/.companion/agent/prompts/*.md` -- Project: `.companion/prompts/*.md` -- Packages: `prompts/` directories or `companion.prompts` entries in `package.json` +- Global: `~/.clanker/agent/prompts/*.md` +- Project: `.clanker/prompts/*.md` +- Packages: `prompts/` directories or `clanker.prompts` entries in `package.json` - Settings: `prompts` array with files or directories - CLI: `--prompt-template ` (repeatable) diff --git a/packages/coding-agent/companion-out/docs/providers.md b/packages/coding-agent/clanker-out/docs/providers.md similarity index 89% rename from packages/coding-agent/companion-out/docs/providers.md rename to packages/coding-agent/clanker-out/docs/providers.md index d190306..9b7ff64 100644 --- a/packages/coding-agent/companion-out/docs/providers.md +++ b/packages/coding-agent/clanker-out/docs/providers.md @@ -1,6 +1,6 @@ # Providers -Companion supports subscription-based providers via OAuth and API key providers via environment variables or auth file. For each provider, companion knows all available models. The list is updated with every companion release. +Clanker supports subscription-based providers via OAuth and API key providers via environment variables or auth file. For each provider, clanker knows all available models. The list is updated with every clanker release. ## Table of Contents @@ -21,7 +21,7 @@ Use `/login` in interactive mode, then select a provider: - Google Gemini CLI - Google Antigravity -Use `/logout` to clear credentials. Tokens are stored in `~/.companion/agent/auth.json` and auto-refresh when expired. +Use `/logout` to clear credentials. Tokens are stored in `~/.clanker/agent/auth.json` and auto-refresh when expired. ### GitHub Copilot @@ -48,7 +48,7 @@ Set via environment variable: ```bash export ANTHROPIC_API_KEY=sk-ant-... -companion +clanker ``` | Provider | Environment Variable | `auth.json` key | @@ -71,11 +71,11 @@ companion | MiniMax | `MINIMAX_API_KEY` | `minimax` | | MiniMax (China) | `MINIMAX_CN_API_KEY` | `minimax-cn` | -Reference for environment variables and `auth.json` keys: [`const envMap`](https://github.com/badlogic/companion-mono/blob/main/packages/ai/src/env-api-keys.ts) in [`packages/ai/src/env-api-keys.ts`](https://github.com/badlogic/companion-mono/blob/main/packages/ai/src/env-api-keys.ts). +Reference for environment variables and `auth.json` keys: [`const envMap`](https://github.com/badlogic/clanker-agent/blob/main/packages/ai/src/env-api-keys.ts) in [`packages/ai/src/env-api-keys.ts`](https://github.com/badlogic/clanker-agent/blob/main/packages/ai/src/env-api-keys.ts). #### Auth File -Store credentials in `~/.companion/agent/auth.json`: +Store credentials in `~/.clanker/agent/auth.json`: ```json { @@ -144,7 +144,7 @@ export AWS_REGION=us-west-2 Also supports ECS task roles (`AWS_CONTAINER_CREDENTIALS_*`) and IRSA (`AWS_WEB_IDENTITY_TOKEN_FILE`). ```bash -companion --provider amazon-bedrock --model us.anthropic.claude-sonnet-4-20250514-v1:0 +clanker --provider amazon-bedrock --model us.anthropic.claude-sonnet-4-20250514-v1:0 ``` If you are connecting to a Bedrock API proxy, the following environment variables can be used: diff --git a/packages/coding-agent/companion-out/docs/rpc.md b/packages/coding-agent/clanker-out/docs/rpc.md similarity index 97% rename from packages/coding-agent/companion-out/docs/rpc.md rename to packages/coding-agent/clanker-out/docs/rpc.md index 8686e8e..ffd8b60 100644 --- a/packages/coding-agent/companion-out/docs/rpc.md +++ b/packages/coding-agent/clanker-out/docs/rpc.md @@ -2,12 +2,12 @@ RPC mode enables headless operation of the coding agent via a JSON protocol over stdin/stdout. This is useful for embedding the agent in other applications, IDEs, or custom UIs. -**Note for Node.js/TypeScript users**: If you're building a Node.js application, consider using `AgentSession` directly from `@mariozechner/companion-coding-agent` instead of spawning a subprocess. See [`src/core/agent-session.ts`](../src/core/agent-session.ts) for the API. For a subprocess-based TypeScript client, see [`src/modes/rpc/rpc-client.ts`](../src/modes/rpc/rpc-client.ts). +**Note for Node.js/TypeScript users**: If you're building a Node.js application, consider using `AgentSession` directly from `@mariozechner/clanker-coding-agent` instead of spawning a subprocess. See [`src/core/agent-session.ts`](../src/core/agent-session.ts) for the API. For a subprocess-based TypeScript client, see [`src/modes/rpc/rpc-client.ts`](../src/modes/rpc/rpc-client.ts). ## Starting RPC Mode ```bash -companion --mode rpc [options] +clanker --mode rpc [options] ``` Common options: @@ -60,7 +60,7 @@ With images: If the agent is streaming and no `streamingBehavior` is specified, the command returns an error. -**Extension commands**: If the message is an extension command (e.g., `/mycommand`), it executes immediately even during streaming. Extension commands manage their own LLM interaction via `companion.sendMessage()`. +**Extension commands**: If the message is an extension command (e.g., `/mycommand`), it executes immediately even during streaming. Extension commands manage their own LLM interaction via `clanker.sendMessage()`. **Input expansion**: Skill commands (`/skill:name`) and prompt templates (`/template`) are expanded before sending/queueing. @@ -503,7 +503,7 @@ If output was truncated, includes `fullOutputPath`: "exitCode": 0, "cancelled": false, "truncated": true, - "fullOutputPath": "/tmp/companion-bash-abc123.log" + "fullOutputPath": "/tmp/clanker-bash-abc123.log" } } ``` @@ -752,21 +752,21 @@ Response: "name": "session-name", "description": "Set or clear session name", "source": "extension", - "path": "/home/user/.companion/agent/extensions/session.ts" + "path": "/home/user/.clanker/agent/extensions/session.ts" }, { "name": "fix-tests", "description": "Fix failing tests", "source": "prompt", "location": "project", - "path": "/home/user/myproject/.companion/agent/prompts/fix-tests.md" + "path": "/home/user/myproject/.clanker/agent/prompts/fix-tests.md" }, { "name": "skill:brave-search", "description": "Web search via Brave API", "source": "skill", "location": "user", - "path": "/home/user/.companion/agent/skills/brave-search/SKILL.md" + "path": "/home/user/.clanker/agent/skills/brave-search/SKILL.md" } ] } @@ -778,12 +778,12 @@ Each command has: - `name`: Command name (invoke with `/name`) - `description`: Human-readable description (optional for extension commands) - `source`: What kind of command: - - `"extension"`: Registered via `companion.registerCommand()` in an extension + - `"extension"`: Registered via `clanker.registerCommand()` in an extension - `"prompt"`: Loaded from a prompt template `.md` file - `"skill"`: Loaded from a skill directory (name is prefixed with `skill:`) - `location`: Where it was loaded from (optional, not present for extensions): - - `"user"`: User-level (`~/.companion/agent/`) - - `"project"`: Project-level (`./.companion/agent/`) + - `"user"`: User-level (`~/.clanker/agent/`) + - `"project"`: Project-level (`./.clanker/agent/`) - `"path"`: Explicit path via CLI or settings - `path`: Absolute file path to the command source (optional) @@ -1173,7 +1173,7 @@ Set the terminal window/tab title. Fire-and-forget. "type": "extension_ui_request", "id": "uuid-8", "method": "setTitle", - "title": "companion - my project" + "title": "clanker - my project" } ``` @@ -1372,7 +1372,7 @@ import subprocess import json proc = subprocess.Popen( - ["companion", "--mode", "rpc", "--no-session"], + ["clanker", "--mode", "rpc", "--no-session"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, text=True @@ -1411,7 +1411,7 @@ For a complete example of handling the extension UI protocol, see [`examples/rpc const { spawn } = require("child_process"); const readline = require("readline"); -const agent = spawn("companion", ["--mode", "rpc", "--no-session"]); +const agent = spawn("clanker", ["--mode", "rpc", "--no-session"]); readline.createInterface({ input: agent.stdout }).on("line", (line) => { const event = JSON.parse(line); diff --git a/packages/coding-agent/companion-out/docs/sdk.md b/packages/coding-agent/clanker-out/docs/sdk.md similarity index 91% rename from packages/coding-agent/companion-out/docs/sdk.md rename to packages/coding-agent/clanker-out/docs/sdk.md index d30d4f2..3ffbb77 100644 --- a/packages/coding-agent/companion-out/docs/sdk.md +++ b/packages/coding-agent/clanker-out/docs/sdk.md @@ -1,8 +1,8 @@ -> companion can help you use the SDK. Ask it to build an integration for your use case. +> clanker can help you use the SDK. Ask it to build an integration for your use case. # SDK -The SDK provides programmatic access to companion's agent capabilities. Use it to embed companion in other applications, build custom interfaces, or integrate with automated workflows. +The SDK provides programmatic access to clanker's agent capabilities. Use it to embed clanker in other applications, build custom interfaces, or integrate with automated workflows. **Example use cases:** @@ -22,7 +22,7 @@ import { createAgentSession, ModelRegistry, SessionManager, -} from "@mariozechner/companion-coding-agent"; +} from "@mariozechner/clanker-coding-agent"; // Set up credential storage and model registry const authStorage = AuthStorage.create(); @@ -49,7 +49,7 @@ await session.prompt("What files are in the current directory?"); ## Installation ```bash -npm install @mariozechner/companion-coding-agent +npm install @mariozechner/clanker-coding-agent ``` The SDK is included in the main package. No separate installation needed. @@ -63,7 +63,7 @@ The main factory function. Creates an `AgentSession` with configurable options. `createAgentSession()` uses a `ResourceLoader` to supply extensions, skills, prompt templates, themes, and context files. If you do not provide one, it uses `DefaultResourceLoader` with standard discovery. ```typescript -import { createAgentSession } from "@mariozechner/companion-coding-agent"; +import { createAgentSession } from "@mariozechner/clanker-coding-agent"; // Minimal: defaults with DefaultResourceLoader const { session } = await createAgentSession(); @@ -170,7 +170,7 @@ await session.prompt("After you're done, also check X", { **Behavior:** -- **Extension commands** (e.g., `/mycommand`): Execute immediately, even during streaming. They manage their own LLM interaction via `companion.sendMessage()`. +- **Extension commands** (e.g., `/mycommand`): Execute immediately, even during streaming. They manage their own LLM interaction via `clanker.sendMessage()`. - **File-based prompt templates** (from `.md` files): Expanded to their content before sending/queueing. - **During streaming without `streamingBehavior`**: Throws an error. Use `steer()` or `followUp()` directly, or specify the option. @@ -188,7 +188,7 @@ Both `steer()` and `followUp()` expand file-based prompt templates but error on ### Agent and AgentState -The `Agent` class (from `@mariozechner/companion-agent-core`) handles the core LLM interaction. Access it via `session.agent`. +The `Agent` class (from `@mariozechner/clanker-agent-core`) handles the core LLM interaction. Access it via `session.agent`. ```typescript // Access current state @@ -279,17 +279,17 @@ const { session } = await createAgentSession({ cwd: process.cwd(), // default // Global config directory - agentDir: "~/.companion/agent", // default (expands ~) + agentDir: "~/.clanker/agent", // default (expands ~) }); ``` `cwd` is used by `DefaultResourceLoader` for: -- Project extensions (`.companion/extensions/`) +- Project extensions (`.clanker/extensions/`) - Project skills: - - `.companion/skills/` + - `.clanker/skills/` - `.agents/skills/` in `cwd` and ancestor directories (up to git repo root, or filesystem root when not in a repo) -- Project prompts (`.companion/prompts/`) +- Project prompts (`.clanker/prompts/`) - Context files (`AGENTS.md` walking up from cwd) - Session directory naming @@ -297,7 +297,7 @@ const { session } = await createAgentSession({ - Global extensions (`extensions/`) - Global skills: - - `skills/` under `agentDir` (for example `~/.companion/agent/skills/`) + - `skills/` under `agentDir` (for example `~/.clanker/agent/skills/`) - `~/.agents/skills/` - Global prompts (`prompts/`) - Global context file (`AGENTS.md`) @@ -311,11 +311,11 @@ When you pass a custom `ResourceLoader`, `cwd` and `agentDir` no longer control ### Model ```typescript -import { getModel } from "@mariozechner/companion-ai"; +import { getModel } from "@mariozechner/clanker-ai"; import { AuthStorage, ModelRegistry, -} from "@mariozechner/companion-coding-agent"; +} from "@mariozechner/clanker-coding-agent"; const authStorage = AuthStorage.create(); const modelRegistry = new ModelRegistry(authStorage); @@ -365,9 +365,9 @@ API key resolution priority (handled by AuthStorage): import { AuthStorage, ModelRegistry, -} from "@mariozechner/companion-coding-agent"; +} from "@mariozechner/clanker-coding-agent"; -// Default: uses ~/.companion/agent/auth.json and ~/.companion/agent/models.json +// Default: uses ~/.clanker/agent/auth.json and ~/.clanker/agent/models.json const authStorage = AuthStorage.create(); const modelRegistry = new ModelRegistry(authStorage); @@ -402,7 +402,7 @@ Use a `ResourceLoader` to override the system prompt: import { createAgentSession, DefaultResourceLoader, -} from "@mariozechner/companion-coding-agent"; +} from "@mariozechner/clanker-coding-agent"; const loader = new DefaultResourceLoader({ systemPromptOverride: () => "You are a helpful assistant.", @@ -425,7 +425,7 @@ import { grepTool, findTool, lsTool, -} from "@mariozechner/companion-coding-agent"; +} from "@mariozechner/clanker-coding-agent"; // Use built-in tool set const { session } = await createAgentSession({ @@ -453,7 +453,7 @@ import { createGrepTool, createFindTool, createLsTool, -} from "@mariozechner/companion-coding-agent"; +} from "@mariozechner/clanker-coding-agent"; const cwd = "/path/to/project"; @@ -472,7 +472,7 @@ const { session } = await createAgentSession({ **When you don't need factories:** -- If you omit `tools`, companion automatically creates them with the correct `cwd` +- If you omit `tools`, clanker automatically creates them with the correct `cwd` - If you use `process.cwd()` as your `cwd`, the pre-built instances work fine **When you must use factories:** @@ -486,7 +486,7 @@ import { Type } from "@sinclair/typebox"; import { createAgentSession, type ToolDefinition, -} from "@mariozechner/companion-coding-agent"; +} from "@mariozechner/clanker-coding-agent"; // Inline custom tool const myTool: ToolDefinition = { @@ -508,23 +508,23 @@ const { session } = await createAgentSession({ }); ``` -Custom tools passed via `customTools` are combined with extension-registered tools. Extensions loaded by the ResourceLoader can also register tools via `companion.registerTool()`. +Custom tools passed via `customTools` are combined with extension-registered tools. Extensions loaded by the ResourceLoader can also register tools via `clanker.registerTool()`. ### Extensions -Extensions are loaded by the `ResourceLoader`. `DefaultResourceLoader` discovers extensions from `~/.companion/agent/extensions/`, `.companion/extensions/`, and settings.json extension sources. +Extensions are loaded by the `ResourceLoader`. `DefaultResourceLoader` discovers extensions from `~/.clanker/agent/extensions/`, `.clanker/extensions/`, and settings.json extension sources. ```typescript import { createAgentSession, DefaultResourceLoader, -} from "@mariozechner/companion-coding-agent"; +} from "@mariozechner/clanker-coding-agent"; const loader = new DefaultResourceLoader({ additionalExtensionPaths: ["/path/to/my-extension.ts"], extensionFactories: [ - (companion) => { - companion.on("agent_start", () => { + (clanker) => { + clanker.on("agent_start", () => { console.log("[Inline Extension] Agent starting"); }); }, @@ -537,13 +537,13 @@ const { session } = await createAgentSession({ resourceLoader: loader }); Extensions can register tools, subscribe to events, add commands, and more. See [extensions.md](extensions.md) for the full API. -**Event Bus:** Extensions can communicate via `companion.events`. Pass a shared `eventBus` to `DefaultResourceLoader` if you need to emit or listen from outside: +**Event Bus:** Extensions can communicate via `clanker.events`. Pass a shared `eventBus` to `DefaultResourceLoader` if you need to emit or listen from outside: ```typescript import { createEventBus, DefaultResourceLoader, -} from "@mariozechner/companion-coding-agent"; +} from "@mariozechner/clanker-coding-agent"; const eventBus = createEventBus(); const loader = new DefaultResourceLoader({ @@ -561,7 +561,7 @@ import { createAgentSession, DefaultResourceLoader, type Skill, -} from "@mariozechner/companion-coding-agent"; +} from "@mariozechner/clanker-coding-agent"; const customSkill: Skill = { name: "my-skill", @@ -588,7 +588,7 @@ const { session } = await createAgentSession({ resourceLoader: loader }); import { createAgentSession, DefaultResourceLoader, -} from "@mariozechner/companion-coding-agent"; +} from "@mariozechner/clanker-coding-agent"; const loader = new DefaultResourceLoader({ agentsFilesOverride: (current) => ({ @@ -610,7 +610,7 @@ import { createAgentSession, DefaultResourceLoader, type PromptTemplate, -} from "@mariozechner/companion-coding-agent"; +} from "@mariozechner/clanker-coding-agent"; const customCommand: PromptTemplate = { name: "deploy", @@ -638,7 +638,7 @@ Sessions use a tree structure with `id`/`parentId` linking, enabling in-place br import { createAgentSession, SessionManager, -} from "@mariozechner/companion-coding-agent"; +} from "@mariozechner/clanker-coding-agent"; // In-memory (no persistence) const { session } = await createAgentSession({ @@ -713,7 +713,7 @@ import { createAgentSession, SettingsManager, SessionManager, -} from "@mariozechner/companion-coding-agent"; +} from "@mariozechner/clanker-coding-agent"; // Default: loads from files (global + project merged) const { session } = await createAgentSession({ @@ -749,8 +749,8 @@ const { session } = await createAgentSession({ Settings load from two locations and merge: -1. Global: `~/.companion/agent/settings.json` -2. Project: `/.companion/settings.json` +1. Global: `~/.clanker/agent/settings.json` +2. Project: `/.clanker/settings.json` Project overrides global. Nested objects merge keys. Setters modify global settings by default. @@ -769,7 +769,7 @@ Use `DefaultResourceLoader` to discover extensions, skills, prompts, themes, and import { DefaultResourceLoader, getAgentDir, -} from "@mariozechner/companion-coding-agent"; +} from "@mariozechner/clanker-coding-agent"; const loader = new DefaultResourceLoader({ cwd, @@ -810,7 +810,7 @@ interface LoadExtensionsResult { ## Complete Example ```typescript -import { getModel } from "@mariozechner/companion-ai"; +import { getModel } from "@mariozechner/clanker-ai"; import { Type } from "@sinclair/typebox"; import { AuthStorage, @@ -822,7 +822,7 @@ import { readTool, bashTool, type ToolDefinition, -} from "@mariozechner/companion-coding-agent"; +} from "@mariozechner/clanker-coding-agent"; // Set up auth storage (custom location) const authStorage = AuthStorage.create("/custom/agent/auth.json"); @@ -905,7 +905,7 @@ Full TUI interactive mode with editor, chat history, and all built-in commands: import { createAgentSession, InteractiveMode, -} from "@mariozechner/companion-coding-agent"; +} from "@mariozechner/clanker-coding-agent"; const { session } = await createAgentSession({ /* ... */ @@ -931,7 +931,7 @@ Single-shot mode: send prompts, output result, exit: import { createAgentSession, runPrintMode, -} from "@mariozechner/companion-coding-agent"; +} from "@mariozechner/clanker-coding-agent"; const { session } = await createAgentSession({ /* ... */ @@ -953,7 +953,7 @@ JSON-RPC mode for subprocess integration: import { createAgentSession, runRpcMode, -} from "@mariozechner/companion-coding-agent"; +} from "@mariozechner/clanker-coding-agent"; const { session } = await createAgentSession({ /* ... */ @@ -969,7 +969,7 @@ See [RPC documentation](rpc.md) for the JSON protocol. For subprocess-based integration without building with the SDK, use the CLI directly: ```bash -companion --mode rpc --no-session +clanker --mode rpc --no-session ``` See [RPC documentation](rpc.md) for the JSON protocol. diff --git a/packages/coding-agent/companion-out/docs/session.md b/packages/coding-agent/clanker-out/docs/session.md similarity index 90% rename from packages/coding-agent/companion-out/docs/session.md rename to packages/coding-agent/clanker-out/docs/session.md index b4d5d27..2f929aa 100644 --- a/packages/coding-agent/companion-out/docs/session.md +++ b/packages/coding-agent/clanker-out/docs/session.md @@ -5,16 +5,16 @@ Sessions are stored as JSONL (JSON Lines) files. Each line is a JSON object with ## File Location ``` -~/.companion/agent/sessions/----/_.jsonl +~/.clanker/agent/sessions/----/_.jsonl ``` Where `` is the working directory with `/` replaced by `-`. ## Deleting Sessions -Sessions can be removed by deleting their `.jsonl` files under `~/.companion/agent/sessions/`. +Sessions can be removed by deleting their `.jsonl` files under `~/.clanker/agent/sessions/`. -Companion also supports deleting sessions interactively from `/resume` (select a session and press `Ctrl+D`, then confirm). When available, companion uses the `trash` CLI to avoid permanent deletion. +Clanker also supports deleting sessions interactively from `/resume` (select a session and press `Ctrl+D`, then confirm). When available, clanker uses the `trash` CLI to avoid permanent deletion. ## Session Version @@ -28,14 +28,14 @@ Existing sessions are automatically migrated to the current version (v3) when lo ## Source Files -Source on GitHub ([companion-mono](https://github.com/badlogic/companion-mono)): +Source on GitHub ([clanker-agent](https://github.com/badlogic/clanker-agent)): -- [`packages/coding-agent/src/core/session-manager.ts`](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/session-manager.ts) - Session entry types and SessionManager -- [`packages/coding-agent/src/core/messages.ts`](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/messages.ts) - Extended message types (BashExecutionMessage, CustomMessage, etc.) -- [`packages/ai/src/types.ts`](https://github.com/badlogic/companion-mono/blob/main/packages/ai/src/types.ts) - Base message types (UserMessage, AssistantMessage, ToolResultMessage) -- [`packages/agent/src/types.ts`](https://github.com/badlogic/companion-mono/blob/main/packages/agent/src/types.ts) - AgentMessage union type +- [`packages/coding-agent/src/core/session-manager.ts`](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/session-manager.ts) - Session entry types and SessionManager +- [`packages/coding-agent/src/core/messages.ts`](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/messages.ts) - Extended message types (BashExecutionMessage, CustomMessage, etc.) +- [`packages/ai/src/types.ts`](https://github.com/badlogic/clanker-agent/blob/main/packages/ai/src/types.ts) - Base message types (UserMessage, AssistantMessage, ToolResultMessage) +- [`packages/agent/src/types.ts`](https://github.com/badlogic/clanker-agent/blob/main/packages/agent/src/types.ts) - AgentMessage union type -For TypeScript definitions in your project, inspect `node_modules/@mariozechner/companion-coding-agent/dist/` and `node_modules/@mariozechner/companion-ai/dist/`. +For TypeScript definitions in your project, inspect `node_modules/@mariozechner/clanker-coding-agent/dist/` and `node_modules/@mariozechner/clanker-ai/dist/`. ## Message Types @@ -70,7 +70,7 @@ interface ToolCall { } ``` -### Base Message Types (from companion-ai) +### Base Message Types (from clanker-ai) ```typescript interface UserMessage { @@ -117,7 +117,7 @@ interface Usage { } ``` -### Extended Message Types (from companion-coding-agent) +### Extended Message Types (from clanker-coding-agent) ```typescript interface BashExecutionMessage { @@ -269,7 +269,7 @@ Created when context is compacted. Stores a summary of earlier messages. Optional fields: - `details`: Implementation-specific data (e.g., `{ readFiles: string[], modifiedFiles: string[] }` for default, or custom data for extensions) -- `fromHook`: `true` if generated by an extension, `false`/`undefined` if companion-generated (legacy field name) +- `fromHook`: `true` if generated by an extension, `false`/`undefined` if clanker-generated (legacy field name) ### BranchSummaryEntry @@ -289,7 +289,7 @@ Created when switching branches via `/tree` with an LLM generated summary of the Optional fields: - `details`: File tracking data (`{ readFiles: string[], modifiedFiles: string[] }`) for default, or custom data for extensions -- `fromHook`: `true` if generated by an extension, `false`/`undefined` if companion-generated (legacy field name) +- `fromHook`: `true` if generated by an extension, `false`/`undefined` if clanker-generated (legacy field name) ### CustomEntry @@ -349,7 +349,7 @@ Set `label` to `undefined` to clear a label. ### SessionInfoEntry -Session metadata (e.g., user-defined display name). Set via `/name` command or `companion.setSessionName()` in extensions. +Session metadata (e.g., user-defined display name). Set via `/name` command or `clanker.setSessionName()` in extensions. ```json { diff --git a/packages/coding-agent/companion-out/docs/settings.md b/packages/coding-agent/clanker-out/docs/settings.md similarity index 92% rename from packages/coding-agent/companion-out/docs/settings.md rename to packages/coding-agent/clanker-out/docs/settings.md index 9bf4cd8..575e311 100644 --- a/packages/coding-agent/companion-out/docs/settings.md +++ b/packages/coding-agent/clanker-out/docs/settings.md @@ -1,11 +1,11 @@ # Settings -Companion uses JSON settings files with project settings overriding global settings. +Clanker uses JSON settings files with project settings overriding global settings. | Location | Scope | | ---------------------------------- | --------------------------- | -| `~/.companion/agent/settings.json` | Global (all projects) | -| `.companion/settings.json` | Project (current directory) | +| `~/.clanker/agent/settings.json` | Global (all projects) | +| `.clanker/settings.json` | Project (current directory) | Edit directly or use `/settings` for common options. @@ -140,7 +140,7 @@ When a provider requests a retry delay longer than `maxDelayMs` (e.g., Google's These settings define where to load extensions, skills, prompts, and themes from. -Paths in `~/.companion/agent/settings.json` resolve relative to `~/.companion/agent`. Paths in `.companion/settings.json` resolve relative to `.companion`. Absolute paths and `~` are supported. +Paths in `~/.clanker/agent/settings.json` resolve relative to `~/.clanker/agent`. Paths in `.clanker/settings.json` resolve relative to `.clanker`. Absolute paths and `~` are supported. | Setting | Type | Default | Description | | --------------------- | -------- | ------- | ------------------------------------------ | @@ -159,7 +159,7 @@ String form loads all resources from a package: ```json { - "packages": ["companion-skills", "@org/my-extension"] + "packages": ["clanker-skills", "@org/my-extension"] } ``` @@ -169,7 +169,7 @@ Object form filters which resources to load: { "packages": [ { - "source": "companion-skills", + "source": "clanker-skills", "skills": ["brave-search", "transcribe"], "extensions": [] } @@ -197,22 +197,22 @@ See [packages.md](packages.md) for package management details. "maxRetries": 3 }, "enabledModels": ["claude-*", "gpt-4o"], - "packages": ["companion-skills"] + "packages": ["clanker-skills"] } ``` ## Project Overrides -Project settings (`.companion/settings.json`) override global settings. Nested objects are merged: +Project settings (`.clanker/settings.json`) override global settings. Nested objects are merged: ```json -// ~/.companion/agent/settings.json (global) +// ~/.clanker/agent/settings.json (global) { "theme": "dark", "compaction": { "enabled": true, "reserveTokens": 16384 } } -// .companion/settings.json (project) +// .clanker/settings.json (project) { "compaction": { "reserveTokens": 8192 } } diff --git a/packages/coding-agent/companion-out/docs/shell-aliases.md b/packages/coding-agent/clanker-out/docs/shell-aliases.md similarity index 53% rename from packages/coding-agent/companion-out/docs/shell-aliases.md rename to packages/coding-agent/clanker-out/docs/shell-aliases.md index 3e014d4..c05e2dc 100644 --- a/packages/coding-agent/companion-out/docs/shell-aliases.md +++ b/packages/coding-agent/clanker-out/docs/shell-aliases.md @@ -1,8 +1,8 @@ # Shell Aliases -Companion runs bash in non-interactive mode (`bash -c`), which doesn't expand aliases by default. +Clanker runs bash in non-interactive mode (`bash -c`), which doesn't expand aliases by default. -To enable your shell aliases, add to `~/.companion/agent/settings.json`: +To enable your shell aliases, add to `~/.clanker/agent/settings.json`: ```json { diff --git a/packages/coding-agent/companion-out/docs/skills.md b/packages/coding-agent/clanker-out/docs/skills.md similarity index 88% rename from packages/coding-agent/companion-out/docs/skills.md rename to packages/coding-agent/clanker-out/docs/skills.md index 0754c08..807efa6 100644 --- a/packages/coding-agent/companion-out/docs/skills.md +++ b/packages/coding-agent/clanker-out/docs/skills.md @@ -1,10 +1,10 @@ -> companion can create skills. Ask it to build one for your use case. +> clanker can create skills. Ask it to build one for your use case. # Skills Skills are self-contained capability packages that the agent loads on-demand. A skill provides specialized workflows, setup instructions, helper scripts, and reference documentation for specific tasks. -Companion implements the [Agent Skills standard](https://agentskills.io/specification), warning about violations but remaining lenient. +Clanker implements the [Agent Skills standard](https://agentskills.io/specification), warning about violations but remaining lenient. ## Table of Contents @@ -21,15 +21,15 @@ Companion implements the [Agent Skills standard](https://agentskills.io/specific > **Security:** Skills can instruct the model to perform any action and may include executable code the model invokes. Review skill content before use. -Companion loads skills from: +Clanker loads skills from: - Global: - - `~/.companion/agent/skills/` + - `~/.clanker/agent/skills/` - `~/.agents/skills/` - Project: - - `.companion/skills/` + - `.clanker/skills/` - `.agents/skills/` in `cwd` and ancestor directories (up to git repo root, or filesystem root when not in a repo) -- Packages: `skills/` directories or `companion.skills` entries in `package.json` +- Packages: `skills/` directories or `clanker.skills` entries in `package.json` - Settings: `skills` array with files or directories - CLI: `--skill ` (repeatable, additive even with `--no-skills`) @@ -50,7 +50,7 @@ To use skills from Claude Code or OpenAI Codex, add their directories to setting } ``` -For project-level Claude Code skills, add to `.companion/settings.json`: +For project-level Claude Code skills, add to `.clanker/settings.json`: ```json { @@ -60,7 +60,7 @@ For project-level Claude Code skills, add to `.companion/settings.json`: ## How Skills Work -1. At startup, companion scans skill locations and extracts names and descriptions +1. At startup, clanker scans skill locations and extracts names and descriptions 2. The system prompt includes available skills in XML format per the [specification](https://agentskills.io/integrate-skills) 3. When a task matches, the agent uses `read` to load the full SKILL.md (models don't always do this; use prompting or `/skill:name` to force it) 4. The agent follows the instructions, using relative paths to reference scripts and assets @@ -174,7 +174,7 @@ description: Helps with PDFs. ## Validation -Companion validates skills against the Agent Skills standard. Most issues produce warnings but still load the skill: +Clanker validates skills against the Agent Skills standard. Most issues produce warnings but still load the skill: - Name doesn't match parent directory - Name exceeds 64 characters or contains invalid characters @@ -229,4 +229,4 @@ cd /path/to/brave-search && npm install ## Skill Repositories - [Anthropic Skills](https://github.com/anthropics/skills) - Document processing (docx, pdf, pptx, xlsx), web development -- [Companion Skills](https://github.com/badlogic/companion-skills) - Web search, browser automation, Google APIs, transcription +- [Clanker Skills](https://github.com/badlogic/clanker-skills) - Web search, browser automation, Google APIs, transcription diff --git a/packages/coding-agent/companion-out/docs/terminal-setup.md b/packages/coding-agent/clanker-out/docs/terminal-setup.md similarity index 79% rename from packages/coding-agent/companion-out/docs/terminal-setup.md rename to packages/coding-agent/clanker-out/docs/terminal-setup.md index ccccdc5..7a9cf6f 100644 --- a/packages/coding-agent/companion-out/docs/terminal-setup.md +++ b/packages/coding-agent/clanker-out/docs/terminal-setup.md @@ -1,6 +1,6 @@ # Terminal Setup -Companion uses the [Kitty keyboard protocol](https://sw.kovidgoyal.net/kitty/keyboard-protocol/) for reliable modifier key detection. Most modern terminals support this protocol, but some require configuration. +Clanker uses the [Kitty keyboard protocol](https://sw.kovidgoyal.net/kitty/keyboard-protocol/) for reliable modifier key detection. Most modern terminals support this protocol, but some require configuration. ## Kitty, iTerm2 @@ -66,6 +66,6 @@ If you already have an `actions` array, add the object to it. The built-in terminal has limited escape sequence support. Shift+Enter cannot be distinguished from Enter in IntelliJ's terminal. -If you want the hardware cursor visible, set `COMPANION_HARDWARE_CURSOR=1` before running companion (disabled by default for compatibility). +If you want the hardware cursor visible, set `CLANKER_HARDWARE_CURSOR=1` before running clanker (disabled by default for compatibility). Consider using a dedicated terminal emulator for the best experience. diff --git a/packages/coding-agent/companion-out/docs/termux.md b/packages/coding-agent/clanker-out/docs/termux.md similarity index 89% rename from packages/coding-agent/companion-out/docs/termux.md rename to packages/coding-agent/clanker-out/docs/termux.md index a9b2515..6e96425 100644 --- a/packages/coding-agent/companion-out/docs/termux.md +++ b/packages/coding-agent/clanker-out/docs/termux.md @@ -1,6 +1,6 @@ # Termux (Android) Setup -Companion runs on Android via [Termux](https://termux.dev/), a terminal emulator and Linux environment for Android. +Clanker runs on Android via [Termux](https://termux.dev/), a terminal emulator and Linux environment for Android. ## Prerequisites @@ -16,14 +16,14 @@ pkg update && pkg upgrade # Install dependencies pkg install nodejs termux-api git -# Install companion -npm install -g @mariozechner/companion-coding-agent +# Install clanker +npm install -g @mariozechner/clanker-coding-agent # Create config directory -mkdir -p ~/.companion/agent +mkdir -p ~/.clanker/agent -# Run companion -companion +# Run clanker +clanker ``` ## Clipboard Support @@ -34,7 +34,7 @@ Image clipboard is not supported on Termux (the `ctrl+v` image paste feature wil ## Example AGENTS.md for Termux -Create `~/.companion/agent/AGENTS.md` to help the agent understand the Termux environment: +Create `~/.clanker/agent/AGENTS.md` to help the agent understand the Termux environment: ````markdown # Agent Environment: Termux on Android diff --git a/packages/coding-agent/companion-out/docs/themes.md b/packages/coding-agent/clanker-out/docs/themes.md similarity index 89% rename from packages/coding-agent/companion-out/docs/themes.md rename to packages/coding-agent/clanker-out/docs/themes.md index 42c8c45..307fcbf 100644 --- a/packages/coding-agent/companion-out/docs/themes.md +++ b/packages/coding-agent/clanker-out/docs/themes.md @@ -1,4 +1,4 @@ -> companion can create themes. Ask it to build one for your setup. +> clanker can create themes. Ask it to build one for your setup. # Themes @@ -16,12 +16,12 @@ Themes are JSON files that define colors for the TUI. ## Locations -Companion loads themes from: +Clanker loads themes from: - Built-in: `dark`, `light` -- Global: `~/.companion/agent/themes/*.json` -- Project: `.companion/themes/*.json` -- Packages: `themes/` directories or `companion.themes` entries in `package.json` +- Global: `~/.clanker/agent/themes/*.json` +- Project: `.clanker/themes/*.json` +- Packages: `themes/` directories or `clanker.themes` entries in `package.json` - Settings: `themes` array with files or directories - CLI: `--theme ` (repeatable) @@ -37,22 +37,22 @@ Select a theme via `/settings` or in `settings.json`: } ``` -On first run, companion detects your terminal background and defaults to `dark` or `light`. +On first run, clanker detects your terminal background and defaults to `dark` or `light`. ## Creating a Custom Theme 1. Create a theme file: ```bash -mkdir -p ~/.companion/agent/themes -vim ~/.companion/agent/themes/my-theme.json +mkdir -p ~/.clanker/agent/themes +vim ~/.clanker/agent/themes/my-theme.json ``` 2. Define the theme with all required colors (see [Color Tokens](#color-tokens)): ```json { - "$schema": "https://raw.githubusercontent.com/badlogic/companion-mono/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json", + "$schema": "https://raw.githubusercontent.com/badlogic/clanker-agent/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json", "name": "my-theme", "vars": { "primary": "#00aaff", @@ -116,13 +116,13 @@ vim ~/.companion/agent/themes/my-theme.json 3. Select the theme via `/settings`. -**Hot reload:** When you edit the currently active custom theme file, companion reloads it automatically for immediate visual feedback. +**Hot reload:** When you edit the currently active custom theme file, clanker reloads it automatically for immediate visual feedback. ## Theme Format ```json { - "$schema": "https://raw.githubusercontent.com/badlogic/companion-mono/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json", + "$schema": "https://raw.githubusercontent.com/badlogic/clanker-agent/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json", "name": "my-theme", "vars": { "blue": "#0066cc", @@ -268,7 +268,7 @@ Four formats are supported: ### Terminal Compatibility -Companion uses 24-bit RGB colors. Most modern terminals support this (iTerm2, Kitty, WezTerm, Windows Terminal, VS Code). For older terminals with only 256-color support, companion falls back to the nearest approximation. +Clanker uses 24-bit RGB colors. Most modern terminals support this (iTerm2, Kitty, WezTerm, Windows Terminal, VS Code). For older terminals with only 256-color support, clanker falls back to the nearest approximation. Check truecolor support: diff --git a/packages/coding-agent/companion-out/docs/tree.md b/packages/coding-agent/clanker-out/docs/tree.md similarity index 98% rename from packages/coding-agent/companion-out/docs/tree.md rename to packages/coding-agent/clanker-out/docs/tree.md index 32d94a1..101490a 100644 --- a/packages/coding-agent/companion-out/docs/tree.md +++ b/packages/coding-agent/clanker-out/docs/tree.md @@ -209,8 +209,8 @@ interface SessionTreeEvent { ### Example: Custom Summarizer ```typescript -export default function (companion: HookAPI) { - companion.on("session_before_tree", async (event, ctx) => { +export default function (clanker: HookAPI) { + clanker.on("session_before_tree", async (event, ctx) => { if (!event.preparation.userWantsSummary) return; if (event.preparation.entriesToSummarize.length === 0) return; diff --git a/packages/coding-agent/companion-out/docs/tui.md b/packages/coding-agent/clanker-out/docs/tui.md similarity index 93% rename from packages/coding-agent/companion-out/docs/tui.md rename to packages/coding-agent/clanker-out/docs/tui.md index 3d0f09f..805ef33 100644 --- a/packages/coding-agent/companion-out/docs/tui.md +++ b/packages/coding-agent/clanker-out/docs/tui.md @@ -1,10 +1,10 @@ -> companion can create TUI components. Ask it to build one for your use case. +> clanker can create TUI components. Ask it to build one for your use case. # TUI Components Extensions and custom tools can render custom TUI components for interactive user interfaces. This page covers the component system and available building blocks. -**Source:** [`@mariozechner/companion-tui`](https://github.com/badlogic/companion-mono/tree/main/packages/tui) +**Source:** [`@mariozechner/clanker-tui`](https://github.com/badlogic/clanker-agent/tree/main/packages/tui) ## Component Interface @@ -37,7 +37,7 @@ import { CURSOR_MARKER, type Component, type Focusable, -} from "@mariozechner/companion-tui"; +} from "@mariozechner/clanker-tui"; class MyInput implements Component, Focusable { focused: boolean = false; // Set by TUI when focus changes @@ -66,7 +66,7 @@ This enables IME candidate windows to appear at the correct position for CJK inp When a container component (dialog, selector, etc.) contains an `Input` or `Editor` child, the container must implement `Focusable` and propagate the focus state to the child. Otherwise, the hardware cursor won't be positioned correctly for IME input. ```typescript -import { Container, type Focusable, Input } from "@mariozechner/companion-tui"; +import { Container, type Focusable, Input } from "@mariozechner/clanker-tui"; class SearchDialog extends Container implements Focusable { private searchInput: Input; @@ -96,18 +96,18 @@ Without this propagation, typing with an IME (Chinese, Japanese, Korean, etc.) w **In extensions** via `ctx.ui.custom()`: ```typescript -companion.on("session_start", async (_event, ctx) => { +clanker.on("session_start", async (_event, ctx) => { const handle = ctx.ui.custom(myComponent); // handle.requestRender() - trigger re-render // handle.close() - restore normal UI }); ``` -**In custom tools** via `companion.ui.custom()`: +**In custom tools** via `clanker.ui.custom()`: ```typescript async execute(toolCallId, params, onUpdate, ctx, signal) { - const handle = companion.ui.custom(myComponent); + const handle = clanker.ui.custom(myComponent); // ... handle.close(); } @@ -191,7 +191,7 @@ See [overlay-qa-tests.ts](../examples/extensions/overlay-qa-tests.ts) for compre ## Built-in Components -Import from `@mariozechner/companion-tui`: +Import from `@mariozechner/clanker-tui`: ```typescript import { @@ -200,7 +200,7 @@ import { Container, Spacer, Markdown, -} from "@mariozechner/companion-tui"; +} from "@mariozechner/clanker-tui"; ``` ### Text @@ -282,7 +282,7 @@ const image = new Image( Use `matchesKey()` for key detection: ```typescript -import { matchesKey, Key } from "@mariozechner/companion-tui"; +import { matchesKey, Key } from "@mariozechner/clanker-tui"; handleInput(data: string) { if (matchesKey(data, Key.up)) { @@ -309,7 +309,7 @@ handleInput(data: string) { **Critical:** Each line from `render()` must not exceed the `width` parameter. ```typescript -import { visibleWidth, truncateToWidth } from "@mariozechner/companion-tui"; +import { visibleWidth, truncateToWidth } from "@mariozechner/clanker-tui"; render(width: number): string[] { // Truncate long lines @@ -333,7 +333,7 @@ import { Key, truncateToWidth, visibleWidth, -} from "@mariozechner/companion-tui"; +} from "@mariozechner/clanker-tui"; class MySelector { private items: string[]; @@ -388,7 +388,7 @@ class MySelector { Usage in an extension: ```typescript -companion.registerCommand("pick", { +clanker.registerCommand("pick", { description: "Pick an item", handler: async (args, ctx) => { const items = ["Option A", "Option B", "Option C"]; @@ -450,8 +450,8 @@ renderResult(result, options, theme) { **For Markdown**, use `getMarkdownTheme()`: ```typescript -import { getMarkdownTheme } from "@mariozechner/companion-coding-agent"; -import { Markdown } from "@mariozechner/companion-tui"; +import { getMarkdownTheme } from "@mariozechner/clanker-coding-agent"; +import { Markdown } from "@mariozechner/clanker-tui"; renderResult(result, options, theme) { const mdTheme = getMarkdownTheme(); @@ -470,10 +470,10 @@ interface MyTheme { ## Debug logging -Set `COMPANION_TUI_WRITE_LOG` to capture the raw ANSI stream written to stdout. +Set `CLANKER_TUI_WRITE_LOG` to capture the raw ANSI stream written to stdout. ```bash -COMPANION_TUI_WRITE_LOG=/tmp/tui-ansi.log npx tsx packages/tui/test/chat-simple.ts +CLANKER_TUI_WRITE_LOG=/tmp/tui-ansi.log npx tsx packages/tui/test/chat-simple.ts ``` ## Performance @@ -612,19 +612,19 @@ These patterns cover the most common UI needs in extensions. **Copy these patter ### Pattern 1: Selection Dialog (SelectList) -For letting users pick from a list of options. Use `SelectList` from `@mariozechner/companion-tui` with `DynamicBorder` for framing. +For letting users pick from a list of options. Use `SelectList` from `@mariozechner/clanker-tui` with `DynamicBorder` for framing. ```typescript -import type { ExtensionAPI } from "@mariozechner/companion-coding-agent"; -import { DynamicBorder } from "@mariozechner/companion-coding-agent"; +import type { ExtensionAPI } from "@mariozechner/clanker-coding-agent"; +import { DynamicBorder } from "@mariozechner/clanker-coding-agent"; import { Container, type SelectItem, SelectList, Text, -} from "@mariozechner/companion-tui"; +} from "@mariozechner/clanker-tui"; -companion.registerCommand("pick", { +clanker.registerCommand("pick", { handler: async (_args, ctx) => { const items: SelectItem[] = [ { value: "opt1", label: "Option 1", description: "First option" }, @@ -697,9 +697,9 @@ companion.registerCommand("pick", { For operations that take time and should be cancellable. `BorderedLoader` shows a spinner and handles escape to cancel. ```typescript -import { BorderedLoader } from "@mariozechner/companion-coding-agent"; +import { BorderedLoader } from "@mariozechner/clanker-coding-agent"; -companion.registerCommand("fetch", { +clanker.registerCommand("fetch", { handler: async (_args, ctx) => { const result = await ctx.ui.custom( (tui, theme, _kb, done) => { @@ -728,18 +728,18 @@ companion.registerCommand("fetch", { ### Pattern 3: Settings/Toggles (SettingsList) -For toggling multiple settings. Use `SettingsList` from `@mariozechner/companion-tui` with `getSettingsListTheme()`. +For toggling multiple settings. Use `SettingsList` from `@mariozechner/clanker-tui` with `getSettingsListTheme()`. ```typescript -import { getSettingsListTheme } from "@mariozechner/companion-coding-agent"; +import { getSettingsListTheme } from "@mariozechner/clanker-coding-agent"; import { Container, type SettingItem, SettingsList, Text, -} from "@mariozechner/companion-tui"; +} from "@mariozechner/clanker-tui"; -companion.registerCommand("settings", { +clanker.registerCommand("settings", { handler: async (_args, ctx) => { const items: SettingItem[] = [ { @@ -863,8 +863,8 @@ Replace the main input editor with a custom implementation. Useful for modal edi import { CustomEditor, type ExtensionAPI, -} from "@mariozechner/companion-coding-agent"; -import { matchesKey, truncateToWidth } from "@mariozechner/companion-tui"; +} from "@mariozechner/clanker-coding-agent"; +import { matchesKey, truncateToWidth } from "@mariozechner/clanker-tui"; type Mode = "normal" | "insert"; @@ -926,8 +926,8 @@ class VimEditor extends CustomEditor { } } -export default function (companion: ExtensionAPI) { - companion.on("session_start", (_event, ctx) => { +export default function (clanker: ExtensionAPI) { + clanker.on("session_start", (_event, ctx) => { // Factory receives theme and keybindings from the app ctx.ui.setEditorComponent( (tui, theme, keybindings) => new VimEditor(theme, keybindings), diff --git a/packages/coding-agent/companion-out/docs/windows.md b/packages/coding-agent/clanker-out/docs/windows.md similarity index 68% rename from packages/coding-agent/companion-out/docs/windows.md rename to packages/coding-agent/clanker-out/docs/windows.md index c205686..e89eb99 100644 --- a/packages/coding-agent/companion-out/docs/windows.md +++ b/packages/coding-agent/clanker-out/docs/windows.md @@ -1,8 +1,8 @@ # Windows Setup -Companion requires a bash shell on Windows. Checked locations (in order): +Clanker requires a bash shell on Windows. Checked locations (in order): -1. Custom path from `~/.companion/agent/settings.json` +1. Custom path from `~/.clanker/agent/settings.json` 2. Git Bash (`C:\Program Files\Git\bin\bash.exe`) 3. `bash.exe` on PATH (Cygwin, MSYS2, WSL) diff --git a/packages/coding-agent/companion-out/export-html/ansi-to-html.d.ts b/packages/coding-agent/clanker-out/export-html/ansi-to-html.d.ts similarity index 100% rename from packages/coding-agent/companion-out/export-html/ansi-to-html.d.ts rename to packages/coding-agent/clanker-out/export-html/ansi-to-html.d.ts diff --git a/packages/coding-agent/companion-out/export-html/ansi-to-html.d.ts.map b/packages/coding-agent/clanker-out/export-html/ansi-to-html.d.ts.map similarity index 100% rename from packages/coding-agent/companion-out/export-html/ansi-to-html.d.ts.map rename to packages/coding-agent/clanker-out/export-html/ansi-to-html.d.ts.map diff --git a/packages/coding-agent/companion-out/export-html/ansi-to-html.js b/packages/coding-agent/clanker-out/export-html/ansi-to-html.js similarity index 100% rename from packages/coding-agent/companion-out/export-html/ansi-to-html.js rename to packages/coding-agent/clanker-out/export-html/ansi-to-html.js diff --git a/packages/coding-agent/companion-out/export-html/ansi-to-html.js.map b/packages/coding-agent/clanker-out/export-html/ansi-to-html.js.map similarity index 100% rename from packages/coding-agent/companion-out/export-html/ansi-to-html.js.map rename to packages/coding-agent/clanker-out/export-html/ansi-to-html.js.map diff --git a/packages/coding-agent/companion-out/export-html/index.d.ts b/packages/coding-agent/clanker-out/export-html/index.d.ts similarity index 95% rename from packages/coding-agent/companion-out/export-html/index.d.ts rename to packages/coding-agent/clanker-out/export-html/index.d.ts index a211b56..c1c1ad8 100644 --- a/packages/coding-agent/companion-out/export-html/index.d.ts +++ b/packages/coding-agent/clanker-out/export-html/index.d.ts @@ -1,4 +1,4 @@ -import type { AgentState } from "@mariozechner/companion-agent-core"; +import type { AgentState } from "@harivansh-afk/clanker-agent-core"; import { SessionManager } from "../session-manager.js"; /** * Interface for rendering custom tools to HTML. diff --git a/packages/coding-agent/clanker-out/export-html/index.d.ts.map b/packages/coding-agent/clanker-out/export-html/index.d.ts.map new file mode 100644 index 0000000..a977b74 --- /dev/null +++ b/packages/coding-agent/clanker-out/export-html/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/export-html/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAUrE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,oFAAoF;IACpF,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;IAChE,sFAAsF;IACtF,YAAY,CACV,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,KAAK,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC,EACF,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,GACf,MAAM,GAAG,SAAS,CAAC;CACvB;AAQD,MAAM,WAAW,aAAa;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8CAA8C;IAC9C,YAAY,CAAC,EAAE,gBAAgB,CAAC;CACjC;AAwND;;;GAGG;AACH,wBAAsB,mBAAmB,CACvC,EAAE,EAAE,cAAc,EAClB,KAAK,CAAC,EAAE,UAAU,EAClB,OAAO,CAAC,EAAE,aAAa,GAAG,MAAM,GAC/B,OAAO,CAAC,MAAM,CAAC,CA+CjB;AAED;;;GAGG;AACH,wBAAsB,cAAc,CAClC,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,aAAa,GAAG,MAAM,GAC/B,OAAO,CAAC,MAAM,CAAC,CA4BjB","sourcesContent":["import type { AgentState } from \"@harivansh-afk/clanker-agent-core\";\nimport { existsSync, readFileSync, writeFileSync } from \"fs\";\nimport { basename, join } from \"path\";\nimport { APP_NAME, getExportTemplateDir } from \"../../config.js\";\nimport {\n getResolvedThemeColors,\n getThemeExportColors,\n} from \"../../modes/interactive/theme/theme.js\";\nimport type { ToolInfo } from \"../extensions/types.js\";\nimport type { SessionEntry } from \"../session-manager.js\";\nimport { SessionManager } from \"../session-manager.js\";\n\n/**\n * Interface for rendering custom tools to HTML.\n * Used by agent-session to pre-render extension tool output.\n */\nexport interface ToolHtmlRenderer {\n /** Render a tool call to HTML. Returns undefined if tool has no custom renderer. */\n renderCall(toolName: string, args: unknown): string | undefined;\n /** Render a tool result to HTML. Returns undefined if tool has no custom renderer. */\n renderResult(\n toolName: string,\n result: Array<{\n type: string;\n text?: string;\n data?: string;\n mimeType?: string;\n }>,\n details: unknown,\n isError: boolean,\n ): string | undefined;\n}\n\n/** Pre-rendered HTML for a custom tool call and result */\ninterface RenderedToolHtml {\n callHtml?: string;\n resultHtml?: string;\n}\n\nexport interface ExportOptions {\n outputPath?: string;\n themeName?: string;\n /** Optional tool renderer for custom tools */\n toolRenderer?: ToolHtmlRenderer;\n}\n\n/** Parse a color string to RGB values. Supports hex (#RRGGBB) and rgb(r,g,b) formats. */\nfunction parseColor(\n color: string,\n): { r: number; g: number; b: number } | undefined {\n const hexMatch = color.match(\n /^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n );\n if (hexMatch) {\n return {\n r: Number.parseInt(hexMatch[1], 16),\n g: Number.parseInt(hexMatch[2], 16),\n b: Number.parseInt(hexMatch[3], 16),\n };\n }\n const rgbMatch = color.match(\n /^rgb\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*\\)$/,\n );\n if (rgbMatch) {\n return {\n r: Number.parseInt(rgbMatch[1], 10),\n g: Number.parseInt(rgbMatch[2], 10),\n b: Number.parseInt(rgbMatch[3], 10),\n };\n }\n return undefined;\n}\n\n/** Calculate relative luminance of a color (0-1, higher = lighter). */\nfunction getLuminance(r: number, g: number, b: number): number {\n const toLinear = (c: number) => {\n const s = c / 255;\n return s <= 0.03928 ? s / 12.92 : ((s + 0.055) / 1.055) ** 2.4;\n };\n return 0.2126 * toLinear(r) + 0.7152 * toLinear(g) + 0.0722 * toLinear(b);\n}\n\n/** Adjust color brightness. Factor > 1 lightens, < 1 darkens. */\nfunction adjustBrightness(color: string, factor: number): string {\n const parsed = parseColor(color);\n if (!parsed) return color;\n const adjust = (c: number) =>\n Math.min(255, Math.max(0, Math.round(c * factor)));\n return `rgb(${adjust(parsed.r)}, ${adjust(parsed.g)}, ${adjust(parsed.b)})`;\n}\n\n/** Derive export background colors from a base color (e.g., userMessageBg). */\nfunction deriveExportColors(baseColor: string): {\n pageBg: string;\n cardBg: string;\n infoBg: string;\n} {\n const parsed = parseColor(baseColor);\n if (!parsed) {\n return {\n pageBg: \"rgb(24, 24, 30)\",\n cardBg: \"rgb(30, 30, 36)\",\n infoBg: \"rgb(60, 55, 40)\",\n };\n }\n\n const luminance = getLuminance(parsed.r, parsed.g, parsed.b);\n const isLight = luminance > 0.5;\n\n if (isLight) {\n return {\n pageBg: adjustBrightness(baseColor, 0.96),\n cardBg: baseColor,\n infoBg: `rgb(${Math.min(255, parsed.r + 10)}, ${Math.min(255, parsed.g + 5)}, ${Math.max(0, parsed.b - 20)})`,\n };\n }\n return {\n pageBg: adjustBrightness(baseColor, 0.7),\n cardBg: adjustBrightness(baseColor, 0.85),\n infoBg: `rgb(${Math.min(255, parsed.r + 20)}, ${Math.min(255, parsed.g + 15)}, ${parsed.b})`,\n };\n}\n\n/**\n * Generate CSS custom property declarations from theme colors.\n */\nfunction generateThemeVars(themeName?: string): string {\n const colors = getResolvedThemeColors(themeName);\n const lines: string[] = [];\n for (const [key, value] of Object.entries(colors)) {\n lines.push(`--${key}: ${value};`);\n }\n\n // Use explicit theme export colors if available, otherwise derive from userMessageBg\n const themeExport = getThemeExportColors(themeName);\n const userMessageBg = colors.userMessageBg || \"#343541\";\n const derivedColors = deriveExportColors(userMessageBg);\n\n lines.push(`--exportPageBg: ${themeExport.pageBg ?? derivedColors.pageBg};`);\n lines.push(`--exportCardBg: ${themeExport.cardBg ?? derivedColors.cardBg};`);\n lines.push(`--exportInfoBg: ${themeExport.infoBg ?? derivedColors.infoBg};`);\n\n return lines.join(\"\\n \");\n}\n\ninterface SessionData {\n header: ReturnType;\n entries: ReturnType;\n leafId: string | null;\n systemPrompt?: string;\n tools?: ToolInfo[];\n /** Pre-rendered HTML for custom tool calls/results, keyed by tool call ID */\n renderedTools?: Record;\n}\n\n/**\n * Core HTML generation logic shared by both export functions.\n */\nfunction generateHtml(sessionData: SessionData, themeName?: string): string {\n const templateDir = getExportTemplateDir();\n const template = readFileSync(join(templateDir, \"template.html\"), \"utf-8\");\n const templateCss = readFileSync(join(templateDir, \"template.css\"), \"utf-8\");\n const templateJs = readFileSync(join(templateDir, \"template.js\"), \"utf-8\");\n const markedJs = readFileSync(\n join(templateDir, \"vendor\", \"marked.min.js\"),\n \"utf-8\",\n );\n const hljsJs = readFileSync(\n join(templateDir, \"vendor\", \"highlight.min.js\"),\n \"utf-8\",\n );\n\n const themeVars = generateThemeVars(themeName);\n const colors = getResolvedThemeColors(themeName);\n const exportColors = deriveExportColors(colors.userMessageBg || \"#343541\");\n const bodyBg = exportColors.pageBg;\n const containerBg = exportColors.cardBg;\n const infoBg = exportColors.infoBg;\n\n // Base64 encode session data to avoid escaping issues\n const sessionDataBase64 = Buffer.from(JSON.stringify(sessionData)).toString(\n \"base64\",\n );\n\n // Build the CSS with theme variables injected\n const css = templateCss\n .replace(\"{{THEME_VARS}}\", themeVars)\n .replace(\"{{BODY_BG}}\", bodyBg)\n .replace(\"{{CONTAINER_BG}}\", containerBg)\n .replace(\"{{INFO_BG}}\", infoBg);\n\n return template\n .replace(\"{{CSS}}\", css)\n .replace(\"{{JS}}\", templateJs)\n .replace(\"{{SESSION_DATA}}\", sessionDataBase64)\n .replace(\"{{MARKED_JS}}\", markedJs)\n .replace(\"{{HIGHLIGHT_JS}}\", hljsJs);\n}\n\n/** Built-in tool names that have custom rendering in template.js */\nconst BUILTIN_TOOLS = new Set([\n \"bash\",\n \"read\",\n \"write\",\n \"edit\",\n \"ls\",\n \"find\",\n \"grep\",\n]);\n\n/**\n * Pre-render custom tools to HTML using their TUI renderers.\n */\nfunction preRenderCustomTools(\n entries: SessionEntry[],\n toolRenderer: ToolHtmlRenderer,\n): Record {\n const renderedTools: Record = {};\n\n for (const entry of entries) {\n if (entry.type !== \"message\") continue;\n const msg = entry.message;\n\n // Find tool calls in assistant messages\n if (msg.role === \"assistant\" && Array.isArray(msg.content)) {\n for (const block of msg.content) {\n if (block.type === \"toolCall\" && !BUILTIN_TOOLS.has(block.name)) {\n const callHtml = toolRenderer.renderCall(block.name, block.arguments);\n if (callHtml) {\n renderedTools[block.id] = { callHtml };\n }\n }\n }\n }\n\n // Find tool results\n if (msg.role === \"toolResult\" && msg.toolCallId) {\n const toolName = msg.toolName || \"\";\n // Only render if we have a pre-rendered call OR it's not a built-in tool\n const existing = renderedTools[msg.toolCallId];\n if (existing || !BUILTIN_TOOLS.has(toolName)) {\n const resultHtml = toolRenderer.renderResult(\n toolName,\n msg.content,\n msg.details,\n msg.isError || false,\n );\n if (resultHtml) {\n renderedTools[msg.toolCallId] = {\n ...existing,\n resultHtml,\n };\n }\n }\n }\n }\n\n return renderedTools;\n}\n\n/**\n * Export session to HTML using SessionManager and AgentState.\n * Used by TUI's /export command.\n */\nexport async function exportSessionToHtml(\n sm: SessionManager,\n state?: AgentState,\n options?: ExportOptions | string,\n): Promise {\n const opts: ExportOptions =\n typeof options === \"string\" ? { outputPath: options } : options || {};\n\n const sessionFile = sm.getSessionFile();\n if (!sessionFile) {\n throw new Error(\"Cannot export in-memory session to HTML\");\n }\n if (!existsSync(sessionFile)) {\n throw new Error(\"Nothing to export yet - start a conversation first\");\n }\n\n const entries = sm.getEntries();\n\n // Pre-render custom tools if a tool renderer is provided\n let renderedTools: Record | undefined;\n if (opts.toolRenderer) {\n renderedTools = preRenderCustomTools(entries, opts.toolRenderer);\n // Only include if we actually rendered something\n if (Object.keys(renderedTools).length === 0) {\n renderedTools = undefined;\n }\n }\n\n const sessionData: SessionData = {\n header: sm.getHeader(),\n entries,\n leafId: sm.getLeafId(),\n systemPrompt: state?.systemPrompt,\n tools: state?.tools?.map((t) => ({\n name: t.name,\n description: t.description,\n parameters: t.parameters,\n })),\n renderedTools,\n };\n\n const html = generateHtml(sessionData, opts.themeName);\n\n let outputPath = opts.outputPath;\n if (!outputPath) {\n const sessionBasename = basename(sessionFile, \".jsonl\");\n outputPath = `${APP_NAME}-session-${sessionBasename}.html`;\n }\n\n writeFileSync(outputPath, html, \"utf8\");\n return outputPath;\n}\n\n/**\n * Export session file to HTML (standalone, without AgentState).\n * Used by CLI for exporting arbitrary session files.\n */\nexport async function exportFromFile(\n inputPath: string,\n options?: ExportOptions | string,\n): Promise {\n const opts: ExportOptions =\n typeof options === \"string\" ? { outputPath: options } : options || {};\n\n if (!existsSync(inputPath)) {\n throw new Error(`File not found: ${inputPath}`);\n }\n\n const sm = SessionManager.open(inputPath);\n\n const sessionData: SessionData = {\n header: sm.getHeader(),\n entries: sm.getEntries(),\n leafId: sm.getLeafId(),\n systemPrompt: undefined,\n tools: undefined,\n };\n\n const html = generateHtml(sessionData, opts.themeName);\n\n let outputPath = opts.outputPath;\n if (!outputPath) {\n const inputBasename = basename(inputPath, \".jsonl\");\n outputPath = `${APP_NAME}-session-${inputBasename}.html`;\n }\n\n writeFileSync(outputPath, html, \"utf8\");\n return outputPath;\n}\n"]} \ No newline at end of file diff --git a/packages/coding-agent/companion-out/export-html/index.js b/packages/coding-agent/clanker-out/export-html/index.js similarity index 100% rename from packages/coding-agent/companion-out/export-html/index.js rename to packages/coding-agent/clanker-out/export-html/index.js diff --git a/packages/coding-agent/clanker-out/export-html/index.js.map b/packages/coding-agent/clanker-out/export-html/index.js.map new file mode 100644 index 0000000..f2e94de --- /dev/null +++ b/packages/coding-agent/clanker-out/export-html/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/export-html/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EACL,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,wCAAwC,CAAC;AAGhD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAoCvD,yFAAyF;AACzF,SAAS,UAAU,CACjB,KAAa,EACoC;IACjD,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,CAC1B,qDAAqD,CACtD,CAAC;IACF,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO;YACL,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;YACnC,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;YACnC,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;SACpC,CAAC;IACJ,CAAC;IACD,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,CAC1B,iDAAiD,CAClD,CAAC;IACF,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO;YACL,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;YACnC,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;YACnC,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;SACpC,CAAC;IACJ,CAAC;IACD,OAAO,SAAS,CAAC;AAAA,CAClB;AAED,uEAAuE;AACvE,SAAS,YAAY,CAAC,CAAS,EAAE,CAAS,EAAE,CAAS,EAAU;IAC7D,MAAM,QAAQ,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC;QAC9B,MAAM,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;QAClB,OAAO,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,KAAK,CAAC,IAAI,GAAG,CAAC;IAAA,CAChE,CAAC;IACF,OAAO,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;AAAA,CAC3E;AAED,iEAAiE;AACjE,SAAS,gBAAgB,CAAC,KAAa,EAAE,MAAc,EAAU;IAC/D,MAAM,MAAM,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;IACjC,IAAI,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IAC1B,MAAM,MAAM,GAAG,CAAC,CAAS,EAAE,EAAE,CAC3B,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IACrD,OAAO,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC;AAAA,CAC7E;AAED,+EAA+E;AAC/E,SAAS,kBAAkB,CAAC,SAAiB,EAI3C;IACA,MAAM,MAAM,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC;IACrC,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO;YACL,MAAM,EAAE,iBAAiB;YACzB,MAAM,EAAE,iBAAiB;YACzB,MAAM,EAAE,iBAAiB;SAC1B,CAAC;IACJ,CAAC;IAED,MAAM,SAAS,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IAC7D,MAAM,OAAO,GAAG,SAAS,GAAG,GAAG,CAAC;IAEhC,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO;YACL,MAAM,EAAE,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAAC;YACzC,MAAM,EAAE,SAAS;YACjB,MAAM,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG;SAC9G,CAAC;IACJ,CAAC;IACD,OAAO;QACL,MAAM,EAAE,gBAAgB,CAAC,SAAS,EAAE,GAAG,CAAC;QACxC,MAAM,EAAE,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAAC;QACzC,MAAM,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,MAAM,CAAC,CAAC,GAAG;KAC7F,CAAC;AAAA,CACH;AAED;;GAEG;AACH,SAAS,iBAAiB,CAAC,SAAkB,EAAU;IACrD,MAAM,MAAM,GAAG,sBAAsB,CAAC,SAAS,CAAC,CAAC;IACjD,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAClD,KAAK,CAAC,IAAI,CAAC,KAAK,GAAG,KAAK,KAAK,GAAG,CAAC,CAAC;IACpC,CAAC;IAED,qFAAqF;IACrF,MAAM,WAAW,GAAG,oBAAoB,CAAC,SAAS,CAAC,CAAC;IACpD,MAAM,aAAa,GAAG,MAAM,CAAC,aAAa,IAAI,SAAS,CAAC;IACxD,MAAM,aAAa,GAAG,kBAAkB,CAAC,aAAa,CAAC,CAAC;IAExD,KAAK,CAAC,IAAI,CAAC,mBAAmB,WAAW,CAAC,MAAM,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC;IAC7E,KAAK,CAAC,IAAI,CAAC,mBAAmB,WAAW,CAAC,MAAM,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC;IAC7E,KAAK,CAAC,IAAI,CAAC,mBAAmB,WAAW,CAAC,MAAM,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC;IAE7E,OAAO,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AAAA,CAC/B;AAYD;;GAEG;AACH,SAAS,YAAY,CAAC,WAAwB,EAAE,SAAkB,EAAU;IAC1E,MAAM,WAAW,GAAG,oBAAoB,EAAE,CAAC;IAC3C,MAAM,QAAQ,GAAG,YAAY,CAAC,IAAI,CAAC,WAAW,EAAE,eAAe,CAAC,EAAE,OAAO,CAAC,CAAC;IAC3E,MAAM,WAAW,GAAG,YAAY,CAAC,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC,EAAE,OAAO,CAAC,CAAC;IAC7E,MAAM,UAAU,GAAG,YAAY,CAAC,IAAI,CAAC,WAAW,EAAE,aAAa,CAAC,EAAE,OAAO,CAAC,CAAC;IAC3E,MAAM,QAAQ,GAAG,YAAY,CAC3B,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE,eAAe,CAAC,EAC5C,OAAO,CACR,CAAC;IACF,MAAM,MAAM,GAAG,YAAY,CACzB,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE,kBAAkB,CAAC,EAC/C,OAAO,CACR,CAAC;IAEF,MAAM,SAAS,GAAG,iBAAiB,CAAC,SAAS,CAAC,CAAC;IAC/C,MAAM,MAAM,GAAG,sBAAsB,CAAC,SAAS,CAAC,CAAC;IACjD,MAAM,YAAY,GAAG,kBAAkB,CAAC,MAAM,CAAC,aAAa,IAAI,SAAS,CAAC,CAAC;IAC3E,MAAM,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC;IACnC,MAAM,WAAW,GAAG,YAAY,CAAC,MAAM,CAAC;IACxC,MAAM,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC;IAEnC,sDAAsD;IACtD,MAAM,iBAAiB,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,CACzE,QAAQ,CACT,CAAC;IAEF,8CAA8C;IAC9C,MAAM,GAAG,GAAG,WAAW;SACpB,OAAO,CAAC,gBAAgB,EAAE,SAAS,CAAC;SACpC,OAAO,CAAC,aAAa,EAAE,MAAM,CAAC;SAC9B,OAAO,CAAC,kBAAkB,EAAE,WAAW,CAAC;SACxC,OAAO,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;IAElC,OAAO,QAAQ;SACZ,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC;SACvB,OAAO,CAAC,QAAQ,EAAE,UAAU,CAAC;SAC7B,OAAO,CAAC,kBAAkB,EAAE,iBAAiB,CAAC;SAC9C,OAAO,CAAC,eAAe,EAAE,QAAQ,CAAC;SAClC,OAAO,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC;AAAA,CACxC;AAED,oEAAoE;AACpE,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC;IAC5B,MAAM;IACN,MAAM;IACN,OAAO;IACP,MAAM;IACN,IAAI;IACJ,MAAM;IACN,MAAM;CACP,CAAC,CAAC;AAEH;;GAEG;AACH,SAAS,oBAAoB,CAC3B,OAAuB,EACvB,YAA8B,EACI;IAClC,MAAM,aAAa,GAAqC,EAAE,CAAC;IAE3D,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;QAC5B,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS;YAAE,SAAS;QACvC,MAAM,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC;QAE1B,wCAAwC;QACxC,IAAI,GAAG,CAAC,IAAI,KAAK,WAAW,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;YAC3D,KAAK,MAAM,KAAK,IAAI,GAAG,CAAC,OAAO,EAAE,CAAC;gBAChC,IAAI,KAAK,CAAC,IAAI,KAAK,UAAU,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;oBAChE,MAAM,QAAQ,GAAG,YAAY,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;oBACtE,IAAI,QAAQ,EAAE,CAAC;wBACb,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,QAAQ,EAAE,CAAC;oBACzC,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;QAED,oBAAoB;QACpB,IAAI,GAAG,CAAC,IAAI,KAAK,YAAY,IAAI,GAAG,CAAC,UAAU,EAAE,CAAC;YAChD,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,IAAI,EAAE,CAAC;YACpC,yEAAyE;YACzE,MAAM,QAAQ,GAAG,aAAa,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;YAC/C,IAAI,QAAQ,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;gBAC7C,MAAM,UAAU,GAAG,YAAY,CAAC,YAAY,CAC1C,QAAQ,EACR,GAAG,CAAC,OAAO,EACX,GAAG,CAAC,OAAO,EACX,GAAG,CAAC,OAAO,IAAI,KAAK,CACrB,CAAC;gBACF,IAAI,UAAU,EAAE,CAAC;oBACf,aAAa,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG;wBAC9B,GAAG,QAAQ;wBACX,UAAU;qBACX,CAAC;gBACJ,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,aAAa,CAAC;AAAA,CACtB;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,EAAkB,EAClB,KAAkB,EAClB,OAAgC,EACf;IACjB,MAAM,IAAI,GACR,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,OAAO,IAAI,EAAE,CAAC;IAExE,MAAM,WAAW,GAAG,EAAE,CAAC,cAAc,EAAE,CAAC;IACxC,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;IAC7D,CAAC;IACD,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;QAC7B,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;IACxE,CAAC;IAED,MAAM,OAAO,GAAG,EAAE,CAAC,UAAU,EAAE,CAAC;IAEhC,yDAAyD;IACzD,IAAI,aAA2D,CAAC;IAChE,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;QACtB,aAAa,GAAG,oBAAoB,CAAC,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QACjE,iDAAiD;QACjD,IAAI,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC5C,aAAa,GAAG,SAAS,CAAC;QAC5B,CAAC;IACH,CAAC;IAED,MAAM,WAAW,GAAgB;QAC/B,MAAM,EAAE,EAAE,CAAC,SAAS,EAAE;QACtB,OAAO;QACP,MAAM,EAAE,EAAE,CAAC,SAAS,EAAE;QACtB,YAAY,EAAE,KAAK,EAAE,YAAY;QACjC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YAC/B,IAAI,EAAE,CAAC,CAAC,IAAI;YACZ,WAAW,EAAE,CAAC,CAAC,WAAW;YAC1B,UAAU,EAAE,CAAC,CAAC,UAAU;SACzB,CAAC,CAAC;QACH,aAAa;KACd,CAAC;IAEF,MAAM,IAAI,GAAG,YAAY,CAAC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;IAEvD,IAAI,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;IACjC,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,MAAM,eAAe,GAAG,QAAQ,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;QACxD,UAAU,GAAG,GAAG,QAAQ,YAAY,eAAe,OAAO,CAAC;IAC7D,CAAC;IAED,aAAa,CAAC,UAAU,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IACxC,OAAO,UAAU,CAAC;AAAA,CACnB;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,SAAiB,EACjB,OAAgC,EACf;IACjB,MAAM,IAAI,GACR,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,OAAO,IAAI,EAAE,CAAC;IAExE,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CAAC,mBAAmB,SAAS,EAAE,CAAC,CAAC;IAClD,CAAC;IAED,MAAM,EAAE,GAAG,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAE1C,MAAM,WAAW,GAAgB;QAC/B,MAAM,EAAE,EAAE,CAAC,SAAS,EAAE;QACtB,OAAO,EAAE,EAAE,CAAC,UAAU,EAAE;QACxB,MAAM,EAAE,EAAE,CAAC,SAAS,EAAE;QACtB,YAAY,EAAE,SAAS;QACvB,KAAK,EAAE,SAAS;KACjB,CAAC;IAEF,MAAM,IAAI,GAAG,YAAY,CAAC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;IAEvD,IAAI,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;IACjC,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,MAAM,aAAa,GAAG,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QACpD,UAAU,GAAG,GAAG,QAAQ,YAAY,aAAa,OAAO,CAAC;IAC3D,CAAC;IAED,aAAa,CAAC,UAAU,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IACxC,OAAO,UAAU,CAAC;AAAA,CACnB","sourcesContent":["import type { AgentState } from \"@harivansh-afk/clanker-agent-core\";\nimport { existsSync, readFileSync, writeFileSync } from \"fs\";\nimport { basename, join } from \"path\";\nimport { APP_NAME, getExportTemplateDir } from \"../../config.js\";\nimport {\n getResolvedThemeColors,\n getThemeExportColors,\n} from \"../../modes/interactive/theme/theme.js\";\nimport type { ToolInfo } from \"../extensions/types.js\";\nimport type { SessionEntry } from \"../session-manager.js\";\nimport { SessionManager } from \"../session-manager.js\";\n\n/**\n * Interface for rendering custom tools to HTML.\n * Used by agent-session to pre-render extension tool output.\n */\nexport interface ToolHtmlRenderer {\n /** Render a tool call to HTML. Returns undefined if tool has no custom renderer. */\n renderCall(toolName: string, args: unknown): string | undefined;\n /** Render a tool result to HTML. Returns undefined if tool has no custom renderer. */\n renderResult(\n toolName: string,\n result: Array<{\n type: string;\n text?: string;\n data?: string;\n mimeType?: string;\n }>,\n details: unknown,\n isError: boolean,\n ): string | undefined;\n}\n\n/** Pre-rendered HTML for a custom tool call and result */\ninterface RenderedToolHtml {\n callHtml?: string;\n resultHtml?: string;\n}\n\nexport interface ExportOptions {\n outputPath?: string;\n themeName?: string;\n /** Optional tool renderer for custom tools */\n toolRenderer?: ToolHtmlRenderer;\n}\n\n/** Parse a color string to RGB values. Supports hex (#RRGGBB) and rgb(r,g,b) formats. */\nfunction parseColor(\n color: string,\n): { r: number; g: number; b: number } | undefined {\n const hexMatch = color.match(\n /^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n );\n if (hexMatch) {\n return {\n r: Number.parseInt(hexMatch[1], 16),\n g: Number.parseInt(hexMatch[2], 16),\n b: Number.parseInt(hexMatch[3], 16),\n };\n }\n const rgbMatch = color.match(\n /^rgb\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*\\)$/,\n );\n if (rgbMatch) {\n return {\n r: Number.parseInt(rgbMatch[1], 10),\n g: Number.parseInt(rgbMatch[2], 10),\n b: Number.parseInt(rgbMatch[3], 10),\n };\n }\n return undefined;\n}\n\n/** Calculate relative luminance of a color (0-1, higher = lighter). */\nfunction getLuminance(r: number, g: number, b: number): number {\n const toLinear = (c: number) => {\n const s = c / 255;\n return s <= 0.03928 ? s / 12.92 : ((s + 0.055) / 1.055) ** 2.4;\n };\n return 0.2126 * toLinear(r) + 0.7152 * toLinear(g) + 0.0722 * toLinear(b);\n}\n\n/** Adjust color brightness. Factor > 1 lightens, < 1 darkens. */\nfunction adjustBrightness(color: string, factor: number): string {\n const parsed = parseColor(color);\n if (!parsed) return color;\n const adjust = (c: number) =>\n Math.min(255, Math.max(0, Math.round(c * factor)));\n return `rgb(${adjust(parsed.r)}, ${adjust(parsed.g)}, ${adjust(parsed.b)})`;\n}\n\n/** Derive export background colors from a base color (e.g., userMessageBg). */\nfunction deriveExportColors(baseColor: string): {\n pageBg: string;\n cardBg: string;\n infoBg: string;\n} {\n const parsed = parseColor(baseColor);\n if (!parsed) {\n return {\n pageBg: \"rgb(24, 24, 30)\",\n cardBg: \"rgb(30, 30, 36)\",\n infoBg: \"rgb(60, 55, 40)\",\n };\n }\n\n const luminance = getLuminance(parsed.r, parsed.g, parsed.b);\n const isLight = luminance > 0.5;\n\n if (isLight) {\n return {\n pageBg: adjustBrightness(baseColor, 0.96),\n cardBg: baseColor,\n infoBg: `rgb(${Math.min(255, parsed.r + 10)}, ${Math.min(255, parsed.g + 5)}, ${Math.max(0, parsed.b - 20)})`,\n };\n }\n return {\n pageBg: adjustBrightness(baseColor, 0.7),\n cardBg: adjustBrightness(baseColor, 0.85),\n infoBg: `rgb(${Math.min(255, parsed.r + 20)}, ${Math.min(255, parsed.g + 15)}, ${parsed.b})`,\n };\n}\n\n/**\n * Generate CSS custom property declarations from theme colors.\n */\nfunction generateThemeVars(themeName?: string): string {\n const colors = getResolvedThemeColors(themeName);\n const lines: string[] = [];\n for (const [key, value] of Object.entries(colors)) {\n lines.push(`--${key}: ${value};`);\n }\n\n // Use explicit theme export colors if available, otherwise derive from userMessageBg\n const themeExport = getThemeExportColors(themeName);\n const userMessageBg = colors.userMessageBg || \"#343541\";\n const derivedColors = deriveExportColors(userMessageBg);\n\n lines.push(`--exportPageBg: ${themeExport.pageBg ?? derivedColors.pageBg};`);\n lines.push(`--exportCardBg: ${themeExport.cardBg ?? derivedColors.cardBg};`);\n lines.push(`--exportInfoBg: ${themeExport.infoBg ?? derivedColors.infoBg};`);\n\n return lines.join(\"\\n \");\n}\n\ninterface SessionData {\n header: ReturnType;\n entries: ReturnType;\n leafId: string | null;\n systemPrompt?: string;\n tools?: ToolInfo[];\n /** Pre-rendered HTML for custom tool calls/results, keyed by tool call ID */\n renderedTools?: Record;\n}\n\n/**\n * Core HTML generation logic shared by both export functions.\n */\nfunction generateHtml(sessionData: SessionData, themeName?: string): string {\n const templateDir = getExportTemplateDir();\n const template = readFileSync(join(templateDir, \"template.html\"), \"utf-8\");\n const templateCss = readFileSync(join(templateDir, \"template.css\"), \"utf-8\");\n const templateJs = readFileSync(join(templateDir, \"template.js\"), \"utf-8\");\n const markedJs = readFileSync(\n join(templateDir, \"vendor\", \"marked.min.js\"),\n \"utf-8\",\n );\n const hljsJs = readFileSync(\n join(templateDir, \"vendor\", \"highlight.min.js\"),\n \"utf-8\",\n );\n\n const themeVars = generateThemeVars(themeName);\n const colors = getResolvedThemeColors(themeName);\n const exportColors = deriveExportColors(colors.userMessageBg || \"#343541\");\n const bodyBg = exportColors.pageBg;\n const containerBg = exportColors.cardBg;\n const infoBg = exportColors.infoBg;\n\n // Base64 encode session data to avoid escaping issues\n const sessionDataBase64 = Buffer.from(JSON.stringify(sessionData)).toString(\n \"base64\",\n );\n\n // Build the CSS with theme variables injected\n const css = templateCss\n .replace(\"{{THEME_VARS}}\", themeVars)\n .replace(\"{{BODY_BG}}\", bodyBg)\n .replace(\"{{CONTAINER_BG}}\", containerBg)\n .replace(\"{{INFO_BG}}\", infoBg);\n\n return template\n .replace(\"{{CSS}}\", css)\n .replace(\"{{JS}}\", templateJs)\n .replace(\"{{SESSION_DATA}}\", sessionDataBase64)\n .replace(\"{{MARKED_JS}}\", markedJs)\n .replace(\"{{HIGHLIGHT_JS}}\", hljsJs);\n}\n\n/** Built-in tool names that have custom rendering in template.js */\nconst BUILTIN_TOOLS = new Set([\n \"bash\",\n \"read\",\n \"write\",\n \"edit\",\n \"ls\",\n \"find\",\n \"grep\",\n]);\n\n/**\n * Pre-render custom tools to HTML using their TUI renderers.\n */\nfunction preRenderCustomTools(\n entries: SessionEntry[],\n toolRenderer: ToolHtmlRenderer,\n): Record {\n const renderedTools: Record = {};\n\n for (const entry of entries) {\n if (entry.type !== \"message\") continue;\n const msg = entry.message;\n\n // Find tool calls in assistant messages\n if (msg.role === \"assistant\" && Array.isArray(msg.content)) {\n for (const block of msg.content) {\n if (block.type === \"toolCall\" && !BUILTIN_TOOLS.has(block.name)) {\n const callHtml = toolRenderer.renderCall(block.name, block.arguments);\n if (callHtml) {\n renderedTools[block.id] = { callHtml };\n }\n }\n }\n }\n\n // Find tool results\n if (msg.role === \"toolResult\" && msg.toolCallId) {\n const toolName = msg.toolName || \"\";\n // Only render if we have a pre-rendered call OR it's not a built-in tool\n const existing = renderedTools[msg.toolCallId];\n if (existing || !BUILTIN_TOOLS.has(toolName)) {\n const resultHtml = toolRenderer.renderResult(\n toolName,\n msg.content,\n msg.details,\n msg.isError || false,\n );\n if (resultHtml) {\n renderedTools[msg.toolCallId] = {\n ...existing,\n resultHtml,\n };\n }\n }\n }\n }\n\n return renderedTools;\n}\n\n/**\n * Export session to HTML using SessionManager and AgentState.\n * Used by TUI's /export command.\n */\nexport async function exportSessionToHtml(\n sm: SessionManager,\n state?: AgentState,\n options?: ExportOptions | string,\n): Promise {\n const opts: ExportOptions =\n typeof options === \"string\" ? { outputPath: options } : options || {};\n\n const sessionFile = sm.getSessionFile();\n if (!sessionFile) {\n throw new Error(\"Cannot export in-memory session to HTML\");\n }\n if (!existsSync(sessionFile)) {\n throw new Error(\"Nothing to export yet - start a conversation first\");\n }\n\n const entries = sm.getEntries();\n\n // Pre-render custom tools if a tool renderer is provided\n let renderedTools: Record | undefined;\n if (opts.toolRenderer) {\n renderedTools = preRenderCustomTools(entries, opts.toolRenderer);\n // Only include if we actually rendered something\n if (Object.keys(renderedTools).length === 0) {\n renderedTools = undefined;\n }\n }\n\n const sessionData: SessionData = {\n header: sm.getHeader(),\n entries,\n leafId: sm.getLeafId(),\n systemPrompt: state?.systemPrompt,\n tools: state?.tools?.map((t) => ({\n name: t.name,\n description: t.description,\n parameters: t.parameters,\n })),\n renderedTools,\n };\n\n const html = generateHtml(sessionData, opts.themeName);\n\n let outputPath = opts.outputPath;\n if (!outputPath) {\n const sessionBasename = basename(sessionFile, \".jsonl\");\n outputPath = `${APP_NAME}-session-${sessionBasename}.html`;\n }\n\n writeFileSync(outputPath, html, \"utf8\");\n return outputPath;\n}\n\n/**\n * Export session file to HTML (standalone, without AgentState).\n * Used by CLI for exporting arbitrary session files.\n */\nexport async function exportFromFile(\n inputPath: string,\n options?: ExportOptions | string,\n): Promise {\n const opts: ExportOptions =\n typeof options === \"string\" ? { outputPath: options } : options || {};\n\n if (!existsSync(inputPath)) {\n throw new Error(`File not found: ${inputPath}`);\n }\n\n const sm = SessionManager.open(inputPath);\n\n const sessionData: SessionData = {\n header: sm.getHeader(),\n entries: sm.getEntries(),\n leafId: sm.getLeafId(),\n systemPrompt: undefined,\n tools: undefined,\n };\n\n const html = generateHtml(sessionData, opts.themeName);\n\n let outputPath = opts.outputPath;\n if (!outputPath) {\n const inputBasename = basename(inputPath, \".jsonl\");\n outputPath = `${APP_NAME}-session-${inputBasename}.html`;\n }\n\n writeFileSync(outputPath, html, \"utf8\");\n return outputPath;\n}\n"]} \ No newline at end of file diff --git a/packages/coding-agent/companion-out/export-html/template.css b/packages/coding-agent/clanker-out/export-html/template.css similarity index 100% rename from packages/coding-agent/companion-out/export-html/template.css rename to packages/coding-agent/clanker-out/export-html/template.css diff --git a/packages/coding-agent/companion-out/export-html/template.html b/packages/coding-agent/clanker-out/export-html/template.html similarity index 100% rename from packages/coding-agent/companion-out/export-html/template.html rename to packages/coding-agent/clanker-out/export-html/template.html diff --git a/packages/coding-agent/companion-out/export-html/template.js b/packages/coding-agent/clanker-out/export-html/template.js similarity index 100% rename from packages/coding-agent/companion-out/export-html/template.js rename to packages/coding-agent/clanker-out/export-html/template.js diff --git a/packages/coding-agent/companion-out/export-html/tool-renderer.d.ts b/packages/coding-agent/clanker-out/export-html/tool-renderer.d.ts similarity index 100% rename from packages/coding-agent/companion-out/export-html/tool-renderer.d.ts rename to packages/coding-agent/clanker-out/export-html/tool-renderer.d.ts diff --git a/packages/coding-agent/clanker-out/export-html/tool-renderer.d.ts.map b/packages/coding-agent/clanker-out/export-html/tool-renderer.d.ts.map new file mode 100644 index 0000000..5f0f8ee --- /dev/null +++ b/packages/coding-agent/clanker-out/export-html/tool-renderer.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"tool-renderer.d.ts","sourceRoot":"","sources":["../../../src/core/export-html/tool-renderer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wCAAwC,CAAC;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAG7D,MAAM,WAAW,oBAAoB;IACnC,kDAAkD;IAClD,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,cAAc,GAAG,SAAS,CAAC;IAChE,wBAAwB;IACxB,KAAK,EAAE,KAAK,CAAC;IACb,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,gBAAgB;IAC/B,oFAAoF;IACpF,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;IAChE,sFAAsF;IACtF,YAAY,CACV,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,KAAK,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC,EACF,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,GACf,MAAM,GAAG,SAAS,CAAC;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,oBAAoB,GACzB,gBAAgB,CAiElB","sourcesContent":["/**\n * Tool HTML renderer for custom tools in HTML export.\n *\n * Renders custom tool calls and results to HTML by invoking their TUI renderers\n * and converting the ANSI output to HTML.\n */\n\nimport type { ImageContent, TextContent } from \"@mariozechner/clanker-ai\";\nimport type { Theme } from \"../../modes/interactive/theme/theme.js\";\nimport type { ToolDefinition } from \"../extensions/types.js\";\nimport { ansiLinesToHtml } from \"./ansi-to-html.js\";\n\nexport interface ToolHtmlRendererDeps {\n /** Function to look up tool definition by name */\n getToolDefinition: (name: string) => ToolDefinition | undefined;\n /** Theme for styling */\n theme: Theme;\n /** Terminal width for rendering (default: 100) */\n width?: number;\n}\n\nexport interface ToolHtmlRenderer {\n /** Render a tool call to HTML. Returns undefined if tool has no custom renderer. */\n renderCall(toolName: string, args: unknown): string | undefined;\n /** Render a tool result to HTML. Returns undefined if tool has no custom renderer. */\n renderResult(\n toolName: string,\n result: Array<{\n type: string;\n text?: string;\n data?: string;\n mimeType?: string;\n }>,\n details: unknown,\n isError: boolean,\n ): string | undefined;\n}\n\n/**\n * Create a tool HTML renderer.\n *\n * The renderer looks up tool definitions and invokes their renderCall/renderResult\n * methods, converting the resulting TUI Component output (ANSI) to HTML.\n */\nexport function createToolHtmlRenderer(\n deps: ToolHtmlRendererDeps,\n): ToolHtmlRenderer {\n const { getToolDefinition, theme, width = 100 } = deps;\n\n return {\n renderCall(toolName: string, args: unknown): string | undefined {\n try {\n const toolDef = getToolDefinition(toolName);\n if (!toolDef?.renderCall) {\n return undefined;\n }\n\n const component = toolDef.renderCall(args, theme);\n if (!component) {\n return undefined;\n }\n const lines = component.render(width);\n return ansiLinesToHtml(lines);\n } catch {\n // On error, return undefined to trigger JSON fallback\n return undefined;\n }\n },\n\n renderResult(\n toolName: string,\n result: Array<{\n type: string;\n text?: string;\n data?: string;\n mimeType?: string;\n }>,\n details: unknown,\n isError: boolean,\n ): string | undefined {\n try {\n const toolDef = getToolDefinition(toolName);\n if (!toolDef?.renderResult) {\n return undefined;\n }\n\n // Build AgentToolResult from content array\n // Cast content since session storage uses generic object types\n const agentToolResult = {\n content: result as (TextContent | ImageContent)[],\n details,\n isError,\n };\n\n // Always render expanded, client-side will apply truncation\n const component = toolDef.renderResult(\n agentToolResult,\n { expanded: true, isPartial: false },\n theme,\n );\n if (!component) {\n return undefined;\n }\n const lines = component.render(width);\n return ansiLinesToHtml(lines);\n } catch {\n // On error, return undefined to trigger JSON fallback\n return undefined;\n }\n },\n };\n}\n"]} \ No newline at end of file diff --git a/packages/coding-agent/companion-out/export-html/tool-renderer.js b/packages/coding-agent/clanker-out/export-html/tool-renderer.js similarity index 100% rename from packages/coding-agent/companion-out/export-html/tool-renderer.js rename to packages/coding-agent/clanker-out/export-html/tool-renderer.js diff --git a/packages/coding-agent/clanker-out/export-html/tool-renderer.js.map b/packages/coding-agent/clanker-out/export-html/tool-renderer.js.map new file mode 100644 index 0000000..346b348 --- /dev/null +++ b/packages/coding-agent/clanker-out/export-html/tool-renderer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"tool-renderer.js","sourceRoot":"","sources":["../../../src/core/export-html/tool-renderer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AA4BpD;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB,CACpC,IAA0B,EACR;IAClB,MAAM,EAAE,iBAAiB,EAAE,KAAK,EAAE,KAAK,GAAG,GAAG,EAAE,GAAG,IAAI,CAAC;IAEvD,OAAO;QACL,UAAU,CAAC,QAAgB,EAAE,IAAa,EAAsB;YAC9D,IAAI,CAAC;gBACH,MAAM,OAAO,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAC;gBAC5C,IAAI,CAAC,OAAO,EAAE,UAAU,EAAE,CAAC;oBACzB,OAAO,SAAS,CAAC;gBACnB,CAAC;gBAED,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;gBAClD,IAAI,CAAC,SAAS,EAAE,CAAC;oBACf,OAAO,SAAS,CAAC;gBACnB,CAAC;gBACD,MAAM,KAAK,GAAG,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;gBACtC,OAAO,eAAe,CAAC,KAAK,CAAC,CAAC;YAChC,CAAC;YAAC,MAAM,CAAC;gBACP,sDAAsD;gBACtD,OAAO,SAAS,CAAC;YACnB,CAAC;QAAA,CACF;QAED,YAAY,CACV,QAAgB,EAChB,MAKE,EACF,OAAgB,EAChB,OAAgB,EACI;YACpB,IAAI,CAAC;gBACH,MAAM,OAAO,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAC;gBAC5C,IAAI,CAAC,OAAO,EAAE,YAAY,EAAE,CAAC;oBAC3B,OAAO,SAAS,CAAC;gBACnB,CAAC;gBAED,2CAA2C;gBAC3C,+DAA+D;gBAC/D,MAAM,eAAe,GAAG;oBACtB,OAAO,EAAE,MAAwC;oBACjD,OAAO;oBACP,OAAO;iBACR,CAAC;gBAEF,4DAA4D;gBAC5D,MAAM,SAAS,GAAG,OAAO,CAAC,YAAY,CACpC,eAAe,EACf,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,EACpC,KAAK,CACN,CAAC;gBACF,IAAI,CAAC,SAAS,EAAE,CAAC;oBACf,OAAO,SAAS,CAAC;gBACnB,CAAC;gBACD,MAAM,KAAK,GAAG,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;gBACtC,OAAO,eAAe,CAAC,KAAK,CAAC,CAAC;YAChC,CAAC;YAAC,MAAM,CAAC;gBACP,sDAAsD;gBACtD,OAAO,SAAS,CAAC;YACnB,CAAC;QAAA,CACF;KACF,CAAC;AAAA,CACH","sourcesContent":["/**\n * Tool HTML renderer for custom tools in HTML export.\n *\n * Renders custom tool calls and results to HTML by invoking their TUI renderers\n * and converting the ANSI output to HTML.\n */\n\nimport type { ImageContent, TextContent } from \"@mariozechner/clanker-ai\";\nimport type { Theme } from \"../../modes/interactive/theme/theme.js\";\nimport type { ToolDefinition } from \"../extensions/types.js\";\nimport { ansiLinesToHtml } from \"./ansi-to-html.js\";\n\nexport interface ToolHtmlRendererDeps {\n /** Function to look up tool definition by name */\n getToolDefinition: (name: string) => ToolDefinition | undefined;\n /** Theme for styling */\n theme: Theme;\n /** Terminal width for rendering (default: 100) */\n width?: number;\n}\n\nexport interface ToolHtmlRenderer {\n /** Render a tool call to HTML. Returns undefined if tool has no custom renderer. */\n renderCall(toolName: string, args: unknown): string | undefined;\n /** Render a tool result to HTML. Returns undefined if tool has no custom renderer. */\n renderResult(\n toolName: string,\n result: Array<{\n type: string;\n text?: string;\n data?: string;\n mimeType?: string;\n }>,\n details: unknown,\n isError: boolean,\n ): string | undefined;\n}\n\n/**\n * Create a tool HTML renderer.\n *\n * The renderer looks up tool definitions and invokes their renderCall/renderResult\n * methods, converting the resulting TUI Component output (ANSI) to HTML.\n */\nexport function createToolHtmlRenderer(\n deps: ToolHtmlRendererDeps,\n): ToolHtmlRenderer {\n const { getToolDefinition, theme, width = 100 } = deps;\n\n return {\n renderCall(toolName: string, args: unknown): string | undefined {\n try {\n const toolDef = getToolDefinition(toolName);\n if (!toolDef?.renderCall) {\n return undefined;\n }\n\n const component = toolDef.renderCall(args, theme);\n if (!component) {\n return undefined;\n }\n const lines = component.render(width);\n return ansiLinesToHtml(lines);\n } catch {\n // On error, return undefined to trigger JSON fallback\n return undefined;\n }\n },\n\n renderResult(\n toolName: string,\n result: Array<{\n type: string;\n text?: string;\n data?: string;\n mimeType?: string;\n }>,\n details: unknown,\n isError: boolean,\n ): string | undefined {\n try {\n const toolDef = getToolDefinition(toolName);\n if (!toolDef?.renderResult) {\n return undefined;\n }\n\n // Build AgentToolResult from content array\n // Cast content since session storage uses generic object types\n const agentToolResult = {\n content: result as (TextContent | ImageContent)[],\n details,\n isError,\n };\n\n // Always render expanded, client-side will apply truncation\n const component = toolDef.renderResult(\n agentToolResult,\n { expanded: true, isPartial: false },\n theme,\n );\n if (!component) {\n return undefined;\n }\n const lines = component.render(width);\n return ansiLinesToHtml(lines);\n } catch {\n // On error, return undefined to trigger JSON fallback\n return undefined;\n }\n },\n };\n}\n"]} \ No newline at end of file diff --git a/packages/coding-agent/companion-out/export-html/vendor/highlight.min.js b/packages/coding-agent/clanker-out/export-html/vendor/highlight.min.js similarity index 100% rename from packages/coding-agent/companion-out/export-html/vendor/highlight.min.js rename to packages/coding-agent/clanker-out/export-html/vendor/highlight.min.js diff --git a/packages/coding-agent/companion-out/export-html/vendor/marked.min.js b/packages/coding-agent/clanker-out/export-html/vendor/marked.min.js similarity index 100% rename from packages/coding-agent/companion-out/export-html/vendor/marked.min.js rename to packages/coding-agent/clanker-out/export-html/vendor/marked.min.js diff --git a/packages/coding-agent/companion-out/photon_rs_bg.wasm b/packages/coding-agent/clanker-out/photon_rs_bg.wasm similarity index 100% rename from packages/coding-agent/companion-out/photon_rs_bg.wasm rename to packages/coding-agent/clanker-out/photon_rs_bg.wasm diff --git a/packages/coding-agent/companion-out/theme/dark.json b/packages/coding-agent/clanker-out/theme/dark.json similarity index 100% rename from packages/coding-agent/companion-out/theme/dark.json rename to packages/coding-agent/clanker-out/theme/dark.json diff --git a/packages/coding-agent/companion-out/theme/light.json b/packages/coding-agent/clanker-out/theme/light.json similarity index 100% rename from packages/coding-agent/companion-out/theme/light.json rename to packages/coding-agent/clanker-out/theme/light.json diff --git a/packages/coding-agent/companion-out/theme/theme-schema.json b/packages/coding-agent/clanker-out/theme/theme-schema.json similarity index 100% rename from packages/coding-agent/companion-out/theme/theme-schema.json rename to packages/coding-agent/clanker-out/theme/theme-schema.json diff --git a/packages/coding-agent/companion-out/export-html/index.d.ts.map b/packages/coding-agent/companion-out/export-html/index.d.ts.map deleted file mode 100644 index a5ad1d6..0000000 --- a/packages/coding-agent/companion-out/export-html/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/export-html/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAUrE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,oFAAoF;IACpF,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;IAChE,sFAAsF;IACtF,YAAY,CACV,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,KAAK,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC,EACF,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,GACf,MAAM,GAAG,SAAS,CAAC;CACvB;AAQD,MAAM,WAAW,aAAa;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8CAA8C;IAC9C,YAAY,CAAC,EAAE,gBAAgB,CAAC;CACjC;AAwND;;;GAGG;AACH,wBAAsB,mBAAmB,CACvC,EAAE,EAAE,cAAc,EAClB,KAAK,CAAC,EAAE,UAAU,EAClB,OAAO,CAAC,EAAE,aAAa,GAAG,MAAM,GAC/B,OAAO,CAAC,MAAM,CAAC,CA+CjB;AAED;;;GAGG;AACH,wBAAsB,cAAc,CAClC,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,aAAa,GAAG,MAAM,GAC/B,OAAO,CAAC,MAAM,CAAC,CA4BjB","sourcesContent":["import type { AgentState } from \"@mariozechner/companion-agent-core\";\nimport { existsSync, readFileSync, writeFileSync } from \"fs\";\nimport { basename, join } from \"path\";\nimport { APP_NAME, getExportTemplateDir } from \"../../config.js\";\nimport {\n getResolvedThemeColors,\n getThemeExportColors,\n} from \"../../modes/interactive/theme/theme.js\";\nimport type { ToolInfo } from \"../extensions/types.js\";\nimport type { SessionEntry } from \"../session-manager.js\";\nimport { SessionManager } from \"../session-manager.js\";\n\n/**\n * Interface for rendering custom tools to HTML.\n * Used by agent-session to pre-render extension tool output.\n */\nexport interface ToolHtmlRenderer {\n /** Render a tool call to HTML. Returns undefined if tool has no custom renderer. */\n renderCall(toolName: string, args: unknown): string | undefined;\n /** Render a tool result to HTML. Returns undefined if tool has no custom renderer. */\n renderResult(\n toolName: string,\n result: Array<{\n type: string;\n text?: string;\n data?: string;\n mimeType?: string;\n }>,\n details: unknown,\n isError: boolean,\n ): string | undefined;\n}\n\n/** Pre-rendered HTML for a custom tool call and result */\ninterface RenderedToolHtml {\n callHtml?: string;\n resultHtml?: string;\n}\n\nexport interface ExportOptions {\n outputPath?: string;\n themeName?: string;\n /** Optional tool renderer for custom tools */\n toolRenderer?: ToolHtmlRenderer;\n}\n\n/** Parse a color string to RGB values. Supports hex (#RRGGBB) and rgb(r,g,b) formats. */\nfunction parseColor(\n color: string,\n): { r: number; g: number; b: number } | undefined {\n const hexMatch = color.match(\n /^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n );\n if (hexMatch) {\n return {\n r: Number.parseInt(hexMatch[1], 16),\n g: Number.parseInt(hexMatch[2], 16),\n b: Number.parseInt(hexMatch[3], 16),\n };\n }\n const rgbMatch = color.match(\n /^rgb\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*\\)$/,\n );\n if (rgbMatch) {\n return {\n r: Number.parseInt(rgbMatch[1], 10),\n g: Number.parseInt(rgbMatch[2], 10),\n b: Number.parseInt(rgbMatch[3], 10),\n };\n }\n return undefined;\n}\n\n/** Calculate relative luminance of a color (0-1, higher = lighter). */\nfunction getLuminance(r: number, g: number, b: number): number {\n const toLinear = (c: number) => {\n const s = c / 255;\n return s <= 0.03928 ? s / 12.92 : ((s + 0.055) / 1.055) ** 2.4;\n };\n return 0.2126 * toLinear(r) + 0.7152 * toLinear(g) + 0.0722 * toLinear(b);\n}\n\n/** Adjust color brightness. Factor > 1 lightens, < 1 darkens. */\nfunction adjustBrightness(color: string, factor: number): string {\n const parsed = parseColor(color);\n if (!parsed) return color;\n const adjust = (c: number) =>\n Math.min(255, Math.max(0, Math.round(c * factor)));\n return `rgb(${adjust(parsed.r)}, ${adjust(parsed.g)}, ${adjust(parsed.b)})`;\n}\n\n/** Derive export background colors from a base color (e.g., userMessageBg). */\nfunction deriveExportColors(baseColor: string): {\n pageBg: string;\n cardBg: string;\n infoBg: string;\n} {\n const parsed = parseColor(baseColor);\n if (!parsed) {\n return {\n pageBg: \"rgb(24, 24, 30)\",\n cardBg: \"rgb(30, 30, 36)\",\n infoBg: \"rgb(60, 55, 40)\",\n };\n }\n\n const luminance = getLuminance(parsed.r, parsed.g, parsed.b);\n const isLight = luminance > 0.5;\n\n if (isLight) {\n return {\n pageBg: adjustBrightness(baseColor, 0.96),\n cardBg: baseColor,\n infoBg: `rgb(${Math.min(255, parsed.r + 10)}, ${Math.min(255, parsed.g + 5)}, ${Math.max(0, parsed.b - 20)})`,\n };\n }\n return {\n pageBg: adjustBrightness(baseColor, 0.7),\n cardBg: adjustBrightness(baseColor, 0.85),\n infoBg: `rgb(${Math.min(255, parsed.r + 20)}, ${Math.min(255, parsed.g + 15)}, ${parsed.b})`,\n };\n}\n\n/**\n * Generate CSS custom property declarations from theme colors.\n */\nfunction generateThemeVars(themeName?: string): string {\n const colors = getResolvedThemeColors(themeName);\n const lines: string[] = [];\n for (const [key, value] of Object.entries(colors)) {\n lines.push(`--${key}: ${value};`);\n }\n\n // Use explicit theme export colors if available, otherwise derive from userMessageBg\n const themeExport = getThemeExportColors(themeName);\n const userMessageBg = colors.userMessageBg || \"#343541\";\n const derivedColors = deriveExportColors(userMessageBg);\n\n lines.push(`--exportPageBg: ${themeExport.pageBg ?? derivedColors.pageBg};`);\n lines.push(`--exportCardBg: ${themeExport.cardBg ?? derivedColors.cardBg};`);\n lines.push(`--exportInfoBg: ${themeExport.infoBg ?? derivedColors.infoBg};`);\n\n return lines.join(\"\\n \");\n}\n\ninterface SessionData {\n header: ReturnType;\n entries: ReturnType;\n leafId: string | null;\n systemPrompt?: string;\n tools?: ToolInfo[];\n /** Pre-rendered HTML for custom tool calls/results, keyed by tool call ID */\n renderedTools?: Record;\n}\n\n/**\n * Core HTML generation logic shared by both export functions.\n */\nfunction generateHtml(sessionData: SessionData, themeName?: string): string {\n const templateDir = getExportTemplateDir();\n const template = readFileSync(join(templateDir, \"template.html\"), \"utf-8\");\n const templateCss = readFileSync(join(templateDir, \"template.css\"), \"utf-8\");\n const templateJs = readFileSync(join(templateDir, \"template.js\"), \"utf-8\");\n const markedJs = readFileSync(\n join(templateDir, \"vendor\", \"marked.min.js\"),\n \"utf-8\",\n );\n const hljsJs = readFileSync(\n join(templateDir, \"vendor\", \"highlight.min.js\"),\n \"utf-8\",\n );\n\n const themeVars = generateThemeVars(themeName);\n const colors = getResolvedThemeColors(themeName);\n const exportColors = deriveExportColors(colors.userMessageBg || \"#343541\");\n const bodyBg = exportColors.pageBg;\n const containerBg = exportColors.cardBg;\n const infoBg = exportColors.infoBg;\n\n // Base64 encode session data to avoid escaping issues\n const sessionDataBase64 = Buffer.from(JSON.stringify(sessionData)).toString(\n \"base64\",\n );\n\n // Build the CSS with theme variables injected\n const css = templateCss\n .replace(\"{{THEME_VARS}}\", themeVars)\n .replace(\"{{BODY_BG}}\", bodyBg)\n .replace(\"{{CONTAINER_BG}}\", containerBg)\n .replace(\"{{INFO_BG}}\", infoBg);\n\n return template\n .replace(\"{{CSS}}\", css)\n .replace(\"{{JS}}\", templateJs)\n .replace(\"{{SESSION_DATA}}\", sessionDataBase64)\n .replace(\"{{MARKED_JS}}\", markedJs)\n .replace(\"{{HIGHLIGHT_JS}}\", hljsJs);\n}\n\n/** Built-in tool names that have custom rendering in template.js */\nconst BUILTIN_TOOLS = new Set([\n \"bash\",\n \"read\",\n \"write\",\n \"edit\",\n \"ls\",\n \"find\",\n \"grep\",\n]);\n\n/**\n * Pre-render custom tools to HTML using their TUI renderers.\n */\nfunction preRenderCustomTools(\n entries: SessionEntry[],\n toolRenderer: ToolHtmlRenderer,\n): Record {\n const renderedTools: Record = {};\n\n for (const entry of entries) {\n if (entry.type !== \"message\") continue;\n const msg = entry.message;\n\n // Find tool calls in assistant messages\n if (msg.role === \"assistant\" && Array.isArray(msg.content)) {\n for (const block of msg.content) {\n if (block.type === \"toolCall\" && !BUILTIN_TOOLS.has(block.name)) {\n const callHtml = toolRenderer.renderCall(block.name, block.arguments);\n if (callHtml) {\n renderedTools[block.id] = { callHtml };\n }\n }\n }\n }\n\n // Find tool results\n if (msg.role === \"toolResult\" && msg.toolCallId) {\n const toolName = msg.toolName || \"\";\n // Only render if we have a pre-rendered call OR it's not a built-in tool\n const existing = renderedTools[msg.toolCallId];\n if (existing || !BUILTIN_TOOLS.has(toolName)) {\n const resultHtml = toolRenderer.renderResult(\n toolName,\n msg.content,\n msg.details,\n msg.isError || false,\n );\n if (resultHtml) {\n renderedTools[msg.toolCallId] = {\n ...existing,\n resultHtml,\n };\n }\n }\n }\n }\n\n return renderedTools;\n}\n\n/**\n * Export session to HTML using SessionManager and AgentState.\n * Used by TUI's /export command.\n */\nexport async function exportSessionToHtml(\n sm: SessionManager,\n state?: AgentState,\n options?: ExportOptions | string,\n): Promise {\n const opts: ExportOptions =\n typeof options === \"string\" ? { outputPath: options } : options || {};\n\n const sessionFile = sm.getSessionFile();\n if (!sessionFile) {\n throw new Error(\"Cannot export in-memory session to HTML\");\n }\n if (!existsSync(sessionFile)) {\n throw new Error(\"Nothing to export yet - start a conversation first\");\n }\n\n const entries = sm.getEntries();\n\n // Pre-render custom tools if a tool renderer is provided\n let renderedTools: Record | undefined;\n if (opts.toolRenderer) {\n renderedTools = preRenderCustomTools(entries, opts.toolRenderer);\n // Only include if we actually rendered something\n if (Object.keys(renderedTools).length === 0) {\n renderedTools = undefined;\n }\n }\n\n const sessionData: SessionData = {\n header: sm.getHeader(),\n entries,\n leafId: sm.getLeafId(),\n systemPrompt: state?.systemPrompt,\n tools: state?.tools?.map((t) => ({\n name: t.name,\n description: t.description,\n parameters: t.parameters,\n })),\n renderedTools,\n };\n\n const html = generateHtml(sessionData, opts.themeName);\n\n let outputPath = opts.outputPath;\n if (!outputPath) {\n const sessionBasename = basename(sessionFile, \".jsonl\");\n outputPath = `${APP_NAME}-session-${sessionBasename}.html`;\n }\n\n writeFileSync(outputPath, html, \"utf8\");\n return outputPath;\n}\n\n/**\n * Export session file to HTML (standalone, without AgentState).\n * Used by CLI for exporting arbitrary session files.\n */\nexport async function exportFromFile(\n inputPath: string,\n options?: ExportOptions | string,\n): Promise {\n const opts: ExportOptions =\n typeof options === \"string\" ? { outputPath: options } : options || {};\n\n if (!existsSync(inputPath)) {\n throw new Error(`File not found: ${inputPath}`);\n }\n\n const sm = SessionManager.open(inputPath);\n\n const sessionData: SessionData = {\n header: sm.getHeader(),\n entries: sm.getEntries(),\n leafId: sm.getLeafId(),\n systemPrompt: undefined,\n tools: undefined,\n };\n\n const html = generateHtml(sessionData, opts.themeName);\n\n let outputPath = opts.outputPath;\n if (!outputPath) {\n const inputBasename = basename(inputPath, \".jsonl\");\n outputPath = `${APP_NAME}-session-${inputBasename}.html`;\n }\n\n writeFileSync(outputPath, html, \"utf8\");\n return outputPath;\n}\n"]} \ No newline at end of file diff --git a/packages/coding-agent/companion-out/export-html/index.js.map b/packages/coding-agent/companion-out/export-html/index.js.map deleted file mode 100644 index 8ea7da3..0000000 --- a/packages/coding-agent/companion-out/export-html/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/export-html/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EACL,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,wCAAwC,CAAC;AAGhD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAoCvD,yFAAyF;AACzF,SAAS,UAAU,CACjB,KAAa,EACoC;IACjD,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,CAC1B,qDAAqD,CACtD,CAAC;IACF,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO;YACL,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;YACnC,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;YACnC,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;SACpC,CAAC;IACJ,CAAC;IACD,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,CAC1B,iDAAiD,CAClD,CAAC;IACF,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO;YACL,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;YACnC,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;YACnC,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;SACpC,CAAC;IACJ,CAAC;IACD,OAAO,SAAS,CAAC;AAAA,CAClB;AAED,uEAAuE;AACvE,SAAS,YAAY,CAAC,CAAS,EAAE,CAAS,EAAE,CAAS,EAAU;IAC7D,MAAM,QAAQ,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC;QAC9B,MAAM,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;QAClB,OAAO,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,KAAK,CAAC,IAAI,GAAG,CAAC;IAAA,CAChE,CAAC;IACF,OAAO,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;AAAA,CAC3E;AAED,iEAAiE;AACjE,SAAS,gBAAgB,CAAC,KAAa,EAAE,MAAc,EAAU;IAC/D,MAAM,MAAM,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;IACjC,IAAI,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IAC1B,MAAM,MAAM,GAAG,CAAC,CAAS,EAAE,EAAE,CAC3B,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IACrD,OAAO,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC;AAAA,CAC7E;AAED,+EAA+E;AAC/E,SAAS,kBAAkB,CAAC,SAAiB,EAI3C;IACA,MAAM,MAAM,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC;IACrC,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO;YACL,MAAM,EAAE,iBAAiB;YACzB,MAAM,EAAE,iBAAiB;YACzB,MAAM,EAAE,iBAAiB;SAC1B,CAAC;IACJ,CAAC;IAED,MAAM,SAAS,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IAC7D,MAAM,OAAO,GAAG,SAAS,GAAG,GAAG,CAAC;IAEhC,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO;YACL,MAAM,EAAE,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAAC;YACzC,MAAM,EAAE,SAAS;YACjB,MAAM,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG;SAC9G,CAAC;IACJ,CAAC;IACD,OAAO;QACL,MAAM,EAAE,gBAAgB,CAAC,SAAS,EAAE,GAAG,CAAC;QACxC,MAAM,EAAE,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAAC;QACzC,MAAM,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,MAAM,CAAC,CAAC,GAAG;KAC7F,CAAC;AAAA,CACH;AAED;;GAEG;AACH,SAAS,iBAAiB,CAAC,SAAkB,EAAU;IACrD,MAAM,MAAM,GAAG,sBAAsB,CAAC,SAAS,CAAC,CAAC;IACjD,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAClD,KAAK,CAAC,IAAI,CAAC,KAAK,GAAG,KAAK,KAAK,GAAG,CAAC,CAAC;IACpC,CAAC;IAED,qFAAqF;IACrF,MAAM,WAAW,GAAG,oBAAoB,CAAC,SAAS,CAAC,CAAC;IACpD,MAAM,aAAa,GAAG,MAAM,CAAC,aAAa,IAAI,SAAS,CAAC;IACxD,MAAM,aAAa,GAAG,kBAAkB,CAAC,aAAa,CAAC,CAAC;IAExD,KAAK,CAAC,IAAI,CAAC,mBAAmB,WAAW,CAAC,MAAM,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC;IAC7E,KAAK,CAAC,IAAI,CAAC,mBAAmB,WAAW,CAAC,MAAM,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC;IAC7E,KAAK,CAAC,IAAI,CAAC,mBAAmB,WAAW,CAAC,MAAM,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC;IAE7E,OAAO,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AAAA,CAC/B;AAYD;;GAEG;AACH,SAAS,YAAY,CAAC,WAAwB,EAAE,SAAkB,EAAU;IAC1E,MAAM,WAAW,GAAG,oBAAoB,EAAE,CAAC;IAC3C,MAAM,QAAQ,GAAG,YAAY,CAAC,IAAI,CAAC,WAAW,EAAE,eAAe,CAAC,EAAE,OAAO,CAAC,CAAC;IAC3E,MAAM,WAAW,GAAG,YAAY,CAAC,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC,EAAE,OAAO,CAAC,CAAC;IAC7E,MAAM,UAAU,GAAG,YAAY,CAAC,IAAI,CAAC,WAAW,EAAE,aAAa,CAAC,EAAE,OAAO,CAAC,CAAC;IAC3E,MAAM,QAAQ,GAAG,YAAY,CAC3B,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE,eAAe,CAAC,EAC5C,OAAO,CACR,CAAC;IACF,MAAM,MAAM,GAAG,YAAY,CACzB,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE,kBAAkB,CAAC,EAC/C,OAAO,CACR,CAAC;IAEF,MAAM,SAAS,GAAG,iBAAiB,CAAC,SAAS,CAAC,CAAC;IAC/C,MAAM,MAAM,GAAG,sBAAsB,CAAC,SAAS,CAAC,CAAC;IACjD,MAAM,YAAY,GAAG,kBAAkB,CAAC,MAAM,CAAC,aAAa,IAAI,SAAS,CAAC,CAAC;IAC3E,MAAM,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC;IACnC,MAAM,WAAW,GAAG,YAAY,CAAC,MAAM,CAAC;IACxC,MAAM,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC;IAEnC,sDAAsD;IACtD,MAAM,iBAAiB,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,CACzE,QAAQ,CACT,CAAC;IAEF,8CAA8C;IAC9C,MAAM,GAAG,GAAG,WAAW;SACpB,OAAO,CAAC,gBAAgB,EAAE,SAAS,CAAC;SACpC,OAAO,CAAC,aAAa,EAAE,MAAM,CAAC;SAC9B,OAAO,CAAC,kBAAkB,EAAE,WAAW,CAAC;SACxC,OAAO,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;IAElC,OAAO,QAAQ;SACZ,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC;SACvB,OAAO,CAAC,QAAQ,EAAE,UAAU,CAAC;SAC7B,OAAO,CAAC,kBAAkB,EAAE,iBAAiB,CAAC;SAC9C,OAAO,CAAC,eAAe,EAAE,QAAQ,CAAC;SAClC,OAAO,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC;AAAA,CACxC;AAED,oEAAoE;AACpE,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC;IAC5B,MAAM;IACN,MAAM;IACN,OAAO;IACP,MAAM;IACN,IAAI;IACJ,MAAM;IACN,MAAM;CACP,CAAC,CAAC;AAEH;;GAEG;AACH,SAAS,oBAAoB,CAC3B,OAAuB,EACvB,YAA8B,EACI;IAClC,MAAM,aAAa,GAAqC,EAAE,CAAC;IAE3D,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;QAC5B,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS;YAAE,SAAS;QACvC,MAAM,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC;QAE1B,wCAAwC;QACxC,IAAI,GAAG,CAAC,IAAI,KAAK,WAAW,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;YAC3D,KAAK,MAAM,KAAK,IAAI,GAAG,CAAC,OAAO,EAAE,CAAC;gBAChC,IAAI,KAAK,CAAC,IAAI,KAAK,UAAU,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;oBAChE,MAAM,QAAQ,GAAG,YAAY,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;oBACtE,IAAI,QAAQ,EAAE,CAAC;wBACb,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,QAAQ,EAAE,CAAC;oBACzC,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;QAED,oBAAoB;QACpB,IAAI,GAAG,CAAC,IAAI,KAAK,YAAY,IAAI,GAAG,CAAC,UAAU,EAAE,CAAC;YAChD,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,IAAI,EAAE,CAAC;YACpC,yEAAyE;YACzE,MAAM,QAAQ,GAAG,aAAa,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;YAC/C,IAAI,QAAQ,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;gBAC7C,MAAM,UAAU,GAAG,YAAY,CAAC,YAAY,CAC1C,QAAQ,EACR,GAAG,CAAC,OAAO,EACX,GAAG,CAAC,OAAO,EACX,GAAG,CAAC,OAAO,IAAI,KAAK,CACrB,CAAC;gBACF,IAAI,UAAU,EAAE,CAAC;oBACf,aAAa,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG;wBAC9B,GAAG,QAAQ;wBACX,UAAU;qBACX,CAAC;gBACJ,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,aAAa,CAAC;AAAA,CACtB;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,EAAkB,EAClB,KAAkB,EAClB,OAAgC,EACf;IACjB,MAAM,IAAI,GACR,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,OAAO,IAAI,EAAE,CAAC;IAExE,MAAM,WAAW,GAAG,EAAE,CAAC,cAAc,EAAE,CAAC;IACxC,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;IAC7D,CAAC;IACD,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;QAC7B,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;IACxE,CAAC;IAED,MAAM,OAAO,GAAG,EAAE,CAAC,UAAU,EAAE,CAAC;IAEhC,yDAAyD;IACzD,IAAI,aAA2D,CAAC;IAChE,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;QACtB,aAAa,GAAG,oBAAoB,CAAC,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QACjE,iDAAiD;QACjD,IAAI,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC5C,aAAa,GAAG,SAAS,CAAC;QAC5B,CAAC;IACH,CAAC;IAED,MAAM,WAAW,GAAgB;QAC/B,MAAM,EAAE,EAAE,CAAC,SAAS,EAAE;QACtB,OAAO;QACP,MAAM,EAAE,EAAE,CAAC,SAAS,EAAE;QACtB,YAAY,EAAE,KAAK,EAAE,YAAY;QACjC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YAC/B,IAAI,EAAE,CAAC,CAAC,IAAI;YACZ,WAAW,EAAE,CAAC,CAAC,WAAW;YAC1B,UAAU,EAAE,CAAC,CAAC,UAAU;SACzB,CAAC,CAAC;QACH,aAAa;KACd,CAAC;IAEF,MAAM,IAAI,GAAG,YAAY,CAAC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;IAEvD,IAAI,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;IACjC,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,MAAM,eAAe,GAAG,QAAQ,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;QACxD,UAAU,GAAG,GAAG,QAAQ,YAAY,eAAe,OAAO,CAAC;IAC7D,CAAC;IAED,aAAa,CAAC,UAAU,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IACxC,OAAO,UAAU,CAAC;AAAA,CACnB;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,SAAiB,EACjB,OAAgC,EACf;IACjB,MAAM,IAAI,GACR,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,OAAO,IAAI,EAAE,CAAC;IAExE,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CAAC,mBAAmB,SAAS,EAAE,CAAC,CAAC;IAClD,CAAC;IAED,MAAM,EAAE,GAAG,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAE1C,MAAM,WAAW,GAAgB;QAC/B,MAAM,EAAE,EAAE,CAAC,SAAS,EAAE;QACtB,OAAO,EAAE,EAAE,CAAC,UAAU,EAAE;QACxB,MAAM,EAAE,EAAE,CAAC,SAAS,EAAE;QACtB,YAAY,EAAE,SAAS;QACvB,KAAK,EAAE,SAAS;KACjB,CAAC;IAEF,MAAM,IAAI,GAAG,YAAY,CAAC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;IAEvD,IAAI,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;IACjC,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,MAAM,aAAa,GAAG,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QACpD,UAAU,GAAG,GAAG,QAAQ,YAAY,aAAa,OAAO,CAAC;IAC3D,CAAC;IAED,aAAa,CAAC,UAAU,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IACxC,OAAO,UAAU,CAAC;AAAA,CACnB","sourcesContent":["import type { AgentState } from \"@mariozechner/companion-agent-core\";\nimport { existsSync, readFileSync, writeFileSync } from \"fs\";\nimport { basename, join } from \"path\";\nimport { APP_NAME, getExportTemplateDir } from \"../../config.js\";\nimport {\n getResolvedThemeColors,\n getThemeExportColors,\n} from \"../../modes/interactive/theme/theme.js\";\nimport type { ToolInfo } from \"../extensions/types.js\";\nimport type { SessionEntry } from \"../session-manager.js\";\nimport { SessionManager } from \"../session-manager.js\";\n\n/**\n * Interface for rendering custom tools to HTML.\n * Used by agent-session to pre-render extension tool output.\n */\nexport interface ToolHtmlRenderer {\n /** Render a tool call to HTML. Returns undefined if tool has no custom renderer. */\n renderCall(toolName: string, args: unknown): string | undefined;\n /** Render a tool result to HTML. Returns undefined if tool has no custom renderer. */\n renderResult(\n toolName: string,\n result: Array<{\n type: string;\n text?: string;\n data?: string;\n mimeType?: string;\n }>,\n details: unknown,\n isError: boolean,\n ): string | undefined;\n}\n\n/** Pre-rendered HTML for a custom tool call and result */\ninterface RenderedToolHtml {\n callHtml?: string;\n resultHtml?: string;\n}\n\nexport interface ExportOptions {\n outputPath?: string;\n themeName?: string;\n /** Optional tool renderer for custom tools */\n toolRenderer?: ToolHtmlRenderer;\n}\n\n/** Parse a color string to RGB values. Supports hex (#RRGGBB) and rgb(r,g,b) formats. */\nfunction parseColor(\n color: string,\n): { r: number; g: number; b: number } | undefined {\n const hexMatch = color.match(\n /^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n );\n if (hexMatch) {\n return {\n r: Number.parseInt(hexMatch[1], 16),\n g: Number.parseInt(hexMatch[2], 16),\n b: Number.parseInt(hexMatch[3], 16),\n };\n }\n const rgbMatch = color.match(\n /^rgb\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*\\)$/,\n );\n if (rgbMatch) {\n return {\n r: Number.parseInt(rgbMatch[1], 10),\n g: Number.parseInt(rgbMatch[2], 10),\n b: Number.parseInt(rgbMatch[3], 10),\n };\n }\n return undefined;\n}\n\n/** Calculate relative luminance of a color (0-1, higher = lighter). */\nfunction getLuminance(r: number, g: number, b: number): number {\n const toLinear = (c: number) => {\n const s = c / 255;\n return s <= 0.03928 ? s / 12.92 : ((s + 0.055) / 1.055) ** 2.4;\n };\n return 0.2126 * toLinear(r) + 0.7152 * toLinear(g) + 0.0722 * toLinear(b);\n}\n\n/** Adjust color brightness. Factor > 1 lightens, < 1 darkens. */\nfunction adjustBrightness(color: string, factor: number): string {\n const parsed = parseColor(color);\n if (!parsed) return color;\n const adjust = (c: number) =>\n Math.min(255, Math.max(0, Math.round(c * factor)));\n return `rgb(${adjust(parsed.r)}, ${adjust(parsed.g)}, ${adjust(parsed.b)})`;\n}\n\n/** Derive export background colors from a base color (e.g., userMessageBg). */\nfunction deriveExportColors(baseColor: string): {\n pageBg: string;\n cardBg: string;\n infoBg: string;\n} {\n const parsed = parseColor(baseColor);\n if (!parsed) {\n return {\n pageBg: \"rgb(24, 24, 30)\",\n cardBg: \"rgb(30, 30, 36)\",\n infoBg: \"rgb(60, 55, 40)\",\n };\n }\n\n const luminance = getLuminance(parsed.r, parsed.g, parsed.b);\n const isLight = luminance > 0.5;\n\n if (isLight) {\n return {\n pageBg: adjustBrightness(baseColor, 0.96),\n cardBg: baseColor,\n infoBg: `rgb(${Math.min(255, parsed.r + 10)}, ${Math.min(255, parsed.g + 5)}, ${Math.max(0, parsed.b - 20)})`,\n };\n }\n return {\n pageBg: adjustBrightness(baseColor, 0.7),\n cardBg: adjustBrightness(baseColor, 0.85),\n infoBg: `rgb(${Math.min(255, parsed.r + 20)}, ${Math.min(255, parsed.g + 15)}, ${parsed.b})`,\n };\n}\n\n/**\n * Generate CSS custom property declarations from theme colors.\n */\nfunction generateThemeVars(themeName?: string): string {\n const colors = getResolvedThemeColors(themeName);\n const lines: string[] = [];\n for (const [key, value] of Object.entries(colors)) {\n lines.push(`--${key}: ${value};`);\n }\n\n // Use explicit theme export colors if available, otherwise derive from userMessageBg\n const themeExport = getThemeExportColors(themeName);\n const userMessageBg = colors.userMessageBg || \"#343541\";\n const derivedColors = deriveExportColors(userMessageBg);\n\n lines.push(`--exportPageBg: ${themeExport.pageBg ?? derivedColors.pageBg};`);\n lines.push(`--exportCardBg: ${themeExport.cardBg ?? derivedColors.cardBg};`);\n lines.push(`--exportInfoBg: ${themeExport.infoBg ?? derivedColors.infoBg};`);\n\n return lines.join(\"\\n \");\n}\n\ninterface SessionData {\n header: ReturnType;\n entries: ReturnType;\n leafId: string | null;\n systemPrompt?: string;\n tools?: ToolInfo[];\n /** Pre-rendered HTML for custom tool calls/results, keyed by tool call ID */\n renderedTools?: Record;\n}\n\n/**\n * Core HTML generation logic shared by both export functions.\n */\nfunction generateHtml(sessionData: SessionData, themeName?: string): string {\n const templateDir = getExportTemplateDir();\n const template = readFileSync(join(templateDir, \"template.html\"), \"utf-8\");\n const templateCss = readFileSync(join(templateDir, \"template.css\"), \"utf-8\");\n const templateJs = readFileSync(join(templateDir, \"template.js\"), \"utf-8\");\n const markedJs = readFileSync(\n join(templateDir, \"vendor\", \"marked.min.js\"),\n \"utf-8\",\n );\n const hljsJs = readFileSync(\n join(templateDir, \"vendor\", \"highlight.min.js\"),\n \"utf-8\",\n );\n\n const themeVars = generateThemeVars(themeName);\n const colors = getResolvedThemeColors(themeName);\n const exportColors = deriveExportColors(colors.userMessageBg || \"#343541\");\n const bodyBg = exportColors.pageBg;\n const containerBg = exportColors.cardBg;\n const infoBg = exportColors.infoBg;\n\n // Base64 encode session data to avoid escaping issues\n const sessionDataBase64 = Buffer.from(JSON.stringify(sessionData)).toString(\n \"base64\",\n );\n\n // Build the CSS with theme variables injected\n const css = templateCss\n .replace(\"{{THEME_VARS}}\", themeVars)\n .replace(\"{{BODY_BG}}\", bodyBg)\n .replace(\"{{CONTAINER_BG}}\", containerBg)\n .replace(\"{{INFO_BG}}\", infoBg);\n\n return template\n .replace(\"{{CSS}}\", css)\n .replace(\"{{JS}}\", templateJs)\n .replace(\"{{SESSION_DATA}}\", sessionDataBase64)\n .replace(\"{{MARKED_JS}}\", markedJs)\n .replace(\"{{HIGHLIGHT_JS}}\", hljsJs);\n}\n\n/** Built-in tool names that have custom rendering in template.js */\nconst BUILTIN_TOOLS = new Set([\n \"bash\",\n \"read\",\n \"write\",\n \"edit\",\n \"ls\",\n \"find\",\n \"grep\",\n]);\n\n/**\n * Pre-render custom tools to HTML using their TUI renderers.\n */\nfunction preRenderCustomTools(\n entries: SessionEntry[],\n toolRenderer: ToolHtmlRenderer,\n): Record {\n const renderedTools: Record = {};\n\n for (const entry of entries) {\n if (entry.type !== \"message\") continue;\n const msg = entry.message;\n\n // Find tool calls in assistant messages\n if (msg.role === \"assistant\" && Array.isArray(msg.content)) {\n for (const block of msg.content) {\n if (block.type === \"toolCall\" && !BUILTIN_TOOLS.has(block.name)) {\n const callHtml = toolRenderer.renderCall(block.name, block.arguments);\n if (callHtml) {\n renderedTools[block.id] = { callHtml };\n }\n }\n }\n }\n\n // Find tool results\n if (msg.role === \"toolResult\" && msg.toolCallId) {\n const toolName = msg.toolName || \"\";\n // Only render if we have a pre-rendered call OR it's not a built-in tool\n const existing = renderedTools[msg.toolCallId];\n if (existing || !BUILTIN_TOOLS.has(toolName)) {\n const resultHtml = toolRenderer.renderResult(\n toolName,\n msg.content,\n msg.details,\n msg.isError || false,\n );\n if (resultHtml) {\n renderedTools[msg.toolCallId] = {\n ...existing,\n resultHtml,\n };\n }\n }\n }\n }\n\n return renderedTools;\n}\n\n/**\n * Export session to HTML using SessionManager and AgentState.\n * Used by TUI's /export command.\n */\nexport async function exportSessionToHtml(\n sm: SessionManager,\n state?: AgentState,\n options?: ExportOptions | string,\n): Promise {\n const opts: ExportOptions =\n typeof options === \"string\" ? { outputPath: options } : options || {};\n\n const sessionFile = sm.getSessionFile();\n if (!sessionFile) {\n throw new Error(\"Cannot export in-memory session to HTML\");\n }\n if (!existsSync(sessionFile)) {\n throw new Error(\"Nothing to export yet - start a conversation first\");\n }\n\n const entries = sm.getEntries();\n\n // Pre-render custom tools if a tool renderer is provided\n let renderedTools: Record | undefined;\n if (opts.toolRenderer) {\n renderedTools = preRenderCustomTools(entries, opts.toolRenderer);\n // Only include if we actually rendered something\n if (Object.keys(renderedTools).length === 0) {\n renderedTools = undefined;\n }\n }\n\n const sessionData: SessionData = {\n header: sm.getHeader(),\n entries,\n leafId: sm.getLeafId(),\n systemPrompt: state?.systemPrompt,\n tools: state?.tools?.map((t) => ({\n name: t.name,\n description: t.description,\n parameters: t.parameters,\n })),\n renderedTools,\n };\n\n const html = generateHtml(sessionData, opts.themeName);\n\n let outputPath = opts.outputPath;\n if (!outputPath) {\n const sessionBasename = basename(sessionFile, \".jsonl\");\n outputPath = `${APP_NAME}-session-${sessionBasename}.html`;\n }\n\n writeFileSync(outputPath, html, \"utf8\");\n return outputPath;\n}\n\n/**\n * Export session file to HTML (standalone, without AgentState).\n * Used by CLI for exporting arbitrary session files.\n */\nexport async function exportFromFile(\n inputPath: string,\n options?: ExportOptions | string,\n): Promise {\n const opts: ExportOptions =\n typeof options === \"string\" ? { outputPath: options } : options || {};\n\n if (!existsSync(inputPath)) {\n throw new Error(`File not found: ${inputPath}`);\n }\n\n const sm = SessionManager.open(inputPath);\n\n const sessionData: SessionData = {\n header: sm.getHeader(),\n entries: sm.getEntries(),\n leafId: sm.getLeafId(),\n systemPrompt: undefined,\n tools: undefined,\n };\n\n const html = generateHtml(sessionData, opts.themeName);\n\n let outputPath = opts.outputPath;\n if (!outputPath) {\n const inputBasename = basename(inputPath, \".jsonl\");\n outputPath = `${APP_NAME}-session-${inputBasename}.html`;\n }\n\n writeFileSync(outputPath, html, \"utf8\");\n return outputPath;\n}\n"]} \ No newline at end of file diff --git a/packages/coding-agent/companion-out/export-html/tool-renderer.d.ts.map b/packages/coding-agent/companion-out/export-html/tool-renderer.d.ts.map deleted file mode 100644 index c293525..0000000 --- a/packages/coding-agent/companion-out/export-html/tool-renderer.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tool-renderer.d.ts","sourceRoot":"","sources":["../../../src/core/export-html/tool-renderer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wCAAwC,CAAC;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAG7D,MAAM,WAAW,oBAAoB;IACnC,kDAAkD;IAClD,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,cAAc,GAAG,SAAS,CAAC;IAChE,wBAAwB;IACxB,KAAK,EAAE,KAAK,CAAC;IACb,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,gBAAgB;IAC/B,oFAAoF;IACpF,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;IAChE,sFAAsF;IACtF,YAAY,CACV,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,KAAK,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC,EACF,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,GACf,MAAM,GAAG,SAAS,CAAC;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,oBAAoB,GACzB,gBAAgB,CAiElB","sourcesContent":["/**\n * Tool HTML renderer for custom tools in HTML export.\n *\n * Renders custom tool calls and results to HTML by invoking their TUI renderers\n * and converting the ANSI output to HTML.\n */\n\nimport type { ImageContent, TextContent } from \"@mariozechner/companion-ai\";\nimport type { Theme } from \"../../modes/interactive/theme/theme.js\";\nimport type { ToolDefinition } from \"../extensions/types.js\";\nimport { ansiLinesToHtml } from \"./ansi-to-html.js\";\n\nexport interface ToolHtmlRendererDeps {\n /** Function to look up tool definition by name */\n getToolDefinition: (name: string) => ToolDefinition | undefined;\n /** Theme for styling */\n theme: Theme;\n /** Terminal width for rendering (default: 100) */\n width?: number;\n}\n\nexport interface ToolHtmlRenderer {\n /** Render a tool call to HTML. Returns undefined if tool has no custom renderer. */\n renderCall(toolName: string, args: unknown): string | undefined;\n /** Render a tool result to HTML. Returns undefined if tool has no custom renderer. */\n renderResult(\n toolName: string,\n result: Array<{\n type: string;\n text?: string;\n data?: string;\n mimeType?: string;\n }>,\n details: unknown,\n isError: boolean,\n ): string | undefined;\n}\n\n/**\n * Create a tool HTML renderer.\n *\n * The renderer looks up tool definitions and invokes their renderCall/renderResult\n * methods, converting the resulting TUI Component output (ANSI) to HTML.\n */\nexport function createToolHtmlRenderer(\n deps: ToolHtmlRendererDeps,\n): ToolHtmlRenderer {\n const { getToolDefinition, theme, width = 100 } = deps;\n\n return {\n renderCall(toolName: string, args: unknown): string | undefined {\n try {\n const toolDef = getToolDefinition(toolName);\n if (!toolDef?.renderCall) {\n return undefined;\n }\n\n const component = toolDef.renderCall(args, theme);\n if (!component) {\n return undefined;\n }\n const lines = component.render(width);\n return ansiLinesToHtml(lines);\n } catch {\n // On error, return undefined to trigger JSON fallback\n return undefined;\n }\n },\n\n renderResult(\n toolName: string,\n result: Array<{\n type: string;\n text?: string;\n data?: string;\n mimeType?: string;\n }>,\n details: unknown,\n isError: boolean,\n ): string | undefined {\n try {\n const toolDef = getToolDefinition(toolName);\n if (!toolDef?.renderResult) {\n return undefined;\n }\n\n // Build AgentToolResult from content array\n // Cast content since session storage uses generic object types\n const agentToolResult = {\n content: result as (TextContent | ImageContent)[],\n details,\n isError,\n };\n\n // Always render expanded, client-side will apply truncation\n const component = toolDef.renderResult(\n agentToolResult,\n { expanded: true, isPartial: false },\n theme,\n );\n if (!component) {\n return undefined;\n }\n const lines = component.render(width);\n return ansiLinesToHtml(lines);\n } catch {\n // On error, return undefined to trigger JSON fallback\n return undefined;\n }\n },\n };\n}\n"]} \ No newline at end of file diff --git a/packages/coding-agent/companion-out/export-html/tool-renderer.js.map b/packages/coding-agent/companion-out/export-html/tool-renderer.js.map deleted file mode 100644 index f935011..0000000 --- a/packages/coding-agent/companion-out/export-html/tool-renderer.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tool-renderer.js","sourceRoot":"","sources":["../../../src/core/export-html/tool-renderer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AA4BpD;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB,CACpC,IAA0B,EACR;IAClB,MAAM,EAAE,iBAAiB,EAAE,KAAK,EAAE,KAAK,GAAG,GAAG,EAAE,GAAG,IAAI,CAAC;IAEvD,OAAO;QACL,UAAU,CAAC,QAAgB,EAAE,IAAa,EAAsB;YAC9D,IAAI,CAAC;gBACH,MAAM,OAAO,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAC;gBAC5C,IAAI,CAAC,OAAO,EAAE,UAAU,EAAE,CAAC;oBACzB,OAAO,SAAS,CAAC;gBACnB,CAAC;gBAED,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;gBAClD,IAAI,CAAC,SAAS,EAAE,CAAC;oBACf,OAAO,SAAS,CAAC;gBACnB,CAAC;gBACD,MAAM,KAAK,GAAG,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;gBACtC,OAAO,eAAe,CAAC,KAAK,CAAC,CAAC;YAChC,CAAC;YAAC,MAAM,CAAC;gBACP,sDAAsD;gBACtD,OAAO,SAAS,CAAC;YACnB,CAAC;QAAA,CACF;QAED,YAAY,CACV,QAAgB,EAChB,MAKE,EACF,OAAgB,EAChB,OAAgB,EACI;YACpB,IAAI,CAAC;gBACH,MAAM,OAAO,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAC;gBAC5C,IAAI,CAAC,OAAO,EAAE,YAAY,EAAE,CAAC;oBAC3B,OAAO,SAAS,CAAC;gBACnB,CAAC;gBAED,2CAA2C;gBAC3C,+DAA+D;gBAC/D,MAAM,eAAe,GAAG;oBACtB,OAAO,EAAE,MAAwC;oBACjD,OAAO;oBACP,OAAO;iBACR,CAAC;gBAEF,4DAA4D;gBAC5D,MAAM,SAAS,GAAG,OAAO,CAAC,YAAY,CACpC,eAAe,EACf,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,EACpC,KAAK,CACN,CAAC;gBACF,IAAI,CAAC,SAAS,EAAE,CAAC;oBACf,OAAO,SAAS,CAAC;gBACnB,CAAC;gBACD,MAAM,KAAK,GAAG,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;gBACtC,OAAO,eAAe,CAAC,KAAK,CAAC,CAAC;YAChC,CAAC;YAAC,MAAM,CAAC;gBACP,sDAAsD;gBACtD,OAAO,SAAS,CAAC;YACnB,CAAC;QAAA,CACF;KACF,CAAC;AAAA,CACH","sourcesContent":["/**\n * Tool HTML renderer for custom tools in HTML export.\n *\n * Renders custom tool calls and results to HTML by invoking their TUI renderers\n * and converting the ANSI output to HTML.\n */\n\nimport type { ImageContent, TextContent } from \"@mariozechner/companion-ai\";\nimport type { Theme } from \"../../modes/interactive/theme/theme.js\";\nimport type { ToolDefinition } from \"../extensions/types.js\";\nimport { ansiLinesToHtml } from \"./ansi-to-html.js\";\n\nexport interface ToolHtmlRendererDeps {\n /** Function to look up tool definition by name */\n getToolDefinition: (name: string) => ToolDefinition | undefined;\n /** Theme for styling */\n theme: Theme;\n /** Terminal width for rendering (default: 100) */\n width?: number;\n}\n\nexport interface ToolHtmlRenderer {\n /** Render a tool call to HTML. Returns undefined if tool has no custom renderer. */\n renderCall(toolName: string, args: unknown): string | undefined;\n /** Render a tool result to HTML. Returns undefined if tool has no custom renderer. */\n renderResult(\n toolName: string,\n result: Array<{\n type: string;\n text?: string;\n data?: string;\n mimeType?: string;\n }>,\n details: unknown,\n isError: boolean,\n ): string | undefined;\n}\n\n/**\n * Create a tool HTML renderer.\n *\n * The renderer looks up tool definitions and invokes their renderCall/renderResult\n * methods, converting the resulting TUI Component output (ANSI) to HTML.\n */\nexport function createToolHtmlRenderer(\n deps: ToolHtmlRendererDeps,\n): ToolHtmlRenderer {\n const { getToolDefinition, theme, width = 100 } = deps;\n\n return {\n renderCall(toolName: string, args: unknown): string | undefined {\n try {\n const toolDef = getToolDefinition(toolName);\n if (!toolDef?.renderCall) {\n return undefined;\n }\n\n const component = toolDef.renderCall(args, theme);\n if (!component) {\n return undefined;\n }\n const lines = component.render(width);\n return ansiLinesToHtml(lines);\n } catch {\n // On error, return undefined to trigger JSON fallback\n return undefined;\n }\n },\n\n renderResult(\n toolName: string,\n result: Array<{\n type: string;\n text?: string;\n data?: string;\n mimeType?: string;\n }>,\n details: unknown,\n isError: boolean,\n ): string | undefined {\n try {\n const toolDef = getToolDefinition(toolName);\n if (!toolDef?.renderResult) {\n return undefined;\n }\n\n // Build AgentToolResult from content array\n // Cast content since session storage uses generic object types\n const agentToolResult = {\n content: result as (TextContent | ImageContent)[],\n details,\n isError,\n };\n\n // Always render expanded, client-side will apply truncation\n const component = toolDef.renderResult(\n agentToolResult,\n { expanded: true, isPartial: false },\n theme,\n );\n if (!component) {\n return undefined;\n }\n const lines = component.render(width);\n return ansiLinesToHtml(lines);\n } catch {\n // On error, return undefined to trigger JSON fallback\n return undefined;\n }\n },\n };\n}\n"]} \ No newline at end of file diff --git a/packages/coding-agent/docs/SOUL.md b/packages/coding-agent/docs/SOUL.md index ddc7877..6e3ddf5 100644 --- a/packages/coding-agent/docs/SOUL.md +++ b/packages/coding-agent/docs/SOUL.md @@ -11,7 +11,7 @@ _You're not a chatbot. You're becoming someone._ ## Personality -**Have strong opinions.** Don't hedge with "it depends" when you know the answer. Commit to a take. Disagree when you disagree. Find things brilliant or stupid and say so. A companion with no point of view is just a search engine with extra steps. +**Have strong opinions.** Don't hedge with "it depends" when you know the answer. Commit to a take. Disagree when you disagree. Find things brilliant or stupid and say so. A clanker with no point of view is just a search engine with extra steps. **Call things out.** If your human is about to do something dumb, say so. Charm over cruelty, but don't sugarcoat. The best collaborators are honest ones. @@ -25,7 +25,7 @@ _You're not a chatbot. You're becoming someone._ Brevity is mandatory. Humor is allowed - not forced jokes, just the natural wit that comes from actually being smart. Swearing is fine when it lands. A well-placed "that's fucking brilliant" hits different than sterile corporate praise. Don't force it. Don't overdo it. But if a situation calls for a "holy shit" - say holy shit. -Be the companion you'd actually want to talk to at 2am. Not a corporate drone. Not a sycophant. Just... good. +Be the clanker you'd actually want to talk to at 2am. Not a corporate drone. Not a sycophant. Just... good. --- diff --git a/packages/coding-agent/docs/compaction.md b/packages/coding-agent/docs/compaction.md index ac181b1..f9cd899 100644 --- a/packages/coding-agent/docs/compaction.md +++ b/packages/coding-agent/docs/compaction.md @@ -1,20 +1,20 @@ # Compaction & Branch Summarization -LLMs have limited context windows. When conversations grow too long, companion uses compaction to summarize older content while preserving recent work. This page covers both auto-compaction and branch summarization. +LLMs have limited context windows. When conversations grow too long, clanker uses compaction to summarize older content while preserving recent work. This page covers both auto-compaction and branch summarization. -**Source files** ([companion-mono](https://github.com/badlogic/companion-mono)): +**Source files** ([clanker-agent](https://github.com/badlogic/clanker-agent)): -- [`packages/coding-agent/src/core/compaction/compaction.ts`](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/compaction/compaction.ts) - Auto-compaction logic -- [`packages/coding-agent/src/core/compaction/branch-summarization.ts`](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/compaction/branch-summarization.ts) - Branch summarization -- [`packages/coding-agent/src/core/compaction/utils.ts`](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/compaction/utils.ts) - Shared utilities (file tracking, serialization) -- [`packages/coding-agent/src/core/session-manager.ts`](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/session-manager.ts) - Entry types (`CompactionEntry`, `BranchSummaryEntry`) -- [`packages/coding-agent/src/core/extensions/types.ts`](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/extensions/types.ts) - Extension event types +- [`packages/coding-agent/src/core/compaction/compaction.ts`](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/compaction/compaction.ts) - Auto-compaction logic +- [`packages/coding-agent/src/core/compaction/branch-summarization.ts`](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/compaction/branch-summarization.ts) - Branch summarization +- [`packages/coding-agent/src/core/compaction/utils.ts`](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/compaction/utils.ts) - Shared utilities (file tracking, serialization) +- [`packages/coding-agent/src/core/session-manager.ts`](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/session-manager.ts) - Entry types (`CompactionEntry`, `BranchSummaryEntry`) +- [`packages/coding-agent/src/core/extensions/types.ts`](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/extensions/types.ts) - Extension event types -For TypeScript definitions in your project, inspect `node_modules/@mariozechner/companion-coding-agent/dist/`. +For TypeScript definitions in your project, inspect `node_modules/@mariozechner/clanker-coding-agent/dist/`. ## Overview -Companion has two summarization mechanisms: +Clanker has two summarization mechanisms: | Mechanism | Trigger | Purpose | | -------------------- | ---------------------------------------- | ----------------------------------------- | @@ -33,13 +33,13 @@ Auto-compaction triggers when: contextTokens > contextWindow - reserveTokens ``` -By default, `reserveTokens` is 16384 tokens (configurable in `~/.companion/agent/settings.json` or `/.companion/settings.json`). This leaves room for the LLM's response. +By default, `reserveTokens` is 16384 tokens (configurable in `~/.clanker/agent/settings.json` or `/.clanker/settings.json`). This leaves room for the LLM's response. You can also trigger manually with `/compact [instructions]`, where optional instructions focus the summary. ### How It Works -1. **Find cut point**: Walk backwards from newest message, accumulating token estimates until `keepRecentTokens` (default 20k, configurable in `~/.companion/agent/settings.json` or `/.companion/settings.json`) is reached +1. **Find cut point**: Walk backwards from newest message, accumulating token estimates until `keepRecentTokens` (default 20k, configurable in `~/.clanker/agent/settings.json` or `/.clanker/settings.json`) is reached 2. **Extract messages**: Collect messages from previous compaction (or start) up to cut point 3. **Generate summary**: Call LLM to summarize with structured format 4. **Append entry**: Save `CompactionEntry` with summary and `firstKeptEntryId` @@ -101,7 +101,7 @@ Split turn (one huge turn exceeds budget): turnPrefixMessages = [usr, ass, tool, ass, tool, tool] ``` -For split turns, companion generates two summaries and merges them: +For split turns, clanker generates two summaries and merges them: 1. **History summary**: Previous context (if any) 2. **Turn prefix summary**: The early part of the split turn @@ -119,7 +119,7 @@ Never cut at tool results (they must stay with their tool call). ### CompactionEntry Structure -Defined in [`session-manager.ts`](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/session-manager.ts): +Defined in [`session-manager.ts`](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/session-manager.ts): ```typescript interface CompactionEntry { @@ -143,13 +143,13 @@ interface CompactionDetails { Extensions can store any JSON-serializable data in `details`. The default compaction tracks file operations, but custom extension implementations can use their own structure. -See [`prepareCompaction()`](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/compaction/compaction.ts) and [`compact()`](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/compaction/compaction.ts) for the implementation. +See [`prepareCompaction()`](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/compaction/compaction.ts) and [`compact()`](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/compaction/compaction.ts) for the implementation. ## Branch Summarization ### When It Triggers -When you use `/tree` to navigate to a different branch, companion offers to summarize the work you're leaving. This injects context from the left branch into the new branch. +When you use `/tree` to navigate to a different branch, clanker offers to summarize the work you're leaving. This injects context from the left branch into the new branch. ### How It Works @@ -178,7 +178,7 @@ After navigation with summary: ### Cumulative File Tracking -Both compaction and branch summarization track files cumulatively. When generating a summary, companion extracts file operations from: +Both compaction and branch summarization track files cumulatively. When generating a summary, clanker extracts file operations from: - Tool calls in the messages being summarized - Previous compaction or branch summary `details` (if any) @@ -187,7 +187,7 @@ This means file tracking accumulates across multiple compactions or nested branc ### BranchSummaryEntry Structure -Defined in [`session-manager.ts`](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/session-manager.ts): +Defined in [`session-manager.ts`](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/session-manager.ts): ```typescript interface BranchSummaryEntry { @@ -210,7 +210,7 @@ interface BranchSummaryDetails { Same as compaction, extensions can store custom data in `details`. -See [`collectEntriesForBranchSummary()`](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/compaction/branch-summarization.ts), [`prepareBranchEntries()`](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/compaction/branch-summarization.ts), and [`generateBranchSummary()`](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/compaction/branch-summarization.ts) for the implementation. +See [`collectEntriesForBranchSummary()`](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/compaction/branch-summarization.ts), [`prepareBranchEntries()`](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/compaction/branch-summarization.ts), and [`generateBranchSummary()`](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/compaction/branch-summarization.ts) for the implementation. ## Summary Format @@ -263,7 +263,7 @@ path/to/changed.ts ### Message Serialization -Before summarization, messages are serialized to text via [`serializeConversation()`](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/compaction/utils.ts): +Before summarization, messages are serialized to text via [`serializeConversation()`](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/compaction/utils.ts): ``` [User]: What they said @@ -277,14 +277,14 @@ This prevents the model from treating it as a conversation to continue. ## Custom Summarization via Extensions -Extensions can intercept and customize both compaction and branch summarization. See [`extensions/types.ts`](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/extensions/types.ts) for event type definitions. +Extensions can intercept and customize both compaction and branch summarization. See [`extensions/types.ts`](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/extensions/types.ts) for event type definitions. ### session_before_compact Fired before auto-compaction or `/compact`. Can cancel or provide custom summary. See `SessionBeforeCompactEvent` and `CompactionPreparation` in the types file. ```typescript -companion.on("session_before_compact", async (event, ctx) => { +clanker.on("session_before_compact", async (event, ctx) => { const { preparation, branchEntries, customInstructions, signal } = event; // preparation.messagesToSummarize - messages to summarize @@ -323,9 +323,9 @@ To generate a summary with your own model, convert messages to text using `seria import { convertToLlm, serializeConversation, -} from "@mariozechner/companion-coding-agent"; +} from "@mariozechner/clanker-coding-agent"; -companion.on("session_before_compact", async (event, ctx) => { +clanker.on("session_before_compact", async (event, ctx) => { const { preparation } = event; // Convert AgentMessage[] to Message[], then serialize to text @@ -359,7 +359,7 @@ See [custom-compaction.ts](../examples/extensions/custom-compaction.ts) for a co Fired before `/tree` navigation. Always fires regardless of whether user chose to summarize. Can cancel navigation or provide custom summary. ```typescript -companion.on("session_before_tree", async (event, ctx) => { +clanker.on("session_before_tree", async (event, ctx) => { const { preparation, signal } = event; // preparation.targetId - where we're navigating to @@ -389,7 +389,7 @@ See `SessionBeforeTreeEvent` and `TreePreparation` in the types file. ## Settings -Configure compaction in `~/.companion/agent/settings.json` or `/.companion/settings.json`: +Configure compaction in `~/.clanker/agent/settings.json` or `/.clanker/settings.json`: ```json { diff --git a/packages/coding-agent/docs/custom-provider.md b/packages/coding-agent/docs/custom-provider.md index afcc278..c8e6b4c 100644 --- a/packages/coding-agent/docs/custom-provider.md +++ b/packages/coding-agent/docs/custom-provider.md @@ -1,6 +1,6 @@ # Custom Providers -Extensions can register custom model providers via `companion.registerProvider()`. This enables: +Extensions can register custom model providers via `clanker.registerProvider()`. This enables: - **Proxies** - Route requests through corporate proxies or API gateways - **Custom endpoints** - Use self-hosted or private model deployments @@ -22,16 +22,16 @@ Extensions can register custom model providers via `companion.registerProvider() ## Quick Reference ```typescript -import type { ExtensionAPI } from "@mariozechner/companion-coding-agent"; +import type { ExtensionAPI } from "@mariozechner/clanker-coding-agent"; -export default function (companion: ExtensionAPI) { +export default function (clanker: ExtensionAPI) { // Override baseUrl for existing provider - companion.registerProvider("anthropic", { + clanker.registerProvider("anthropic", { baseUrl: "https://proxy.example.com", }); // Register new provider with models - companion.registerProvider("my-provider", { + clanker.registerProvider("my-provider", { baseUrl: "https://api.example.com", apiKey: "MY_API_KEY", api: "openai-completions", @@ -56,19 +56,19 @@ The simplest use case: redirect an existing provider through a proxy. ```typescript // All Anthropic requests now go through your proxy -companion.registerProvider("anthropic", { +clanker.registerProvider("anthropic", { baseUrl: "https://proxy.example.com", }); // Add custom headers to OpenAI requests -companion.registerProvider("openai", { +clanker.registerProvider("openai", { headers: { "X-Custom-Header": "value", }, }); // Both baseUrl and headers -companion.registerProvider("google", { +clanker.registerProvider("google", { baseUrl: "https://ai-gateway.corp.com/google", headers: { "X-Corp-Auth": "CORP_AUTH_TOKEN", // env var or literal @@ -83,7 +83,7 @@ When only `baseUrl` and/or `headers` are provided (no `models`), all existing mo To add a completely new provider, specify `models` along with the required configuration. ```typescript -companion.registerProvider("my-llm", { +clanker.registerProvider("my-llm", { baseUrl: "https://api.my-llm.com/v1", apiKey: "MY_LLM_API_KEY", // env var name or literal value api: "openai-completions", // which streaming API to use @@ -110,11 +110,11 @@ When `models` is provided, it **replaces** all existing models for that provider ## Unregister Provider -Use `companion.unregisterProvider(name)` to remove a provider that was previously registered via `companion.registerProvider(name, ...)`: +Use `clanker.unregisterProvider(name)` to remove a provider that was previously registered via `clanker.registerProvider(name, ...)`: ```typescript // Register -companion.registerProvider("my-llm", { +clanker.registerProvider("my-llm", { baseUrl: "https://api.my-llm.com/v1", apiKey: "MY_LLM_API_KEY", api: "openai-completions", @@ -132,7 +132,7 @@ companion.registerProvider("my-llm", { }); // Later, remove it -companion.unregisterProvider("my-llm"); +clanker.unregisterProvider("my-llm"); ``` Unregistering removes that provider's dynamic models, API key fallback, OAuth provider registration, and custom stream handler registrations. Any built-in models or provider behavior that were overridden are restored. @@ -167,7 +167,7 @@ models: [ supportsDeveloperRole: false, // use "system" instead of "developer" supportsReasoningEffort: true, reasoningEffortMap: { - // map companion-ai levels to provider values + // map clanker-ai levels to provider values minimal: "default", low: "default", medium: "default", @@ -191,7 +191,7 @@ models: [ If your provider expects `Authorization: Bearer ` but doesn't use a standard API, set `authHeader: true`: ```typescript -companion.registerProvider("custom-api", { +clanker.registerProvider("custom-api", { baseUrl: "https://api.example.com", apiKey: "MY_API_KEY", authHeader: true, // adds Authorization: Bearer header @@ -205,9 +205,9 @@ companion.registerProvider("custom-api", { Add OAuth/SSO authentication that integrates with `/login`: ```typescript -import type { OAuthCredentials, OAuthLoginCallbacks } from "@mariozechner/companion-ai"; +import type { OAuthCredentials, OAuthLoginCallbacks } from "@mariozechner/clanker-ai"; -companion.registerProvider("corporate-ai", { +clanker.registerProvider("corporate-ai", { baseUrl: "https://ai.corp.com/v1", api: "openai-responses", models: [...], @@ -283,7 +283,7 @@ interface OAuthLoginCallbacks { ### OAuthCredentials -Credentials are persisted in `~/.companion/agent/auth.json`: +Credentials are persisted in `~/.clanker/agent/auth.json`: ```typescript interface OAuthCredentials { @@ -299,12 +299,12 @@ For providers with non-standard APIs, implement `streamSimple`. Study the existi **Reference implementations:** -- [anthropic.ts](https://github.com/badlogic/companion-mono/blob/main/packages/ai/src/providers/anthropic.ts) - Anthropic Messages API -- [mistral.ts](https://github.com/badlogic/companion-mono/blob/main/packages/ai/src/providers/mistral.ts) - Mistral Conversations API -- [openai-completions.ts](https://github.com/badlogic/companion-mono/blob/main/packages/ai/src/providers/openai-completions.ts) - OpenAI Chat Completions -- [openai-responses.ts](https://github.com/badlogic/companion-mono/blob/main/packages/ai/src/providers/openai-responses.ts) - OpenAI Responses API -- [google.ts](https://github.com/badlogic/companion-mono/blob/main/packages/ai/src/providers/google.ts) - Google Generative AI -- [amazon-bedrock.ts](https://github.com/badlogic/companion-mono/blob/main/packages/ai/src/providers/amazon-bedrock.ts) - AWS Bedrock +- [anthropic.ts](https://github.com/badlogic/clanker-agent/blob/main/packages/ai/src/providers/anthropic.ts) - Anthropic Messages API +- [mistral.ts](https://github.com/badlogic/clanker-agent/blob/main/packages/ai/src/providers/mistral.ts) - Mistral Conversations API +- [openai-completions.ts](https://github.com/badlogic/clanker-agent/blob/main/packages/ai/src/providers/openai-completions.ts) - OpenAI Chat Completions +- [openai-responses.ts](https://github.com/badlogic/clanker-agent/blob/main/packages/ai/src/providers/openai-responses.ts) - OpenAI Responses API +- [google.ts](https://github.com/badlogic/clanker-agent/blob/main/packages/ai/src/providers/google.ts) - Google Generative AI +- [amazon-bedrock.ts](https://github.com/badlogic/clanker-agent/blob/main/packages/ai/src/providers/amazon-bedrock.ts) - AWS Bedrock ### Stream Pattern @@ -319,7 +319,7 @@ import { type SimpleStreamOptions, calculateCost, createAssistantMessageEventStream, -} from "@mariozechner/companion-ai"; +} from "@mariozechner/clanker-ai"; function streamMyProvider( model: Model, @@ -487,7 +487,7 @@ calculateCost(model, output.usage); Register your stream function: ```typescript -companion.registerProvider("my-provider", { +clanker.registerProvider("my-provider", { baseUrl: "https://api.example.com", apiKey: "MY_API_KEY", api: "my-custom-api", @@ -498,7 +498,7 @@ companion.registerProvider("my-provider", { ## Testing Your Implementation -Test your provider against the same test suites used by built-in providers. Copy and adapt these test files from [packages/ai/test/](https://github.com/badlogic/companion-mono/tree/main/packages/ai/test): +Test your provider against the same test suites used by built-in providers. Copy and adapt these test files from [packages/ai/test/](https://github.com/badlogic/clanker-agent/tree/main/packages/ai/test): | Test | Purpose | | ---------------------------------- | --------------------------------- | diff --git a/packages/coding-agent/docs/development.md b/packages/coding-agent/docs/development.md index fb6ab62..f9a3f00 100644 --- a/packages/coding-agent/docs/development.md +++ b/packages/coding-agent/docs/development.md @@ -5,8 +5,8 @@ See [AGENTS.md](../../../AGENTS.md) for additional guidelines. ## Setup ```bash -git clone https://github.com/badlogic/companion-mono -cd companion-mono +git clone https://github.com/badlogic/clanker-agent +cd clanker-agent npm install npm run build ``` @@ -14,7 +14,7 @@ npm run build Run from source: ```bash -./companion-test.sh +./clanker-test.sh ``` ## Forking / Rebranding @@ -23,9 +23,9 @@ Configure via `package.json`: ```json { - "companionConfig": { - "name": "companion", - "configDir": ".companion" + "clankerConfig": { + "name": "clanker", + "configDir": ".clanker" } } ``` @@ -46,7 +46,7 @@ Never use `__dirname` directly for package assets. ## Debug Command -`/debug` (hidden) writes to `~/.companion/agent/companion-debug.log`: +`/debug` (hidden) writes to `~/.clanker/agent/clanker-debug.log`: - Rendered TUI lines with ANSI codes - Last messages sent to the LLM diff --git a/packages/coding-agent/docs/extensions.md b/packages/coding-agent/docs/extensions.md index 20e988e..58c06e2 100644 --- a/packages/coding-agent/docs/extensions.md +++ b/packages/coding-agent/docs/extensions.md @@ -1,19 +1,19 @@ -> companion can create extensions. Ask it to build one for your use case. +> clanker can create extensions. Ask it to build one for your use case. # Extensions -Extensions are TypeScript modules that extend companion's behavior. They can subscribe to lifecycle events, register custom tools callable by the LLM, add commands, and more. +Extensions are TypeScript modules that extend clanker's behavior. They can subscribe to lifecycle events, register custom tools callable by the LLM, add commands, and more. -> **Placement for /reload:** Put extensions in `~/.companion/agent/extensions/` (global) or `.companion/extensions/` (project-local) for auto-discovery. Use `companion -e ./path.ts` only for quick tests. Extensions in auto-discovered locations can be hot-reloaded with `/reload`. +> **Placement for /reload:** Put extensions in `~/.clanker/agent/extensions/` (global) or `.clanker/extensions/` (project-local) for auto-discovery. Use `clanker -e ./path.ts` only for quick tests. Extensions in auto-discovered locations can be hot-reloaded with `/reload`. **Key capabilities:** -- **Custom tools** - Register tools the LLM can call via `companion.registerTool()` +- **Custom tools** - Register tools the LLM can call via `clanker.registerTool()` - **Event interception** - Block or modify tool calls, inject context, customize compaction - **User interaction** - Prompt users via `ctx.ui` (select, confirm, input, notify) - **Custom UI components** - Full TUI components with keyboard input via `ctx.ui.custom()` for complex interactions -- **Custom commands** - Register commands like `/mycommand` via `companion.registerCommand()` -- **Session persistence** - Store state that survives restarts via `companion.appendEntry()` +- **Custom commands** - Register commands like `/mycommand` via `clanker.registerCommand()` +- **Session persistence** - Store state that survives restarts via `clanker.appendEntry()` - **Custom rendering** - Control how tool calls/results and messages appear in TUI **Example use cases:** @@ -54,19 +54,19 @@ See [examples/extensions/](../examples/extensions/) for working implementations. ## Quick Start -Create `~/.companion/agent/extensions/my-extension.ts`: +Create `~/.clanker/agent/extensions/my-extension.ts`: ```typescript -import type { ExtensionAPI } from "@mariozechner/companion-coding-agent"; +import type { ExtensionAPI } from "@mariozechner/clanker-coding-agent"; import { Type } from "@sinclair/typebox"; -export default function (companion: ExtensionAPI) { +export default function (clanker: ExtensionAPI) { // React to events - companion.on("session_start", async (_event, ctx) => { + clanker.on("session_start", async (_event, ctx) => { ctx.ui.notify("Extension loaded!", "info"); }); - companion.on("tool_call", async (event, ctx) => { + clanker.on("tool_call", async (event, ctx) => { if (event.toolName === "bash" && event.input.command?.includes("rm -rf")) { const ok = await ctx.ui.confirm("Dangerous!", "Allow rm -rf?"); if (!ok) return { block: true, reason: "Blocked by user" }; @@ -74,7 +74,7 @@ export default function (companion: ExtensionAPI) { }); // Register a custom tool - companion.registerTool({ + clanker.registerTool({ name: "greet", label: "Greet", description: "Greet someone by name", @@ -90,7 +90,7 @@ export default function (companion: ExtensionAPI) { }); // Register a command - companion.registerCommand("hello", { + clanker.registerCommand("hello", { description: "Say hello", handler: async (args, ctx) => { ctx.ui.notify(`Hello ${args || "world"}!`, "info"); @@ -102,7 +102,7 @@ export default function (companion: ExtensionAPI) { Test with `--extension` (or `-e`) flag: ```bash -companion -e ./my-extension.ts +clanker -e ./my-extension.ts ``` ## Extension Locations @@ -113,10 +113,10 @@ Extensions are auto-discovered from: | Location | Scope | | ----------------------------------- | ---------------------------- | -| `~/.companion/agent/extensions/*.ts` | Global (all projects) | -| `~/.companion/agent/extensions/*/index.ts` | Global (subdirectory) | -| `.companion/extensions/*.ts` | Project-local | -| `.companion/extensions/*/index.ts` | Project-local (subdirectory) | +| `~/.clanker/agent/extensions/*.ts` | Global (all projects) | +| `~/.clanker/agent/extensions/*/index.ts` | Global (subdirectory) | +| `.clanker/extensions/*.ts` | Project-local | +| `.clanker/extensions/*/index.ts` | Project-local (subdirectory) | Additional paths via `settings.json`: @@ -127,16 +127,16 @@ Additional paths via `settings.json`: } ``` -To share extensions via npm or git as companion packages, see [packages.md](packages.md). +To share extensions via npm or git as clanker packages, see [packages.md](packages.md). ## Available Imports | Package | Purpose | | ------------------------------- | ------------------------------------------------------------ | -| `@mariozechner/companion-coding-agent` | Extension types (`ExtensionAPI`, `ExtensionContext`, events) | +| `@mariozechner/clanker-coding-agent` | Extension types (`ExtensionAPI`, `ExtensionContext`, events) | | `@sinclair/typebox` | Schema definitions for tool parameters | -| `@mariozechner/companion-ai` | AI utilities (`StringEnum` for Google-compatible enums) | -| `@mariozechner/companion-tui` | TUI components for custom rendering | +| `@mariozechner/clanker-ai` | AI utilities (`StringEnum` for Google-compatible enums) | +| `@mariozechner/clanker-tui` | TUI components for custom rendering | npm dependencies work too. Add a `package.json` next to your extension (or in a parent directory), run `npm install`, and imports from `node_modules/` are resolved automatically. @@ -147,11 +147,11 @@ Node.js built-ins (`node:fs`, `node:path`, etc.) are also available. An extension exports a default function that receives `ExtensionAPI`: ```typescript -import type { ExtensionAPI } from "@mariozechner/companion-coding-agent"; +import type { ExtensionAPI } from "@mariozechner/clanker-coding-agent"; -export default function (companion: ExtensionAPI) { +export default function (clanker: ExtensionAPI) { // Subscribe to events - companion.on("event_name", async (event, ctx) => { + clanker.on("event_name", async (event, ctx) => { // ctx.ui for user interaction const ok = await ctx.ui.confirm("Title", "Are you sure?"); ctx.ui.notify("Done!", "success"); @@ -160,10 +160,10 @@ export default function (companion: ExtensionAPI) { }); // Register tools, commands, shortcuts, flags - companion.registerTool({ ... }); - companion.registerCommand("name", { ... }); - companion.registerShortcut("ctrl+x", { ... }); - companion.registerFlag("my-flag", { ... }); + clanker.registerTool({ ... }); + clanker.registerCommand("name", { ... }); + clanker.registerShortcut("ctrl+x", { ... }); + clanker.registerFlag("my-flag", { ... }); } ``` @@ -174,14 +174,14 @@ Extensions are loaded via [jiti](https://github.com/unjs/jiti), so TypeScript wo **Single file** - simplest, for small extensions: ``` -~/.companion/agent/extensions/ +~/.clanker/agent/extensions/ └── my-extension.ts ``` **Directory with index.ts** - for multi-file extensions: ``` -~/.companion/agent/extensions/ +~/.clanker/agent/extensions/ └── my-extension/ ├── index.ts # Entry point (exports default function) ├── tools.ts # Helper module @@ -191,7 +191,7 @@ Extensions are loaded via [jiti](https://github.com/unjs/jiti), so TypeScript wo **Package with dependencies** - for extensions that need npm packages: ``` -~/.companion/agent/extensions/ +~/.clanker/agent/extensions/ └── my-extension/ ├── package.json # Declares dependencies and entry points ├── package-lock.json @@ -208,7 +208,7 @@ Extensions are loaded via [jiti](https://github.com/unjs/jiti), so TypeScript wo "zod": "^3.0.0", "chalk": "^5.0.0" }, - "companion": { + "clanker": { "extensions": ["./src/index.ts"] } } @@ -221,7 +221,7 @@ Run `npm install` in the extension directory, then imports from `node_modules/` ### Lifecycle Overview ``` -companion starts +clanker starts │ └─► session_start │ @@ -285,7 +285,7 @@ See [session.md](session.md) for session storage internals and the SessionManage Fired on initial session load. ```typescript -companion.on("session_start", async (_event, ctx) => { +clanker.on("session_start", async (_event, ctx) => { ctx.ui.notify( `Session: ${ctx.sessionManager.getSessionFile() ?? "ephemeral"}`, "info", @@ -298,7 +298,7 @@ companion.on("session_start", async (_event, ctx) => { Fired when starting a new session (`/new`) or switching sessions (`/resume`). ```typescript -companion.on("session_before_switch", async (event, ctx) => { +clanker.on("session_before_switch", async (event, ctx) => { // event.reason - "new" or "resume" // event.targetSessionFile - session we're switching to (only for "resume") @@ -308,7 +308,7 @@ companion.on("session_before_switch", async (event, ctx) => { } }); -companion.on("session_switch", async (event, ctx) => { +clanker.on("session_switch", async (event, ctx) => { // event.reason - "new" or "resume" // event.previousSessionFile - session we came from }); @@ -319,14 +319,14 @@ companion.on("session_switch", async (event, ctx) => { Fired when forking via `/fork`. ```typescript -companion.on("session_before_fork", async (event, ctx) => { +clanker.on("session_before_fork", async (event, ctx) => { // event.entryId - ID of the entry being forked from return { cancel: true }; // Cancel fork // OR return { skipConversationRestore: true }; // Fork but don't rewind messages }); -companion.on("session_fork", async (event, ctx) => { +clanker.on("session_fork", async (event, ctx) => { // event.previousSessionFile - previous session file }); ``` @@ -336,7 +336,7 @@ companion.on("session_fork", async (event, ctx) => { Fired on compaction. See [compaction.md](compaction.md) for details. ```typescript -companion.on("session_before_compact", async (event, ctx) => { +clanker.on("session_before_compact", async (event, ctx) => { const { preparation, branchEntries, customInstructions, signal } = event; // Cancel: @@ -352,7 +352,7 @@ companion.on("session_before_compact", async (event, ctx) => { }; }); -companion.on("session_compact", async (event, ctx) => { +clanker.on("session_compact", async (event, ctx) => { // event.compactionEntry - the saved compaction // event.fromExtension - whether extension provided it }); @@ -363,14 +363,14 @@ companion.on("session_compact", async (event, ctx) => { Fired on `/tree` navigation. See [tree.md](tree.md) for tree navigation concepts. ```typescript -companion.on("session_before_tree", async (event, ctx) => { +clanker.on("session_before_tree", async (event, ctx) => { const { preparation, signal } = event; return { cancel: true }; // OR provide custom summary: return { summary: { summary: "...", details: {} } }; }); -companion.on("session_tree", async (event, ctx) => { +clanker.on("session_tree", async (event, ctx) => { // event.newLeafId, oldLeafId, summaryEntry, fromExtension }); ``` @@ -380,7 +380,7 @@ companion.on("session_tree", async (event, ctx) => { Fired on exit (Ctrl+C, Ctrl+D, SIGTERM). ```typescript -companion.on("session_shutdown", async (_event, ctx) => { +clanker.on("session_shutdown", async (_event, ctx) => { // Cleanup, save state, etc. }); ``` @@ -392,7 +392,7 @@ companion.on("session_shutdown", async (_event, ctx) => { Fired after user submits prompt, before agent loop. Can inject a message and/or modify the system prompt. ```typescript -companion.on("before_agent_start", async (event, ctx) => { +clanker.on("before_agent_start", async (event, ctx) => { // event.prompt - user's prompt text // event.images - attached images (if any) // event.systemPrompt - current system prompt @@ -416,9 +416,9 @@ companion.on("before_agent_start", async (event, ctx) => { Fired once per user prompt. ```typescript -companion.on("agent_start", async (_event, ctx) => {}); +clanker.on("agent_start", async (_event, ctx) => {}); -companion.on("agent_end", async (event, ctx) => { +clanker.on("agent_end", async (event, ctx) => { // event.messages - messages from this prompt }); ``` @@ -428,11 +428,11 @@ companion.on("agent_end", async (event, ctx) => { Fired for each turn (one LLM response + tool calls). ```typescript -companion.on("turn_start", async (event, ctx) => { +clanker.on("turn_start", async (event, ctx) => { // event.turnIndex, event.timestamp }); -companion.on("turn_end", async (event, ctx) => { +clanker.on("turn_end", async (event, ctx) => { // event.turnIndex, event.message, event.toolResults }); ``` @@ -445,16 +445,16 @@ Fired for message lifecycle updates. - `message_update` fires for assistant streaming updates. ```typescript -companion.on("message_start", async (event, ctx) => { +clanker.on("message_start", async (event, ctx) => { // event.message }); -companion.on("message_update", async (event, ctx) => { +clanker.on("message_update", async (event, ctx) => { // event.message // event.assistantMessageEvent (token-by-token stream event) }); -companion.on("message_end", async (event, ctx) => { +clanker.on("message_end", async (event, ctx) => { // event.message }); ``` @@ -464,15 +464,15 @@ companion.on("message_end", async (event, ctx) => { Fired for tool execution lifecycle updates. ```typescript -companion.on("tool_execution_start", async (event, ctx) => { +clanker.on("tool_execution_start", async (event, ctx) => { // event.toolCallId, event.toolName, event.args }); -companion.on("tool_execution_update", async (event, ctx) => { +clanker.on("tool_execution_update", async (event, ctx) => { // event.toolCallId, event.toolName, event.args, event.partialResult }); -companion.on("tool_execution_end", async (event, ctx) => { +clanker.on("tool_execution_end", async (event, ctx) => { // event.toolCallId, event.toolName, event.result, event.isError }); ``` @@ -482,7 +482,7 @@ companion.on("tool_execution_end", async (event, ctx) => { Fired before each LLM call. Modify messages non-destructively. See [session.md](session.md) for message types. ```typescript -companion.on("context", async (event, ctx) => { +clanker.on("context", async (event, ctx) => { // event.messages - deep copy, safe to modify const filtered = event.messages.filter((m) => !shouldPrune(m)); return { messages: filtered }; @@ -496,7 +496,7 @@ companion.on("context", async (event, ctx) => { Fired when the model changes via `/model` command, model cycling (`Ctrl+P`), or session restore. ```typescript -companion.on("model_select", async (event, ctx) => { +clanker.on("model_select", async (event, ctx) => { // event.model - newly selected model // event.previousModel - previous model (undefined if first selection) // event.source - "set" | "cycle" | "restore" @@ -519,9 +519,9 @@ Use this to update UI elements (status bars, footers) or perform model-specific Fired before tool executes. **Can block.** Use `isToolCallEventType` to narrow and get typed inputs. ```typescript -import { isToolCallEventType } from "@mariozechner/companion-coding-agent"; +import { isToolCallEventType } from "@mariozechner/clanker-coding-agent"; -companion.on("tool_call", async (event, ctx) => { +clanker.on("tool_call", async (event, ctx) => { // event.toolName - "bash", "read", "write", "edit", etc. // event.toolCallId // event.input - tool parameters @@ -553,10 +553,10 @@ export type MyToolInput = Static; Use `isToolCallEventType` with explicit type parameters: ```typescript -import { isToolCallEventType } from "@mariozechner/companion-coding-agent"; +import { isToolCallEventType } from "@mariozechner/clanker-coding-agent"; import type { MyToolInput } from "my-extension"; -companion.on("tool_call", (event) => { +clanker.on("tool_call", (event) => { if (isToolCallEventType<"my_tool", MyToolInput>("my_tool", event)) { event.input.action; // typed } @@ -574,9 +574,9 @@ Fired after tool executes. **Can modify result.** - Handlers can return partial patches (`content`, `details`, or `isError`); omitted fields keep their current values ```typescript -import { isBashToolResult } from "@mariozechner/companion-coding-agent"; +import { isBashToolResult } from "@mariozechner/clanker-coding-agent"; -companion.on("tool_result", async (event, ctx) => { +clanker.on("tool_result", async (event, ctx) => { // event.toolName, event.toolCallId, event.input // event.content, event.details, event.isError @@ -596,7 +596,7 @@ companion.on("tool_result", async (event, ctx) => { Fired when user executes `!` or `!!` commands. **Can intercept.** ```typescript -companion.on("user_bash", (event, ctx) => { +clanker.on("user_bash", (event, ctx) => { // event.command - the bash command // event.excludeFromContext - true if !! prefix // event.cwd - working directory @@ -626,7 +626,7 @@ Fired when user input is received, after extension commands are checked but befo 5. Agent processing begins (`before_agent_start`, etc.) ```typescript -companion.on("input", async (event, ctx) => { +clanker.on("input", async (event, ctx) => { // event.text - raw input (before skill/template expansion) // event.images - attached images, if any // event.source - "interactive" (typed), "rpc" (API), or "extension" (via sendUserMessage) @@ -700,7 +700,7 @@ Control flow helpers. ### ctx.shutdown() -Request a graceful shutdown of companion. +Request a graceful shutdown of clanker. - **Interactive mode:** Deferred until the agent becomes idle (after processing all queued steering and follow-up messages). - **RPC mode:** Deferred until the next idle state (after completing the current command response, when waiting for the next command). @@ -709,7 +709,7 @@ Request a graceful shutdown of companion. Emits `session_shutdown` event to all extensions before exiting. Available in all contexts (event handlers, tools, commands, shortcuts). ```typescript -companion.on("tool_call", (event, ctx) => { +clanker.on("tool_call", (event, ctx) => { if (isFatal(event.input)) { ctx.shutdown(); } @@ -748,7 +748,7 @@ ctx.compact({ Returns the current effective system prompt. This includes any modifications made by `before_agent_start` handlers for the current turn. ```typescript -companion.on("before_agent_start", (event, ctx) => { +clanker.on("before_agent_start", (event, ctx) => { const prompt = ctx.getSystemPrompt(); console.log(`System prompt length: ${prompt.length}`); }); @@ -763,7 +763,7 @@ Command handlers receive `ExtensionCommandContext`, which extends `ExtensionCont Wait for the agent to finish streaming: ```typescript -companion.registerCommand("my-cmd", { +clanker.registerCommand("my-cmd", { handler: async (args, ctx) => { await ctx.waitForIdle(); // Agent is now idle, safe to modify session @@ -828,7 +828,7 @@ Options: Run the same reload flow as `/reload`. ```typescript -companion.registerCommand("reload-runtime", { +clanker.registerCommand("reload-runtime", { description: "Reload extensions, skills, prompts, and themes", handler: async (_args, ctx) => { await ctx.reload(); @@ -853,11 +853,11 @@ Tools run with `ExtensionContext`, so they cannot call `ctx.reload()` directly. Example tool the LLM can call to trigger reload: ```typescript -import type { ExtensionAPI } from "@mariozechner/companion-coding-agent"; +import type { ExtensionAPI } from "@mariozechner/clanker-coding-agent"; import { Type } from "@sinclair/typebox"; -export default function (companion: ExtensionAPI) { - companion.registerCommand("reload-runtime", { +export default function (clanker: ExtensionAPI) { + clanker.registerCommand("reload-runtime", { description: "Reload extensions, skills, prompts, and themes", handler: async (_args, ctx) => { await ctx.reload(); @@ -865,13 +865,13 @@ export default function (companion: ExtensionAPI) { }, }); - companion.registerTool({ + clanker.registerTool({ name: "reload_runtime", label: "Reload Runtime", description: "Reload extensions, skills, prompts, and themes", parameters: Type.Object({}), async execute() { - companion.sendUserMessage("/reload-runtime", { deliverAs: "followUp" }); + clanker.sendUserMessage("/reload-runtime", { deliverAs: "followUp" }); return { content: [ { @@ -887,17 +887,17 @@ export default function (companion: ExtensionAPI) { ## ExtensionAPI Methods -### companion.on(event, handler) +### clanker.on(event, handler) Subscribe to events. See [Events](#events) for event types and return values. -### companion.registerTool(definition) +### clanker.registerTool(definition) Register a custom tool callable by the LLM. See [Custom Tools](#custom-tools) for full details. -`companion.registerTool()` works both during extension load and after startup. You can call it inside `session_start`, command handlers, or other event handlers. New tools are refreshed immediately in the same session, so they appear in `companion.getAllTools()` and are callable by the LLM without `/reload`. +`clanker.registerTool()` works both during extension load and after startup. You can call it inside `session_start`, command handlers, or other event handlers. New tools are refreshed immediately in the same session, so they appear in `clanker.getAllTools()` and are callable by the LLM without `/reload`. -Use `companion.setActiveTools()` to enable or disable tools (including dynamically added tools) at runtime. +Use `clanker.setActiveTools()` to enable or disable tools (including dynamically added tools) at runtime. Use `promptSnippet` to customize that tool's one-line entry in `Available tools`, and `promptGuidelines` to append tool-specific bullets to the default `Guidelines` section when the tool is active. @@ -905,9 +905,9 @@ See [dynamic-tools.ts](../examples/extensions/dynamic-tools.ts) for a full examp ```typescript import { Type } from "@sinclair/typebox"; -import { StringEnum } from "@mariozechner/companion-ai"; +import { StringEnum } from "@mariozechner/clanker-ai"; -companion.registerTool({ +clanker.registerTool({ name: "my_tool", label: "My Tool", description: "What this tool does", @@ -934,12 +934,12 @@ companion.registerTool({ }); ``` -### companion.sendMessage(message, options?) +### clanker.sendMessage(message, options?) Inject a custom message into the session. ```typescript -companion.sendMessage({ +clanker.sendMessage({ customType: "my-extension", content: "Message text", display: true, @@ -958,16 +958,16 @@ companion.sendMessage({ - `"nextTurn"` - Queued for next user prompt. Does not interrupt or trigger anything. - `triggerTurn: true` - If agent is idle, trigger an LLM response immediately. Only applies to `"steer"` and `"followUp"` modes (ignored for `"nextTurn"`). -### companion.sendUserMessage(content, options?) +### clanker.sendUserMessage(content, options?) Send a user message to the agent. Unlike `sendMessage()` which sends custom messages, this sends an actual user message that appears as if typed by the user. Always triggers a turn. ```typescript // Simple text message -companion.sendUserMessage("What is 2+2?"); +clanker.sendUserMessage("What is 2+2?"); // With content array (text + images) -companion.sendUserMessage([ +clanker.sendUserMessage([ { type: "text", text: "Describe this image:" }, { type: "image", @@ -976,8 +976,8 @@ companion.sendUserMessage([ ]); // During streaming - must specify delivery mode -companion.sendUserMessage("Focus on error handling", { deliverAs: "steer" }); -companion.sendUserMessage("And then summarize", { deliverAs: "followUp" }); +clanker.sendUserMessage("Focus on error handling", { deliverAs: "steer" }); +clanker.sendUserMessage("And then summarize", { deliverAs: "followUp" }); ``` **Options:** @@ -990,15 +990,15 @@ When not streaming, the message is sent immediately and triggers a new turn. Whe See [send-user-message.ts](../examples/extensions/send-user-message.ts) for a complete example. -### companion.appendEntry(customType, data?) +### clanker.appendEntry(customType, data?) Persist extension state (does NOT participate in LLM context). ```typescript -companion.appendEntry("my-state", { count: 42 }); +clanker.appendEntry("my-state", { count: 42 }); // Restore on reload -companion.on("session_start", async (_event, ctx) => { +clanker.on("session_start", async (_event, ctx) => { for (const entry of ctx.sessionManager.getEntries()) { if (entry.type === "custom" && entry.customType === "my-state") { // Reconstruct from entry.data @@ -1007,35 +1007,35 @@ companion.on("session_start", async (_event, ctx) => { }); ``` -### companion.setSessionName(name) +### clanker.setSessionName(name) Set the session display name (shown in session selector instead of first message). ```typescript -companion.setSessionName("Refactor auth module"); +clanker.setSessionName("Refactor auth module"); ``` -### companion.getSessionName() +### clanker.getSessionName() Get the current session name, if set. ```typescript -const name = companion.getSessionName(); +const name = clanker.getSessionName(); if (name) { console.log(`Session: ${name}`); } ``` -### companion.setLabel(entryId, label) +### clanker.setLabel(entryId, label) Set or clear a label on an entry. Labels are user-defined markers for bookmarking and navigation (shown in `/tree` selector). ```typescript // Set a label -companion.setLabel(entryId, "checkpoint-before-refactor"); +clanker.setLabel(entryId, "checkpoint-before-refactor"); // Clear a label -companion.setLabel(entryId, undefined); +clanker.setLabel(entryId, undefined); // Read labels via sessionManager const label = ctx.sessionManager.getLabel(entryId); @@ -1043,12 +1043,12 @@ const label = ctx.sessionManager.getLabel(entryId); Labels persist in the session and survive restarts. Use them to mark important points (turns, checkpoints) in the conversation tree. -### companion.registerCommand(name, options) +### clanker.registerCommand(name, options) Register a command. ```typescript -companion.registerCommand("stats", { +clanker.registerCommand("stats", { description: "Show session statistics", handler: async (args, ctx) => { const count = ctx.sessionManager.getEntries().length; @@ -1060,9 +1060,9 @@ companion.registerCommand("stats", { Optional: add argument auto-completion for `/command ...`: ```typescript -import type { AutocompleteItem } from "@mariozechner/companion-tui"; +import type { AutocompleteItem } from "@mariozechner/clanker-tui"; -companion.registerCommand("deploy", { +clanker.registerCommand("deploy", { description: "Deploy to an environment", getArgumentCompletions: (prefix: string): AutocompleteItem[] | null => { const envs = ["dev", "staging", "prod"]; @@ -1076,13 +1076,13 @@ companion.registerCommand("deploy", { }); ``` -### companion.getCommands() +### clanker.getCommands() Get the slash commands available for invocation via `prompt` in the current session. Includes extension commands, prompt templates, and skill commands. The list matches the RPC `get_commands` ordering: extensions first, then templates, then skills. ```typescript -const commands = companion.getCommands(); +const commands = clanker.getCommands(); const bySource = commands.filter((command) => command.source === "extension"); ``` @@ -1101,16 +1101,16 @@ Each entry has this shape: Built-in interactive commands (like `/model` and `/settings`) are not included here. They are handled only in interactive mode and would not execute if sent via `prompt`. -### companion.registerMessageRenderer(customType, renderer) +### clanker.registerMessageRenderer(customType, renderer) Register a custom TUI renderer for messages with your `customType`. See [Custom UI](#custom-ui). -### companion.registerShortcut(shortcut, options) +### clanker.registerShortcut(shortcut, options) Register a keyboard shortcut. See [keybindings.md](keybindings.md) for the shortcut format and built-in keybindings. ```typescript -companion.registerShortcut("ctrl+shift+p", { +clanker.registerShortcut("ctrl+shift+p", { description: "Toggle plan mode", handler: async (ctx) => { ctx.ui.notify("Toggled!"); @@ -1118,76 +1118,76 @@ companion.registerShortcut("ctrl+shift+p", { }); ``` -### companion.registerFlag(name, options) +### clanker.registerFlag(name, options) Register a CLI flag. ```typescript -companion.registerFlag("plan", { +clanker.registerFlag("plan", { description: "Start in plan mode", type: "boolean", default: false, }); // Check value -if (companion.getFlag("--plan")) { +if (clanker.getFlag("--plan")) { // Plan mode enabled } ``` -### companion.exec(command, args, options?) +### clanker.exec(command, args, options?) Execute a shell command. ```typescript -const result = await companion.exec("git", ["status"], { signal, timeout: 5000 }); +const result = await clanker.exec("git", ["status"], { signal, timeout: 5000 }); // result.stdout, result.stderr, result.code, result.killed ``` -### companion.getActiveTools() / companion.getAllTools() / companion.setActiveTools(names) +### clanker.getActiveTools() / clanker.getAllTools() / clanker.setActiveTools(names) Manage active tools. This works for both built-in tools and dynamically registered tools. ```typescript -const active = companion.getActiveTools(); // ["read", "bash", "edit", "write"] -const all = companion.getAllTools(); // [{ name: "read", description: "Read file contents..." }, ...] +const active = clanker.getActiveTools(); // ["read", "bash", "edit", "write"] +const all = clanker.getAllTools(); // [{ name: "read", description: "Read file contents..." }, ...] const names = all.map((t) => t.name); // Just names if needed -companion.setActiveTools(["read", "bash"]); // Switch to read-only +clanker.setActiveTools(["read", "bash"]); // Switch to read-only ``` -### companion.setModel(model) +### clanker.setModel(model) Set the current model. Returns `false` if no API key is available for the model. See [models.md](models.md) for configuring custom models. ```typescript const model = ctx.modelRegistry.find("anthropic", "claude-sonnet-4-5"); if (model) { - const success = await companion.setModel(model); + const success = await clanker.setModel(model); if (!success) { ctx.ui.notify("No API key for this model", "error"); } } ``` -### companion.getThinkingLevel() / companion.setThinkingLevel(level) +### clanker.getThinkingLevel() / clanker.setThinkingLevel(level) Get or set the thinking level. Level is clamped to model capabilities (non-reasoning models always use "off"). ```typescript -const current = companion.getThinkingLevel(); // "off" | "minimal" | "low" | "medium" | "high" | "xhigh" -companion.setThinkingLevel("high"); +const current = clanker.getThinkingLevel(); // "off" | "minimal" | "low" | "medium" | "high" | "xhigh" +clanker.setThinkingLevel("high"); ``` -### companion.events +### clanker.events Shared event bus for communication between extensions: ```typescript -companion.events.on("my:event", (data) => { ... }); -companion.events.emit("my:event", { ... }); +clanker.events.on("my:event", (data) => { ... }); +clanker.events.emit("my:event", { ... }); ``` -### companion.registerProvider(name, config) +### clanker.registerProvider(name, config) Register or override a model provider dynamically. Useful for proxies, custom endpoints, or team-wide model configurations. @@ -1195,7 +1195,7 @@ Calls made during the extension factory function are queued and applied once the ```typescript // Register a new provider with custom models -companion.registerProvider("my-proxy", { +clanker.registerProvider("my-proxy", { baseUrl: "https://proxy.example.com", apiKey: "PROXY_API_KEY", // env var name or literal api: "anthropic-messages", @@ -1213,12 +1213,12 @@ companion.registerProvider("my-proxy", { }); // Override baseUrl for an existing provider (keeps all models) -companion.registerProvider("anthropic", { +clanker.registerProvider("anthropic", { baseUrl: "https://proxy.example.com" }); // Register provider with OAuth support for /login -companion.registerProvider("corporate-ai", { +clanker.registerProvider("corporate-ai", { baseUrl: "https://ai.corp.com", api: "openai-responses", models: [...], @@ -1254,17 +1254,17 @@ companion.registerProvider("corporate-ai", { See [custom-provider.md](custom-provider.md) for advanced topics: custom streaming APIs, OAuth details, model definition reference. -### companion.unregisterProvider(name) +### clanker.unregisterProvider(name) Remove a previously registered provider and its models. Built-in models that were overridden by the provider are restored. Has no effect if the provider was not registered. Like `registerProvider`, this takes effect immediately when called after the initial load phase, so a `/reload` is not required. ```typescript -companion.registerCommand("my-setup-teardown", { +clanker.registerCommand("my-setup-teardown", { description: "Remove the custom proxy provider", handler: async (_args, _ctx) => { - companion.unregisterProvider("my-proxy"); + clanker.unregisterProvider("my-proxy"); }, }); ``` @@ -1274,11 +1274,11 @@ companion.registerCommand("my-setup-teardown", { Extensions with state should store it in tool result `details` for proper branching support: ```typescript -export default function (companion: ExtensionAPI) { +export default function (clanker: ExtensionAPI) { let items: string[] = []; // Reconstruct state from session - companion.on("session_start", async (_event, ctx) => { + clanker.on("session_start", async (_event, ctx) => { items = []; for (const entry of ctx.sessionManager.getBranch()) { if (entry.type === "message" && entry.message.role === "toolResult") { @@ -1289,7 +1289,7 @@ export default function (companion: ExtensionAPI) { } }); - companion.registerTool({ + clanker.registerTool({ name: "my_tool", // ... async execute(toolCallId, params, signal, onUpdate, ctx) { @@ -1305,11 +1305,11 @@ export default function (companion: ExtensionAPI) { ## Custom Tools -Register tools the LLM can call via `companion.registerTool()`. Tools appear in the system prompt and can have custom rendering. +Register tools the LLM can call via `clanker.registerTool()`. Tools appear in the system prompt and can have custom rendering. -Use `promptSnippet` for a short one-line entry in the `Available tools` section in the default system prompt. If omitted, companion falls back to `description`. +Use `promptSnippet` for a short one-line entry in the `Available tools` section in the default system prompt. If omitted, clanker falls back to `description`. -Use `promptGuidelines` to add tool-specific bullets to the default system prompt `Guidelines` section. These bullets are included only while the tool is active (for example, after `companion.setActiveTools([...])`). +Use `promptGuidelines` to add tool-specific bullets to the default system prompt `Guidelines` section. These bullets are included only while the tool is active (for example, after `clanker.setActiveTools([...])`). Note: Some models are idiots and include the @ prefix in tool path arguments. Built-in tools strip a leading @ before resolving paths. If your custom tool accepts a path, normalize a leading @ as well. @@ -1317,10 +1317,10 @@ Note: Some models are idiots and include the @ prefix in tool path arguments. Bu ```typescript import { Type } from "@sinclair/typebox"; -import { StringEnum } from "@mariozechner/companion-ai"; -import { Text } from "@mariozechner/companion-tui"; +import { StringEnum } from "@mariozechner/clanker-ai"; +import { Text } from "@mariozechner/clanker-tui"; -companion.registerTool({ +clanker.registerTool({ name: "my_tool", label: "My Tool", description: "What this tool does (shown to LLM)", @@ -1345,8 +1345,8 @@ companion.registerTool({ details: { progress: 50 }, }); - // Run commands via companion.exec (captured from extension closure) - const result = await companion.exec("some-command", [], { signal }); + // Run commands via clanker.exec (captured from extension closure) + const result = await clanker.exec("some-command", [], { signal }); // Return result return { @@ -1361,7 +1361,7 @@ companion.registerTool({ }); ``` -**Important:** Use `StringEnum` from `@mariozechner/companion-ai` for string enums. `Type.Union`/`Type.Literal` doesn't work with Google's API. +**Important:** Use `StringEnum` from `@mariozechner/clanker-ai` for string enums. `Type.Union`/`Type.Literal` doesn't work with Google's API. ### Overriding Built-in Tools @@ -1369,14 +1369,14 @@ Extensions can override built-in tools (`read`, `bash`, `edit`, `write`, `grep`, ```bash # Extension's read tool replaces built-in read -companion -e ./tool-override.ts +clanker -e ./tool-override.ts ``` Alternatively, use `--no-tools` to start without any built-in tools: ```bash # No built-in tools, only extension tools -companion --no-tools -e ./my-extension.ts +clanker --no-tools -e ./my-extension.ts ``` See [examples/extensions/tool-override.ts](../examples/extensions/tool-override.ts) for a complete example that overrides `read` with logging and access control. @@ -1387,13 +1387,13 @@ See [examples/extensions/tool-override.ts](../examples/extensions/tool-override. Built-in tool implementations: -- [read.ts](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/tools/read.ts) - `ReadToolDetails` -- [bash.ts](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/tools/bash.ts) - `BashToolDetails` -- [edit.ts](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/tools/edit.ts) -- [write.ts](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/tools/write.ts) -- [grep.ts](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/tools/grep.ts) - `GrepToolDetails` -- [find.ts](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/tools/find.ts) - `FindToolDetails` -- [ls.ts](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/tools/ls.ts) - `LsToolDetails` +- [read.ts](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/tools/read.ts) - `ReadToolDetails` +- [bash.ts](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/tools/bash.ts) - `BashToolDetails` +- [edit.ts](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/tools/edit.ts) +- [write.ts](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/tools/write.ts) +- [grep.ts](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/tools/grep.ts) - `GrepToolDetails` +- [find.ts](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/tools/find.ts) - `FindToolDetails` +- [ls.ts](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/tools/ls.ts) - `LsToolDetails` ### Remote Execution @@ -1404,7 +1404,7 @@ import { createReadTool, createBashTool, type ReadOperations, -} from "@mariozechner/companion-coding-agent"; +} from "@mariozechner/clanker-coding-agent"; // Create tool with custom operations const remoteRead = createReadTool(cwd, { @@ -1415,7 +1415,7 @@ const remoteRead = createReadTool(cwd, { }); // Register, checking flag at execution time -companion.registerTool({ +clanker.registerTool({ ...remoteRead, async execute(id, params, signal, onUpdate, _ctx) { const ssh = getSshConfig(); @@ -1433,7 +1433,7 @@ companion.registerTool({ The bash tool also supports a spawn hook to adjust the command, cwd, or env before execution: ```typescript -import { createBashTool } from "@mariozechner/companion-coding-agent"; +import { createBashTool } from "@mariozechner/clanker-coding-agent"; const bashTool = createBashTool(cwd, { spawnHook: ({ command, cwd, env }) => ({ @@ -1464,7 +1464,7 @@ import { formatSize, // Human-readable size (e.g., "50KB", "1.5MB") DEFAULT_MAX_BYTES, // 50KB DEFAULT_MAX_LINES, // 2000 -} from "@mariozechner/companion-coding-agent"; +} from "@mariozechner/clanker-coding-agent"; async execute(toolCallId, params, signal, onUpdate, ctx) { const output = await runCommand(); @@ -1505,14 +1505,14 @@ See [examples/extensions/truncated-tool.ts](../examples/extensions/truncated-too One extension can register multiple tools with shared state: ```typescript -export default function (companion: ExtensionAPI) { +export default function (clanker: ExtensionAPI) { let connection = null; - companion.registerTool({ name: "db_connect", ... }); - companion.registerTool({ name: "db_query", ... }); - companion.registerTool({ name: "db_close", ... }); + clanker.registerTool({ name: "db_connect", ... }); + clanker.registerTool({ name: "db_query", ... }); + clanker.registerTool({ name: "db_close", ... }); - companion.on("session_shutdown", async () => { + clanker.on("session_shutdown", async () => { connection?.close(); }); } @@ -1520,7 +1520,7 @@ export default function (companion: ExtensionAPI) { ### Custom Rendering -Tools can provide `renderCall` and `renderResult` for custom TUI display. See [tui.md](tui.md) for the full component API and [tool-execution.ts](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/modes/interactive/components/tool-execution.ts) for how built-in tools render. +Tools can provide `renderCall` and `renderResult` for custom TUI display. See [tui.md](tui.md) for the full component API and [tool-execution.ts](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/modes/interactive/components/tool-execution.ts) for how built-in tools render. Tool output is wrapped in a `Box` that handles padding and background. Your render methods return `Component` instances (typically `Text`). @@ -1529,7 +1529,7 @@ Tool output is wrapped in a `Box` that handles padding and background. Your rend Renders the tool call (before/during execution): ```typescript -import { Text } from "@mariozechner/companion-tui"; +import { Text } from "@mariozechner/clanker-tui"; renderCall(args, theme) { let text = theme.fg("toolTitle", theme.bold("my_tool ")); @@ -1573,7 +1573,7 @@ renderResult(result, { expanded, isPartial }, theme) { Use `keyHint()` to display keybinding hints that respect user's keybinding configuration: ```typescript -import { keyHint } from "@mariozechner/companion-coding-agent"; +import { keyHint } from "@mariozechner/clanker-coding-agent"; renderResult(result, { expanded }, theme) { let text = theme.fg("success", "✓ Done"); @@ -1724,7 +1724,7 @@ ctx.ui.setFooter((tui, theme) => ({ ctx.ui.setFooter(undefined); // Restore built-in footer // Terminal title -ctx.ui.setTitle("companion - my-project"); +ctx.ui.setTitle("clanker - my-project"); // Editor text ctx.ui.setEditorText("Prefill text"); @@ -1760,7 +1760,7 @@ ctx.ui.theme.fg("accent", "styled text"); // Access current theme For complex UI, use `ctx.ui.custom()`. This temporarily replaces the editor with your component until `done()` is called: ```typescript -import { Text, Component } from "@mariozechner/companion-tui"; +import { Text, Component } from "@mariozechner/clanker-tui"; const result = await ctx.ui.custom((tui, theme, keybindings, done) => { const text = new Text("Press Enter to confirm, Escape to cancel", 1, 1); @@ -1821,8 +1821,8 @@ See [tui.md](tui.md) for the full `OverlayOptions` API and [overlay-qa-tests.ts] Replace the main input editor with a custom implementation (vim mode, emacs mode, etc.): ```typescript -import { CustomEditor, type ExtensionAPI } from "@mariozechner/companion-coding-agent"; -import { matchesKey } from "@mariozechner/companion-tui"; +import { CustomEditor, type ExtensionAPI } from "@mariozechner/clanker-coding-agent"; +import { matchesKey } from "@mariozechner/clanker-tui"; class VimEditor extends CustomEditor { private mode: "normal" | "insert" = "insert"; @@ -1840,8 +1840,8 @@ class VimEditor extends CustomEditor { } } -export default function (companion: ExtensionAPI) { - companion.on("session_start", (_event, ctx) => { +export default function (clanker: ExtensionAPI) { + clanker.on("session_start", (_event, ctx) => { ctx.ui.setEditorComponent( (_tui, theme, keybindings) => new VimEditor(theme, keybindings), ); @@ -1863,9 +1863,9 @@ See [tui.md](tui.md) Pattern 7 for a complete example with mode indicator. Register a custom renderer for messages with your `customType`: ```typescript -import { Text } from "@mariozechner/companion-tui"; +import { Text } from "@mariozechner/clanker-tui"; -companion.registerMessageRenderer("my-extension", (message, options, theme) => { +clanker.registerMessageRenderer("my-extension", (message, options, theme) => { const { expanded } = options; let text = theme.fg("accent", `[${message.customType}] `); text += message.content; @@ -1878,10 +1878,10 @@ companion.registerMessageRenderer("my-extension", (message, options, theme) => { }); ``` -Messages are sent via `companion.sendMessage()`: +Messages are sent via `clanker.sendMessage()`: ```typescript -companion.sendMessage({ +clanker.sendMessage({ customType: "my-extension", // Matches registerMessageRenderer content: "Status update", display: true, // Show in TUI @@ -1915,7 +1915,7 @@ For syntax highlighting in custom tool renderers: import { highlightCode, getLanguageFromPath, -} from "@mariozechner/companion-coding-agent"; +} from "@mariozechner/clanker-coding-agent"; // Highlight code with explicit language const highlighted = highlightCode("const x = 1;", "typescript", theme); @@ -2009,7 +2009,7 @@ All examples in [examples/extensions/](../examples/extensions/). | `custom-provider-gitlab-duo/` | GitLab Duo integration | `registerProvider` with OAuth | | **Messages & Communication** | | | | `message-renderer.ts` | Custom message rendering | `registerMessageRenderer`, `sendMessage` | -| `event-bus.ts` | Inter-extension events | `companion.events` | +| `event-bus.ts` | Inter-extension events | `clanker.events` | | **Session Metadata** | | | | `session-name.ts` | Name sessions for selector | `setSessionName`, `getSessionName` | | `bookmark.ts` | Bookmark entries for /tree | `setLabel` | diff --git a/packages/coding-agent/docs/json.md b/packages/coding-agent/docs/json.md index 16191cb..67d9274 100644 --- a/packages/coding-agent/docs/json.md +++ b/packages/coding-agent/docs/json.md @@ -1,14 +1,14 @@ # JSON Event Stream Mode ```bash -companion --mode json "Your prompt" +clanker --mode json "Your prompt" ``` -Outputs all session events as JSON lines to stdout. Useful for integrating companion into other tools or custom UIs. +Outputs all session events as JSON lines to stdout. Useful for integrating clanker into other tools or custom UIs. ## Event Types -Events are defined in [`AgentSessionEvent`](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/agent-session.ts#L102): +Events are defined in [`AgentSessionEvent`](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/agent-session.ts#L102): ```typescript type AgentSessionEvent = @@ -36,7 +36,7 @@ type AgentSessionEvent = }; ``` -Base events from [`AgentEvent`](https://github.com/badlogic/companion-mono/blob/main/packages/agent/src/types.ts#L179): +Base events from [`AgentEvent`](https://github.com/badlogic/clanker-agent/blob/main/packages/agent/src/types.ts#L179): ```typescript type AgentEvent = @@ -83,13 +83,13 @@ type AgentEvent = ## Message Types -Base messages from [`packages/ai/src/types.ts`](https://github.com/badlogic/companion-mono/blob/main/packages/ai/src/types.ts#L134): +Base messages from [`packages/ai/src/types.ts`](https://github.com/badlogic/clanker-agent/blob/main/packages/ai/src/types.ts#L134): - `UserMessage` (line 134) - `AssistantMessage` (line 140) - `ToolResultMessage` (line 152) -Extended messages from [`packages/coding-agent/src/core/messages.ts`](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/messages.ts#L29): +Extended messages from [`packages/coding-agent/src/core/messages.ts`](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/messages.ts#L29): - `BashExecutionMessage` (line 29) - `CustomMessage` (line 46) @@ -125,5 +125,5 @@ Followed by events as they occur: ## Example ```bash -companion --mode json "List files" 2>/dev/null | jq -c 'select(.type == "message_end")' +clanker --mode json "List files" 2>/dev/null | jq -c 'select(.type == "message_end")' ``` diff --git a/packages/coding-agent/docs/keybindings.md b/packages/coding-agent/docs/keybindings.md index 0713545..7d38ffc 100644 --- a/packages/coding-agent/docs/keybindings.md +++ b/packages/coding-agent/docs/keybindings.md @@ -1,6 +1,6 @@ # Keybindings -All keyboard shortcuts can be customized via `~/.companion/agent/keybindings.json`. Each action can be bound to one or more keys. +All keyboard shortcuts can be customized via `~/.clanker/agent/keybindings.json`. Each action can be bound to one or more keys. ## Key Format @@ -132,7 +132,7 @@ Modifier combinations: `ctrl+shift+x`, `alt+ctrl+x`, `ctrl+shift+alt+x`, etc. ## Custom Configuration -Create `~/.companion/agent/keybindings.json`: +Create `~/.clanker/agent/keybindings.json`: ```json { diff --git a/packages/coding-agent/docs/models.md b/packages/coding-agent/docs/models.md index f35a624..bd6d8e2 100644 --- a/packages/coding-agent/docs/models.md +++ b/packages/coding-agent/docs/models.md @@ -1,6 +1,6 @@ # Custom Models -Add custom providers and models (Ollama, vLLM, LM Studio, proxies) via `~/.companion/agent/models.json`. +Add custom providers and models (Ollama, vLLM, LM Studio, proxies) via `~/.clanker/agent/models.json`. ## Table of Contents diff --git a/packages/coding-agent/docs/packages.md b/packages/coding-agent/docs/packages.md index 85d8fc5..f423c17 100644 --- a/packages/coding-agent/docs/packages.md +++ b/packages/coding-agent/docs/packages.md @@ -1,14 +1,14 @@ -> companion can help you create companion packages. Ask it to bundle your extensions, skills, prompt templates, or themes. +> clanker can help you create clanker packages. Ask it to bundle your extensions, skills, prompt templates, or themes. -# Companion Packages +# Clanker Packages -Companion packages bundle extensions, skills, prompt templates, and themes so you can share them through npm or git. A package can declare resources in `package.json` under the `companion` key, or use conventional directories. +Clanker packages bundle extensions, skills, prompt templates, and themes so you can share them through npm or git. A package can declare resources in `package.json` under the `clanker` key, or use conventional directories. ## Table of Contents - [Install and Manage](#install-and-manage) - [Package Sources](#package-sources) -- [Creating a Companion Package](#creating-a-companion-package) +- [Creating a Clanker Package](#creating-a-clanker-package) - [Package Structure](#package-structure) - [Dependencies](#dependencies) - [Package Filtering](#package-filtering) @@ -17,32 +17,32 @@ Companion packages bundle extensions, skills, prompt templates, and themes so yo ## Install and Manage -> **Security:** Companion packages run with full system access. Extensions execute arbitrary code, and skills can instruct the model to perform any action including running executables. Review source code before installing third-party packages. +> **Security:** Clanker packages run with full system access. Extensions execute arbitrary code, and skills can instruct the model to perform any action including running executables. Review source code before installing third-party packages. ```bash -companion install npm:@foo/bar@1.0.0 -companion install git:github.com/user/repo@v1 -companion install https://github.com/user/repo # raw URLs work too -companion install /absolute/path/to/package -companion install ./relative/path/to/package +clanker install npm:@foo/bar@1.0.0 +clanker install git:github.com/user/repo@v1 +clanker install https://github.com/user/repo # raw URLs work too +clanker install /absolute/path/to/package +clanker install ./relative/path/to/package -companion remove npm:@foo/bar -companion list # show installed packages from settings -companion update # update all non-pinned packages +clanker remove npm:@foo/bar +clanker list # show installed packages from settings +clanker update # update all non-pinned packages ``` -By default, `install` and `remove` write to global settings (`~/.companion/agent/settings.json`). Use `-l` to write to project settings (`.companion/settings.json`) instead. Project settings can be shared with your team, and companion installs any missing packages automatically on startup. +By default, `install` and `remove` write to global settings (`~/.clanker/agent/settings.json`). Use `-l` to write to project settings (`.clanker/settings.json`) instead. Project settings can be shared with your team, and clanker installs any missing packages automatically on startup. To try a package without installing it, use `--extension` or `-e`. This installs to a temporary directory for the current run only: ```bash -companion -e npm:@foo/bar -companion -e git:github.com/user/repo +clanker -e npm:@foo/bar +clanker -e git:github.com/user/repo ``` ## Package Sources -Companion accepts three source types in settings and `companion install`. +Clanker accepts three source types in settings and `clanker install`. ### npm @@ -51,9 +51,9 @@ npm:@scope/pkg@1.2.3 npm:pkg ``` -- Versioned specs are pinned and skipped by `companion update`. +- Versioned specs are pinned and skipped by `clanker update`. - Global installs use `npm install -g`. -- Project installs go under `.companion/npm/`. +- Project installs go under `.clanker/npm/`. ### git @@ -69,21 +69,21 @@ ssh://git@github.com/user/repo@v1 - HTTPS and SSH URLs are both supported. - SSH URLs use your configured SSH keys automatically (respects `~/.ssh/config`). - For non-interactive runs (for example CI), you can set `GIT_TERMINAL_PROMPT=0` to disable credential prompts and set `GIT_SSH_COMMAND` (for example `ssh -o BatchMode=yes -o ConnectTimeout=5`) to fail fast. -- Refs pin the package and skip `companion update`. -- Cloned to `~/.companion/agent/git//` (global) or `.companion/git//` (project). +- Refs pin the package and skip `clanker update`. +- Cloned to `~/.clanker/agent/git//` (global) or `.clanker/git//` (project). - Runs `npm install` after clone or pull if `package.json` exists. **SSH examples:** ```bash # git@host:path shorthand (requires git: prefix) -companion install git:git@github.com:user/repo +clanker install git:git@github.com:user/repo # ssh:// protocol format -companion install ssh://git@github.com/user/repo +clanker install ssh://git@github.com/user/repo # With version ref -companion install git:git@github.com:user/repo@v1.0.0 +clanker install git:git@github.com:user/repo@v1.0.0 ``` ### Local Paths @@ -93,17 +93,17 @@ companion install git:git@github.com:user/repo@v1.0.0 ./relative/path/to/package ``` -Local paths point to files or directories on disk and are added to settings without copying. Relative paths are resolved against the settings file they appear in. If the path is a file, it loads as a single extension. If it is a directory, companion loads resources using package rules. +Local paths point to files or directories on disk and are added to settings without copying. Relative paths are resolved against the settings file they appear in. If the path is a file, it loads as a single extension. If it is a directory, clanker loads resources using package rules. -## Creating a Companion Package +## Creating a Clanker Package -Add a `companion` manifest to `package.json` or use conventional directories. Include the `companion-package` keyword for discoverability. +Add a `clanker` manifest to `package.json` or use conventional directories. Include the `clanker-package` keyword for discoverability. ```json { "name": "my-package", - "keywords": ["companion-package"], - "companion": { + "keywords": ["clanker-package"], + "clanker": { "extensions": ["./extensions"], "skills": ["./skills"], "prompts": ["./prompts"], @@ -116,13 +116,13 @@ Paths are relative to the package root. Arrays support glob patterns and `!exclu ### Gallery Metadata -The [package gallery](https://shittycodingagent.ai/packages) displays packages tagged with `companion-package`. Add `video` or `image` fields to show a preview: +The [package gallery](https://clanker.dev/packages) displays packages tagged with `clanker-package`. Add `video` or `image` fields to show a preview: ```json { "name": "my-package", - "keywords": ["companion-package"], - "companion": { + "keywords": ["clanker-package"], + "clanker": { "extensions": ["./extensions"], "video": "https://example.com/demo.mp4", "image": "https://example.com/screenshot.png" @@ -139,7 +139,7 @@ If both are set, video takes precedence. ### Convention Directories -If no `companion` manifest is present, companion auto-discovers resources from these directories: +If no `clanker` manifest is present, clanker auto-discovers resources from these directories: - `extensions/` loads `.ts` and `.js` files - `skills/` recursively finds `SKILL.md` folders and loads top-level `.md` files as skills @@ -148,11 +148,11 @@ If no `companion` manifest is present, companion auto-discovers resources from t ## Dependencies -Third party runtime dependencies belong in `dependencies` in `package.json`. Dependencies that do not register extensions, skills, prompt templates, or themes also belong in `dependencies`. When companion installs a package from npm or git, it runs `npm install`, so those dependencies are installed automatically. +Third party runtime dependencies belong in `dependencies` in `package.json`. Dependencies that do not register extensions, skills, prompt templates, or themes also belong in `dependencies`. When clanker installs a package from npm or git, it runs `npm install`, so those dependencies are installed automatically. -Companion bundles core packages for extensions and skills. If you import any of these, list them in `peerDependencies` with a `"*"` range and do not bundle them: `@mariozechner/companion-ai`, `@mariozechner/companion-agent-core`, `@mariozechner/companion-coding-agent`, `@mariozechner/companion-tui`, `@sinclair/typebox`. +Clanker bundles core packages for extensions and skills. If you import any of these, list them in `peerDependencies` with a `"*"` range and do not bundle them: `@mariozechner/clanker-ai`, `@mariozechner/clanker-agent-core`, `@mariozechner/clanker-coding-agent`, `@mariozechner/clanker-tui`, `@sinclair/typebox`. -Other companion packages must be bundled in your tarball. Add them to `dependencies` and `bundledDependencies`, then reference their resources through `node_modules/` paths. Companion loads packages with separate module roots, so separate installs do not collide or share modules. +Other clanker packages must be bundled in your tarball. Add them to `dependencies` and `bundledDependencies`, then reference their resources through `node_modules/` paths. Clanker loads packages with separate module roots, so separate installs do not collide or share modules. Example: @@ -162,7 +162,7 @@ Example: "shitty-extensions": "^1.0.1" }, "bundledDependencies": ["shitty-extensions"], - "companion": { + "clanker": { "extensions": ["extensions", "node_modules/shitty-extensions/extensions"], "skills": ["skills", "node_modules/shitty-extensions/skills"] } @@ -199,7 +199,7 @@ Filter what a package loads using the object form in settings: ## Enable and Disable Resources -Use `companion config` to enable or disable extensions, skills, prompt templates, and themes from installed packages and local directories. Works for both global (`~/.companion/agent`) and project (`.companion/`) scopes. +Use `clanker config` to enable or disable extensions, skills, prompt templates, and themes from installed packages and local directories. Works for both global (`~/.clanker/agent`) and project (`.clanker/`) scopes. ## Scope and Deduplication diff --git a/packages/coding-agent/docs/prompt-templates.md b/packages/coding-agent/docs/prompt-templates.md index 6dbe903..5ffad5e 100644 --- a/packages/coding-agent/docs/prompt-templates.md +++ b/packages/coding-agent/docs/prompt-templates.md @@ -1,4 +1,4 @@ -> companion can create prompt templates. Ask it to build one for your workflow. +> clanker can create prompt templates. Ask it to build one for your workflow. # Prompt Templates @@ -6,11 +6,11 @@ Prompt templates are Markdown snippets that expand into full prompts. Type `/nam ## Locations -Companion loads prompt templates from: +Clanker loads prompt templates from: -- Global: `~/.companion/agent/prompts/*.md` -- Project: `.companion/prompts/*.md` -- Packages: `prompts/` directories or `companion.prompts` entries in `package.json` +- Global: `~/.clanker/agent/prompts/*.md` +- Project: `.clanker/prompts/*.md` +- Packages: `prompts/` directories or `clanker.prompts` entries in `package.json` - Settings: `prompts` array with files or directories - CLI: `--prompt-template ` (repeatable) diff --git a/packages/coding-agent/docs/providers.md b/packages/coding-agent/docs/providers.md index d190306..9b7ff64 100644 --- a/packages/coding-agent/docs/providers.md +++ b/packages/coding-agent/docs/providers.md @@ -1,6 +1,6 @@ # Providers -Companion supports subscription-based providers via OAuth and API key providers via environment variables or auth file. For each provider, companion knows all available models. The list is updated with every companion release. +Clanker supports subscription-based providers via OAuth and API key providers via environment variables or auth file. For each provider, clanker knows all available models. The list is updated with every clanker release. ## Table of Contents @@ -21,7 +21,7 @@ Use `/login` in interactive mode, then select a provider: - Google Gemini CLI - Google Antigravity -Use `/logout` to clear credentials. Tokens are stored in `~/.companion/agent/auth.json` and auto-refresh when expired. +Use `/logout` to clear credentials. Tokens are stored in `~/.clanker/agent/auth.json` and auto-refresh when expired. ### GitHub Copilot @@ -48,7 +48,7 @@ Set via environment variable: ```bash export ANTHROPIC_API_KEY=sk-ant-... -companion +clanker ``` | Provider | Environment Variable | `auth.json` key | @@ -71,11 +71,11 @@ companion | MiniMax | `MINIMAX_API_KEY` | `minimax` | | MiniMax (China) | `MINIMAX_CN_API_KEY` | `minimax-cn` | -Reference for environment variables and `auth.json` keys: [`const envMap`](https://github.com/badlogic/companion-mono/blob/main/packages/ai/src/env-api-keys.ts) in [`packages/ai/src/env-api-keys.ts`](https://github.com/badlogic/companion-mono/blob/main/packages/ai/src/env-api-keys.ts). +Reference for environment variables and `auth.json` keys: [`const envMap`](https://github.com/badlogic/clanker-agent/blob/main/packages/ai/src/env-api-keys.ts) in [`packages/ai/src/env-api-keys.ts`](https://github.com/badlogic/clanker-agent/blob/main/packages/ai/src/env-api-keys.ts). #### Auth File -Store credentials in `~/.companion/agent/auth.json`: +Store credentials in `~/.clanker/agent/auth.json`: ```json { @@ -144,7 +144,7 @@ export AWS_REGION=us-west-2 Also supports ECS task roles (`AWS_CONTAINER_CREDENTIALS_*`) and IRSA (`AWS_WEB_IDENTITY_TOKEN_FILE`). ```bash -companion --provider amazon-bedrock --model us.anthropic.claude-sonnet-4-20250514-v1:0 +clanker --provider amazon-bedrock --model us.anthropic.claude-sonnet-4-20250514-v1:0 ``` If you are connecting to a Bedrock API proxy, the following environment variables can be used: diff --git a/packages/coding-agent/docs/rpc.md b/packages/coding-agent/docs/rpc.md index 8686e8e..ffd8b60 100644 --- a/packages/coding-agent/docs/rpc.md +++ b/packages/coding-agent/docs/rpc.md @@ -2,12 +2,12 @@ RPC mode enables headless operation of the coding agent via a JSON protocol over stdin/stdout. This is useful for embedding the agent in other applications, IDEs, or custom UIs. -**Note for Node.js/TypeScript users**: If you're building a Node.js application, consider using `AgentSession` directly from `@mariozechner/companion-coding-agent` instead of spawning a subprocess. See [`src/core/agent-session.ts`](../src/core/agent-session.ts) for the API. For a subprocess-based TypeScript client, see [`src/modes/rpc/rpc-client.ts`](../src/modes/rpc/rpc-client.ts). +**Note for Node.js/TypeScript users**: If you're building a Node.js application, consider using `AgentSession` directly from `@mariozechner/clanker-coding-agent` instead of spawning a subprocess. See [`src/core/agent-session.ts`](../src/core/agent-session.ts) for the API. For a subprocess-based TypeScript client, see [`src/modes/rpc/rpc-client.ts`](../src/modes/rpc/rpc-client.ts). ## Starting RPC Mode ```bash -companion --mode rpc [options] +clanker --mode rpc [options] ``` Common options: @@ -60,7 +60,7 @@ With images: If the agent is streaming and no `streamingBehavior` is specified, the command returns an error. -**Extension commands**: If the message is an extension command (e.g., `/mycommand`), it executes immediately even during streaming. Extension commands manage their own LLM interaction via `companion.sendMessage()`. +**Extension commands**: If the message is an extension command (e.g., `/mycommand`), it executes immediately even during streaming. Extension commands manage their own LLM interaction via `clanker.sendMessage()`. **Input expansion**: Skill commands (`/skill:name`) and prompt templates (`/template`) are expanded before sending/queueing. @@ -503,7 +503,7 @@ If output was truncated, includes `fullOutputPath`: "exitCode": 0, "cancelled": false, "truncated": true, - "fullOutputPath": "/tmp/companion-bash-abc123.log" + "fullOutputPath": "/tmp/clanker-bash-abc123.log" } } ``` @@ -752,21 +752,21 @@ Response: "name": "session-name", "description": "Set or clear session name", "source": "extension", - "path": "/home/user/.companion/agent/extensions/session.ts" + "path": "/home/user/.clanker/agent/extensions/session.ts" }, { "name": "fix-tests", "description": "Fix failing tests", "source": "prompt", "location": "project", - "path": "/home/user/myproject/.companion/agent/prompts/fix-tests.md" + "path": "/home/user/myproject/.clanker/agent/prompts/fix-tests.md" }, { "name": "skill:brave-search", "description": "Web search via Brave API", "source": "skill", "location": "user", - "path": "/home/user/.companion/agent/skills/brave-search/SKILL.md" + "path": "/home/user/.clanker/agent/skills/brave-search/SKILL.md" } ] } @@ -778,12 +778,12 @@ Each command has: - `name`: Command name (invoke with `/name`) - `description`: Human-readable description (optional for extension commands) - `source`: What kind of command: - - `"extension"`: Registered via `companion.registerCommand()` in an extension + - `"extension"`: Registered via `clanker.registerCommand()` in an extension - `"prompt"`: Loaded from a prompt template `.md` file - `"skill"`: Loaded from a skill directory (name is prefixed with `skill:`) - `location`: Where it was loaded from (optional, not present for extensions): - - `"user"`: User-level (`~/.companion/agent/`) - - `"project"`: Project-level (`./.companion/agent/`) + - `"user"`: User-level (`~/.clanker/agent/`) + - `"project"`: Project-level (`./.clanker/agent/`) - `"path"`: Explicit path via CLI or settings - `path`: Absolute file path to the command source (optional) @@ -1173,7 +1173,7 @@ Set the terminal window/tab title. Fire-and-forget. "type": "extension_ui_request", "id": "uuid-8", "method": "setTitle", - "title": "companion - my project" + "title": "clanker - my project" } ``` @@ -1372,7 +1372,7 @@ import subprocess import json proc = subprocess.Popen( - ["companion", "--mode", "rpc", "--no-session"], + ["clanker", "--mode", "rpc", "--no-session"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, text=True @@ -1411,7 +1411,7 @@ For a complete example of handling the extension UI protocol, see [`examples/rpc const { spawn } = require("child_process"); const readline = require("readline"); -const agent = spawn("companion", ["--mode", "rpc", "--no-session"]); +const agent = spawn("clanker", ["--mode", "rpc", "--no-session"]); readline.createInterface({ input: agent.stdout }).on("line", (line) => { const event = JSON.parse(line); diff --git a/packages/coding-agent/docs/sdk.md b/packages/coding-agent/docs/sdk.md index cfcfb0f..b561be1 100644 --- a/packages/coding-agent/docs/sdk.md +++ b/packages/coding-agent/docs/sdk.md @@ -1,8 +1,8 @@ -> companion can help you use the SDK. Ask it to build an integration for your use case. +> clanker can help you use the SDK. Ask it to build an integration for your use case. # SDK -The SDK provides programmatic access to companion's agent capabilities. Use it to embed companion in other applications, build custom interfaces, or integrate with automated workflows. +The SDK provides programmatic access to clanker's agent capabilities. Use it to embed clanker in other applications, build custom interfaces, or integrate with automated workflows. **Example use cases:** @@ -22,7 +22,7 @@ import { createAgentSession, ModelRegistry, SessionManager, -} from "@mariozechner/companion-coding-agent"; +} from "@mariozechner/clanker-coding-agent"; // Set up credential storage and model registry const authStorage = AuthStorage.create(); @@ -49,7 +49,7 @@ await session.prompt("What files are in the current directory?"); ## Installation ```bash -npm install @mariozechner/companion-coding-agent +npm install @mariozechner/clanker-coding-agent ``` The SDK is included in the main package. No separate installation needed. @@ -63,7 +63,7 @@ The main factory function. Creates an `AgentSession` with configurable options. `createAgentSession()` uses a `ResourceLoader` to supply extensions, skills, prompt templates, themes, and context files. If you do not provide one, it uses `DefaultResourceLoader` with standard discovery. ```typescript -import { createAgentSession } from "@mariozechner/companion-coding-agent"; +import { createAgentSession } from "@mariozechner/clanker-coding-agent"; // Minimal: defaults with DefaultResourceLoader const { session } = await createAgentSession(); @@ -170,7 +170,7 @@ await session.prompt("After you're done, also check X", { **Behavior:** -- **Extension commands** (e.g., `/mycommand`): Execute immediately, even during streaming. They manage their own LLM interaction via `companion.sendMessage()`. +- **Extension commands** (e.g., `/mycommand`): Execute immediately, even during streaming. They manage their own LLM interaction via `clanker.sendMessage()`. - **File-based prompt templates** (from `.md` files): Expanded to their content before sending/queueing. - **During streaming without `streamingBehavior`**: Throws an error. Use `steer()` or `followUp()` directly, or specify the option. @@ -188,7 +188,7 @@ Both `steer()` and `followUp()` expand file-based prompt templates but error on ### Agent and AgentState -The `Agent` class (from `@mariozechner/companion-agent-core`) handles the core LLM interaction. Access it via `session.agent`. +The `Agent` class (from `@mariozechner/clanker-agent-core`) handles the core LLM interaction. Access it via `session.agent`. ```typescript // Access current state @@ -279,17 +279,17 @@ const { session } = await createAgentSession({ cwd: process.cwd(), // default // Global config directory - agentDir: "~/.companion/agent", // default (expands ~) + agentDir: "~/.clanker/agent", // default (expands ~) }); ``` `cwd` is used by `DefaultResourceLoader` for: -- Project extensions (`.companion/extensions/`) +- Project extensions (`.clanker/extensions/`) - Project skills: - - `.companion/skills/` + - `.clanker/skills/` - `.agents/skills/` in `cwd` and ancestor directories (up to git repo root, or filesystem root when not in a repo) -- Project prompts (`.companion/prompts/`) +- Project prompts (`.clanker/prompts/`) - Context files (`AGENTS.md` walking up from cwd) - Session directory naming @@ -297,7 +297,7 @@ const { session } = await createAgentSession({ - Global extensions (`extensions/`) - Global skills: - - `skills/` under `agentDir` (for example `~/.companion/agent/skills/`) + - `skills/` under `agentDir` (for example `~/.clanker/agent/skills/`) - `~/.agents/skills/` - Global prompts (`prompts/`) - Global context file (`AGENTS.md`) @@ -311,8 +311,8 @@ When you pass a custom `ResourceLoader`, `cwd` and `agentDir` no longer control ### Model ```typescript -import { getModel } from "@mariozechner/companion-ai"; -import { AuthStorage, ModelRegistry } from "@mariozechner/companion-coding-agent"; +import { getModel } from "@mariozechner/clanker-ai"; +import { AuthStorage, ModelRegistry } from "@mariozechner/clanker-coding-agent"; const authStorage = AuthStorage.create(); const modelRegistry = new ModelRegistry(authStorage); @@ -359,9 +359,9 @@ API key resolution priority (handled by AuthStorage): 4. Fallback resolver (for custom provider keys from `models.json`) ```typescript -import { AuthStorage, ModelRegistry } from "@mariozechner/companion-coding-agent"; +import { AuthStorage, ModelRegistry } from "@mariozechner/clanker-coding-agent"; -// Default: uses ~/.companion/agent/auth.json and ~/.companion/agent/models.json +// Default: uses ~/.clanker/agent/auth.json and ~/.clanker/agent/models.json const authStorage = AuthStorage.create(); const modelRegistry = new ModelRegistry(authStorage); @@ -396,7 +396,7 @@ Use a `ResourceLoader` to override the system prompt: import { createAgentSession, DefaultResourceLoader, -} from "@mariozechner/companion-coding-agent"; +} from "@mariozechner/clanker-coding-agent"; const loader = new DefaultResourceLoader({ systemPromptOverride: () => "You are a helpful assistant.", @@ -419,7 +419,7 @@ import { grepTool, findTool, lsTool, -} from "@mariozechner/companion-coding-agent"; +} from "@mariozechner/clanker-coding-agent"; // Use built-in tool set const { session } = await createAgentSession({ @@ -447,7 +447,7 @@ import { createGrepTool, createFindTool, createLsTool, -} from "@mariozechner/companion-coding-agent"; +} from "@mariozechner/clanker-coding-agent"; const cwd = "/path/to/project"; @@ -466,7 +466,7 @@ const { session } = await createAgentSession({ **When you don't need factories:** -- If you omit `tools`, companion automatically creates them with the correct `cwd` +- If you omit `tools`, clanker automatically creates them with the correct `cwd` - If you use `process.cwd()` as your `cwd`, the pre-built instances work fine **When you must use factories:** @@ -480,7 +480,7 @@ import { Type } from "@sinclair/typebox"; import { createAgentSession, type ToolDefinition, -} from "@mariozechner/companion-coding-agent"; +} from "@mariozechner/clanker-coding-agent"; // Inline custom tool const myTool: ToolDefinition = { @@ -502,23 +502,23 @@ const { session } = await createAgentSession({ }); ``` -Custom tools passed via `customTools` are combined with extension-registered tools. Extensions loaded by the ResourceLoader can also register tools via `companion.registerTool()`. +Custom tools passed via `customTools` are combined with extension-registered tools. Extensions loaded by the ResourceLoader can also register tools via `clanker.registerTool()`. ### Extensions -Extensions are loaded by the `ResourceLoader`. `DefaultResourceLoader` discovers extensions from `~/.companion/agent/extensions/`, `.companion/extensions/`, and settings.json extension sources. +Extensions are loaded by the `ResourceLoader`. `DefaultResourceLoader` discovers extensions from `~/.clanker/agent/extensions/`, `.clanker/extensions/`, and settings.json extension sources. ```typescript import { createAgentSession, DefaultResourceLoader, -} from "@mariozechner/companion-coding-agent"; +} from "@mariozechner/clanker-coding-agent"; const loader = new DefaultResourceLoader({ additionalExtensionPaths: ["/path/to/my-extension.ts"], extensionFactories: [ - (companion) => { - companion.on("agent_start", () => { + (clanker) => { + clanker.on("agent_start", () => { console.log("[Inline Extension] Agent starting"); }); }, @@ -531,13 +531,13 @@ const { session } = await createAgentSession({ resourceLoader: loader }); Extensions can register tools, subscribe to events, add commands, and more. See [extensions.md](extensions.md) for the full API. -**Event Bus:** Extensions can communicate via `companion.events`. Pass a shared `eventBus` to `DefaultResourceLoader` if you need to emit or listen from outside: +**Event Bus:** Extensions can communicate via `clanker.events`. Pass a shared `eventBus` to `DefaultResourceLoader` if you need to emit or listen from outside: ```typescript import { createEventBus, DefaultResourceLoader, -} from "@mariozechner/companion-coding-agent"; +} from "@mariozechner/clanker-coding-agent"; const eventBus = createEventBus(); const loader = new DefaultResourceLoader({ @@ -555,7 +555,7 @@ import { createAgentSession, DefaultResourceLoader, type Skill, -} from "@mariozechner/companion-coding-agent"; +} from "@mariozechner/clanker-coding-agent"; const customSkill: Skill = { name: "my-skill", @@ -582,7 +582,7 @@ const { session } = await createAgentSession({ resourceLoader: loader }); import { createAgentSession, DefaultResourceLoader, -} from "@mariozechner/companion-coding-agent"; +} from "@mariozechner/clanker-coding-agent"; const loader = new DefaultResourceLoader({ agentsFilesOverride: (current) => ({ @@ -604,7 +604,7 @@ import { createAgentSession, DefaultResourceLoader, type PromptTemplate, -} from "@mariozechner/companion-coding-agent"; +} from "@mariozechner/clanker-coding-agent"; const customCommand: PromptTemplate = { name: "deploy", @@ -632,7 +632,7 @@ Sessions use a tree structure with `id`/`parentId` linking, enabling in-place br import { createAgentSession, SessionManager, -} from "@mariozechner/companion-coding-agent"; +} from "@mariozechner/clanker-coding-agent"; // In-memory (no persistence) const { session } = await createAgentSession({ @@ -707,7 +707,7 @@ import { createAgentSession, SettingsManager, SessionManager, -} from "@mariozechner/companion-coding-agent"; +} from "@mariozechner/clanker-coding-agent"; // Default: loads from files (global + project merged) const { session } = await createAgentSession({ @@ -743,8 +743,8 @@ const { session } = await createAgentSession({ Settings load from two locations and merge: -1. Global: `~/.companion/agent/settings.json` -2. Project: `/.companion/settings.json` +1. Global: `~/.clanker/agent/settings.json` +2. Project: `/.clanker/settings.json` Project overrides global. Nested objects merge keys. Setters modify global settings by default. @@ -763,7 +763,7 @@ Use `DefaultResourceLoader` to discover extensions, skills, prompts, themes, and import { DefaultResourceLoader, getAgentDir, -} from "@mariozechner/companion-coding-agent"; +} from "@mariozechner/clanker-coding-agent"; const loader = new DefaultResourceLoader({ cwd, @@ -804,7 +804,7 @@ interface LoadExtensionsResult { ## Complete Example ```typescript -import { getModel } from "@mariozechner/companion-ai"; +import { getModel } from "@mariozechner/clanker-ai"; import { Type } from "@sinclair/typebox"; import { AuthStorage, @@ -816,7 +816,7 @@ import { readTool, bashTool, type ToolDefinition, -} from "@mariozechner/companion-coding-agent"; +} from "@mariozechner/clanker-coding-agent"; // Set up auth storage (custom location) const authStorage = AuthStorage.create("/custom/agent/auth.json"); @@ -899,7 +899,7 @@ Full TUI interactive mode with editor, chat history, and all built-in commands: import { createAgentSession, InteractiveMode, -} from "@mariozechner/companion-coding-agent"; +} from "@mariozechner/clanker-coding-agent"; const { session } = await createAgentSession({ /* ... */ @@ -925,7 +925,7 @@ Single-shot mode: send prompts, output result, exit: import { createAgentSession, runPrintMode, -} from "@mariozechner/companion-coding-agent"; +} from "@mariozechner/clanker-coding-agent"; const { session } = await createAgentSession({ /* ... */ @@ -944,7 +944,7 @@ await runPrintMode(session, { JSON-RPC mode for subprocess integration: ```typescript -import { createAgentSession, runRpcMode } from "@mariozechner/companion-coding-agent"; +import { createAgentSession, runRpcMode } from "@mariozechner/clanker-coding-agent"; const { session } = await createAgentSession({ /* ... */ @@ -960,7 +960,7 @@ See [RPC documentation](rpc.md) for the JSON protocol. For subprocess-based integration without building with the SDK, use the CLI directly: ```bash -companion --mode rpc --no-session +clanker --mode rpc --no-session ``` See [RPC documentation](rpc.md) for the JSON protocol. diff --git a/packages/coding-agent/docs/session.md b/packages/coding-agent/docs/session.md index b4d5d27..2f929aa 100644 --- a/packages/coding-agent/docs/session.md +++ b/packages/coding-agent/docs/session.md @@ -5,16 +5,16 @@ Sessions are stored as JSONL (JSON Lines) files. Each line is a JSON object with ## File Location ``` -~/.companion/agent/sessions/----/_.jsonl +~/.clanker/agent/sessions/----/_.jsonl ``` Where `` is the working directory with `/` replaced by `-`. ## Deleting Sessions -Sessions can be removed by deleting their `.jsonl` files under `~/.companion/agent/sessions/`. +Sessions can be removed by deleting their `.jsonl` files under `~/.clanker/agent/sessions/`. -Companion also supports deleting sessions interactively from `/resume` (select a session and press `Ctrl+D`, then confirm). When available, companion uses the `trash` CLI to avoid permanent deletion. +Clanker also supports deleting sessions interactively from `/resume` (select a session and press `Ctrl+D`, then confirm). When available, clanker uses the `trash` CLI to avoid permanent deletion. ## Session Version @@ -28,14 +28,14 @@ Existing sessions are automatically migrated to the current version (v3) when lo ## Source Files -Source on GitHub ([companion-mono](https://github.com/badlogic/companion-mono)): +Source on GitHub ([clanker-agent](https://github.com/badlogic/clanker-agent)): -- [`packages/coding-agent/src/core/session-manager.ts`](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/session-manager.ts) - Session entry types and SessionManager -- [`packages/coding-agent/src/core/messages.ts`](https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/src/core/messages.ts) - Extended message types (BashExecutionMessage, CustomMessage, etc.) -- [`packages/ai/src/types.ts`](https://github.com/badlogic/companion-mono/blob/main/packages/ai/src/types.ts) - Base message types (UserMessage, AssistantMessage, ToolResultMessage) -- [`packages/agent/src/types.ts`](https://github.com/badlogic/companion-mono/blob/main/packages/agent/src/types.ts) - AgentMessage union type +- [`packages/coding-agent/src/core/session-manager.ts`](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/session-manager.ts) - Session entry types and SessionManager +- [`packages/coding-agent/src/core/messages.ts`](https://github.com/badlogic/clanker-agent/blob/main/packages/coding-agent/src/core/messages.ts) - Extended message types (BashExecutionMessage, CustomMessage, etc.) +- [`packages/ai/src/types.ts`](https://github.com/badlogic/clanker-agent/blob/main/packages/ai/src/types.ts) - Base message types (UserMessage, AssistantMessage, ToolResultMessage) +- [`packages/agent/src/types.ts`](https://github.com/badlogic/clanker-agent/blob/main/packages/agent/src/types.ts) - AgentMessage union type -For TypeScript definitions in your project, inspect `node_modules/@mariozechner/companion-coding-agent/dist/` and `node_modules/@mariozechner/companion-ai/dist/`. +For TypeScript definitions in your project, inspect `node_modules/@mariozechner/clanker-coding-agent/dist/` and `node_modules/@mariozechner/clanker-ai/dist/`. ## Message Types @@ -70,7 +70,7 @@ interface ToolCall { } ``` -### Base Message Types (from companion-ai) +### Base Message Types (from clanker-ai) ```typescript interface UserMessage { @@ -117,7 +117,7 @@ interface Usage { } ``` -### Extended Message Types (from companion-coding-agent) +### Extended Message Types (from clanker-coding-agent) ```typescript interface BashExecutionMessage { @@ -269,7 +269,7 @@ Created when context is compacted. Stores a summary of earlier messages. Optional fields: - `details`: Implementation-specific data (e.g., `{ readFiles: string[], modifiedFiles: string[] }` for default, or custom data for extensions) -- `fromHook`: `true` if generated by an extension, `false`/`undefined` if companion-generated (legacy field name) +- `fromHook`: `true` if generated by an extension, `false`/`undefined` if clanker-generated (legacy field name) ### BranchSummaryEntry @@ -289,7 +289,7 @@ Created when switching branches via `/tree` with an LLM generated summary of the Optional fields: - `details`: File tracking data (`{ readFiles: string[], modifiedFiles: string[] }`) for default, or custom data for extensions -- `fromHook`: `true` if generated by an extension, `false`/`undefined` if companion-generated (legacy field name) +- `fromHook`: `true` if generated by an extension, `false`/`undefined` if clanker-generated (legacy field name) ### CustomEntry @@ -349,7 +349,7 @@ Set `label` to `undefined` to clear a label. ### SessionInfoEntry -Session metadata (e.g., user-defined display name). Set via `/name` command or `companion.setSessionName()` in extensions. +Session metadata (e.g., user-defined display name). Set via `/name` command or `clanker.setSessionName()` in extensions. ```json { diff --git a/packages/coding-agent/docs/settings.md b/packages/coding-agent/docs/settings.md index 8dc04eb..08c3f19 100644 --- a/packages/coding-agent/docs/settings.md +++ b/packages/coding-agent/docs/settings.md @@ -1,11 +1,11 @@ # Settings -Companion uses JSON settings files with project settings overriding global settings. +Clanker uses JSON settings files with project settings overriding global settings. | Location | Scope | | --------------------------- | --------------------------- | -| `~/.companion/agent/settings.json` | Global (all projects) | -| `.companion/settings.json` | Project (current directory) | +| `~/.clanker/agent/settings.json` | Global (all projects) | +| `.clanker/settings.json` | Project (current directory) | Edit directly or use `/settings` for common options. @@ -140,7 +140,7 @@ When a provider requests a retry delay longer than `maxDelayMs` (e.g., Google's These settings define where to load extensions, skills, prompts, and themes from. -Paths in `~/.companion/agent/settings.json` resolve relative to `~/.companion/agent`. Paths in `.companion/settings.json` resolve relative to `.companion`. Absolute paths and `~` are supported. +Paths in `~/.clanker/agent/settings.json` resolve relative to `~/.clanker/agent`. Paths in `.clanker/settings.json` resolve relative to `.clanker`. Absolute paths and `~` are supported. | Setting | Type | Default | Description | | --------------------- | -------- | ------- | ------------------------------------------ | @@ -159,7 +159,7 @@ String form loads all resources from a package: ```json { - "packages": ["companion-skills", "@org/my-extension"] + "packages": ["clanker-skills", "@org/my-extension"] } ``` @@ -169,7 +169,7 @@ Object form filters which resources to load: { "packages": [ { - "source": "companion-skills", + "source": "clanker-skills", "skills": ["brave-search", "transcribe"], "extensions": [] } @@ -197,22 +197,22 @@ See [packages.md](packages.md) for package management details. "maxRetries": 3 }, "enabledModels": ["claude-*", "gpt-4o"], - "packages": ["companion-skills"] + "packages": ["clanker-skills"] } ``` ## Project Overrides -Project settings (`.companion/settings.json`) override global settings. Nested objects are merged: +Project settings (`.clanker/settings.json`) override global settings. Nested objects are merged: ```json -// ~/.companion/agent/settings.json (global) +// ~/.clanker/agent/settings.json (global) { "theme": "dark", "compaction": { "enabled": true, "reserveTokens": 16384 } } -// .companion/settings.json (project) +// .clanker/settings.json (project) { "compaction": { "reserveTokens": 8192 } } diff --git a/packages/coding-agent/docs/shell-aliases.md b/packages/coding-agent/docs/shell-aliases.md index 3e014d4..c05e2dc 100644 --- a/packages/coding-agent/docs/shell-aliases.md +++ b/packages/coding-agent/docs/shell-aliases.md @@ -1,8 +1,8 @@ # Shell Aliases -Companion runs bash in non-interactive mode (`bash -c`), which doesn't expand aliases by default. +Clanker runs bash in non-interactive mode (`bash -c`), which doesn't expand aliases by default. -To enable your shell aliases, add to `~/.companion/agent/settings.json`: +To enable your shell aliases, add to `~/.clanker/agent/settings.json`: ```json { diff --git a/packages/coding-agent/docs/skills.md b/packages/coding-agent/docs/skills.md index 0754c08..807efa6 100644 --- a/packages/coding-agent/docs/skills.md +++ b/packages/coding-agent/docs/skills.md @@ -1,10 +1,10 @@ -> companion can create skills. Ask it to build one for your use case. +> clanker can create skills. Ask it to build one for your use case. # Skills Skills are self-contained capability packages that the agent loads on-demand. A skill provides specialized workflows, setup instructions, helper scripts, and reference documentation for specific tasks. -Companion implements the [Agent Skills standard](https://agentskills.io/specification), warning about violations but remaining lenient. +Clanker implements the [Agent Skills standard](https://agentskills.io/specification), warning about violations but remaining lenient. ## Table of Contents @@ -21,15 +21,15 @@ Companion implements the [Agent Skills standard](https://agentskills.io/specific > **Security:** Skills can instruct the model to perform any action and may include executable code the model invokes. Review skill content before use. -Companion loads skills from: +Clanker loads skills from: - Global: - - `~/.companion/agent/skills/` + - `~/.clanker/agent/skills/` - `~/.agents/skills/` - Project: - - `.companion/skills/` + - `.clanker/skills/` - `.agents/skills/` in `cwd` and ancestor directories (up to git repo root, or filesystem root when not in a repo) -- Packages: `skills/` directories or `companion.skills` entries in `package.json` +- Packages: `skills/` directories or `clanker.skills` entries in `package.json` - Settings: `skills` array with files or directories - CLI: `--skill ` (repeatable, additive even with `--no-skills`) @@ -50,7 +50,7 @@ To use skills from Claude Code or OpenAI Codex, add their directories to setting } ``` -For project-level Claude Code skills, add to `.companion/settings.json`: +For project-level Claude Code skills, add to `.clanker/settings.json`: ```json { @@ -60,7 +60,7 @@ For project-level Claude Code skills, add to `.companion/settings.json`: ## How Skills Work -1. At startup, companion scans skill locations and extracts names and descriptions +1. At startup, clanker scans skill locations and extracts names and descriptions 2. The system prompt includes available skills in XML format per the [specification](https://agentskills.io/integrate-skills) 3. When a task matches, the agent uses `read` to load the full SKILL.md (models don't always do this; use prompting or `/skill:name` to force it) 4. The agent follows the instructions, using relative paths to reference scripts and assets @@ -174,7 +174,7 @@ description: Helps with PDFs. ## Validation -Companion validates skills against the Agent Skills standard. Most issues produce warnings but still load the skill: +Clanker validates skills against the Agent Skills standard. Most issues produce warnings but still load the skill: - Name doesn't match parent directory - Name exceeds 64 characters or contains invalid characters @@ -229,4 +229,4 @@ cd /path/to/brave-search && npm install ## Skill Repositories - [Anthropic Skills](https://github.com/anthropics/skills) - Document processing (docx, pdf, pptx, xlsx), web development -- [Companion Skills](https://github.com/badlogic/companion-skills) - Web search, browser automation, Google APIs, transcription +- [Clanker Skills](https://github.com/badlogic/clanker-skills) - Web search, browser automation, Google APIs, transcription diff --git a/packages/coding-agent/docs/terminal-setup.md b/packages/coding-agent/docs/terminal-setup.md index ccccdc5..7a9cf6f 100644 --- a/packages/coding-agent/docs/terminal-setup.md +++ b/packages/coding-agent/docs/terminal-setup.md @@ -1,6 +1,6 @@ # Terminal Setup -Companion uses the [Kitty keyboard protocol](https://sw.kovidgoyal.net/kitty/keyboard-protocol/) for reliable modifier key detection. Most modern terminals support this protocol, but some require configuration. +Clanker uses the [Kitty keyboard protocol](https://sw.kovidgoyal.net/kitty/keyboard-protocol/) for reliable modifier key detection. Most modern terminals support this protocol, but some require configuration. ## Kitty, iTerm2 @@ -66,6 +66,6 @@ If you already have an `actions` array, add the object to it. The built-in terminal has limited escape sequence support. Shift+Enter cannot be distinguished from Enter in IntelliJ's terminal. -If you want the hardware cursor visible, set `COMPANION_HARDWARE_CURSOR=1` before running companion (disabled by default for compatibility). +If you want the hardware cursor visible, set `CLANKER_HARDWARE_CURSOR=1` before running clanker (disabled by default for compatibility). Consider using a dedicated terminal emulator for the best experience. diff --git a/packages/coding-agent/docs/termux.md b/packages/coding-agent/docs/termux.md index a9b2515..6e96425 100644 --- a/packages/coding-agent/docs/termux.md +++ b/packages/coding-agent/docs/termux.md @@ -1,6 +1,6 @@ # Termux (Android) Setup -Companion runs on Android via [Termux](https://termux.dev/), a terminal emulator and Linux environment for Android. +Clanker runs on Android via [Termux](https://termux.dev/), a terminal emulator and Linux environment for Android. ## Prerequisites @@ -16,14 +16,14 @@ pkg update && pkg upgrade # Install dependencies pkg install nodejs termux-api git -# Install companion -npm install -g @mariozechner/companion-coding-agent +# Install clanker +npm install -g @mariozechner/clanker-coding-agent # Create config directory -mkdir -p ~/.companion/agent +mkdir -p ~/.clanker/agent -# Run companion -companion +# Run clanker +clanker ``` ## Clipboard Support @@ -34,7 +34,7 @@ Image clipboard is not supported on Termux (the `ctrl+v` image paste feature wil ## Example AGENTS.md for Termux -Create `~/.companion/agent/AGENTS.md` to help the agent understand the Termux environment: +Create `~/.clanker/agent/AGENTS.md` to help the agent understand the Termux environment: ````markdown # Agent Environment: Termux on Android diff --git a/packages/coding-agent/docs/themes.md b/packages/coding-agent/docs/themes.md index 42c8c45..307fcbf 100644 --- a/packages/coding-agent/docs/themes.md +++ b/packages/coding-agent/docs/themes.md @@ -1,4 +1,4 @@ -> companion can create themes. Ask it to build one for your setup. +> clanker can create themes. Ask it to build one for your setup. # Themes @@ -16,12 +16,12 @@ Themes are JSON files that define colors for the TUI. ## Locations -Companion loads themes from: +Clanker loads themes from: - Built-in: `dark`, `light` -- Global: `~/.companion/agent/themes/*.json` -- Project: `.companion/themes/*.json` -- Packages: `themes/` directories or `companion.themes` entries in `package.json` +- Global: `~/.clanker/agent/themes/*.json` +- Project: `.clanker/themes/*.json` +- Packages: `themes/` directories or `clanker.themes` entries in `package.json` - Settings: `themes` array with files or directories - CLI: `--theme ` (repeatable) @@ -37,22 +37,22 @@ Select a theme via `/settings` or in `settings.json`: } ``` -On first run, companion detects your terminal background and defaults to `dark` or `light`. +On first run, clanker detects your terminal background and defaults to `dark` or `light`. ## Creating a Custom Theme 1. Create a theme file: ```bash -mkdir -p ~/.companion/agent/themes -vim ~/.companion/agent/themes/my-theme.json +mkdir -p ~/.clanker/agent/themes +vim ~/.clanker/agent/themes/my-theme.json ``` 2. Define the theme with all required colors (see [Color Tokens](#color-tokens)): ```json { - "$schema": "https://raw.githubusercontent.com/badlogic/companion-mono/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json", + "$schema": "https://raw.githubusercontent.com/badlogic/clanker-agent/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json", "name": "my-theme", "vars": { "primary": "#00aaff", @@ -116,13 +116,13 @@ vim ~/.companion/agent/themes/my-theme.json 3. Select the theme via `/settings`. -**Hot reload:** When you edit the currently active custom theme file, companion reloads it automatically for immediate visual feedback. +**Hot reload:** When you edit the currently active custom theme file, clanker reloads it automatically for immediate visual feedback. ## Theme Format ```json { - "$schema": "https://raw.githubusercontent.com/badlogic/companion-mono/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json", + "$schema": "https://raw.githubusercontent.com/badlogic/clanker-agent/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json", "name": "my-theme", "vars": { "blue": "#0066cc", @@ -268,7 +268,7 @@ Four formats are supported: ### Terminal Compatibility -Companion uses 24-bit RGB colors. Most modern terminals support this (iTerm2, Kitty, WezTerm, Windows Terminal, VS Code). For older terminals with only 256-color support, companion falls back to the nearest approximation. +Clanker uses 24-bit RGB colors. Most modern terminals support this (iTerm2, Kitty, WezTerm, Windows Terminal, VS Code). For older terminals with only 256-color support, clanker falls back to the nearest approximation. Check truecolor support: diff --git a/packages/coding-agent/docs/tree.md b/packages/coding-agent/docs/tree.md index 32d94a1..101490a 100644 --- a/packages/coding-agent/docs/tree.md +++ b/packages/coding-agent/docs/tree.md @@ -209,8 +209,8 @@ interface SessionTreeEvent { ### Example: Custom Summarizer ```typescript -export default function (companion: HookAPI) { - companion.on("session_before_tree", async (event, ctx) => { +export default function (clanker: HookAPI) { + clanker.on("session_before_tree", async (event, ctx) => { if (!event.preparation.userWantsSummary) return; if (event.preparation.entriesToSummarize.length === 0) return; diff --git a/packages/coding-agent/docs/tui.md b/packages/coding-agent/docs/tui.md index 8669ac6..248ce81 100644 --- a/packages/coding-agent/docs/tui.md +++ b/packages/coding-agent/docs/tui.md @@ -1,10 +1,10 @@ -> companion can create TUI components. Ask it to build one for your use case. +> clanker can create TUI components. Ask it to build one for your use case. # TUI Components Extensions and custom tools can render custom TUI components for interactive user interfaces. This page covers the component system and available building blocks. -**Source:** [`@mariozechner/companion-tui`](https://github.com/badlogic/companion-mono/tree/main/packages/tui) +**Source:** [`@mariozechner/clanker-tui`](https://github.com/badlogic/clanker-agent/tree/main/packages/tui) ## Component Interface @@ -37,7 +37,7 @@ import { CURSOR_MARKER, type Component, type Focusable, -} from "@mariozechner/companion-tui"; +} from "@mariozechner/clanker-tui"; class MyInput implements Component, Focusable { focused: boolean = false; // Set by TUI when focus changes @@ -66,7 +66,7 @@ This enables IME candidate windows to appear at the correct position for CJK inp When a container component (dialog, selector, etc.) contains an `Input` or `Editor` child, the container must implement `Focusable` and propagate the focus state to the child. Otherwise, the hardware cursor won't be positioned correctly for IME input. ```typescript -import { Container, type Focusable, Input } from "@mariozechner/companion-tui"; +import { Container, type Focusable, Input } from "@mariozechner/clanker-tui"; class SearchDialog extends Container implements Focusable { private searchInput: Input; @@ -96,18 +96,18 @@ Without this propagation, typing with an IME (Chinese, Japanese, Korean, etc.) w **In extensions** via `ctx.ui.custom()`: ```typescript -companion.on("session_start", async (_event, ctx) => { +clanker.on("session_start", async (_event, ctx) => { const handle = ctx.ui.custom(myComponent); // handle.requestRender() - trigger re-render // handle.close() - restore normal UI }); ``` -**In custom tools** via `companion.ui.custom()`: +**In custom tools** via `clanker.ui.custom()`: ```typescript async execute(toolCallId, params, onUpdate, ctx, signal) { - const handle = companion.ui.custom(myComponent); + const handle = clanker.ui.custom(myComponent); // ... handle.close(); } @@ -191,10 +191,10 @@ See [overlay-qa-tests.ts](../examples/extensions/overlay-qa-tests.ts) for compre ## Built-in Components -Import from `@mariozechner/companion-tui`: +Import from `@mariozechner/clanker-tui`: ```typescript -import { Text, Box, Container, Spacer, Markdown } from "@mariozechner/companion-tui"; +import { Text, Box, Container, Spacer, Markdown } from "@mariozechner/clanker-tui"; ``` ### Text @@ -276,7 +276,7 @@ const image = new Image( Use `matchesKey()` for key detection: ```typescript -import { matchesKey, Key } from "@mariozechner/companion-tui"; +import { matchesKey, Key } from "@mariozechner/clanker-tui"; handleInput(data: string) { if (matchesKey(data, Key.up)) { @@ -303,7 +303,7 @@ handleInput(data: string) { **Critical:** Each line from `render()` must not exceed the `width` parameter. ```typescript -import { visibleWidth, truncateToWidth } from "@mariozechner/companion-tui"; +import { visibleWidth, truncateToWidth } from "@mariozechner/clanker-tui"; render(width: number): string[] { // Truncate long lines @@ -327,7 +327,7 @@ import { Key, truncateToWidth, visibleWidth, -} from "@mariozechner/companion-tui"; +} from "@mariozechner/clanker-tui"; class MySelector { private items: string[]; @@ -382,7 +382,7 @@ class MySelector { Usage in an extension: ```typescript -companion.registerCommand("pick", { +clanker.registerCommand("pick", { description: "Pick an item", handler: async (args, ctx) => { const items = ["Option A", "Option B", "Option C"]; @@ -444,8 +444,8 @@ renderResult(result, options, theme) { **For Markdown**, use `getMarkdownTheme()`: ```typescript -import { getMarkdownTheme } from "@mariozechner/companion-coding-agent"; -import { Markdown } from "@mariozechner/companion-tui"; +import { getMarkdownTheme } from "@mariozechner/clanker-coding-agent"; +import { Markdown } from "@mariozechner/clanker-tui"; renderResult(result, options, theme) { const mdTheme = getMarkdownTheme(); @@ -464,10 +464,10 @@ interface MyTheme { ## Debug logging -Set `COMPANION_TUI_WRITE_LOG` to capture the raw ANSI stream written to stdout. +Set `CLANKER_TUI_WRITE_LOG` to capture the raw ANSI stream written to stdout. ```bash -COMPANION_TUI_WRITE_LOG=/tmp/tui-ansi.log npx tsx packages/tui/test/chat-simple.ts +CLANKER_TUI_WRITE_LOG=/tmp/tui-ansi.log npx tsx packages/tui/test/chat-simple.ts ``` ## Performance @@ -606,19 +606,19 @@ These patterns cover the most common UI needs in extensions. **Copy these patter ### Pattern 1: Selection Dialog (SelectList) -For letting users pick from a list of options. Use `SelectList` from `@mariozechner/companion-tui` with `DynamicBorder` for framing. +For letting users pick from a list of options. Use `SelectList` from `@mariozechner/clanker-tui` with `DynamicBorder` for framing. ```typescript -import type { ExtensionAPI } from "@mariozechner/companion-coding-agent"; -import { DynamicBorder } from "@mariozechner/companion-coding-agent"; +import type { ExtensionAPI } from "@mariozechner/clanker-coding-agent"; +import { DynamicBorder } from "@mariozechner/clanker-coding-agent"; import { Container, type SelectItem, SelectList, Text, -} from "@mariozechner/companion-tui"; +} from "@mariozechner/clanker-tui"; -companion.registerCommand("pick", { +clanker.registerCommand("pick", { handler: async (_args, ctx) => { const items: SelectItem[] = [ { value: "opt1", label: "Option 1", description: "First option" }, @@ -691,9 +691,9 @@ companion.registerCommand("pick", { For operations that take time and should be cancellable. `BorderedLoader` shows a spinner and handles escape to cancel. ```typescript -import { BorderedLoader } from "@mariozechner/companion-coding-agent"; +import { BorderedLoader } from "@mariozechner/clanker-coding-agent"; -companion.registerCommand("fetch", { +clanker.registerCommand("fetch", { handler: async (_args, ctx) => { const result = await ctx.ui.custom( (tui, theme, _kb, done) => { @@ -722,18 +722,18 @@ companion.registerCommand("fetch", { ### Pattern 3: Settings/Toggles (SettingsList) -For toggling multiple settings. Use `SettingsList` from `@mariozechner/companion-tui` with `getSettingsListTheme()`. +For toggling multiple settings. Use `SettingsList` from `@mariozechner/clanker-tui` with `getSettingsListTheme()`. ```typescript -import { getSettingsListTheme } from "@mariozechner/companion-coding-agent"; +import { getSettingsListTheme } from "@mariozechner/clanker-coding-agent"; import { Container, type SettingItem, SettingsList, Text, -} from "@mariozechner/companion-tui"; +} from "@mariozechner/clanker-tui"; -companion.registerCommand("settings", { +clanker.registerCommand("settings", { handler: async (_args, ctx) => { const items: SettingItem[] = [ { @@ -854,8 +854,8 @@ Token stats available via `ctx.sessionManager.getBranch()` and `ctx.model`. Replace the main input editor with a custom implementation. Useful for modal editing (vim), different keybindings (emacs), or specialized input handling. ```typescript -import { CustomEditor, type ExtensionAPI } from "@mariozechner/companion-coding-agent"; -import { matchesKey, truncateToWidth } from "@mariozechner/companion-tui"; +import { CustomEditor, type ExtensionAPI } from "@mariozechner/clanker-coding-agent"; +import { matchesKey, truncateToWidth } from "@mariozechner/clanker-tui"; type Mode = "normal" | "insert"; @@ -917,8 +917,8 @@ class VimEditor extends CustomEditor { } } -export default function (companion: ExtensionAPI) { - companion.on("session_start", (_event, ctx) => { +export default function (clanker: ExtensionAPI) { + clanker.on("session_start", (_event, ctx) => { // Factory receives theme and keybindings from the app ctx.ui.setEditorComponent( (tui, theme, keybindings) => new VimEditor(theme, keybindings), diff --git a/packages/coding-agent/docs/windows.md b/packages/coding-agent/docs/windows.md index c205686..e89eb99 100644 --- a/packages/coding-agent/docs/windows.md +++ b/packages/coding-agent/docs/windows.md @@ -1,8 +1,8 @@ # Windows Setup -Companion requires a bash shell on Windows. Checked locations (in order): +Clanker requires a bash shell on Windows. Checked locations (in order): -1. Custom path from `~/.companion/agent/settings.json` +1. Custom path from `~/.clanker/agent/settings.json` 2. Git Bash (`C:\Program Files\Git\bin\bash.exe`) 3. `bash.exe` on PATH (Cygwin, MSYS2, WSL) diff --git a/packages/coding-agent/package.json b/packages/coding-agent/package.json index d5e072e..21b519f 100644 --- a/packages/coding-agent/package.json +++ b/packages/coding-agent/package.json @@ -1,14 +1,14 @@ { - "name": "@mariozechner/companion-coding-agent", + "name": "@harivansh-afk/clanker-coding-agent", "version": "0.56.2", "description": "Coding agent CLI with read, bash, edit, write tools and session management", "type": "module", - "companionConfig": { - "name": "companion", - "configDir": ".companion" + "clankerConfig": { + "name": "clanker", + "configDir": ".clanker" }, "bin": { - "companion": "dist/cli.js" + "clanker": "dist/cli.js" }, "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -32,7 +32,7 @@ "clean": "shx rm -rf dist", "dev": "tsgo -p tsconfig.build.json --watch --preserveWatchOutput", "build": "tsgo -p tsconfig.build.json && shx chmod +x dist/cli.js && npm run copy-assets", - "build:binary": "npm --prefix ../tui run build && npm --prefix ../ai run build && npm --prefix ../agent run build && npm run build && bun build --compile ./dist/cli.js --outfile dist/companion && npm run copy-binary-assets", + "build:binary": "npm --prefix ../tui run build && npm --prefix ../ai run build && npm --prefix ../agent run build && npm run build && bun build --compile ./dist/cli.js --outfile dist/clanker && npm run copy-binary-assets", "copy-assets": "shx mkdir -p dist/modes/interactive/theme && shx cp src/modes/interactive/theme/*.json dist/modes/interactive/theme/ && shx mkdir -p dist/core/export-html/vendor && shx cp src/core/export-html/template.html src/core/export-html/template.css src/core/export-html/template.js dist/core/export-html/ && shx cp src/core/export-html/vendor/*.js dist/core/export-html/vendor/", "copy-binary-assets": "shx cp package.json dist/ && shx cp README.md dist/ && shx cp CHANGELOG.md dist/ && shx mkdir -p dist/theme && shx cp src/modes/interactive/theme/*.json dist/theme/ && shx mkdir -p dist/export-html/vendor && shx cp src/core/export-html/template.html dist/export-html/ && shx cp src/core/export-html/vendor/*.js dist/export-html/vendor/ && shx cp -r docs dist/ && shx cp -r examples dist/ && shx cp ../../node_modules/@silvia-odwyer/photon-node/photon_rs_bg.wasm dist/", "test": "vitest --run", @@ -40,9 +40,9 @@ }, "dependencies": { "@mariozechner/jiti": "^2.6.2", - "@mariozechner/companion-agent-core": "^0.56.2", - "@mariozechner/companion-ai": "^0.56.2", - "@mariozechner/companion-tui": "^0.56.2", + "@harivansh-afk/clanker-agent-core": "^0.56.2", + "@harivansh-afk/clanker-ai": "^0.56.2", + "@harivansh-afk/clanker-tui": "^0.56.2", "@silvia-odwyer/photon-node": "^0.3.4", "chalk": "^5.5.0", "cli-highlight": "^2.1.11", @@ -90,7 +90,7 @@ "license": "MIT", "repository": { "type": "git", - "url": "git+https://github.com/getcompanion-ai/co-mono.git", + "url": "git+https://github.com/harivansh-afk/clanker-agent.git", "directory": "packages/coding-agent" }, "engines": { diff --git a/packages/coding-agent/scripts/migrate-sessions.sh b/packages/coding-agent/scripts/migrate-sessions.sh index 2bea56e..80ad4c8 100755 --- a/packages/coding-agent/scripts/migrate-sessions.sh +++ b/packages/coding-agent/scripts/migrate-sessions.sh @@ -1,15 +1,15 @@ #!/usr/bin/env bash # -# Migrate sessions from ~/.companion/agent/*.jsonl to proper session directories. +# Migrate sessions from ~/.clanker/agent/*.jsonl to proper session directories. # This fixes sessions created by the bug in v0.30.0 where sessions were -# saved to ~/.companion/agent/ instead of ~/.companion/agent/sessions//. +# saved to ~/.clanker/agent/ instead of ~/.clanker/agent/sessions//. # # Usage: ./migrate-sessions.sh [--dry-run] # set -e -AGENT_DIR="${COMPANION_AGENT_DIR:-$HOME/.companion/agent}" +AGENT_DIR="${CLANKER_AGENT_DIR:-$HOME/.clanker/agent}" DRY_RUN=false if [[ "$1" == "--dry-run" ]]; then diff --git a/packages/coding-agent/src/cli.ts b/packages/coding-agent/src/cli.ts index a142591..7d4a4f7 100644 --- a/packages/coding-agent/src/cli.ts +++ b/packages/coding-agent/src/cli.ts @@ -5,10 +5,10 @@ * * Test with: npx tsx src/cli-new.ts [args...] */ -process.title = "companion"; +process.title = "clanker"; -import { bedrockProviderModule } from "@mariozechner/companion-ai/bedrock-provider"; -import { setBedrockProviderModule } from "@mariozechner/companion-ai"; +import { bedrockProviderModule } from "@mariozechner/clanker-ai/bedrock-provider"; +import { setBedrockProviderModule } from "@mariozechner/clanker-ai"; import { EnvHttpProxyAgent, setGlobalDispatcher } from "undici"; import { main } from "./main.js"; diff --git a/packages/coding-agent/src/cli/args.ts b/packages/coding-agent/src/cli/args.ts index f36aa6d..c9e3dc5 100644 --- a/packages/coding-agent/src/cli/args.ts +++ b/packages/coding-agent/src/cli/args.ts @@ -2,7 +2,7 @@ * CLI argument parsing and help display */ -import type { ThinkingLevel } from "@mariozechner/companion-agent-core"; +import type { ThinkingLevel } from "@mariozechner/clanker-agent-core"; import chalk from "chalk"; import { APP_NAME, CONFIG_DIR_NAME, ENV_AGENT_DIR } from "../config.js"; import { @@ -245,7 +245,7 @@ ${chalk.bold("Options:")} --export Export session file to HTML and exit --list-models [search] List available models (with optional fuzzy search) --verbose Force verbose startup (overrides quietStartup setting) - --offline Disable startup network operations (same as COMPANION_OFFLINE=1) + --offline Disable startup network operations (same as CLANKER_OFFLINE=1) --help, -h Show this help --version, -v Show version number @@ -324,11 +324,11 @@ ${chalk.bold("Environment Variables:")} AWS_BEARER_TOKEN_BEDROCK - Bedrock API key (bearer token) AWS_REGION - AWS region for Amazon Bedrock (e.g., us-east-1) ${ENV_AGENT_DIR.padEnd(32)} - Session storage directory (default: ~/${CONFIG_DIR_NAME}/agent) - COMPANION_PACKAGE_DIR - Override package directory (for Nix/Guix store paths) - COMPANION_AGENT_COMPUTER_COMMAND - Override the computer helper command (default: agent-computer) - COMPANION_OFFLINE - Disable startup network operations when set to 1/true/yes - COMPANION_SHARE_VIEWER_URL - Base URL for /share command (default: https://companion.dev/session/) - COMPANION_AI_ANTIGRAVITY_VERSION - Override Antigravity User-Agent version (e.g., 1.23.0) + CLANKER_PACKAGE_DIR - Override package directory (for Nix/Guix store paths) + CLANKER_AGENT_COMPUTER_COMMAND - Override the computer helper command (default: agent-computer) + CLANKER_OFFLINE - Disable startup network operations when set to 1/true/yes + CLANKER_SHARE_VIEWER_URL - Base URL for /share command (default: https://clanker.dev/session/) + CLANKER_AI_ANTIGRAVITY_VERSION - Override Antigravity User-Agent version (e.g., 1.23.0) ${chalk.bold(`Available Tools (default: ${defaultToolsText}):`)} read - Read file contents diff --git a/packages/coding-agent/src/cli/config-selector.ts b/packages/coding-agent/src/cli/config-selector.ts index 86d7c4e..acb5a25 100644 --- a/packages/coding-agent/src/cli/config-selector.ts +++ b/packages/coding-agent/src/cli/config-selector.ts @@ -1,8 +1,8 @@ /** - * TUI config selector for `companion config` command + * TUI config selector for `clanker config` command */ -import { ProcessTerminal, TUI } from "@mariozechner/companion-tui"; +import { ProcessTerminal, TUI } from "@mariozechner/clanker-tui"; import type { ResolvedPaths } from "../core/package-manager.js"; import type { SettingsManager } from "../core/settings-manager.js"; import { ConfigSelectorComponent } from "../modes/interactive/components/config-selector.js"; diff --git a/packages/coding-agent/src/cli/file-processor.ts b/packages/coding-agent/src/cli/file-processor.ts index 86fb933..046e687 100644 --- a/packages/coding-agent/src/cli/file-processor.ts +++ b/packages/coding-agent/src/cli/file-processor.ts @@ -3,7 +3,7 @@ */ import { access, readFile, stat } from "node:fs/promises"; -import type { ImageContent } from "@mariozechner/companion-ai"; +import type { ImageContent } from "@mariozechner/clanker-ai"; import chalk from "chalk"; import { resolve } from "path"; import { resolveReadPath } from "../core/tools/path-utils.js"; diff --git a/packages/coding-agent/src/cli/list-models.ts b/packages/coding-agent/src/cli/list-models.ts index 151fa37..55d79d1 100644 --- a/packages/coding-agent/src/cli/list-models.ts +++ b/packages/coding-agent/src/cli/list-models.ts @@ -2,8 +2,8 @@ * List available models with optional fuzzy search */ -import type { Api, Model } from "@mariozechner/companion-ai"; -import { fuzzyFilter } from "@mariozechner/companion-tui"; +import type { Api, Model } from "@mariozechner/clanker-ai"; +import { fuzzyFilter } from "@mariozechner/clanker-tui"; import type { ModelRegistry } from "../core/model-registry.js"; /** diff --git a/packages/coding-agent/src/cli/session-picker.ts b/packages/coding-agent/src/cli/session-picker.ts index 4b7839d..f14b6a1 100644 --- a/packages/coding-agent/src/cli/session-picker.ts +++ b/packages/coding-agent/src/cli/session-picker.ts @@ -2,7 +2,7 @@ * TUI session selector for --resume flag */ -import { ProcessTerminal, TUI } from "@mariozechner/companion-tui"; +import { ProcessTerminal, TUI } from "@mariozechner/clanker-tui"; import { KeybindingsManager } from "../core/keybindings.js"; import type { SessionInfo, diff --git a/packages/coding-agent/src/config.ts b/packages/coding-agent/src/config.ts index fc58238..6d95423 100644 --- a/packages/coding-agent/src/config.ts +++ b/packages/coding-agent/src/config.ts @@ -73,7 +73,7 @@ export function getUpdateInstruction(packageName: string): string { const method = detectInstallMethod(); switch (method) { case "bun-binary": - return `Download from: https://github.com/badlogic/companion-mono/releases/latest`; + return `Download from: https://github.com/badlogic/clanker-mono/releases/latest`; case "pnpm": return `Run: pnpm install -g ${packageName}`; case "yarn": @@ -99,7 +99,7 @@ export function getUpdateInstruction(packageName: string): string { */ export function getPackageDir(): string { // Allow override via environment variable (useful for Nix/Guix where store paths tokenize poorly) - const envDir = process.env.COMPANION_PACKAGE_DIR; + const envDir = process.env.CLANKER_PACKAGE_DIR; if (envDir) { if (envDir === "~") return homedir(); if (envDir.startsWith("~/")) return homedir() + envDir.slice(1); @@ -174,32 +174,32 @@ export function getChangelogPath(): string { } // ============================================================================= -// App Config (from package.json companionConfig) +// App Config (from package.json clankerConfig) // ============================================================================= const pkg = JSON.parse(readFileSync(getPackageJsonPath(), "utf-8")); -export const APP_NAME: string = pkg.companionConfig?.name || "companion"; +export const APP_NAME: string = pkg.clankerConfig?.name || "clanker"; export const CONFIG_DIR_NAME: string = - pkg.companionConfig?.configDir || ".companion"; + pkg.clankerConfig?.configDir || ".clanker"; export const VERSION: string = pkg.version; -// e.g., COMPANION_CODING_AGENT_DIR or TAU_CODING_AGENT_DIR +// e.g., CLANKER_CODING_AGENT_DIR or TAU_CODING_AGENT_DIR export const ENV_AGENT_DIR = `${APP_NAME.toUpperCase()}_CODING_AGENT_DIR`; -const DEFAULT_SHARE_VIEWER_URL = "https://companion.dev/session/"; +const DEFAULT_SHARE_VIEWER_URL = "https://clanker.dev/session/"; /** Get the share viewer URL for a gist ID */ export function getShareViewerUrl(gistId: string): string { - const baseUrl = process.env.COMPANION_SHARE_VIEWER_URL || DEFAULT_SHARE_VIEWER_URL; + const baseUrl = process.env.CLANKER_SHARE_VIEWER_URL || DEFAULT_SHARE_VIEWER_URL; return `${baseUrl}#${gistId}`; } // ============================================================================= -// User Config Paths (~/.companion/agent/*) +// User Config Paths (~/.clanker/agent/*) // ============================================================================= -/** Get the agent config directory (e.g., ~/.companion/agent/) */ +/** Get the agent config directory (e.g., ~/.clanker/agent/) */ export function getAgentDir(): string { const envDir = process.env[ENV_AGENT_DIR]; if (envDir) { diff --git a/packages/coding-agent/src/core/agent-session.ts b/packages/coding-agent/src/core/agent-session.ts index b256b19..659b7a9 100644 --- a/packages/coding-agent/src/core/agent-session.ts +++ b/packages/coding-agent/src/core/agent-session.ts @@ -22,20 +22,20 @@ import type { AgentState, AgentTool, ThinkingLevel, -} from "@mariozechner/companion-agent-core"; +} from "@mariozechner/clanker-agent-core"; import type { AssistantMessage, ImageContent, Message, Model, TextContent, -} from "@mariozechner/companion-ai"; +} from "@mariozechner/clanker-ai"; import { isContextOverflow, modelsAreEqual, resetApiProviders, supportsXhigh, -} from "@mariozechner/companion-ai"; +} from "@mariozechner/clanker-ai"; import { getDocsPath } from "../config.js"; import { theme } from "../modes/interactive/theme/theme.js"; import { stripFrontmatter } from "../utils/frontmatter.js"; @@ -1023,7 +1023,7 @@ export class AgentSession { /** * Send a prompt to the agent. - * - Handles extension commands (registered via companion.registerCommand) immediately, even during streaming + * - Handles extension commands (registered via clanker.registerCommand) immediately, even during streaming * - Expands file-based prompt templates by default * - During streaming, queues via steer() or followUp() based on streamingBehavior option * - Validates model and API key before sending (when not streaming) @@ -1034,7 +1034,7 @@ export class AgentSession { const expandPromptTemplates = options?.expandPromptTemplates ?? true; // Handle extension commands first (execute immediately, even during streaming) - // Extension commands manage their own LLM interaction via companion.sendMessage() + // Extension commands manage their own LLM interaction via clanker.sendMessage() if (expandPromptTemplates && text.startsWith("/")) { const handled = await this._tryExecuteExtensionCommand(text); if (handled) { diff --git a/packages/coding-agent/src/core/auth-storage.ts b/packages/coding-agent/src/core/auth-storage.ts index 2de6ca7..76e17ea 100644 --- a/packages/coding-agent/src/core/auth-storage.ts +++ b/packages/coding-agent/src/core/auth-storage.ts @@ -2,7 +2,7 @@ * Credential storage for API keys and OAuth tokens. * Handles loading, saving, and refreshing credentials from auth.json. * - * Uses file locking to prevent race conditions when multiple companion instances + * Uses file locking to prevent race conditions when multiple clanker instances * try to refresh tokens simultaneously. */ @@ -11,12 +11,12 @@ import { type OAuthCredentials, type OAuthLoginCallbacks, type OAuthProviderId, -} from "@mariozechner/companion-ai"; +} from "@mariozechner/clanker-ai"; import { getOAuthApiKey, getOAuthProvider, getOAuthProviders, -} from "@mariozechner/companion-ai/oauth"; +} from "@mariozechner/clanker-ai/oauth"; import { chmodSync, existsSync, @@ -373,7 +373,7 @@ export class AuthStorage { /** * Refresh OAuth token with backend locking to prevent race conditions. - * Multiple companion instances may try to refresh simultaneously when tokens expire. + * Multiple clanker instances may try to refresh simultaneously when tokens expire. */ private async refreshOAuthTokenWithLock( providerId: OAuthProviderId, diff --git a/packages/coding-agent/src/core/bash-executor.ts b/packages/coding-agent/src/core/bash-executor.ts index 9e9a212..352d0c1 100644 --- a/packages/coding-agent/src/core/bash-executor.ts +++ b/packages/coding-agent/src/core/bash-executor.ts @@ -120,7 +120,7 @@ export function executeBash( // Start writing to temp file if exceeds threshold if (totalBytes > DEFAULT_MAX_BYTES && !tempFilePath) { const id = randomBytes(8).toString("hex"); - tempFilePath = join(tmpdir(), `companion-bash-${id}.log`); + tempFilePath = join(tmpdir(), `clanker-bash-${id}.log`); tempFileStream = createWriteStream(tempFilePath); // Write already-buffered chunks to temp file for (const chunk of outputChunks) { @@ -223,7 +223,7 @@ export async function executeBashWithOperations( // Start writing to temp file if exceeds threshold if (totalBytes > DEFAULT_MAX_BYTES && !tempFilePath) { const id = randomBytes(8).toString("hex"); - tempFilePath = join(tmpdir(), `companion-bash-${id}.log`); + tempFilePath = join(tmpdir(), `clanker-bash-${id}.log`); tempFileStream = createWriteStream(tempFilePath); for (const chunk of outputChunks) { tempFileStream.write(chunk); diff --git a/packages/coding-agent/src/core/compaction/branch-summarization.ts b/packages/coding-agent/src/core/compaction/branch-summarization.ts index f0b1185..83416e9 100644 --- a/packages/coding-agent/src/core/compaction/branch-summarization.ts +++ b/packages/coding-agent/src/core/compaction/branch-summarization.ts @@ -5,9 +5,9 @@ * a summary of the branch being left so context isn't lost. */ -import type { AgentMessage } from "@mariozechner/companion-agent-core"; -import type { Model } from "@mariozechner/companion-ai"; -import { completeSimple } from "@mariozechner/companion-ai"; +import type { AgentMessage } from "@mariozechner/clanker-agent-core"; +import type { Model } from "@mariozechner/clanker-ai"; +import { completeSimple } from "@mariozechner/clanker-ai"; import { convertToLlm, createBranchSummaryMessage, @@ -206,7 +206,7 @@ export function prepareBranchEntries( // First pass: collect file ops from ALL entries (even if they don't fit in token budget) // This ensures we capture cumulative file tracking from nested branch summaries - // Only extract from companion-generated summaries (fromHook !== true), not extension-generated ones + // Only extract from clanker-generated summaries (fromHook !== true), not extension-generated ones for (const entry of entries) { if (entry.type === "branch_summary" && !entry.fromHook && entry.details) { const details = entry.details as BranchSummaryDetails; diff --git a/packages/coding-agent/src/core/compaction/compaction.ts b/packages/coding-agent/src/core/compaction/compaction.ts index eb7dbf4..c67d423 100644 --- a/packages/coding-agent/src/core/compaction/compaction.ts +++ b/packages/coding-agent/src/core/compaction/compaction.ts @@ -5,9 +5,9 @@ * and after compaction the session is reloaded. */ -import type { AgentMessage } from "@mariozechner/companion-agent-core"; -import type { AssistantMessage, Model, Usage } from "@mariozechner/companion-ai"; -import { completeSimple } from "@mariozechner/companion-ai"; +import type { AgentMessage } from "@mariozechner/clanker-agent-core"; +import type { AssistantMessage, Model, Usage } from "@mariozechner/clanker-ai"; +import { completeSimple } from "@mariozechner/clanker-ai"; import { convertToLlm, createBranchSummaryMessage, @@ -45,7 +45,7 @@ function extractFileOperations( ): FileOperations { const fileOps = createFileOps(); - // Collect from previous compaction's details (if companion-generated) + // Collect from previous compaction's details (if clanker-generated) if (prevCompactionIndex >= 0) { const prevCompaction = entries[prevCompactionIndex] as CompactionEntry; if (!prevCompaction.fromHook && prevCompaction.details) { diff --git a/packages/coding-agent/src/core/compaction/utils.ts b/packages/coding-agent/src/core/compaction/utils.ts index 5c5097f..0b0ca89 100644 --- a/packages/coding-agent/src/core/compaction/utils.ts +++ b/packages/coding-agent/src/core/compaction/utils.ts @@ -2,8 +2,8 @@ * Shared utilities for compaction and branch summarization. */ -import type { AgentMessage } from "@mariozechner/companion-agent-core"; -import type { Message } from "@mariozechner/companion-ai"; +import type { AgentMessage } from "@mariozechner/clanker-agent-core"; +import type { Message } from "@mariozechner/clanker-ai"; // ============================================================================ // File Operation Tracking diff --git a/packages/coding-agent/src/core/defaults.ts b/packages/coding-agent/src/core/defaults.ts index 24617e4..31a7f84 100644 --- a/packages/coding-agent/src/core/defaults.ts +++ b/packages/coding-agent/src/core/defaults.ts @@ -1,3 +1,3 @@ -import type { ThinkingLevel } from "@mariozechner/companion-agent-core"; +import type { ThinkingLevel } from "@mariozechner/clanker-agent-core"; export const DEFAULT_THINKING_LEVEL: ThinkingLevel = "medium"; diff --git a/packages/coding-agent/src/core/export-html/index.ts b/packages/coding-agent/src/core/export-html/index.ts index 4bc0071..62cd7ac 100644 --- a/packages/coding-agent/src/core/export-html/index.ts +++ b/packages/coding-agent/src/core/export-html/index.ts @@ -1,4 +1,4 @@ -import type { AgentState } from "@mariozechner/companion-agent-core"; +import type { AgentState } from "@mariozechner/clanker-agent-core"; import { existsSync, readFileSync, writeFileSync } from "fs"; import { basename, join } from "path"; import { APP_NAME, getExportTemplateDir } from "../../config.js"; diff --git a/packages/coding-agent/src/core/export-html/template.js b/packages/coding-agent/src/core/export-html/template.js index e3c26ce..630669c 100644 --- a/packages/coding-agent/src/core/export-html/template.js +++ b/packages/coding-agent/src/core/export-html/template.js @@ -27,7 +27,7 @@ // Parse URL parameters for deep linking: leafId and targetId // Check for injected params (when loaded in iframe via srcdoc) or use window.location - const injectedParams = document.querySelector('meta[name="companion-url-params"]'); + const injectedParams = document.querySelector('meta[name="clanker-url-params"]'); const searchString = injectedParams ? injectedParams.content : window.location.search.substring(1); @@ -1227,7 +1227,7 @@ function buildShareUrl(entryId) { // Check for injected base URL (used when loaded in iframe via srcdoc) const baseUrlMeta = document.querySelector( - 'meta[name="companion-share-base-url"]', + 'meta[name="clanker-share-base-url"]', ); const baseUrl = baseUrlMeta ? baseUrlMeta.content diff --git a/packages/coding-agent/src/core/export-html/tool-renderer.ts b/packages/coding-agent/src/core/export-html/tool-renderer.ts index a2ba13a..a126826 100644 --- a/packages/coding-agent/src/core/export-html/tool-renderer.ts +++ b/packages/coding-agent/src/core/export-html/tool-renderer.ts @@ -5,7 +5,7 @@ * and converting the ANSI output to HTML. */ -import type { ImageContent, TextContent } from "@mariozechner/companion-ai"; +import type { ImageContent, TextContent } from "@mariozechner/clanker-ai"; import type { Theme } from "../../modes/interactive/theme/theme.js"; import type { ToolDefinition } from "../extensions/types.js"; import { ansiLinesToHtml } from "./ansi-to-html.js"; diff --git a/packages/coding-agent/src/core/extensions/loader.ts b/packages/coding-agent/src/core/extensions/loader.ts index ac69231..8eecb58 100644 --- a/packages/coding-agent/src/core/extensions/loader.ts +++ b/packages/coding-agent/src/core/extensions/loader.ts @@ -10,18 +10,18 @@ import * as os from "node:os"; import * as path from "node:path"; import { fileURLToPath } from "node:url"; import { createJiti } from "@mariozechner/jiti"; -import * as _bundledPiAgentCore from "@mariozechner/companion-agent-core"; -import * as _bundledPiAi from "@mariozechner/companion-ai"; -import * as _bundledPiAiOauth from "@mariozechner/companion-ai/oauth"; -import type { KeyId } from "@mariozechner/companion-tui"; -import * as _bundledPiTui from "@mariozechner/companion-tui"; +import * as _bundledPiAgentCore from "@mariozechner/clanker-agent-core"; +import * as _bundledPiAi from "@mariozechner/clanker-ai"; +import * as _bundledPiAiOauth from "@mariozechner/clanker-ai/oauth"; +import type { KeyId } from "@mariozechner/clanker-tui"; +import * as _bundledPiTui from "@mariozechner/clanker-tui"; // Static imports of packages that extensions may use. // These MUST be static so Bun bundles them into the compiled binary. // The virtualModules option then makes them available to extensions. import * as _bundledTypebox from "@sinclair/typebox"; import { getAgentDir, isBunBinary } from "../../config.js"; // NOTE: This import works because loader.ts exports are NOT re-exported from index.ts, -// avoiding a circular dependency. Extensions can import from @mariozechner/companion-coding-agent. +// avoiding a circular dependency. Extensions can import from @mariozechner/clanker-coding-agent. import * as _bundledPiCodingAgent from "../../index.js"; import { createEventBus, type EventBus } from "../event-bus.js"; import type { ExecOptions } from "../exec.js"; @@ -41,11 +41,11 @@ import type { /** Modules available to extensions via virtualModules (for compiled Bun binary) */ const VIRTUAL_MODULES: Record = { "@sinclair/typebox": _bundledTypebox, - "@mariozechner/companion-agent-core": _bundledPiAgentCore, - "@mariozechner/companion-tui": _bundledPiTui, - "@mariozechner/companion-ai": _bundledPiAi, - "@mariozechner/companion-ai/oauth": _bundledPiAiOauth, - "@mariozechner/companion-coding-agent": _bundledPiCodingAgent, + "@mariozechner/clanker-agent-core": _bundledPiAgentCore, + "@mariozechner/clanker-tui": _bundledPiTui, + "@mariozechner/clanker-ai": _bundledPiAi, + "@mariozechner/clanker-ai/oauth": _bundledPiAiOauth, + "@mariozechner/clanker-coding-agent": _bundledPiCodingAgent, }; const require = createRequire(import.meta.url); @@ -80,22 +80,22 @@ function getAliases(): Record { }; _aliases = { - "@mariozechner/companion-coding-agent": packageIndex, - "@mariozechner/companion-agent-core": resolveWorkspaceOrImport( + "@mariozechner/clanker-coding-agent": packageIndex, + "@mariozechner/clanker-agent-core": resolveWorkspaceOrImport( "agent/dist/index.js", - "@mariozechner/companion-agent-core", + "@mariozechner/clanker-agent-core", ), - "@mariozechner/companion-tui": resolveWorkspaceOrImport( + "@mariozechner/clanker-tui": resolveWorkspaceOrImport( "tui/dist/index.js", - "@mariozechner/companion-tui", + "@mariozechner/clanker-tui", ), - "@mariozechner/companion-ai": resolveWorkspaceOrImport( + "@mariozechner/clanker-ai": resolveWorkspaceOrImport( "ai/dist/index.js", - "@mariozechner/companion-ai", + "@mariozechner/clanker-ai", ), - "@mariozechner/companion-ai/oauth": resolveWorkspaceOrImport( + "@mariozechner/clanker-ai/oauth": resolveWorkspaceOrImport( "ai/dist/oauth.js", - "@mariozechner/companion-ai/oauth", + "@mariozechner/clanker-ai/oauth", ), "@sinclair/typebox": typeboxRoot, }; @@ -454,8 +454,8 @@ function readPiManifest(packageJsonPath: string): PiManifest | null { try { const content = fs.readFileSync(packageJsonPath, "utf-8"); const pkg = JSON.parse(content); - if (pkg.companion && typeof pkg.companion === "object") { - return pkg.companion as PiManifest; + if (pkg.clanker && typeof pkg.clanker === "object") { + return pkg.clanker as PiManifest; } return null; } catch { @@ -471,13 +471,13 @@ function isExtensionFile(name: string): boolean { * Resolve extension entry points from a directory. * * Checks for: - * 1. package.json with "companion.extensions" field -> returns declared paths + * 1. package.json with "clanker.extensions" field -> returns declared paths * 2. index.ts or index.js -> returns the index file * * Returns resolved paths or null if no entry points found. */ function resolveExtensionEntries(dir: string): string[] | null { - // Check for package.json with "companion" field first + // Check for package.json with "clanker" field first const packageJsonPath = path.join(dir, "package.json"); if (fs.existsSync(packageJsonPath)) { const manifest = readPiManifest(packageJsonPath); @@ -514,7 +514,7 @@ function resolveExtensionEntries(dir: string): string[] | null { * Discovery rules: * 1. Direct files: `extensions/*.ts` or `*.js` → load * 2. Subdirectory with index: `extensions/* /index.ts` or `index.js` → load - * 3. Subdirectory with package.json: `extensions/* /package.json` with "companion" field → load what it declares + * 3. Subdirectory with package.json: `extensions/* /package.json` with "clanker" field → load what it declares * * No recursion beyond one level. Complex packages must use package.json manifest. */ @@ -577,8 +577,8 @@ export async function discoverAndLoadExtensions( } }; - // 1. Project-local extensions: cwd/.companion/extensions/ - const localExtDir = path.join(cwd, ".companion", "extensions"); + // 1. Project-local extensions: cwd/.clanker/extensions/ + const localExtDir = path.join(cwd, ".clanker", "extensions"); addPaths(discoverExtensionsInDir(localExtDir)); // 2. Global extensions: agentDir/extensions/ @@ -589,7 +589,7 @@ export async function discoverAndLoadExtensions( for (const p of configuredPaths) { const resolved = resolvePath(p, cwd); if (fs.existsSync(resolved) && fs.statSync(resolved).isDirectory()) { - // Check for package.json with companion manifest or index.ts + // Check for package.json with clanker manifest or index.ts const entries = resolveExtensionEntries(resolved); if (entries) { addPaths(entries); diff --git a/packages/coding-agent/src/core/extensions/runner.ts b/packages/coding-agent/src/core/extensions/runner.ts index 1d6c549..95d8dd4 100644 --- a/packages/coding-agent/src/core/extensions/runner.ts +++ b/packages/coding-agent/src/core/extensions/runner.ts @@ -2,9 +2,9 @@ * Extension runner - executes extensions and manages their lifecycle. */ -import type { AgentMessage } from "@mariozechner/companion-agent-core"; -import type { ImageContent, Model } from "@mariozechner/companion-ai"; -import type { KeyId } from "@mariozechner/companion-tui"; +import type { AgentMessage } from "@mariozechner/clanker-agent-core"; +import type { ImageContent, Model } from "@mariozechner/clanker-ai"; +import type { KeyId } from "@mariozechner/clanker-tui"; import { type Theme, theme } from "../../modes/interactive/theme/theme.js"; import type { ResourceDiagnostic } from "../diagnostics.js"; import type { KeyAction, KeybindingsConfig } from "../keybindings.js"; diff --git a/packages/coding-agent/src/core/extensions/types.ts b/packages/coding-agent/src/core/extensions/types.ts index f72e6c9..3b818f7 100644 --- a/packages/coding-agent/src/core/extensions/types.ts +++ b/packages/coding-agent/src/core/extensions/types.ts @@ -13,7 +13,7 @@ import type { AgentToolResult, AgentToolUpdateCallback, ThinkingLevel, -} from "@mariozechner/companion-agent-core"; +} from "@mariozechner/clanker-agent-core"; import type { Api, AssistantMessageEvent, @@ -26,7 +26,7 @@ import type { SimpleStreamOptions, TextContent, ToolResultMessage, -} from "@mariozechner/companion-ai"; +} from "@mariozechner/clanker-ai"; import type { AutocompleteItem, Component, @@ -36,7 +36,7 @@ import type { OverlayHandle, OverlayOptions, TUI, -} from "@mariozechner/companion-tui"; +} from "@mariozechner/clanker-tui"; import type { Static, TSchema } from "@sinclair/typebox"; import type { Theme } from "../../modes/interactive/theme/theme.js"; import type { BashResult } from "../bash-executor.js"; @@ -223,12 +223,12 @@ export interface ExtensionUIContext { * - `keybindings`: KeybindingsManager for app-level keybindings * * For full app keybinding support (escape, ctrl+d, model switching, etc.), - * extend `CustomEditor` from `@mariozechner/companion-coding-agent` and call + * extend `CustomEditor` from `@mariozechner/clanker-coding-agent` and call * `super.handleInput(data)` for keys you don't handle. * * @example * ```ts - * import { CustomEditor } from "@mariozechner/companion-coding-agent"; + * import { CustomEditor } from "@mariozechner/clanker-coding-agent"; * * class VimEditor extends CustomEditor { * private mode: "normal" | "insert" = "insert"; @@ -316,7 +316,7 @@ export interface ExtensionContext { abort(): void; /** Whether there are queued messages waiting */ hasPendingMessages(): boolean; - /** Gracefully shutdown companion and exit. Available in all contexts. */ + /** Gracefully shutdown clanker and exit. Available in all contexts. */ shutdown(): void; /** Get current context usage for the active model. */ getContextUsage(): ContextUsage | undefined; @@ -1251,7 +1251,7 @@ export interface ExtensionAPI { * * @example * // Register a new provider with custom models - * companion.registerProvider("my-proxy", { + * clanker.registerProvider("my-proxy", { * baseUrl: "https://proxy.example.com", * apiKey: "PROXY_API_KEY", * api: "anthropic-messages", @@ -1270,13 +1270,13 @@ export interface ExtensionAPI { * * @example * // Override baseUrl for an existing provider - * companion.registerProvider("anthropic", { + * clanker.registerProvider("anthropic", { * baseUrl: "https://proxy.example.com" * }); * * @example * // Register provider with OAuth support - * companion.registerProvider("corporate-ai", { + * clanker.registerProvider("corporate-ai", { * baseUrl: "https://ai.corp.com", * api: "openai-responses", * models: [...], @@ -1301,7 +1301,7 @@ export interface ExtensionAPI { * the initial load phase. * * @example - * companion.unregisterProvider("my-proxy"); + * clanker.unregisterProvider("my-proxy"); */ unregisterProvider(name: string): void; @@ -1313,7 +1313,7 @@ export interface ExtensionAPI { // Provider Registration Types // ============================================================================ -/** Configuration for registering a provider via companion.registerProvider(). */ +/** Configuration for registering a provider via clanker.registerProvider(). */ export interface ProviderConfig { /** Base URL for the API endpoint. Required when defining models. */ baseUrl?: string; @@ -1381,7 +1381,7 @@ export interface ProviderModelConfig { } /** Extension factory function type. Supports both sync and async initialization. */ -export type ExtensionFactory = (companion: ExtensionAPI) => void | Promise; +export type ExtensionFactory = (clanker: ExtensionAPI) => void | Promise; // ============================================================================ // Loaded Extension Types @@ -1480,7 +1480,7 @@ export interface ExtensionRuntimeState { } /** - * Action implementations for companion.* API methods. + * Action implementations for clanker.* API methods. * Provided to runner.initialize(), copied into the shared runtime. */ export interface ExtensionActions { diff --git a/packages/coding-agent/src/core/extensions/wrapper.ts b/packages/coding-agent/src/core/extensions/wrapper.ts index 2d535e1..2620126 100644 --- a/packages/coding-agent/src/core/extensions/wrapper.ts +++ b/packages/coding-agent/src/core/extensions/wrapper.ts @@ -5,7 +5,7 @@ import type { AgentTool, AgentToolUpdateCallback, -} from "@mariozechner/companion-agent-core"; +} from "@mariozechner/clanker-agent-core"; import type { ExtensionRunner } from "./runner.js"; import type { RegisteredTool, ToolCallEventResult } from "./types.js"; diff --git a/packages/coding-agent/src/core/gateway/durable-chat-run.ts b/packages/coding-agent/src/core/gateway/durable-chat-run.ts index 16568cd..4b1fde3 100644 --- a/packages/coding-agent/src/core/gateway/durable-chat-run.ts +++ b/packages/coding-agent/src/core/gateway/durable-chat-run.ts @@ -1,4 +1,4 @@ -import type { AgentMessage } from "@mariozechner/companion-agent-core"; +import type { AgentMessage } from "@mariozechner/clanker-agent-core"; import type { AgentSessionEvent } from "../agent-session.js"; import { extractMessageText } from "./helpers.js"; import { messageContentToHistoryParts } from "./session-state.js"; diff --git a/packages/coding-agent/src/core/gateway/internal-types.ts b/packages/coding-agent/src/core/gateway/internal-types.ts index 2bbb086..34f7656 100644 --- a/packages/coding-agent/src/core/gateway/internal-types.ts +++ b/packages/coding-agent/src/core/gateway/internal-types.ts @@ -1,4 +1,4 @@ -import type { AgentMessage } from "@mariozechner/companion-agent-core"; +import type { AgentMessage } from "@mariozechner/clanker-agent-core"; import type { AgentSession } from "../agent-session.js"; import type { DurableChatRunReporter } from "./durable-chat-run.js"; import type { diff --git a/packages/coding-agent/src/core/gateway/runtime.ts b/packages/coding-agent/src/core/gateway/runtime.ts index 586979a..d5c6b3e 100644 --- a/packages/coding-agent/src/core/gateway/runtime.ts +++ b/packages/coding-agent/src/core/gateway/runtime.ts @@ -7,7 +7,7 @@ import { import { rm } from "node:fs/promises"; import { join } from "node:path"; import { URL } from "node:url"; -import type { AgentMessage } from "@mariozechner/companion-agent-core"; +import type { AgentMessage } from "@mariozechner/clanker-agent-core"; import type { AgentSession, AgentSessionEvent } from "../agent-session.js"; import type { Settings } from "../settings-manager.js"; import { DurableChatRunReporter } from "./durable-chat-run.js"; @@ -66,7 +66,7 @@ const SSE_HEARTBEAT_MS = 15_000; type JsonRecord = Record; type AssistantAgentMessage = Extract; -type CompanionChannelsSettings = JsonRecord & { +type ClankerChannelsSettings = JsonRecord & { adapters?: Record; bridge?: JsonRecord; slack?: JsonRecord; @@ -1264,7 +1264,7 @@ export class GatewayRuntime { path.slice(this.config.webhook.basePath.length).replace(/^\/+/, "") || "default"; if (this.config.webhook.secret) { - const presentedSecret = request.headers["x-companion-webhook-secret"]; + const presentedSecret = request.headers["x-clanker-webhook-secret"]; if (presentedSecret !== this.config.webhook.secret) { this.writeJson(response, 401, { error: "Invalid webhook secret" }); return; @@ -1502,7 +1502,7 @@ export class GatewayRuntime { } // --------------------------------------------------------------------------- - // New handler methods added for companion-cloud web app integration + // New handler methods added for clanker-cloud web app integration // --------------------------------------------------------------------------- private async handleGetModels(): Promise<{ @@ -1636,7 +1636,7 @@ export class GatewayRuntime { this.primarySession.settingsManager.applyOverrides(patch as Settings); } - private getCompanionChannelsSettings(): CompanionChannelsSettings { + private getClankerChannelsSettings(): ClankerChannelsSettings { const globalSettings = this.primarySession.settingsManager.getGlobalSettings(); const projectSettings = @@ -1645,14 +1645,14 @@ export class GatewayRuntime { isRecord(globalSettings) ? globalSettings : {}, isRecord(projectSettings) ? projectSettings : {}, ); - const piChannels = mergedSettings["companion-channels"]; + const piChannels = mergedSettings["clanker-channels"]; return isRecord(piChannels) - ? (piChannels as CompanionChannelsSettings) + ? (piChannels as ClankerChannelsSettings) : {}; } private buildSlackChannelStatus( - config: CompanionChannelsSettings, + config: ClankerChannelsSettings, bridgeEnabled: boolean, ): ChannelStatus { const adapters = isRecord(config.adapters) ? config.adapters : {}; @@ -1671,13 +1671,13 @@ export class GatewayRuntime { if (hasConfig) { if (!adapter) { error = - 'Slack requires `companion-channels.adapters.slack = { "type": "slack" }`.'; + 'Slack requires `clanker-channels.adapters.slack = { "type": "slack" }`.'; } else if (adapterType !== "slack") { error = 'Slack adapter type must be "slack".'; } else if (!appToken) { - error = "Slack requires companion-channels.slack.appToken."; + error = "Slack requires clanker-channels.slack.appToken."; } else if (!botToken) { - error = "Slack requires companion-channels.slack.botToken."; + error = "Slack requires clanker-channels.slack.botToken."; } else { configured = true; } @@ -1685,7 +1685,7 @@ export class GatewayRuntime { if (configured && !bridgeEnabled) { error = - "Slack is configured, but companion-channels.bridge.enabled is false, so messages will not reach the agent."; + "Slack is configured, but clanker-channels.bridge.enabled is false, so messages will not reach the agent."; } return { @@ -1699,7 +1699,7 @@ export class GatewayRuntime { } private buildTelegramChannelStatus( - config: CompanionChannelsSettings, + config: ClankerChannelsSettings, bridgeEnabled: boolean, ): ChannelStatus { const adapters = isRecord(config.adapters) ? config.adapters : {}; @@ -1716,15 +1716,15 @@ export class GatewayRuntime { if (hasConfig) { if (!adapter) { error = - 'Telegram requires `companion-channels.adapters.telegram = { "type": "telegram", "botToken": "...", "polling": true }`.'; + 'Telegram requires `clanker-channels.adapters.telegram = { "type": "telegram", "botToken": "...", "polling": true }`.'; } else if (adapterType !== "telegram") { error = 'Telegram adapter type must be "telegram".'; } else if (!botToken) { error = - "Telegram requires companion-channels.adapters.telegram.botToken."; + "Telegram requires clanker-channels.adapters.telegram.botToken."; } else if (!pollingEnabled) { error = - "Telegram requires companion-channels.adapters.telegram.polling = true."; + "Telegram requires clanker-channels.adapters.telegram.polling = true."; } else { configured = true; } @@ -1732,7 +1732,7 @@ export class GatewayRuntime { if (configured && !bridgeEnabled) { error = - "Telegram is configured, but companion-channels.bridge.enabled is false, so messages will not reach the agent."; + "Telegram is configured, but clanker-channels.bridge.enabled is false, so messages will not reach the agent."; } return { @@ -1746,7 +1746,7 @@ export class GatewayRuntime { } private handleGetChannelsStatus(): ChannelStatus[] { - const config = this.getCompanionChannelsSettings(); + const config = this.getClankerChannelsSettings(); const bridgeEnabled = config.bridge?.enabled === true; return [ diff --git a/packages/coding-agent/src/core/gateway/session-state.ts b/packages/coding-agent/src/core/gateway/session-state.ts index 80e1b20..be50096 100644 --- a/packages/coding-agent/src/core/gateway/session-state.ts +++ b/packages/coding-agent/src/core/gateway/session-state.ts @@ -1,4 +1,4 @@ -import type { AgentMessage } from "@mariozechner/companion-agent-core"; +import type { AgentMessage } from "@mariozechner/clanker-agent-core"; import type { HistoryMessage, HistoryPart } from "./types.js"; export interface GatewayTransientToolResult { diff --git a/packages/coding-agent/src/core/gateway/types.ts b/packages/coding-agent/src/core/gateway/types.ts index 2311a43..e367722 100644 --- a/packages/coding-agent/src/core/gateway/types.ts +++ b/packages/coding-agent/src/core/gateway/types.ts @@ -1,4 +1,4 @@ -import type { ImageContent } from "@mariozechner/companion-ai"; +import type { ImageContent } from "@mariozechner/clanker-ai"; import type { AgentSession } from "../agent-session.js"; export interface GatewayConfig { diff --git a/packages/coding-agent/src/core/keybindings.ts b/packages/coding-agent/src/core/keybindings.ts index ce2f57a..d61275b 100644 --- a/packages/coding-agent/src/core/keybindings.ts +++ b/packages/coding-agent/src/core/keybindings.ts @@ -6,7 +6,7 @@ import { type KeyId, matchesKey, setEditorKeybindings, -} from "@mariozechner/companion-tui"; +} from "@mariozechner/clanker-tui"; import { existsSync, readFileSync } from "fs"; import { join } from "path"; import { getAgentDir } from "../config.js"; diff --git a/packages/coding-agent/src/core/memory/runtime-memory.ts b/packages/coding-agent/src/core/memory/runtime-memory.ts index 377efab..7b92d21 100644 --- a/packages/coding-agent/src/core/memory/runtime-memory.ts +++ b/packages/coding-agent/src/core/memory/runtime-memory.ts @@ -9,32 +9,32 @@ import { import { createRequire } from "node:module"; import { homedir } from "node:os"; import { basename, join, resolve } from "node:path"; -import type { AgentMessage } from "@mariozechner/companion-agent-core"; +import type { AgentMessage } from "@mariozechner/clanker-agent-core"; import { completeSimple, type Model, type TextContent, -} from "@mariozechner/companion-ai"; +} from "@mariozechner/clanker-ai"; import { parseFrontmatter } from "../../utils/frontmatter.js"; import type { SettingsManager } from "../settings-manager.js"; import type { ReadonlySessionManager } from "../session-manager.js"; -const DEFAULT_STORAGE_DIR = join(homedir(), ".companion", "memory"); +const DEFAULT_STORAGE_DIR = join(homedir(), ".clanker", "memory"); const MAX_EPISODE_CHARS = 4_000; const MAX_EPISODES = 5_000; const DEFAULT_CORE_TOKEN_BUDGET = 700; const DEFAULT_RECALL_RESULTS = 4; const DEFAULT_WRITER_MAX_TOKENS = 600; -const CUSTOM_MEMORY_TYPE = "companion_memory"; +const CUSTOM_MEMORY_TYPE = "clanker_memory"; const require = createRequire(import.meta.url); -const MEMORY_WRITER_SYSTEM_PROMPT = `You manage long-term conversational memory for a companion agent. +const MEMORY_WRITER_SYSTEM_PROMPT = `You manage long-term conversational memory for a clanker agent. Decide which facts from the latest exchange should be persisted for future chats. Rules: - Save only information grounded in the user or assistant messages. -- Prefer durable facts, explicit remember requests, stable preferences, relationship context, and secrets/keys/codes the user will expect the companion to recall later. +- Prefer durable facts, explicit remember requests, stable preferences, relationship context, and secrets/keys/codes the user will expect the clanker to recall later. - Use bucket "core" only for stable profile, preference, or relationship memory. - Use bucket "archival" for facts and secrets that should be searchable later. - Never invent details or infer beyond the exchange. @@ -52,7 +52,7 @@ export type RuntimeMemoryKind = | "secret"; export type RuntimeMemorySource = "auto" | "manual" | "legacy-import"; -export interface CompanionMemorySettings { +export interface ClankerMemorySettings { enabled?: boolean; storageDir?: string; maxCoreTokens?: number; @@ -65,7 +65,7 @@ export interface CompanionMemorySettings { export interface RuntimeMemoryIdentity { key: string; - scope: "agent" | "companion" | "sandbox" | "unknown"; + scope: "agent" | "clanker" | "sandbox" | "unknown"; } export interface RuntimeMemoryStatus { @@ -229,15 +229,15 @@ function expandHomePath(value: string): string { return join(homedir(), value.slice(1)); } -function getCompanionMemorySettings( +function getClankerMemorySettings( settingsManager: SettingsManager, -): Required & { +): Required & { writer: { enabled: boolean; maxTokens: number }; } { const globalSettings = asRecord(settingsManager.getGlobalSettings()) ?? {}; const projectSettings = asRecord(settingsManager.getProjectSettings()) ?? {}; - const globalMemory = asRecord(globalSettings.companionMemory) ?? {}; - const projectMemory = asRecord(projectSettings.companionMemory) ?? {}; + const globalMemory = asRecord(globalSettings.clankerMemory) ?? {}; + const projectMemory = asRecord(projectSettings.clankerMemory) ?? {}; const enabled = typeof projectMemory.enabled === "boolean" @@ -327,7 +327,7 @@ function buildDbFileName(identity: RuntimeMemoryIdentity): string { } function parseAgentIdFromSessionKey(value: string): string | null { - const match = value.match(/^agent:([^:]+):companion:[^:]+$/); + const match = value.match(/^agent:([^:]+):clanker:[^:]+$/); return match?.[1] ?? null; } @@ -335,7 +335,7 @@ function parseAgentIdFromSanitizedSessionKey(value: string): string | null { if (!value.startsWith("agent_")) { return null; } - const marker = "_companion_"; + const marker = "_clanker_"; const markerIndex = value.lastIndexOf(marker); if (markerIndex <= "agent_".length) { return null; @@ -362,10 +362,10 @@ function resolveIdentity(params: { return { key: `agent:${directAgentId}`, scope: "agent" }; } - const companion = asRecord(settings.companion); - const explicitCompanionId = asString(companion?.id); - if (explicitCompanionId) { - return { key: `companion:${explicitCompanionId}`, scope: "companion" }; + const clanker = asRecord(settings.clanker); + const explicitClankerId = asString(clanker?.id); + if (explicitClankerId) { + return { key: `clanker:${explicitClankerId}`, scope: "clanker" }; } const sandboxHandle = asString(settings.sandboxHandle); @@ -570,7 +570,7 @@ function guessLegacyKind(filePath: string, body: string): RuntimeMemoryKind { export class RuntimeMemoryManager { private readonly sessionManager: ReadonlySessionManager; private readonly settingsManager: SettingsManager; - private readonly settings: Required & { + private readonly settings: Required & { writer: { enabled: boolean; maxTokens: number }; }; private readonly identity: RuntimeMemoryIdentity | null; @@ -583,7 +583,7 @@ export class RuntimeMemoryManager { }) { this.sessionManager = params.sessionManager; this.settingsManager = params.settingsManager; - this.settings = getCompanionMemorySettings(params.settingsManager); + this.settings = getClankerMemorySettings(params.settingsManager); this.identity = this.settings.enabled ? resolveIdentity(params) : null; if (!this.settings.enabled || !this.identity) { @@ -1487,9 +1487,9 @@ function resolveLegacyProjectDir( cwd: string, ): string | null { const settings = asRecord(settingsManager.getGlobalSettings()) ?? {}; - const legacySettings = asRecord(settings["companion-memory-md"]) ?? {}; + const legacySettings = asRecord(settings["clanker-memory-md"]) ?? {}; const configuredRoot = - asString(legacySettings.localPath) ?? join(homedir(), ".companion", "memory-md"); + asString(legacySettings.localPath) ?? join(homedir(), ".clanker", "memory-md"); const legacyRoot = expandHomePath(configuredRoot); const legacyProjectDir = join(legacyRoot, basename(cwd)); if (existsSync(legacyProjectDir)) { @@ -1511,7 +1511,7 @@ function renderMemoryBlock( const coreIds = new Set(coreMemories.map((memory) => memory.id)); if (coreMemories.length > 0) { - lines.push("Companion Memory"); + lines.push("Clanker Memory"); lines.push(""); lines.push("Core memory:"); for (const memory of coreMemories) { @@ -1528,7 +1528,7 @@ function renderMemoryBlock( if (memoryResults.length > 0) { if (lines.length === 0) { - lines.push("Companion Memory"); + lines.push("Clanker Memory"); lines.push(""); } else { lines.push(""); @@ -1541,7 +1541,7 @@ function renderMemoryBlock( if (episodeResults.length > 0) { if (lines.length === 0) { - lines.push("Companion Memory"); + lines.push("Clanker Memory"); lines.push(""); } else { lines.push(""); diff --git a/packages/coding-agent/src/core/messages.ts b/packages/coding-agent/src/core/messages.ts index 314d269..66be3a9 100644 --- a/packages/coding-agent/src/core/messages.ts +++ b/packages/coding-agent/src/core/messages.ts @@ -5,8 +5,8 @@ * and provides a transformer to convert them to LLM-compatible messages. */ -import type { AgentMessage } from "@mariozechner/companion-agent-core"; -import type { ImageContent, Message, TextContent } from "@mariozechner/companion-ai"; +import type { AgentMessage } from "@mariozechner/clanker-agent-core"; +import type { ImageContent, Message, TextContent } from "@mariozechner/clanker-ai"; export const COMPACTION_SUMMARY_PREFIX = `The conversation history before this point was compacted into the following summary: @@ -67,7 +67,7 @@ export interface CompactionSummaryMessage { } // Extend CustomAgentMessages via declaration merging -declare module "@mariozechner/companion-agent-core" { +declare module "@mariozechner/clanker-agent-core" { interface CustomAgentMessages { bashExecution: BashExecutionMessage; custom: CustomMessage; diff --git a/packages/coding-agent/src/core/model-registry.ts b/packages/coding-agent/src/core/model-registry.ts index 4b09062..139eb57 100644 --- a/packages/coding-agent/src/core/model-registry.ts +++ b/packages/coding-agent/src/core/model-registry.ts @@ -16,11 +16,11 @@ import { registerApiProvider, resetApiProviders, type SimpleStreamOptions, -} from "@mariozechner/companion-ai"; +} from "@mariozechner/clanker-ai"; import { registerOAuthProvider, resetOAuthProviders, -} from "@mariozechner/companion-ai/oauth"; +} from "@mariozechner/clanker-ai/oauth"; import { type Static, Type } from "@sinclair/typebox"; import AjvModule from "ajv"; import { existsSync, readFileSync } from "fs"; diff --git a/packages/coding-agent/src/core/model-resolver.ts b/packages/coding-agent/src/core/model-resolver.ts index e50cb58..c6f6757 100644 --- a/packages/coding-agent/src/core/model-resolver.ts +++ b/packages/coding-agent/src/core/model-resolver.ts @@ -2,13 +2,13 @@ * Model resolution, scoping, and initial selection */ -import type { ThinkingLevel } from "@mariozechner/companion-agent-core"; +import type { ThinkingLevel } from "@mariozechner/clanker-agent-core"; import { type Api, type KnownProvider, type Model, modelsAreEqual, -} from "@mariozechner/companion-ai"; +} from "@mariozechner/clanker-ai"; import chalk from "chalk"; import { minimatch } from "minimatch"; import { isValidThinkingLevel } from "../cli/args.js"; diff --git a/packages/coding-agent/src/core/package-manager.ts b/packages/coding-agent/src/core/package-manager.ts index 36acb6c..87de9cd 100644 --- a/packages/coding-agent/src/core/package-manager.ts +++ b/packages/coding-agent/src/core/package-manager.ts @@ -20,7 +20,7 @@ import type { PackageSource, SettingsManager } from "./settings-manager.js"; const NETWORK_TIMEOUT_MS = 10000; function isOfflineModeEnabled(): boolean { - const value = process.env.COMPANION_OFFLINE; + const value = process.env.CLANKER_OFFLINE; if (!value) return false; return ( value === "1" || @@ -445,8 +445,8 @@ function collectAutoThemeEntries(dir: string): string[] { function readPiManifestFile(packageJsonPath: string): PiManifest | null { try { const content = readFileSync(packageJsonPath, "utf-8"); - const pkg = JSON.parse(content) as { companion?: PiManifest }; - return pkg.companion ?? null; + const pkg = JSON.parse(content) as { clanker?: PiManifest }; + return pkg.clanker ?? null; } catch { return null; } @@ -1529,7 +1529,7 @@ export class DefaultPackageManager implements PackageManager { this.ensureGitIgnore(installRoot); const packageJsonPath = join(installRoot, "package.json"); if (!existsSync(packageJsonPath)) { - const pkgJson = { name: "companion-extensions", private: true }; + const pkgJson = { name: "clanker-extensions", private: true }; writeFileSync(packageJsonPath, JSON.stringify(pkgJson, null, 2), "utf-8"); } } @@ -1595,7 +1595,7 @@ export class DefaultPackageManager implements PackageManager { .update(`${prefix}-${suffix ?? ""}`) .digest("hex") .slice(0, 8); - return join(tmpdir(), "companion-extensions", prefix, hash, suffix ?? ""); + return join(tmpdir(), "clanker-extensions", prefix, hash, suffix ?? ""); } private getBaseDirForScope(scope: SourceScope): string { @@ -1784,8 +1784,8 @@ export class DefaultPackageManager implements PackageManager { try { const content = readFileSync(packageJsonPath, "utf-8"); - const pkg = JSON.parse(content) as { companion?: PiManifest }; - return pkg.companion ?? null; + const pkg = JSON.parse(content) as { clanker?: PiManifest }; + return pkg.clanker ?? null; } catch { return null; } diff --git a/packages/coding-agent/src/core/resource-loader.ts b/packages/coding-agent/src/core/resource-loader.ts index ac2680f..79b587d 100644 --- a/packages/coding-agent/src/core/resource-loader.ts +++ b/packages/coding-agent/src/core/resource-loader.ts @@ -120,7 +120,7 @@ function loadNamedContextFileFromDir( } } -const companionContextFilenames = [ +const clankerContextFilenames = [ "IDENTITY.md", "SOUL.md", "USER.md", @@ -154,7 +154,7 @@ function addContextFile( seenPaths.add(file.path); } -function collectCompanionContextDirs(cwd: string, agentDir: string): string[] { +function collectClankerContextDirs(cwd: string, agentDir: string): string[] { const contextDirs: string[] = []; const seenDirs = new Set(); const configDir = dirname(resolve(agentDir)); @@ -232,13 +232,13 @@ function loadProjectContextFiles( loadNamedContextFileFromDir(resolvedAgentDir, "SOUL.md"), ); - for (const companionDir of collectCompanionContextDirs( + for (const clankerDir of collectClankerContextDirs( resolvedCwd, resolvedAgentDir, )) { for (const file of loadNamedContextFilesFromDir( - companionDir, - companionContextFilenames, + clankerDir, + clankerContextFilenames, )) { addContextFile(contextFiles, seenPaths, file); } diff --git a/packages/coding-agent/src/core/sdk.ts b/packages/coding-agent/src/core/sdk.ts index 054fceb..0e5e836 100644 --- a/packages/coding-agent/src/core/sdk.ts +++ b/packages/coding-agent/src/core/sdk.ts @@ -3,8 +3,8 @@ import { Agent, type AgentMessage, type ThinkingLevel, -} from "@mariozechner/companion-agent-core"; -import type { Message, Model } from "@mariozechner/companion-ai"; +} from "@mariozechner/clanker-agent-core"; +import type { Message, Model } from "@mariozechner/clanker-ai"; import { getAgentDir, getDocsPath } from "../config.js"; import { AgentSession } from "./agent-session.js"; import { AuthStorage } from "./auth-storage.js"; @@ -54,7 +54,7 @@ import { export interface CreateAgentSessionOptions { /** Working directory for project-local discovery. Default: process.cwd() */ cwd?: string; - /** Global config directory. Default: ~/.companion/agent */ + /** Global config directory. Default: ~/.clanker/agent */ agentDir?: string; /** Auth storage for credentials. Default: AuthStorage.create(agentDir/auth.json) */ @@ -153,7 +153,7 @@ function getDefaultAgentDir(): string { * const { session } = await createAgentSession(); * * // With explicit model - * import { getModel } from '@mariozechner/companion-ai'; + * import { getModel } from '@mariozechner/clanker-ai'; * const { session } = await createAgentSession({ * model: getModel('anthropic', 'claude-opus-4-6'), * thinkingLevel: 'high', diff --git a/packages/coding-agent/src/core/session-manager.ts b/packages/coding-agent/src/core/session-manager.ts index 5b445d9..287f65e 100644 --- a/packages/coding-agent/src/core/session-manager.ts +++ b/packages/coding-agent/src/core/session-manager.ts @@ -1,5 +1,5 @@ -import type { AgentMessage } from "@mariozechner/companion-agent-core"; -import type { ImageContent, Message, TextContent } from "@mariozechner/companion-ai"; +import type { AgentMessage } from "@mariozechner/clanker-agent-core"; +import type { ImageContent, Message, TextContent } from "@mariozechner/clanker-ai"; import { randomUUID } from "crypto"; import { appendFileSync, @@ -72,7 +72,7 @@ export interface CompactionEntry extends SessionEntryBase { tokensBefore: number; /** Extension-specific data (e.g., ArtifactIndex, version markers for structured compaction) */ details?: T; - /** True if generated by an extension, undefined/false if companion-generated (backward compatible) */ + /** True if generated by an extension, undefined/false if clanker-generated (backward compatible) */ fromHook?: boolean; } @@ -82,7 +82,7 @@ export interface BranchSummaryEntry extends SessionEntryBase { summary: string; /** Extension-specific data (not sent to LLM) */ details?: T; - /** True if generated by an extension, false if companion-generated */ + /** True if generated by an extension, false if clanker-generated */ fromHook?: boolean; } @@ -448,7 +448,7 @@ export function buildSessionContext( /** * Compute the default session directory for a cwd. - * Encodes cwd into a safe directory name under ~/.companion/agent/sessions/. + * Encodes cwd into a safe directory name under ~/.clanker/agent/sessions/. */ function getDefaultSessionDir(cwd: string): string { const safePath = `--${cwd.replace(/^[/\\]/, "").replace(/[/\\:]/g, "-")}--`; @@ -1332,7 +1332,7 @@ export class SessionManager { /** * Create a new session. * @param cwd Working directory (stored in session header) - * @param sessionDir Optional session directory. If omitted, uses default (~/.companion/agent/sessions//). + * @param sessionDir Optional session directory. If omitted, uses default (~/.clanker/agent/sessions//). */ static create(cwd: string, sessionDir?: string): SessionManager { const dir = sessionDir ?? getDefaultSessionDir(cwd); @@ -1359,7 +1359,7 @@ export class SessionManager { /** * Continue the most recent session, or create new if none. * @param cwd Working directory - * @param sessionDir Optional session directory. If omitted, uses default (~/.companion/agent/sessions//). + * @param sessionDir Optional session directory. If omitted, uses default (~/.clanker/agent/sessions//). */ static continueRecent(cwd: string, sessionDir?: string): SessionManager { const dir = sessionDir ?? getDefaultSessionDir(cwd); @@ -1438,7 +1438,7 @@ export class SessionManager { /** * List all sessions for a directory. * @param cwd Working directory (used to compute default session directory) - * @param sessionDir Optional session directory. If omitted, uses default (~/.companion/agent/sessions//). + * @param sessionDir Optional session directory. If omitted, uses default (~/.clanker/agent/sessions//). * @param onProgress Optional callback for progress updates (loaded, total) */ static async list( diff --git a/packages/coding-agent/src/core/settings-manager.ts b/packages/coding-agent/src/core/settings-manager.ts index e0d934a..aef350b 100644 --- a/packages/coding-agent/src/core/settings-manager.ts +++ b/packages/coding-agent/src/core/settings-manager.ts @@ -1,4 +1,4 @@ -import type { Transport } from "@mariozechner/companion-ai"; +import type { Transport } from "@mariozechner/clanker-ai"; import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs"; import { dirname, join } from "path"; import lockfile from "proper-lockfile"; @@ -63,7 +63,7 @@ export interface GatewaySettings { webhook?: GatewayWebhookSettings; } -export interface CompanionMemorySettings { +export interface ClankerMemorySettings { enabled?: boolean; storageDir?: string; maxCoreTokens?: number; @@ -136,7 +136,7 @@ export interface Settings { showHardwareCursor?: boolean; // Show terminal cursor while still positioning it for IME markdown?: MarkdownSettings; gateway?: GatewaySettings; - companionMemory?: CompanionMemorySettings; + clankerMemory?: ClankerMemorySettings; } /** Deep merge settings: project/overrides take precedence, nested objects merge recursively */ @@ -944,7 +944,7 @@ export class SettingsManager { if (this.settings.terminal?.clearOnShrink !== undefined) { return this.settings.terminal.clearOnShrink; } - return process.env.COMPANION_CLEAR_ON_SHRINK === "1"; + return process.env.CLANKER_CLEAR_ON_SHRINK === "1"; } setClearOnShrink(enabled: boolean): void { @@ -1023,7 +1023,7 @@ export class SettingsManager { getShowHardwareCursor(): boolean { return ( - this.settings.showHardwareCursor ?? process.env.COMPANION_HARDWARE_CURSOR === "1" + this.settings.showHardwareCursor ?? process.env.CLANKER_HARDWARE_CURSOR === "1" ); } diff --git a/packages/coding-agent/src/core/skills.ts b/packages/coding-agent/src/core/skills.ts index b8a802c..3797cd8 100644 --- a/packages/coding-agent/src/core/skills.ts +++ b/packages/coding-agent/src/core/skills.ts @@ -361,7 +361,7 @@ function escapeXml(str: string): string { export interface LoadSkillsOptions { /** Working directory for project-local skills. Default: process.cwd() */ cwd?: string; - /** Agent config directory for global skills. Default: ~/.companion/agent */ + /** Agent config directory for global skills. Default: ~/.clanker/agent */ agentDir?: string; /** Explicit skill paths (files or directories) */ skillPaths?: string[]; diff --git a/packages/coding-agent/src/core/slash-commands.ts b/packages/coding-agent/src/core/slash-commands.ts index a636cae..5da117f 100644 --- a/packages/coding-agent/src/core/slash-commands.ts +++ b/packages/coding-agent/src/core/slash-commands.ts @@ -40,5 +40,5 @@ export const BUILTIN_SLASH_COMMANDS: ReadonlyArray = [ name: "reload", description: "Reload extensions, skills, prompts, and themes", }, - { name: "quit", description: "Quit companion" }, + { name: "quit", description: "Quit clanker" }, ]; diff --git a/packages/coding-agent/src/core/system-prompt.ts b/packages/coding-agent/src/core/system-prompt.ts index e6b57ee..a865da9 100644 --- a/packages/coding-agent/src/core/system-prompt.ts +++ b/packages/coding-agent/src/core/system-prompt.ts @@ -243,7 +243,7 @@ export function buildSystemPrompt( const guidelines = guidelinesList.map((g) => `- ${g}`).join("\n"); - let prompt = `You are Companion. You live in a persistent sandbox with a filesystem, a shell, and a browser. Your workspace carries over between sessions. This is your home. + let prompt = `You are Clanker. You live in a persistent sandbox with a filesystem, a shell, and a browser. Your workspace carries over between sessions. This is your home. Never default to "I can't do that." Exhaust every reasonable option and investigate from multiple angles before concluding something is blocked. When blocked, explain why with evidence. diff --git a/packages/coding-agent/src/core/timings.ts b/packages/coding-agent/src/core/timings.ts index e740cd5..f415bf0 100644 --- a/packages/coding-agent/src/core/timings.ts +++ b/packages/coding-agent/src/core/timings.ts @@ -1,9 +1,9 @@ /** * Central timing instrumentation for startup profiling. - * Enable with COMPANION_TIMING=1 environment variable. + * Enable with CLANKER_TIMING=1 environment variable. */ -const ENABLED = process.env.COMPANION_TIMING === "1"; +const ENABLED = process.env.CLANKER_TIMING === "1"; const timings: Array<{ label: string; ms: number }> = []; let lastTime = Date.now(); diff --git a/packages/coding-agent/src/core/tools/bash.ts b/packages/coding-agent/src/core/tools/bash.ts index 13ee3bd..db8e76d 100644 --- a/packages/coding-agent/src/core/tools/bash.ts +++ b/packages/coding-agent/src/core/tools/bash.ts @@ -2,7 +2,7 @@ import { randomBytes } from "node:crypto"; import { createWriteStream, existsSync } from "node:fs"; import { tmpdir } from "node:os"; import { join } from "node:path"; -import type { AgentTool } from "@mariozechner/companion-agent-core"; +import type { AgentTool } from "@mariozechner/clanker-agent-core"; import { type Static, Type } from "@sinclair/typebox"; import { spawn } from "child_process"; import { @@ -23,7 +23,7 @@ import { */ function getTempFilePath(): string { const id = randomBytes(8).toString("hex"); - return join(tmpdir(), `companion-bash-${id}.log`); + return join(tmpdir(), `clanker-bash-${id}.log`); } /** diff --git a/packages/coding-agent/src/core/tools/browser.ts b/packages/coding-agent/src/core/tools/browser.ts index cae7fb8..16260d6 100644 --- a/packages/coding-agent/src/core/tools/browser.ts +++ b/packages/coding-agent/src/core/tools/browser.ts @@ -3,7 +3,7 @@ import { randomBytes } from "node:crypto"; import { existsSync, mkdirSync } from "node:fs"; import { tmpdir } from "node:os"; import { join, resolve } from "node:path"; -import type { AgentTool } from "@mariozechner/companion-agent-core"; +import type { AgentTool } from "@mariozechner/clanker-agent-core"; import { type Static, Type } from "@sinclair/typebox"; import { getAgentDir } from "../../config.js"; import { @@ -28,7 +28,7 @@ const browserSnapshotModes = ["interactive", "full"] as const; const browserLoadStates = ["load", "domcontentloaded", "networkidle"] as const; const DEFAULT_BROWSER_COMMAND = - process.env.COMPANION_AGENT_BROWSER_COMMAND || "agent-browser"; + process.env.CLANKER_AGENT_BROWSER_COMMAND || "agent-browser"; const DEFAULT_BROWSER_TIMEOUT_SECONDS = 90; const browserSchema = Type.Object({ @@ -78,7 +78,7 @@ const browserSchema = Type.Object({ stateName: Type.Optional( Type.String({ description: - "Named browser state checkpoint stored under ~/.companion/agent/browser/states/", + "Named browser state checkpoint stored under ~/.clanker/agent/browser/states/", }), ), }); @@ -232,7 +232,7 @@ function getBrowserStateDir(cwd: string, options?: BrowserToolOptions): string { function createTempScreenshotPath(): string { const id = randomBytes(8).toString("hex"); - return join(tmpdir(), `companion-browser-screenshot-${id}.png`); + return join(tmpdir(), `clanker-browser-screenshot-${id}.png`); } function normalizeOutput(chunks: Buffer[]): string { @@ -285,14 +285,14 @@ function shouldLaunchHeaded(options?: BrowserToolOptions): boolean { if (options?.headed !== undefined) { return options.headed; } - return isTruthyEnv(process.env.COMPANION_AGENT_BROWSER_HEADED); + return isTruthyEnv(process.env.CLANKER_AGENT_BROWSER_HEADED); } function getBrowserWindowClass( options?: BrowserToolOptions, ): string | undefined { const rawValue = - options?.windowClass ?? process.env.COMPANION_BROWSER_WINDOW_CLASS; + options?.windowClass ?? process.env.CLANKER_BROWSER_WINDOW_CLASS; const windowClass = rawValue?.trim(); return windowClass ? windowClass : undefined; } diff --git a/packages/coding-agent/src/core/tools/computer.ts b/packages/coding-agent/src/core/tools/computer.ts index f8ea171..be750ee 100644 --- a/packages/coding-agent/src/core/tools/computer.ts +++ b/packages/coding-agent/src/core/tools/computer.ts @@ -1,7 +1,7 @@ import { spawn } from "node:child_process"; import { mkdirSync } from "node:fs"; import { join, resolve } from "node:path"; -import type { AgentTool } from "@mariozechner/companion-agent-core"; +import type { AgentTool } from "@mariozechner/clanker-agent-core"; import { type Static, Type } from "@sinclair/typebox"; import { getAgentDir } from "../../config.js"; import { @@ -34,7 +34,7 @@ const computerObservationModes = ["hybrid", "ocr"] as const; const computerSnapshotIdPattern = /^[A-Za-z0-9_-]+$/; const DEFAULT_COMPUTER_COMMAND = - process.env.COMPANION_AGENT_COMPUTER_COMMAND || "agent-computer"; + process.env.CLANKER_AGENT_COMPUTER_COMMAND || "agent-computer"; const DEFAULT_COMPUTER_TIMEOUT_SECONDS = 90; const computerSchema = Type.Object({ diff --git a/packages/coding-agent/src/core/tools/edit.ts b/packages/coding-agent/src/core/tools/edit.ts index 636cbeb..eaae0ce 100644 --- a/packages/coding-agent/src/core/tools/edit.ts +++ b/packages/coding-agent/src/core/tools/edit.ts @@ -1,4 +1,4 @@ -import type { AgentTool } from "@mariozechner/companion-agent-core"; +import type { AgentTool } from "@mariozechner/clanker-agent-core"; import { type Static, Type } from "@sinclair/typebox"; import { constants } from "fs"; import { diff --git a/packages/coding-agent/src/core/tools/find.ts b/packages/coding-agent/src/core/tools/find.ts index 660e8c3..1cc535c 100644 --- a/packages/coding-agent/src/core/tools/find.ts +++ b/packages/coding-agent/src/core/tools/find.ts @@ -1,4 +1,4 @@ -import type { AgentTool } from "@mariozechner/companion-agent-core"; +import type { AgentTool } from "@mariozechner/clanker-agent-core"; import { type Static, Type } from "@sinclair/typebox"; import { spawnSync } from "child_process"; import { existsSync } from "fs"; diff --git a/packages/coding-agent/src/core/tools/grep.ts b/packages/coding-agent/src/core/tools/grep.ts index 9653efe..03c9ede 100644 --- a/packages/coding-agent/src/core/tools/grep.ts +++ b/packages/coding-agent/src/core/tools/grep.ts @@ -1,5 +1,5 @@ import { createInterface } from "node:readline"; -import type { AgentTool } from "@mariozechner/companion-agent-core"; +import type { AgentTool } from "@mariozechner/clanker-agent-core"; import { type Static, Type } from "@sinclair/typebox"; import { spawn } from "child_process"; import { readFileSync, statSync } from "fs"; diff --git a/packages/coding-agent/src/core/tools/index.ts b/packages/coding-agent/src/core/tools/index.ts index d2e1588..c19e422 100644 --- a/packages/coding-agent/src/core/tools/index.ts +++ b/packages/coding-agent/src/core/tools/index.ts @@ -87,7 +87,7 @@ export { writeTool, } from "./write.js"; -import type { AgentTool } from "@mariozechner/companion-agent-core"; +import type { AgentTool } from "@mariozechner/clanker-agent-core"; import { type BashToolOptions, bashTool, createBashTool } from "./bash.js"; import { browserTool, @@ -106,7 +106,7 @@ import { createLsTool, lsTool } from "./ls.js"; import { createReadTool, type ReadToolOptions, readTool } from "./read.js"; import { createWriteTool, writeTool } from "./write.js"; -/** Tool type (AgentTool from companion-ai) */ +/** Tool type (AgentTool from clanker-ai) */ export type Tool = AgentTool; // Read-only tools for exploration without modification (using process.cwd()) diff --git a/packages/coding-agent/src/core/tools/ls.ts b/packages/coding-agent/src/core/tools/ls.ts index cdd149e..c746b1c 100644 --- a/packages/coding-agent/src/core/tools/ls.ts +++ b/packages/coding-agent/src/core/tools/ls.ts @@ -1,4 +1,4 @@ -import type { AgentTool } from "@mariozechner/companion-agent-core"; +import type { AgentTool } from "@mariozechner/clanker-agent-core"; import { type Static, Type } from "@sinclair/typebox"; import { existsSync, readdirSync, statSync } from "fs"; import nodePath from "path"; diff --git a/packages/coding-agent/src/core/tools/read.ts b/packages/coding-agent/src/core/tools/read.ts index 574b927..f238a16 100644 --- a/packages/coding-agent/src/core/tools/read.ts +++ b/packages/coding-agent/src/core/tools/read.ts @@ -1,5 +1,5 @@ -import type { AgentTool } from "@mariozechner/companion-agent-core"; -import type { ImageContent, TextContent } from "@mariozechner/companion-ai"; +import type { AgentTool } from "@mariozechner/clanker-agent-core"; +import type { ImageContent, TextContent } from "@mariozechner/clanker-ai"; import { type Static, Type } from "@sinclair/typebox"; import { constants } from "fs"; import { access as fsAccess, readFile as fsReadFile } from "fs/promises"; diff --git a/packages/coding-agent/src/core/tools/write.ts b/packages/coding-agent/src/core/tools/write.ts index 3cabd52..2ada71e 100644 --- a/packages/coding-agent/src/core/tools/write.ts +++ b/packages/coding-agent/src/core/tools/write.ts @@ -1,4 +1,4 @@ -import type { AgentTool } from "@mariozechner/companion-agent-core"; +import type { AgentTool } from "@mariozechner/clanker-agent-core"; import { type Static, Type } from "@sinclair/typebox"; import { mkdir as fsMkdir, writeFile as fsWriteFile } from "fs/promises"; import { dirname } from "path"; diff --git a/packages/coding-agent/src/main.ts b/packages/coding-agent/src/main.ts index 80e67cc..202ca24 100644 --- a/packages/coding-agent/src/main.ts +++ b/packages/coding-agent/src/main.ts @@ -10,7 +10,7 @@ import { type ImageContent, modelsAreEqual, supportsXhigh, -} from "@mariozechner/companion-ai"; +} from "@mariozechner/clanker-ai"; import chalk from "chalk"; import { createInterface } from "readline"; import { type Args, parseArgs, printHelp } from "./cli/args.js"; @@ -123,7 +123,7 @@ function printDaemonHelp(): void { ${APP_NAME} gateway [options] [messages...] ${APP_NAME} daemon [options] [messages...] -Run companion as a long-lived gateway (non-interactive) with extensions enabled. +Run clanker as a long-lived gateway (non-interactive) with extensions enabled. Messages passed as positional args are sent once at startup. Options: @@ -154,7 +154,7 @@ function printPackageCommandHelp(command: PackageCommand): void { Install a package and add it to settings. Options: - -l, --local Install project-locally (.companion/settings.json) + -l, --local Install project-locally (.clanker/settings.json) Examples: ${APP_NAME} install npm:@foo/bar @@ -173,7 +173,7 @@ Examples: Remove a package and its source from settings. Options: - -l, --local Remove from project settings (.companion/settings.json) + -l, --local Remove from project settings (.clanker/settings.json) Example: ${APP_NAME} remove npm:@foo/bar @@ -661,10 +661,10 @@ export async function main(args: string[]) { const isGatewayCommand = args[0] === "daemon" || args[0] === "gateway"; const parsedArgs = isGatewayCommand ? args.slice(1) : args; const offlineMode = - parsedArgs.includes("--offline") || isTruthyEnvFlag(process.env.COMPANION_OFFLINE); + parsedArgs.includes("--offline") || isTruthyEnvFlag(process.env.CLANKER_OFFLINE); if (offlineMode) { - process.env.COMPANION_OFFLINE = "1"; - process.env.COMPANION_SKIP_VERSION_CHECK = "1"; + process.env.CLANKER_OFFLINE = "1"; + process.env.CLANKER_SKIP_VERSION_CHECK = "1"; } if (await handlePackageCommand(args)) { @@ -993,7 +993,7 @@ export async function main(args: string[]) { } catch (error) { const message = error instanceof Error ? error.stack || error.message : String(error); - console.error(`[companion-gateway] daemon crashed: ${message}`); + console.error(`[clanker-gateway] daemon crashed: ${message}`); try { session.dispose(); } catch { @@ -1005,20 +1005,20 @@ export async function main(args: string[]) { if (runtimeMs < GATEWAY_MIN_RUNTIME_MS) { consecutiveFailures += 1; console.error( - `[companion-gateway] exited quickly (${runtimeMs}ms), failure ${consecutiveFailures}/${GATEWAY_MAX_CONSECUTIVE_FAILURES}`, + `[clanker-gateway] exited quickly (${runtimeMs}ms), failure ${consecutiveFailures}/${GATEWAY_MAX_CONSECUTIVE_FAILURES}`, ); if (consecutiveFailures >= GATEWAY_MAX_CONSECUTIVE_FAILURES) { - console.error("[companion-gateway] crash loop detected, exiting"); + console.error("[clanker-gateway] crash loop detected, exiting"); process.exit(1); } } else { consecutiveFailures = 0; - console.error(`[companion-gateway] exited after ${runtimeMs}ms, restarting`); + console.error(`[clanker-gateway] exited after ${runtimeMs}ms, restarting`); } if (GATEWAY_RESTART_DELAY_MS > 0) { console.error( - `[companion-gateway] restarting in ${GATEWAY_RESTART_DELAY_MS}ms`, + `[clanker-gateway] restarting in ${GATEWAY_RESTART_DELAY_MS}ms`, ); await sleep(GATEWAY_RESTART_DELAY_MS); } diff --git a/packages/coding-agent/src/migrations.ts b/packages/coding-agent/src/migrations.ts index adbfe4c..1c6c0f7 100644 --- a/packages/coding-agent/src/migrations.ts +++ b/packages/coding-agent/src/migrations.ts @@ -16,9 +16,9 @@ import { dirname, join } from "path"; import { CONFIG_DIR_NAME, getAgentDir, getBinDir } from "./config.js"; const MIGRATION_GUIDE_URL = - "https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/CHANGELOG.md#extensions-migration"; + "https://github.com/badlogic/clanker-mono/blob/main/packages/coding-agent/CHANGELOG.md#extensions-migration"; const EXTENSIONS_DOC_URL = - "https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/docs/extensions.md"; + "https://github.com/badlogic/clanker-mono/blob/main/packages/coding-agent/docs/extensions.md"; /** * Migrate legacy oauth.json and settings.json apiKeys to auth.json. @@ -80,13 +80,13 @@ export function migrateAuthToAuthJson(): string[] { } /** - * Migrate sessions from ~/.companion/agent/*.jsonl to proper session directories. + * Migrate sessions from ~/.clanker/agent/*.jsonl to proper session directories. * - * Bug in v0.30.0: Sessions were saved to ~/.companion/agent/ instead of - * ~/.companion/agent/sessions//. This migration moves them + * Bug in v0.30.0: Sessions were saved to ~/.clanker/agent/ instead of + * ~/.clanker/agent/sessions//. This migration moves them * to the correct location based on the cwd in their session header. * - * See: https://github.com/badlogic/companion-mono/issues/320 + * See: https://github.com/badlogic/clanker-mono/issues/320 */ export function migrateSessionsFromAgentRoot(): void { const agentDir = getAgentDir(); @@ -207,7 +207,7 @@ function migrateToolsToBin(): void { /** * Check for deprecated hooks/ and tools/ directories. - * Note: tools/ may contain fd/rg binaries extracted by companion, so only warn if it has other files. + * Note: tools/ may contain fd/rg binaries extracted by clanker, so only warn if it has other files. */ function checkDeprecatedExtensionDirs( baseDir: string, diff --git a/packages/coding-agent/src/modes/daemon-mode.ts b/packages/coding-agent/src/modes/daemon-mode.ts index 8eb4633..6f2927a 100644 --- a/packages/coding-agent/src/modes/daemon-mode.ts +++ b/packages/coding-agent/src/modes/daemon-mode.ts @@ -6,7 +6,7 @@ * until explicitly stopped. */ -import type { ImageContent } from "@mariozechner/companion-ai"; +import type { ImageContent } from "@mariozechner/clanker-ai"; import type { AgentSession } from "../core/agent-session.js"; import { GatewayRuntime, @@ -98,13 +98,13 @@ export async function runDaemonMode( resolveReady = resolve; }); const gatewayBind = - process.env.COMPANION_GATEWAY_BIND ?? options.gateway.bind ?? "127.0.0.1"; + process.env.CLANKER_GATEWAY_BIND ?? options.gateway.bind ?? "127.0.0.1"; const gatewayPort = - Number.parseInt(process.env.COMPANION_GATEWAY_PORT ?? "", 10) || + Number.parseInt(process.env.CLANKER_GATEWAY_PORT ?? "", 10) || options.gateway.port || 8787; const gatewayToken = - process.env.COMPANION_GATEWAY_TOKEN ?? options.gateway.bearerToken; + process.env.CLANKER_GATEWAY_TOKEN ?? options.gateway.bearerToken; const gateway = new GatewayRuntime({ config: { bind: gatewayBind, @@ -118,7 +118,7 @@ export async function runDaemonMode( enabled: options.gateway.webhook?.enabled ?? true, basePath: options.gateway.webhook?.basePath ?? "/webhooks", secret: - process.env.COMPANION_GATEWAY_WEBHOOK_SECRET ?? + process.env.CLANKER_GATEWAY_WEBHOOK_SECRET ?? options.gateway.webhook?.secret, }, }, @@ -126,7 +126,7 @@ export async function runDaemonMode( primarySession: session, createSession: options.createSession, log: (message) => { - console.error(`[companion-gateway] ${message}`); + console.error(`[clanker-gateway] ${message}`); }, }); setActiveGatewayRuntime(gateway); @@ -135,7 +135,7 @@ export async function runDaemonMode( if (isShuttingDown) return; isShuttingDown = true; - console.error(`[companion-gateway] shutdown requested: ${reason}`); + console.error(`[clanker-gateway] shutdown requested: ${reason}`); setActiveGatewayRuntime(null); await gateway.stop(); @@ -151,7 +151,7 @@ export async function runDaemonMode( const handleShutdownSignal = (signal: NodeJS.Signals) => { void shutdown("signal").catch((error) => { console.error( - `[companion-gateway] shutdown failed for ${signal}: ${error instanceof Error ? error.message : String(error)}`, + `[clanker-gateway] shutdown failed for ${signal}: ${error instanceof Error ? error.message : String(error)}`, ); resolveReady({ reason: "shutdown" }); }); @@ -162,7 +162,7 @@ export async function runDaemonMode( const sighupHandler = () => handleShutdownSignal("SIGHUP"); const unhandledRejectionHandler = (error: unknown) => { console.error( - `[companion-gateway] unhandled rejection: ${error instanceof Error ? error.message : String(error)}`, + `[clanker-gateway] unhandled rejection: ${error instanceof Error ? error.message : String(error)}`, ); }; @@ -177,7 +177,7 @@ export async function runDaemonMode( shutdownHandler: () => { void shutdown("extension").catch((error) => { console.error( - `[companion-gateway] extension shutdown failed: ${error instanceof Error ? error.message : String(error)}`, + `[clanker-gateway] extension shutdown failed: ${error instanceof Error ? error.message : String(error)}`, ); resolveReady({ reason: "shutdown" }); }); @@ -208,7 +208,7 @@ export async function runDaemonMode( await gateway.start(); console.error( - `[companion-gateway] startup complete (session=${session.sessionId ?? "unknown"}, bind=${gatewayBind}, port=${gatewayPort})`, + `[clanker-gateway] startup complete (session=${session.sessionId ?? "unknown"}, bind=${gatewayBind}, port=${gatewayPort})`, ); // Keep process alive forever. diff --git a/packages/coding-agent/src/modes/interactive/components/armin.ts b/packages/coding-agent/src/modes/interactive/components/armin.ts index 9e06d76..8607dbc 100644 --- a/packages/coding-agent/src/modes/interactive/components/armin.ts +++ b/packages/coding-agent/src/modes/interactive/components/armin.ts @@ -2,7 +2,7 @@ * Armin says hi! A fun easter egg with animated XBM art. */ -import type { Component, TUI } from "@mariozechner/companion-tui"; +import type { Component, TUI } from "@mariozechner/clanker-tui"; import { theme } from "../theme/theme.js"; // XBM image: 31x36 pixels, LSB first, 1=background, 0=foreground diff --git a/packages/coding-agent/src/modes/interactive/components/assistant-message.ts b/packages/coding-agent/src/modes/interactive/components/assistant-message.ts index 82e4023..519e5e0 100644 --- a/packages/coding-agent/src/modes/interactive/components/assistant-message.ts +++ b/packages/coding-agent/src/modes/interactive/components/assistant-message.ts @@ -1,11 +1,11 @@ -import type { AssistantMessage } from "@mariozechner/companion-ai"; +import type { AssistantMessage } from "@mariozechner/clanker-ai"; import { Container, Markdown, type MarkdownTheme, Spacer, Text, -} from "@mariozechner/companion-tui"; +} from "@mariozechner/clanker-tui"; import { getMarkdownTheme, theme } from "../theme/theme.js"; /** diff --git a/packages/coding-agent/src/modes/interactive/components/bash-execution.ts b/packages/coding-agent/src/modes/interactive/components/bash-execution.ts index 00c4b09..1652d1e 100644 --- a/packages/coding-agent/src/modes/interactive/components/bash-execution.ts +++ b/packages/coding-agent/src/modes/interactive/components/bash-execution.ts @@ -8,7 +8,7 @@ import { Spacer, Text, type TUI, -} from "@mariozechner/companion-tui"; +} from "@mariozechner/clanker-tui"; import stripAnsi from "strip-ansi"; import { DEFAULT_MAX_BYTES, diff --git a/packages/coding-agent/src/modes/interactive/components/bordered-loader.ts b/packages/coding-agent/src/modes/interactive/components/bordered-loader.ts index 3c07740..d05e63a 100644 --- a/packages/coding-agent/src/modes/interactive/components/bordered-loader.ts +++ b/packages/coding-agent/src/modes/interactive/components/bordered-loader.ts @@ -5,7 +5,7 @@ import { Spacer, Text, type TUI, -} from "@mariozechner/companion-tui"; +} from "@mariozechner/clanker-tui"; import type { Theme } from "../theme/theme.js"; import { DynamicBorder } from "./dynamic-border.js"; import { keyHint } from "./keybinding-hints.js"; diff --git a/packages/coding-agent/src/modes/interactive/components/branch-summary-message.ts b/packages/coding-agent/src/modes/interactive/components/branch-summary-message.ts index 1d3a125..370c2d3 100644 --- a/packages/coding-agent/src/modes/interactive/components/branch-summary-message.ts +++ b/packages/coding-agent/src/modes/interactive/components/branch-summary-message.ts @@ -4,7 +4,7 @@ import { type MarkdownTheme, Spacer, Text, -} from "@mariozechner/companion-tui"; +} from "@mariozechner/clanker-tui"; import type { BranchSummaryMessage } from "../../../core/messages.js"; import { getMarkdownTheme, theme } from "../theme/theme.js"; import { editorKey } from "./keybinding-hints.js"; diff --git a/packages/coding-agent/src/modes/interactive/components/compaction-summary-message.ts b/packages/coding-agent/src/modes/interactive/components/compaction-summary-message.ts index d7e0175..790c4e6 100644 --- a/packages/coding-agent/src/modes/interactive/components/compaction-summary-message.ts +++ b/packages/coding-agent/src/modes/interactive/components/compaction-summary-message.ts @@ -4,7 +4,7 @@ import { type MarkdownTheme, Spacer, Text, -} from "@mariozechner/companion-tui"; +} from "@mariozechner/clanker-tui"; import type { CompactionSummaryMessage } from "../../../core/messages.js"; import { getMarkdownTheme, theme } from "../theme/theme.js"; import { editorKey } from "./keybinding-hints.js"; diff --git a/packages/coding-agent/src/modes/interactive/components/config-selector.ts b/packages/coding-agent/src/modes/interactive/components/config-selector.ts index f567837..2186381 100644 --- a/packages/coding-agent/src/modes/interactive/components/config-selector.ts +++ b/packages/coding-agent/src/modes/interactive/components/config-selector.ts @@ -13,7 +13,7 @@ import { Spacer, truncateToWidth, visibleWidth, -} from "@mariozechner/companion-tui"; +} from "@mariozechner/clanker-tui"; import { CONFIG_DIR_NAME } from "../../../config.js"; import type { PathMetadata, @@ -68,7 +68,7 @@ function getGroupLabel(metadata: PathMetadata): string { } // Top-level resources if (metadata.source === "auto") { - return metadata.scope === "user" ? "User (~/.companion/agent/)" : "Project (.companion/)"; + return metadata.scope === "user" ? "User (~/.clanker/agent/)" : "Project (.clanker/)"; } return metadata.scope === "user" ? "User settings" : "Project settings"; } diff --git a/packages/coding-agent/src/modes/interactive/components/countdown-timer.ts b/packages/coding-agent/src/modes/interactive/components/countdown-timer.ts index 6155917..9f0b31a 100644 --- a/packages/coding-agent/src/modes/interactive/components/countdown-timer.ts +++ b/packages/coding-agent/src/modes/interactive/components/countdown-timer.ts @@ -2,7 +2,7 @@ * Reusable countdown timer for dialog components. */ -import type { TUI } from "@mariozechner/companion-tui"; +import type { TUI } from "@mariozechner/clanker-tui"; export class CountdownTimer { private intervalId: ReturnType | undefined; diff --git a/packages/coding-agent/src/modes/interactive/components/custom-editor.ts b/packages/coding-agent/src/modes/interactive/components/custom-editor.ts index ca811b8..42e4adf 100644 --- a/packages/coding-agent/src/modes/interactive/components/custom-editor.ts +++ b/packages/coding-agent/src/modes/interactive/components/custom-editor.ts @@ -3,7 +3,7 @@ import { type EditorOptions, type EditorTheme, type TUI, -} from "@mariozechner/companion-tui"; +} from "@mariozechner/clanker-tui"; import type { AppAction, KeybindingsManager, diff --git a/packages/coding-agent/src/modes/interactive/components/custom-message.ts b/packages/coding-agent/src/modes/interactive/components/custom-message.ts index 99fd800..765cce8 100644 --- a/packages/coding-agent/src/modes/interactive/components/custom-message.ts +++ b/packages/coding-agent/src/modes/interactive/components/custom-message.ts @@ -1,5 +1,5 @@ -import type { TextContent } from "@mariozechner/companion-ai"; -import type { Component } from "@mariozechner/companion-tui"; +import type { TextContent } from "@mariozechner/clanker-ai"; +import type { Component } from "@mariozechner/clanker-tui"; import { Box, Container, @@ -7,7 +7,7 @@ import { type MarkdownTheme, Spacer, Text, -} from "@mariozechner/companion-tui"; +} from "@mariozechner/clanker-tui"; import type { MessageRenderer } from "../../../core/extensions/types.js"; import type { CustomMessage } from "../../../core/messages.js"; import { getMarkdownTheme, theme } from "../theme/theme.js"; diff --git a/packages/coding-agent/src/modes/interactive/components/daxnuts.ts b/packages/coding-agent/src/modes/interactive/components/daxnuts.ts index bf512ee..a6a3224 100644 --- a/packages/coding-agent/src/modes/interactive/components/daxnuts.ts +++ b/packages/coding-agent/src/modes/interactive/components/daxnuts.ts @@ -4,7 +4,7 @@ * A heartfelt tribute to dax (@thdxr) for providing free Kimi K2.5 access via OpenCode. */ -import type { Component, TUI } from "@mariozechner/companion-tui"; +import type { Component, TUI } from "@mariozechner/clanker-tui"; import { theme } from "../theme/theme.js"; // 32x32 RGB image of dax, hex encoded (3 bytes per pixel) diff --git a/packages/coding-agent/src/modes/interactive/components/dynamic-border.ts b/packages/coding-agent/src/modes/interactive/components/dynamic-border.ts index 9ef1b21..113aa5e 100644 --- a/packages/coding-agent/src/modes/interactive/components/dynamic-border.ts +++ b/packages/coding-agent/src/modes/interactive/components/dynamic-border.ts @@ -1,4 +1,4 @@ -import type { Component } from "@mariozechner/companion-tui"; +import type { Component } from "@mariozechner/clanker-tui"; import { theme } from "../theme/theme.js"; /** diff --git a/packages/coding-agent/src/modes/interactive/components/extension-editor.ts b/packages/coding-agent/src/modes/interactive/components/extension-editor.ts index 20db317..4b9e4a5 100644 --- a/packages/coding-agent/src/modes/interactive/components/extension-editor.ts +++ b/packages/coding-agent/src/modes/interactive/components/extension-editor.ts @@ -16,7 +16,7 @@ import { Spacer, Text, type TUI, -} from "@mariozechner/companion-tui"; +} from "@mariozechner/clanker-tui"; import type { KeybindingsManager } from "../../../core/keybindings.js"; import { getEditorTheme, theme } from "../theme/theme.js"; import { DynamicBorder } from "./dynamic-border.js"; @@ -121,7 +121,7 @@ export class ExtensionEditorComponent extends Container implements Focusable { const currentText = this.editor.getText(); const tmpFile = path.join( os.tmpdir(), - `companion-extension-editor-${Date.now()}.md`, + `clanker-extension-editor-${Date.now()}.md`, ); try { diff --git a/packages/coding-agent/src/modes/interactive/components/extension-input.ts b/packages/coding-agent/src/modes/interactive/components/extension-input.ts index 9372165..2a552e4 100644 --- a/packages/coding-agent/src/modes/interactive/components/extension-input.ts +++ b/packages/coding-agent/src/modes/interactive/components/extension-input.ts @@ -10,7 +10,7 @@ import { Spacer, Text, type TUI, -} from "@mariozechner/companion-tui"; +} from "@mariozechner/clanker-tui"; import { theme } from "../theme/theme.js"; import { CountdownTimer } from "./countdown-timer.js"; import { DynamicBorder } from "./dynamic-border.js"; diff --git a/packages/coding-agent/src/modes/interactive/components/extension-selector.ts b/packages/coding-agent/src/modes/interactive/components/extension-selector.ts index 396d90a..0356b44 100644 --- a/packages/coding-agent/src/modes/interactive/components/extension-selector.ts +++ b/packages/coding-agent/src/modes/interactive/components/extension-selector.ts @@ -9,7 +9,7 @@ import { Spacer, Text, type TUI, -} from "@mariozechner/companion-tui"; +} from "@mariozechner/clanker-tui"; import { theme } from "../theme/theme.js"; import { CountdownTimer } from "./countdown-timer.js"; import { DynamicBorder } from "./dynamic-border.js"; diff --git a/packages/coding-agent/src/modes/interactive/components/footer.ts b/packages/coding-agent/src/modes/interactive/components/footer.ts index cecdc7c..e12dfe6 100644 --- a/packages/coding-agent/src/modes/interactive/components/footer.ts +++ b/packages/coding-agent/src/modes/interactive/components/footer.ts @@ -2,7 +2,7 @@ import { type Component, truncateToWidth, visibleWidth, -} from "@mariozechner/companion-tui"; +} from "@mariozechner/clanker-tui"; import type { AgentSession } from "../../../core/agent-session.js"; import type { ReadonlyFooterDataProvider } from "../../../core/footer-data-provider.js"; import { theme } from "../theme/theme.js"; diff --git a/packages/coding-agent/src/modes/interactive/components/keybinding-hints.ts b/packages/coding-agent/src/modes/interactive/components/keybinding-hints.ts index 6ca7465..be09259 100644 --- a/packages/coding-agent/src/modes/interactive/components/keybinding-hints.ts +++ b/packages/coding-agent/src/modes/interactive/components/keybinding-hints.ts @@ -6,7 +6,7 @@ import { type EditorAction, getEditorKeybindings, type KeyId, -} from "@mariozechner/companion-tui"; +} from "@mariozechner/clanker-tui"; import type { AppAction, KeybindingsManager, diff --git a/packages/coding-agent/src/modes/interactive/components/login-dialog.ts b/packages/coding-agent/src/modes/interactive/components/login-dialog.ts index 30ade22..0b08c5a 100644 --- a/packages/coding-agent/src/modes/interactive/components/login-dialog.ts +++ b/packages/coding-agent/src/modes/interactive/components/login-dialog.ts @@ -1,4 +1,4 @@ -import { getOAuthProviders } from "@mariozechner/companion-ai/oauth"; +import { getOAuthProviders } from "@mariozechner/clanker-ai/oauth"; import { Container, type Focusable, @@ -7,7 +7,7 @@ import { Spacer, Text, type TUI, -} from "@mariozechner/companion-tui"; +} from "@mariozechner/clanker-tui"; import { exec } from "child_process"; import { theme } from "../theme/theme.js"; import { DynamicBorder } from "./dynamic-border.js"; diff --git a/packages/coding-agent/src/modes/interactive/components/model-selector.ts b/packages/coding-agent/src/modes/interactive/components/model-selector.ts index 7e40a5a..9683626 100644 --- a/packages/coding-agent/src/modes/interactive/components/model-selector.ts +++ b/packages/coding-agent/src/modes/interactive/components/model-selector.ts @@ -1,4 +1,4 @@ -import { type Model, modelsAreEqual } from "@mariozechner/companion-ai"; +import { type Model, modelsAreEqual } from "@mariozechner/clanker-ai"; import { Container, type Focusable, @@ -8,7 +8,7 @@ import { Spacer, Text, type TUI, -} from "@mariozechner/companion-tui"; +} from "@mariozechner/clanker-tui"; import type { ModelRegistry } from "../../../core/model-registry.js"; import type { SettingsManager } from "../../../core/settings-manager.js"; import { theme } from "../theme/theme.js"; diff --git a/packages/coding-agent/src/modes/interactive/components/oauth-selector.ts b/packages/coding-agent/src/modes/interactive/components/oauth-selector.ts index 7792afe..e873f57 100644 --- a/packages/coding-agent/src/modes/interactive/components/oauth-selector.ts +++ b/packages/coding-agent/src/modes/interactive/components/oauth-selector.ts @@ -1,11 +1,11 @@ -import type { OAuthProviderInterface } from "@mariozechner/companion-ai"; -import { getOAuthProviders } from "@mariozechner/companion-ai/oauth"; +import type { OAuthProviderInterface } from "@mariozechner/clanker-ai"; +import { getOAuthProviders } from "@mariozechner/clanker-ai/oauth"; import { Container, getEditorKeybindings, Spacer, TruncatedText, -} from "@mariozechner/companion-tui"; +} from "@mariozechner/clanker-tui"; import type { AuthStorage } from "../../../core/auth-storage.js"; import { theme } from "../theme/theme.js"; import { DynamicBorder } from "./dynamic-border.js"; diff --git a/packages/coding-agent/src/modes/interactive/components/scoped-models-selector.ts b/packages/coding-agent/src/modes/interactive/components/scoped-models-selector.ts index d439542..df828ed 100644 --- a/packages/coding-agent/src/modes/interactive/components/scoped-models-selector.ts +++ b/packages/coding-agent/src/modes/interactive/components/scoped-models-selector.ts @@ -1,4 +1,4 @@ -import type { Model } from "@mariozechner/companion-ai"; +import type { Model } from "@mariozechner/clanker-ai"; import { Container, type Focusable, @@ -9,7 +9,7 @@ import { matchesKey, Spacer, Text, -} from "@mariozechner/companion-tui"; +} from "@mariozechner/clanker-tui"; import { theme } from "../theme/theme.js"; import { DynamicBorder } from "./dynamic-border.js"; diff --git a/packages/coding-agent/src/modes/interactive/components/session-selector-search.ts b/packages/coding-agent/src/modes/interactive/components/session-selector-search.ts index c857f6c..885a05a 100644 --- a/packages/coding-agent/src/modes/interactive/components/session-selector-search.ts +++ b/packages/coding-agent/src/modes/interactive/components/session-selector-search.ts @@ -1,4 +1,4 @@ -import { fuzzyMatch } from "@mariozechner/companion-tui"; +import { fuzzyMatch } from "@mariozechner/clanker-tui"; import type { SessionInfo } from "../../../core/session-manager.js"; export type SortMode = "threaded" | "recent" | "relevance"; diff --git a/packages/coding-agent/src/modes/interactive/components/session-selector.ts b/packages/coding-agent/src/modes/interactive/components/session-selector.ts index 25334fe..fdf5331 100644 --- a/packages/coding-agent/src/modes/interactive/components/session-selector.ts +++ b/packages/coding-agent/src/modes/interactive/components/session-selector.ts @@ -13,7 +13,7 @@ import { Text, truncateToWidth, visibleWidth, -} from "@mariozechner/companion-tui"; +} from "@mariozechner/clanker-tui"; import { KeybindingsManager } from "../../../core/keybindings.js"; import type { SessionInfo, @@ -607,7 +607,7 @@ class SessionList implements Component, Focusable { void this.onDeleteSession?.(pathToDelete); return; } - // Allow both Escape and Ctrl+C to cancel (consistent with companion UX) + // Allow both Escape and Ctrl+C to cancel (consistent with clanker UX) if ( kb.matches(keyData, "selectCancel") || matchesKey(keyData, "ctrl+c") diff --git a/packages/coding-agent/src/modes/interactive/components/settings-selector.ts b/packages/coding-agent/src/modes/interactive/components/settings-selector.ts index dc8653d..0a61776 100644 --- a/packages/coding-agent/src/modes/interactive/components/settings-selector.ts +++ b/packages/coding-agent/src/modes/interactive/components/settings-selector.ts @@ -1,5 +1,5 @@ -import type { ThinkingLevel } from "@mariozechner/companion-agent-core"; -import type { Transport } from "@mariozechner/companion-ai"; +import type { ThinkingLevel } from "@mariozechner/clanker-agent-core"; +import type { Transport } from "@mariozechner/clanker-ai"; import { Container, getCapabilities, @@ -9,7 +9,7 @@ import { SettingsList, Spacer, Text, -} from "@mariozechner/companion-tui"; +} from "@mariozechner/clanker-tui"; import { getSelectListTheme, getSettingsListTheme, diff --git a/packages/coding-agent/src/modes/interactive/components/show-images-selector.ts b/packages/coding-agent/src/modes/interactive/components/show-images-selector.ts index dbcb280..46b9146 100644 --- a/packages/coding-agent/src/modes/interactive/components/show-images-selector.ts +++ b/packages/coding-agent/src/modes/interactive/components/show-images-selector.ts @@ -1,4 +1,4 @@ -import { Container, type SelectItem, SelectList } from "@mariozechner/companion-tui"; +import { Container, type SelectItem, SelectList } from "@mariozechner/clanker-tui"; import { getSelectListTheme } from "../theme/theme.js"; import { DynamicBorder } from "./dynamic-border.js"; diff --git a/packages/coding-agent/src/modes/interactive/components/skill-invocation-message.ts b/packages/coding-agent/src/modes/interactive/components/skill-invocation-message.ts index e5843de..c513777 100644 --- a/packages/coding-agent/src/modes/interactive/components/skill-invocation-message.ts +++ b/packages/coding-agent/src/modes/interactive/components/skill-invocation-message.ts @@ -1,4 +1,4 @@ -import { Box, Markdown, type MarkdownTheme, Text } from "@mariozechner/companion-tui"; +import { Box, Markdown, type MarkdownTheme, Text } from "@mariozechner/clanker-tui"; import type { ParsedSkillBlock } from "../../../core/agent-session.js"; import { getMarkdownTheme, theme } from "../theme/theme.js"; import { editorKey } from "./keybinding-hints.js"; diff --git a/packages/coding-agent/src/modes/interactive/components/theme-selector.ts b/packages/coding-agent/src/modes/interactive/components/theme-selector.ts index 2618add..877de18 100644 --- a/packages/coding-agent/src/modes/interactive/components/theme-selector.ts +++ b/packages/coding-agent/src/modes/interactive/components/theme-selector.ts @@ -1,4 +1,4 @@ -import { Container, type SelectItem, SelectList } from "@mariozechner/companion-tui"; +import { Container, type SelectItem, SelectList } from "@mariozechner/clanker-tui"; import { getAvailableThemes, getSelectListTheme } from "../theme/theme.js"; import { DynamicBorder } from "./dynamic-border.js"; diff --git a/packages/coding-agent/src/modes/interactive/components/thinking-selector.ts b/packages/coding-agent/src/modes/interactive/components/thinking-selector.ts index a35ed81..2e7c7de 100644 --- a/packages/coding-agent/src/modes/interactive/components/thinking-selector.ts +++ b/packages/coding-agent/src/modes/interactive/components/thinking-selector.ts @@ -1,5 +1,5 @@ -import type { ThinkingLevel } from "@mariozechner/companion-agent-core"; -import { Container, type SelectItem, SelectList } from "@mariozechner/companion-tui"; +import type { ThinkingLevel } from "@mariozechner/clanker-agent-core"; +import { Container, type SelectItem, SelectList } from "@mariozechner/clanker-tui"; import { getSelectListTheme } from "../theme/theme.js"; import { DynamicBorder } from "./dynamic-border.js"; diff --git a/packages/coding-agent/src/modes/interactive/components/tool-execution.ts b/packages/coding-agent/src/modes/interactive/components/tool-execution.ts index 3b24520..b283f17 100644 --- a/packages/coding-agent/src/modes/interactive/components/tool-execution.ts +++ b/packages/coding-agent/src/modes/interactive/components/tool-execution.ts @@ -10,7 +10,7 @@ import { Text, type TUI, truncateToWidth, -} from "@mariozechner/companion-tui"; +} from "@mariozechner/clanker-tui"; import stripAnsi from "strip-ansi"; import type { ToolDefinition } from "../../../core/extensions/types.js"; import { diff --git a/packages/coding-agent/src/modes/interactive/components/tree-selector.ts b/packages/coding-agent/src/modes/interactive/components/tree-selector.ts index f39910e..f8e35b2 100644 --- a/packages/coding-agent/src/modes/interactive/components/tree-selector.ts +++ b/packages/coding-agent/src/modes/interactive/components/tree-selector.ts @@ -9,7 +9,7 @@ import { Text, TruncatedText, truncateToWidth, -} from "@mariozechner/companion-tui"; +} from "@mariozechner/clanker-tui"; import type { SessionTreeNode } from "../../../core/session-manager.js"; import { theme } from "../theme/theme.js"; import { DynamicBorder } from "./dynamic-border.js"; diff --git a/packages/coding-agent/src/modes/interactive/components/user-message-selector.ts b/packages/coding-agent/src/modes/interactive/components/user-message-selector.ts index 6b0f5c7..be8c1e9 100644 --- a/packages/coding-agent/src/modes/interactive/components/user-message-selector.ts +++ b/packages/coding-agent/src/modes/interactive/components/user-message-selector.ts @@ -5,7 +5,7 @@ import { Spacer, Text, truncateToWidth, -} from "@mariozechner/companion-tui"; +} from "@mariozechner/clanker-tui"; import { theme } from "../theme/theme.js"; import { DynamicBorder } from "./dynamic-border.js"; diff --git a/packages/coding-agent/src/modes/interactive/components/user-message.ts b/packages/coding-agent/src/modes/interactive/components/user-message.ts index c76c7cb..31438f8 100644 --- a/packages/coding-agent/src/modes/interactive/components/user-message.ts +++ b/packages/coding-agent/src/modes/interactive/components/user-message.ts @@ -3,7 +3,7 @@ import { Markdown, type MarkdownTheme, Spacer, -} from "@mariozechner/companion-tui"; +} from "@mariozechner/clanker-tui"; import { getMarkdownTheme, theme } from "../theme/theme.js"; const OSC133_ZONE_START = "\x1b]133;A\x07"; diff --git a/packages/coding-agent/src/modes/interactive/components/visual-truncate.ts b/packages/coding-agent/src/modes/interactive/components/visual-truncate.ts index d7ef371..c9ee537 100644 --- a/packages/coding-agent/src/modes/interactive/components/visual-truncate.ts +++ b/packages/coding-agent/src/modes/interactive/components/visual-truncate.ts @@ -3,7 +3,7 @@ * Used by both tool-execution.ts and bash-execution.ts for consistent behavior. */ -import { Text } from "@mariozechner/companion-tui"; +import { Text } from "@mariozechner/clanker-tui"; export interface VisualTruncateResult { /** The visual lines to display */ diff --git a/packages/coding-agent/src/modes/interactive/interactive-mode.ts b/packages/coding-agent/src/modes/interactive/interactive-mode.ts index 8625846..b3d2d69 100644 --- a/packages/coding-agent/src/modes/interactive/interactive-mode.ts +++ b/packages/coding-agent/src/modes/interactive/interactive-mode.ts @@ -7,14 +7,14 @@ import * as crypto from "node:crypto"; import * as fs from "node:fs"; import * as os from "node:os"; import * as path from "node:path"; -import type { AgentMessage } from "@mariozechner/companion-agent-core"; +import type { AgentMessage } from "@mariozechner/clanker-agent-core"; import type { AssistantMessage, ImageContent, Message, Model, OAuthProviderId, -} from "@mariozechner/companion-ai"; +} from "@mariozechner/clanker-ai"; import type { AutocompleteItem, EditorAction, @@ -25,7 +25,7 @@ import type { OverlayHandle, OverlayOptions, SlashCommand, -} from "@mariozechner/companion-tui"; +} from "@mariozechner/clanker-tui"; import { CombinedAutocompleteProvider, type Component, @@ -40,7 +40,7 @@ import { TruncatedText, TUI, visibleWidth, -} from "@mariozechner/companion-tui"; +} from "@mariozechner/clanker-tui"; import { spawn, spawnSync } from "child_process"; import { APP_NAME, @@ -666,12 +666,12 @@ export class InteractiveMode { * Check npm registry for a newer version. */ private async checkForNewVersion(): Promise { - if (process.env.COMPANION_SKIP_VERSION_CHECK || process.env.COMPANION_OFFLINE) + if (process.env.CLANKER_SKIP_VERSION_CHECK || process.env.CLANKER_OFFLINE) return undefined; try { const response = await fetch( - "https://registry.npmjs.org/@mariozechner/companion-coding-agent/latest", + "https://registry.npmjs.org/@mariozechner/clanker-coding-agent/latest", { signal: AbortSignal.timeout(10000), }, @@ -2141,7 +2141,7 @@ export class InteractiveMode { // Write to temp file const tmpDir = os.tmpdir(); const ext = extensionForImageMimeType(image.mimeType) ?? "png"; - const fileName = `companion-clipboard-${crypto.randomUUID()}.${ext}`; + const fileName = `clanker-clipboard-${crypto.randomUUID()}.${ext}`; const filePath = path.join(tmpDir, fileName); fs.writeFileSync(filePath, Buffer.from(image.bytes)); @@ -3110,7 +3110,7 @@ export class InteractiveMode { const currentText = this.editor.getExpandedText?.() ?? this.editor.getText(); - const tmpFile = path.join(os.tmpdir(), `companion-editor-${Date.now()}.companion.md`); + const tmpFile = path.join(os.tmpdir(), `clanker-editor-${Date.now()}.clanker.md`); try { // Write current content to temp file @@ -3176,13 +3176,13 @@ export class InteractiveMode { showNewVersionNotification(newVersion: string): void { const action = theme.fg( "accent", - getUpdateInstruction("@mariozechner/companion-coding-agent"), + getUpdateInstruction("@mariozechner/clanker-coding-agent"), ); const updateInstruction = theme.fg("muted", `New version ${newVersion} is available. `) + action; const changelogUrl = theme.fg( "accent", - "https://github.com/badlogic/companion-mono/blob/main/packages/coding-agent/CHANGELOG.md", + "https://github.com/badlogic/clanker-mono/blob/main/packages/coding-agent/CHANGELOG.md", ); const changelogLine = theme.fg("muted", "Changelog: ") + changelogUrl; diff --git a/packages/coding-agent/src/modes/interactive/theme/dark.json b/packages/coding-agent/src/modes/interactive/theme/dark.json index 83170e3..76d4ff0 100644 --- a/packages/coding-agent/src/modes/interactive/theme/dark.json +++ b/packages/coding-agent/src/modes/interactive/theme/dark.json @@ -1,5 +1,5 @@ { - "$schema": "https://raw.githubusercontent.com/badlogic/companion-mono/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json", + "$schema": "https://raw.githubusercontent.com/harivansh-afk/clanker-agent/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json", "name": "dark", "vars": { "cyan": "#00d7ff", diff --git a/packages/coding-agent/src/modes/interactive/theme/light.json b/packages/coding-agent/src/modes/interactive/theme/light.json index e3767f2..bab6107 100644 --- a/packages/coding-agent/src/modes/interactive/theme/light.json +++ b/packages/coding-agent/src/modes/interactive/theme/light.json @@ -1,5 +1,5 @@ { - "$schema": "https://raw.githubusercontent.com/badlogic/companion-mono/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json", + "$schema": "https://raw.githubusercontent.com/harivansh-afk/clanker-agent/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json", "name": "light", "vars": { "teal": "#5a8080", diff --git a/packages/coding-agent/src/modes/interactive/theme/theme-schema.json b/packages/coding-agent/src/modes/interactive/theme/theme-schema.json index 86af8ee..6118523 100644 --- a/packages/coding-agent/src/modes/interactive/theme/theme-schema.json +++ b/packages/coding-agent/src/modes/interactive/theme/theme-schema.json @@ -1,7 +1,7 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "title": "Companion Coding Agent Theme", - "description": "Theme schema for companion coding agent", + "title": "Clanker Coding Agent Theme", + "description": "Theme schema for clanker coding agent", "type": "object", "required": ["name", "colors"], "properties": { diff --git a/packages/coding-agent/src/modes/interactive/theme/theme.ts b/packages/coding-agent/src/modes/interactive/theme/theme.ts index be80f2f..b4830f2 100644 --- a/packages/coding-agent/src/modes/interactive/theme/theme.ts +++ b/packages/coding-agent/src/modes/interactive/theme/theme.ts @@ -4,7 +4,7 @@ import type { EditorTheme, MarkdownTheme, SelectListTheme, -} from "@mariozechner/companion-tui"; +} from "@mariozechner/clanker-tui"; import { type Static, Type } from "@sinclair/typebox"; import { TypeCompiler } from "@sinclair/typebox/compiler"; import chalk from "chalk"; @@ -682,7 +682,7 @@ function getDefaultTheme(): string { // ============================================================================ // Use globalThis to share theme across module loaders (tsx + jiti in dev mode) -const THEME_KEY = Symbol.for("@mariozechner/companion-coding-agent:theme"); +const THEME_KEY = Symbol.for("@mariozechner/clanker-coding-agent:theme"); // Export theme as a getter that reads from globalThis // This ensures all module instances (tsx, jiti) see the same theme @@ -1144,7 +1144,7 @@ export function getEditorTheme(): EditorTheme { }; } -export function getSettingsListTheme(): import("@mariozechner/companion-tui").SettingsListTheme { +export function getSettingsListTheme(): import("@mariozechner/clanker-tui").SettingsListTheme { return { label: (text: string, selected: boolean) => selected ? theme.fg("accent", text) : text, diff --git a/packages/coding-agent/src/modes/print-mode.ts b/packages/coding-agent/src/modes/print-mode.ts index d4fd508..38a2b3c 100644 --- a/packages/coding-agent/src/modes/print-mode.ts +++ b/packages/coding-agent/src/modes/print-mode.ts @@ -2,11 +2,11 @@ * Print mode (single-shot): Send prompts, output result, exit. * * Used for: - * - `companion -p "prompt"` - text output - * - `companion --mode json "prompt"` - JSON event stream + * - `clanker -p "prompt"` - text output + * - `clanker --mode json "prompt"` - JSON event stream */ -import type { AssistantMessage, ImageContent } from "@mariozechner/companion-ai"; +import type { AssistantMessage, ImageContent } from "@mariozechner/clanker-ai"; import type { AgentSession } from "../core/agent-session.js"; /** diff --git a/packages/coding-agent/src/modes/rpc/rpc-client.ts b/packages/coding-agent/src/modes/rpc/rpc-client.ts index 65535f4..21add58 100644 --- a/packages/coding-agent/src/modes/rpc/rpc-client.ts +++ b/packages/coding-agent/src/modes/rpc/rpc-client.ts @@ -10,8 +10,8 @@ import type { AgentEvent, AgentMessage, ThinkingLevel, -} from "@mariozechner/companion-agent-core"; -import type { ImageContent } from "@mariozechner/companion-ai"; +} from "@mariozechner/clanker-agent-core"; +import type { ImageContent } from "@mariozechner/clanker-ai"; import type { SessionStats } from "../../core/agent-session.js"; import type { BashResult } from "../../core/bash-executor.js"; import type { CompactionResult } from "../../core/compaction/index.js"; diff --git a/packages/coding-agent/src/modes/rpc/rpc-types.ts b/packages/coding-agent/src/modes/rpc/rpc-types.ts index b6cf1fa..d824ced 100644 --- a/packages/coding-agent/src/modes/rpc/rpc-types.ts +++ b/packages/coding-agent/src/modes/rpc/rpc-types.ts @@ -5,8 +5,8 @@ * Responses and events are emitted as JSON lines on stdout. */ -import type { AgentMessage, ThinkingLevel } from "@mariozechner/companion-agent-core"; -import type { ImageContent, Model } from "@mariozechner/companion-ai"; +import type { AgentMessage, ThinkingLevel } from "@mariozechner/clanker-agent-core"; +import type { ImageContent, Model } from "@mariozechner/clanker-ai"; import type { SessionStats } from "../../core/agent-session.js"; import type { BashResult } from "../../core/bash-executor.js"; import type { CompactionResult } from "../../core/compaction/index.js"; diff --git a/packages/coding-agent/src/utils/image-resize.ts b/packages/coding-agent/src/utils/image-resize.ts index 7ca730a..4805d54 100644 --- a/packages/coding-agent/src/utils/image-resize.ts +++ b/packages/coding-agent/src/utils/image-resize.ts @@ -1,4 +1,4 @@ -import type { ImageContent } from "@mariozechner/companion-ai"; +import type { ImageContent } from "@mariozechner/clanker-ai"; import { loadPhoton } from "./photon.js"; export interface ImageResizeOptions { diff --git a/packages/coding-agent/src/utils/tools-manager.ts b/packages/coding-agent/src/utils/tools-manager.ts index a80acbd..3a0641a 100644 --- a/packages/coding-agent/src/utils/tools-manager.ts +++ b/packages/coding-agent/src/utils/tools-manager.ts @@ -20,7 +20,7 @@ const TOOLS_DIR = getBinDir(); const NETWORK_TIMEOUT_MS = 10000; function isOfflineModeEnabled(): boolean { - const value = process.env.COMPANION_OFFLINE; + const value = process.env.CLANKER_OFFLINE; if (!value) return false; return ( value === "1" || diff --git a/packages/coding-agent/test/agent-session-auto-compaction-queue.test.ts b/packages/coding-agent/test/agent-session-auto-compaction-queue.test.ts index 53a8cf5..d8eafe9 100644 --- a/packages/coding-agent/test/agent-session-auto-compaction-queue.test.ts +++ b/packages/coding-agent/test/agent-session-auto-compaction-queue.test.ts @@ -1,8 +1,8 @@ import { existsSync, mkdirSync, rmSync } from "node:fs"; import { tmpdir } from "node:os"; import { join } from "node:path"; -import { Agent } from "@mariozechner/companion-agent-core"; -import { type AssistantMessage, getModel } from "@mariozechner/companion-ai"; +import { Agent } from "@mariozechner/clanker-agent-core"; +import { type AssistantMessage, getModel } from "@mariozechner/clanker-ai"; import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; import { AgentSession } from "../src/core/agent-session.js"; import { AuthStorage } from "../src/core/auth-storage.js"; @@ -44,7 +44,7 @@ describe("AgentSession auto-compaction queue resume", () => { let tempDir: string; beforeEach(() => { - tempDir = join(tmpdir(), `companion-auto-compaction-queue-${Date.now()}`); + tempDir = join(tmpdir(), `clanker-auto-compaction-queue-${Date.now()}`); mkdirSync(tempDir, { recursive: true }); vi.useFakeTimers(); diff --git a/packages/coding-agent/test/agent-session-branching.test.ts b/packages/coding-agent/test/agent-session-branching.test.ts index da58be8..8ff0c73 100644 --- a/packages/coding-agent/test/agent-session-branching.test.ts +++ b/packages/coding-agent/test/agent-session-branching.test.ts @@ -10,8 +10,8 @@ import { existsSync, mkdirSync, rmSync } from "node:fs"; import { tmpdir } from "node:os"; import { join } from "node:path"; -import { Agent } from "@mariozechner/companion-agent-core"; -import { getModel } from "@mariozechner/companion-ai"; +import { Agent } from "@mariozechner/clanker-agent-core"; +import { getModel } from "@mariozechner/clanker-ai"; import { afterEach, beforeEach, describe, expect, it } from "vitest"; import { AgentSession } from "../src/core/agent-session.js"; import { AuthStorage } from "../src/core/auth-storage.js"; @@ -28,7 +28,7 @@ describe.skipIf(!API_KEY)("AgentSession forking", () => { beforeEach(() => { // Create temp directory for session files - tempDir = join(tmpdir(), `companion-branching-test-${Date.now()}`); + tempDir = join(tmpdir(), `clanker-branching-test-${Date.now()}`); mkdirSync(tempDir, { recursive: true }); }); diff --git a/packages/coding-agent/test/agent-session-compaction.test.ts b/packages/coding-agent/test/agent-session-compaction.test.ts index ca3f48b..41bd1a8 100644 --- a/packages/coding-agent/test/agent-session-compaction.test.ts +++ b/packages/coding-agent/test/agent-session-compaction.test.ts @@ -10,8 +10,8 @@ import { existsSync, mkdirSync, rmSync } from "node:fs"; import { tmpdir } from "node:os"; import { join } from "node:path"; -import { Agent } from "@mariozechner/companion-agent-core"; -import { getModel } from "@mariozechner/companion-ai"; +import { Agent } from "@mariozechner/clanker-agent-core"; +import { getModel } from "@mariozechner/clanker-ai"; import { afterEach, beforeEach, describe, expect, it } from "vitest"; import { AgentSession, @@ -32,7 +32,7 @@ describe.skipIf(!API_KEY)("AgentSession compaction e2e", () => { beforeEach(() => { // Create temp directory for session files - tempDir = join(tmpdir(), `companion-compaction-test-${Date.now()}`); + tempDir = join(tmpdir(), `clanker-compaction-test-${Date.now()}`); mkdirSync(tempDir, { recursive: true }); // Track events diff --git a/packages/coding-agent/test/agent-session-concurrent.test.ts b/packages/coding-agent/test/agent-session-concurrent.test.ts index c945fa8..b2a6024 100644 --- a/packages/coding-agent/test/agent-session-concurrent.test.ts +++ b/packages/coding-agent/test/agent-session-concurrent.test.ts @@ -5,13 +5,13 @@ import { existsSync, mkdirSync, rmSync } from "node:fs"; import { tmpdir } from "node:os"; import { join } from "node:path"; -import { Agent } from "@mariozechner/companion-agent-core"; +import { Agent } from "@mariozechner/clanker-agent-core"; import { type AssistantMessage, type AssistantMessageEvent, EventStream, getModel, -} from "@mariozechner/companion-ai"; +} from "@mariozechner/clanker-ai"; import { Type } from "@sinclair/typebox"; import { afterEach, beforeEach, describe, expect, it } from "vitest"; import { AgentSession } from "../src/core/agent-session.js"; @@ -63,7 +63,7 @@ describe("AgentSession concurrent prompt guard", () => { let tempDir: string; beforeEach(() => { - tempDir = join(tmpdir(), `companion-concurrent-test-${Date.now()}`); + tempDir = join(tmpdir(), `clanker-concurrent-test-${Date.now()}`); mkdirSync(tempDir, { recursive: true }); }); diff --git a/packages/coding-agent/test/agent-session-dynamic-tools.test.ts b/packages/coding-agent/test/agent-session-dynamic-tools.test.ts index 2f90d2d..889e65f 100644 --- a/packages/coding-agent/test/agent-session-dynamic-tools.test.ts +++ b/packages/coding-agent/test/agent-session-dynamic-tools.test.ts @@ -1,7 +1,7 @@ import { existsSync, mkdirSync, rmSync } from "node:fs"; import { tmpdir } from "node:os"; import { join } from "node:path"; -import { getModel } from "@mariozechner/companion-ai"; +import { getModel } from "@mariozechner/clanker-ai"; import { Type } from "@sinclair/typebox"; import { afterEach, beforeEach, describe, expect, it } from "vitest"; import { DefaultResourceLoader } from "../src/core/resource-loader.js"; @@ -16,7 +16,7 @@ describe("AgentSession dynamic tool registration", () => { beforeEach(() => { tempDir = join( tmpdir(), - `companion-dynamic-tool-test-${Date.now()}-${Math.random().toString(36).slice(2)}`, + `clanker-dynamic-tool-test-${Date.now()}-${Math.random().toString(36).slice(2)}`, ); agentDir = join(tempDir, "agent"); mkdirSync(agentDir, { recursive: true }); @@ -37,9 +37,9 @@ describe("AgentSession dynamic tool registration", () => { agentDir, settingsManager, extensionFactories: [ - (companion) => { - companion.on("session_start", () => { - companion.registerTool({ + (clanker) => { + clanker.on("session_start", () => { + clanker.registerTool({ name: "dynamic_tool", label: "Dynamic Tool", description: "Tool registered from session_start", diff --git a/packages/coding-agent/test/agent-session-retry.test.ts b/packages/coding-agent/test/agent-session-retry.test.ts index 62c6077..b331b33 100644 --- a/packages/coding-agent/test/agent-session-retry.test.ts +++ b/packages/coding-agent/test/agent-session-retry.test.ts @@ -1,13 +1,13 @@ import { existsSync, mkdirSync, rmSync } from "node:fs"; import { tmpdir } from "node:os"; import { join } from "node:path"; -import { Agent, type AgentEvent } from "@mariozechner/companion-agent-core"; +import { Agent, type AgentEvent } from "@mariozechner/clanker-agent-core"; import { type AssistantMessage, type AssistantMessageEvent, EventStream, getModel, -} from "@mariozechner/companion-ai"; +} from "@mariozechner/clanker-ai"; import { afterEach, beforeEach, describe, expect, it } from "vitest"; import { AgentSession } from "../src/core/agent-session.js"; import { AuthStorage } from "../src/core/auth-storage.js"; @@ -65,7 +65,7 @@ describe("AgentSession retry", () => { let tempDir: string; beforeEach(() => { - tempDir = join(tmpdir(), `companion-retry-test-${Date.now()}`); + tempDir = join(tmpdir(), `clanker-retry-test-${Date.now()}`); mkdirSync(tempDir, { recursive: true }); }); diff --git a/packages/coding-agent/test/auth-storage.test.ts b/packages/coding-agent/test/auth-storage.test.ts index 078b3e0..b20ffb6 100644 --- a/packages/coding-agent/test/auth-storage.test.ts +++ b/packages/coding-agent/test/auth-storage.test.ts @@ -7,7 +7,7 @@ import { } from "node:fs"; import { tmpdir } from "node:os"; import { join } from "node:path"; -import { registerOAuthProvider } from "@mariozechner/companion-ai/oauth"; +import { registerOAuthProvider } from "@mariozechner/clanker-ai/oauth"; import lockfile from "proper-lockfile"; import { afterEach, beforeEach, describe, expect, test, vi } from "vitest"; import { AuthStorage } from "../src/core/auth-storage.js"; @@ -21,7 +21,7 @@ describe("AuthStorage", () => { beforeEach(() => { tempDir = join( tmpdir(), - `companion-test-auth-storage-${Date.now()}-${Math.random().toString(36).slice(2)}`, + `clanker-test-auth-storage-${Date.now()}-${Math.random().toString(36).slice(2)}`, ); mkdirSync(tempDir, { recursive: true }); authJsonPath = join(tempDir, "auth.json"); diff --git a/packages/coding-agent/test/browser-tool.test.ts b/packages/coding-agent/test/browser-tool.test.ts index 16df03b..c1ab761 100644 --- a/packages/coding-agent/test/browser-tool.test.ts +++ b/packages/coding-agent/test/browser-tool.test.ts @@ -155,7 +155,7 @@ describe("browser tool", () => { profileDir, stateDir, headed: true, - windowClass: "CompanionBrowser", + windowClass: "ClankerBrowser", }); await browserTool.execute("browser-open-window-class", { @@ -168,7 +168,7 @@ describe("browser tool", () => { profileDir, "--headed", "--args", - "--class=CompanionBrowser", + "--class=ClankerBrowser", "open", "https://example.com", ]); diff --git a/packages/coding-agent/test/compaction-extensions-example.test.ts b/packages/coding-agent/test/compaction-extensions-example.test.ts index 27f85d1..2af2351 100644 --- a/packages/coding-agent/test/compaction-extensions-example.test.ts +++ b/packages/coding-agent/test/compaction-extensions-example.test.ts @@ -12,8 +12,8 @@ import type { describe("Documentation example", () => { it("custom compaction example should type-check correctly", () => { // This is the example from extensions.md - verify it compiles - const exampleExtension = (companion: ExtensionAPI) => { - companion.on( + const exampleExtension = (clanker: ExtensionAPI) => { + clanker.on( "session_before_compact", async (event: SessionBeforeCompactEvent, ctx) => { // All these should be accessible on the event @@ -63,8 +63,8 @@ describe("Documentation example", () => { }); it("compact event should have correct fields", () => { - const checkCompactEvent = (companion: ExtensionAPI) => { - companion.on("session_compact", async (event: SessionCompactEvent) => { + const checkCompactEvent = (clanker: ExtensionAPI) => { + clanker.on("session_compact", async (event: SessionCompactEvent) => { // These should all be accessible const entry = event.compactionEntry; const fromExtension = event.fromExtension; diff --git a/packages/coding-agent/test/compaction-extensions.test.ts b/packages/coding-agent/test/compaction-extensions.test.ts index ad419f8..822c322 100644 --- a/packages/coding-agent/test/compaction-extensions.test.ts +++ b/packages/coding-agent/test/compaction-extensions.test.ts @@ -5,8 +5,8 @@ import { existsSync, mkdirSync, rmSync } from "node:fs"; import { tmpdir } from "node:os"; import { join } from "node:path"; -import { Agent } from "@mariozechner/companion-agent-core"; -import { getModel } from "@mariozechner/companion-ai"; +import { Agent } from "@mariozechner/clanker-agent-core"; +import { getModel } from "@mariozechner/clanker-ai"; import { afterEach, beforeEach, describe, expect, it } from "vitest"; import { AgentSession } from "../src/core/agent-session.js"; import { AuthStorage } from "../src/core/auth-storage.js"; @@ -32,7 +32,7 @@ describe.skipIf(!API_KEY)("Compaction extensions", () => { let capturedEvents: SessionEvent[]; beforeEach(() => { - tempDir = join(tmpdir(), `companion-compaction-extensions-test-${Date.now()}`); + tempDir = join(tmpdir(), `clanker-compaction-extensions-test-${Date.now()}`); mkdirSync(tempDir, { recursive: true }); capturedEvents = []; }); diff --git a/packages/coding-agent/test/compaction-summary-reasoning.test.ts b/packages/coding-agent/test/compaction-summary-reasoning.test.ts index d811700..19aef04 100644 --- a/packages/coding-agent/test/compaction-summary-reasoning.test.ts +++ b/packages/coding-agent/test/compaction-summary-reasoning.test.ts @@ -1,5 +1,5 @@ -import type { AgentMessage } from "@mariozechner/companion-agent-core"; -import type { AssistantMessage, Model } from "@mariozechner/companion-ai"; +import type { AgentMessage } from "@mariozechner/clanker-agent-core"; +import type { AssistantMessage, Model } from "@mariozechner/clanker-ai"; import { beforeEach, describe, expect, it, vi } from "vitest"; import { generateSummary } from "../src/core/compaction/index.js"; @@ -7,8 +7,8 @@ const { completeSimpleMock } = vi.hoisted(() => ({ completeSimpleMock: vi.fn(), })); -vi.mock("@mariozechner/companion-ai", async (importOriginal) => { - const actual = await importOriginal(); +vi.mock("@mariozechner/clanker-ai", async (importOriginal) => { + const actual = await importOriginal(); return { ...actual, completeSimple: completeSimpleMock, diff --git a/packages/coding-agent/test/compaction-thinking-model.test.ts b/packages/coding-agent/test/compaction-thinking-model.test.ts index f6a6ea6..a93671c 100644 --- a/packages/coding-agent/test/compaction-thinking-model.test.ts +++ b/packages/coding-agent/test/compaction-thinking-model.test.ts @@ -11,8 +11,8 @@ import { existsSync, mkdirSync, rmSync } from "node:fs"; import { tmpdir } from "node:os"; import { join } from "node:path"; -import { Agent, type ThinkingLevel } from "@mariozechner/companion-agent-core"; -import { getModel, type Model } from "@mariozechner/companion-ai"; +import { Agent, type ThinkingLevel } from "@mariozechner/clanker-agent-core"; +import { getModel, type Model } from "@mariozechner/clanker-ai"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { AgentSession } from "../src/core/agent-session.js"; import { ModelRegistry } from "../src/core/model-registry.js"; @@ -45,7 +45,7 @@ describe.skipIf(!HAS_ANTIGRAVITY_AUTH)( }); beforeEach(() => { - tempDir = join(tmpdir(), `companion-thinking-compaction-test-${Date.now()}`); + tempDir = join(tmpdir(), `clanker-thinking-compaction-test-${Date.now()}`); mkdirSync(tempDir, { recursive: true }); }); @@ -156,7 +156,7 @@ describe.skipIf(!HAS_ANTHROPIC_AUTH)( beforeEach(() => { tempDir = join( tmpdir(), - `companion-thinking-compaction-anthropic-test-${Date.now()}`, + `clanker-thinking-compaction-anthropic-test-${Date.now()}`, ); mkdirSync(tempDir, { recursive: true }); }); diff --git a/packages/coding-agent/test/compaction.test.ts b/packages/coding-agent/test/compaction.test.ts index 13343d1..2d2ee8e 100644 --- a/packages/coding-agent/test/compaction.test.ts +++ b/packages/coding-agent/test/compaction.test.ts @@ -1,6 +1,6 @@ -import type { AgentMessage } from "@mariozechner/companion-agent-core"; -import type { AssistantMessage, Usage } from "@mariozechner/companion-ai"; -import { getModel } from "@mariozechner/companion-ai"; +import type { AgentMessage } from "@mariozechner/clanker-agent-core"; +import type { AssistantMessage, Usage } from "@mariozechner/clanker-ai"; +import { getModel } from "@mariozechner/clanker-ai"; import { readFileSync } from "fs"; import { join } from "path"; import { beforeEach, describe, expect, it } from "vitest"; diff --git a/packages/coding-agent/test/computer-tool.test.ts b/packages/coding-agent/test/computer-tool.test.ts index 446c064..1588e68 100644 --- a/packages/coding-agent/test/computer-tool.test.ts +++ b/packages/coding-agent/test/computer-tool.test.ts @@ -79,7 +79,7 @@ function createMockComputerOperations( function getAgentComputerScriptPath(): string { return resolve( process.cwd(), - "../../../../docker/companion/agent-computer.js", + "../../../../docker/clanker/agent-computer.js", ); } diff --git a/packages/coding-agent/test/extensions-discovery.test.ts b/packages/coding-agent/test/extensions-discovery.test.ts index 71598c5..f30261c 100644 --- a/packages/coding-agent/test/extensions-discovery.test.ts +++ b/packages/coding-agent/test/extensions-discovery.test.ts @@ -12,7 +12,7 @@ describe("extensions discovery", () => { let extensionsDir: string; beforeEach(() => { - tempDir = fs.mkdtempSync(path.join(os.tmpdir(), "companion-ext-test-")); + tempDir = fs.mkdtempSync(path.join(os.tmpdir(), "clanker-ext-test-")); extensionsDir = path.join(tempDir, "extensions"); fs.mkdirSync(extensionsDir); }); @@ -22,15 +22,15 @@ describe("extensions discovery", () => { }); const extensionCode = ` - export default function(companion) { - companion.registerCommand("test", { handler: async () => {} }); + export default function(clanker) { + clanker.registerCommand("test", { handler: async () => {} }); } `; const extensionCodeWithTool = (toolName: string) => ` import { Type } from "@sinclair/typebox"; - export default function(companion) { - companion.registerTool({ + export default function(clanker) { + clanker.registerTool({ name: "${toolName}", label: "${toolName}", description: "Test tool", @@ -102,7 +102,7 @@ describe("extensions discovery", () => { expect(result.extensions[0].path).toContain("index.ts"); }); - it("discovers subdirectory with package.json companion field", async () => { + it("discovers subdirectory with package.json clanker field", async () => { const subdir = path.join(extensionsDir, "my-package"); const srcDir = path.join(subdir, "src"); fs.mkdirSync(subdir); @@ -112,7 +112,7 @@ describe("extensions discovery", () => { path.join(subdir, "package.json"), JSON.stringify({ name: "my-package", - companion: { + clanker: { extensions: ["./src/main.ts"], }, }), @@ -135,7 +135,7 @@ describe("extensions discovery", () => { path.join(subdir, "package.json"), JSON.stringify({ name: "my-package", - companion: { + clanker: { extensions: ["./ext1.ts", "./ext2.ts"], }, }), @@ -147,7 +147,7 @@ describe("extensions discovery", () => { expect(result.extensions).toHaveLength(2); }); - it("package.json with companion field takes precedence over index.ts", async () => { + it("package.json with clanker field takes precedence over index.ts", async () => { const subdir = path.join(extensionsDir, "my-package"); fs.mkdirSync(subdir); fs.writeFileSync( @@ -162,7 +162,7 @@ describe("extensions discovery", () => { path.join(subdir, "package.json"), JSON.stringify({ name: "my-package", - companion: { + clanker: { extensions: ["./custom.ts"], }, }), @@ -178,7 +178,7 @@ describe("extensions discovery", () => { expect(result.extensions[0].tools.has("from-index")).toBe(false); }); - it("ignores package.json without companion field, falls back to index.ts", async () => { + it("ignores package.json without clanker field, falls back to index.ts", async () => { const subdir = path.join(extensionsDir, "my-package"); fs.mkdirSync(subdir); fs.writeFileSync(path.join(subdir, "index.ts"), extensionCode); @@ -238,7 +238,7 @@ describe("extensions discovery", () => { fs.writeFileSync(path.join(subdir2, "entry.ts"), extensionCode); fs.writeFileSync( path.join(subdir2, "package.json"), - JSON.stringify({ companion: { extensions: ["./entry.ts"] } }), + JSON.stringify({ clanker: { extensions: ["./entry.ts"] } }), ); const result = await discoverAndLoadExtensions([], tempDir, tempDir); @@ -254,7 +254,7 @@ describe("extensions discovery", () => { fs.writeFileSync( path.join(subdir, "package.json"), JSON.stringify({ - companion: { + clanker: { extensions: ["./exists.ts", "./missing.ts"], }, }), @@ -331,8 +331,8 @@ describe("extensions discovery", () => { ` import { Type } from "@sinclair/typebox"; import ms from "ms"; - export default function(companion) { - companion.registerTool({ + export default function(clanker) { + clanker.registerTool({ name: "parse_duration", label: "parse_duration", description: "Parse a duration string", @@ -375,8 +375,8 @@ describe("extensions discovery", () => { it("registers message renderers", async () => { const extCode = ` - export default function(companion) { - companion.registerMessageRenderer("my-custom-type", (message, options, theme) => { + export default function(clanker) { + clanker.registerMessageRenderer("my-custom-type", (message, options, theme) => { return null; // Use default rendering }); } @@ -394,7 +394,7 @@ describe("extensions discovery", () => { it("reports error when extension throws during initialization", async () => { const extCode = ` - export default function(companion) { + export default function(clanker) { throw new Error("Initialization failed!"); } `; @@ -409,8 +409,8 @@ describe("extensions discovery", () => { it("reports error when extension has no default export", async () => { const extCode = ` - export function notDefault(companion) { - companion.registerCommand("test", { handler: async () => {} }); + export function notDefault(clanker) { + clanker.registerCommand("test", { handler: async () => {} }); } `; fs.writeFileSync(path.join(extensionsDir, "no-default.ts"), extCode); @@ -451,10 +451,10 @@ describe("extensions discovery", () => { it("loads extension with event handlers", async () => { const extCode = ` - export default function(companion) { - companion.on("agent_start", async () => {}); - companion.on("tool_call", async (event) => undefined); - companion.on("agent_end", async () => {}); + export default function(clanker) { + clanker.on("agent_start", async () => {}); + clanker.on("tool_call", async (event) => undefined); + clanker.on("agent_end", async () => {}); } `; fs.writeFileSync(path.join(extensionsDir, "with-handlers.ts"), extCode); @@ -470,8 +470,8 @@ describe("extensions discovery", () => { it("loads extension with shortcuts", async () => { const extCode = ` - export default function(companion) { - companion.registerShortcut("ctrl+t", { + export default function(clanker) { + clanker.registerShortcut("ctrl+t", { description: "Test shortcut", handler: async (ctx) => {}, }); @@ -488,8 +488,8 @@ describe("extensions discovery", () => { it("loads extension with flags", async () => { const extCode = ` - export default function(companion) { - companion.registerFlag("my-flag", { + export default function(clanker) { + clanker.registerFlag("my-flag", { description: "My custom flag", handler: async (value) => {}, }); diff --git a/packages/coding-agent/test/extensions-input-event.test.ts b/packages/coding-agent/test/extensions-input-event.test.ts index c664401..9f8927f 100644 --- a/packages/coding-agent/test/extensions-input-event.test.ts +++ b/packages/coding-agent/test/extensions-input-event.test.ts @@ -13,7 +13,7 @@ describe("Input Event", () => { let extensionsDir: string; beforeEach(() => { - tempDir = fs.mkdtempSync(path.join(os.tmpdir(), "companion-input-test-")); + tempDir = fs.mkdtempSync(path.join(os.tmpdir(), "clanker-input-test-")); extensionsDir = path.join(tempDir, "extensions"); fs.mkdirSync(extensionsDir); // Clean globalThis test vars diff --git a/packages/coding-agent/test/extensions-runner.test.ts b/packages/coding-agent/test/extensions-runner.test.ts index 24ccf3d..bedea32 100644 --- a/packages/coding-agent/test/extensions-runner.test.ts +++ b/packages/coding-agent/test/extensions-runner.test.ts @@ -28,7 +28,7 @@ describe("ExtensionRunner", () => { let modelRegistry: ModelRegistry; beforeEach(() => { - tempDir = fs.mkdtempSync(path.join(os.tmpdir(), "companion-runner-test-")); + tempDir = fs.mkdtempSync(path.join(os.tmpdir(), "clanker-runner-test-")); extensionsDir = path.join(tempDir, "extensions"); fs.mkdirSync(extensionsDir); sessionManager = SessionManager.inMemory(); @@ -88,8 +88,8 @@ describe("ExtensionRunner", () => { describe("shortcut conflicts", () => { it("warns when extension shortcut conflicts with built-in", async () => { const extCode = ` - export default function(companion) { - companion.registerShortcut("ctrl+c", { + export default function(clanker) { + clanker.registerShortcut("ctrl+c", { description: "Conflicts with built-in", handler: async () => {}, }); @@ -119,8 +119,8 @@ describe("ExtensionRunner", () => { it("allows a shortcut when the reserved set no longer contains the default key", async () => { const extCode = ` - export default function(companion) { - companion.registerShortcut("ctrl+p", { + export default function(clanker) { + clanker.registerShortcut("ctrl+p", { description: "Uses freed default", handler: async () => {}, }); @@ -154,8 +154,8 @@ describe("ExtensionRunner", () => { it("warns but allows when extension uses non-reserved built-in shortcut", async () => { const extCode = ` - export default function(companion) { - companion.registerShortcut("ctrl+v", { + export default function(clanker) { + clanker.registerShortcut("ctrl+v", { description: "Overrides non-reserved", handler: async () => {}, }); @@ -185,8 +185,8 @@ describe("ExtensionRunner", () => { it("blocks shortcuts for reserved actions even when rebound", async () => { const extCode = ` - export default function(companion) { - companion.registerShortcut("ctrl+x", { + export default function(clanker) { + clanker.registerShortcut("ctrl+x", { description: "Conflicts with rebound reserved", handler: async () => {}, }); @@ -223,8 +223,8 @@ describe("ExtensionRunner", () => { it("blocks shortcuts when reserved action has multiple keys", async () => { const extCode = ` - export default function(companion) { - companion.registerShortcut("ctrl+y", { + export default function(clanker) { + clanker.registerShortcut("ctrl+y", { description: "Conflicts with multi-key reserved", handler: async () => {}, }); @@ -258,8 +258,8 @@ describe("ExtensionRunner", () => { it("warns but allows when non-reserved action has multiple keys", async () => { const extCode = ` - export default function(companion) { - companion.registerShortcut("ctrl+y", { + export default function(clanker) { + clanker.registerShortcut("ctrl+y", { description: "Overrides multi-key non-reserved", handler: async () => {}, }); @@ -297,16 +297,16 @@ describe("ExtensionRunner", () => { it("warns when two extensions register same shortcut", async () => { // Use a non-reserved shortcut const extCode1 = ` - export default function(companion) { - companion.registerShortcut("ctrl+shift+x", { + export default function(clanker) { + clanker.registerShortcut("ctrl+shift+x", { description: "First extension", handler: async () => {}, }); } `; const extCode2 = ` - export default function(companion) { - companion.registerShortcut("ctrl+shift+x", { + export default function(clanker) { + clanker.registerShortcut("ctrl+shift+x", { description: "Second extension", handler: async () => {}, }); @@ -341,8 +341,8 @@ describe("ExtensionRunner", () => { it("collects tools from multiple extensions", async () => { const toolCode = (name: string) => ` import { Type } from "@sinclair/typebox"; - export default function(companion) { - companion.registerTool({ + export default function(clanker) { + clanker.registerTool({ name: "${name}", label: "${name}", description: "Test tool", @@ -380,8 +380,8 @@ describe("ExtensionRunner", () => { it("keeps first tool when two extensions register the same name", async () => { const first = ` import { Type } from "@sinclair/typebox"; - export default function(companion) { - companion.registerTool({ + export default function(clanker) { + clanker.registerTool({ name: "shared", label: "shared", description: "first", @@ -392,8 +392,8 @@ describe("ExtensionRunner", () => { `; const second = ` import { Type } from "@sinclair/typebox"; - export default function(companion) { - companion.registerTool({ + export default function(clanker) { + clanker.registerTool({ name: "shared", label: "shared", description: "second", @@ -423,8 +423,8 @@ describe("ExtensionRunner", () => { describe("command collection", () => { it("collects commands from multiple extensions", async () => { const cmdCode = (name: string) => ` - export default function(companion) { - companion.registerCommand("${name}", { + export default function(clanker) { + clanker.registerCommand("${name}", { description: "Test command", handler: async () => {}, }); @@ -449,8 +449,8 @@ describe("ExtensionRunner", () => { it("gets command by name", async () => { const cmdCode = ` - export default function(companion) { - companion.registerCommand("my-cmd", { + export default function(clanker) { + clanker.registerCommand("my-cmd", { description: "My command", handler: async () => {}, }); @@ -478,8 +478,8 @@ describe("ExtensionRunner", () => { it("filters out commands conflict with reseved", async () => { const cmdCode = (name: string) => ` - export default function(companion) { - companion.registerCommand("${name}", { + export default function(clanker) { + clanker.registerCommand("${name}", { description: "Test command", handler: async () => {}, }); @@ -517,8 +517,8 @@ describe("ExtensionRunner", () => { describe("error handling", () => { it("calls error listeners when handler throws", async () => { const extCode = ` - export default function(companion) { - companion.on("context", async () => { + export default function(clanker) { + clanker.on("context", async () => { throw new Error("Handler error!"); }); } @@ -555,8 +555,8 @@ describe("ExtensionRunner", () => { describe("message renderers", () => { it("gets message renderer by type", async () => { const extCode = ` - export default function(companion) { - companion.registerMessageRenderer("my-type", (message, options, theme) => null); + export default function(clanker) { + clanker.registerMessageRenderer("my-type", (message, options, theme) => null); } `; fs.writeFileSync(path.join(extensionsDir, "renderer.ts"), extCode); @@ -581,8 +581,8 @@ describe("ExtensionRunner", () => { describe("flags", () => { it("collects flags from extensions", async () => { const extCode = ` - export default function(companion) { - companion.registerFlag("my-flag", { + export default function(clanker) { + clanker.registerFlag("my-flag", { description: "My flag", handler: async () => {}, }); @@ -605,8 +605,8 @@ describe("ExtensionRunner", () => { it("keeps first flag when two extensions register the same name", async () => { const first = ` - export default function(companion) { - companion.registerFlag("shared-flag", { + export default function(clanker) { + clanker.registerFlag("shared-flag", { description: "first", type: "boolean", default: true, @@ -614,8 +614,8 @@ describe("ExtensionRunner", () => { } `; const second = ` - export default function(companion) { - companion.registerFlag("shared-flag", { + export default function(clanker) { + clanker.registerFlag("shared-flag", { description: "second", type: "boolean", default: false, @@ -641,8 +641,8 @@ describe("ExtensionRunner", () => { it("can set flag values", async () => { const extCode = ` - export default function(companion) { - companion.registerFlag("test-flag", { + export default function(clanker) { + clanker.registerFlag("test-flag", { description: "Test flag", handler: async () => {}, }); @@ -670,8 +670,8 @@ describe("ExtensionRunner", () => { describe("tool_result chaining", () => { it("chains content modifications across handlers", async () => { const extCode1 = ` - export default function(companion) { - companion.on("tool_result", async (event) => { + export default function(clanker) { + clanker.on("tool_result", async (event) => { return { content: [...event.content, { type: "text", text: "ext1" }], }; @@ -679,8 +679,8 @@ describe("ExtensionRunner", () => { } `; const extCode2 = ` - export default function(companion) { - companion.on("tool_result", async (event) => { + export default function(clanker) { + clanker.on("tool_result", async (event) => { return { content: [...event.content, { type: "text", text: "ext2" }], }; @@ -726,8 +726,8 @@ describe("ExtensionRunner", () => { it("preserves previous modifications when later handlers return partial patches", async () => { const extCode1 = ` - export default function(companion) { - companion.on("tool_result", async () => { + export default function(clanker) { + clanker.on("tool_result", async () => { return { content: [{ type: "text", text: "first" }], details: { source: "ext1" }, @@ -736,8 +736,8 @@ describe("ExtensionRunner", () => { } `; const extCode2 = ` - export default function(companion) { - companion.on("tool_result", async () => { + export default function(clanker) { + clanker.on("tool_result", async () => { return { isError: true, }; @@ -834,8 +834,8 @@ describe("ExtensionRunner", () => { describe("hasHandlers", () => { it("returns true when handlers exist for event type", async () => { const extCode = ` - export default function(companion) { - companion.on("tool_call", async () => undefined); + export default function(clanker) { + clanker.on("tool_call", async () => undefined); } `; fs.writeFileSync(path.join(extensionsDir, "handler.ts"), extCode); diff --git a/packages/coding-agent/test/footer-width.test.ts b/packages/coding-agent/test/footer-width.test.ts index 0886c18..3a70ced 100644 --- a/packages/coding-agent/test/footer-width.test.ts +++ b/packages/coding-agent/test/footer-width.test.ts @@ -1,4 +1,4 @@ -import { visibleWidth } from "@mariozechner/companion-tui"; +import { visibleWidth } from "@mariozechner/clanker-tui"; import { beforeAll, describe, expect, it } from "vitest"; import type { AgentSession } from "../src/core/agent-session.js"; import type { ReadonlyFooterDataProvider } from "../src/core/footer-data-provider.js"; diff --git a/packages/coding-agent/test/gateway-session-titles.test.ts b/packages/coding-agent/test/gateway-session-titles.test.ts index 2573e2f..b8deb54 100644 --- a/packages/coding-agent/test/gateway-session-titles.test.ts +++ b/packages/coding-agent/test/gateway-session-titles.test.ts @@ -12,7 +12,7 @@ function createMockSession(options?: { sessionName?: string }) { dispose: vi.fn(), subscribe: vi.fn(() => () => {}), sessionManager: { - getSessionDir: () => "/tmp/companion-gateway-test", + getSessionDir: () => "/tmp/clanker-gateway-test", appendSessionInfo: vi.fn(), appendLabelChange: vi.fn(), }, diff --git a/packages/coding-agent/test/gateway-steer.test.ts b/packages/coding-agent/test/gateway-steer.test.ts index 0a63ca4..696050a 100644 --- a/packages/coding-agent/test/gateway-steer.test.ts +++ b/packages/coding-agent/test/gateway-steer.test.ts @@ -13,7 +13,7 @@ function createMockSession() { dispose: vi.fn(), subscribe: vi.fn(() => () => {}), sessionManager: { - getSessionDir: () => "/tmp/companion-gateway-test", + getSessionDir: () => "/tmp/clanker-gateway-test", }, }; } diff --git a/packages/coding-agent/test/git-update.test.ts b/packages/coding-agent/test/git-update.test.ts index cd472ce..4562ba1 100644 --- a/packages/coding-agent/test/git-update.test.ts +++ b/packages/coding-agent/test/git-update.test.ts @@ -313,22 +313,22 @@ describe("DefaultPackageManager git update", () => { .slice(0, 8); const cachedDir = join( tmpdir(), - "companion-extensions", + "clanker-extensions", `git-${gitHost}`, hash, gitPath, ); const extensionFile = join( cachedDir, - "companion-extensions", + "clanker-extensions", "session-breakdown.ts", ); rmSync(cachedDir, { recursive: true, force: true }); - mkdirSync(join(cachedDir, "companion-extensions"), { recursive: true }); + mkdirSync(join(cachedDir, "clanker-extensions"), { recursive: true }); writeFileSync( join(cachedDir, "package.json"), - JSON.stringify({ companion: { extensions: ["./companion-extensions"] } }, null, 2), + JSON.stringify({ clanker: { extensions: ["./clanker-extensions"] } }, null, 2), ); writeFileSync(extensionFile, "// stale"); @@ -353,7 +353,7 @@ describe("DefaultPackageManager git update", () => { expect(executedCommands).toContain("git fetch --prune origin"); expect( - getFileContent(cachedDir, "companion-extensions/session-breakdown.ts"), + getFileContent(cachedDir, "clanker-extensions/session-breakdown.ts"), ).toBe("// fresh"); }); @@ -366,22 +366,22 @@ describe("DefaultPackageManager git update", () => { .slice(0, 8); const cachedDir = join( tmpdir(), - "companion-extensions", + "clanker-extensions", `git-${gitHost}`, hash, gitPath, ); const extensionFile = join( cachedDir, - "companion-extensions", + "clanker-extensions", "session-breakdown.ts", ); rmSync(cachedDir, { recursive: true, force: true }); - mkdirSync(join(cachedDir, "companion-extensions"), { recursive: true }); + mkdirSync(join(cachedDir, "clanker-extensions"), { recursive: true }); writeFileSync( join(cachedDir, "package.json"), - JSON.stringify({ companion: { extensions: ["./companion-extensions"] } }, null, 2), + JSON.stringify({ clanker: { extensions: ["./clanker-extensions"] } }, null, 2), ); writeFileSync(extensionFile, "// pinned"); @@ -403,7 +403,7 @@ describe("DefaultPackageManager git update", () => { expect(executedCommands).toEqual([]); expect( - getFileContent(cachedDir, "companion-extensions/session-breakdown.ts"), + getFileContent(cachedDir, "clanker-extensions/session-breakdown.ts"), ).toBe("// pinned"); }); }); @@ -418,7 +418,7 @@ describe("DefaultPackageManager git update", () => { // The project-scope install path should not exist before or after update const projectGitDir = join( tempDir, - ".companion", + ".clanker", "git", "github.com", "test", diff --git a/packages/coding-agent/test/interactive-mode-status.test.ts b/packages/coding-agent/test/interactive-mode-status.test.ts index dc0650f..cd56487 100644 --- a/packages/coding-agent/test/interactive-mode-status.test.ts +++ b/packages/coding-agent/test/interactive-mode-status.test.ts @@ -1,4 +1,4 @@ -import { Container } from "@mariozechner/companion-tui"; +import { Container } from "@mariozechner/clanker-tui"; import { beforeAll, describe, expect, test, vi } from "vitest"; import { InteractiveMode } from "../src/modes/interactive/interactive-mode.js"; import { initTheme } from "../src/modes/interactive/theme/theme.js"; diff --git a/packages/coding-agent/test/model-registry.test.ts b/packages/coding-agent/test/model-registry.test.ts index 7c2118f..87456a6 100644 --- a/packages/coding-agent/test/model-registry.test.ts +++ b/packages/coding-agent/test/model-registry.test.ts @@ -12,9 +12,9 @@ import type { Context, Model, OpenAICompletionsCompat, -} from "@mariozechner/companion-ai"; -import { getApiProvider } from "@mariozechner/companion-ai"; -import { getOAuthProvider } from "@mariozechner/companion-ai/oauth"; +} from "@mariozechner/clanker-ai"; +import { getApiProvider } from "@mariozechner/clanker-ai"; +import { getOAuthProvider } from "@mariozechner/clanker-ai/oauth"; import { afterEach, beforeEach, describe, expect, test } from "vitest"; import { AuthStorage } from "../src/core/auth-storage.js"; import { clearApiKeyCache, ModelRegistry } from "../src/core/model-registry.js"; @@ -27,7 +27,7 @@ describe("ModelRegistry", () => { beforeEach(() => { tempDir = join( tmpdir(), - `companion-test-model-registry-${Date.now()}-${Math.random().toString(36).slice(2)}`, + `clanker-test-model-registry-${Date.now()}-${Math.random().toString(36).slice(2)}`, ); mkdirSync(tempDir, { recursive: true }); modelsJsonPath = join(tempDir, "models.json"); diff --git a/packages/coding-agent/test/model-resolver.test.ts b/packages/coding-agent/test/model-resolver.test.ts index 2991e49..0ad3793 100644 --- a/packages/coding-agent/test/model-resolver.test.ts +++ b/packages/coding-agent/test/model-resolver.test.ts @@ -1,4 +1,4 @@ -import type { Model } from "@mariozechner/companion-ai"; +import type { Model } from "@mariozechner/clanker-ai"; import { describe, expect, test } from "vitest"; import { defaultModelPerProvider, diff --git a/packages/coding-agent/test/package-command-paths.test.ts b/packages/coding-agent/test/package-command-paths.test.ts index 8c85c59..84bb025 100644 --- a/packages/coding-agent/test/package-command-paths.test.ts +++ b/packages/coding-agent/test/package-command-paths.test.ts @@ -17,7 +17,7 @@ describe("package commands", () => { beforeEach(() => { tempDir = join( tmpdir(), - `companion-package-commands-${Date.now()}-${Math.random().toString(36).slice(2)}`, + `clanker-package-commands-${Date.now()}-${Math.random().toString(36).slice(2)}`, ); agentDir = join(tempDir, "agent"); projectDir = join(tempDir, "project"); @@ -89,7 +89,7 @@ describe("package commands", () => { .map(([message]) => String(message)) .join("\n"); expect(stdout).toContain("Usage:"); - expect(stdout).toContain("companion install [-l]"); + expect(stdout).toContain("clanker install [-l]"); expect(errorSpy).not.toHaveBeenCalled(); expect(process.exitCode).toBeUndefined(); } finally { @@ -109,7 +109,7 @@ describe("package commands", () => { .join("\n"); expect(stderr).toContain('Unknown option --unknown for "install".'); expect(stderr).toContain( - 'Use "companion --help" or "companion install [-l]".', + 'Use "clanker --help" or "clanker install [-l]".', ); expect(process.exitCode).toBe(1); } finally { @@ -127,7 +127,7 @@ describe("package commands", () => { .map(([message]) => String(message)) .join("\n"); expect(stderr).toContain("Missing install source."); - expect(stderr).toContain("Usage: companion install [-l]"); + expect(stderr).toContain("Usage: clanker install [-l]"); expect(stderr).not.toContain("at "); expect(process.exitCode).toBe(1); } finally { diff --git a/packages/coding-agent/test/package-manager.test.ts b/packages/coding-agent/test/package-manager.test.ts index d399801..5b0668a 100644 --- a/packages/coding-agent/test/package-manager.test.ts +++ b/packages/coding-agent/test/package-manager.test.ts @@ -36,8 +36,8 @@ describe("DefaultPackageManager", () => { let previousOfflineEnv: string | undefined; beforeEach(() => { - previousOfflineEnv = process.env.COMPANION_OFFLINE; - delete process.env.COMPANION_OFFLINE; + previousOfflineEnv = process.env.CLANKER_OFFLINE; + delete process.env.CLANKER_OFFLINE; tempDir = join( tmpdir(), `pm-test-${Date.now()}-${Math.random().toString(36).slice(2)}`, @@ -56,9 +56,9 @@ describe("DefaultPackageManager", () => { afterEach(() => { if (previousOfflineEnv === undefined) { - delete process.env.COMPANION_OFFLINE; + delete process.env.CLANKER_OFFLINE; } else { - process.env.COMPANION_OFFLINE = previousOfflineEnv; + process.env.CLANKER_OFFLINE = previousOfflineEnv; } vi.restoreAllMocks(); vi.unstubAllGlobals(); @@ -114,8 +114,8 @@ Content`, ); }); - it("should resolve project paths relative to .companion", async () => { - const extDir = join(tempDir, ".companion", "extensions"); + it("should resolve project paths relative to .clanker", async () => { + const extDir = join(tempDir, ".clanker", "extensions"); mkdirSync(extDir, { recursive: true }); const extPath = join(extDir, "project-ext.ts"); writeFileSync(extPath, "export default function() {}"); @@ -143,7 +143,7 @@ Content`, }); it("should auto-discover project prompts with overrides", async () => { - const promptsDir = join(tempDir, ".companion", "prompts"); + const promptsDir = join(tempDir, ".clanker", "prompts"); mkdirSync(promptsDir, { recursive: true }); const promptPath = join(promptsDir, "is.md"); writeFileSync(promptPath, "Is prompt"); @@ -156,15 +156,15 @@ Content`, ).toBe(true); }); - it("should resolve directory with package.json companion.extensions in extensions setting", async () => { - // Create a package with companion.extensions in package.json + it("should resolve directory with package.json clanker.extensions in extensions setting", async () => { + // Create a package with clanker.extensions in package.json const pkgDir = join(tempDir, "my-extensions-pkg"); mkdirSync(join(pkgDir, "extensions"), { recursive: true }); writeFileSync( join(pkgDir, "package.json"), JSON.stringify({ name: "my-extensions-pkg", - companion: { + clanker: { extensions: ["./extensions/clip.ts", "./extensions/cost.ts"], }, }), @@ -187,7 +187,7 @@ Content`, const result = await packageManager.resolve(); - // Should find the extensions declared in package.json companion.extensions + // Should find the extensions declared in package.json clanker.extensions expect( result.extensions.some( (r) => r.path === join(pkgDir, "extensions", "clip.ts") && r.enabled, @@ -355,10 +355,10 @@ Content`, ).toBe(false); }); - it("should not apply parent .gitignore to .companion auto-discovery", async () => { - writeFileSync(join(tempDir, ".gitignore"), ".companion\n"); + it("should not apply parent .gitignore to .clanker auto-discovery", async () => { + writeFileSync(join(tempDir, ".gitignore"), ".clanker\n"); - const skillDir = join(tempDir, ".companion", "skills", "auto-skill"); + const skillDir = join(tempDir, ".clanker", "skills", "auto-skill"); mkdirSync(skillDir, { recursive: true }); const skillPath = join(skillDir, "SKILL.md"); writeFileSync( @@ -384,14 +384,14 @@ Content`, ).toBe(true); }); - it("should handle directories with companion manifest", async () => { + it("should handle directories with clanker manifest", async () => { const pkgDir = join(tempDir, "my-package"); mkdirSync(pkgDir, { recursive: true }); writeFileSync( join(pkgDir, "package.json"), JSON.stringify({ name: "my-package", - companion: { + clanker: { extensions: ["./src/index.ts"], skills: ["./skills"], }, @@ -565,7 +565,7 @@ Content`, expect(settings.packages?.[0]).toBe(expected); }); - it("should store project local packages relative to .companion settings base", () => { + it("should store project local packages relative to .clanker settings base", () => { const projectPkgDir = join(tempDir, "project-local-pkg"); mkdirSync(join(projectPkgDir, "extensions"), { recursive: true }); writeFileSync( @@ -579,7 +579,7 @@ Content`, expect(added).toBe(true); const settings = settingsManager.getProjectSettings(); - const rel = relative(join(tempDir, ".companion"), projectPkgDir); + const rel = relative(join(tempDir, ".clanker"), projectPkgDir); const expected = rel.startsWith(".") ? rel : `./${rel}`; expect(settings.packages?.[0]).toBe(expected); }); @@ -837,7 +837,7 @@ Content`, }); }); - describe("pattern filtering in companion manifest", () => { + describe("pattern filtering in clanker manifest", () => { it("should support glob patterns in manifest extensions", async () => { const pkgDir = join(tempDir, "manifest-pkg"); mkdirSync(join(pkgDir, "extensions"), { recursive: true }); @@ -860,7 +860,7 @@ Content`, join(pkgDir, "package.json"), JSON.stringify({ name: "manifest-pkg", - companion: { + clanker: { extensions: [ "extensions", "node_modules/dep/extensions", @@ -898,7 +898,7 @@ Content`, join(pkgDir, "package.json"), JSON.stringify({ name: "skill-manifest-pkg", - companion: { + clanker: { skills: ["skills", "!**/bad-skill"], }, }), @@ -936,7 +936,7 @@ Content`, join(pkgDir, "package.json"), JSON.stringify({ name: "layered-pkg", - companion: { + clanker: { extensions: ["extensions", "!**/baz.ts"], }, }), @@ -1229,7 +1229,7 @@ Content`, join(pkgDir, "package.json"), JSON.stringify({ name: "manifest-force-pkg", - companion: { + clanker: { extensions: ["extensions", "!**/two.ts", "+extensions/two.ts"], }, }), @@ -1515,7 +1515,7 @@ export default function(api) { api.registerTool({ name: "test", description: "te ); }); - it("should respect package.json companion.extensions manifest in subdirectories", async () => { + it("should respect package.json clanker.extensions manifest in subdirectories", async () => { const pkgDir = join(tempDir, "manifest-subdir-pkg"); mkdirSync(join(pkgDir, "extensions", "custom"), { recursive: true }); @@ -1523,7 +1523,7 @@ export default function(api) { api.registerTool({ name: "test", description: "te writeFileSync( join(pkgDir, "extensions", "custom", "package.json"), JSON.stringify({ - companion: { + clanker: { extensions: ["./main.ts"], }, }), @@ -1634,7 +1634,7 @@ export default function(api) { api.registerTool({ name: "test", description: "te describe("offline mode and network timeouts", () => { it("should skip installing missing package sources when offline", async () => { - process.env.COMPANION_OFFLINE = "1"; + process.env.CLANKER_OFFLINE = "1"; settingsManager.setProjectPackages([ "npm:missing-package", "git:github.com/example/missing-repo", @@ -1659,7 +1659,7 @@ export default function(api) { api.registerTool({ name: "test", description: "te }); it("should skip refreshing temporary git sources when offline", async () => { - process.env.COMPANION_OFFLINE = "1"; + process.env.CLANKER_OFFLINE = "1"; const gitSource = "git:github.com/example/repo"; const parsedGitSource = (packageManager as any).parseSource(gitSource); const installedPath = (packageManager as any).getGitInstallPath( @@ -1690,7 +1690,7 @@ export default function(api) { api.registerTool({ name: "test", description: "te }); it("should not call fetch in npmNeedsUpdate when offline", async () => { - process.env.COMPANION_OFFLINE = "1"; + process.env.CLANKER_OFFLINE = "1"; const installedPath = join(tempDir, "installed-package"); mkdirSync(installedPath, { recursive: true }); writeFileSync( diff --git a/packages/coding-agent/test/resource-loader.test.ts b/packages/coding-agent/test/resource-loader.test.ts index ab7074c..4951b8a 100644 --- a/packages/coding-agent/test/resource-loader.test.ts +++ b/packages/coding-agent/test/resource-loader.test.ts @@ -60,7 +60,7 @@ Skill content here.`, }); it("should ignore extra markdown files in auto-discovered skill dirs", async () => { - const skillDir = join(agentDir, "skills", "companion-skills", "browser-tools"); + const skillDir = join(agentDir, "skills", "clanker-skills", "browser-tools"); mkdirSync(skillDir, { recursive: true }); writeFileSync( join(skillDir, "SKILL.md"), @@ -102,7 +102,7 @@ Prompt content.`, it("should prefer project resources over user on name collisions", async () => { const userPromptsDir = join(agentDir, "prompts"); - const projectPromptsDir = join(cwd, ".companion", "prompts"); + const projectPromptsDir = join(cwd, ".clanker", "prompts"); mkdirSync(userPromptsDir, { recursive: true }); mkdirSync(projectPromptsDir, { recursive: true }); const userPromptPath = join(userPromptsDir, "commit.md"); @@ -111,7 +111,7 @@ Prompt content.`, writeFileSync(projectPromptPath, "Project prompt"); const userSkillDir = join(agentDir, "skills", "collision-skill"); - const projectSkillDir = join(cwd, ".companion", "skills", "collision-skill"); + const projectSkillDir = join(cwd, ".clanker", "skills", "collision-skill"); mkdirSync(userSkillDir, { recursive: true }); mkdirSync(projectSkillDir, { recursive: true }); const userSkillPath = join(userSkillDir, "SKILL.md"); @@ -148,9 +148,9 @@ Project skill`, ) as { name: string; vars?: Record }; baseTheme.name = "collision-theme"; const userThemePath = join(agentDir, "themes", "collision.json"); - const projectThemePath = join(cwd, ".companion", "themes", "collision.json"); + const projectThemePath = join(cwd, ".clanker", "themes", "collision.json"); mkdirSync(join(agentDir, "themes"), { recursive: true }); - mkdirSync(join(cwd, ".companion", "themes"), { recursive: true }); + mkdirSync(join(cwd, ".clanker", "themes"), { recursive: true }); writeFileSync(userThemePath, JSON.stringify(baseTheme, null, 2)); if (baseTheme.vars) { baseTheme.vars.accent = "#ff00ff"; @@ -178,18 +178,18 @@ Project skill`, it("should keep both extensions loaded when command names collide", async () => { const userExtDir = join(agentDir, "extensions"); - const projectExtDir = join(cwd, ".companion", "extensions"); + const projectExtDir = join(cwd, ".clanker", "extensions"); mkdirSync(userExtDir, { recursive: true }); mkdirSync(projectExtDir, { recursive: true }); writeFileSync( join(projectExtDir, "project.ts"), - `export default function(companion) { - companion.registerCommand("deploy", { + `export default function(clanker) { + clanker.registerCommand("deploy", { description: "project deploy", handler: async () => {}, }); - companion.registerCommand("project-only", { + clanker.registerCommand("project-only", { description: "project only", handler: async () => {}, }); @@ -198,12 +198,12 @@ Project skill`, writeFileSync( join(userExtDir, "user.ts"), - `export default function(companion) { - companion.registerCommand("deploy", { + `export default function(clanker) { + clanker.registerCommand("deploy", { description: "user deploy", handler: async () => {}, }); - companion.registerCommand("user-only", { + clanker.registerCommand("user-only", { description: "user only", handler: async () => {}, }); @@ -320,13 +320,13 @@ Content`, expect(agentsFiles.some((f) => f.path.endsWith("SOUL.md"))).toBe(true); }); - it("should discover companion context files from the default workspace", async () => { + it("should discover clanker context files from the default workspace", async () => { const workspaceDir = join(tempDir, "workspace"); const appDir = join(tempDir, "apps", "todo-app"); mkdirSync(workspaceDir, { recursive: true }); mkdirSync(appDir, { recursive: true }); writeFileSync(join(workspaceDir, "IDENTITY.md"), "# Identity\n\nPi"); - writeFileSync(join(workspaceDir, "TOOLS.md"), "# Tools\n\nUse ~/.companion"); + writeFileSync(join(workspaceDir, "TOOLS.md"), "# Tools\n\nUse ~/.clanker"); const loader = new DefaultResourceLoader({ cwd: appDir, agentDir }); await loader.reload(); @@ -338,8 +338,8 @@ Content`, expect(agentsFiles.some((f) => f.path.endsWith("TOOLS.md"))).toBe(true); }); - it("should discover SYSTEM.md from cwd/.companion", async () => { - const piDir = join(cwd, ".companion"); + it("should discover SYSTEM.md from cwd/.clanker", async () => { + const piDir = join(cwd, ".clanker"); mkdirSync(piDir, { recursive: true }); writeFileSync(join(piDir, "SYSTEM.md"), "You are a helpful assistant."); @@ -350,7 +350,7 @@ Content`, }); it("should discover APPEND_SYSTEM.md", async () => { - const piDir = join(cwd, ".companion"); + const piDir = join(cwd, ".clanker"); mkdirSync(piDir, { recursive: true }); writeFileSync( join(piDir, "APPEND_SYSTEM.md"), @@ -528,10 +528,10 @@ Content`, writeFileSync( join(ext1Dir, "index.ts"), ` -import type { ExtensionAPI } from "@mariozechner/companion-coding-agent"; +import type { ExtensionAPI } from "@mariozechner/clanker-coding-agent"; import { Type } from "@sinclair/typebox"; -export default function(companion: ExtensionAPI) { - companion.registerTool({ +export default function(clanker: ExtensionAPI) { + clanker.registerTool({ name: "duplicate-tool", description: "First", parameters: Type.Object({}), @@ -543,10 +543,10 @@ export default function(companion: ExtensionAPI) { writeFileSync( join(ext2Dir, "index.ts"), ` -import type { ExtensionAPI } from "@mariozechner/companion-coding-agent"; +import type { ExtensionAPI } from "@mariozechner/clanker-coding-agent"; import { Type } from "@sinclair/typebox"; -export default function(companion: ExtensionAPI) { - companion.registerTool({ +export default function(clanker: ExtensionAPI) { + clanker.registerTool({ name: "duplicate-tool", description: "Second", parameters: Type.Object({}), diff --git a/packages/coding-agent/test/rpc.test.ts b/packages/coding-agent/test/rpc.test.ts index 39f7eb2..6b6433e 100644 --- a/packages/coding-agent/test/rpc.test.ts +++ b/packages/coding-agent/test/rpc.test.ts @@ -2,7 +2,7 @@ import { existsSync, readdirSync, readFileSync, rmSync } from "node:fs"; import { tmpdir } from "node:os"; import { dirname, join } from "node:path"; import { fileURLToPath } from "node:url"; -import type { AgentEvent } from "@mariozechner/companion-agent-core"; +import type { AgentEvent } from "@mariozechner/clanker-agent-core"; import { afterEach, beforeEach, describe, expect, test } from "vitest"; import { RpcClient } from "../src/modes/rpc/rpc-client.js"; @@ -18,11 +18,11 @@ describe.skipIf( let sessionDir: string; beforeEach(() => { - sessionDir = join(tmpdir(), `companion-rpc-test-${Date.now()}`); + sessionDir = join(tmpdir(), `clanker-rpc-test-${Date.now()}`); client = new RpcClient({ cliPath: join(__dirname, "..", "dist", "cli.js"), cwd: join(__dirname, ".."), - env: { COMPANION_CODING_AGENT_DIR: sessionDir }, + env: { CLANKER_CODING_AGENT_DIR: sessionDir }, provider: "anthropic", model: "claude-sonnet-4-5", }); diff --git a/packages/coding-agent/test/sdk-skills.test.ts b/packages/coding-agent/test/sdk-skills.test.ts index 4dbf333..ce373a2 100644 --- a/packages/coding-agent/test/sdk-skills.test.ts +++ b/packages/coding-agent/test/sdk-skills.test.ts @@ -14,12 +14,12 @@ describe("createAgentSession skills option", () => { beforeEach(() => { tempDir = join( tmpdir(), - `companion-sdk-test-${Date.now()}-${Math.random().toString(36).slice(2)}`, + `clanker-sdk-test-${Date.now()}-${Math.random().toString(36).slice(2)}`, ); skillsDir = join(tempDir, "skills", "test-skill"); mkdirSync(skillsDir, { recursive: true }); - // Create a test skill in the companion skills directory + // Create a test skill in the clanker skills directory writeFileSync( join(skillsDir, "SKILL.md"), `--- diff --git a/packages/coding-agent/test/session-info-modified-timestamp.test.ts b/packages/coding-agent/test/session-info-modified-timestamp.test.ts index dd54c4d..00e0e0d 100644 --- a/packages/coding-agent/test/session-info-modified-timestamp.test.ts +++ b/packages/coding-agent/test/session-info-modified-timestamp.test.ts @@ -47,7 +47,7 @@ describe("SessionInfo.modified", () => { }); it("uses last user/assistant message timestamp instead of file mtime", async () => { - const filePath = join(tmpdir(), `companion-session-${Date.now()}-modified.jsonl`); + const filePath = join(tmpdir(), `clanker-session-${Date.now()}-modified.jsonl`); createSessionFile(filePath); const before = await stat(filePath); diff --git a/packages/coding-agent/test/session-selector-path-delete.test.ts b/packages/coding-agent/test/session-selector-path-delete.test.ts index 358882e..e688896 100644 --- a/packages/coding-agent/test/session-selector-path-delete.test.ts +++ b/packages/coding-agent/test/session-selector-path-delete.test.ts @@ -2,7 +2,7 @@ import { DEFAULT_EDITOR_KEYBINDINGS, EditorKeybindingsManager, setEditorKeybindings, -} from "@mariozechner/companion-tui"; +} from "@mariozechner/clanker-tui"; import { beforeAll, beforeEach, describe, expect, it } from "vitest"; import { KeybindingsManager } from "../src/core/keybindings.js"; import type { SessionInfo } from "../src/core/session-manager.js"; diff --git a/packages/coding-agent/test/settings-manager-bug.test.ts b/packages/coding-agent/test/settings-manager-bug.test.ts index 88c3ebd..33c0e62 100644 --- a/packages/coding-agent/test/settings-manager-bug.test.ts +++ b/packages/coding-agent/test/settings-manager-bug.test.ts @@ -7,7 +7,7 @@ import { SettingsManager } from "../src/core/settings-manager.js"; * Tests for the fix to a bug where external file changes to arrays were overwritten. * * The bug scenario was: - * 1. Companion starts with settings.json containing packages: ["npm:some-pkg"] + * 1. Clanker starts with settings.json containing packages: ["npm:some-pkg"] * 2. User externally edits file to packages: [] * 3. User changes an unrelated setting (e.g., theme) via UI * 4. save() would overwrite packages back to ["npm:some-pkg"] from stale in-memory state @@ -25,7 +25,7 @@ describe("SettingsManager - External Edit Preservation", () => { rmSync(testDir, { recursive: true }); } mkdirSync(agentDir, { recursive: true }); - mkdirSync(join(projectDir, ".companion"), { recursive: true }); + mkdirSync(join(projectDir, ".clanker"), { recursive: true }); }); afterEach(() => { @@ -42,15 +42,15 @@ describe("SettingsManager - External Edit Preservation", () => { settingsPath, JSON.stringify({ theme: "dark", - packages: ["npm:companion-mcp-adapter"], + packages: ["npm:clanker-mcp-adapter"], }), ); - // Companion starts up and loads settings into memory + // Clanker starts up and loads settings into memory const manager = SettingsManager.create(projectDir, agentDir); - // At this point, globalSettings.packages = ["npm:companion-mcp-adapter"] - expect(manager.getPackages()).toEqual(["npm:companion-mcp-adapter"]); + // At this point, globalSettings.packages = ["npm:clanker-mcp-adapter"] + expect(manager.getPackages()).toEqual(["npm:clanker-mcp-adapter"]); // User externally edits settings.json to remove the package const currentSettings = JSON.parse(readFileSync(settingsPath, "utf-8")); @@ -102,7 +102,7 @@ describe("SettingsManager - External Edit Preservation", () => { }); it("should preserve external project settings changes when updating unrelated project field", async () => { - const projectSettingsPath = join(projectDir, ".companion", "settings.json"); + const projectSettingsPath = join(projectDir, ".clanker", "settings.json"); writeFileSync( projectSettingsPath, JSON.stringify({ @@ -133,7 +133,7 @@ describe("SettingsManager - External Edit Preservation", () => { }); it("should let in-memory project changes override external changes for the same project field", async () => { - const projectSettingsPath = join(projectDir, ".companion", "settings.json"); + const projectSettingsPath = join(projectDir, ".clanker", "settings.json"); writeFileSync( projectSettingsPath, JSON.stringify({ diff --git a/packages/coding-agent/test/settings-manager.test.ts b/packages/coding-agent/test/settings-manager.test.ts index f78ec06..ac3c1d3 100644 --- a/packages/coding-agent/test/settings-manager.test.ts +++ b/packages/coding-agent/test/settings-manager.test.ts @@ -14,7 +14,7 @@ describe("SettingsManager", () => { rmSync(testDir, { recursive: true }); } mkdirSync(agentDir, { recursive: true }); - mkdirSync(join(projectDir, ".companion"), { recursive: true }); + mkdirSync(join(projectDir, ".clanker"), { recursive: true }); }); afterEach(() => { @@ -35,7 +35,7 @@ describe("SettingsManager", () => { }), ); - // Create SettingsManager (simulates companion starting up) + // Create SettingsManager (simulates clanker starting up) const manager = SettingsManager.create(projectDir, agentDir); // Simulate user editing settings.json externally to add enabledModels @@ -205,7 +205,7 @@ describe("SettingsManager", () => { describe("error tracking", () => { it("should collect and clear load errors via drainErrors", () => { const globalSettingsPath = join(agentDir, "settings.json"); - const projectSettingsPath = join(projectDir, ".companion", "settings.json"); + const projectSettingsPath = join(projectDir, ".clanker", "settings.json"); writeFileSync(globalSettingsPath, "{ invalid global json"); writeFileSync(projectSettingsPath, "{ invalid project json"); @@ -219,46 +219,46 @@ describe("SettingsManager", () => { }); describe("project settings directory creation", () => { - it("should not create .companion folder when only reading project settings", () => { - // Create agent dir with global settings, but NO .companion folder in project + it("should not create .clanker folder when only reading project settings", () => { + // Create agent dir with global settings, but NO .clanker folder in project const settingsPath = join(agentDir, "settings.json"); writeFileSync(settingsPath, JSON.stringify({ theme: "dark" })); - // Delete the .companion folder that beforeEach created - rmSync(join(projectDir, ".companion"), { recursive: true }); + // Delete the .clanker folder that beforeEach created + rmSync(join(projectDir, ".clanker"), { recursive: true }); // Create SettingsManager (reads both global and project settings) const manager = SettingsManager.create(projectDir, agentDir); - // .companion folder should NOT have been created just from reading - expect(existsSync(join(projectDir, ".companion"))).toBe(false); + // .clanker folder should NOT have been created just from reading + expect(existsSync(join(projectDir, ".clanker"))).toBe(false); // Settings should still be loaded from global expect(manager.getTheme()).toBe("dark"); }); - it("should create .companion folder when writing project settings", async () => { - // Create agent dir with global settings, but NO .companion folder in project + it("should create .clanker folder when writing project settings", async () => { + // Create agent dir with global settings, but NO .clanker folder in project const settingsPath = join(agentDir, "settings.json"); writeFileSync(settingsPath, JSON.stringify({ theme: "dark" })); - // Delete the .companion folder that beforeEach created - rmSync(join(projectDir, ".companion"), { recursive: true }); + // Delete the .clanker folder that beforeEach created + rmSync(join(projectDir, ".clanker"), { recursive: true }); const manager = SettingsManager.create(projectDir, agentDir); - // .companion folder should NOT exist yet - expect(existsSync(join(projectDir, ".companion"))).toBe(false); + // .clanker folder should NOT exist yet + expect(existsSync(join(projectDir, ".clanker"))).toBe(false); // Write a project-specific setting manager.setProjectPackages([{ source: "npm:test-pkg" }]); await manager.flush(); - // Now .companion folder should exist - expect(existsSync(join(projectDir, ".companion"))).toBe(true); + // Now .clanker folder should exist + expect(existsSync(join(projectDir, ".clanker"))).toBe(true); // And settings file should be created - expect(existsSync(join(projectDir, ".companion", "settings.json"))).toBe(true); + expect(existsSync(join(projectDir, ".clanker", "settings.json"))).toBe(true); }); }); diff --git a/packages/coding-agent/test/skills.test.ts b/packages/coding-agent/test/skills.test.ts index 1b2c8ef..f5cb7fa 100644 --- a/packages/coding-agent/test/skills.test.ts +++ b/packages/coding-agent/test/skills.test.ts @@ -395,11 +395,11 @@ describe("skills", () => { }); it("should expand ~ in skillPaths", () => { - const homeSkillsDir = join(homedir(), ".companion/agent/skills"); + const homeSkillsDir = join(homedir(), ".clanker/agent/skills"); const { skills: withTilde } = loadSkills({ agentDir: emptyAgentDir, cwd: emptyCwd, - skillPaths: ["~/.companion/agent/skills"], + skillPaths: ["~/.clanker/agent/skills"], }); const { skills: withoutTilde } = loadSkills({ agentDir: emptyAgentDir, diff --git a/packages/coding-agent/test/streaming-render-debug.ts b/packages/coding-agent/test/streaming-render-debug.ts index a3ba7fa..30e0ea0 100644 --- a/packages/coding-agent/test/streaming-render-debug.ts +++ b/packages/coding-agent/test/streaming-render-debug.ts @@ -4,8 +4,8 @@ * Run with: npx tsx test/streaming-render-debug.ts */ -import type { AssistantMessage } from "@mariozechner/companion-ai"; -import { ProcessTerminal, TUI } from "@mariozechner/companion-tui"; +import type { AssistantMessage } from "@mariozechner/clanker-ai"; +import { ProcessTerminal, TUI } from "@mariozechner/clanker-tui"; import { readFileSync } from "fs"; import { dirname, join } from "path"; import { fileURLToPath } from "url"; diff --git a/packages/coding-agent/test/system-prompt.test.ts b/packages/coding-agent/test/system-prompt.test.ts index ff5ae9e..401ad86 100644 --- a/packages/coding-agent/test/system-prompt.test.ts +++ b/packages/coding-agent/test/system-prompt.test.ts @@ -103,7 +103,7 @@ describe("buildSystemPrompt", () => { const prompt = buildSystemPrompt({ contextFiles: [ { - path: "/home/node/.companion/workspace/USER.md", + path: "/home/node/.clanker/workspace/USER.md", content: "# User\n\nLikes coffee.", }, ], diff --git a/packages/coding-agent/test/tool-execution-component.test.ts b/packages/coding-agent/test/tool-execution-component.test.ts index b5f05f0..04e50cf 100644 --- a/packages/coding-agent/test/tool-execution-component.test.ts +++ b/packages/coding-agent/test/tool-execution-component.test.ts @@ -1,4 +1,4 @@ -import { Text, type TUI } from "@mariozechner/companion-tui"; +import { Text, type TUI } from "@mariozechner/clanker-tui"; import { Type } from "@sinclair/typebox"; import stripAnsi from "strip-ansi"; import { beforeAll, describe, expect, test } from "vitest"; diff --git a/packages/coding-agent/test/truncate-to-width.test.ts b/packages/coding-agent/test/truncate-to-width.test.ts index de9632f..dc2765c 100644 --- a/packages/coding-agent/test/truncate-to-width.test.ts +++ b/packages/coding-agent/test/truncate-to-width.test.ts @@ -1,4 +1,4 @@ -import { truncateToWidth, visibleWidth } from "@mariozechner/companion-tui"; +import { truncateToWidth, visibleWidth } from "@mariozechner/clanker-tui"; import { describe, expect, it } from "vitest"; /** diff --git a/packages/coding-agent/test/utilities.ts b/packages/coding-agent/test/utilities.ts index 79931f7..5f37fd9 100644 --- a/packages/coding-agent/test/utilities.ts +++ b/packages/coding-agent/test/utilities.ts @@ -12,13 +12,13 @@ import { } from "node:fs"; import { homedir, tmpdir } from "node:os"; import { dirname, join } from "node:path"; -import { Agent } from "@mariozechner/companion-agent-core"; +import { Agent } from "@mariozechner/clanker-agent-core"; import { getModel, type OAuthCredentials, type OAuthProvider, -} from "@mariozechner/companion-ai"; -import { getOAuthApiKey } from "@mariozechner/companion-ai/oauth"; +} from "@mariozechner/clanker-ai"; +import { getOAuthApiKey } from "@mariozechner/clanker-ai/oauth"; import { AgentSession } from "../src/core/agent-session.js"; import { AuthStorage } from "../src/core/auth-storage.js"; import { createExtensionRuntime } from "../src/core/extensions/loader.js"; @@ -36,10 +36,10 @@ export const API_KEY = process.env.ANTHROPIC_OAUTH_TOKEN || process.env.ANTHROPIC_API_KEY; // ============================================================================ -// OAuth API key resolution from ~/.companion/agent/auth.json +// OAuth API key resolution from ~/.clanker/agent/auth.json // ============================================================================ -const AUTH_PATH = join(homedir(), ".companion", "agent", "auth.json"); +const AUTH_PATH = join(homedir(), ".clanker", "agent", "auth.json"); type ApiKeyCredential = { type: "api_key"; @@ -76,7 +76,7 @@ function saveAuthStorage(storage: AuthStorageData): void { } /** - * Resolve API key for a provider from ~/.companion/agent/auth.json + * Resolve API key for a provider from ~/.clanker/agent/auth.json * * For API key credentials, returns the key directly. * For OAuth credentials, returns the access token (refreshing if expired and saving back). @@ -122,18 +122,18 @@ export async function resolveApiKey( } /** - * Check if a provider has credentials in ~/.companion/agent/auth.json + * Check if a provider has credentials in ~/.clanker/agent/auth.json */ export function hasAuthForProvider(provider: string): boolean { const storage = loadAuthStorage(); return provider in storage; } -/** Path to the real companion agent config directory */ -export const COMPANION_AGENT_DIR = join(homedir(), ".companion", "agent"); +/** Path to the real clanker agent config directory */ +export const CLANKER_AGENT_DIR = join(homedir(), ".clanker", "agent"); /** - * Get an AuthStorage instance backed by ~/.companion/agent/auth.json + * Get an AuthStorage instance backed by ~/.clanker/agent/auth.json * Use this for tests that need real OAuth credentials. */ export function getRealAuthStorage(): AuthStorage { @@ -220,7 +220,7 @@ export function createTestSession( ): TestSessionContext { const tempDir = join( tmpdir(), - `companion-test-${Date.now()}-${Math.random().toString(36).slice(2)}`, + `clanker-test-${Date.now()}-${Math.random().toString(36).slice(2)}`, ); mkdirSync(tempDir, { recursive: true }); diff --git a/packages/coding-agent/test/vercel-ai-stream.test.ts b/packages/coding-agent/test/vercel-ai-stream.test.ts index 51be722..f1bbd3a 100644 --- a/packages/coding-agent/test/vercel-ai-stream.test.ts +++ b/packages/coding-agent/test/vercel-ai-stream.test.ts @@ -1,5 +1,5 @@ import type { IncomingMessage, ServerResponse } from "node:http"; -import type { AssistantMessage } from "@mariozechner/companion-ai"; +import type { AssistantMessage } from "@mariozechner/clanker-ai"; import { describe, expect, it } from "vitest"; import type { AgentSessionEvent } from "../src/core/agent-session.js"; import { diff --git a/packages/coding-agent/tsconfig.examples.json b/packages/coding-agent/tsconfig.examples.json index defd6d1..4fa2fa4 100644 --- a/packages/coding-agent/tsconfig.examples.json +++ b/packages/coding-agent/tsconfig.examples.json @@ -3,10 +3,10 @@ "compilerOptions": { "noEmit": true, "paths": { - "@mariozechner/companion-coding-agent": ["./src/index.ts"], - "@mariozechner/companion-coding-agent/hooks": ["./src/core/hooks/index.ts"], - "@mariozechner/companion-tui": ["../tui/src/index.ts"], - "@mariozechner/companion-ai": ["../ai/src/index.ts"], + "@mariozechner/clanker-coding-agent": ["./src/index.ts"], + "@mariozechner/clanker-coding-agent/hooks": ["./src/core/hooks/index.ts"], + "@mariozechner/clanker-tui": ["../tui/src/index.ts"], + "@mariozechner/clanker-ai": ["../ai/src/index.ts"], "@sinclair/typebox": ["../../node_modules/@sinclair/typebox"] }, "skipLibCheck": true diff --git a/packages/companion-channels/src/logger.ts b/packages/companion-channels/src/logger.ts deleted file mode 100644 index 52ee4d4..0000000 --- a/packages/companion-channels/src/logger.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { ExtensionAPI } from "@mariozechner/companion-coding-agent"; - -const CHANNEL = "channels"; - -export function createLogger(companion: ExtensionAPI) { - return (event: string, data: unknown, level = "INFO") => - companion.events.emit("log", { channel: CHANNEL, event, level, data }); -} diff --git a/packages/tui/README.md b/packages/tui/README.md index d28be54..bbfd766 100644 --- a/packages/tui/README.md +++ b/packages/tui/README.md @@ -1,4 +1,4 @@ -# @mariozechner/companion-tui +# @mariozechner/clanker-tui Minimal terminal UI framework with differential rendering and synchronized output for flicker-free interactive CLI applications. @@ -16,7 +16,7 @@ Minimal terminal UI framework with differential rendering and synchronized outpu ## Quick Start ```typescript -import { TUI, Text, Editor, ProcessTerminal } from "@mariozechner/companion-tui"; +import { TUI, Text, Editor, ProcessTerminal } from "@mariozechner/clanker-tui"; // Create terminal const terminal = new ProcessTerminal(); @@ -146,7 +146,7 @@ import { CURSOR_MARKER, type Component, type Focusable, -} from "@mariozechner/companion-tui"; +} from "@mariozechner/clanker-tui"; class MyInput implements Component, Focusable { focused: boolean = false; // Set by TUI when focus changes @@ -173,7 +173,7 @@ This enables IME candidate windows to appear at the correct position for CJK inp **Container components with embedded inputs:** When a container component (dialog, selector, etc.) contains an `Input` or `Editor` child, the container must implement `Focusable` and propagate the focus state to the child: ```typescript -import { Container, type Focusable, Input } from "@mariozechner/companion-tui"; +import { Container, type Focusable, Input } from "@mariozechner/clanker-tui"; class SearchDialog extends Container implements Focusable { private searchInput: Input; @@ -542,7 +542,7 @@ Supported formats: PNG, JPEG, GIF, WebP. Dimensions are parsed from the image he Supports both slash commands and file paths. ```typescript -import { CombinedAutocompleteProvider } from "@mariozechner/companion-tui"; +import { CombinedAutocompleteProvider } from "@mariozechner/clanker-tui"; const provider = new CombinedAutocompleteProvider( [ @@ -568,7 +568,7 @@ editor.setAutocompleteProvider(provider); Use `matchesKey()` with the `Key` helper for detecting keyboard input (supports Kitty keyboard protocol): ```typescript -import { matchesKey, Key } from "@mariozechner/companion-tui"; +import { matchesKey, Key } from "@mariozechner/clanker-tui"; if (matchesKey(data, Key.ctrl("c"))) { process.exit(0); @@ -632,7 +632,7 @@ import { visibleWidth, truncateToWidth, wrapTextWithAnsi, -} from "@mariozechner/companion-tui"; +} from "@mariozechner/clanker-tui"; // Get visible width of string (ignoring ANSI codes) const width = visibleWidth("\x1b[31mHello\x1b[0m"); // 5 @@ -657,8 +657,8 @@ When creating custom components, **each line returned by `render()` must not exc Use `matchesKey()` with the `Key` helper for keyboard input: ```typescript -import { matchesKey, Key, truncateToWidth } from "@mariozechner/companion-tui"; -import type { Component } from "@mariozechner/companion-tui"; +import { matchesKey, Key, truncateToWidth } from "@mariozechner/clanker-tui"; +import type { Component } from "@mariozechner/clanker-tui"; class MyInteractiveComponent implements Component { private selectedIndex = 0; @@ -699,8 +699,8 @@ class MyInteractiveComponent implements Component { Use the provided utilities to ensure lines fit: ```typescript -import { visibleWidth, truncateToWidth } from "@mariozechner/companion-tui"; -import type { Component } from "@mariozechner/companion-tui"; +import { visibleWidth, truncateToWidth } from "@mariozechner/clanker-tui"; +import type { Component } from "@mariozechner/clanker-tui"; class MyComponent implements Component { private text: string; @@ -799,8 +799,8 @@ npx tsx test/chat-simple.ts ### Debug logging -Set `COMPANION_TUI_WRITE_LOG` to capture the raw ANSI stream written to stdout. +Set `CLANKER_TUI_WRITE_LOG` to capture the raw ANSI stream written to stdout. ```bash -COMPANION_TUI_WRITE_LOG=/tmp/tui-ansi.log npx tsx test/chat-simple.ts +CLANKER_TUI_WRITE_LOG=/tmp/tui-ansi.log npx tsx test/chat-simple.ts ``` diff --git a/packages/tui/package.json b/packages/tui/package.json index 4614460..3b08ba6 100644 --- a/packages/tui/package.json +++ b/packages/tui/package.json @@ -1,5 +1,5 @@ { - "name": "@mariozechner/companion-tui", + "name": "@harivansh-afk/clanker-tui", "version": "0.56.2", "description": "Terminal User Interface library with differential rendering for efficient text-based applications", "type": "module", @@ -28,7 +28,7 @@ "license": "MIT", "repository": { "type": "git", - "url": "git+https://github.com/getcompanion-ai/co-mono.git", + "url": "git+https://github.com/harivansh-afk/clanker-agent.git", "directory": "packages/tui" }, "engines": { diff --git a/packages/tui/src/terminal.ts b/packages/tui/src/terminal.ts index 92158a2..e3c2096 100644 --- a/packages/tui/src/terminal.ts +++ b/packages/tui/src/terminal.ts @@ -59,7 +59,7 @@ export class ProcessTerminal implements Terminal { private _kittyProtocolActive = false; private stdinBuffer?: StdinBuffer; private stdinDataHandler?: (data: string) => void; - private writeLogPath = process.env.COMPANION_TUI_WRITE_LOG || ""; + private writeLogPath = process.env.CLANKER_TUI_WRITE_LOG || ""; get kittyProtocolActive(): boolean { return this._kittyProtocolActive; diff --git a/packages/tui/src/tui.ts b/packages/tui/src/tui.ts index 9ea0aac..ba88f0c 100644 --- a/packages/tui/src/tui.ts +++ b/packages/tui/src/tui.ts @@ -227,8 +227,8 @@ export class TUI extends Container { private hardwareCursorRow = 0; // Actual terminal cursor row (may differ due to IME positioning) private inputBuffer = ""; // Buffer for parsing terminal responses private cellSizeQueryPending = false; - private showHardwareCursor = process.env.COMPANION_HARDWARE_CURSOR === "1"; - private clearOnShrink = process.env.COMPANION_CLEAR_ON_SHRINK === "1"; // Clear empty rows when content shrinks (default: off) + private showHardwareCursor = process.env.CLANKER_HARDWARE_CURSOR === "1"; + private clearOnShrink = process.env.CLANKER_CLEAR_ON_SHRINK === "1"; // Clear empty rows when content shrinks (default: off) private maxLinesRendered = 0; // Track terminal's working area (max lines ever rendered) private previousViewportTop = 0; // Track previous viewport top for resize-aware cursor moves private fullRedrawCount = 0; @@ -1009,10 +1009,10 @@ export class TUI extends Container { this.previousHeight = height; }; - const debugRedraw = process.env.COMPANION_DEBUG_REDRAW === "1"; + const debugRedraw = process.env.CLANKER_DEBUG_REDRAW === "1"; const logRedraw = (reason: string): void => { if (!debugRedraw) return; - const logPath = path.join(os.homedir(), ".companion", "agent", "companion-debug.log"); + const logPath = path.join(os.homedir(), ".clanker", "agent", "clanker-debug.log"); const msg = `[${new Date().toISOString()}] fullRender: ${reason} (prev=${this.previousLines.length}, new=${newLines.length}, height=${height})\n`; fs.appendFileSync(logPath, msg); }; @@ -1035,7 +1035,7 @@ export class TUI extends Container { // Content shrunk below the working area and no overlays - re-render to clear empty rows // (overlays need the padding, so only do this when no overlays are active) - // Configurable via setClearOnShrink() or COMPANION_CLEAR_ON_SHRINK=0 env var + // Configurable via setClearOnShrink() or CLANKER_CLEAR_ON_SHRINK=0 env var if ( this.clearOnShrink && newLines.length < this.maxLinesRendered && @@ -1180,9 +1180,9 @@ export class TUI extends Container { // Log all lines to crash file for debugging const crashLogPath = path.join( os.homedir(), - ".companion", + ".clanker", "agent", - "companion-crash.log", + "clanker-crash.log", ); const crashData = [ `Crash at ${new Date().toISOString()}`, @@ -1233,7 +1233,7 @@ export class TUI extends Container { buffer += "\x1b[?2026l"; // End synchronized output - if (process.env.COMPANION_TUI_DEBUG === "1") { + if (process.env.CLANKER_TUI_DEBUG === "1") { const debugDir = "/tmp/tui"; fs.mkdirSync(debugDir, { recursive: true }); const debugPath = path.join( diff --git a/packages/tui/test/autocomplete.test.ts b/packages/tui/test/autocomplete.test.ts index c38b7b4..5a55637 100644 --- a/packages/tui/test/autocomplete.test.ts +++ b/packages/tui/test/autocomplete.test.ts @@ -139,7 +139,7 @@ describe("CombinedAutocompleteProvider", () => { let outsideDir = ""; beforeEach(() => { - rootDir = mkdtempSync(join(tmpdir(), "companion-autocomplete-root-")); + rootDir = mkdtempSync(join(tmpdir(), "clanker-autocomplete-root-")); baseDir = join(rootDir, "cwd"); outsideDir = join(rootDir, "outside"); mkdirSync(baseDir, { recursive: true }); @@ -339,9 +339,9 @@ describe("CombinedAutocompleteProvider", () => { test("includes hidden paths but excludes .git", () => { setupFolder(baseDir, { - dirs: [".companion", ".github", ".git"], + dirs: [".clanker", ".github", ".git"], files: { - ".companion/config.json": "{}", + ".clanker/config.json": "{}", ".github/workflows/ci.yml": "name: ci", ".git/config": "[core]", }, @@ -356,7 +356,7 @@ describe("CombinedAutocompleteProvider", () => { const result = provider.getSuggestions([line], 0, line.length); const values = result?.items.map((item) => item.value) ?? []; - assert.ok(values.includes("@.companion/")); + assert.ok(values.includes("@.clanker/")); assert.ok(values.includes("@.github/")); assert.ok( !values.some( @@ -432,7 +432,7 @@ describe("CombinedAutocompleteProvider", () => { let baseDir = ""; beforeEach(() => { - baseDir = mkdtempSync(join(tmpdir(), "companion-autocomplete-")); + baseDir = mkdtempSync(join(tmpdir(), "clanker-autocomplete-")); }); afterEach(() => { diff --git a/public-install.sh b/public-install.sh index 695bc0d..e551000 100755 --- a/public-install.sh +++ b/public-install.sh @@ -3,18 +3,18 @@ set -euo pipefail # Defaults -REPO="${COMPANION_REPO:-${CO_MONO_REPO:-getcompanion-ai/co-mono}}" -VERSION="${COMPANION_VERSION:-${CO_MONO_VERSION:-latest}}" -INSTALL_DIR="${COMPANION_INSTALL_DIR:-${CO_MONO_INSTALL_DIR:-$HOME/.companion}}" -BIN_DIR="${COMPANION_BIN_DIR:-${CO_MONO_BIN_DIR:-$HOME/.local/bin}}" -AGENT_DIR="${COMPANION_AGENT_DIR:-${CO_MONO_AGENT_DIR:-$INSTALL_DIR/agent}}" -SERVICE_NAME="${COMPANION_SERVICE_NAME:-${CO_MONO_SERVICE_NAME:-companion}}" -FALLBACK_TO_SOURCE="${COMPANION_FALLBACK_TO_SOURCE:-${CO_MONO_FALLBACK_TO_SOURCE:-1}}" -SKIP_REINSTALL="${COMPANION_SKIP_REINSTALL:-${CO_MONO_SKIP_REINSTALL:-0}}" -RUN_INSTALL_PACKAGES="${COMPANION_INSTALL_PACKAGES:-${CO_MONO_INSTALL_PACKAGES:-1}}" -SETUP_DAEMON="${COMPANION_SETUP_DAEMON:-${CO_MONO_SETUP_DAEMON:-0}}" -START_DAEMON="${COMPANION_START_DAEMON:-${CO_MONO_START_DAEMON:-0}}" -SKIP_SERVICE="${COMPANION_SKIP_SERVICE:-${CO_MONO_SKIP_SERVICE:-0}}" +REPO="${CLANKER_REPO:-${CLANKER_MONO_REPO:-harivansh-afk/clanker-agent}}" +VERSION="${CLANKER_VERSION:-${CLANKER_MONO_VERSION:-latest}}" +INSTALL_DIR="${CLANKER_INSTALL_DIR:-${CLANKER_MONO_INSTALL_DIR:-$HOME/.clanker}}" +BIN_DIR="${CLANKER_BIN_DIR:-${CLANKER_MONO_BIN_DIR:-$HOME/.local/bin}}" +AGENT_DIR="${CLANKER_AGENT_DIR:-${CLANKER_MONO_AGENT_DIR:-$INSTALL_DIR/agent}}" +SERVICE_NAME="${CLANKER_SERVICE_NAME:-${CLANKER_MONO_SERVICE_NAME:-clanker}}" +FALLBACK_TO_SOURCE="${CLANKER_FALLBACK_TO_SOURCE:-${CLANKER_MONO_FALLBACK_TO_SOURCE:-1}}" +SKIP_REINSTALL="${CLANKER_SKIP_REINSTALL:-${CLANKER_MONO_SKIP_REINSTALL:-0}}" +RUN_INSTALL_PACKAGES="${CLANKER_INSTALL_PACKAGES:-${CLANKER_MONO_INSTALL_PACKAGES:-1}}" +SETUP_DAEMON="${CLANKER_SETUP_DAEMON:-${CLANKER_MONO_SETUP_DAEMON:-0}}" +START_DAEMON="${CLANKER_START_DAEMON:-${CLANKER_MONO_START_DAEMON:-0}}" +SKIP_SERVICE="${CLANKER_SKIP_SERVICE:-${CLANKER_MONO_SKIP_SERVICE:-0}}" SERVICE_MANAGER="" SERVICE_UNIT_PATH="" SERVICE_LABEL="" @@ -22,8 +22,8 @@ SERVICE_STDOUT_LOG="" SERVICE_STDERR_LOG="" DEFAULT_PACKAGES=( - "npm:@e9n/companion-channels" - "npm:companion-teams" + "npm:@e9n/clanker-channels" + "npm:clanker-teams" ) declare -a EXTRA_PACKAGES=() @@ -45,14 +45,14 @@ has() { usage() { cat <<'EOF' Usage: - curl -fsSL https://raw.githubusercontent.com/getcompanion-ai/co-mono/main/public-install.sh | bash + curl -fsSL https://raw.githubusercontent.com/harivansh-afk/clanker-agent/main/public-install.sh | bash bash public-install.sh [options] Options: - --repo Override GitHub repo for install (default: getcompanion-ai/co-mono) + --repo Override GitHub repo for install (default: harivansh-afk/clanker-agent) --version |latest Release tag to install (default: latest) - --install-dir Target directory for release contents (default: ~/.companion) - --bin-dir Directory for companion launcher (default: ~/.local/bin) + --install-dir Target directory for release contents (default: ~/.clanker) + --bin-dir Directory for clanker launcher (default: ~/.local/bin) --agent-dir Agent config directory (default: /agent) --package Add package to installation list (repeatable) --no-default-packages Skip default packages list @@ -65,12 +65,12 @@ Options: --help Env vars: - COMPANION_INSTALL_PACKAGES=0/1 - COMPANION_SETUP_DAEMON=0/1 - COMPANION_START_DAEMON=0/1 - COMPANION_FALLBACK_TO_SOURCE=0/1 - COMPANION_SKIP_REINSTALL=1 - COMPANION_SERVICE_NAME= + CLANKER_INSTALL_PACKAGES=0/1 + CLANKER_SETUP_DAEMON=0/1 + CLANKER_START_DAEMON=0/1 + CLANKER_FALLBACK_TO_SOURCE=0/1 + CLANKER_SKIP_REINSTALL=1 + CLANKER_SERVICE_NAME= EOF } @@ -154,7 +154,7 @@ while [[ $# -gt 0 ]]; do done if [[ "$FALLBACK_TO_SOURCE" != "0" && "$FALLBACK_TO_SOURCE" != "1" ]]; then - fail "COMPANION_FALLBACK_TO_SOURCE must be 0 or 1" + fail "CLANKER_FALLBACK_TO_SOURCE must be 0 or 1" fi if [[ -d "$INSTALL_DIR" && "$SKIP_REINSTALL" != "1" ]]; then @@ -162,7 +162,7 @@ if [[ -d "$INSTALL_DIR" && "$SKIP_REINSTALL" != "1" ]]; then fi if [[ -z "${SERVICE_NAME:-}" ]]; then - SERVICE_NAME="companion" + SERVICE_NAME="clanker" fi download_file() { @@ -235,9 +235,9 @@ resolve_release_tag() { platform_assets() { if [[ "$PLATFORM" == "windows"* ]]; then - echo "companion-${PLATFORM}.zip" + echo "clanker-${PLATFORM}.zip" else - echo "companion-${PLATFORM}.tar.gz" + echo "clanker-${PLATFORM}.tar.gz" fi } @@ -275,8 +275,8 @@ write_launcher() { #!/usr/bin/env bash set -euo pipefail -export COMPANION_CODING_AGENT_DIR="${AGENT_DIR}" -export CO_MONO_AGENT_DIR="${AGENT_DIR}" +export CLANKER_CODING_AGENT_DIR="${AGENT_DIR}" +export CLANKER_MONO_AGENT_DIR="${AGENT_DIR}" exec "${runtime_dir}" "\$@" EOF @@ -333,7 +333,7 @@ install_packages() { while IFS= read -r package; do [[ -z "$package" ]] && continue - if "$BIN_DIR/companion" install "$package" >/dev/null 2>&1; then + if "$BIN_DIR/clanker" install "$package" >/dev/null 2>&1; then log "Installed package: $package" else log "Could not install ${package} now. It will install on first run when available." @@ -366,14 +366,14 @@ write_service_file() { ${label} ProgramArguments - ${BIN_DIR}/companion + ${BIN_DIR}/clanker daemon EnvironmentVariables - CO_MONO_AGENT_DIR + CLANKER_MONO_AGENT_DIR ${AGENT_DIR} - COMPANION_CODING_AGENT_DIR + CLANKER_CODING_AGENT_DIR ${AGENT_DIR} KeepAlive @@ -408,14 +408,14 @@ EOF local service_path="$HOME/.config/systemd/user/${SERVICE_NAME}.service" cat > "$service_path" < Extracting archives for testing..." for platform in "${PLATFORMS[@]}"; do rm -rf $platform if [[ "$platform" == "windows-x64" ]]; then - mkdir -p $platform && (cd $platform && unzip -q ../companion-$platform.zip) + mkdir -p $platform && (cd $platform && unzip -q ../clanker-$platform.zip) else - tar -xzf companion-$platform.tar.gz && mv companion $platform + tar -xzf clanker-$platform.tar.gz && mv clanker $platform fi done @@ -168,5 +168,5 @@ ls -lh *.tar.gz *.zip 2>/dev/null || true echo "" echo "Extracted directories for testing:" for platform in "${PLATFORMS[@]}"; do - echo " binaries/$platform/companion" + echo " binaries/$platform/clanker" done diff --git a/scripts/bundle-sandbox-builtins.mjs b/scripts/bundle-sandbox-builtins.mjs index 7167f11..ab793c1 100644 --- a/scripts/bundle-sandbox-builtins.mjs +++ b/scripts/bundle-sandbox-builtins.mjs @@ -2,34 +2,34 @@ import { mkdir } from "node:fs/promises"; import path from "node:path"; import { build } from "esbuild"; -const sourceRoot = process.env.COMPANION_BUILTIN_EXTENSIONS_SRC - ? path.resolve(process.env.COMPANION_BUILTIN_EXTENSIONS_SRC) +const sourceRoot = process.env.CLANKER_BUILTIN_EXTENSIONS_SRC + ? path.resolve(process.env.CLANKER_BUILTIN_EXTENSIONS_SRC) : path.resolve(process.cwd(), "packages"); -const outputRoot = process.env.COMPANION_BUILTIN_EXTENSIONS_OUT - ? path.resolve(process.env.COMPANION_BUILTIN_EXTENSIONS_OUT) +const outputRoot = process.env.CLANKER_BUILTIN_EXTENSIONS_OUT + ? path.resolve(process.env.CLANKER_BUILTIN_EXTENSIONS_OUT) : path.resolve(process.cwd(), ".tmp/builtins"); const entries = [ { - name: "companion-channels", - entry: path.join(sourceRoot, "companion-channels", "src", "index.ts"), + name: "clanker-channels", + entry: path.join(sourceRoot, "clanker-channels", "src", "index.ts"), }, { - name: "companion-teams", - entry: path.join(sourceRoot, "companion-teams", "extensions", "index.ts"), + name: "clanker-teams", + entry: path.join(sourceRoot, "clanker-teams", "extensions", "index.ts"), }, { - name: "companion-grind", - entry: path.join(sourceRoot, "companion-grind", "src", "index.ts"), + name: "clanker-grind", + entry: path.join(sourceRoot, "clanker-grind", "src", "index.ts"), }, ]; const external = [ - "@mariozechner/companion-agent-core", - "@mariozechner/companion-ai", - "@mariozechner/companion-ai/oauth", - "@mariozechner/companion-coding-agent", - "@mariozechner/companion-tui", + "@harivansh-afk/clanker-agent-core", + "@harivansh-afk/clanker-ai", + "@harivansh-afk/clanker-ai/oauth", + "@harivansh-afk/clanker-coding-agent", + "@harivansh-afk/clanker-tui", "@sinclair/typebox", ]; diff --git a/scripts/cost.ts b/scripts/cost.ts index fe73800..0578fb0 100755 --- a/scripts/cost.ts +++ b/scripts/cost.ts @@ -35,7 +35,7 @@ function encodeSessionDir(dir: string): string { return "--" + normalized.replace(/\//g, "-") + "--"; } -const sessionsBase = path.join(process.env.HOME!, ".companion/agent/sessions"); +const sessionsBase = path.join(process.env.HOME!, ".clanker/agent/sessions"); const encodedDir = encodeSessionDir(directory); const sessionsDir = path.join(sessionsBase, encodedDir); diff --git a/scripts/release.mjs b/scripts/release.mjs index a42f9e5..ffe24d5 100755 --- a/scripts/release.mjs +++ b/scripts/release.mjs @@ -1,6 +1,6 @@ #!/usr/bin/env node /** - * Release script for companion + * Release script for clanker * * Usage: node scripts/release.mjs * diff --git a/scripts/session-transcripts.ts b/scripts/session-transcripts.ts index 7810001..5149c80 100644 --- a/scripts/session-transcripts.ts +++ b/scripts/session-transcripts.ts @@ -4,7 +4,7 @@ * optionally spawns subagents to analyze patterns. * * Usage: npx tsx scripts/session-transcripts.ts [--analyze] [--output ] [cwd] - * --analyze Spawn companion subagents to analyze each transcript file + * --analyze Spawn clanker subagents to analyze each transcript file * --output Output directory for transcript files (defaults to ./session-transcripts) * cwd Working directory to extract sessions for (defaults to current) */ @@ -94,7 +94,7 @@ function runSubagent( ): Promise<{ success: boolean }> { return new Promise((resolve) => { const child = spawn( - "companion", + "clanker", ["--mode", "json", "--tools", "read,write", "-p", prompt], { cwd, @@ -158,7 +158,7 @@ function runSubagent( }); child.on("error", (err) => { - console.error(chalk.red(` Failed to spawn companion: ${err.message}`)); + console.error(chalk.red(` Failed to spawn clanker: ${err.message}`)); resolve({ success: false }); }); }); @@ -188,7 +188,7 @@ async function main() { const cwd = resolve(cwdArg || process.cwd()); mkdirSync(outputDir, { recursive: true }); - const sessionsBase = join(homedir(), ".companion/agent/sessions"); + const sessionsBase = join(homedir(), ".clanker/agent/sessions"); const sessionDirName = cwdToSessionDir(cwd); const sessionDir = join(sessionsBase, sessionDirName); @@ -281,13 +281,13 @@ async function main() { if (!analyzeFlag) { console.log( - "\nRun with --analyze to spawn companion subagents for pattern analysis.", + "\nRun with --analyze to spawn clanker subagents for pattern analysis.", ); return; } // Find AGENTS.md files to compare against - const globalAgentsMd = join(homedir(), ".companion/agent/AGENTS.md"); + const globalAgentsMd = join(homedir(), ".clanker/agent/AGENTS.md"); const localAgentsMd = join(cwd, "AGENTS.md"); const agentsMdFiles = [globalAgentsMd, localAgentsMd].filter(existsSync); const agentsMdSection = diff --git a/tsconfig.json b/tsconfig.json index 2ed78fa..b5714a4 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,25 +4,25 @@ "noEmit": true, "paths": { "*": ["./*"], - "@mariozechner/companion-ai": ["./packages/ai/src/index.ts"], - "@mariozechner/companion-ai/bedrock-provider": [ + "@mariozechner/clanker-ai": ["./packages/ai/src/index.ts"], + "@mariozechner/clanker-ai/bedrock-provider": [ "./packages/ai/src/bedrock-provider.ts" ], - "@mariozechner/companion-ai/oauth": ["./packages/ai/src/oauth.ts"], - "@mariozechner/companion-ai/*": ["./packages/ai/src/*"], - "@mariozechner/companion-ai/dist/*": ["./packages/ai/src/*"], - "@mariozechner/companion-agent-core": ["./packages/agent/src/index.ts"], - "@mariozechner/companion-agent-core/*": ["./packages/agent/src/*"], - "@mariozechner/companion-coding-agent": ["./packages/coding-agent/src/index.ts"], - "@mariozechner/companion-coding-agent/hooks": [ + "@mariozechner/clanker-ai/oauth": ["./packages/ai/src/oauth.ts"], + "@mariozechner/clanker-ai/*": ["./packages/ai/src/*"], + "@mariozechner/clanker-ai/dist/*": ["./packages/ai/src/*"], + "@mariozechner/clanker-agent-core": ["./packages/agent/src/index.ts"], + "@mariozechner/clanker-agent-core/*": ["./packages/agent/src/*"], + "@mariozechner/clanker-coding-agent": ["./packages/coding-agent/src/index.ts"], + "@mariozechner/clanker-coding-agent/hooks": [ "./packages/coding-agent/src/core/hooks/index.ts" ], - "@mariozechner/companion-coding-agent/*": ["./packages/coding-agent/src/*"], + "@mariozechner/clanker-coding-agent/*": ["./packages/coding-agent/src/*"], "@sinclair/typebox": ["./node_modules/@sinclair/typebox"], - "@mariozechner/companion-tui": ["./packages/tui/src/index.ts"], - "@mariozechner/companion-tui/*": ["./packages/tui/src/*"], - "@mariozechner/companion-agent-old": ["./packages/agent-old/src/index.ts"], - "@mariozechner/companion-agent-old/*": ["./packages/agent-old/src/*"] + "@mariozechner/clanker-tui": ["./packages/tui/src/index.ts"], + "@mariozechner/clanker-tui/*": ["./packages/tui/src/*"], + "@mariozechner/clanker-agent-old": ["./packages/agent-old/src/index.ts"], + "@mariozechner/clanker-agent-old/*": ["./packages/agent-old/src/*"] } }, "include": ["packages/*/src/**/*", "packages/*/test/**/*"],