@reticlehq/core 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.
Files changed (138) hide show
  1. package/dist/activation-entry.d.ts +9 -0
  2. package/dist/activation-entry.js +9 -0
  3. package/dist/artifacts/drive-script.d.ts +84 -1217
  4. package/dist/artifacts/drive-script.js +1 -1
  5. package/dist/artifacts/flow-constants.d.ts +15 -0
  6. package/dist/artifacts/flow-constants.js +15 -0
  7. package/dist/artifacts/flow-expect-flat.d.ts +8 -192
  8. package/dist/artifacts/flow-expect-flat.js +2 -2
  9. package/dist/artifacts/flow-results.d.ts +26 -0
  10. package/dist/artifacts/flow-types.d.ts +212 -2295
  11. package/dist/artifacts/flow-types.js +14 -2
  12. package/dist/artifacts/harness-credits.d.ts +6 -3
  13. package/dist/artifacts/harness-credits.js +9 -6
  14. package/dist/artifacts/harness-map.d.ts +8 -69
  15. package/dist/artifacts/harness-map.js +1 -1
  16. package/dist/artifacts/hud-notices.d.ts +8 -82
  17. package/dist/artifacts/hud-notices.js +1 -1
  18. package/dist/artifacts/impact.d.ts +104 -1665
  19. package/dist/artifacts/impact.js +38 -21
  20. package/dist/artifacts/journal.d.ts +15 -231
  21. package/dist/artifacts/journal.js +15 -2
  22. package/dist/artifacts/prompt-context.d.ts +7 -33
  23. package/dist/artifacts/prompt-context.js +15 -4
  24. package/dist/artifacts/screenshot-upload.d.ts +3 -26
  25. package/dist/artifacts/screenshot-upload.js +1 -1
  26. package/dist/graph/app-graph.d.ts +137 -0
  27. package/dist/graph/app-graph.js +498 -0
  28. package/dist/hooks/hook-events.d.ts +15 -171
  29. package/dist/hooks/hook-events.js +1 -1
  30. package/dist/hud-entry.js +1 -1
  31. package/dist/identity/checkout.d.ts +41 -0
  32. package/dist/identity/checkout.js +118 -0
  33. package/dist/identity/state-dir.d.ts +23 -0
  34. package/dist/identity/state-dir.js +43 -0
  35. package/dist/index.d.ts +10 -0
  36. package/dist/index.js +10 -0
  37. package/dist/onboarding.d.ts +23 -52
  38. package/dist/onboarding.js +20 -1
  39. package/dist/registry/daemon-registry.d.ts +2 -14
  40. package/dist/registry/daemon-registry.js +1 -1
  41. package/dist/registry/dev-server-registry.d.ts +2 -31
  42. package/dist/registry/dev-server-registry.js +1 -1
  43. package/dist/registry/project-registry.d.ts +4 -32
  44. package/dist/registry/project-registry.js +1 -1
  45. package/dist/schema/command-message.json +65 -68
  46. package/dist/schema/command-name.json +29 -33
  47. package/dist/schema/command-result.json +25 -30
  48. package/dist/schema/event-message.json +104 -101
  49. package/dist/schema/event-payloads.json +246 -108
  50. package/dist/schema/event-type.json +47 -48
  51. package/dist/schema/hello-message.json +150 -133
  52. package/dist/schema/reticle-event.json +98 -94
  53. package/dist/schema/reticle-message.json +338 -310
  54. package/dist/telemetry-bug.d.ts +4 -75
  55. package/dist/telemetry-bug.js +1 -1
  56. package/dist/telemetry-entry.d.ts +1 -1
  57. package/dist/telemetry-entry.js +1 -1
  58. package/dist/telemetry-feedback.d.ts +17 -91
  59. package/dist/telemetry-feedback.js +20 -1
  60. package/dist/telemetry-refusal.d.ts +4 -31
  61. package/dist/telemetry-refusal.js +1 -1
  62. package/dist/telemetry-session.d.ts +45 -624
  63. package/dist/telemetry-session.js +25 -12
  64. package/dist/telemetry-signals.d.ts +211 -86
  65. package/dist/telemetry-signals.js +100 -2
  66. package/dist/telemetry.d.ts +321 -1691
  67. package/dist/telemetry.js +72 -6
  68. package/dist/verdict/check-sentence.d.ts +34 -0
  69. package/dist/verdict/check-sentence.js +228 -0
  70. package/dist/verdict/compare-source.d.ts +1 -1
  71. package/dist/verdict/compare-source.js +1 -1
  72. package/dist/verdict/consequence.d.ts +15 -0
  73. package/dist/verdict/consequence.js +11 -0
  74. package/dist/verdict/disparity.d.ts +8 -56
  75. package/dist/verdict/disparity.js +1 -1
  76. package/dist/verdict/findings.d.ts +10 -0
  77. package/dist/verdict/findings.js +13 -0
  78. package/dist/verdict/instrumentation-coverage.d.ts +6 -37
  79. package/dist/verdict/instrumentation-coverage.js +15 -59
  80. package/dist/verdict/instrumentation-gap.d.ts +72 -0
  81. package/dist/verdict/instrumentation-gap.js +64 -0
  82. package/dist/verdict/intent.d.ts +25 -224
  83. package/dist/verdict/intent.js +1 -1
  84. package/dist/verdict/predicate-tree.d.ts +2 -0
  85. package/dist/verdict/predicate-tree.js +16 -0
  86. package/dist/verdict/predicate.d.ts +3 -2
  87. package/dist/verdict/predicate.js +107 -16
  88. package/dist/verdict/property-assertion.d.ts +23 -101
  89. package/dist/verdict/property-assertion.js +1 -1
  90. package/dist/verdict/run-report.d.ts +71 -0
  91. package/dist/verdict/run-report.js +53 -0
  92. package/dist/verdict/security.d.ts +48 -2
  93. package/dist/verdict/security.js +185 -18
  94. package/dist/verdict/verification-run.d.ts +124 -1623
  95. package/dist/verdict/verification-run.js +37 -6
  96. package/dist/verdict/verify-progress.d.ts +22 -64
  97. package/dist/verdict/verify-progress.js +1 -1
  98. package/dist/wire/constants/constants.d.ts +56 -141
  99. package/dist/wire/constants/constants.js +64 -144
  100. package/dist/wire/constants/discovery.d.ts +4 -4
  101. package/dist/wire/constants/discovery.js +4 -4
  102. package/dist/wire/constants/event-types.d.ts +37 -1
  103. package/dist/wire/constants/event-types.js +35 -1
  104. package/dist/wire/constants/hud-controls.js +0 -2
  105. package/dist/wire/constants/hud-use.d.ts +4 -0
  106. package/dist/wire/constants/hud-use.js +4 -0
  107. package/dist/wire/constants/mcp-wire.d.ts +16 -0
  108. package/dist/wire/constants/mcp-wire.js +16 -0
  109. package/dist/wire/constants/response-body-reason.d.ts +19 -0
  110. package/dist/wire/constants/response-body-reason.js +18 -0
  111. package/dist/wire/constants/reticle-env.d.ts +140 -0
  112. package/dist/wire/constants/reticle-env.js +140 -0
  113. package/dist/wire/constants/session-constants.d.ts +11 -0
  114. package/dist/wire/constants/session-constants.js +11 -0
  115. package/dist/wire/event-payloads.d.ts +173 -629
  116. package/dist/wire/event-payloads.js +107 -23
  117. package/dist/wire/event-priority.js +1 -0
  118. package/dist/wire/messages.d.ts +90 -713
  119. package/dist/wire/messages.js +19 -3
  120. package/dist/wire/narrow.d.ts +6 -0
  121. package/dist/wire/narrow.js +26 -0
  122. package/dist/wire/next-step.d.ts +50 -0
  123. package/dist/wire/next-step.js +37 -0
  124. package/dist/wire/platform-link.d.ts +7 -0
  125. package/dist/wire/platform-link.js +14 -8
  126. package/dist/wire/production/activation-ticket.d.ts +64 -0
  127. package/dist/wire/production/activation-ticket.js +148 -0
  128. package/dist/wire/production/hello-mode.d.ts +35 -0
  129. package/dist/wire/production/hello-mode.js +32 -0
  130. package/dist/wire/production/production-policy.d.ts +92 -0
  131. package/dist/wire/production/production-policy.js +133 -0
  132. package/dist/wire/tool-names.d.ts +2 -0
  133. package/dist/wire/tool-names.js +2 -0
  134. package/dist/wire/types.d.ts +102 -700
  135. package/dist/wire/types.js +5 -5
  136. package/dist/words/upgrade.d.ts +3 -13
  137. package/dist/words/upgrade.js +1 -1
  138. package/package.json +7 -4
