@elie-laloum/outpost 10.0.1 → 11.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +67 -1
- package/README.md +13 -9
- package/SECURITY.md +38 -4
- package/dist/adapters/agents/antigravity/antigravity-adapter.js +2 -0
- package/dist/adapters/agents/antigravity/antigravity-adapter.js.map +1 -1
- package/dist/adapters/agents/antigravity/antigravity-request.js +4 -4
- package/dist/adapters/agents/antigravity/antigravity-request.js.map +1 -1
- package/dist/adapters/agents/antigravity/antigravity.types.d.ts +2 -0
- package/dist/adapters/agents/antigravity/antigravity.types.js.map +1 -1
- package/dist/adapters/agents/claude/claude-adapter.js +3 -0
- package/dist/adapters/agents/claude/claude-adapter.js.map +1 -1
- package/dist/adapters/agents/claude/claude-profile.constants.d.ts +6 -0
- package/dist/adapters/agents/claude/claude-profile.constants.js +25 -0
- package/dist/adapters/agents/claude/claude-profile.constants.js.map +1 -0
- package/dist/adapters/agents/claude/claude-profile.d.ts +3 -0
- package/dist/adapters/agents/claude/claude-profile.js +69 -0
- package/dist/adapters/agents/claude/claude-profile.js.map +1 -0
- package/dist/adapters/agents/claude/claude-request.js +9 -3
- package/dist/adapters/agents/claude/claude-request.js.map +1 -1
- package/dist/adapters/agents/codex/codex-adapter.js +2 -0
- package/dist/adapters/agents/codex/codex-adapter.js.map +1 -1
- package/dist/adapters/agents/codex/codex-app-session.js +3 -0
- package/dist/adapters/agents/codex/codex-app-session.js.map +1 -1
- package/dist/adapters/agents/codex/codex-profile.d.ts +2 -0
- package/dist/adapters/agents/codex/codex-profile.js +9 -0
- package/dist/adapters/agents/codex/codex-profile.js.map +1 -0
- package/dist/adapters/agents/codex/codex-request.js +5 -1
- package/dist/adapters/agents/codex/codex-request.js.map +1 -1
- package/dist/adapters/agents/copilot/copilot-adapter.js +2 -0
- package/dist/adapters/agents/copilot/copilot-adapter.js.map +1 -1
- package/dist/adapters/agents/copilot/copilot-request.js +4 -2
- package/dist/adapters/agents/copilot/copilot-request.js.map +1 -1
- package/dist/adapters/agents/copilot/copilot.types.d.ts +2 -0
- package/dist/adapters/agents/copilot/copilot.types.js.map +1 -1
- package/dist/adapters/agents/kimi/kimi-adapter.js +3 -0
- package/dist/adapters/agents/kimi/kimi-adapter.js.map +1 -1
- package/dist/adapters/agents/kimi/kimi-request.js +4 -2
- package/dist/adapters/agents/kimi/kimi-request.js.map +1 -1
- package/dist/adapters/agents/kimi/kimi.types.d.ts +2 -0
- package/dist/adapters/agents/kimi/kimi.types.js.map +1 -1
- package/dist/adapters/agents/model-support.js +5 -3
- package/dist/adapters/agents/model-support.js.map +1 -1
- package/dist/adapters/agents/profile-support.d.ts +3 -0
- package/dist/adapters/agents/profile-support.js +10 -0
- package/dist/adapters/agents/profile-support.js.map +1 -0
- package/dist/adapters/agents/settings.types.d.ts +3 -0
- package/dist/adapters/agents/settings.types.js.map +1 -1
- package/dist/adapters/models/model-prices.constants.d.ts +10 -0
- package/dist/adapters/models/model-prices.constants.js +11 -0
- package/dist/adapters/models/model-prices.constants.js.map +1 -0
- package/dist/adapters/models/model-prices.d.ts +3 -0
- package/dist/adapters/models/model-prices.js +105 -0
- package/dist/adapters/models/model-prices.js.map +1 -0
- package/dist/adapters/models/model-prices.types.d.ts +11 -0
- package/dist/adapters/models/model-prices.types.js +2 -0
- package/dist/adapters/models/model-prices.types.js.map +1 -0
- package/dist/adapters/secrets/aws.d.ts +4 -0
- package/dist/adapters/secrets/aws.js +43 -0
- package/dist/adapters/secrets/aws.js.map +1 -0
- package/dist/adapters/secrets/aws.types.d.ts +11 -0
- package/dist/adapters/secrets/aws.types.js +2 -0
- package/dist/adapters/secrets/aws.types.js.map +1 -0
- package/dist/adapters/secrets/azure.d.ts +4 -0
- package/dist/adapters/secrets/azure.js +23 -0
- package/dist/adapters/secrets/azure.js.map +1 -0
- package/dist/adapters/secrets/azure.types.d.ts +9 -0
- package/dist/adapters/secrets/azure.types.js +2 -0
- package/dist/adapters/secrets/azure.types.js.map +1 -0
- package/dist/adapters/secrets/gcp.d.ts +4 -0
- package/dist/adapters/secrets/gcp.js +28 -0
- package/dist/adapters/secrets/gcp.js.map +1 -0
- package/dist/adapters/secrets/gcp.types.d.ts +5 -0
- package/dist/adapters/secrets/gcp.types.js +2 -0
- package/dist/adapters/secrets/gcp.types.js.map +1 -0
- package/dist/adapters/secrets/infisical.d.ts +4 -0
- package/dist/adapters/secrets/infisical.js +40 -0
- package/dist/adapters/secrets/infisical.js.map +1 -0
- package/dist/adapters/secrets/infisical.types.d.ts +11 -0
- package/dist/adapters/secrets/infisical.types.js +2 -0
- package/dist/adapters/secrets/infisical.types.js.map +1 -0
- package/dist/adapters/secrets/onepassword.d.ts +4 -0
- package/dist/adapters/secrets/onepassword.js +12 -0
- package/dist/adapters/secrets/onepassword.js.map +1 -0
- package/dist/adapters/secrets/onepassword.types.d.ts +7 -0
- package/dist/adapters/secrets/onepassword.types.js +2 -0
- package/dist/adapters/secrets/onepassword.types.js.map +1 -0
- package/dist/adapters/secrets/secret-source.d.ts +4 -0
- package/dist/adapters/secrets/secret-source.js +29 -0
- package/dist/adapters/secrets/secret-source.js.map +1 -0
- package/dist/adapters/secrets/secret-source.types.d.ts +2 -0
- package/dist/adapters/secrets/secret-source.types.js +2 -0
- package/dist/adapters/secrets/secret-source.types.js.map +1 -0
- package/dist/adapters/secrets/vault-response.d.ts +1 -0
- package/dist/adapters/secrets/vault-response.js +43 -0
- package/dist/adapters/secrets/vault-response.js.map +1 -0
- package/dist/adapters/secrets/vault.constants.d.ts +1 -0
- package/dist/adapters/secrets/vault.constants.js +2 -0
- package/dist/adapters/secrets/vault.constants.js.map +1 -0
- package/dist/adapters/secrets/vault.d.ts +4 -0
- package/dist/adapters/secrets/vault.js +63 -0
- package/dist/adapters/secrets/vault.js.map +1 -0
- package/dist/adapters/secrets/vault.types.d.ts +8 -0
- package/dist/adapters/secrets/vault.types.js +2 -0
- package/dist/adapters/secrets/vault.types.js.map +1 -0
- package/dist/adapters/testing/scripted-agent.d.ts +3 -0
- package/dist/adapters/testing/scripted-agent.js +77 -0
- package/dist/adapters/testing/scripted-agent.js.map +1 -0
- package/dist/adapters/testing/scripted-agent.types.d.ts +17 -0
- package/dist/adapters/testing/scripted-agent.types.js +2 -0
- package/dist/adapters/testing/scripted-agent.types.js.map +1 -0
- package/dist/adapters/tools/file-tools.d.ts +2 -1
- package/dist/adapters/tools/file-tools.js +37 -15
- package/dist/adapters/tools/file-tools.js.map +1 -1
- package/dist/adapters/tools/filesystem-selection.constants.d.ts +1 -0
- package/dist/adapters/tools/filesystem-selection.constants.js +7 -0
- package/dist/adapters/tools/filesystem-selection.constants.js.map +1 -0
- package/dist/adapters/tools/git-tools.js +1 -0
- package/dist/adapters/tools/git-tools.js.map +1 -1
- package/dist/adapters/tools/search-tools.d.ts +2 -1
- package/dist/adapters/tools/search-tools.js +52 -22
- package/dist/adapters/tools/search-tools.js.map +1 -1
- package/dist/adapters/tools/tools.types.d.ts +3 -0
- package/dist/adapters/tools/tools.types.js.map +1 -1
- package/dist/application/activity-watchdog.d.ts +2 -1
- package/dist/application/activity-watchdog.js +2 -1
- package/dist/application/activity-watchdog.js.map +1 -1
- package/dist/application/agent-conflict-resolver.d.ts +3 -0
- package/dist/application/agent-conflict-resolver.js +71 -0
- package/dist/application/agent-conflict-resolver.js.map +1 -0
- package/dist/application/agent-turn.js +17 -2
- package/dist/application/agent-turn.js.map +1 -1
- package/dist/application/attach.d.ts +4 -0
- package/dist/application/attach.js +20 -0
- package/dist/application/attach.js.map +1 -1
- package/dist/application/brief-renderer.d.ts +2 -3
- package/dist/application/brief-renderer.js +6 -4
- package/dist/application/brief-renderer.js.map +1 -1
- package/dist/application/conflict-merge.d.ts +5 -0
- package/dist/application/conflict-merge.js +31 -0
- package/dist/application/conflict-merge.js.map +1 -0
- package/dist/application/conflict-resolution.constants.d.ts +4 -0
- package/dist/application/conflict-resolution.constants.js +5 -0
- package/dist/application/conflict-resolution.constants.js.map +1 -0
- package/dist/application/conflict-resolution.types.d.ts +35 -0
- package/dist/application/conflict-resolution.types.js +2 -0
- package/dist/application/conflict-resolution.types.js.map +1 -0
- package/dist/application/conflict-verification.d.ts +4 -0
- package/dist/application/conflict-verification.js +45 -0
- package/dist/application/conflict-verification.js.map +1 -0
- package/dist/application/custom-turn.js +18 -6
- package/dist/application/custom-turn.js.map +1 -1
- package/dist/application/decision-task.js +4 -1
- package/dist/application/decision-task.js.map +1 -1
- package/dist/application/dispatch-observation.js +63 -5
- package/dist/application/dispatch-observation.js.map +1 -1
- package/dist/application/dispatch-observation.types.d.ts +3 -0
- package/dist/application/dispatch-observation.types.js.map +1 -1
- package/dist/application/dispatch-validation.js +13 -1
- package/dist/application/dispatch-validation.js.map +1 -1
- package/dist/application/dispatch.d.ts +4 -0
- package/dist/application/dispatch.js +23 -0
- package/dist/application/dispatch.js.map +1 -1
- package/dist/application/doctor-image.js +4 -2
- package/dist/application/doctor-image.js.map +1 -1
- package/dist/application/doctor-sandbox.js +3 -1
- package/dist/application/doctor-sandbox.js.map +1 -1
- package/dist/application/doctor-sandbox.types.d.ts +1 -0
- package/dist/application/doctor-sandbox.types.js.map +1 -1
- package/dist/application/doctor.js +16 -8
- package/dist/application/doctor.js.map +1 -1
- package/dist/application/doctor.types.d.ts +2 -0
- package/dist/application/doctor.types.js.map +1 -1
- package/dist/application/execution.d.ts +2 -3
- package/dist/application/execution.js +35 -4
- package/dist/application/execution.js.map +1 -1
- package/dist/application/execution.types.d.ts +15 -0
- package/dist/application/execution.types.js.map +1 -1
- package/dist/application/file-interactive-task.d.ts +3 -0
- package/dist/application/file-interactive-task.js +189 -0
- package/dist/application/file-interactive-task.js.map +1 -0
- package/dist/application/file-run-report.d.ts +6 -0
- package/dist/application/file-run-report.js +33 -0
- package/dist/application/file-run-report.js.map +1 -0
- package/dist/application/file-sandbox.d.ts +9 -0
- package/dist/application/file-sandbox.js +674 -0
- package/dist/application/file-sandbox.js.map +1 -0
- package/dist/application/file-sandbox.types.d.ts +62 -0
- package/dist/application/file-sandbox.types.js +2 -0
- package/dist/application/file-sandbox.types.js.map +1 -0
- package/dist/application/file-workspace-recovery.d.ts +5 -0
- package/dist/application/file-workspace-recovery.js +80 -0
- package/dist/application/file-workspace-recovery.js.map +1 -0
- package/dist/application/file-workspace-recovery.types.d.ts +18 -0
- package/dist/application/file-workspace-recovery.types.js +2 -0
- package/dist/application/file-workspace-recovery.types.js.map +1 -0
- package/dist/application/file-workspace-registry.d.ts +2 -0
- package/dist/application/file-workspace-registry.js +2 -0
- package/dist/application/file-workspace-registry.js.map +1 -0
- package/dist/application/file-workspace.d.ts +9 -0
- package/dist/application/file-workspace.js +583 -0
- package/dist/application/file-workspace.js.map +1 -0
- package/dist/application/file-workspace.types.d.ts +79 -0
- package/dist/application/file-workspace.types.js +2 -0
- package/dist/application/file-workspace.types.js.map +1 -0
- package/dist/application/harness-budget.js +2 -1
- package/dist/application/harness-budget.js.map +1 -1
- package/dist/application/harness-model-provider.js +18 -3
- package/dist/application/harness-model-provider.js.map +1 -1
- package/dist/application/harness-model-provider.types.d.ts +1 -0
- package/dist/application/harness-model-provider.types.js.map +1 -1
- package/dist/application/harness-routing.js +7 -1
- package/dist/application/harness-routing.js.map +1 -1
- package/dist/application/harness-subagent.js +10 -1
- package/dist/application/harness-subagent.js.map +1 -1
- package/dist/application/harness.types.d.ts +2 -1
- package/dist/application/harness.types.js.map +1 -1
- package/dist/application/interactive-task-execution.js +1 -0
- package/dist/application/interactive-task-execution.js.map +1 -1
- package/dist/application/interactive-task.d.ts +2 -1
- package/dist/application/interactive-task.js +3 -0
- package/dist/application/interactive-task.js.map +1 -1
- package/dist/application/interactive-task.types.d.ts +20 -0
- package/dist/application/interactive-task.types.js.map +1 -1
- package/dist/application/lifecycle-hooks.d.ts +4 -2
- package/dist/application/lifecycle-hooks.js +46 -12
- package/dist/application/lifecycle-hooks.js.map +1 -1
- package/dist/application/lifecycle.constants.d.ts +1 -1
- package/dist/application/lifecycle.constants.js +1 -0
- package/dist/application/lifecycle.constants.js.map +1 -1
- package/dist/application/outpost.types.d.ts +6 -0
- package/dist/application/outpost.types.js.map +1 -1
- package/dist/application/recipe-configuration-providers.d.ts +3 -0
- package/dist/application/recipe-configuration-providers.js +45 -0
- package/dist/application/recipe-configuration-providers.js.map +1 -0
- package/dist/application/recipe-configuration-values.d.ts +10 -0
- package/dist/application/recipe-configuration-values.js +96 -0
- package/dist/application/recipe-configuration-values.js.map +1 -0
- package/dist/application/recipe-configuration.constants.d.ts +7 -0
- package/dist/application/recipe-configuration.constants.js +16 -0
- package/dist/application/recipe-configuration.constants.js.map +1 -0
- package/dist/application/recipe-configuration.d.ts +2 -0
- package/dist/application/recipe-configuration.js +52 -0
- package/dist/application/recipe-configuration.js.map +1 -0
- package/dist/application/recipe-report.constants.d.ts +5 -0
- package/dist/application/recipe-report.constants.js +15 -0
- package/dist/application/recipe-report.constants.js.map +1 -0
- package/dist/application/recipe-report.d.ts +4 -0
- package/dist/application/recipe-report.js +69 -0
- package/dist/application/recipe-report.js.map +1 -0
- package/dist/application/recipe-report.types.d.ts +33 -0
- package/dist/application/recipe-report.types.js +2 -0
- package/dist/application/recipe-report.types.js.map +1 -0
- package/dist/application/recipe-run.d.ts +7 -0
- package/dist/application/recipe-run.js +86 -0
- package/dist/application/recipe-run.js.map +1 -0
- package/dist/application/recipe.d.ts +6 -0
- package/dist/application/recipe.js +86 -0
- package/dist/application/recipe.js.map +1 -0
- package/dist/application/recipe.types.d.ts +22 -0
- package/dist/application/recipe.types.js +2 -0
- package/dist/application/recipe.types.js.map +1 -0
- package/dist/application/recipes/advanced-components.d.ts +15 -0
- package/dist/application/recipes/advanced-components.js +35 -0
- package/dist/application/recipes/advanced-components.js.map +1 -0
- package/dist/application/recipes/advanced-components.types.d.ts +16 -0
- package/dist/application/recipes/advanced-components.types.js +2 -0
- package/dist/application/recipes/advanced-components.types.js.map +1 -0
- package/dist/application/recipes/agent-components.d.ts +5 -0
- package/dist/application/recipes/agent-components.js +22 -0
- package/dist/application/recipes/agent-components.js.map +1 -0
- package/dist/application/recipes/agent-components.types.d.ts +32 -0
- package/dist/application/recipes/agent-components.types.js +2 -0
- package/dist/application/recipes/agent-components.types.js.map +1 -0
- package/dist/application/recipes/agent-preflight.d.ts +3 -0
- package/dist/application/recipes/agent-preflight.js +15 -0
- package/dist/application/recipes/agent-preflight.js.map +1 -0
- package/dist/application/recipes/components.types.d.ts +50 -0
- package/dist/application/recipes/components.types.js +2 -0
- package/dist/application/recipes/components.types.js.map +1 -0
- package/dist/application/recipes/configuration.d.ts +4 -0
- package/dist/application/recipes/configuration.js +76 -0
- package/dist/application/recipes/configuration.js.map +1 -0
- package/dist/application/recipes/durable-resources.d.ts +5 -0
- package/dist/application/recipes/durable-resources.js +183 -0
- package/dist/application/recipes/durable-resources.js.map +1 -0
- package/dist/application/recipes/durable-resources.types.d.ts +17 -0
- package/dist/application/recipes/durable-resources.types.js +2 -0
- package/dist/application/recipes/durable-resources.types.js.map +1 -0
- package/dist/application/recipes/durable-run.d.ts +28 -0
- package/dist/application/recipes/durable-run.js +89 -0
- package/dist/application/recipes/durable-run.js.map +1 -0
- package/dist/application/recipes/durable-schema.constants.d.ts +557 -0
- package/dist/application/recipes/durable-schema.constants.js +138 -0
- package/dist/application/recipes/durable-schema.constants.js.map +1 -0
- package/dist/application/recipes/durable-session.d.ts +8 -0
- package/dist/application/recipes/durable-session.js +178 -0
- package/dist/application/recipes/durable-session.js.map +1 -0
- package/dist/application/recipes/durable.types.d.ts +49 -0
- package/dist/application/recipes/durable.types.js +2 -0
- package/dist/application/recipes/durable.types.js.map +1 -0
- package/dist/application/recipes/errors.d.ts +2 -0
- package/dist/application/recipes/errors.js +21 -0
- package/dist/application/recipes/errors.js.map +1 -0
- package/dist/application/recipes/file-configuration.d.ts +3 -0
- package/dist/application/recipes/file-configuration.js +195 -0
- package/dist/application/recipes/file-configuration.js.map +1 -0
- package/dist/application/recipes/file-configuration.types.d.ts +26 -0
- package/dist/application/recipes/file-configuration.types.js +2 -0
- package/dist/application/recipes/file-configuration.types.js.map +1 -0
- package/dist/application/recipes/file-publication-report.constants.d.ts +1 -0
- package/dist/application/recipes/file-publication-report.constants.js +2 -0
- package/dist/application/recipes/file-publication-report.constants.js.map +1 -0
- package/dist/application/recipes/file-publication-report.d.ts +3 -0
- package/dist/application/recipes/file-publication-report.js +110 -0
- package/dist/application/recipes/file-publication-report.js.map +1 -0
- package/dist/application/recipes/file-run.d.ts +6 -0
- package/dist/application/recipes/file-run.js +263 -0
- package/dist/application/recipes/file-run.js.map +1 -0
- package/dist/application/recipes/file-validation.d.ts +3 -0
- package/dist/application/recipes/file-validation.js +32 -0
- package/dist/application/recipes/file-validation.js.map +1 -0
- package/dist/application/recipes/graph.d.ts +4 -0
- package/dist/application/recipes/graph.js +208 -0
- package/dist/application/recipes/graph.js.map +1 -0
- package/dist/application/recipes/job.d.ts +3 -0
- package/dist/application/recipes/job.js +100 -0
- package/dist/application/recipes/job.js.map +1 -0
- package/dist/application/recipes/native-catalog.constants.d.ts +4 -0
- package/dist/application/recipes/native-catalog.constants.js +930 -0
- package/dist/application/recipes/native-catalog.constants.js.map +1 -0
- package/dist/application/recipes/native-factories.d.ts +1 -0
- package/dist/application/recipes/native-factories.js +136 -0
- package/dist/application/recipes/native-factories.js.map +1 -0
- package/dist/application/recipes/native-schemas.constants.d.ts +2 -0
- package/dist/application/recipes/native-schemas.constants.js +26619 -0
- package/dist/application/recipes/native-schemas.constants.js.map +1 -0
- package/dist/application/recipes/native.d.ts +7 -0
- package/dist/application/recipes/native.js +184 -0
- package/dist/application/recipes/native.js.map +1 -0
- package/dist/application/recipes/observation.d.ts +4 -0
- package/dist/application/recipes/observation.js +88 -0
- package/dist/application/recipes/observation.js.map +1 -0
- package/dist/application/recipes/project-expressions.d.ts +3 -0
- package/dist/application/recipes/project-expressions.js +28 -0
- package/dist/application/recipes/project-expressions.js.map +1 -0
- package/dist/application/recipes/project.d.ts +3 -0
- package/dist/application/recipes/project.js +165 -0
- package/dist/application/recipes/project.js.map +1 -0
- package/dist/application/recipes/project.types.d.ts +53 -0
- package/dist/application/recipes/project.types.js +2 -0
- package/dist/application/recipes/project.types.js.map +1 -0
- package/dist/application/recipes/projection.d.ts +2 -0
- package/dist/application/recipes/projection.js +9 -0
- package/dist/application/recipes/projection.js.map +1 -0
- package/dist/application/recipes/reports.d.ts +4 -0
- package/dist/application/recipes/reports.js +27 -0
- package/dist/application/recipes/reports.js.map +1 -0
- package/dist/application/recipes/runtime.d.ts +4 -0
- package/dist/application/recipes/runtime.js +179 -0
- package/dist/application/recipes/runtime.js.map +1 -0
- package/dist/application/recipes/sandbox.d.ts +6 -0
- package/dist/application/recipes/sandbox.js +31 -0
- package/dist/application/recipes/sandbox.js.map +1 -0
- package/dist/application/recipes/schemas.constants.d.ts +2 -0
- package/dist/application/recipes/schemas.constants.js +15 -0
- package/dist/application/recipes/schemas.constants.js.map +1 -0
- package/dist/application/recipes/scope.d.ts +3 -0
- package/dist/application/recipes/scope.js +180 -0
- package/dist/application/recipes/scope.js.map +1 -0
- package/dist/application/recipes/service-components.d.ts +10 -0
- package/dist/application/recipes/service-components.js +78 -0
- package/dist/application/recipes/service-components.js.map +1 -0
- package/dist/application/recipes/service-components.types.d.ts +57 -0
- package/dist/application/recipes/service-components.types.js +2 -0
- package/dist/application/recipes/service-components.types.js.map +1 -0
- package/dist/application/recipes/services.d.ts +4 -0
- package/dist/application/recipes/services.js +60 -0
- package/dist/application/recipes/services.js.map +1 -0
- package/dist/application/recipes/speculation-usage.d.ts +3 -0
- package/dist/application/recipes/speculation-usage.js +69 -0
- package/dist/application/recipes/speculation-usage.js.map +1 -0
- package/dist/application/recipes/speculation.d.ts +3 -0
- package/dist/application/recipes/speculation.js +55 -0
- package/dist/application/recipes/speculation.js.map +1 -0
- package/dist/application/recipes/status.d.ts +4 -0
- package/dist/application/recipes/status.js +72 -0
- package/dist/application/recipes/status.js.map +1 -0
- package/dist/application/recipes/storage-components.d.ts +2 -0
- package/dist/application/recipes/storage-components.js +10 -0
- package/dist/application/recipes/storage-components.js.map +1 -0
- package/dist/application/recipes/storage-components.types.d.ts +13 -0
- package/dist/application/recipes/storage-components.types.js +2 -0
- package/dist/application/recipes/storage-components.types.js.map +1 -0
- package/dist/application/recipes/variables.d.ts +2 -0
- package/dist/application/recipes/variables.js +31 -0
- package/dist/application/recipes/variables.js.map +1 -0
- package/dist/application/recipes/variables.types.d.ts +7 -0
- package/dist/application/recipes/variables.types.js +2 -0
- package/dist/application/recipes/variables.types.js.map +1 -0
- package/dist/application/recipes/workflow-components.d.ts +6 -0
- package/dist/application/recipes/workflow-components.js +106 -0
- package/dist/application/recipes/workflow-components.js.map +1 -0
- package/dist/application/recipes/workflow-components.types.d.ts +52 -0
- package/dist/application/recipes/workflow-components.types.js +2 -0
- package/dist/application/recipes/workflow-components.types.js.map +1 -0
- package/dist/application/recipes/workflow-report.d.ts +3 -0
- package/dist/application/recipes/workflow-report.js +48 -0
- package/dist/application/recipes/workflow-report.js.map +1 -0
- package/dist/application/recipes/workflow-run.d.ts +6 -0
- package/dist/application/recipes/workflow-run.js +70 -0
- package/dist/application/recipes/workflow-run.js.map +1 -0
- package/dist/application/recipes/workflow-validation.d.ts +3 -0
- package/dist/application/recipes/workflow-validation.js +85 -0
- package/dist/application/recipes/workflow-validation.js.map +1 -0
- package/dist/application/recipes/workflow.constants.d.ts +1 -0
- package/dist/application/recipes/workflow.constants.js +20 -0
- package/dist/application/recipes/workflow.constants.js.map +1 -0
- package/dist/application/recipes/workflow.d.ts +6 -0
- package/dist/application/recipes/workflow.js +348 -0
- package/dist/application/recipes/workflow.js.map +1 -0
- package/dist/application/recipes/workspace.d.ts +4 -0
- package/dist/application/recipes/workspace.js +44 -0
- package/dist/application/recipes/workspace.js.map +1 -0
- package/dist/application/repetition-watchdog.d.ts +3 -0
- package/dist/application/repetition-watchdog.js +118 -0
- package/dist/application/repetition-watchdog.js.map +1 -0
- package/dist/application/repetition-watchdog.types.d.ts +12 -0
- package/dist/application/repetition-watchdog.types.js +2 -0
- package/dist/application/repetition-watchdog.types.js.map +1 -0
- package/dist/application/run-report-events.d.ts +2 -0
- package/dist/application/run-report-events.js +72 -0
- package/dist/application/run-report-events.js.map +1 -0
- package/dist/application/run-report.d.ts +5 -0
- package/dist/application/run-report.js +32 -0
- package/dist/application/run-report.js.map +1 -0
- package/dist/application/run-report.types.d.ts +13 -0
- package/dist/application/run-report.types.js +2 -0
- package/dist/application/run-report.types.js.map +1 -0
- package/dist/application/sandbox-attach.js +3 -0
- package/dist/application/sandbox-attach.js.map +1 -1
- package/dist/application/sandbox-dispatch.js +51 -2
- package/dist/application/sandbox-dispatch.js.map +1 -1
- package/dist/application/sandbox-provision.js +38 -13
- package/dist/application/sandbox-provision.js.map +1 -1
- package/dist/application/sandbox-session.types.d.ts +1 -0
- package/dist/application/sandbox-session.types.js.map +1 -1
- package/dist/application/sandbox.d.ts +6 -0
- package/dist/application/sandbox.js +23 -3
- package/dist/application/sandbox.js.map +1 -1
- package/dist/application/secrets.d.ts +2 -0
- package/dist/application/secrets.js +67 -0
- package/dist/application/secrets.js.map +1 -0
- package/dist/application/speculation-checkpoint.d.ts +1 -1
- package/dist/application/speculation-checkpoint.js +21 -4
- package/dist/application/speculation-checkpoint.js.map +1 -1
- package/dist/application/speculation-resume.js +1 -1
- package/dist/application/speculation-resume.js.map +1 -1
- package/dist/application/speculation-run.js +59 -8
- package/dist/application/speculation-run.js.map +1 -1
- package/dist/application/speculation-validation.d.ts +5 -0
- package/dist/application/speculation-validation.js +29 -0
- package/dist/application/speculation-validation.js.map +1 -0
- package/dist/application/speculation.js +3 -19
- package/dist/application/speculation.js.map +1 -1
- package/dist/application/speculation.types.d.ts +4 -1
- package/dist/application/speculation.types.js.map +1 -1
- package/dist/application/stop-reason.js +2 -0
- package/dist/application/stop-reason.js.map +1 -1
- package/dist/application/task-file-workspace.d.ts +8 -0
- package/dist/application/task-file-workspace.js +74 -0
- package/dist/application/task-file-workspace.js.map +1 -0
- package/dist/application/task-file-workspace.types.d.ts +6 -0
- package/dist/application/task-file-workspace.types.js +2 -0
- package/dist/application/task-file-workspace.types.js.map +1 -0
- package/dist/application/task-usage.d.ts +2 -0
- package/dist/application/task-usage.js +34 -15
- package/dist/application/task-usage.js.map +1 -1
- package/dist/application/task-usage.types.d.ts +4 -0
- package/dist/application/task-usage.types.js.map +1 -1
- package/dist/application/tasks.d.ts +7 -1
- package/dist/application/tasks.js +92 -5
- package/dist/application/tasks.js.map +1 -1
- package/dist/application/tasks.types.d.ts +28 -1
- package/dist/application/tasks.types.js.map +1 -1
- package/dist/application/transport-inspection.constants.js +1 -0
- package/dist/application/transport-inspection.constants.js.map +1 -1
- package/dist/application/workflow-job.d.ts +5 -1
- package/dist/application/workflow-job.js +11 -16
- package/dist/application/workflow-job.js.map +1 -1
- package/dist/application/workflow-job.types.d.ts +2 -1
- package/dist/application/workflow-job.types.js.map +1 -1
- package/dist/application/workspace-integration.d.ts +4 -0
- package/dist/application/workspace-integration.js +94 -0
- package/dist/application/workspace-integration.js.map +1 -0
- package/dist/application/workspace-output-baseline.d.ts +5 -0
- package/dist/application/workspace-output-baseline.js +44 -0
- package/dist/application/workspace-output-baseline.js.map +1 -0
- package/dist/application/workspace-publication-directories.d.ts +8 -0
- package/dist/application/workspace-publication-directories.js +170 -0
- package/dist/application/workspace-publication-directories.js.map +1 -0
- package/dist/application/workspace-publication.d.ts +7 -0
- package/dist/application/workspace-publication.js +537 -0
- package/dist/application/workspace-publication.js.map +1 -0
- package/dist/application/workspace-publication.types.d.ts +37 -0
- package/dist/application/workspace-publication.types.js +2 -0
- package/dist/application/workspace-publication.types.js.map +1 -0
- package/dist/application/workspace-source.d.ts +8 -0
- package/dist/application/workspace-source.js +18 -0
- package/dist/application/workspace-source.js.map +1 -0
- package/dist/application/workspace.d.ts +2 -0
- package/dist/application/workspace.js +10 -1
- package/dist/application/workspace.js.map +1 -1
- package/dist/cli/commands.js +17 -2
- package/dist/cli/commands.js.map +1 -1
- package/dist/cli/doctor-command.js +6 -1
- package/dist/cli/doctor-command.js.map +1 -1
- package/dist/cli/main.constants.d.ts +191 -3
- package/dist/cli/main.constants.js +275 -3
- package/dist/cli/main.constants.js.map +1 -1
- package/dist/cli/main.types.d.ts +1 -1
- package/dist/cli/main.types.js.map +1 -1
- package/dist/cli/recipe-actor.d.ts +2 -0
- package/dist/cli/recipe-actor.js +14 -0
- package/dist/cli/recipe-actor.js.map +1 -0
- package/dist/cli/recipe-catalog.d.ts +2 -0
- package/dist/cli/recipe-catalog.js +54 -0
- package/dist/cli/recipe-catalog.js.map +1 -0
- package/dist/cli/recipe-command.d.ts +2 -0
- package/dist/cli/recipe-command.js +184 -0
- package/dist/cli/recipe-command.js.map +1 -0
- package/dist/cli/recipe-configuration-providers.d.ts +1 -0
- package/dist/cli/recipe-configuration-providers.js +2 -0
- package/dist/cli/recipe-configuration-providers.js.map +1 -0
- package/dist/cli/recipe-configuration-values.d.ts +1 -0
- package/dist/cli/recipe-configuration-values.js +2 -0
- package/dist/cli/recipe-configuration-values.js.map +1 -0
- package/dist/cli/recipe-configuration.constants.d.ts +1 -0
- package/dist/cli/recipe-configuration.constants.js +2 -0
- package/dist/cli/recipe-configuration.constants.js.map +1 -0
- package/dist/cli/recipe-configuration.d.ts +1 -0
- package/dist/cli/recipe-configuration.js +2 -0
- package/dist/cli/recipe-configuration.js.map +1 -0
- package/dist/cli/recipe-dialogue.d.ts +5 -0
- package/dist/cli/recipe-dialogue.js +69 -0
- package/dist/cli/recipe-dialogue.js.map +1 -0
- package/dist/cli/recipe-dialogue.types.d.ts +11 -0
- package/dist/cli/recipe-dialogue.types.js +2 -0
- package/dist/cli/recipe-dialogue.types.js.map +1 -0
- package/dist/cli/recipe-gates.d.ts +5 -0
- package/dist/cli/recipe-gates.js +51 -0
- package/dist/cli/recipe-gates.js.map +1 -0
- package/dist/cli/recipe-init.constants.d.ts +7 -0
- package/dist/cli/recipe-init.constants.js +64 -0
- package/dist/cli/recipe-init.constants.js.map +1 -0
- package/dist/cli/recipe-init.d.ts +2 -0
- package/dist/cli/recipe-init.js +39 -0
- package/dist/cli/recipe-init.js.map +1 -0
- package/dist/cli/recipe-inputs.d.ts +2 -0
- package/dist/cli/recipe-inputs.js +31 -0
- package/dist/cli/recipe-inputs.js.map +1 -0
- package/dist/cli/recipe-report.constants.d.ts +1 -0
- package/dist/cli/recipe-report.constants.js +2 -0
- package/dist/cli/recipe-report.constants.js.map +1 -0
- package/dist/cli/recipe-report.d.ts +1 -0
- package/dist/cli/recipe-report.js +2 -0
- package/dist/cli/recipe-report.js.map +1 -0
- package/dist/cli/recipe-report.types.d.ts +1 -0
- package/dist/cli/recipe-report.types.js +2 -0
- package/dist/cli/recipe-report.types.js.map +1 -0
- package/dist/cli/recipe-run.d.ts +1 -0
- package/dist/cli/recipe-run.js +2 -0
- package/dist/cli/recipe-run.js.map +1 -0
- package/dist/cli/recipe-terminal.d.ts +4 -0
- package/dist/cli/recipe-terminal.js +52 -0
- package/dist/cli/recipe-terminal.js.map +1 -0
- package/dist/cli/recipe-yaml.d.ts +3 -0
- package/dist/cli/recipe-yaml.js +193 -0
- package/dist/cli/recipe-yaml.js.map +1 -0
- package/dist/cli/recovery-command.js +57 -0
- package/dist/cli/recovery-command.js.map +1 -1
- package/dist/cli/recovery-file-transport.d.ts +4 -0
- package/dist/cli/recovery-file-transport.js +40 -0
- package/dist/cli/recovery-file-transport.js.map +1 -0
- package/dist/cli/recovery-publication-command.d.ts +2 -0
- package/dist/cli/recovery-publication-command.js +121 -0
- package/dist/cli/recovery-publication-command.js.map +1 -0
- package/dist/cli/recovery-workspace-command.d.ts +2 -0
- package/dist/cli/recovery-workspace-command.js +63 -0
- package/dist/cli/recovery-workspace-command.js.map +1 -0
- package/dist/domain/agent-profile-permissions.d.ts +4 -0
- package/dist/domain/agent-profile-permissions.js +38 -0
- package/dist/domain/agent-profile-permissions.js.map +1 -0
- package/dist/domain/agent-profile.constants.d.ts +7 -0
- package/dist/domain/agent-profile.constants.js +16 -0
- package/dist/domain/agent-profile.constants.js.map +1 -0
- package/dist/domain/agent-profile.d.ts +5 -0
- package/dist/domain/agent-profile.js +45 -0
- package/dist/domain/agent-profile.js.map +1 -0
- package/dist/domain/agent-profile.types.d.ts +10 -0
- package/dist/domain/agent-profile.types.js +2 -0
- package/dist/domain/agent-profile.types.js.map +1 -0
- package/dist/domain/agent.types.d.ts +13 -2
- package/dist/domain/agent.types.js.map +1 -1
- package/dist/domain/conversation.types.d.ts +4 -1
- package/dist/domain/conversation.types.js.map +1 -1
- package/dist/domain/diff-guard.d.ts +4 -0
- package/dist/domain/diff-guard.js +56 -0
- package/dist/domain/diff-guard.js.map +1 -0
- package/dist/domain/diff-guard.types.d.ts +10 -0
- package/dist/domain/diff-guard.types.js +2 -0
- package/dist/domain/diff-guard.types.js.map +1 -0
- package/dist/domain/errors.types.d.ts +1 -1
- package/dist/domain/errors.types.js.map +1 -1
- package/dist/domain/file-workspace.constants.d.ts +476 -0
- package/dist/domain/file-workspace.constants.js +237 -0
- package/dist/domain/file-workspace.constants.js.map +1 -0
- package/dist/domain/file-workspace.types.d.ts +133 -0
- package/dist/domain/file-workspace.types.js +2 -0
- package/dist/domain/file-workspace.types.js.map +1 -0
- package/dist/domain/harness.constants.js +1 -0
- package/dist/domain/harness.constants.js.map +1 -1
- package/dist/domain/harness.js +7 -2
- package/dist/domain/harness.js.map +1 -1
- package/dist/domain/harness.types.d.ts +4 -1
- package/dist/domain/harness.types.js.map +1 -1
- package/dist/domain/lifecycle.d.ts +2 -0
- package/dist/domain/lifecycle.js +17 -0
- package/dist/domain/lifecycle.js.map +1 -0
- package/dist/domain/lifecycle.types.d.ts +8 -0
- package/dist/domain/lifecycle.types.js +2 -0
- package/dist/domain/lifecycle.types.js.map +1 -0
- package/dist/domain/observation.js +12 -6
- package/dist/domain/observation.js.map +1 -1
- package/dist/domain/observation.types.d.ts +4 -1
- package/dist/domain/observation.types.js.map +1 -1
- package/dist/domain/pricing.constants.d.ts +1 -0
- package/dist/domain/pricing.constants.js +2 -0
- package/dist/domain/pricing.constants.js.map +1 -0
- package/dist/domain/pricing.d.ts +4 -0
- package/dist/domain/pricing.js +60 -0
- package/dist/domain/pricing.js.map +1 -0
- package/dist/domain/pricing.types.d.ts +20 -0
- package/dist/domain/pricing.types.js +2 -0
- package/dist/domain/pricing.types.js.map +1 -0
- package/dist/domain/prompts.d.ts +1 -1
- package/dist/domain/prompts.js.map +1 -1
- package/dist/domain/recipe-catalog.constants.d.ts +7 -0
- package/dist/domain/recipe-catalog.constants.js +14 -0
- package/dist/domain/recipe-catalog.constants.js.map +1 -0
- package/dist/domain/recipe-catalog.d.ts +2 -0
- package/dist/domain/recipe-catalog.js +41 -0
- package/dist/domain/recipe-catalog.js.map +1 -0
- package/dist/domain/recipe-catalog.types.d.ts +11 -0
- package/dist/domain/recipe-catalog.types.js +2 -0
- package/dist/domain/recipe-catalog.types.js.map +1 -0
- package/dist/domain/recipe-inputs.d.ts +5 -0
- package/dist/domain/recipe-inputs.js +110 -0
- package/dist/domain/recipe-inputs.js.map +1 -0
- package/dist/domain/recipe-templates.d.ts +7 -0
- package/dist/domain/recipe-templates.js +85 -0
- package/dist/domain/recipe-templates.js.map +1 -0
- package/dist/domain/recipe.constants.d.ts +21 -0
- package/dist/domain/recipe.constants.js +59 -0
- package/dist/domain/recipe.constants.js.map +1 -0
- package/dist/domain/recipe.d.ts +2 -0
- package/dist/domain/recipe.js +294 -0
- package/dist/domain/recipe.js.map +1 -0
- package/dist/domain/recipe.types.d.ts +52 -0
- package/dist/domain/recipe.types.js +2 -0
- package/dist/domain/recipe.types.js.map +1 -0
- package/dist/domain/recipes/checkpoint-store.types.d.ts +10 -0
- package/dist/domain/recipes/checkpoint-store.types.js +2 -0
- package/dist/domain/recipes/checkpoint-store.types.js.map +1 -0
- package/dist/domain/recipes/component.d.ts +3 -0
- package/dist/domain/recipes/component.js +27 -0
- package/dist/domain/recipes/component.js.map +1 -0
- package/dist/domain/recipes/component.types.d.ts +39 -0
- package/dist/domain/recipes/component.types.js +2 -0
- package/dist/domain/recipes/component.types.js.map +1 -0
- package/dist/domain/recipes/expression-text.d.ts +2 -0
- package/dist/domain/recipes/expression-text.js +22 -0
- package/dist/domain/recipes/expression-text.js.map +1 -0
- package/dist/domain/recipes/expressions.d.ts +7 -0
- package/dist/domain/recipes/expressions.js +209 -0
- package/dist/domain/recipes/expressions.js.map +1 -0
- package/dist/domain/recipes/expressions.types.d.ts +17 -0
- package/dist/domain/recipes/expressions.types.js +2 -0
- package/dist/domain/recipes/expressions.types.js.map +1 -0
- package/dist/domain/recipes/schema-walk.d.ts +3 -0
- package/dist/domain/recipes/schema-walk.js +151 -0
- package/dist/domain/recipes/schema-walk.js.map +1 -0
- package/dist/domain/recipes/schema-walk.types.d.ts +2 -0
- package/dist/domain/recipes/schema-walk.types.js +2 -0
- package/dist/domain/recipes/schema-walk.types.js.map +1 -0
- package/dist/domain/recipes/schema.constants.d.ts +41 -0
- package/dist/domain/recipes/schema.constants.js +59 -0
- package/dist/domain/recipes/schema.constants.js.map +1 -0
- package/dist/domain/recipes/values.d.ts +6 -0
- package/dist/domain/recipes/values.js +24 -0
- package/dist/domain/recipes/values.js.map +1 -0
- package/dist/domain/redaction.constants.d.ts +1 -0
- package/dist/domain/redaction.constants.js +2 -0
- package/dist/domain/redaction.constants.js.map +1 -0
- package/dist/domain/redaction.d.ts +1 -0
- package/dist/domain/redaction.js +74 -0
- package/dist/domain/redaction.js.map +1 -0
- package/dist/domain/replay.constants.js +1 -0
- package/dist/domain/replay.constants.js.map +1 -1
- package/dist/domain/replay.js +3 -1
- package/dist/domain/replay.js.map +1 -1
- package/dist/domain/run-report.constants.d.ts +5 -0
- package/dist/domain/run-report.constants.js +6 -0
- package/dist/domain/run-report.constants.js.map +1 -0
- package/dist/domain/run-report.d.ts +2 -0
- package/dist/domain/run-report.js +84 -0
- package/dist/domain/run-report.js.map +1 -0
- package/dist/domain/run-report.types.d.ts +47 -0
- package/dist/domain/run-report.types.js +2 -0
- package/dist/domain/run-report.types.js.map +1 -0
- package/dist/domain/run.constants.d.ts +9 -0
- package/dist/domain/run.constants.js +34 -0
- package/dist/domain/run.constants.js.map +1 -0
- package/dist/domain/run.d.ts +8 -0
- package/dist/domain/run.js +154 -0
- package/dist/domain/run.js.map +1 -0
- package/dist/domain/run.types.d.ts +90 -0
- package/dist/domain/run.types.js +2 -0
- package/dist/domain/run.types.js.map +1 -0
- package/dist/domain/sandbox.types.d.ts +14 -0
- package/dist/domain/sandbox.types.js.map +1 -1
- package/dist/domain/secrets.constants.d.ts +4 -0
- package/dist/domain/secrets.constants.js +5 -0
- package/dist/domain/secrets.constants.js.map +1 -0
- package/dist/domain/secrets.d.ts +2 -0
- package/dist/domain/secrets.js +18 -0
- package/dist/domain/secrets.js.map +1 -0
- package/dist/domain/secrets.types.d.ts +10 -0
- package/dist/domain/secrets.types.js +2 -0
- package/dist/domain/secrets.types.js.map +1 -0
- package/dist/domain/task-queue.js +4 -12
- package/dist/domain/task-queue.js.map +1 -1
- package/dist/domain/tool.constants.js +1 -0
- package/dist/domain/tool.constants.js.map +1 -1
- package/dist/domain/tool.js +2 -0
- package/dist/domain/tool.js.map +1 -1
- package/dist/domain/tool.types.d.ts +2 -0
- package/dist/domain/tool.types.js.map +1 -1
- package/dist/domain/usage.d.ts +2 -0
- package/dist/domain/usage.js +83 -0
- package/dist/domain/usage.js.map +1 -1
- package/dist/domain/watchdog.constants.d.ts +2 -0
- package/dist/domain/watchdog.constants.js +3 -0
- package/dist/domain/watchdog.constants.js.map +1 -0
- package/dist/domain/watchdog.d.ts +2 -0
- package/dist/domain/watchdog.js +15 -0
- package/dist/domain/watchdog.js.map +1 -0
- package/dist/domain/watchdog.types.d.ts +20 -0
- package/dist/domain/watchdog.types.js +2 -0
- package/dist/domain/watchdog.types.js.map +1 -0
- package/dist/domain/workflow/budget.d.ts +7 -3
- package/dist/domain/workflow/budget.js +48 -12
- package/dist/domain/workflow/budget.js.map +1 -1
- package/dist/domain/workflow/budget.types.d.ts +8 -1
- package/dist/domain/workflow/budget.types.js.map +1 -1
- package/dist/domain/workflow/checkpoint-validation.js +9 -0
- package/dist/domain/workflow/checkpoint-validation.js.map +1 -1
- package/dist/domain/workflow/checkpoint.js +28 -1
- package/dist/domain/workflow/checkpoint.js.map +1 -1
- package/dist/domain/workflow/checkpoint.types.d.ts +11 -0
- package/dist/domain/workflow/checkpoint.types.js.map +1 -1
- package/dist/domain/workflow/task-runner.js +3 -2
- package/dist/domain/workflow/task-runner.js.map +1 -1
- package/dist/domain/workflow/termination.js +3 -1
- package/dist/domain/workflow/termination.js.map +1 -1
- package/dist/domain/workflow/workflow-scheduler.js +13 -1
- package/dist/domain/workflow/workflow-scheduler.js.map +1 -1
- package/dist/domain/workflow/workflow-state.js +22 -1
- package/dist/domain/workflow/workflow-state.js.map +1 -1
- package/dist/domain/workflow.types.d.ts +6 -0
- package/dist/domain/workflow.types.js.map +1 -1
- package/dist/domain/workspace.types.d.ts +4 -4
- package/dist/domain/workspace.types.js.map +1 -1
- package/dist/index.d.ts +43 -3
- package/dist/index.js +17 -1
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/conversations/harness-store.d.ts +1 -1
- package/dist/infrastructure/conversations/harness-store.js +5 -5
- package/dist/infrastructure/conversations/harness-store.js.map +1 -1
- package/dist/infrastructure/conversations/harness-transcript.js +11 -6
- package/dist/infrastructure/conversations/harness-transcript.js.map +1 -1
- package/dist/infrastructure/conversations/harness-transcript.types.d.ts +3 -0
- package/dist/infrastructure/conversations/harness-transcript.types.js.map +1 -1
- package/dist/infrastructure/conversations/redaction.d.ts +3 -0
- package/dist/infrastructure/conversations/redaction.js +45 -0
- package/dist/infrastructure/conversations/redaction.js.map +1 -0
- package/dist/infrastructure/conversations/session-bundle.js +4 -1
- package/dist/infrastructure/conversations/session-bundle.js.map +1 -1
- package/dist/infrastructure/conversations/transcript-store.js +3 -2
- package/dist/infrastructure/conversations/transcript-store.js.map +1 -1
- package/dist/infrastructure/file-fingerprint.constants.d.ts +2 -0
- package/dist/infrastructure/file-fingerprint.constants.js +20 -0
- package/dist/infrastructure/file-fingerprint.constants.js.map +1 -0
- package/dist/infrastructure/file-fingerprint.d.ts +3 -0
- package/dist/infrastructure/file-fingerprint.js +23 -0
- package/dist/infrastructure/file-fingerprint.js.map +1 -0
- package/dist/infrastructure/file-manifest.d.ts +1 -0
- package/dist/infrastructure/file-manifest.js +17 -4
- package/dist/infrastructure/file-manifest.js.map +1 -1
- package/dist/infrastructure/git/diff-guard.d.ts +5 -0
- package/dist/infrastructure/git/diff-guard.js +76 -0
- package/dist/infrastructure/git/diff-guard.js.map +1 -0
- package/dist/infrastructure/git/diff-guard.types.d.ts +5 -0
- package/dist/infrastructure/git/diff-guard.types.js +2 -0
- package/dist/infrastructure/git/diff-guard.types.js.map +1 -0
- package/dist/infrastructure/git/diff-statistics.d.ts +4 -0
- package/dist/infrastructure/git/diff-statistics.js +79 -0
- package/dist/infrastructure/git/diff-statistics.js.map +1 -0
- package/dist/infrastructure/git/integration-candidate.d.ts +3 -0
- package/dist/infrastructure/git/integration-candidate.js +91 -0
- package/dist/infrastructure/git/integration-candidate.js.map +1 -0
- package/dist/infrastructure/git/workspace-lease.js +55 -4
- package/dist/infrastructure/git/workspace-lease.js.map +1 -1
- package/dist/infrastructure/git/workspace.js +2 -0
- package/dist/infrastructure/git/workspace.js.map +1 -1
- package/dist/infrastructure/git/workspace.types.d.ts +14 -1
- package/dist/infrastructure/git/workspace.types.js.map +1 -1
- package/dist/infrastructure/inspection-file.d.ts +2 -1
- package/dist/infrastructure/inspection-file.js +3 -1
- package/dist/infrastructure/inspection-file.js.map +1 -1
- package/dist/infrastructure/local-transport.js +1 -1
- package/dist/infrastructure/local-transport.js.map +1 -1
- package/dist/infrastructure/recipe-download.d.ts +2 -0
- package/dist/infrastructure/recipe-download.js +72 -0
- package/dist/infrastructure/recipe-download.js.map +1 -0
- package/dist/infrastructure/recipe-download.types.d.ts +4 -0
- package/dist/infrastructure/recipe-download.types.js +2 -0
- package/dist/infrastructure/recipe-download.types.js.map +1 -0
- package/dist/infrastructure/recipe.d.ts +7 -0
- package/dist/infrastructure/recipe.js +51 -0
- package/dist/infrastructure/recipe.js.map +1 -0
- package/dist/infrastructure/recipes/checkpoint-store.d.ts +3 -0
- package/dist/infrastructure/recipes/checkpoint-store.js +25 -0
- package/dist/infrastructure/recipes/checkpoint-store.js.map +1 -0
- package/dist/infrastructure/recipes/diagnostic.d.ts +1 -0
- package/dist/infrastructure/recipes/diagnostic.js +38 -0
- package/dist/infrastructure/recipes/diagnostic.js.map +1 -0
- package/dist/infrastructure/recipes/extensions.d.ts +3 -0
- package/dist/infrastructure/recipes/extensions.js +33 -0
- package/dist/infrastructure/recipes/extensions.js.map +1 -0
- package/dist/infrastructure/recipes/read.d.ts +1 -0
- package/dist/infrastructure/recipes/read.js +22 -0
- package/dist/infrastructure/recipes/read.js.map +1 -0
- package/dist/infrastructure/recipes/schema.d.ts +3 -0
- package/dist/infrastructure/recipes/schema.js +40 -0
- package/dist/infrastructure/recipes/schema.js.map +1 -0
- package/dist/infrastructure/recipes/workspace.d.ts +4 -0
- package/dist/infrastructure/recipes/workspace.js +49 -0
- package/dist/infrastructure/recipes/workspace.js.map +1 -0
- package/dist/infrastructure/reporter.js +3 -0
- package/dist/infrastructure/reporter.js.map +1 -1
- package/dist/infrastructure/run-observer.d.ts +2 -0
- package/dist/infrastructure/run-observer.js +143 -0
- package/dist/infrastructure/run-observer.js.map +1 -0
- package/dist/infrastructure/run-reader.d.ts +3 -0
- package/dist/infrastructure/run-reader.js +47 -0
- package/dist/infrastructure/run-reader.js.map +1 -0
- package/dist/infrastructure/run-storage.d.ts +6 -0
- package/dist/infrastructure/run-storage.js +200 -0
- package/dist/infrastructure/run-storage.js.map +1 -0
- package/dist/infrastructure/scripted-commit.d.ts +3 -0
- package/dist/infrastructure/scripted-commit.js +62 -0
- package/dist/infrastructure/scripted-commit.js.map +1 -0
- package/dist/infrastructure/scripted-turn.constants.d.ts +1 -0
- package/dist/infrastructure/scripted-turn.constants.js +2 -0
- package/dist/infrastructure/scripted-turn.constants.js.map +1 -0
- package/dist/infrastructure/scripted-turn.d.ts +3 -0
- package/dist/infrastructure/scripted-turn.js +53 -0
- package/dist/infrastructure/scripted-turn.js.map +1 -0
- package/dist/infrastructure/scripted-turn.types.d.ts +9 -0
- package/dist/infrastructure/scripted-turn.types.js +2 -0
- package/dist/infrastructure/scripted-turn.types.js.map +1 -0
- package/dist/infrastructure/storage-inventory.types.d.ts +1 -1
- package/dist/infrastructure/storage-inventory.types.js.map +1 -1
- package/dist/infrastructure/transport-checkpoint.d.ts +1 -0
- package/dist/infrastructure/transport-checkpoint.js +3 -3
- package/dist/infrastructure/transport-checkpoint.js.map +1 -1
- package/dist/infrastructure/workspace-cleanup.d.ts +1 -0
- package/dist/infrastructure/workspace-cleanup.js +33 -0
- package/dist/infrastructure/workspace-cleanup.js.map +1 -0
- package/dist/infrastructure/workspace-files.constants.d.ts +6 -0
- package/dist/infrastructure/workspace-files.constants.js +7 -0
- package/dist/infrastructure/workspace-files.constants.js.map +1 -0
- package/dist/infrastructure/workspace-files.d.ts +6 -0
- package/dist/infrastructure/workspace-files.js +214 -0
- package/dist/infrastructure/workspace-files.js.map +1 -0
- package/dist/infrastructure/workspace-lock.constants.d.ts +2 -0
- package/dist/infrastructure/workspace-lock.constants.js +6 -0
- package/dist/infrastructure/workspace-lock.constants.js.map +1 -0
- package/dist/infrastructure/workspace-lock.d.ts +9 -0
- package/dist/infrastructure/workspace-lock.js +208 -0
- package/dist/infrastructure/workspace-lock.js.map +1 -0
- package/dist/infrastructure/workspace-lock.types.d.ts +20 -0
- package/dist/infrastructure/workspace-lock.types.js +2 -0
- package/dist/infrastructure/workspace-lock.types.js.map +1 -0
- package/dist/infrastructure/workspace-snapshot.d.ts +3 -0
- package/dist/infrastructure/workspace-snapshot.js +69 -0
- package/dist/infrastructure/workspace-snapshot.js.map +1 -0
- package/dist/providers/cloud-cache.constants.d.ts +6 -0
- package/dist/providers/cloud-cache.constants.js +7 -0
- package/dist/providers/cloud-cache.constants.js.map +1 -0
- package/dist/providers/cloud-cache.d.ts +5 -0
- package/dist/providers/cloud-cache.js +151 -0
- package/dist/providers/cloud-cache.js.map +1 -0
- package/dist/providers/cloud-cache.types.d.ts +5 -0
- package/dist/providers/cloud-cache.types.js +2 -0
- package/dist/providers/cloud-cache.types.js.map +1 -0
- package/dist/providers/container-cache.d.ts +2 -1
- package/dist/providers/container-cache.js +8 -5
- package/dist/providers/container-cache.js.map +1 -1
- package/dist/providers/container-mounts.js +15 -3
- package/dist/providers/container-mounts.js.map +1 -1
- package/dist/providers/container.js +26 -2
- package/dist/providers/container.js.map +1 -1
- package/dist/providers/daytona.d.ts +1 -0
- package/dist/providers/daytona.js +28 -8
- package/dist/providers/daytona.js.map +1 -1
- package/dist/providers/daytona.types.d.ts +2 -0
- package/dist/providers/daytona.types.js.map +1 -1
- package/dist/providers/firecracker.js +4 -3
- package/dist/providers/firecracker.js.map +1 -1
- package/dist/providers/local.js +16 -1
- package/dist/providers/local.js.map +1 -1
- package/dist/providers/memory.d.ts +3 -0
- package/dist/providers/memory.js +134 -0
- package/dist/providers/memory.js.map +1 -0
- package/dist/providers/memory.types.d.ts +8 -0
- package/dist/providers/memory.types.js +2 -0
- package/dist/providers/memory.types.js.map +1 -0
- package/dist/providers/vercel.d.ts +1 -0
- package/dist/providers/vercel.js +28 -8
- package/dist/providers/vercel.js.map +1 -1
- package/dist/providers/vercel.types.d.ts +2 -0
- package/dist/providers/vercel.types.js.map +1 -1
- package/dist/providers/workspace-context.d.ts +3 -0
- package/dist/providers/workspace-context.js +31 -0
- package/dist/providers/workspace-context.js.map +1 -0
- package/dist/recipes.d.ts +7 -0
- package/dist/recipes.js +4 -0
- package/dist/recipes.js.map +1 -0
- package/dist/testing.d.ts +4 -0
- package/dist/testing.js +3 -0
- package/dist/testing.js.map +1 -0
- package/package.json +76 -9
- package/recipe-configuration.schema.json +44324 -0
- package/recipe.schema.json +38554 -0
- package/recipes/catalog.json +54 -0
- package/recipes/compare-candidates.yaml +12 -0
- package/recipes/fix-and-check.yaml +22 -0
- package/recipes/queued-review.yaml +20 -0
- package/recipes/review-and-approve.yaml +27 -0
- package/recipes/review-change.yaml +24 -0
- package/recipes/review.yaml +13 -0
- package/recipes/update-docs.yaml +16 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { rejectProfileTools } from "../profile-support.js";
|
|
1
2
|
import { createCodexConversations, codexConversationLayout, } from "./codex-conversations.js";
|
|
2
3
|
import { codexLabel, codexMcpSupport, codexModelSupport, codexQuotaPatterns, codexUnavailablePatterns, } from "./codex.constants.js";
|
|
3
4
|
import { codexMcpLogins } from "./codex-mcp.js";
|
|
@@ -14,6 +15,7 @@ import { codexRequest } from "./codex-request.js";
|
|
|
14
15
|
import { configuredSettings, harnessSettings, supportModel, } from "../model-support.js";
|
|
15
16
|
function bindCodex(settings) {
|
|
16
17
|
supportModel(codexModelSupport, settings.model);
|
|
18
|
+
rejectProfileTools(codexLabel, settings.profile);
|
|
17
19
|
supportMcpServers(codexMcpSupport, settings.mcpServers);
|
|
18
20
|
codexProvider(settings);
|
|
19
21
|
const credentials = credentialPlanner(codexLabel, codexCredentials(settings.modelProvider), settings.authentication, settings.model);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex-adapter.js","sourceRoot":"","sources":["../../../../src/adapters/agents/codex/codex-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,UAAU,EACV,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EACL,uBAAuB,EACvB,iBAAiB,GAClB,MAAM,yBAAyB,CAAC;AACjC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CAAC;QAC3C,SAAS,EAAE,OAAO;QAClB,GAAG,mBAAmB,CAAC,QAAQ,EAAE,wBAAwB,CAAC;QAC1D,SAAS,EAAE,IAAI;QACf,OAAO,EAAE,QAAQ,CAAC,iBAAiB,IAAI,IAAI;QAC3C,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,QAAQ,CAAC,SAAS,EAAE,CAAC;QACnD,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,KAAK,CAAC;QACjD,MAAM,EAAE,WAAW;QACnB,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC;YACvB,IAAI,EAAE,CAAC,KAAiB,EAAE,EAAE,CAAC,eAAe,CAAC,QAAQ,EAAE,KAAK,CAAC;SAC9D,CAAC;QACF,KAAK,EAAE,WAAW,CAAC,kBAAkB,CAAC;QACtC,WAAW,EAAE,WAAW,CAAC,wBAAwB,EAAE,uBAAuB,CAAC;KACrD,CAAC,CAAC;AAC5B,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,WAA0B,EAAE;IAC7D,eAAe,CAAC,QAAQ,CAAC,CAAC;IAC1B,oBAAoB,CAAC,UAAU,EAAE,uBAAuB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC3E,MAAM,UAAU,GAAG,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IAChD,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,IAAI,EAAE,KAAK;QACX,IAAI,EAAE,CAAC,KAAkB,EAAE,EAAE,CAC3B,SAAS,CAAC,EAAE,GAAG,UAAU,EAAE,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;KAC1E,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {\n createCodexConversations,\n codexConversationLayout,\n} from \"./codex-conversations.ts\";\nimport {\n codexLabel,\n codexMcpSupport,\n codexModelSupport,\n codexQuotaPatterns,\n codexUnavailablePatterns,\n} from \"./codex.constants.ts\";\nimport { codexMcpLogins } from \"./codex-mcp.ts\";\nimport {\n mcpConfigurationPlanner,\n supportMcpServers,\n} from \"../mcp-configuration.ts\";\nimport { textMatcher } from \"../text-matcher.ts\";\nimport {\n conversationSettings,\n conversationStorage,\n} from \"../conversation-settings.ts\";\nimport { transientNoticePatterns } from \"../unavailable.constants.ts\";\nimport type { AgentModel } from \"../../../domain/model.types.ts\";\nimport { credentialPlanner } from \"../authentication.ts\";\nimport { codexCredentials } from \"./codex-authentication.ts\";\nimport type {\n AgentAdapter,\n AgentInput,\n CliHarness,\n} from \"../../../domain/agent.types.ts\";\nimport { codexAppSession } from \"./codex-app-session.ts\";\nimport { codexProvider } from \"./codex-provider.ts\";\nimport { codexEvents } from \"./codex-events.ts\";\nimport { codexRequest } from \"./codex-request.ts\";\nimport {\n configuredSettings,\n harnessSettings,\n supportModel,\n} from \"../model-support.ts\";\nimport type { Bound, CodexSettings } from \"../settings.types.ts\";\n\nfunction bindCodex(settings: Bound<CodexSettings>): AgentAdapter {\n supportModel(codexModelSupport, settings.model);\n supportMcpServers(codexMcpSupport, settings.mcpServers);\n codexProvider(settings);\n const credentials = credentialPlanner(\n codexLabel,\n codexCredentials(settings.modelProvider),\n settings.authentication,\n settings.model,\n );\n const configuration = mcpConfigurationPlanner(\n codexLabel,\n settings.mcpServers,\n undefined,\n codexMcpLogins,\n );\n return Object.freeze({\n name: \"codex\",\n ...(credentials ? { credentials } : {}),\n ...(configuration ? { configuration } : {}),\n bootstrap: \"codex\",\n ...conversationStorage(settings, createCodexConversations),\n resumable: true,\n capture: settings.saveConversations ?? true,\n variables: Object.freeze({ ...settings.variables }),\n request: (input) => codexRequest(settings, input),\n events: codexEvents,\n liveInput: Object.freeze({\n open: (input: AgentInput) => codexAppSession(settings, input),\n }),\n quota: textMatcher(codexQuotaPatterns),\n unavailable: textMatcher(codexUnavailablePatterns, transientNoticePatterns),\n } satisfies AgentAdapter);\n}\n\nexport function createCodexHarness(settings: CodexSettings = {}): CliHarness {\n harnessSettings(settings);\n conversationSettings(codexLabel, codexConversationLayout.format, settings);\n const configured = configuredSettings(settings);\n return Object.freeze({\n kind: \"cli\",\n bind: (model?: AgentModel) =>\n bindCodex({ ...configured, ...(model === undefined ? {} : { model }) }),\n });\n}\n"]}
|
|
1
|
+
{"version":3,"file":"codex-adapter.js","sourceRoot":"","sources":["../../../../src/adapters/agents/codex/codex-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EACL,wBAAwB,EACxB,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,UAAU,EACV,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EACL,uBAAuB,EACvB,iBAAiB,GAClB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EACL,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAEtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAM7D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,YAAY,GACb,MAAM,qBAAqB,CAAC;AAG7B,SAAS,SAA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F,KAAK,EAAE,WAAW,CAAC,kBAAkB,CAAC;QACtC,WAAW,EAAE,WAAW,CAAC,wBAAwB,EAAE,uBAAuB,CAAC;KACrD,CAAC,CAAC;AAC5B,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,WAA0B,EAAE;IAC7D,eAAe,CAAC,QAAQ,CAAC,CAAC;IAC1B,oBAAoB,CAAC,UAAU,EAAE,uBAAuB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC3E,MAAM,UAAU,GAAG,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IAChD,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,IAAI,EAAE,KAAK;QACX,IAAI,EAAE,CAAC,KAAkB,EAAE,EAAE,CAC3B,SAAS,CAAC,EAAE,GAAG,UAAU,EAAE,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;KAC1E,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { rejectProfileTools } from \"../profile-support.ts\";\nimport {\n createCodexConversations,\n codexConversationLayout,\n} from \"./codex-conversations.ts\";\nimport {\n codexLabel,\n codexMcpSupport,\n codexModelSupport,\n codexQuotaPatterns,\n codexUnavailablePatterns,\n} from \"./codex.constants.ts\";\nimport { codexMcpLogins } from \"./codex-mcp.ts\";\nimport {\n mcpConfigurationPlanner,\n supportMcpServers,\n} from \"../mcp-configuration.ts\";\nimport { textMatcher } from \"../text-matcher.ts\";\nimport {\n conversationSettings,\n conversationStorage,\n} from \"../conversation-settings.ts\";\nimport { transientNoticePatterns } from \"../unavailable.constants.ts\";\nimport type { AgentModel } from \"../../../domain/model.types.ts\";\nimport { credentialPlanner } from \"../authentication.ts\";\nimport { codexCredentials } from \"./codex-authentication.ts\";\nimport type {\n AgentAdapter,\n AgentInput,\n CliHarness,\n} from \"../../../domain/agent.types.ts\";\nimport { codexAppSession } from \"./codex-app-session.ts\";\nimport { codexProvider } from \"./codex-provider.ts\";\nimport { codexEvents } from \"./codex-events.ts\";\nimport { codexRequest } from \"./codex-request.ts\";\nimport {\n configuredSettings,\n harnessSettings,\n supportModel,\n} from \"../model-support.ts\";\nimport type { Bound, CodexSettings } from \"../settings.types.ts\";\n\nfunction bindCodex(settings: Bound<CodexSettings>): AgentAdapter {\n supportModel(codexModelSupport, settings.model);\n rejectProfileTools(codexLabel, settings.profile);\n supportMcpServers(codexMcpSupport, settings.mcpServers);\n codexProvider(settings);\n const credentials = credentialPlanner(\n codexLabel,\n codexCredentials(settings.modelProvider),\n settings.authentication,\n settings.model,\n );\n const configuration = mcpConfigurationPlanner(\n codexLabel,\n settings.mcpServers,\n undefined,\n codexMcpLogins,\n );\n return Object.freeze({\n name: \"codex\",\n ...(credentials ? { credentials } : {}),\n ...(configuration ? { configuration } : {}),\n bootstrap: \"codex\",\n ...conversationStorage(settings, createCodexConversations),\n resumable: true,\n capture: settings.saveConversations ?? true,\n variables: Object.freeze({ ...settings.variables }),\n request: (input) => codexRequest(settings, input),\n events: codexEvents,\n liveInput: Object.freeze({\n open: (input: AgentInput) => codexAppSession(settings, input),\n }),\n quota: textMatcher(codexQuotaPatterns),\n unavailable: textMatcher(codexUnavailablePatterns, transientNoticePatterns),\n } satisfies AgentAdapter);\n}\n\nexport function createCodexHarness(settings: CodexSettings = {}): CliHarness {\n harnessSettings(settings);\n conversationSettings(codexLabel, codexConversationLayout.format, settings);\n const configured = configuredSettings(settings);\n return Object.freeze({\n kind: \"cli\",\n bind: (model?: AgentModel) =>\n bindCodex({ ...configured, ...(model === undefined ? {} : { model }) }),\n });\n}\n"]}
|
|
@@ -26,6 +26,9 @@ export function codexAppSession(settings, input) {
|
|
|
26
26
|
return { id, data: line({ id, method, params }) };
|
|
27
27
|
};
|
|
28
28
|
const policy = {
|
|
29
|
+
...(settings.profile?.instructions === undefined
|
|
30
|
+
? {}
|
|
31
|
+
: { developerInstructions: settings.profile.instructions }),
|
|
29
32
|
approvalPolicy: settings.approvalReviewer === "auto_review" ? "on-request" : "never",
|
|
30
33
|
sandbox: "danger-full-access",
|
|
31
34
|
...(settings.approvalReviewer === "auto_review"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex-app-session.js","sourceRoot":"","sources":["../../../../src/adapters/agents/codex/codex-app-session.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,0BAA0B,GAC3B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAGxD,MAAM,IAAI,GAAG,CAAC,OAAe,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC;AACjE,MAAM,IAAI,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC;IAC9B,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,aAAa,EAAE,EAAE,EAAE;CACjD,CAAC;AACF,MAAM,IAAI,GAAkB,MAAM,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC;AAExE,sEAAsE;AACtE,MAAM,UAAU,kBAAkB;IAChC,OAAO,IAAI,CAAC;QACV,EAAE,EAAE,GAAG,gBAAgB,CAAC,UAAU,IAAI;QACtC,MAAM,EAAE,YAAY;QACpB,MAAM,EAAE,EAAE,UAAU,EAAE,cAAc,EAAE,YAAY,EAAE,IAAI,EAAE;KAC3D,CAAC,CAAC;AACL,CAAC;AAED,qFAAqF;AACrF,MAAM,UAAU,eAAe,CAC7B,QAA8B,EAC9B,KAAiB;IAEjB,IAAI,QAAQ,GAAG,CAAC,CAAC;IACjB,IAAI,MAA0B,CAAC;IAC/B,IAAI,IAAwB,CAAC;IAC7B,IAAI,QAAQ,GAAG,KAAK,CAAC;IACrB,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,MAAM,QAAQ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YAClC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAC5D,EAAE,CAAC,UAAU,CAAC,GAAG,KAAK,GAAG,CAAC,CAC3B,CAAC;YACF,MAAM,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YACvD,OAAO,CACL,OAAO,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,KAAK,KAAK,SAAS,EAAE,EAAE,CAAC;gBACpE,IAAI,CACL,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["import type {\n AgentInput,\n AgentLiveRead,\n AgentLiveSession,\n} from \"../../../domain/agent.types.ts\";\nimport {\n codexAppClient,\n codexAppRequests,\n codexAppUnsupportedRequest,\n} from \"./codex-app.constants.ts\";\nimport { asRecord, decodeRecord } from \"../protocol.ts\";\nimport type { Bound, CodexSettings } from \"../settings.types.ts\";\n\nconst line = (message: object) => `${JSON.stringify(message)}\\n`;\nconst text = (value: string) => [\n { type: \"text\", text: value, text_elements: [] },\n];\nconst none: AgentLiveRead = Object.freeze({ consumed: 0, replies: [] });\n\n/** First stdin line of `codex app-server`: the initialize request. */\nexport function codexAppInitialize(): string {\n return line({\n id: `${codexAppRequests.initialize}-0`,\n method: \"initialize\",\n params: { clientInfo: codexAppClient, capabilities: null },\n });\n}\n\n/** Drives one `codex app-server` turn: thread, turn, then steering by turn/steer. */\nexport function codexAppSession(\n settings: Bound<CodexSettings>,\n input: AgentInput,\n): AgentLiveSession {\n let sequence = 0;\n let thread: string | undefined;\n let turn: string | undefined;\n let accepted = false;\n const queued: string[] = [];\n const steering = new Map<string, string>();\n const request = (prefix: string, method: string, params: object) => {\n const id = `${prefix}-${++sequence}`;\n return { id, data: line({ id, method, params }) };\n };\n const policy = {\n approvalPolicy:\n settings.approvalReviewer === \"auto_review\" ? \"on-request\" : \"never\",\n sandbox: \"danger-full-access\",\n ...(settings.approvalReviewer === \"auto_review\"\n ? { approvalsReviewer: \"auto_review\" }\n : {}),\n ...(settings.model ? { model: settings.model.name } : {}),\n };\n const openThread = () => {\n const continuation = input.continuation;\n if (!continuation)\n return request(codexAppRequests.thread, \"thread/start\", policy).data;\n return request(\n codexAppRequests.thread,\n continuation.fork ? \"thread/fork\" : \"thread/resume\",\n { threadId: continuation.id, ...policy },\n ).data;\n };\n const startTurn = (value: string) =>\n request(codexAppRequests.turn, \"turn/start\", {\n threadId: thread,\n input: text(value),\n ...(settings.model?.reasoning\n ? { effort: settings.model.reasoning }\n : {}),\n }).data;\n // Without an active turn, an instruction starts the next turn of the thread.\n const steer = (value: string) => {\n if (!turn) return startTurn(value);\n const sent = request(codexAppRequests.steer, \"turn/steer\", {\n threadId: thread,\n expectedTurnId: turn,\n input: text(value),\n });\n steering.set(sent.id, value);\n return sent.data;\n };\n const responses: Readonly<\n Record<\n string,\n (\n result: Record<string, unknown>,\n failed: boolean,\n id: string,\n ) => AgentLiveRead\n >\n > = {\n [codexAppRequests.initialize]: () => ({\n consumed: 0,\n replies: [line({ method: \"initialized\" }), openThread()],\n }),\n [codexAppRequests.thread]: (result) => {\n const id = asRecord(result.thread).id;\n thread = typeof id === \"string\" ? id : undefined;\n return {\n consumed: 0,\n replies: thread ? [startTurn(input.text ?? \"\")] : [],\n };\n },\n [codexAppRequests.turn]: (result, failed) => {\n if (failed) return none;\n const id = asRecord(result.turn).id;\n if (typeof id === \"string\") turn = id;\n accepted = true;\n return { consumed: 1, replies: queued.splice(0).map(steer) };\n },\n [codexAppRequests.steer]: (_result, failed, id) => {\n const value = steering.get(id);\n steering.delete(id);\n if (!failed) return { consumed: 1, replies: [] };\n turn = undefined;\n return { consumed: 0, replies: value ? [startTurn(value)] : [] };\n },\n };\n const notifications: Readonly<\n Record<string, (params: Record<string, unknown>) => void>\n > = {\n \"turn/started\": (params) => {\n const id = asRecord(params.turn).id;\n if (typeof id === \"string\") turn = id;\n },\n \"turn/completed\": () => {\n turn = undefined;\n },\n };\n return {\n encode(value) {\n if (!thread || !accepted) {\n queued.push(value);\n return \"\";\n }\n return steer(value);\n },\n read(output) {\n const message = decodeRecord(output);\n if (!message) return none;\n const method =\n typeof message.method === \"string\" ? message.method : undefined;\n if (message.id !== undefined && method)\n return {\n consumed: 0,\n replies: [\n line({ id: message.id, error: codexAppUnsupportedRequest }),\n ],\n };\n const id = typeof message.id === \"string\" ? message.id : undefined;\n if (method) {\n notifications[method]?.(asRecord(message.params));\n return none;\n }\n if (id === undefined) return none;\n const prefix = Object.values(codexAppRequests).find((value) =>\n id.startsWith(`${value}-`),\n );\n const handler = prefix ? responses[prefix] : undefined;\n return (\n handler?.(asRecord(message.result), message.error !== undefined, id) ??\n none\n );\n },\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"codex-app-session.js","sourceRoot":"","sources":["../../../../src/adapters/agents/codex/codex-app-session.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,0BAA0B,GAC3B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAGxD,MAAM,IAAI,GAAG,CAAC,OAAe,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC;AACjE,MAAM,IAAI,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC;IAC9B,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,aAAa,EAAE,EAAE,EAAE;CACjD,CAAC;AACF,MAAM,IAAI,GAAkB,MAAM,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC;AAExE,sEAAsE;AACtE,MAAM,UAAU,kBAAkB;IAChC,OAAO,IAAI,CAAC;QACV,EAAE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AAC,CAAC,SAAS,CAAC;YAClE,IAAI,OAAO,CAAC,EAAE,KAAK,SAAS,IAAI,MAAM;gBACpC,OAAO;oBACL,QAAQ,EAAE,CAAC;oBACX,OAAO,EAAE;wBACP,IAAI,CAAC,EAAE,EAAE,EAAE,OAAO,CAAC,EAAE,EAAE,KAAK,EAAE,0BAA0B,EAAE,CAAC;qBAC5D;iBACF,CAAC;YACJ,MAAM,EAAE,GAAG,OAAO,OAAO,CAAC,EAAE,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;YACnE,IAAI,MAAM,EAAE,CAAC;gBACX,aAAa,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;gBAClD,OAAO,IAAI,CAAC;YACd,CAAC;YACD,IAAI,EAAE,KAAK,SAAS;gBAAE,OAAO,IAAI,CAAC;YAClC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAC5D,EAAE,CAAC,UAAU,CAAC,GAAG,KAAK,GAAG,CAAC,CAC3B,CAAC;YACF,MAAM,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YACvD,OAAO,CACL,OAAO,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,KAAK,KAAK,SAAS,EAAE,EAAE,CAAC;gBACpE,IAAI,CACL,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["import type {\n AgentInput,\n AgentLiveRead,\n AgentLiveSession,\n} from \"../../../domain/agent.types.ts\";\nimport {\n codexAppClient,\n codexAppRequests,\n codexAppUnsupportedRequest,\n} from \"./codex-app.constants.ts\";\nimport { asRecord, decodeRecord } from \"../protocol.ts\";\nimport type { Bound, CodexSettings } from \"../settings.types.ts\";\n\nconst line = (message: object) => `${JSON.stringify(message)}\\n`;\nconst text = (value: string) => [\n { type: \"text\", text: value, text_elements: [] },\n];\nconst none: AgentLiveRead = Object.freeze({ consumed: 0, replies: [] });\n\n/** First stdin line of `codex app-server`: the initialize request. */\nexport function codexAppInitialize(): string {\n return line({\n id: `${codexAppRequests.initialize}-0`,\n method: \"initialize\",\n params: { clientInfo: codexAppClient, capabilities: null },\n });\n}\n\n/** Drives one `codex app-server` turn: thread, turn, then steering by turn/steer. */\nexport function codexAppSession(\n settings: Bound<CodexSettings>,\n input: AgentInput,\n): AgentLiveSession {\n let sequence = 0;\n let thread: string | undefined;\n let turn: string | undefined;\n let accepted = false;\n const queued: string[] = [];\n const steering = new Map<string, string>();\n const request = (prefix: string, method: string, params: object) => {\n const id = `${prefix}-${++sequence}`;\n return { id, data: line({ id, method, params }) };\n };\n const policy = {\n ...(settings.profile?.instructions === undefined\n ? {}\n : { developerInstructions: settings.profile.instructions }),\n approvalPolicy:\n settings.approvalReviewer === \"auto_review\" ? \"on-request\" : \"never\",\n sandbox: \"danger-full-access\",\n ...(settings.approvalReviewer === \"auto_review\"\n ? { approvalsReviewer: \"auto_review\" }\n : {}),\n ...(settings.model ? { model: settings.model.name } : {}),\n };\n const openThread = () => {\n const continuation = input.continuation;\n if (!continuation)\n return request(codexAppRequests.thread, \"thread/start\", policy).data;\n return request(\n codexAppRequests.thread,\n continuation.fork ? \"thread/fork\" : \"thread/resume\",\n { threadId: continuation.id, ...policy },\n ).data;\n };\n const startTurn = (value: string) =>\n request(codexAppRequests.turn, \"turn/start\", {\n threadId: thread,\n input: text(value),\n ...(settings.model?.reasoning\n ? { effort: settings.model.reasoning }\n : {}),\n }).data;\n // Without an active turn, an instruction starts the next turn of the thread.\n const steer = (value: string) => {\n if (!turn) return startTurn(value);\n const sent = request(codexAppRequests.steer, \"turn/steer\", {\n threadId: thread,\n expectedTurnId: turn,\n input: text(value),\n });\n steering.set(sent.id, value);\n return sent.data;\n };\n const responses: Readonly<\n Record<\n string,\n (\n result: Record<string, unknown>,\n failed: boolean,\n id: string,\n ) => AgentLiveRead\n >\n > = {\n [codexAppRequests.initialize]: () => ({\n consumed: 0,\n replies: [line({ method: \"initialized\" }), openThread()],\n }),\n [codexAppRequests.thread]: (result) => {\n const id = asRecord(result.thread).id;\n thread = typeof id === \"string\" ? id : undefined;\n return {\n consumed: 0,\n replies: thread ? [startTurn(input.text ?? \"\")] : [],\n };\n },\n [codexAppRequests.turn]: (result, failed) => {\n if (failed) return none;\n const id = asRecord(result.turn).id;\n if (typeof id === \"string\") turn = id;\n accepted = true;\n return { consumed: 1, replies: queued.splice(0).map(steer) };\n },\n [codexAppRequests.steer]: (_result, failed, id) => {\n const value = steering.get(id);\n steering.delete(id);\n if (!failed) return { consumed: 1, replies: [] };\n turn = undefined;\n return { consumed: 0, replies: value ? [startTurn(value)] : [] };\n },\n };\n const notifications: Readonly<\n Record<string, (params: Record<string, unknown>) => void>\n > = {\n \"turn/started\": (params) => {\n const id = asRecord(params.turn).id;\n if (typeof id === \"string\") turn = id;\n },\n \"turn/completed\": () => {\n turn = undefined;\n },\n };\n return {\n encode(value) {\n if (!thread || !accepted) {\n queued.push(value);\n return \"\";\n }\n return steer(value);\n },\n read(output) {\n const message = decodeRecord(output);\n if (!message) return none;\n const method =\n typeof message.method === \"string\" ? message.method : undefined;\n if (message.id !== undefined && method)\n return {\n consumed: 0,\n replies: [\n line({ id: message.id, error: codexAppUnsupportedRequest }),\n ],\n };\n const id = typeof message.id === \"string\" ? message.id : undefined;\n if (method) {\n notifications[method]?.(asRecord(message.params));\n return none;\n }\n if (id === undefined) return none;\n const prefix = Object.values(codexAppRequests).find((value) =>\n id.startsWith(`${value}-`),\n );\n const handler = prefix ? responses[prefix] : undefined;\n return (\n handler?.(asRecord(message.result), message.error !== undefined, id) ??\n none\n );\n },\n };\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codex-profile.js","sourceRoot":"","sources":["../../../../src/adapters/agents/codex/codex-profile.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,qBAAqB,CACnC,OAAiC;IAEjC,IAAI,OAAO,EAAE,YAAY,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;IACnD,OAAO;QACL,IAAI;QACJ,0BAA0B,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE;KACjE,CAAC;AACJ,CAAC","sourcesContent":["import type { AgentProfile } from \"../../../domain/agent-profile.types.ts\";\n\nexport function codexProfileArguments(\n profile: AgentProfile | undefined,\n): readonly string[] {\n if (profile?.instructions === undefined) return [];\n return [\n \"-c\",\n `developer_instructions=${JSON.stringify(profile.instructions)}`,\n ];\n}\n"]}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { codexAppInitialize } from "./codex-app-session.js";
|
|
2
2
|
import { codexMcpArguments } from "./codex-mcp.js";
|
|
3
|
+
import { codexProfileArguments } from "./codex-profile.js";
|
|
3
4
|
import { codexProvider } from "./codex-provider.js";
|
|
4
5
|
import { validateContinuation } from "../continuation.js";
|
|
5
6
|
export function codexRequest(settings, input) {
|
|
6
7
|
validateContinuation(input);
|
|
7
|
-
const mcp =
|
|
8
|
+
const mcp = [
|
|
9
|
+
...codexMcpArguments(settings.mcpServers),
|
|
10
|
+
...codexProfileArguments(settings.profile),
|
|
11
|
+
];
|
|
8
12
|
if (input.liveInput && !input.interactive)
|
|
9
13
|
return {
|
|
10
14
|
executable: "codex",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex-request.js","sourceRoot":"","sources":["../../../../src/adapters/agents/codex/codex-request.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE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";\nimport type { Command } from \"../../../domain/command.types.ts\";\nimport { codexAppInitialize } from \"./codex-app-session.ts\";\nimport { codexMcpArguments } from \"./codex-mcp.ts\";\nimport { codexProfileArguments } from \"./codex-profile.ts\";\nimport { codexProvider } from \"./codex-provider.ts\";\nimport { validateContinuation } from \"../continuation.ts\";\nimport type { Bound, CodexSettings } from \"../settings.types.ts\";\n\nexport function codexRequest(\n settings: Bound<CodexSettings>,\n input: AgentInput,\n): Command {\n validateContinuation(input);\n const mcp = [\n ...codexMcpArguments(settings.mcpServers),\n ...codexProfileArguments(settings.profile),\n ];\n if (input.liveInput && !input.interactive)\n return {\n executable: \"codex\",\n arguments: [...codexProvider(settings), ...mcp, \"app-server\"],\n stdin: codexAppInitialize(),\n };\n const args: string[] = [...codexProvider(settings), ...mcp];\n if (settings.approvalReviewer === \"auto_review\")\n args.push(\n \"-a\",\n \"on-request\",\n \"-s\",\n \"danger-full-access\",\n \"-c\",\n 'approvals_reviewer=\"auto_review\"',\n );\n if (settings.approvalReviewer !== \"auto_review\" && !input.interactive)\n args.push(\"--dangerously-bypass-approvals-and-sandbox\");\n if (settings.model) args.push(\"--model\", settings.model.name);\n if (settings.model?.reasoning)\n args.push(\"-c\", `model_reasoning_effort=\"${settings.model.reasoning}\"`);\n if (!input.interactive) args.push(\"exec\");\n if (input.continuation)\n args.push(\n input.continuation.fork ? \"fork\" : \"resume\",\n input.continuation.id,\n );\n if (!input.interactive) args.push(\"--json\", \"-\");\n if (input.interactive && input.text !== undefined)\n args.push(\"--\", input.text);\n return {\n executable: \"codex\",\n arguments: args,\n ...(input.interactive\n ? { interactive: true }\n : { stdin: input.text ?? \"\" }),\n };\n}\n"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { rejectProfileTools } from "../profile-support.js";
|
|
1
2
|
import { createCopilotConversations, copilotSessionProfile, } from "./copilot-conversations.js";
|
|
2
3
|
import { copilotLabel, copilotMcpSupport, copilotModelSupport, copilotQuotaPatterns, copilotUnavailablePatterns, } from "./copilot.constants.js";
|
|
3
4
|
import { mcpConfigurationPlanner, supportMcpServers, } from "../mcp-configuration.js";
|
|
@@ -13,6 +14,7 @@ import { copilotRequest } from "./copilot-request.js";
|
|
|
13
14
|
import { configuredSettings, harnessSettings, supportModel, } from "../model-support.js";
|
|
14
15
|
function bindCopilot(settings) {
|
|
15
16
|
supportModel(copilotModelSupport, settings.model);
|
|
17
|
+
rejectProfileTools(copilotLabel, settings.profile);
|
|
16
18
|
supportMcpServers(copilotMcpSupport, settings.mcpServers);
|
|
17
19
|
const credentials = credentialPlanner(copilotLabel, copilotCredentials, settings.authentication, settings.model);
|
|
18
20
|
const configuration = mcpConfigurationPlanner(copilotLabel, settings.mcpServers);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copilot-adapter.js","sourceRoot":"","sources":["../../../../src/adapters/agents/copilot/copilot-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAC1B,qBAAqB,GACtB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,0BAA0B,GAC3B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,uBAAuB,EACvB,iBAAiB,GAClB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EACL,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAG9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE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QACD,KAAK,EAAE,SAAS;QAChB,YAAY,EAAE,CAAC,YAAY,EAAE,EAAE,CAC7B,mBAAmB,CAAC,SAAS,EAAE,YAAY,CAAC;QAC9C,WAAW,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,kBAAkB,CAAC,IAAI,EAAE,YAAY,CAAC;KACvC,CAAC,CAAC;AAC5B,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,WAA4B,EAAE;IAE9B,eAAe,CAAC,QAAQ,CAAC,CAAC;IAC1B,oBAAoB,CAAC,YAAY,EAAE,qBAAqB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC3E,MAAM,UAAU,GAAG,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IAChD,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,IAAI,EAAE,KAAK;QACX,IAAI,EAAE,CAAC,KAAkB,EAAE,EAAE,CAC3B,WAAW,CAAC;YACV,GAAG,UAAU;YACb,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC;SAC1C,CAAC;KACL,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {\n createCopilotConversations,\n copilotSessionProfile,\n} from \"./copilot-conversations.ts\";\nimport {\n copilotLabel,\n copilotMcpSupport,\n copilotModelSupport,\n copilotQuotaPatterns,\n copilotUnavailablePatterns,\n} from \"./copilot.constants.ts\";\nimport {\n mcpConfigurationPlanner,\n supportMcpServers,\n} from \"../mcp-configuration.ts\";\nimport { textMatcher } from \"../text-matcher.ts\";\nimport {\n conversationSettings,\n conversationStorage,\n} from \"../conversation-settings.ts\";\nimport { transientNoticePatterns } from \"../unavailable.constants.ts\";\nimport { copilotUsage } from \"./copilot-usage.ts\";\nimport { sessionUsageCommand, sessionUsageResult } from \"../session-usage.ts\";\nimport type { AgentAdapter, CliHarness } from \"../../../domain/agent.types.ts\";\nimport type { AgentModel } from \"../../../domain/model.types.ts\";\nimport { credentialPlanner } from \"../authentication.ts\";\nimport { copilotCredentials } from \"./copilot-authentication.ts\";\nimport { copilotEvents } from \"./copilot-events.ts\";\nimport { copilotRequest } from \"./copilot-request.ts\";\nimport type { CopilotSettings } from \"./copilot.types.ts\";\nimport {\n configuredSettings,\n harnessSettings,\n supportModel,\n} from \"../model-support.ts\";\nimport type { Bound } from \"../settings.types.ts\";\n\nfunction bindCopilot(settings: Bound<CopilotSettings>): AgentAdapter {\n supportModel(copilotModelSupport, settings.model);\n supportMcpServers(copilotMcpSupport, settings.mcpServers);\n const credentials = credentialPlanner(\n copilotLabel,\n copilotCredentials,\n settings.authentication,\n settings.model,\n );\n const configuration = mcpConfigurationPlanner(\n copilotLabel,\n settings.mcpServers,\n );\n return Object.freeze({\n name: \"copilot\",\n ...(credentials ? { credentials } : {}),\n ...(configuration ? { configuration } : {}),\n bootstrap: \"copilot\",\n resumable: true,\n forkable: false,\n ...conversationStorage(settings, createCopilotConversations),\n requiresFinishedEvent: true,\n variables: Object.freeze({\n COPILOT_AUTO_UPDATE: \"false\",\n ...settings.variables,\n }),\n request: (input) => copilotRequest(settings, input),\n events: copilotEvents,\n quota: textMatcher(copilotQuotaPatterns),\n unavailable: textMatcher(\n copilotUnavailablePatterns,\n transientNoticePatterns,\n ),\n usage: \"session\",\n usageCommand: (conversation) =>\n sessionUsageCommand(\"copilot\", conversation),\n usageResult: (text) => sessionUsageResult(text, copilotUsage),\n } satisfies AgentAdapter);\n}\n\nexport function createCopilotHarness(\n settings: CopilotSettings = {},\n): CliHarness {\n harnessSettings(settings);\n conversationSettings(copilotLabel, copilotSessionProfile.format, settings);\n const configured = configuredSettings(settings);\n return Object.freeze({\n kind: \"cli\",\n bind: (model?: AgentModel) =>\n bindCopilot({\n ...configured,\n ...(model === undefined ? {} : { model }),\n }),\n });\n}\n"]}
|
|
1
|
+
{"version":3,"file":"copilot-adapter.js","sourceRoot":"","sources":["../../../../src/adapters/agents/copilot/copilot-adapter.ts"],"names":[],"mappings":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AC;IAChD,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,IAAI,EAAE,KAAK;QACX,IAAI,EAAE,CAAC,KAAkB,EAAE,EAAE,CAC3B,WAAW,CAAC;YACV,GAAG,UAAU;YACb,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC;SAC1C,CAAC;KACL,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { rejectProfileTools } from \"../profile-support.ts\";\nimport {\n createCopilotConversations,\n copilotSessionProfile,\n} from \"./copilot-conversations.ts\";\nimport {\n copilotLabel,\n copilotMcpSupport,\n copilotModelSupport,\n copilotQuotaPatterns,\n copilotUnavailablePatterns,\n} from \"./copilot.constants.ts\";\nimport {\n mcpConfigurationPlanner,\n supportMcpServers,\n} from \"../mcp-configuration.ts\";\nimport { textMatcher } from \"../text-matcher.ts\";\nimport {\n conversationSettings,\n conversationStorage,\n} from \"../conversation-settings.ts\";\nimport { transientNoticePatterns } from \"../unavailable.constants.ts\";\nimport { copilotUsage } from \"./copilot-usage.ts\";\nimport { sessionUsageCommand, sessionUsageResult } from \"../session-usage.ts\";\nimport type { AgentAdapter, CliHarness } from \"../../../domain/agent.types.ts\";\nimport type { AgentModel } from \"../../../domain/model.types.ts\";\nimport { credentialPlanner } from \"../authentication.ts\";\nimport { copilotCredentials } from \"./copilot-authentication.ts\";\nimport { copilotEvents } from \"./copilot-events.ts\";\nimport { copilotRequest } from \"./copilot-request.ts\";\nimport type { CopilotSettings } from \"./copilot.types.ts\";\nimport {\n configuredSettings,\n harnessSettings,\n supportModel,\n} from \"../model-support.ts\";\nimport type { Bound } from \"../settings.types.ts\";\n\nfunction bindCopilot(settings: Bound<CopilotSettings>): AgentAdapter {\n supportModel(copilotModelSupport, settings.model);\n rejectProfileTools(copilotLabel, settings.profile);\n supportMcpServers(copilotMcpSupport, settings.mcpServers);\n const credentials = credentialPlanner(\n copilotLabel,\n copilotCredentials,\n settings.authentication,\n settings.model,\n );\n const configuration = mcpConfigurationPlanner(\n copilotLabel,\n settings.mcpServers,\n );\n return Object.freeze({\n name: \"copilot\",\n ...(credentials ? { credentials } : {}),\n ...(configuration ? { configuration } : {}),\n bootstrap: \"copilot\",\n resumable: true,\n forkable: false,\n ...conversationStorage(settings, createCopilotConversations),\n requiresFinishedEvent: true,\n variables: Object.freeze({\n COPILOT_AUTO_UPDATE: \"false\",\n ...settings.variables,\n }),\n request: (input) => copilotRequest(settings, input),\n events: copilotEvents,\n quota: textMatcher(copilotQuotaPatterns),\n unavailable: textMatcher(\n copilotUnavailablePatterns,\n transientNoticePatterns,\n ),\n usage: \"session\",\n usageCommand: (conversation) =>\n sessionUsageCommand(\"copilot\", conversation),\n usageResult: (text) => sessionUsageResult(text, copilotUsage),\n } satisfies AgentAdapter);\n}\n\nexport function createCopilotHarness(\n settings: CopilotSettings = {},\n): CliHarness {\n harnessSettings(settings);\n conversationSettings(copilotLabel, copilotSessionProfile.format, settings);\n const configured = configuredSettings(settings);\n return Object.freeze({\n kind: \"cli\",\n bind: (model?: AgentModel) =>\n bindCopilot({\n ...configured,\n ...(model === undefined ? {} : { model }),\n }),\n });\n}\n"]}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { profileText } from "../profile-support.js";
|
|
1
2
|
import { validId } from "../../../infrastructure/conversations/identity.js";
|
|
2
3
|
import { invariant } from "../../../domain/errors.js";
|
|
3
4
|
import { copilotMcpArguments } from "./copilot-mcp.js";
|
|
4
5
|
export function copilotRequest(settings, input) {
|
|
6
|
+
const text = profileText(settings.profile, input.text);
|
|
5
7
|
invariant(!input.continuation?.fork, "GitHub Copilot CLI does not support automated fork in Outpost");
|
|
6
8
|
const args = [...copilotMcpArguments(settings.mcpServers)];
|
|
7
9
|
if (input.continuation) {
|
|
@@ -15,11 +17,11 @@ export function copilotRequest(settings, input) {
|
|
|
15
17
|
executable: "copilot",
|
|
16
18
|
arguments: [
|
|
17
19
|
...args,
|
|
18
|
-
...(
|
|
20
|
+
...(text === undefined ? [] : ["--interactive", text]),
|
|
19
21
|
],
|
|
20
22
|
interactive: true,
|
|
21
23
|
};
|
|
22
24
|
args.push("--output-format", "json", "--allow-all", "--no-ask-user");
|
|
23
|
-
return { executable: "copilot", arguments: args, stdin:
|
|
25
|
+
return { executable: "copilot", arguments: args, stdin: text ?? "" };
|
|
24
26
|
}
|
|
25
27
|
//# sourceMappingURL=copilot-request.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copilot-request.js","sourceRoot":"","sources":["../../../../src/adapters/agents/copilot/copilot-request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mDAAmD,CAAC;AAG5E,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAIvD,MAAM,UAAU,cAAc,CAC5B,QAAgC,EAChC,KAAiB;IAEjB,SAAS,CACP,CAAC,KAAK,CAAC,YAAY,EAAE,IAAI,EACzB,+DAA+D,CAChE,CAAC;IACF,MAAM,IAAI,GAAa,CAAC,GAAG,mBAAmB,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC;IACrE,IAAI,KAAK,CAAC,YAAY,EAAE,CAAC;QACvB,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;QAC/B,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;IAC/C,CAAC;IACD,IAAI,QAAQ,CAAC,KAAK;QAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC9D,IAAI,KAAK,CAAC,WAAW;QACnB,OAAO;YACL,UAAU,EAAE,SAAS;YACrB,SAAS,EAAE;gBACT,GAAG,IAAI;gBACP,GAAG,CAAC,
|
|
1
|
+
{"version":3,"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E,eAAe,CAAC,CAAC;IACrE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,IAAI,EAAE,EAAE,CAAC;AACvE,CAAC","sourcesContent":["import { profileText } from \"../profile-support.ts\";\nimport { validId } from \"../../../infrastructure/conversations/identity.ts\";\nimport type { AgentInput } from \"../../../domain/agent.types.ts\";\nimport type { Command } from \"../../../domain/command.types.ts\";\nimport { invariant } from \"../../../domain/errors.ts\";\nimport { copilotMcpArguments } from \"./copilot-mcp.ts\";\nimport type { CopilotSettings } from \"./copilot.types.ts\";\nimport type { Bound } from \"../settings.types.ts\";\n\nexport function copilotRequest(\n settings: Bound<CopilotSettings>,\n input: AgentInput,\n): Command {\n const text = profileText(settings.profile, input.text);\n invariant(\n !input.continuation?.fork,\n \"GitHub Copilot CLI does not support automated fork in Outpost\",\n );\n const args: string[] = [...copilotMcpArguments(settings.mcpServers)];\n if (input.continuation) {\n validId(input.continuation.id);\n args.push(\"--resume\", input.continuation.id);\n }\n if (settings.model) args.push(\"--model\", settings.model.name);\n if (input.interactive)\n return {\n executable: \"copilot\",\n arguments: [\n ...args,\n ...(text === undefined ? [] : [\"--interactive\", text]),\n ],\n interactive: true,\n };\n args.push(\"--output-format\", \"json\", \"--allow-all\", \"--no-ask-user\");\n return { executable: \"copilot\", arguments: args, stdin: text ?? \"\" };\n}\n"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AgentProfile } from "../../../domain/agent-profile.types.ts";
|
|
1
2
|
import type { AgentAuthentication } from "../../../domain/agent.types.ts";
|
|
2
3
|
import type { Variables } from "../../../domain/command.types.ts";
|
|
3
4
|
import type { ConversationStore } from "../../../domain/conversation.types.ts";
|
|
@@ -7,4 +8,5 @@ export interface CopilotSettings {
|
|
|
7
8
|
readonly variables?: Variables;
|
|
8
9
|
readonly conversations?: ConversationStore;
|
|
9
10
|
readonly mcpServers?: McpServers;
|
|
11
|
+
readonly profile?: AgentProfile;
|
|
10
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copilot.types.js","sourceRoot":"","sources":["../../../../src/adapters/agents/copilot/copilot.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { AgentAuthentication } from \"../../../domain/agent.types.ts\";\nimport type { Variables } from \"../../../domain/command.types.ts\";\nimport type { ConversationStore } from \"../../../domain/conversation.types.ts\";\nimport type { McpServers } from \"../../../domain/mcp-server.types.ts\";\n\nexport interface CopilotSettings {\n readonly authentication?: AgentAuthentication;\n readonly variables?: Variables;\n readonly conversations?: ConversationStore;\n readonly mcpServers?: McpServers;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"copilot.types.js","sourceRoot":"","sources":["../../../../src/adapters/agents/copilot/copilot.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { AgentProfile } from \"../../../domain/agent-profile.types.ts\";\nimport type { AgentAuthentication } from \"../../../domain/agent.types.ts\";\nimport type { Variables } from \"../../../domain/command.types.ts\";\nimport type { ConversationStore } from \"../../../domain/conversation.types.ts\";\nimport type { McpServers } from \"../../../domain/mcp-server.types.ts\";\n\nexport interface CopilotSettings {\n readonly authentication?: AgentAuthentication;\n readonly variables?: Variables;\n readonly conversations?: ConversationStore;\n readonly mcpServers?: McpServers;\n readonly profile?: AgentProfile;\n}\n"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { rejectProfileTools } from "../profile-support.js";
|
|
1
2
|
import { createKimiConversations, kimiSessionProfile, } from "./kimi-conversations.js";
|
|
2
3
|
import { mcpConfigurationPlanner, supportMcpServers, } from "../mcp-configuration.js";
|
|
3
4
|
import { kimiMcpFile, kimiMcpLogins } from "./kimi-mcp.js";
|
|
@@ -17,10 +18,12 @@ import { kimiRequest } from "./kimi-request.js";
|
|
|
17
18
|
import { configuredSettings, harnessSettings, supportModel, } from "../model-support.js";
|
|
18
19
|
function bindKimi(settings) {
|
|
19
20
|
supportModel(kimiModelSupport, settings.model);
|
|
21
|
+
rejectProfileTools(kimiLabel, settings.profile);
|
|
20
22
|
supportMcpServers(kimiMcpSupport, settings.mcpServers);
|
|
21
23
|
const credentials = credentialPlanner(kimiLabel, kimiCredentials(settings.region), settings.authentication, settings.model);
|
|
22
24
|
const configuration = mcpConfigurationPlanner(kimiLabel, settings.mcpServers, kimiMcpFile, kimiMcpLogins);
|
|
23
25
|
return Object.freeze({
|
|
26
|
+
usageInput: "uncached",
|
|
24
27
|
name: "kimi",
|
|
25
28
|
...(credentials ? { credentials } : {}),
|
|
26
29
|
...(configuration ? { configuration } : {}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kimi-adapter.js","sourceRoot":"","sources":["../../../../src/adapters/agents/kimi/kimi-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,uBAAuB,EACvB,iBAAiB,GAClB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EACL,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EACL,WAAW,EACX,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,qBAAqB,CAAC;AAE7B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,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {\n createKimiConversations,\n kimiSessionProfile,\n} from \"./kimi-conversations.ts\";\nimport {\n mcpConfigurationPlanner,\n supportMcpServers,\n} from \"../mcp-configuration.ts\";\nimport { kimiMcpFile, kimiMcpLogins } from \"./kimi-mcp.ts\";\nimport { textMatcher } from \"../text-matcher.ts\";\nimport {\n conversationSettings,\n conversationStorage,\n} from \"../conversation-settings.ts\";\nimport { transientNoticePatterns } from \"../unavailable.constants.ts\";\nimport { kimiUsage } from \"./kimi-usage.ts\";\nimport { sessionUsageCommand, sessionUsageResult } from \"../session-usage.ts\";\nimport { forkKimi } from \"./kimi-fork.ts\";\nimport type { AgentAdapter, CliHarness } from \"../../../domain/agent.types.ts\";\nimport { invariant } from \"../../../domain/errors.ts\";\nimport { authenticationForm } from \"../../../domain/authentication.ts\";\nimport {\n kimiRegions,\n kimiLabel,\n kimiMcpSupport,\n kimiModelSupport,\n kimiQuotaPatterns,\n kimiUnavailablePatterns,\n} from \"./kimi.constants.ts\";\nimport type { AgentModel } from \"../../../domain/model.types.ts\";\nimport { credentialPlanner } from \"../authentication.ts\";\nimport { kimiCredentials } from \"./kimi-authentication.ts\";\nimport { kimiEvents } from \"./kimi-events.ts\";\nimport { kimiRequest } from \"./kimi-request.ts\";\nimport type { KimiSettings } from \"./kimi.types.ts\";\nimport {\n configuredSettings,\n harnessSettings,\n supportModel,\n} from \"../model-support.ts\";\nimport type { Bound } from \"../settings.types.ts\";\n\nfunction bindKimi(settings: Bound<KimiSettings>): AgentAdapter {\n supportModel(kimiModelSupport, settings.model);\n supportMcpServers(kimiMcpSupport, settings.mcpServers);\n const credentials = credentialPlanner(\n kimiLabel,\n kimiCredentials(settings.region),\n settings.authentication,\n settings.model,\n );\n const configuration = mcpConfigurationPlanner(\n kimiLabel,\n settings.mcpServers,\n kimiMcpFile,\n kimiMcpLogins,\n );\n return Object.freeze({\n name: \"kimi\",\n ...(credentials ? { credentials } : {}),\n ...(configuration ? { configuration } : {}),\n bootstrap: \"kimi\",\n resumable: true,\n forkable: true,\n fork: forkKimi,\n ...conversationStorage(settings, createKimiConversations),\n variables: Object.freeze({\n KIMI_CODE_NO_AUTO_UPDATE: \"1\",\n ...settings.variables,\n }),\n request: (input) => kimiRequest(settings, input),\n events: kimiEvents,\n quota: textMatcher(kimiQuotaPatterns),\n unavailable: textMatcher(kimiUnavailablePatterns, transientNoticePatterns),\n usage: \"session\",\n usageCommand: (conversation) => sessionUsageCommand(\"kimi\", conversation),\n usageResult: (text) => sessionUsageResult(text, kimiUsage),\n } satisfies AgentAdapter);\n}\n\nexport function createKimiHarness(settings: KimiSettings = {}): CliHarness {\n harnessSettings(settings);\n conversationSettings(kimiLabel, kimiSessionProfile.format, settings);\n invariant(\n settings.region === undefined ||\n Object.hasOwn(kimiRegions, settings.region),\n 'Kimi region must be \"mainland-cn\" or \"global\"',\n );\n invariant(\n settings.region === undefined ||\n settings.authentication === undefined ||\n !authenticationForm(settings.authentication).form.startsWith(\"usage\"),\n \"Kimi region selects account authentication; configure the API endpoint through variables for usage authentication\",\n );\n const configured = configuredSettings(settings);\n return Object.freeze({\n kind: \"cli\",\n bind: (model?: AgentModel) =>\n bindKimi({ ...configured, ...(model === undefined ? {} : { model }) }),\n });\n}\n"]}
|
|
1
|
+
{"version":3,"file":"kimi-adapter.js","sourceRoot":"","sources":["../../../../src/adapters/agents/kimi/kimi-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EACL,uBAAuB,EACvB,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,uBAAuB,EACvB,iBAAiB,GAClB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EACL,oBAAoB,EACpB,mBAAmB,GAC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AAM,CAAC,EAC7C,+CAA+C,CAChD,CAAC;IACF,SAAS,CACP,QAAQ,CAAC,MAAM,KAAK,SAAS;QAC3B,QAAQ,CAAC,cAAc,KAAK,SAAS;QACrC,CAAC,kBAAkB,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,EACvE,mHAAmH,CACpH,CAAC;IACF,MAAM,UAAU,GAAG,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IAChD,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,IAAI,EAAE,KAAK;QACX,IAAI,EAAE,CAAC,KAAkB,EAAE,EAAE,CAC3B,QAAQ,CAAC,EAAE,GAAG,UAAU,EAAE,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;KACzE,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { rejectProfileTools } from \"../profile-support.ts\";\nimport {\n createKimiConversations,\n kimiSessionProfile,\n} from \"./kimi-conversations.ts\";\nimport {\n mcpConfigurationPlanner,\n supportMcpServers,\n} from \"../mcp-configuration.ts\";\nimport { kimiMcpFile, kimiMcpLogins } from \"./kimi-mcp.ts\";\nimport { textMatcher } from \"../text-matcher.ts\";\nimport {\n conversationSettings,\n conversationStorage,\n} from \"../conversation-settings.ts\";\nimport { transientNoticePatterns } from \"../unavailable.constants.ts\";\nimport { kimiUsage } from \"./kimi-usage.ts\";\nimport { sessionUsageCommand, sessionUsageResult } from \"../session-usage.ts\";\nimport { forkKimi } from \"./kimi-fork.ts\";\nimport type { AgentAdapter, CliHarness } from \"../../../domain/agent.types.ts\";\nimport { invariant } from \"../../../domain/errors.ts\";\nimport { authenticationForm } from \"../../../domain/authentication.ts\";\nimport {\n kimiRegions,\n kimiLabel,\n kimiMcpSupport,\n kimiModelSupport,\n kimiQuotaPatterns,\n kimiUnavailablePatterns,\n} from \"./kimi.constants.ts\";\nimport type { AgentModel } from \"../../../domain/model.types.ts\";\nimport { credentialPlanner } from \"../authentication.ts\";\nimport { kimiCredentials } from \"./kimi-authentication.ts\";\nimport { kimiEvents } from \"./kimi-events.ts\";\nimport { kimiRequest } from \"./kimi-request.ts\";\nimport type { KimiSettings } from \"./kimi.types.ts\";\nimport {\n configuredSettings,\n harnessSettings,\n supportModel,\n} from \"../model-support.ts\";\nimport type { Bound } from \"../settings.types.ts\";\n\nfunction bindKimi(settings: Bound<KimiSettings>): AgentAdapter {\n supportModel(kimiModelSupport, settings.model);\n rejectProfileTools(kimiLabel, settings.profile);\n supportMcpServers(kimiMcpSupport, settings.mcpServers);\n const credentials = credentialPlanner(\n kimiLabel,\n kimiCredentials(settings.region),\n settings.authentication,\n settings.model,\n );\n const configuration = mcpConfigurationPlanner(\n kimiLabel,\n settings.mcpServers,\n kimiMcpFile,\n kimiMcpLogins,\n );\n return Object.freeze({\n usageInput: \"uncached\",\n name: \"kimi\",\n ...(credentials ? { credentials } : {}),\n ...(configuration ? { configuration } : {}),\n bootstrap: \"kimi\",\n resumable: true,\n forkable: true,\n fork: forkKimi,\n ...conversationStorage(settings, createKimiConversations),\n variables: Object.freeze({\n KIMI_CODE_NO_AUTO_UPDATE: \"1\",\n ...settings.variables,\n }),\n request: (input) => kimiRequest(settings, input),\n events: kimiEvents,\n quota: textMatcher(kimiQuotaPatterns),\n unavailable: textMatcher(kimiUnavailablePatterns, transientNoticePatterns),\n usage: \"session\",\n usageCommand: (conversation) => sessionUsageCommand(\"kimi\", conversation),\n usageResult: (text) => sessionUsageResult(text, kimiUsage),\n } satisfies AgentAdapter);\n}\n\nexport function createKimiHarness(settings: KimiSettings = {}): CliHarness {\n harnessSettings(settings);\n conversationSettings(kimiLabel, kimiSessionProfile.format, settings);\n invariant(\n settings.region === undefined ||\n Object.hasOwn(kimiRegions, settings.region),\n 'Kimi region must be \"mainland-cn\" or \"global\"',\n );\n invariant(\n settings.region === undefined ||\n settings.authentication === undefined ||\n !authenticationForm(settings.authentication).form.startsWith(\"usage\"),\n \"Kimi region selects account authentication; configure the API endpoint through variables for usage authentication\",\n );\n const configured = configuredSettings(settings);\n return Object.freeze({\n kind: \"cli\",\n bind: (model?: AgentModel) =>\n bindKimi({ ...configured, ...(model === undefined ? {} : { model }) }),\n });\n}\n"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { profileText } from "../profile-support.js";
|
|
1
2
|
import { validId } from "../../../infrastructure/conversations/identity.js";
|
|
2
3
|
import { authenticationForm } from "../../../domain/authentication.js";
|
|
3
4
|
import { invariant } from "../../../domain/errors.js";
|
|
@@ -9,6 +10,7 @@ function modelOption(settings) {
|
|
|
9
10
|
return usage ? [] : ["--model", settings.model.name];
|
|
10
11
|
}
|
|
11
12
|
export function kimiRequest(settings, input) {
|
|
13
|
+
const text = profileText(settings.profile, input.text);
|
|
12
14
|
invariant(!input.continuation?.fork, "Kimi Code requires native fork preparation in Outpost");
|
|
13
15
|
const args = [...modelOption(settings)];
|
|
14
16
|
if (input.continuation) {
|
|
@@ -16,7 +18,7 @@ export function kimiRequest(settings, input) {
|
|
|
16
18
|
args.push("--session", input.continuation.id);
|
|
17
19
|
}
|
|
18
20
|
if (input.interactive) {
|
|
19
|
-
invariant(
|
|
21
|
+
invariant(text === undefined, "Kimi Code starts interactive sessions without an initial prompt");
|
|
20
22
|
return { executable: "kimi", arguments: args, interactive: true };
|
|
21
23
|
}
|
|
22
24
|
return {
|
|
@@ -24,7 +26,7 @@ export function kimiRequest(settings, input) {
|
|
|
24
26
|
arguments: [
|
|
25
27
|
...args,
|
|
26
28
|
"--prompt",
|
|
27
|
-
|
|
29
|
+
text ?? "",
|
|
28
30
|
"--output-format",
|
|
29
31
|
"stream-json",
|
|
30
32
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kimi-request.js","sourceRoot":"","sources":["../../../../src/adapters/agents/kimi/kimi-request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,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B;YACjB,aAAa;SACd;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { profileText } from \"../profile-support.ts\";\nimport { validId } from \"../../../infrastructure/conversations/identity.ts\";\nimport type { AgentInput } from \"../../../domain/agent.types.ts\";\nimport { authenticationForm } from \"../../../domain/authentication.ts\";\nimport type { Command } from \"../../../domain/command.types.ts\";\nimport { invariant } from \"../../../domain/errors.ts\";\nimport type { KimiSettings } from \"./kimi.types.ts\";\nimport type { Bound } from \"../settings.types.ts\";\n\nfunction modelOption(settings: Bound<KimiSettings>): readonly string[] {\n if (!settings.model) return [];\n const usage =\n settings.authentication !== undefined &&\n authenticationForm(settings.authentication).form.startsWith(\"usage\");\n return usage ? [] : [\"--model\", settings.model.name];\n}\n\nexport function kimiRequest(\n settings: Bound<KimiSettings>,\n input: AgentInput,\n): Command {\n const text = profileText(settings.profile, input.text);\n invariant(\n !input.continuation?.fork,\n \"Kimi Code requires native fork preparation in Outpost\",\n );\n const args = [...modelOption(settings)];\n if (input.continuation) {\n validId(input.continuation.id);\n args.push(\"--session\", input.continuation.id);\n }\n if (input.interactive) {\n invariant(\n text === undefined,\n \"Kimi Code starts interactive sessions without an initial prompt\",\n );\n return { executable: \"kimi\", arguments: args, interactive: true };\n }\n return {\n executable: \"kimi\",\n arguments: [\n ...args,\n \"--prompt\",\n text ?? \"\",\n \"--output-format\",\n \"stream-json\",\n ],\n };\n}\n"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AgentProfile } from "../../../domain/agent-profile.types.ts";
|
|
1
2
|
import type { AgentAuthentication } from "../../../domain/agent.types.ts";
|
|
2
3
|
import type { Variables } from "../../../domain/command.types.ts";
|
|
3
4
|
import type { ConversationStore } from "../../../domain/conversation.types.ts";
|
|
@@ -8,4 +9,5 @@ export interface KimiSettings {
|
|
|
8
9
|
readonly variables?: Variables;
|
|
9
10
|
readonly conversations?: ConversationStore;
|
|
10
11
|
readonly mcpServers?: McpServers;
|
|
12
|
+
readonly profile?: AgentProfile;
|
|
11
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kimi.types.js","sourceRoot":"","sources":["../../../../src/adapters/agents/kimi/kimi.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { AgentAuthentication } from \"../../../domain/agent.types.ts\";\nimport type { Variables } from \"../../../domain/command.types.ts\";\nimport type { ConversationStore } from \"../../../domain/conversation.types.ts\";\nimport type { McpServers } from \"../../../domain/mcp-server.types.ts\";\n\nexport interface KimiSettings {\n readonly region?: \"mainland-cn\" | \"global\";\n readonly authentication?: AgentAuthentication;\n readonly variables?: Variables;\n readonly conversations?: ConversationStore;\n readonly mcpServers?: McpServers;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"kimi.types.js","sourceRoot":"","sources":["../../../../src/adapters/agents/kimi/kimi.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { AgentProfile } from \"../../../domain/agent-profile.types.ts\";\nimport type { AgentAuthentication } from \"../../../domain/agent.types.ts\";\nimport type { Variables } from \"../../../domain/command.types.ts\";\nimport type { ConversationStore } from \"../../../domain/conversation.types.ts\";\nimport type { McpServers } from \"../../../domain/mcp-server.types.ts\";\n\nexport interface KimiSettings {\n readonly region?: \"mainland-cn\" | \"global\";\n readonly authentication?: AgentAuthentication;\n readonly variables?: Variables;\n readonly conversations?: ConversationStore;\n readonly mcpServers?: McpServers;\n readonly profile?: AgentProfile;\n}\n"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { agentProfile, profileMcpServers } from "../../domain/agent-profile.js";
|
|
1
2
|
import { invariant } from "../../domain/errors.js";
|
|
2
3
|
import { mcpServers } from "../../domain/mcp-server.js";
|
|
3
4
|
import { HARNESS_MODEL_KEYS } from "./model-support.constants.js";
|
|
@@ -11,12 +12,13 @@ export function harnessSettings(settings) {
|
|
|
11
12
|
}
|
|
12
13
|
export function configuredSettings(settings) {
|
|
13
14
|
harnessSettings(settings);
|
|
15
|
+
const profile = agentProfile(settings.profile);
|
|
16
|
+
const servers = profileMcpServers(profile, settings.mcpServers);
|
|
14
17
|
return Object.freeze({
|
|
15
18
|
...settings,
|
|
16
19
|
variables: Object.freeze({ ...settings.variables }),
|
|
17
|
-
...(
|
|
18
|
-
|
|
19
|
-
: { mcpServers: mcpServers(settings.mcpServers) }),
|
|
20
|
+
...(profile === undefined ? {} : { profile }),
|
|
21
|
+
...(servers === undefined ? {} : { mcpServers: mcpServers(servers) }),
|
|
20
22
|
});
|
|
21
23
|
}
|
|
22
24
|
//# sourceMappingURL=model-support.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-support.js","sourceRoot":"","sources":["../../../src/adapters/agents/model-support.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAExD,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAMlE,MAAM,UAAU,YAAY,CAC1B,OAAwB,EACxB,KAA6B;IAE7B,SAAS,CACP,KAAK,EAAE,SAAS,KAAK,SAAS,IAAI,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,EACxE,GAAG,OAAO,CAAC,KAAK,gCAAgC,KAAK,EAAE,SAAS,GAAG,CACpE,CAAC;IACF,SAAS,CACP,KAAK,EAAE,eAAe,KAAK,SAAS,IAAI,OAAO,CAAC,eAAe,EAC/D,GAAG,OAAO,CAAC,KAAK,mCAAmC,CACpD,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,QAAgB;IAC9C,SAAS,CACP,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ,EACxC,oCAAoC,CACrC,CAAC;IACF,SAAS,CACP,kBAAkB,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,QAAQ,CAAC,CAAC,EACrD,mFAAmF,CACpF,CAAC;AACJ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kB;IAElB,eAAe,CAAC,QAAQ,CAAC,CAAC;IAC1B,MAAM,OAAO,GAAG,YAAY,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC/C,MAAM,OAAO,GAAG,iBAAiB,CAAC,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC;IAChE,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,GAAG,QAAQ;QACX,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,QAAQ,CAAC,SAAS,EAAE,CAAC;QACnD,GAAG,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC;QAC7C,GAAG,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;KACtE,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { agentProfile, profileMcpServers } from \"../../domain/agent-profile.ts\";\nimport { invariant } from \"../../domain/errors.ts\";\nimport { mcpServers } from \"../../domain/mcp-server.ts\";\nimport type { AgentModel } from \"../../domain/model.types.ts\";\nimport { HARNESS_MODEL_KEYS } from \"./model-support.constants.ts\";\nimport type {\n CliModelSupport,\n ConfigurableSettings,\n} from \"./settings.types.ts\";\n\nexport function supportModel(\n support: CliModelSupport,\n model: AgentModel | undefined,\n): void {\n invariant(\n model?.reasoning === undefined || support.reasoning.has(model.reasoning),\n `${support.agent} does not support reasoning \"${model?.reasoning}\"`,\n );\n invariant(\n model?.maxOutputTokens === undefined || support.maxOutputTokens,\n `${support.agent} does not support maxOutputTokens`,\n );\n}\n\nexport function harnessSettings(settings: object): void {\n invariant(\n settings && typeof settings === \"object\",\n \"Harness settings must be an object\",\n );\n invariant(\n HARNESS_MODEL_KEYS.every((key) => !(key in settings)),\n \"Set the model, reasoning and maxOutputTokens on createAgent(), not on its harness\",\n );\n}\n\nexport function configuredSettings<Settings extends ConfigurableSettings>(\n settings: Settings,\n): Settings {\n harnessSettings(settings);\n const profile = agentProfile(settings.profile);\n const servers = profileMcpServers(profile, settings.mcpServers);\n return Object.freeze({\n ...settings,\n variables: Object.freeze({ ...settings.variables }),\n ...(profile === undefined ? {} : { profile }),\n ...(servers === undefined ? {} : { mcpServers: mcpServers(servers) }),\n });\n}\n"]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { AgentProfile } from "../../domain/agent-profile.types.ts";
|
|
2
|
+
export declare function rejectProfileTools(agent: string, profile: AgentProfile | undefined): void;
|
|
3
|
+
export declare function profileText(profile: AgentProfile | undefined, text: string | undefined): string | undefined;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { invariant } from "../../domain/errors.js";
|
|
2
|
+
export function rejectProfileTools(agent, profile) {
|
|
3
|
+
invariant(profile?.allowedTools === undefined, `${agent} does not support agent profile allowedTools; use the Outpost harness or Claude Code`);
|
|
4
|
+
}
|
|
5
|
+
export function profileText(profile, text) {
|
|
6
|
+
if (profile?.instructions === undefined)
|
|
7
|
+
return text;
|
|
8
|
+
return `${profile.instructions}\n\n${text ?? ""}`;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=profile-support.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile-support.js","sourceRoot":"","sources":["../../../src/adapters/agents/profile-support.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAGnD,MAAM,UAAU,kBAAkB,CAChC,KAAa,EACb,OAAiC;IAEjC,SAAS,CACP,OAAO,EAAE,YAAY,KAAK,SAAS,EACnC,GAAG,KAAK,sFAAsF,CAC/F,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,WAAW,CACzB,OAAiC,EACjC,IAAwB;IAExB,IAAI,OAAO,EAAE,YAAY,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IACrD,OAAO,GAAG,OAAO,CAAC,YAAY,OAAO,IAAI,IAAI,EAAE,EAAE,CAAC;AACpD,CAAC","sourcesContent":["import { invariant } from \"../../domain/errors.ts\";\nimport type { AgentProfile } from \"../../domain/agent-profile.types.ts\";\n\nexport function rejectProfileTools(\n agent: string,\n profile: AgentProfile | undefined,\n): void {\n invariant(\n profile?.allowedTools === undefined,\n `${agent} does not support agent profile allowedTools; use the Outpost harness or Claude Code`,\n );\n}\n\nexport function profileText(\n profile: AgentProfile | undefined,\n text: string | undefined,\n): string | undefined {\n if (profile?.instructions === undefined) return text;\n return `${profile.instructions}\\n\\n${text ?? \"\"}`;\n}\n"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AgentProfile } from "../../domain/agent-profile.types.ts";
|
|
1
2
|
import type { AgentAuthentication } from "../../domain/agent.types.ts";
|
|
2
3
|
import type { Variables } from "../../domain/command.types.ts";
|
|
3
4
|
import type { ConversationStore } from "../../domain/conversation.types.ts";
|
|
@@ -9,6 +10,7 @@ export interface CommonAgentSettings {
|
|
|
9
10
|
readonly saveConversations?: boolean;
|
|
10
11
|
readonly conversations?: ConversationStore;
|
|
11
12
|
readonly mcpServers?: McpServers;
|
|
13
|
+
readonly profile?: AgentProfile;
|
|
12
14
|
}
|
|
13
15
|
export interface ConversationSettings {
|
|
14
16
|
readonly conversations?: ConversationStore;
|
|
@@ -29,6 +31,7 @@ export interface CodexSettings extends CommonAgentSettings {
|
|
|
29
31
|
export interface ConfigurableSettings {
|
|
30
32
|
readonly variables?: Variables;
|
|
31
33
|
readonly mcpServers?: McpServers;
|
|
34
|
+
readonly profile?: AgentProfile;
|
|
32
35
|
}
|
|
33
36
|
export type Bound<Settings> = Settings & {
|
|
34
37
|
readonly model?: AgentModel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.types.js","sourceRoot":"","sources":["../../../src/adapters/agents/settings.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { AgentAuthentication } from \"../../domain/agent.types.ts\";\nimport type { Variables } from \"../../domain/command.types.ts\";\nimport type { ConversationStore } from \"../../domain/conversation.types.ts\";\nimport type { McpServers } from \"../../domain/mcp-server.types.ts\";\nimport type { AgentModel, ModelReasoning } from \"../../domain/model.types.ts\";\n\nexport interface CommonAgentSettings {\n readonly authentication?: AgentAuthentication;\n readonly variables?: Variables;\n readonly saveConversations?: boolean;\n readonly conversations?: ConversationStore;\n readonly mcpServers?: McpServers;\n}\n\nexport interface ConversationSettings {\n readonly conversations?: ConversationStore;\n readonly saveConversations?: boolean;\n}\n\nexport interface ClaudeSettings extends CommonAgentSettings {\n readonly partialMessages?: boolean;\n readonly permissions?:\n | \"default\"\n | \"acceptEdits\"\n | \"plan\"\n | \"auto\"\n | \"dontAsk\"\n | \"bypassPermissions\";\n}\n\nexport interface CodexModelProvider {\n readonly baseUrl: string;\n readonly apiKeyEnvironment?: string | false;\n}\n\nexport interface CodexSettings extends CommonAgentSettings {\n readonly modelProvider?: CodexModelProvider;\n readonly approvalReviewer?: \"user\" | \"auto_review\";\n}\n\nexport interface ConfigurableSettings {\n readonly variables?: Variables;\n readonly mcpServers?: McpServers;\n}\n\nexport type Bound<Settings> = Settings & { readonly model?: AgentModel };\n\nexport interface CliModelSupport {\n readonly agent: string;\n readonly reasoning: ReadonlySet<ModelReasoning>;\n readonly maxOutputTokens: boolean;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"settings.types.js","sourceRoot":"","sources":["../../../src/adapters/agents/settings.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { AgentProfile } from \"../../domain/agent-profile.types.ts\";\nimport type { AgentAuthentication } from \"../../domain/agent.types.ts\";\nimport type { Variables } from \"../../domain/command.types.ts\";\nimport type { ConversationStore } from \"../../domain/conversation.types.ts\";\nimport type { McpServers } from \"../../domain/mcp-server.types.ts\";\nimport type { AgentModel, ModelReasoning } from \"../../domain/model.types.ts\";\n\nexport interface CommonAgentSettings {\n readonly authentication?: AgentAuthentication;\n readonly variables?: Variables;\n readonly saveConversations?: boolean;\n readonly conversations?: ConversationStore;\n readonly mcpServers?: McpServers;\n readonly profile?: AgentProfile;\n}\n\nexport interface ConversationSettings {\n readonly conversations?: ConversationStore;\n readonly saveConversations?: boolean;\n}\n\nexport interface ClaudeSettings extends CommonAgentSettings {\n readonly partialMessages?: boolean;\n readonly permissions?:\n | \"default\"\n | \"acceptEdits\"\n | \"plan\"\n | \"auto\"\n | \"dontAsk\"\n | \"bypassPermissions\";\n}\n\nexport interface CodexModelProvider {\n readonly baseUrl: string;\n readonly apiKeyEnvironment?: string | false;\n}\n\nexport interface CodexSettings extends CommonAgentSettings {\n readonly modelProvider?: CodexModelProvider;\n readonly approvalReviewer?: \"user\" | \"auto_review\";\n}\n\nexport interface ConfigurableSettings {\n readonly variables?: Variables;\n readonly mcpServers?: McpServers;\n readonly profile?: AgentProfile;\n}\n\nexport type Bound<Settings> = Settings & { readonly model?: AgentModel };\n\nexport interface CliModelSupport {\n readonly agent: string;\n readonly reasoning: ReadonlySet<ModelReasoning>;\n readonly maxOutputTokens: boolean;\n}\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const modelPriceEndpoints: {
|
|
2
|
+
readonly "models.dev": "https://models.dev/api.json?type=all";
|
|
3
|
+
readonly openrouter: "https://openrouter.ai/api/v1/models";
|
|
4
|
+
};
|
|
5
|
+
export declare const modelPriceDefaults: {
|
|
6
|
+
readonly source: "models.dev";
|
|
7
|
+
readonly currency: "USD";
|
|
8
|
+
readonly timeoutMs: 15000;
|
|
9
|
+
readonly maxResponseBytes: number;
|
|
10
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export const modelPriceEndpoints = {
|
|
2
|
+
"models.dev": "https://models.dev/api.json?type=all",
|
|
3
|
+
openrouter: "https://openrouter.ai/api/v1/models",
|
|
4
|
+
};
|
|
5
|
+
export const modelPriceDefaults = {
|
|
6
|
+
source: "models.dev",
|
|
7
|
+
currency: "USD",
|
|
8
|
+
timeoutMs: 15_000,
|
|
9
|
+
maxResponseBytes: 32 * 1024 * 1024,
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=model-prices.constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-prices.constants.js","sourceRoot":"","sources":["../../../src/adapters/models/model-prices.constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,YAAY,EAAE,sCAAsC;IACpD,UAAU,EAAE,qCAAqC;CACzC,CAAC;AACX,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,MAAM,EAAE,YAAY;IACpB,QAAQ,EAAE,KAAK;IACf,SAAS,EAAE,MAAM;IACjB,gBAAgB,EAAE,EAAE,GAAG,IAAI,GAAG,IAAI;CAC1B,CAAC","sourcesContent":["export const modelPriceEndpoints = {\n \"models.dev\": \"https://models.dev/api.json?type=all\",\n openrouter: \"https://openrouter.ai/api/v1/models\",\n} as const;\nexport const modelPriceDefaults = {\n source: \"models.dev\",\n currency: \"USD\",\n timeoutMs: 15_000,\n maxResponseBytes: 32 * 1024 * 1024,\n} as const;\n"]}
|