@trusty-squire/mcp 1.1.8 → 1.1.9-rc.2

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 (58) hide show
  1. package/README.md +13 -5
  2. package/dist/bot/browser.d.ts +96 -1
  3. package/dist/bot/browser.d.ts.map +1 -1
  4. package/dist/bot/browser.js +420 -1
  5. package/dist/bot/browser.js.map +1 -1
  6. package/dist/bot/operator-recipe.d.ts +27 -975
  7. package/dist/bot/operator-recipe.d.ts.map +1 -1
  8. package/dist/bot/operator-recipe.js +88 -237
  9. package/dist/bot/operator-recipe.js.map +1 -1
  10. package/dist/bot/pay-operator.d.ts +2 -0
  11. package/dist/bot/pay-operator.d.ts.map +1 -1
  12. package/dist/bot/pay-operator.js +9 -5
  13. package/dist/bot/pay-operator.js.map +1 -1
  14. package/dist/bot/provision-session.d.ts +44 -2
  15. package/dist/bot/provision-session.d.ts.map +1 -1
  16. package/dist/bot/provision-session.js +383 -4
  17. package/dist/bot/provision-session.js.map +1 -1
  18. package/dist/skill-registry-client.d.ts +57 -0
  19. package/dist/skill-registry-client.d.ts.map +1 -1
  20. package/dist/skill-registry-client.js +156 -7
  21. package/dist/skill-registry-client.js.map +1 -1
  22. package/dist/tools/provision-drive.d.ts +73 -26
  23. package/dist/tools/provision-drive.d.ts.map +1 -1
  24. package/dist/tools/provision-drive.js +224 -10
  25. package/dist/tools/provision-drive.js.map +1 -1
  26. package/package.json +3 -1
  27. package/dist/eval/replay-harness/corpus.d.ts +0 -7
  28. package/dist/eval/replay-harness/corpus.d.ts.map +0 -1
  29. package/dist/eval/replay-harness/corpus.js +0 -183
  30. package/dist/eval/replay-harness/corpus.js.map +0 -1
  31. package/dist/eval/replay-harness/har-mutate.d.ts +0 -36
  32. package/dist/eval/replay-harness/har-mutate.d.ts.map +0 -1
  33. package/dist/eval/replay-harness/har-mutate.js +0 -119
  34. package/dist/eval/replay-harness/har-mutate.js.map +0 -1
  35. package/dist/eval/replay-harness/har-substrate.d.ts +0 -16
  36. package/dist/eval/replay-harness/har-substrate.d.ts.map +0 -1
  37. package/dist/eval/replay-harness/har-substrate.js +0 -99
  38. package/dist/eval/replay-harness/har-substrate.js.map +0 -1
  39. package/dist/eval/replay-harness/index.d.ts +0 -8
  40. package/dist/eval/replay-harness/index.d.ts.map +0 -1
  41. package/dist/eval/replay-harness/index.js +0 -8
  42. package/dist/eval/replay-harness/index.js.map +0 -1
  43. package/dist/eval/replay-harness/metrics.d.ts +0 -9
  44. package/dist/eval/replay-harness/metrics.d.ts.map +0 -1
  45. package/dist/eval/replay-harness/metrics.js +0 -117
  46. package/dist/eval/replay-harness/metrics.js.map +0 -1
  47. package/dist/eval/replay-harness/reporter.d.ts +0 -4
  48. package/dist/eval/replay-harness/reporter.d.ts.map +0 -1
  49. package/dist/eval/replay-harness/reporter.js +0 -62
  50. package/dist/eval/replay-harness/reporter.js.map +0 -1
  51. package/dist/eval/replay-harness/runner.d.ts +0 -36
  52. package/dist/eval/replay-harness/runner.d.ts.map +0 -1
  53. package/dist/eval/replay-harness/runner.js +0 -167
  54. package/dist/eval/replay-harness/runner.js.map +0 -1
  55. package/dist/eval/replay-harness/types.d.ts +0 -135
  56. package/dist/eval/replay-harness/types.d.ts.map +0 -1
  57. package/dist/eval/replay-harness/types.js +0 -2
  58. package/dist/eval/replay-harness/types.js.map +0 -1
