@evalops/maestro 0.10.51 → 0.10.53
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 +1 -3
- package/dist/agent/agent.d.ts.map +1 -1
- package/dist/agent/agent.js.map +1 -1
- package/dist/agent/compaction.d.ts.map +1 -1
- package/dist/agent/compaction.js +1 -1
- package/dist/agent/compaction.js.map +1 -1
- package/dist/agent/context-handoff.d.ts.map +1 -1
- package/dist/agent/context-handoff.js +2 -1
- package/dist/agent/context-handoff.js.map +1 -1
- package/dist/agent/index.d.ts +8 -1
- package/dist/agent/index.d.ts.map +1 -1
- package/dist/agent/index.js +8 -1
- package/dist/agent/index.js.map +1 -1
- package/dist/agent/modes.d.ts +1 -1
- package/dist/agent/modes.d.ts.map +1 -1
- package/dist/agent/modes.js +56 -0
- package/dist/agent/modes.js.map +1 -1
- package/dist/agent/oracle-consultation-policy.d.ts +22 -0
- package/dist/agent/oracle-consultation-policy.d.ts.map +1 -0
- package/dist/agent/oracle-consultation-policy.js +72 -0
- package/dist/agent/oracle-consultation-policy.js.map +1 -0
- package/dist/agent/oracle-policy-experiment.d.ts +27 -0
- package/dist/agent/oracle-policy-experiment.d.ts.map +1 -0
- package/dist/agent/oracle-policy-experiment.js +59 -0
- package/dist/agent/oracle-policy-experiment.js.map +1 -0
- package/dist/agent/oracle-policy-rollout.d.ts +42 -0
- package/dist/agent/oracle-policy-rollout.d.ts.map +1 -0
- package/dist/agent/oracle-policy-rollout.js +80 -0
- package/dist/agent/oracle-policy-rollout.js.map +1 -0
- package/dist/agent/plugin-agent-api.d.ts +13 -0
- package/dist/agent/plugin-agent-api.d.ts.map +1 -0
- package/dist/agent/plugin-agent-api.js +11 -0
- package/dist/agent/plugin-agent-api.js.map +1 -0
- package/dist/agent/plugin-agent-loader.d.ts +17 -0
- package/dist/agent/plugin-agent-loader.d.ts.map +1 -0
- package/dist/agent/plugin-agent-loader.js +81 -0
- package/dist/agent/plugin-agent-loader.js.map +1 -0
- package/dist/agent/plugin-agent-registry.d.ts +62 -0
- package/dist/agent/plugin-agent-registry.d.ts.map +1 -0
- package/dist/agent/plugin-agent-registry.js +109 -0
- package/dist/agent/plugin-agent-registry.js.map +1 -0
- package/dist/agent/profile-loader.d.ts +7 -0
- package/dist/agent/profile-loader.d.ts.map +1 -0
- package/dist/agent/profile-loader.js +115 -0
- package/dist/agent/profile-loader.js.map +1 -0
- package/dist/agent/profiles.d.ts +30 -0
- package/dist/agent/profiles.d.ts.map +1 -0
- package/dist/agent/profiles.js +146 -0
- package/dist/agent/profiles.js.map +1 -0
- package/dist/agent/prompt-cache.d.ts +0 -4
- package/dist/agent/prompt-cache.d.ts.map +1 -1
- package/dist/agent/prompt-cache.js +1 -7
- package/dist/agent/prompt-cache.js.map +1 -1
- package/dist/agent/providers/google-gemini-cli.js +1 -0
- package/dist/agent/providers/google.js +1 -0
- package/dist/agent/providers/vertex.js +1 -0
- package/dist/agent/routing-receipt.d.ts +34 -0
- package/dist/agent/routing-receipt.d.ts.map +1 -0
- package/dist/agent/routing-receipt.js +55 -0
- package/dist/agent/routing-receipt.js.map +1 -0
- package/dist/{skills/artifact-metadata.d.ts → agent/skill-artifact-metadata.d.ts} +2 -4
- package/dist/agent/skill-artifact-metadata.d.ts.map +1 -0
- package/dist/{skills/artifact-metadata.js → agent/skill-artifact-metadata.js} +1 -38
- package/dist/agent/skill-artifact-metadata.js.map +1 -0
- package/dist/agent/subagent-specs.d.ts +1 -1
- package/dist/agent/subagent-specs.js +2 -2
- package/dist/agent/subagent-specs.js.map +1 -1
- package/dist/agent/token-counter.d.ts +40 -0
- package/dist/agent/token-counter.d.ts.map +1 -0
- package/dist/agent/token-counter.js +74 -0
- package/dist/agent/token-counter.js.map +1 -0
- package/dist/agent/transport/events.d.ts +1 -1
- package/dist/agent/transport/events.d.ts.map +1 -1
- package/dist/agent/transport/events.js +1 -1
- package/dist/agent/transport/events.js.map +1 -1
- package/dist/agent/types.d.ts +4 -2
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/agent/types.js.map +1 -1
- package/dist/app-server/plugin-bundle-api.d.ts.map +1 -1
- package/dist/app-server/plugin-bundle-api.js +1 -0
- package/dist/app-server/plugin-bundle-api.js.map +1 -1
- package/dist/app-server/session-api.d.ts.map +1 -1
- package/dist/app-server/session-api.js +15 -2
- package/dist/app-server/session-api.js.map +1 -1
- package/dist/audit/logger.d.ts +5 -5
- package/dist/cli/args.d.ts +2 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +18 -1
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/direct-runtime-command.d.ts +1 -0
- package/dist/cli/direct-runtime-command.d.ts.map +1 -1
- package/dist/cli/direct-runtime-command.js +25 -3
- package/dist/cli/direct-runtime-command.js.map +1 -1
- package/dist/cli/headless.d.ts +3 -19
- package/dist/cli/headless.d.ts.map +1 -1
- package/dist/cli/headless.js +8 -619
- package/dist/cli/headless.js.map +1 -1
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/help.js +3 -0
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/native-tui-launcher.d.ts +126 -0
- package/dist/cli/native-tui-launcher.d.ts.map +1 -0
- package/dist/cli/native-tui-launcher.js +425 -0
- package/dist/cli/native-tui-launcher.js.map +1 -0
- package/dist/cli/rpc-mode.d.ts +3 -27
- package/dist/cli/rpc-mode.d.ts.map +1 -1
- package/dist/cli/rpc-mode.js +8 -177
- package/dist/cli/rpc-mode.js.map +1 -1
- package/dist/cli/session.d.ts +11 -19
- package/dist/cli/session.d.ts.map +1 -1
- package/dist/cli/session.js +6 -64
- package/dist/cli/session.js.map +1 -1
- package/dist/cli-command-runtime.d.ts.map +1 -1
- package/dist/cli-command-runtime.js +26 -24
- package/dist/cli-command-runtime.js.map +1 -1
- package/dist/cli-runtime.js +52529 -137615
- package/dist/config/env-vars.d.ts +12 -0
- package/dist/config/env-vars.d.ts.map +1 -1
- package/dist/config/env-vars.js +12 -0
- package/dist/config/env-vars.js.map +1 -1
- package/dist/{cli-tui → config}/ui-state.d.ts +6 -1
- package/dist/config/ui-state.d.ts.map +1 -0
- package/dist/{cli-tui → config}/ui-state.js +1 -1
- package/dist/config/ui-state.js.map +1 -0
- package/dist/context/repo-map.d.ts.map +1 -1
- package/dist/context/repo-map.js +1 -7
- package/dist/context/repo-map.js.map +1 -1
- package/dist/context/token-optimizer.d.ts.map +1 -1
- package/dist/context/token-optimizer.js +1 -8
- package/dist/context/token-optimizer.js.map +1 -1
- package/dist/db/schema.d.ts +2 -2
- package/dist/hooks/notification-hooks.d.ts +1 -1
- package/dist/hooks/notification-hooks.d.ts.map +1 -1
- package/dist/hooks/notification-hooks.js.map +1 -1
- package/dist/hooks/tui-surface.d.ts +35 -0
- package/dist/hooks/tui-surface.d.ts.map +1 -0
- package/dist/hooks/tui-surface.js +11 -0
- package/dist/hooks/tui-surface.js.map +1 -0
- package/dist/hooks/types.d.ts +2 -1
- package/dist/hooks/types.d.ts.map +1 -1
- package/dist/hooks/types.js.map +1 -1
- package/dist/hooks/typescript-loader.d.ts.map +1 -1
- package/dist/hooks/typescript-loader.js.map +1 -1
- package/dist/hooks/ui-context.d.ts.map +1 -1
- package/dist/hooks/ui-context.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +154 -882
- package/dist/main.js.map +1 -1
- package/dist/models/config-loader.d.ts +5 -5
- package/dist/node_modules/@evalops/contracts/dist/index.d.ts +45 -0
- package/dist/node_modules/@evalops/contracts/dist/index.d.ts.map +1 -1
- package/dist/node_modules/@evalops/contracts/dist/index.js +2 -0
- package/dist/node_modules/@evalops/contracts/dist/index.js.map +1 -1
- package/dist/node_modules/@evalops/contracts/dist/maestro-app-server.d.ts +284 -0
- package/dist/node_modules/@evalops/contracts/dist/maestro-app-server.d.ts.map +1 -1
- package/dist/node_modules/@evalops/contracts/dist/maestro-app-server.js +41 -0
- package/dist/node_modules/@evalops/contracts/dist/maestro-app-server.js.map +1 -1
- package/dist/node_modules/@evalops/contracts/dist/schemas.d.ts +986 -0
- package/dist/node_modules/@evalops/contracts/dist/schemas.d.ts.map +1 -1
- package/dist/node_modules/@evalops/contracts/dist/schemas.js +49 -0
- package/dist/node_modules/@evalops/contracts/dist/schemas.js.map +1 -1
- package/dist/node_modules/@evalops/contracts/dist/token-estimation.d.ts +56 -0
- package/dist/node_modules/@evalops/contracts/dist/token-estimation.d.ts.map +1 -0
- package/dist/node_modules/@evalops/contracts/dist/token-estimation.js +86 -0
- package/dist/node_modules/@evalops/contracts/dist/token-estimation.js.map +1 -0
- package/dist/node_modules/@evalops/contracts/package.json +1 -1
- package/dist/packages/discovery.d.ts.map +1 -1
- package/dist/packages/discovery.js +1 -0
- package/dist/packages/discovery.js.map +1 -1
- package/dist/packages/inspection.d.ts.map +1 -1
- package/dist/packages/inspection.js +7 -1
- package/dist/packages/inspection.js.map +1 -1
- package/dist/packages/loader.d.ts.map +1 -1
- package/dist/packages/loader.js +8 -1
- package/dist/packages/loader.js.map +1 -1
- package/dist/packages/runtime.d.ts +1 -0
- package/dist/packages/runtime.d.ts.map +1 -1
- package/dist/packages/runtime.js +9 -1
- package/dist/packages/runtime.js.map +1 -1
- package/dist/packages/types.d.ts +6 -0
- package/dist/packages/types.d.ts.map +1 -1
- package/dist/packages/types.js.map +1 -1
- package/dist/runtime/agent-runtime.d.ts +22 -6
- package/dist/runtime/agent-runtime.d.ts.map +1 -1
- package/dist/runtime/agent-runtime.js +1 -1
- package/dist/runtime/agent-runtime.js.map +1 -1
- package/dist/runtime/env.d.ts +1 -0
- package/dist/runtime/env.d.ts.map +1 -1
- package/dist/runtime/env.js +1 -0
- package/dist/runtime/env.js.map +1 -1
- package/dist/{cli-tui → runtime}/prompt-queue.d.ts.map +1 -1
- package/dist/{cli-tui → runtime}/prompt-queue.js.map +1 -1
- package/dist/server/handlers/chat-ws.d.ts +2 -1
- package/dist/server/handlers/chat-ws.d.ts.map +1 -1
- package/dist/server/handlers/chat-ws.js +150 -5
- package/dist/server/handlers/chat-ws.js.map +1 -1
- package/dist/server/handlers/chat.d.ts.map +1 -1
- package/dist/server/handlers/chat.js +78 -5
- package/dist/server/handlers/chat.js.map +1 -1
- package/dist/server/handlers/package.d.ts.map +1 -1
- package/dist/server/handlers/package.js +1 -0
- package/dist/server/handlers/package.js.map +1 -1
- package/dist/server/handlers/queue.js +1 -1
- package/dist/server/handlers/queue.js.map +1 -1
- package/dist/server/handlers/ui.js +1 -1
- package/dist/server/handlers/ui.js.map +1 -1
- package/dist/server/handlers/zen.js +1 -1
- package/dist/server/handlers/zen.js.map +1 -1
- package/dist/server/hosted-session-manager.d.ts +3 -0
- package/dist/server/hosted-session-manager.d.ts.map +1 -1
- package/dist/server/hosted-session-manager.js +26 -0
- package/dist/server/hosted-session-manager.js.map +1 -1
- package/dist/server/model-selection.d.ts +1 -0
- package/dist/server/model-selection.d.ts.map +1 -1
- package/dist/server/model-selection.js +4 -0
- package/dist/server/model-selection.js.map +1 -1
- package/dist/server/session-serialization.d.ts.map +1 -1
- package/dist/server/session-serialization.js +3 -0
- package/dist/server/session-serialization.js.map +1 -1
- package/dist/server/session-timeline.d.ts.map +1 -1
- package/dist/server/session-timeline.js +1 -1
- package/dist/server/session-timeline.js.map +1 -1
- package/dist/server/sse-session.d.ts +2 -0
- package/dist/server/sse-session.d.ts.map +1 -1
- package/dist/server/sse-session.js +3 -0
- package/dist/server/sse-session.js.map +1 -1
- package/dist/server/stores/ui-store.d.ts +1 -1
- package/dist/server/stores/ui-store.d.ts.map +1 -1
- package/dist/server/stores/ui-store.js.map +1 -1
- package/dist/server/utils/token-estimator.d.ts +2 -2
- package/dist/server/utils/token-estimator.d.ts.map +1 -1
- package/dist/server/utils/token-estimator.js +2 -12
- package/dist/server/utils/token-estimator.js.map +1 -1
- package/dist/server/validation.d.ts +54 -0
- package/dist/server/validation.d.ts.map +1 -1
- package/dist/services/image-providers/cost.d.ts +70 -0
- package/dist/services/image-providers/cost.d.ts.map +1 -0
- package/dist/services/image-providers/cost.js +164 -0
- package/dist/services/image-providers/cost.js.map +1 -0
- package/dist/services/image-providers/flux.d.ts +40 -0
- package/dist/services/image-providers/flux.d.ts.map +1 -0
- package/dist/services/image-providers/flux.js +99 -0
- package/dist/services/image-providers/flux.js.map +1 -0
- package/dist/services/image-providers/index.d.ts +24 -0
- package/dist/services/image-providers/index.d.ts.map +1 -0
- package/dist/services/image-providers/index.js +27 -0
- package/dist/services/image-providers/index.js.map +1 -0
- package/dist/services/image-providers/masks.d.ts +51 -0
- package/dist/services/image-providers/masks.d.ts.map +1 -0
- package/dist/services/image-providers/masks.js +132 -0
- package/dist/services/image-providers/masks.js.map +1 -0
- package/dist/services/image-providers/openai.d.ts +35 -0
- package/dist/services/image-providers/openai.d.ts.map +1 -0
- package/dist/services/image-providers/openai.js +93 -0
- package/dist/services/image-providers/openai.js.map +1 -0
- package/dist/services/image-providers/types.d.ts +61 -0
- package/dist/services/image-providers/types.d.ts.map +1 -0
- package/dist/services/image-providers/types.js +17 -0
- package/dist/services/image-providers/types.js.map +1 -0
- package/dist/services/intelligent-router/index.d.ts +1 -0
- package/dist/services/intelligent-router/index.d.ts.map +1 -1
- package/dist/services/intelligent-router/index.js +1 -0
- package/dist/services/intelligent-router/index.js.map +1 -1
- package/dist/services/intelligent-router/normalize.d.ts +1 -0
- package/dist/services/intelligent-router/normalize.d.ts.map +1 -1
- package/dist/services/intelligent-router/normalize.js +17 -0
- package/dist/services/intelligent-router/normalize.js.map +1 -1
- package/dist/services/intelligent-router/outcome.d.ts +19 -0
- package/dist/services/intelligent-router/outcome.d.ts.map +1 -0
- package/dist/services/intelligent-router/outcome.js +51 -0
- package/dist/services/intelligent-router/outcome.js.map +1 -0
- package/dist/services/intelligent-router/recorder.d.ts +2 -0
- package/dist/services/intelligent-router/recorder.d.ts.map +1 -1
- package/dist/services/intelligent-router/recorder.js +72 -1
- package/dist/services/intelligent-router/recorder.js.map +1 -1
- package/dist/services/intelligent-router/service.d.ts +1 -0
- package/dist/services/intelligent-router/service.d.ts.map +1 -1
- package/dist/services/intelligent-router/service.js +60 -11
- package/dist/services/intelligent-router/service.js.map +1 -1
- package/dist/services/intelligent-router/types.d.ts +18 -0
- package/dist/services/intelligent-router/types.d.ts.map +1 -1
- package/dist/services/intelligent-router/types.js.map +1 -1
- package/dist/services/workspace-config/middleware.d.ts +2 -0
- package/dist/services/workspace-config/middleware.d.ts.map +1 -1
- package/dist/services/workspace-config/middleware.js +25 -28
- package/dist/services/workspace-config/middleware.js.map +1 -1
- package/dist/session/agent-lineage-projection.d.ts +30 -0
- package/dist/session/agent-lineage-projection.d.ts.map +1 -0
- package/dist/session/agent-lineage-projection.js +109 -0
- package/dist/session/agent-lineage-projection.js.map +1 -0
- package/dist/session/manager.d.ts +3 -0
- package/dist/session/manager.d.ts.map +1 -1
- package/dist/session/manager.js +24 -0
- package/dist/session/manager.js.map +1 -1
- package/dist/session/session-graph-projection.d.ts +11 -0
- package/dist/session/session-graph-projection.d.ts.map +1 -1
- package/dist/session/session-graph-projection.js +28 -0
- package/dist/session/session-graph-projection.js.map +1 -1
- package/dist/session/types.d.ts +2 -0
- package/dist/session/types.d.ts.map +1 -1
- package/dist/session/types.js.map +1 -1
- package/dist/telemetry/maestro-event-bus.d.ts +1 -1
- package/dist/telemetry/maestro-event-bus.d.ts.map +1 -1
- package/dist/telemetry/maestro-event-bus.js.map +1 -1
- package/dist/telemetry/maestro-publisher-conformance-fixture.js.map +1 -1
- package/dist/telemetry/oracle-policy.d.ts +6 -0
- package/dist/telemetry/oracle-policy.d.ts.map +1 -0
- package/dist/telemetry/oracle-policy.js +17 -0
- package/dist/telemetry/oracle-policy.js.map +1 -0
- package/dist/telemetry/wide-events.d.ts +1 -1
- package/dist/telemetry/wide-events.d.ts.map +1 -1
- package/dist/telemetry/wide-events.js.map +1 -1
- package/dist/theme/theme.d.ts +2 -8
- package/dist/theme/theme.d.ts.map +1 -1
- package/dist/theme/theme.js +7 -0
- package/dist/theme/theme.js.map +1 -1
- package/dist/theme/tui-theme-helpers.d.ts +2 -1
- package/dist/theme/tui-theme-helpers.d.ts.map +1 -1
- package/dist/theme/tui-theme-helpers.js.map +1 -1
- package/dist/theme/tui-theme-types.d.ts +39 -0
- package/dist/theme/tui-theme-types.d.ts.map +1 -0
- package/dist/theme/tui-theme-types.js +10 -0
- package/dist/theme/tui-theme-types.js.map +1 -0
- package/dist/tools/index.d.ts +199 -160
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +4 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/lazy-registry.d.ts.map +1 -1
- package/dist/tools/lazy-registry.js +1 -0
- package/dist/tools/lazy-registry.js.map +1 -1
- package/dist/tools/oracle.d.ts +9 -0
- package/dist/tools/oracle.d.ts.map +1 -1
- package/dist/tools/oracle.js +26 -24
- package/dist/tools/oracle.js.map +1 -1
- package/dist/tools/painter.d.ts +73 -0
- package/dist/tools/painter.d.ts.map +1 -0
- package/dist/tools/painter.js +283 -0
- package/dist/tools/painter.js.map +1 -0
- package/dist/tools/typebox-tool.d.ts.map +1 -1
- package/dist/tools/typebox-tool.js +1 -1
- package/dist/tools/typebox-tool.js.map +1 -1
- package/dist/utils/terminal-image.d.ts +52 -0
- package/dist/utils/terminal-image.d.ts.map +1 -0
- package/dist/utils/terminal-image.js +95 -0
- package/dist/utils/terminal-image.js.map +1 -0
- package/dist/utils/terminal-text.d.ts +11 -0
- package/dist/utils/terminal-text.d.ts.map +1 -0
- package/dist/utils/terminal-text.js +21 -0
- package/dist/utils/terminal-text.js.map +1 -0
- package/dist/version.json +2 -2
- package/dist/web-server.d.ts.map +1 -1
- package/dist/web-server.js +24 -2
- package/dist/web-server.js.map +1 -1
- package/package.json +13 -11
- package/skills/incident-triage/SKILL.md +4 -3
- package/dist/cli/commands/agents.d.ts +0 -24
- package/dist/cli/commands/agents.d.ts.map +0 -1
- package/dist/cli/commands/agents.js +0 -429
- package/dist/cli/commands/agents.js.map +0 -1
- package/dist/cli/commands/anthropic.d.ts +0 -2
- package/dist/cli/commands/anthropic.d.ts.map +0 -1
- package/dist/cli/commands/anthropic.js +0 -6
- package/dist/cli/commands/anthropic.js.map +0 -1
- package/dist/cli/commands/cost.d.ts +0 -13
- package/dist/cli/commands/cost.d.ts.map +0 -1
- package/dist/cli/commands/cost.js +0 -143
- package/dist/cli/commands/cost.js.map +0 -1
- package/dist/cli/commands/exec-constants.d.ts +0 -3
- package/dist/cli/commands/exec-constants.d.ts.map +0 -1
- package/dist/cli/commands/exec-constants.js +0 -3
- package/dist/cli/commands/exec-constants.js.map +0 -1
- package/dist/cli/commands/exec.d.ts +0 -19
- package/dist/cli/commands/exec.d.ts.map +0 -1
- package/dist/cli/commands/exec.js +0 -207
- package/dist/cli/commands/exec.js.map +0 -1
- package/dist/cli/commands/hooks.d.ts +0 -2
- package/dist/cli/commands/hooks.d.ts.map +0 -1
- package/dist/cli/commands/hooks.js +0 -25
- package/dist/cli/commands/hooks.js.map +0 -1
- package/dist/cli/commands/hosted-runner.d.ts +0 -25
- package/dist/cli/commands/hosted-runner.d.ts.map +0 -1
- package/dist/cli/commands/hosted-runner.js +0 -278
- package/dist/cli/commands/hosted-runner.js.map +0 -1
- package/dist/cli/commands/memory.d.ts +0 -2
- package/dist/cli/commands/memory.d.ts.map +0 -1
- package/dist/cli/commands/memory.js +0 -208
- package/dist/cli/commands/memory.js.map +0 -1
- package/dist/cli/commands/models.d.ts +0 -3
- package/dist/cli/commands/models.d.ts.map +0 -1
- package/dist/cli/commands/models.js +0 -154
- package/dist/cli/commands/models.js.map +0 -1
- package/dist/cli/commands/modes.d.ts +0 -8
- package/dist/cli/commands/modes.d.ts.map +0 -1
- package/dist/cli/commands/modes.js +0 -151
- package/dist/cli/commands/modes.js.map +0 -1
- package/dist/cli/commands/openai.d.ts +0 -2
- package/dist/cli/commands/openai.d.ts.map +0 -1
- package/dist/cli/commands/openai.js +0 -116
- package/dist/cli/commands/openai.js.map +0 -1
- package/dist/cli/commands/session-transfer.d.ts +0 -5
- package/dist/cli/commands/session-transfer.d.ts.map +0 -1
- package/dist/cli/commands/session-transfer.js +0 -43
- package/dist/cli/commands/session-transfer.js.map +0 -1
- package/dist/cli/commands/sessions.d.ts +0 -8
- package/dist/cli/commands/sessions.d.ts.map +0 -1
- package/dist/cli/commands/sessions.js +0 -152
- package/dist/cli/commands/sessions.js.map +0 -1
- package/dist/cli/commands/skill.d.ts +0 -10
- package/dist/cli/commands/skill.d.ts.map +0 -1
- package/dist/cli/commands/skill.js +0 -303
- package/dist/cli/commands/skill.js.map +0 -1
- package/dist/cli/commands/stats.d.ts +0 -7
- package/dist/cli/commands/stats.d.ts.map +0 -1
- package/dist/cli/commands/stats.js +0 -167
- package/dist/cli/commands/stats.js.map +0 -1
- package/dist/cli/commands/status.d.ts +0 -2
- package/dist/cli/commands/status.d.ts.map +0 -1
- package/dist/cli/commands/status.js +0 -11
- package/dist/cli/commands/status.js.map +0 -1
- package/dist/cli/commands/update.d.ts +0 -12
- package/dist/cli/commands/update.d.ts.map +0 -1
- package/dist/cli/commands/update.js +0 -148
- package/dist/cli/commands/update.js.map +0 -1
- package/dist/cli-tui/about-view.d.ts +0 -48
- package/dist/cli-tui/about-view.d.ts.map +0 -1
- package/dist/cli-tui/about-view.js +0 -206
- package/dist/cli-tui/about-view.js.map +0 -1
- package/dist/cli-tui/agent-event-router.d.ts +0 -28
- package/dist/cli-tui/agent-event-router.d.ts.map +0 -1
- package/dist/cli-tui/agent-event-router.js +0 -126
- package/dist/cli-tui/agent-event-router.js.map +0 -1
- package/dist/cli-tui/approval/approval-controller.d.ts +0 -28
- package/dist/cli-tui/approval/approval-controller.d.ts.map +0 -1
- package/dist/cli-tui/approval/approval-controller.js +0 -99
- package/dist/cli-tui/approval/approval-controller.js.map +0 -1
- package/dist/cli-tui/approval/approval-modal.d.ts +0 -26
- package/dist/cli-tui/approval/approval-modal.d.ts.map +0 -1
- package/dist/cli-tui/approval/approval-modal.js +0 -143
- package/dist/cli-tui/approval/approval-modal.js.map +0 -1
- package/dist/cli-tui/assistant-message.d.ts +0 -41
- package/dist/cli-tui/assistant-message.d.ts.map +0 -1
- package/dist/cli-tui/assistant-message.js +0 -236
- package/dist/cli-tui/assistant-message.js.map +0 -1
- package/dist/cli-tui/auth-state.d.ts +0 -7
- package/dist/cli-tui/auth-state.d.ts.map +0 -1
- package/dist/cli-tui/auth-state.js +0 -46
- package/dist/cli-tui/auth-state.js.map +0 -1
- package/dist/cli-tui/background/background-tasks-controller.d.ts +0 -31
- package/dist/cli-tui/background/background-tasks-controller.d.ts.map +0 -1
- package/dist/cli-tui/background/background-tasks-controller.js +0 -84
- package/dist/cli-tui/background/background-tasks-controller.js.map +0 -1
- package/dist/cli-tui/base-view.d.ts +0 -111
- package/dist/cli-tui/base-view.d.ts.map +0 -1
- package/dist/cli-tui/base-view.js +0 -145
- package/dist/cli-tui/base-view.js.map +0 -1
- package/dist/cli-tui/bash/background-launcher.d.ts +0 -14
- package/dist/cli-tui/bash/background-launcher.d.ts.map +0 -1
- package/dist/cli-tui/bash/background-launcher.js +0 -50
- package/dist/cli-tui/bash/background-launcher.js.map +0 -1
- package/dist/cli-tui/bash/bash-autocomplete.d.ts +0 -40
- package/dist/cli-tui/bash/bash-autocomplete.d.ts.map +0 -1
- package/dist/cli-tui/bash/bash-autocomplete.js +0 -347
- package/dist/cli-tui/bash/bash-autocomplete.js.map +0 -1
- package/dist/cli-tui/bash/bash-history.d.ts +0 -21
- package/dist/cli-tui/bash/bash-history.d.ts.map +0 -1
- package/dist/cli-tui/bash/bash-history.js +0 -72
- package/dist/cli-tui/bash/bash-history.js.map +0 -1
- package/dist/cli-tui/bash/bash-syntax.d.ts +0 -5
- package/dist/cli-tui/bash/bash-syntax.d.ts.map +0 -1
- package/dist/cli-tui/bash/bash-syntax.js +0 -176
- package/dist/cli-tui/bash/bash-syntax.js.map +0 -1
- package/dist/cli-tui/bash/index.d.ts +0 -4
- package/dist/cli-tui/bash/index.d.ts.map +0 -1
- package/dist/cli-tui/bash/index.js +0 -4
- package/dist/cli-tui/bash/index.js.map +0 -1
- package/dist/cli-tui/bash-mode-view.d.ts +0 -86
- package/dist/cli-tui/bash-mode-view.d.ts.map +0 -1
- package/dist/cli-tui/bash-mode-view.js +0 -560
- package/dist/cli-tui/bash-mode-view.js.map +0 -1
- package/dist/cli-tui/bash-shell-block.d.ts +0 -50
- package/dist/cli-tui/bash-shell-block.d.ts.map +0 -1
- package/dist/cli-tui/bash-shell-block.js +0 -119
- package/dist/cli-tui/bash-shell-block.js.map +0 -1
- package/dist/cli-tui/changelog-view.d.ts +0 -13
- package/dist/cli-tui/changelog-view.d.ts.map +0 -1
- package/dist/cli-tui/changelog-view.js +0 -34
- package/dist/cli-tui/changelog-view.js.map +0 -1
- package/dist/cli-tui/clean-mode.d.ts +0 -13
- package/dist/cli-tui/clean-mode.d.ts.map +0 -1
- package/dist/cli-tui/clean-mode.js +0 -32
- package/dist/cli-tui/clean-mode.js.map +0 -1
- package/dist/cli-tui/client-tools/client-tool-controller.d.ts +0 -41
- package/dist/cli-tui/client-tools/client-tool-controller.d.ts.map +0 -1
- package/dist/cli-tui/client-tools/client-tool-controller.js +0 -860
- package/dist/cli-tui/client-tools/client-tool-controller.js.map +0 -1
- package/dist/cli-tui/client-tools/local-client-tool-service.d.ts +0 -33
- package/dist/cli-tui/client-tools/local-client-tool-service.d.ts.map +0 -1
- package/dist/cli-tui/client-tools/local-client-tool-service.js +0 -94
- package/dist/cli-tui/client-tools/local-client-tool-service.js.map +0 -1
- package/dist/cli-tui/commands/a2a-handlers.d.ts +0 -7
- package/dist/cli-tui/commands/a2a-handlers.d.ts.map +0 -1
- package/dist/cli-tui/commands/a2a-handlers.js +0 -215
- package/dist/cli-tui/commands/a2a-handlers.js.map +0 -1
- package/dist/cli-tui/commands/access-command.d.ts +0 -3
- package/dist/cli-tui/commands/access-command.d.ts.map +0 -1
- package/dist/cli-tui/commands/access-command.js +0 -89
- package/dist/cli-tui/commands/access-command.js.map +0 -1
- package/dist/cli-tui/commands/argument-parser.d.ts +0 -12
- package/dist/cli-tui/commands/argument-parser.d.ts.map +0 -1
- package/dist/cli-tui/commands/argument-parser.js +0 -135
- package/dist/cli-tui/commands/argument-parser.js.map +0 -1
- package/dist/cli-tui/commands/audit-command.d.ts +0 -5
- package/dist/cli-tui/commands/audit-command.d.ts.map +0 -1
- package/dist/cli-tui/commands/audit-command.js +0 -35
- package/dist/cli-tui/commands/audit-command.js.map +0 -1
- package/dist/cli-tui/commands/background-handlers.d.ts +0 -14
- package/dist/cli-tui/commands/background-handlers.d.ts.map +0 -1
- package/dist/cli-tui/commands/background-handlers.js +0 -115
- package/dist/cli-tui/commands/background-handlers.js.map +0 -1
- package/dist/cli-tui/commands/command-catalog.d.ts +0 -29
- package/dist/cli-tui/commands/command-catalog.d.ts.map +0 -1
- package/dist/cli-tui/commands/command-catalog.js +0 -666
- package/dist/cli-tui/commands/command-catalog.js.map +0 -1
- package/dist/cli-tui/commands/command-registry-adapter.d.ts +0 -12
- package/dist/cli-tui/commands/command-registry-adapter.d.ts.map +0 -1
- package/dist/cli-tui/commands/command-registry-adapter.js +0 -129
- package/dist/cli-tui/commands/command-registry-adapter.js.map +0 -1
- package/dist/cli-tui/commands/command-suite-catalog.d.ts +0 -14
- package/dist/cli-tui/commands/command-suite-catalog.d.ts.map +0 -1
- package/dist/cli-tui/commands/command-suite-catalog.js +0 -147
- package/dist/cli-tui/commands/command-suite-catalog.js.map +0 -1
- package/dist/cli-tui/commands/command-suite-handlers.d.ts +0 -111
- package/dist/cli-tui/commands/command-suite-handlers.d.ts.map +0 -1
- package/dist/cli-tui/commands/command-suite-handlers.js +0 -110
- package/dist/cli-tui/commands/command-suite-handlers.js.map +0 -1
- package/dist/cli-tui/commands/composer-handlers.d.ts +0 -8
- package/dist/cli-tui/commands/composer-handlers.d.ts.map +0 -1
- package/dist/cli-tui/commands/composer-handlers.js +0 -90
- package/dist/cli-tui/commands/composer-handlers.js.map +0 -1
- package/dist/cli-tui/commands/framework-handlers.d.ts +0 -18
- package/dist/cli-tui/commands/framework-handlers.d.ts.map +0 -1
- package/dist/cli-tui/commands/framework-handlers.js +0 -57
- package/dist/cli-tui/commands/framework-handlers.js.map +0 -1
- package/dist/cli-tui/commands/guardian-handlers.d.ts +0 -20
- package/dist/cli-tui/commands/guardian-handlers.d.ts.map +0 -1
- package/dist/cli-tui/commands/guardian-handlers.js +0 -48
- package/dist/cli-tui/commands/guardian-handlers.js.map +0 -1
- package/dist/cli-tui/commands/handlers/mode-handler.d.ts +0 -32
- package/dist/cli-tui/commands/handlers/mode-handler.d.ts.map +0 -1
- package/dist/cli-tui/commands/handlers/mode-handler.js +0 -153
- package/dist/cli-tui/commands/handlers/mode-handler.js.map +0 -1
- package/dist/cli-tui/commands/hotkeys-command.d.ts +0 -8
- package/dist/cli-tui/commands/hotkeys-command.d.ts.map +0 -1
- package/dist/cli-tui/commands/hotkeys-command.js +0 -61
- package/dist/cli-tui/commands/hotkeys-command.js.map +0 -1
- package/dist/cli-tui/commands/limits-command.d.ts +0 -3
- package/dist/cli-tui/commands/limits-command.d.ts.map +0 -1
- package/dist/cli-tui/commands/limits-command.js +0 -88
- package/dist/cli-tui/commands/limits-command.js.map +0 -1
- package/dist/cli-tui/commands/mcp-handlers.d.ts +0 -12
- package/dist/cli-tui/commands/mcp-handlers.d.ts.map +0 -1
- package/dist/cli-tui/commands/mcp-handlers.js +0 -1306
- package/dist/cli-tui/commands/mcp-handlers.js.map +0 -1
- package/dist/cli-tui/commands/memory-handlers.d.ts +0 -28
- package/dist/cli-tui/commands/memory-handlers.d.ts.map +0 -1
- package/dist/cli-tui/commands/memory-handlers.js +0 -414
- package/dist/cli-tui/commands/memory-handlers.js.map +0 -1
- package/dist/cli-tui/commands/otel-handlers.d.ts +0 -11
- package/dist/cli-tui/commands/otel-handlers.d.ts.map +0 -1
- package/dist/cli-tui/commands/otel-handlers.js +0 -20
- package/dist/cli-tui/commands/otel-handlers.js.map +0 -1
- package/dist/cli-tui/commands/package-handlers.d.ts +0 -30
- package/dist/cli-tui/commands/package-handlers.d.ts.map +0 -1
- package/dist/cli-tui/commands/package-handlers.js +0 -499
- package/dist/cli-tui/commands/package-handlers.js.map +0 -1
- package/dist/cli-tui/commands/pii-command.d.ts +0 -3
- package/dist/cli-tui/commands/pii-command.d.ts.map +0 -1
- package/dist/cli-tui/commands/pii-command.js +0 -54
- package/dist/cli-tui/commands/pii-command.js.map +0 -1
- package/dist/cli-tui/commands/registry.d.ts +0 -3
- package/dist/cli-tui/commands/registry.d.ts.map +0 -1
- package/dist/cli-tui/commands/registry.js +0 -36
- package/dist/cli-tui/commands/registry.js.map +0 -1
- package/dist/cli-tui/commands/safety-handlers.d.ts +0 -36
- package/dist/cli-tui/commands/safety-handlers.d.ts.map +0 -1
- package/dist/cli-tui/commands/safety-handlers.js +0 -62
- package/dist/cli-tui/commands/safety-handlers.js.map +0 -1
- package/dist/cli-tui/commands/subcommands/auth-commands.d.ts +0 -26
- package/dist/cli-tui/commands/subcommands/auth-commands.d.ts.map +0 -1
- package/dist/cli-tui/commands/subcommands/auth-commands.js +0 -79
- package/dist/cli-tui/commands/subcommands/auth-commands.js.map +0 -1
- package/dist/cli-tui/commands/subcommands/config-commands.d.ts +0 -23
- package/dist/cli-tui/commands/subcommands/config-commands.d.ts.map +0 -1
- package/dist/cli-tui/commands/subcommands/config-commands.js +0 -61
- package/dist/cli-tui/commands/subcommands/config-commands.js.map +0 -1
- package/dist/cli-tui/commands/subcommands/diag-commands.d.ts +0 -46
- package/dist/cli-tui/commands/subcommands/diag-commands.d.ts.map +0 -1
- package/dist/cli-tui/commands/subcommands/diag-commands.js +0 -163
- package/dist/cli-tui/commands/subcommands/diag-commands.js.map +0 -1
- package/dist/cli-tui/commands/subcommands/git-commands.d.ts +0 -18
- package/dist/cli-tui/commands/subcommands/git-commands.d.ts.map +0 -1
- package/dist/cli-tui/commands/subcommands/git-commands.js +0 -50
- package/dist/cli-tui/commands/subcommands/git-commands.js.map +0 -1
- package/dist/cli-tui/commands/subcommands/index.d.ts +0 -18
- package/dist/cli-tui/commands/subcommands/index.d.ts.map +0 -1
- package/dist/cli-tui/commands/subcommands/index.js +0 -18
- package/dist/cli-tui/commands/subcommands/index.js.map +0 -1
- package/dist/cli-tui/commands/subcommands/safety-commands.d.ts +0 -26
- package/dist/cli-tui/commands/subcommands/safety-commands.d.ts.map +0 -1
- package/dist/cli-tui/commands/subcommands/safety-commands.js +0 -149
- package/dist/cli-tui/commands/subcommands/safety-commands.js.map +0 -1
- package/dist/cli-tui/commands/subcommands/session-commands.d.ts +0 -36
- package/dist/cli-tui/commands/subcommands/session-commands.d.ts.map +0 -1
- package/dist/cli-tui/commands/subcommands/session-commands.js +0 -112
- package/dist/cli-tui/commands/subcommands/session-commands.js.map +0 -1
- package/dist/cli-tui/commands/subcommands/tools-commands.d.ts +0 -27
- package/dist/cli-tui/commands/subcommands/tools-commands.d.ts.map +0 -1
- package/dist/cli-tui/commands/subcommands/tools-commands.js +0 -80
- package/dist/cli-tui/commands/subcommands/tools-commands.js.map +0 -1
- package/dist/cli-tui/commands/subcommands/ui-commands.d.ts +0 -30
- package/dist/cli-tui/commands/subcommands/ui-commands.d.ts.map +0 -1
- package/dist/cli-tui/commands/subcommands/ui-commands.js +0 -74
- package/dist/cli-tui/commands/subcommands/ui-commands.js.map +0 -1
- package/dist/cli-tui/commands/subcommands/undo-commands.d.ts +0 -25
- package/dist/cli-tui/commands/subcommands/undo-commands.d.ts.map +0 -1
- package/dist/cli-tui/commands/subcommands/undo-commands.js +0 -74
- package/dist/cli-tui/commands/subcommands/undo-commands.js.map +0 -1
- package/dist/cli-tui/commands/subcommands/usage-commands.d.ts +0 -19
- package/dist/cli-tui/commands/subcommands/usage-commands.d.ts.map +0 -1
- package/dist/cli-tui/commands/subcommands/usage-commands.js +0 -63
- package/dist/cli-tui/commands/subcommands/usage-commands.js.map +0 -1
- package/dist/cli-tui/commands/subcommands/utils.d.ts +0 -127
- package/dist/cli-tui/commands/subcommands/utils.d.ts.map +0 -1
- package/dist/cli-tui/commands/subcommands/utils.js +0 -395
- package/dist/cli-tui/commands/subcommands/utils.js.map +0 -1
- package/dist/cli-tui/commands/types.d.ts +0 -105
- package/dist/cli-tui/commands/types.d.ts.map +0 -1
- package/dist/cli-tui/commands/types.js +0 -2
- package/dist/cli-tui/commands/types.js.map +0 -1
- package/dist/cli-tui/commands/undo-handlers.d.ts +0 -29
- package/dist/cli-tui/commands/undo-handlers.d.ts.map +0 -1
- package/dist/cli-tui/commands/undo-handlers.js +0 -305
- package/dist/cli-tui/commands/undo-handlers.js.map +0 -1
- package/dist/cli-tui/commands/utility-handlers.d.ts +0 -55
- package/dist/cli-tui/commands/utility-handlers.d.ts.map +0 -1
- package/dist/cli-tui/commands/utility-handlers.js +0 -137
- package/dist/cli-tui/commands/utility-handlers.js.map +0 -1
- package/dist/cli-tui/commands/workflow-handlers.d.ts +0 -22
- package/dist/cli-tui/commands/workflow-handlers.d.ts.map +0 -1
- package/dist/cli-tui/commands/workflow-handlers.js +0 -227
- package/dist/cli-tui/commands/workflow-handlers.js.map +0 -1
- package/dist/cli-tui/compact-boundary-message.d.ts +0 -9
- package/dist/cli-tui/compact-boundary-message.d.ts.map +0 -1
- package/dist/cli-tui/compact-boundary-message.js +0 -18
- package/dist/cli-tui/compact-boundary-message.js.map +0 -1
- package/dist/cli-tui/compaction-recovery.d.ts +0 -6
- package/dist/cli-tui/compaction-recovery.d.ts.map +0 -1
- package/dist/cli-tui/compaction-recovery.js +0 -13
- package/dist/cli-tui/compaction-recovery.js.map +0 -1
- package/dist/cli-tui/config-view.d.ts +0 -30
- package/dist/cli-tui/config-view.d.ts.map +0 -1
- package/dist/cli-tui/config-view.js +0 -255
- package/dist/cli-tui/config-view.js.map +0 -1
- package/dist/cli-tui/context-view.d.ts +0 -20
- package/dist/cli-tui/context-view.d.ts.map +0 -1
- package/dist/cli-tui/context-view.js +0 -191
- package/dist/cli-tui/context-view.js.map +0 -1
- package/dist/cli-tui/custom-editor.d.ts +0 -25
- package/dist/cli-tui/custom-editor.d.ts.map +0 -1
- package/dist/cli-tui/custom-editor.js +0 -241
- package/dist/cli-tui/custom-editor.js.map +0 -1
- package/dist/cli-tui/editor-view.d.ts +0 -34
- package/dist/cli-tui/editor-view.d.ts.map +0 -1
- package/dist/cli-tui/editor-view.js +0 -102
- package/dist/cli-tui/editor-view.js.map +0 -1
- package/dist/cli-tui/feedback-view.d.ts +0 -35
- package/dist/cli-tui/feedback-view.d.ts.map +0 -1
- package/dist/cli-tui/feedback-view.js +0 -271
- package/dist/cli-tui/feedback-view.js.map +0 -1
- package/dist/cli-tui/footer.d.ts +0 -56
- package/dist/cli-tui/footer.d.ts.map +0 -1
- package/dist/cli-tui/footer.js +0 -228
- package/dist/cli-tui/footer.js.map +0 -1
- package/dist/cli-tui/git/commit-modal.d.ts +0 -14
- package/dist/cli-tui/git/commit-modal.d.ts.map +0 -1
- package/dist/cli-tui/git/commit-modal.js +0 -56
- package/dist/cli-tui/git/commit-modal.js.map +0 -1
- package/dist/cli-tui/git/git-preview-modal.d.ts +0 -40
- package/dist/cli-tui/git/git-preview-modal.d.ts.map +0 -1
- package/dist/cli-tui/git/git-preview-modal.js +0 -123
- package/dist/cli-tui/git/git-preview-modal.js.map +0 -1
- package/dist/cli-tui/git/git-view.d.ts +0 -65
- package/dist/cli-tui/git/git-view.d.ts.map +0 -1
- package/dist/cli-tui/git/git-view.js +0 -529
- package/dist/cli-tui/git/git-view.js.map +0 -1
- package/dist/cli-tui/history/history-config.d.ts +0 -7
- package/dist/cli-tui/history/history-config.d.ts.map +0 -1
- package/dist/cli-tui/history/history-config.js +0 -49
- package/dist/cli-tui/history/history-config.js.map +0 -1
- package/dist/cli-tui/history/prompt-history.d.ts +0 -33
- package/dist/cli-tui/history/prompt-history.d.ts.map +0 -1
- package/dist/cli-tui/history/prompt-history.js +0 -185
- package/dist/cli-tui/history/prompt-history.js.map +0 -1
- package/dist/cli-tui/history/tool-history.d.ts +0 -50
- package/dist/cli-tui/history/tool-history.d.ts.map +0 -1
- package/dist/cli-tui/history/tool-history.js +0 -253
- package/dist/cli-tui/history/tool-history.js.map +0 -1
- package/dist/cli-tui/hook-message.d.ts +0 -13
- package/dist/cli-tui/hook-message.d.ts.map +0 -1
- package/dist/cli-tui/hook-message.js +0 -56
- package/dist/cli-tui/hook-message.js.map +0 -1
- package/dist/cli-tui/hooks/hook-input-modal.d.ts +0 -22
- package/dist/cli-tui/hooks/hook-input-modal.d.ts.map +0 -1
- package/dist/cli-tui/hooks/hook-input-modal.js +0 -63
- package/dist/cli-tui/hooks/hook-input-modal.js.map +0 -1
- package/dist/cli-tui/hotkeys-view.d.ts +0 -13
- package/dist/cli-tui/hotkeys-view.d.ts.map +0 -1
- package/dist/cli-tui/hotkeys-view.js +0 -96
- package/dist/cli-tui/hotkeys-view.js.map +0 -1
- package/dist/cli-tui/import-view.d.ts +0 -28
- package/dist/cli-tui/import-view.d.ts.map +0 -1
- package/dist/cli-tui/import-view.js +0 -184
- package/dist/cli-tui/import-view.js.map +0 -1
- package/dist/cli-tui/info-view.d.ts +0 -18
- package/dist/cli-tui/info-view.d.ts.map +0 -1
- package/dist/cli-tui/info-view.js +0 -107
- package/dist/cli-tui/info-view.js.map +0 -1
- package/dist/cli-tui/instruction-panel.d.ts +0 -11
- package/dist/cli-tui/instruction-panel.d.ts.map +0 -1
- package/dist/cli-tui/instruction-panel.js +0 -86
- package/dist/cli-tui/instruction-panel.js.map +0 -1
- package/dist/cli-tui/interrupt-controller.d.ts +0 -78
- package/dist/cli-tui/interrupt-controller.d.ts.map +0 -1
- package/dist/cli-tui/interrupt-controller.js +0 -104
- package/dist/cli-tui/interrupt-controller.js.map +0 -1
- package/dist/cli-tui/keybindings-config.d.ts +0 -27
- package/dist/cli-tui/keybindings-config.d.ts.map +0 -1
- package/dist/cli-tui/keybindings-config.js +0 -372
- package/dist/cli-tui/keybindings-config.js.map +0 -1
- package/dist/cli-tui/keybindings-watcher.d.ts +0 -8
- package/dist/cli-tui/keybindings-watcher.d.ts.map +0 -1
- package/dist/cli-tui/keybindings-watcher.js +0 -56
- package/dist/cli-tui/keybindings-watcher.js.map +0 -1
- package/dist/cli-tui/keybindings.d.ts +0 -13
- package/dist/cli-tui/keybindings.d.ts.map +0 -1
- package/dist/cli-tui/keybindings.js +0 -223
- package/dist/cli-tui/keybindings.js.map +0 -1
- package/dist/cli-tui/loader/loader-stage-manager.d.ts +0 -43
- package/dist/cli-tui/loader/loader-stage-manager.d.ts.map +0 -1
- package/dist/cli-tui/loader/loader-stage-manager.js +0 -241
- package/dist/cli-tui/loader/loader-stage-manager.js.map +0 -1
- package/dist/cli-tui/loader/loader-stage-telemetry.d.ts +0 -14
- package/dist/cli-tui/loader/loader-stage-telemetry.d.ts.map +0 -1
- package/dist/cli-tui/loader/loader-stage-telemetry.js +0 -34
- package/dist/cli-tui/loader/loader-stage-telemetry.js.map +0 -1
- package/dist/cli-tui/loader/loader-view.d.ts +0 -41
- package/dist/cli-tui/loader/loader-view.d.ts.map +0 -1
- package/dist/cli-tui/loader/loader-view.js +0 -162
- package/dist/cli-tui/loader/loader-view.js.map +0 -1
- package/dist/cli-tui/lsp-view.d.ts +0 -21
- package/dist/cli-tui/lsp-view.d.ts.map +0 -1
- package/dist/cli-tui/lsp-view.js +0 -183
- package/dist/cli-tui/lsp-view.js.map +0 -1
- package/dist/cli-tui/mermaid-renderer.d.ts +0 -2
- package/dist/cli-tui/mermaid-renderer.d.ts.map +0 -1
- package/dist/cli-tui/mermaid-renderer.js +0 -391
- package/dist/cli-tui/mermaid-renderer.js.map +0 -1
- package/dist/cli-tui/message-view.d.ts +0 -27
- package/dist/cli-tui/message-view.d.ts.map +0 -1
- package/dist/cli-tui/message-view.js +0 -169
- package/dist/cli-tui/message-view.js.map +0 -1
- package/dist/cli-tui/modal-manager.d.ts +0 -77
- package/dist/cli-tui/modal-manager.d.ts.map +0 -1
- package/dist/cli-tui/modal-manager.js +0 -131
- package/dist/cli-tui/modal-manager.js.map +0 -1
- package/dist/cli-tui/notification-view.d.ts +0 -16
- package/dist/cli-tui/notification-view.d.ts.map +0 -1
- package/dist/cli-tui/notification-view.js +0 -53
- package/dist/cli-tui/notification-view.js.map +0 -1
- package/dist/cli-tui/oauth/index.d.ts +0 -2
- package/dist/cli-tui/oauth/index.d.ts.map +0 -1
- package/dist/cli-tui/oauth/index.js +0 -2
- package/dist/cli-tui/oauth/index.js.map +0 -1
- package/dist/cli-tui/oauth/oauth-flow-controller.d.ts +0 -65
- package/dist/cli-tui/oauth/oauth-flow-controller.d.ts.map +0 -1
- package/dist/cli-tui/oauth/oauth-flow-controller.js +0 -400
- package/dist/cli-tui/oauth/oauth-flow-controller.js.map +0 -1
- package/dist/cli-tui/ollama-view.d.ts +0 -38
- package/dist/cli-tui/ollama-view.d.ts.map +0 -1
- package/dist/cli-tui/ollama-view.js +0 -395
- package/dist/cli-tui/ollama-view.js.map +0 -1
- package/dist/cli-tui/paste/index.d.ts +0 -2
- package/dist/cli-tui/paste/index.d.ts.map +0 -1
- package/dist/cli-tui/paste/index.js +0 -2
- package/dist/cli-tui/paste/index.js.map +0 -1
- package/dist/cli-tui/paste/paste-handler.d.ts +0 -54
- package/dist/cli-tui/paste/paste-handler.d.ts.map +0 -1
- package/dist/cli-tui/paste/paste-handler.js +0 -128
- package/dist/cli-tui/paste/paste-handler.js.map +0 -1
- package/dist/cli-tui/plan/plan-controller.d.ts +0 -28
- package/dist/cli-tui/plan/plan-controller.d.ts.map +0 -1
- package/dist/cli-tui/plan/plan-controller.js +0 -66
- package/dist/cli-tui/plan/plan-controller.js.map +0 -1
- package/dist/cli-tui/plan-panel-modal.d.ts +0 -28
- package/dist/cli-tui/plan-panel-modal.d.ts.map +0 -1
- package/dist/cli-tui/plan-panel-modal.js +0 -193
- package/dist/cli-tui/plan-panel-modal.js.map +0 -1
- package/dist/cli-tui/plan-view.d.ts +0 -57
- package/dist/cli-tui/plan-view.d.ts.map +0 -1
- package/dist/cli-tui/plan-view.js +0 -404
- package/dist/cli-tui/plan-view.js.map +0 -1
- package/dist/cli-tui/queue/follow-up-shortcut.d.ts +0 -6
- package/dist/cli-tui/queue/follow-up-shortcut.d.ts.map +0 -1
- package/dist/cli-tui/queue/follow-up-shortcut.js +0 -12
- package/dist/cli-tui/queue/follow-up-shortcut.js.map +0 -1
- package/dist/cli-tui/queue/index.d.ts +0 -3
- package/dist/cli-tui/queue/index.d.ts.map +0 -1
- package/dist/cli-tui/queue/index.js +0 -3
- package/dist/cli-tui/queue/index.js.map +0 -1
- package/dist/cli-tui/queue/queue-controller.d.ts +0 -109
- package/dist/cli-tui/queue/queue-controller.d.ts.map +0 -1
- package/dist/cli-tui/queue/queue-controller.js +0 -327
- package/dist/cli-tui/queue/queue-controller.js.map +0 -1
- package/dist/cli-tui/queue/queue-panel-controller.d.ts +0 -34
- package/dist/cli-tui/queue/queue-panel-controller.d.ts.map +0 -1
- package/dist/cli-tui/queue/queue-panel-controller.js +0 -163
- package/dist/cli-tui/queue/queue-panel-controller.js.map +0 -1
- package/dist/cli-tui/queue/queued-follow-up-edit-binding.d.ts +0 -7
- package/dist/cli-tui/queue/queued-follow-up-edit-binding.d.ts.map +0 -1
- package/dist/cli-tui/queue/queued-follow-up-edit-binding.js +0 -14
- package/dist/cli-tui/queue/queued-follow-up-edit-binding.js.map +0 -1
- package/dist/cli-tui/queue-panel-modal.d.ts +0 -26
- package/dist/cli-tui/queue-panel-modal.d.ts.map +0 -1
- package/dist/cli-tui/queue-panel-modal.js +0 -159
- package/dist/cli-tui/queue-panel-modal.js.map +0 -1
- package/dist/cli-tui/run/run-command-view.d.ts +0 -17
- package/dist/cli-tui/run/run-command-view.d.ts.map +0 -1
- package/dist/cli-tui/run/run-command-view.js +0 -62
- package/dist/cli-tui/run/run-command-view.js.map +0 -1
- package/dist/cli-tui/run/run-controller.d.ts +0 -24
- package/dist/cli-tui/run/run-controller.d.ts.map +0 -1
- package/dist/cli-tui/run/run-controller.js +0 -38
- package/dist/cli-tui/run/run-controller.js.map +0 -1
- package/dist/cli-tui/run/run-shell-command.d.ts +0 -13
- package/dist/cli-tui/run/run-shell-command.d.ts.map +0 -1
- package/dist/cli-tui/run/run-shell-command.js +0 -51
- package/dist/cli-tui/run/run-shell-command.js.map +0 -1
- package/dist/cli-tui/run/streaming-shell-command.d.ts +0 -19
- package/dist/cli-tui/run/streaming-shell-command.d.ts.map +0 -1
- package/dist/cli-tui/run/streaming-shell-command.js +0 -107
- package/dist/cli-tui/run/streaming-shell-command.js.map +0 -1
- package/dist/cli-tui/search/file-search-view.d.ts +0 -22
- package/dist/cli-tui/search/file-search-view.d.ts.map +0 -1
- package/dist/cli-tui/search/file-search-view.js +0 -68
- package/dist/cli-tui/search/file-search-view.js.map +0 -1
- package/dist/cli-tui/search/file-search.d.ts +0 -13
- package/dist/cli-tui/search/file-search.d.ts.map +0 -1
- package/dist/cli-tui/search/file-search.js +0 -52
- package/dist/cli-tui/search/file-search.js.map +0 -1
- package/dist/cli-tui/security-status.d.ts +0 -83
- package/dist/cli-tui/security-status.d.ts.map +0 -1
- package/dist/cli-tui/security-status.js +0 -214
- package/dist/cli-tui/security-status.js.map +0 -1
- package/dist/cli-tui/selectors/base-selector.d.ts +0 -27
- package/dist/cli-tui/selectors/base-selector.d.ts.map +0 -1
- package/dist/cli-tui/selectors/base-selector.js +0 -47
- package/dist/cli-tui/selectors/base-selector.js.map +0 -1
- package/dist/cli-tui/selectors/branch-summary-modal.d.ts +0 -18
- package/dist/cli-tui/selectors/branch-summary-modal.d.ts.map +0 -1
- package/dist/cli-tui/selectors/branch-summary-modal.js +0 -24
- package/dist/cli-tui/selectors/branch-summary-modal.js.map +0 -1
- package/dist/cli-tui/selectors/model-selector-view.d.ts +0 -22
- package/dist/cli-tui/selectors/model-selector-view.d.ts.map +0 -1
- package/dist/cli-tui/selectors/model-selector-view.js +0 -31
- package/dist/cli-tui/selectors/model-selector-view.js.map +0 -1
- package/dist/cli-tui/selectors/model-selector.d.ts +0 -30
- package/dist/cli-tui/selectors/model-selector.d.ts.map +0 -1
- package/dist/cli-tui/selectors/model-selector.js +0 -218
- package/dist/cli-tui/selectors/model-selector.js.map +0 -1
- package/dist/cli-tui/selectors/oauth-selector-view.d.ts +0 -20
- package/dist/cli-tui/selectors/oauth-selector-view.d.ts.map +0 -1
- package/dist/cli-tui/selectors/oauth-selector-view.js +0 -28
- package/dist/cli-tui/selectors/oauth-selector-view.js.map +0 -1
- package/dist/cli-tui/selectors/oauth-selector.d.ts +0 -19
- package/dist/cli-tui/selectors/oauth-selector.d.ts.map +0 -1
- package/dist/cli-tui/selectors/oauth-selector.js +0 -120
- package/dist/cli-tui/selectors/oauth-selector.js.map +0 -1
- package/dist/cli-tui/selectors/queue-mode-selector-view.d.ts +0 -19
- package/dist/cli-tui/selectors/queue-mode-selector-view.d.ts.map +0 -1
- package/dist/cli-tui/selectors/queue-mode-selector-view.js +0 -29
- package/dist/cli-tui/selectors/queue-mode-selector-view.js.map +0 -1
- package/dist/cli-tui/selectors/queue-mode-selector.d.ts +0 -5
- package/dist/cli-tui/selectors/queue-mode-selector.d.ts.map +0 -1
- package/dist/cli-tui/selectors/queue-mode-selector.js +0 -34
- package/dist/cli-tui/selectors/queue-mode-selector.js.map +0 -1
- package/dist/cli-tui/selectors/report-selector-view.d.ts +0 -17
- package/dist/cli-tui/selectors/report-selector-view.d.ts.map +0 -1
- package/dist/cli-tui/selectors/report-selector-view.js +0 -29
- package/dist/cli-tui/selectors/report-selector-view.js.map +0 -1
- package/dist/cli-tui/selectors/report-selector.d.ts +0 -7
- package/dist/cli-tui/selectors/report-selector.d.ts.map +0 -1
- package/dist/cli-tui/selectors/report-selector.js +0 -31
- package/dist/cli-tui/selectors/report-selector.js.map +0 -1
- package/dist/cli-tui/selectors/theme-selector-view.d.ts +0 -19
- package/dist/cli-tui/selectors/theme-selector-view.d.ts.map +0 -1
- package/dist/cli-tui/selectors/theme-selector-view.js +0 -41
- package/dist/cli-tui/selectors/theme-selector-view.js.map +0 -1
- package/dist/cli-tui/selectors/theme-selector.d.ts +0 -14
- package/dist/cli-tui/selectors/theme-selector.d.ts.map +0 -1
- package/dist/cli-tui/selectors/theme-selector.js +0 -46
- package/dist/cli-tui/selectors/theme-selector.js.map +0 -1
- package/dist/cli-tui/selectors/thinking-selector-view.d.ts +0 -20
- package/dist/cli-tui/selectors/thinking-selector-view.d.ts.map +0 -1
- package/dist/cli-tui/selectors/thinking-selector-view.js +0 -31
- package/dist/cli-tui/selectors/thinking-selector-view.js.map +0 -1
- package/dist/cli-tui/selectors/thinking-selector.d.ts +0 -9
- package/dist/cli-tui/selectors/thinking-selector.d.ts.map +0 -1
- package/dist/cli-tui/selectors/thinking-selector.js +0 -47
- package/dist/cli-tui/selectors/thinking-selector.js.map +0 -1
- package/dist/cli-tui/selectors/tree-selector-view.d.ts +0 -32
- package/dist/cli-tui/selectors/tree-selector-view.d.ts.map +0 -1
- package/dist/cli-tui/selectors/tree-selector-view.js +0 -407
- package/dist/cli-tui/selectors/tree-selector-view.js.map +0 -1
- package/dist/cli-tui/selectors/tree-selector.d.ts +0 -27
- package/dist/cli-tui/selectors/tree-selector.d.ts.map +0 -1
- package/dist/cli-tui/selectors/tree-selector.js +0 -194
- package/dist/cli-tui/selectors/tree-selector.js.map +0 -1
- package/dist/cli-tui/selectors/user-message-selector-view.d.ts +0 -25
- package/dist/cli-tui/selectors/user-message-selector-view.d.ts.map +0 -1
- package/dist/cli-tui/selectors/user-message-selector-view.js +0 -101
- package/dist/cli-tui/selectors/user-message-selector-view.js.map +0 -1
- package/dist/cli-tui/selectors/user-message-selector.d.ts +0 -30
- package/dist/cli-tui/selectors/user-message-selector.d.ts.map +0 -1
- package/dist/cli-tui/selectors/user-message-selector.js +0 -114
- package/dist/cli-tui/selectors/user-message-selector.js.map +0 -1
- package/dist/cli-tui/session/branch-controller.d.ts +0 -65
- package/dist/cli-tui/session/branch-controller.d.ts.map +0 -1
- package/dist/cli-tui/session/branch-controller.js +0 -125
- package/dist/cli-tui/session/branch-controller.js.map +0 -1
- package/dist/cli-tui/session/conversation-compactor.d.ts +0 -64
- package/dist/cli-tui/session/conversation-compactor.d.ts.map +0 -1
- package/dist/cli-tui/session/conversation-compactor.js +0 -77
- package/dist/cli-tui/session/conversation-compactor.js.map +0 -1
- package/dist/cli-tui/session/session-context.d.ts +0 -59
- package/dist/cli-tui/session/session-context.d.ts.map +0 -1
- package/dist/cli-tui/session/session-context.js +0 -79
- package/dist/cli-tui/session/session-context.js.map +0 -1
- package/dist/cli-tui/session/session-data-provider.d.ts +0 -23
- package/dist/cli-tui/session/session-data-provider.d.ts.map +0 -1
- package/dist/cli-tui/session/session-data-provider.js +0 -22
- package/dist/cli-tui/session/session-data-provider.js.map +0 -1
- package/dist/cli-tui/session/session-list.d.ts +0 -18
- package/dist/cli-tui/session/session-list.d.ts.map +0 -1
- package/dist/cli-tui/session/session-list.js +0 -103
- package/dist/cli-tui/session/session-list.js.map +0 -1
- package/dist/cli-tui/session/session-selector.d.ts +0 -12
- package/dist/cli-tui/session/session-selector.d.ts.map +0 -1
- package/dist/cli-tui/session/session-selector.js +0 -37
- package/dist/cli-tui/session/session-selector.js.map +0 -1
- package/dist/cli-tui/session/session-summary-controller.d.ts +0 -24
- package/dist/cli-tui/session/session-summary-controller.d.ts.map +0 -1
- package/dist/cli-tui/session/session-summary-controller.js +0 -96
- package/dist/cli-tui/session/session-summary-controller.js.map +0 -1
- package/dist/cli-tui/session/session-switcher-view.d.ts +0 -20
- package/dist/cli-tui/session/session-switcher-view.d.ts.map +0 -1
- package/dist/cli-tui/session/session-switcher-view.js +0 -43
- package/dist/cli-tui/session/session-switcher-view.js.map +0 -1
- package/dist/cli-tui/session/session-switcher.d.ts +0 -38
- package/dist/cli-tui/session/session-switcher.d.ts.map +0 -1
- package/dist/cli-tui/session/session-switcher.js +0 -204
- package/dist/cli-tui/session/session-switcher.js.map +0 -1
- package/dist/cli-tui/session/session-view.d.ts +0 -46
- package/dist/cli-tui/session/session-view.d.ts.map +0 -1
- package/dist/cli-tui/session/session-view.js +0 -311
- package/dist/cli-tui/session/session-view.js.map +0 -1
- package/dist/cli-tui/slash/index.d.ts +0 -2
- package/dist/cli-tui/slash/index.d.ts.map +0 -1
- package/dist/cli-tui/slash/index.js +0 -2
- package/dist/cli-tui/slash/index.js.map +0 -1
- package/dist/cli-tui/slash/slash-command-matcher.d.ts +0 -55
- package/dist/cli-tui/slash/slash-command-matcher.d.ts.map +0 -1
- package/dist/cli-tui/slash/slash-command-matcher.js +0 -113
- package/dist/cli-tui/slash/slash-command-matcher.js.map +0 -1
- package/dist/cli-tui/smart-autocomplete-provider.d.ts +0 -5
- package/dist/cli-tui/smart-autocomplete-provider.d.ts.map +0 -1
- package/dist/cli-tui/smart-autocomplete-provider.js +0 -44
- package/dist/cli-tui/smart-autocomplete-provider.js.map +0 -1
- package/dist/cli-tui/startup-announcements.d.ts +0 -15
- package/dist/cli-tui/startup-announcements.d.ts.map +0 -1
- package/dist/cli-tui/startup-announcements.js +0 -75
- package/dist/cli-tui/startup-announcements.js.map +0 -1
- package/dist/cli-tui/status/cost-view.d.ts +0 -27
- package/dist/cli-tui/status/cost-view.d.ts.map +0 -1
- package/dist/cli-tui/status/cost-view.js +0 -212
- package/dist/cli-tui/status/cost-view.js.map +0 -1
- package/dist/cli-tui/status/diagnostics-templates.d.ts +0 -34
- package/dist/cli-tui/status/diagnostics-templates.d.ts.map +0 -1
- package/dist/cli-tui/status/diagnostics-templates.js +0 -167
- package/dist/cli-tui/status/diagnostics-templates.js.map +0 -1
- package/dist/cli-tui/status/diagnostics-view.d.ts +0 -48
- package/dist/cli-tui/status/diagnostics-view.d.ts.map +0 -1
- package/dist/cli-tui/status/diagnostics-view.js +0 -249
- package/dist/cli-tui/status/diagnostics-view.js.map +0 -1
- package/dist/cli-tui/status/diagnostics.d.ts +0 -39
- package/dist/cli-tui/status/diagnostics.d.ts.map +0 -1
- package/dist/cli-tui/status/diagnostics.js +0 -286
- package/dist/cli-tui/status/diagnostics.js.map +0 -1
- package/dist/cli-tui/status/health-snapshot.d.ts +0 -17
- package/dist/cli-tui/status/health-snapshot.d.ts.map +0 -1
- package/dist/cli-tui/status/health-snapshot.js +0 -28
- package/dist/cli-tui/status/health-snapshot.js.map +0 -1
- package/dist/cli-tui/status/quota-view.d.ts +0 -37
- package/dist/cli-tui/status/quota-view.d.ts.map +0 -1
- package/dist/cli-tui/status/quota-view.js +0 -309
- package/dist/cli-tui/status/quota-view.js.map +0 -1
- package/dist/cli-tui/status/telemetry-view.d.ts +0 -23
- package/dist/cli-tui/status/telemetry-view.d.ts.map +0 -1
- package/dist/cli-tui/status/telemetry-view.js +0 -77
- package/dist/cli-tui/status/telemetry-view.js.map +0 -1
- package/dist/cli-tui/status/training-view.d.ts +0 -23
- package/dist/cli-tui/status/training-view.d.ts.map +0 -1
- package/dist/cli-tui/status/training-view.js +0 -71
- package/dist/cli-tui/status/training-view.js.map +0 -1
- package/dist/cli-tui/streaming-view.d.ts +0 -43
- package/dist/cli-tui/streaming-view.d.ts.map +0 -1
- package/dist/cli-tui/streaming-view.js +0 -176
- package/dist/cli-tui/streaming-view.js.map +0 -1
- package/dist/cli-tui/terminal/index.d.ts +0 -2
- package/dist/cli-tui/terminal/index.d.ts.map +0 -1
- package/dist/cli-tui/terminal/index.js +0 -2
- package/dist/cli-tui/terminal/index.js.map +0 -1
- package/dist/cli-tui/terminal/terminal-utils.d.ts +0 -44
- package/dist/cli-tui/terminal/terminal-utils.d.ts.map +0 -1
- package/dist/cli-tui/terminal/terminal-utils.js +0 -145
- package/dist/cli-tui/terminal/terminal-utils.js.map +0 -1
- package/dist/cli-tui/tips/tip-scheduler.d.ts +0 -19
- package/dist/cli-tui/tips/tip-scheduler.d.ts.map +0 -1
- package/dist/cli-tui/tips/tip-scheduler.js +0 -135
- package/dist/cli-tui/tips/tip-scheduler.js.map +0 -1
- package/dist/cli-tui/tool-execution.d.ts +0 -76
- package/dist/cli-tui/tool-execution.d.ts.map +0 -1
- package/dist/cli-tui/tool-execution.js +0 -217
- package/dist/cli-tui/tool-execution.js.map +0 -1
- package/dist/cli-tui/tool-output-view.d.ts +0 -22
- package/dist/cli-tui/tool-output-view.d.ts.map +0 -1
- package/dist/cli-tui/tool-output-view.js +0 -71
- package/dist/cli-tui/tool-output-view.js.map +0 -1
- package/dist/cli-tui/tool-renderers/index.d.ts +0 -4
- package/dist/cli-tui/tool-renderers/index.d.ts.map +0 -1
- package/dist/cli-tui/tool-renderers/index.js +0 -19
- package/dist/cli-tui/tool-renderers/index.js.map +0 -1
- package/dist/cli-tui/tool-renderers/render-bash.d.ts +0 -6
- package/dist/cli-tui/tool-renderers/render-bash.d.ts.map +0 -1
- package/dist/cli-tui/tool-renderers/render-bash.js +0 -90
- package/dist/cli-tui/tool-renderers/render-bash.js.map +0 -1
- package/dist/cli-tui/tool-renderers/render-batch.d.ts +0 -12
- package/dist/cli-tui/tool-renderers/render-batch.d.ts.map +0 -1
- package/dist/cli-tui/tool-renderers/render-batch.js +0 -133
- package/dist/cli-tui/tool-renderers/render-batch.js.map +0 -1
- package/dist/cli-tui/tool-renderers/render-edit.d.ts +0 -6
- package/dist/cli-tui/tool-renderers/render-edit.d.ts.map +0 -1
- package/dist/cli-tui/tool-renderers/render-edit.js +0 -125
- package/dist/cli-tui/tool-renderers/render-edit.js.map +0 -1
- package/dist/cli-tui/tool-renderers/render-generic.d.ts +0 -6
- package/dist/cli-tui/tool-renderers/render-generic.d.ts.map +0 -1
- package/dist/cli-tui/tool-renderers/render-generic.js +0 -66
- package/dist/cli-tui/tool-renderers/render-generic.js.map +0 -1
- package/dist/cli-tui/tool-renderers/render-read.d.ts +0 -9
- package/dist/cli-tui/tool-renderers/render-read.d.ts.map +0 -1
- package/dist/cli-tui/tool-renderers/render-read.js +0 -108
- package/dist/cli-tui/tool-renderers/render-read.js.map +0 -1
- package/dist/cli-tui/tool-renderers/render-style.d.ts +0 -21
- package/dist/cli-tui/tool-renderers/render-style.d.ts.map +0 -1
- package/dist/cli-tui/tool-renderers/render-style.js +0 -51
- package/dist/cli-tui/tool-renderers/render-style.js.map +0 -1
- package/dist/cli-tui/tool-renderers/render-write.d.ts +0 -5
- package/dist/cli-tui/tool-renderers/render-write.d.ts.map +0 -1
- package/dist/cli-tui/tool-renderers/render-write.js +0 -60
- package/dist/cli-tui/tool-renderers/render-write.js.map +0 -1
- package/dist/cli-tui/tool-renderers/types.d.ts +0 -20
- package/dist/cli-tui/tool-renderers/types.d.ts.map +0 -1
- package/dist/cli-tui/tool-renderers/types.js +0 -2
- package/dist/cli-tui/tool-renderers/types.js.map +0 -1
- package/dist/cli-tui/tool-retry/tool-retry-controller.d.ts +0 -29
- package/dist/cli-tui/tool-retry/tool-retry-controller.d.ts.map +0 -1
- package/dist/cli-tui/tool-retry/tool-retry-controller.js +0 -110
- package/dist/cli-tui/tool-retry/tool-retry-controller.js.map +0 -1
- package/dist/cli-tui/tool-retry/tool-retry-modal.d.ts +0 -27
- package/dist/cli-tui/tool-retry/tool-retry-modal.d.ts.map +0 -1
- package/dist/cli-tui/tool-retry/tool-retry-modal.js +0 -118
- package/dist/cli-tui/tool-retry/tool-retry-modal.js.map +0 -1
- package/dist/cli-tui/tool-status-view.d.ts +0 -32
- package/dist/cli-tui/tool-status-view.d.ts.map +0 -1
- package/dist/cli-tui/tool-status-view.js +0 -86
- package/dist/cli-tui/tool-status-view.js.map +0 -1
- package/dist/cli-tui/tui-renderer/agent-event-bridge.d.ts +0 -59
- package/dist/cli-tui/tui-renderer/agent-event-bridge.d.ts.map +0 -1
- package/dist/cli-tui/tui-renderer/agent-event-bridge.js +0 -129
- package/dist/cli-tui/tui-renderer/agent-event-bridge.js.map +0 -1
- package/dist/cli-tui/tui-renderer/approval-setup.d.ts +0 -13
- package/dist/cli-tui/tui-renderer/approval-setup.d.ts.map +0 -1
- package/dist/cli-tui/tui-renderer/approval-setup.js +0 -5
- package/dist/cli-tui/tui-renderer/approval-setup.js.map +0 -1
- package/dist/cli-tui/tui-renderer/attachment-controller.d.ts +0 -54
- package/dist/cli-tui/tui-renderer/attachment-controller.d.ts.map +0 -1
- package/dist/cli-tui/tui-renderer/attachment-controller.js +0 -160
- package/dist/cli-tui/tui-renderer/attachment-controller.js.map +0 -1
- package/dist/cli-tui/tui-renderer/background-tasks-setup.d.ts +0 -9
- package/dist/cli-tui/tui-renderer/background-tasks-setup.d.ts.map +0 -1
- package/dist/cli-tui/tui-renderer/background-tasks-setup.js +0 -7
- package/dist/cli-tui/tui-renderer/background-tasks-setup.js.map +0 -1
- package/dist/cli-tui/tui-renderer/branch-controller.d.ts +0 -41
- package/dist/cli-tui/tui-renderer/branch-controller.d.ts.map +0 -1
- package/dist/cli-tui/tui-renderer/branch-controller.js +0 -102
- package/dist/cli-tui/tui-renderer/branch-controller.js.map +0 -1
- package/dist/cli-tui/tui-renderer/clear-controller.d.ts +0 -75
- package/dist/cli-tui/tui-renderer/clear-controller.d.ts.map +0 -1
- package/dist/cli-tui/tui-renderer/clear-controller.js +0 -75
- package/dist/cli-tui/tui-renderer/clear-controller.js.map +0 -1
- package/dist/cli-tui/tui-renderer/client-tools-setup.d.ts +0 -14
- package/dist/cli-tui/tui-renderer/client-tools-setup.d.ts.map +0 -1
- package/dist/cli-tui/tui-renderer/client-tools-setup.js +0 -5
- package/dist/cli-tui/tui-renderer/client-tools-setup.js.map +0 -1
- package/dist/cli-tui/tui-renderer/command-registry-options.d.ts +0 -111
- package/dist/cli-tui/tui-renderer/command-registry-options.d.ts.map +0 -1
- package/dist/cli-tui/tui-renderer/command-registry-options.js +0 -163
- package/dist/cli-tui/tui-renderer/command-registry-options.js.map +0 -1
- package/dist/cli-tui/tui-renderer/command-registry.d.ts +0 -16
- package/dist/cli-tui/tui-renderer/command-registry.d.ts.map +0 -1
- package/dist/cli-tui/tui-renderer/command-registry.js +0 -23
- package/dist/cli-tui/tui-renderer/command-registry.js.map +0 -1
- package/dist/cli-tui/tui-renderer/command-suite-wiring.d.ts +0 -29
- package/dist/cli-tui/tui-renderer/command-suite-wiring.d.ts.map +0 -1
- package/dist/cli-tui/tui-renderer/command-suite-wiring.js +0 -108
- package/dist/cli-tui/tui-renderer/command-suite-wiring.js.map +0 -1
- package/dist/cli-tui/tui-renderer/compaction-controller.d.ts +0 -100
- package/dist/cli-tui/tui-renderer/compaction-controller.d.ts.map +0 -1
- package/dist/cli-tui/tui-renderer/compaction-controller.js +0 -160
- package/dist/cli-tui/tui-renderer/compaction-controller.js.map +0 -1
- package/dist/cli-tui/tui-renderer/custom-commands-controller.d.ts +0 -42
- package/dist/cli-tui/tui-renderer/custom-commands-controller.d.ts.map +0 -1
- package/dist/cli-tui/tui-renderer/custom-commands-controller.js +0 -106
- package/dist/cli-tui/tui-renderer/custom-commands-controller.js.map +0 -1
- package/dist/cli-tui/tui-renderer/delegating-command-handlers.d.ts +0 -37
- package/dist/cli-tui/tui-renderer/delegating-command-handlers.d.ts.map +0 -1
- package/dist/cli-tui/tui-renderer/delegating-command-handlers.js +0 -139
- package/dist/cli-tui/tui-renderer/delegating-command-handlers.js.map +0 -1
- package/dist/cli-tui/tui-renderer/editor-bindings.d.ts +0 -21
- package/dist/cli-tui/tui-renderer/editor-bindings.d.ts.map +0 -1
- package/dist/cli-tui/tui-renderer/editor-bindings.js +0 -76
- package/dist/cli-tui/tui-renderer/editor-bindings.js.map +0 -1
- package/dist/cli-tui/tui-renderer/footer-hints-controller.d.ts +0 -90
- package/dist/cli-tui/tui-renderer/footer-hints-controller.d.ts.map +0 -1
- package/dist/cli-tui/tui-renderer/footer-hints-controller.js +0 -152
- package/dist/cli-tui/tui-renderer/footer-hints-controller.js.map +0 -1
- package/dist/cli-tui/tui-renderer/history-controller.d.ts +0 -35
- package/dist/cli-tui/tui-renderer/history-controller.d.ts.map +0 -1
- package/dist/cli-tui/tui-renderer/history-controller.js +0 -153
- package/dist/cli-tui/tui-renderer/history-controller.js.map +0 -1
- package/dist/cli-tui/tui-renderer/hook-ui-controller.d.ts +0 -83
- package/dist/cli-tui/tui-renderer/hook-ui-controller.d.ts.map +0 -1
- package/dist/cli-tui/tui-renderer/hook-ui-controller.js +0 -309
- package/dist/cli-tui/tui-renderer/hook-ui-controller.js.map +0 -1
- package/dist/cli-tui/tui-renderer/initial-preferences.d.ts +0 -19
- package/dist/cli-tui/tui-renderer/initial-preferences.d.ts.map +0 -1
- package/dist/cli-tui/tui-renderer/initial-preferences.js +0 -54
- package/dist/cli-tui/tui-renderer/initial-preferences.js.map +0 -1
- package/dist/cli-tui/tui-renderer/input-controller.d.ts +0 -56
- package/dist/cli-tui/tui-renderer/input-controller.d.ts.map +0 -1
- package/dist/cli-tui/tui-renderer/input-controller.js +0 -104
- package/dist/cli-tui/tui-renderer/input-controller.js.map +0 -1
- package/dist/cli-tui/tui-renderer/interrupt-setup.d.ts +0 -19
- package/dist/cli-tui/tui-renderer/interrupt-setup.d.ts.map +0 -1
- package/dist/cli-tui/tui-renderer/interrupt-setup.js +0 -18
- package/dist/cli-tui/tui-renderer/interrupt-setup.js.map +0 -1
- package/dist/cli-tui/tui-renderer/loader-setup.d.ts +0 -14
- package/dist/cli-tui/tui-renderer/loader-setup.d.ts.map +0 -1
- package/dist/cli-tui/tui-renderer/loader-setup.js +0 -13
- package/dist/cli-tui/tui-renderer/loader-setup.js.map +0 -1
- package/dist/cli-tui/tui-renderer/mcp-events-setup.d.ts +0 -55
- package/dist/cli-tui/tui-renderer/mcp-events-setup.d.ts.map +0 -1
- package/dist/cli-tui/tui-renderer/mcp-events-setup.js +0 -143
- package/dist/cli-tui/tui-renderer/mcp-events-setup.js.map +0 -1
- package/dist/cli-tui/tui-renderer/misc-handlers.d.ts +0 -59
- package/dist/cli-tui/tui-renderer/misc-handlers.d.ts.map +0 -1
- package/dist/cli-tui/tui-renderer/misc-handlers.js +0 -143
- package/dist/cli-tui/tui-renderer/misc-handlers.js.map +0 -1
- package/dist/cli-tui/tui-renderer/oauth-setup.d.ts +0 -14
- package/dist/cli-tui/tui-renderer/oauth-setup.d.ts.map +0 -1
- package/dist/cli-tui/tui-renderer/oauth-setup.js +0 -26
- package/dist/cli-tui/tui-renderer/oauth-setup.js.map +0 -1
- package/dist/cli-tui/tui-renderer/plan-setup.d.ts +0 -19
- package/dist/cli-tui/tui-renderer/plan-setup.d.ts.map +0 -1
- package/dist/cli-tui/tui-renderer/plan-setup.js +0 -23
- package/dist/cli-tui/tui-renderer/plan-setup.js.map +0 -1
- package/dist/cli-tui/tui-renderer/prompt-template-slash-commands.d.ts +0 -21
- package/dist/cli-tui/tui-renderer/prompt-template-slash-commands.d.ts.map +0 -1
- package/dist/cli-tui/tui-renderer/prompt-template-slash-commands.js +0 -64
- package/dist/cli-tui/tui-renderer/prompt-template-slash-commands.js.map +0 -1
- package/dist/cli-tui/tui-renderer/queue-setup.d.ts +0 -18
- package/dist/cli-tui/tui-renderer/queue-setup.d.ts.map +0 -1
- package/dist/cli-tui/tui-renderer/queue-setup.js +0 -42
- package/dist/cli-tui/tui-renderer/queue-setup.js.map +0 -1
- package/dist/cli-tui/tui-renderer/quick-settings-controller.d.ts +0 -53
- package/dist/cli-tui/tui-renderer/quick-settings-controller.d.ts.map +0 -1
- package/dist/cli-tui/tui-renderer/quick-settings-controller.js +0 -100
- package/dist/cli-tui/tui-renderer/quick-settings-controller.js.map +0 -1
- package/dist/cli-tui/tui-renderer/session-setup.d.ts +0 -31
- package/dist/cli-tui/tui-renderer/session-setup.d.ts.map +0 -1
- package/dist/cli-tui/tui-renderer/session-setup.js +0 -45
- package/dist/cli-tui/tui-renderer/session-setup.js.map +0 -1
- package/dist/cli-tui/tui-renderer/session-state-controller.d.ts +0 -66
- package/dist/cli-tui/tui-renderer/session-state-controller.d.ts.map +0 -1
- package/dist/cli-tui/tui-renderer/session-state-controller.js +0 -139
- package/dist/cli-tui/tui-renderer/session-state-controller.js.map +0 -1
- package/dist/cli-tui/tui-renderer/skills-controller.d.ts +0 -73
- package/dist/cli-tui/tui-renderer/skills-controller.d.ts.map +0 -1
- package/dist/cli-tui/tui-renderer/skills-controller.js +0 -455
- package/dist/cli-tui/tui-renderer/skills-controller.js.map +0 -1
- package/dist/cli-tui/tui-renderer/slash-hint-controller.d.ts +0 -90
- package/dist/cli-tui/tui-renderer/slash-hint-controller.d.ts.map +0 -1
- package/dist/cli-tui/tui-renderer/slash-hint-controller.js +0 -131
- package/dist/cli-tui/tui-renderer/slash-hint-controller.js.map +0 -1
- package/dist/cli-tui/tui-renderer/tool-retry-setup.d.ts +0 -13
- package/dist/cli-tui/tui-renderer/tool-retry-setup.d.ts.map +0 -1
- package/dist/cli-tui/tui-renderer/tool-retry-setup.js +0 -5
- package/dist/cli-tui/tui-renderer/tool-retry-setup.js.map +0 -1
- package/dist/cli-tui/tui-renderer/tooling-views-setup.d.ts +0 -38
- package/dist/cli-tui/tui-renderer/tooling-views-setup.d.ts.map +0 -1
- package/dist/cli-tui/tui-renderer/tooling-views-setup.js +0 -48
- package/dist/cli-tui/tui-renderer/tooling-views-setup.js.map +0 -1
- package/dist/cli-tui/tui-renderer/ui-state-controller.d.ts +0 -70
- package/dist/cli-tui/tui-renderer/ui-state-controller.d.ts.map +0 -1
- package/dist/cli-tui/tui-renderer/ui-state-controller.js +0 -184
- package/dist/cli-tui/tui-renderer/ui-state-controller.js.map +0 -1
- package/dist/cli-tui/tui-renderer/ui-state-setup.d.ts +0 -13
- package/dist/cli-tui/tui-renderer/ui-state-setup.d.ts.map +0 -1
- package/dist/cli-tui/tui-renderer/ui-state-setup.js +0 -11
- package/dist/cli-tui/tui-renderer/ui-state-setup.js.map +0 -1
- package/dist/cli-tui/tui-renderer/utility-views-setup.d.ts +0 -26
- package/dist/cli-tui/tui-renderer/utility-views-setup.d.ts.map +0 -1
- package/dist/cli-tui/tui-renderer/utility-views-setup.js +0 -23
- package/dist/cli-tui/tui-renderer/utility-views-setup.js.map +0 -1
- package/dist/cli-tui/tui-renderer/viewport-controller.d.ts +0 -33
- package/dist/cli-tui/tui-renderer/viewport-controller.d.ts.map +0 -1
- package/dist/cli-tui/tui-renderer/viewport-controller.js +0 -98
- package/dist/cli-tui/tui-renderer/viewport-controller.js.map +0 -1
- package/dist/cli-tui/tui-renderer.d.ts +0 -268
- package/dist/cli-tui/tui-renderer.d.ts.map +0 -1
- package/dist/cli-tui/tui-renderer.js +0 -2131
- package/dist/cli-tui/tui-renderer.js.map +0 -1
- package/dist/cli-tui/ui-state.d.ts.map +0 -1
- package/dist/cli-tui/ui-state.js.map +0 -1
- package/dist/cli-tui/update-view.d.ts +0 -16
- package/dist/cli-tui/update-view.d.ts.map +0 -1
- package/dist/cli-tui/update-view.js +0 -45
- package/dist/cli-tui/update-view.js.map +0 -1
- package/dist/cli-tui/user-message.d.ts +0 -17
- package/dist/cli-tui/user-message.d.ts.map +0 -1
- package/dist/cli-tui/user-message.js +0 -83
- package/dist/cli-tui/user-message.js.map +0 -1
- package/dist/cli-tui/utils/borders.d.ts +0 -131
- package/dist/cli-tui/utils/borders.d.ts.map +0 -1
- package/dist/cli-tui/utils/borders.js +0 -254
- package/dist/cli-tui/utils/borders.js.map +0 -1
- package/dist/cli-tui/utils/commands/command-palette-view.d.ts +0 -22
- package/dist/cli-tui/utils/commands/command-palette-view.d.ts.map +0 -1
- package/dist/cli-tui/utils/commands/command-palette-view.js +0 -31
- package/dist/cli-tui/utils/commands/command-palette-view.js.map +0 -1
- package/dist/cli-tui/utils/commands/command-palette.d.ts +0 -29
- package/dist/cli-tui/utils/commands/command-palette.d.ts.map +0 -1
- package/dist/cli-tui/utils/commands/command-palette.js +0 -213
- package/dist/cli-tui/utils/commands/command-palette.js.map +0 -1
- package/dist/cli-tui/utils/commands/command-registry-builder.d.ts +0 -8
- package/dist/cli-tui/utils/commands/command-registry-builder.d.ts.map +0 -1
- package/dist/cli-tui/utils/commands/command-registry-builder.js +0 -9
- package/dist/cli-tui/utils/commands/command-registry-builder.js.map +0 -1
- package/dist/cli-tui/utils/commands/review-prompt.d.ts +0 -10
- package/dist/cli-tui/utils/commands/review-prompt.d.ts.map +0 -1
- package/dist/cli-tui/utils/commands/review-prompt.js +0 -90
- package/dist/cli-tui/utils/commands/review-prompt.js.map +0 -1
- package/dist/cli-tui/utils/commands/slash-hint-bar.d.ts +0 -15
- package/dist/cli-tui/utils/commands/slash-hint-bar.d.ts.map +0 -1
- package/dist/cli-tui/utils/commands/slash-hint-bar.js +0 -106
- package/dist/cli-tui/utils/commands/slash-hint-bar.js.map +0 -1
- package/dist/cli-tui/utils/env-detect.d.ts +0 -11
- package/dist/cli-tui/utils/env-detect.d.ts.map +0 -1
- package/dist/cli-tui/utils/env-detect.js +0 -107
- package/dist/cli-tui/utils/env-detect.js.map +0 -1
- package/dist/cli-tui/utils/external-editor.d.ts +0 -7
- package/dist/cli-tui/utils/external-editor.d.ts.map +0 -1
- package/dist/cli-tui/utils/external-editor.js +0 -53
- package/dist/cli-tui/utils/external-editor.js.map +0 -1
- package/dist/cli-tui/utils/footer-utils.d.ts +0 -169
- package/dist/cli-tui/utils/footer-utils.d.ts.map +0 -1
- package/dist/cli-tui/utils/footer-utils.js +0 -716
- package/dist/cli-tui/utils/footer-utils.js.map +0 -1
- package/dist/cli-tui/utils/footer-visual-widgets.d.ts +0 -38
- package/dist/cli-tui/utils/footer-visual-widgets.d.ts.map +0 -1
- package/dist/cli-tui/utils/footer-visual-widgets.js +0 -141
- package/dist/cli-tui/utils/footer-visual-widgets.js.map +0 -1
- package/dist/cli-tui/utils/git-branch-tracker.d.ts +0 -38
- package/dist/cli-tui/utils/git-branch-tracker.d.ts.map +0 -1
- package/dist/cli-tui/utils/git-branch-tracker.js +0 -90
- package/dist/cli-tui/utils/git-branch-tracker.js.map +0 -1
- package/dist/cli-tui/utils/glyphs.d.ts +0 -207
- package/dist/cli-tui/utils/glyphs.d.ts.map +0 -1
- package/dist/cli-tui/utils/glyphs.js +0 -249
- package/dist/cli-tui/utils/glyphs.js.map +0 -1
- package/dist/cli-tui/utils/layout.d.ts +0 -77
- package/dist/cli-tui/utils/layout.d.ts.map +0 -1
- package/dist/cli-tui/utils/layout.js +0 -83
- package/dist/cli-tui/utils/layout.js.map +0 -1
- package/dist/cli-tui/utils/links.d.ts +0 -2
- package/dist/cli-tui/utils/links.d.ts.map +0 -1
- package/dist/cli-tui/utils/links.js +0 -14
- package/dist/cli-tui/utils/links.js.map +0 -1
- package/dist/cli-tui/utils/motion.d.ts +0 -4
- package/dist/cli-tui/utils/motion.d.ts.map +0 -1
- package/dist/cli-tui/utils/motion.js +0 -28
- package/dist/cli-tui/utils/motion.js.map +0 -1
- package/dist/cli-tui/utils/runtime-badges.d.ts +0 -26
- package/dist/cli-tui/utils/runtime-badges.d.ts.map +0 -1
- package/dist/cli-tui/utils/runtime-badges.js +0 -178
- package/dist/cli-tui/utils/runtime-badges.js.map +0 -1
- package/dist/cli-tui/utils/shimmer.d.ts +0 -12
- package/dist/cli-tui/utils/shimmer.d.ts.map +0 -1
- package/dist/cli-tui/utils/shimmer.js +0 -57
- package/dist/cli-tui/utils/shimmer.js.map +0 -1
- package/dist/cli-tui/utils/stage-labels.d.ts +0 -9
- package/dist/cli-tui/utils/stage-labels.d.ts.map +0 -1
- package/dist/cli-tui/utils/stage-labels.js +0 -65
- package/dist/cli-tui/utils/stage-labels.js.map +0 -1
- package/dist/cli-tui/utils/text-formatting.d.ts +0 -13
- package/dist/cli-tui/utils/text-formatting.d.ts.map +0 -1
- package/dist/cli-tui/utils/text-formatting.js +0 -109
- package/dist/cli-tui/utils/text-formatting.js.map +0 -1
- package/dist/cli-tui/utils/text-preview.d.ts +0 -10
- package/dist/cli-tui/utils/text-preview.d.ts.map +0 -1
- package/dist/cli-tui/utils/text-preview.js +0 -26
- package/dist/cli-tui/utils/text-preview.js.map +0 -1
- package/dist/cli-tui/utils/tool-text-utils.d.ts +0 -42
- package/dist/cli-tui/utils/tool-text-utils.d.ts.map +0 -1
- package/dist/cli-tui/utils/tool-text-utils.js +0 -361
- package/dist/cli-tui/utils/tool-text-utils.js.map +0 -1
- package/dist/cli-tui/welcome-animation.d.ts +0 -24
- package/dist/cli-tui/welcome-animation.d.ts.map +0 -1
- package/dist/cli-tui/welcome-animation.js +0 -99
- package/dist/cli-tui/welcome-animation.js.map +0 -1
- package/dist/cli-tui/welcome-colors.d.ts +0 -3
- package/dist/cli-tui/welcome-colors.d.ts.map +0 -1
- package/dist/cli-tui/welcome-colors.js +0 -39
- package/dist/cli-tui/welcome-colors.js.map +0 -1
- package/dist/node_modules/@evalops/tui/dist/autocomplete.d.ts +0 -304
- package/dist/node_modules/@evalops/tui/dist/autocomplete.d.ts.map +0 -1
- package/dist/node_modules/@evalops/tui/dist/autocomplete.js +0 -712
- package/dist/node_modules/@evalops/tui/dist/autocomplete.js.map +0 -1
- package/dist/node_modules/@evalops/tui/dist/components/editor.d.ts +0 -185
- package/dist/node_modules/@evalops/tui/dist/components/editor.d.ts.map +0 -1
- package/dist/node_modules/@evalops/tui/dist/components/editor.js +0 -1460
- package/dist/node_modules/@evalops/tui/dist/components/editor.js.map +0 -1
- package/dist/node_modules/@evalops/tui/dist/components/input.d.ts +0 -117
- package/dist/node_modules/@evalops/tui/dist/components/input.d.ts.map +0 -1
- package/dist/node_modules/@evalops/tui/dist/components/input.js +0 -391
- package/dist/node_modules/@evalops/tui/dist/components/input.js.map +0 -1
- package/dist/node_modules/@evalops/tui/dist/components/layout.d.ts +0 -256
- package/dist/node_modules/@evalops/tui/dist/components/layout.d.ts.map +0 -1
- package/dist/node_modules/@evalops/tui/dist/components/layout.js +0 -478
- package/dist/node_modules/@evalops/tui/dist/components/layout.js.map +0 -1
- package/dist/node_modules/@evalops/tui/dist/components/loader.d.ts +0 -199
- package/dist/node_modules/@evalops/tui/dist/components/loader.d.ts.map +0 -1
- package/dist/node_modules/@evalops/tui/dist/components/loader.js +0 -374
- package/dist/node_modules/@evalops/tui/dist/components/loader.js.map +0 -1
- package/dist/node_modules/@evalops/tui/dist/components/markdown.d.ts +0 -65
- package/dist/node_modules/@evalops/tui/dist/components/markdown.d.ts.map +0 -1
- package/dist/node_modules/@evalops/tui/dist/components/markdown.js +0 -562
- package/dist/node_modules/@evalops/tui/dist/components/markdown.js.map +0 -1
- package/dist/node_modules/@evalops/tui/dist/components/scroll-container.d.ts +0 -262
- package/dist/node_modules/@evalops/tui/dist/components/scroll-container.d.ts.map +0 -1
- package/dist/node_modules/@evalops/tui/dist/components/scroll-container.js +0 -575
- package/dist/node_modules/@evalops/tui/dist/components/scroll-container.js.map +0 -1
- package/dist/node_modules/@evalops/tui/dist/components/select-list.d.ts +0 -131
- package/dist/node_modules/@evalops/tui/dist/components/select-list.d.ts.map +0 -1
- package/dist/node_modules/@evalops/tui/dist/components/select-list.js +0 -257
- package/dist/node_modules/@evalops/tui/dist/components/select-list.js.map +0 -1
- package/dist/node_modules/@evalops/tui/dist/components/spacer.d.ts +0 -11
- package/dist/node_modules/@evalops/tui/dist/components/spacer.d.ts.map +0 -1
- package/dist/node_modules/@evalops/tui/dist/components/spacer.js +0 -19
- package/dist/node_modules/@evalops/tui/dist/components/spacer.js.map +0 -1
- package/dist/node_modules/@evalops/tui/dist/components/status-bar.d.ts +0 -22
- package/dist/node_modules/@evalops/tui/dist/components/status-bar.d.ts.map +0 -1
- package/dist/node_modules/@evalops/tui/dist/components/status-bar.js +0 -44
- package/dist/node_modules/@evalops/tui/dist/components/status-bar.js.map +0 -1
- package/dist/node_modules/@evalops/tui/dist/components/text.d.ts +0 -26
- package/dist/node_modules/@evalops/tui/dist/components/text.d.ts.map +0 -1
- package/dist/node_modules/@evalops/tui/dist/components/text.js +0 -181
- package/dist/node_modules/@evalops/tui/dist/components/text.js.map +0 -1
- package/dist/node_modules/@evalops/tui/dist/components/truncated-text.d.ts +0 -15
- package/dist/node_modules/@evalops/tui/dist/components/truncated-text.d.ts.map +0 -1
- package/dist/node_modules/@evalops/tui/dist/components/truncated-text.js +0 -84
- package/dist/node_modules/@evalops/tui/dist/components/truncated-text.js.map +0 -1
- package/dist/node_modules/@evalops/tui/dist/index.d.ts +0 -87
- package/dist/node_modules/@evalops/tui/dist/index.d.ts.map +0 -1
- package/dist/node_modules/@evalops/tui/dist/index.js +0 -85
- package/dist/node_modules/@evalops/tui/dist/index.js.map +0 -1
- package/dist/node_modules/@evalops/tui/dist/keymap.d.ts +0 -189
- package/dist/node_modules/@evalops/tui/dist/keymap.d.ts.map +0 -1
- package/dist/node_modules/@evalops/tui/dist/keymap.js +0 -363
- package/dist/node_modules/@evalops/tui/dist/keymap.js.map +0 -1
- package/dist/node_modules/@evalops/tui/dist/mermaid-renderer.d.ts +0 -25
- package/dist/node_modules/@evalops/tui/dist/mermaid-renderer.d.ts.map +0 -1
- package/dist/node_modules/@evalops/tui/dist/mermaid-renderer.js +0 -828
- package/dist/node_modules/@evalops/tui/dist/mermaid-renderer.js.map +0 -1
- package/dist/node_modules/@evalops/tui/dist/style/code-highlighter.d.ts +0 -40
- package/dist/node_modules/@evalops/tui/dist/style/code-highlighter.d.ts.map +0 -1
- package/dist/node_modules/@evalops/tui/dist/style/code-highlighter.js +0 -474
- package/dist/node_modules/@evalops/tui/dist/style/code-highlighter.js.map +0 -1
- package/dist/node_modules/@evalops/tui/dist/terminal.d.ts +0 -201
- package/dist/node_modules/@evalops/tui/dist/terminal.d.ts.map +0 -1
- package/dist/node_modules/@evalops/tui/dist/terminal.js +0 -241
- package/dist/node_modules/@evalops/tui/dist/terminal.js.map +0 -1
- package/dist/node_modules/@evalops/tui/dist/tui.d.ts +0 -263
- package/dist/node_modules/@evalops/tui/dist/tui.d.ts.map +0 -1
- package/dist/node_modules/@evalops/tui/dist/tui.js +0 -694
- package/dist/node_modules/@evalops/tui/dist/tui.js.map +0 -1
- package/dist/node_modules/@evalops/tui/dist/utils/terminal-features.d.ts +0 -14
- package/dist/node_modules/@evalops/tui/dist/utils/terminal-features.d.ts.map +0 -1
- package/dist/node_modules/@evalops/tui/dist/utils/terminal-features.js +0 -44
- package/dist/node_modules/@evalops/tui/dist/utils/terminal-features.js.map +0 -1
- package/dist/node_modules/@evalops/tui/dist/utils.d.ts +0 -32
- package/dist/node_modules/@evalops/tui/dist/utils.d.ts.map +0 -1
- package/dist/node_modules/@evalops/tui/dist/utils.js +0 -556
- package/dist/node_modules/@evalops/tui/dist/utils.js.map +0 -1
- package/dist/node_modules/@evalops/tui/package.json +0 -58
- package/dist/skills/artifact-metadata.d.ts.map +0 -1
- package/dist/skills/artifact-metadata.js.map +0 -1
- package/dist/skills/composer-diagnostics.d.ts +0 -69
- package/dist/skills/composer-diagnostics.d.ts.map +0 -1
- package/dist/skills/composer-diagnostics.js +0 -78
- package/dist/skills/composer-diagnostics.js.map +0 -1
- package/dist/skills/composer.d.ts +0 -19
- package/dist/skills/composer.d.ts.map +0 -1
- package/dist/skills/composer.js +0 -64
- package/dist/skills/composer.js.map +0 -1
- package/dist/skills/eval-harness.d.ts +0 -38
- package/dist/skills/eval-harness.d.ts.map +0 -1
- package/dist/skills/eval-harness.js +0 -112
- package/dist/skills/eval-harness.js.map +0 -1
- package/dist/skills/index.d.ts +0 -41
- package/dist/skills/index.d.ts.map +0 -1
- package/dist/skills/index.js +0 -41
- package/dist/skills/index.js.map +0 -1
- package/dist/skills/learned-guidelines.d.ts +0 -33
- package/dist/skills/learned-guidelines.d.ts.map +0 -1
- package/dist/skills/learned-guidelines.js +0 -291
- package/dist/skills/learned-guidelines.js.map +0 -1
- package/dist/skills/linter.d.ts +0 -36
- package/dist/skills/linter.d.ts.map +0 -1
- package/dist/skills/linter.js +0 -397
- package/dist/skills/linter.js.map +0 -1
- package/dist/skills/loader.d.ts +0 -252
- package/dist/skills/loader.d.ts.map +0 -1
- package/dist/skills/loader.js +0 -957
- package/dist/skills/loader.js.map +0 -1
- package/dist/skills/package-contract.d.ts +0 -45
- package/dist/skills/package-contract.d.ts.map +0 -1
- package/dist/skills/package-contract.js +0 -153
- package/dist/skills/package-contract.js.map +0 -1
- package/dist/skills/runtime-activation.d.ts +0 -69
- package/dist/skills/runtime-activation.d.ts.map +0 -1
- package/dist/skills/runtime-activation.js +0 -227
- package/dist/skills/runtime-activation.js.map +0 -1
- package/dist/skills/scaffold-from-template.d.ts +0 -58
- package/dist/skills/scaffold-from-template.d.ts.map +0 -1
- package/dist/skills/scaffold-from-template.js +0 -72
- package/dist/skills/scaffold-from-template.js.map +0 -1
- package/dist/skills/scaffolder.d.ts +0 -65
- package/dist/skills/scaffolder.d.ts.map +0 -1
- package/dist/skills/scaffolder.js +0 -167
- package/dist/skills/scaffolder.js.map +0 -1
- package/dist/skills/service-client.d.ts +0 -56
- package/dist/skills/service-client.d.ts.map +0 -1
- package/dist/skills/service-client.js +0 -266
- package/dist/skills/service-client.js.map +0 -1
- package/dist/skills/skill-templates.d.ts +0 -70
- package/dist/skills/skill-templates.d.ts.map +0 -1
- package/dist/skills/skill-templates.js +0 -154
- package/dist/skills/skill-templates.js.map +0 -1
- package/dist/skills/tool.d.ts +0 -21
- package/dist/skills/tool.d.ts.map +0 -1
- package/dist/skills/tool.js +0 -339
- package/dist/skills/tool.js.map +0 -1
- package/dist/skills/trust-cache.d.ts +0 -65
- package/dist/skills/trust-cache.d.ts.map +0 -1
- package/dist/skills/trust-cache.js +0 -146
- package/dist/skills/trust-cache.js.map +0 -1
- package/dist/skills/types.d.ts +0 -91
- package/dist/skills/types.d.ts.map +0 -1
- package/dist/skills/types.js +0 -8
- package/dist/skills/types.js.map +0 -1
- /package/dist/{cli-tui → runtime}/prompt-queue.d.ts +0 -0
- /package/dist/{cli-tui → runtime}/prompt-queue.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lazy-registry.js","sourceRoot":"","sources":["../../src/tools/lazy-registry.ts"],"names":[],"mappings":"AAEA,MAAM,eAAe,GAAG;IACvB,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ;IACtD,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ;IACtD,MAAM,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,MAAM,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AAG,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,IAAI,EAAE,CAAC;AAEjE,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACtC,SAAmB;IAEnB,MAAM,QAAQ,GAAgB,EAAE,CAAC;IACjC,KAAK,MAAM,IAAI,IAAI,SAAS,EAAE,CAAC;QAC9B,MAAM,QAAQ,GAAG,eAAe,CAAC,IAAoC,CAAC,CAAC;QACvE,IAAI,QAAQ,EAAE,CAAC;YACd,QAAQ,CAAC,IAAI,CAAC,MAAM,QAAQ,EAAE,CAAC,CAAC;QACjC,CAAC;IACF,CAAC;IACD,OAAO,QAAQ,CAAC;AACjB,CAAC","sourcesContent":["import type { AgentTool } from \"../agent/types.js\";\n\nconst lazyToolLoaders = {\n\tread: async () => (await import(\"./read.js\")).readTool,\n\tlist: async () => (await import(\"./list.js\")).listTool,\n\toracle: async () => (await import(\"./oracle.js\")).oracleTool,\n\tfind: async () => (await import(\"./find.js\")).findTool,\n\textract_document: async () =>\n\t\t(await import(\"./extract-document.js\")).extractDocumentTool,\n\tsearch: async () => (await import(\"./search.js\")).searchTool,\n\tparallel_ripgrep: async () =>\n\t\t(await import(\"./parallel-ripgrep.js\")).parallelRipgrepTool,\n\tdiff: async () => (await import(\"./diff.js\")).diffTool,\n\tbash: async () => (await import(\"./bash.js\")).bashTool,\n\tbackground_tasks: async () =>\n\t\t(await import(\"./background/tool-handler.js\")).backgroundTasksTool,\n\tapply_patch: async () => (await import(\"./apply-patch.js\")).applyPatchTool,\n\tedit: async () => (await import(\"./edit.js\")).editTool,\n\twrite: async () => (await import(\"./write.js\")).writeTool,\n\tnotebook_edit: async () => (await import(\"./notebook.js\")).notebookEditTool,\n\ttodo: async () => (await import(\"./todo.js\")).todoTool,\n\task_user: async () => (await import(\"./ask-user.js\")).askUserTool,\n\twebsearch: async () => (await import(\"./websearch.js\")).websearchTool,\n\tcodesearch: async () => (await import(\"./codesearch.js\")).codesearchTool,\n\twebfetch: async () => (await import(\"./webfetch.js\")).webfetchTool,\n\tstatus: async () => (await import(\"./status.js\")).statusTool,\n\tgh_pr: async () => (await import(\"./gh.js\")).ghPrTool,\n\tgh_issue: async () => (await import(\"./gh.js\")).ghIssueTool,\n\tgh_repo: async () => (await import(\"./gh.js\")).ghRepoTool,\n\tpipeline_search_contacts: async () =>\n\t\t(await import(\"./pipeline.js\")).pipelineSearchContactsTool,\n\tpipeline_search_deals: async () =>\n\t\t(await import(\"./pipeline.js\")).pipelineSearchDealsTool,\n\tpipeline_create_signal: async () =>\n\t\t(await import(\"./pipeline.js\")).pipelineCreateSignalTool,\n\tpipeline_log_activity: async () =>\n\t\t(await import(\"./pipeline.js\")).pipelineLogActivityTool,\n} satisfies Record<string, () => Promise<AgentTool>>;\n\nexport const lazyToolNames = Object.keys(lazyToolLoaders).sort();\n\nexport async function loadFilteredTools(\n\ttoolNames: string[],\n): Promise<AgentTool[]> {\n\tconst filtered: AgentTool[] = [];\n\tfor (const name of toolNames) {\n\t\tconst loadTool = lazyToolLoaders[name as keyof typeof lazyToolLoaders];\n\t\tif (loadTool) {\n\t\t\tfiltered.push(await loadTool());\n\t\t}\n\t}\n\treturn filtered;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"lazy-registry.js","sourceRoot":"","sources":["../../src/tools/lazy-registry.ts"],"names":[],"mappings":"AAEA,MAAM,eAAe,GAAG;IACvB,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ;IACtD,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ;IACtD,MAAM,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,UAAU;IAC5D,OAAO,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,WAAW;IA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C,CAAC,IAAI,EAAE,CAAC;AAEjE,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACtC,SAAmB;IAEnB,MAAM,QAAQ,GAAgB,EAAE,CAAC;IACjC,KAAK,MAAM,IAAI,IAAI,SAAS,EAAE,CAAC;QAC9B,MAAM,QAAQ,GAAG,eAAe,CAAC,IAAoC,CAAC,CAAC;QACvE,IAAI,QAAQ,EAAE,CAAC;YACd,QAAQ,CAAC,IAAI,CAAC,MAAM,QAAQ,EAAE,CAAC,CAAC;QACjC,CAAC;IACF,CAAC;IACD,OAAO,QAAQ,CAAC;AACjB,CAAC","sourcesContent":["import type { AgentTool } from \"../agent/types.js\";\n\nconst lazyToolLoaders = {\n\tread: async () => (await import(\"./read.js\")).readTool,\n\tlist: async () => (await import(\"./list.js\")).listTool,\n\toracle: async () => (await import(\"./oracle.js\")).oracleTool,\n\tpainter: async () => (await import(\"./painter.js\")).painterTool,\n\tfind: async () => (await import(\"./find.js\")).findTool,\n\textract_document: async () =>\n\t\t(await import(\"./extract-document.js\")).extractDocumentTool,\n\tsearch: async () => (await import(\"./search.js\")).searchTool,\n\tparallel_ripgrep: async () =>\n\t\t(await import(\"./parallel-ripgrep.js\")).parallelRipgrepTool,\n\tdiff: async () => (await import(\"./diff.js\")).diffTool,\n\tbash: async () => (await import(\"./bash.js\")).bashTool,\n\tbackground_tasks: async () =>\n\t\t(await import(\"./background/tool-handler.js\")).backgroundTasksTool,\n\tapply_patch: async () => (await import(\"./apply-patch.js\")).applyPatchTool,\n\tedit: async () => (await import(\"./edit.js\")).editTool,\n\twrite: async () => (await import(\"./write.js\")).writeTool,\n\tnotebook_edit: async () => (await import(\"./notebook.js\")).notebookEditTool,\n\ttodo: async () => (await import(\"./todo.js\")).todoTool,\n\task_user: async () => (await import(\"./ask-user.js\")).askUserTool,\n\twebsearch: async () => (await import(\"./websearch.js\")).websearchTool,\n\tcodesearch: async () => (await import(\"./codesearch.js\")).codesearchTool,\n\twebfetch: async () => (await import(\"./webfetch.js\")).webfetchTool,\n\tstatus: async () => (await import(\"./status.js\")).statusTool,\n\tgh_pr: async () => (await import(\"./gh.js\")).ghPrTool,\n\tgh_issue: async () => (await import(\"./gh.js\")).ghIssueTool,\n\tgh_repo: async () => (await import(\"./gh.js\")).ghRepoTool,\n\tpipeline_search_contacts: async () =>\n\t\t(await import(\"./pipeline.js\")).pipelineSearchContactsTool,\n\tpipeline_search_deals: async () =>\n\t\t(await import(\"./pipeline.js\")).pipelineSearchDealsTool,\n\tpipeline_create_signal: async () =>\n\t\t(await import(\"./pipeline.js\")).pipelineCreateSignalTool,\n\tpipeline_log_activity: async () =>\n\t\t(await import(\"./pipeline.js\")).pipelineLogActivityTool,\n} satisfies Record<string, () => Promise<AgentTool>>;\n\nexport const lazyToolNames = Object.keys(lazyToolLoaders).sort();\n\nexport async function loadFilteredTools(\n\ttoolNames: string[],\n): Promise<AgentTool[]> {\n\tconst filtered: AgentTool[] = [];\n\tfor (const name of toolNames) {\n\t\tconst loadTool = lazyToolLoaders[name as keyof typeof lazyToolLoaders];\n\t\tif (loadTool) {\n\t\t\tfiltered.push(await loadTool());\n\t\t}\n\t}\n\treturn filtered;\n}\n"]}
|
package/dist/tools/oracle.d.ts
CHANGED
|
@@ -4,6 +4,15 @@ export interface OracleToolDetails {
|
|
|
4
4
|
context?: string;
|
|
5
5
|
files?: string[];
|
|
6
6
|
}
|
|
7
|
+
export interface OracleModelCandidate {
|
|
8
|
+
id: string;
|
|
9
|
+
provider?: string;
|
|
10
|
+
reasoning?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function selectComplementaryOracleModel<T extends OracleModelCandidate>(models: T[], options?: {
|
|
13
|
+
primaryProvider?: string;
|
|
14
|
+
preferredId?: string;
|
|
15
|
+
}): T;
|
|
7
16
|
export declare const oracleTool: Readonly<{
|
|
8
17
|
name: string;
|
|
9
18
|
label: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oracle.d.ts","sourceRoot":"","sources":["../../src/tools/oracle.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"oracle.d.ts","sourceRoot":"","sources":["../../src/tools/oracle.ts"],"names":[],"mappings":"AA4CA,MAAM,WAAW,iBAAiB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,oBAAoB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,8BAA8B,CAAC,CAAC,SAAS,oBAAoB,EAC5E,MAAM,EAAE,CAAC,EAAE,EACX,OAAO,GAAE;IAAE,eAAe,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAO,GAC9D,CAAC,CA2BH;AAED,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;EAyJrB,CAAC"}
|
package/dist/tools/oracle.js
CHANGED
|
@@ -7,6 +7,7 @@ import { formatDelegation } from "@evalops/contracts";
|
|
|
7
7
|
import { Type } from "@sinclair/typebox";
|
|
8
8
|
import { getRegisteredModels } from "../models/registry.js";
|
|
9
9
|
import { buildEvalOpsDelegationEnvironment, issueEvalOpsDelegationToken, } from "../oauth/index.js";
|
|
10
|
+
import { defaultRuntimeEnv } from "../runtime/env.js";
|
|
10
11
|
import { createTool } from "./tool-dsl.js";
|
|
11
12
|
import { readOnlyToolNames } from "./tool-names.js";
|
|
12
13
|
const ORACLE_TIMEOUT_MS = 120_000;
|
|
@@ -24,6 +25,27 @@ const oracleSchema = Type.Object({
|
|
|
24
25
|
description: "Optional list of specific file paths that the Oracle should examine as part of its analysis.",
|
|
25
26
|
})),
|
|
26
27
|
});
|
|
28
|
+
export function selectComplementaryOracleModel(models, options = {}) {
|
|
29
|
+
const preferred = options.preferredId?.trim();
|
|
30
|
+
if (preferred) {
|
|
31
|
+
const preferredRefs = new Set([
|
|
32
|
+
preferred,
|
|
33
|
+
preferred.startsWith("openai/") ? preferred : `openai/${preferred}`,
|
|
34
|
+
]);
|
|
35
|
+
const explicit = models.find((model) => model.reasoning === true && preferredRefs.has(model.id));
|
|
36
|
+
if (explicit)
|
|
37
|
+
return explicit;
|
|
38
|
+
}
|
|
39
|
+
const complementary = models.find((model) => model.reasoning === true &&
|
|
40
|
+
Boolean(model.provider) &&
|
|
41
|
+
model.provider !== options.primaryProvider);
|
|
42
|
+
if (complementary)
|
|
43
|
+
return complementary;
|
|
44
|
+
const reasoning = models.find((model) => model.reasoning === true);
|
|
45
|
+
if (reasoning)
|
|
46
|
+
return reasoning;
|
|
47
|
+
throw new Error("No reasoning-capable model is configured for Oracle. Configure an explicit Oracle model or add a reasoning model.");
|
|
48
|
+
}
|
|
27
49
|
export const oracleTool = createTool({
|
|
28
50
|
name: "oracle",
|
|
29
51
|
description: "Summon the Seer - a mystical systems advisor that foresees consequences of complex engineering decisions. Ideal for architecture reviews, deep debugging, and strategic guidance.",
|
|
@@ -184,29 +206,9 @@ function selectOracleModel(inputOverride) {
|
|
|
184
206
|
const envOverride = process.env.MAESTRO_ORACLE_MODEL?.trim();
|
|
185
207
|
const preferred = inputOverride?.trim() ||
|
|
186
208
|
(envOverride && envOverride.length > 0 ? envOverride : "o3-mini");
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
preferred.startsWith("openai/") ? preferred : `openai/${preferred}`,
|
|
192
|
-
];
|
|
193
|
-
const found = models.find((m) => candidates.includes(m.id));
|
|
194
|
-
if (found) {
|
|
195
|
-
return found.id;
|
|
196
|
-
}
|
|
197
|
-
// Fall back to any reasoning-capable model
|
|
198
|
-
const reasoning = models.find((m) => m.reasoning === true);
|
|
199
|
-
if (reasoning) {
|
|
200
|
-
return reasoning.id;
|
|
201
|
-
}
|
|
202
|
-
// As a last resort, fall back to any configured model so the tool can still run.
|
|
203
|
-
// This prevents hard runtime failures while surfacing a clear warning.
|
|
204
|
-
const fallback = models.at(0);
|
|
205
|
-
if (fallback) {
|
|
206
|
-
return fallback.id;
|
|
207
|
-
}
|
|
208
|
-
// No acceptable model configured
|
|
209
|
-
const available = models.map((m) => m.id).join(", ");
|
|
210
|
-
throw new Error(`No model configured for Oracle. Tried ${preferred}. Set MAESTRO_ORACLE_MODEL to an available model or add a reasoning-capable model. Available models: ${available || "none"}.`);
|
|
209
|
+
return selectComplementaryOracleModel(getRegisteredModels(), {
|
|
210
|
+
preferredId: preferred,
|
|
211
|
+
primaryProvider: defaultRuntimeEnv().primaryModelProvider ?? undefined,
|
|
212
|
+
}).id;
|
|
211
213
|
}
|
|
212
214
|
//# sourceMappingURL=oracle.js.map
|
package/dist/tools/oracle.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oracle.js","sourceRoot":"","sources":["../../src/tools/oracle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAyB,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACN,iCAAiC,EACjC,2BAA2B,GAC3B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AA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AAC,SAAS,CAAC,CAAC,CAAC,UAAU,SAAS,EAAE;KACnE,CAAC;IACF,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC5D,IAAI,KAAK,EAAE,CAAC;QACX,OAAO,KAAK,CAAC,EAAE,CAAC;IACjB,CAAC;IAED,2CAA2C;IAC3C,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,KAAK,IAAI,CAAC,CAAC;IAC3D,IAAI,SAAS,EAAE,CAAC;QACf,OAAO,SAAS,CAAC,EAAE,CAAC;IACrB,CAAC;IAED,iFAAiF;IACjF,uEAAuE;IACvE,MAAM,QAAQ,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAC9B,IAAI,QAAQ,EAAE,CAAC;QACd,OAAO,QAAQ,CAAC,EAAE,CAAC;IACpB,CAAC;IAED,iCAAiC;IACjC,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrD,MAAM,IAAI,KAAK,CACd,yCAAyC,SAAS,wGAAwG,SAAS,IAAI,MAAM,GAAG,CAChL,CAAC;AACH,CAAC","sourcesContent":["import { spawn } from \"node:child_process\";\nimport { randomUUID } from \"node:crypto\";\nimport { unlinkSync, writeFileSync } from \"node:fs\";\nimport { tmpdir } from \"node:os\";\nimport { join } from \"node:path\";\nimport { type DelegationPrompt, formatDelegation } from \"@evalops/contracts\";\nimport { Type } from \"@sinclair/typebox\";\nimport type { Static } from \"@sinclair/typebox\";\nimport { getRegisteredModels } from \"../models/registry.js\";\nimport {\n\tbuildEvalOpsDelegationEnvironment,\n\tissueEvalOpsDelegationToken,\n} from \"../oauth/index.js\";\nimport { createTool } from \"./tool-dsl.js\";\nimport { readOnlyToolNames } from \"./tool-names.js\";\n\nconst ORACLE_TIMEOUT_MS = 120_000;\n\nconst oracleSchema = Type.Object({\n\ttask: Type.String({\n\t\tdescription:\n\t\t\t\"The task or question you want the Oracle to help with. Be specific about what kind of guidance, review, or planning you need.\",\n\t}),\n\tmodel: Type.Optional(\n\t\tType.String({\n\t\t\tdescription:\n\t\t\t\t\"Optional model id to use for the Oracle (must be available in your configured models). Defaults to a reasoning-capable model such as o3-mini.\",\n\t\t}),\n\t),\n\tcontext: Type.Optional(\n\t\tType.String({\n\t\t\tdescription:\n\t\t\t\t\"Optional context about the current situation, what you've tried, or background information that would help the Oracle provide better guidance.\",\n\t\t}),\n\t),\n\tfiles: Type.Optional(\n\t\tType.Array(Type.String(), {\n\t\t\tdescription:\n\t\t\t\t\"Optional list of specific file paths that the Oracle should examine as part of its analysis.\",\n\t\t}),\n\t),\n});\n\nexport interface OracleToolDetails {\n\ttask: string;\n\tmodel?: string;\n\tcontext?: string;\n\tfiles?: string[];\n}\n\nexport const oracleTool = createTool<typeof oracleSchema, OracleToolDetails>({\n\tname: \"oracle\",\n\tdescription:\n\t\t\"Summon the Seer - a mystical systems advisor that foresees consequences of complex engineering decisions. Ideal for architecture reviews, deep debugging, and strategic guidance.\",\n\tschema: oracleSchema,\n\tasync run(params, { respond, signal, toolCallId }) {\n\t\tconst { task, context, files, model: modelOverride } = params;\n\t\tconst model = selectOracleModel(modelOverride);\n\n\t\t// Create temporary input file with the Seer summoning\n\t\tconst tmpFile = join(tmpdir(), `seer-${randomUUID()}.md`);\n\n\t\tconst delegationPrompt: DelegationPrompt = {\n\t\t\tgoal: \"Provide read-only architectural guidance for a complex engineering decision.\",\n\t\t\tcontext:\n\t\t\t\tcontext ??\n\t\t\t\t\"The caller did not provide extra context beyond the task and artifacts.\",\n\t\t\ttask,\n\t\t\tevidence: files?.length\n\t\t\t\t? files.map((file) => `Artifact to examine: ${file}`)\n\t\t\t\t: [],\n\t\t\tvalidation:\n\t\t\t\t\"Inspect referenced artifacts before drawing conclusions, cite file paths and line numbers when possible, and separate evidence from assumptions.\",\n\t\t\tstoppingCondition:\n\t\t\t\t\"Stop after a concise response with Summary, Insights, optional Next steps, any uncertainties, then final lines `Effort: <S|M|L|XL> (<rough duration or reason>)` and optional `Revisit-if: <signal>`. Never edit or run code.\",\n\t\t};\n\t\tconst prompt = [\n\t\t\t\"You are the Seer, a read-only software architecture advisor. You must never edit or run code.\",\n\t\t\t\"\",\n\t\t\tformatDelegation(delegationPrompt),\n\t\t].join(\"\\n\");\n\n\t\twriteFileSync(tmpFile, prompt);\n\n\t\tlet fileCleanedUp = false;\n\t\tconst cleanupFile = () => {\n\t\t\tif (fileCleanedUp) return;\n\t\t\tfileCleanedUp = true;\n\t\t\ttry {\n\t\t\t\tunlinkSync(tmpFile);\n\t\t\t} catch {\n\t\t\t\t// File already deleted or other error - ignore\n\t\t\t}\n\t\t};\n\n\t\ttry {\n\t\t\tconst env = await buildOracleEnv(toolCallId);\n\n\t\t\t// Spawn Seer subagent with read-only tools and reasoning model\n\t\t\tconst args = [\n\t\t\t\t\"--read-only\",\n\t\t\t\t\"--tools\",\n\t\t\t\treadOnlyToolNames.join(\",\"),\n\t\t\t\t\"--model\",\n\t\t\t\tmodel, // Use validated reasoning model for prophetic insights\n\t\t\t\t\"--no-session\",\n\t\t\t\t\"exec\",\n\t\t\t\ttmpFile,\n\t\t\t];\n\n\t\t\tconst result = await new Promise<string>((resolve, reject) => {\n\t\t\t\tif (signal?.aborted) {\n\t\t\t\t\tcleanupFile();\n\t\t\t\t\treject(new Error(\"Seer invocation aborted\"));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst seer = spawn(\"maestro\", args, {\n\t\t\t\t\tenv,\n\t\t\t\t\tstdio: [\"pipe\", \"pipe\", \"pipe\"],\n\t\t\t\t});\n\n\t\t\t\tlet output = \"\";\n\t\t\t\tlet errorOutput = \"\";\n\t\t\t\tlet timedOut = false;\n\t\t\t\tlet aborted = false;\n\t\t\t\tlet timeoutHandle: NodeJS.Timeout | null = null;\n\n\t\t\t\tconst killChild = () => {\n\t\t\t\t\tif (seer.pid) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tprocess.kill(seer.pid);\n\t\t\t\t\t\t} catch {\n\t\t\t\t\t\t\t// Already terminated\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tconst cleanupListeners = () => {\n\t\t\t\t\tif (timeoutHandle) {\n\t\t\t\t\t\tclearTimeout(timeoutHandle);\n\t\t\t\t\t}\n\t\t\t\t\tsignal?.removeEventListener(\"abort\", onAbort);\n\t\t\t\t};\n\n\t\t\t\tconst onAbort = () => {\n\t\t\t\t\taborted = true;\n\t\t\t\t\tkillChild();\n\t\t\t\t};\n\n\t\t\t\tif (signal) {\n\t\t\t\t\tsignal.addEventListener(\"abort\", onAbort);\n\t\t\t\t}\n\n\t\t\t\tconst startTimeout = () => {\n\t\t\t\t\ttimeoutHandle = setTimeout(() => {\n\t\t\t\t\t\ttimedOut = true;\n\t\t\t\t\t\tkillChild();\n\t\t\t\t\t}, ORACLE_TIMEOUT_MS);\n\t\t\t\t};\n\n\t\t\t\tstartTimeout();\n\n\t\t\t\tseer.stdout.on(\"data\", (data) => {\n\t\t\t\t\toutput += data.toString();\n\t\t\t\t});\n\n\t\t\t\tseer.stderr.on(\"data\", (data) => {\n\t\t\t\t\terrorOutput += data.toString();\n\t\t\t\t});\n\n\t\t\t\tseer.on(\"close\", (code) => {\n\t\t\t\t\tcleanupFile();\n\t\t\t\t\tcleanupListeners();\n\n\t\t\t\t\tif (code === 0 && !timedOut && !aborted) {\n\t\t\t\t\t\tresolve(output.trim());\n\t\t\t\t\t} else {\n\t\t\t\t\t\treject(\n\t\t\t\t\t\t\tnew Error(\n\t\t\t\t\t\t\t\taborted\n\t\t\t\t\t\t\t\t\t? \"Seer invocation aborted\"\n\t\t\t\t\t\t\t\t\t: timedOut\n\t\t\t\t\t\t\t\t\t\t? \"Seer divination timed out\"\n\t\t\t\t\t\t\t\t\t\t: `Seer divination failed (exit ${code}): ${errorOutput}`,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tseer.on(\"error\", (err) => {\n\t\t\t\t\tcleanupFile();\n\t\t\t\t\tcleanupListeners();\n\t\t\t\t\treject(new Error(`Failed to summon the Seer: ${err.message}`));\n\t\t\t\t});\n\t\t\t});\n\n\t\t\treturn respond.text(result);\n\t\t} catch (error) {\n\t\t\tcleanupFile();\n\t\t\tthrow error;\n\t\t}\n\t},\n});\n\nasync function buildOracleEnv(\n\ttoolCallId: string,\n): Promise<Record<string, string | undefined>> {\n\tconst baseEnv = { ...process.env };\n\n\ttry {\n\t\tconst delegation = await issueEvalOpsDelegationToken({\n\t\t\tagentId: toolCallId,\n\t\t\tagentType: \"oracle_seer\",\n\t\t\tcapabilities: [\"oracle_read_only\"],\n\t\t\trunId: toolCallId,\n\t\t\tsurface: \"maestro-oracle\",\n\t\t\ttoken: process.env.MAESTRO_EVALOPS_ACCESS_TOKEN,\n\t\t\tttlSeconds: Math.max(60, Math.ceil(ORACLE_TIMEOUT_MS / 1000)),\n\t\t});\n\n\t\treturn {\n\t\t\t...baseEnv,\n\t\t\t...buildEvalOpsDelegationEnvironment(delegation),\n\t\t};\n\t} catch (error) {\n\t\tconst message = error instanceof Error ? error.message : String(error);\n\t\tif (\n\t\t\tmessage.includes(\"Run /login evalops first\") ||\n\t\t\tmessage.includes(\"EvalOps login requires\")\n\t\t) {\n\t\t\treturn baseEnv;\n\t\t}\n\n\t\treturn baseEnv;\n\t}\n}\n\nfunction selectOracleModel(inputOverride?: string): string {\n\tconst envOverride = process.env.MAESTRO_ORACLE_MODEL?.trim();\n\tconst preferred =\n\t\tinputOverride?.trim() ||\n\t\t(envOverride && envOverride.length > 0 ? envOverride : \"o3-mini\");\n\tconst models = getRegisteredModels();\n\n\t// Try the preferred id and common provider-qualified variant\n\tconst candidates = [\n\t\tpreferred,\n\t\tpreferred.startsWith(\"openai/\") ? preferred : `openai/${preferred}`,\n\t];\n\tconst found = models.find((m) => candidates.includes(m.id));\n\tif (found) {\n\t\treturn found.id;\n\t}\n\n\t// Fall back to any reasoning-capable model\n\tconst reasoning = models.find((m) => m.reasoning === true);\n\tif (reasoning) {\n\t\treturn reasoning.id;\n\t}\n\n\t// As a last resort, fall back to any configured model so the tool can still run.\n\t// This prevents hard runtime failures while surfacing a clear warning.\n\tconst fallback = models.at(0);\n\tif (fallback) {\n\t\treturn fallback.id;\n\t}\n\n\t// No acceptable model configured\n\tconst available = models.map((m) => m.id).join(\", \");\n\tthrow new Error(\n\t\t`No model configured for Oracle. Tried ${preferred}. Set MAESTRO_ORACLE_MODEL to an available model or add a reasoning-capable model. Available models: ${available || \"none\"}.`,\n\t);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"oracle.js","sourceRoot":"","sources":["../../src/tools/oracle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAyB,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACN,iCAAiC,EACjC,2BAA2B,GAC3B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,e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AAkB,CAAC;YAClC,KAAK,EAAE,UAAU;YACjB,OAAO,EAAE,gBAAgB;YACzB,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,4BAA4B;YAC/C,UAAU,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;SAC7D,CAAC,CAAC;QAEH,OAAO;YACN,GAAG,OAAO;YACV,GAAG,iCAAiC,CAAC,UAAU,CAAC;SAChD,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACvE,IACC,OAAO,CAAC,QAAQ,CAAC,0BAA0B,CAAC;YAC5C,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAAC,EACzC,CAAC;YACF,OAAO,OAAO,CAAC;QAChB,CAAC;QAED,OAAO,OAAO,CAAC;IAChB,CAAC;AACF,CAAC;AAED,SAAS,iBAAiB,CAAC,aAAsB;IAChD,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,IAAI,EAAE,CAAC;IAC7D,MAAM,SAAS,GACd,aAAa,EAAE,IAAI,EAAE;QACrB,CAAC,WAAW,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACnE,OAAO,8BAA8B,CAAC,mBAAmB,EAAE,EAAE;QAC5D,WAAW,EAAE,SAAS;QACtB,eAAe,EAAE,iBAAiB,EAAE,CAAC,oBAAoB,IAAI,SAAS;KACtE,CAAC,CAAC,EAAE,CAAC;AACP,CAAC","sourcesContent":["import { spawn } from \"node:child_process\";\nimport { randomUUID } from \"node:crypto\";\nimport { unlinkSync, writeFileSync } from \"node:fs\";\nimport { tmpdir } from \"node:os\";\nimport { join } from \"node:path\";\nimport { type DelegationPrompt, formatDelegation } from \"@evalops/contracts\";\nimport { Type } from \"@sinclair/typebox\";\nimport type { Static } from \"@sinclair/typebox\";\nimport { getRegisteredModels } from \"../models/registry.js\";\nimport {\n\tbuildEvalOpsDelegationEnvironment,\n\tissueEvalOpsDelegationToken,\n} from \"../oauth/index.js\";\nimport { defaultRuntimeEnv } from \"../runtime/env.js\";\nimport { createTool } from \"./tool-dsl.js\";\nimport { readOnlyToolNames } from \"./tool-names.js\";\n\nconst ORACLE_TIMEOUT_MS = 120_000;\n\nconst oracleSchema = Type.Object({\n\ttask: Type.String({\n\t\tdescription:\n\t\t\t\"The task or question you want the Oracle to help with. Be specific about what kind of guidance, review, or planning you need.\",\n\t}),\n\tmodel: Type.Optional(\n\t\tType.String({\n\t\t\tdescription:\n\t\t\t\t\"Optional model id to use for the Oracle (must be available in your configured models). Defaults to a reasoning-capable model such as o3-mini.\",\n\t\t}),\n\t),\n\tcontext: Type.Optional(\n\t\tType.String({\n\t\t\tdescription:\n\t\t\t\t\"Optional context about the current situation, what you've tried, or background information that would help the Oracle provide better guidance.\",\n\t\t}),\n\t),\n\tfiles: Type.Optional(\n\t\tType.Array(Type.String(), {\n\t\t\tdescription:\n\t\t\t\t\"Optional list of specific file paths that the Oracle should examine as part of its analysis.\",\n\t\t}),\n\t),\n});\n\nexport interface OracleToolDetails {\n\ttask: string;\n\tmodel?: string;\n\tcontext?: string;\n\tfiles?: string[];\n}\n\nexport interface OracleModelCandidate {\n\tid: string;\n\tprovider?: string;\n\treasoning?: boolean;\n}\n\nexport function selectComplementaryOracleModel<T extends OracleModelCandidate>(\n\tmodels: T[],\n\toptions: { primaryProvider?: string; preferredId?: string } = {},\n): T {\n\tconst preferred = options.preferredId?.trim();\n\tif (preferred) {\n\t\tconst preferredRefs = new Set([\n\t\t\tpreferred,\n\t\t\tpreferred.startsWith(\"openai/\") ? preferred : `openai/${preferred}`,\n\t\t]);\n\t\tconst explicit = models.find(\n\t\t\t(model) => model.reasoning === true && preferredRefs.has(model.id),\n\t\t);\n\t\tif (explicit) return explicit;\n\t}\n\n\tconst complementary = models.find(\n\t\t(model) =>\n\t\t\tmodel.reasoning === true &&\n\t\t\tBoolean(model.provider) &&\n\t\t\tmodel.provider !== options.primaryProvider,\n\t);\n\tif (complementary) return complementary;\n\n\tconst reasoning = models.find((model) => model.reasoning === true);\n\tif (reasoning) return reasoning;\n\n\tthrow new Error(\n\t\t\"No reasoning-capable model is configured for Oracle. Configure an explicit Oracle model or add a reasoning model.\",\n\t);\n}\n\nexport const oracleTool = createTool<typeof oracleSchema, OracleToolDetails>({\n\tname: \"oracle\",\n\tdescription:\n\t\t\"Summon the Seer - a mystical systems advisor that foresees consequences of complex engineering decisions. Ideal for architecture reviews, deep debugging, and strategic guidance.\",\n\tschema: oracleSchema,\n\tasync run(params, { respond, signal, toolCallId }) {\n\t\tconst { task, context, files, model: modelOverride } = params;\n\t\tconst model = selectOracleModel(modelOverride);\n\n\t\t// Create temporary input file with the Seer summoning\n\t\tconst tmpFile = join(tmpdir(), `seer-${randomUUID()}.md`);\n\n\t\tconst delegationPrompt: DelegationPrompt = {\n\t\t\tgoal: \"Provide read-only architectural guidance for a complex engineering decision.\",\n\t\t\tcontext:\n\t\t\t\tcontext ??\n\t\t\t\t\"The caller did not provide extra context beyond the task and artifacts.\",\n\t\t\ttask,\n\t\t\tevidence: files?.length\n\t\t\t\t? files.map((file) => `Artifact to examine: ${file}`)\n\t\t\t\t: [],\n\t\t\tvalidation:\n\t\t\t\t\"Inspect referenced artifacts before drawing conclusions, cite file paths and line numbers when possible, and separate evidence from assumptions.\",\n\t\t\tstoppingCondition:\n\t\t\t\t\"Stop after a concise response with Summary, Insights, optional Next steps, any uncertainties, then final lines `Effort: <S|M|L|XL> (<rough duration or reason>)` and optional `Revisit-if: <signal>`. Never edit or run code.\",\n\t\t};\n\t\tconst prompt = [\n\t\t\t\"You are the Seer, a read-only software architecture advisor. You must never edit or run code.\",\n\t\t\t\"\",\n\t\t\tformatDelegation(delegationPrompt),\n\t\t].join(\"\\n\");\n\n\t\twriteFileSync(tmpFile, prompt);\n\n\t\tlet fileCleanedUp = false;\n\t\tconst cleanupFile = () => {\n\t\t\tif (fileCleanedUp) return;\n\t\t\tfileCleanedUp = true;\n\t\t\ttry {\n\t\t\t\tunlinkSync(tmpFile);\n\t\t\t} catch {\n\t\t\t\t// File already deleted or other error - ignore\n\t\t\t}\n\t\t};\n\n\t\ttry {\n\t\t\tconst env = await buildOracleEnv(toolCallId);\n\n\t\t\t// Spawn Seer subagent with read-only tools and reasoning model\n\t\t\tconst args = [\n\t\t\t\t\"--read-only\",\n\t\t\t\t\"--tools\",\n\t\t\t\treadOnlyToolNames.join(\",\"),\n\t\t\t\t\"--model\",\n\t\t\t\tmodel, // Use validated reasoning model for prophetic insights\n\t\t\t\t\"--no-session\",\n\t\t\t\t\"exec\",\n\t\t\t\ttmpFile,\n\t\t\t];\n\n\t\t\tconst result = await new Promise<string>((resolve, reject) => {\n\t\t\t\tif (signal?.aborted) {\n\t\t\t\t\tcleanupFile();\n\t\t\t\t\treject(new Error(\"Seer invocation aborted\"));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst seer = spawn(\"maestro\", args, {\n\t\t\t\t\tenv,\n\t\t\t\t\tstdio: [\"pipe\", \"pipe\", \"pipe\"],\n\t\t\t\t});\n\n\t\t\t\tlet output = \"\";\n\t\t\t\tlet errorOutput = \"\";\n\t\t\t\tlet timedOut = false;\n\t\t\t\tlet aborted = false;\n\t\t\t\tlet timeoutHandle: NodeJS.Timeout | null = null;\n\n\t\t\t\tconst killChild = () => {\n\t\t\t\t\tif (seer.pid) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tprocess.kill(seer.pid);\n\t\t\t\t\t\t} catch {\n\t\t\t\t\t\t\t// Already terminated\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tconst cleanupListeners = () => {\n\t\t\t\t\tif (timeoutHandle) {\n\t\t\t\t\t\tclearTimeout(timeoutHandle);\n\t\t\t\t\t}\n\t\t\t\t\tsignal?.removeEventListener(\"abort\", onAbort);\n\t\t\t\t};\n\n\t\t\t\tconst onAbort = () => {\n\t\t\t\t\taborted = true;\n\t\t\t\t\tkillChild();\n\t\t\t\t};\n\n\t\t\t\tif (signal) {\n\t\t\t\t\tsignal.addEventListener(\"abort\", onAbort);\n\t\t\t\t}\n\n\t\t\t\tconst startTimeout = () => {\n\t\t\t\t\ttimeoutHandle = setTimeout(() => {\n\t\t\t\t\t\ttimedOut = true;\n\t\t\t\t\t\tkillChild();\n\t\t\t\t\t}, ORACLE_TIMEOUT_MS);\n\t\t\t\t};\n\n\t\t\t\tstartTimeout();\n\n\t\t\t\tseer.stdout.on(\"data\", (data) => {\n\t\t\t\t\toutput += data.toString();\n\t\t\t\t});\n\n\t\t\t\tseer.stderr.on(\"data\", (data) => {\n\t\t\t\t\terrorOutput += data.toString();\n\t\t\t\t});\n\n\t\t\t\tseer.on(\"close\", (code) => {\n\t\t\t\t\tcleanupFile();\n\t\t\t\t\tcleanupListeners();\n\n\t\t\t\t\tif (code === 0 && !timedOut && !aborted) {\n\t\t\t\t\t\tresolve(output.trim());\n\t\t\t\t\t} else {\n\t\t\t\t\t\treject(\n\t\t\t\t\t\t\tnew Error(\n\t\t\t\t\t\t\t\taborted\n\t\t\t\t\t\t\t\t\t? \"Seer invocation aborted\"\n\t\t\t\t\t\t\t\t\t: timedOut\n\t\t\t\t\t\t\t\t\t\t? \"Seer divination timed out\"\n\t\t\t\t\t\t\t\t\t\t: `Seer divination failed (exit ${code}): ${errorOutput}`,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tseer.on(\"error\", (err) => {\n\t\t\t\t\tcleanupFile();\n\t\t\t\t\tcleanupListeners();\n\t\t\t\t\treject(new Error(`Failed to summon the Seer: ${err.message}`));\n\t\t\t\t});\n\t\t\t});\n\n\t\t\treturn respond.text(result);\n\t\t} catch (error) {\n\t\t\tcleanupFile();\n\t\t\tthrow error;\n\t\t}\n\t},\n});\n\nasync function buildOracleEnv(\n\ttoolCallId: string,\n): Promise<Record<string, string | undefined>> {\n\tconst baseEnv = { ...process.env };\n\n\ttry {\n\t\tconst delegation = await issueEvalOpsDelegationToken({\n\t\t\tagentId: toolCallId,\n\t\t\tagentType: \"oracle_seer\",\n\t\t\tcapabilities: [\"oracle_read_only\"],\n\t\t\trunId: toolCallId,\n\t\t\tsurface: \"maestro-oracle\",\n\t\t\ttoken: process.env.MAESTRO_EVALOPS_ACCESS_TOKEN,\n\t\t\tttlSeconds: Math.max(60, Math.ceil(ORACLE_TIMEOUT_MS / 1000)),\n\t\t});\n\n\t\treturn {\n\t\t\t...baseEnv,\n\t\t\t...buildEvalOpsDelegationEnvironment(delegation),\n\t\t};\n\t} catch (error) {\n\t\tconst message = error instanceof Error ? error.message : String(error);\n\t\tif (\n\t\t\tmessage.includes(\"Run /login evalops first\") ||\n\t\t\tmessage.includes(\"EvalOps login requires\")\n\t\t) {\n\t\t\treturn baseEnv;\n\t\t}\n\n\t\treturn baseEnv;\n\t}\n}\n\nfunction selectOracleModel(inputOverride?: string): string {\n\tconst envOverride = process.env.MAESTRO_ORACLE_MODEL?.trim();\n\tconst preferred =\n\t\tinputOverride?.trim() ||\n\t\t(envOverride && envOverride.length > 0 ? envOverride : \"o3-mini\");\n\treturn selectComplementaryOracleModel(getRegisteredModels(), {\n\t\tpreferredId: preferred,\n\t\tprimaryProvider: defaultRuntimeEnv().primaryModelProvider ?? undefined,\n\t}).id;\n}\n"]}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { type ImageDimensions, type MaskRegion } from "../services/image-providers/masks.js";
|
|
2
|
+
export declare function painterTimeoutMs(): number;
|
|
3
|
+
export declare function painterOutputDir(): string;
|
|
4
|
+
export declare function resolvePainterModel(): string;
|
|
5
|
+
/** Resolve the image provider. "openai" (default) or "flux" via fal.ai. */
|
|
6
|
+
export declare function resolvePainterProvider(): "openai" | "flux";
|
|
7
|
+
export declare function persistImage(bytes: Buffer, ext: string): Promise<{
|
|
8
|
+
path: string;
|
|
9
|
+
}>;
|
|
10
|
+
/**
|
|
11
|
+
* Classify whether an image-API failure is worth one retry. Image generation
|
|
12
|
+
* is expensive, so we retry only on clearly transient network/rate-limit
|
|
13
|
+
* faults and never on validation or content-policy rejections.
|
|
14
|
+
*/
|
|
15
|
+
export declare function isTransientImageError(err: unknown): boolean;
|
|
16
|
+
export type MaskDimensionSource = "png-header" | "sharp" | "explicit";
|
|
17
|
+
/**
|
|
18
|
+
* Resolve a pixel bounding box into a mask file path, writing the synthesized
|
|
19
|
+
* mask into the painter output directory. Dimensions come from (in order):
|
|
20
|
+
* the PNG header (no deps), the optional `sharp` package, or an explicit
|
|
21
|
+
* caller-supplied size. Returns the temp mask path plus how dims were found.
|
|
22
|
+
*/
|
|
23
|
+
export declare function buildMaskPath(images: string[], region: MaskRegion, explicitSize?: ImageDimensions): Promise<{
|
|
24
|
+
maskPath: string;
|
|
25
|
+
dimensions: ImageDimensions;
|
|
26
|
+
source: MaskDimensionSource;
|
|
27
|
+
}>;
|
|
28
|
+
export interface PainterToolDetails {
|
|
29
|
+
provider: string;
|
|
30
|
+
model: string;
|
|
31
|
+
mode: "generate" | "edit";
|
|
32
|
+
paths: string[];
|
|
33
|
+
}
|
|
34
|
+
export declare const painterTool: Readonly<{
|
|
35
|
+
name: string;
|
|
36
|
+
label: string;
|
|
37
|
+
description: string;
|
|
38
|
+
parameters: import("@sinclair/typebox").TObject<{
|
|
39
|
+
mode: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"generate">, import("@sinclair/typebox").TLiteral<"edit">]>;
|
|
40
|
+
prompt: import("@sinclair/typebox").TString;
|
|
41
|
+
images: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
42
|
+
mask: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
43
|
+
maskRegion: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
44
|
+
x: import("@sinclair/typebox").TNumber;
|
|
45
|
+
y: import("@sinclair/typebox").TNumber;
|
|
46
|
+
width: import("@sinclair/typebox").TNumber;
|
|
47
|
+
height: import("@sinclair/typebox").TNumber;
|
|
48
|
+
}>>;
|
|
49
|
+
maskSize: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
50
|
+
width: import("@sinclair/typebox").TInteger;
|
|
51
|
+
height: import("@sinclair/typebox").TInteger;
|
|
52
|
+
}>>;
|
|
53
|
+
size: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
54
|
+
quality: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"low">, import("@sinclair/typebox").TLiteral<"medium">, import("@sinclair/typebox").TLiteral<"high">, import("@sinclair/typebox").TLiteral<"auto">]>>;
|
|
55
|
+
n: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
56
|
+
}>;
|
|
57
|
+
annotations: import("../agent/types.js").ToolAnnotations | undefined;
|
|
58
|
+
source: import("../agent/types.js").McpToolSourceMetadata | undefined;
|
|
59
|
+
toolType: string | undefined;
|
|
60
|
+
inputExamples: unknown[] | undefined;
|
|
61
|
+
allowedCallers: string[] | undefined;
|
|
62
|
+
deferApiDefinition: boolean | undefined;
|
|
63
|
+
maxRetries: number | undefined;
|
|
64
|
+
retryDelayMs: number | undefined;
|
|
65
|
+
shouldRetry: ((error: unknown) => boolean) | undefined;
|
|
66
|
+
getToolUseSummary: ((params: Record<string, unknown>) => string | null) | undefined;
|
|
67
|
+
getDisplayName: ((params: Record<string, unknown>) => string | null) | undefined;
|
|
68
|
+
getActivityDescription: ((params: Record<string, unknown>) => string | null) | undefined;
|
|
69
|
+
execute: (toolCallId: string, params: Record<string, unknown>, signal?: AbortSignal, context?: {
|
|
70
|
+
sandbox?: import("../sandbox/types.js").Sandbox;
|
|
71
|
+
} | undefined, onUpdate?: import("../agent/types.js").AgentToolUpdateCallback<PainterToolDetails> | undefined) => Promise<import("../agent/types.js").AgentToolResult<PainterToolDetails>>;
|
|
72
|
+
}>;
|
|
73
|
+
//# sourceMappingURL=painter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"painter.d.ts","sourceRoot":"","sources":["../../src/tools/painter.ts"],"names":[],"mappings":"AAOA,OAAO,EACN,KAAK,eAAe,EACpB,KAAK,UAAU,EAGf,MAAM,sCAAsC,CAAC;AAe9C,wBAAgB,gBAAgB,IAAI,MAAM,CAOzC;AAED,wBAAgB,gBAAgB,IAAI,MAAM,CAIzC;AAED,wBAAgB,mBAAmB,IAAI,MAAM,CAE5C;AAED,2EAA2E;AAC3E,wBAAgB,sBAAsB,IAAI,QAAQ,GAAG,MAAM,CAG1D;AAED,wBAAsB,YAAY,CACjC,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,MAAM,GACT,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAM3B;AAcD;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAY3D;AAED,MAAM,MAAM,mBAAmB,GAAG,YAAY,GAAG,OAAO,GAAG,UAAU,CAAC;AAEtE;;;;;GAKG;AACH,wBAAsB,aAAa,CAClC,MAAM,EAAE,MAAM,EAAE,EAChB,MAAM,EAAE,UAAU,EAClB,YAAY,CAAC,EAAE,eAAe,GAC5B,OAAO,CAAC;IACV,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,eAAe,CAAC;IAC5B,MAAM,EAAE,mBAAmB,CAAC;CAC5B,CAAC,CA0CD;AA8ED,MAAM,WAAW,kBAAkB;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,UAAU,GAAG,MAAM,CAAC;IAC1B,KAAK,EAAE,MAAM,EAAE,CAAC;CAChB;AAED,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4JvB,CAAC"}
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
import { randomBytes } from "node:crypto";
|
|
2
|
+
import { readFile, unlink } from "node:fs/promises";
|
|
3
|
+
import { homedir } from "node:os";
|
|
4
|
+
import { join, resolve } from "node:path";
|
|
5
|
+
import { Type } from "@sinclair/typebox";
|
|
6
|
+
import { getPainterBudget } from "../services/image-providers/cost.js";
|
|
7
|
+
import { createImageProvider } from "../services/image-providers/index.js";
|
|
8
|
+
import { encodeMaskPng, readPngDimensions, } from "../services/image-providers/masks.js";
|
|
9
|
+
import { writeTextFileAtomic } from "../utils/fs.js";
|
|
10
|
+
import { createLogger } from "../utils/logger.js";
|
|
11
|
+
import { getImageMetadata } from "./image-processor.js";
|
|
12
|
+
import { createTool } from "./tool-dsl.js";
|
|
13
|
+
const logger = createLogger("tools:painter");
|
|
14
|
+
const DEFAULT_PAINTER_TIMEOUT_MS = 180_000;
|
|
15
|
+
const DEFAULT_MODEL = "gpt-image-2";
|
|
16
|
+
export function painterTimeoutMs() {
|
|
17
|
+
const raw = process.env.MAESTRO_PAINTER_TIMEOUT_MS;
|
|
18
|
+
if (!raw)
|
|
19
|
+
return DEFAULT_PAINTER_TIMEOUT_MS;
|
|
20
|
+
const parsed = Number.parseInt(raw, 10);
|
|
21
|
+
return Number.isFinite(parsed) && parsed > 0
|
|
22
|
+
? parsed
|
|
23
|
+
: DEFAULT_PAINTER_TIMEOUT_MS;
|
|
24
|
+
}
|
|
25
|
+
export function painterOutputDir() {
|
|
26
|
+
const override = process.env.MAESTRO_PAINTER_OUTPUT_DIR?.trim();
|
|
27
|
+
if (override)
|
|
28
|
+
return resolve(override);
|
|
29
|
+
return join(homedir(), ".maestro", "assets", "painter");
|
|
30
|
+
}
|
|
31
|
+
export function resolvePainterModel() {
|
|
32
|
+
return process.env.MAESTRO_PAINTER_MODEL?.trim() || DEFAULT_MODEL;
|
|
33
|
+
}
|
|
34
|
+
/** Resolve the image provider. "openai" (default) or "flux" via fal.ai. */
|
|
35
|
+
export function resolvePainterProvider() {
|
|
36
|
+
const raw = process.env.MAESTRO_PAINTER_PROVIDER?.trim().toLowerCase();
|
|
37
|
+
return raw === "flux" ? "flux" : "openai";
|
|
38
|
+
}
|
|
39
|
+
export async function persistImage(bytes, ext) {
|
|
40
|
+
const dir = painterOutputDir();
|
|
41
|
+
const name = `painter-${Date.now()}-${randomBytes(4).toString("hex")}.${ext}`;
|
|
42
|
+
const path = join(dir, name);
|
|
43
|
+
writeTextFileAtomic(path, bytes.toString("latin1"), { encoding: "latin1" });
|
|
44
|
+
return { path };
|
|
45
|
+
}
|
|
46
|
+
/** Errno-style codes that indicate a transient network fault worth retrying. */
|
|
47
|
+
const TRANSIENT_ERRNO_CODES = new Set([
|
|
48
|
+
"ETIMEDOUT",
|
|
49
|
+
"ECONNRESET",
|
|
50
|
+
"ENOTFOUND",
|
|
51
|
+
"ECONNREFUSED",
|
|
52
|
+
"EAI_AGAIN",
|
|
53
|
+
"EPIPE",
|
|
54
|
+
"EHOSTUNREACH",
|
|
55
|
+
"ENETUNREACH",
|
|
56
|
+
]);
|
|
57
|
+
/**
|
|
58
|
+
* Classify whether an image-API failure is worth one retry. Image generation
|
|
59
|
+
* is expensive, so we retry only on clearly transient network/rate-limit
|
|
60
|
+
* faults and never on validation or content-policy rejections.
|
|
61
|
+
*/
|
|
62
|
+
export function isTransientImageError(err) {
|
|
63
|
+
const code = err?.code;
|
|
64
|
+
if (typeof code === "string" &&
|
|
65
|
+
TRANSIENT_ERRNO_CODES.has(code.toUpperCase())) {
|
|
66
|
+
return true;
|
|
67
|
+
}
|
|
68
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
69
|
+
return /rate limit|too many requests|timeout|timed out|econnreset|enotfound|etimedout|econnrefused|service unavailable|bad gateway|5\d{2}/i.test(msg);
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Resolve a pixel bounding box into a mask file path, writing the synthesized
|
|
73
|
+
* mask into the painter output directory. Dimensions come from (in order):
|
|
74
|
+
* the PNG header (no deps), the optional `sharp` package, or an explicit
|
|
75
|
+
* caller-supplied size. Returns the temp mask path plus how dims were found.
|
|
76
|
+
*/
|
|
77
|
+
export async function buildMaskPath(images, region, explicitSize) {
|
|
78
|
+
if (images.length === 0) {
|
|
79
|
+
throw new Error("mask synthesis requires at least one input image path.");
|
|
80
|
+
}
|
|
81
|
+
const inputPath = images[0];
|
|
82
|
+
if (!inputPath) {
|
|
83
|
+
throw new Error("mask synthesis received an undefined input image path.");
|
|
84
|
+
}
|
|
85
|
+
const buf = await readFile(inputPath);
|
|
86
|
+
let dimensions = readPngDimensions(buf);
|
|
87
|
+
let source = "png-header";
|
|
88
|
+
if (!dimensions) {
|
|
89
|
+
if (explicitSize) {
|
|
90
|
+
dimensions = explicitSize;
|
|
91
|
+
source = "explicit";
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
const meta = await getImageMetadata(buf);
|
|
95
|
+
if (meta?.width && meta.height) {
|
|
96
|
+
dimensions = { width: meta.width, height: meta.height };
|
|
97
|
+
source = "sharp";
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
if (!dimensions) {
|
|
102
|
+
throw new Error("Could not determine input image dimensions for mask synthesis. Use a PNG input, enable Sharp, or pass maskSize explicitly.");
|
|
103
|
+
}
|
|
104
|
+
const maskBuf = encodeMaskPng(dimensions, region);
|
|
105
|
+
const dir = painterOutputDir();
|
|
106
|
+
const maskPath = join(dir, `mask-${Date.now()}-${randomBytes(4).toString("hex")}.png`);
|
|
107
|
+
writeTextFileAtomic(maskPath, maskBuf.toString("latin1"), {
|
|
108
|
+
encoding: "latin1",
|
|
109
|
+
});
|
|
110
|
+
return { maskPath, dimensions, source };
|
|
111
|
+
}
|
|
112
|
+
const painterSchema = Type.Object({
|
|
113
|
+
mode: Type.Union([Type.Literal("generate"), Type.Literal("edit")], {
|
|
114
|
+
description: "generate = create a new image from a text prompt. edit = modify one or more existing images using a prompt (and optional mask).",
|
|
115
|
+
}),
|
|
116
|
+
prompt: Type.String({
|
|
117
|
+
description: "The image prompt. For edit mode, describe the desired change. Be concrete about subject, style, composition, and any text to render.",
|
|
118
|
+
}),
|
|
119
|
+
images: Type.Optional(Type.Array(Type.String(), {
|
|
120
|
+
description: "Edit mode only. 1-3 absolute or workspace-relative paths to input images to edit.",
|
|
121
|
+
})),
|
|
122
|
+
mask: Type.Optional(Type.String({
|
|
123
|
+
description: "Edit mode only. Path to a mask image; transparent regions mark areas the model may change. Omit to edit the whole image. Mutually exclusive with maskRegion (which synthesizes the mask for you).",
|
|
124
|
+
})),
|
|
125
|
+
maskRegion: Type.Optional(Type.Object({
|
|
126
|
+
x: Type.Number({ description: "Region left edge, in pixels." }),
|
|
127
|
+
y: Type.Number({ description: "Region top edge, in pixels." }),
|
|
128
|
+
width: Type.Number({ description: "Region width, in pixels." }),
|
|
129
|
+
height: Type.Number({ description: "Region height, in pixels." }),
|
|
130
|
+
}, {
|
|
131
|
+
description: "Edit mode only. A pixel bounding box; the mask is synthesized automatically (transparent = editable). Coordinates outside the image are clipped.",
|
|
132
|
+
})),
|
|
133
|
+
maskSize: Type.Optional(Type.Object({
|
|
134
|
+
width: Type.Integer({ minimum: 1 }),
|
|
135
|
+
height: Type.Integer({ minimum: 1 }),
|
|
136
|
+
}, {
|
|
137
|
+
description: "Explicit input image dimensions, used only for mask synthesis when the input is not a PNG and Sharp is unavailable. Optional.",
|
|
138
|
+
})),
|
|
139
|
+
size: Type.Optional(Type.String({
|
|
140
|
+
description: "Output size. Standard: 1024x1024, 1536x1024, 1024x1536, 1792x1024, 1024x1792, or auto. gpt-image-2 also accepts arbitrary WxH divisible by 16 with aspect ratio 1:3 to 3:1.",
|
|
141
|
+
})),
|
|
142
|
+
quality: Type.Optional(Type.Union([
|
|
143
|
+
Type.Literal("low"),
|
|
144
|
+
Type.Literal("medium"),
|
|
145
|
+
Type.Literal("high"),
|
|
146
|
+
Type.Literal("auto"),
|
|
147
|
+
], {
|
|
148
|
+
description: "Output quality. Higher quality is slower and more expensive. Defaults to auto.",
|
|
149
|
+
})),
|
|
150
|
+
n: Type.Optional(Type.Integer({
|
|
151
|
+
description: "Number of images to produce (1-4). Defaults to 1.",
|
|
152
|
+
minimum: 1,
|
|
153
|
+
maximum: 4,
|
|
154
|
+
})),
|
|
155
|
+
});
|
|
156
|
+
export const painterTool = createTool({
|
|
157
|
+
name: "painter",
|
|
158
|
+
description: "Generate or edit images via an image model (default gpt-image-2). Use for UI mockups, app icons, illustrations, and editing existing images (e.g. redacting a screenshot). Outputs are persisted to disk and returned as absolute paths; reference them by path in later turns. Requires OPENAI_API_KEY.",
|
|
159
|
+
schema: painterSchema,
|
|
160
|
+
maxRetries: 1,
|
|
161
|
+
retryDelayMs: 2000,
|
|
162
|
+
shouldRetry: isTransientImageError,
|
|
163
|
+
getToolUseSummary: (params) => `painter ${params.mode}`,
|
|
164
|
+
getActivityDescription: (params) => params.mode === "edit" ? "Editing image" : "Generating image",
|
|
165
|
+
async run(params, { respond, signal }) {
|
|
166
|
+
const providerName = resolvePainterProvider();
|
|
167
|
+
const apiKeyEnv = providerName === "flux" ? "FAL_KEY" : "OPENAI_API_KEY";
|
|
168
|
+
const apiKey = process.env[apiKeyEnv];
|
|
169
|
+
if (!apiKey) {
|
|
170
|
+
throw new Error(`Painter provider "${providerName}" requires ${apiKeyEnv} to be set in the environment where the agent runs.`);
|
|
171
|
+
}
|
|
172
|
+
if (params.mode === "edit" &&
|
|
173
|
+
(!params.images || params.images.length === 0)) {
|
|
174
|
+
throw new Error("Painter edit mode requires at least one input image path (the `images` parameter).");
|
|
175
|
+
}
|
|
176
|
+
const budget = getPainterBudget().checkAndReserve({
|
|
177
|
+
model: resolvePainterModel(),
|
|
178
|
+
size: params.size,
|
|
179
|
+
quality: params.quality,
|
|
180
|
+
n: params.n,
|
|
181
|
+
});
|
|
182
|
+
if (!budget.ok) {
|
|
183
|
+
throw new Error(budget.reason ?? "painter cost ceiling exceeded");
|
|
184
|
+
}
|
|
185
|
+
if (budget.enforced) {
|
|
186
|
+
logger.info("painter budget", {
|
|
187
|
+
estimated: budget.estimatedCents,
|
|
188
|
+
cumulative: budget.cumulativeCents,
|
|
189
|
+
ceiling: budget.ceilingCents,
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
const provider = createImageProvider({
|
|
193
|
+
provider: providerName,
|
|
194
|
+
apiKey,
|
|
195
|
+
baseURL: process.env.MAESTRO_PAINTER_BASE_URL?.trim() || undefined,
|
|
196
|
+
model: resolvePainterModel(),
|
|
197
|
+
writeImage: persistImage,
|
|
198
|
+
});
|
|
199
|
+
if (!provider.supports[params.mode]) {
|
|
200
|
+
throw new Error(params.mode === "edit"
|
|
201
|
+
? `Painter provider "${provider.id}" does not support editing. Use the OpenAI provider (MAESTRO_PAINTER_PROVIDER=openai) for edits.`
|
|
202
|
+
: `Painter provider "${provider.id}" does not support generation.`);
|
|
203
|
+
}
|
|
204
|
+
// Combine the tool's abort signal with a hard timeout, without relying
|
|
205
|
+
// on AbortSignal.any so this works on any lib target.
|
|
206
|
+
const timeoutCtl = new AbortController();
|
|
207
|
+
const onCallerAbort = () => timeoutCtl.abort();
|
|
208
|
+
if (signal) {
|
|
209
|
+
if (signal.aborted) {
|
|
210
|
+
timeoutCtl.abort();
|
|
211
|
+
}
|
|
212
|
+
else {
|
|
213
|
+
signal.addEventListener("abort", onCallerAbort, { once: true });
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
const timer = setTimeout(() => timeoutCtl.abort(), painterTimeoutMs());
|
|
217
|
+
let synthesizedMask = null;
|
|
218
|
+
try {
|
|
219
|
+
const shared = {
|
|
220
|
+
prompt: params.prompt,
|
|
221
|
+
size: params.size,
|
|
222
|
+
quality: params.quality,
|
|
223
|
+
n: params.n,
|
|
224
|
+
signal: timeoutCtl.signal,
|
|
225
|
+
};
|
|
226
|
+
let maskPath = params.mask;
|
|
227
|
+
if (params.mode === "edit" && params.maskRegion) {
|
|
228
|
+
const built = await buildMaskPath(params.images ?? [], params.maskRegion, params.maskSize);
|
|
229
|
+
maskPath = built.maskPath;
|
|
230
|
+
synthesizedMask = built.maskPath;
|
|
231
|
+
logger.info("synthesized edit mask", {
|
|
232
|
+
source: built.source,
|
|
233
|
+
...built.dimensions,
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
const result = params.mode === "edit"
|
|
237
|
+
? await provider.edit({
|
|
238
|
+
...shared,
|
|
239
|
+
images: params.images ?? [],
|
|
240
|
+
maskPath,
|
|
241
|
+
})
|
|
242
|
+
: await provider.generate(shared);
|
|
243
|
+
const lines = result.images.map((img, i) => ` ${i + 1}. ${img.path}${img.revisedPrompt ? `\n revised prompt: ${img.revisedPrompt}` : ""}`);
|
|
244
|
+
logger.info("painter produced images", {
|
|
245
|
+
mode: params.mode,
|
|
246
|
+
model: result.model,
|
|
247
|
+
count: result.images.length,
|
|
248
|
+
});
|
|
249
|
+
return respond
|
|
250
|
+
.text([
|
|
251
|
+
`Painter (${result.provider}/${result.model}) produced ${result.images.length} image(s):`,
|
|
252
|
+
...lines,
|
|
253
|
+
"Outputs are on disk. Reference them by the absolute paths above.",
|
|
254
|
+
].join("\n"))
|
|
255
|
+
.detail({
|
|
256
|
+
provider: result.provider,
|
|
257
|
+
model: result.model,
|
|
258
|
+
mode: params.mode,
|
|
259
|
+
paths: result.images.map((i) => i.path),
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
catch (err) {
|
|
263
|
+
// The provider did not produce images (transient retry exhausted,
|
|
264
|
+
// timeout, content-policy, mask failure, unsupported mode). Release
|
|
265
|
+
// the reserved estimate so failed calls don't permanently consume
|
|
266
|
+
// the spend ceiling — the provider did not charge for these.
|
|
267
|
+
if (budget.enforced && budget.estimatedCents) {
|
|
268
|
+
getPainterBudget().release(budget.estimatedCents);
|
|
269
|
+
}
|
|
270
|
+
throw err;
|
|
271
|
+
}
|
|
272
|
+
finally {
|
|
273
|
+
clearTimeout(timer);
|
|
274
|
+
signal?.removeEventListener("abort", onCallerAbort);
|
|
275
|
+
// Best-effort cleanup of the synthesized mask; user-supplied mask
|
|
276
|
+
// paths are left untouched.
|
|
277
|
+
if (synthesizedMask) {
|
|
278
|
+
await unlink(synthesizedMask).catch(() => { });
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
});
|
|
283
|
+
//# sourceMappingURL=painter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"painter.js","sourceRoot":"","sources":["../../src/tools/painter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAC3E,OAAO,EAGN,aAAa,EACb,iBAAiB,GACjB,MAAM,sCAAsC,CAAC;AAK9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,MAAM,GAAG,YAAY,CAAC,eAAe,CAAC,CAAC;AAE7C,MAAM,0BAA0B,GAAG,OAAO,C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ACzB,KAAK,EAAE,MAAM,CAAC,KAAK;gBACnB,IAAI,EAAE,MAAM,CAAC,IAAI;gBACjB,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;aACvC,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACd,kEAAkE;YAClE,oEAAoE;YACpE,kEAAkE;YAClE,6DAA6D;YAC7D,IAAI,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,cAAc,EAAE,CAAC;gBAC9C,gBAAgB,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;YACnD,CAAC;YACD,MAAM,GAAG,CAAC;QACX,CAAC;gBAAS,CAAC;YACV,YAAY,CAAC,KAAK,CAAC,CAAC;YACpB,MAAM,EAAE,mBAAmB,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;YACpD,kEAAkE;YAClE,4BAA4B;YAC5B,IAAI,eAAe,EAAE,CAAC;gBACrB,MAAM,MAAM,CAAC,eAAe,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;YAC/C,CAAC;QACF,CAAC;IACF,CAAC;CACD,CACD,CAAC","sourcesContent":["import { randomBytes } from \"node:crypto\";\nimport { readFile, unlink } from \"node:fs/promises\";\nimport { homedir } from \"node:os\";\nimport { join, resolve } from \"node:path\";\nimport { Type } from \"@sinclair/typebox\";\nimport { getPainterBudget } from \"../services/image-providers/cost.js\";\nimport { createImageProvider } from \"../services/image-providers/index.js\";\nimport {\n\ttype ImageDimensions,\n\ttype MaskRegion,\n\tencodeMaskPng,\n\treadPngDimensions,\n} from \"../services/image-providers/masks.js\";\nimport type {\n\tImageQuality,\n\tImageSize,\n} from \"../services/image-providers/types.js\";\nimport { writeTextFileAtomic } from \"../utils/fs.js\";\nimport { createLogger } from \"../utils/logger.js\";\nimport { getImageMetadata } from \"./image-processor.js\";\nimport { createTool } from \"./tool-dsl.js\";\n\nconst logger = createLogger(\"tools:painter\");\n\nconst DEFAULT_PAINTER_TIMEOUT_MS = 180_000;\nconst DEFAULT_MODEL = \"gpt-image-2\";\n\nexport function painterTimeoutMs(): number {\n\tconst raw = process.env.MAESTRO_PAINTER_TIMEOUT_MS;\n\tif (!raw) return DEFAULT_PAINTER_TIMEOUT_MS;\n\tconst parsed = Number.parseInt(raw, 10);\n\treturn Number.isFinite(parsed) && parsed > 0\n\t\t? parsed\n\t\t: DEFAULT_PAINTER_TIMEOUT_MS;\n}\n\nexport function painterOutputDir(): string {\n\tconst override = process.env.MAESTRO_PAINTER_OUTPUT_DIR?.trim();\n\tif (override) return resolve(override);\n\treturn join(homedir(), \".maestro\", \"assets\", \"painter\");\n}\n\nexport function resolvePainterModel(): string {\n\treturn process.env.MAESTRO_PAINTER_MODEL?.trim() || DEFAULT_MODEL;\n}\n\n/** Resolve the image provider. \"openai\" (default) or \"flux\" via fal.ai. */\nexport function resolvePainterProvider(): \"openai\" | \"flux\" {\n\tconst raw = process.env.MAESTRO_PAINTER_PROVIDER?.trim().toLowerCase();\n\treturn raw === \"flux\" ? \"flux\" : \"openai\";\n}\n\nexport async function persistImage(\n\tbytes: Buffer,\n\text: string,\n): Promise<{ path: string }> {\n\tconst dir = painterOutputDir();\n\tconst name = `painter-${Date.now()}-${randomBytes(4).toString(\"hex\")}.${ext}`;\n\tconst path = join(dir, name);\n\twriteTextFileAtomic(path, bytes.toString(\"latin1\"), { encoding: \"latin1\" });\n\treturn { path };\n}\n\n/** Errno-style codes that indicate a transient network fault worth retrying. */\nconst TRANSIENT_ERRNO_CODES = new Set([\n\t\"ETIMEDOUT\",\n\t\"ECONNRESET\",\n\t\"ENOTFOUND\",\n\t\"ECONNREFUSED\",\n\t\"EAI_AGAIN\",\n\t\"EPIPE\",\n\t\"EHOSTUNREACH\",\n\t\"ENETUNREACH\",\n]);\n\n/**\n * Classify whether an image-API failure is worth one retry. Image generation\n * is expensive, so we retry only on clearly transient network/rate-limit\n * faults and never on validation or content-policy rejections.\n */\nexport function isTransientImageError(err: unknown): boolean {\n\tconst code = (err as { code?: unknown })?.code;\n\tif (\n\t\ttypeof code === \"string\" &&\n\t\tTRANSIENT_ERRNO_CODES.has(code.toUpperCase())\n\t) {\n\t\treturn true;\n\t}\n\tconst msg = err instanceof Error ? err.message : String(err);\n\treturn /rate limit|too many requests|timeout|timed out|econnreset|enotfound|etimedout|econnrefused|service unavailable|bad gateway|5\\d{2}/i.test(\n\t\tmsg,\n\t);\n}\n\nexport type MaskDimensionSource = \"png-header\" | \"sharp\" | \"explicit\";\n\n/**\n * Resolve a pixel bounding box into a mask file path, writing the synthesized\n * mask into the painter output directory. Dimensions come from (in order):\n * the PNG header (no deps), the optional `sharp` package, or an explicit\n * caller-supplied size. Returns the temp mask path plus how dims were found.\n */\nexport async function buildMaskPath(\n\timages: string[],\n\tregion: MaskRegion,\n\texplicitSize?: ImageDimensions,\n): Promise<{\n\tmaskPath: string;\n\tdimensions: ImageDimensions;\n\tsource: MaskDimensionSource;\n}> {\n\tif (images.length === 0) {\n\t\tthrow new Error(\"mask synthesis requires at least one input image path.\");\n\t}\n\tconst inputPath = images[0];\n\tif (!inputPath) {\n\t\tthrow new Error(\"mask synthesis received an undefined input image path.\");\n\t}\n\tconst buf = await readFile(inputPath);\n\n\tlet dimensions: ImageDimensions | null = readPngDimensions(buf);\n\tlet source: MaskDimensionSource = \"png-header\";\n\n\tif (!dimensions) {\n\t\tif (explicitSize) {\n\t\t\tdimensions = explicitSize;\n\t\t\tsource = \"explicit\";\n\t\t} else {\n\t\t\tconst meta = await getImageMetadata(buf);\n\t\t\tif (meta?.width && meta.height) {\n\t\t\t\tdimensions = { width: meta.width, height: meta.height };\n\t\t\t\tsource = \"sharp\";\n\t\t\t}\n\t\t}\n\t}\n\n\tif (!dimensions) {\n\t\tthrow new Error(\n\t\t\t\"Could not determine input image dimensions for mask synthesis. Use a PNG input, enable Sharp, or pass maskSize explicitly.\",\n\t\t);\n\t}\n\n\tconst maskBuf = encodeMaskPng(dimensions, region);\n\tconst dir = painterOutputDir();\n\tconst maskPath = join(\n\t\tdir,\n\t\t`mask-${Date.now()}-${randomBytes(4).toString(\"hex\")}.png`,\n\t);\n\twriteTextFileAtomic(maskPath, maskBuf.toString(\"latin1\"), {\n\t\tencoding: \"latin1\",\n\t});\n\treturn { maskPath, dimensions, source };\n}\n\nconst painterSchema = Type.Object({\n\tmode: Type.Union([Type.Literal(\"generate\"), Type.Literal(\"edit\")], {\n\t\tdescription:\n\t\t\t\"generate = create a new image from a text prompt. edit = modify one or more existing images using a prompt (and optional mask).\",\n\t}),\n\tprompt: Type.String({\n\t\tdescription:\n\t\t\t\"The image prompt. For edit mode, describe the desired change. Be concrete about subject, style, composition, and any text to render.\",\n\t}),\n\timages: Type.Optional(\n\t\tType.Array(Type.String(), {\n\t\t\tdescription:\n\t\t\t\t\"Edit mode only. 1-3 absolute or workspace-relative paths to input images to edit.\",\n\t\t}),\n\t),\n\tmask: Type.Optional(\n\t\tType.String({\n\t\t\tdescription:\n\t\t\t\t\"Edit mode only. Path to a mask image; transparent regions mark areas the model may change. Omit to edit the whole image. Mutually exclusive with maskRegion (which synthesizes the mask for you).\",\n\t\t}),\n\t),\n\tmaskRegion: Type.Optional(\n\t\tType.Object(\n\t\t\t{\n\t\t\t\tx: Type.Number({ description: \"Region left edge, in pixels.\" }),\n\t\t\t\ty: Type.Number({ description: \"Region top edge, in pixels.\" }),\n\t\t\t\twidth: Type.Number({ description: \"Region width, in pixels.\" }),\n\t\t\t\theight: Type.Number({ description: \"Region height, in pixels.\" }),\n\t\t\t},\n\t\t\t{\n\t\t\t\tdescription:\n\t\t\t\t\t\"Edit mode only. A pixel bounding box; the mask is synthesized automatically (transparent = editable). Coordinates outside the image are clipped.\",\n\t\t\t},\n\t\t),\n\t),\n\tmaskSize: Type.Optional(\n\t\tType.Object(\n\t\t\t{\n\t\t\t\twidth: Type.Integer({ minimum: 1 }),\n\t\t\t\theight: Type.Integer({ minimum: 1 }),\n\t\t\t},\n\t\t\t{\n\t\t\t\tdescription:\n\t\t\t\t\t\"Explicit input image dimensions, used only for mask synthesis when the input is not a PNG and Sharp is unavailable. Optional.\",\n\t\t\t},\n\t\t),\n\t),\n\tsize: Type.Optional(\n\t\tType.String({\n\t\t\tdescription:\n\t\t\t\t\"Output size. Standard: 1024x1024, 1536x1024, 1024x1536, 1792x1024, 1024x1792, or auto. gpt-image-2 also accepts arbitrary WxH divisible by 16 with aspect ratio 1:3 to 3:1.\",\n\t\t}),\n\t),\n\tquality: Type.Optional(\n\t\tType.Union(\n\t\t\t[\n\t\t\t\tType.Literal(\"low\"),\n\t\t\t\tType.Literal(\"medium\"),\n\t\t\t\tType.Literal(\"high\"),\n\t\t\t\tType.Literal(\"auto\"),\n\t\t\t],\n\t\t\t{\n\t\t\t\tdescription:\n\t\t\t\t\t\"Output quality. Higher quality is slower and more expensive. Defaults to auto.\",\n\t\t\t},\n\t\t),\n\t),\n\tn: Type.Optional(\n\t\tType.Integer({\n\t\t\tdescription: \"Number of images to produce (1-4). Defaults to 1.\",\n\t\t\tminimum: 1,\n\t\t\tmaximum: 4,\n\t\t}),\n\t),\n});\n\nexport interface PainterToolDetails {\n\tprovider: string;\n\tmodel: string;\n\tmode: \"generate\" | \"edit\";\n\tpaths: string[];\n}\n\nexport const painterTool = createTool<typeof painterSchema, PainterToolDetails>(\n\t{\n\t\tname: \"painter\",\n\t\tdescription:\n\t\t\t\"Generate or edit images via an image model (default gpt-image-2). Use for UI mockups, app icons, illustrations, and editing existing images (e.g. redacting a screenshot). Outputs are persisted to disk and returned as absolute paths; reference them by path in later turns. Requires OPENAI_API_KEY.\",\n\t\tschema: painterSchema,\n\t\tmaxRetries: 1,\n\t\tretryDelayMs: 2000,\n\t\tshouldRetry: isTransientImageError,\n\t\tgetToolUseSummary: (params) => `painter ${params.mode}`,\n\t\tgetActivityDescription: (params) =>\n\t\t\tparams.mode === \"edit\" ? \"Editing image\" : \"Generating image\",\n\t\tasync run(params, { respond, signal }) {\n\t\t\tconst providerName = resolvePainterProvider();\n\t\t\tconst apiKeyEnv = providerName === \"flux\" ? \"FAL_KEY\" : \"OPENAI_API_KEY\";\n\t\t\tconst apiKey = process.env[apiKeyEnv];\n\t\t\tif (!apiKey) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Painter provider \"${providerName}\" requires ${apiKeyEnv} to be set in the environment where the agent runs.`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tparams.mode === \"edit\" &&\n\t\t\t\t(!params.images || params.images.length === 0)\n\t\t\t) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t\"Painter edit mode requires at least one input image path (the `images` parameter).\",\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst budget = getPainterBudget().checkAndReserve({\n\t\t\t\tmodel: resolvePainterModel(),\n\t\t\t\tsize: params.size,\n\t\t\t\tquality: params.quality,\n\t\t\t\tn: params.n,\n\t\t\t});\n\t\t\tif (!budget.ok) {\n\t\t\t\tthrow new Error(budget.reason ?? \"painter cost ceiling exceeded\");\n\t\t\t}\n\t\t\tif (budget.enforced) {\n\t\t\t\tlogger.info(\"painter budget\", {\n\t\t\t\t\testimated: budget.estimatedCents,\n\t\t\t\t\tcumulative: budget.cumulativeCents,\n\t\t\t\t\tceiling: budget.ceilingCents,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tconst provider = createImageProvider({\n\t\t\t\tprovider: providerName,\n\t\t\t\tapiKey,\n\t\t\t\tbaseURL: process.env.MAESTRO_PAINTER_BASE_URL?.trim() || undefined,\n\t\t\t\tmodel: resolvePainterModel(),\n\t\t\t\twriteImage: persistImage,\n\t\t\t});\n\n\t\t\tif (!provider.supports[params.mode]) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\tparams.mode === \"edit\"\n\t\t\t\t\t\t? `Painter provider \"${provider.id}\" does not support editing. Use the OpenAI provider (MAESTRO_PAINTER_PROVIDER=openai) for edits.`\n\t\t\t\t\t\t: `Painter provider \"${provider.id}\" does not support generation.`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Combine the tool's abort signal with a hard timeout, without relying\n\t\t\t// on AbortSignal.any so this works on any lib target.\n\t\t\tconst timeoutCtl = new AbortController();\n\t\t\tconst onCallerAbort = () => timeoutCtl.abort();\n\t\t\tif (signal) {\n\t\t\t\tif (signal.aborted) {\n\t\t\t\t\ttimeoutCtl.abort();\n\t\t\t\t} else {\n\t\t\t\t\tsignal.addEventListener(\"abort\", onCallerAbort, { once: true });\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst timer = setTimeout(() => timeoutCtl.abort(), painterTimeoutMs());\n\n\t\t\tlet synthesizedMask: string | null = null;\n\t\t\ttry {\n\t\t\t\tconst shared = {\n\t\t\t\t\tprompt: params.prompt,\n\t\t\t\t\tsize: params.size as ImageSize | undefined,\n\t\t\t\t\tquality: params.quality as ImageQuality | undefined,\n\t\t\t\t\tn: params.n,\n\t\t\t\t\tsignal: timeoutCtl.signal,\n\t\t\t\t};\n\n\t\t\t\tlet maskPath = params.mask;\n\t\t\t\tif (params.mode === \"edit\" && params.maskRegion) {\n\t\t\t\t\tconst built = await buildMaskPath(\n\t\t\t\t\t\tparams.images ?? [],\n\t\t\t\t\t\tparams.maskRegion,\n\t\t\t\t\t\tparams.maskSize,\n\t\t\t\t\t);\n\t\t\t\t\tmaskPath = built.maskPath;\n\t\t\t\t\tsynthesizedMask = built.maskPath;\n\t\t\t\t\tlogger.info(\"synthesized edit mask\", {\n\t\t\t\t\t\tsource: built.source,\n\t\t\t\t\t\t...built.dimensions,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tconst result =\n\t\t\t\t\tparams.mode === \"edit\"\n\t\t\t\t\t\t? await provider.edit({\n\t\t\t\t\t\t\t\t...shared,\n\t\t\t\t\t\t\t\timages: params.images ?? [],\n\t\t\t\t\t\t\t\tmaskPath,\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t: await provider.generate(shared);\n\n\t\t\t\tconst lines = result.images.map(\n\t\t\t\t\t(img, i) =>\n\t\t\t\t\t\t` ${i + 1}. ${img.path}${img.revisedPrompt ? `\\n revised prompt: ${img.revisedPrompt}` : \"\"}`,\n\t\t\t\t);\n\n\t\t\t\tlogger.info(\"painter produced images\", {\n\t\t\t\t\tmode: params.mode,\n\t\t\t\t\tmodel: result.model,\n\t\t\t\t\tcount: result.images.length,\n\t\t\t\t});\n\n\t\t\t\treturn respond\n\t\t\t\t\t.text(\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t`Painter (${result.provider}/${result.model}) produced ${result.images.length} image(s):`,\n\t\t\t\t\t\t\t...lines,\n\t\t\t\t\t\t\t\"Outputs are on disk. Reference them by the absolute paths above.\",\n\t\t\t\t\t\t].join(\"\\n\"),\n\t\t\t\t\t)\n\t\t\t\t\t.detail({\n\t\t\t\t\t\tprovider: result.provider,\n\t\t\t\t\t\tmodel: result.model,\n\t\t\t\t\t\tmode: params.mode,\n\t\t\t\t\t\tpaths: result.images.map((i) => i.path),\n\t\t\t\t\t});\n\t\t\t} catch (err) {\n\t\t\t\t// The provider did not produce images (transient retry exhausted,\n\t\t\t\t// timeout, content-policy, mask failure, unsupported mode). Release\n\t\t\t\t// the reserved estimate so failed calls don't permanently consume\n\t\t\t\t// the spend ceiling — the provider did not charge for these.\n\t\t\t\tif (budget.enforced && budget.estimatedCents) {\n\t\t\t\t\tgetPainterBudget().release(budget.estimatedCents);\n\t\t\t\t}\n\t\t\t\tthrow err;\n\t\t\t} finally {\n\t\t\t\tclearTimeout(timer);\n\t\t\t\tsignal?.removeEventListener(\"abort\", onCallerAbort);\n\t\t\t\t// Best-effort cleanup of the synthesized mask; user-supplied mask\n\t\t\t\t// paths are left untouched.\n\t\t\t\tif (synthesizedMask) {\n\t\t\t\t\tawait unlink(synthesizedMask).catch(() => {});\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t},\n);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typebox-tool.d.ts","sourceRoot":"","sources":["../../src/tools/typebox-tool.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"typebox-tool.d.ts","sourceRoot":"","sources":["../../src/tools/typebox-tool.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAGzD,OAAO,KAAK,EACX,SAAS,EACT,eAAe,EACf,eAAe,EACf,MAAM,mBAAmB,CAAC;AAI3B,KAAK,aAAa,CAAC,OAAO,IACvB,eAAe,CAAC,OAAO,CAAC,GACxB,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC;AAErC,UAAU,wBAAwB,CAAC,MAAM,SAAS,OAAO,EAAE,OAAO;IACjE,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,OAAO,EAAE,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC;IAC1C,OAAO,EAAE,CACR,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,EACtB,MAAM,CAAC,EAAE,WAAW,KAChB,aAAa,CAAC,OAAO,CAAC,CAAC;CAC5B;AAED,wBAAgB,iBAAiB,CAAC,MAAM,SAAS,OAAO,EAAE,OAAO,GAAG,SAAS,EAC5E,OAAO,EAAE,wBAAwB,CAAC,MAAM,EAAE,OAAO,CAAC,GAChD,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,CAyG5B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { performance } from "node:perf_hooks";
|
|
2
|
-
import { getSkillArtifactMetadataFromDetails } from "../
|
|
2
|
+
import { getSkillArtifactMetadataFromDetails } from "../agent/skill-artifact-metadata.js";
|
|
3
3
|
import { logToolFailure, recordToolExecution } from "../telemetry.js";
|
|
4
4
|
import { compileTypeboxSchema } from "../utils/typebox-ajv.js";
|
|
5
5
|
export function createTypeboxTool(options) {
|