@reticlehq/core 3.7.0 → 3.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) 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 +64 -64
  4. package/dist/artifacts/flow-constants.d.ts +15 -0
  5. package/dist/artifacts/flow-constants.js +15 -0
  6. package/dist/artifacts/flow-expect-flat.d.ts +8 -8
  7. package/dist/artifacts/flow-results.d.ts +11 -0
  8. package/dist/artifacts/flow-types.d.ts +164 -118
  9. package/dist/artifacts/flow-types.js +12 -0
  10. package/dist/artifacts/harness-credits.d.ts +6 -3
  11. package/dist/artifacts/harness-credits.js +9 -6
  12. package/dist/artifacts/harness-map.d.ts +6 -6
  13. package/dist/artifacts/impact.d.ts +77 -80
  14. package/dist/artifacts/impact.js +34 -17
  15. package/dist/artifacts/journal.d.ts +25 -6
  16. package/dist/artifacts/journal.js +13 -0
  17. package/dist/artifacts/prompt-context.d.ts +12 -0
  18. package/dist/artifacts/prompt-context.js +14 -3
  19. package/dist/graph/app-graph.d.ts +137 -0
  20. package/dist/graph/app-graph.js +498 -0
  21. package/dist/hooks/hook-events.d.ts +22 -22
  22. package/dist/hud-entry.js +1 -1
  23. package/dist/identity/checkout.d.ts +41 -0
  24. package/dist/identity/checkout.js +118 -0
  25. package/dist/identity/state-dir.d.ts +23 -0
  26. package/dist/identity/state-dir.js +43 -0
  27. package/dist/index.d.ts +10 -0
  28. package/dist/index.js +10 -0
  29. package/dist/onboarding.d.ts +22 -1
  30. package/dist/onboarding.js +19 -0
  31. package/dist/registry/dev-server-registry.d.ts +2 -2
  32. package/dist/schema/event-message.json +3 -1
  33. package/dist/schema/event-payloads.json +116 -1
  34. package/dist/schema/event-type.json +3 -1
  35. package/dist/schema/hello-message.json +21 -0
  36. package/dist/schema/reticle-event.json +3 -1
  37. package/dist/schema/reticle-message.json +24 -1
  38. package/dist/telemetry-bug.d.ts +6 -6
  39. package/dist/telemetry-entry.d.ts +1 -1
  40. package/dist/telemetry-entry.js +1 -1
  41. package/dist/telemetry-feedback.d.ts +14 -0
  42. package/dist/telemetry-feedback.js +19 -0
  43. package/dist/telemetry-refusal.d.ts +2 -2
  44. package/dist/telemetry-session.d.ts +23 -8
  45. package/dist/telemetry-session.js +15 -4
  46. package/dist/telemetry-signals.d.ts +227 -9
  47. package/dist/telemetry-signals.js +88 -1
  48. package/dist/telemetry.d.ts +379 -72
  49. package/dist/telemetry.js +71 -5
  50. package/dist/verdict/check-sentence.d.ts +34 -0
  51. package/dist/verdict/check-sentence.js +228 -0
  52. package/dist/verdict/consequence.d.ts +15 -0
  53. package/dist/verdict/consequence.js +11 -0
  54. package/dist/verdict/findings.d.ts +10 -0
  55. package/dist/verdict/findings.js +13 -0
  56. package/dist/verdict/instrumentation-coverage.d.ts +3 -34
  57. package/dist/verdict/instrumentation-coverage.js +14 -58
  58. package/dist/verdict/instrumentation-gap.d.ts +79 -0
  59. package/dist/verdict/instrumentation-gap.js +64 -0
  60. package/dist/verdict/predicate-tree.d.ts +2 -0
  61. package/dist/verdict/predicate-tree.js +16 -0
  62. package/dist/verdict/predicate.d.ts +2 -1
  63. package/dist/verdict/predicate.js +103 -12
  64. package/dist/verdict/property-assertion.d.ts +2 -2
  65. package/dist/verdict/run-report.d.ts +166 -0
  66. package/dist/verdict/run-report.js +53 -0
  67. package/dist/verdict/security.d.ts +36 -2
  68. package/dist/verdict/security.js +94 -14
  69. package/dist/verdict/verification-run.d.ts +95 -38
  70. package/dist/verdict/verification-run.js +33 -2
  71. package/dist/verdict/verify-progress.d.ts +6 -6
  72. package/dist/wire/constants/constants.d.ts +56 -141
  73. package/dist/wire/constants/constants.js +64 -144
  74. package/dist/wire/constants/discovery.d.ts +4 -4
  75. package/dist/wire/constants/discovery.js +4 -4
  76. package/dist/wire/constants/event-types.d.ts +35 -1
  77. package/dist/wire/constants/event-types.js +33 -1
  78. package/dist/wire/constants/hud-controls.js +0 -2
  79. package/dist/wire/constants/hud-use.d.ts +4 -0
  80. package/dist/wire/constants/hud-use.js +4 -0
  81. package/dist/wire/constants/mcp-wire.d.ts +16 -0
  82. package/dist/wire/constants/mcp-wire.js +16 -0
  83. package/dist/wire/constants/response-body-reason.d.ts +19 -0
  84. package/dist/wire/constants/response-body-reason.js +18 -0
  85. package/dist/wire/constants/reticle-env.d.ts +138 -0
  86. package/dist/wire/constants/reticle-env.js +138 -0
  87. package/dist/wire/constants/session-constants.d.ts +11 -0
  88. package/dist/wire/constants/session-constants.js +11 -0
  89. package/dist/wire/event-payloads.d.ts +150 -36
  90. package/dist/wire/event-payloads.js +83 -16
  91. package/dist/wire/messages.d.ts +102 -36
  92. package/dist/wire/messages.js +16 -0
  93. package/dist/wire/narrow.d.ts +6 -0
  94. package/dist/wire/narrow.js +26 -0
  95. package/dist/wire/next-step.d.ts +90 -0
  96. package/dist/wire/next-step.js +37 -0
  97. package/dist/wire/platform-link.d.ts +7 -0
  98. package/dist/wire/platform-link.js +12 -6
  99. package/dist/wire/production/activation-ticket.d.ts +64 -0
  100. package/dist/wire/production/activation-ticket.js +148 -0
  101. package/dist/wire/production/hello-mode.d.ts +35 -0
  102. package/dist/wire/production/hello-mode.js +32 -0
  103. package/dist/wire/production/production-policy.d.ts +138 -0
  104. package/dist/wire/production/production-policy.js +133 -0
  105. package/dist/wire/tool-names.d.ts +2 -0
  106. package/dist/wire/tool-names.js +2 -0
  107. package/dist/wire/types.d.ts +73 -48
  108. package/package.json +5 -1