@@ -0,0 +1,140 @@
1
+ /**
2
+ * Every environment variable Reticle reads, named once. A misspelled inline env string silently
3
+ * disables the control it gates (e.g. a typo'd `RETICLE_TOKEN` would disable auth) — so the names live
4
+ * here and nowhere else. The values are the literal process.env keys.
5
+ */
6
+ export declare const ReticleEnv: {
7
+ /** "0"/"false"/"off" turns off telemetry and every optional outbound call; DO_NOT_TRACK too. */
8
+ readonly TELEMETRY: "RETICLE_TELEMETRY";
9
+ readonly DO_NOT_TRACK: "DO_NOT_TRACK";
10
+ /** Shared-secret the browser SDK must present in HELLO; absent ⇒ loopback-trust only. */
11
+ readonly TOKEN: "RETICLE_TOKEN";
12
+ /** Bridge bind host. Defaults to loopback; setting anything else is opt-in remote exposure. */
13
+ readonly HOST: "RETICLE_HOST";
14
+ /** Comma-separated WS Origin allow-list for the bridge. */
15
+ readonly ALLOWED_ORIGINS: "RETICLE_ALLOWED_ORIGINS";
16
+ /** Bridge/daemon WS port override. */
17
+ readonly PORT: "RETICLE_PORT";
18
+ /** Daemon state — pidfiles, discovery registry, logs. Defaults to `~/.reticle`. Overridable
19
+ * because a read-only $HOME (sandboxed agent, locked-down Windows profile, container) otherwise
20
+ * makes the daemon unstartable with a raw EACCES naming nothing. Reported by a Windows user. */
21
+ readonly STATE_DIR: "RETICLE_STATE_DIR";
22
+ /** Attach to an already-running browser over CDP instead of launching one. */
23
+ readonly CDP_URL: "RETICLE_CDP_URL";
24
+ /** The Chromium executable to launch, in place of Playwright's own build or an installed Chrome. */
25
+ readonly CHROMIUM_PATH: "RETICLE_CHROMIUM_PATH";
26
+ /** Max simultaneous leased headless contexts in the browser pool (resource cap). */
27
+ readonly MAX_CONTEXTS: "RETICLE_MAX_CONTEXTS";
28
+ /**
29
+ * Inbound events per second before the bridge starts SAMPLING (never disconnecting).
30
+ *
31
+ * Raise it for a legitimately busy app — a streaming dashboard, a live grid — rather than accept
32
+ * partial coverage. Free and local: the daemon runs on the same machine, so a higher ceiling costs
33
+ * nothing to anyone.
34
+ */
35
+ readonly MAX_MESSAGES_PER_SECOND: "RETICLE_MAX_MESSAGES_PER_SECOND";
36
+ /** Bearer token required by the optional `reticle serve --http` verify endpoint. */
37
+ readonly VERIFY_TOKEN: "RETICLE_VERIFY_TOKEN";
38
+ /** Ms of continuous idleness (no agent, no browser session, no lease) before the daemon self-exits;
39
+ * `0` disables. Keeps Reticle from lingering on a user's machine after the editor closes. */
40
+ readonly IDLE_SHUTDOWN: "RETICLE_IDLE_SHUTDOWN_MS";
41
+ /** Idle re-check cadence (default 30s). Overridable so daemon-lifecycle-test can watch a full
42
+ * exit/wake cycle in seconds rather than minutes. */
43
+ readonly IDLE_CHECK: "RETICLE_IDLE_CHECK_MS";
44
+ /**
45
+ * Grace for a daemon with an agent ATTACHED. Longer than the base on purpose: quiet with a client
46
+ * present means a slow install or a thinking human, not an unwanted daemon — a flat 5 minutes was
47
+ * killing live runs mid-install. Derived from the base when unset.
48
+ */
49
+ readonly IDLE_ATTACHED: "RETICLE_IDLE_ATTACHED_MS";
50
+ /**
51
+ * How often the daemon writes `reticle_daemon_alive`, so a GAP in its log is evidence it died.
52
+ *
53
+ * Overridable for the same reason the idle windows are: a spec that has to prove "a killed daemon
54
+ * is distinguishable from a tidy one" cannot wait 30 seconds per beat, and a spec that instead
55
+ * re-implements the cadence is insensitive to the thing it claims to guard.
56
+ */
57
+ readonly HEARTBEAT: "RETICLE_HEARTBEAT_MS";
58
+ /** Directory holding the auto-provisioned pairing token. Defaults to ~/.reticle; relocatable for CI. */
59
+ readonly PAIRING_TOKEN_DIR: "RETICLE_PAIRING_TOKEN_DIR";
60
+ /** Force the durable causal journal off (`0`/`false`/`off`) or on (`1`/`true`/`on`); default on. */
61
+ readonly JOURNAL: "RETICLE_JOURNAL";
62
+ /**
63
+ * Verbose internal flow tracing for people working ON Reticle (`1`/`true`/`on`); default off.
64
+ *
65
+ * Distinct from the journal, which records what the AGENT did to the app. This records what
66
+ * RETICLE did to answer it: one line per internal stage, with its duration and nesting, so a
67
+ * developer can see which code a tool call actually went through and where the time went.
68
+ * Off by default and free when off — a trace on every tool call is a cost on the hot path.
69
+ */
70
+ readonly TRACE: "RETICLE_TRACE";
71
+ /**
72
+ * How many consecutive reconnects the MCP proxy attempts before it stops retrying and goes
73
+ * dormant. Overridable for the same reason the idle windows are: the real budget takes MINUTES to
74
+ * exhaust, so the one spec that proves the proxy SURVIVES exhaustion could not run at all without
75
+ * shortening it. A budget nobody can reach in a test is a budget nobody tests.
76
+ */
77
+ readonly RECONNECT_ATTEMPTS: "RETICLE_RECONNECT_ATTEMPTS";
78
+ /** Quiet window before an abandoned MCP stdio proxy exits; `0` disables the watcher. */
79
+ readonly MCP_PROXY_IDLE: "RETICLE_MCP_PROXY_IDLE_MS";
80
+ /**
81
+ * API key for the harness — the model that drives the app when no coding agent is in the loop.
82
+ *
83
+ * The standard Anthropic name, on purpose: a machine that can already run a coding agent can
84
+ * already run the harness, with nothing to configure. Absent ⇒ the harness is simply unavailable
85
+ * and every other part of Reticle is unaffected.
86
+ */
87
+ readonly HARNESS_KEY: "ANTHROPIC_API_KEY";
88
+ /** Model the harness drives with. Defaults to a small one — see `DEFAULT_HARNESS_MODEL`. */
89
+ readonly HARNESS_MODEL: "RETICLE_HARNESS_MODEL";
90
+ /** Base URL for the harness's model API, for a proxy or a gateway. */
91
+ readonly HARNESS_BASE_URL: "RETICLE_HARNESS_BASE_URL";
92
+ /** Hard ceiling on harness model turns in one drive. Bounds cost, not value. */
93
+ readonly HARNESS_MAX_STEPS: "RETICLE_HARNESS_MAX_STEPS";
94
+ /** The free drive `reticle try` was granted, sent on every Harness call it bills. */
95
+ readonly DRIVE_ID: "RETICLE_DRIVE_ID";
96
+ /**
97
+ * Which model backs the harness driver: `anthropic` (the default) or `jev`.
98
+ *
99
+ * Two drivers exist because the driver's job turns out not to need a text generator. It picks the
100
+ * next action and says what it expects; the verdict is decided afterwards by the engine, with no
101
+ * model anywhere near it. A System One model answers typed questions against a state, which is
102
+ * exactly that job and none of the rest, so it can drive without being able to generate a
103
+ * sentence. Unset keeps the existing behaviour for everybody who has not asked for this.
104
+ */
105
+ readonly HARNESS_DRIVER: "RETICLE_HARNESS_DRIVER";
106
+ /**
107
+ * A direct Jev key, for this repo's own benchmarks and for anyone holding a TypeSafe account.
108
+ *
109
+ * Users are not expected to have one. The ordinary path is the key they already minted on the
110
+ * platform (`RETICLE_API_KEY`), which reaches Jev through the proxy at `RETICLE_CLOUD_URL` —
111
+ * this variable is the escape hatch that skips it, and it takes precedence when both are set so
112
+ * that a developer debugging the upstream is never silently talking to the proxy instead.
113
+ */
114
+ readonly HARNESS_JEV_KEY: "JEV_API_KEY";
115
+ /** Base URL for the Jev API, for a proxy or a gateway. Defaults to TypeSafe's own endpoint. */
116
+ readonly HARNESS_JEV_URL: "RETICLE_HARNESS_JEV_URL";
117
+ /** A direct OpenAI key. As with Jev, the ordinary path is the platform key and its proxy. */
118
+ readonly HARNESS_OPENAI_KEY: "OPENAI_API_KEY";
119
+ /** Model the OpenAI driver uses. Defaults to a small one — see `DEFAULT_OPENAI_MODEL`. */
120
+ readonly HARNESS_OPENAI_MODEL: "RETICLE_HARNESS_OPENAI_MODEL";
121
+ /**
122
+ * The API key minted on the platform, and the host it belongs to.
123
+ *
124
+ * Read through `apiKeyFrom()`, never directly — see the note on that function for why there are
125
+ * two names for one key and why neither may be dropped.
126
+ */
127
+ readonly API_KEY: "RETICLE_API_KEY";
128
+ /** The name this key had until 2026-09. Still honoured; see `apiKeyFrom()`. */
129
+ readonly CLOUD_KEY: "RETICLE_CLOUD_KEY";
130
+ /** The platform host. Read through `cloudUrlFrom()`, which also accepts `URL`. */
131
+ readonly CLOUD_URL: "RETICLE_CLOUD_URL";
132
+ /** The short name for `CLOUD_URL`, which people type first. `CLOUD_URL` wins when both are set. */
133
+ readonly URL: "RETICLE_URL";
134
+ /** "0"/"false"/"off" stops `reticle hook prompt` writing prompts, on this whole machine. */
135
+ readonly PROMPT_CAPTURE: "RETICLE_PROMPT_CAPTURE";
136
+ /** "0"/"false"/"off" stops the daemon's background sync, on this whole machine. */
137
+ readonly BACKGROUND_SYNC: "RETICLE_BACKGROUND_SYNC";
138
+ /** Set by the parent that starts the daemon: how it started it. A `DaemonSpawnMethod`. */
139
+ readonly SPAWN_METHOD: "RETICLE_SPAWN_METHOD";
140
+ };
@@ -0,0 +1,140 @@
1
+ /**
2
+ * Every environment variable Reticle reads, named once. A misspelled inline env string silently
3
+ * disables the control it gates (e.g. a typo'd `RETICLE_TOKEN` would disable auth) — so the names live
4
+ * here and nowhere else. The values are the literal process.env keys.
5
+ */
6
+ export const ReticleEnv = {
7
+ /** "0"/"false"/"off" turns off telemetry and every optional outbound call; DO_NOT_TRACK too. */
8
+ TELEMETRY: 'RETICLE_TELEMETRY',
9
+ DO_NOT_TRACK: 'DO_NOT_TRACK',
10
+ /** Shared-secret the browser SDK must present in HELLO; absent ⇒ loopback-trust only. */
11
+ TOKEN: 'RETICLE_TOKEN',
12
+ /** Bridge bind host. Defaults to loopback; setting anything else is opt-in remote exposure. */
13
+ HOST: 'RETICLE_HOST',
14
+ /** Comma-separated WS Origin allow-list for the bridge. */
15
+ ALLOWED_ORIGINS: 'RETICLE_ALLOWED_ORIGINS',
16
+ /** Bridge/daemon WS port override. */
17
+ PORT: 'RETICLE_PORT',
18
+ /** Daemon state — pidfiles, discovery registry, logs. Defaults to `~/.reticle`. Overridable
19
+ * because a read-only $HOME (sandboxed agent, locked-down Windows profile, container) otherwise
20
+ * makes the daemon unstartable with a raw EACCES naming nothing. Reported by a Windows user. */
21
+ STATE_DIR: 'RETICLE_STATE_DIR',
22
+ /** Attach to an already-running browser over CDP instead of launching one. */
23
+ CDP_URL: 'RETICLE_CDP_URL',
24
+ /** The Chromium executable to launch, in place of Playwright's own build or an installed Chrome. */
25
+ CHROMIUM_PATH: 'RETICLE_CHROMIUM_PATH',
26
+ /** Max simultaneous leased headless contexts in the browser pool (resource cap). */
27
+ MAX_CONTEXTS: 'RETICLE_MAX_CONTEXTS',
28
+ /**
29
+ * Inbound events per second before the bridge starts SAMPLING (never disconnecting).
30
+ *
31
+ * Raise it for a legitimately busy app — a streaming dashboard, a live grid — rather than accept
32
+ * partial coverage. Free and local: the daemon runs on the same machine, so a higher ceiling costs
33
+ * nothing to anyone.
34
+ */
35
+ MAX_MESSAGES_PER_SECOND: 'RETICLE_MAX_MESSAGES_PER_SECOND',
36
+ /** Bearer token required by the optional `reticle serve --http` verify endpoint. */
37
+ VERIFY_TOKEN: 'RETICLE_VERIFY_TOKEN',
38
+ /** Ms of continuous idleness (no agent, no browser session, no lease) before the daemon self-exits;
39
+ * `0` disables. Keeps Reticle from lingering on a user's machine after the editor closes. */
40
+ IDLE_SHUTDOWN: 'RETICLE_IDLE_SHUTDOWN_MS',
41
+ /** Idle re-check cadence (default 30s). Overridable so daemon-lifecycle-test can watch a full
42
+ * exit/wake cycle in seconds rather than minutes. */
43
+ IDLE_CHECK: 'RETICLE_IDLE_CHECK_MS',
44
+ /**
45
+ * Grace for a daemon with an agent ATTACHED. Longer than the base on purpose: quiet with a client
46
+ * present means a slow install or a thinking human, not an unwanted daemon — a flat 5 minutes was
47
+ * killing live runs mid-install. Derived from the base when unset.
48
+ */
49
+ IDLE_ATTACHED: 'RETICLE_IDLE_ATTACHED_MS',
50
+ /**
51
+ * How often the daemon writes `reticle_daemon_alive`, so a GAP in its log is evidence it died.
52
+ *
53
+ * Overridable for the same reason the idle windows are: a spec that has to prove "a killed daemon
54
+ * is distinguishable from a tidy one" cannot wait 30 seconds per beat, and a spec that instead
55
+ * re-implements the cadence is insensitive to the thing it claims to guard.
56
+ */
57
+ HEARTBEAT: 'RETICLE_HEARTBEAT_MS',
58
+ /** Directory holding the auto-provisioned pairing token. Defaults to ~/.reticle; relocatable for CI. */
59
+ PAIRING_TOKEN_DIR: 'RETICLE_PAIRING_TOKEN_DIR',
60
+ /** Force the durable causal journal off (`0`/`false`/`off`) or on (`1`/`true`/`on`); default on. */
61
+ JOURNAL: 'RETICLE_JOURNAL',
62
+ /**
63
+ * Verbose internal flow tracing for people working ON Reticle (`1`/`true`/`on`); default off.
64
+ *
65
+ * Distinct from the journal, which records what the AGENT did to the app. This records what
66
+ * RETICLE did to answer it: one line per internal stage, with its duration and nesting, so a
67
+ * developer can see which code a tool call actually went through and where the time went.
68
+ * Off by default and free when off — a trace on every tool call is a cost on the hot path.
69
+ */
70
+ TRACE: 'RETICLE_TRACE',
71
+ /**
72
+ * How many consecutive reconnects the MCP proxy attempts before it stops retrying and goes
73
+ * dormant. Overridable for the same reason the idle windows are: the real budget takes MINUTES to
74
+ * exhaust, so the one spec that proves the proxy SURVIVES exhaustion could not run at all without
75
+ * shortening it. A budget nobody can reach in a test is a budget nobody tests.
76
+ */
77
+ RECONNECT_ATTEMPTS: 'RETICLE_RECONNECT_ATTEMPTS',
78
+ /** Quiet window before an abandoned MCP stdio proxy exits; `0` disables the watcher. */
79
+ MCP_PROXY_IDLE: 'RETICLE_MCP_PROXY_IDLE_MS',
80
+ /**
81
+ * API key for the harness — the model that drives the app when no coding agent is in the loop.
82
+ *
83
+ * The standard Anthropic name, on purpose: a machine that can already run a coding agent can
84
+ * already run the harness, with nothing to configure. Absent ⇒ the harness is simply unavailable
85
+ * and every other part of Reticle is unaffected.
86
+ */
87
+ HARNESS_KEY: 'ANTHROPIC_API_KEY',
88
+ /** Model the harness drives with. Defaults to a small one — see `DEFAULT_HARNESS_MODEL`. */
89
+ HARNESS_MODEL: 'RETICLE_HARNESS_MODEL',
90
+ /** Base URL for the harness's model API, for a proxy or a gateway. */
91
+ HARNESS_BASE_URL: 'RETICLE_HARNESS_BASE_URL',
92
+ /** Hard ceiling on harness model turns in one drive. Bounds cost, not value. */
93
+ HARNESS_MAX_STEPS: 'RETICLE_HARNESS_MAX_STEPS',
94
+ /** The free drive `reticle try` was granted, sent on every Harness call it bills. */
95
+ DRIVE_ID: 'RETICLE_DRIVE_ID',
96
+ /**
97
+ * Which model backs the harness driver: `anthropic` (the default) or `jev`.
98
+ *
99
+ * Two drivers exist because the driver's job turns out not to need a text generator. It picks the
100
+ * next action and says what it expects; the verdict is decided afterwards by the engine, with no
101
+ * model anywhere near it. A System One model answers typed questions against a state, which is
102
+ * exactly that job and none of the rest, so it can drive without being able to generate a
103
+ * sentence. Unset keeps the existing behaviour for everybody who has not asked for this.
104
+ */
105
+ HARNESS_DRIVER: 'RETICLE_HARNESS_DRIVER',
106
+ /**
107
+ * A direct Jev key, for this repo's own benchmarks and for anyone holding a TypeSafe account.
108
+ *
109
+ * Users are not expected to have one. The ordinary path is the key they already minted on the
110
+ * platform (`RETICLE_API_KEY`), which reaches Jev through the proxy at `RETICLE_CLOUD_URL` —
111
+ * this variable is the escape hatch that skips it, and it takes precedence when both are set so
112
+ * that a developer debugging the upstream is never silently talking to the proxy instead.
113
+ */
114
+ HARNESS_JEV_KEY: 'JEV_API_KEY',
115
+ /** Base URL for the Jev API, for a proxy or a gateway. Defaults to TypeSafe's own endpoint. */
116
+ HARNESS_JEV_URL: 'RETICLE_HARNESS_JEV_URL',
117
+ /** A direct OpenAI key. As with Jev, the ordinary path is the platform key and its proxy. */
118
+ HARNESS_OPENAI_KEY: 'OPENAI_API_KEY',
119
+ /** Model the OpenAI driver uses. Defaults to a small one — see `DEFAULT_OPENAI_MODEL`. */
120
+ HARNESS_OPENAI_MODEL: 'RETICLE_HARNESS_OPENAI_MODEL',
121
+ /**
122
+ * The API key minted on the platform, and the host it belongs to.
123
+ *
124
+ * Read through `apiKeyFrom()`, never directly — see the note on that function for why there are
125
+ * two names for one key and why neither may be dropped.
126
+ */
127
+ API_KEY: 'RETICLE_API_KEY',
128
+ /** The name this key had until 2026-09. Still honoured; see `apiKeyFrom()`. */
129
+ CLOUD_KEY: 'RETICLE_CLOUD_KEY',
130
+ /** The platform host. Read through `cloudUrlFrom()`, which also accepts `URL`. */
131
+ CLOUD_URL: 'RETICLE_CLOUD_URL',
132
+ /** The short name for `CLOUD_URL`, which people type first. `CLOUD_URL` wins when both are set. */
133
+ URL: 'RETICLE_URL',
134
+ /** "0"/"false"/"off" stops `reticle hook prompt` writing prompts, on this whole machine. */
135
+ PROMPT_CAPTURE: 'RETICLE_PROMPT_CAPTURE',
136
+ /** "0"/"false"/"off" stops the daemon's background sync, on this whole machine. */
137
+ BACKGROUND_SYNC: 'RETICLE_BACKGROUND_SYNC',
138
+ /** Set by the parent that starts the daemon: how it started it. A `DaemonSpawnMethod`. */
139
+ SPAWN_METHOD: 'RETICLE_SPAWN_METHOD',
140
+ };
@@ -24,6 +24,11 @@ export declare const HumanControlKind: {
24
24
  readonly PAUSE: "pause";
25
25
  readonly RESUME: "resume";
26
26
  readonly END: "end";
27
+ /**
28
+ * A note the human typed for the agent. Only an older SDK sends it: the current HUD has no note
29
+ * box. Protocol 1 still accepts that SDK, so keep this kind. Without it, its notes are dropped
30
+ * with no error.
31
+ */
27
32
  readonly MESSAGE: "message";
28
33
  /** Human clicked ▶ on a saved flow in the panel — replay it (no agent). `text` carries the name. */
29
34
  readonly REPLAY: "replay";
@@ -143,6 +148,12 @@ export declare const SESSION_LIFECYCLE: {
143
148
  readonly DAEMON_IDLE_SHUTDOWN_MS: 300000;
144
149
  /** How often the daemon checks whether it has gone idle. Unref'd, so it never keeps the process up. */
145
150
  readonly DAEMON_IDLE_CHECK_MS: 30000;
151
+ /**
152
+ * An agent that attached this recently still counts as attached for the idle check. A client that
153
+ * starts a new MCP proxy for each turn (Codex) detaches between turns, and a used daemon must not
154
+ * exit and cold-start again for each turn.
155
+ */
156
+ readonly DAEMON_AGENT_RECENT_MS: 1800000;
146
157
  };
147
158
  /**
148
159
  * Coding-agent session hygiene thresholds. Coding agents (Claude Code, Codex, Cursor) often
@@ -25,6 +25,11 @@ export const HumanControlKind = {
25
25
  PAUSE: 'pause',
26
26
  RESUME: 'resume',
27
27
  END: 'end',
28
+ /**
29
+ * A note the human typed for the agent. Only an older SDK sends it: the current HUD has no note
30
+ * box. Protocol 1 still accepts that SDK, so keep this kind. Without it, its notes are dropped
31
+ * with no error.
32
+ */
28
33
  MESSAGE: 'message',
29
34
  /** Human clicked ▶ on a saved flow in the panel — replay it (no agent). `text` carries the name. */
30
35
  REPLAY: 'replay',
@@ -141,6 +146,12 @@ export const SESSION_LIFECYCLE = {
141
146
  DAEMON_IDLE_SHUTDOWN_MS: 300_000,
142
147
  /** How often the daemon checks whether it has gone idle. Unref'd, so it never keeps the process up. */
143
148
  DAEMON_IDLE_CHECK_MS: 30_000,
149
+ /**
150
+ * An agent that attached this recently still counts as attached for the idle check. A client that
151
+ * starts a new MCP proxy for each turn (Codex) detaches between turns, and a used daemon must not
152
+ * exit and cold-start again for each turn.
153
+ */
154
+ DAEMON_AGENT_RECENT_MS: 1_800_000,
144
155
  };
145
156
  /**
146
157
  * Coding-agent session hygiene thresholds. Coding agents (Claude Code, Codex, Cursor) often