@@ -1,981 +1,14 @@
1
- import { z } from "zod";
2
- export declare const OperatorVerbSchema: z.ZodEnum<["purchase", "get_api_key", "signup", "subscribe", "cancel", "login", "book", "reserve", "renew", "upgrade", "downgrade", "add_to_cart", "checkout", "download", "configure"]>;
3
- export type OperatorVerb = z.infer<typeof OperatorVerbSchema>;
4
- export declare const RecipeHoleSchema: z.ZodObject<{
5
- hole: z.ZodString;
6
- }, "strict", z.ZodTypeAny, {
7
- hole: string;
8
- }, {
9
- hole: string;
10
- }>;
11
- export type RecipeHole = z.infer<typeof RecipeHoleSchema>;
12
- export declare const RecipeValueSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
13
- hole: z.ZodString;
14
- }, "strict", z.ZodTypeAny, {
15
- hole: string;
16
- }, {
17
- hole: string;
18
- }>]>;
19
- export type RecipeValue = z.infer<typeof RecipeValueSchema>;
20
- export declare const RecipeTargetSchema: z.ZodObject<{
21
- dom_hint: z.ZodOptional<z.ZodObject<{
22
- testid: z.ZodOptional<z.ZodString>;
23
- id: z.ZodOptional<z.ZodString>;
24
- name: z.ZodOptional<z.ZodString>;
25
- }, "strict", z.ZodTypeAny, {
26
- id?: string | undefined;
27
- name?: string | undefined;
28
- testid?: string | undefined;
29
- }, {
30
- id?: string | undefined;
31
- name?: string | undefined;
32
- testid?: string | undefined;
33
- }>>;
34
- role_hint: z.ZodOptional<z.ZodString>;
35
- accessible_name: z.ZodOptional<z.ZodString>;
36
- near_text_hint: z.ZodOptional<z.ZodString>;
37
- href_hint: z.ZodOptional<z.ZodString>;
38
- css: z.ZodOptional<z.ZodString>;
39
- visible_text: z.ZodOptional<z.ZodString>;
40
- }, "strict", z.ZodTypeAny, {
41
- css?: string | undefined;
42
- near_text_hint?: string | undefined;
43
- dom_hint?: {
44
- id?: string | undefined;
45
- name?: string | undefined;
46
- testid?: string | undefined;
47
- } | undefined;
48
- role_hint?: string | undefined;
49
- accessible_name?: string | undefined;
50
- href_hint?: string | undefined;
51
- visible_text?: string | undefined;
52
- }, {
53
- css?: string | undefined;
54
- near_text_hint?: string | undefined;
55
- dom_hint?: {
56
- id?: string | undefined;
57
- name?: string | undefined;
58
- testid?: string | undefined;
59
- } | undefined;
60
- role_hint?: string | undefined;
61
- accessible_name?: string | undefined;
62
- href_hint?: string | undefined;
63
- visible_text?: string | undefined;
64
- }>;
65
- export type RecipeTarget = z.infer<typeof RecipeTargetSchema>;
66
- declare const TraceActionSchema: z.ZodObject<{
67
- kind: z.ZodEnum<["goto", "click", "js_click", "type", "press", "oauth_click", "oauth_settle", "allow_host", "type_secret", "select", "set_phone_country", "operate_pay", "scroll", "extract"]>;
68
- text_match: z.ZodOptional<z.ZodString>;
69
- target: z.ZodOptional<z.ZodObject<{
70
- dom_hint: z.ZodOptional<z.ZodObject<{
71
- testid: z.ZodOptional<z.ZodString>;
72
- id: z.ZodOptional<z.ZodString>;
73
- name: z.ZodOptional<z.ZodString>;
74
- }, "strict", z.ZodTypeAny, {
75
- id?: string | undefined;
76
- name?: string | undefined;
77
- testid?: string | undefined;
78
- }, {
79
- id?: string | undefined;
80
- name?: string | undefined;
81
- testid?: string | undefined;
82
- }>>;
83
- role_hint: z.ZodOptional<z.ZodString>;
84
- accessible_name: z.ZodOptional<z.ZodString>;
85
- near_text_hint: z.ZodOptional<z.ZodString>;
86
- href_hint: z.ZodOptional<z.ZodString>;
87
- css: z.ZodOptional<z.ZodString>;
88
- visible_text: z.ZodOptional<z.ZodString>;
89
- }, "strict", z.ZodTypeAny, {
90
- css?: string | undefined;
91
- near_text_hint?: string | undefined;
92
- dom_hint?: {
93
- id?: string | undefined;
94
- name?: string | undefined;
95
- testid?: string | undefined;
96
- } | undefined;
97
- role_hint?: string | undefined;
98
- accessible_name?: string | undefined;
99
- href_hint?: string | undefined;
100
- visible_text?: string | undefined;
101
- }, {
102
- css?: string | undefined;
103
- near_text_hint?: string | undefined;
104
- dom_hint?: {
105
- id?: string | undefined;
106
- name?: string | undefined;
107
- testid?: string | undefined;
108
- } | undefined;
109
- role_hint?: string | undefined;
110
- accessible_name?: string | undefined;
111
- href_hint?: string | undefined;
112
- visible_text?: string | undefined;
113
- }>>;
114
- email_hole: z.ZodOptional<z.ZodString>;
115
- url_template: z.ZodOptional<z.ZodString>;
116
- value: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
117
- hole: z.ZodString;
118
- }, "strict", z.ZodTypeAny, {
119
- hole: string;
120
- }, {
121
- hole: string;
122
- }>]>>;
123
- host: z.ZodOptional<z.ZodString>;
124
- slot: z.ZodOptional<z.ZodString>;
125
- direction: z.ZodOptional<z.ZodEnum<["down", "up", "bottom", "top"]>>;
126
- key: z.ZodOptional<z.ZodString>;
127
- }, "strict", z.ZodTypeAny, {
128
- kind: "type" | "goto" | "click" | "extract" | "select" | "scroll" | "js_click" | "press" | "oauth_click" | "oauth_settle" | "allow_host" | "type_secret" | "set_phone_country" | "operate_pay";
129
- host?: string | undefined;
130
- key?: string | undefined;
131
- slot?: string | undefined;
132
- value?: string | {
133
- hole: string;
134
- } | undefined;
135
- text_match?: string | undefined;
136
- target?: {
137
- css?: string | undefined;
138
- near_text_hint?: string | undefined;
139
- dom_hint?: {
140
- id?: string | undefined;
141
- name?: string | undefined;
142
- testid?: string | undefined;
143
- } | undefined;
144
- role_hint?: string | undefined;
145
- accessible_name?: string | undefined;
146
- href_hint?: string | undefined;
147
- visible_text?: string | undefined;
148
- } | undefined;
149
- email_hole?: string | undefined;
150
- url_template?: string | undefined;
151
- direction?: "down" | "up" | "bottom" | "top" | undefined;
152
- }, {
153
- kind: "type" | "goto" | "click" | "extract" | "select" | "scroll" | "js_click" | "press" | "oauth_click" | "oauth_settle" | "allow_host" | "type_secret" | "set_phone_country" | "operate_pay";
154
- host?: string | undefined;
155
- key?: string | undefined;
156
- slot?: string | undefined;
157
- value?: string | {
158
- hole: string;
159
- } | undefined;
160
- text_match?: string | undefined;
161
- target?: {
162
- css?: string | undefined;
163
- near_text_hint?: string | undefined;
164
- dom_hint?: {
165
- id?: string | undefined;
166
- name?: string | undefined;
167
- testid?: string | undefined;
168
- } | undefined;
169
- role_hint?: string | undefined;
170
- accessible_name?: string | undefined;
171
- href_hint?: string | undefined;
172
- visible_text?: string | undefined;
173
- } | undefined;
174
- email_hole?: string | undefined;
175
- url_template?: string | undefined;
176
- direction?: "down" | "up" | "bottom" | "top" | undefined;
177
- }>;
178
- export type TraceAction = z.infer<typeof TraceActionSchema>;
179
- declare const TraceEntrySchema: z.ZodObject<{
180
- intent: z.ZodOptional<z.ZodString>;
181
- action: z.ZodObject<{
182
- kind: z.ZodEnum<["goto", "click", "js_click", "type", "press", "oauth_click", "oauth_settle", "allow_host", "type_secret", "select", "set_phone_country", "operate_pay", "scroll", "extract"]>;
183
- text_match: z.ZodOptional<z.ZodString>;
184
- target: z.ZodOptional<z.ZodObject<{
185
- dom_hint: z.ZodOptional<z.ZodObject<{
186
- testid: z.ZodOptional<z.ZodString>;
187
- id: z.ZodOptional<z.ZodString>;
188
- name: z.ZodOptional<z.ZodString>;
189
- }, "strict", z.ZodTypeAny, {
190
- id?: string | undefined;
191
- name?: string | undefined;
192
- testid?: string | undefined;
193
- }, {
194
- id?: string | undefined;
195
- name?: string | undefined;
196
- testid?: string | undefined;
197
- }>>;
198
- role_hint: z.ZodOptional<z.ZodString>;
199
- accessible_name: z.ZodOptional<z.ZodString>;
200
- near_text_hint: z.ZodOptional<z.ZodString>;
201
- href_hint: z.ZodOptional<z.ZodString>;
202
- css: z.ZodOptional<z.ZodString>;
203
- visible_text: z.ZodOptional<z.ZodString>;
204
- }, "strict", z.ZodTypeAny, {
205
- css?: string | undefined;
206
- near_text_hint?: string | undefined;
207
- dom_hint?: {
208
- id?: string | undefined;
209
- name?: string | undefined;
210
- testid?: string | undefined;
211
- } | undefined;
212
- role_hint?: string | undefined;
213
- accessible_name?: string | undefined;
214
- href_hint?: string | undefined;
215
- visible_text?: string | undefined;
216
- }, {
217
- css?: string | undefined;
218
- near_text_hint?: string | undefined;
219
- dom_hint?: {
220
- id?: string | undefined;
221
- name?: string | undefined;
222
- testid?: string | undefined;
223
- } | undefined;
224
- role_hint?: string | undefined;
225
- accessible_name?: string | undefined;
226
- href_hint?: string | undefined;
227
- visible_text?: string | undefined;
228
- }>>;
229
- email_hole: z.ZodOptional<z.ZodString>;
230
- url_template: z.ZodOptional<z.ZodString>;
231
- value: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
232
- hole: z.ZodString;
233
- }, "strict", z.ZodTypeAny, {
234
- hole: string;
235
- }, {
236
- hole: string;
237
- }>]>>;
238
- host: z.ZodOptional<z.ZodString>;
239
- slot: z.ZodOptional<z.ZodString>;
240
- direction: z.ZodOptional<z.ZodEnum<["down", "up", "bottom", "top"]>>;
241
- key: z.ZodOptional<z.ZodString>;
242
- }, "strict", z.ZodTypeAny, {
243
- kind: "type" | "goto" | "click" | "extract" | "select" | "scroll" | "js_click" | "press" | "oauth_click" | "oauth_settle" | "allow_host" | "type_secret" | "set_phone_country" | "operate_pay";
244
- host?: string | undefined;
245
- key?: string | undefined;
246
- slot?: string | undefined;
247
- value?: string | {
248
- hole: string;
249
- } | undefined;
250
- text_match?: string | undefined;
251
- target?: {
252
- css?: string | undefined;
253
- near_text_hint?: string | undefined;
254
- dom_hint?: {
255
- id?: string | undefined;
256
- name?: string | undefined;
257
- testid?: string | undefined;
258
- } | undefined;
259
- role_hint?: string | undefined;
260
- accessible_name?: string | undefined;
261
- href_hint?: string | undefined;
262
- visible_text?: string | undefined;
263
- } | undefined;
264
- email_hole?: string | undefined;
265
- url_template?: string | undefined;
266
- direction?: "down" | "up" | "bottom" | "top" | undefined;
267
- }, {
268
- kind: "type" | "goto" | "click" | "extract" | "select" | "scroll" | "js_click" | "press" | "oauth_click" | "oauth_settle" | "allow_host" | "type_secret" | "set_phone_country" | "operate_pay";
269
- host?: string | undefined;
270
- key?: string | undefined;
271
- slot?: string | undefined;
272
- value?: string | {
273
- hole: string;
274
- } | undefined;
275
- text_match?: string | undefined;
276
- target?: {
277
- css?: string | undefined;
278
- near_text_hint?: string | undefined;
279
- dom_hint?: {
280
- id?: string | undefined;
281
- name?: string | undefined;
282
- testid?: string | undefined;
283
- } | undefined;
284
- role_hint?: string | undefined;
285
- accessible_name?: string | undefined;
286
- href_hint?: string | undefined;
287
- visible_text?: string | undefined;
288
- } | undefined;
289
- email_hole?: string | undefined;
290
- url_template?: string | undefined;
291
- direction?: "down" | "up" | "bottom" | "top" | undefined;
292
- }>;
293
- }, "strict", z.ZodTypeAny, {
294
- action: {
295
- kind: "type" | "goto" | "click" | "extract" | "select" | "scroll" | "js_click" | "press" | "oauth_click" | "oauth_settle" | "allow_host" | "type_secret" | "set_phone_country" | "operate_pay";
296
- host?: string | undefined;
297
- key?: string | undefined;
298
- slot?: string | undefined;
299
- value?: string | {
300
- hole: string;
301
- } | undefined;
302
- text_match?: string | undefined;
303
- target?: {
304
- css?: string | undefined;
305
- near_text_hint?: string | undefined;
306
- dom_hint?: {
307
- id?: string | undefined;
308
- name?: string | undefined;
309
- testid?: string | undefined;
310
- } | undefined;
311
- role_hint?: string | undefined;
312
- accessible_name?: string | undefined;
313
- href_hint?: string | undefined;
314
- visible_text?: string | undefined;
315
- } | undefined;
316
- email_hole?: string | undefined;
317
- url_template?: string | undefined;
318
- direction?: "down" | "up" | "bottom" | "top" | undefined;
319
- };
320
- intent?: string | undefined;
321
- }, {
322
- action: {
323
- kind: "type" | "goto" | "click" | "extract" | "select" | "scroll" | "js_click" | "press" | "oauth_click" | "oauth_settle" | "allow_host" | "type_secret" | "set_phone_country" | "operate_pay";
324
- host?: string | undefined;
325
- key?: string | undefined;
326
- slot?: string | undefined;
327
- value?: string | {
328
- hole: string;
329
- } | undefined;
330
- text_match?: string | undefined;
331
- target?: {
332
- css?: string | undefined;
333
- near_text_hint?: string | undefined;
334
- dom_hint?: {
335
- id?: string | undefined;
336
- name?: string | undefined;
337
- testid?: string | undefined;
338
- } | undefined;
339
- role_hint?: string | undefined;
340
- accessible_name?: string | undefined;
341
- href_hint?: string | undefined;
342
- visible_text?: string | undefined;
343
- } | undefined;
344
- email_hole?: string | undefined;
345
- url_template?: string | undefined;
346
- direction?: "down" | "up" | "bottom" | "top" | undefined;
347
- };
348
- intent?: string | undefined;
349
- }>;
350
- export type TraceEntry = z.infer<typeof TraceEntrySchema>;
351
- declare const SuccessSignalSchema: z.ZodUnion<[z.ZodObject<{
352
- field_text: z.ZodString;
353
- min_value_len: z.ZodNumber;
354
- }, "strict", z.ZodTypeAny, {
355
- field_text: string;
356
- min_value_len: number;
357
- }, {
358
- field_text: string;
359
- min_value_len: number;
360
- }>, z.ZodObject<{
361
- text_present: z.ZodString;
362
- }, "strict", z.ZodTypeAny, {
363
- text_present: string;
364
- }, {
365
- text_present: string;
366
- }>, z.ZodObject<{
367
- url_contains: z.ZodString;
368
- }, "strict", z.ZodTypeAny, {
369
- url_contains: string;
370
- }, {
371
- url_contains: string;
372
- }>]>;
373
- export type SuccessSignal = z.infer<typeof SuccessSignalSchema>;
374
- export declare const PostconditionSchema: z.ZodEffects<z.ZodObject<{
375
- kind: z.ZodEnum<["execute_capability", "observe_artifact"]>;
376
- describe: z.ZodString;
377
- success_signal: z.ZodUnion<[z.ZodObject<{
378
- field_text: z.ZodString;
379
- min_value_len: z.ZodNumber;
380
- }, "strict", z.ZodTypeAny, {
381
- field_text: string;
382
- min_value_len: number;
383
- }, {
384
- field_text: string;
385
- min_value_len: number;
386
- }>, z.ZodObject<{
387
- text_present: z.ZodString;
388
- }, "strict", z.ZodTypeAny, {
389
- text_present: string;
390
- }, {
391
- text_present: string;
392
- }>, z.ZodObject<{
393
- url_contains: z.ZodString;
394
- }, "strict", z.ZodTypeAny, {
395
- url_contains: string;
396
- }, {
397
- url_contains: string;
398
- }>]>;
399
- probe_url: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
400
- email_hole: z.ZodOptional<z.ZodString>;
401
- }, "strict", z.ZodTypeAny, {
402
- kind: "execute_capability" | "observe_artifact";
403
- describe: string;
404
- success_signal: {
405
- field_text: string;
406
- min_value_len: number;
407
- } | {
408
- text_present: string;
409
- } | {
410
- url_contains: string;
411
- };
412
- email_hole?: string | undefined;
413
- probe_url?: string | undefined;
414
- }, {
415
- kind: "execute_capability" | "observe_artifact";
416
- describe: string;
417
- success_signal: {
418
- field_text: string;
419
- min_value_len: number;
420
- } | {
421
- text_present: string;
422
- } | {
423
- url_contains: string;
424
- };
425
- email_hole?: string | undefined;
426
- probe_url?: string | undefined;
427
- }>, {
428
- kind: "execute_capability" | "observe_artifact";
429
- describe: string;
430
- success_signal: {
431
- field_text: string;
432
- min_value_len: number;
433
- } | {
434
- text_present: string;
435
- } | {
436
- url_contains: string;
437
- };
438
- email_hole?: string | undefined;
439
- probe_url?: string | undefined;
440
- }, {
441
- kind: "execute_capability" | "observe_artifact";
442
- describe: string;
443
- success_signal: {
444
- field_text: string;
445
- min_value_len: number;
446
- } | {
447
- text_present: string;
448
- } | {
449
- url_contains: string;
450
- };
451
- email_hole?: string | undefined;
452
- probe_url?: string | undefined;
453
- }>;
454
- export type Postcondition = z.infer<typeof PostconditionSchema>;
455
- declare const SecretRefSchema: z.ZodObject<{
456
- slot: z.ZodString;
457
- sealed_from: z.ZodOptional<z.ZodString>;
458
- stored: z.ZodLiteral<false>;
459
- }, "strict", z.ZodTypeAny, {
460
- slot: string;
461
- stored: false;
462
- sealed_from?: string | undefined;
463
- }, {
464
- slot: string;
465
- stored: false;
466
- sealed_from?: string | undefined;
467
- }>;
468
- export type SecretRef = z.infer<typeof SecretRefSchema>;
469
- export declare const OperatorRecipeSchema: z.ZodEffects<z.ZodObject<{
470
- name: z.ZodString;
471
- schema_version: z.ZodLiteral<1>;
472
- goal: z.ZodString;
473
- verb: z.ZodOptional<z.ZodEnum<["purchase", "get_api_key", "signup", "subscribe", "cancel", "login", "book", "reserve", "renew", "upgrade", "downgrade", "add_to_cart", "checkout", "download", "configure"]>>;
474
- domain: z.ZodOptional<z.ZodString>;
475
- entry_url: z.ZodOptional<z.ZodString>;
476
- entry_mode: z.ZodOptional<z.ZodLiteral<"runtime_service_url">>;
477
- allowed_hosts: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
478
- trace: z.ZodArray<z.ZodObject<{
479
- intent: z.ZodOptional<z.ZodString>;
480
- action: z.ZodObject<{
481
- kind: z.ZodEnum<["goto", "click", "js_click", "type", "press", "oauth_click", "oauth_settle", "allow_host", "type_secret", "select", "set_phone_country", "operate_pay", "scroll", "extract"]>;
482
- text_match: z.ZodOptional<z.ZodString>;
483
- target: z.ZodOptional<z.ZodObject<{
484
- dom_hint: z.ZodOptional<z.ZodObject<{
485
- testid: z.ZodOptional<z.ZodString>;
486
- id: z.ZodOptional<z.ZodString>;
487
- name: z.ZodOptional<z.ZodString>;
488
- }, "strict", z.ZodTypeAny, {
489
- id?: string | undefined;
490
- name?: string | undefined;
491
- testid?: string | undefined;
492
- }, {
493
- id?: string | undefined;
494
- name?: string | undefined;
495
- testid?: string | undefined;
496
- }>>;
497
- role_hint: z.ZodOptional<z.ZodString>;
498
- accessible_name: z.ZodOptional<z.ZodString>;
499
- near_text_hint: z.ZodOptional<z.ZodString>;
500
- href_hint: z.ZodOptional<z.ZodString>;
501
- css: z.ZodOptional<z.ZodString>;
502
- visible_text: z.ZodOptional<z.ZodString>;
503
- }, "strict", z.ZodTypeAny, {
504
- css?: string | undefined;
505
- near_text_hint?: string | undefined;
506
- dom_hint?: {
507
- id?: string | undefined;
508
- name?: string | undefined;
509
- testid?: string | undefined;
510
- } | undefined;
511
- role_hint?: string | undefined;
512
- accessible_name?: string | undefined;
513
- href_hint?: string | undefined;
514
- visible_text?: string | undefined;
515
- }, {
516
- css?: string | undefined;
517
- near_text_hint?: string | undefined;
518
- dom_hint?: {
519
- id?: string | undefined;
520
- name?: string | undefined;
521
- testid?: string | undefined;
522
- } | undefined;
523
- role_hint?: string | undefined;
524
- accessible_name?: string | undefined;
525
- href_hint?: string | undefined;
526
- visible_text?: string | undefined;
527
- }>>;
528
- email_hole: z.ZodOptional<z.ZodString>;
529
- url_template: z.ZodOptional<z.ZodString>;
530
- value: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
531
- hole: z.ZodString;
532
- }, "strict", z.ZodTypeAny, {
533
- hole: string;
534
- }, {
535
- hole: string;
536
- }>]>>;
537
- host: z.ZodOptional<z.ZodString>;
538
- slot: z.ZodOptional<z.ZodString>;
539
- direction: z.ZodOptional<z.ZodEnum<["down", "up", "bottom", "top"]>>;
540
- key: z.ZodOptional<z.ZodString>;
541
- }, "strict", z.ZodTypeAny, {
542
- kind: "type" | "goto" | "click" | "extract" | "select" | "scroll" | "js_click" | "press" | "oauth_click" | "oauth_settle" | "allow_host" | "type_secret" | "set_phone_country" | "operate_pay";
543
- host?: string | undefined;
544
- key?: string | undefined;
545
- slot?: string | undefined;
546
- value?: string | {
547
- hole: string;
548
- } | undefined;
549
- text_match?: string | undefined;
550
- target?: {
551
- css?: string | undefined;
552
- near_text_hint?: string | undefined;
553
- dom_hint?: {
554
- id?: string | undefined;
555
- name?: string | undefined;
556
- testid?: string | undefined;
557
- } | undefined;
558
- role_hint?: string | undefined;
559
- accessible_name?: string | undefined;
560
- href_hint?: string | undefined;
561
- visible_text?: string | undefined;
562
- } | undefined;
563
- email_hole?: string | undefined;
564
- url_template?: string | undefined;
565
- direction?: "down" | "up" | "bottom" | "top" | undefined;
566
- }, {
567
- kind: "type" | "goto" | "click" | "extract" | "select" | "scroll" | "js_click" | "press" | "oauth_click" | "oauth_settle" | "allow_host" | "type_secret" | "set_phone_country" | "operate_pay";
568
- host?: string | undefined;
569
- key?: string | undefined;
570
- slot?: string | undefined;
571
- value?: string | {
572
- hole: string;
573
- } | undefined;
574
- text_match?: string | undefined;
575
- target?: {
576
- css?: string | undefined;
577
- near_text_hint?: string | undefined;
578
- dom_hint?: {
579
- id?: string | undefined;
580
- name?: string | undefined;
581
- testid?: string | undefined;
582
- } | undefined;
583
- role_hint?: string | undefined;
584
- accessible_name?: string | undefined;
585
- href_hint?: string | undefined;
586
- visible_text?: string | undefined;
587
- } | undefined;
588
- email_hole?: string | undefined;
589
- url_template?: string | undefined;
590
- direction?: "down" | "up" | "bottom" | "top" | undefined;
591
- }>;
592
- }, "strict", z.ZodTypeAny, {
593
- action: {
594
- kind: "type" | "goto" | "click" | "extract" | "select" | "scroll" | "js_click" | "press" | "oauth_click" | "oauth_settle" | "allow_host" | "type_secret" | "set_phone_country" | "operate_pay";
595
- host?: string | undefined;
596
- key?: string | undefined;
597
- slot?: string | undefined;
598
- value?: string | {
599
- hole: string;
600
- } | undefined;
601
- text_match?: string | undefined;
602
- target?: {
603
- css?: string | undefined;
604
- near_text_hint?: string | undefined;
605
- dom_hint?: {
606
- id?: string | undefined;
607
- name?: string | undefined;
608
- testid?: string | undefined;
609
- } | undefined;
610
- role_hint?: string | undefined;
611
- accessible_name?: string | undefined;
612
- href_hint?: string | undefined;
613
- visible_text?: string | undefined;
614
- } | undefined;
615
- email_hole?: string | undefined;
616
- url_template?: string | undefined;
617
- direction?: "down" | "up" | "bottom" | "top" | undefined;
618
- };
619
- intent?: string | undefined;
620
- }, {
621
- action: {
622
- kind: "type" | "goto" | "click" | "extract" | "select" | "scroll" | "js_click" | "press" | "oauth_click" | "oauth_settle" | "allow_host" | "type_secret" | "set_phone_country" | "operate_pay";
623
- host?: string | undefined;
624
- key?: string | undefined;
625
- slot?: string | undefined;
626
- value?: string | {
627
- hole: string;
628
- } | undefined;
629
- text_match?: string | undefined;
630
- target?: {
631
- css?: string | undefined;
632
- near_text_hint?: string | undefined;
633
- dom_hint?: {
634
- id?: string | undefined;
635
- name?: string | undefined;
636
- testid?: string | undefined;
637
- } | undefined;
638
- role_hint?: string | undefined;
639
- accessible_name?: string | undefined;
640
- href_hint?: string | undefined;
641
- visible_text?: string | undefined;
642
- } | undefined;
643
- email_hole?: string | undefined;
644
- url_template?: string | undefined;
645
- direction?: "down" | "up" | "bottom" | "top" | undefined;
646
- };
647
- intent?: string | undefined;
648
- }>, "many">;
649
- secrets: z.ZodDefault<z.ZodArray<z.ZodObject<{
650
- slot: z.ZodString;
651
- sealed_from: z.ZodOptional<z.ZodString>;
652
- stored: z.ZodLiteral<false>;
653
- }, "strict", z.ZodTypeAny, {
654
- slot: string;
655
- stored: false;
656
- sealed_from?: string | undefined;
657
- }, {
658
- slot: string;
659
- stored: false;
660
- sealed_from?: string | undefined;
661
- }>, "many">>;
662
- postcondition: z.ZodEffects<z.ZodObject<{
663
- kind: z.ZodEnum<["execute_capability", "observe_artifact"]>;
664
- describe: z.ZodString;
665
- success_signal: z.ZodUnion<[z.ZodObject<{
666
- field_text: z.ZodString;
667
- min_value_len: z.ZodNumber;
668
- }, "strict", z.ZodTypeAny, {
669
- field_text: string;
670
- min_value_len: number;
671
- }, {
672
- field_text: string;
673
- min_value_len: number;
674
- }>, z.ZodObject<{
675
- text_present: z.ZodString;
676
- }, "strict", z.ZodTypeAny, {
677
- text_present: string;
678
- }, {
679
- text_present: string;
680
- }>, z.ZodObject<{
681
- url_contains: z.ZodString;
682
- }, "strict", z.ZodTypeAny, {
683
- url_contains: string;
684
- }, {
685
- url_contains: string;
686
- }>]>;
687
- probe_url: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
688
- email_hole: z.ZodOptional<z.ZodString>;
689
- }, "strict", z.ZodTypeAny, {
690
- kind: "execute_capability" | "observe_artifact";
691
- describe: string;
692
- success_signal: {
693
- field_text: string;
694
- min_value_len: number;
695
- } | {
696
- text_present: string;
697
- } | {
698
- url_contains: string;
699
- };
700
- email_hole?: string | undefined;
701
- probe_url?: string | undefined;
702
- }, {
703
- kind: "execute_capability" | "observe_artifact";
704
- describe: string;
705
- success_signal: {
706
- field_text: string;
707
- min_value_len: number;
708
- } | {
709
- text_present: string;
710
- } | {
711
- url_contains: string;
712
- };
713
- email_hole?: string | undefined;
714
- probe_url?: string | undefined;
715
- }>, {
716
- kind: "execute_capability" | "observe_artifact";
717
- describe: string;
718
- success_signal: {
719
- field_text: string;
720
- min_value_len: number;
721
- } | {
722
- text_present: string;
723
- } | {
724
- url_contains: string;
725
- };
726
- email_hole?: string | undefined;
727
- probe_url?: string | undefined;
728
- }, {
729
- kind: "execute_capability" | "observe_artifact";
730
- describe: string;
731
- success_signal: {
732
- field_text: string;
733
- min_value_len: number;
734
- } | {
735
- text_present: string;
736
- } | {
737
- url_contains: string;
738
- };
739
- email_hole?: string | undefined;
740
- probe_url?: string | undefined;
741
- }>;
742
- }, "strict", z.ZodTypeAny, {
743
- name: string;
744
- trace: {
745
- action: {
746
- kind: "type" | "goto" | "click" | "extract" | "select" | "scroll" | "js_click" | "press" | "oauth_click" | "oauth_settle" | "allow_host" | "type_secret" | "set_phone_country" | "operate_pay";
747
- host?: string | undefined;
748
- key?: string | undefined;
749
- slot?: string | undefined;
750
- value?: string | {
751
- hole: string;
752
- } | undefined;
753
- text_match?: string | undefined;
754
- target?: {
755
- css?: string | undefined;
756
- near_text_hint?: string | undefined;
757
- dom_hint?: {
758
- id?: string | undefined;
759
- name?: string | undefined;
760
- testid?: string | undefined;
761
- } | undefined;
762
- role_hint?: string | undefined;
763
- accessible_name?: string | undefined;
764
- href_hint?: string | undefined;
765
- visible_text?: string | undefined;
766
- } | undefined;
767
- email_hole?: string | undefined;
768
- url_template?: string | undefined;
769
- direction?: "down" | "up" | "bottom" | "top" | undefined;
770
- };
771
- intent?: string | undefined;
772
- }[];
773
- schema_version: 1;
774
- goal: string;
775
- allowed_hosts: string[];
776
- secrets: {
777
- slot: string;
778
- stored: false;
779
- sealed_from?: string | undefined;
780
- }[];
781
- postcondition: {
782
- kind: "execute_capability" | "observe_artifact";
783
- describe: string;
784
- success_signal: {
785
- field_text: string;
786
- min_value_len: number;
787
- } | {
788
- text_present: string;
789
- } | {
790
- url_contains: string;
791
- };
792
- email_hole?: string | undefined;
793
- probe_url?: string | undefined;
794
- };
795
- verb?: "download" | "signup" | "login" | "purchase" | "get_api_key" | "subscribe" | "cancel" | "book" | "reserve" | "renew" | "upgrade" | "downgrade" | "add_to_cart" | "checkout" | "configure" | undefined;
796
- domain?: string | undefined;
797
- entry_url?: string | undefined;
798
- entry_mode?: "runtime_service_url" | undefined;
799
- }, {
800
- name: string;
801
- trace: {
802
- action: {
803
- kind: "type" | "goto" | "click" | "extract" | "select" | "scroll" | "js_click" | "press" | "oauth_click" | "oauth_settle" | "allow_host" | "type_secret" | "set_phone_country" | "operate_pay";
804
- host?: string | undefined;
805
- key?: string | undefined;
806
- slot?: string | undefined;
807
- value?: string | {
808
- hole: string;
809
- } | undefined;
810
- text_match?: string | undefined;
811
- target?: {
812
- css?: string | undefined;
813
- near_text_hint?: string | undefined;
814
- dom_hint?: {
815
- id?: string | undefined;
816
- name?: string | undefined;
817
- testid?: string | undefined;
818
- } | undefined;
819
- role_hint?: string | undefined;
820
- accessible_name?: string | undefined;
821
- href_hint?: string | undefined;
822
- visible_text?: string | undefined;
823
- } | undefined;
824
- email_hole?: string | undefined;
825
- url_template?: string | undefined;
826
- direction?: "down" | "up" | "bottom" | "top" | undefined;
827
- };
828
- intent?: string | undefined;
829
- }[];
830
- schema_version: 1;
831
- goal: string;
832
- postcondition: {
833
- kind: "execute_capability" | "observe_artifact";
834
- describe: string;
835
- success_signal: {
836
- field_text: string;
837
- min_value_len: number;
838
- } | {
839
- text_present: string;
840
- } | {
841
- url_contains: string;
842
- };
843
- email_hole?: string | undefined;
844
- probe_url?: string | undefined;
845
- };
846
- verb?: "download" | "signup" | "login" | "purchase" | "get_api_key" | "subscribe" | "cancel" | "book" | "reserve" | "renew" | "upgrade" | "downgrade" | "add_to_cart" | "checkout" | "configure" | undefined;
847
- domain?: string | undefined;
848
- entry_url?: string | undefined;
849
- entry_mode?: "runtime_service_url" | undefined;
850
- allowed_hosts?: string[] | undefined;
851
- secrets?: {
852
- slot: string;
853
- stored: false;
854
- sealed_from?: string | undefined;
855
- }[] | undefined;
856
- }>, {
857
- name: string;
858
- trace: {
859
- action: {
860
- kind: "type" | "goto" | "click" | "extract" | "select" | "scroll" | "js_click" | "press" | "oauth_click" | "oauth_settle" | "allow_host" | "type_secret" | "set_phone_country" | "operate_pay";
861
- host?: string | undefined;
862
- key?: string | undefined;
863
- slot?: string | undefined;
864
- value?: string | {
865
- hole: string;
866
- } | undefined;
867
- text_match?: string | undefined;
868
- target?: {
869
- css?: string | undefined;
870
- near_text_hint?: string | undefined;
871
- dom_hint?: {
872
- id?: string | undefined;
873
- name?: string | undefined;
874
- testid?: string | undefined;
875
- } | undefined;
876
- role_hint?: string | undefined;
877
- accessible_name?: string | undefined;
878
- href_hint?: string | undefined;
879
- visible_text?: string | undefined;
880
- } | undefined;
881
- email_hole?: string | undefined;
882
- url_template?: string | undefined;
883
- direction?: "down" | "up" | "bottom" | "top" | undefined;
884
- };
885
- intent?: string | undefined;
886
- }[];
887
- schema_version: 1;
888
- goal: string;
889
- allowed_hosts: string[];
890
- secrets: {
891
- slot: string;
892
- stored: false;
893
- sealed_from?: string | undefined;
894
- }[];
895
- postcondition: {
896
- kind: "execute_capability" | "observe_artifact";
897
- describe: string;
898
- success_signal: {
899
- field_text: string;
900
- min_value_len: number;
901
- } | {
902
- text_present: string;
903
- } | {
904
- url_contains: string;
905
- };
906
- email_hole?: string | undefined;
907
- probe_url?: string | undefined;
908
- };
909
- verb?: "download" | "signup" | "login" | "purchase" | "get_api_key" | "subscribe" | "cancel" | "book" | "reserve" | "renew" | "upgrade" | "downgrade" | "add_to_cart" | "checkout" | "configure" | undefined;
910
- domain?: string | undefined;
911
- entry_url?: string | undefined;
912
- entry_mode?: "runtime_service_url" | undefined;
913
- }, {
914
- name: string;
915
- trace: {
916
- action: {
917
- kind: "type" | "goto" | "click" | "extract" | "select" | "scroll" | "js_click" | "press" | "oauth_click" | "oauth_settle" | "allow_host" | "type_secret" | "set_phone_country" | "operate_pay";
918
- host?: string | undefined;
919
- key?: string | undefined;
920
- slot?: string | undefined;
921
- value?: string | {
922
- hole: string;
923
- } | undefined;
924
- text_match?: string | undefined;
925
- target?: {
926
- css?: string | undefined;
927
- near_text_hint?: string | undefined;
928
- dom_hint?: {
929
- id?: string | undefined;
930
- name?: string | undefined;
931
- testid?: string | undefined;
932
- } | undefined;
933
- role_hint?: string | undefined;
934
- accessible_name?: string | undefined;
935
- href_hint?: string | undefined;
936
- visible_text?: string | undefined;
937
- } | undefined;
938
- email_hole?: string | undefined;
939
- url_template?: string | undefined;
940
- direction?: "down" | "up" | "bottom" | "top" | undefined;
941
- };
942
- intent?: string | undefined;
943
- }[];
944
- schema_version: 1;
945
- goal: string;
946
- postcondition: {
947
- kind: "execute_capability" | "observe_artifact";
948
- describe: string;
949
- success_signal: {
950
- field_text: string;
951
- min_value_len: number;
952
- } | {
953
- text_present: string;
954
- } | {
955
- url_contains: string;
956
- };
957
- email_hole?: string | undefined;
958
- probe_url?: string | undefined;
959
- };
960
- verb?: "download" | "signup" | "login" | "purchase" | "get_api_key" | "subscribe" | "cancel" | "book" | "reserve" | "renew" | "upgrade" | "downgrade" | "add_to_cart" | "checkout" | "configure" | undefined;
961
- domain?: string | undefined;
962
- entry_url?: string | undefined;
963
- entry_mode?: "runtime_service_url" | undefined;
964
- allowed_hosts?: string[] | undefined;
965
- secrets?: {
966
- slot: string;
967
- stored: false;
968
- sealed_from?: string | undefined;
969
- }[] | undefined;
970
- }>;
971
- export type OperatorRecipe = z.infer<typeof OperatorRecipeSchema>;
1
+ import { OperatorVerbSchema, RecipeHoleSchema, RecipeValueSchema, RecipeTargetSchema, PostconditionSchema, OperatorRecipeSchema, operatorRecipeDomain, operatorRecipeKey, operatorRecipeKeyForDomain, checkoutFieldSetSignature, isCheckoutShapeKey, checkoutShapeKey, operatorRecipeKeyForCheckoutShape, isRecipeShareEligible, isSameRecipeDomain, recipeDomainLockViolations, isRecipeDomainLocked, EmailAliasTemplatePattern, type OperatorVerb, type RecipeHole, type RecipeValue, type RecipeTarget, type TraceAction, type TraceEntry, type SuccessSignal, type Postcondition, type SecretRef, type OperatorRecipe, type RecipeShareEligibility, type RecipeDomainLockViolation } from "@trusty-squire/recipe-schema";
2
+ export { OperatorVerbSchema, RecipeHoleSchema, RecipeValueSchema, RecipeTargetSchema, PostconditionSchema, OperatorRecipeSchema, operatorRecipeDomain, operatorRecipeKey, operatorRecipeKeyForDomain, checkoutFieldSetSignature, isCheckoutShapeKey, checkoutShapeKey, operatorRecipeKeyForCheckoutShape, isRecipeShareEligible, isSameRecipeDomain, recipeDomainLockViolations, isRecipeDomainLocked, EmailAliasTemplatePattern, };
3
+ export type { OperatorVerb, RecipeHole, RecipeValue, RecipeTarget, TraceAction, TraceEntry, SuccessSignal, Postcondition, SecretRef, OperatorRecipe, RecipeShareEligibility, RecipeDomainLockViolation, };
972
4
  export declare function operatorRecipeDir(): string;
