@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
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
* `running` run. It draws from its own seeded stream, so the finished records keep the bytes and
|
|
25
25
|
* ids the first benchmark table measured; `serve` opens with `keepLive`, which leaves them live.
|
|
26
26
|
*/
|
|
27
|
+
import type { CiWait } from '@open-mercato/cezar-contract';
|
|
27
28
|
import type { RunRecord } from '../src/runs/store.ts';
|
|
28
29
|
|
|
29
30
|
export const FIXTURE_PROFILES = ['legacy', 'post-778'] as const;
|
|
@@ -136,7 +137,7 @@ const iso = (ms: number) => new Date(ms).toISOString();
|
|
|
136
137
|
const REPO = 'https://github.com/example-org/example-repo';
|
|
137
138
|
const MINUTE = 60_000;
|
|
138
139
|
|
|
139
|
-
interface Draft { record: RunRecord; skillPrompt?: string; extraPrompt?: string }
|
|
140
|
+
interface Draft { record: RunRecord; skillPrompt?: string; extraPrompt?: string | undefined }
|
|
140
141
|
|
|
141
142
|
/**
|
|
142
143
|
* `runs` finished records plus `liveRunCount(runs)` live ones, newest first (the order `RunStore`
|
|
@@ -367,7 +368,9 @@ function rootRun(rng: Rng, id: string, workerIds: readonly string[], at: number)
|
|
|
367
368
|
}
|
|
368
369
|
}
|
|
369
370
|
record.delegation = delegation;
|
|
370
|
-
|
|
371
|
+
// A schema-3 field, kept so the finished records stay the bytes the first table measured:
|
|
372
|
+
// store schema 4 reads it into `lastWaits` (`upgradeLegacyWaits`).
|
|
373
|
+
if (rng.chance(0.1)) (record as RunRecord & { lastCiWait?: ReturnType<typeof ciWait> }).lastCiWait = ciWait(rng, at);
|
|
371
374
|
return record;
|
|
372
375
|
}
|
|
373
376
|
|
|
@@ -408,7 +411,8 @@ function agentInputs(rng: Rng, parentRunId: string, sender: string, recipient: s
|
|
|
408
411
|
return inputs;
|
|
409
412
|
}
|
|
410
413
|
|
|
411
|
-
|
|
414
|
+
// A schema-3 `ciWait` row predates the PR wait target (hearsay-tools/cezarion#1425).
|
|
415
|
+
function ciWait(rng: Rng, at: number): Omit<CiWait, 'until' | 'wakeOnConflict'> {
|
|
412
416
|
const pr = rng.int(1, 999);
|
|
413
417
|
const headSha = rng.hex(40);
|
|
414
418
|
const id = rng.uuid();
|
package/scripts/check-pack.mjs
CHANGED
|
@@ -20,7 +20,9 @@ const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'
|
|
|
20
20
|
|
|
21
21
|
// Under `npm run`, npm_execpath is npm's own cli.js — running it through
|
|
22
22
|
// process.execPath works on every platform (no .cmd shim needed on Windows).
|
|
23
|
-
|
|
23
|
+
// pnpm 12 sets npm_execpath to a native executable; these operations need npm.
|
|
24
|
+
const npmExecpath = /(?:^|[\\/])npm-cli\.js$/.test(process.env.npm_execpath ?? '')
|
|
25
|
+
? process.env.npm_execpath : undefined;
|
|
24
26
|
const packArgs = ['pack', '--dry-run', '--json'];
|
|
25
27
|
const npmCli = process.platform === 'win32' ? 'npm.cmd' : 'npm';
|
|
26
28
|
const stdout = npmExecpath
|
|
@@ -1,42 +1,28 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Bundle
|
|
2
|
+
* Bundle private runtime contract code and declarations into the published service dist, then
|
|
3
|
+
* rewrite emitted root and subpath references. Keep source imports unchanged. Remove this step
|
|
4
|
+
* when private runtime resolution is no longer needed.
|
|
3
5
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* This package is the exception, because it is PUBLISHED. `workspace/migrations.ts` imports
|
|
9
|
-
* `workspaceUiStateSchema` — a zod value, not a type — so the installed CLI resolves the contract
|
|
10
|
-
* at runtime, and a tarball naming a package npm has never seen would fail on install. So the
|
|
11
|
-
* build folds it in: esbuild compiles the contract's source to one ESM file under `dist/contract/`,
|
|
12
|
-
* `tsc` emits its declarations beside it, and the emitted references are repointed at both.
|
|
13
|
-
*
|
|
14
|
-
* Nothing is copied at the SOURCE level — the package graph still states the dependency, and this
|
|
15
|
-
* runs only when `dist` actually names it. Delete this the day the contract is published, or the
|
|
16
|
-
* day nothing here imports a contract VALUE.
|
|
17
|
-
*
|
|
18
|
-
* DECLARATIONS ship next to the bundle, and that is not optional. The scan below matches `.d.ts`
|
|
19
|
-
* as well as `.js`, so emitted type imports get repointed too (`dist/ui-state.d.ts` names
|
|
20
|
-
* `WorkspaceUiState`). esbuild emits JavaScript only, so a bundle on its own leaves those
|
|
21
|
-
* declarations naming a module TypeScript cannot resolve — `TS7016`, and the type silently
|
|
22
|
-
* degrades to `any` for anyone consuming the published package. Every tsconfig here sets
|
|
23
|
-
* `skipLibCheck`, so nothing in this repo would have said a word. `tsc --emitDeclarationOnly`
|
|
24
|
-
* mirrors the contract's `src` tree into `dist/contract/`, which is what makes
|
|
25
|
-
* `./contract/index.js` resolve to a real `./contract/index.d.ts`.
|
|
6
|
+
* Every subpath repoints to one bundle of `packages/contract/src/index.ts`, so it exports only
|
|
7
|
+
* the names that index re-exports. A module the index reaches through a named re-export (`ask.ts`
|
|
8
|
+
* names a few of `ask-schema.ts`'s) keeps only those names in the bundle. The build fails when an
|
|
9
|
+
* emitted import names a contract value the bundle lacks (hearsay-tools/cezarion#1431).
|
|
26
10
|
*/
|
|
27
11
|
import { execFileSync } from 'node:child_process';
|
|
28
12
|
import { createRequire } from 'node:module';
|
|
29
13
|
import { existsSync, readdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
|
|
30
|
-
import { dirname, join, relative } from 'node:path';
|
|
14
|
+
import { basename, dirname, join, relative, resolve } from 'node:path';
|
|
31
15
|
import { fileURLToPath } from 'node:url';
|
|
32
16
|
import { build } from 'esbuild';
|
|
33
17
|
|
|
34
18
|
const here = dirname(fileURLToPath(import.meta.url));
|
|
35
|
-
const dist = join(here, '..', 'dist');
|
|
19
|
+
const dist = process.argv[2] ? resolve(process.argv[2]) : join(here, '..', 'dist');
|
|
36
20
|
const contractRoot = join(here, '..', '..', 'contract');
|
|
37
21
|
const entry = join(contractRoot, 'src', 'index.ts');
|
|
38
22
|
const outdir = join(dist, 'contract');
|
|
39
|
-
|
|
23
|
+
// The bare name and every module subpath (`@open-mercato/cezar-contract/runs`, hearsay-tools/cezarion#1237).
|
|
24
|
+
const SPEC = /(['"])@open-mercato\/cezar-contract(?:\/[^'"]*)?\1/g;
|
|
25
|
+
const CONTRACT = /^@open-mercato\/cezar-contract(?:\/[^'"]*)?$/;
|
|
40
26
|
|
|
41
27
|
/** Emitted files that name the package — the copy happens only if it is really used. */
|
|
42
28
|
const referrers = [];
|
|
@@ -61,7 +47,8 @@ if (referrers.length === 0) {
|
|
|
61
47
|
|
|
62
48
|
// `zod` stays external: it is a real dependency of this package, so npm resolves it normally and
|
|
63
49
|
// the tarball does not carry a second copy.
|
|
64
|
-
await build({
|
|
50
|
+
const bundled = await build({
|
|
51
|
+
metafile: true,
|
|
65
52
|
entryPoints: [entry],
|
|
66
53
|
outfile: join(outdir, 'index.js'),
|
|
67
54
|
bundle: true,
|
|
@@ -71,6 +58,72 @@ await build({
|
|
|
71
58
|
external: ['zod'],
|
|
72
59
|
});
|
|
73
60
|
|
|
61
|
+
// A wildcard re-export has no named import for the linker below to validate. Check its
|
|
62
|
+
// runtime export set before rewriting it: otherwise a missing module silently becomes the
|
|
63
|
+
// root bundle's unrelated exports (hearsay-tools/cezarion#1813).
|
|
64
|
+
const rootExports = new Set(Object.values(bundled.metafile.outputs).flatMap((output) => output.exports));
|
|
65
|
+
for (const file of referrers.filter((name) => name.endsWith('.js'))) {
|
|
66
|
+
for (const match of readFileSync(file, 'utf8').matchAll(/export\s+\*\s+from\s+['"](@open-mercato\/cezar-contract\/([^'"]+))['"]/g)) {
|
|
67
|
+
const source = join(contractRoot, 'src', `${match[2]}.ts`);
|
|
68
|
+
const original = await build({
|
|
69
|
+
entryPoints: [source], bundle: true, write: false, metafile: true,
|
|
70
|
+
format: 'esm', platform: 'neutral', external: ['zod'],
|
|
71
|
+
});
|
|
72
|
+
const missing = Object.values(original.metafile.outputs).flatMap((output) => output.exports)
|
|
73
|
+
.filter((name) => !rootExports.has(name));
|
|
74
|
+
if (missing.length) {
|
|
75
|
+
console.error(`inline-contract: ${relative(dist, file)} wildcard re-export of "${match[1]}" loses root exports: ${missing.join(', ')}`);
|
|
76
|
+
process.exit(1);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// Link every emitted importer against the bundle, as Node does when the CLI starts, before
|
|
82
|
+
// anything is repointed. Each specifier loads as a module of its own that re-exports the bundle,
|
|
83
|
+
// so esbuild's message names the subpath. Every other import stays external: only contract
|
|
84
|
+
// names are checked. `import-is-undefined` covers a namespace member the bundle lacks.
|
|
85
|
+
const bundle = join(outdir, 'index.js');
|
|
86
|
+
const importers = referrers.filter((p) => p.endsWith('.js'));
|
|
87
|
+
const gaps = importers.length === 0 ? [] : await build({
|
|
88
|
+
entryPoints: importers,
|
|
89
|
+
absWorkingDir: dist,
|
|
90
|
+
outdir: join(dist, '.inline-contract-check'),
|
|
91
|
+
write: false,
|
|
92
|
+
bundle: true,
|
|
93
|
+
format: 'esm',
|
|
94
|
+
platform: 'neutral',
|
|
95
|
+
logLevel: 'silent',
|
|
96
|
+
logOverride: { 'import-is-undefined': 'error' },
|
|
97
|
+
plugins: [{
|
|
98
|
+
name: 'contract-exports',
|
|
99
|
+
setup(check) {
|
|
100
|
+
check.onResolve({ filter: /.*/ }, (args) => {
|
|
101
|
+
if (args.kind === 'entry-point') return undefined;
|
|
102
|
+
if (CONTRACT.test(args.path)) return { path: args.path, namespace: 'contract' };
|
|
103
|
+
if (args.namespace === 'contract') return { path: bundle };
|
|
104
|
+
return { external: true };
|
|
105
|
+
});
|
|
106
|
+
check.onLoad({ filter: /.*/, namespace: 'contract' }, () => ({ contents: `export * from ${JSON.stringify(bundle)};` }));
|
|
107
|
+
},
|
|
108
|
+
}],
|
|
109
|
+
}).then(() => [], (error) => {
|
|
110
|
+
if (!Array.isArray(error?.errors)) throw error;
|
|
111
|
+
return error.errors;
|
|
112
|
+
});
|
|
113
|
+
if (gaps.length > 0) {
|
|
114
|
+
for (const { text, location } of gaps) {
|
|
115
|
+
const where = location ? `${join(basename(dist), location.file)}:${location.line}` : basename(dist);
|
|
116
|
+
const name = /import "([^"]+)"/i.exec(text)?.[1];
|
|
117
|
+
const subpath = /"contract:([^"]+)"/.exec(text)?.[1];
|
|
118
|
+
console.error(name && subpath
|
|
119
|
+
? `inline-contract: ${where} imports "${name}" from "${subpath}", which dist/contract/index.js does not export`
|
|
120
|
+
: `inline-contract: ${where}: ${text}`);
|
|
121
|
+
}
|
|
122
|
+
console.error('inline-contract: the bundle holds only the names packages/contract/src/index.ts re-exports. '
|
|
123
|
+
+ 'Re-export each name there: an `export *` of its module, or the named re-export that reaches it.');
|
|
124
|
+
process.exit(1);
|
|
125
|
+
}
|
|
126
|
+
|
|
74
127
|
// `tsc` is located through the module graph rather than a guessed `node_modules` path, because
|
|
75
128
|
// `typescript` is a devDependency of THIS package and may sit here or be hoisted to the workspace
|
|
76
129
|
// root. Via the manifest's own `bin` entry: TypeScript 7's `exports` map does not publish
|
|
@@ -31,7 +31,9 @@ if (!['link', 'global', 'uninstall'].includes(mode)) {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
// npm invocation shim (identical to dev.mjs / check-pack.mjs).
|
|
34
|
-
|
|
34
|
+
// pnpm 12 sets npm_execpath to a native executable; these operations need npm.
|
|
35
|
+
const npmExecpath = /(?:^|[\\/])npm-cli\.js$/.test(process.env.npm_execpath ?? '')
|
|
36
|
+
? process.env.npm_execpath : undefined;
|
|
35
37
|
const npmCli = process.platform === 'win32' ? 'npm.cmd' : 'npm';
|
|
36
38
|
function npm(args, { capture = false } = {}) {
|
|
37
39
|
const viaNode = Boolean(npmExecpath);
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/** Integration-only: npm run build:server && node packages/cezar/scripts/measure-transcript-facts-health.mjs
|
|
2
|
+
* Boots the actual loopback server; deliberately never imported by the fast tests.
|
|
3
|
+
*/
|
|
4
|
+
import assert from 'node:assert/strict';
|
|
5
|
+
import { execFileSync } from 'node:child_process';
|
|
6
|
+
import { once } from 'node:events';
|
|
7
|
+
import { mkdtempSync, readdirSync, rmSync } from 'node:fs';
|
|
8
|
+
import { tmpdir } from 'node:os';
|
|
9
|
+
import { join } from 'node:path';
|
|
10
|
+
import { setTimeout as delay } from 'node:timers/promises';
|
|
11
|
+
import { seedColdHistories, verifyFacts } from './transcript-facts-fixture.mjs';
|
|
12
|
+
|
|
13
|
+
const root = mkdtempSync(join(process.platform === 'win32' ? tmpdir() : '/tmp', 'cez-facts-health-'));
|
|
14
|
+
// The experiment has no external peers, credentials, background updater, or real home.
|
|
15
|
+
for (const key of Object.keys(process.env)) if (key.startsWith('CEZ_')) delete process.env[key];
|
|
16
|
+
process.env.CEZ_HOME = join(root, 'home');
|
|
17
|
+
process.env.CEZ_DRY_RUN = '1';
|
|
18
|
+
const runtime = { url: new URL('../dist/', import.meta.url), ext: 'js' };
|
|
19
|
+
const dataDir = join(root, 'cold-project', '.ai/cezar');
|
|
20
|
+
let store;
|
|
21
|
+
let bootStore;
|
|
22
|
+
let server;
|
|
23
|
+
const watchdog = setTimeout(() => { console.error('health measurement exceeded 30s'); process.exitCode = 1; server?.closeAllConnections(); server?.close(); store?.close(); bootStore?.close(); }, 30_000);
|
|
24
|
+
try {
|
|
25
|
+
const { RunStore } = await import(new URL('runs/store.js', runtime.url));
|
|
26
|
+
const { startServer } = await import(new URL('server/server.js', runtime.url));
|
|
27
|
+
// Keep git discovery away from the user's parent repository, even if TMPDIR
|
|
28
|
+
// was set inside a cezar worktree. This repo contains only the experiment.
|
|
29
|
+
execFileSync('git', ['init', '--initial-branch=main'], { cwd: root, stdio: 'ignore' });
|
|
30
|
+
const fixtures = await seedColdHistories(dataDir, runtime);
|
|
31
|
+
global.gc?.();
|
|
32
|
+
// Project-open scenario: establish the real HTTP/client path before opening a
|
|
33
|
+
// second cold store on this same event loop. No transcript sidecar is primed.
|
|
34
|
+
bootStore = RunStore.open(join(root, '.ai/cezar'));
|
|
35
|
+
await bootStore.factsWarmIdle();
|
|
36
|
+
server = startServer({ repoRoot: root, store: bootStore, manager: {}, version: 'task4-measurement', bindHost: '127.0.0.1' }, 0);
|
|
37
|
+
if (!server.listening) await once(server, 'listening');
|
|
38
|
+
const address = server.address();
|
|
39
|
+
assert.ok(address && typeof address !== 'string');
|
|
40
|
+
const endpoint = `http://127.0.0.1:${address.port}/api/v1/health`;
|
|
41
|
+
const primingStart = performance.now();
|
|
42
|
+
const prime = await fetch(endpoint, { signal: AbortSignal.timeout(2_000) });
|
|
43
|
+
assert.equal(prime.status, 200);
|
|
44
|
+
assert.equal((await prime.json()).version, 'task4-measurement');
|
|
45
|
+
const primingLatencyMs = performance.now() - primingStart;
|
|
46
|
+
assert.equal(readdirSync(join(dataDir, 'runs')).filter(name => name.endsWith('.facts.json')).length, 0);
|
|
47
|
+
const start = performance.now();
|
|
48
|
+
store = RunStore.open(dataDir);
|
|
49
|
+
let end;
|
|
50
|
+
const warming = store.factsWarmIdle().then(() => { end = performance.now(); });
|
|
51
|
+
const samples = [];
|
|
52
|
+
while (end === undefined) {
|
|
53
|
+
const requestStart = performance.now();
|
|
54
|
+
const cpuStart = process.threadCpuUsage();
|
|
55
|
+
const response = await fetch(endpoint, { signal: AbortSignal.timeout(2_000) });
|
|
56
|
+
assert.equal(response.status, 200);
|
|
57
|
+
assert.equal((await response.json()).version, 'task4-measurement');
|
|
58
|
+
const requestEnd = performance.now();
|
|
59
|
+
// Include EVERY request begun while cold warm-up was active, even one ending after it.
|
|
60
|
+
const cpu = process.threadCpuUsage(cpuStart);
|
|
61
|
+
samples.push({ startMs: requestStart - start, endMs: requestEnd - start, latencyMs: requestEnd - requestStart,
|
|
62
|
+
mainThreadCpuMs: (cpu.user + cpu.system) / 1000 });
|
|
63
|
+
await delay(5);
|
|
64
|
+
}
|
|
65
|
+
await warming;
|
|
66
|
+
assert.ok(samples.length > 0, 'health requests must overlap cold warming');
|
|
67
|
+
assert.ok(samples.every(sample => sample.startMs < end - start && sample.endMs > 0));
|
|
68
|
+
const result = { kind: 'transcript-facts-http-health', runtime: runtime.url.href,
|
|
69
|
+
endpoint: '/api/v1/health', scenario: 'already-listening server during cold project open', primingLatencyMs,
|
|
70
|
+
...verifyFacts(dataDir, fixtures, store), durationMs: end - start,
|
|
71
|
+
sampleCount: samples.length, maxLatencyMs: Math.max(...samples.map(sample => sample.latencyMs)), samples };
|
|
72
|
+
console.log(JSON.stringify(result));
|
|
73
|
+
assert.ok(result.maxLatencyMs < 50, `max health latency ${result.maxLatencyMs.toFixed(3)}ms must be <50ms`);
|
|
74
|
+
} finally {
|
|
75
|
+
clearTimeout(watchdog);
|
|
76
|
+
let cleanupTimer;
|
|
77
|
+
try {
|
|
78
|
+
if (server) await Promise.race([server.shutdownForRestart(), new Promise((_, reject) => {
|
|
79
|
+
cleanupTimer = setTimeout(() => reject(new Error('server cleanup timed out')), 5_000);
|
|
80
|
+
})]);
|
|
81
|
+
} finally {
|
|
82
|
+
clearTimeout(cleanupTimer);
|
|
83
|
+
store?.close();
|
|
84
|
+
bootStore?.close();
|
|
85
|
+
rmSync(root, { recursive: true, force: true });
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/** Dedicated server-free regression (intentionally outside parallel Vitest discovery).
|
|
2
|
+
* node --expose-gc --import tsx packages/cezar/scripts/measure-transcript-facts-lag.mjs
|
|
3
|
+
* Built runtime: pass an absolute dist directory. Baseline source: pass its src directory and ts.
|
|
4
|
+
* A separate process removes test-runner loop work, NOT unrelated host CPU scheduling.
|
|
5
|
+
* Keep every sample and the strict wall-time ceiling; investigate load instead of retrying here.
|
|
6
|
+
*/
|
|
7
|
+
import assert from 'node:assert/strict';
|
|
8
|
+
import { mkdtempSync, rmSync } from 'node:fs';
|
|
9
|
+
import { tmpdir } from 'node:os';
|
|
10
|
+
import { join } from 'node:path';
|
|
11
|
+
import { pathToFileURL } from 'node:url';
|
|
12
|
+
import { setTimeout as delay } from 'node:timers/promises';
|
|
13
|
+
import { seedColdHistories, verifyFacts } from './transcript-facts-fixture.mjs';
|
|
14
|
+
|
|
15
|
+
const runtime = { url: process.argv[2] ? pathToFileURL(process.argv[2] + '/') : new URL('../src/', import.meta.url), ext: process.argv[3] ?? (process.argv[2] ? 'js' : 'ts') };
|
|
16
|
+
const { RunStore } = await import(new URL('runs/store.' + runtime.ext, runtime.url));
|
|
17
|
+
const dir = mkdtempSync(join(tmpdir(), 'cez-facts-lag-'));
|
|
18
|
+
let store;
|
|
19
|
+
let timer;
|
|
20
|
+
try {
|
|
21
|
+
const fixtures = await seedColdHistories(dir, runtime);
|
|
22
|
+
// Fixture allocation/collection belongs to setup, not the measured warm path.
|
|
23
|
+
global.gc?.();
|
|
24
|
+
const periodMs = 20;
|
|
25
|
+
const ticks = [];
|
|
26
|
+
let previous = performance.now();
|
|
27
|
+
let previousCpu = process.threadCpuUsage();
|
|
28
|
+
timer = setInterval(() => {
|
|
29
|
+
const at = performance.now();
|
|
30
|
+
const cpu = process.threadCpuUsage();
|
|
31
|
+
ticks.push({ at, lagMs: Math.max(0, at - previous - periodMs),
|
|
32
|
+
mainThreadCpuMs: (cpu.user + cpu.system - previousCpu.user - previousCpu.system) / 1000 });
|
|
33
|
+
previousCpu = cpu;
|
|
34
|
+
previous = at;
|
|
35
|
+
}, periodMs);
|
|
36
|
+
// Establish a real interval before starting; retain the first tick after completion too.
|
|
37
|
+
await delay(periodMs * 2);
|
|
38
|
+
const start = performance.now();
|
|
39
|
+
store = RunStore.open(dir);
|
|
40
|
+
await store.factsWarmIdle();
|
|
41
|
+
const end = performance.now();
|
|
42
|
+
while (!ticks.some(tick => tick.at > end)) await delay(periodMs);
|
|
43
|
+
clearInterval(timer);
|
|
44
|
+
const overlapping = ticks.filter(tick => tick.at >= start && tick.at <= end);
|
|
45
|
+
const result = { kind: 'transcript-facts-lag', runtime: runtime.url.href, periodMs,
|
|
46
|
+
...verifyFacts(dir, fixtures, store), durationMs: end - start, ticks: ticks.length,
|
|
47
|
+
beforeTicks: ticks.filter(tick => tick.at < start).length,
|
|
48
|
+
trailingTicks: ticks.filter(tick => tick.at > end).length,
|
|
49
|
+
overlappingTicks: overlapping.length, maxLagMs: Math.max(...ticks.map(tick => tick.lagMs)),
|
|
50
|
+
samples: ticks.map(tick => ({ offsetMs: tick.at - start, lagMs: tick.lagMs, mainThreadCpuMs: tick.mainThreadCpuMs })) };
|
|
51
|
+
console.log(JSON.stringify(result));
|
|
52
|
+
assert.equal(result.histories, 700);
|
|
53
|
+
assert.equal(result.sidecars, 700);
|
|
54
|
+
assert.equal(result.plain, 350);
|
|
55
|
+
assert.equal(result.brotli, 350);
|
|
56
|
+
assert.equal(result.events, 105_592);
|
|
57
|
+
assert.ok(result.largestBytes > 40_000_000);
|
|
58
|
+
assert.equal(result.coldSidecars, 0);
|
|
59
|
+
assert.ok(result.beforeTicks > 0, 'must establish the interval before warming');
|
|
60
|
+
assert.ok(result.trailingTicks > 0, 'must retain a trailing tick after warming');
|
|
61
|
+
assert.ok(overlapping.length > 0, 'must sample during cold warm-up');
|
|
62
|
+
assert.ok(result.durationMs > 0);
|
|
63
|
+
assert.ok(result.maxLagMs < 20, `max extra interval lag ${result.maxLagMs.toFixed(3)}ms must be <20ms`);
|
|
64
|
+
} finally {
|
|
65
|
+
clearInterval(timer);
|
|
66
|
+
store?.close();
|
|
67
|
+
rmSync(dir, { recursive: true, force: true });
|
|
68
|
+
}
|
package/scripts/mock-ci-tool.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// Offline harness fixtures share the real bundled MCP protocol, never a fake receipt.
|
|
2
|
-
import { writeFileSync, existsSync } from 'node:fs';
|
|
3
|
-
import { basename } from 'node:path';
|
|
2
|
+
import { writeFileSync, readFileSync, existsSync } from 'node:fs';
|
|
3
|
+
import { basename, join } from 'node:path';
|
|
4
4
|
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
5
5
|
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
6
6
|
import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js';
|
|
7
7
|
|
|
8
8
|
export async function probeCiTool(backend, wire, pr = process.env.CEZ_MOCK_CI_PR) {
|
|
9
9
|
if (!pr) return;
|
|
10
|
-
return probeCezarTool(backend, wire, '
|
|
10
|
+
return probeCezarTool(backend, wire, 'cezar_wait', { kind: 'pr', pr });
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
// Calls one cezar tool the way the real harness would: through the wired MCP server (or Pi/OMP extension).
|
|
@@ -24,7 +24,11 @@ export async function probeCezarTool(backend, wire, name, args) {
|
|
|
24
24
|
extension({ registerTool(tool) { tools.push(tool); } });
|
|
25
25
|
const tool = tools.find(tool => tool.name === name);
|
|
26
26
|
if (!tool) throw new Error(`${name} not registered`);
|
|
27
|
-
|
|
27
|
+
// A registered tool pi's tool selection hides answers the model the way pi 1.0.4 does.
|
|
28
|
+
const response = backend === 'pi' && !piAdmits(wire, name)
|
|
29
|
+
? { isError: true, content: [{ type: 'text', text: `Tool ${name} not found` }] }
|
|
30
|
+
: await tool.execute('ci-1', args);
|
|
31
|
+
result = { names: tools.map(tool => tool.name), response };
|
|
28
32
|
} else {
|
|
29
33
|
let server; let env;
|
|
30
34
|
if (backend === 'claude') {
|
|
@@ -34,8 +38,16 @@ export async function probeCezarTool(backend, wire, name, args) {
|
|
|
34
38
|
server = Object.entries(wire.config ?? {}).find(([key]) => key.startsWith('mcp_servers.cezar_ci_'))?.[1];
|
|
35
39
|
env = Object.fromEntries((server?.env_vars ?? []).map(name => [name, process.env[name]]));
|
|
36
40
|
} else if (backend === 'cursor') {
|
|
37
|
-
|
|
38
|
-
|
|
41
|
+
if (Array.isArray(wire)) {
|
|
42
|
+
const dir = wire[wire.indexOf('--plugin-dir') + 1];
|
|
43
|
+
const servers = JSON.parse(readFileSync(join(dir, 'mcp.json'), 'utf8')).mcpServers;
|
|
44
|
+
server = Object.entries(servers).find(([name]) => name.startsWith('cezar_ci_'))?.[1];
|
|
45
|
+
env = Object.fromEntries(Object.entries(server?.env ?? {}).map(([key, value]) =>
|
|
46
|
+
[key, value.replace(/\$\{([^}]+)\}/g, (_, name) => process.env[name] ?? '')]));
|
|
47
|
+
} else {
|
|
48
|
+
server = wire.mcpServers.find(server => server.name.startsWith('cezar_ci_'));
|
|
49
|
+
env = Object.fromEntries(server?.env.map(({name,value}) => [name,value]) ?? []);
|
|
50
|
+
}
|
|
39
51
|
} else {
|
|
40
52
|
const local = Object.entries(wire.mcp ?? {}).find(([key]) => key.startsWith('cezar_ci_'))?.[1];
|
|
41
53
|
server = local && { command: local.command[0], args: local.command.slice(1) };
|
|
@@ -53,12 +65,43 @@ export async function probeCezarTool(backend, wire, name, args) {
|
|
|
53
65
|
return result;
|
|
54
66
|
}
|
|
55
67
|
|
|
68
|
+
// pi reads --tools as an allowlist and --no-tools as an empty one; with neither (cezar's default
|
|
69
|
+
// list sends --no-builtin-tools), an extension's tools are active once registered
|
|
70
|
+
// (hearsay-tools/cezarion#1305).
|
|
71
|
+
function piAdmits(wire, name) {
|
|
72
|
+
const index = wire.lastIndexOf('--tools');
|
|
73
|
+
if (index !== -1) return wire[index + 1].split(',').includes(name);
|
|
74
|
+
return !wire.includes('--no-tools');
|
|
75
|
+
}
|
|
76
|
+
|
|
56
77
|
export async function ciPrompt(backend, wire, text) {
|
|
57
78
|
const pr = /mock:ci-wait(?:\s+(https:\/\/[^\s\"\\]+))?/.exec(text)?.[1] ?? 'https://github.com/owner/repo/pull/1';
|
|
58
79
|
const result = await probeCiTool(backend, wire, pr);
|
|
59
80
|
return JSON.stringify(result.response);
|
|
60
81
|
}
|
|
61
82
|
|
|
83
|
+
// `mock:cezar-tool <name> <base64-json-args>` calls any cezar tool with those arguments
|
|
84
|
+
// (hearsay-tools/cezarion#1233). Base64, standard or URL-safe, survives every wire's escaping.
|
|
85
|
+
// Several calls run in order within one turn; `"wait_id": "last"` names the wait the previous
|
|
86
|
+
// answer registered, so a turn can open a wait and cancel it.
|
|
87
|
+
export async function toolPrompt(backend, wire, text) {
|
|
88
|
+
const matches = [...text.matchAll(/mock:cezar-tool\s+([a-z_]+)\s+([A-Za-z0-9+/=_-]+)/g)];
|
|
89
|
+
if (!matches.length) throw new Error('mock:cezar-tool needs a tool name and base64 JSON arguments');
|
|
90
|
+
const responses = [];
|
|
91
|
+
let last;
|
|
92
|
+
for (const [, name, encoded] of matches) {
|
|
93
|
+
const args = JSON.parse(Buffer.from(encoded, 'base64').toString('utf8'));
|
|
94
|
+
if (args.wait_id === 'last') args.wait_id = last;
|
|
95
|
+
const result = await probeCezarTool(backend, wire, name, args);
|
|
96
|
+
try { last = JSON.parse(result.response.content[0].text.split('\n')[0]).wait_id ?? last; } catch { /* a refusal names no wait */ }
|
|
97
|
+
responses.push(JSON.stringify(result.response));
|
|
98
|
+
}
|
|
99
|
+
// `mock:then <base64 text>` ends the turn with that text after the calls (an ask line, say).
|
|
100
|
+
const then = /mock:then\s+([A-Za-z0-9+/=_-]+)/.exec(text);
|
|
101
|
+
if (then) responses.push(Buffer.from(then[1], 'base64').toString('utf8'));
|
|
102
|
+
return responses.join('\n');
|
|
103
|
+
}
|
|
104
|
+
|
|
62
105
|
// `mock:preview-serve <port>` registers the e2e fixture app (`node preview-app.mjs <port>`) as a live preview.
|
|
63
106
|
export async function previewPrompt(backend, wire, text) {
|
|
64
107
|
const port = Number(/mock:preview-serve\s+(\d+)/.exec(text)?.[1]);
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// Native Claude stream-json fixtures, with independent per-input retry counts.
|
|
2
|
+
const attempts = new Map();
|
|
3
|
+
const model = 'claude-test-model';
|
|
4
|
+
export async function modelRefusalReply(text, uuid, emit, replay) {
|
|
5
|
+
const mode = text.split(':')[2];
|
|
6
|
+
const count = (attempts.get(text) ?? 0) + 1;
|
|
7
|
+
attempts.set(text, count);
|
|
8
|
+
const selected = mode === 'changed' ? 'claude-other-model' : model;
|
|
9
|
+
emit({ type: 'system', subtype: 'init', ...(mode === 'missing-session' ? {} : { session_id: mode === 'changed-session' ? 'other-session' : mode === 'empty-session' ? '' : 'model-refusal-session' }),
|
|
10
|
+
...(mode === 'missing-model' ? {} : { model: mode === 'empty-model' ? '' : selected }) });
|
|
11
|
+
if (mode === 'seed' || mode === 'queued-seed' || (mode === 'once' && count > 1) || mode === 'later') {
|
|
12
|
+
replay(uuid, text);
|
|
13
|
+
emit({ type: 'assistant', message: { role: 'assistant', content: [{ type: 'text', text: `Completed ${text}` }] } });
|
|
14
|
+
// Leave the final model call complete while another stdin line queues.
|
|
15
|
+
if (mode === 'queued-seed') await new Promise(resolve => setTimeout(resolve, 250));
|
|
16
|
+
emit({ type: 'result', subtype: 'success', result: `Completed ${text}`,
|
|
17
|
+
usage: { input_tokens: 10, output_tokens: 5 }, user_message_uuids: [uuid], queued_turn_count: 0 });
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
const refused = mode === 'wrong-model' ? 'claude-wrong-model' : selected;
|
|
21
|
+
let message = `There's an issue with the selected model (${refused}). It may not exist or you may not have access to it. Run --model to pick a different model.`;
|
|
22
|
+
if (mode === 'auth') message = 'Failed to authenticate. API Error: 401 OAuth access token has been revoked.';
|
|
23
|
+
if (mode === 'limit') message = 'API Error: Request rejected (429) · All credentials are cooling down. Please try again later.';
|
|
24
|
+
if (mode.startsWith('system-')) emit({ type: 'system', subtype: mode.slice(7).replaceAll('-', '_'), task_id: 'already-started' });
|
|
25
|
+
if (mode === 'tool-progress') emit({ type: 'tool_progress', tool_use_id: 'already-started', tool_name: 'Bash', elapsed_time_seconds: 1 });
|
|
26
|
+
if (mode === 'work') emit({ type: 'assistant', message: { role: 'assistant', content: [{ type: 'tool_use', id: 'already-ran', name: 'Bash', input: { command: 'touch result' } }] } });
|
|
27
|
+
if (mode === 'prose') emit({ type: 'assistant', message: { role: 'assistant', content: [{ type: 'text', text: 'I already changed the file.' }] } });
|
|
28
|
+
if (mode === 'assistant-usage') emit({ type: 'assistant', message: { role: 'assistant', content: [], usage: { input_tokens: 1, output_tokens: 0 } } });
|
|
29
|
+
// Both real diagnostic sources: the visible assistant frame and is_error result.
|
|
30
|
+
emit({ type: 'assistant', message: { role: 'assistant', content: [{ type: 'text', text: message }] } });
|
|
31
|
+
const usage = { input_tokens: mode === 'used' ? 1 : 0, output_tokens: 0,
|
|
32
|
+
service_tier: 'standard', cache_read_input_tokens: mode === 'cached' ? 1 : 0 };
|
|
33
|
+
if (mode === 'missing-count') delete usage.output_tokens;
|
|
34
|
+
if (mode === 'invalid-count') usage.input_tokens = -1;
|
|
35
|
+
emit({ type: 'result', subtype: 'success', is_error: true, result: message,
|
|
36
|
+
modelUsage: { [selected]: { inputTokens: mode === 'model-tokens' ? 1 : 0,
|
|
37
|
+
outputTokens: 0, costUSD: mode === 'model-cost' ? 0.01 : mode === 'model-invalid' ? null : 0,
|
|
38
|
+
contextWindow: 200000, maxOutputTokens: 64000 } },
|
|
39
|
+
...(mode === 'missing-usage' ? {} : { usage }),
|
|
40
|
+
...(mode === 'paid' ? { total_cost_usd: 0.01 } : { total_cost_usd: 0 }),
|
|
41
|
+
user_message_uuids: [uuid], queued_turn_count: 0 });
|
|
42
|
+
}
|