@phuetz/code-buddy 1.1.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +211 -163
- package/dist/agent/autonomous/agentic-coding-contract.d.ts +12 -12
- package/dist/agent/base-agent.d.ts +4 -0
- package/dist/agent/base-agent.js +6 -0
- package/dist/agent/codebuddy-agent.d.ts +1 -1
- package/dist/agent/codebuddy-agent.js +69 -14
- package/dist/agent/execution/agent-executor.js +122 -12
- package/dist/agent/execution/tool-dependency-graph.js +7 -0
- package/dist/agent/execution/tool-hooks.d.ts +6 -0
- package/dist/agent/execution/tool-hooks.js +13 -5
- package/dist/agent/execution/tool-selection-strategy.d.ts +11 -2
- package/dist/agent/execution/tool-selection-strategy.js +67 -10
- package/dist/agent/extended-thinking.d.ts +8 -0
- package/dist/agent/extended-thinking.js +27 -0
- package/dist/agent/facades/infrastructure-facade.d.ts +9 -2
- package/dist/agent/facades/infrastructure-facade.js +15 -6
- package/dist/agent/hermes-browser-backends.js +151 -11
- package/dist/agent/hermes-claw-migrate.d.ts +59 -0
- package/dist/agent/hermes-claw-migrate.js +427 -26
- package/dist/agent/hermes-parity-manifest.js +78 -71
- package/dist/agent/hermes-runtime-lifecycle.d.ts +67 -0
- package/dist/agent/hermes-runtime-lifecycle.js +468 -0
- package/dist/agent/middleware/index.d.ts +1 -0
- package/dist/agent/middleware/index.js +1 -0
- package/dist/agent/middleware/visual-validation-middleware.d.ts +17 -0
- package/dist/agent/middleware/visual-validation-middleware.js +67 -0
- package/dist/agent/model-benchmark.d.ts +77 -0
- package/dist/agent/model-benchmark.js +309 -0
- package/dist/agent/model-tier.d.ts +14 -0
- package/dist/agent/model-tier.js +71 -0
- package/dist/agent/multi-agent/agents/orchestrator-agent.js +17 -6
- package/dist/agent/multi-agent/multi-agent-system.js +3 -1
- package/dist/agent/multi-agent/session-fleet-bridge.d.ts +2 -0
- package/dist/agent/multi-agent/session-fleet-bridge.js +9 -1
- package/dist/agent/multi-agent/session-tools.js +22 -5
- package/dist/agent/reasoning/mcts.js +20 -6
- package/dist/agent/self-improvement/authored-artifact-gate.d.ts +18 -0
- package/dist/agent/self-improvement/authored-artifact-gate.js +42 -0
- package/dist/agent/self-improvement/authored-tool-runtime.d.ts +27 -0
- package/dist/agent/self-improvement/authored-tool-runtime.js +57 -0
- package/dist/agent/self-improvement/authored-tool-store.d.ts +24 -0
- package/dist/agent/self-improvement/authored-tool-store.js +57 -0
- package/dist/agent/self-improvement/llm-tool-proposer.d.ts +41 -0
- package/dist/agent/self-improvement/llm-tool-proposer.js +136 -0
- package/dist/agent/self-improvement/sandbox-scorer.d.ts +17 -0
- package/dist/agent/self-improvement/sandbox-scorer.js +43 -0
- package/dist/agent/self-improvement/self-knowledge.d.ts +8 -0
- package/dist/agent/self-improvement/self-knowledge.js +24 -0
- package/dist/agent/self-improvement/skill-benchmark.d.ts +9 -0
- package/dist/agent/self-improvement/skill-benchmark.js +22 -0
- package/dist/agent/self-improvement/skill-consolidator.d.ts +71 -0
- package/dist/agent/self-improvement/skill-consolidator.js +137 -0
- package/dist/agent/self-improvement/skill-engine.d.ts +42 -0
- package/dist/agent/self-improvement/skill-engine.js +87 -0
- package/dist/agent/self-improvement/skill-gate.d.ts +19 -0
- package/dist/agent/self-improvement/skill-gate.js +62 -0
- package/dist/agent/self-improvement/skill-mutator.d.ts +74 -0
- package/dist/agent/self-improvement/skill-mutator.js +223 -0
- package/dist/agent/self-improvement/skill-proposer.d.ts +40 -0
- package/dist/agent/self-improvement/skill-proposer.js +82 -0
- package/dist/agent/self-improvement/skill-types.d.ts +41 -0
- package/dist/agent/self-improvement/skill-types.js +13 -0
- package/dist/agent/self-improvement/tool-benchmark.d.ts +10 -0
- package/dist/agent/self-improvement/tool-benchmark.js +37 -0
- package/dist/agent/self-improvement/tool-engine.d.ts +54 -0
- package/dist/agent/self-improvement/tool-engine.js +101 -0
- package/dist/agent/self-improvement/tool-gate.d.ts +20 -0
- package/dist/agent/self-improvement/tool-gate.js +78 -0
- package/dist/agent/self-improvement/tool-proposer.d.ts +31 -0
- package/dist/agent/self-improvement/tool-proposer.js +34 -0
- package/dist/agent/self-improvement/tool-skill-mutator.d.ts +40 -0
- package/dist/agent/self-improvement/tool-skill-mutator.js +79 -0
- package/dist/agent/self-improvement/tool-types.d.ts +48 -0
- package/dist/agent/self-improvement/tool-types.js +9 -0
- package/dist/agent/self-improvement/types.d.ts +3 -1
- package/dist/agent/session-end-flush.d.ts +6 -1
- package/dist/agent/session-end-flush.js +20 -4
- package/dist/agent/streaming/streaming-handler.d.ts +7 -0
- package/dist/agent/streaming/streaming-handler.js +8 -1
- package/dist/agent/tool-executor.js +1 -0
- package/dist/agent/tool-handler.d.ts +5 -0
- package/dist/agent/tool-handler.js +133 -4
- package/dist/browser-automation/browser-operator-executor.js +15 -0
- package/dist/browser-automation/browser-use-runner.d.ts +96 -0
- package/dist/browser-automation/browser-use-runner.js +492 -0
- package/dist/browser-automation/camofox-runner.d.ts +107 -0
- package/dist/browser-automation/camofox-runner.js +287 -0
- package/dist/channels/dingtalk/index.js +3 -0
- package/dist/channels/discord/client.d.ts +9 -0
- package/dist/channels/discord/client.js +12 -0
- package/dist/channels/feishu/index.d.ts +167 -1
- package/dist/channels/feishu/index.js +432 -7
- package/dist/channels/gateway-lifecycle.d.ts +132 -0
- package/dist/channels/gateway-lifecycle.js +219 -0
- package/dist/channels/google-chat/index.d.ts +5 -1
- package/dist/channels/google-chat/index.js +5 -1
- package/dist/channels/imessage/index.d.ts +14 -0
- package/dist/channels/imessage/index.js +64 -17
- package/dist/channels/index.d.ts +4 -0
- package/dist/channels/index.js +4 -0
- package/dist/channels/irc/index.d.ts +73 -3
- package/dist/channels/irc/index.js +446 -11
- package/dist/channels/line/index.js +3 -0
- package/dist/channels/mattermost/index.d.ts +51 -4
- package/dist/channels/mattermost/index.js +303 -20
- package/dist/channels/nextcloud-talk/index.d.ts +89 -8
- package/dist/channels/nextcloud-talk/index.js +367 -16
- package/dist/channels/nostr/index.d.ts +121 -1
- package/dist/channels/nostr/index.js +396 -8
- package/dist/channels/ntfy/index.js +3 -0
- package/dist/channels/qq/index.js +3 -0
- package/dist/channels/slash-parity.d.ts +117 -0
- package/dist/channels/slash-parity.js +185 -0
- package/dist/channels/synology-chat/index.js +3 -0
- package/dist/channels/teams/index.d.ts +3 -0
- package/dist/channels/teams/index.js +3 -0
- package/dist/channels/telegram/client.d.ts +9 -0
- package/dist/channels/telegram/client.js +12 -0
- package/dist/channels/twilio-voice/index.js +3 -0
- package/dist/channels/webchat/index.d.ts +7 -1
- package/dist/channels/webchat/index.js +7 -1
- package/dist/channels/wecom/index.js +3 -0
- package/dist/channels/weixin/index.js +3 -0
- package/dist/channels/zalo/index.js +3 -0
- package/dist/cli/config-loader.js +1 -1
- package/dist/codebuddy/client.d.ts +30 -1
- package/dist/codebuddy/client.js +167 -20
- package/dist/codebuddy/providers/provider-chatgpt-responses.d.ts +5 -0
- package/dist/codebuddy/providers/provider-chatgpt-responses.js +7 -1
- package/dist/codebuddy/providers/provider-gemini-native.js +1 -1
- package/dist/codebuddy/providers/provider-openai-compat.d.ts +5 -0
- package/dist/codebuddy/providers/provider-openai-compat.js +82 -2
- package/dist/codebuddy/tool-definitions/computer-control-tools.js +32 -2
- package/dist/codebuddy/tool-definitions/core-tools.js +3 -3
- package/dist/codebuddy/tool-definitions/index.d.ts +2 -1
- package/dist/codebuddy/tool-definitions/index.js +2 -1
- package/dist/codebuddy/tool-definitions/multimodal-tools.d.ts +1 -0
- package/dist/codebuddy/tool-definitions/multimodal-tools.js +44 -1
- package/dist/codebuddy/tool-definitions/windows-tools.d.ts +2 -0
- package/dist/codebuddy/tool-definitions/windows-tools.js +34 -0
- package/dist/codebuddy/tools.d.ts +8 -1
- package/dist/codebuddy/tools.js +67 -24
- package/dist/commands/cli/hermes-commands.js +108 -0
- package/dist/commands/cli/improve-command.js +123 -0
- package/dist/commands/cli/native-engine-commands.js +102 -3
- package/dist/commands/cli/utility-commands.js +45 -0
- package/dist/commands/enhanced-command-handler.js +2 -2
- package/dist/commands/goal-cli.d.ts +30 -0
- package/dist/commands/goal-cli.js +210 -27
- package/dist/commands/handlers/goal-handler.d.ts +9 -2
- package/dist/commands/handlers/goal-handler.js +36 -9
- package/dist/commands/handlers/infra-handlers.js +36 -0
- package/dist/commands/handlers/memory-handlers.js +96 -1
- package/dist/commands/handlers/missing-handlers.d.ts +1 -1
- package/dist/commands/handlers/missing-handlers.js +26 -3
- package/dist/commands/headless-slash.d.ts +2 -0
- package/dist/commands/headless-slash.js +12 -0
- package/dist/commands/llm-provider-resolution.d.ts +5 -3
- package/dist/commands/llm-provider-resolution.js +87 -33
- package/dist/commands/ollama.d.ts +25 -0
- package/dist/commands/ollama.js +100 -0
- package/dist/commands/provider.d.ts +5 -0
- package/dist/commands/provider.js +106 -55
- package/dist/commands/skills-cli/index.js +123 -0
- package/dist/commands/slash/builtin-commands.js +1 -1
- package/dist/commands/spec-next.js +2 -1
- package/dist/commands/spec-plan.js +5 -16
- package/dist/commands/tunnel.d.ts +2 -0
- package/dist/commands/tunnel.js +48 -0
- package/dist/companion/percepts.js +11 -1
- package/dist/config/config-resolver.d.ts +2 -1
- package/dist/config/config-resolver.js +54 -41
- package/dist/config/constants.d.ts +28 -0
- package/dist/config/constants.js +7 -0
- package/dist/config/env-schema.js +756 -0
- package/dist/config/model-tools.js +4 -4
- package/dist/config/toml-config.d.ts +16 -0
- package/dist/config/toml-config.js +3 -0
- package/dist/context/bootstrap-loader.js +6 -23
- package/dist/context/context-manager-v2.js +1 -0
- package/dist/context/import-directive-parser.d.ts +4 -0
- package/dist/context/import-directive-parser.js +51 -6
- package/dist/context/instruction-excludes.d.ts +30 -1
- package/dist/context/instruction-excludes.js +71 -1
- package/dist/context/jit-context.d.ts +8 -10
- package/dist/context/jit-context.js +28 -106
- package/dist/context/project-context.d.ts +90 -0
- package/dist/context/project-context.js +295 -0
- package/dist/daemon/autonomous-daemon.d.ts +1 -1
- package/dist/daemon/autonomous-daemon.js +3 -3
- package/dist/daemon/autonomous-loop.d.ts +31 -1
- package/dist/daemon/autonomous-loop.js +91 -4
- package/dist/daemon/colab-goal.js +9 -1
- package/dist/daemon/cron-agent-bridge.d.ts +12 -3
- package/dist/daemon/cron-agent-bridge.js +25 -9
- package/dist/desktop/codebuddy-engine-adapter.d.ts +32 -0
- package/dist/desktop/codebuddy-engine-adapter.js +257 -80
- package/dist/desktop/engine-adapter.d.ts +14 -0
- package/dist/desktop-automation/automation-manager.js +16 -0
- package/dist/desktop-automation/omniparser-runner.d.ts +63 -0
- package/dist/desktop-automation/omniparser-runner.js +115 -0
- package/dist/desktop-automation/smart-snapshot.d.ts +11 -0
- package/dist/desktop-automation/smart-snapshot.js +72 -5
- package/dist/doctor/index.js +40 -23
- package/dist/events/types.d.ts +11 -0
- package/dist/fleet/colab-store.js +14 -2
- package/dist/fleet/peer-session-bridge.js +50 -12
- package/dist/fleet/peer-tool-bridge.js +14 -0
- package/dist/goals/goal-decomposer.d.ts +27 -0
- package/dist/goals/goal-decomposer.js +293 -0
- package/dist/goals/goal-judge-client.d.ts +15 -0
- package/dist/goals/goal-judge-client.js +45 -0
- package/dist/goals/goal-judge.d.ts +2 -0
- package/dist/goals/goal-judge.js +35 -6
- package/dist/goals/goal-loop.d.ts +14 -0
- package/dist/goals/goal-loop.js +47 -2
- package/dist/goals/goal-manager.d.ts +6 -0
- package/dist/goals/goal-manager.js +67 -14
- package/dist/goals/goal-state.d.ts +13 -0
- package/dist/goals/goal-state.js +83 -13
- package/dist/goals/goal-store.d.ts +3 -0
- package/dist/goals/goal-store.js +31 -15
- package/dist/harness/contract.d.ts +28 -28
- package/dist/hooks/user-hooks.js +17 -3
- package/dist/identity/identity-manager.js +3 -2
- package/dist/index.js +481 -26
- package/dist/input/text-to-speech.d.ts +2 -6
- package/dist/input/text-to-speech.js +2 -27
- package/dist/integrations/screenpipe/screenpipe-client.d.ts +10 -0
- package/dist/integrations/screenpipe/screenpipe-client.js +12 -2
- package/dist/integrations/tailscale.d.ts +13 -0
- package/dist/integrations/tailscale.js +87 -34
- package/dist/knowledge/workspace-indexer.js +53 -9
- package/dist/mcp/client.js +1 -0
- package/dist/mcp/mcp-desktop-tools.d.ts +23 -0
- package/dist/mcp/mcp-desktop-tools.js +158 -0
- package/dist/mcp/mcp-resources.js +2 -3
- package/dist/mcp/mcp-server.js +2 -0
- package/dist/memory/enhanced-memory.d.ts +10 -0
- package/dist/memory/enhanced-memory.js +33 -2
- package/dist/memory/index.d.ts +3 -1
- package/dist/memory/index.js +4 -1
- package/dist/memory/memory-auto-proposer.d.ts +23 -0
- package/dist/memory/memory-auto-proposer.js +308 -0
- package/dist/memory/memory-candidate-queue.d.ts +92 -0
- package/dist/memory/memory-candidate-queue.js +261 -0
- package/dist/memory/persistent-memory.d.ts +45 -2
- package/dist/memory/persistent-memory.js +236 -40
- package/dist/ml/bayesian-qualifier.d.ts +1 -1
- package/dist/ml/bayesian-qualifier.js +35 -2
- package/dist/openclaw/gateway-bridge.js +5 -0
- package/dist/plugins/marketplace.d.ts +1 -0
- package/dist/plugins/marketplace.js +7 -0
- package/dist/prompts/execution-discipline.d.ts +14 -0
- package/dist/prompts/execution-discipline.js +29 -0
- package/dist/prompts/variation-injector.js +9 -2
- package/dist/protocols/acp/acp-agentic-runner.d.ts +7 -6
- package/dist/protocols/acp/acp-agentic-runner.js +115 -18
- package/dist/protocols/acp/acp-session-store.d.ts +23 -0
- package/dist/protocols/acp/acp-session-store.js +77 -0
- package/dist/protocols/acp/acp-stdio-server.d.ts +7 -0
- package/dist/protocols/acp/acp-stdio-server.js +71 -16
- package/dist/providers/active-llm-registry.d.ts +37 -0
- package/dist/providers/active-llm-registry.js +186 -0
- package/dist/providers/auxiliary-provider.d.ts +25 -0
- package/dist/providers/auxiliary-provider.js +192 -0
- package/dist/providers/codex-oauth.d.ts +1 -1
- package/dist/providers/codex-oauth.js +27 -4
- package/dist/providers/index.d.ts +3 -0
- package/dist/providers/index.js +4 -0
- package/dist/providers/provider-catalog.d.ts +70 -0
- package/dist/providers/provider-catalog.js +738 -0
- package/dist/providers/provider-fallback.d.ts +35 -0
- package/dist/providers/provider-fallback.js +171 -0
- package/dist/providers/xai-oauth.d.ts +128 -0
- package/dist/providers/xai-oauth.js +735 -0
- package/dist/scheduler/cron-scheduler.d.ts +15 -3
- package/dist/scheduler/cron-scheduler.js +53 -7
- package/dist/scheduler/script-runner.d.ts +2 -0
- package/dist/scheduler/script-runner.js +19 -4
- package/dist/scheduler/watchdog-handlers.js +7 -20
- package/dist/search/usearch-index.js +7 -2
- package/dist/security/tool-policy/tool-groups.js +2 -0
- package/dist/sensory/dreaming.d.ts +45 -0
- package/dist/sensory/dreaming.js +114 -0
- package/dist/sensory/heartbeat-scheduler.d.ts +38 -0
- package/dist/sensory/heartbeat-scheduler.js +72 -0
- package/dist/sensory/reactions.d.ts +24 -0
- package/dist/sensory/reactions.js +31 -0
- package/dist/sensory/screen-reaction.d.ts +23 -0
- package/dist/sensory/screen-reaction.js +59 -0
- package/dist/sensory/sensory-bridge.d.ts +23 -0
- package/dist/sensory/sensory-bridge.js +85 -0
- package/dist/sensory/sensory-memory.d.ts +20 -0
- package/dist/sensory/sensory-memory.js +39 -0
- package/dist/sensory/speech-reaction.d.ts +21 -0
- package/dist/sensory/speech-reaction.js +83 -0
- package/dist/sensory/vision-reaction.d.ts +31 -0
- package/dist/sensory/vision-reaction.js +74 -0
- package/dist/server/index.js +106 -2
- package/dist/server/routes/mobile.d.ts +12 -4
- package/dist/server/routes/mobile.js +116 -1
- package/dist/server/tls-config.d.ts +35 -0
- package/dist/server/tls-config.js +142 -0
- package/dist/server/tunnel-manager.d.ts +20 -0
- package/dist/server/tunnel-manager.js +58 -0
- package/dist/server/websocket/fleet-bridge.js +5 -0
- package/dist/services/prompt-builder.d.ts +11 -0
- package/dist/services/prompt-builder.js +124 -17
- package/dist/shared/engine-types.d.ts +15 -1
- package/dist/sidecar/sidecar-bridge.d.ts +1 -0
- package/dist/sidecar/sidecar-bridge.js +21 -10
- package/dist/skills/parser.js +3 -0
- package/dist/skills/skill-importer.d.ts +58 -0
- package/dist/skills/skill-importer.js +261 -0
- package/dist/skills/skill-sources.d.ts +20 -0
- package/dist/skills/skill-sources.js +102 -0
- package/dist/skills/types.d.ts +6 -0
- package/dist/spec/spec-store.js +8 -1
- package/dist/talk-mode/providers/audioreader-tts.d.ts +1 -1
- package/dist/talk-mode/providers/audioreader-tts.js +8 -8
- package/dist/templates/project-scaffolding.js +3 -2
- package/dist/themes/theme-schema.d.ts +10 -10
- package/dist/tools/application-profiles.js +38 -0
- package/dist/tools/bash/bash-tool.d.ts +1 -0
- package/dist/tools/bash/bash-tool.js +16 -2
- package/dist/tools/bash/command-validator.js +3 -0
- package/dist/tools/bash/rtk-rewrite.d.ts +16 -0
- package/dist/tools/bash/rtk-rewrite.js +100 -0
- package/dist/tools/bash/streaming-executor.js +14 -1
- package/dist/tools/computer-control-tool.d.ts +16 -1
- package/dist/tools/computer-control-tool.js +317 -5
- package/dist/tools/document-generator.d.ts +14 -0
- package/dist/tools/document-generator.js +79 -0
- package/dist/tools/execute-code-rpc-invoker.d.ts +26 -2
- package/dist/tools/execute-code-rpc-invoker.js +46 -5
- package/dist/tools/metadata.js +28 -0
- package/dist/tools/office-macro-tool.d.ts +10 -0
- package/dist/tools/office-macro-tool.js +93 -0
- package/dist/tools/register-tool-handler.d.ts +25 -0
- package/dist/tools/register-tool-handler.js +100 -0
- package/dist/tools/registry/index.d.ts +2 -1
- package/dist/tools/registry/index.js +2 -1
- package/dist/tools/registry/memory-tools.d.ts +20 -0
- package/dist/tools/registry/memory-tools.js +225 -3
- package/dist/tools/registry/multimodal-tools.js +2 -2
- package/dist/tools/registry/vision-tools.d.ts +33 -0
- package/dist/tools/registry/vision-tools.js +308 -6
- package/dist/tools/registry/windows-tools.d.ts +2 -0
- package/dist/tools/registry/windows-tools.js +47 -0
- package/dist/tools/registry.d.ts +6 -0
- package/dist/tools/registry.js +8 -0
- package/dist/tools/route-peer-tool.js +14 -0
- package/dist/tools/screenshot-tool.js +14 -2
- package/dist/tools/text-to-speech-tool.d.ts +1 -1
- package/dist/tools/text-to-speech-tool.js +2 -12
- package/dist/tools/tool-selector.js +3 -59
- package/dist/utils/config-validation/schema.d.ts +40 -7
- package/dist/utils/config-validation/schema.js +130 -1
- package/dist/utils/cost-tracker.js +21 -1
- package/dist/utils/disk-guard.d.ts +180 -0
- package/dist/utils/disk-guard.js +404 -0
- package/dist/utils/init-project.d.ts +7 -0
- package/dist/utils/init-project.js +37 -0
- package/dist/utils/interactive-setup.js +35 -2
- package/dist/utils/model-utils.js +11 -2
- package/dist/utils/output-sanitizer.js +11 -0
- package/dist/utils/provider-detector.d.ts +8 -7
- package/dist/utils/provider-detector.js +19 -77
- package/dist/utils/settings-manager.d.ts +19 -0
- package/dist/utils/token-display.d.ts +3 -3
- package/dist/utils/token-display.js +22 -4
- package/dist/wizard/onboarding.d.ts +39 -0
- package/dist/wizard/onboarding.js +433 -21
- package/dist/wizard/provider-onboarding.d.ts +8 -23
- package/dist/wizard/provider-onboarding.js +39 -158
- package/package.json +4 -2
- package/dist/plugins/provider-onboarding.d.ts +0 -23
- package/dist/plugins/provider-onboarding.js +0 -116
- package/dist/utils/kokoro-tts.d.ts +0 -8
- package/dist/utils/kokoro-tts.js +0 -67
|
@@ -19,6 +19,41 @@ export const APPLICATION_PROFILES = [
|
|
|
19
19
|
],
|
|
20
20
|
notes: 'Uses Windows COM automation when Excel is installed, then falls back to desktop control. Cell writes and saves require explicit confirmation for live runs.',
|
|
21
21
|
},
|
|
22
|
+
{
|
|
23
|
+
id: 'powerpoint',
|
|
24
|
+
aliases: ['ppt', 'pptx', 'microsoft powerpoint', 'presentation', 'slides'],
|
|
25
|
+
name: 'Microsoft PowerPoint',
|
|
26
|
+
riskLevel: 'high',
|
|
27
|
+
defaultPolicy: 'confirm',
|
|
28
|
+
processNames: ['POWERPNT'],
|
|
29
|
+
titleHints: ['PowerPoint'],
|
|
30
|
+
launchCommand: 'powerpnt.exe',
|
|
31
|
+
executableCandidates: ['powerpnt.exe'],
|
|
32
|
+
capabilities: [
|
|
33
|
+
'open presentation',
|
|
34
|
+
'add slide',
|
|
35
|
+
'set text via COM',
|
|
36
|
+
'save presentation',
|
|
37
|
+
],
|
|
38
|
+
notes: 'Uses Windows COM automation when PowerPoint is installed.',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
id: 'word',
|
|
42
|
+
aliases: ['doc', 'docx', 'microsoft word', 'word processor'],
|
|
43
|
+
name: 'Microsoft Word',
|
|
44
|
+
riskLevel: 'high',
|
|
45
|
+
defaultPolicy: 'confirm',
|
|
46
|
+
processNames: ['WINWORD'],
|
|
47
|
+
titleHints: ['Word'],
|
|
48
|
+
launchCommand: 'winword.exe',
|
|
49
|
+
executableCandidates: ['winword.exe'],
|
|
50
|
+
capabilities: [
|
|
51
|
+
'open document',
|
|
52
|
+
'type text via COM',
|
|
53
|
+
'save document',
|
|
54
|
+
],
|
|
55
|
+
notes: 'Uses Windows COM automation when Word is installed.',
|
|
56
|
+
},
|
|
22
57
|
{
|
|
23
58
|
id: 'notepad',
|
|
24
59
|
aliases: ['bloc-notes', 'notepad.exe', 'text editor'],
|
|
@@ -99,6 +134,9 @@ export const APPLICATION_PROFILES = [
|
|
|
99
134
|
},
|
|
100
135
|
];
|
|
101
136
|
export function listApplicationProfiles() {
|
|
137
|
+
// The Office profiles (excel/powerpoint/word) are advertised on every platform
|
|
138
|
+
// for a consistent catalog; their COM-backed actions fail closed with a clear
|
|
139
|
+
// "requires Windows COM" error off-Windows, so listing them cross-platform is safe.
|
|
102
140
|
return APPLICATION_PROFILES;
|
|
103
141
|
}
|
|
104
142
|
export function resolveApplicationProfile(appName) {
|
|
@@ -72,6 +72,7 @@ export declare class BashTool implements Disposable {
|
|
|
72
72
|
* await bash.execute('npm install', 120000);
|
|
73
73
|
*/
|
|
74
74
|
execute(command: string, timeout?: number): Promise<ToolResult>;
|
|
75
|
+
private resolveRtkCommand;
|
|
75
76
|
/**
|
|
76
77
|
* Checkpoint files that would be affected by destructive commands.
|
|
77
78
|
* Parses command arguments to identify file targets of rm, mv, etc.
|
|
@@ -28,6 +28,7 @@ import { SafeBinariesChecker } from '../../security/safe-binaries.js';
|
|
|
28
28
|
import { getCheckpointManager } from '../../checkpoints/checkpoint-manager.js';
|
|
29
29
|
import { auditLogger } from '../../security/audit-logger.js';
|
|
30
30
|
import { buildBashEnvPrelude, CONTROLLED_SUBPROCESS_ENV } from './env-overrides.js';
|
|
31
|
+
import { rewriteCommandWithRtk } from './rtk-rewrite.js';
|
|
31
32
|
export class BashTool {
|
|
32
33
|
currentDirectory = process.cwd();
|
|
33
34
|
confirmationService = ConfirmationService.getInstance();
|
|
@@ -331,8 +332,9 @@ export class BashTool {
|
|
|
331
332
|
};
|
|
332
333
|
}
|
|
333
334
|
}
|
|
335
|
+
const executionCommand = await this.resolveRtkCommand(command);
|
|
334
336
|
// Execute using spawn (safer than exec)
|
|
335
|
-
const result = await this.executeWithSpawn(
|
|
337
|
+
const result = await this.executeWithSpawn(executionCommand, {
|
|
336
338
|
timeout,
|
|
337
339
|
cwd: this.currentDirectory,
|
|
338
340
|
});
|
|
@@ -340,7 +342,7 @@ export class BashTool {
|
|
|
340
342
|
const errorMessage = result.stderr || `Command exited with code ${result.exitCode}`;
|
|
341
343
|
// Attempt self-healing if enabled
|
|
342
344
|
if (this.selfHealingEnabled) {
|
|
343
|
-
const healingResult = await this.selfHealingEngine.attemptHealing(
|
|
345
|
+
const healingResult = await this.selfHealingEngine.attemptHealing(executionCommand, errorMessage, async (fixCmd) => {
|
|
344
346
|
// Execute fix command without self-healing to avoid recursion
|
|
345
347
|
const fixResult = await this.executeWithSpawn(fixCmd, {
|
|
346
348
|
timeout: timeout * 2, // Give more time for fix commands
|
|
@@ -405,6 +407,18 @@ export class BashTool {
|
|
|
405
407
|
};
|
|
406
408
|
}
|
|
407
409
|
}
|
|
410
|
+
async resolveRtkCommand(command) {
|
|
411
|
+
const rewrite = await rewriteCommandWithRtk(command);
|
|
412
|
+
if (!rewrite.rewritten)
|
|
413
|
+
return command;
|
|
414
|
+
const safetyValidation = validateCommandSafety(rewrite.command);
|
|
415
|
+
if (!safetyValidation.valid)
|
|
416
|
+
return command;
|
|
417
|
+
const validation = this.validateCommand(rewrite.command);
|
|
418
|
+
if (!validation.valid)
|
|
419
|
+
return command;
|
|
420
|
+
return rewrite.command;
|
|
421
|
+
}
|
|
408
422
|
/**
|
|
409
423
|
* Checkpoint files that would be affected by destructive commands.
|
|
410
424
|
* Parses command arguments to identify file targets of rm, mv, etc.
|
|
@@ -17,6 +17,9 @@ import { auditLogger } from '../../security/audit-logger.js';
|
|
|
17
17
|
* Handles paths, env var prefixes, and common shell constructs
|
|
18
18
|
*/
|
|
19
19
|
export function extractBaseCommand(command) {
|
|
20
|
+
// Defensive: a malformed tool call can pass a non-string command.
|
|
21
|
+
if (typeof command !== 'string')
|
|
22
|
+
return null;
|
|
20
23
|
// Trim and handle empty
|
|
21
24
|
const trimmed = command.trim();
|
|
22
25
|
if (!trimmed)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Optional RTK command rewriting.
|
|
3
|
+
*
|
|
4
|
+
* RTK is a CLI proxy, not a TypeScript library. We integrate through its
|
|
5
|
+
* stable `rtk rewrite <command>` interface and fail open: when RTK is absent,
|
|
6
|
+
* disabled, times out, or proposes no rewrite, the original command is used.
|
|
7
|
+
*/
|
|
8
|
+
export interface RtkRewriteResult {
|
|
9
|
+
originalCommand: string;
|
|
10
|
+
command: string;
|
|
11
|
+
rewritten: boolean;
|
|
12
|
+
reason?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function isRtkRewriteEnabled(env?: NodeJS.ProcessEnv): boolean;
|
|
15
|
+
export declare function getRtkRewriteTimeoutMs(env?: NodeJS.ProcessEnv): number;
|
|
16
|
+
export declare function rewriteCommandWithRtk(command: string): Promise<RtkRewriteResult>;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Optional RTK command rewriting.
|
|
3
|
+
*
|
|
4
|
+
* RTK is a CLI proxy, not a TypeScript library. We integrate through its
|
|
5
|
+
* stable `rtk rewrite <command>` interface and fail open: when RTK is absent,
|
|
6
|
+
* disabled, times out, or proposes no rewrite, the original command is used.
|
|
7
|
+
*/
|
|
8
|
+
import { spawn } from 'child_process';
|
|
9
|
+
import { getShellEnvPolicy } from '../../security/shell-env-policy.js';
|
|
10
|
+
import { getFilteredEnv } from './command-validator.js';
|
|
11
|
+
import { CONTROLLED_SUBPROCESS_ENV } from './env-overrides.js';
|
|
12
|
+
const DEFAULT_RTK_TIMEOUT_MS = 1000;
|
|
13
|
+
const MAX_REWRITE_OUTPUT_BYTES = 64 * 1024;
|
|
14
|
+
export function isRtkRewriteEnabled(env = process.env) {
|
|
15
|
+
const raw = (env.CODEBUDDY_RTK_REWRITE ?? env.CODEBUDDY_RTK ?? '').trim().toLowerCase();
|
|
16
|
+
return raw === '1' || raw === 'true' || raw === 'yes' || raw === 'on' || raw === 'auto';
|
|
17
|
+
}
|
|
18
|
+
export function getRtkRewriteTimeoutMs(env = process.env) {
|
|
19
|
+
const raw = Number(env.CODEBUDDY_RTK_TIMEOUT_MS);
|
|
20
|
+
if (Number.isFinite(raw) && raw >= 50 && raw <= 10000) {
|
|
21
|
+
return Math.trunc(raw);
|
|
22
|
+
}
|
|
23
|
+
return DEFAULT_RTK_TIMEOUT_MS;
|
|
24
|
+
}
|
|
25
|
+
export async function rewriteCommandWithRtk(command) {
|
|
26
|
+
const originalCommand = command;
|
|
27
|
+
// Defensive: a malformed tool call can pass a non-string command.
|
|
28
|
+
if (typeof command !== 'string') {
|
|
29
|
+
return { originalCommand, command, rewritten: false, reason: 'invalid-command' };
|
|
30
|
+
}
|
|
31
|
+
if (!isRtkRewriteEnabled()) {
|
|
32
|
+
return { originalCommand, command, rewritten: false, reason: 'disabled' };
|
|
33
|
+
}
|
|
34
|
+
const trimmed = command.trim();
|
|
35
|
+
if (!trimmed) {
|
|
36
|
+
return { originalCommand, command, rewritten: false, reason: 'empty-command' };
|
|
37
|
+
}
|
|
38
|
+
if (/^rtk(?:\s|$)/.test(trimmed)) {
|
|
39
|
+
return { originalCommand, command, rewritten: false, reason: 'already-rtk' };
|
|
40
|
+
}
|
|
41
|
+
return new Promise((resolve) => {
|
|
42
|
+
let stdout = '';
|
|
43
|
+
let settled = false;
|
|
44
|
+
const finish = (result) => {
|
|
45
|
+
if (settled)
|
|
46
|
+
return;
|
|
47
|
+
settled = true;
|
|
48
|
+
resolve(result);
|
|
49
|
+
};
|
|
50
|
+
const filteredEnv = getFilteredEnv();
|
|
51
|
+
const env = {
|
|
52
|
+
...getShellEnvPolicy().buildEnv(filteredEnv),
|
|
53
|
+
...CONTROLLED_SUBPROCESS_ENV,
|
|
54
|
+
};
|
|
55
|
+
const proc = spawn('rtk', ['rewrite', command], {
|
|
56
|
+
shell: false,
|
|
57
|
+
env,
|
|
58
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
59
|
+
});
|
|
60
|
+
const timer = setTimeout(() => {
|
|
61
|
+
try {
|
|
62
|
+
proc.kill('SIGTERM');
|
|
63
|
+
}
|
|
64
|
+
catch {
|
|
65
|
+
// Process already exited.
|
|
66
|
+
}
|
|
67
|
+
finish({ originalCommand, command, rewritten: false, reason: 'timeout' });
|
|
68
|
+
}, getRtkRewriteTimeoutMs());
|
|
69
|
+
proc.stdout?.on('data', (data) => {
|
|
70
|
+
if (stdout.length >= MAX_REWRITE_OUTPUT_BYTES)
|
|
71
|
+
return;
|
|
72
|
+
stdout += data.toString();
|
|
73
|
+
if (stdout.length > MAX_REWRITE_OUTPUT_BYTES) {
|
|
74
|
+
stdout = stdout.slice(0, MAX_REWRITE_OUTPUT_BYTES);
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
proc.on('error', () => {
|
|
78
|
+
clearTimeout(timer);
|
|
79
|
+
finish({ originalCommand, command, rewritten: false, reason: 'spawn-error' });
|
|
80
|
+
});
|
|
81
|
+
proc.on('close', () => {
|
|
82
|
+
clearTimeout(timer);
|
|
83
|
+
const rewritten = stdout.trim();
|
|
84
|
+
if (!rewritten) {
|
|
85
|
+
finish({ originalCommand, command, rewritten: false, reason: 'no-rewrite' });
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
if (rewritten === trimmed) {
|
|
89
|
+
finish({ originalCommand, command, rewritten: false, reason: 'unchanged' });
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
if (rewritten.includes('\n')) {
|
|
93
|
+
finish({ originalCommand, command, rewritten: false, reason: 'multiline-rewrite' });
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
finish({ originalCommand, command: rewritten, rewritten: true });
|
|
97
|
+
});
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=rtk-rewrite.js.map
|
|
@@ -11,6 +11,7 @@ import { validateCommand } from './command-validator.js';
|
|
|
11
11
|
import { getFilteredEnv } from './command-validator.js';
|
|
12
12
|
import { getShellEnvPolicy } from '../../security/shell-env-policy.js';
|
|
13
13
|
import { buildBashEnvPrelude, CONTROLLED_SUBPROCESS_ENV } from './env-overrides.js';
|
|
14
|
+
import { rewriteCommandWithRtk } from './rtk-rewrite.js';
|
|
14
15
|
/**
|
|
15
16
|
* Execute a command with streaming output.
|
|
16
17
|
* Yields each line of stdout/stderr as it arrives.
|
|
@@ -45,6 +46,18 @@ export async function* executeStreaming(command, timeout = 30000, deps) {
|
|
|
45
46
|
return { success: false, error: confirmationResult.feedback || 'Cancelled by user' };
|
|
46
47
|
}
|
|
47
48
|
}
|
|
49
|
+
const rewrite = await rewriteCommandWithRtk(command);
|
|
50
|
+
let executionCommand = command;
|
|
51
|
+
if (rewrite.rewritten) {
|
|
52
|
+
const rewrittenValidation = validateCommand(rewrite.command);
|
|
53
|
+
const rewrittenSandboxValidation = deps.getSandboxManager().validateCommand(rewrite.command);
|
|
54
|
+
const rewrittenSafetyValidation = validateCommandSafety(rewrite.command);
|
|
55
|
+
if (rewrittenValidation.valid &&
|
|
56
|
+
rewrittenSandboxValidation.valid &&
|
|
57
|
+
rewrittenSafetyValidation.valid) {
|
|
58
|
+
executionCommand = rewrite.command;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
48
61
|
// Spawn the process
|
|
49
62
|
const isWindows = process.platform === 'win32';
|
|
50
63
|
const policyEnv = getShellEnvPolicy().buildEnv(getFilteredEnv());
|
|
@@ -52,7 +65,7 @@ export async function* executeStreaming(command, timeout = 30000, deps) {
|
|
|
52
65
|
...policyEnv,
|
|
53
66
|
...CONTROLLED_SUBPROCESS_ENV,
|
|
54
67
|
};
|
|
55
|
-
const proc = spawn('bash', ['-c', `${buildBashEnvPrelude()}\n${
|
|
68
|
+
const proc = spawn('bash', ['-c', `${buildBashEnvPrelude()}\n${executionCommand}`], {
|
|
56
69
|
shell: false,
|
|
57
70
|
cwd: deps.getCurrentDirectory(),
|
|
58
71
|
env: controlledEnv,
|
|
@@ -41,7 +41,7 @@ export declare function resolveGroundingCoordinatesToAbsolute(rel: {
|
|
|
41
41
|
x: number;
|
|
42
42
|
y: number;
|
|
43
43
|
} | null;
|
|
44
|
-
export type ComputerAction = 'snapshot' | 'snapshot_with_screenshot' | 'get_element' | 'find_elements' | 'click_element_by_name' | 'click_button' | 'click_link' | 'fill_text_field' | 'clear_and_type' | 'select_dropdown_option' | 'select_radio' | 'activate_tab' | 'select_list_item' | 'open_menu_item' | 'toggle_checkbox' | 'set_slider_value' | 'select_tree_item' | 'expand_tree_item' | 'collapse_tree_item' | 'assert_text_visible' | 'assert_element_visible' | 'inspect_dialog' | 'click_dialog_button' | 'handle_dialog' | 'list_app_profiles' | 'get_app_profile' | 'open_app' | 'focus_app' | 'read_app_text' | 'save_app_document' | 'excel_open_workbook' | 'excel_set_cell' | 'excel_get_cell' | 'excel_save_workbook' | 'use_app_workflow' | 'macro' | 'click_text' | 'save_macro' | 'play_macro' | 'list_macros' | 'delete_macro' | 'wait_for_text' | 'speak' | 'click' | 'left_click' | 'middle_click' | 'double_click' | 'right_click' | 'move_mouse' | 'drag' | 'scroll' | 'cursor_position' | 'wait' | 'type' | 'key' | 'key_down' | 'key_up' | 'hotkey' | 'get_windows' | 'get_window' | 'list_window_matches' | 'wait_for_window' | 'focus_window' | 'close_window' | 'get_active_window' | 'minimize_window' | 'maximize_window' | 'restore_window' | 'move_window' | 'resize_window' | 'set_window' | 'act_on_best_window' | 'get_audit_log' | 'clear_audit_log' | 'export_audit_log' | 'set_pilot_mode' | 'get_pilot_mode' | 'get_volume' | 'set_volume' | 'get_brightness' | 'set_brightness' | 'notify' | 'lock' | 'sleep' | 'start_recording' | 'stop_recording' | 'recording_status' | 'system_info' | 'battery_info' | 'network_info' | 'check_permission';
|
|
44
|
+
export type ComputerAction = 'snapshot' | 'snapshot_with_screenshot' | 'get_element' | 'find_elements' | 'click_element_by_name' | 'click_button' | 'click_link' | 'fill_text_field' | 'clear_and_type' | 'select_dropdown_option' | 'select_radio' | 'activate_tab' | 'select_list_item' | 'open_menu_item' | 'toggle_checkbox' | 'set_slider_value' | 'select_tree_item' | 'expand_tree_item' | 'collapse_tree_item' | 'assert_text_visible' | 'assert_element_visible' | 'inspect_dialog' | 'click_dialog_button' | 'handle_dialog' | 'list_app_profiles' | 'get_app_profile' | 'open_app' | 'focus_app' | 'read_app_text' | 'save_app_document' | 'excel_open_workbook' | 'excel_set_cell' | 'excel_get_cell' | 'excel_save_workbook' | 'powerpoint_open_presentation' | 'powerpoint_add_slide' | 'powerpoint_set_text' | 'powerpoint_save_presentation' | 'word_open_document' | 'word_type_text' | 'word_save_document' | 'use_app_workflow' | 'macro' | 'click_text' | 'save_macro' | 'play_macro' | 'list_macros' | 'delete_macro' | 'wait_for_text' | 'speak' | 'click' | 'left_click' | 'middle_click' | 'double_click' | 'right_click' | 'move_mouse' | 'drag' | 'scroll' | 'cursor_position' | 'wait' | 'type' | 'key' | 'key_down' | 'key_up' | 'hotkey' | 'get_windows' | 'get_window' | 'list_window_matches' | 'wait_for_window' | 'focus_window' | 'close_window' | 'get_active_window' | 'minimize_window' | 'maximize_window' | 'restore_window' | 'move_window' | 'resize_window' | 'set_window' | 'act_on_best_window' | 'get_audit_log' | 'clear_audit_log' | 'export_audit_log' | 'set_pilot_mode' | 'get_pilot_mode' | 'get_volume' | 'set_volume' | 'get_brightness' | 'set_brightness' | 'notify' | 'lock' | 'sleep' | 'start_recording' | 'stop_recording' | 'recording_status' | 'system_info' | 'battery_info' | 'network_info' | 'check_permission';
|
|
45
45
|
export interface ComputerControlInput {
|
|
46
46
|
action: ComputerAction;
|
|
47
47
|
pilotMode?: 'cautious' | 'normal' | 'fast';
|
|
@@ -52,6 +52,7 @@ export interface ComputerControlInput {
|
|
|
52
52
|
exportAuditPath?: string;
|
|
53
53
|
policyOverrides?: Record<string, 'allow' | 'block' | 'confirm'>;
|
|
54
54
|
interactiveOnly?: boolean;
|
|
55
|
+
useOmniParser?: boolean;
|
|
55
56
|
ref?: number;
|
|
56
57
|
role?: string;
|
|
57
58
|
name?: string;
|
|
@@ -61,6 +62,9 @@ export interface ComputerControlInput {
|
|
|
61
62
|
sheetName?: string;
|
|
62
63
|
cell?: string;
|
|
63
64
|
value?: string | number | boolean | null;
|
|
65
|
+
slideIndex?: number;
|
|
66
|
+
shapeIndex?: number;
|
|
67
|
+
layoutIndex?: number;
|
|
64
68
|
x?: number;
|
|
65
69
|
y?: number;
|
|
66
70
|
width?: number;
|
|
@@ -116,6 +120,7 @@ export declare class ComputerControlTool {
|
|
|
116
120
|
private systemControl;
|
|
117
121
|
private snapshotManager;
|
|
118
122
|
private screenRecorder;
|
|
123
|
+
private omniParser;
|
|
119
124
|
private lastTargetFocusProof;
|
|
120
125
|
private lastVisualContextProof;
|
|
121
126
|
/**
|
|
@@ -169,10 +174,18 @@ export declare class ComputerControlTool {
|
|
|
169
174
|
private readAppText;
|
|
170
175
|
private saveAppDocument;
|
|
171
176
|
private withDerivedTextDocumentTarget;
|
|
177
|
+
private basenameForWindowTitle;
|
|
172
178
|
private excelOpenWorkbook;
|
|
173
179
|
private excelSetCell;
|
|
174
180
|
private excelGetCell;
|
|
175
181
|
private excelSaveWorkbook;
|
|
182
|
+
private powerpointOpenPresentation;
|
|
183
|
+
private powerpointAddSlide;
|
|
184
|
+
private powerpointSetText;
|
|
185
|
+
private powerpointSavePresentation;
|
|
186
|
+
private wordOpenDocument;
|
|
187
|
+
private wordTypeText;
|
|
188
|
+
private wordSaveDocument;
|
|
176
189
|
private click;
|
|
177
190
|
private doubleClick;
|
|
178
191
|
private rightClick;
|
|
@@ -228,6 +241,8 @@ export declare class ComputerControlTool {
|
|
|
228
241
|
private buildStartProcessScript;
|
|
229
242
|
private runPowerShellEncoded;
|
|
230
243
|
private runExcelAutomation;
|
|
244
|
+
private runPowerpointAutomation;
|
|
245
|
+
private runWordAutomation;
|
|
231
246
|
private tryWindowsSelectDropdownOption;
|
|
232
247
|
private tryWindowsActivateNamedRole;
|
|
233
248
|
private tryWindowsSetRangeValue;
|