973
- /** Public-Suffix-List-backed local recipe domain; registry service slugs are unrelated. */
974
- export declare function operatorRecipeDomain(url: string): string;
975
- export declare function operatorRecipeKey(verb: OperatorVerb, url: string): string;
976
5
  export declare function writeRecipe(recipe: OperatorRecipe): Promise<string>;
977
6
  export declare function readRecipe(name: string): Promise<OperatorRecipe>;
7
+ /** Read + parse a recipe from an exact file path (the shape `writeRecipe` returns). */
8
+ export declare function readRecipeFromFile(file: string): Promise<OperatorRecipe>;
978
9
  export declare function readRecipeForTask(verb: OperatorVerb, serviceUrl: string): Promise<OperatorRecipe>;
10
+ /** replay-per-leg-signature — local read of a checkout-leg recipe, keyed by field-set signature. */
11
+ export declare function readRecipeForCheckoutShape(verb: OperatorVerb, signature: string): Promise<OperatorRecipe>;
979
12
  export declare function listRecipes(): Promise<string[]>;
980
13
  export declare function renderOperatorRecipeHint(recipe: OperatorRecipe): string;
981
14
  export interface PostconditionSnapshot {
@@ -1030,11 +63,31 @@ export interface RecipeTargetElement {
1030
63
  selector: string;
1031
64
  value?: string | null;
1032
65
  selectedOptionText?: string | null;
66
+ /** HTML autocomplete attribute (may be space-separated tokens). */
67
+ autocomplete?: string | null;
68
+ /** HTML input type (or null for non-inputs). */
69
+ type?: string | null;
70
+ /** Optional site-authored stable role attribute (data-role / data-field-role). */
71
+ dataRole?: string | null;
1033
72
  }
1034
73
  export type RecipeTargetResolution<T extends RecipeTargetElement> = {
1035
74
  element: T;
1036
75
  via: "testid" | "id" | "name" | "role+accessible-name" | "href" | "css" | "visible-text";
1037
76
  };
77
+ /**
78
+ * Locale-stable field-role signal for money-path fill safety.
79
+ *
80
+ * Priority (never visible label text — that breaks EN→JP cross-locale reuse):
81
+ * 1. autocomplete token (given-name, family-name, postal-code, …)
82
+ * 2. data-role / data-field-role attribute
83
+ * 3. distinguishing input type (email, tel, number, …) — not plain "text"
84
+ *
85
+ * Returns null when nothing stable is available. Callers must treat null as a
86
+ * miss: absence of proof is not proof of identity.
87
+ */
88
+ export declare function localeStableFieldRole(element: Pick<RecipeTargetElement, "autocomplete" | "type" | "dataRole">): string | null;
89
+ /** True only when both sides have a role signal and they agree exactly. */
90
+ export declare function fieldRoleMatches(recorded: string | undefined, element: Pick<RecipeTargetElement, "autocomplete" | "type" | "dataRole">): boolean;
1038
91
  /** Ordered fallback. It is intentionally not a weighted/scored matcher. */
1039
92
  export declare function resolveRecipeTarget<T extends RecipeTargetElement>(elements: readonly T[], target: RecipeTarget): RecipeTargetResolution<T> | null;
1040
93
  export declare function resolveRecipeFieldTarget<T extends RecipeTargetElement>(elements: readonly T[], target: RecipeTarget): RecipeTargetResolution<T> | null;
@@ -1057,5 +110,4 @@ export type FieldValueVerification = {
1057
110
  export declare function verifyFilledFieldValues(elements: readonly RecipeTargetElement[], expectedFields: readonly FilledFieldExpectation[]): FieldValueVerification;
1058
111
  export declare function isSingleUseUrl(rawUrl: string): boolean;
1059
112
  export declare function recipeEntryUrl(recipe: OperatorRecipe, runtimeServiceUrl?: string): string | null;
1060
- export {};
1061
113
  //# sourceMappingURL=operator-recipe.d.ts.map