fetchsandbox-mcp 0.7.33 → 0.7.34

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.
@@ -0,0 +1,330 @@
1
+ export declare const planRehearsalTool: {
2
+ readonly name: "plan_rehearsal";
3
+ readonly title: "Plan a workflow rehearsal";
4
+ readonly description: "Start here to test an application's integration behavior. Pass the user's goal in ordinary language. Inspect the authorized project first and supply discovered application facts when available; if they are missing this returns inspection guidance without creating an environment. Ask the user only for unavailable access or unresolved business policy. Proposes scenarios and required observations through the existing planner; it never runs the app or proves a pass. Retain the returned session/job IDs. Review proposed rules, business questions and missing observations before configuring the executable contract with validate_integration. Do not substitute a reference workflow for the app.";
5
+ readonly inputSchema: {
6
+ readonly type: "object";
7
+ readonly additionalProperties: false;
8
+ readonly required: readonly ["goal"];
9
+ readonly properties: {
10
+ readonly goal: {
11
+ readonly type: "string";
12
+ readonly minLength: 1;
13
+ readonly maxLength: 8000;
14
+ readonly description: "The user's workflow goal or testing request, unchanged.";
15
+ };
16
+ readonly session_id: {
17
+ readonly type: "string";
18
+ readonly minLength: 1;
19
+ readonly maxLength: 128;
20
+ readonly pattern: "^[a-zA-Z0-9_-]+$";
21
+ readonly description: "Exact identifier returned by FetchSandbox. Never invent or infer it.";
22
+ };
23
+ readonly application: {
24
+ readonly type: "object";
25
+ readonly additionalProperties: false;
26
+ readonly description: "Facts discovered by the agent from the authorized app, not technical questions for the user. No credentials or raw source.";
27
+ readonly properties: {
28
+ readonly providers: {
29
+ readonly type: "array";
30
+ readonly maxItems: 20;
31
+ readonly uniqueItems: true;
32
+ readonly items: {
33
+ readonly type: "string";
34
+ readonly minLength: 1;
35
+ };
36
+ readonly description: "Catalog provider identifiers established from the app and catalog, not guessed. Explicit [] with an origin selects a provider-free HTTP app.";
37
+ };
38
+ readonly origin: {
39
+ readonly type: "string";
40
+ readonly description: "Published disposable test-app origin or app_base_url returned by manage_tunnel. Never use a production app by assumption.";
41
+ };
42
+ readonly version: {
43
+ readonly type: "string";
44
+ };
45
+ readonly workflow: {
46
+ readonly type: "string";
47
+ };
48
+ readonly entry_points: {
49
+ readonly type: "array";
50
+ readonly items: {
51
+ readonly type: "string";
52
+ };
53
+ };
54
+ readonly state_store: {
55
+ readonly type: "string";
56
+ };
57
+ readonly fixture_requirements: {
58
+ readonly type: "array";
59
+ readonly items: {
60
+ readonly type: "string";
61
+ };
62
+ };
63
+ };
64
+ };
65
+ };
66
+ };
67
+ };
68
+ export declare const runRehearsalTool: {
69
+ readonly name: "run_rehearsal";
70
+ readonly title: "Run the reviewed rehearsal";
71
+ readonly description: "Execute ONCE the existing frozen, reviewed test-app contract. Use only the session_id and run_id returned by validate_integration configuration, after protected test credentials and app setup are installed. The existing engine checks readiness, drives scenarios and owns the verdict. A returned job or running state is not success. If submission is uncertain do not retry; retrieve this same attempt. This does not configure a contract or authorize production writes.";
72
+ readonly inputSchema: {
73
+ readonly type: "object";
74
+ readonly additionalProperties: false;
75
+ readonly required: readonly ["session_id", "run_id"];
76
+ readonly properties: {
77
+ session_id: {
78
+ readonly type: "string";
79
+ readonly minLength: 1;
80
+ readonly maxLength: 128;
81
+ readonly pattern: "^[a-zA-Z0-9_-]+$";
82
+ readonly description: "Exact identifier returned by FetchSandbox. Never invent or infer it.";
83
+ };
84
+ run_id: {
85
+ readonly type: "string";
86
+ readonly minLength: 1;
87
+ readonly maxLength: 128;
88
+ readonly pattern: "^[a-zA-Z0-9_-]+$";
89
+ readonly description: "Exact identifier returned by FetchSandbox. Never invent or infer it.";
90
+ };
91
+ };
92
+ };
93
+ };
94
+ export declare const getRehearsalTool: {
95
+ readonly name: "get_rehearsal";
96
+ readonly title: "Get rehearsal progress or results";
97
+ readonly description: "Read the SAME rehearsal attempt or planning/execution job without starting work. Supply either its returned job_id, OR both session_id and run_id. Preserve failed, blocked and not-measured outcomes and the receipt. A native restart checkpoint requires an actual app process restart; it does not authorize another execution. A proposed plan or HTTP success is not app verification.";
98
+ readonly inputSchema: {
99
+ readonly type: "object";
100
+ readonly additionalProperties: false;
101
+ readonly properties: {
102
+ readonly job_id: {
103
+ readonly type: "string";
104
+ readonly minLength: 1;
105
+ readonly maxLength: 128;
106
+ readonly pattern: "^[a-zA-Z0-9_-]+$";
107
+ readonly description: "Exact identifier returned by FetchSandbox. Never invent or infer it.";
108
+ };
109
+ readonly session_id: {
110
+ readonly type: "string";
111
+ readonly minLength: 1;
112
+ readonly maxLength: 128;
113
+ readonly pattern: "^[a-zA-Z0-9_-]+$";
114
+ readonly description: "Exact identifier returned by FetchSandbox. Never invent or infer it.";
115
+ };
116
+ readonly run_id: {
117
+ readonly type: "string";
118
+ readonly minLength: 1;
119
+ readonly maxLength: 128;
120
+ readonly pattern: "^[a-zA-Z0-9_-]+$";
121
+ readonly description: "Exact identifier returned by FetchSandbox. Never invent or infer it.";
122
+ };
123
+ };
124
+ readonly oneOf: readonly [{
125
+ readonly required: readonly ["job_id"];
126
+ readonly not: {
127
+ readonly anyOf: readonly [{
128
+ readonly required: readonly ["session_id"];
129
+ }, {
130
+ readonly required: readonly ["run_id"];
131
+ }];
132
+ };
133
+ }, {
134
+ readonly required: readonly ["session_id", "run_id"];
135
+ readonly not: {
136
+ readonly required: readonly ["job_id"];
137
+ };
138
+ }];
139
+ };
140
+ };
141
+ export declare const stopRehearsalTool: {
142
+ readonly name: "stop_rehearsal";
143
+ readonly title: "Stop a rehearsal attempt";
144
+ readonly description: "Request cancellation and scenario cleanup for the exact returned session_id/run_id. Preserve the recorded result, uncertainty and cleanup outcome. Stopping does not undo external effects already performed or turn an interrupted test into a pass. Never cancel a newer attempt to clean up an older one.";
145
+ readonly inputSchema: {
146
+ readonly type: "object";
147
+ readonly additionalProperties: false;
148
+ readonly required: readonly ["session_id", "run_id"];
149
+ readonly properties: {
150
+ session_id: {
151
+ readonly type: "string";
152
+ readonly minLength: 1;
153
+ readonly maxLength: 128;
154
+ readonly pattern: "^[a-zA-Z0-9_-]+$";
155
+ readonly description: "Exact identifier returned by FetchSandbox. Never invent or infer it.";
156
+ };
157
+ run_id: {
158
+ readonly type: "string";
159
+ readonly minLength: 1;
160
+ readonly maxLength: 128;
161
+ readonly pattern: "^[a-zA-Z0-9_-]+$";
162
+ readonly description: "Exact identifier returned by FetchSandbox. Never invent or infer it.";
163
+ };
164
+ };
165
+ };
166
+ };
167
+ export declare const rehearsalTools: ({
168
+ readonly name: "plan_rehearsal";
169
+ readonly title: "Plan a workflow rehearsal";
170
+ readonly description: "Start here to test an application's integration behavior. Pass the user's goal in ordinary language. Inspect the authorized project first and supply discovered application facts when available; if they are missing this returns inspection guidance without creating an environment. Ask the user only for unavailable access or unresolved business policy. Proposes scenarios and required observations through the existing planner; it never runs the app or proves a pass. Retain the returned session/job IDs. Review proposed rules, business questions and missing observations before configuring the executable contract with validate_integration. Do not substitute a reference workflow for the app.";
171
+ readonly inputSchema: {
172
+ readonly type: "object";
173
+ readonly additionalProperties: false;
174
+ readonly required: readonly ["goal"];
175
+ readonly properties: {
176
+ readonly goal: {
177
+ readonly type: "string";
178
+ readonly minLength: 1;
179
+ readonly maxLength: 8000;
180
+ readonly description: "The user's workflow goal or testing request, unchanged.";
181
+ };
182
+ readonly session_id: {
183
+ readonly type: "string";
184
+ readonly minLength: 1;
185
+ readonly maxLength: 128;
186
+ readonly pattern: "^[a-zA-Z0-9_-]+$";
187
+ readonly description: "Exact identifier returned by FetchSandbox. Never invent or infer it.";
188
+ };
189
+ readonly application: {
190
+ readonly type: "object";
191
+ readonly additionalProperties: false;
192
+ readonly description: "Facts discovered by the agent from the authorized app, not technical questions for the user. No credentials or raw source.";
193
+ readonly properties: {
194
+ readonly providers: {
195
+ readonly type: "array";
196
+ readonly maxItems: 20;
197
+ readonly uniqueItems: true;
198
+ readonly items: {
199
+ readonly type: "string";
200
+ readonly minLength: 1;
201
+ };
202
+ readonly description: "Catalog provider identifiers established from the app and catalog, not guessed. Explicit [] with an origin selects a provider-free HTTP app.";
203
+ };
204
+ readonly origin: {
205
+ readonly type: "string";
206
+ readonly description: "Published disposable test-app origin or app_base_url returned by manage_tunnel. Never use a production app by assumption.";
207
+ };
208
+ readonly version: {
209
+ readonly type: "string";
210
+ };
211
+ readonly workflow: {
212
+ readonly type: "string";
213
+ };
214
+ readonly entry_points: {
215
+ readonly type: "array";
216
+ readonly items: {
217
+ readonly type: "string";
218
+ };
219
+ };
220
+ readonly state_store: {
221
+ readonly type: "string";
222
+ };
223
+ readonly fixture_requirements: {
224
+ readonly type: "array";
225
+ readonly items: {
226
+ readonly type: "string";
227
+ };
228
+ };
229
+ };
230
+ };
231
+ };
232
+ };
233
+ } | {
234
+ readonly name: "run_rehearsal";
235
+ readonly title: "Run the reviewed rehearsal";
236
+ readonly description: "Execute ONCE the existing frozen, reviewed test-app contract. Use only the session_id and run_id returned by validate_integration configuration, after protected test credentials and app setup are installed. The existing engine checks readiness, drives scenarios and owns the verdict. A returned job or running state is not success. If submission is uncertain do not retry; retrieve this same attempt. This does not configure a contract or authorize production writes.";
237
+ readonly inputSchema: {
238
+ readonly type: "object";
239
+ readonly additionalProperties: false;
240
+ readonly required: readonly ["session_id", "run_id"];
241
+ readonly properties: {
242
+ session_id: {
243
+ readonly type: "string";
244
+ readonly minLength: 1;
245
+ readonly maxLength: 128;
246
+ readonly pattern: "^[a-zA-Z0-9_-]+$";
247
+ readonly description: "Exact identifier returned by FetchSandbox. Never invent or infer it.";
248
+ };
249
+ run_id: {
250
+ readonly type: "string";
251
+ readonly minLength: 1;
252
+ readonly maxLength: 128;
253
+ readonly pattern: "^[a-zA-Z0-9_-]+$";
254
+ readonly description: "Exact identifier returned by FetchSandbox. Never invent or infer it.";
255
+ };
256
+ };
257
+ };
258
+ } | {
259
+ readonly name: "get_rehearsal";
260
+ readonly title: "Get rehearsal progress or results";
261
+ readonly description: "Read the SAME rehearsal attempt or planning/execution job without starting work. Supply either its returned job_id, OR both session_id and run_id. Preserve failed, blocked and not-measured outcomes and the receipt. A native restart checkpoint requires an actual app process restart; it does not authorize another execution. A proposed plan or HTTP success is not app verification.";
262
+ readonly inputSchema: {
263
+ readonly type: "object";
264
+ readonly additionalProperties: false;
265
+ readonly properties: {
266
+ readonly job_id: {
267
+ readonly type: "string";
268
+ readonly minLength: 1;
269
+ readonly maxLength: 128;
270
+ readonly pattern: "^[a-zA-Z0-9_-]+$";
271
+ readonly description: "Exact identifier returned by FetchSandbox. Never invent or infer it.";
272
+ };
273
+ readonly session_id: {
274
+ readonly type: "string";
275
+ readonly minLength: 1;
276
+ readonly maxLength: 128;
277
+ readonly pattern: "^[a-zA-Z0-9_-]+$";
278
+ readonly description: "Exact identifier returned by FetchSandbox. Never invent or infer it.";
279
+ };
280
+ readonly run_id: {
281
+ readonly type: "string";
282
+ readonly minLength: 1;
283
+ readonly maxLength: 128;
284
+ readonly pattern: "^[a-zA-Z0-9_-]+$";
285
+ readonly description: "Exact identifier returned by FetchSandbox. Never invent or infer it.";
286
+ };
287
+ };
288
+ readonly oneOf: readonly [{
289
+ readonly required: readonly ["job_id"];
290
+ readonly not: {
291
+ readonly anyOf: readonly [{
292
+ readonly required: readonly ["session_id"];
293
+ }, {
294
+ readonly required: readonly ["run_id"];
295
+ }];
296
+ };
297
+ }, {
298
+ readonly required: readonly ["session_id", "run_id"];
299
+ readonly not: {
300
+ readonly required: readonly ["job_id"];
301
+ };
302
+ }];
303
+ };
304
+ } | {
305
+ readonly name: "stop_rehearsal";
306
+ readonly title: "Stop a rehearsal attempt";
307
+ readonly description: "Request cancellation and scenario cleanup for the exact returned session_id/run_id. Preserve the recorded result, uncertainty and cleanup outcome. Stopping does not undo external effects already performed or turn an interrupted test into a pass. Never cancel a newer attempt to clean up an older one.";
308
+ readonly inputSchema: {
309
+ readonly type: "object";
310
+ readonly additionalProperties: false;
311
+ readonly required: readonly ["session_id", "run_id"];
312
+ readonly properties: {
313
+ session_id: {
314
+ readonly type: "string";
315
+ readonly minLength: 1;
316
+ readonly maxLength: 128;
317
+ readonly pattern: "^[a-zA-Z0-9_-]+$";
318
+ readonly description: "Exact identifier returned by FetchSandbox. Never invent or infer it.";
319
+ };
320
+ run_id: {
321
+ readonly type: "string";
322
+ readonly minLength: 1;
323
+ readonly maxLength: 128;
324
+ readonly pattern: "^[a-zA-Z0-9_-]+$";
325
+ readonly description: "Exact identifier returned by FetchSandbox. Never invent or infer it.";
326
+ };
327
+ };
328
+ };
329
+ })[];
330
+ export declare function runRehearsalAction(name: string, input: Record<string, unknown>): Promise<unknown>;
@@ -0,0 +1,159 @@
1
+ /** Guided entry points over the existing validation session and job owners.
2
+ * No client-side session, verdict, contract store, retry loop or second engine.
3
+ * The advanced validate_integration surface remains the contract authoring API.
4
+ */
5
+ import { ToolError } from "../client.js";
6
+ import { runValidateIntegration } from "./validate_integration.js";
7
+ import { runGetJob } from "./jobs.js";
8
+ const identity = { type: "string", minLength: 1, maxLength: 128,
9
+ pattern: "^[a-zA-Z0-9_-]+$", description: "Exact identifier returned by FetchSandbox. Never invent or infer it." };
10
+ const attemptProperties = { session_id: identity, run_id: identity };
11
+ export const planRehearsalTool = {
12
+ name: "plan_rehearsal", title: "Plan a workflow rehearsal",
13
+ description: "Start here to test an application's integration behavior. Pass the user's goal in ordinary language. Inspect the authorized project first and supply discovered application facts when available; if they are missing this returns inspection guidance without creating an environment. Ask the user only for unavailable access or unresolved business policy. Proposes scenarios and required observations through the existing planner; it never runs the app or proves a pass. Retain the returned session/job IDs. Review proposed rules, business questions and missing observations before configuring the executable contract with validate_integration. Do not substitute a reference workflow for the app.",
14
+ inputSchema: { type: "object", additionalProperties: false, required: ["goal"], properties: {
15
+ goal: { type: "string", minLength: 1, maxLength: 8000, description: "The user's workflow goal or testing request, unchanged." },
16
+ session_id: identity,
17
+ application: { type: "object", additionalProperties: false, description: "Facts discovered by the agent from the authorized app, not technical questions for the user. No credentials or raw source.", properties: {
18
+ providers: { type: "array", maxItems: 20, uniqueItems: true, items: { type: "string", minLength: 1 }, description: "Catalog provider identifiers established from the app and catalog, not guessed. Explicit [] with an origin selects a provider-free HTTP app." },
19
+ origin: { type: "string", description: "Published disposable test-app origin or app_base_url returned by manage_tunnel. Never use a production app by assumption." },
20
+ version: { type: "string" }, workflow: { type: "string" },
21
+ entry_points: { type: "array", items: { type: "string" } },
22
+ state_store: { type: "string" }, fixture_requirements: { type: "array", items: { type: "string" } },
23
+ } },
24
+ } },
25
+ };
26
+ export const runRehearsalTool = {
27
+ name: "run_rehearsal", title: "Run the reviewed rehearsal",
28
+ description: "Execute ONCE the existing frozen, reviewed test-app contract. Use only the session_id and run_id returned by validate_integration configuration, after protected test credentials and app setup are installed. The existing engine checks readiness, drives scenarios and owns the verdict. A returned job or running state is not success. If submission is uncertain do not retry; retrieve this same attempt. This does not configure a contract or authorize production writes.",
29
+ inputSchema: { type: "object", additionalProperties: false, required: ["session_id", "run_id"], properties: attemptProperties },
30
+ };
31
+ export const getRehearsalTool = {
32
+ name: "get_rehearsal", title: "Get rehearsal progress or results",
33
+ description: "Read the SAME rehearsal attempt or planning/execution job without starting work. Supply either its returned job_id, OR both session_id and run_id. Preserve failed, blocked and not-measured outcomes and the receipt. A native restart checkpoint requires an actual app process restart; it does not authorize another execution. A proposed plan or HTTP success is not app verification.",
34
+ inputSchema: { type: "object", additionalProperties: false, properties: { ...attemptProperties, job_id: identity },
35
+ oneOf: [{ required: ["job_id"], not: { anyOf: [{ required: ["session_id"] }, { required: ["run_id"] }] } },
36
+ { required: ["session_id", "run_id"], not: { required: ["job_id"] } }] },
37
+ };
38
+ export const stopRehearsalTool = {
39
+ name: "stop_rehearsal", title: "Stop a rehearsal attempt",
40
+ description: "Request cancellation and scenario cleanup for the exact returned session_id/run_id. Preserve the recorded result, uncertainty and cleanup outcome. Stopping does not undo external effects already performed or turn an interrupted test into a pass. Never cancel a newer attempt to clean up an older one.",
41
+ inputSchema: { type: "object", additionalProperties: false, required: ["session_id", "run_id"], properties: attemptProperties },
42
+ };
43
+ export const rehearsalTools = [planRehearsalTool, runRehearsalTool, getRehearsalTool, stopRehearsalTool];
44
+ function record(value) {
45
+ return !!value && typeof value === "object" && !Array.isArray(value);
46
+ }
47
+ function exactId(value, name) {
48
+ if (typeof value !== "string" || !/^[a-zA-Z0-9_-]{1,128}$/.test(value)) {
49
+ throw new ToolError(`Use the exact ${name} returned by FetchSandbox. Retrieve the prior result; do not invent an identifier.`);
50
+ }
51
+ return value;
52
+ }
53
+ function knownFields(input, fields) {
54
+ if (Object.keys(input).some(key => !fields.includes(key)))
55
+ throw new ToolError("Unexpected rehearsal input. Use the advertised fields; advanced configuration belongs to validate_integration.");
56
+ }
57
+ /** Translate only read continuations. Never turn setup, execute or cancel into
58
+ * another action, and never rewrite verdicts, evidence or attempt identities. */
59
+ function guidedContinuation(result) {
60
+ if (!record(result) || !record(result.next_tool_call))
61
+ return result;
62
+ const call = result.next_tool_call;
63
+ const args = call.arguments;
64
+ if (!record(args))
65
+ return result;
66
+ const name = call.tool ?? call.name;
67
+ if (name === "get_job" && Object.keys(args).length === 1 && typeof args.job_id === "string") {
68
+ return { ...result, next_tool_call: { tool: "get_rehearsal", arguments: { job_id: args.job_id } } };
69
+ }
70
+ if (name === "validate_integration" && Object.keys(args).length === 2 &&
71
+ typeof args.session_id === "string" && typeof args.run_id === "string") {
72
+ return { ...result, next_tool_call: { tool: "get_rehearsal", arguments: { session_id: args.session_id, run_id: args.run_id } } };
73
+ }
74
+ return result;
75
+ }
76
+ export async function runRehearsalAction(name, input) {
77
+ if (name === planRehearsalTool.name) {
78
+ knownFields(input, ["goal", "session_id", "application"]);
79
+ if (typeof input.goal !== "string" || !input.goal.trim() || input.goal.length > 8000)
80
+ throw new ToolError("Describe the workflow goal in 1-8000 characters. No credentials or customer data.");
81
+ if (input.application !== undefined && !record(input.application))
82
+ throw new ToolError("application must contain inspected app facts.");
83
+ const app = (input.application ?? {});
84
+ knownFields(app, ["providers", "origin", "version", "workflow", "entry_points", "state_store", "fixture_requirements"]);
85
+ for (const key of ["providers", "entry_points", "fixture_requirements"]) {
86
+ if (app[key] !== undefined && (!Array.isArray(app[key]) || app[key].some(x => typeof x !== "string" || !x.trim())))
87
+ throw new ToolError(`${key} must be an array of inspected nonempty strings.`);
88
+ }
89
+ for (const key of ["origin", "version", "workflow", "state_store"]) {
90
+ if (app[key] !== undefined && (typeof app[key] !== "string" || !app[key].trim()))
91
+ throw new ToolError(`${key} must be an inspected nonempty string.`);
92
+ }
93
+ if (Array.isArray(app.providers) && (app.providers.length > 20 || new Set(app.providers).size !== app.providers.length))
94
+ throw new ToolError("providers must contain at most 20 distinct catalog identifiers.");
95
+ let sessionId = input.session_id === undefined ? undefined : exactId(input.session_id, "session_id");
96
+ // No scan of the plugin's own cwd and no implicit access to home/other projects.
97
+ if (!sessionId && (!Array.isArray(app.providers) || (!app.providers.length && !app.origin)))
98
+ return {
99
+ stage: "inspect_project", app_verified: false, environment_created: false,
100
+ message_for_user: "I need the workflow's integration and saved-state details before proposing its rehearsal. No tests have run.",
101
+ agent_next_step: "Inspect the authorized project for providers, actual entry points, saved-state observations and app version. Resolve provider names through list_specs. For a local app use its actual running port with manage_tunnel; for a hosted app use its disposable published origin. Call plan_rehearsal with the same goal and discovered application facts. Do not ask the user for internal IDs, JSON assertions or routine failure scenarios. If no project is accessible, ask for its project/workflow reference, never credentials.",
102
+ };
103
+ // Bound before any environment creation, matching the existing planner's limit.
104
+ const context = { goal: input.goal, ...(app.version ? { app_version: app.version } : {}),
105
+ ...Object.fromEntries(["workflow", "entry_points", "state_store", "fixture_requirements"].filter(k => app[k] !== undefined).map(k => [k, app[k]])) };
106
+ if (Buffer.byteLength(JSON.stringify(context)) > 16384)
107
+ throw new ToolError("The inspected app summary exceeds 16 KiB. Send bounded facts, not raw source.");
108
+ if (sessionId && (app.origin !== undefined || app.providers !== undefined))
109
+ throw new ToolError("A resumed rehearsal keeps its original app and providers. Send only the existing session_id and planning facts; start a fresh session to change its target.");
110
+ if (!sessionId) {
111
+ const created = await runValidateIntegration({ providers: app.providers, app_base_url: app.origin,
112
+ environment_scope: "owner", single_submission: true });
113
+ if (!record(created) || typeof created.session_id !== "string")
114
+ throw new ToolError("The connection response did not include a session identity. Do not automatically create another environment; report the unconfirmed connection.");
115
+ sessionId = exactId(created.session_id, "session_id");
116
+ // Legacy session handovers can include simulated provider keys. The
117
+ // guided path needs only safe guidance here, never credential values.
118
+ const guidance = Object.fromEntries(["coverage_policy", "available_suites", "application_guidance", "application_setup_policy"]
119
+ .filter(key => created[key] !== undefined).map(key => [key, created[key]]));
120
+ return { ...guidance, session_id: sessionId, rehearsal_stage: "connected", app_verified: false,
121
+ message_for_user: "The rehearsal environment is selected. Next I will propose scenarios from the workflow goal and inspected app. No application tests have run.",
122
+ next_tool_call: { tool: "plan_rehearsal", arguments: { goal: input.goal, session_id: sessionId,
123
+ application: Object.fromEntries(Object.entries(app).filter(([key]) => key !== "origin" && key !== "providers")) } },
124
+ };
125
+ }
126
+ try {
127
+ const result = guidedContinuation(await runValidateIntegration({ session_id: sessionId, application_context: context }));
128
+ return record(result) ? { ...result, session_id: sessionId, rehearsal_stage: "planning", app_verified: false,
129
+ review_instruction: "Present a short ordinary-language summary of the goal, critical proposed scenarios and expected saved outcomes first. Ask one blocking business-policy question at a time, only after inspecting the app for discoverable facts; do not paste the whole proposal or make the user design the tests. Keep the full rule list, coverage review, unresolved policy and missing observations available for detail. Summarizing the display must never drop requirements from the frozen contract or hide failed/unmeasured outcomes. A proposal has not run. Use this same session with validate_integration to prepare fixtures and freeze the executable contract; then review the target, scope and observation window before run_rehearsal." } : result;
130
+ }
131
+ catch (error) {
132
+ // Preserve the allocated identity even when planning failed, so a caller
133
+ // can repair in place instead of minting another environment on retry.
134
+ if (error instanceof ToolError && error.status !== 401)
135
+ return { session_id: sessionId, rehearsal_stage: "planning_blocked", app_verified: false,
136
+ message_for_user: "The rehearsal plan could not be retrieved. No application tests were started by this call. Keep this session and inspect its planning failure before continuing.",
137
+ planning_error: error.message, automatic_retry: false };
138
+ throw error;
139
+ }
140
+ }
141
+ if (name === getRehearsalTool.name) {
142
+ knownFields(input, ["session_id", "run_id", "job_id"]);
143
+ if (input.job_id !== undefined) {
144
+ if (input.session_id !== undefined || input.run_id !== undefined)
145
+ throw new ToolError("Retrieve either the returned job_id or the exact session_id/run_id pair, not both.");
146
+ return guidedContinuation(await runGetJob(exactId(input.job_id, "job_id")));
147
+ }
148
+ }
149
+ else if (name !== runRehearsalTool.name && name !== stopRehearsalTool.name) {
150
+ throw new ToolError("Unknown rehearsal action.");
151
+ }
152
+ else
153
+ knownFields(input, ["session_id", "run_id"]);
154
+ const ids = { session_id: exactId(input.session_id, "session_id"), run_id: exactId(input.run_id, "run_id") };
155
+ return guidedContinuation(await runValidateIntegration({ ...ids, single_submission: true,
156
+ ...(name === runRehearsalTool.name ? { execute: true } : {}),
157
+ ...(name === stopRehearsalTool.name ? { cancel: true } : {}) }));
158
+ }
159
+ //# sourceMappingURL=rehearsal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rehearsal.js","sourceRoot":"","sources":["../../src/tools/rehearsal.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,MAAM,QAAQ,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,EAAE,GAAG;IAC7D,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,sEAAsE,EAAW,CAAC;AAC9H,MAAM,iBAAiB,GAAG,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;AAErE,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,2BAA2B;IAC1D,WAAW,EAAE,srBAAsrB;IACnsB,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,oBAAoB,EAAE,K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AC,CAAC;IACpD,MAAM,GAAG,GAAG,EAAC,UAAU,EAAE,OAAO,CAAC,KAAK,CAAC,UAAU,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAC,CAAC;IAC3G,OAAO,kBAAkB,CAAC,MAAM,sBAAsB,CAAC,EAAC,GAAG,GAAG,EAAE,iBAAiB,EAAE,IAAI;QACrF,GAAG,CAAC,IAAI,KAAK,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAC1D,GAAG,CAAC,IAAI,KAAK,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAC,MAAM,EAAE,IAAI,EAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAC,CAAC,CAAC,CAAC;AAClE,CAAC"}
@@ -5,5 +5,7 @@ export interface RepoSignals {
5
5
  at?: string;
6
6
  }>>;