@@ -1,7 +1,8 @@
1
1
  /**
2
2
  * The product signals the event set could not answer: who is signed in, which workspace and which
3
3
  * agent client an event belongs to, which HUD page was opened, which sign-in prompts were seen, when a
4
- * project was linked, and how a Harness run started and ended.
4
+ * project was linked, how a Harness run started and ended, and what happened to the MCP proxy and
5
+ * its daemon when the link failed.
5
6
  *
6
7
  * Its own file so the vocabulary has one home and `telemetry.ts` only wires it in. Every value here is
7
8
  * a closed set, a boolean or a bucket: none of these fields can carry a URL, a path, a name or text.
@@ -91,6 +92,30 @@ export const HarnessRunOutcome = {
91
92
  BLOCKED: 'blocked',
92
93
  STOPPED: 'stopped',
93
94
  };
95
+ /**
96
+ * Why a Harness run did not drive: only on a `blocked` or `failed` run. Closed, and read off the
97
+ * refusal that stopped it, never off its sentence, so a reworded message cannot change the count.
98
+ */
99
+ export const HarnessRunReason = {
100
+ /** The project has no platform link, so there is nowhere to drive from. */
101
+ NOT_LINKED: 'not_linked',
102
+ /** The platform did not confirm the drive in time, or answered something unreadable. */
103
+ PLATFORM_UNREACHABLE: 'platform_unreachable',
104
+ /** The Harness is switched off for this project (the default until somebody turns it on). */
105
+ HARNESS_OFF: 'harness_off',
106
+ /** The workspace has no credits left. */
107
+ NO_CREDITS: 'no_credits',
108
+ /** The workspace has not claimed the Harness. */
109
+ NOT_ENTITLED: 'not_entitled',
110
+ /** An older build refused for low instrumentation. No longer sent: the Harness has no coverage gate. */
111
+ COVERAGE_GATE: 'coverage_gate',
112
+ /** The page and the daemon come from different builds, so every step would answer unknown. */
113
+ VERSION_SKEW: 'version_skew',
114
+ /** The drive started and broke. */
115
+ BROKEN: 'broken',
116
+ /** A refusal this list does not name. A growing count here is a gap in this list. */
117
+ OTHER: 'other',
118
+ };
94
119
  /** Who started a Harness run. `dashboard` is a run started from the platform's chat. */
