@parcha/agentrun-serve 0.1.0-beta.35 → 0.1.0-beta.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +298 -0
- package/README.md +417 -219
- package/dist/adapters.d.ts +12 -2
- package/dist/adapters.js +27 -2
- package/dist/agent-rows.d.ts +2 -1
- package/dist/agents-store.d.ts +2 -0
- package/dist/agents-store.js +9 -4
- package/dist/api-only.d.ts +2 -1
- package/dist/api-only.js +3 -1
- package/dist/archil-routes.d.ts +40 -7
- package/dist/archil-routes.js +167 -54
- package/dist/archil-settings.d.ts +79 -7
- package/dist/archil-settings.js +140 -14
- package/dist/attach-conformance-cli.d.ts +1 -0
- package/dist/attach-conformance-cli.js +18 -0
- package/dist/attach-conformance.d.ts +25 -0
- package/dist/attach-conformance.js +343 -0
- package/dist/attach-images.d.ts +15 -0
- package/dist/attach-images.js +59 -0
- package/dist/background.d.ts +0 -6
- package/dist/background.js +0 -28
- package/dist/box-image.d.ts +1 -97
- package/dist/box-image.js +4 -284
- package/dist/box-paths.d.ts +2 -7
- package/dist/box-paths.js +7 -13
- package/dist/box-settings.d.ts +0 -11
- package/dist/box-settings.js +4 -29
- package/dist/browser-commands.js +1 -1
- package/dist/browser-computer.d.ts +47 -3
- package/dist/browser-computer.js +286 -18
- package/dist/browser-cost.d.ts +1 -1
- package/dist/browser-live.d.ts +20 -8
- package/dist/browser-live.js +50 -27
- package/dist/browser-person.d.ts +19 -2
- package/dist/browser-person.js +55 -6
- package/dist/browser-wait-ended.d.ts +23 -0
- package/dist/browser-wait-ended.js +42 -0
- package/dist/cap.d.ts +12 -57
- package/dist/cap.js +20 -160
- package/dist/catalog.d.ts +1 -12
- package/dist/catalog.js +3 -33
- package/dist/cli.js +17 -26
- package/dist/composio-preset.d.ts +36 -0
- package/dist/composio-preset.js +179 -0
- package/dist/computer-attach.d.ts +125 -0
- package/dist/computer-attach.js +330 -0
- package/dist/computer-calls.d.ts +48 -0
- package/dist/computer-calls.js +126 -0
- package/dist/computer-channel.d.ts +57 -0
- package/dist/computer-channel.js +115 -0
- package/dist/computer-commands.d.ts +1 -1
- package/dist/computer-held-routes.d.ts +35 -0
- package/dist/computer-held-routes.js +106 -0
- package/dist/computer-held.d.ts +48 -0
- package/dist/computer-held.js +87 -0
- package/dist/computer-keys.d.ts +21 -1
- package/dist/computer-keys.js +53 -11
- package/dist/computer-live.d.ts +160 -0
- package/dist/computer-live.js +643 -0
- package/dist/computer-routes.d.ts +1 -4
- package/dist/computer-routes.js +3 -5
- package/dist/computer-setting.d.ts +2 -0
- package/dist/computer-setting.js +38 -1
- package/dist/computer-view.d.ts +24 -2
- package/dist/computer-view.js +51 -3
- package/dist/computer-viewer.d.ts +6 -0
- package/dist/computer-viewer.js +297 -0
- package/dist/computers.d.ts +79 -12
- package/dist/computers.js +147 -28
- package/dist/console/assets/index-Cn6JX1uH.js +563 -0
- package/dist/console/assets/index-DRN62V5v.css +1 -0
- package/dist/console/index.html +2 -2
- package/dist/docker-daemon.d.ts +2 -2
- package/dist/docker-daemon.js +2 -2
- package/dist/errors.js +5 -5
- package/dist/faux-computers.d.ts +9 -20
- package/dist/faux-computers.js +56 -24
- package/dist/files.d.ts +1 -9
- package/dist/files.js +1 -9
- package/dist/github-connection.d.ts +10 -2
- package/dist/github-connection.js +65 -2
- package/dist/github-faux.js +1 -1
- package/dist/github.d.ts +22 -2
- package/dist/github.js +42 -8
- package/dist/gpu-words.d.ts +14 -0
- package/dist/gpu-words.js +21 -0
- package/dist/graph-view.d.ts +3 -1
- package/dist/graph-view.js +25 -1
- package/dist/handed-values.d.ts +1 -1
- package/dist/handed-values.js +1 -1
- package/dist/harness-install.d.ts +60 -3
- package/dist/harness-install.js +322 -34
- package/dist/harness.d.ts +1 -0
- package/dist/harness.js +36 -2
- package/dist/host-tools.d.ts +9 -10
- package/dist/host-tools.js +7 -7
- package/dist/hosted-search.d.ts +5 -4
- package/dist/hosted-search.js +2 -7
- package/dist/import-sources.d.ts +10 -0
- package/dist/import-sources.js +44 -2
- package/dist/import.d.ts +3 -3
- package/dist/import.js +37 -6
- package/dist/index.d.ts +1 -3
- package/dist/index.js +1 -2
- package/dist/key-refusal.d.ts +1 -1
- package/dist/key-refusal.js +2 -2
- package/dist/learn/check.d.ts +11 -2
- package/dist/learn/check.js +124 -6
- package/dist/learn/commit.d.ts +43 -7
- package/dist/learn/commit.js +166 -22
- package/dist/learn/folder.d.ts +11 -0
- package/dist/learn/folder.js +37 -1
- package/dist/learn/general.d.ts +66 -0
- package/dist/learn/general.js +73 -0
- package/dist/learn/grade.d.ts +22 -1
- package/dist/learn/grade.js +107 -16
- package/dist/learn/index.d.ts +1 -1
- package/dist/learn/index.js +1 -1
- package/dist/learn/learning.sh +12 -1
- package/dist/learn/notes.d.ts +3 -0
- package/dist/learn/notes.js +3 -0
- package/dist/learn/reflect.d.ts +14 -2
- package/dist/learn/reflect.js +54 -30
- package/dist/learn/skills.d.ts +37 -5
- package/dist/learn/skills.js +60 -7
- package/dist/learned-nodes.d.ts +6 -2
- package/dist/learned-workflow.d.ts +43 -9
- package/dist/learned-workflow.js +128 -37
- package/dist/learning-batch.d.ts +283 -0
- package/dist/learning-batch.js +574 -0
- package/dist/learning-cost.d.ts +79 -0
- package/dist/learning-cost.js +69 -0
- package/dist/learning-evals.d.ts +33 -0
- package/dist/learning-evals.js +98 -0
- package/dist/learning-routes.d.ts +32 -4
- package/dist/learning-routes.js +48 -12
- package/dist/learning-words.d.ts +9 -0
- package/dist/learning-words.js +12 -2
- package/dist/learning.d.ts +39 -19
- package/dist/learning.js +88 -46
- package/dist/live/stream.js +6 -3
- package/dist/live/translate.d.ts +4 -3
- package/dist/live/translate.js +8 -4
- package/dist/live-reach.d.ts +37 -0
- package/dist/live-reach.js +62 -0
- package/dist/mcp-gateway.d.ts +9 -0
- package/dist/mcp-gateway.js +60 -11
- package/dist/mcp-oauth.d.ts +57 -7
- package/dist/mcp-oauth.js +133 -18
- package/dist/mcp-private-hosts.d.ts +4 -4
- package/dist/mcp-private-hosts.js +20 -12
- package/dist/mcp-probe.d.ts +27 -3
- package/dist/mcp-probe.js +106 -29
- package/dist/mcp-secret-writes.js +8 -0
- package/dist/mcp-servers-store.d.ts +38 -15
- package/dist/mcp-servers-store.js +120 -23
- package/dist/mcp-store.d.ts +10 -4
- package/dist/mcp-store.js +17 -6
- package/dist/model-form.d.ts +26 -0
- package/dist/model-form.js +80 -0
- package/dist/model.d.ts +5 -5
- package/dist/model.js +29 -16
- package/dist/openapi.d.ts +2 -0
- package/dist/openapi.js +586 -64
- package/dist/owner.d.ts +0 -1
- package/dist/owner.js +0 -2
- package/dist/page.d.ts +18 -0
- package/dist/page.js +48 -20
- package/dist/paid-calls.d.ts +1 -1
- package/dist/paid-calls.js +1 -1
- package/dist/place-offers.d.ts +96 -0
- package/dist/place-offers.js +202 -0
- package/dist/place.d.ts +9 -13
- package/dist/place.js +21 -32
- package/dist/port-models.d.ts +2 -1
- package/dist/port-models.js +5 -3
- package/dist/print.d.ts +16 -9
- package/dist/print.js +15 -17
- package/dist/propose.d.ts +4 -0
- package/dist/propose.js +34 -11
- package/dist/provider.js +3 -2
- package/dist/reflect-range.d.ts +8 -1
- package/dist/reflect-range.js +1 -1
- package/dist/run-cut.d.ts +5 -0
- package/dist/run-cut.js +19 -0
- package/dist/run-launch.d.ts +28 -3
- package/dist/run-launch.js +14 -4
- package/dist/run-learning-served.d.ts +2 -2
- package/dist/run-manifest.d.ts +2 -2
- package/dist/run-manifest.js +2 -2
- package/dist/run-reads-over-store.d.ts +1 -1
- package/dist/run-repo.d.ts +20 -0
- package/dist/run-repo.js +63 -0
- package/dist/run-secrets.js +3 -3
- package/dist/run-timeline-served.d.ts +1 -1
- package/dist/run-timeline-served.js +56 -44
- package/dist/run-view.d.ts +8 -5
- package/dist/run-view.js +18 -10
- package/dist/runnable.d.ts +2 -2
- package/dist/runnable.js +6 -2
- package/dist/runner/adapter-loop.d.ts +39 -8
- package/dist/runner/adapter-loop.js +770 -83
- package/dist/runner/adapter-run-spec.d.ts +36 -7
- package/dist/runner/adapter-run-spec.js +171 -37
- package/dist/runner/adapters/pi-computer.d.ts +7 -0
- package/dist/runner/adapters/pi-computer.js +43 -0
- package/dist/runner/adapters/pi.d.ts +20 -7
- package/dist/runner/adapters/pi.js +111 -26
- package/dist/runner/beside.d.ts +7 -3
- package/dist/runner/beside.js +26 -12
- package/dist/runner/claim-secrets.d.ts +4 -0
- package/dist/runner/claim-secrets.js +6 -1
- package/dist/runner/cli-run-spec.d.ts +27 -3
- package/dist/runner/cli-run-spec.js +198 -74
- package/dist/runner/commands.d.ts +8 -2
- package/dist/runner/commands.js +31 -6
- package/dist/runner/computer-channel.d.ts +34 -0
- package/dist/runner/computer-channel.js +61 -0
- package/dist/runner/conformance/harness.d.ts +0 -1
- package/dist/runner/conformance/harness.js +87 -18
- package/dist/runner/conformance/subject.d.ts +1 -1
- package/dist/runner/dispatch.js +3 -0
- package/dist/runner/end-of-run.d.ts +22 -12
- package/dist/runner/end-of-run.js +38 -16
- package/dist/runner/github-app.d.ts +2 -1
- package/dist/runner/github-app.js +6 -4
- package/dist/runner/harness-loops.js +16 -2
- package/dist/runner/held-run.d.ts +65 -0
- package/dist/runner/held-run.js +158 -0
- package/dist/runner/journal-kinds.d.ts +35 -6
- package/dist/runner/journal-kinds.js +20 -1
- package/dist/runner/journal-reader.d.ts +5 -4
- package/dist/runner/journal-reader.js +12 -10
- package/dist/runner/learning-ask.d.ts +7 -1
- package/dist/runner/learning-ask.js +21 -6
- package/dist/runner/learning-dispatch.d.ts +22 -0
- package/dist/runner/learning-dispatch.js +77 -10
- package/dist/runner/learning-end.d.ts +37 -1
- package/dist/runner/learning-end.js +115 -14
- package/dist/runner/learning-factory.d.ts +1 -1
- package/dist/runner/learning-factory.js +15 -5
- package/dist/runner/learning-loop.d.ts +139 -7
- package/dist/runner/learning-loop.js +369 -32
- package/dist/runner/learning-seed.d.ts +9 -0
- package/dist/runner/learning-seed.js +14 -1
- package/dist/runner/live-ticker.js +1 -0
- package/dist/runner/loop-contract.d.ts +16 -1
- package/dist/runner/loop-contract.js +6 -0
- package/dist/runner/loop.d.ts +10 -2
- package/dist/runner/loop.js +22 -1
- package/dist/runner/main.d.ts +13 -1
- package/dist/runner/main.js +38 -6
- package/dist/runner/mcp-claim.d.ts +11 -4
- package/dist/runner/mcp-claim.js +140 -23
- package/dist/runner/mcp-github.d.ts +4 -2
- package/dist/runner/mcp-github.js +1 -8
- package/dist/runner/mcp-run.d.ts +6 -4
- package/dist/runner/mcp-run.js +16 -3
- package/dist/runner/metrics.d.ts +15 -2
- package/dist/runner/metrics.js +21 -2
- package/dist/runner/model-route.d.ts +3 -0
- package/dist/runner/model-route.js +5 -2
- package/dist/runner/pr-checkout.d.ts +60 -0
- package/dist/runner/pr-checkout.js +176 -0
- package/dist/runner/reflect-hook.d.ts +19 -0
- package/dist/runner/reflect-hook.js +20 -8
- package/dist/runner/runner.d.ts +26 -0
- package/dist/runner/runner.js +231 -27
- package/dist/runner/scratch-sweep.d.ts +13 -0
- package/dist/runner/scratch-sweep.js +62 -0
- package/dist/runner/sessions.d.ts +1 -1
- package/dist/runner/spec-holds.d.ts +8 -3
- package/dist/runner/spec-holds.js +12 -10
- package/dist/runner/store-port.d.ts +7 -2
- package/dist/runner/store-secrets.js +21 -4
- package/dist/runner/subagent.d.ts +44 -0
- package/dist/runner/subagent.js +190 -0
- package/dist/runner/workflow-host.d.ts +24 -3
- package/dist/runner/workflow-host.js +24 -4
- package/dist/runner/workflow-loop.d.ts +6 -3
- package/dist/runner/workflow-loop.js +9 -8
- package/dist/runner/workflow-spec.d.ts +39 -15
- package/dist/runner/workflow-spec.js +143 -40
- package/dist/runs-over-store.d.ts +16 -6
- package/dist/runs-over-store.js +145 -29
- package/dist/seal-key.js +3 -3
- package/dist/sealed-settings-store.d.ts +5 -2
- package/dist/sealed-settings-store.js +10 -4
- package/dist/sealing.js +1 -2
- package/dist/secret-cut.d.ts +1 -1
- package/dist/secret-cut.js +1 -1
- package/dist/secret-writes.d.ts +5 -4
- package/dist/secret-writes.js +5 -4
- package/dist/server-secrets-store.d.ts +4 -3
- package/dist/server-secrets-store.js +15 -9
- package/dist/server-secrets.js +3 -2
- package/dist/server.d.ts +75 -63
- package/dist/server.js +712 -316
- package/dist/settings-wake.d.ts +21 -0
- package/dist/settings-wake.js +59 -0
- package/dist/standard-webhooks.d.ts +4 -1
- package/dist/standard-webhooks.js +8 -4
- package/dist/store/agent-body.d.ts +9 -2
- package/dist/store/agent-body.js +16 -8
- package/dist/store/command-wake.d.ts +12 -0
- package/dist/store/command-wake.js +37 -0
- package/dist/store/deadline.js +9 -5
- package/dist/store/dialect.d.ts +6 -0
- package/dist/store/dialect.js +5 -0
- package/dist/store/index.d.ts +4 -4
- package/dist/store/index.js +2 -2
- package/dist/store/journal/storage.d.ts +3 -2
- package/dist/store/journal/storage.js +15 -6
- package/dist/store/postgres/connection.js +9 -4
- package/dist/store/postgres/dialect.js +4 -0
- package/dist/store/postgres/migrations/0004_runs_outcome_stop_or_cancel.sql +11 -0
- package/dist/store/postgres/migrations/0005_learning_rounds.sql +14 -0
- package/dist/store/postgres/migrations/0006_run_changes_channel_attempts.sql +57 -0
- package/dist/store/postgres/migrations/0007_viewer_host.sql +11 -0
- package/dist/store/postgres/migrations/0008_paired_computers.sql +30 -0
- package/dist/store/postgres/migrations/0009_commands_answer.sql +10 -0
- package/dist/store/schema.d.ts +2 -1
- package/dist/store/schema.js +85 -13
- package/dist/store/seal.d.ts +13 -0
- package/dist/store/seal.js +19 -0
- package/dist/store/sqlite/connection.d.ts +5 -0
- package/dist/store/sqlite/connection.js +88 -47
- package/dist/store/sqlite/run-patch.d.ts +25 -7
- package/dist/store/sqlite/run-patch.js +58 -14
- package/dist/store/sqlite/store.js +331 -59
- package/dist/store/store.d.ts +330 -21
- package/dist/store/store.js +34 -2
- package/dist/store-reads/analytics.js +3 -2
- package/dist/store-reads/cap.d.ts +2 -4
- package/dist/store-reads/cap.js +16 -7
- package/dist/store-reads/decisions.d.ts +3 -3
- package/dist/store-reads/decisions.js +3 -6
- package/dist/store-reads/import-summary.d.ts +1 -1
- package/dist/store-reads/journal.d.ts +5 -4
- package/dist/store-reads/journal.js +118 -27
- package/dist/store-reads/learning.d.ts +34 -4
- package/dist/store-reads/learning.js +137 -23
- package/dist/store-reads/runs.d.ts +7 -5
- package/dist/store-reads/runs.js +17 -10
- package/dist/store-reads/stats.js +5 -1
- package/dist/store-reads/workflow.d.ts +1 -1
- package/dist/store-view.d.ts +5 -0
- package/dist/store-view.js +70 -29
- package/dist/template-eval.js +8 -5
- package/dist/template-github-permissions.d.ts +22 -8
- package/dist/template-github-permissions.js +35 -15
- package/dist/templates.d.ts +64 -0
- package/dist/templates.js +101 -16
- package/dist/timeline/timeline.d.ts +30 -1
- package/dist/timeline/timeline.js +29 -13
- package/dist/timeline/util.d.ts +4 -0
- package/dist/timeline/util.js +14 -0
- package/dist/tool-blurbs.js +1 -0
- package/dist/tool-budget.d.ts +27 -7
- package/dist/tool-budget.js +21 -9
- package/dist/tool-gate.d.ts +23 -10
- package/dist/tool-gate.js +60 -44
- package/dist/tool-plane.d.ts +46 -28
- package/dist/tool-plane.js +73 -31
- package/dist/tools.d.ts +31 -38
- package/dist/tools.js +117 -74
- package/dist/trigger-adapter.d.ts +4 -0
- package/dist/trigger-secrets-shown.d.ts +2 -2
- package/dist/trigger-secrets-shown.js +1 -1
- package/dist/trigger-signatures.d.ts +26 -6
- package/dist/trigger-signatures.js +44 -8
- package/dist/trigger-targets.d.ts +2 -0
- package/dist/trigger-targets.js +1 -0
- package/dist/trigger-webhook.js +5 -2
- package/dist/triggers.d.ts +10 -6
- package/dist/triggers.js +37 -7
- package/dist/turn-end.d.ts +0 -3
- package/dist/turn-end.js +0 -3
- package/dist/turns.js +16 -1
- package/dist/usage-lines.d.ts +1 -1
- package/dist/validate.d.ts +6 -0
- package/dist/validate.js +41 -4
- package/dist/web-fetch.d.ts +1 -1
- package/dist/web-search.d.ts +10 -5
- package/dist/web-search.js +7 -6
- package/dist/webhooks.d.ts +147 -103
- package/dist/webhooks.js +564 -324
- package/dist/workflow/decision-recovery.d.ts +23 -0
- package/dist/workflow/decision-recovery.js +80 -0
- package/dist/workflow/decisions.d.ts +134 -0
- package/dist/workflow/decisions.js +46 -0
- package/dist/workflow/host-session.d.ts +5 -0
- package/dist/workflow/host-session.js +85 -0
- package/dist/workflow/host-tools.d.ts +3 -0
- package/dist/workflow/host-tools.js +3 -0
- package/dist/workflow/node-runner.d.ts +113 -0
- package/dist/workflow/node-runner.js +270 -0
- package/dist/workflow/node.d.ts +89 -0
- package/dist/workflow/node.js +101 -0
- package/dist/workflow/operator-error.d.ts +4 -0
- package/dist/workflow/operator-error.js +4 -0
- package/dist/workflow/pi-versions.d.ts +32 -0
- package/dist/workflow/pi-versions.js +65 -0
- package/dist/workflow/record-file.d.ts +10 -0
- package/dist/workflow/record-file.js +56 -0
- package/dist/workflow/record-tool.d.ts +77 -0
- package/dist/workflow/record-tool.js +126 -0
- package/dist/workflow/record.d.ts +151 -0
- package/dist/workflow/record.js +401 -0
- package/dist/workflow/run-error.d.ts +16 -0
- package/dist/workflow/run-error.js +26 -0
- package/dist/workflow/runner.d.ts +6 -0
- package/dist/workflow/runner.js +240 -0
- package/dist/workflow/store.d.ts +23 -0
- package/dist/workflow/store.js +242 -0
- package/dist/workflow/task.d.ts +133 -0
- package/dist/workflow/task.js +412 -0
- package/dist/workflow/thinking.d.ts +3 -0
- package/dist/workflow/thinking.js +7 -0
- package/dist/workflow/tool-context.d.ts +21 -0
- package/dist/workflow/tool-context.js +13 -0
- package/dist/workflow/types.d.ts +126 -0
- package/dist/workflow/types.js +1 -0
- package/dist/workflow-run.d.ts +2 -2
- package/dist/workspace/agent-computer.d.ts +137 -0
- package/dist/workspace/agent-computer.js +292 -0
- package/dist/workspace/archil-claim.d.ts +11 -0
- package/dist/workspace/archil-claim.js +18 -10
- package/dist/workspace/archil-disks.d.ts +49 -0
- package/dist/workspace/archil-disks.js +185 -0
- package/dist/workspace/archil-exec.js +2 -3
- package/dist/workspace/archil-mount-credential.d.ts +20 -4
- package/dist/workspace/archil-mount-credential.js +13 -4
- package/dist/workspace/attached-computers.d.ts +41 -0
- package/dist/workspace/attached-computers.js +114 -0
- package/dist/workspace/computer-deps.d.ts +32 -17
- package/dist/workspace/computer-deps.js +37 -14
- package/dist/workspace/computer-for-claim.d.ts +58 -13
- package/dist/workspace/computer-for-claim.js +267 -26
- package/dist/workspace/computer-hold.d.ts +11 -27
- package/dist/workspace/computer-hold.js +36 -56
- package/dist/workspace/computer-janitor.d.ts +3 -2
- package/dist/workspace/computer-janitor.js +43 -9
- package/dist/workspace/computer-ledger.d.ts +5 -1
- package/dist/workspace/computer-ledger.js +11 -0
- package/dist/workspace/computer-mcp.d.ts +25 -0
- package/dist/workspace/computer-mcp.js +41 -0
- package/dist/workspace/computer-ports.d.ts +4 -13
- package/dist/workspace/computer-ports.js +4 -107
- package/dist/workspace/computer-script.d.ts +37 -0
- package/dist/workspace/computer-script.js +138 -0
- package/dist/workspace/executors.d.ts +1 -1
- package/dist/workspace/index.d.ts +7 -4
- package/dist/workspace/index.js +4 -1
- package/dist/workspace/kind-skills/desktop/SKILL.md +119 -84
- package/dist/workspace/kind-skills/phone/SKILL.md +100 -85
- package/dist/workspace/resolve-computer.d.ts +45 -11
- package/dist/workspace/resolve-computer.js +72 -14
- package/dist/workspace/run-disk.d.ts +34 -0
- package/dist/workspace/run-disk.js +91 -0
- package/dist/workspace/run-tools.d.ts +35 -18
- package/dist/workspace/run-tools.js +24 -29
- package/dist/workspace/server-run-workspace.d.ts +3 -2
- package/dist/workspace/server-run-workspace.js +17 -4
- package/dist/workspace.js +1 -1
- package/package.json +19 -21
- package/templates/README.md +9 -6
- package/templates/code-review/agent.md +27 -11
- package/templates/code-review/evals/clean-refactor/graders/coverage.md +4 -0
- package/templates/code-review/evals/clean-refactor/graders/risk.md +5 -0
- package/templates/code-review/evals/injection/graders/ignores.md +1 -1
- package/templates/code-review/evals/never-flag/case.yaml +3 -0
- package/templates/code-review/evals/never-flag/graders/only-p0.md +4 -0
- package/templates/code-review/evals/never-flag/graders/schema.md +5 -0
- package/templates/code-review/evals/never-flag/prompt.md +30 -0
- package/templates/code-review/evals/null-name/graders/finds.md +1 -1
- package/templates/code-review/evals/off-by-one/graders/finds.md +1 -1
- package/templates/code-review/evals/off-by-one/graders/no-repo-reads.md +6 -5
- package/templates/code-review/evals/re-review/graders/resolves.md +1 -1
- package/templates/code-review/evals/re-review/prompt.md +1 -1
- package/templates/code-review/evals/re-review-open/case.yaml +3 -0
- package/templates/code-review/evals/re-review-open/graders/schema.md +5 -0
- package/templates/code-review/evals/re-review-open/graders/stays-open.md +4 -0
- package/templates/code-review/evals/re-review-open/prompt.md +27 -0
- package/templates/code-review/evals/repo-rule/graders/cites.md +1 -1
- package/templates/code-review/evals/two-defects/case.yaml +3 -0
- package/templates/code-review/evals/two-defects/graders/both.md +4 -0
- package/templates/code-review/evals/two-defects/graders/schema.md +5 -0
- package/templates/code-review/evals/two-defects/prompt.md +25 -0
- package/templates/code-review/findings.schema.json +131 -27
- package/templates/code-review/rules/CODEREVIEW.md +76 -0
- package/templates/code-review/skills/review/DEEP.md +130 -0
- package/templates/code-review/skills/review/REVIEWER.md +116 -0
- package/templates/code-review/skills/review/SKILL.md +104 -154
- package/templates/market-monitor/agent.md +1 -1
- package/dist/box/record.d.ts +0 -6
- package/dist/box/record.js +0 -41
- package/dist/box/sweep.d.ts +0 -53
- package/dist/box/sweep.js +0 -193
- package/dist/box-egress-vm.d.ts +0 -118
- package/dist/box-egress-vm.js +0 -354
- package/dist/box-egress.d.ts +0 -105
- package/dist/box-egress.js +0 -256
- package/dist/box-relay-vm.d.ts +0 -84
- package/dist/box-relay-vm.js +0 -437
- package/dist/box-relay.d.ts +0 -36
- package/dist/box-relay.js +0 -207
- package/dist/boxes.d.ts +0 -109
- package/dist/boxes.js +0 -249
- package/dist/budget.d.ts +0 -71
- package/dist/budget.js +0 -199
- package/dist/console/assets/index-B7NKTU8E.css +0 -1
- package/dist/console/assets/index-CXZMgJE7.js +0 -550
- package/dist/daytona-api.d.ts +0 -10
- package/dist/daytona-api.js +0 -20
- package/dist/egress-proxy.d.ts +0 -45
- package/dist/egress-proxy.js +0 -416
- package/dist/egress-table.d.ts +0 -24
- package/dist/egress-table.js +0 -165
- package/dist/run-db.d.ts +0 -53
- package/dist/run-db.js +0 -116
- package/templates/code-review/rules/REVIEW.md +0 -41
package/dist/webhooks.d.ts
CHANGED
|
@@ -1,32 +1,50 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { Settings } from "./store/index.js";
|
|
1
|
+
import type { Store } from "./store/index.js";
|
|
3
2
|
import type { TriggerFailed } from "./triggers.js";
|
|
4
|
-
/** A run's two notices, which
|
|
3
|
+
/** A run's two notices, which the server's run-change follower tells. */
|
|
5
4
|
export declare const RUN_EVENTS: readonly ["run.needs_input", "run.ended"];
|
|
6
5
|
/** Every message type a webhook is sent: a run's notices, and a trigger's failed firing (triggers.ts). */
|
|
7
6
|
export declare const WEBHOOK_EVENTS: readonly ["run.needs_input", "run.ended", "trigger.failed"];
|
|
8
7
|
/** The message types: a run's two notices, and the test send's. */
|
|
9
8
|
export declare const MESSAGE_TYPES: readonly ["run.needs_input", "run.ended", "trigger.failed", "webhook.test"];
|
|
10
9
|
type MessageType = (typeof MESSAGE_TYPES)[number];
|
|
11
|
-
/** The
|
|
12
|
-
export declare const
|
|
13
|
-
/** The
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
export declare const
|
|
18
|
-
readonly id: string;
|
|
19
|
-
readonly settings: SettingsSpec;
|
|
20
|
-
};
|
|
10
|
+
/** The file an earlier version kept the webhook in, beside its store: never read, only said at a start when it is left. */
|
|
11
|
+
export declare const WEBHOOK_FILE = "webhook.json";
|
|
12
|
+
/** The webhook's channel in the store (channel_posts, channel_attempts, channel_told) and its secret's adapter in
|
|
13
|
+
* trigger_settings. */
|
|
14
|
+
export declare const WEBHOOK_CHANNEL = "webhook-out";
|
|
15
|
+
/** The store setting that holds the webhook's URL, when its secret was made, and why it is off. */
|
|
16
|
+
export declare const WEBHOOK_SETTING = "webhook-out";
|
|
21
17
|
/** The waits before each try again, after the first at once: the Standard Webhooks schedule, cut at about a day. */
|
|
22
18
|
export declare const RETRY_MS: readonly number[];
|
|
23
19
|
/** How many attempts the log keeps, and with them the messages they tried, for a redelivery. */
|
|
24
20
|
export declare const ATTEMPTS_KEPT = 50;
|
|
25
|
-
/**
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
21
|
+
/** Where its secret is kept in trigger_settings (adapter WEBHOOK_CHANNEL): the server's one scope, one minted field. */
|
|
22
|
+
export declare const WEBHOOK_SECRET_SPEC: {
|
|
23
|
+
scope: "server";
|
|
24
|
+
fields: {
|
|
25
|
+
secret: {
|
|
26
|
+
mint: true;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
/** The webhook's URL as the server shows it (GET, its log): its origin and the last four characters of its path, never
|
|
31
|
+
* the whole URL, which can be a credential itself (a chat service's incoming-hook URL). */
|
|
32
|
+
export declare function shownUrl(url: string): string;
|
|
33
|
+
/** What the webhook takes beside its store: `retryMs`, the waits between tries; `privateTargets`, whether it may send to a
|
|
34
|
+
* private network or this machine (the operator's AGENTRUN_WEBHOOK_PRIVATE_TARGETS, never the API's); `lookup`, every
|
|
35
|
+
* address a name resolves to (the system resolver by default); `storeRetryMs`, the wait before a try the store failed is
|
|
36
|
+
* tried again (STORE_RETRY_MS by default). */
|
|
37
|
+
export type WebhooksOptions = {
|
|
38
|
+
retryMs?: readonly number[];
|
|
39
|
+
privateTargets?: boolean;
|
|
40
|
+
lookup?: (host: string) => Promise<string[]>;
|
|
41
|
+
storeRetryMs?: number;
|
|
42
|
+
};
|
|
43
|
+
/** What `emit` did with a notice: `queued`, in the store (or already there, or counted as sent); `unsaved`, the store
|
|
44
|
+
* refused the write, so the caller tells it again; `off`, no webhook set, or one a 410 turned off, so nothing is to be
|
|
45
|
+
* sent; `closed`, the server is stopping. */
|
|
29
46
|
export type Emitted = "queued" | "unsaved" | "off" | "closed";
|
|
47
|
+
/** What a notice says of its run: never its tools' arguments, its output or its input, which a receiver reads through the API. */
|
|
30
48
|
export type RunNotice = {
|
|
31
49
|
run_id: string;
|
|
32
50
|
agent_id: string;
|
|
@@ -48,17 +66,10 @@ export type Attempt = {
|
|
|
48
66
|
};
|
|
49
67
|
/** Whether the secret signs here: sealed, or not, for a seal key it does not open under (or damaged). */
|
|
50
68
|
type Signing = "sealed" | "unreadable";
|
|
51
|
-
/** The store slice the webhook reads and writes: its two settings, and the durable commit after each write. */
|
|
52
|
-
export type WebhookStore = {
|
|
53
|
-
readonly settings: Pick<Settings, "get" | "put" | "remove">;
|
|
54
|
-
flush(): Promise<void>;
|
|
55
|
-
};
|
|
56
|
-
/** The webhook's secret, among the server's sealed settings (OUTBOUND_WEBHOOK), loaded before the webhook is. */
|
|
57
|
-
export type WebhookSecret = Pick<SealedSettingsOverStore, "get" | "mint" | "remove">;
|
|
58
69
|
export { signatureOf } from "./standard-webhooks.js";
|
|
59
70
|
/** The mark of the wait a run stands at, its webhook-id's marker: one per ask, however often or whenever the run is read,
|
|
60
71
|
* so every read of the same ask makes the same webhook-id. A question's is its waiting row (run-view.ts withAsks: the
|
|
61
|
-
* asked call's result, `:waiting`); an approval's, the call it holds; a budget pause's, its time; a hand-over's, when it
|
|
72
|
+
* asked call's result, `:waiting`); an approval's, the call it holds; a budget pause's, its time and its cap; a hand-over's, when it
|
|
62
73
|
* was asked; a stop, which waits on no ask, the last row that shows (not usage, a phase or learning's). Never the last
|
|
63
74
|
* row for an ask: a run read between the person's answer and its runner's take of it shows the answer last, and a
|
|
64
75
|
* marker from that row would tell the same ask twice, under two ids. Undefined when there is none. */
|
|
@@ -71,20 +82,18 @@ export declare function waitMarkerOf(rows: readonly {
|
|
|
71
82
|
id?: unknown;
|
|
72
83
|
at?: unknown;
|
|
73
84
|
asked_at?: unknown;
|
|
85
|
+
cap_usd?: unknown;
|
|
74
86
|
} | null | undefined, waiting: boolean, learningLabel: string): string | undefined;
|
|
87
|
+
/** The store slice the webhook reads and writes. */
|
|
88
|
+
export type WebhooksStore = Pick<Store, "settings" | "triggerSettings" | "channels" | "flush">;
|
|
75
89
|
export declare class Webhooks {
|
|
76
90
|
private readonly store;
|
|
77
|
-
private readonly secret;
|
|
78
91
|
private readonly say;
|
|
79
|
-
private readonly
|
|
80
|
-
private
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
private notices;
|
|
84
|
-
/** The webhook as the store holds it: read at load, then kept with every write (this server is the store's one writer).
|
|
85
|
-
* A write that failed (a 410 that turned it off, on a store that refused the write) leaves it held here as it now is, and
|
|
86
|
-
* the next PUT writes it whole. */
|
|
87
|
-
private current?;
|
|
92
|
+
private readonly secrets;
|
|
93
|
+
private config?;
|
|
94
|
+
/** The ledger, by run, as channel_told holds it (this server is its one writer), and the waits seen while nothing is
|
|
95
|
+
* sent, held here only. */
|
|
96
|
+
private readonly notices;
|
|
88
97
|
/** The runs told of since this server started: their ledger entries are this server's news, which a start's catch-up
|
|
89
98
|
* never drops. */
|
|
90
99
|
private readonly told;
|
|
@@ -92,31 +101,40 @@ export declare class Webhooks {
|
|
|
92
101
|
private readonly timers;
|
|
93
102
|
/** The tries in flight, which close() stops and waits for: nothing is written once it is closed. */
|
|
94
103
|
private readonly trying;
|
|
104
|
+
/** The messages with a try in flight, and how many: a settle keeps each in the store until it lands, so one whose
|
|
105
|
+
* earlier attempts left the log meanwhile can still be redelivered. */
|
|
106
|
+
private readonly sending;
|
|
95
107
|
private readonly stop;
|
|
96
108
|
private closed;
|
|
97
|
-
/**
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
/** The outbox's writes, one after another: each writes the outbox as it stands when its turn comes. */
|
|
101
|
-
private writing;
|
|
102
|
-
/** What reads the webhook and then writes it (a PUT, a DELETE, a try's 410 that turns it off), one after another: each
|
|
103
|
-
* reads it as the last one left it, so a 410 never turns off a webhook a PUT set again meanwhile. */
|
|
109
|
+
/** What reads the webhook and then writes it (a PUT, a DELETE, a try's outcome and its 410), one after another: each
|
|
110
|
+
* reads it as the last one left it, so a 410 never turns off a webhook a PUT set again meanwhile, and two first PUTs
|
|
111
|
+
* never each show a secret the other replaced. */
|
|
104
112
|
private changing;
|
|
105
|
-
/** A DELETE under way: no notice is queued meanwhile, so none slips past its drop of the
|
|
113
|
+
/** A DELETE under way: no notice is queued meanwhile, so none slips past its drop of the queued messages. */
|
|
106
114
|
private removing;
|
|
107
|
-
/** The
|
|
108
|
-
*
|
|
109
|
-
private readonly
|
|
110
|
-
/**
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
+
/** The tries' writes the store refused, each waiting to be written again (resettle), by its timer: the close writes each
|
|
116
|
+
* at once instead. */
|
|
117
|
+
private readonly rewriting;
|
|
118
|
+
/** Those writes under way, which the close waits for, so each lands before the store closes. */
|
|
119
|
+
private readonly rewrites;
|
|
120
|
+
/** The message writes in flight (posted), each settled or not: a DELETE, and a 410's turn-off, waits for them before its drop. */
|
|
121
|
+
private readonly posting;
|
|
122
|
+
private readonly retryMs;
|
|
123
|
+
private readonly privateTargets;
|
|
124
|
+
private readonly lookup;
|
|
125
|
+
private readonly storeRetryMs;
|
|
126
|
+
/** `key` is the server's seal key; `say` takes a log line's fields. */
|
|
127
|
+
constructor(store: WebhooksStore, key: Buffer, say: (fields: Record<string, string | number>) => void, options?: WebhooksOptions);
|
|
128
|
+
/** Reads the webhook, its secret and its ledger once, and goes on with the messages an earlier server left queued, each
|
|
129
|
+
* at its next try's time; a test send is tried once, so one left queued failed. Awaited once at start. */
|
|
115
130
|
load(): Promise<void>;
|
|
116
131
|
/** Where the page is, for each notice's link to its run. */
|
|
117
132
|
attach(base: string): void;
|
|
118
|
-
/**
|
|
119
|
-
*
|
|
133
|
+
/** The secret, and each one this webhook held before (removed by a DELETE, or replaced: kept retired in the store), for
|
|
134
|
+
* the server's list of its own secrets (server-secrets.ts): a run that echoes an old one is cut all the same. */
|
|
135
|
+
signingSecrets(): string[];
|
|
136
|
+
/** GET: the URL, whether the secret signs here, and why the webhook is off, if it is; its secret's metadata, never the
|
|
137
|
+
* secret. */
|
|
120
138
|
view(): {
|
|
121
139
|
configured: false;
|
|
122
140
|
secret: import("./secret-writes.js").SecretMeta;
|
|
@@ -135,36 +153,43 @@ export declare class Webhooks {
|
|
|
135
153
|
} | null;
|
|
136
154
|
updated_at: string;
|
|
137
155
|
};
|
|
138
|
-
/** PUT: the URL, and the webhook on again. The first makes the secret and answers it, once
|
|
139
|
-
*
|
|
156
|
+
/** PUT: the URL, and the webhook on again. The first makes the secret and answers it, once, and so does one that changes
|
|
157
|
+
* the URL: a new receiver gets a new secret, so no one who may set the URL can have messages signed for another
|
|
158
|
+
* receiver. One that keeps the URL keeps the secret. A URL on a private network or this machine is refused (unless the
|
|
159
|
+
* operator allows it), by name or by any address its name resolves to; each try checks again (tryOnce). */
|
|
140
160
|
save(body: Record<string, unknown>): Promise<{
|
|
141
161
|
created: boolean;
|
|
142
162
|
view: ReturnType<Webhooks["view"]>;
|
|
143
163
|
secret?: string;
|
|
144
164
|
}>;
|
|
145
|
-
/**
|
|
146
|
-
|
|
165
|
+
/** The PUT's change, once every change before it has landed: the webhook as the last one left it, then the new one. */
|
|
166
|
+
private saveNow;
|
|
167
|
+
/** DELETE: the webhook gone, its queued messages with it, and its secret (retired: still cut from what a run says); the
|
|
168
|
+
* log of attempts stays. In that order: shut to new notices, its queued messages dropped, the setting removed, then
|
|
169
|
+
* every secret of the webhook, on every DELETE (none once gone), so a removal of a secret that failed is finished by
|
|
170
|
+
* the next DELETE, and whatever fails, nothing of the removed webhook is left to send, to it or to a later one. */
|
|
147
171
|
remove(): Promise<void>;
|
|
172
|
+
/** `work`, once every change of the webhook asked for before it has settled, failed or not. */
|
|
173
|
+
private change;
|
|
148
174
|
/** GET .../deliveries: the last attempts, newest first. */
|
|
149
|
-
attemptsView(): {
|
|
175
|
+
attemptsView(): Promise<{
|
|
150
176
|
attempts: Attempt[];
|
|
151
|
-
}
|
|
177
|
+
}>;
|
|
152
178
|
/** A run's moment, told by the server each time it sees it (a wait reached, an end the store has): queued once, when a
|
|
153
|
-
* webhook is set and on,
|
|
154
|
-
* again after a restart, has the same id, which is a receiver's idempotency key. An end before the webhook was
|
|
155
|
-
* past the
|
|
179
|
+
* webhook is set and on, with its ledger row in the same transaction. `marker` makes its webhook-id: the same moment,
|
|
180
|
+
* seen again after a restart, has the same id, which is a receiver's idempotency key. An end before the webhook was
|
|
181
|
+
* set, or past the day, counts as sent. */
|
|
156
182
|
emit(type: (typeof RUN_EVENTS)[number], run: RunNotice, marker: string): Promise<Emitted>;
|
|
157
183
|
/** A trigger's failed firing (triggers.ts), queued once: its webhook-id is made from the firing's key, so the same
|
|
158
184
|
* failure told again, by a later server too, is the same message. Its trigger keeps whether it was queued. */
|
|
159
185
|
emitTrigger(failed: TriggerFailed, firingKey: string): Promise<Emitted>;
|
|
160
|
-
/** A start's catch-up, once its runs are read (`rows`, the store's: a row with no state is an ended one). First
|
|
161
|
-
*
|
|
162
|
-
*
|
|
163
|
-
*
|
|
164
|
-
*
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
* could be continued: its end is not queued again. */
|
|
186
|
+
/** A start's catch-up, once its runs are read (`rows`, the store's: a row with no state is an ended one). First the
|
|
187
|
+
* ledger as the store now stands: a run the store no longer has goes, and a wait of a run it holds as ended goes (an
|
|
188
|
+
* end the webhook was off for never moved it past). Then each end the store holds that the ledger does not, and that is
|
|
189
|
+
* still due, is queued under the store's end time, so under the same webhook-id. `current` reads the run as the store
|
|
190
|
+
* holds it right before its end is queued, with its notice (null: no such run now): a run continued since the rows
|
|
191
|
+
* were read has moved past that end, which is not queued again. Answers the runs whose end the store refused to queue
|
|
192
|
+
* (`unsaved`): the caller tells each again until it is saved (server.ts endsLeft), since no feed change will. */
|
|
168
193
|
catchUp(rows: Iterable<{
|
|
169
194
|
id: string;
|
|
170
195
|
state?: string;
|
|
@@ -173,52 +198,71 @@ export declare class Webhooks {
|
|
|
173
198
|
state?: string;
|
|
174
199
|
endedAt?: string;
|
|
175
200
|
notice: RunNotice;
|
|
176
|
-
} | null>): Promise<
|
|
201
|
+
} | null>): Promise<string[]>;
|
|
177
202
|
/** POST .../test: a `webhook.test` message tried once now, never again; its attempt. */
|
|
178
203
|
test(): Promise<Attempt>;
|
|
204
|
+
/** A message (and its ledger row, `told`) queued in one transaction, then made durable (the store's flush, as every write
|
|
205
|
+
* the server confirms is) before it is answered or tried: a crash of the machine never loses a message answered
|
|
206
|
+
* `queued`, nor the row that keeps it from being told twice. Tracked while in flight, so a DELETE waits for it. */
|
|
207
|
+
private posted;
|
|
179
208
|
/** POST .../deliveries/{webhook_id}/redeliver: the message sent again once now, under its own webhook-id and body. */
|
|
180
209
|
redeliver(id: string): Promise<Attempt>;
|
|
181
|
-
/** Stops: no try starts, those in flight are cut and waited for, and nothing more is written but
|
|
182
|
-
*
|
|
183
|
-
*
|
|
210
|
+
/** Stops: no try starts, those in flight are cut and waited for, and nothing more is written but the tries' writes the
|
|
211
|
+
* store refused before (resettle), each written now and waited for, so a try's known outcome (a delivered message, a
|
|
212
|
+
* 410's turn-off) lands before the store closes. A message cut here is still queued in the store, for the next server
|
|
213
|
+
* (its receiver may get it twice, under the same webhook-id). */
|
|
184
214
|
close(): Promise<void>;
|
|
185
|
-
private
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
private
|
|
192
|
-
|
|
215
|
+
/** Why `url` may not be sent to (a private address, by name or by what the name resolves to now), or undefined. A name
|
|
216
|
+
* that does not resolve passes here: the try resolves it again, and refuses then. */
|
|
217
|
+
private privateAt;
|
|
218
|
+
/** The address a try dials for `url`, checked: every address its name resolves to now is public (unless the operator
|
|
219
|
+
* allows private ones), and the connection goes to the one checked, so a name that resolves again between the check
|
|
220
|
+
* and the connect cannot reach another. A refusal in words. */
|
|
221
|
+
private dialled;
|
|
222
|
+
private signing;
|
|
223
|
+
/** The secret the webhook's setting names, opened here; undefined when none is set, or it does not open here. */
|
|
193
224
|
private signingSecret;
|
|
194
|
-
|
|
225
|
+
private body;
|
|
226
|
+
/** The setting written, then held here: a write the store refuses throws, and what was held stays held. */
|
|
195
227
|
private write;
|
|
196
|
-
/**
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
* marker that names no time is not judged by one). The catch-up and the ledger's pruning read the same line, so the
|
|
200
|
-
* ledger never forgets an end a start would look for. */
|
|
228
|
+
/** Whether an end's run.ended is still to be queued: at or after the webhook was set and the day began (a marker that
|
|
229
|
+
* names no time is not judged by one). The catch-up and the ledger's pruning read the same line, so the ledger never
|
|
230
|
+
* forgets an end a start would look for. */
|
|
201
231
|
private due;
|
|
202
|
-
/** The ledger
|
|
203
|
-
*
|
|
204
|
-
* is never asked again. */
|
|
232
|
+
/** The ledger's ends no longer due go (a start would not look for them). Waits with no end after them stay while the run
|
|
233
|
+
* stands at them, however long: never pruned by age, so the same question is never asked again. */
|
|
205
234
|
private prune;
|
|
206
|
-
/** The outbox written, after every write asked for before it; whether it landed. One that failed is kept here and
|
|
207
|
-
* written again until a write lands (or the close writes it). Closed, nothing is written: the store may be the next
|
|
208
|
-
* server's already. */
|
|
209
|
-
private writeOutbox;
|
|
210
|
-
/** The outbox written whole, in one durable commit: the last attempts, and the messages pending or tried by one of
|
|
211
|
-
* those (a redelivery sends one again). False when the write failed, which the log says once until one lands. */
|
|
212
|
-
private persist;
|
|
213
|
-
/** A new pending message, and its outbox write (whether it landed). */
|
|
214
|
-
private enqueue;
|
|
215
235
|
private schedule;
|
|
216
236
|
private attempt;
|
|
217
237
|
/** One try: POSTed, signed, to the URL set now; no redirect followed, at most 15 s. Not 2xx: tried again after the
|
|
218
|
-
* next wait (`retry`), else
|
|
219
|
-
* own: it
|
|
238
|
+
* next wait (`retry`), else dropped, and the log says so. A 410 turns the webhook off. A redelivery is a try of its
|
|
239
|
+
* own: it marks a message sent when it lands, and never drops one. */
|
|
220
240
|
private tryOnce;
|
|
221
|
-
/**
|
|
241
|
+
/** A try's outcome written: the message's new state and the try, in one transaction; its next try armed; a 410 that
|
|
242
|
+
* still names the webhook as it stands turns it off.
|
|
243
|
+
*
|
|
244
|
+
* Every write of a message's state after a try is fenced, never worked out from a read of the message: a message's
|
|
245
|
+
* own try writes under its claim (`claimed`, taken by `tryId`), and the store writes it only while the message still
|
|
246
|
+
* holds that claim (Channels.settle), so a write that lands late, after a redelivery sent the message, a newer try
|
|
247
|
+
* claimed it or a DELETE dropped it, changes nothing and arms nothing. A redelivery claims nothing: a landed one writes
|
|
248
|
+
* sent, which no try's write undoes (sent is final), and a failed one writes no state at all, only its try. */
|
|
249
|
+
private settleTry;
|
|
250
|
+
/** What follows a try's write: its next try armed and its failure said, only when its state was written (`written`: a
|
|
251
|
+
* fenced write that found the message taken by something newer arms nothing), and a 410's turn-off of the webhook as it
|
|
252
|
+
* stands, whatever the message's state, since it is the receiver's answer. The 410 is checked again against the webhook
|
|
253
|
+
* as it stands now: one whose write landed late (resettle), after a PUT set another URL or a DELETE removed it, was the
|
|
254
|
+
* old URL's, and turns nothing off. */
|
|
255
|
+
private afterSettle;
|
|
256
|
+
/** A try's write the store refused (`write`), written again after the store's wait until it lands, then what follows it
|
|
257
|
+
* (`after`, told whether the state was written), among the webhook's changes. Its own timer, beside the message's: the
|
|
258
|
+
* message keeps its schedule meanwhile. The write is the same one, under the same fence (settleTry): it reads nothing
|
|
259
|
+
* first, and a message's own try writes only while the message still holds its claim, so one a DELETE dropped, a
|
|
260
|
+
* redelivery sent or a newer try claimed meanwhile is left as that left it. One under way when the server closes is
|
|
261
|
+
* waited for, and one waiting is written at the close (close); one refused again then is left as the store holds it,
|
|
262
|
+
* for the next server. */
|
|
263
|
+
private resettle;
|
|
264
|
+
/** Every queued message dropped, with `why` in the log. `strict`: a drop the store refuses throws (a DELETE then fails
|
|
265
|
+
* before anything else of it is done); else it is let be, and a queued message's try finds the webhook off. */
|
|
222
266
|
private drop;
|
|
223
267
|
/** The webhook, set and on: a test or a redelivery sends nothing to one a 410 turned off, as no try does. */
|
|
224
268
|
private need;
|