7
7
  }
8
+ /** Installed plugins start in their package; the caller supplies its workspace. */
9
+ export declare function repoSignalRoot(): string;
8
10
  /** Scan the repo for provider presence + per-provider guard presence. */
9
11
  export declare function scanRepoSignals(cwd?: string): RepoSignals;
@@ -14,7 +14,7 @@
14
14
  * Source stays on the machine: only this compact JSON travels.
15
15
  */
16
16
  import { existsSync, readFileSync, readdirSync, statSync } from "fs";
17
- import { join } from "path";
17
+ import { join, resolve } from "path";
18
18
  const DEP_TO_SPEC = {
19
19
  stripe: "stripe",
20
20
  "@stripe/stripe-js": "stripe",
@@ -106,8 +106,12 @@ function walk(root) {
106
106
  }
107
107
  return out;
108
108
  }
109
+ /** Installed plugins start in their package; the caller supplies its workspace. */
110
+ export function repoSignalRoot() {
111
+ return resolve(process.env.FETCHSANDBOX_WORKSPACE_ROOT?.trim() || process.cwd());
112
+ }
109
113
  /** Scan the repo for provider presence + per-provider guard presence. */
110
- export function scanRepoSignals(cwd = process.cwd()) {
114
+ export function scanRepoSignals(cwd = repoSignalRoot()) {
111
115
  const present = new Set();
112
116
  const filesBySpec = {};
113
117
  // presence: manifests
@@ -1 +1 @@
1
- {"version":3,"file":"repo_signals.js","sourceRoot":"","sources":["../../src/tools/repo_signals.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,MAAM,WAAW,GAA2B;IAC1C,MAAM,EAAE,QAAQ;IAChB,mBAAmB,EAAE,QAAQ;IAC7B,yBAAyB,EAAE,QAAQ;IACnC,mBAAmB,EAAE,QAAQ;IAC7B,YAAY,EAAE,QAAQ;IACtB,eAAe,EAAE,OAAO;IACxB,gBAAgB,EAAE,OAAO;IACzB,gBAAgB,EAAE,OAAO;IACzB,uBAAuB,EAAE,OAAO;IAChC,mBAAmB,EAAE,SAAS;IAC9B,qBAAqB,EAAE,SAAS;IAChC,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,WAAW;IACtB,MAAM,EAAE,QAAQ;CACjB,CAAC;AAEF,MAAM,kBAAkB,GAA2B;IACjD,OAAO,EAAE,QAAQ;IACjB,OAAO,EAAE,QAAQ;IACjB,MAAM,EAAE,OAAO;IACf,QAAQ,EAAE,SAAS;IACnB,UAAU,EAAE,WAAW;IACvB,OAAO,EAAE,QAAQ;CAClB,CAAC;AAEF,+EAA+E;AAC/E,MAAM,YAAY,GAA6B;IAC7C,WAAW,EAAE;QACX,kBAAkB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,aAAa;QACzE,aAAa,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,wBAAwB;QACxE,eAAe,EAAE,OAAO,EAAE,UAAU;KACrC;IACD,SAAS,EAAE;QACT,gBAAgB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,WAAW;QACpE,MAAM,EAAE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