95
120
  export const HarnessRunSource = {
96
121
  AGENT: 'agent',
@@ -110,6 +135,8 @@ export const HarnessRunSchema = z.object({
110
135
  /** Only on `completed`: journeys the run answered, and how many of those replayed with no model. */
111
136
  journeys: z.nativeEnum(CountBucket).optional(),
112
137
  replayed: z.nativeEnum(CountBucket).optional(),
138
+ /** Only on a `blocked` or `failed` run: why it did not drive. */
139
+ reason: z.nativeEnum(HarnessRunReason).optional(),
113
140
  });
114
141
  /**
115
142
  * The envelope fields and blocks this file adds to `TelemetryEventSchema`, spread into it there.
@@ -136,3 +163,63 @@ export const SIGNAL_FIELDS = {
136
163
  /** Only on `harness_run`. */
137
164
  harness: HarnessRunSchema.optional(),
138
165
  };
166
+ // ── Transport: what happens to the MCP proxy and its daemon when the link fails ──
167
+ // No block below carries a path, a port, a pid or a message.
168
+ /**
169
+ * The socket error code behind a drop, as a closed set. Anything else reports `other`, so a new code
170
+ * cannot put free text on the wire.
171
+ */
172
+ export const OutageErrCode = {
173
+ ECONNRESET: 'ECONNRESET',
174
+ ECONNREFUSED: 'ECONNREFUSED',
175
+ EPIPE: 'EPIPE',
176
+ ETIMEDOUT: 'ETIMEDOUT',
177
+ OTHER: 'other',
178
+ };
179
+ /** Why the MCP proxy process left. Each member names one exit path in the proxy. */
180
+ export const ProxyExitReason = {
181
+ /** The client closed stdin. The normal end of a session. */
182
+ STDIN_END: 'stdin_end',
183
+ /** The client link was quiet for the idle window, with no work in flight. */
184
+ IDLE: 'idle',
185
+ /** Too many client-pipe disconnects since the last usable session: the client is gone. */
186
+ CLIENT_GONE_STORM: 'client_gone_storm',
187
+ /** The proxy could not start a daemon and had no way to continue. */
188
+ WAKE_FAILED: 'wake_failed',
189
+ };
190
+ /** `mcp_proxy_exited`: the agent's MCP server process ended, and the agent lost its tools. */
191
+ export const ProxyExitSchema = z.object({
192
+ reason: z.nativeEnum(ProxyExitReason),
193
+ /** How long the proxy process ran. */
194
+ uptimeMs: z.number().int().nonnegative(),
195
+ /** How many times the proxy lost its daemon stream in its life. */
196
+ drops: z.number().int().nonnegative(),
197
+ /** How many `tools/call` requests the client sent through this proxy. */
198
+ toolCalls: z.number().int().nonnegative(),
199
+ proxyId: z.string().min(1).max(64).optional(),
200
+ });
201
+ /** `daemon_died_unclean`: a daemon start found the pidfile of a daemon that never stopped cleanly. */
202
+ export const DaemonDeathSchema = z.object({
203
+ /** Time from the dead daemon's start (its pidfile write) to this discovery. */
204
+ ageMs: z.number().int().nonnegative(),
205
+ });
206
+ /** What held the port when a wake was refused. */
207
+ export const WakeRefusalPresence = {
208
+ /** Something that is not a Reticle daemon holds the port. */
209
+ FOREIGN: 'foreign',
210
+ /** A Reticle daemon for a different project holds the port. */
211
+ OTHER_PROJECT: 'other_project',
212
+ };
213
+ /** `wake_refused`: the proxy would not use the daemon port it found. */
214
+ export const WakeRefusalSchema = z.object({
215
+ presence: z.nativeEnum(WakeRefusalPresence),
216
+ });
217
+ /** The blocks this file adds to `TelemetryEventSchema`, spread into it there. */
218
+ export const TRANSPORT_FIELDS = {
219
+ /** Only on `mcp_proxy_exited`. */
220
+ proxyExit: ProxyExitSchema.optional(),
221
+ /** Only on `daemon_died_unclean`. */
222
+ daemonDeath: DaemonDeathSchema.optional(),
223
+ /** Only on `wake_refused`. */
224
+ wakeRefusal: WakeRefusalSchema.optional(),
225
+ };