@reticlehq/server 3.7.0 → 3.8.1
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/SKILL.md +59 -68
- package/bin/reticle.js +9 -2
- package/dist/command/cli/adhoc-suite.js +1 -1
- package/dist/command/cli/adhoc-verdict.d.ts +12 -0
- package/dist/command/cli/adhoc-verdict.js +62 -4
- package/dist/command/cli/answers/gate-hook-message.d.ts +2 -0
- package/dist/command/cli/answers/gate-hook-message.js +5 -1
- package/dist/command/cli/auth/cloud-session.d.ts +11 -19
- package/dist/command/cli/auth/cloud-session.js +23 -0
- package/dist/command/cli/auth/device-flow.d.ts +3 -37
- package/dist/command/cli/cli-doctor.js +66 -21
- package/dist/command/cli/cli-flow-commands.js +53 -11
- package/dist/command/cli/cli-kill.d.ts +8 -0
- package/dist/command/cli/cli-kill.js +43 -3
- package/dist/command/cli/cli-parse-feedback.d.ts +4 -0
- package/dist/command/cli/cli-parse-feedback.js +13 -1
- package/dist/command/cli/cli-parse-grammar.d.ts +1 -2
- package/dist/command/cli/cli-parse-grammar.js +1 -6
- package/dist/command/cli/cli-parse-serve.d.ts +24 -0
- package/dist/command/cli/cli-parse-serve.js +124 -0
- package/dist/command/cli/cli-parse.d.ts +12 -11
- package/dist/command/cli/cli-parse.js +100 -123
- package/dist/command/cli/cli-usage.d.ts +0 -11
- package/dist/command/cli/cli-usage.js +43 -16
- package/dist/command/cli/cli-verify.d.ts +1 -1
- package/dist/command/cli/cli-verify.js +29 -14
- package/dist/command/cli/cloud-cli.js +27 -9
- package/dist/command/cli/cloud-kit.js +3 -3
- package/dist/command/cli/cloud-link.d.ts +1 -20
- package/dist/command/cli/cloud-link.js +2 -0
- package/dist/command/cli/cloud-login.d.ts +6 -2
- package/dist/command/cli/cloud-login.js +13 -41
- package/dist/command/cli/config/checkout.d.ts +10 -0
- package/dist/command/cli/config/checkout.js +78 -0
- package/dist/command/cli/doctor/doctor-agent-link.d.ts +23 -0
- package/dist/command/cli/doctor/doctor-agent-link.js +28 -0
- package/dist/command/cli/doctor/doctor-coverage-line.js +1 -7
- package/dist/command/cli/doctor/doctor-rows.d.ts +4 -0
- package/dist/command/cli/doctor/doctor-rows.js +4 -0
- package/dist/command/cli/drive/drive-attach.d.ts +5 -0
- package/dist/command/cli/drive/drive-attach.js +21 -1
- package/dist/command/cli/hook/codex-transcript.d.ts +20 -0
- package/dist/command/cli/hook/codex-transcript.js +224 -0
- package/dist/command/cli/hook/episode-structure.d.ts +24 -0
- package/dist/command/cli/hook/episode-structure.js +138 -0
- package/dist/command/cli/hook/hook-command.d.ts +9 -0
- package/dist/command/cli/hook/hook-command.js +211 -0
- package/dist/command/cli/hook/hook-fast.d.ts +31 -0
- package/dist/command/cli/hook/hook-fast.js +136 -0
- package/dist/command/cli/hook/prompt-hook.d.ts +30 -0
- package/dist/command/cli/hook/prompt-hook.js +199 -0
- package/dist/command/cli/hook/tool-hook.d.ts +21 -0
- package/dist/command/cli/hook/tool-hook.js +259 -0
- package/dist/command/cli/launch/cli-launch.d.ts +2 -0
- package/dist/command/cli/launch/cli-launch.js +22 -2
- package/dist/command/cli/lifecycle/daemon-lifecycle.js +28 -2
- package/dist/command/cli/mcp-command.d.ts +9 -0
- package/dist/command/cli/mcp-command.js +127 -41
- package/dist/command/cli/open-navigate.d.ts +43 -0
- package/dist/command/cli/open-navigate.js +85 -0
- package/dist/command/cli/ports/port-holder.d.ts +16 -4
- package/dist/command/cli/ports/port-holder.js +58 -12
- package/dist/command/cli/ports/resolve/cli-port.js +18 -2
- package/dist/command/cli/project-name.d.ts +1 -7
- package/dist/command/cli/project-name.js +1 -0
- package/dist/command/cli/report-command.d.ts +8 -2
- package/dist/command/cli/report-command.js +95 -18
- package/dist/command/cli/status-fields.d.ts +9 -2
- package/dist/command/cli/status-fields.js +148 -4
- package/dist/command/cli/try-command.d.ts +3 -4
- package/dist/command/cli/try-command.js +6 -11
- package/dist/command/cli/verify-results.d.ts +4 -1
- package/dist/command/cli/verify-results.js +3 -1
- package/dist/command/cli.d.ts +1 -7
- package/dist/command/cli.js +79 -160
- package/dist/command/daemon/daemon-resilience.d.ts +6 -1
- package/dist/command/daemon/daemon-resilience.js +31 -18
- package/dist/command/daemon/daemon.d.ts +11 -0
- package/dist/command/daemon/daemon.js +70 -2
- package/dist/command/daemon/lifetime/daemon-usefulness.d.ts +2 -0
- package/dist/command/daemon/lifetime/daemon-usefulness.js +13 -2
- package/dist/command/daemon/wake-decision.js +4 -2
- package/dist/command/daemon/win32-escape.d.ts +32 -0
- package/dist/command/daemon/win32-escape.js +119 -0
- package/dist/command/setup/agent-configs.d.ts +9 -0
- package/dist/command/setup/agent-configs.js +9 -0
- package/dist/command/setup/auto-approve.d.ts +10 -3
- package/dist/command/setup/auto-approve.js +51 -3
- package/dist/command/setup/bringup/dev-server-files.d.ts +1 -9
- package/dist/command/setup/bringup/dev-server-wait.js +5 -1
- package/dist/command/setup/bringup/ensure-daemon.js +4 -7
- package/dist/command/setup/init/init-host.js +6 -0
- package/dist/command/setup/init/init-port.js +5 -4
- package/dist/command/setup/init/init-runtime.js +7 -1
- package/dist/command/setup/node-effects.d.ts +8 -0
- package/dist/command/setup/node-effects.js +36 -4
- package/dist/command/setup/probe/dev-port.d.ts +26 -0
- package/dist/command/setup/probe/dev-port.js +117 -0
- package/dist/command/setup/probe/page-probe.d.ts +1 -1
- package/dist/command/setup/probe/page-probe.js +11 -3
- package/dist/command/setup/remaining-steps.d.ts +0 -7
- package/dist/command/setup/remaining-steps.js +3 -2
- package/dist/command/setup/run-setup.d.ts +11 -0
- package/dist/command/setup/run-setup.js +33 -5
- package/dist/command/setup/setup-command.d.ts +2 -0
- package/dist/command/setup/setup-command.js +22 -4
- package/dist/command/update/updater.d.ts +1 -6
- package/dist/command/update/updater.js +4 -5
- package/dist/command/update/version-seen.d.ts +24 -0
- package/dist/command/update/version-seen.js +65 -0
- package/dist/command/version/peer-announce.d.ts +9 -1
- package/dist/command/version/peer-announce.js +25 -2
- package/dist/command/version/sdk-fix.d.ts +5 -6
- package/dist/command/version/sdk-fix.js +17 -32
- package/dist/command/version/version-skew.d.ts +16 -1
- package/dist/command/version/version-skew.js +84 -10
- package/dist/features/crawl/crawl-tools.js +2 -2
- package/dist/features/crawl/crawl.js +2 -0
- package/dist/features/exhaust/ledger.d.ts +15 -96
- package/dist/features/exhaust/ledger.js +3 -3
- package/dist/features/harness/drive-runs.d.ts +28 -4
- package/dist/features/harness/drive-runs.js +99 -7
- package/dist/features/harness/drivers.d.ts +1 -1
- package/dist/features/harness/drivers.js +1 -1
- package/dist/features/harness/harness.d.ts +5 -0
- package/dist/features/harness/harness.js +24 -12
- package/dist/features/harness/platform/platform-drives.d.ts +7 -1
- package/dist/features/harness/platform/platform-drives.js +12 -7
- package/dist/features/harness/platform/refusal.d.ts +1 -1
- package/dist/features/harness/platform/refusal.js +4 -4
- package/dist/features/harness/platform/remote-drive.js +70 -28
- package/dist/features/harness/platform/server-driver.js +22 -1
- package/dist/features/harness/platform-config.d.ts +1 -10
- package/dist/features/harness/platform-config.js +0 -20
- package/dist/features/license/license.d.ts +2 -14
- package/dist/features/visual/step-shots.d.ts +33 -1
- package/dist/features/visual/step-shots.js +155 -1
- package/dist/features/visual/visual-tools.js +12 -4
- package/dist/hooks/coding-agents.d.ts +6 -0
- package/dist/hooks/coding-agents.js +24 -3
- package/dist/hooks/episode-stamp.d.ts +32 -0
- package/dist/hooks/episode-stamp.js +61 -0
- package/dist/hooks/hook-commands.js +19 -9
- package/dist/index.d.ts +5 -1
- package/dist/index.js +66 -24
- package/dist/judgement/app-graph/journal-steps.d.ts +8 -0
- package/dist/judgement/app-graph/journal-steps.js +92 -0
- package/dist/judgement/capsule/capsule-store.d.ts +2 -39
- package/dist/judgement/domain/domain-model.js +1 -10
- package/dist/judgement/domain/domain-tools.js +4 -2
- package/dist/judgement/runs/artifact/run-store.d.ts +28 -8
- package/dist/judgement/runs/artifact/run-store.js +153 -28
- package/dist/judgement/runs/default-run-id.d.ts +3 -1
- package/dist/judgement/runs/default-run-id.js +15 -3
- package/dist/judgement/runs/drive-run.d.ts +3 -3
- package/dist/judgement/runs/drive-run.js +11 -7
- package/dist/judgement/runs/run-ledger.d.ts +21 -0
- package/dist/judgement/runs/run-ledger.js +143 -0
- package/dist/judgement/runs/runner-port.d.ts +1 -1
- package/dist/judgement/runs/runner-port.js +8 -2
- package/dist/judgement/runs/verification-sync.d.ts +4 -3
- package/dist/judgement/runs/verification-sync.js +27 -5
- package/dist/language/flows/affected-tools.js +2 -1
- package/dist/language/flows/annotate-notes/annotate.js +8 -3
- package/dist/language/flows/annotate-tools.js +1 -1
- package/dist/language/flows/change/affected.d.ts +8 -0
- package/dist/language/flows/change/affected.js +20 -7
- package/dist/language/flows/decision.js +19 -4
- package/dist/language/flows/fields/flow-secret-field.d.ts +9 -0
- package/dist/language/flows/fields/flow-secret-field.js +67 -5
- package/dist/language/flows/flow-anchor.d.ts +5 -0
- package/dist/language/flows/flow-anchor.js +4 -0
- package/dist/language/flows/flow-cross-step.d.ts +7 -1
- package/dist/language/flows/flow-cross-step.js +9 -0
- package/dist/language/flows/flow-expect-grammar.js +15 -10
- package/dist/language/flows/flow-intent.js +6 -1
- package/dist/language/flows/flow-journey.d.ts +8 -0
- package/dist/language/flows/flow-journey.js +13 -0
- package/dist/language/flows/flow-lease.d.ts +27 -0
- package/dist/language/flows/flow-lease.js +59 -0
- package/dist/language/flows/flow-replay-run.d.ts +1 -87
- package/dist/language/flows/flow-replay-run.js +111 -310
- package/dist/language/flows/flow-replay.js +21 -19
- package/dist/language/flows/flow-replayable.d.ts +38 -0
- package/dist/language/flows/flow-replayable.js +179 -0
- package/dist/language/flows/flow-start-path.d.ts +108 -0
- package/dist/language/flows/flow-start-path.js +313 -0
- package/dist/language/flows/flow-step-runners.d.ts +23 -2
- package/dist/language/flows/flow-step-runners.js +191 -32
- package/dist/language/flows/flow-store-for-session.d.ts +8 -1
- package/dist/language/flows/flow-store-for-session.js +6 -0
- package/dist/language/flows/flow-tools.d.ts +2 -23
- package/dist/language/flows/flow-tools.js +63 -113
- package/dist/language/flows/flows.d.ts +4 -6
- package/dist/language/flows/flows.js +90 -15
- package/dist/language/flows/heal-run.d.ts +10 -4
- package/dist/language/flows/heal-run.js +26 -9
- package/dist/language/flows/recording/flake.d.ts +3 -27
- package/dist/language/flows/recording/flake.js +1 -1
- package/dist/language/flows/recording/recording-backtrack.js +1 -4
- package/dist/language/flows/recording/tape/recordings.d.ts +11 -1
- package/dist/language/flows/recording/tape/recordings.js +9 -3
- package/dist/language/flows/replay.d.ts +25 -5
- package/dist/language/flows/replay.js +83 -16
- package/dist/language/flows/stores/assertion-tiers-store.js +1 -1
- package/dist/language/flows/suite/coverage.d.ts +9 -0
- package/dist/language/flows/suite/coverage.js +12 -1
- package/dist/language/flows/suite-selection.d.ts +25 -0
- package/dist/language/flows/suite-selection.js +41 -9
- package/dist/machine/git-tracks.d.ts +6 -0
- package/dist/machine/git-tracks.js +36 -0
- package/dist/memory/cloud/background-sync.d.ts +25 -0
- package/dist/memory/cloud/background-sync.js +79 -0
- package/dist/memory/cloud/cloud-config.d.ts +12 -1
- package/dist/memory/cloud/cloud-config.js +39 -13
- package/dist/memory/cloud/cloud-sync.d.ts +3 -24
- package/dist/memory/cloud/cloud-sync.js +5 -2
- package/dist/memory/cloud/harness-config.d.ts +0 -7
- package/dist/memory/cloud/memory-scope.d.ts +19 -0
- package/dist/memory/cloud/memory-scope.js +48 -0
- package/dist/memory/cloud/sync-answer.d.ts +43 -0
- package/dist/memory/cloud/sync-answer.js +42 -0
- package/dist/memory/cloud/sync-cycle.d.ts +40 -10
- package/dist/memory/cloud/sync-cycle.js +97 -144
- package/dist/memory/cloud/sync-daemon.d.ts +50 -3
- package/dist/memory/cloud/sync-daemon.js +473 -83
- package/dist/memory/cloud/sync-describe.d.ts +28 -0
- package/dist/memory/cloud/sync-describe.js +92 -0
- package/dist/memory/cloud/sync-disk.d.ts +9 -1
- package/dist/memory/cloud/sync-disk.js +137 -33
- package/dist/memory/cloud/sync-flow-versions.d.ts +26 -0
- package/dist/memory/cloud/sync-flow-versions.js +42 -0
- package/dist/memory/impact/impact-store.js +32 -15
- package/dist/memory/intent/intent-shard.d.ts +41 -266
- package/dist/memory/intent/intent-tools.js +20 -61
- package/dist/memory/intent/record-request.d.ts +27 -0
- package/dist/memory/intent/record-request.js +88 -0
- package/dist/memory/intent/settled-words.js +9 -1
- package/dist/memory/journal/drive-flow.d.ts +3 -0
- package/dist/memory/journal/drive-flow.js +11 -41
- package/dist/memory/journal/envelope-store.js +1 -1
- package/dist/memory/journal/envelope.d.ts +6 -154
- package/dist/memory/journal/episode-log.d.ts +107 -0
- package/dist/memory/journal/episode-log.js +302 -0
- package/dist/memory/journal/journal-recorder.d.ts +7 -0
- package/dist/memory/journal/journal-recorder.js +22 -9
- package/dist/memory/journal/on-disk/ambient-file.d.ts +1 -7
- package/dist/memory/journal/on-disk/ambient-file.js +1 -1
- package/dist/memory/journal/on-disk/workspace-gitignore.d.ts +24 -3
- package/dist/memory/journal/on-disk/workspace-gitignore.js +38 -7
- package/dist/memory/journal/on-disk/workspace-tiers.js +7 -0
- package/dist/memory/journal/self-observation.js +3 -1
- package/dist/memory/journal/session-end.js +23 -9
- package/dist/memory/journal/session-journal.js +39 -20
- package/dist/memory/project/artifact-root-resolver.d.ts +14 -1
- package/dist/memory/project/artifact-root-resolver.js +68 -23
- package/dist/memory/project/artifact-root.d.ts +17 -3
- package/dist/memory/project/artifact-root.js +47 -9
- package/dist/memory/project/fs/fs-port.d.ts +5 -0
- package/dist/memory/project/fs/fs-port.js +13 -0
- package/dist/memory/project/learned-routes.d.ts +3 -4
- package/dist/memory/project/learned-routes.js +3 -11
- package/dist/memory/project/link-directory.js +5 -2
- package/dist/memory/project/root-claims.d.ts +3 -1
- package/dist/memory/project/root-claims.js +41 -7
- package/dist/memory/project/session-root.d.ts +1 -1
- package/dist/memory/project/session-root.js +1 -15
- package/dist/memory/project/sync-status.js +5 -6
- package/dist/memory/recall/memory-tools.js +2 -2
- package/dist/memory/recall/platform-memory.d.ts +3 -1
- package/dist/memory/recall/platform-memory.js +9 -1
- package/dist/memory/recall/project-memory.js +15 -19
- package/dist/portal/bridge/auth-failure-reason.d.ts +13 -0
- package/dist/portal/bridge/auth-failure-reason.js +19 -0
- package/dist/portal/bridge/bridge.d.ts +19 -4
- package/dist/portal/bridge/bridge.js +150 -177
- package/dist/portal/bridge/harness-request.d.ts +15 -0
- package/dist/portal/bridge/harness-request.js +19 -0
- package/dist/portal/bridge/origin/origin-follow.d.ts +46 -0
- package/dist/portal/bridge/origin/origin-follow.js +110 -0
- package/dist/portal/bridge/pairing-token.d.ts +6 -0
- package/dist/portal/bridge/pairing-token.js +47 -16
- package/dist/portal/bridge/protocol-skew.d.ts +27 -2
- package/dist/portal/bridge/protocol-skew.js +66 -2
- package/dist/portal/bridge/session-nonces.d.ts +46 -0
- package/dist/portal/bridge/session-nonces.js +72 -0
- package/dist/portal/input/viewport-tools.d.ts +31 -0
- package/dist/portal/input/viewport-tools.js +106 -15
- package/dist/portal/pool/bounded-close.d.ts +23 -0
- package/dist/portal/pool/bounded-close.js +38 -0
- package/dist/portal/pool/browser-pool.d.ts +44 -39
- package/dist/portal/pool/browser-pool.js +247 -95
- package/dist/portal/pool/context-permissions.d.ts +9 -1
- package/dist/portal/pool/context-permissions.js +26 -0
- package/dist/portal/pool/lease-emulation.d.ts +37 -0
- package/dist/portal/pool/lease-emulation.js +29 -0
- package/dist/portal/pool/playwright-launcher.d.ts +6 -0
- package/dist/portal/pool/playwright-launcher.js +74 -7
- package/dist/portal/pool/pool-contract.d.ts +23 -1
- package/dist/portal/pool/pool-lease.d.ts +128 -0
- package/dist/portal/pool/pool-lease.js +49 -0
- package/dist/portal/pool/zero-install.d.ts +8 -1
- package/dist/portal/pool/zero-install.js +24 -2
- package/dist/portal/production/production-activation.d.ts +136 -0
- package/dist/portal/production/production-activation.js +173 -0
- package/dist/portal/production/production-drive.d.ts +52 -0
- package/dist/portal/production/production-drive.js +301 -0
- package/dist/portal/production/production-hello.d.ts +23 -0
- package/dist/portal/production/production-hello.js +23 -0
- package/dist/portal/realm/web-realm.js +42 -15
- package/dist/portal/session/control-envelope.d.ts +1 -1
- package/dist/portal/session/dev-server/served-document.d.ts +0 -5
- package/dist/portal/session/dev-server/served-document.js +6 -8
- package/dist/portal/session/facts/handshake-facts.d.ts +8 -1
- package/dist/portal/session/first-run-wiring.d.ts +3 -36
- package/dist/portal/session/first-run-wiring.js +10 -103
- package/dist/portal/session/live-control-tools.js +61 -19
- package/dist/portal/session/no-session-next-action.d.ts +11 -0
- package/dist/portal/session/no-session-next-action.js +40 -15
- package/dist/portal/session/no-session-watch.d.ts +7 -0
- package/dist/portal/session/no-session-watch.js +67 -23
- package/dist/portal/session/output-budget.d.ts +10 -0
- package/dist/portal/session/output-budget.js +16 -0
- package/dist/portal/session/presence/session-lease.d.ts +2 -0
- package/dist/portal/session/presence/session-lease.js +8 -0
- package/dist/portal/session/recorded-gaps.d.ts +15 -11
- package/dist/portal/session/recorded-gaps.js +39 -18
- package/dist/portal/session/serving-directory.d.ts +24 -2
- package/dist/portal/session/serving-directory.js +93 -5
- package/dist/portal/session/session-info.d.ts +26 -0
- package/dist/portal/session/session-info.js +20 -0
- package/dist/portal/session/session-manager.d.ts +35 -3
- package/dist/portal/session/session-manager.js +69 -14
- package/dist/portal/session/session-successor.js +1 -9
- package/dist/portal/session/session-tools.js +22 -4
- package/dist/portal/session/session.d.ts +10 -10
- package/dist/portal/session/session.js +37 -29
- package/dist/portal/session/zero-install-first-call.d.ts +7 -2
- package/dist/portal/session/zero-install-first-call.js +43 -20
- package/dist/start-wiring.d.ts +2 -2
- package/dist/start-wiring.js +17 -3
- package/dist/status-payload.d.ts +11 -1
- package/dist/status-payload.js +7 -1
- package/dist/surface/agent-presence-grace.d.ts +11 -0
- package/dist/surface/agent-presence-grace.js +34 -0
- package/dist/surface/http-server.d.ts +12 -1
- package/dist/surface/http-server.js +64 -15
- package/dist/surface/mcp/faults/mcp-outage.d.ts +12 -2
- package/dist/surface/mcp/faults/mcp-outage.js +19 -1
- package/dist/surface/mcp/mcp-proxy.d.ts +17 -74
- package/dist/surface/mcp/mcp-proxy.js +194 -267
- package/dist/surface/mcp/mcp.d.ts +20 -3
- package/dist/surface/mcp/mcp.js +88 -25
- package/dist/surface/mcp/proxy/drive-calls.d.ts +44 -0
- package/dist/surface/mcp/proxy/drive-calls.js +114 -5
- package/dist/surface/mcp/proxy/proxy-boot.d.ts +11 -0
- package/dist/surface/mcp/proxy/proxy-boot.js +1 -0
- package/dist/surface/mcp/proxy/proxy-daemon-probe.d.ts +6 -0
- package/dist/surface/mcp/proxy/proxy-daemon-probe.js +14 -1
- package/dist/surface/mcp/proxy/proxy-handshake.d.ts +34 -2
- package/dist/surface/mcp/proxy/proxy-handshake.js +76 -8
- package/dist/surface/mcp/server-instructions.js +35 -16
- package/dist/surface/mcp/shared-params.d.ts +8 -0
- package/dist/surface/mcp/shared-params.js +15 -1
- package/dist/surface/mcp/sse-frame-parser.d.ts +11 -0
- package/dist/surface/mcp/sse-frame-parser.js +18 -0
- package/dist/surface/mcp/surface-vocabulary.d.ts +2 -0
- package/dist/surface/mcp/surface-vocabulary.js +13 -0
- package/dist/surface/mcp/tool-catalog-cache.d.ts +2 -0
- package/dist/surface/mcp/tool-catalog-cache.js +14 -4
- package/dist/surface/tools/account-tool.d.ts +4 -3
- package/dist/surface/tools/account-tool.js +20 -31
- package/dist/surface/tools/act/act-danger.d.ts +2 -0
- package/dist/surface/tools/act/act-danger.js +41 -14
- package/dist/surface/tools/act/act-observation.d.ts +11 -0
- package/dist/surface/tools/act/act-observation.js +33 -0
- package/dist/surface/tools/act/act-preflight.js +10 -3
- package/dist/surface/tools/act/act-sequence-retry.js +2 -1
- package/dist/surface/tools/act/act-target.js +19 -5
- package/dist/surface/tools/act/durable.js +1 -1
- package/dist/surface/tools/act/navigation/navigate-arrival.d.ts +9 -7
- package/dist/surface/tools/act/navigation/navigate-arrival.js +11 -14
- package/dist/surface/tools/act/unsettled-find.d.ts +36 -0
- package/dist/surface/tools/act/unsettled-find.js +71 -0
- package/dist/surface/tools/act-sequence-tool.js +53 -24
- package/dist/surface/tools/act-tools.d.ts +2 -3
- package/dist/surface/tools/act-tools.js +49 -47
- package/dist/surface/tools/agent/compact-envelope.d.ts +2 -2
- package/dist/surface/tools/agent/for-the-agent.js +41 -3
- package/dist/surface/tools/assert/assert-grade.js +8 -3
- package/dist/surface/tools/assert/assert-verdict.js +4 -2
- package/dist/surface/tools/browser-tools.js +7 -4
- package/dist/surface/tools/chat-drives.js +50 -25
- package/dist/surface/tools/coverage-tools.js +1 -1
- package/dist/surface/tools/dynamic-tools.d.ts +8 -0
- package/dist/surface/tools/dynamic-tools.js +89 -34
- package/dist/surface/tools/empty-session-list.d.ts +18 -25
- package/dist/surface/tools/empty-session-list.js +67 -38
- package/dist/surface/tools/error-recovery.d.ts +17 -7
- package/dist/surface/tools/error-recovery.js +53 -20
- package/dist/surface/tools/explore-tools.d.ts +10 -0
- package/dist/surface/tools/explore-tools.js +72 -19
- package/dist/surface/tools/feedback-tools.js +23 -2
- package/dist/surface/tools/gap-novelty.d.ts +6 -0
- package/dist/surface/tools/gap-novelty.js +9 -0
- package/dist/surface/tools/gaps/capability-absences.js +4 -3
- package/dist/surface/tools/harness-explore.d.ts +1 -1
- package/dist/surface/tools/harness-explore.js +6 -4
- package/dist/surface/tools/harness-gate.d.ts +43 -21
- package/dist/surface/tools/harness-gate.js +55 -81
- package/dist/surface/tools/harness-script.d.ts +2 -0
- package/dist/surface/tools/harness-script.js +11 -6
- package/dist/surface/tools/harness-toolset.js +3 -4
- package/dist/surface/tools/invoke-tool.d.ts +0 -8
- package/dist/surface/tools/invoke-tool.js +164 -178
- package/dist/surface/tools/lease-hint.d.ts +9 -0
- package/dist/surface/tools/lease-hint.js +22 -3
- package/dist/surface/tools/lease-permissions.d.ts +1 -1
- package/dist/surface/tools/lease-readiness.d.ts +55 -0
- package/dist/surface/tools/lease-readiness.js +150 -2
- package/dist/surface/tools/lease-tools.d.ts +3 -75
- package/dist/surface/tools/lease-tools.js +124 -188
- package/dist/surface/tools/map-tools.d.ts +20 -0
- package/dist/surface/tools/map-tools.js +145 -0
- package/dist/surface/tools/merge-tools.js +11 -7
- package/dist/surface/tools/next-step.js +6 -3
- package/dist/surface/tools/observe-tools.js +46 -35
- package/dist/surface/tools/platform-moment.d.ts +3 -12
- package/dist/surface/tools/platform-moment.js +12 -24
- package/dist/surface/tools/read/complete-snapshot.d.ts +7 -1
- package/dist/surface/tools/read/complete-snapshot.js +13 -2
- package/dist/surface/tools/read/query-paginate.js +6 -0
- package/dist/surface/tools/read/query-shape.d.ts +9 -0
- package/dist/surface/tools/read/query-shape.js +15 -0
- package/dist/surface/tools/read/snapshot-unmounted-note.d.ts +1 -0
- package/dist/surface/tools/read/snapshot-unmounted-note.js +73 -0
- package/dist/surface/tools/read-tools.js +5 -5
- package/dist/surface/tools/real-input-attempt.d.ts +11 -0
- package/dist/surface/tools/real-input-attempt.js +206 -38
- package/dist/surface/tools/reconcile-tools.js +21 -8
- package/dist/surface/tools/reticle-result.d.ts +3 -0
- package/dist/surface/tools/reticle-result.js +8 -1
- package/dist/surface/tools/run-report.d.ts +22 -0
- package/dist/surface/tools/run-report.js +141 -0
- package/dist/surface/tools/session-ports.d.ts +57 -0
- package/dist/surface/tools/session-ports.js +102 -0
- package/dist/surface/tools/tool-kit.d.ts +58 -4
- package/dist/surface/tools/tool-kit.js +140 -6
- package/dist/surface/tools/tool-surface.d.ts +2 -0
- package/dist/surface/tools/tool-surface.js +45 -0
- package/dist/surface/tools/tools.js +49 -87
- package/dist/telemetry/automation-hint.d.ts +5 -0
- package/dist/telemetry/automation-hint.js +7 -0
- package/dist/telemetry/cli-telemetry.d.ts +22 -0
- package/dist/telemetry/cli-telemetry.js +80 -11
- package/dist/telemetry/daemon-telemetry.d.ts +3 -1
- package/dist/telemetry/daemon-telemetry.js +9 -2
- package/dist/telemetry/feedback-cli.d.ts +1 -1
- package/dist/telemetry/feedback-cli.js +8 -3
- package/dist/telemetry/feedback.d.ts +1 -1
- package/dist/telemetry/feedback.js +51 -4
- package/dist/telemetry/harness-run.d.ts +3 -3
- package/dist/telemetry/harness-run.js +18 -7
- package/dist/telemetry/hud-events.d.ts +1 -1
- package/dist/telemetry/hud-metrics.d.ts +6 -3
- package/dist/telemetry/hud-metrics.js +20 -8
- package/dist/telemetry/install-source.js +1 -1
- package/dist/telemetry/mcp-connection.d.ts +1 -1
- package/dist/telemetry/mcp-connection.js +21 -2
- package/dist/telemetry/onboarding-firsts.d.ts +6 -1
- package/dist/telemetry/onboarding-firsts.js +41 -1
- package/dist/telemetry/proxy-telemetry.d.ts +42 -0
- package/dist/telemetry/proxy-telemetry.js +70 -1
- package/dist/telemetry/session-metrics.d.ts +1 -3
- package/dist/telemetry/session-metrics.js +16 -12
- package/dist/telemetry/telemetry.d.ts +9 -1
- package/dist/telemetry/telemetry.js +16 -1
- package/dist/telemetry/verification-of.d.ts +3 -1
- package/dist/telemetry/verification-of.js +7 -1
- package/dist/wire-journal.js +12 -2
- package/docs/README.md +4 -2
- package/docs/actions.mdx +7 -6
- package/docs/adapters.md +2 -1
- package/docs/agent-cheatsheet.md +19 -5
- package/docs/architecture.md +13 -10
- package/docs/autodrive.md +6 -5
- package/docs/benchmarks.md +2 -2
- package/docs/capabilities.mdx +1 -1
- package/docs/cli/affected.mdx +1 -1
- package/docs/cli/cloud.mdx +6 -6
- package/docs/cli/doctor.mdx +3 -1
- package/docs/cli/feedback.mdx +11 -7
- package/docs/cli/gate.mdx +1 -1
- package/docs/cli/help.mdx +1 -1
- package/docs/cli/init.mdx +20 -16
- package/docs/cli/mcp.mdx +5 -2
- package/docs/cli/open.mdx +5 -2
- package/docs/cli/report.mdx +1 -1
- package/docs/cli/restart.mdx +1 -1
- package/docs/cli/rollback.mdx +4 -4
- package/docs/cli/serve.mdx +7 -5
- package/docs/cli/setup.mdx +1 -1
- package/docs/cli/status.mdx +6 -2
- package/docs/cli/stop.mdx +3 -3
- package/docs/cli/telemetry.mdx +5 -1
- package/docs/cli/try.mdx +8 -8
- package/docs/cli/update.mdx +8 -5
- package/docs/cli/verify.mdx +12 -5
- package/docs/cli/version.mdx +1 -1
- package/docs/cli.mdx +10 -6
- package/docs/debugging.md +1 -1
- package/docs/deploy-checks.md +8 -6
- package/docs/desktop.mdx +14 -18
- package/docs/enterprise.md +6 -6
- package/docs/environment.mdx +5 -3
- package/docs/faq.mdx +9 -6
- package/docs/first-drive.md +19 -9
- package/docs/flows.md +3 -4
- package/docs/for-agents.md +1 -1
- package/docs/frameworks.mdx +34 -11
- package/docs/getting-started.md +46 -29
- package/docs/http-transport.md +2 -2
- package/docs/human-control.md +8 -8
- package/docs/index.mdx +2 -2
- package/docs/install-agentic.mdx +18 -19
- package/docs/install-manual.mdx +8 -4
- package/docs/integration-patterns.md +5 -5
- package/docs/multi-agent-testing.md +7 -5
- package/docs/packages/browser.mdx +34 -2
- package/docs/packages/core.mdx +2 -1
- package/docs/packages/electron.mdx +15 -3
- package/docs/packages/eslint-plugin.mdx +1 -1
- package/docs/packages/next.mdx +17 -5
- package/docs/packages/react.mdx +8 -1
- package/docs/packages/server.mdx +3 -3
- package/docs/packages/tauri.mdx +3 -3
- package/docs/packages/vite-plugin.mdx +1 -1
- package/docs/packages.mdx +19 -6
- package/docs/platform-integration.md +12 -4
- package/docs/predicates.mdx +18 -7
- package/docs/production-mode.md +108 -0
- package/docs/prompt-capture.md +99 -0
- package/docs/quickstart.mdx +14 -12
- package/docs/recipes.mdx +9 -8
- package/docs/required-checks.md +3 -2
- package/docs/skill-file.mdx +4 -3
- package/docs/skill-setup.md +2 -2
- package/docs/skill.md +62 -70
- package/docs/state-files.md +1 -0
- package/docs/state-management.mdx +11 -9
- package/docs/system-map.md +14 -13
- package/docs/telemetry.md +32 -24
- package/docs/testing.md +9 -5
- package/docs/tools/act-and-wait.mdx +17 -13
- package/docs/tools/act-sequence.mdx +40 -66
- package/docs/tools/act.mdx +7 -5
- package/docs/tools/assert.mdx +1 -1
- package/docs/tools/look.mdx +1 -1
- package/docs/tools/navigate.mdx +1 -1
- package/docs/tools/network.mdx +13 -11
- package/docs/tools/overview.mdx +3 -3
- package/docs/tools/query.mdx +3 -3
- package/docs/tools/session-and-feedback.mdx +9 -6
- package/docs/tools/sessions.mdx +7 -0
- package/docs/tools/snapshot.mdx +9 -7
- package/docs/tools/tools-and-run.mdx +11 -10
- package/docs/tools/verify.mdx +1 -1
- package/docs/troubleshooting.mdx +21 -9
- package/docs/usage.md +58 -43
- package/docs/use-cases.mdx +2 -2
- package/docs/vs-chrome-devtools-mcp.mdx +5 -5
- package/docs/vs-playwright-mcp.mdx +5 -4
- package/docs/what-is-recorded.md +12 -7
- package/docs/what-is-reticle.mdx +2 -2
- package/docs/why-reticle.mdx +1 -1
- package/package.json +9 -12
- package/dist/command/dev/stale-issue-guard.d.ts +0 -34
- package/dist/command/dev/stale-issue-guard.js +0 -69
|
@@ -12,7 +12,7 @@ import { declaredExpectations, declaresBodyIndependentChannel, } from '@reticleh
|
|
|
12
12
|
import { absenceBlindSpotNote, blindSpotsFromState, buildCoverageStatement, restsOnCompleteWindow, Coverage, impeachesCapture, transportGapNote, } from '@reticlehq/engine/evidence/blind-spots.js';
|
|
13
13
|
import { buildHonestyBlock } from '@reticlehq/engine/evidence/honesty.js';
|
|
14
14
|
import { acceptedWriteLabels, hasAcceptedWrite, } from '@reticlehq/engine/evidence/accepted-write.js';
|
|
15
|
-
import { unreadWriteLabels } from '@reticlehq/engine/evidence/unread-outcome.js';
|
|
15
|
+
import { unreadWriteLabels, unreadWriteReason } from '@reticlehq/engine/evidence/unread-outcome.js';
|
|
16
16
|
import { decideVerified } from '@reticlehq/engine/evidence/verified.js';
|
|
17
17
|
import { describeWaitTarget, namedNetIsInFlight } from '@reticlehq/engine/evidence/unsettled.js';
|
|
18
18
|
import { inFlightRequestLabels, repeatedRequestLabels, } from '../act/settle-in-flight.js';
|
|
@@ -204,7 +204,9 @@ changeUndeclared) {
|
|
|
204
204
|
}),
|
|
205
205
|
contradictions,
|
|
206
206
|
...(0 === outcomePending.length ? {} : { outcomePending }),
|
|
207
|
-
...(outcomeUnread.length > 0
|
|
207
|
+
...(outcomeUnread.length > 0
|
|
208
|
+
? { outcomeUnread, outcomeUnreadReason: unreadWriteReason(windowEvents) }
|
|
209
|
+
: {}),
|
|
208
210
|
// Same detail the act path supplies: this route reaches UNSETTLED through an absence-derived
|
|
209
211
|
// contradiction, and "the window closed before the app finished" is no more actionable here.
|
|
210
212
|
unsettled: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { carryReticleIdentity } from './lease-tools.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { navigateResult } from './act/navigation/navigate-result.js';
|
|
4
|
-
import { absoluteTarget, awaitArrival,
|
|
4
|
+
import { absoluteTarget, awaitArrival, idsOpenAtDispatch, ARRIVAL_TIMEOUT_MS, } from './act/navigation/navigate-arrival.js';
|
|
5
5
|
import { reloadResult } from './act/navigation/reload-result.js';
|
|
6
6
|
import { waitForReconnect, RELOAD_RECONNECT_TIMEOUT_MS, } from '../../portal/session/session-reconnect.js';
|
|
7
7
|
import { ReticleCommand } from '@reticlehq/core';
|
|
@@ -9,6 +9,7 @@ import { ReticleTool } from '@reticlehq/core';
|
|
|
9
9
|
import { asNumber, asString } from '@reticlehq/core';
|
|
10
10
|
import { sessionIdShape, commandOrThrow } from './tool-kit.js';
|
|
11
11
|
import { timeoutMsSchema } from './args/numeric-bounds.js';
|
|
12
|
+
import { assertNotPaymentNavigation } from './act/act-danger.js';
|
|
12
13
|
/** Said when a lease's page now has no Reticle SDK: only the browser can still act on it. */
|
|
13
14
|
const MSG_LEASE_WITHOUT_SDK = 'This page has no Reticle SDK, so only browser-level actions apply here (navigate, screenshot). ' +
|
|
14
15
|
'The lease is kept: navigate back to the app and it reattaches.';
|
|
@@ -111,6 +112,7 @@ export const BROWSER_TOOLS = [
|
|
|
111
112
|
const requested = asString(args['url']);
|
|
112
113
|
if (requested === undefined || 0 === requested.length)
|
|
113
114
|
return { ok: false, reason: 'url required' };
|
|
115
|
+
assertNotPaymentNavigation(requested);
|
|
114
116
|
const named = asString(args['sessionId']);
|
|
115
117
|
// A lease whose page has no SDK right now (it was navigated to an image, a PDF, another site):
|
|
116
118
|
// the page is still the lease's, so it is navigated through the browser and reattaches when it
|
|
@@ -128,10 +130,11 @@ export const BROWSER_TOOLS = [
|
|
|
128
130
|
// lease — see carryReticleIdentity. A tab that claims no identity is untouched.
|
|
129
131
|
const url = carryReticleIdentity(session.url, requested);
|
|
130
132
|
// Sampled BEFORE dispatch, because that is the only moment it can be known. A session already
|
|
131
|
-
//
|
|
132
|
-
//
|
|
133
|
+
// connected is not evidence that THIS navigation arrived: one on the target was there before,
|
|
134
|
+
// and another tab (a lease) can reach the target during the wait. The arrival scan, which
|
|
135
|
+
// reads whatever is at the target afterwards, cannot tell them apart on its own.
|
|
133
136
|
const target = absoluteTarget(url, session.url);
|
|
134
|
-
const priorIds =
|
|
137
|
+
const priorIds = idsOpenAtDispatch(deps.sessions);
|
|
135
138
|
// The document the tab is on NOW. Sampled before dispatch because the replacement can
|
|
136
139
|
// connect while the NAVIGATE reply is still pending, and reading it after the await would
|
|
137
140
|
// record the replacement as the starting document (#1320).
|
|
@@ -21,13 +21,13 @@ import { REMOTE_DRIVE_JPEG_QUALITY, endDrivenTab, pickOwnDriveSession, startRemo
|
|
|
21
21
|
import { appKeyOf, appsByPlatform, homeRelative, machineOf, mayOpen, NOT_AN_APP_ADDRESS, nameFromProjectId, pickAppTab, startAppReports, withoutMarks, } from '../../features/harness/platform/local-apps.js';
|
|
22
22
|
import { serverOptionsFromEnv } from '../../features/harness/platform/server-driver.js';
|
|
23
23
|
import { EXPLORE_TOOLS, driveForChat } from './explore-tools.js';
|
|
24
|
-
import {
|
|
24
|
+
import { harnessStartRefusal, withLinkedCredential } from './harness-explore.js';
|
|
25
25
|
import { runTool } from './invoke-tool.js';
|
|
26
26
|
import { announcedChannels, probeMarkers, notApplicableOf, recordedGaps, } from '../../portal/session/recorded-gaps.js';
|
|
27
27
|
import { probeDevServers } from '../../portal/session/dev-server/dev-server-probe.js';
|
|
28
|
-
import { DriveOrigin, onDriveChange, onDriveStep, runningDrive, stopDrive, } from '../../features/harness/drive-runs.js';
|
|
28
|
+
import { DriveOrigin, noteHarnessWord, onDriveChange, onDriveStep, runningDrive, stopDrive, } from '../../features/harness/drive-runs.js';
|
|
29
29
|
import { FreeDriveKind, planUrl, requestFreeDrive, } from '../../features/harness/platform/platform-drives.js';
|
|
30
|
-
import { HumanControlKind } from '@reticlehq/core';
|
|
30
|
+
import { CONNECT_COMMAND, HARNESS_NOT_LINKED_HUMAN, HumanControlKind, } from '@reticlehq/core';
|
|
31
31
|
import { onAgentsChange } from '../../hooks/coding-agents.js';
|
|
32
32
|
/** Why a platform drive with no tab of its own runs no tool. */
|
|
33
33
|
const NO_DRIVEN_TAB = 'No tab was picked for this drive, so no tool runs.';
|
|
@@ -293,7 +293,7 @@ const MSG_LINKED = 'Linked. This project now reports to your dashboard.';
|
|
|
293
293
|
const MSG_LINK_FAILED = 'Could not link this project. Run `reticle connect` in its folder.';
|
|
294
294
|
/** A page with no projectId: linking it would bind a hash-named project nothing here reads. */
|
|
295
295
|
const MSG_LINK_NEEDS_PROJECT = 'This page did not say which project it is, so there is nothing to link yet. Run `npx @reticlehq/server init` in your app (or pass `projectId` to `connect()`), then Link.';
|
|
296
|
-
const MSG_LINK_UNAVAILABLE =
|
|
296
|
+
const MSG_LINK_UNAVAILABLE = `This Reticle cannot link from the panel. Run \`${CONNECT_COMMAND}\` in the project folder.`;
|
|
297
297
|
/** Said on the HUD when Stop finds nothing to stop. */
|
|
298
298
|
const MSG_NOTHING_DRIVING = 'No Harness drive is running in this tab.';
|
|
299
299
|
const msgStartTrial = (url) => `Start your trial: ${url}`;
|
|
@@ -312,21 +312,41 @@ applySwitch, grant = (platform) => requestFreeDrive(platform, FreeDriveKind.EXPL
|
|
|
312
312
|
if (HumanControlKind.HARNESS === request.kind)
|
|
313
313
|
return applySwitch(request.enabled);
|
|
314
314
|
// What the panel's Run and Stop answer belongs in the Harness log, and in the Agent Log as a summary.
|
|
315
|
-
const
|
|
315
|
+
const said = [];
|
|
316
|
+
const say = (text) => {
|
|
317
|
+
said.push(text);
|
|
318
|
+
deps.sessions.get?.(sessionId)?.pushNarration(text, true, { harness: true, summary: true });
|
|
319
|
+
};
|
|
316
320
|
if (HumanControlKind.HARNESS_STOP === request.kind) {
|
|
317
321
|
const running = runningDrive(sessionId);
|
|
318
322
|
if (running === undefined || !stopDrive(running.harnessRun))
|
|
319
323
|
say(MSG_NOTHING_DRIVING);
|
|
320
324
|
return;
|
|
321
325
|
}
|
|
322
|
-
//
|
|
326
|
+
// Whatever stops a run before it drives is said on the Run row too, not only in the log: with the
|
|
327
|
+
// cloud unreachable, Run went to Starting… and back with no word on the page.
|
|
328
|
+
try {
|
|
329
|
+
await startHudRun(deps, sessionId, request, say, grant);
|
|
330
|
+
}
|
|
331
|
+
catch (error) {
|
|
332
|
+
say(error instanceof Error ? error.message : String(error));
|
|
333
|
+
}
|
|
334
|
+
finally {
|
|
335
|
+
if (0 < said.length)
|
|
336
|
+
noteHarnessWord(sessionId, said.join(' '));
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
/** Run Harness: the build check, the platform's grant, then the drive, saying why at each refusal. */
|
|
340
|
+
async function startHudRun(deps, sessionId, request, say, grant) {
|
|
341
|
+
// Before the grant: a drive refused for version skew must not take one.
|
|
323
342
|
const env = await withLinkedCredential(deps, process.env, { sessionId });
|
|
324
|
-
const locked = await
|
|
343
|
+
const locked = await harnessStartRefusal(deps, sessionId);
|
|
325
344
|
if (locked !== undefined)
|
|
326
|
-
return say(locked.split('\n')[0] ?? locked);
|
|
345
|
+
return say(locked.text.split('\n')[0] ?? locked.text);
|
|
327
346
|
const platform = serverOptionsFromEnv(env);
|
|
347
|
+
// The person's sentence: the agent's (`MSG_NO_HARNESS_KEY`) names tools they never call.
|
|
328
348
|
if (platform === undefined)
|
|
329
|
-
return say(
|
|
349
|
+
return say(HARNESS_NOT_LINKED_HUMAN);
|
|
330
350
|
const granted = await grant(platform);
|
|
331
351
|
if (!granted.granted) {
|
|
332
352
|
say(granted.message);
|
|
@@ -338,18 +358,13 @@ applySwitch, grant = (platform) => requestFreeDrive(platform, FreeDriveKind.EXPL
|
|
|
338
358
|
const explore = EXPLORE_TOOLS.find((tool) => ReticleTool.VERIFY_EXPLORE === tool.name);
|
|
339
359
|
if (explore === undefined)
|
|
340
360
|
return;
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
});
|
|
349
|
-
}
|
|
350
|
-
catch (error) {
|
|
351
|
-
say(error instanceof Error ? error.message : String(error));
|
|
352
|
-
}
|
|
361
|
+
await runTool(explore, deps, {
|
|
362
|
+
sessionId,
|
|
363
|
+
driveId: granted.driveId,
|
|
364
|
+
origin: DriveOrigin.HUD,
|
|
365
|
+
wait: 0,
|
|
366
|
+
...(request.persona === undefined ? {} : { persona: request.persona }),
|
|
367
|
+
});
|
|
353
368
|
}
|
|
354
369
|
/**
|
|
355
370
|
* The link a panel sign-in makes once it lands: the tab's project, never a page that did not say
|
|
@@ -370,18 +385,28 @@ link) {
|
|
|
370
385
|
bridge.attachHarnessRequest((request, s) => {
|
|
371
386
|
const root = s.artifactRoot ?? daemon.root;
|
|
372
387
|
if (HumanControlKind.HARNESS_LINK === request.kind) {
|
|
373
|
-
|
|
388
|
+
// On the Harness page, where Link was pressed, and in the Agent Log. Said only in the log, a
|
|
389
|
+
// refusal left the page saying "Linking…" and nothing else.
|
|
390
|
+
const say = (text) => daemon
|
|
391
|
+
.deps()
|
|
392
|
+
.sessions.get?.(s.id)
|
|
393
|
+
?.pushNarration(text, true, { harness: true, summary: true });
|
|
394
|
+
const refuse = (text) => {
|
|
395
|
+
say(text);
|
|
396
|
+
daemon.repaint();
|
|
397
|
+
};
|
|
374
398
|
if (link === undefined)
|
|
375
|
-
return
|
|
399
|
+
return refuse(MSG_LINK_UNAVAILABLE);
|
|
376
400
|
if (isUnmatchedRoot(root))
|
|
377
|
-
return
|
|
401
|
+
return refuse(MSG_LINK_NEEDS_PROJECT);
|
|
378
402
|
void link(root)
|
|
379
403
|
.then((code) => say(0 === code ? MSG_LINKED : MSG_LINK_FAILED))
|
|
380
404
|
.catch(() => say(MSG_LINK_FAILED))
|
|
381
405
|
.finally(daemon.repaint);
|
|
382
406
|
return;
|
|
383
407
|
}
|
|
384
|
-
|
|
408
|
+
// Repainted after, so a refusal said on the Run row shows without waiting for another push.
|
|
409
|
+
void hudDrive(daemon.deps(), s.id, request, (on) => applySwitch(root, on)).finally(daemon.repaint);
|
|
385
410
|
});
|
|
386
411
|
onDriveChange(daemon.repaint);
|
|
387
412
|
// Each step too, so the panel's "N steps so far" counts up instead of sitting at zero.
|
|
@@ -69,7 +69,7 @@ export function buildCoverageTools() {
|
|
|
69
69
|
outputSchema: {
|
|
70
70
|
// The app-wide ledger — see features/exhaust/ledger.ts. Loose: run-only, and the levels
|
|
71
71
|
// carry their own shape.
|
|
72
|
-
app: z.record(z.unknown()).optional(),
|
|
72
|
+
app: z.record(z.string(), z.unknown()).optional(),
|
|
73
73
|
total: z.number(),
|
|
74
74
|
exercised: z.number(),
|
|
75
75
|
untouched: z.array(z.object({ ref: z.string(), label: z.string() })),
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
1
2
|
import type { ToolDef } from './tool-kit.js';
|
|
2
3
|
import { type ToolSurfaceOrigin } from './tool-surface.js';
|
|
4
|
+
/**
|
|
5
|
+
* A parameter's description, wherever in its wrappers it was written.
|
|
6
|
+
*
|
|
7
|
+
* zod 4 keeps a description on the schema `.describe()` was called on. `z.string().describe(d)
|
|
8
|
+
* .optional()` has none on the outside, although the JSON Schema an agent reads still carries `d`.
|
|
9
|
+
*/
|
|
10
|
+
export declare function descriptionOf(schema: z.ZodTypeAny): string | undefined;
|
|
3
11
|
/**
|
|
4
12
|
* Build the two dynamic meta-tools over the full tool table. `reticle_run` dispatches through the same
|
|
5
13
|
* `runTool` chokepoint as a direct call, so session-health splicing and every other invariant hold.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { runTool } from './invoke-tool.js';
|
|
3
|
-
import { buildErrorPayload } from './error-recovery.js';
|
|
3
|
+
import { buildErrorPayload, codedRefusalOf } from './error-recovery.js';
|
|
4
4
|
import { mergedNameRedirect, mergedNameMessage, retiredToolNames } from './merged-name-redirect.js';
|
|
5
5
|
import { CATALOGUE_SUMMARY_LENGTH, firstSentence } from './first-sentence.js';
|
|
6
6
|
import { takeVersionSkewOnto } from '../../command/version/version-nudge.js';
|
|
@@ -8,6 +8,43 @@ import { ReticleTool } from '@reticlehq/core';
|
|
|
8
8
|
import { ADVERTISE_ALL_ENV } from './tool-surface.js';
|
|
9
9
|
import { getSessionMetrics } from '../../telemetry/session-metrics.js';
|
|
10
10
|
import { isPredicateParam, predicateGrammar, } from '@reticlehq/engine/question/predicate/predicate-eval.js';
|
|
11
|
+
/** One wrapper that does not change the value a schema accepts, peeled off; undefined at the core. */
|
|
12
|
+
function unwrapOnce(schema) {
|
|
13
|
+
if (schema instanceof z.ZodOptional || schema instanceof z.ZodNullable) {
|
|
14
|
+
return schema.unwrap();
|
|
15
|
+
}
|
|
16
|
+
if (schema instanceof z.ZodDefault) {
|
|
17
|
+
return schema.removeDefault();
|
|
18
|
+
}
|
|
19
|
+
if (schema instanceof z.ZodPipe) {
|
|
20
|
+
// A transform pipes the schema into the transform; a preprocess pipes the other way round.
|
|
21
|
+
return (schema.in instanceof z.ZodTransform ? schema.out : schema.in);
|
|
22
|
+
}
|
|
23
|
+
return undefined;
|
|
24
|
+
}
|
|
25
|
+
/** The schema without the wrappers that do not change the value it accepts. */
|
|
26
|
+
function unwrappedOf(schema) {
|
|
27
|
+
let inner = schema;
|
|
28
|
+
for (let next = unwrapOnce(inner); next !== undefined; next = unwrapOnce(inner)) {
|
|
29
|
+
inner = next;
|
|
30
|
+
}
|
|
31
|
+
return inner;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* A parameter's description, wherever in its wrappers it was written.
|
|
35
|
+
*
|
|
36
|
+
* zod 4 keeps a description on the schema `.describe()` was called on. `z.string().describe(d)
|
|
37
|
+
* .optional()` has none on the outside, although the JSON Schema an agent reads still carries `d`.
|
|
38
|
+
*/
|
|
39
|
+
export function descriptionOf(schema) {
|
|
40
|
+
for (let current = schema; current !== undefined;) {
|
|
41
|
+
if (current.description !== undefined) {
|
|
42
|
+
return current.description;
|
|
43
|
+
}
|
|
44
|
+
current = unwrapOnce(current);
|
|
45
|
+
}
|
|
46
|
+
return undefined;
|
|
47
|
+
}
|
|
11
48
|
/**
|
|
12
49
|
* A numeric parameter's enforced bounds, read off the schema that enforces them (#1537).
|
|
13
50
|
*
|
|
@@ -16,34 +53,46 @@ import { isPredicateParam, predicateGrammar, } from '@reticlehq/engine/question/
|
|
|
16
53
|
* prose, so the number shown is the number checked and cannot drift from it.
|
|
17
54
|
*/
|
|
18
55
|
function boundsOf(schema) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
if (inner instanceof z.ZodOptional || inner instanceof z.ZodNullable) {
|
|
22
|
-
inner = inner.unwrap();
|
|
23
|
-
}
|
|
24
|
-
else if (inner instanceof z.ZodDefault) {
|
|
25
|
-
inner = inner.removeDefault();
|
|
26
|
-
}
|
|
27
|
-
else if (inner instanceof z.ZodEffects) {
|
|
28
|
-
inner = inner.innerType();
|
|
29
|
-
}
|
|
30
|
-
else
|
|
31
|
-
break;
|
|
32
|
-
}
|
|
33
|
-
if (!(inner instanceof z.ZodNumber))
|
|
56
|
+
const inner = unwrappedOf(schema);
|
|
57
|
+
if (!(inner instanceof z.ZodNumber)) {
|
|
34
58
|
return {};
|
|
35
|
-
|
|
59
|
+
}
|
|
60
|
+
// `.int()` reports the safe-integer range as its bounds. That range bounds nothing an agent sends.
|
|
61
|
+
const min = Number.MIN_SAFE_INTEGER < (inner.minValue ?? Number.MIN_SAFE_INTEGER) ? inner.minValue : null;
|
|
62
|
+
const max = Number.MAX_SAFE_INTEGER > (inner.maxValue ?? Number.MAX_SAFE_INTEGER) ? inner.maxValue : null;
|
|
36
63
|
return { ...(null === min ? {} : { min }), ...(null === max ? {} : { max }) };
|
|
37
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* An enum parameter's accepted values, read off the enum that enforces them (#1775).
|
|
67
|
+
*
|
|
68
|
+
* `claim` on reticle_session takes `pass | fail | partial`, but its description said only what the
|
|
69
|
+
* value means, so an agent sent a sentence and the call was refused. Read here rather than written
|
|
70
|
+
* into prose, so the values shown are the values checked and cannot drift from them.
|
|
71
|
+
*/
|
|
72
|
+
function valuesOf(schema) {
|
|
73
|
+
const inner = unwrappedOf(schema);
|
|
74
|
+
if (!(inner instanceof z.ZodEnum)) {
|
|
75
|
+
return undefined;
|
|
76
|
+
}
|
|
77
|
+
const options = inner.options;
|
|
78
|
+
if (!Array.isArray(options)) {
|
|
79
|
+
return undefined;
|
|
80
|
+
}
|
|
81
|
+
return options.filter((option) => 'string' === typeof option);
|
|
82
|
+
}
|
|
38
83
|
/** Compact param list from a tool's zod shape — name/required/description (the description already
|
|
39
|
-
* carries the type
|
|
84
|
+
* carries the type, so no JSON-Schema machinery is needed), plus closed values and numeric bounds. */
|
|
40
85
|
function paramInfo(shape) {
|
|
41
|
-
return Object.entries(shape).map(([name, schema]) =>
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
86
|
+
return Object.entries(shape).map(([name, schema]) => {
|
|
87
|
+
const values = valuesOf(schema);
|
|
88
|
+
return {
|
|
89
|
+
name,
|
|
90
|
+
required: !schema.isOptional(),
|
|
91
|
+
description: descriptionOf(schema) ?? '',
|
|
92
|
+
...(values === undefined ? {} : { values }),
|
|
93
|
+
...boundsOf(schema),
|
|
94
|
+
};
|
|
95
|
+
});
|
|
47
96
|
}
|
|
48
97
|
/**
|
|
49
98
|
* The one wording for "you named a parameter that does not exist", shared by both checks in
|
|
@@ -141,24 +190,25 @@ callable) {
|
|
|
141
190
|
.array(z.string())
|
|
142
191
|
.optional()
|
|
143
192
|
.describe('Tool names to load full params for. Omit to list all tools with summaries.'),
|
|
193
|
+
name: z.string().optional().describe('One tool name: the same as names:[name].'),
|
|
144
194
|
};
|
|
145
195
|
const reticleTools = {
|
|
146
196
|
name: ReticleTool.TOOLS,
|
|
147
197
|
// The "invoke them with reticle_run" half is true only where reticle_run exists. On a closed
|
|
148
198
|
// surface it is the first thing an agent reads about this tool and it names a tool that is not
|
|
149
199
|
// there, so it is said only where it can be acted on.
|
|
150
|
-
description: 'Discover Reticle tools on demand. Call with no arguments to list every tool (name + one-line summary); call with names:["
|
|
200
|
+
description: 'Discover Reticle tools on demand. Call with no arguments to list every tool (name + one-line summary); call with names:["reticle_screenshot", …] to load full descriptions and parameters for specific tools.' +
|
|
151
201
|
(callable === undefined
|
|
152
202
|
? ' Then invoke them with reticle_run.'
|
|
153
203
|
: ' Every tool it lists is callable directly by name.') +
|
|
154
204
|
' This avoids paying for every tool definition on every turn.' +
|
|
155
|
-
// The flow workflow is taught ONLY where it can be followed.
|
|
205
|
+
// The flow workflow is taught ONLY where it can be followed. Most of its calls —
|
|
156
206
|
// reticle_record, reticle_flow_save, reticle_verify { action: "heal" } — are in the merged table but are not
|
|
157
207
|
// advertised, and a closed surface has no dispatch hatch to reach them, so naming them here
|
|
158
|
-
// hands the reader a
|
|
208
|
+
// hands the reader a recipe of which one step works. Replaying flows that already
|
|
159
209
|
// exist is reachable either way, via reticle_verify, so that half is still offered.
|
|
160
210
|
(callable === undefined
|
|
161
|
-
? ' To make a verification REUSABLE (record once, replay free forever), the flow workflow lives here: reticle_record{action:"start"} → act → reticle_flow_save → reticle_verify{action:"flows"} (and reticle_verify { action: "heal" } on drift). Load those names when you want to save or re-run a flow.'
|
|
211
|
+
? ' To make a verification REUSABLE (record once, replay free forever), the flow workflow lives here: reticle_record{action:"start"} → act → reticle_record{action:"stop"} → reticle_flow_save → reticle_verify{action:"flows"} (and reticle_verify { action: "heal" } on drift). Load those names when you want to save or re-run a flow.'
|
|
162
212
|
: ' Flows that already exist replay with reticle_verify { action: "flows" }. RECORDING a new one is not reachable from this surface; start the daemon with RETICLE_ADVERTISE_ALL_TOOLS=1 if you need to build one.'),
|
|
163
213
|
inputSchema: toolsShape,
|
|
164
214
|
handler: (_deps, args) => {
|
|
@@ -174,9 +224,11 @@ callable) {
|
|
|
174
224
|
hint: TOOLS_ARG_HINT,
|
|
175
225
|
});
|
|
176
226
|
}
|
|
177
|
-
const
|
|
227
|
+
const listed = Array.isArray(args['names'])
|
|
178
228
|
? args['names'].filter((n) => 'string' === typeof n)
|
|
179
229
|
: undefined;
|
|
230
|
+
const one = 'string' === typeof args['name'] ? [args['name']] : [];
|
|
231
|
+
const names = listed === undefined && 0 === one.length ? undefined : [...(listed ?? []), ...one];
|
|
180
232
|
if (names === undefined || 0 === names.length) {
|
|
181
233
|
// The COUNT is stated, not just implied by the array length. An agent that can see 18 tools
|
|
182
234
|
// has no way to know whether that is all of them; being told the registry holds more is what
|
|
@@ -214,8 +266,9 @@ callable) {
|
|
|
214
266
|
return Promise.resolve({
|
|
215
267
|
tools: names.map((n) => {
|
|
216
268
|
const t = byName.get(n);
|
|
217
|
-
if (t !== undefined)
|
|
269
|
+
if (t !== undefined) {
|
|
218
270
|
return { name: n, description: t.description, params: paramInfo(t.inputSchema) };
|
|
271
|
+
}
|
|
219
272
|
// `reticle_run` has answered a merged name with its replacement for a while; the tool
|
|
220
273
|
// asked to DISCOVER tools still said "unknown tool", which is the wrong answer in the one
|
|
221
274
|
// place an agent goes to resolve a name it is unsure of. Same redirect, same derivation.
|
|
@@ -226,8 +279,8 @@ callable) {
|
|
|
226
279
|
},
|
|
227
280
|
};
|
|
228
281
|
const runShape = {
|
|
229
|
-
tool: z.string().describe('Tool name to invoke, e.g.
|
|
230
|
-
args: z.record(z.unknown()).optional().describe('Arguments object for that tool.'),
|
|
282
|
+
tool: z.string().describe('Tool name to invoke, e.g. reticle_clock.'),
|
|
283
|
+
args: z.record(z.string(), z.unknown()).optional().describe('Arguments object for that tool.'),
|
|
231
284
|
// Accepted AND FORWARDED, not merely tolerated. reticle_run is the only way to reach an
|
|
232
285
|
// unadvertised tool, so on a machine running several projects it has to be aimable — and
|
|
233
286
|
// `sessionId` is the shape an agent already uses on every other tool. Reported from the field
|
|
@@ -274,8 +327,9 @@ callable) {
|
|
|
274
327
|
// ...and for 22 of those names the capability DOES exist, it just moved when tools merged.
|
|
275
328
|
// Answering "unknown tool" there is simply wrong; see merged-name-redirect.
|
|
276
329
|
const absent = explainAbsent(name);
|
|
277
|
-
if ('unknown tool' !== absent.error)
|
|
330
|
+
if ('unknown tool' !== absent.error) {
|
|
278
331
|
return absent;
|
|
332
|
+
}
|
|
279
333
|
return { error: `unknown tool '${name}'`, available: reachable.map((t) => t.name) };
|
|
280
334
|
}
|
|
281
335
|
// The outer aim, forwarded ONLY to a tool that declares a session — injecting it into one that
|
|
@@ -327,7 +381,8 @@ callable) {
|
|
|
327
381
|
// is reached through here: a stale ref, a paused session, a missing pairing token all came
|
|
328
382
|
// back as the agent's arguments being wrong, which is advice that spends the retry.
|
|
329
383
|
const message = error instanceof Error ? error.message : String(error);
|
|
330
|
-
|
|
384
|
+
const payload = buildErrorPayload(message, codedRefusalOf(error));
|
|
385
|
+
return { ...takeVersionSkewOnto(payload, deps.peerSkew), tool: name };
|
|
331
386
|
}
|
|
332
387
|
},
|
|
333
388
|
};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { wiringConsent } from '../../portal/session/no-session-next-action.js';
|
|
3
|
+
export { wiringConsent };
|
|
2
4
|
import type { ToolDeps } from './tool-kit.js';
|
|
3
5
|
/** The fields only an empty list carries, declared so a schema-aware client does not strip them. */
|
|
4
6
|
export declare const EMPTY_SESSION_LIST_OUTPUT: {
|
|
5
7
|
why: z.ZodOptional<z.ZodString>;
|
|
6
8
|
next_action: z.ZodOptional<z.ZodObject<{
|
|
7
|
-
action: z.
|
|
9
|
+
action: z.ZodEnum<{
|
|
8
10
|
readonly START_DEV_SERVER: "start_dev_server";
|
|
9
11
|
readonly RUN_INIT: "run_init";
|
|
10
12
|
readonly OPEN_APP: "open_app";
|
|
@@ -14,38 +16,29 @@ export declare const EMPTY_SESSION_LIST_OUTPUT: {
|
|
|
14
16
|
command: z.ZodOptional<z.ZodString>;
|
|
15
17
|
port: z.ZodOptional<z.ZodNumber>;
|
|
16
18
|
reason: z.ZodString;
|
|
17
|
-
},
|
|
18
|
-
action: "start_dev_server" | "run_init" | "open_app" | "reopen_app" | "daemon_split";
|
|
19
|
-
reason: string;
|
|
20
|
-
port?: number | undefined;
|
|
21
|
-
command?: string | undefined;
|
|
22
|
-
}, {
|
|
23
|
-
action: "start_dev_server" | "run_init" | "open_app" | "reopen_app" | "daemon_split";
|
|
24
|
-
reason: string;
|
|
25
|
-
port?: number | undefined;
|
|
26
|
-
command?: string | undefined;
|
|
27
|
-
}>>;
|
|
19
|
+
}, z.core.$strip>>;
|
|
28
20
|
talk_to_us: z.ZodOptional<z.ZodString>;
|
|
29
|
-
|
|
21
|
+
next_step: z.ZodOptional<z.ZodObject<{
|
|
22
|
+
offered: z.ZodEnum<{
|
|
23
|
+
readonly LEASE: "lease";
|
|
24
|
+
readonly INIT_CONSENT: "init_consent";
|
|
25
|
+
}>;
|
|
26
|
+
lease: z.ZodOptional<z.ZodString>;
|
|
27
|
+
consent: z.ZodString;
|
|
28
|
+
}, z.core.$strip>>;
|
|
30
29
|
lastKnown: z.ZodOptional<z.ZodObject<{
|
|
31
30
|
sessionId: z.ZodString;
|
|
32
31
|
url: z.ZodString;
|
|
33
|
-
},
|
|
34
|
-
sessionId: string;
|
|
35
|
-
url: string;
|
|
36
|
-
}, {
|
|
37
|
-
sessionId: string;
|
|
38
|
-
url: string;
|
|
39
|
-
}>>;
|
|
32
|
+
}, z.core.$strip>>;
|
|
40
33
|
};
|
|
41
34
|
/**
|
|
42
|
-
*
|
|
35
|
+
* The next step for the calling project when another project's tab is the one connected.
|
|
43
36
|
*
|
|
44
37
|
* The list handler only used to reach {@link emptySessionList} when the daemon's whole list was
|
|
45
38
|
* empty. A live tab in project A then answered project B's first call with A's sessions, and B
|
|
46
|
-
* was
|
|
39
|
+
* never heard that it was not wired.
|
|
47
40
|
*/
|
|
48
|
-
export declare function
|
|
41
|
+
export declare function nextStepBesideLiveSessions(deps: ToolDeps, sessions: readonly {
|
|
49
42
|
projectId?: string;
|
|
50
|
-
}[]):
|
|
51
|
-
export declare function emptySessionList(deps: ToolDeps, sessions: unknown[]):
|
|
43
|
+
}[]): Record<string, unknown> | undefined;
|
|
44
|
+
export declare function emptySessionList(deps: ToolDeps, sessions: unknown[]): Record<string, unknown>;
|