@wjarka/cezarion 0.16.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -0
- package/README.md +594 -207
- package/dist/agent-config/account-identity.d.ts +3 -19
- package/dist/agent-config/account-identity.js +8 -5
- package/dist/agent-config/account-identity.js.map +1 -1
- package/dist/agent-config/catalog.d.ts +3 -14
- package/dist/agent-config/catalog.js.map +1 -1
- package/dist/agent-config/files.d.ts +2 -6
- package/dist/agent-config/files.js +2 -6
- package/dist/agent-config/files.js.map +1 -1
- package/dist/agent-config/model-settings/types.d.ts +1 -1
- package/dist/agent-config/seed.d.ts +11 -3
- package/dist/agent-config/seed.js +52 -48
- package/dist/agent-config/seed.js.map +1 -1
- package/dist/agent-config/service.js +3 -2
- package/dist/agent-config/service.js.map +1 -1
- package/dist/agent-config/validate.d.ts +1 -4
- package/dist/agent-config/validate.js.map +1 -1
- package/dist/application-update/helper.d.ts +2 -2
- package/dist/application-update/helper.js +7 -12
- package/dist/application-update/helper.js.map +1 -1
- package/dist/application-update/launcher.d.ts +4 -0
- package/dist/application-update/launcher.js +18 -12
- package/dist/application-update/launcher.js.map +1 -1
- package/dist/application-update/service.d.ts +3 -3
- package/dist/application-update/service.js +1 -1
- package/dist/application-update/service.js.map +1 -1
- package/dist/archive-on-merge-setting.d.ts +15 -0
- package/dist/archive-on-merge-setting.js +14 -0
- package/dist/archive-on-merge-setting.js.map +1 -0
- package/dist/artifacts/cli.d.ts +8 -0
- package/dist/artifacts/cli.js +21 -2
- package/dist/artifacts/cli.js.map +1 -1
- package/dist/artifacts/resolve.js +2 -1
- package/dist/artifacts/resolve.js.map +1 -1
- package/dist/artifacts/store.js.map +1 -1
- package/dist/automations/automation-cli.d.ts +59 -0
- package/dist/automations/automation-cli.js +509 -0
- package/dist/automations/automation-cli.js.map +1 -0
- package/dist/automations/builtin-skill.d.ts +7 -0
- package/dist/automations/builtin-skill.js +14 -0
- package/dist/automations/builtin-skill.js.map +1 -0
- package/dist/automations/github-baseline.d.ts +3 -0
- package/dist/automations/github-baseline.js +17 -0
- package/dist/automations/github-baseline.js.map +1 -0
- package/dist/automations/github-poller.d.ts +23 -4
- package/dist/automations/github-poller.js +157 -88
- package/dist/automations/github-poller.js.map +1 -1
- package/dist/automations/prompts.d.ts +12 -0
- package/dist/automations/prompts.js +160 -0
- package/dist/automations/prompts.js.map +1 -0
- package/dist/automations/schedule-runner.d.ts +43 -24
- package/dist/automations/schedule-runner.js +207 -20
- package/dist/automations/schedule-runner.js.map +1 -1
- package/dist/automations/scheduler.d.ts +10 -2
- package/dist/automations/scheduler.js +200 -54
- package/dist/automations/scheduler.js.map +1 -1
- package/dist/automations/service.d.ts +777 -0
- package/dist/automations/service.js +444 -0
- package/dist/automations/service.js.map +1 -0
- package/dist/automations/store.d.ts +17 -7
- package/dist/automations/store.js +88 -17
- package/dist/automations/store.js.map +1 -1
- package/dist/automations/task-template.d.ts +7 -2
- package/dist/automations/task-template.js +93 -44
- package/dist/automations/task-template.js.map +1 -1
- package/dist/automations/tool-adapter.d.ts +6 -0
- package/dist/automations/tool-adapter.js +108 -0
- package/dist/automations/tool-adapter.js.map +1 -0
- package/dist/automations/types.d.ts +1 -405
- package/dist/automations/types.js +1 -218
- package/dist/automations/types.js.map +1 -1
- package/dist/autosave-cleanup.d.ts +26 -0
- package/dist/autosave-cleanup.js +87 -0
- package/dist/autosave-cleanup.js.map +1 -0
- package/dist/autosave-git.d.ts +3 -0
- package/dist/autosave-git.js +67 -35
- package/dist/autosave-git.js.map +1 -1
- package/dist/autosave-group.d.ts +8 -0
- package/dist/autosave-group.js +61 -0
- package/dist/autosave-group.js.map +1 -0
- package/dist/autosave-holders.d.ts +31 -4
- package/dist/autosave-holders.js +92 -7
- package/dist/autosave-holders.js.map +1 -1
- package/dist/autosave-windows.d.ts +14 -0
- package/dist/autosave-windows.js +36 -2
- package/dist/autosave-windows.js.map +1 -1
- package/dist/ci-wait/client.d.ts +20 -3
- package/dist/ci-wait/client.js +40 -44
- package/dist/ci-wait/client.js.map +1 -1
- package/dist/ci-wait/controller.d.ts +622 -36
- package/dist/ci-wait/controller.js +152 -20
- package/dist/ci-wait/controller.js.map +1 -1
- package/dist/ci-wait/errors.d.ts +19 -0
- package/dist/ci-wait/errors.js +180 -2
- package/dist/ci-wait/errors.js.map +1 -1
- package/dist/ci-wait/github.d.ts +25 -1
- package/dist/ci-wait/github.js +76 -9
- package/dist/ci-wait/github.js.map +1 -1
- package/dist/ci-wait/mcp.d.ts +0 -1
- package/dist/ci-wait/mcp.js +0 -2
- package/dist/ci-wait/mcp.js.map +1 -1
- package/dist/ci-wait/supervisor.d.ts +7 -0
- package/dist/ci-wait/supervisor.js +113 -17
- package/dist/ci-wait/supervisor.js.map +1 -1
- package/dist/ci-wait/tools.d.ts +536 -16
- package/dist/ci-wait/tools.js +165 -20
- package/dist/ci-wait/tools.js.map +1 -1
- package/dist/config.d.ts +3 -17
- package/dist/config.js +4 -60
- package/dist/config.js.map +1 -1
- package/dist/contract/active-provider.d.ts +12 -0
- package/dist/contract/agent-profiles.d.ts +2 -10
- package/dist/contract/ask-schema.d.ts +22 -4
- package/dist/contract/ask.d.ts +6 -4
- package/dist/contract/attachments.d.ts +35 -0
- package/dist/contract/attention.d.ts +46 -37
- package/dist/contract/automation-requests.d.ts +308 -0
- package/dist/contract/automation-schedule.d.ts +40 -11
- package/dist/contract/automation-storage.d.ts +512 -0
- package/dist/contract/automations.d.ts +421 -40
- package/dist/contract/ci-wait.d.ts +41 -4
- package/dist/contract/config-requests.d.ts +36 -0
- package/dist/contract/conversations.d.ts +24 -10
- package/dist/contract/defined.d.ts +8 -0
- package/dist/contract/delegation.d.ts +312 -8
- package/dist/contract/events.d.ts +24 -3
- package/dist/contract/github-requests.d.ts +26 -0
- package/dist/contract/github.d.ts +60 -27
- package/dist/contract/handoff.d.ts +43 -0
- package/dist/contract/health.d.ts +2 -2
- package/dist/contract/image-path.d.ts +6 -0
- package/dist/contract/index.d.ts +31 -0
- package/dist/contract/index.js +3756 -1525
- package/dist/contract/live-coordination.d.ts +158 -0
- package/dist/contract/live-limits.d.ts +8 -0
- package/dist/contract/live.d.ts +123 -0
- package/dist/contract/pending-ask.d.ts +58 -0
- package/dist/contract/permissions.d.ts +54 -0
- package/dist/contract/preview.d.ts +33 -0
- package/dist/contract/project-limits.d.ts +33 -0
- package/dist/contract/projects.d.ts +486 -20
- package/dist/contract/provider-requests.d.ts +77 -0
- package/dist/contract/query-requests.d.ts +52 -0
- package/dist/contract/repo-requests.d.ts +12 -0
- package/dist/contract/run-labels.d.ts +8 -0
- package/dist/contract/run-limits.d.ts +8 -0
- package/dist/contract/run-predicates.d.ts +32 -0
- package/dist/contract/run-requests.d.ts +33 -0
- package/dist/contract/run-search.d.ts +193 -0
- package/dist/contract/runs.d.ts +2232 -1894
- package/dist/contract/scheduled-tasks.d.ts +187 -0
- package/dist/contract/skills.d.ts +22 -772
- package/dist/contract/team-skill-ref.d.ts +10 -0
- package/dist/{core → contract}/tool-display.d.ts +4 -10
- package/dist/contract/ui-state-requests.d.ts +60 -0
- package/dist/contract/version.d.ts +3 -0
- package/dist/contract/voice.d.ts +213 -0
- package/dist/contract/waits.d.ts +1204 -0
- package/dist/contract/workflow-file.d.ts +37 -0
- package/dist/contract/workflow-requests.d.ts +7 -0
- package/dist/contract/workflows.d.ts +1 -2
- package/dist/contract/workspace.d.ts +34 -82
- package/dist/contract/zoned-time.d.ts +2 -11
- package/dist/core/agent-env.d.ts +4 -16
- package/dist/core/agent-env.js +14 -16
- package/dist/core/agent-env.js.map +1 -1
- package/dist/core/agent-profiles.d.ts +28 -40
- package/dist/core/agent-profiles.js +56 -51
- package/dist/core/agent-profiles.js.map +1 -1
- package/dist/core/agent-runner.d.ts +88 -44
- package/dist/core/agent-runner.js +17 -18
- package/dist/core/agent-runner.js.map +1 -1
- package/dist/core/ask.d.ts +3 -0
- package/dist/core/ask.js +12 -0
- package/dist/core/ask.js.map +1 -1
- package/dist/core/backend-detect.js +16 -2
- package/dist/core/backend-detect.js.map +1 -1
- package/dist/core/claude-cli-runner.d.ts +23 -4
- package/dist/core/claude-cli-runner.js +280 -76
- package/dist/core/claude-cli-runner.js.map +1 -1
- package/dist/core/claude-model-catalog.d.ts +2 -10
- package/dist/core/claude-model-catalog.js +2 -10
- package/dist/core/claude-model-catalog.js.map +1 -1
- package/dist/core/claude-ui-mapper.d.ts +2 -2
- package/dist/core/claude-ui-mapper.js +94 -2
- package/dist/core/claude-ui-mapper.js.map +1 -1
- package/dist/core/codex-app-server-runner.d.ts +3 -4
- package/dist/core/codex-app-server-runner.js +146 -51
- package/dist/core/codex-app-server-runner.js.map +1 -1
- package/dist/core/codex-app-server-transport.d.ts +4 -3
- package/dist/core/codex-app-server-transport.js +11 -7
- package/dist/core/codex-app-server-transport.js.map +1 -1
- package/dist/core/codex-approvals.d.ts +12 -0
- package/dist/core/codex-approvals.js +161 -0
- package/dist/core/codex-approvals.js.map +1 -0
- package/dist/core/codex-permissions.d.ts +1 -1
- package/dist/core/codex-ui-mapper.js +45 -1
- package/dist/core/codex-ui-mapper.js.map +1 -1
- package/dist/core/cursor-acp-runner.d.ts +1 -1
- package/dist/core/cursor-acp-runner.js +39 -15
- package/dist/core/cursor-acp-runner.js.map +1 -1
- package/dist/core/cursor-cli-flags.d.ts +19 -0
- package/dist/core/cursor-cli-flags.js +47 -0
- package/dist/core/cursor-cli-flags.js.map +1 -0
- package/dist/core/cursor-model-catalog.d.ts +22 -0
- package/dist/core/cursor-model-catalog.js +53 -24
- package/dist/core/cursor-model-catalog.js.map +1 -1
- package/dist/core/cursor-print-capabilities.d.ts +16 -0
- package/dist/core/cursor-print-capabilities.js +141 -0
- package/dist/core/cursor-print-capabilities.js.map +1 -0
- package/dist/core/cursor-print-process.d.ts +31 -0
- package/dist/core/cursor-print-process.js +117 -0
- package/dist/core/cursor-print-process.js.map +1 -0
- package/dist/core/cursor-print-runner.d.ts +31 -0
- package/dist/core/cursor-print-runner.js +555 -0
- package/dist/core/cursor-print-runner.js.map +1 -0
- package/dist/core/cursor-print-tool-catalog.d.ts +10 -0
- package/dist/core/cursor-print-tool-catalog.js +91 -0
- package/dist/core/cursor-print-tool-catalog.js.map +1 -0
- package/dist/core/cursor-print-ui-mapper.d.ts +47 -0
- package/dist/core/cursor-print-ui-mapper.js +553 -0
- package/dist/core/cursor-print-ui-mapper.js.map +1 -0
- package/dist/core/cursor-runner.d.ts +24 -0
- package/dist/core/cursor-runner.js +149 -0
- package/dist/core/cursor-runner.js.map +1 -0
- package/dist/core/cursor-ui-mapper.js +5 -2
- package/dist/core/cursor-ui-mapper.js.map +1 -1
- package/dist/core/defined.d.ts +1 -0
- package/dist/core/defined.js +2 -0
- package/dist/core/defined.js.map +1 -0
- package/dist/core/hook-items.d.ts +14 -0
- package/dist/core/hook-items.js +13 -0
- package/dist/core/hook-items.js.map +1 -0
- package/dist/core/host-model-catalog.d.ts +2 -9
- package/dist/core/host-model-catalog.js +2 -9
- package/dist/core/host-model-catalog.js.map +1 -1
- package/dist/core/managed-session.js +15 -3
- package/dist/core/managed-session.js.map +1 -1
- package/dist/core/model-identity.d.ts +4 -21
- package/dist/core/model-identity.js.map +1 -1
- package/dist/core/model-presets.d.ts +2 -13
- package/dist/core/model-presets.js +2 -13
- package/dist/core/model-presets.js.map +1 -1
- package/dist/core/omp-model-catalog.js.map +1 -1
- package/dist/core/omp-runner.d.ts +6 -7
- package/dist/core/omp-runner.js +92 -33
- package/dist/core/omp-runner.js.map +1 -1
- package/dist/core/omp-ui-mapper.js +1 -1
- package/dist/core/omp-ui-mapper.js.map +1 -1
- package/dist/core/opencode-model-catalog.js.map +1 -1
- package/dist/core/opencode-permissions.d.ts +52 -0
- package/dist/core/opencode-permissions.js +101 -0
- package/dist/core/opencode-permissions.js.map +1 -0
- package/dist/core/opencode-server-runner.d.ts +10 -9
- package/dist/core/opencode-server-runner.js +286 -28
- package/dist/core/opencode-server-runner.js.map +1 -1
- package/dist/core/opencode-session-error.d.ts +15 -7
- package/dist/core/opencode-session-error.js +25 -9
- package/dist/core/opencode-session-error.js.map +1 -1
- package/dist/core/opencode-ui-mapper.js +2 -2
- package/dist/core/opencode-ui-mapper.js.map +1 -1
- package/dist/core/pi-model-catalog.js.map +1 -1
- package/dist/core/pi-runner.d.ts +12 -4
- package/dist/core/pi-runner.js +171 -63
- package/dist/core/pi-runner.js.map +1 -1
- package/dist/core/pi-ui-mapper.js +1 -1
- package/dist/core/pi-ui-mapper.js.map +1 -1
- package/dist/core/process-usage.d.ts +5 -0
- package/dist/core/process-usage.js +24 -4
- package/dist/core/process-usage.js.map +1 -1
- package/dist/core/provider-auth.d.ts +16 -107
- package/dist/core/provider-auth.js +16 -132
- package/dist/core/provider-auth.js.map +1 -1
- package/dist/core/runner-factory.d.ts +4 -1
- package/dist/core/runner-factory.js +3 -3
- package/dist/core/runner-factory.js.map +1 -1
- package/dist/core/runner-runtime.d.ts +22 -0
- package/dist/core/runner-runtime.js +66 -5
- package/dist/core/runner-runtime.js.map +1 -1
- package/dist/core/runner-tool-grants.d.ts +21 -0
- package/dist/core/runner-tool-grants.js +64 -0
- package/dist/core/runner-tool-grants.js.map +1 -0
- package/dist/core/secret-redaction.d.ts +3 -20
- package/dist/core/secret-redaction.js +3 -20
- package/dist/core/secret-redaction.js.map +1 -1
- package/dist/core/session-process.d.ts +22 -2
- package/dist/core/session-process.js +170 -12
- package/dist/core/session-process.js.map +1 -1
- package/dist/core/shell-env.d.ts +2 -15
- package/dist/core/shell-env.js +2 -15
- package/dist/core/shell-env.js.map +1 -1
- package/dist/core/ui-events.d.ts +60 -47
- package/dist/core/ui-events.js +0 -23
- package/dist/core/ui-events.js.map +1 -1
- package/dist/core/usage-limit.js.map +1 -1
- package/dist/data-gitignore.js +3 -1
- package/dist/data-gitignore.js.map +1 -1
- package/dist/delegation/capacity.d.ts +4 -8
- package/dist/delegation/capacity.js +4 -8
- package/dist/delegation/capacity.js.map +1 -1
- package/dist/delegation/cli.js +123 -21
- package/dist/delegation/cli.js.map +1 -1
- package/dist/delegation/context.d.ts +19 -3
- package/dist/delegation/context.js +217 -22
- package/dist/delegation/context.js.map +1 -1
- package/dist/delegation/conversations.d.ts +4 -3
- package/dist/delegation/conversations.js +7 -5
- package/dist/delegation/conversations.js.map +1 -1
- package/dist/delegation/destroy-observation.d.ts +1 -1
- package/dist/delegation/destroy-observation.js.map +1 -1
- package/dist/delegation/effort.js.map +1 -1
- package/dist/delegation/execution-identity.d.ts +1 -1
- package/dist/delegation/execution-identity.js +41 -7
- package/dist/delegation/execution-identity.js.map +1 -1
- package/dist/delegation/idle-test-app.d.ts +4 -0
- package/dist/delegation/idle-test-app.js +174 -0
- package/dist/delegation/idle-test-app.js.map +1 -0
- package/dist/delegation/input.js.map +1 -1
- package/dist/delegation/park-notice.d.ts +42 -0
- package/dist/delegation/park-notice.js +71 -0
- package/dist/delegation/park-notice.js.map +1 -0
- package/dist/delegation/policy.d.ts +2 -0
- package/dist/delegation/policy.js +9 -1
- package/dist/delegation/policy.js.map +1 -1
- package/dist/delegation/process-liveness.d.ts +10 -15
- package/dist/delegation/process-liveness.js +11 -35
- package/dist/delegation/process-liveness.js.map +1 -1
- package/dist/delegation/provision.js +21 -19
- package/dist/delegation/provision.js.map +1 -1
- package/dist/delegation/questions.d.ts +3 -1
- package/dist/delegation/questions.js +10 -5
- package/dist/delegation/questions.js.map +1 -1
- package/dist/delegation/readiness.d.ts +2 -2
- package/dist/delegation/results.d.ts +4 -1
- package/dist/delegation/results.js +49 -18
- package/dist/delegation/results.js.map +1 -1
- package/dist/delegation/retry-backoff.d.ts +8 -0
- package/dist/delegation/retry-backoff.js +8 -0
- package/dist/delegation/retry-backoff.js.map +1 -1
- package/dist/delegation/routes.d.ts +114 -30
- package/dist/delegation/routes.js +4 -1
- package/dist/delegation/routes.js.map +1 -1
- package/dist/delegation/scratch-cleanup.d.ts +4 -5
- package/dist/delegation/scratch-cleanup.js +10 -8
- package/dist/delegation/scratch-cleanup.js.map +1 -1
- package/dist/delegation/service.d.ts +12 -4
- package/dist/delegation/service.js +76 -28
- package/dist/delegation/service.js.map +1 -1
- package/dist/delegation/transport.d.ts +154 -70
- package/dist/delegation/wait.d.ts +11 -0
- package/dist/delegation/wait.js +24 -0
- package/dist/delegation/wait.js.map +1 -1
- package/dist/delegation/windows-test-app.d.ts +5 -0
- package/dist/delegation/windows-test-app.js +63 -0
- package/dist/delegation/windows-test-app.js.map +1 -0
- package/dist/delegation/windows-workspace-identity.d.ts +3 -0
- package/dist/delegation/windows-workspace-identity.js +22 -0
- package/dist/delegation/windows-workspace-identity.js.map +1 -0
- package/dist/delegation/workspace.d.ts +5 -10
- package/dist/delegation/workspace.js +136 -75
- package/dist/delegation/workspace.js.map +1 -1
- package/dist/detached-process.d.ts +103 -0
- package/dist/detached-process.js +301 -0
- package/dist/detached-process.js.map +1 -0
- package/dist/discovery/catalog.d.ts +2 -1
- package/dist/discovery/catalog.js.map +1 -1
- package/dist/discovery/cli.js +3 -1
- package/dist/discovery/cli.js.map +1 -1
- package/dist/git-diff-base.d.ts +6 -61
- package/dist/git-diff-base.js +6 -70
- package/dist/git-diff-base.js.map +1 -1
- package/dist/git-index-copy.d.ts +4 -0
- package/dist/git-index-copy.js +10 -0
- package/dist/git-index-copy.js.map +1 -0
- package/dist/git-worktree-lock.d.ts +2 -4
- package/dist/git-worktree-lock.js +2 -4
- package/dist/git-worktree-lock.js.map +1 -1
- package/dist/git-worktree-release.d.ts +2 -2
- package/dist/git-worktree-release.js.map +1 -1
- package/dist/git-worktree.d.ts +47 -76
- package/dist/git-worktree.js +240 -94
- package/dist/git-worktree.js.map +1 -1
- package/dist/handoff.d.ts +51 -41
- package/dist/handoff.js +130 -78
- package/dist/handoff.js.map +1 -1
- package/dist/index.js +60 -39
- package/dist/index.js.map +1 -1
- package/dist/merge-observations.d.ts +13 -0
- package/dist/merge-observations.js +55 -0
- package/dist/merge-observations.js.map +1 -0
- package/dist/open-url.js +4 -14
- package/dist/open-url.js.map +1 -1
- package/dist/paths.d.ts +10 -13
- package/dist/paths.js +36 -17
- package/dist/paths.js.map +1 -1
- package/dist/planner.d.ts +2 -1
- package/dist/planner.js +9 -6
- package/dist/planner.js.map +1 -1
- package/dist/preview/agent-address.d.ts +34 -0
- package/dist/preview/agent-address.js +51 -0
- package/dist/preview/agent-address.js.map +1 -0
- package/dist/preview/agent-marker.d.ts +17 -0
- package/dist/preview/agent-marker.js +71 -0
- package/dist/preview/agent-marker.js.map +1 -0
- package/dist/preview/cdp-proxy.d.ts +54 -0
- package/dist/preview/cdp-proxy.js +151 -0
- package/dist/preview/cdp-proxy.js.map +1 -0
- package/dist/preview/cdp.d.ts +39 -3
- package/dist/preview/cdp.js +155 -57
- package/dist/preview/cdp.js.map +1 -1
- package/dist/preview/chromium.d.ts +18 -6
- package/dist/preview/chromium.js +112 -25
- package/dist/preview/chromium.js.map +1 -1
- package/dist/preview/dev-server.d.ts +1 -1
- package/dist/preview/dev-server.js +20 -44
- package/dist/preview/dev-server.js.map +1 -1
- package/dist/preview/host.d.ts +70 -3
- package/dist/preview/host.js +314 -28
- package/dist/preview/host.js.map +1 -1
- package/dist/preview/registration.d.ts +10 -5
- package/dist/preview/registration.js +2 -0
- package/dist/preview/registration.js.map +1 -1
- package/dist/preview/session.d.ts +2 -0
- package/dist/preview/session.js +10 -0
- package/dist/preview/session.js.map +1 -1
- package/dist/process-wait/exit-file.d.ts +29 -0
- package/dist/process-wait/exit-file.js +67 -0
- package/dist/process-wait/exit-file.js.map +1 -0
- package/dist/process-wait/supervisor.d.ts +30 -0
- package/dist/process-wait/supervisor.js +71 -0
- package/dist/process-wait/supervisor.js.map +1 -0
- package/dist/release/snapshot.d.ts +6 -6
- package/dist/runs/agent-tmpdir.d.ts +51 -36
- package/dist/runs/agent-tmpdir.js +389 -132
- package/dist/runs/agent-tmpdir.js.map +1 -1
- package/dist/runs/auto-name.d.ts +6 -6
- package/dist/runs/auto-name.js +1 -1
- package/dist/runs/auto-name.js.map +1 -1
- package/dist/runs/client-request.d.ts +3 -3
- package/dist/runs/client-request.js +3 -3
- package/dist/runs/client-request.js.map +1 -1
- package/dist/runs/delegation-state.d.ts +11 -2
- package/dist/runs/delegation-state.js.map +1 -1
- package/dist/runs/event-history-agent-context.d.ts +14 -0
- package/dist/runs/event-history-agent-context.js +105 -0
- package/dist/runs/event-history-agent-context.js.map +1 -0
- package/dist/runs/event-history-context.d.ts +15 -0
- package/dist/runs/event-history-context.js +109 -0
- package/dist/runs/event-history-context.js.map +1 -0
- package/dist/runs/event-history.d.ts +4 -1
- package/dist/runs/event-history.js +29 -130
- package/dist/runs/event-history.js.map +1 -1
- package/dist/runs/history-stream.d.ts +2 -0
- package/dist/runs/history-stream.js +62 -0
- package/dist/runs/history-stream.js.map +1 -0
- package/dist/runs/legacy-index.d.ts +6 -19
- package/dist/runs/legacy-index.js +6 -19
- package/dist/runs/legacy-index.js.map +1 -1
- package/dist/runs/live-item-snapshots.d.ts +13 -0
- package/dist/runs/live-item-snapshots.js +79 -0
- package/dist/runs/live-item-snapshots.js.map +1 -0
- package/dist/runs/loaded-run-healing.d.ts +3 -0
- package/dist/runs/loaded-run-healing.js +17 -0
- package/dist/runs/loaded-run-healing.js.map +1 -0
- package/dist/runs/outcome-commit.d.ts +98 -0
- package/dist/runs/outcome-commit.js +132 -0
- package/dist/runs/outcome-commit.js.map +1 -0
- package/dist/runs/pull-requests.d.ts +14 -0
- package/dist/runs/pull-requests.js +96 -0
- package/dist/runs/pull-requests.js.map +1 -0
- package/dist/runs/raw-record.d.ts +3 -15
- package/dist/runs/raw-record.js +3 -15
- package/dist/runs/raw-record.js.map +1 -1
- package/dist/runs/retention.d.ts +2 -2
- package/dist/runs/retention.js +7 -0
- package/dist/runs/retention.js.map +1 -1
- package/dist/runs/review-gate.d.ts +1 -1
- package/dist/runs/review-gate.js.map +1 -1
- package/dist/runs/run-claims.d.ts +2 -9
- package/dist/runs/run-claims.js.map +1 -1
- package/dist/runs/run-database.d.ts +29 -34
- package/dist/runs/run-database.js +124 -46
- package/dist/runs/run-database.js.map +1 -1
- package/dist/runs/run-index.d.ts +6 -25
- package/dist/runs/run-index.js +25 -38
- package/dist/runs/run-index.js.map +1 -1
- package/dist/runs/run-row.d.ts +5 -34
- package/dist/runs/run-row.js +13 -38
- package/dist/runs/run-row.js.map +1 -1
- package/dist/runs/store.d.ts +1597 -744
- package/dist/runs/store.js +1231 -739
- package/dist/runs/store.js.map +1 -1
- package/dist/runs/task-markers.d.ts +1 -0
- package/dist/runs/task-markers.js +5 -1
- package/dist/runs/task-markers.js.map +1 -1
- package/dist/runs/task-refs.d.ts +3 -3
- package/dist/runs/transcript-facts-fold.d.ts +64 -0
- package/dist/runs/transcript-facts-fold.js +109 -0
- package/dist/runs/transcript-facts-fold.js.map +1 -0
- package/dist/runs/transcript-facts-load.d.ts +11 -0
- package/dist/runs/transcript-facts-load.js +66 -0
- package/dist/runs/transcript-facts-load.js.map +1 -0
- package/dist/runs/transcript-facts-queue.d.ts +30 -0
- package/dist/runs/transcript-facts-queue.js +227 -0
- package/dist/runs/transcript-facts-queue.js.map +1 -0
- package/dist/runs/transcript-facts-worker.d.ts +15 -0
- package/dist/runs/transcript-facts-worker.js +26 -0
- package/dist/runs/transcript-facts-worker.js.map +1 -0
- package/dist/runs/transcript-facts.d.ts +13 -51
- package/dist/runs/transcript-facts.js +86 -202
- package/dist/runs/transcript-facts.js.map +1 -1
- package/dist/runs/ui-event-sink.d.ts +5 -30
- package/dist/runs/ui-event-sink.js +8 -30
- package/dist/runs/ui-event-sink.js.map +1 -1
- package/dist/runs/webhook.d.ts +104 -38
- package/dist/runs/webhook.js +180 -77
- package/dist/runs/webhook.js.map +1 -1
- package/dist/server/app-type.d.ts +2 -17
- package/dist/server/archive-on-merge.d.ts +35 -0
- package/dist/server/archive-on-merge.js +202 -0
- package/dist/server/archive-on-merge.js.map +1 -0
- package/dist/server/capabilities.d.ts +3 -15
- package/dist/server/capabilities.js +6 -19
- package/dist/server/capabilities.js.map +1 -1
- package/dist/server/checkout-progress.d.ts +10 -0
- package/dist/server/checkout-progress.js +27 -0
- package/dist/server/checkout-progress.js.map +1 -0
- package/dist/server/checkout.d.ts +10 -19
- package/dist/server/checkout.js +15 -45
- package/dist/server/checkout.js.map +1 -1
- package/dist/server/cockpit-ownership.d.ts +2 -0
- package/dist/server/cockpit-ownership.js +9 -0
- package/dist/server/cockpit-ownership.js.map +1 -1
- package/dist/server/cold-repo-handles.d.ts +2 -7
- package/dist/server/cold-repo-handles.js +2 -7
- package/dist/server/cold-repo-handles.js.map +1 -1
- package/dist/server/completion-actions.d.ts +30 -0
- package/dist/server/completion-actions.js +204 -0
- package/dist/server/completion-actions.js.map +1 -0
- package/dist/server/create-project.d.ts +71 -0
- package/dist/server/create-project.js +448 -0
- package/dist/server/create-project.js.map +1 -0
- package/dist/server/forge/github-filters.d.ts +7 -1
- package/dist/server/forge/github-filters.js +66 -51
- package/dist/server/forge/github-filters.js.map +1 -1
- package/dist/server/forge/github-merge-requirements.d.ts +18 -0
- package/dist/server/forge/github-merge-requirements.js +137 -0
- package/dist/server/forge/github-merge-requirements.js.map +1 -0
- package/dist/server/forge/github.d.ts +98 -111
- package/dist/server/forge/github.js +625 -306
- package/dist/server/forge/github.js.map +1 -1
- package/dist/server/forge/types.d.ts +25 -22
- package/dist/server/fs-browse.d.ts +3 -28
- package/dist/server/fs-browse.js.map +1 -1
- package/dist/server/git-changes.d.ts +5 -15
- package/dist/server/git-changes.js +3 -50
- package/dist/server/git-changes.js.map +1 -1
- package/dist/server/git.d.ts +3 -1
- package/dist/server/git.js +12 -0
- package/dist/server/git.js.map +1 -1
- package/dist/server/github.d.ts +1 -1
- package/dist/server/github.js +1 -1
- package/dist/server/github.js.map +1 -1
- package/dist/server/launch-key.d.ts +2 -4
- package/dist/server/launch-key.js +2 -4
- package/dist/server/launch-key.js.map +1 -1
- package/dist/server/live-routes.d.ts +68 -0
- package/dist/server/live-routes.js +147 -0
- package/dist/server/live-routes.js.map +1 -0
- package/dist/server/open-in-app.d.ts +4 -13
- package/dist/server/open-in-app.js +5 -41
- package/dist/server/open-in-app.js.map +1 -1
- package/dist/server/open-in-targets.d.ts +42 -0
- package/dist/server/open-in-targets.js +110 -0
- package/dist/server/open-in-targets.js.map +1 -0
- package/dist/server/open-in-terminal.d.ts +3 -0
- package/dist/server/open-in-terminal.js +6 -26
- package/dist/server/open-in-terminal.js.map +1 -1
- package/dist/server/preview-cdp-socket.d.ts +21 -0
- package/dist/server/preview-cdp-socket.js +112 -0
- package/dist/server/preview-cdp-socket.js.map +1 -0
- package/dist/server/preview-socket.d.ts +11 -11
- package/dist/server/preview-socket.js +22 -22
- package/dist/server/preview-socket.js.map +1 -1
- package/dist/server/preview-sockets.d.ts +14 -0
- package/dist/server/preview-sockets.js +18 -0
- package/dist/server/preview-sockets.js.map +1 -0
- package/dist/server/project-context.d.ts +54 -18
- package/dist/server/project-context.js +178 -5
- package/dist/server/project-context.js.map +1 -1
- package/dist/server/provider-action-gate.d.ts +0 -2
- package/dist/server/provider-action-gate.js +0 -21
- package/dist/server/provider-action-gate.js.map +1 -1
- package/dist/server/provider-auth-runtime.d.ts +3 -18
- package/dist/server/provider-auth-runtime.js +3 -18
- package/dist/server/provider-auth-runtime.js.map +1 -1
- package/dist/server/repo-branches.d.ts +3 -9
- package/dist/server/repo-branches.js +6 -22
- package/dist/server/repo-branches.js.map +1 -1
- package/dist/server/run-event-feed.d.ts +20 -0
- package/dist/server/run-event-feed.js +190 -0
- package/dist/server/run-event-feed.js.map +1 -0
- package/dist/server/server-deps.d.ts +37 -0
- package/dist/server/server-deps.js +114 -0
- package/dist/server/server-deps.js.map +1 -0
- package/dist/server/server.d.ts +14082 -11998
- package/dist/server/server.js +785 -1647
- package/dist/server/server.js.map +1 -1
- package/dist/server/start-run-options.d.ts +82 -0
- package/dist/server/start-run-options.js +111 -0
- package/dist/server/start-run-options.js.map +1 -0
- package/dist/server/validators.d.ts +3 -29
- package/dist/server/validators.js +1 -2
- package/dist/server/validators.js.map +1 -1
- package/dist/server/ws.d.ts +3 -23
- package/dist/server/ws.js +3 -23
- package/dist/server/ws.js.map +1 -1
- package/dist/server-install/engine.d.ts +6 -9
- package/dist/server-install/engine.js +2 -9
- package/dist/server-install/engine.js.map +1 -1
- package/dist/server-install/platforms/ubuntu-vps.d.ts +1 -1
- package/dist/server-install/state.d.ts +2 -4
- package/dist/server-install/state.js +2 -4
- package/dist/server-install/state.js.map +1 -1
- package/dist/server-install/steps.d.ts +2 -5
- package/dist/server-install/steps.js +3 -6
- package/dist/server-install/steps.js.map +1 -1
- package/dist/server-install/types.d.ts +3 -6
- package/dist/server-install/types.js +2 -5
- package/dist/server-install/types.js.map +1 -1
- package/dist/server-install/ui.d.ts +2 -8
- package/dist/server-install/ui.js +3 -3
- package/dist/server-install/ui.js.map +1 -1
- package/dist/session-context.d.ts +64 -0
- package/dist/session-context.js +264 -0
- package/dist/session-context.js.map +1 -0
- package/dist/skills-provision.d.ts +62 -0
- package/dist/skills-provision.js +325 -0
- package/dist/skills-provision.js.map +1 -0
- package/dist/skills-remote.d.ts +29 -27
- package/dist/skills-remote.js +236 -100
- package/dist/skills-remote.js.map +1 -1
- package/dist/skills.d.ts +25 -36
- package/dist/skills.js +43 -54
- package/dist/skills.js.map +1 -1
- package/dist/subcommands.d.ts +11 -0
- package/dist/subcommands.js +24 -0
- package/dist/subcommands.js.map +1 -0
- package/dist/task-cli/cli.js +78 -25
- package/dist/task-cli/cli.js.map +1 -1
- package/dist/task-cli/discovery.d.ts +4 -2
- package/dist/task-cli/discovery.js +14 -13
- package/dist/task-cli/discovery.js.map +1 -1
- package/dist/task-cli/hint.d.ts +20 -0
- package/dist/task-cli/hint.js +14 -0
- package/dist/task-cli/hint.js.map +1 -0
- package/dist/task-cli/http.d.ts +1 -0
- package/dist/task-cli/http.js +3 -1
- package/dist/task-cli/http.js.map +1 -1
- package/dist/task-cli/projections.d.ts +14 -11
- package/dist/task-cli/projections.js +15 -11
- package/dist/task-cli/projections.js.map +1 -1
- package/dist/task-cli/watch.d.ts +18 -10
- package/dist/task-cli/watch.js +128 -20
- package/dist/task-cli/watch.js.map +1 -1
- package/dist/ui-state.d.ts +17 -3
- package/dist/ui-state.js +56 -9
- package/dist/ui-state.js.map +1 -1
- package/dist/update-check.d.ts +0 -10
- package/dist/update-check.js +1 -16
- package/dist/update-check.js.map +1 -1
- package/dist/voice/decide.d.ts +32 -0
- package/dist/voice/decide.js +297 -0
- package/dist/voice/decide.js.map +1 -0
- package/dist/voice/decision-log.d.ts +52 -0
- package/dist/voice/decision-log.js +107 -0
- package/dist/voice/decision-log.js.map +1 -0
- package/dist/voice/engine.d.ts +119 -0
- package/dist/voice/engine.js +60 -0
- package/dist/voice/engine.js.map +1 -0
- package/dist/voice/fake-engine.d.ts +10 -0
- package/dist/voice/fake-engine.js +192 -0
- package/dist/voice/fake-engine.js.map +1 -0
- package/dist/voice/jev-engine.d.ts +17 -0
- package/dist/voice/jev-engine.js +110 -0
- package/dist/voice/jev-engine.js.map +1 -0
- package/dist/voice/pending-ask.d.ts +17 -0
- package/dist/voice/pending-ask.js +50 -0
- package/dist/voice/pending-ask.js.map +1 -0
- package/dist/voice/routes.d.ts +115 -0
- package/dist/voice/routes.js +91 -0
- package/dist/voice/routes.js.map +1 -0
- package/dist/voice/sentence.d.ts +21 -0
- package/dist/voice/sentence.js +61 -0
- package/dist/voice/sentence.js.map +1 -0
- package/dist/voice/thresholds.d.ts +28 -0
- package/dist/voice/thresholds.js +29 -0
- package/dist/voice/thresholds.js.map +1 -0
- package/dist/webhooks/cli.d.ts +18 -0
- package/dist/webhooks/cli.js +145 -0
- package/dist/webhooks/cli.js.map +1 -0
- package/dist/webhooks/prompt.d.ts +5 -0
- package/dist/webhooks/prompt.js +26 -0
- package/dist/webhooks/prompt.js.map +1 -0
- package/dist/workflows/active-run.d.ts +167 -0
- package/dist/workflows/active-run.js +21 -0
- package/dist/workflows/active-run.js.map +1 -0
- package/dist/workflows/continuation-admission.d.ts +913 -0
- package/dist/workflows/continuation-admission.js +265 -0
- package/dist/workflows/continuation-admission.js.map +1 -0
- package/dist/workflows/execution-account.d.ts +13 -0
- package/dist/workflows/execution-account.js +18 -0
- package/dist/workflows/execution-account.js.map +1 -0
- package/dist/workflows/input-acknowledgement.d.ts +152 -0
- package/dist/workflows/input-acknowledgement.js +38 -0
- package/dist/workflows/input-acknowledgement.js.map +1 -0
- package/dist/workflows/line-order.d.ts +5 -0
- package/dist/workflows/line-order.js +25 -0
- package/dist/workflows/line-order.js.map +1 -0
- package/dist/workflows/outcome-batches.d.ts +20 -0
- package/dist/workflows/outcome-batches.js +25 -0
- package/dist/workflows/outcome-batches.js.map +1 -0
- package/dist/workflows/question-routing.d.ts +8 -0
- package/dist/workflows/question-routing.js +18 -0
- package/dist/workflows/question-routing.js.map +1 -0
- package/dist/workflows/run-scheduling.d.ts +35 -0
- package/dist/workflows/run-scheduling.js +61 -0
- package/dist/workflows/run-scheduling.js.map +1 -0
- package/dist/workflows/run-states.d.ts +190 -0
- package/dist/workflows/run-states.js +295 -0
- package/dist/workflows/run-states.js.map +1 -0
- package/dist/workflows/run.d.ts +1296 -278
- package/dist/workflows/run.js +5730 -3265
- package/dist/workflows/run.js.map +1 -1
- package/dist/workflows/turn-end.d.ts +116 -0
- package/dist/workflows/turn-end.js +68 -0
- package/dist/workflows/turn-end.js.map +1 -0
- package/dist/workflows/types.d.ts +35 -130
- package/dist/workflows/types.js +47 -100
- package/dist/workflows/types.js.map +1 -1
- package/dist/workflows/waits.d.ts +74 -0
- package/dist/workflows/waits.js +197 -0
- package/dist/workflows/waits.js.map +1 -0
- package/dist/workspace/agent-accounts.d.ts +5 -38
- package/dist/workspace/agent-accounts.js +14 -40
- package/dist/workspace/agent-accounts.js.map +1 -1
- package/dist/workspace/agent-profiles.d.ts +40 -16
- package/dist/workspace/agent-profiles.js +77 -17
- package/dist/workspace/agent-profiles.js.map +1 -1
- package/dist/workspace/config.d.ts +48 -49
- package/dist/workspace/config.js +68 -72
- package/dist/workspace/config.js.map +1 -1
- package/dist/workspace/migrations.d.ts +3 -13
- package/dist/workspace/migrations.js.map +1 -1
- package/dist/workspace/projects-cli.d.ts +1 -1
- package/dist/workspace/projects-cli.js.map +1 -1
- package/dist/workspace/projects.d.ts +15 -18
- package/dist/workspace/projects.js +20 -16
- package/dist/workspace/projects.js.map +1 -1
- package/dist/workspace/semaphore.d.ts +11 -45
- package/dist/workspace/semaphore.js +6 -18
- package/dist/workspace/semaphore.js.map +1 -1
- package/dist/workspace/ui-state.d.ts +6 -4
- package/dist/workspace/ui-state.js +6 -4
- package/dist/workspace/ui-state.js.map +1 -1
- package/dist/workspace/webhooks.d.ts +40 -0
- package/dist/workspace/webhooks.js +146 -0
- package/dist/workspace/webhooks.js.map +1 -0
- package/dist/worktree-manifest.d.ts +165 -0
- package/dist/worktree-manifest.js +530 -0
- package/dist/worktree-manifest.js.map +1 -0
- package/dist/worktree-setup.js.map +1 -1
- package/package.json +6 -5
- package/scripts/benchmark-run-store-fixture.ts +7 -3
- package/scripts/check-pack.mjs +3 -1
- package/scripts/inline-contract.mjs +80 -27
- package/scripts/install-as-command.mjs +3 -1
- package/scripts/measure-transcript-facts-health.mjs +87 -0
- package/scripts/measure-transcript-facts-lag.mjs +68 -0
- package/scripts/mock-ci-tool.mjs +49 -6
- package/scripts/mock-claude-model-refusal.mjs +42 -0
- package/scripts/mock-claude.mjs +833 -591
- package/scripts/mock-codex-app-server.mjs +785 -418
- package/scripts/mock-cursor-acp.mjs +296 -125
- package/scripts/mock-cursor-print.mjs +256 -0
- package/scripts/mock-deferred-turn-start.mjs +16 -0
- package/scripts/mock-delivery-control.d.mts +23 -0
- package/scripts/mock-delivery-control.mjs +80 -0
- package/scripts/mock-env-record.mjs +11 -0
- package/scripts/mock-failure-control.d.mts +13 -0
- package/scripts/mock-failure-control.mjs +68 -0
- package/scripts/mock-multi-pr.mjs +7 -0
- package/scripts/mock-nudge.mjs +45 -0
- package/scripts/mock-omp-rpc.mjs +429 -255
- package/scripts/mock-opencode-serve.mjs +972 -557
- package/scripts/mock-pi-rpc.mjs +558 -331
- package/scripts/mock-runner-crash.mjs +18 -2
- package/scripts/mock-session-context.d.mts +5 -0
- package/scripts/mock-session-context.mjs +56 -0
- package/scripts/mock-silent-tail.mjs +10 -3
- package/scripts/pi-default-tools.mjs +22 -0
- package/scripts/pi-project-skills.mjs +59 -0
- package/scripts/probe-cursor-print.mjs +627 -0
- package/scripts/transcript-facts-fixture.mjs +53 -0
- package/scripts/voice-replay.ts +50 -0
- package/scripts/windows-workspace-identity.cs +208 -0
- package/scripts/windows-workspace-identity.ps1 +10 -0
- package/web/dist/assets/alert-dialog-DfctKUMw.js +1 -0
- package/web/dist/assets/button-CeupvoKG.js +41 -0
- package/web/dist/assets/centered-state-hDsyXrnH.js +1 -0
- package/web/dist/assets/cez-idle-D3aj_9lp.js +1 -0
- package/web/dist/assets/diff-BnIXZK3i2.js +3 -0
- package/web/dist/assets/diff-controls-GewpW9aF.js +1 -0
- package/web/dist/assets/diff-view-Byo7gpvW.js +11 -0
- package/web/dist/assets/dropdown-menu-COj_J5wd.js +6 -0
- package/web/dist/assets/eye-B8okNWXU.js +1 -0
- package/web/dist/assets/git-toolbar-DY0z0n4S.js +1 -0
- package/web/dist/assets/github-DwU6ALRK.js +1 -0
- package/web/dist/assets/{image-preview-FOEfqpZP.js → image-preview-C_t9q45f.js} +1 -1
- package/web/dist/assets/index-BOfE8pyD.js +34 -0
- package/web/dist/assets/index-D9HpsmdW.css +1 -0
- package/web/dist/assets/live-protocol-Uce2NwEX.js +64 -0
- package/web/dist/assets/live-worker-BizfZSoh.ts +33 -0
- package/web/dist/assets/markdown-BBDDg-4t.js +1 -0
- package/web/dist/assets/nav-row-styles-AoIhhIwf.js +1 -0
- package/web/dist/assets/popover-D56fhiXj.js +1 -0
- package/web/dist/assets/preview-pane-connected-BmVqfSU5.js +3 -0
- package/web/dist/assets/reference-chip-gQNk-4jc.js +1 -0
- package/web/dist/assets/repo-git-B5ECDUuv.js +1 -0
- package/web/dist/assets/{repo-git-CoKp-g9K.css → repo-git-DVXNOJDT.css} +1 -1
- package/web/dist/assets/run-header-C0Y1NvEM.js +2 -0
- package/web/dist/assets/run-header-CC7VUTg9.css +1 -0
- package/web/dist/assets/skills-DUeTkZ9z.js +1 -0
- package/web/dist/assets/status-dot-1PR0i69P.js +1 -0
- package/web/dist/assets/tab-link-DmWk4l5O.js +1 -0
- package/web/dist/assets/task-changes-DKZXuW89.js +1 -0
- package/web/dist/assets/task-commits-BZ6KxWdF.js +1 -0
- package/web/dist/assets/task-files-DlF7Apcn.js +2 -0
- package/web/dist/assets/task-github-item-CVPo3geZ.js +1 -0
- package/web/dist/assets/task-thread-DtQ6uGfQ.css +1 -0
- package/web/dist/assets/task-thread-mm4-ECyo.js +9 -0
- package/web/dist/assets/thread-state-CIw2BlhT.js +4 -0
- package/web/dist/assets/use-hand-to-agent-state-BCDjzHnG.js +1 -0
- package/web/dist/assets/use-hand-to-agent-state-C7esPJ-N.css +1 -0
- package/web/dist/assets/workflows-D8vYD-ql.js +7 -0
- package/web/dist/assets/zoomable-image-CxQSsfcn.js +1 -0
- package/web/dist/index.html +13 -17
- package/web/dist/live-worker.js +4 -0
- package/dist/core/tool-display.js +0 -179
- package/dist/core/tool-display.js.map +0 -1
- package/dist/runs/human-ask-summary.d.ts +0 -9
- package/dist/runs/human-ask-summary.js +0 -39
- package/dist/runs/human-ask-summary.js.map +0 -1
- package/dist/runs/run-search.d.ts +0 -29
- package/dist/runs/run-search.js +0 -63
- package/dist/runs/run-search.js.map +0 -1
- package/dist/skills-banner.d.ts +0 -22
- package/dist/skills-banner.js +0 -41
- package/dist/skills-banner.js.map +0 -1
- package/dist/skills-update.d.ts +0 -88
- package/dist/skills-update.js +0 -392
- package/dist/skills-update.js.map +0 -1
- package/dist/todos.d.ts +0 -48
- package/dist/todos.js +0 -201
- package/dist/todos.js.map +0 -1
- package/web/dist/assets/agent-accounts-CFOBMVHc.js +0 -1
- package/web/dist/assets/alert-dialog-BrpNUwMt.js +0 -1
- package/web/dist/assets/button-C_rd7CPp.js +0 -43
- package/web/dist/assets/compare-variants-D6WXhvXA.js +0 -1
- package/web/dist/assets/diff-DrEARXTV.js +0 -3
- package/web/dist/assets/diff-controls-B1-j7nFg.js +0 -1
- package/web/dist/assets/diff-view-DvGLjdTk.js +0 -6
- package/web/dist/assets/dropdown-menu-BegOZFrj.js +0 -1
- package/web/dist/assets/format-DpNe3S0A.js +0 -1
- package/web/dist/assets/git-toolbar-Cw4ljmhB.js +0 -1
- package/web/dist/assets/github-CfV5sqL0.js +0 -1
- package/web/dist/assets/index-DgWWlOLy.js +0 -13
- package/web/dist/assets/index-fBFnuvxu.css +0 -1
- package/web/dist/assets/nav-row-styles-vp2JbhuJ.js +0 -1
- package/web/dist/assets/popover-BohP6WTx.js +0 -1
- package/web/dist/assets/preview-pane-connected-qTA5KNoJ.js +0 -3
- package/web/dist/assets/preview-state-vuMviq6q.js +0 -1
- package/web/dist/assets/prompt-templates-Cubdut_C.js +0 -15
- package/web/dist/assets/repo-git-Cf4t5PD0.js +0 -1
- package/web/dist/assets/run-diff-BpkUW37Z.js +0 -3
- package/web/dist/assets/run-header-68WHf9wV.js +0 -1
- package/web/dist/assets/run-header-8GObNx6F.css +0 -1
- package/web/dist/assets/search-x-I9Q8pgUa.js +0 -1
- package/web/dist/assets/skills-DFBiAuJG.js +0 -1
- package/web/dist/assets/skills-DiVIgKeU.js +0 -1
- package/web/dist/assets/square-terminal-B6RYYieR.js +0 -1
- package/web/dist/assets/status-dot-CqTJHSP9.js +0 -1
- package/web/dist/assets/tab-link-B07Hu4QX.js +0 -1
- package/web/dist/assets/task-changes--lQF6EYf.js +0 -1
- package/web/dist/assets/task-commits-Cx0qy4DN.js +0 -1
- package/web/dist/assets/task-files-D50s-gKW.js +0 -2
- package/web/dist/assets/task-github-item-DaqmSwYT.js +0 -1
- package/web/dist/assets/task-thread-BPQ64lui.js +0 -7
- package/web/dist/assets/task-thread-zNE2Q9E-.css +0 -1
- package/web/dist/assets/textarea-D20O4Pw0.js +0 -1
- package/web/dist/assets/thread-state-DWcFMrvb.js +0 -4
- package/web/dist/assets/use-hand-to-agent-state-BLIGmwbd.css +0 -1
- package/web/dist/assets/use-hand-to-agent-state-Cy9eyyfL.js +0 -1
- package/web/dist/assets/utils-JsL3ZsJf.js +0 -64
- package/web/dist/assets/workflows-jwG7uxqi.js +0 -11
- package/web/dist/assets/zoomable-image-BJJ64KGc.js +0 -1
package/scripts/mock-omp-rpc.mjs
CHANGED
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
// Load only when configured: ordinary mock turns retain their event-loop ordering.
|
|
3
|
+
const failureControl = process.env.CEZ_MOCK_FAILURE_CONTROL === undefined ? undefined
|
|
4
|
+
: (await import('./mock-failure-control.mjs')).readFailureControl();
|
|
5
|
+
const delivery = process.env.CEZ_MOCK_DELIVERY_CONTROL === undefined ? undefined
|
|
6
|
+
: (await import('./mock-delivery-control.mjs')).readDeliveryControl(['reject', 'hold-ack', 'hold-response']);
|
|
2
7
|
// Offline OMP (Oh My Pi) `--mode rpc` mock in OMP's own wire shape (v18.4.11, #595): the `ready`
|
|
3
8
|
// frame, id-echoed responses, `prompt_result`, `session_settled`. Startup argv and model errors
|
|
4
9
|
// are copied from the real binary (2026-10-05). Keep it standalone: optional scenario helpers
|
|
5
10
|
// are imported lazily.
|
|
6
11
|
import readline from 'node:readline';
|
|
7
12
|
import { spawn } from 'node:child_process';
|
|
8
|
-
import { appendFileSync, existsSync, writeFileSync } from 'node:fs';
|
|
13
|
+
import { appendFileSync, closeSync, existsSync, renameSync, writeFileSync } from 'node:fs';
|
|
14
|
+
import { rawMessage, stripCommandMessage } from './mock-session-context.mjs';
|
|
15
|
+
// Dynamic, like every sibling import here, so a test's copy of this mock can repoint it.
|
|
16
|
+
const { answerNudge, silentNudge } = await import('./mock-nudge.mjs');
|
|
17
|
+
// Publish a pid atomically (temporary sibling, then rename): a test reading it sees no
|
|
18
|
+
// file or a whole pid, never the empty file whose Number() is 0 (hearsay-tools/cezarion#953).
|
|
19
|
+
function watchdogWritePid(file, pid) { const tmp = `${file}.${process.pid}.tmp`; writeFileSync(tmp, pid); renameSync(tmp, file); }
|
|
9
20
|
|
|
10
21
|
const argv = process.argv.slice(2);
|
|
11
22
|
if (process.env.CEZ_MOCK_ARGS_FILE) appendFileSync(process.env.CEZ_MOCK_ARGS_FILE, `${JSON.stringify(argv)}\n`);
|
|
@@ -46,7 +57,7 @@ if (unknownFlags.length > 0) {
|
|
|
46
57
|
let tools = flags.has('--no-tools') ? [] : DEFAULT_TOOLS;
|
|
47
58
|
if (typeof flags.get('--tools') === 'string') {
|
|
48
59
|
tools = flags.get('--tools').split(',');
|
|
49
|
-
// The CI extension registers cezar's tools (the preview
|
|
60
|
+
// The CI extension registers cezar's tools (the preview tools only under CEZ_PREVIEW=1, the schedule tools only under CEZ_AUTOMATIONS=1); an MCP name needs a configured server, which the mock
|
|
50
61
|
// takes from CEZ_MOCK_OMP_MCP_TOOLS (none by default, like a home without .omp/mcp.json).
|
|
51
62
|
const mcpTools = (process.env.CEZ_MOCK_OMP_MCP_TOOLS ?? '').split(',').filter(Boolean);
|
|
52
63
|
// Tools a user setting disabled (`todo.enabled: false`, `lsp.enabled: false`, ...) are built-ins
|
|
@@ -54,7 +65,8 @@ if (typeof flags.get('--tools') === 'string') {
|
|
|
54
65
|
const disabled = (process.env.CEZ_MOCK_OMP_DISABLED_TOOLS ?? '').split(',').filter(Boolean);
|
|
55
66
|
const registered = (name) => (BUILTIN_TOOLS.includes(name) && !GATED_TOOLS.has(name) && !disabled.includes(name))
|
|
56
67
|
|| mcpTools.includes(name)
|
|
57
|
-
|| (extensions.length > 0 && (
|
|
68
|
+
|| (extensions.length > 0 && (['cezar_wait', 'cezar_ask', 'cezar_cancel_wait', 'cezar_done'].includes(name) || ((name === 'cezar_preview_serve' || name === 'cezar_preview_stop') && process.env.CEZ_PREVIEW === '1')
|
|
69
|
+
|| ((name === 'cezar_schedule_task' || name === 'cezar_scheduled_tasks') && process.env.CEZ_AUTOMATIONS === '1')));
|
|
58
70
|
// Mirrors v18.4.11 `emt()`: every missing name in ONE error, unknown names first, then the
|
|
59
71
|
// built-ins this session lacks, each line singular for one name.
|
|
60
72
|
const missing = tools.filter((name) => !registered(name));
|
|
@@ -104,6 +116,14 @@ const fail = (command, error) => write({ ...(command.id ? { id: command.id } : {
|
|
|
104
116
|
const localResult = (command, status, error) => write({ type: 'prompt_result', ...(command.id ? { id: command.id } : {}), agentInvoked: false, status, ...(error ? { error } : {}), sessionSettled: false });
|
|
105
117
|
const respond = (command, data) => write({ ...(command.id ? { id: command.id } : {}), type: 'response', command: command.type, success: true, ...(data === undefined ? {} : { data }) });
|
|
106
118
|
|
|
119
|
+
// A real broken input pipe before ready exercises the queued startup writes.
|
|
120
|
+
if (process.env.CEZ_MOCK_OMP_CLOSED_INPUT === '1') {
|
|
121
|
+
closeSync(0);
|
|
122
|
+
write({ type: 'ready' });
|
|
123
|
+
setTimeout(() => process.exit(0), 300);
|
|
124
|
+
await new Promise(() => {});
|
|
125
|
+
}
|
|
126
|
+
|
|
107
127
|
// Real startup order: `ready`, then three unsolicited frames before any command is answered.
|
|
108
128
|
write({ type: 'ready', protocolVersion: 1, supportedProtocolVersions: [1, 2], maxFrameBytes: 1048576, maxReassembledFrameBytes: 16777216 });
|
|
109
129
|
write({ type: 'extension_ui_request', id: 'mock-widget-1', method: 'setWidget', widgetKey: 'mock', widgetLines: [] });
|
|
@@ -120,7 +140,11 @@ let resumeAfterAsk = false;
|
|
|
120
140
|
|
|
121
141
|
/** Same as mock-pi-rpc.mjs `watchdogStall`: a turn that never progresses (no-progress rows). */
|
|
122
142
|
function watchdogStall(message) {
|
|
123
|
-
|
|
143
|
+
if (message.includes('input-closed')) {
|
|
144
|
+
closeSync(0);
|
|
145
|
+
watchdogWritePid('input-closed.pid', String(process.pid));
|
|
146
|
+
setTimeout(() => process.exit(0), message.includes('mock:gate-prompt-ack') ? 15_000 : 300);
|
|
147
|
+
}
|
|
124
148
|
if (message.includes('ignore-term')) {
|
|
125
149
|
process.removeAllListeners('SIGTERM');
|
|
126
150
|
process.on('SIGTERM', () => {});
|
|
@@ -133,10 +157,12 @@ function watchdogStall(message) {
|
|
|
133
157
|
if (message.includes('leftover')) {
|
|
134
158
|
// hearsay-tools/cezarion#890: one child stays in the session's process group and ignores
|
|
135
159
|
// SIGTERM; one leaves the group with setsid. Both exit on their own as a cleanup backstop.
|
|
136
|
-
const leftover = (file) => `process.on('SIGTERM',()=>{}); require('fs').writeFileSync(${JSON.stringify(file)}, String(process.pid)); setTimeout(()=>{},20000)`;
|
|
160
|
+
const leftover = (file) => `process.on('SIGTERM',()=>{}); const fs = require('fs'); fs.writeFileSync(${JSON.stringify(`${file}.tmp`)}, String(process.pid)); fs.renameSync(${JSON.stringify(`${file}.tmp`)}, ${JSON.stringify(file)}); setTimeout(()=>{},20000)`;
|
|
137
161
|
spawn(process.execPath, ['-e', leftover('leftover-group.pid')], { stdio: 'ignore' });
|
|
138
162
|
spawn(process.execPath, ['-e', leftover('leftover-session.pid')], { stdio: 'ignore', detached: true }).unref();
|
|
139
163
|
}
|
|
164
|
+
// Publish readiness after mode setup: another process may signal us as soon as it sees it.
|
|
165
|
+
watchdogWritePid('watchdog.pid', String(process.pid));
|
|
140
166
|
}
|
|
141
167
|
|
|
142
168
|
/** #401: hold late wire frames until the test has observed the park (as the codex mock). */
|
|
@@ -240,9 +266,26 @@ let queue = Promise.resolve();
|
|
|
240
266
|
rl.on('line', (line) => {
|
|
241
267
|
// Every raw command, in arrival order, for tests that pin what the runner wrote.
|
|
242
268
|
if (process.env.CEZ_MOCK_OMP_COMMANDS_FILE) appendFileSync(process.env.CEZ_MOCK_OMP_COMMANDS_FILE, `${line}\n`);
|
|
243
|
-
const command = JSON.parse(line);
|
|
244
|
-
|
|
245
|
-
|
|
269
|
+
const command = stripCommandMessage(JSON.parse(line));
|
|
270
|
+
// hearsay-tools/cezarion#1112: a late-ack steer is admitted after the turn's last model call.
|
|
271
|
+
// OMP acknowledges it now and, never settling with a queued message, reads it in a further
|
|
272
|
+
// run before `session_settled` (the endTurn `late` path).
|
|
273
|
+
if (command.type === 'prompt' && command.streamingBehavior === 'steer' && command.message.includes('mock:deferred-turn-start:late-ack')) {
|
|
274
|
+
const admit = () => {
|
|
275
|
+
if (!activeTurn) { setTimeout(admit, 5); return; }
|
|
276
|
+
record({ userText: rawMessage(command), imageCount: (command.images ?? []).length, streamingBehavior: 'steer' });
|
|
277
|
+
activeTurn.steers.push({ id: command.id, message: command.message });
|
|
278
|
+
activeTurn.late = true;
|
|
279
|
+
respond(command);
|
|
280
|
+
};
|
|
281
|
+
admit();
|
|
282
|
+
return;
|
|
283
|
+
}
|
|
284
|
+
// hearsay-tools/cezarion#1112: a deferred-start steer is not admitted into the running turn;
|
|
285
|
+
// OMP acknowledges it as its next prompt once that turn settles, with no turn open.
|
|
286
|
+
if (command.type === 'prompt' && command.streamingBehavior === 'steer' && activeTurn &&
|
|
287
|
+
!command.message.includes('mock:deferred-turn-start')) {
|
|
288
|
+
record({ userText: rawMessage(command), imageCount: (command.images ?? []).length, streamingBehavior: 'steer' });
|
|
246
289
|
// Steers OMP never hands to the running agent: none of them may end its turn.
|
|
247
290
|
if (command.message.includes('mock:steer-rejected')) {
|
|
248
291
|
// Rejected before admission: the error response only, the ticket is discarded.
|
|
@@ -307,38 +350,363 @@ async function handle(command) {
|
|
|
307
350
|
respond(command);
|
|
308
351
|
return;
|
|
309
352
|
case 'prompt':
|
|
310
|
-
record({ userText: command
|
|
311
|
-
|
|
353
|
+
record({ userText: rawMessage(command), imageCount: (command.images ?? []).length });
|
|
354
|
+
// The delivery control reads both the prompt Cezar sent and a nudge's scripted answer.
|
|
355
|
+
{ const answered = answerNudge(command.message);
|
|
356
|
+
return prompt({ ...command, message: answered }, answered === command.message ? answered : `${command.message}\n${answered}`); }
|
|
312
357
|
default:
|
|
313
358
|
write({ ...(command.id ? { id: command.id } : {}), type: 'response', command: command.type, success: false, error: `Unknown command: ${command.type}` });
|
|
314
359
|
}
|
|
315
360
|
}
|
|
316
361
|
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
362
|
+
function respondLocalCommand(command, message, ack) {
|
|
363
|
+
// A prompt OMP finished itself (a slash command): the response says so, no prompt_result.
|
|
364
|
+
ack({ agentInvoked: false });
|
|
365
|
+
return;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
function respondLocalResult(command, message, ack) {
|
|
369
|
+
ack();
|
|
370
|
+
write({ type: 'prompt_result', ...(command.id ? { id: command.id } : {}), agentInvoked: false, status: 'completed', sessionSettled: true });
|
|
371
|
+
return;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
function respondPromptError(command, message, ack) {
|
|
375
|
+
// The prompt failed after admission, before the agent ran: the ack, an error response,
|
|
376
|
+
// then its prompt_result (rpc-mode.ts `onError` + `RpcPromptResults.fail`).
|
|
377
|
+
ack();
|
|
378
|
+
fail(command, 'Model not found: anthropic/claude-missing');
|
|
379
|
+
write({ type: 'prompt_result', ...(command.id ? { id: command.id } : {}), agentInvoked: false, status: 'error', error: { message: 'Model not found: anthropic/claude-missing', provider: 'anthropic', model: 'claude-missing', retryable: false }, sessionSettled: true });
|
|
380
|
+
return;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
function respondPromptRejected(command, message, ack) {
|
|
384
|
+
// Rejected before admission (an input hook threw): the error response only, no prompt_result.
|
|
385
|
+
fail(command, 'input hook rejected the prompt');
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
async function respondMultiPrRefs(command, message, gated) {
|
|
389
|
+
const { multiPrText, unrelatedPr } = await import('./mock-multi-pr.mjs');
|
|
390
|
+
assistantThinking(unrelatedPr);
|
|
391
|
+
subagentText('multi-child', unrelatedPr);
|
|
392
|
+
write({ type: 'tool_execution_start', toolCallId: 'multi-read', toolName: 'read', args: { path: 'other.txt' } });
|
|
393
|
+
write({ type: 'tool_execution_end', toolCallId: 'multi-read', toolName: 'read', result: { content: [{ type: 'text', text: unrelatedPr }] }, isError: false });
|
|
394
|
+
const text = multiPrText(message);
|
|
395
|
+
assistantText([text.slice(0, 5), text.slice(5)]);
|
|
396
|
+
endTurn(); return;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
async function respondTurnMessages(command, message, gated) {
|
|
400
|
+
const { turnMessages } = await import('./mock-turn-messages.mjs');
|
|
401
|
+
// Separate assistant messages within one native OMP turn; settle only after all of them.
|
|
402
|
+
for (const text of turnMessages(message)) assistantText([text]);
|
|
403
|
+
endTurn();
|
|
404
|
+
return;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
function respondAgentEcho(command, message, gated) {
|
|
408
|
+
assistantText([message]);
|
|
409
|
+
endTurn();
|
|
410
|
+
return;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
async function respondAutonomous(command, message, gated) {
|
|
414
|
+
const { autonomousReply } = await import('./mock-autonomous.mjs');
|
|
415
|
+
assistantText([autonomousReply(message)]);
|
|
416
|
+
endTurn();
|
|
417
|
+
return;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
async function respondFinalNudge(silent) {
|
|
421
|
+
const kind = silent.finalMessageNudgeKind();
|
|
422
|
+
if (kind === 'silent') assistantThinking(silent.SILENT_TAIL_REASONING);
|
|
423
|
+
else if (kind === 'slow-done') {
|
|
424
|
+
assistantText([silent.SLOW_DONE_PREFIX]);
|
|
425
|
+
await silent.sleep(silent.SLOW_DONE_TAIL_MS);
|
|
426
|
+
assistantText([silent.SILENT_TAIL_DONE]);
|
|
427
|
+
} else assistantText([kind === 'standing' ? silent.FINAL_MESSAGE_STANDING : silent.SILENT_TAIL_DONE]);
|
|
428
|
+
endTurn();
|
|
429
|
+
return;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
async function respondSilentTail(command, message, gated) {
|
|
433
|
+
const silent = await import('./mock-silent-tail.mjs');
|
|
434
|
+
silent.noteSilentTailPrompt(message);
|
|
435
|
+
if (silent.isFinalMessageNudge(message)) {
|
|
436
|
+
return respondFinalNudge(silent);
|
|
437
|
+
}
|
|
438
|
+
if (silent.isSilentTailScenario(message)) {
|
|
439
|
+
assistantText([silent.SILENT_TAIL_OPENING]);
|
|
440
|
+
write({ type: 'tool_execution_start', toolCallId: 'tool-silent-gh', toolName: 'bash', args: { command: 'gh issue create' } });
|
|
441
|
+
write({ type: 'tool_execution_end', toolCallId: 'tool-silent-gh', toolName: 'bash', result: { content: [{ type: 'text', text: 'created' }] }, isError: false });
|
|
442
|
+
assistantThinking(silent.SILENT_TAIL_REASONING);
|
|
443
|
+
endTurn();
|
|
322
444
|
return;
|
|
323
445
|
}
|
|
324
|
-
if (
|
|
325
|
-
|
|
326
|
-
write({ type: '
|
|
446
|
+
if (silent.isToolTailScenario(message)) {
|
|
447
|
+
assistantText([silent.TOOL_TAIL_OPENING]);
|
|
448
|
+
write({ type: 'tool_execution_start', toolCallId: 'tool-tail-git', toolName: 'bash', args: { command: 'git status --short' } });
|
|
449
|
+
write({ type: 'tool_execution_end', toolCallId: 'tool-tail-git', toolName: 'bash', result: { content: [{ type: 'text', text: ' M src/example.ts' }] }, isError: false });
|
|
450
|
+
endTurn();
|
|
327
451
|
return;
|
|
328
452
|
}
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
453
|
+
return false;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
async function respondProgress(command, message, gated) {
|
|
457
|
+
if (message.includes('mock:no-progress')) {
|
|
458
|
+
// The turn never progresses and never settles.
|
|
459
|
+
if (!gated) watchdogStall(message);
|
|
335
460
|
return;
|
|
336
461
|
}
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
462
|
+
for (let i = 0; i < 24; i++) {
|
|
463
|
+
write({ type: 'tool_execution_update', toolCallId: 'busy', toolName: 'bash', args: { command: 'build' }, partialResult: { content: [{ type: 'text', text: 'working' }] } });
|
|
464
|
+
await sleep(100);
|
|
465
|
+
}
|
|
466
|
+
assistantText(['busy progress finished', '\n\nCEZ:DONE']);
|
|
467
|
+
endTurn();
|
|
468
|
+
return;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
function respondSplitText(command, message, gated) {
|
|
472
|
+
// One text_delta per token, so the marker is split across deltas (harness parity S8).
|
|
473
|
+
assistantText(['parity split text', '\n\n', 'CEZ:', 'MONITORING']);
|
|
474
|
+
endTurn();
|
|
475
|
+
return;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
function respondAskSnapshot(command, message, gated) {
|
|
479
|
+
// #401: an authoritative text_end with no deltas.
|
|
480
|
+
const messageId = `msg-${++messageSeq}`;
|
|
481
|
+
const text = message.includes('mock:ask-snapshot-bad') ? 'CEZ:ASK {not valid json' : SNAPSHOT_ASK;
|
|
482
|
+
write({ type: 'message_start', messageId, message: { role: 'assistant', content: [] } });
|
|
483
|
+
messageUpdate(messageId, { type: 'text_end', contentIndex: 0, content: text });
|
|
484
|
+
write({ type: 'message_end', messageId, message: { role: 'assistant', content: [{ type: 'text', text }], provider: 'anthropic', model: 'claude-mock', usage: { input: 10, output: 5, cacheRead: 0, cacheWrite: 0, totalTokens: 15, cost: { total: 0.001 } }, stopReason: 'stop' } });
|
|
485
|
+
endTurn();
|
|
486
|
+
return;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
function respondAskProse(command, message, gated) {
|
|
490
|
+
assistantText(['Use `CEZ:ASK {"questions":[]}` in your reply.\n> CEZ:ASK {not valid json']);
|
|
491
|
+
endTurn();
|
|
492
|
+
return;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
function respondBadAsk(command, message, gated) {
|
|
496
|
+
// OMP's `ask` tool needs an interactive UI, so the CEZ:ASK marker is the ask path (as Pi's).
|
|
497
|
+
assistantText(['Pick one.\n\nCEZ:ASK {not valid json']);
|
|
498
|
+
endTurn();
|
|
499
|
+
return;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
function respondAsk(command, message, gated) {
|
|
503
|
+
resumeAfterAsk = message.includes('mock:resume-done');
|
|
504
|
+
// The marker and its JSON body land in separate deltas (the #2 boundary).
|
|
505
|
+
assistantText(['Pick one.\n\n', 'CEZ:ASK', ' ', ASK_MARKER_BODY]);
|
|
506
|
+
endTurn();
|
|
507
|
+
return;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
async function respondSubagentAfterPark(command, message, gated) {
|
|
511
|
+
// A `task` call whose sub-agent is still reporting after the parent parked on its marker.
|
|
512
|
+
write({ type: 'tool_execution_start', toolCallId: 'toolu_park_task', toolName: 'task', args: { agent: 'explore', task: 'Review the change' } });
|
|
513
|
+
write({ type: 'subagent_lifecycle', payload: { id: 'ParkReviewer', agent: 'explore', status: 'started', parentToolCallId: 'toolu_park_task', index: 0 } });
|
|
514
|
+
subagentText('ParkReviewer', 'Child review started.');
|
|
515
|
+
write({ type: 'tool_execution_end', toolCallId: 'toolu_park_task', toolName: 'task', result: { content: [{ type: 'text', text: 'ParkReviewer: running' }] }, isError: false });
|
|
516
|
+
assistantText(['Watching the child.\nCEZ:MONITORING']);
|
|
517
|
+
endTurn();
|
|
518
|
+
await afterParityPark(message);
|
|
519
|
+
write({ type: 'subagent_event', payload: { id: 'ParkReviewer', event: { type: 'tool_execution_start', toolCallId: 'toolu_park_read', toolName: 'read', args: { path: 'README.md' } } } });
|
|
520
|
+
write({ type: 'subagent_event', payload: { id: 'ParkReviewer', event: { type: 'tool_execution_end', toolCallId: 'toolu_park_read', toolName: 'read', result: { content: [{ type: 'text', text: 'mock file' }] } } } });
|
|
521
|
+
subagentText('ParkReviewer', 'Post-park child update processed.');
|
|
522
|
+
write({ type: 'subagent_event', payload: { id: 'ParkReviewer', event: { type: 'agent_end', messages: [], isTerminal: true, yielded: true } } });
|
|
523
|
+
write({ type: 'subagent_lifecycle', payload: { id: 'ParkReviewer', agent: 'explore', status: 'completed', parentToolCallId: 'toolu_park_task', index: 0 } });
|
|
524
|
+
return;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
function respondSubagent(command, message, gated) {
|
|
528
|
+
// #5/#600: the sub-agent's own terminal agent_end, nested under the parent's `task` call
|
|
529
|
+
// (rpc-subagents.ndjson), must not end the parent turn; #149: its text stays nested.
|
|
530
|
+
write({ type: 'tool_execution_start', toolCallId: 'toolu_task_1', toolName: 'task', args: { agent: 'explore', task: 'Review the change' } });
|
|
531
|
+
write({ type: 'subagent_lifecycle', payload: { id: 'Reviewer', agent: 'explore', status: 'started', parentToolCallId: 'toolu_task_1', index: 0 } });
|
|
532
|
+
write({ type: 'subagent_event', payload: { id: 'Reviewer', event: { type: 'agent_start' } } });
|
|
533
|
+
write({ type: 'subagent_event', payload: { id: 'Reviewer', event: { type: 'tool_execution_start', toolCallId: 'toolu_child_grep', toolName: 'grep', args: { pattern: 'ask' } } } });
|
|
534
|
+
write({ type: 'subagent_event', payload: { id: 'Reviewer', event: { type: 'tool_execution_end', toolCallId: 'toolu_child_grep', toolName: 'grep', result: { content: [{ type: 'text', text: '3 matches' }] } } } });
|
|
535
|
+
write({ type: 'subagent_event', payload: { id: 'Reviewer', event: { type: 'agent_end', messages: [], isTerminal: true, yielded: true } } });
|
|
536
|
+
write({ type: 'subagent_lifecycle', payload: { id: 'Reviewer', agent: 'explore', status: 'completed', parentToolCallId: 'toolu_task_1', index: 0 } });
|
|
537
|
+
write({ type: 'tool_execution_end', toolCallId: 'toolu_task_1', toolName: 'task', result: { content: [{ type: 'text', text: 'Reviewer: done' }] }, isError: false });
|
|
538
|
+
// The parent keeps streaming after the child's terminal frame.
|
|
539
|
+
assistantText(['Still working after the sub-agent.\nCEZ:MONITORING']);
|
|
540
|
+
// Late child text after the parent marker; the second block never completes.
|
|
541
|
+
subagentText('Reviewer', 'Child review finished.', { input: 20, output: 10, cacheRead: 100, cacheWrite: 4, totalTokens: 134, cost: { total: 0.002 } });
|
|
542
|
+
write({ type: 'subagent_event', payload: { id: 'Reviewer', event: { type: 'message_update', message: { role: 'assistant' }, assistantMessageEvent: { type: 'text_start', contentIndex: 0 } } } });
|
|
543
|
+
write({ type: 'subagent_event', payload: { id: 'Reviewer', event: { type: 'message_update', message: { role: 'assistant' }, assistantMessageEvent: { type: 'text_delta', contentIndex: 0, delta: 'Child review still streaming.' } } } });
|
|
544
|
+
endTurn();
|
|
545
|
+
return;
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
function respondApprovalDenied(command, message, gated) {
|
|
549
|
+
// A user's stricter `tools.approvalMode`: OMP fails the call closed when no UI can approve it.
|
|
550
|
+
write({ type: 'tool_execution_start', toolCallId: 'tool-denied', toolName: 'bash', args: { command: 'rm -rf build' } });
|
|
551
|
+
write({ type: 'tool_execution_end', toolCallId: 'tool-denied', toolName: 'bash', result: { content: [{ type: 'text', text: NO_UI_APPROVAL_ERROR }] }, isError: true });
|
|
552
|
+
assistantText(['The command needs approval I cannot get here.']);
|
|
553
|
+
endTurn();
|
|
554
|
+
return;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
async function respondSteerLate(command, message, gated) {
|
|
558
|
+
// The final text first; a steer admitted now arrives after the last model call (#505).
|
|
559
|
+
assistantText(['late window: final message already sent']);
|
|
560
|
+
activeTurn.late = true;
|
|
561
|
+
await sleep(300);
|
|
562
|
+
endTurn();
|
|
563
|
+
return;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
async function respondHoldDone(command, message, gated) {
|
|
567
|
+
await waitForMockRelease(400);
|
|
568
|
+
assistantText(['parity hold-done: content after the pause\n\nCEZ:DONE']);
|
|
569
|
+
endTurn();
|
|
570
|
+
return;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
async function respondHoldAsk(command, message, gated) {
|
|
574
|
+
await waitForMockRelease(400);
|
|
575
|
+
assistantText(['Pick one.\n\nCEZ:ASK {"questions":[{"header":"Library","question":"Which test library?","options":[{"label":"Vitest"},{"label":"Node test"}]}]}']);
|
|
576
|
+
endTurn();
|
|
577
|
+
return;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
function respondDone(command, message, gated) {
|
|
581
|
+
resumeAfterAsk = false;
|
|
582
|
+
assistantText(['parity done: the task is complete\n\nCEZ:DONE']);
|
|
583
|
+
endTurn();
|
|
584
|
+
return;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
async function respondCezarTool(command, message, gated) {
|
|
588
|
+
const { toolPrompt } = await import('./mock-ci-tool.mjs');
|
|
589
|
+
assistantText([await toolPrompt('omp', argv, message)]);
|
|
590
|
+
endTurn();
|
|
591
|
+
return;
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
async function respondCiWait(command, message, gated) {
|
|
595
|
+
const { ciPrompt } = await import('./mock-ci-tool.mjs');
|
|
596
|
+
assistantText([await ciPrompt('omp', argv, message)]);
|
|
597
|
+
endTurn();
|
|
598
|
+
return;
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
async function respondSteerTool(command, message, gated) {
|
|
602
|
+
write({ type: 'tool_execution_start', toolCallId: 'tool-steer', toolName: 'bash', args: { command: 'wait' } });
|
|
603
|
+
await sleep(Number(process.env.CEZ_MOCK_STEER_MS ?? 600));
|
|
604
|
+
write({ type: 'tool_execution_end', toolCallId: 'tool-steer', toolName: 'bash', result: { content: [{ type: 'text', text: 'waited' }] }, isError: false });
|
|
605
|
+
assistantText(['steer tool done']);
|
|
606
|
+
endTurn();
|
|
607
|
+
return;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
function respondNoSettle(command, message) {
|
|
611
|
+
// The stream ends mid-turn after a failed attempt: no agent_end, no settle.
|
|
612
|
+
assistantText([], { stopReason: 'error', usage: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, totalTokens: 0, cost: { total: 0 } }, extra: { errorMessage: 'Overloaded' } });
|
|
613
|
+
process.exit(0);
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
async function respondHoldGated(command, message) {
|
|
617
|
+
await waitForMockRelease(250);
|
|
618
|
+
assistantText(['parity hold-gated: content after the pause']);
|
|
619
|
+
await sleep(250);
|
|
620
|
+
endTurn();
|
|
621
|
+
return;
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
async function respondHold(command, message) {
|
|
625
|
+
// Content and the settle both trail the prompt ack, so a turn-end derived from the ack
|
|
626
|
+
// (or a short deadline) is caught before any content arrives.
|
|
627
|
+
await sleep(250);
|
|
628
|
+
assistantText(['parity hold: content after the pause']);
|
|
629
|
+
await sleep(250);
|
|
630
|
+
endTurn();
|
|
631
|
+
return;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
async function respondDefault(command, message) {
|
|
635
|
+
assistantText([`Investigating: `, message, ...(message.includes('mock:monitoring') ? ['\n\nCEZ:MONITORING'] : [])]);
|
|
636
|
+
write({ type: 'tool_execution_start', toolCallId: 'tool-1', toolName: 'read', args: { path: 'README.md' } });
|
|
637
|
+
write({ type: 'tool_execution_end', toolCallId: 'tool-1', toolName: 'read', result: { content: [{ type: 'text', text: 'mock file' }] }, isError: false });
|
|
638
|
+
if (!message.includes('mock:monitoring')) {
|
|
639
|
+
assistantText(['Done with the first pass.'], { usage: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, totalTokens: 0, cost: { total: 0 } } });
|
|
640
|
+
}
|
|
641
|
+
endTurn();
|
|
642
|
+
if (message.includes('mock:wake-after-settle')) {
|
|
643
|
+
// OMP resumes on its own after settling (async work finished): a new agent run, no prompt.
|
|
644
|
+
await sleep(250);
|
|
645
|
+
beginTurn();
|
|
646
|
+
assistantText(['woke after settle']);
|
|
647
|
+
write({ type: 'turn_end' });
|
|
648
|
+
write({ type: 'agent_end', messages: [], isTerminal: true, yielded: true });
|
|
649
|
+
activeTurn = null;
|
|
650
|
+
write({ type: 'session_settled' });
|
|
341
651
|
}
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
// These prompts finish before a native agent turn opens. Keep their admission order.
|
|
655
|
+
const localPromptScenarios = [
|
|
656
|
+
{ matches: message => message.includes('mock:local-command'), respond: respondLocalCommand },
|
|
657
|
+
{ matches: message => message.includes('mock:local-result'), respond: respondLocalResult },
|
|
658
|
+
{ matches: message => message.includes('mock:prompt-error'), respond: respondPromptError },
|
|
659
|
+
{ matches: message => message.includes('mock:prompt-rejected'), respond: respondPromptRejected },
|
|
660
|
+
];
|
|
661
|
+
|
|
662
|
+
// The first handled scenario wins; silent-tail can fall through after its import.
|
|
663
|
+
const promptScenarios = [
|
|
664
|
+
{ matches: message => message.includes('mock:multi-pr-refs'), respond: respondMultiPrRefs },
|
|
665
|
+
{ matches: message => message.includes('mock:turn-messages:'), respond: respondTurnMessages },
|
|
666
|
+
{ matches: message => message.includes('mock:agent-echo'), respond: respondAgentEcho },
|
|
667
|
+
{ matches: message => message.includes('mock:autonomous') || message.startsWith('Continue working autonomously until the task is fully complete.'), respond: respondAutonomous },
|
|
668
|
+
{ matches: message => message.includes('mock:silent-tail') || message.includes('mock:tool-tail') || silentNudge(message), respond: respondSilentTail },
|
|
669
|
+
{ matches: message => /mock:(no-progress|busy-progress)/.test(message), respond: respondProgress },
|
|
670
|
+
{ matches: message => message.includes('mock:split-text'), respond: respondSplitText },
|
|
671
|
+
{ matches: message => message.includes('mock:ask-snapshot'), respond: respondAskSnapshot },
|
|
672
|
+
{ matches: message => message.includes('mock:ask-prose'), respond: respondAskProse },
|
|
673
|
+
{ matches: message => message.includes('mock:ask-bad'), respond: respondBadAsk },
|
|
674
|
+
{ matches: message => message.includes('mock:ask'), respond: respondAsk },
|
|
675
|
+
{ matches: message => message.includes('mock:subagent-after-park'), respond: respondSubagentAfterPark },
|
|
676
|
+
{ matches: message => message.includes('mock:subagent'), respond: respondSubagent },
|
|
677
|
+
{ matches: message => message.includes('mock:approval-denied'), respond: respondApprovalDenied },
|
|
678
|
+
{ matches: message => message.includes('mock:steer-late'), respond: respondSteerLate },
|
|
679
|
+
{ matches: message => message.includes('mock:hold-done'), respond: respondHoldDone },
|
|
680
|
+
{ matches: message => message.includes('mock:hold-ask'), respond: respondHoldAsk },
|
|
681
|
+
{ matches: message => message.includes('mock:done') || (resumeAfterAsk && message.trim() === 'Library: Vitest'), respond: respondDone },
|
|
682
|
+
{ matches: message => message.includes('mock:cezar-tool'), respond: respondCezarTool },
|
|
683
|
+
{ matches: message => message.includes('mock:ci-wait'), respond: respondCiWait },
|
|
684
|
+
{ matches: message => message.includes('mock:steer-tool'), respond: respondSteerTool },
|
|
685
|
+
];
|
|
686
|
+
|
|
687
|
+
// Failure controls run before these trailing scenarios, even for an ordinary prompt.
|
|
688
|
+
const tailPromptScenarios = [
|
|
689
|
+
{ matches: message => message.includes('mock:no-settle'), respond: respondNoSettle },
|
|
690
|
+
{ matches: message => message.includes('mock:hold-gated'), respond: respondHoldGated },
|
|
691
|
+
{ matches: message => message.includes('mock:hold'), respond: respondHold },
|
|
692
|
+
];
|
|
693
|
+
|
|
694
|
+
async function prompt(command, sent = command.message) {
|
|
695
|
+
const message = command.message;
|
|
696
|
+
// Rejected before admission: OMP's error response only, no prompt_result (rpc-mode.ts).
|
|
697
|
+
if (delivery?.rejects(sent)) { fail(command, 'owned turn rejected'); return; }
|
|
698
|
+
// Every successful admission acknowledges through here, so a configured hold-ack holds it
|
|
699
|
+
// whichever scenario branch answers the prompt.
|
|
700
|
+
const ack = (extra) => { if (delivery) delivery.ack(sent, () => respond(command, extra)); else respond(command, extra); };
|
|
701
|
+
// `mock:ack-only` → the prompt is accepted and no agent run starts (hearsay-tools/cezarion#1301).
|
|
702
|
+
if (message.includes('mock:ack-only')) { ack(); return; }
|
|
703
|
+
const gated = message.includes('mock:gate-prompt-ack');
|
|
704
|
+
if (gated) {
|
|
705
|
+
watchdogStall(message);
|
|
706
|
+
while (!existsSync('input-ack.release')) await sleep(10);
|
|
707
|
+
}
|
|
708
|
+
const local = localPromptScenarios.find(scenario => scenario.matches(message));
|
|
709
|
+
if (local) { local.respond(command, message, ack); return; }
|
|
342
710
|
|
|
343
711
|
if (message.includes('mock:linger')) {
|
|
344
712
|
linger = true;
|
|
@@ -361,245 +729,51 @@ async function prompt(command) {
|
|
|
361
729
|
if (crashWithStderr(message, '{"type":"tool_execution_update","toolCallId":"truncated')) return;
|
|
362
730
|
}
|
|
363
731
|
|
|
364
|
-
|
|
732
|
+
return startPromptTurn(command, message, ack, gated);
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
async function startPromptTurn(command, message, ack, gated) {
|
|
736
|
+
if (message.includes('mock:silent-tail') || silentNudge(message)) {
|
|
365
737
|
const silentEarly = await import('./mock-silent-tail.mjs');
|
|
366
738
|
silentEarly.noteSilentTailPrompt(message);
|
|
367
|
-
if (silentEarly.isAckOnlyNudge(message)) {
|
|
739
|
+
if (silentEarly.isAckOnlyNudge(message)) { ack(); return; }
|
|
368
740
|
if (silentEarly.isLateNudge(message)) {
|
|
369
|
-
|
|
370
|
-
await
|
|
741
|
+
ack();
|
|
742
|
+
await waitForMockRelease(silentEarly.LATE_REPLY_MS);
|
|
371
743
|
beginTurn(command);
|
|
372
744
|
} else {
|
|
373
|
-
|
|
745
|
+
ack();
|
|
374
746
|
beginTurn(command);
|
|
375
747
|
}
|
|
748
|
+
} else if (message.includes('mock:deferred-turn-start')) {
|
|
749
|
+
// hearsay-tools/cezarion#1112: the acknowledged prompt opens its native run late.
|
|
750
|
+
ack();
|
|
751
|
+
await (await import('./mock-deferred-turn-start.mjs')).deferredTurnStart();
|
|
752
|
+
beginTurn(command);
|
|
376
753
|
} else {
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
}
|
|
380
|
-
if (message.includes('mock:turn-messages:')) {
|
|
381
|
-
const { turnMessages } = await import('./mock-turn-messages.mjs');
|
|
382
|
-
// Separate assistant messages within one native OMP turn; settle only after all of them.
|
|
383
|
-
for (const text of turnMessages(message)) assistantText([text]);
|
|
384
|
-
endTurn();
|
|
385
|
-
return;
|
|
386
|
-
}
|
|
387
|
-
if (message.includes('mock:agent-echo')) {
|
|
388
|
-
assistantText([message]);
|
|
389
|
-
endTurn();
|
|
390
|
-
return;
|
|
391
|
-
}
|
|
392
|
-
if (message.includes('mock:autonomous') || message.startsWith('Continue working autonomously until the task is fully complete.')) {
|
|
393
|
-
const { autonomousReply } = await import('./mock-autonomous.mjs');
|
|
394
|
-
assistantText([autonomousReply(message)]);
|
|
395
|
-
endTurn();
|
|
396
|
-
return;
|
|
397
|
-
}
|
|
398
|
-
if (message.includes('mock:silent-tail') || message.includes('mock:tool-tail') || message.includes('Your last turn ended without a message to the user.')) {
|
|
399
|
-
const silent = await import('./mock-silent-tail.mjs');
|
|
400
|
-
silent.noteSilentTailPrompt(message);
|
|
401
|
-
if (silent.isFinalMessageNudge(message)) {
|
|
402
|
-
const kind = silent.finalMessageNudgeKind();
|
|
403
|
-
if (kind === 'silent') assistantThinking(silent.SILENT_TAIL_REASONING);
|
|
404
|
-
else if (kind === 'slow-done') {
|
|
405
|
-
assistantText([silent.SLOW_DONE_PREFIX]);
|
|
406
|
-
await silent.sleep(silent.SLOW_DONE_TAIL_MS);
|
|
407
|
-
assistantText([silent.SILENT_TAIL_DONE]);
|
|
408
|
-
} else assistantText([kind === 'standing' ? silent.FINAL_MESSAGE_STANDING : silent.SILENT_TAIL_DONE]);
|
|
409
|
-
endTurn();
|
|
410
|
-
return;
|
|
411
|
-
}
|
|
412
|
-
if (silent.isSilentTailScenario(message)) {
|
|
413
|
-
assistantText([silent.SILENT_TAIL_OPENING]);
|
|
414
|
-
write({ type: 'tool_execution_start', toolCallId: 'tool-silent-gh', toolName: 'bash', args: { command: 'gh issue create' } });
|
|
415
|
-
write({ type: 'tool_execution_end', toolCallId: 'tool-silent-gh', toolName: 'bash', result: { content: [{ type: 'text', text: 'created' }] }, isError: false });
|
|
416
|
-
assistantThinking(silent.SILENT_TAIL_REASONING);
|
|
417
|
-
endTurn();
|
|
418
|
-
return;
|
|
419
|
-
}
|
|
420
|
-
if (silent.isToolTailScenario(message)) {
|
|
421
|
-
assistantText([silent.TOOL_TAIL_OPENING]);
|
|
422
|
-
write({ type: 'tool_execution_start', toolCallId: 'tool-tail-git', toolName: 'bash', args: { command: 'git status --short' } });
|
|
423
|
-
write({ type: 'tool_execution_end', toolCallId: 'tool-tail-git', toolName: 'bash', result: { content: [{ type: 'text', text: ' M src/example.ts' }] }, isError: false });
|
|
424
|
-
endTurn();
|
|
425
|
-
return;
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
|
-
if (/mock:(no-progress|busy-progress)/.test(message)) {
|
|
429
|
-
if (message.includes('mock:no-progress')) {
|
|
430
|
-
// The turn never progresses and never settles.
|
|
431
|
-
watchdogStall(message);
|
|
432
|
-
return;
|
|
433
|
-
}
|
|
434
|
-
for (let i = 0; i < 24; i++) {
|
|
435
|
-
write({ type: 'tool_execution_update', toolCallId: 'busy', toolName: 'bash', args: { command: 'build' }, partialResult: { content: [{ type: 'text', text: 'working' }] } });
|
|
436
|
-
await sleep(100);
|
|
437
|
-
}
|
|
438
|
-
assistantText(['busy progress finished']);
|
|
439
|
-
endTurn();
|
|
440
|
-
return;
|
|
441
|
-
}
|
|
442
|
-
if (message.includes('mock:split-text')) {
|
|
443
|
-
// One text_delta per token, so the marker is split across deltas (harness parity S8).
|
|
444
|
-
assistantText(['parity split text', '\n\n', 'CEZ:', 'MONITORING']);
|
|
445
|
-
endTurn();
|
|
446
|
-
return;
|
|
447
|
-
}
|
|
448
|
-
if (message.includes('mock:ask-snapshot')) {
|
|
449
|
-
// #401: an authoritative text_end with no deltas.
|
|
450
|
-
const messageId = `msg-${++messageSeq}`;
|
|
451
|
-
const text = message.includes('mock:ask-snapshot-bad') ? 'CEZ:ASK {not valid json' : SNAPSHOT_ASK;
|
|
452
|
-
write({ type: 'message_start', messageId, message: { role: 'assistant', content: [] } });
|
|
453
|
-
messageUpdate(messageId, { type: 'text_end', contentIndex: 0, content: text });
|
|
454
|
-
write({ type: 'message_end', messageId, message: { role: 'assistant', content: [{ type: 'text', text }], provider: 'anthropic', model: 'claude-mock', usage: { input: 10, output: 5, cacheRead: 0, cacheWrite: 0, totalTokens: 15, cost: { total: 0.001 } }, stopReason: 'stop' } });
|
|
455
|
-
endTurn();
|
|
456
|
-
return;
|
|
754
|
+
ack();
|
|
755
|
+
beginTurn(command);
|
|
457
756
|
}
|
|
458
|
-
if (
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
return;
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
assistantText(['Pick one.\n\n', 'CEZ:ASK', ' ', ASK_MARKER_BODY]);
|
|
473
|
-
endTurn();
|
|
474
|
-
return;
|
|
475
|
-
}
|
|
476
|
-
if (message.includes('mock:subagent-after-park')) {
|
|
477
|
-
// A `task` call whose sub-agent is still reporting after the parent parked on its marker.
|
|
478
|
-
write({ type: 'tool_execution_start', toolCallId: 'toolu_park_task', toolName: 'task', args: { agent: 'explore', task: 'Review the change' } });
|
|
479
|
-
write({ type: 'subagent_lifecycle', payload: { id: 'ParkReviewer', agent: 'explore', status: 'started', parentToolCallId: 'toolu_park_task', index: 0 } });
|
|
480
|
-
subagentText('ParkReviewer', 'Child review started.');
|
|
481
|
-
write({ type: 'tool_execution_end', toolCallId: 'toolu_park_task', toolName: 'task', result: { content: [{ type: 'text', text: 'ParkReviewer: running' }] }, isError: false });
|
|
482
|
-
assistantText(['Watching the child.\nCEZ:MONITORING']);
|
|
483
|
-
endTurn();
|
|
484
|
-
await afterParityPark(message);
|
|
485
|
-
write({ type: 'subagent_event', payload: { id: 'ParkReviewer', event: { type: 'tool_execution_start', toolCallId: 'toolu_park_read', toolName: 'read', args: { path: 'README.md' } } } });
|
|
486
|
-
write({ type: 'subagent_event', payload: { id: 'ParkReviewer', event: { type: 'tool_execution_end', toolCallId: 'toolu_park_read', toolName: 'read', result: { content: [{ type: 'text', text: 'mock file' }] } } } });
|
|
487
|
-
subagentText('ParkReviewer', 'Post-park child update processed.');
|
|
488
|
-
write({ type: 'subagent_event', payload: { id: 'ParkReviewer', event: { type: 'agent_end', messages: [], isTerminal: true, yielded: true } } });
|
|
489
|
-
write({ type: 'subagent_lifecycle', payload: { id: 'ParkReviewer', agent: 'explore', status: 'completed', parentToolCallId: 'toolu_park_task', index: 0 } });
|
|
490
|
-
return;
|
|
491
|
-
}
|
|
492
|
-
if (message.includes('mock:subagent')) {
|
|
493
|
-
// #5/#600: the sub-agent's own terminal agent_end, nested under the parent's `task` call
|
|
494
|
-
// (rpc-subagents.ndjson), must not end the parent turn; #149: its text stays nested.
|
|
495
|
-
write({ type: 'tool_execution_start', toolCallId: 'toolu_task_1', toolName: 'task', args: { agent: 'explore', task: 'Review the change' } });
|
|
496
|
-
write({ type: 'subagent_lifecycle', payload: { id: 'Reviewer', agent: 'explore', status: 'started', parentToolCallId: 'toolu_task_1', index: 0 } });
|
|
497
|
-
write({ type: 'subagent_event', payload: { id: 'Reviewer', event: { type: 'agent_start' } } });
|
|
498
|
-
write({ type: 'subagent_event', payload: { id: 'Reviewer', event: { type: 'tool_execution_start', toolCallId: 'toolu_child_grep', toolName: 'grep', args: { pattern: 'ask' } } } });
|
|
499
|
-
write({ type: 'subagent_event', payload: { id: 'Reviewer', event: { type: 'tool_execution_end', toolCallId: 'toolu_child_grep', toolName: 'grep', result: { content: [{ type: 'text', text: '3 matches' }] } } } });
|
|
500
|
-
write({ type: 'subagent_event', payload: { id: 'Reviewer', event: { type: 'agent_end', messages: [], isTerminal: true, yielded: true } } });
|
|
501
|
-
write({ type: 'subagent_lifecycle', payload: { id: 'Reviewer', agent: 'explore', status: 'completed', parentToolCallId: 'toolu_task_1', index: 0 } });
|
|
502
|
-
write({ type: 'tool_execution_end', toolCallId: 'toolu_task_1', toolName: 'task', result: { content: [{ type: 'text', text: 'Reviewer: done' }] }, isError: false });
|
|
503
|
-
// The parent keeps streaming after the child's terminal frame.
|
|
504
|
-
assistantText(['Still working after the sub-agent.\nCEZ:MONITORING']);
|
|
505
|
-
// Late child text after the parent marker; the second block never completes.
|
|
506
|
-
subagentText('Reviewer', 'Child review finished.', { input: 20, output: 10, cacheRead: 100, cacheWrite: 4, totalTokens: 134, cost: { total: 0.002 } });
|
|
507
|
-
write({ type: 'subagent_event', payload: { id: 'Reviewer', event: { type: 'message_update', message: { role: 'assistant' }, assistantMessageEvent: { type: 'text_start', contentIndex: 0 } } } });
|
|
508
|
-
write({ type: 'subagent_event', payload: { id: 'Reviewer', event: { type: 'message_update', message: { role: 'assistant' }, assistantMessageEvent: { type: 'text_delta', contentIndex: 0, delta: 'Child review still streaming.' } } } });
|
|
509
|
-
endTurn();
|
|
510
|
-
return;
|
|
511
|
-
}
|
|
512
|
-
if (message.includes('mock:approval-denied')) {
|
|
513
|
-
// A user's stricter `tools.approvalMode`: OMP fails the call closed when no UI can approve it.
|
|
514
|
-
write({ type: 'tool_execution_start', toolCallId: 'tool-denied', toolName: 'bash', args: { command: 'rm -rf build' } });
|
|
515
|
-
write({ type: 'tool_execution_end', toolCallId: 'tool-denied', toolName: 'bash', result: { content: [{ type: 'text', text: NO_UI_APPROVAL_ERROR }] }, isError: true });
|
|
516
|
-
assistantText(['The command needs approval I cannot get here.']);
|
|
517
|
-
endTurn();
|
|
518
|
-
return;
|
|
519
|
-
}
|
|
520
|
-
if (message.includes('mock:steer-late')) {
|
|
521
|
-
// The final text first; a steer admitted now arrives after the last model call (#505).
|
|
522
|
-
assistantText(['late window: final message already sent']);
|
|
523
|
-
activeTurn.late = true;
|
|
524
|
-
await sleep(300);
|
|
525
|
-
endTurn();
|
|
526
|
-
return;
|
|
527
|
-
}
|
|
528
|
-
if (message.includes('mock:hold-done')) {
|
|
529
|
-
await waitForMockRelease(400);
|
|
530
|
-
assistantText(['parity hold-done: content after the pause\n\nCEZ:DONE']);
|
|
531
|
-
endTurn();
|
|
532
|
-
return;
|
|
533
|
-
}
|
|
534
|
-
if (message.includes('mock:hold-ask')) {
|
|
535
|
-
await waitForMockRelease(400);
|
|
536
|
-
assistantText(['Pick one.\n\nCEZ:ASK {"questions":[{"header":"Library","question":"Which test library?","options":[{"label":"Vitest"},{"label":"Node test"}]}]}']);
|
|
537
|
-
endTurn();
|
|
538
|
-
return;
|
|
539
|
-
}
|
|
540
|
-
if (message.includes('mock:done') || (resumeAfterAsk && message.trim() === 'Library: Vitest')) {
|
|
541
|
-
resumeAfterAsk = false;
|
|
542
|
-
assistantText(['parity done: the task is complete\n\nCEZ:DONE']);
|
|
543
|
-
endTurn();
|
|
544
|
-
return;
|
|
545
|
-
}
|
|
546
|
-
if (message.includes('mock:ci-wait')) {
|
|
547
|
-
const { ciPrompt } = await import('./mock-ci-tool.mjs');
|
|
548
|
-
assistantText([await ciPrompt('omp', argv, message)]);
|
|
549
|
-
endTurn();
|
|
550
|
-
return;
|
|
551
|
-
}
|
|
552
|
-
if (message.includes('mock:steer-tool')) {
|
|
553
|
-
write({ type: 'tool_execution_start', toolCallId: 'tool-steer', toolName: 'bash', args: { command: 'wait' } });
|
|
554
|
-
await sleep(Number(process.env.CEZ_MOCK_STEER_MS ?? 600));
|
|
555
|
-
write({ type: 'tool_execution_end', toolCallId: 'tool-steer', toolName: 'bash', result: { content: [{ type: 'text', text: 'waited' }] }, isError: false });
|
|
556
|
-
assistantText(['steer tool done']);
|
|
557
|
-
endTurn();
|
|
558
|
-
return;
|
|
559
|
-
}
|
|
560
|
-
if (message.includes('mock:provider-error')) {
|
|
757
|
+
if (delivery) await delivery.holdResponse(message);
|
|
758
|
+
return respondPromptTurn(command, message, gated);
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
async function respondPromptTurn(command, message, gated) {
|
|
762
|
+
for (const scenario of promptScenarios) {
|
|
763
|
+
if (!scenario.matches(message)) continue;
|
|
764
|
+
const result = scenario.respond(command, message, gated);
|
|
765
|
+
const handled = result instanceof Promise ? await result : result;
|
|
766
|
+
if (handled !== false) return;
|
|
767
|
+
}
|
|
768
|
+
const selectedFailure = failureControl?.failureFor(message);
|
|
769
|
+
const nativeFailure = selectedFailure instanceof Promise ? await selectedFailure : selectedFailure;
|
|
770
|
+
if (failureControl ? nativeFailure === 'provider' : message.includes('mock:provider-error')) {
|
|
561
771
|
const error = { message: 'Not Found', provider: 'anthropic', model: 'claude-mock', retryable: false };
|
|
562
772
|
assistantText([], { stopReason: 'error', usage: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, totalTokens: 0, cost: { total: 0 } }, extra: { errorMessage: 'Not Found' } });
|
|
563
773
|
endTurn({ status: 'error', error });
|
|
564
774
|
return;
|
|
565
775
|
}
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
process.exit(0);
|
|
570
|
-
}
|
|
571
|
-
if (message.includes('mock:hold-gated')) {
|
|
572
|
-
await waitForMockRelease(250);
|
|
573
|
-
assistantText(['parity hold-gated: content after the pause']);
|
|
574
|
-
await sleep(250);
|
|
575
|
-
endTurn();
|
|
576
|
-
return;
|
|
577
|
-
}
|
|
578
|
-
if (message.includes('mock:hold')) {
|
|
579
|
-
// Content and the settle both trail the prompt ack, so a turn-end derived from the ack
|
|
580
|
-
// (or a short deadline) is caught before any content arrives.
|
|
581
|
-
await sleep(250);
|
|
582
|
-
assistantText(['parity hold: content after the pause']);
|
|
583
|
-
await sleep(250);
|
|
584
|
-
endTurn();
|
|
585
|
-
return;
|
|
586
|
-
}
|
|
587
|
-
|
|
588
|
-
assistantText([`Investigating: `, message, ...(message.includes('mock:monitoring') ? ['\n\nCEZ:MONITORING'] : [])]);
|
|
589
|
-
write({ type: 'tool_execution_start', toolCallId: 'tool-1', toolName: 'read', args: { path: 'README.md' } });
|
|
590
|
-
write({ type: 'tool_execution_end', toolCallId: 'tool-1', toolName: 'read', result: { content: [{ type: 'text', text: 'mock file' }] }, isError: false });
|
|
591
|
-
if (!message.includes('mock:monitoring')) {
|
|
592
|
-
assistantText(['Done with the first pass.'], { usage: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, totalTokens: 0, cost: { total: 0 } } });
|
|
593
|
-
}
|
|
594
|
-
endTurn();
|
|
595
|
-
if (message.includes('mock:wake-after-settle')) {
|
|
596
|
-
// OMP resumes on its own after settling (async work finished): a new agent run, no prompt.
|
|
597
|
-
await sleep(250);
|
|
598
|
-
beginTurn();
|
|
599
|
-
assistantText(['woke after settle']);
|
|
600
|
-
write({ type: 'turn_end' });
|
|
601
|
-
write({ type: 'agent_end', messages: [], isTerminal: true, yielded: true });
|
|
602
|
-
activeTurn = null;
|
|
603
|
-
write({ type: 'session_settled' });
|
|
604
|
-
}
|
|
776
|
+
const tail = tailPromptScenarios.find(scenario => scenario.matches(message));
|
|
777
|
+
if (tail) return tail.respond(command, message);
|
|
778
|
+
return respondDefault(command, message);
|
|
605
779
|
}
|