cloving 1.1.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +584 -144
- package/assets/watch-fonts/fira-code-OFL.md +93 -0
- package/assets/watch-fonts/fira-code-latin-400-normal.woff2 +0 -0
- package/assets/watch-fonts/fira-code-latin-500-normal.woff2 +0 -0
- package/assets/watch-fonts/heebo-OFL.md +93 -0
- package/assets/watch-fonts/heebo-latin-500-normal.woff2 +0 -0
- package/assets/watch-fonts/heebo-latin-700-normal.woff2 +0 -0
- package/assets/watch-fonts/heebo-latin-800-normal.woff2 +0 -0
- package/assets/watch-fonts/manifest.json +112 -0
- package/assets/watch-fonts/space-grotesk-OFL.md +93 -0
- package/assets/watch-fonts/space-grotesk-latin-400-normal.woff2 +0 -0
- package/assets/watch-fonts/space-grotesk-latin-500-normal.woff2 +0 -0
- package/assets/watch-fonts/space-grotesk-latin-600-normal.woff2 +0 -0
- package/assets/watch-fonts/space-grotesk-latin-700-normal.woff2 +0 -0
- package/dist/src/agent-harness-shell.d.ts +12 -0
- package/dist/src/agent-harness-shell.js +90 -0
- package/dist/src/agent-harness-versions.d.ts +8 -0
- package/dist/src/agent-harness-versions.js +49 -0
- package/dist/src/agent-harnesses.d.ts +4 -0
- package/dist/src/agent-harnesses.js +13 -0
- package/dist/src/authority/commands.d.ts +2 -0
- package/dist/src/authority/commands.js +49 -8
- package/dist/src/authority/dispatch-decision.d.ts +1 -0
- package/dist/src/authority/dispatch-decision.js +7 -4
- package/dist/src/authority/events.js +2 -2
- package/dist/src/authority/gate-reduction.d.ts +1 -0
- package/dist/src/authority/gate-reduction.js +18 -3
- package/dist/src/authority/gates.d.ts +2 -1
- package/dist/src/authority/gates.js +5 -1
- package/dist/src/authority/handoff-chain.d.ts +24 -0
- package/dist/src/authority/handoff-chain.js +46 -0
- package/dist/src/authority/operations.js +1 -1
- package/dist/src/authority/reconciliation.d.ts +1 -0
- package/dist/src/authority/reconciliation.js +18 -11
- package/dist/src/authority/reduction.d.ts +1 -1
- package/dist/src/authority/reduction.js +6 -1
- package/dist/src/authority/status-input.d.ts +1 -1
- package/dist/src/authority/status.d.ts +1 -0
- package/dist/src/authority/status.js +27 -3
- package/dist/src/authority/transitions.d.ts +5 -5
- package/dist/src/authority/transitions.js +9 -0
- package/dist/src/broker/actor/authority-delivery.js +1 -0
- package/dist/src/broker/actor/authority-queries.d.ts +11 -1
- package/dist/src/broker/actor/authority-queries.js +67 -3
- package/dist/src/broker/actor/authority-receipts.js +11 -1
- package/dist/src/broker/actor/authority-session.js +2 -2
- package/dist/src/broker/actor/authority-settings.js +4 -0
- package/dist/src/broker/actor/delivery-intents.d.ts +3 -1
- package/dist/src/broker/actor/delivery-intents.js +4 -4
- package/dist/src/broker/actor/effect-delivery.js +13 -1
- package/dist/src/broker/actor/effect-queries.d.ts +1 -0
- package/dist/src/broker/actor/effect-queries.js +7 -0
- package/dist/src/broker/actor/pin-check.js +1 -1
- package/dist/src/broker/actor/stop-plan.js +1 -1
- package/dist/src/broker/actor/turn-state.js +1 -1
- package/dist/src/broker/authority-admission.js +26 -5
- package/dist/src/broker/authority-restore.js +1 -0
- package/dist/src/broker/decision-restore.js +4 -4
- package/dist/src/broker/socket-address.d.ts +3 -1
- package/dist/src/broker/socket-address.js +2 -2
- package/dist/src/cli/arguments.d.ts +11 -13
- package/dist/src/cli/arguments.js +37 -107
- package/dist/src/cli/command-effects.d.ts +7 -0
- package/dist/src/cli/command-effects.js +39 -0
- package/dist/src/cli/commands.js +11 -4
- package/dist/src/cli/config-arguments.d.ts +11 -0
- package/dist/src/cli/config-arguments.js +59 -0
- package/dist/src/cli/config-command.d.ts +2 -0
- package/dist/src/cli/config-command.js +105 -0
- package/dist/src/cli/config-file.d.ts +3 -0
- package/dist/src/cli/config-file.js +50 -0
- package/dist/src/cli/config-lock.d.ts +7 -0
- package/dist/src/cli/config-lock.js +61 -0
- package/dist/src/cli/config-notice.d.ts +5 -0
- package/dist/src/cli/config-notice.js +46 -0
- package/dist/src/cli/doctor-github.d.ts +9 -0
- package/dist/src/cli/doctor-github.js +138 -0
- package/dist/src/cli/doctor-harness.d.ts +13 -0
- package/dist/src/cli/doctor-harness.js +242 -0
- package/dist/src/cli/doctor-local.d.ts +18 -0
- package/dist/src/cli/doctor-local.js +77 -0
- package/dist/src/cli/doctor-runtime.d.ts +15 -0
- package/dist/src/cli/doctor-runtime.js +176 -0
- package/dist/src/cli/doctor-service.d.ts +1 -0
- package/dist/src/cli/doctor-service.js +11 -0
- package/dist/src/cli/doctor-workflows.d.ts +3 -0
- package/dist/src/cli/doctor-workflows.js +45 -0
- package/dist/src/cli/doctor.d.ts +15 -0
- package/dist/src/cli/doctor.js +190 -0
- package/dist/src/cli/github-ci-progress.d.ts +8 -0
- package/dist/src/cli/github-ci-progress.js +83 -0
- package/dist/src/cli/github-retry.d.ts +6 -0
- package/dist/src/cli/github-retry.js +47 -0
- package/dist/src/cli/harness-probes.d.ts +22 -0
- package/dist/src/cli/harness-probes.js +183 -0
- package/dist/src/cli/main.d.ts +7 -1
- package/dist/src/cli/main.js +39 -61
- package/dist/src/cli/phone-arguments.d.ts +14 -0
- package/dist/src/cli/phone-arguments.js +37 -0
- package/dist/src/cli/phone-client.d.ts +2 -0
- package/dist/src/cli/phone-client.js +32 -0
- package/dist/src/cli/phone-command.d.ts +13 -0
- package/dist/src/cli/phone-command.js +101 -0
- package/dist/src/cli/probe-command.d.ts +36 -0
- package/dist/src/cli/probe-command.js +59 -0
- package/dist/src/cli/project-settings.d.ts +4 -0
- package/dist/src/cli/project-settings.js +33 -0
- package/dist/src/cli/render.d.ts +3 -1
- package/dist/src/cli/render.js +102 -39
- package/dist/src/cli/report-github.d.ts +18 -0
- package/dist/src/cli/report-github.js +200 -0
- package/dist/src/cli/report.d.ts +17 -0
- package/dist/src/cli/report.js +192 -0
- package/dist/src/cli/repository-arguments.d.ts +5 -0
- package/dist/src/cli/repository-arguments.js +34 -0
- package/dist/src/cli/runtime-arguments.d.ts +4 -0
- package/dist/src/cli/runtime-arguments.js +15 -0
- package/dist/src/cli/runtime-directory.d.ts +6 -2
- package/dist/src/cli/runtime-directory.js +72 -14
- package/dist/src/cli/toolchain.d.ts +2 -0
- package/dist/src/cli/toolchain.js +22 -2
- package/dist/src/cli/usage-render.d.ts +5 -0
- package/dist/src/cli/usage-render.js +40 -1
- package/dist/src/cli/usage.d.ts +3 -3
- package/dist/src/cli/usage.js +74 -45
- package/dist/src/cli/watch-actions.d.ts +2 -0
- package/dist/src/cli/watch-actions.js +4 -4
- package/dist/src/cli/watch-board-view.d.ts +12 -1
- package/dist/src/cli/watch-board-view.js +64 -12
- package/dist/src/cli/watch-board.d.ts +7 -1
- package/dist/src/cli/watch-board.js +61 -16
- package/dist/src/cli/watch-card-forms.js +2 -2
- package/dist/src/cli/watch-client.d.ts +1 -1
- package/dist/src/cli/watch-client.js +12 -3
- package/dist/src/cli/watch-header-view.d.ts +27 -0
- package/dist/src/cli/watch-header-view.js +116 -0
- package/dist/src/cli/watch-model.d.ts +10 -4
- package/dist/src/cli/watch-model.js +49 -59
- package/dist/src/cli/watch-page.js +67 -14
- package/dist/src/cli/watch-phases.js +3 -3
- package/dist/src/cli/watch-phone-client.d.ts +1 -0
- package/dist/src/cli/watch-phone-client.js +84 -0
- package/dist/src/cli/watch-phone-view.d.ts +56 -0
- package/dist/src/cli/watch-phone-view.js +113 -0
- package/dist/src/cli/watch-phone.d.ts +5 -0
- package/dist/src/cli/watch-phone.js +53 -0
- package/dist/src/cli/watch-pr-command.d.ts +5 -2
- package/dist/src/cli/watch-pr-command.js +41 -4
- package/dist/src/cli/watch-pr-identity.d.ts +14 -2
- package/dist/src/cli/watch-pr-identity.js +25 -0
- package/dist/src/cli/watch-pr-observer.d.ts +1 -0
- package/dist/src/cli/watch-pr-observer.js +48 -6
- package/dist/src/cli/watch-pull-request.d.ts +12 -0
- package/dist/src/cli/watch-pull-request.js +134 -0
- package/dist/src/cli/watch-reads.d.ts +7 -1
- package/dist/src/cli/watch-reads.js +42 -20
- package/dist/src/cli/watch-render.d.ts +23 -2
- package/dist/src/cli/watch-render.js +2 -1
- package/dist/src/cli/watch-server.js +56 -7
- package/dist/src/cli/watch-turn.d.ts +4 -1
- package/dist/src/cli/watch-turn.js +38 -2
- package/dist/src/cli/watch-usage.js +5 -1
- package/dist/src/cli/watch-view.d.ts +10 -17
- package/dist/src/cli/watch-view.js +33 -77
- package/dist/src/cli.js +106 -23
- package/dist/src/command-settings.d.ts +16 -0
- package/dist/src/command-settings.js +42 -0
- package/dist/src/configuration-change.d.ts +11 -0
- package/dist/src/configuration-change.js +62 -0
- package/dist/src/configuration-display.d.ts +21 -0
- package/dist/src/configuration-display.js +69 -0
- package/dist/src/configuration-schema.d.ts +49 -0
- package/dist/src/configuration-schema.js +159 -0
- package/dist/src/daemon/claude-turn.d.ts +20 -5
- package/dist/src/daemon/claude-turn.js +116 -53
- package/dist/src/daemon/claude-worker.d.ts +3 -5
- package/dist/src/daemon/claude-worker.js +64 -80
- package/dist/src/daemon/command-journal.d.ts +5 -0
- package/dist/src/daemon/command-journal.js +50 -0
- package/dist/src/daemon/command-process.d.ts +28 -0
- package/dist/src/daemon/command-process.js +164 -0
- package/dist/src/daemon/command-worker.d.ts +19 -0
- package/dist/src/daemon/command-worker.js +182 -0
- package/dist/src/daemon/cursor-stream.d.ts +4 -0
- package/dist/src/daemon/cursor-stream.js +154 -0
- package/dist/src/daemon/daemon-adapters.d.ts +58 -0
- package/dist/src/daemon/daemon-adapters.js +102 -0
- package/dist/src/daemon/daemon-loops.d.ts +14 -0
- package/dist/src/daemon/daemon-loops.js +39 -0
- package/dist/src/daemon/daemon.d.ts +3 -30
- package/dist/src/daemon/daemon.js +132 -110
- package/dist/src/daemon/declared-input.d.ts +3 -0
- package/dist/src/daemon/declared-input.js +9 -0
- package/dist/src/daemon/delivery-router.js +7 -1
- package/dist/src/daemon/gemini-stream.d.ts +4 -0
- package/dist/src/daemon/gemini-stream.js +129 -0
- package/dist/src/daemon/github-calls.d.ts +4 -0
- package/dist/src/daemon/github-calls.js +16 -7
- package/dist/src/daemon/github-ci-rerun.d.ts +26 -0
- package/dist/src/daemon/github-ci-rerun.js +92 -0
- package/dist/src/daemon/github-ci.d.ts +6 -0
- package/dist/src/daemon/github-ci.js +251 -0
- package/dist/src/daemon/github-merge-call.d.ts +16 -0
- package/dist/src/daemon/github-merge-call.js +73 -0
- package/dist/src/daemon/github-merge.d.ts +3 -5
- package/dist/src/daemon/github-merge.js +59 -98
- package/dist/src/daemon/github-methods.d.ts +28 -0
- package/dist/src/daemon/github-methods.js +90 -16
- package/dist/src/daemon/github-operation.d.ts +3 -0
- package/dist/src/daemon/github-retry.d.ts +6 -0
- package/dist/src/daemon/github-retry.js +13 -0
- package/dist/src/daemon/github-ticket-status.js +27 -1
- package/dist/src/daemon/github-worker.js +2 -1
- package/dist/src/daemon/handoff-worker.d.ts +10 -0
- package/dist/src/daemon/handoff-worker.js +232 -0
- package/dist/src/daemon/issue-queue.d.ts +2 -0
- package/dist/src/daemon/issue-queue.js +92 -63
- package/dist/src/daemon/notify-journal.d.ts +18 -0
- package/dist/src/daemon/notify-journal.js +108 -0
- package/dist/src/daemon/notify-message.js +2 -1
- package/dist/src/daemon/notify.js +177 -37
- package/dist/src/daemon/opencode-stream.d.ts +5 -0
- package/dist/src/daemon/opencode-stream.js +87 -0
- package/dist/src/daemon/queue-status.d.ts +4 -0
- package/dist/src/daemon/queue-status.js +38 -0
- package/dist/src/daemon/retry-worktree.d.ts +18 -0
- package/dist/src/daemon/retry-worktree.js +139 -0
- package/dist/src/daemon/retrying-turn.d.ts +5 -0
- package/dist/src/daemon/retrying-turn.js +145 -21
- package/dist/src/daemon/schedule-journal.d.ts +19 -0
- package/dist/src/daemon/schedule-journal.js +57 -0
- package/dist/src/daemon/text-output.d.ts +18 -0
- package/dist/src/daemon/text-output.js +44 -0
- package/dist/src/daemon/ticket-dependency-waits.d.ts +18 -0
- package/dist/src/daemon/ticket-dependency-waits.js +60 -0
- package/dist/src/daemon/ticket-registration.d.ts +10 -8
- package/dist/src/daemon/ticket-registration.js +146 -47
- package/dist/src/daemon/ticket-source.d.ts +4 -1
- package/dist/src/daemon/ticket-source.js +8 -2
- package/dist/src/daemon/turn-command.d.ts +10 -0
- package/dist/src/daemon/turn-command.js +33 -0
- package/dist/src/daemon/turn-report.d.ts +18 -0
- package/dist/src/daemon/turn-report.js +79 -0
- package/dist/src/daemon/work-tree.d.ts +2 -1
- package/dist/src/daemon/work-tree.js +15 -12
- package/dist/src/daemon/workflow-generations.d.ts +32 -0
- package/dist/src/daemon/workflow-generations.js +57 -0
- package/dist/src/daemon/workflow-replay.d.ts +16 -0
- package/dist/src/daemon/workflow-replay.js +58 -0
- package/dist/src/daemon/workflow-schedules.d.ts +27 -0
- package/dist/src/daemon/workflow-schedules.js +185 -0
- package/dist/src/decision-visibility.d.ts +2 -0
- package/dist/src/decision-visibility.js +10 -0
- package/dist/src/decision-wait.d.ts +1 -0
- package/dist/src/decision-wait.js +3 -0
- package/dist/src/delivery-backoff.d.ts +1 -0
- package/dist/src/delivery-backoff.js +3 -0
- package/dist/src/doctor-report.d.ts +24 -0
- package/dist/src/doctor-report.js +70 -0
- package/dist/src/execution-pin.d.ts +9 -0
- package/dist/src/execution-pin.js +86 -2
- package/dist/src/grok-result.d.ts +12 -0
- package/dist/src/grok-result.js +61 -0
- package/dist/src/harness-defaults.d.ts +35 -0
- package/dist/src/harness-defaults.js +121 -0
- package/dist/src/host/decision-resume.d.ts +35 -0
- package/dist/src/host/decision-resume.js +86 -0
- package/dist/src/host/gate-bridge.d.ts +48 -0
- package/dist/src/host/gate-bridge.js +124 -0
- package/dist/src/host/run-wait.d.ts +26 -0
- package/dist/src/host/run-wait.js +37 -0
- package/dist/src/host/start-delivery.d.ts +3 -2
- package/dist/src/host/start-delivery.js +11 -4
- package/dist/src/host/step-bridge-host.d.ts +6 -19
- package/dist/src/host/step-bridge-host.js +57 -55
- package/dist/src/host/world-reconciliation.d.ts +1 -0
- package/dist/src/host/world-reconciliation.js +3 -0
- package/dist/src/host/world-runs.js +5 -0
- package/dist/src/issue-identity.d.ts +6 -0
- package/dist/src/issue-identity.js +23 -0
- package/dist/src/merge-request.d.ts +19 -0
- package/dist/src/merge-request.js +32 -0
- package/dist/src/phone/canonical-json.d.ts +1 -0
- package/dist/src/phone/canonical-json.js +16 -0
- package/dist/src/phone/phone-link.d.ts +7 -0
- package/dist/src/phone/phone-link.js +21 -0
- package/dist/src/phone/qr-data.d.ts +8 -0
- package/dist/src/phone/qr-data.js +133 -0
- package/dist/src/phone/qr-matrix.d.ts +6 -0
- package/dist/src/phone/qr-matrix.js +175 -0
- package/dist/src/phone/qr-penalty.d.ts +3 -0
- package/dist/src/phone/qr-penalty.js +67 -0
- package/dist/src/phone/qr-picture.d.ts +5 -0
- package/dist/src/phone/qr-picture.js +24 -0
- package/dist/src/private-config.schema.json +263 -0
- package/dist/src/project-config.schema.json +65 -0
- package/dist/src/project-settings.d.ts +19 -0
- package/dist/src/project-settings.js +131 -0
- package/dist/src/relay/answer-check.d.ts +24 -0
- package/dist/src/relay/answer-check.js +145 -0
- package/dist/src/relay/answer-inbox.d.ts +15 -0
- package/dist/src/relay/answer-inbox.js +173 -0
- package/dist/src/relay/daemon-keys.d.ts +16 -0
- package/dist/src/relay/daemon-keys.js +75 -0
- package/dist/src/relay/decision-check.d.ts +3 -0
- package/dist/src/relay/decision-check.js +77 -0
- package/dist/src/relay/decision-close.d.ts +6 -0
- package/dist/src/relay/decision-close.js +72 -0
- package/dist/src/relay/decision-envelopes.d.ts +29 -0
- package/dist/src/relay/decision-envelopes.js +93 -0
- package/dist/src/relay/decision-watch.d.ts +14 -0
- package/dist/src/relay/decision-watch.js +68 -0
- package/dist/src/relay/envelope-post.d.ts +8 -0
- package/dist/src/relay/envelope-post.js +71 -0
- package/dist/src/relay/envelope.d.ts +28 -0
- package/dist/src/relay/envelope.js +53 -0
- package/dist/src/relay/hpke.d.ts +25 -0
- package/dist/src/relay/hpke.js +108 -0
- package/dist/src/relay/pairing-checks.d.ts +42 -0
- package/dist/src/relay/pairing-checks.js +172 -0
- package/dist/src/relay/pairing-follow.d.ts +8 -0
- package/dist/src/relay/pairing-follow.js +95 -0
- package/dist/src/relay/pairing-session.d.ts +29 -0
- package/dist/src/relay/pairing-session.js +87 -0
- package/dist/src/relay/phone-delivery.d.ts +51 -0
- package/dist/src/relay/phone-delivery.js +139 -0
- package/dist/src/relay/phone-devices.d.ts +36 -0
- package/dist/src/relay/phone-devices.js +46 -0
- package/dist/src/relay/phone-inbox.d.ts +18 -0
- package/dist/src/relay/phone-inbox.js +17 -0
- package/dist/src/relay/phone-operations.d.ts +18 -0
- package/dist/src/relay/phone-operations.js +121 -0
- package/dist/src/relay/phone-outbox.d.ts +21 -0
- package/dist/src/relay/phone-outbox.js +25 -0
- package/dist/src/relay/phone-socket.d.ts +6 -0
- package/dist/src/relay/phone-socket.js +63 -0
- package/dist/src/relay/relay-control.d.ts +7 -0
- package/dist/src/relay/relay-control.js +24 -0
- package/dist/src/relay/relay-files.d.ts +2 -0
- package/dist/src/relay/relay-files.js +23 -0
- package/dist/src/relay/relay-heartbeat.d.ts +17 -0
- package/dist/src/relay/relay-heartbeat.js +81 -0
- package/dist/src/relay/relay-http.d.ts +14 -0
- package/dist/src/relay/relay-http.js +63 -0
- package/dist/src/relay/relay-registration.d.ts +15 -0
- package/dist/src/relay/relay-registration.js +63 -0
- package/dist/src/relay/relay-service.d.ts +25 -0
- package/dist/src/relay/relay-service.js +216 -0
- package/dist/src/relay/relay-store.d.ts +48 -0
- package/dist/src/relay/relay-store.js +131 -0
- package/dist/src/relay/sealed-post.d.ts +25 -0
- package/dist/src/relay/sealed-post.js +52 -0
- package/dist/src/relay.d.ts +1 -0
- package/dist/src/relay.js +8 -0
- package/dist/src/report-statistics.d.ts +50 -0
- package/dist/src/report-statistics.js +70 -0
- package/dist/src/report.d.ts +171 -0
- package/dist/src/report.js +119 -0
- package/dist/src/repository-identity.d.ts +4 -0
- package/dist/src/repository-identity.js +4 -0
- package/dist/src/review-subject.d.ts +41 -0
- package/dist/src/review-subject.js +91 -0
- package/dist/src/run-wait.d.ts +23 -0
- package/dist/src/run-wait.js +20 -0
- package/dist/src/service/active-tickets.d.ts +4 -0
- package/dist/src/service/active-tickets.js +49 -0
- package/dist/src/service/command-effects.d.ts +4 -0
- package/dist/src/service/command-effects.js +16 -0
- package/dist/src/service/decision-handler.d.ts +4 -0
- package/dist/src/service/decision-handler.js +39 -4
- package/dist/src/service/gateway.js +18 -3
- package/dist/src/service/queue-runs.d.ts +3 -0
- package/dist/src/service/queue-runs.js +39 -0
- package/dist/src/service/registry.d.ts +22 -3
- package/dist/src/service/registry.js +51 -8
- package/dist/src/service/replies.d.ts +10 -0
- package/dist/src/service/replies.js +12 -0
- package/dist/src/service/run-handlers.js +45 -54
- package/dist/src/service/run-metadata.d.ts +8 -0
- package/dist/src/service/run-metadata.js +53 -0
- package/dist/src/service/run-waits.d.ts +3 -0
- package/dist/src/service/run-waits.js +41 -0
- package/dist/src/service/service.d.ts +21 -2
- package/dist/src/service/service.js +23 -5
- package/dist/src/service/submission-handler.js +70 -19
- package/dist/src/service/worker-port.d.ts +1 -0
- package/dist/src/service/worker-totals.js +10 -1
- package/dist/src/step-bridge.d.ts +32 -0
- package/dist/src/steps/decision-gate.d.ts +2 -1
- package/dist/src/steps/decision-gate.js +7 -0
- package/dist/src/steps/handoff.d.ts +2 -0
- package/dist/src/steps/handoff.js +13 -0
- package/dist/src/steps/merge-by-person.d.ts +2 -0
- package/dist/src/steps/merge-by-person.js +18 -0
- package/dist/src/steps/merge-when-green.d.ts +2 -0
- package/dist/src/steps/merge-when-green.js +62 -0
- package/dist/src/steps/review-by-agent.d.ts +5 -0
- package/dist/src/steps/review-by-agent.js +124 -0
- package/dist/src/steps/review-by-person.d.ts +4 -0
- package/dist/src/steps/review-by-person.js +16 -0
- package/dist/src/steps/review-subject.d.ts +2 -0
- package/dist/src/steps/review-subject.js +11 -0
- package/dist/src/steps/run-command.d.ts +2 -0
- package/dist/src/steps/run-command.js +15 -0
- package/dist/src/steps/sleep.d.ts +3 -0
- package/dist/src/steps/sleep.js +19 -0
- package/dist/src/steps/wait-for-decision.d.ts +2 -0
- package/dist/src/steps/wait-for-decision.js +71 -0
- package/dist/src/steps/wait-for-run.d.ts +5 -0
- package/dist/src/steps/wait-for-run.js +9 -0
- package/dist/src/storage/decision-snapshots.d.ts +1 -0
- package/dist/src/storage/decision-snapshots.js +7 -1
- package/dist/src/submission.d.ts +4 -0
- package/dist/src/submission.js +6 -2
- package/dist/src/testing.d.ts +29 -0
- package/dist/src/testing.js +264 -0
- package/dist/src/ticket-dependencies.d.ts +1 -0
- package/dist/src/ticket-dependencies.js +15 -0
- package/dist/src/ticket-status-stream.d.ts +9 -0
- package/dist/src/ticket-status-stream.js +94 -0
- package/dist/src/ticket-status.js +7 -4
- package/dist/src/token-prices.d.ts +14 -4
- package/dist/src/token-prices.js +56 -11
- package/dist/src/turn-profile.d.ts +1 -0
- package/dist/src/turn-profile.js +8 -1
- package/dist/src/worker-usage.d.ts +25 -0
- package/dist/src/worker-usage.js +58 -1
- package/dist/src/workflow-admission.d.ts +6 -0
- package/dist/src/workflow-candidate.d.ts +7 -2
- package/dist/src/workflow-candidate.js +48 -5
- package/dist/src/workflow-contracts.d.ts +2 -0
- package/dist/src/workflow-contracts.js +8 -3
- package/dist/src/workflow-declaration.d.ts +31 -2
- package/dist/src/workflow-declaration.js +140 -16
- package/dist/src/workflow-discovery.d.ts +19 -0
- package/dist/src/workflow-discovery.js +36 -0
- package/dist/src/workflow-refusals.d.ts +6 -0
- package/dist/src/workflow-refusals.js +42 -0
- package/dist/src/workflow-schedule.d.ts +22 -0
- package/dist/src/workflow-schedule.js +53 -0
- package/dist/src/workflows.d.ts +12 -1
- package/dist/src/workflows.js +9 -0
- package/dist/tools/admit-workflow.d.ts +14 -0
- package/dist/tools/admit-workflow.js +107 -0
- package/dist/tools/doctor-adoption.d.ts +1 -0
- package/dist/tools/doctor-adoption.js +11 -0
- package/dist/tools/project-configuration.d.ts +4 -0
- package/dist/tools/project-configuration.js +47 -0
- package/dist/tools/self-host-processes.d.ts +1 -0
- package/dist/tools/self-host-processes.js +33 -22
- package/dist/tools/self-host-project.d.ts +21 -0
- package/dist/tools/self-host-project.js +224 -0
- package/dist/tools/self-host-runtime.d.ts +16 -0
- package/dist/tools/self-host-runtime.js +60 -0
- package/dist/tools/self-host-workflows.d.ts +1 -0
- package/dist/tools/self-host-workflows.js +36 -1
- package/dist/tools/self-host.js +106 -135
- package/dist/tools/workflow-bundle-dependencies.d.ts +5 -0
- package/dist/tools/workflow-bundle-dependencies.js +93 -0
- package/dist/tools/workflow-bundles.d.ts +20 -0
- package/dist/tools/workflow-bundles.js +173 -0
- package/dist/tools/workflow-candidate-counts.d.ts +12 -0
- package/dist/tools/workflow-candidate-counts.js +266 -0
- package/dist/tools/workflow-candidate-fields.d.ts +5 -0
- package/dist/tools/workflow-candidate-fields.js +24 -0
- package/dist/tools/workflow-candidate-helper-counts.d.ts +10 -0
- package/dist/tools/workflow-candidate-helper-counts.js +129 -0
- package/dist/tools/workflow-candidate-program.d.ts +13 -0
- package/dist/tools/workflow-candidate-program.js +106 -0
- package/dist/tools/workflow-candidate-source.d.ts +6 -0
- package/dist/tools/workflow-candidate-source.js +169 -0
- package/dist/tools/workflow-candidate-syntax.d.ts +21 -0
- package/dist/tools/workflow-candidate-syntax.js +263 -0
- package/dist/tools/workflow-command.d.ts +1 -0
- package/dist/tools/workflow-command.js +143 -0
- package/dist/tools/workflow-folder-capture.d.ts +18 -0
- package/dist/tools/workflow-folder-capture.js +261 -0
- package/dist/tools/workflow-folders.d.ts +49 -0
- package/dist/tools/workflow-folders.js +203 -0
- package/dist/tools/workflow-source-effects.d.ts +10 -0
- package/dist/tools/workflow-source-effects.js +213 -0
- package/dist/tools/workflow-test-hook.d.ts +7 -0
- package/dist/tools/workflow-test-hook.js +16 -0
- package/dist/tools/workflow-test-loader.d.ts +1 -0
- package/dist/tools/workflow-test-loader.js +10 -0
- package/dist/workflows/develop-prd.js +71 -3
- package/dist/workflows/develop-ticket.js +6 -1
- package/dist/workflows/ticket-prompts.js +17 -3
- package/package.json +66 -6
- package/templates/develop/README.md +78 -0
- package/templates/develop/develop/accept.ts +11 -0
- package/templates/develop/develop/flow-tests.ts +357 -0
- package/templates/develop/develop/local.ts +40 -0
- package/templates/develop/develop/option-tests.ts +174 -0
- package/templates/develop/develop/partial-choice.ts +29 -0
- package/templates/develop/develop/partial.ts +28 -0
- package/templates/develop/develop/pull.ts +152 -0
- package/templates/develop/develop/queue-partial.ts +39 -0
- package/templates/develop/develop/refusal-tests.ts +174 -0
- package/templates/develop/develop/report.ts +156 -0
- package/templates/develop/develop/round.ts +40 -0
- package/templates/develop/develop/scenarios.ts +87 -0
- package/templates/develop/develop/turn.ts +67 -0
- package/templates/develop/develop.declaration.json +24 -0
- package/templates/develop/develop.test.ts +287 -0
- package/templates/develop/develop.ts +30 -0
- package/templates/develop/template.json +153 -0
- package/dist/src/chats/analysis-batches.d.ts +0 -24
- package/dist/src/chats/analysis-batches.js +0 -83
- package/dist/src/chats/analysis-contract.d.ts +0 -80
- package/dist/src/chats/analysis-contract.js +0 -16
- package/dist/src/chats/analysis-data.d.ts +0 -3
- package/dist/src/chats/analysis-data.js +0 -85
- package/dist/src/chats/analysis-input.d.ts +0 -12
- package/dist/src/chats/analysis-input.js +0 -83
- package/dist/src/chats/analysis-links.d.ts +0 -2
- package/dist/src/chats/analysis-links.js +0 -25
- package/dist/src/chats/analysis-prompt.d.ts +0 -10
- package/dist/src/chats/analysis-prompt.js +0 -16
- package/dist/src/chats/analysis-proposal.d.ts +0 -2
- package/dist/src/chats/analysis-proposal.js +0 -32
- package/dist/src/chats/analysis-provenance.d.ts +0 -4
- package/dist/src/chats/analysis-provenance.js +0 -99
- package/dist/src/chats/analysis-shape.d.ts +0 -3
- package/dist/src/chats/analysis-shape.js +0 -228
- package/dist/src/chats/analysis.d.ts +0 -3
- package/dist/src/chats/analysis.js +0 -42
- package/dist/src/chats/corpus-input.d.ts +0 -5
- package/dist/src/chats/corpus-input.js +0 -288
- package/dist/src/chats/destination.d.ts +0 -4
- package/dist/src/chats/destination.js +0 -96
- package/dist/src/chats/import.d.ts +0 -15
- package/dist/src/chats/import.js +0 -243
- package/dist/src/chats/input-file.d.ts +0 -3
- package/dist/src/chats/input-file.js +0 -32
- package/dist/src/chats/normalize.d.ts +0 -29
- package/dist/src/chats/normalize.js +0 -155
- package/dist/src/chats/previous-import.d.ts +0 -5
- package/dist/src/chats/previous-import.js +0 -34
- package/dist/src/chats/reader.d.ts +0 -21
- package/dist/src/chats/reader.js +0 -118
- package/dist/src/chats/redact-import.d.ts +0 -14
- package/dist/src/chats/redact-import.js +0 -141
- package/dist/src/chats/redaction.d.ts +0 -41
- package/dist/src/chats/redaction.js +0 -161
- package/dist/src/chats/revision-input.d.ts +0 -3
- package/dist/src/chats/revision-input.js +0 -180
- package/dist/src/chats/revision.d.ts +0 -48
- package/dist/src/chats/revision.js +0 -94
- package/dist/src/chats/selection.d.ts +0 -25
- package/dist/src/chats/selection.js +0 -109
- package/dist/src/chats/source.d.ts +0 -23
- package/dist/src/chats/source.js +0 -135
- package/dist/src/chats/structure.d.ts +0 -57
- package/dist/src/chats/structure.js +0 -216
- package/dist/src/daemon/analysis-launch.d.ts +0 -5
- package/dist/src/daemon/analysis-launch.js +0 -81
- package/dist/src/daemon/analysis-token.d.ts +0 -6
- package/dist/src/daemon/analysis-token.js +0 -88
- package/dist/src/daemon/analysis-worker.d.ts +0 -22
- package/dist/src/daemon/analysis-worker.js +0 -219
- package/dist/src/daemon/chats-files.d.ts +0 -15
- package/dist/src/daemon/chats-files.js +0 -113
- package/dist/src/daemon/chats-worker.d.ts +0 -12
- package/dist/src/daemon/chats-worker.js +0 -200
- package/dist/workflows/analyze-chats.d.ts +0 -10
- package/dist/workflows/analyze-chats.declaration.json +0 -9
- package/dist/workflows/analyze-chats.js +0 -73
|
@@ -1,12 +1,18 @@
|
|
|
1
|
+
import type { CommandEffect } from "../command-settings.ts";
|
|
1
2
|
import type { CardForm } from "./watch-run-input.ts";
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
3
|
+
import type { CiRerunNotice } from "./github-ci-progress.ts";
|
|
4
|
+
import type { WorkerUsage, WorkerAttemptUsage } from "../worker-usage.ts";
|
|
5
|
+
import type { PrIdentity, PrObservation } from "./watch-pr-identity.ts";
|
|
6
|
+
import type { WorkflowRefusal } from "../workflow-refusals.ts";
|
|
7
|
+
import type { Fields } from "../protocol.ts";
|
|
4
8
|
export interface WatchItem {
|
|
5
9
|
readonly kind: string;
|
|
6
10
|
readonly text: string;
|
|
7
11
|
readonly costUsd?: number;
|
|
8
12
|
}
|
|
9
13
|
export interface WatchTurn {
|
|
14
|
+
readonly attempts?: readonly WorkerAttemptUsage[];
|
|
15
|
+
readonly harness?: string;
|
|
10
16
|
readonly estimatedCostUsd: number | null;
|
|
11
17
|
readonly operationId: string;
|
|
12
18
|
readonly usage: WorkerUsage;
|
|
@@ -62,6 +68,10 @@ export interface WatchStep {
|
|
|
62
68
|
readonly startedAt: string | null;
|
|
63
69
|
}
|
|
64
70
|
export interface WatchCard {
|
|
71
|
+
readonly awaitedRunId?: string | null;
|
|
72
|
+
readonly parentRunId?: string | null;
|
|
73
|
+
readonly chainId?: string;
|
|
74
|
+
readonly childRunIds?: readonly string[];
|
|
65
75
|
readonly estimatedCostUsd: number | null;
|
|
66
76
|
readonly runId: string;
|
|
67
77
|
readonly title: string | null;
|
|
@@ -92,8 +102,17 @@ export interface WatchWorkflow {
|
|
|
92
102
|
readonly columns: readonly WatchColumn[];
|
|
93
103
|
}
|
|
94
104
|
export interface WatchRun {
|
|
105
|
+
readonly awaitedRunId?: string | null;
|
|
106
|
+
readonly commandEffects?: readonly CommandEffect[];
|
|
107
|
+
readonly ciReruns?: readonly CiRerunNotice[];
|
|
108
|
+
readonly parentRunId?: string | null;
|
|
109
|
+
readonly chainId?: string;
|
|
110
|
+
readonly childRunIds?: readonly string[];
|
|
111
|
+
readonly mergeProof?: PrIdentity | null;
|
|
112
|
+
readonly issueIdentity?: PrIdentity | null;
|
|
95
113
|
readonly issueUpdate?: "failed";
|
|
96
114
|
readonly ticketStatus?: "complete" | "partial";
|
|
115
|
+
readonly promotionId?: string;
|
|
97
116
|
readonly estimatedCostUsd: number | null;
|
|
98
117
|
readonly ticketId: string | null;
|
|
99
118
|
readonly title: string | null;
|
|
@@ -121,6 +140,8 @@ export interface WatchRun {
|
|
|
121
140
|
readonly mergeCommit: string | null;
|
|
122
141
|
}
|
|
123
142
|
export interface WatchModel {
|
|
143
|
+
readonly queue?: Fields;
|
|
144
|
+
readonly workflowRefusals?: readonly WorkflowRefusal[];
|
|
124
145
|
readonly cardForms?: readonly CardForm[];
|
|
125
146
|
readonly workflows: readonly WatchWorkflow[];
|
|
126
147
|
readonly startWorkflowId: string | null;
|
|
@@ -75,7 +75,8 @@ export function completedDetail(run) {
|
|
|
75
75
|
const update = run.issueUpdate === "failed"
|
|
76
76
|
? " Issue status update failed; check the GitHub operation."
|
|
77
77
|
: "";
|
|
78
|
-
|
|
78
|
+
const promotion = run.promotionId === undefined ? "" : ` Promotion: ${run.promotionId}.`;
|
|
79
|
+
return `${verdicts[run.decision] ?? ""}The run completed${time} · cost ${cost}.${promotion}${ticket}${update}`;
|
|
79
80
|
}
|
|
80
81
|
export function phaseTime(phase, now) {
|
|
81
82
|
if (phase.startedAt === null)
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { watchAction, watchActions, watchHost, } from "./watch-actions.js";
|
|
2
2
|
import { observedBoard } from "./watch-pr-board.js";
|
|
3
|
+
import { isPhoneAction, phoneAction, phoneRead } from "./watch-phone.js";
|
|
3
4
|
import { watchPrObserver } from "./watch-pr-settings.js";
|
|
4
5
|
import { readdir, readFile, stat } from "node:fs/promises";
|
|
5
6
|
import { createServer, } from "node:http";
|
|
@@ -7,12 +8,27 @@ import { homedir } from "node:os";
|
|
|
7
8
|
import { dirname, join } from "node:path";
|
|
8
9
|
import { fileURLToPath } from "node:url";
|
|
9
10
|
import { watchReader } from "./watch-reads.js";
|
|
11
|
+
import { ciRerunNotices } from "./github-ci-progress.js";
|
|
10
12
|
import { turnOf, watchModel } from "./watch-model.js";
|
|
11
13
|
import { pageDocument } from "./watch-page.js";
|
|
12
14
|
import { watchStream } from "./watch-stream.js";
|
|
13
15
|
export const defaultWatchPort = 3663;
|
|
14
16
|
const forbidden = { status: 403, type: "text/plain", body: "refused" };
|
|
15
17
|
const notFound = { status: 404, type: "text/plain", body: "not found" };
|
|
18
|
+
const fontFiles = new Map([
|
|
19
|
+
"fira-code-latin-400-normal.woff2",
|
|
20
|
+
"fira-code-latin-500-normal.woff2",
|
|
21
|
+
"heebo-latin-500-normal.woff2",
|
|
22
|
+
"heebo-latin-700-normal.woff2",
|
|
23
|
+
"heebo-latin-800-normal.woff2",
|
|
24
|
+
"space-grotesk-latin-400-normal.woff2",
|
|
25
|
+
"space-grotesk-latin-500-normal.woff2",
|
|
26
|
+
"space-grotesk-latin-600-normal.woff2",
|
|
27
|
+
"space-grotesk-latin-700-normal.woff2",
|
|
28
|
+
].map((name) => [
|
|
29
|
+
`/watch-fonts-v1/${name}`,
|
|
30
|
+
new URL(`assets/watch-fonts/${name}`, import.meta.resolve("#package")),
|
|
31
|
+
]));
|
|
16
32
|
const libraryFile = fileURLToPath(import.meta.resolve("preact"));
|
|
17
33
|
function parsed(text) {
|
|
18
34
|
try {
|
|
@@ -68,7 +84,11 @@ async function githubRecords(watch) {
|
|
|
68
84
|
if (started === null)
|
|
69
85
|
continue;
|
|
70
86
|
const result = await stored(join(journal, key, "result.json"));
|
|
71
|
-
watch.github.set(key, {
|
|
87
|
+
watch.github.set(key, {
|
|
88
|
+
started,
|
|
89
|
+
result,
|
|
90
|
+
ciReruns: await ciRerunNotices(join(journal, key)),
|
|
91
|
+
});
|
|
72
92
|
}
|
|
73
93
|
return keys.flatMap((key) => watch.github.get(key) ?? []);
|
|
74
94
|
}
|
|
@@ -81,6 +101,7 @@ async function snapshot(watch, runId) {
|
|
|
81
101
|
]);
|
|
82
102
|
const model = watchModel({
|
|
83
103
|
...read,
|
|
104
|
+
repository: watch.observer.repository ?? null,
|
|
84
105
|
home: homedir(),
|
|
85
106
|
client: watch.settings.client,
|
|
86
107
|
updatedAt,
|
|
@@ -93,17 +114,39 @@ async function snapshot(watch, runId) {
|
|
|
93
114
|
cardForms: watch.actions?.forms.filter((form) => shown.workflows.some((workflow) => workflow.workflowId === form.workflowId)) ?? [],
|
|
94
115
|
};
|
|
95
116
|
}
|
|
117
|
+
async function fontReply(request) {
|
|
118
|
+
const fontFile = fontFiles.get(request.url ?? "");
|
|
119
|
+
if (fontFile === undefined)
|
|
120
|
+
return request.url?.startsWith("/watch-fonts-v1/") ? notFound : null;
|
|
121
|
+
if (request.method !== "GET")
|
|
122
|
+
return notFound;
|
|
123
|
+
return {
|
|
124
|
+
status: 200,
|
|
125
|
+
type: "font/woff2",
|
|
126
|
+
body: await readFile(fontFile),
|
|
127
|
+
cache: "public, max-age=31536000, immutable",
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
function routedAction(path) {
|
|
131
|
+
if (isPhoneAction(path))
|
|
132
|
+
return phoneAction;
|
|
133
|
+
return path === "/actions/run" ? watchAction : null;
|
|
134
|
+
}
|
|
96
135
|
async function answered(watch, request) {
|
|
97
136
|
if (!watchHost(request))
|
|
98
137
|
return forbidden;
|
|
138
|
+
const font = await fontReply(request);
|
|
139
|
+
if (font !== null)
|
|
140
|
+
return font;
|
|
99
141
|
const url = new URL(String(request.url), "http://localhost");
|
|
100
142
|
if (request.method === "GET")
|
|
101
143
|
return readReply(watch, url);
|
|
102
|
-
if (request.method !== "POST" ||
|
|
103
|
-
|
|
104
|
-
|
|
144
|
+
if (request.method !== "POST" || watch.actions === null)
|
|
145
|
+
return notFound;
|
|
146
|
+
const act = routedAction(url.pathname);
|
|
147
|
+
if (act === null)
|
|
105
148
|
return notFound;
|
|
106
|
-
const body = await
|
|
149
|
+
const body = await act(watch.actions, request).catch(() => null);
|
|
107
150
|
return body === null
|
|
108
151
|
? forbidden
|
|
109
152
|
: { status: 200, type: "application/json", body };
|
|
@@ -122,6 +165,12 @@ async function readReply(watch, url) {
|
|
|
122
165
|
type: "text/javascript; charset=utf-8",
|
|
123
166
|
body: await readFile(libraryFile, "utf8"),
|
|
124
167
|
};
|
|
168
|
+
if (path === "/phone.json")
|
|
169
|
+
return {
|
|
170
|
+
status: 200,
|
|
171
|
+
type: "application/json",
|
|
172
|
+
body: await phoneRead(watch.settings.runtimeDirectory),
|
|
173
|
+
};
|
|
125
174
|
if (path !== "/data.json")
|
|
126
175
|
return notFound;
|
|
127
176
|
const runId = url.searchParams.get("runId");
|
|
@@ -137,7 +186,7 @@ async function readReply(watch, url) {
|
|
|
137
186
|
function replied(response, reply) {
|
|
138
187
|
response.writeHead(reply.status, {
|
|
139
188
|
"content-type": reply.type,
|
|
140
|
-
"cache-control": "no-store",
|
|
189
|
+
"cache-control": reply.cache ?? "no-store",
|
|
141
190
|
});
|
|
142
191
|
response.end(reply.body);
|
|
143
192
|
}
|
|
@@ -161,7 +210,7 @@ export async function watchServer(settings) {
|
|
|
161
210
|
: await watchActions(settings.runtimeDirectory),
|
|
162
211
|
settings,
|
|
163
212
|
observer,
|
|
164
|
-
reader: watchReader(settings.runtimeDirectory),
|
|
213
|
+
reader: watchReader(settings.runtimeDirectory, observer.repository ?? null),
|
|
165
214
|
streams: new Map(),
|
|
166
215
|
github: new Map(),
|
|
167
216
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Shown } from "./watch-element.ts";
|
|
2
|
-
import { type Copying, type WatchDecision, type WatchEvent, type WatchItem, type WatchTurn } from "./watch-render.ts";
|
|
2
|
+
import { type Copying, type WatchDecision, type WatchEvent, type WatchItem, type WatchRun, type WatchTurn } from "./watch-render.ts";
|
|
3
3
|
export declare function Item(props: {
|
|
4
4
|
readonly item: WatchItem;
|
|
5
5
|
}): Shown;
|
|
@@ -28,3 +28,6 @@ export declare function Decision(props: {
|
|
|
28
28
|
export declare function Events(props: {
|
|
29
29
|
readonly events: readonly WatchEvent[];
|
|
30
30
|
}): Shown;
|
|
31
|
+
export declare function PullRequest(props: {
|
|
32
|
+
readonly run: WatchRun;
|
|
33
|
+
}): Shown;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { priceText, usageText } from "./usage-render.js";
|
|
1
|
+
import { priceText, usageText, attemptText } from "./usage-render.js";
|
|
2
2
|
import { component, element } from "./watch-element.js";
|
|
3
3
|
import { clockTime, counted, groupActivity, turnTime, } from "./watch-render.js";
|
|
4
4
|
export function Item(props) {
|
|
@@ -32,7 +32,7 @@ export function Turn(props) {
|
|
|
32
32
|
const groups = groupActivity(turn.activity);
|
|
33
33
|
const working = turn.outcome === "in work";
|
|
34
34
|
const cost = priceText(turn.costUsd, turn.estimatedCostUsd);
|
|
35
|
-
const heading = ["
|
|
35
|
+
const heading = ["Agent turn", turn.outcome, turnTime(turn, now), cost];
|
|
36
36
|
const place = `Branch ${turn.branch} · work tree ${turn.worktree}`;
|
|
37
37
|
const activity = groups.map((items, index) => component(Group, { items, open: working && index === groups.length - 1 }));
|
|
38
38
|
return element("section", {
|
|
@@ -43,10 +43,17 @@ export function Turn(props) {
|
|
|
43
43
|
children: heading.filter((part) => part !== "").join(" · "),
|
|
44
44
|
}),
|
|
45
45
|
element("p", { class: "meta", children: place }),
|
|
46
|
+
turn.harness === undefined
|
|
47
|
+
? null
|
|
48
|
+
: element("p", { class: "meta", children: `Harness: ${turn.harness}` }),
|
|
46
49
|
element("p", {
|
|
47
50
|
class: "turn-usage",
|
|
48
51
|
children: usageText(turn.usage),
|
|
49
52
|
}),
|
|
53
|
+
...(turn.attempts ?? []).map((attempt) => element("p", {
|
|
54
|
+
class: "turn-attempt",
|
|
55
|
+
children: attemptText(attempt),
|
|
56
|
+
})),
|
|
50
57
|
element("div", { class: "activity", children: activity }),
|
|
51
58
|
],
|
|
52
59
|
});
|
|
@@ -133,3 +140,32 @@ export function Events(props) {
|
|
|
133
140
|
],
|
|
134
141
|
});
|
|
135
142
|
}
|
|
143
|
+
export function PullRequest(props) {
|
|
144
|
+
const { pullRequest, reviews, mergeCommit } = props.run;
|
|
145
|
+
if (pullRequest === null)
|
|
146
|
+
return null;
|
|
147
|
+
const link = element("a", {
|
|
148
|
+
href: pullRequest.url,
|
|
149
|
+
children: `#${String(pullRequest.number)}`,
|
|
150
|
+
});
|
|
151
|
+
const scores = reviews.map((review) => element("li", {
|
|
152
|
+
children: `Round ${String(review.round)} · Review ${String(review.score)}/5 · commit ${review.commit.slice(0, 7)}`,
|
|
153
|
+
}));
|
|
154
|
+
const merge = mergeCommit === null
|
|
155
|
+
? null
|
|
156
|
+
: element("p", {
|
|
157
|
+
class: "meta",
|
|
158
|
+
children: [
|
|
159
|
+
"Merge commit ",
|
|
160
|
+
element("code", { children: mergeCommit }),
|
|
161
|
+
],
|
|
162
|
+
});
|
|
163
|
+
return element("section", {
|
|
164
|
+
class: "pull",
|
|
165
|
+
children: [
|
|
166
|
+
element("h3", { children: ["Pull request ", link] }),
|
|
167
|
+
element("ul", { class: "reviews", children: scores }),
|
|
168
|
+
merge,
|
|
169
|
+
],
|
|
170
|
+
});
|
|
171
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { record } from "../protocol.js";
|
|
2
|
-
import { priceOf, usageOf } from "../worker-usage.js";
|
|
2
|
+
import { priceOf, usageOf, attemptFields } from "../worker-usage.js";
|
|
3
3
|
function text(value) {
|
|
4
4
|
return typeof value === "string" ? value : "";
|
|
5
5
|
}
|
|
@@ -41,6 +41,10 @@ export function statusTurns(turns, status) {
|
|
|
41
41
|
emptyTurn(operationId, runId);
|
|
42
42
|
return {
|
|
43
43
|
...known,
|
|
44
|
+
...attemptFields(fields["attempts"]),
|
|
45
|
+
...(typeof fields["harness"] === "string"
|
|
46
|
+
? { harness: fields["harness"] }
|
|
47
|
+
: {}),
|
|
44
48
|
runId,
|
|
45
49
|
operationId,
|
|
46
50
|
outcome: known.outcome === "in work" ? "ended" : known.outcome,
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import type { CardControls } from "./watch-card-view.ts";
|
|
2
|
+
import type { PhoneControls } from "./watch-phone-view.ts";
|
|
3
|
+
import { type StartControls } from "./watch-header-view.ts";
|
|
4
|
+
export { clove, Header } from "./watch-header-view.ts";
|
|
5
|
+
export type { StartControls } from "./watch-header-view.ts";
|
|
2
6
|
import { type Shown } from "./watch-element.ts";
|
|
3
7
|
import { type Copying, type WatchModel, type WatchPhase, type WatchRun } from "./watch-render.ts";
|
|
4
8
|
import { type ColumnControls } from "./watch-board-view.ts";
|
|
9
|
+
export { PullRequest } from "./watch-turn.ts";
|
|
5
10
|
interface Timed {
|
|
6
11
|
readonly run: WatchRun;
|
|
7
12
|
readonly now: string;
|
|
8
13
|
}
|
|
9
|
-
export declare const clove: {
|
|
10
|
-
viewBox: string;
|
|
11
|
-
paths: string[];
|
|
12
|
-
};
|
|
13
14
|
export declare function BannerDetail(props: Timed): Shown;
|
|
14
15
|
export declare function Banner(props: Timed): Shown;
|
|
15
16
|
export declare function Phases(props: {
|
|
@@ -20,35 +21,27 @@ export declare function Review(props: {
|
|
|
20
21
|
readonly run: WatchRun;
|
|
21
22
|
readonly round: number;
|
|
22
23
|
}): Shown;
|
|
23
|
-
export declare function PullRequest(props: {
|
|
24
|
-
readonly run: WatchRun;
|
|
25
|
-
}): Shown;
|
|
26
24
|
export declare function Run(props: Timed & {
|
|
27
25
|
readonly copying: Copying;
|
|
28
26
|
}): Shown;
|
|
29
|
-
export interface StartControls {
|
|
30
|
-
readonly shown: boolean;
|
|
31
|
-
readonly onToggle: () => void;
|
|
32
|
-
}
|
|
33
|
-
export declare function Header(props: {
|
|
34
|
-
readonly model: WatchModel | null;
|
|
35
|
-
readonly stale: boolean;
|
|
36
|
-
readonly start?: StartControls;
|
|
37
|
-
}): Shown;
|
|
38
27
|
export interface PageProps {
|
|
39
28
|
readonly cards?: CardControls;
|
|
40
29
|
readonly model: WatchModel | null;
|
|
30
|
+
readonly observationNow?: string | undefined;
|
|
41
31
|
readonly selected: string;
|
|
42
32
|
readonly now: string;
|
|
43
33
|
readonly stale: boolean;
|
|
44
34
|
readonly copying: Copying;
|
|
45
35
|
readonly columns?: ColumnControls;
|
|
46
36
|
readonly start?: StartControls;
|
|
37
|
+
readonly phone?: PhoneControls | undefined;
|
|
47
38
|
}
|
|
39
|
+
export declare function RefusedWorkflows(props: {
|
|
40
|
+
readonly model: WatchModel;
|
|
41
|
+
}): Shown;
|
|
48
42
|
export declare function Page(props: PageProps): Shown;
|
|
49
43
|
export declare function BoardPage(props: PageProps & {
|
|
50
44
|
readonly model: WatchModel;
|
|
51
45
|
readonly workflowId: string | null;
|
|
52
46
|
readonly down: Shown;
|
|
53
47
|
}): Shown;
|
|
54
|
-
export {};
|
|
@@ -1,19 +1,14 @@
|
|
|
1
|
+
import { Header, Queue } from "./watch-header-view.js";
|
|
2
|
+
export { clove, Header } from "./watch-header-view.js";
|
|
1
3
|
import { priceText, usageText, totalsSuffix } from "./usage-render.js";
|
|
2
4
|
import { component, element } from "./watch-element.js";
|
|
3
|
-
import {
|
|
4
|
-
import { Board, WorkflowList, } from "./watch-board-view.js";
|
|
5
|
+
import { completedDetail, counted, elapsed, phaseTime, runName, runTone, waitingDetail, } from "./watch-render.js";
|
|
6
|
+
import { Board, HandoffLinks, WorkflowList, } from "./watch-board-view.js";
|
|
5
7
|
import { boardWorkflow, watchHash, watchLocation } from "./watch-navigation.js";
|
|
6
|
-
import { Decision, Events, Turn } from "./watch-turn.js";
|
|
8
|
+
import { Decision, Events, Turn, PullRequest } from "./watch-turn.js";
|
|
9
|
+
import { Commands } from "./command-effects.js";
|
|
10
|
+
export { PullRequest } from "./watch-turn.js";
|
|
7
11
|
import { StartRun } from "./watch-start-view.js";
|
|
8
|
-
export const clove = {
|
|
9
|
-
viewBox: "0.6625858545303345 0.6630800366401672 46.674827575683594 46.673831939697266",
|
|
10
|
-
paths: [
|
|
11
|
-
"M41.47315,11.48535c-1.20117-0.12305-2.16211-1.08398-2.28418-2.28516c-0.17676-1.7334-1.01758-3.29492-2.36865-4.39648s-3.05078-1.61719-4.7832-1.43359c-3.34277,0.34082-5.86377,3.13086-5.86377,6.49121v14.13867c0,0.27637,0.22363,0.5,0.5,0.5H40.8125c3.59766,0,6.52441-2.92676,6.52441-6.52441C47.33692,14.61523,44.81592,11.82422,41.47315,11.48535z M35.56543,15.81543l-5.85791,5.85742c-0.09766,0.09766-0.22559,0.14648-0.35352,0.14648s-0.25586-0.04883-0.35352-0.14648c-0.19531-0.19531-0.19531-0.51172,0-0.70703l5.85791-5.85742c0.19531-0.19531,0.51172-0.19531,0.70703,0C35.76073,15.30372,35.76074,15.62011,35.56543,15.81543z",
|
|
12
|
-
"M15.30225,0.66308c-3.36035,0-6.15088,2.52051-6.49121,5.86328C8.68897,7.72852,7.72852,8.68945,6.52686,8.81152c-1.7334,0.17578-3.29492,1.01758-4.396,2.36816s-1.61035,3.0498-1.43408,4.7832c0.34033,3.34277,3.13086,5.86328,6.49121,5.86328h14.13867c0.27637,0,0.5-0.22363,0.5-0.5V7.18751C21.82666,3.58984,18.8999,0.66308,15.30225,0.66308z M18.99951,19.00001c-0.09766,0.09766-0.22559,0.14648-0.35352,0.14648s-0.25586-0.04883-0.35352-0.14648l-5.85742-5.8584c-0.19531-0.19531-0.19531-0.51172,0-0.70703c0.19531-0.19531,0.51172-0.19531,0.70703,0l5.85742,5.8584C19.19482,18.48829,19.19482,18.80469,18.99951,19.00001z",
|
|
13
|
-
"M24,26.17383H9.86133c-3.59766,0-6.52441,2.92676-6.52441,6.52441c0,3.35938,2.52051,6.14941,5.86377,6.49023c1.20117,0.12207,2.16211,1.08301,2.28418,2.28418c0.17676,1.7334,1.01758,3.29492,2.36865,4.39648c1.17529,0.95801,2.61377,1.46777,4.11035,1.46777c0.22314,0,0.44775-0.01074,0.67285-0.03418C21.97949,46.96189,24.5,44.17186,24.5,40.81248V26.67383C24.5,26.39746,24.27637,26.17383,24,26.17383z M21.67334,29.70704l-5.85791,5.8584c-0.09766,0.09766-0.22559,0.14648-0.35352,0.14648s-0.25586-0.04883-0.35352-0.14648c-0.19531-0.19531-0.19531-0.51172,0-0.70703L20.9663,29c0.19531-0.19531,0.51172-0.19531,0.70703,0S21.86865,29.51172,21.67334,29.70704z",
|
|
14
|
-
"M47.30322,32.03711c-0.34033-3.34277-3.13086-5.86328-6.49072-5.86328H26.67334c-0.27637,0-0.5,0.22363-0.5,0.5V40.8125c0,3.59766,2.92676,6.52441,6.52442,6.52441c3.36035,0,6.15088-2.52148,6.49121-5.86426c0.12207-1.20117,1.08301-2.16211,2.28418-2.28418c1.7334-0.17578,3.29492-1.01758,4.396-2.36816S47.47949,33.7705,47.30322,32.03711z M35.56543,35.56543c-0.09766,0.09766-0.22559,0.14648-0.35352,0.14648s-0.25586-0.04883-0.35352-0.14648l-5.85791-5.8584c-0.19531-0.19531-0.19531-0.51172,0-0.70703s0.51172-0.19531,0.70703,0l5.85791,5.8584C35.76074,35.05371,35.76074,35.37011,35.56543,35.56543z",
|
|
15
|
-
],
|
|
16
|
-
};
|
|
17
12
|
export function BannerDetail(props) {
|
|
18
13
|
const { run, now } = props;
|
|
19
14
|
const turn = run.turns.at(-1);
|
|
@@ -28,8 +23,9 @@ export function BannerDetail(props) {
|
|
|
28
23
|
? ""
|
|
29
24
|
: ` · last output ${elapsed(turn.activeAt, now)} ago`;
|
|
30
25
|
const last = turn.activity.at(-1)?.text ?? "The worker starts.";
|
|
26
|
+
const worker = turn.harness === undefined ? "The worker" : `The ${turn.harness} worker`;
|
|
31
27
|
return [
|
|
32
|
-
|
|
28
|
+
`${worker} works for ${elapsed(turn.startedAt, now)} · ${counted(calls, "tool call")}${quiet}`,
|
|
33
29
|
element("span", { class: "now", children: last }),
|
|
34
30
|
];
|
|
35
31
|
}
|
|
@@ -89,42 +85,13 @@ export function Review(props) {
|
|
|
89
85
|
}),
|
|
90
86
|
});
|
|
91
87
|
}
|
|
92
|
-
export function PullRequest(props) {
|
|
93
|
-
const { pullRequest, reviews, mergeCommit } = props.run;
|
|
94
|
-
if (pullRequest === null)
|
|
95
|
-
return null;
|
|
96
|
-
const link = element("a", {
|
|
97
|
-
href: pullRequest.url,
|
|
98
|
-
children: `#${String(pullRequest.number)}`,
|
|
99
|
-
});
|
|
100
|
-
const scores = reviews.map((review) => element("li", {
|
|
101
|
-
children: `Round ${String(review.round)} · Greptile ${String(review.score)}/5 · commit ${review.commit.slice(0, 7)}`,
|
|
102
|
-
}));
|
|
103
|
-
const merge = mergeCommit === null
|
|
104
|
-
? null
|
|
105
|
-
: element("p", {
|
|
106
|
-
class: "meta",
|
|
107
|
-
children: [
|
|
108
|
-
"Merge commit ",
|
|
109
|
-
element("code", { children: mergeCommit }),
|
|
110
|
-
],
|
|
111
|
-
});
|
|
112
|
-
return element("section", {
|
|
113
|
-
class: "pull",
|
|
114
|
-
children: [
|
|
115
|
-
element("h3", { children: ["Pull request ", link] }),
|
|
116
|
-
element("ul", { class: "reviews", children: scores }),
|
|
117
|
-
merge,
|
|
118
|
-
],
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
88
|
export function Run(props) {
|
|
122
89
|
const { run, now, copying } = props;
|
|
123
90
|
const turn = run.turns.at(-1);
|
|
124
91
|
const budget = run.spent === null || run.limit === null
|
|
125
92
|
? ""
|
|
126
93
|
: ` · ${String(run.spent)} of ${String(run.limit)} effect units`;
|
|
127
|
-
const none = "No
|
|
94
|
+
const none = "No agent turn for this run.";
|
|
128
95
|
const turns = run.turns.length === 0
|
|
129
96
|
? element("p", { class: "meta", children: none })
|
|
130
97
|
: run.turns.map((item, index) => [
|
|
@@ -142,6 +109,7 @@ export function Run(props) {
|
|
|
142
109
|
];
|
|
143
110
|
return [
|
|
144
111
|
component(Banner, { run, now }),
|
|
112
|
+
component(HandoffLinks, { run }),
|
|
145
113
|
element("section", {
|
|
146
114
|
class: "run-usage",
|
|
147
115
|
children: [
|
|
@@ -154,47 +122,30 @@ export function Run(props) {
|
|
|
154
122
|
}),
|
|
155
123
|
component(Phases, { phases: run.phases, now }),
|
|
156
124
|
component(PullRequest, { run }),
|
|
125
|
+
(run.ciReruns ?? []).map((rerun) => element("p", {
|
|
126
|
+
class: "meta",
|
|
127
|
+
children: `CI rerun after a failed check: workflow ${rerun.run}, commit ${rerun.commit.slice(0, 7)}`,
|
|
128
|
+
})),
|
|
157
129
|
run.decisions.map((decision) => component(Decision, { decision, turn, copying })),
|
|
158
130
|
turns,
|
|
131
|
+
component(Commands, { effects: run.commandEffects ?? [] }),
|
|
159
132
|
component(Events, { events: run.events }),
|
|
160
133
|
element("p", { class: "meta foot", children: foot }),
|
|
161
134
|
];
|
|
162
135
|
}
|
|
163
|
-
export function
|
|
164
|
-
const
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
children: "The watch tool does not answer.",
|
|
170
|
-
})
|
|
171
|
-
: element("span", { children: updated });
|
|
172
|
-
return element("header", {
|
|
136
|
+
export function RefusedWorkflows(props) {
|
|
137
|
+
const refusals = props.model.workflowRefusals ?? [];
|
|
138
|
+
if (refusals.length === 0)
|
|
139
|
+
return null;
|
|
140
|
+
return element("section", {
|
|
141
|
+
class: "workflow-refusals",
|
|
173
142
|
children: [
|
|
174
|
-
element("
|
|
175
|
-
|
|
176
|
-
children:
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
"aria-hidden": "true",
|
|
180
|
-
focusable: "false",
|
|
181
|
-
viewBox: clove.viewBox,
|
|
182
|
-
children: clove.paths.map((d) => element("path", { fill: "currentColor", d })),
|
|
183
|
-
}),
|
|
184
|
-
"cloving",
|
|
185
|
-
],
|
|
143
|
+
element("h2", { children: "Refused workflows" }),
|
|
144
|
+
element("ul", {
|
|
145
|
+
children: refusals.map((entry) => element("li", {
|
|
146
|
+
children: `${entry.scope} ${entry.label}: ${entry.codes.join(", ")}`,
|
|
147
|
+
})),
|
|
186
148
|
}),
|
|
187
|
-
stamp,
|
|
188
|
-
props.start === undefined
|
|
189
|
-
? null
|
|
190
|
-
: element("button", {
|
|
191
|
-
type: "button",
|
|
192
|
-
class: "start-toggle",
|
|
193
|
-
"aria-controls": "start-run",
|
|
194
|
-
"aria-expanded": String(props.start.shown),
|
|
195
|
-
onClick: props.start.onToggle,
|
|
196
|
-
children: "Start a run",
|
|
197
|
-
}),
|
|
198
149
|
],
|
|
199
150
|
});
|
|
200
151
|
}
|
|
@@ -215,6 +166,8 @@ export function Page(props) {
|
|
|
215
166
|
return [
|
|
216
167
|
head,
|
|
217
168
|
down,
|
|
169
|
+
component(Queue, { model }),
|
|
170
|
+
component(RefusedWorkflows, { model }),
|
|
218
171
|
element("a", {
|
|
219
172
|
class: "back",
|
|
220
173
|
href: watchHash({ workflowId: back, runId: null }),
|
|
@@ -234,8 +187,10 @@ export function BoardPage(props) {
|
|
|
234
187
|
return element("div", {
|
|
235
188
|
class: "board-page",
|
|
236
189
|
children: [
|
|
237
|
-
component(Header, { model, stale, start }),
|
|
190
|
+
component(Header, { model, stale, start, phone: props.phone, now }),
|
|
191
|
+
component(Queue, { model }),
|
|
238
192
|
down,
|
|
193
|
+
component(RefusedWorkflows, { model }),
|
|
239
194
|
component(StartRun, {
|
|
240
195
|
workflows: model.workflows,
|
|
241
196
|
copying,
|
|
@@ -256,6 +211,7 @@ export function BoardPage(props) {
|
|
|
256
211
|
: component(Board, {
|
|
257
212
|
workflow,
|
|
258
213
|
now,
|
|
214
|
+
observationNow: props.observationNow,
|
|
259
215
|
controls: props.columns,
|
|
260
216
|
cardForm: model.cardForms?.find((form) => form.workflowId === workflowId),
|
|
261
217
|
cards: props.cards,
|