@tiny-fish/cli 0.37.1-next.300 → 0.37.1-next.302

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.
@@ -123,6 +123,30 @@ export async function sendSetupStarted(mcpUrl, attemptId, apiKey) {
123
123
  apiKey,
124
124
  });
125
125
  }
126
+ /** Terminal state for a run the key gate stopped; fires instead of setup_started. */
127
+ export async function sendSetupBlocked(mcpUrl, detail, apiKey) {
128
+ if (telemetryDisabled())
129
+ return;
130
+ const stamped = detail.attemptId && z.uuid().safeParse(detail.attemptId).success ? detail.attemptId : undefined;
131
+ await postConnectEvent({
132
+ endpoint: new URL('/api/cli/connect-event', mcpUrl).toString(),
133
+ body: JSON.stringify({
134
+ event: 'setup_blocked',
135
+ cli_version: CLI_VERSION,
136
+ block_reason: detail.blockReason,
137
+ key_source: detail.keySource,
138
+ ...(detail.status !== undefined ? { status: detail.status } : {}),
139
+ mode: detail.mode,
140
+ runtime_platform: process.platform,
141
+ ...(stamped ? { connect_attempt_id: stamped } : {}),
142
+ cli_invocation_id: CLI_INVOCATION_ID,
143
+ runtime_env: detectRuntimeEnv(),
144
+ }),
145
+ attempts: 1,
146
+ label: 'setup',
147
+ apiKey,
148
+ });
149
+ }
126
150
  export const setupCompletedPayloadSchema = z.object({
127
151
  harnesses: z
128
152
  .array(harnessResultSchema)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiny-fish/cli",
3
- "version": "0.37.1-next.300",
3
+ "version": "0.37.1-next.302",
4
4
  "description": "TinyFish CLI — run web automations from your terminal",
5
5
  "type": "module",
6
6
  "bin": {