@redocly/replay 0.29.0-next.9 → 0.30.0-next.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 (61) hide show
  1. package/dist/{replay-AiChatProvider-DAWT4hAb.js → replay-AiChatProvider--LgX8A8I.js} +2 -2
  2. package/dist/{replay-AiChatProvider-BDqzEpdu.js → replay-AiChatProvider-D7Pa4BSi.js} +8 -8
  3. package/dist/{replay-AiChatSqliteDBStorage-Dkz4d7Rx.js → replay-AiChatSqliteDBStorage-BtTQLkOQ.js} +1 -1
  4. package/dist/{replay-AiChatSqliteDBStorage-BJ0kltvn.js → replay-AiChatSqliteDBStorage-CFle7AkQ.js} +1 -1
  5. package/dist/{replay-AiPanel-C5wMkLIc.js → replay-AiPanel-DKOom3XE.js} +6 -7
  6. package/dist/{replay-AiPanel-CkVIJhGF.js → replay-AiPanel-MAf1O3X7.js} +2 -3
  7. package/dist/{replay-FileWatcher-D3FVyQbX.js → replay-FileWatcher-Bi1Awm1g.js} +2 -2
  8. package/dist/{replay-FileWatcher-DW7u83d1.js → replay-FileWatcher-D3vYo_rm.js} +1 -1
  9. package/dist/{replay-SemanticSearchService-DgroPziI.js → replay-SemanticSearchService-4RHUNPxQ.js} +6 -9
  10. package/dist/replay-SemanticSearchService-CEwTcXh1.js +1 -0
  11. package/dist/{replay-SqliteDBStorage-CXZGasJG.js → replay-SqliteDBStorage-Ckb4-uGs.js} +1 -1
  12. package/dist/{replay-SqliteDBStorage-BG22uvLP.js → replay-SqliteDBStorage-npzhoUbx.js} +1 -1
  13. package/dist/{replay-TauriFileSystemAdapter-BY888O_1.js → replay-TauriFileSystemAdapter-BVKa-J8G.js} +1 -1
  14. package/dist/{replay-TauriFileSystemAdapter-CGGDSxKe.js → replay-TauriFileSystemAdapter-hBzFy5dq.js} +1 -1
  15. package/dist/{replay-TauriRootStorage-DaKRlo3-.js → replay-TauriRootStorage-BSBhzg4_.js} +2 -2
  16. package/dist/{replay-TauriRootStorage-CnLeXsev.js → replay-TauriRootStorage-C8nZhzW9.js} +1 -1
  17. package/dist/{replay-agent-loop-CzPV4LI2.js → replay-agent-loop-BClVMyB_.js} +5 -6
  18. package/dist/{replay-agent-loop-D1h5J-uE.js → replay-agent-loop-D0ooRyaR.js} +1 -1
  19. package/dist/{replay-ai-chat-mappers-DsLIxLaN.js → replay-ai-chat-mappers-BaS0SBBN.js} +1 -1
  20. package/dist/{replay-ai-chat-mappers-BlVOCvVt.js → replay-ai-chat-mappers-DSJXgXDi.js} +1 -1
  21. package/dist/{replay-create-model-_BaJNmZq.js → replay-create-model-B16cfxY1.js} +3 -3
  22. package/dist/{replay-create-model-KIUQ2An5.js → replay-create-model-dCrhNa4v.js} +3 -3
  23. package/dist/{replay-db-DoLsw4tF.js → replay-db-BcTQQjOZ.js} +1 -1
  24. package/dist/{replay-db-CroFZCLK.js → replay-db-C0Ufsv6d.js} +1 -1
  25. package/dist/{replay-external-resolver-BwZvmuC9.js → replay-external-resolver-BUSmyZ4o.js} +1 -1
  26. package/dist/{replay-external-resolver-DUzbkx07.js → replay-external-resolver-lsrzcHGV.js} +2 -2
  27. package/dist/{replay-index-BBDKuDcc.js → replay-index-0jSH5fMy.js} +1 -1
  28. package/dist/replay-index-3nHwbL4Q.js +4 -0
  29. package/dist/{replay-index-DjHbio61.js → replay-index-BOCfRuh5.js} +1 -1
  30. package/dist/{replay-index-B8puA2u2.js → replay-index-BykL_Zfq.js} +1 -1
  31. package/dist/{replay-index-VCzOY16S.js → replay-index-C2w9vpTi.js} +22417 -21859
  32. package/dist/{replay-index-zmQXrIpO.js → replay-index-CS_msisY.js} +1 -1
  33. package/dist/{replay-index-zSldZ9CB.js → replay-index-CaM9uKKg.js} +1 -1
  34. package/dist/{replay-index-SX6LT-jT.js → replay-index-ClCfKhUI.js} +5 -5
  35. package/dist/{replay-index-B1cRNYAB.js → replay-index-CrWBueeN.js} +1 -1
  36. package/dist/{replay-index-54ROnLOe.js → replay-index-HnPW_cXS.js} +1223 -1168
  37. package/dist/{replay-index-BI0q2SFK.js → replay-index-NC0f8Qjs.js} +1 -1
  38. package/dist/{replay-index-AuXMzqmR.js → replay-index-_vrprcIj.js} +1 -1
  39. package/dist/{replay-lint-YAy8-Dtq.js → replay-lint-D8bDzG-0.js} +3635 -3635
  40. package/dist/{replay-lint-graphql-Bpd88C9w.js → replay-lint-graphql-DTEuN3l4.js} +2 -2
  41. package/dist/{replay-lint-graphql-CZBwQl0k.js → replay-lint-graphql-icJF6g0k.js} +1 -1
  42. package/dist/{replay-lint-C8g-xqrP.js → replay-lint-mRsw2YBg.js} +55 -55
  43. package/dist/{replay-periodic-revalidation-BzoE_vj1.js → replay-periodic-revalidation-Cnqp6anx.js} +1 -1
  44. package/dist/{replay-periodic-revalidation-CNYI9Ked.js → replay-periodic-revalidation-CvEqq27n.js} +1 -1
  45. package/dist/replay-resolve-DNzrSK76.js +47 -0
  46. package/dist/{replay-resolve-DrE6Bsmy.js → replay-resolve-DiS3OBIs.js} +1008 -1000
  47. package/dist/{replay-respect-run-tWrs79VV.js → replay-respect-run-BJ_mc6pJ.js} +1 -1
  48. package/dist/{replay-respect-run-DIYJQvbB.js → replay-respect-run-DVK6Dxvo.js} +3 -3
  49. package/dist/{replay-tauri-path-6SQ7odaf.js → replay-tauri-path-AxOlEPjw.js} +2 -2
  50. package/dist/{replay-tauri-path-Duj7dsaA.js → replay-tauri-path-BQXBIioc.js} +1 -1
  51. package/dist/{replay-useAiChatQueries-B1XeG3iY.js → replay-useAiChatQueries-BPdWvgNH.js} +457 -463
  52. package/dist/{replay-useAiChatQueries-__VXRF5i.js → replay-useAiChatQueries-CYKuFusQ.js} +12 -12
  53. package/dist/{replay-validate-key-Dl8sa_9N.js → replay-validate-key-BP9xVq6g.js} +2 -2
  54. package/dist/{replay-validate-key-BGMRyGdn.js → replay-validate-key-BZyaia8o.js} +1 -1
  55. package/dist/replay.cjs +1 -1
  56. package/dist/replay.d.ts +6 -1
  57. package/dist/replay.js +1 -1
  58. package/package.json +4 -5
  59. package/dist/replay-SemanticSearchService-DAt35B37.js +0 -1
  60. package/dist/replay-index-Cj1-cwJH.js +0 -4
  61. package/dist/replay-resolve-jATjJR5l.js +0 -47
@@ -1,8 +1,8 @@
1
1
  import { useContext as zt, createContext as Ht } from "react";
2
- import { R as Gt, A as be, aR as se, aS as Vt, aT as Kt, aU as Jt, ac as x, a as ue, aH as Y, aV as pt, aW as Oe, aG as Ae, aX as ft, aY as pe, aZ as ee, c as b, a_ as Qt, an as G, al as V, a$ as mt, b0 as fe, am as Ee, b1 as Xt, b2 as Zt, b3 as eo, b4 as to, b5 as oo, b6 as no, b7 as ro, af as K, b8 as so, ag as te, aa as ao, b9 as io, ba as co, bb as ht, bc as It, bd as lo, be as wt, bf as yt, bg as uo, ai as J, bh as po, ab as vt, bi as $e, aB as gt, bj as fo, bk as mo, bl as Me, F as k, bm as Fe, bn as ho, bo as Be, bp as Io, bq as wo, br as yo, a9 as bt, a8 as kt } from "./replay-index-VCzOY16S.js";
3
- import { b as C, f as St, a as Tt, c as Ct, d as me, e as Ot, i as je, h as xe, R as z, j as vo, k as go, p as bo, s as Ye, l as ko } from "./replay-db-CroFZCLK.js";
4
- import { b as So, o as To, d as Co, e as p, u as he, f as i, h as R, j as E, n as A, k as j, m as I, q as T, r as _e, t as oe, v as Ie, Z as H, w as Oo, x as ze, c as Ao, s as Eo, y as $o } from "./replay-create-model-KIUQ2An5.js";
5
- import { g as xo, e as He, a as _o, b as Ro, c as Ge, d as Po, f as qo } from "./replay-SemanticSearchService-DgroPziI.js";
2
+ import { R as Gt, A as be, aR as se, aS as Vt, aT as Kt, aU as Jt, ac as x, a as ue, aH as Y, aV as pt, aW as Oe, aG as Ae, aX as ft, aY as pe, aZ as ee, c as b, a_ as Qt, an as G, al as V, a$ as mt, b0 as fe, am as Ee, b1 as Xt, b2 as Zt, b3 as eo, b4 as to, b5 as oo, b6 as no, b7 as ro, af as K, b8 as so, ag as te, aa as ao, b9 as io, ba as co, bb as ht, bc as wt, bd as lo, be as It, bf as yt, bg as uo, ai as J, bh as po, ab as vt, bi as $e, aB as gt, bj as fo, bk as mo, bl as Me, F as k, bm as Fe, bn as ho, bo as Be, bp as wo, bq as Io, br as yo, a9 as bt, a8 as kt } from "./replay-index-C2w9vpTi.js";
3
+ import { b as C, f as St, a as Tt, c as Ct, d as me, e as Ot, i as je, h as xe, R as z, j as vo, k as go, p as bo, s as Ye, l as ko } from "./replay-db-C0Ufsv6d.js";
4
+ import { b as So, o as To, d as Co, e as p, u as he, f as c, h as R, j as E, n as A, k as j, m as w, q as T, r as _e, t as oe, v as we, Z as H, w as Oo, x as ze, c as Ao, s as Eo, y as $o } from "./replay-create-model-dCrhNa4v.js";
5
+ import { g as xo, e as He, a as _o, b as Ro, c as Ge, d as Po, f as qo } from "./replay-SemanticSearchService-4RHUNPxQ.js";
6
6
  import { useInfiniteQuery as No, useQuery as Uo } from "@tanstack/react-query";
7
7
  const ae = {
8
8
  path: "pathParameters",
@@ -378,7 +378,7 @@ function mn(e, t) {
378
378
  function hn(e, t) {
379
379
  return e.map((o) => mn(o, t));
380
380
  }
381
- const In = ["info", "result", "severity"], wn = 500, yn = z * 2;
381
+ const wn = ["info", "result", "severity"], In = 500, yn = z * 2;
382
382
  function vn(e) {
383
383
  const t = [];
384
384
  return e.collectionId && t.push(`Collection ID: ${e.collectionId}`), e.workflowId && t.push(`Workflow ID: ${e.workflowId}`), e.workflow?.summary && t.push(`Summary: ${e.workflow.summary}`), e.workflow?.description && t.push(`Description: ${e.workflow.description}`), e.runDate && t.push(`Run date: ${new Date(e.runDate).toISOString()}`), C(t, `
@@ -404,15 +404,15 @@ function kn(e, t) {
404
404
  ), s.push(`status=${r ?? "n/a"}`, Kt(e) ? "passed" : "failed");
405
405
  const a = e.checks ? Jt(e.checks) : [];
406
406
  if (a.length > 0) {
407
- const l = a.map(
408
- (c) => c.message ? `${c.name}: ${se(c.message, t)}` : c.name
407
+ const i = a.map(
408
+ (l) => l.message ? `${l.name}: ${se(l.message, t)}` : l.name
409
409
  );
410
- s.push(`(${l.join("; ")})`);
410
+ s.push(`(${i.join("; ")})`);
411
411
  }
412
412
  return s.join(" ");
413
413
  }
414
414
  function Sn(e, t, o) {
415
- const { steps: n, totalSteps: r, passedSteps: s, succeeded: a, timedOut: l } = Vt(e), d = [`Run status: ${a ? "SUCCEEDED" : "FAILED"} (${s}/${r} steps passed, ${e.totalTimeMs}ms total${l ? ", global timeout reached" : ""})`];
415
+ const { steps: n, totalSteps: r, passedSteps: s, succeeded: a, timedOut: i } = Vt(e), d = [`Run status: ${a ? "SUCCEEDED" : "FAILED"} (${s}/${r} steps passed, ${e.totalTimeMs}ms total${i ? ", global timeout reached" : ""})`];
416
416
  if (n.length > 0) {
417
417
  const u = [];
418
418
  let f = yn, m = 0;
@@ -421,8 +421,8 @@ function Sn(e, t, o) {
421
421
  m++;
422
422
  continue;
423
423
  }
424
- const w = Ke(v.response?.body, t, wn);
425
- f -= w.length, u.push(` body: ${w}`);
424
+ const I = Ke(v.response?.body, t, In);
425
+ f -= I.length, u.push(` body: ${I}`);
426
426
  }
427
427
  m > 0 && u.push(
428
428
  ` (${m} step body previews omitted to save space; request them via stepIds)`
@@ -500,7 +500,7 @@ function An(e) {
500
500
  case x.Step:
501
501
  return on;
502
502
  case x.WorkflowRun:
503
- return In;
503
+ return wn;
504
504
  }
505
505
  }
506
506
  function Et(e) {
@@ -528,7 +528,7 @@ function $t(e) {
528
528
  const t = e.warn !== void 0 ? "warn" : "block", o = e.warn !== void 0 ? e.warn : e.block;
529
529
  return (n, r) => {
530
530
  const s = Je(e.key, n);
531
- return s === null ? null : r.priorInputs.some((l) => Je(e.key, l) === s) ? { action: t, message: o } : null;
531
+ return s === null ? null : r.priorInputs.some((i) => Je(e.key, i) === s) ? { action: t, message: o } : null;
532
532
  };
533
533
  }
534
534
  function Je(e, t) {
@@ -569,16 +569,16 @@ function _n(e) {
569
569
  }
570
570
  function Rn(e, t, o, n) {
571
571
  return !t || t.length === 0 ? o : async (r, s) => {
572
- const a = En(s?.messages, e), l = {
572
+ const a = En(s?.messages, e), i = {
573
573
  consecutiveCalls: a.consecutiveCalls,
574
574
  priorInputs: n ? a.priorInputs.map(n).filter((u) => u !== null) : a.priorInputs
575
- }, c = $n(t, r, l);
576
- if (c.blocked)
577
- return { isError: !1, blocked: !0, note: c.notes.join(" ") };
575
+ }, l = $n(t, r, i);
576
+ if (l.blocked)
577
+ return { isError: !1, blocked: !0, note: l.notes.join(" ") };
578
578
  const d = await o(r, s);
579
- return c.notes.length === 0 || !Pn(d) ? d : {
579
+ return l.notes.length === 0 || !Pn(d) ? d : {
580
580
  ...d,
581
- note: [d.note, ...c.notes].filter(Boolean).join(" ")
581
+ note: [d.note, ...l.notes].filter(Boolean).join(" ")
582
582
  };
583
583
  };
584
584
  }
@@ -617,35 +617,35 @@ function pc() {
617
617
  return zt(Un);
618
618
  }
619
619
  const Dn = p({
620
- message: i(),
620
+ message: c(),
621
621
  details: he().optional()
622
622
  }), Re = p({
623
623
  action: E(["add", "update", "remove"]).describe('Action to perform: "add", "update" or "remove".'),
624
624
  approved: R().default(!0)
625
625
  }), W = Re.extend({
626
- id: i().optional().describe("Existing item id. Required for update/remove actions.")
626
+ id: c().optional().describe("Existing item id. Required for update/remove actions.")
627
627
  }), Wn = Re.extend({
628
628
  index: A().int().min(0).optional().describe("Existing item index. Required for update/remove actions.")
629
629
  }), Ln = p({
630
- isError: I(!1),
631
- blocked: I(!0),
632
- note: i(),
630
+ isError: w(!1),
631
+ blocked: w(!0),
632
+ note: c(),
633
633
  data: j().optional(),
634
634
  error: j().optional()
635
635
  });
636
636
  function q(e) {
637
637
  return _e([
638
638
  p({
639
- isError: I(!0),
639
+ isError: w(!0),
640
640
  error: Dn,
641
641
  data: j().optional(),
642
642
  blocked: j().optional()
643
643
  }),
644
644
  p({
645
- isError: I(!1),
645
+ isError: w(!1),
646
646
  data: e,
647
647
  error: j().optional(),
648
- note: i().optional(),
648
+ note: c().optional(),
649
649
  blocked: j().optional()
650
650
  }),
651
651
  Ln
@@ -653,12 +653,12 @@ function q(e) {
653
653
  }
654
654
  const Mn = p({
655
655
  status: E(["applied", "failed"]),
656
- summary: i().optional()
656
+ summary: c().optional()
657
657
  }), Fn = p({
658
658
  totalChanges: A().int().min(0),
659
659
  approvedChanges: A().int().min(0),
660
660
  applied: T(Mn),
661
- resultingState: i().optional().describe("Resulting state of the mutated fields after all changes were applied.")
661
+ resultingState: c().optional().describe("Resulting state of the mutated fields after all changes were applied.")
662
662
  }), xt = q(Fn), Bn = "Read structured state from the **active** Replay tab.\n\n**What it does**\n- Returns structured data for the active tab.\n- Read-only: does not open/switch tabs and does not mutate saved or unsaved content.\n- Returns UI-facing tab data (editable fields, configured values, responses/results), not a full OpenAPI schema dump.\n\n**Use when**\n- You need to verify UI state in the active tab after an action (edit, save, execute, rerun, tab switch).\n- You need to inspect request/response/result content as rendered in Replay UI.\n\n**Never use when**\n- You are gathering **initial schema/context** for a request from project assets (OpenAPI/Arazzo); use project-asset lookup with exact ids/coordinates.\n- You need IDs or operation/workflow coordinates from project assets; resolve them via project-asset lookup, not active-tab UI reads.\n- You need a different tab; this tool never changes focus.\n- You need to run a request or change any saved/unsaved tab content; this tool is strictly read-only.\n\n**Input guidance**\n- Treat IDs from `info` as canonical for follow-up actions.\n- Request only needed sections and combine them in one call.\n- Prefer including `info` unless you need only one slice.\n- Sections by tab type:\n - Collection tab: `info`, `workflows`, `sourceDescriptions`.\n - Workflow tab: `info`, `inputs`, `parameters`, `security`, `outputs`, `steps`, `wiring` (every step's security bindings + outputs in one call - inspect or verify multi-step wiring without opening step tabs).\n - Step tab: `info`, `parameters`, `requestBody`, `security`, `outputs`, `successCriteria`, `response`.\n - Workflow run tab: `info`, `result` (status, per-step outcomes, masked bodies; `stepIds` fetches full ones), `severity`.\n- Invalid sections are skipped; if none apply, response falls back to `info`.\n\n**Loop/budget guidance**\n- Read each needed section once per turn.\n- Re-read only after mutation/save, or when you need to inspect new output.\n- If `result` is RUNNING, re-read until the run finishes.", jn = E([
663
663
  "info",
664
664
  "workflows",
@@ -678,11 +678,11 @@ const Mn = p({
678
678
  sections: T(jn).min(1).describe(
679
679
  "Content blocks to include in the response. Use tab-type-specific sections from the tool description; invalid sections for the current tab are ignored."
680
680
  ),
681
- stepIds: T(i()).min(1).optional().describe(
681
+ stepIds: T(c()).min(1).optional().describe(
682
682
  "Workflow run tabs only, together with the `result` section: executed step ids to return the full (secret-masked) response body for. Use after the per-step preview proves insufficient."
683
683
  )
684
684
  }), zn = p({
685
- message: i()
685
+ message: c()
686
686
  }), Hn = q(zn), Gn = {
687
687
  description: Bn,
688
688
  inputSchema: Yn,
@@ -707,14 +707,14 @@ function Kn(e) {
707
707
  if (!n)
708
708
  return h("No active tab data available.");
709
709
  const { sections: r, skipped: s } = Vn(n, t.sections), a = r.length > 0 ? r : ["info"];
710
- let c = On(n, a, { stepIds: t.stepIds }) ?? "Unable to build a summary for the active tab.";
711
- return s.length > 0 && (c += `
710
+ let l = On(n, a, { stepIds: t.stepIds }) ?? "Unable to build a summary for the active tab.";
711
+ return s.length > 0 && (l += `
712
712
 
713
- (Sections not applicable for this tab type were omitted: ${s.join(", ")}.)`), r.length === 0 && t.sections.length > 0 && (c += "\n\n(No requested sections applied to this tab type; showing `info` instead.)"), t.stepIds?.length && (n.type !== x.WorkflowRun ? c += `
713
+ (Sections not applicable for this tab type were omitted: ${s.join(", ")}.)`), r.length === 0 && t.sections.length > 0 && (l += "\n\n(No requested sections applied to this tab type; showing `info` instead.)"), t.stepIds?.length && (n.type !== x.WorkflowRun ? l += `
714
714
 
715
- (stepIds applies only to workflow run tabs.)` : a.includes("result") || (c += "\n\n(stepIds requires the `result` section.)")), {
715
+ (stepIds applies only to workflow run tabs.)` : a.includes("result") || (l += "\n\n(stepIds requires the `result` section.)")), {
716
716
  isError: !1,
717
- data: { message: c }
717
+ data: { message: l }
718
718
  };
719
719
  };
720
720
  }
@@ -738,33 +738,33 @@ const Jn = {
738
738
  **Input guidance**
739
739
  - \`apiId\` is required (the loaded API's id, the same identifier the search tool uses).
740
740
  - Read one \`field\` at a time; use \`cursor\` only to continue a section you already started.`, Xn = oe({
741
- apiId: i().describe(
741
+ apiId: c().describe(
742
742
  "ID of the loaded API document to read (the API URI, the same identifier used by the search tool)."
743
743
  ),
744
- field: i().optional().describe(
744
+ field: c().optional().describe(
745
745
  'Top-level metadata field to read (e.g. "info", "servers", "tags", "externalDocs", "securitySchemes"). Omit to scan: list the metadata fields present in the document. Operations and reusable components (paths, webhooks, components, definitions, parameters, responses) are not available here — use the search tool for those.'
746
746
  ),
747
- cursor: i().optional().describe(
747
+ cursor: c().optional().describe(
748
748
  "Opaque cursor to continue a previously truncated section. Only meaningful together with `field`."
749
749
  )
750
750
  }), Zn = p({
751
- name: i(),
751
+ name: c(),
752
752
  kind: E(["scalar", "object", "array"]),
753
753
  count: A().int().nonnegative().optional()
754
754
  }), er = p({
755
- name: i(),
756
- hint: i()
755
+ name: c(),
756
+ hint: c()
757
757
  }), tr = p({
758
758
  available: T(Zn),
759
759
  blocked: T(er)
760
760
  }), or = p({
761
- field: i(),
761
+ field: c(),
762
762
  value: he(),
763
763
  start: A().int().nonnegative().optional(),
764
764
  end: A().int().nonnegative().optional(),
765
765
  total: A().int().nonnegative().optional(),
766
766
  truncated: R(),
767
- nextCursor: i().nullable()
767
+ nextCursor: c().nullable()
768
768
  }), nr = _e([tr, or]), rr = q(nr), sr = {
769
769
  description: Qn,
770
770
  inputSchema: Xn,
@@ -777,7 +777,7 @@ const Jn = {
777
777
  definitions: "Use the search tool to read reusable schemas.",
778
778
  parameters: "Use the search tool to read reusable parameters.",
779
779
  responses: "Use the search tool to read reusable responses."
780
- }, _t = ["id", "srcType", "fileDependencies"], we = [
780
+ }, _t = ["id", "srcType", "fileDependencies"], Ie = [
781
781
  {
782
782
  name: "securitySchemes",
783
783
  sources: ["components.securitySchemes", "securityDefinitions"]
@@ -800,7 +800,7 @@ function Q(e) {
800
800
  return !(e === null || typeof e != "object" || Array.isArray(e));
801
801
  }
802
802
  const lr = new Set(
803
- we.flatMap((e) => e.sources.map((t) => t.split(".")[0]))
803
+ Ie.flatMap((e) => e.sources.map((t) => t.split(".")[0]))
804
804
  );
805
805
  function Ze(e) {
806
806
  const t = [], o = [];
@@ -811,7 +811,7 @@ function Ze(e) {
811
811
  }
812
812
  _t.includes(n) || lr.has(n) || t.push(et(n, r));
813
813
  }
814
- for (const n of we) {
814
+ for (const n of Ie) {
815
815
  const r = Rt(e, n);
816
816
  r !== null && t.push(et(n.name, r));
817
817
  }
@@ -880,12 +880,12 @@ function fr(e, t) {
880
880
  return btoa(`${e}:${t}`);
881
881
  }
882
882
  const mr = new Map(
883
- we.flatMap(
883
+ Ie.flatMap(
884
884
  (e) => e.sources.map((t) => [t.split(".")[0], e.name])
885
885
  )
886
886
  );
887
887
  function hr(e, t, o) {
888
- const n = we.find((a) => a.name === t);
888
+ const n = Ie.find((a) => a.name === t);
889
889
  if (n) {
890
890
  const a = Rt(e, n);
891
891
  return a === null ? nt(t) : ot(t, a, o);
@@ -921,7 +921,7 @@ function nt(e) {
921
921
  { field: e }
922
922
  );
923
923
  }
924
- function Ir(e) {
924
+ function wr(e) {
925
925
  return async (t) => {
926
926
  const o = e.get(ue), n = o.find((s) => s.id === t.apiId);
927
927
  if (!n)
@@ -940,91 +940,91 @@ function Ir(e) {
940
940
  };
941
941
  };
942
942
  }
943
- const wr = {
943
+ const Ir = {
944
944
  name: "get_api_metadata",
945
945
  definition: sr,
946
- createExecutor: (e) => Ir(e.store)
946
+ createExecutor: (e) => wr(e.store)
947
947
  }, yr = "Manage Replay collections and YAML-backed Arazzo workflows/steps.\n\n**What it does**\n- Creates or deletes collections, workflows, and steps.\n- Can copy the focused step tab into another workflow as a new step.\n- Returns a summary plus created/affected IDs when available.\n\n**Use when**\n- You need structural changes to collection/workflow/step hierarchy.\n- Create a step from an OpenAPI operation, ad-hoc request, or blank step.\n- Persist the focused step tab into a target collection/workflow.\n\n**Never use when**\n- Only editing fields on an existing step, no structural change needed.\n- Required target ids are unknown or ambiguous.\n- You are not sure destructive deletes are intended.\n\n**Input guidance**\n- Provide `payload` with one `action` from:\n - `create_collection`, `delete_collection`\n - `create_workflow`, `delete_workflow`\n - `create_step`, `delete_step`, `move_step`\n - `save_tab_to_collection`\n- Resolve missing `collectionId`, `workflowId`, and `stepId` before mutation.\n- `create_collection`: `title` is display name and derives file ID.\n- `create_step`: choose one source shape:\n - `operation` for OpenAPI link (`apiId`, `path`, `method`, optional `operationId`)\n - `xOperation` for ad-hoc HTTP (`method` + `url`)\n - omit both for a blank step\n- `create_step` optional initial fields: `description`, `parameters`, `body`, `outputs`, `successCriteria`.\n- `create_step` optional `index` inserts at that 0-based position (default: append). `move_step` moves a step to `toIndex` (0-based); indices clamp to the valid range.\n- `save_tab_to_collection`: provide `targetCollectionId`, `targetWorkflowId`, and `newStepName`.\n\n**Loop/budget guidance**\n- Prefer batching related structure setup in minimal calls per workflow.\n- Track returned `stepId` values; names may be uniquified on collisions.\n- Define outputs on producer steps; reference via `$steps.<stepId>.outputs.<name>` downstream.\n- Add `successCriteria` on created steps so workflow runs fail on unexpected responses.", vr = p({
948
- action: I("create_collection"),
949
- title: i().min(1).describe("Collection display title (also used to derive the file id).")
948
+ action: w("create_collection"),
949
+ title: c().min(1).describe("Collection display title (also used to derive the file id).")
950
950
  }).strict(), gr = p({
951
- action: I("delete_collection"),
952
- collectionId: i().min(1).describe("Target collection id.")
951
+ action: w("delete_collection"),
952
+ collectionId: c().min(1).describe("Target collection id.")
953
953
  }).strict(), br = p({
954
- action: I("create_workflow"),
955
- collectionId: i().min(1).describe("Parent collection id."),
956
- name: i().min(1).describe("Workflow summary / display name.")
954
+ action: w("create_workflow"),
955
+ collectionId: c().min(1).describe("Parent collection id."),
956
+ name: c().min(1).describe("Workflow summary / display name.")
957
957
  }).strict(), kr = p({
958
- action: I("delete_workflow"),
959
- collectionId: i().min(1),
960
- workflowId: i().min(1)
958
+ action: w("delete_workflow"),
959
+ collectionId: c().min(1),
960
+ workflowId: c().min(1)
961
961
  }).strict(), Sr = [
962
962
  Y.Text,
963
963
  Y.JSON,
964
964
  Y.XML
965
965
  ], Tr = p({
966
- name: i().min(1),
966
+ name: c().min(1),
967
967
  in: E(["path", "query", "header", "cookie"]),
968
- value: i()
968
+ value: c()
969
969
  }).strict(), Cr = p({
970
- name: i().min(1).describe("Output name."),
971
- expression: i().min(1).describe("Output expression.")
970
+ name: c().min(1).describe("Output name."),
971
+ expression: c().min(1).describe("Output expression.")
972
972
  }).strict(), Or = p({
973
- condition: i().min(1),
974
- context: i().optional(),
973
+ condition: c().min(1),
974
+ context: c().optional(),
975
975
  type: E(["simple", "regex", "jsonpath", "xpath"]).optional()
976
976
  }).strict(), Ar = p({
977
- action: I("create_step"),
978
- collectionId: i().min(1),
979
- workflowId: i().min(1),
980
- stepName: i().min(1).optional().describe(
977
+ action: w("create_step"),
978
+ collectionId: c().min(1),
979
+ workflowId: c().min(1),
980
+ stepName: c().min(1).optional().describe(
981
981
  'Label used verbatim as the stepId, so pass a single camelCase token such as "updateUser", reusing the source operationId when there is one. Put prose in `description` instead (default: "New Step").'
982
982
  ),
983
- description: i().min(1).optional().describe("Step description text (overrides default derived from stepName)."),
983
+ description: c().min(1).optional().describe("Step description text (overrides default derived from stepName)."),
984
984
  parameters: T(Tr).optional().describe("Initial request parameters (path, query, header, cookie)."),
985
985
  body: p({
986
- content: i().describe("Request body content as string."),
986
+ content: c().describe("Request body content as string."),
987
987
  contentType: E(Sr).optional().describe("Request body content type.")
988
988
  }).strict().optional().describe("Initial request body."),
989
989
  outputs: T(Cr).optional().describe("Initial step outputs (mappings for later steps)."),
990
990
  successCriteria: T(Or).optional().describe("Initial success criteria rows."),
991
991
  operation: p({
992
- apiId: i().min(1).describe("API id."),
993
- path: i().min(1).describe("Request path."),
994
- method: i().min(1).describe("HTTP method."),
995
- operationId: i().min(1).optional().describe("Operation id.")
992
+ apiId: c().min(1).describe("API id."),
993
+ path: c().min(1).describe("Request path."),
994
+ method: c().min(1).describe("HTTP method."),
995
+ operationId: c().min(1).optional().describe("Operation id.")
996
996
  }).optional().describe(
997
997
  "OpenAPI operation link (apiId, path, method). Omit if using xOperation or a blank step."
998
998
  ),
999
999
  xOperation: p({
1000
- method: i().min(1).describe("HTTP method."),
1001
- url: i().min(1).describe("Request URL.")
1000
+ method: c().min(1).describe("HTTP method."),
1001
+ url: c().min(1).describe("Request URL.")
1002
1002
  }).optional().describe("Ad-hoc HTTP request (method + URL). Omit if using operation or a blank step."),
1003
1003
  index: A().int().min(0).optional().describe(
1004
1004
  "0-based position to insert the new step at within the workflow. Omit to append at the end. Out-of-range values clamp to the nearest valid position."
1005
1005
  )
1006
1006
  }).strict(), Er = p({
1007
- action: I("delete_step"),
1008
- collectionId: i().min(1),
1009
- workflowId: i().min(1),
1010
- stepId: i().min(1)
1007
+ action: w("delete_step"),
1008
+ collectionId: c().min(1),
1009
+ workflowId: c().min(1),
1010
+ stepId: c().min(1)
1011
1011
  }).strict(), $r = p({
1012
- action: I("move_step"),
1013
- collectionId: i().min(1),
1014
- workflowId: i().min(1),
1015
- stepId: i().min(1).describe("Id of the existing step to move."),
1012
+ action: w("move_step"),
1013
+ collectionId: c().min(1),
1014
+ workflowId: c().min(1),
1015
+ stepId: c().min(1).describe("Id of the existing step to move."),
1016
1016
  toIndex: A().int().min(0).describe(
1017
1017
  "0-based target position for the step within the same workflow. Out-of-range values clamp to the nearest valid position."
1018
1018
  )
1019
1019
  }).strict(), xr = p({
1020
- action: I("save_tab_to_collection"),
1021
- targetCollectionId: i().min(1),
1022
- targetWorkflowId: i().min(1),
1023
- newStepName: i().min(1).describe(
1020
+ action: w("save_tab_to_collection"),
1021
+ targetCollectionId: c().min(1),
1022
+ targetWorkflowId: c().min(1),
1023
+ newStepName: c().min(1).describe(
1024
1024
  'Step id / label for the new step, used verbatim, so pass a single camelCase token such as "updateUser".'
1025
1025
  )
1026
1026
  }).strict(), _r = p({
1027
- payload: Ie("action", [
1027
+ payload: we("action", [
1028
1028
  vr,
1029
1029
  gr,
1030
1030
  br,
@@ -1040,10 +1040,10 @@ const wr = {
1040
1040
  message: "Only one of `operation` or `xOperation` may be specified."
1041
1041
  });
1042
1042
  }), Rr = p({
1043
- summary: i(),
1044
- collectionId: i().optional(),
1045
- workflowId: i().optional(),
1046
- stepId: i().optional()
1043
+ summary: c(),
1044
+ collectionId: c().optional(),
1045
+ workflowId: c().optional(),
1046
+ stepId: c().optional()
1047
1047
  }), Pr = q(Rr), qr = {
1048
1048
  description: yr,
1049
1049
  inputSchema: _r,
@@ -1232,30 +1232,30 @@ async function Br(e, { store: t, attachApiToCollection: o, convertOperationToRep
1232
1232
  collectionId: e.collectionId,
1233
1233
  workflowId: e.workflowId
1234
1234
  });
1235
- const l = e.operation ? {
1235
+ const i = e.operation ? {
1236
1236
  apiId: e.operation.apiId,
1237
1237
  path: e.operation.path.replace(/\{\{/g, "{").replace(/\}\}/g, "}"),
1238
1238
  method: e.operation.method.toLowerCase(),
1239
1239
  operationId: e.operation.operationId,
1240
1240
  isAdditionalOperation: !1
1241
- } : void 0, c = e.xOperation ? {
1241
+ } : void 0, l = e.xOperation ? {
1242
1242
  method: e.xOperation.method,
1243
1243
  url: e.xOperation.url
1244
1244
  } : void 0;
1245
1245
  let d;
1246
- l && (d = Zt(
1246
+ i && (d = Zt(
1247
1247
  t.get(ue),
1248
- l,
1248
+ i,
1249
1249
  n
1250
1250
  ), d && await o({
1251
1251
  collectionId: e.collectionId,
1252
- apiId: l.apiId
1252
+ apiId: i.apiId
1253
1253
  }));
1254
1254
  const u = mt({
1255
1255
  name: e.stepName?.trim() || "New Step",
1256
1256
  workflow: a,
1257
- operation: l,
1258
- xOperation: c,
1257
+ operation: i,
1258
+ xOperation: l,
1259
1259
  apiOperation: d
1260
1260
  });
1261
1261
  Ur(u, {
@@ -1288,9 +1288,9 @@ function jr(e, t, o, n) {
1288
1288
  const r = V(e.get(b), t)?.steps.length ?? 0, s = n === void 0 ? r : Pt(n, r);
1289
1289
  return e.set(
1290
1290
  b,
1291
- (a) => fe(a, t, (l) => {
1292
- const c = [...l.steps];
1293
- return c.splice(s, 0, o), { ...l, steps: c };
1291
+ (a) => fe(a, t, (i) => {
1292
+ const l = [...i.steps];
1293
+ return l.splice(s, 0, o), { ...i, steps: l };
1294
1294
  })
1295
1295
  ), s;
1296
1296
  }
@@ -1324,7 +1324,7 @@ function zr(e, { store: t }) {
1324
1324
  collectionId: e.collectionId,
1325
1325
  workflowId: e.workflowId
1326
1326
  });
1327
- const r = n.steps, s = r.findIndex((l) => l.stepId === e.stepId);
1327
+ const r = n.steps, s = r.findIndex((i) => i.stepId === e.stepId);
1328
1328
  if (s === -1)
1329
1329
  return h("Step not found.", {
1330
1330
  collectionId: e.collectionId,
@@ -1334,9 +1334,9 @@ function zr(e, { store: t }) {
1334
1334
  const a = Pt(e.toIndex, r.length - 1);
1335
1335
  return t.set(
1336
1336
  b,
1337
- (l) => fe(l, o, (c) => {
1338
- const d = [...c.steps], [u] = d.splice(s, 1);
1339
- return d.splice(a, 0, u), { ...c, steps: d };
1337
+ (i) => fe(i, o, (l) => {
1338
+ const d = [...l.steps], [u] = d.splice(s, 1);
1339
+ return d.splice(a, 0, u), { ...l, steps: d };
1340
1340
  })
1341
1341
  ), {
1342
1342
  isError: !1,
@@ -1363,23 +1363,23 @@ async function Hr(e, { store: t, attachApiToCollection: o }) {
1363
1363
  return h("Target collection not found.", {
1364
1364
  collectionId: e.targetCollectionId
1365
1365
  });
1366
- const l = {
1366
+ const i = {
1367
1367
  collectionId: e.targetCollectionId,
1368
1368
  workflowId: e.targetWorkflowId
1369
- }, c = V(r, l);
1370
- if (!c)
1369
+ }, l = V(r, i);
1370
+ if (!l)
1371
1371
  return h("Target workflow not found.", {
1372
1372
  collectionId: e.targetCollectionId,
1373
1373
  workflowId: e.targetWorkflowId
1374
1374
  });
1375
1375
  const d = mt({
1376
1376
  name: e.newStepName.trim(),
1377
- workflow: c,
1377
+ workflow: l,
1378
1378
  fromStep: s
1379
1379
  });
1380
1380
  return t.set(
1381
1381
  b,
1382
- (u) => fe(u, l, (f) => ({
1382
+ (u) => fe(u, i, (f) => ({
1383
1383
  ...f,
1384
1384
  steps: [...f.steps, d]
1385
1385
  }))
@@ -1455,64 +1455,64 @@ const Gr = {
1455
1455
  **Loop/budget guidance**
1456
1456
  - Re-read environment/input data when decisions depend on up-to-date values.
1457
1457
  - Batch related input/server changes for the same environment when practical.
1458
- - After changing the active environment, re-check assumptions that depended on the previous one.`, L = i().min(1).optional().describe("Environment name. Omit to use the active environment."), Kr = p({
1459
- action: I("get_environments")
1458
+ - After changing the active environment, re-check assumptions that depended on the previous one.`, L = c().min(1).optional().describe("Environment name. Omit to use the active environment."), Kr = p({
1459
+ action: w("get_environments")
1460
1460
  }).strict(), Jr = p({
1461
- action: I("get_active_environment")
1461
+ action: w("get_active_environment")
1462
1462
  }).strict(), Qr = p({
1463
- action: I("get_inputs"),
1463
+ action: w("get_inputs"),
1464
1464
  environment: L
1465
1465
  }).strict(), Xr = p({
1466
- action: I("get_servers"),
1466
+ action: w("get_servers"),
1467
1467
  environment: L
1468
1468
  }).strict(), Zr = p({
1469
- action: I("get_input"),
1469
+ action: w("get_input"),
1470
1470
  environment: L,
1471
- inputName: i().min(1)
1471
+ inputName: c().min(1)
1472
1472
  }).strict(), es = p({
1473
- action: I("upsert_input"),
1473
+ action: w("upsert_input"),
1474
1474
  environment: L,
1475
- name: i().min(1),
1476
- value: i(),
1475
+ name: c().min(1),
1476
+ value: c(),
1477
1477
  isSecret: R().optional().describe(
1478
1478
  "Only when creating a new input name: whether the value is secret (default false). Ignored when the name already exists."
1479
1479
  )
1480
1480
  }).strict(), ts = p({
1481
- action: I("remove_input"),
1481
+ action: w("remove_input"),
1482
1482
  environment: L,
1483
- inputName: i().min(1)
1483
+ inputName: c().min(1)
1484
1484
  }).strict(), Pe = p({
1485
- name: i().min(1),
1486
- value: i()
1485
+ name: c().min(1),
1486
+ value: c()
1487
1487
  }).strict(), os = p({
1488
- action: I("upsert_server"),
1488
+ action: w("upsert_server"),
1489
1489
  environment: L,
1490
- apiId: i().min(1),
1491
- value: i(),
1490
+ apiId: c().min(1),
1491
+ value: c(),
1492
1492
  variables: T(Pe).optional()
1493
1493
  }).strict(), ns = p({
1494
- name: i().min(1),
1495
- value: i(),
1494
+ name: c().min(1),
1495
+ value: c(),
1496
1496
  isSecret: R().optional().describe("Defaults to false when omitted.")
1497
1497
  }).strict(), rs = p({
1498
- apiId: i().min(1),
1499
- value: i(),
1498
+ apiId: c().min(1),
1499
+ value: c(),
1500
1500
  variables: T(Pe).optional()
1501
1501
  }).strict(), ss = p({
1502
- action: I("add_environment"),
1503
- environment: i().min(1).describe("Name of a new environment to create."),
1502
+ action: w("add_environment"),
1503
+ environment: c().min(1).describe("Name of a new environment to create."),
1504
1504
  inputs: T(ns).optional().describe("Optional initial inputs for the new environment."),
1505
1505
  servers: T(rs).optional().describe("Optional initial server mappings for the new environment."),
1506
1506
  setActive: R().optional().describe("When true, also set the new environment as active.")
1507
1507
  }).strict(), as = p({
1508
- action: I("remove_server"),
1508
+ action: w("remove_server"),
1509
1509
  environment: L,
1510
- apiId: i().min(1)
1510
+ apiId: c().min(1)
1511
1511
  }).strict(), is = p({
1512
- action: I("set_active_environment"),
1513
- environment: i().min(1).describe("Name of the environment to activate.")
1512
+ action: w("set_active_environment"),
1513
+ environment: c().min(1).describe("Name of the environment to activate.")
1514
1514
  }).strict(), cs = p({
1515
- payload: Ie("action", [
1515
+ payload: we("action", [
1516
1516
  Kr,
1517
1517
  ss,
1518
1518
  Jr,
@@ -1526,29 +1526,29 @@ const Gr = {
1526
1526
  is
1527
1527
  ])
1528
1528
  }), ls = p({
1529
- summary: i(),
1530
- environmentNames: T(i()).optional(),
1529
+ summary: c(),
1530
+ environmentNames: T(c()).optional(),
1531
1531
  inputs: T(
1532
1532
  p({
1533
- name: i(),
1533
+ name: c(),
1534
1534
  isSecret: R(),
1535
- value: i()
1535
+ value: c()
1536
1536
  })
1537
1537
  ).optional(),
1538
1538
  servers: T(
1539
1539
  p({
1540
- apiId: i(),
1541
- value: i(),
1540
+ apiId: c(),
1541
+ value: c(),
1542
1542
  variables: T(Pe)
1543
1543
  })
1544
1544
  ).optional(),
1545
1545
  input: p({
1546
- name: i(),
1546
+ name: c(),
1547
1547
  isSecret: R(),
1548
- value: i()
1548
+ value: c()
1549
1549
  }).optional(),
1550
- environment: i().optional(),
1551
- apiId: i().optional()
1550
+ environment: c().optional(),
1551
+ apiId: c().optional()
1552
1552
  }), ds = q(ls), us = {
1553
1553
  description: Vr,
1554
1554
  inputSchema: cs,
@@ -1567,9 +1567,9 @@ function ps(e) {
1567
1567
  case "set_active_environment":
1568
1568
  return Ss(e, t.payload);
1569
1569
  case "get_inputs":
1570
- return Is(e, t.payload);
1571
- case "get_servers":
1572
1570
  return ws(e, t.payload);
1571
+ case "get_servers":
1572
+ return Is(e, t.payload);
1573
1573
  case "get_input":
1574
1574
  return ys(e, t.payload);
1575
1575
  case "upsert_input":
@@ -1603,19 +1603,19 @@ function ms(e, t) {
1603
1603
  return h(n, {
1604
1604
  environment: t.environment
1605
1605
  });
1606
- const r = (t.inputs ?? []).map((l) => ({
1607
- name: l.name,
1608
- value: l.value,
1609
- isSecret: l.isSecret ?? !1
1610
- })), s = (t.servers ?? []).map((l) => ({
1611
- apiId: l.apiId,
1612
- value: l.value,
1613
- variables: l.variables ?? []
1606
+ const r = (t.inputs ?? []).map((i) => ({
1607
+ name: i.name,
1608
+ value: i.value,
1609
+ isSecret: i.isSecret ?? !1
1610
+ })), s = (t.servers ?? []).map((i) => ({
1611
+ apiId: i.apiId,
1612
+ value: i.value,
1613
+ variables: i.variables ?? []
1614
1614
  })), a = As(r, s);
1615
1615
  return a ? h(a, {
1616
1616
  environment: t.environment
1617
- }) : (e.set(te, (l) => [
1618
- ...l,
1617
+ }) : (e.set(te, (i) => [
1618
+ ...i,
1619
1619
  {
1620
1620
  name: t.environment,
1621
1621
  inputs: r,
@@ -1642,7 +1642,7 @@ function hs(e) {
1642
1642
  environment: t
1643
1643
  });
1644
1644
  }
1645
- function Is(e, t) {
1645
+ function ws(e, t) {
1646
1646
  const o = M(e, t.environment);
1647
1647
  if (!o.ok)
1648
1648
  return o.result;
@@ -1656,7 +1656,7 @@ function Is(e, t) {
1656
1656
  }
1657
1657
  };
1658
1658
  }
1659
- function ws(e, t) {
1659
+ function Is(e, t) {
1660
1660
  const o = M(e, t.environment);
1661
1661
  if (!o.ok)
1662
1662
  return o.result;
@@ -1680,16 +1680,16 @@ function ys(e, t) {
1680
1680
  environment: n,
1681
1681
  inputName: t.inputName
1682
1682
  });
1683
- const { name: a, isSecret: l, value: c } = s;
1683
+ const { name: a, isSecret: i, value: l } = s;
1684
1684
  return {
1685
1685
  isError: !1,
1686
1686
  data: {
1687
- summary: `Input "${a}" (${l ? "secret" : "plain"}) in "${n}".`,
1687
+ summary: `Input "${a}" (${i ? "secret" : "plain"}) in "${n}".`,
1688
1688
  environment: n,
1689
1689
  input: {
1690
1690
  name: a,
1691
- isSecret: l,
1692
- value: qt(l, c)
1691
+ isSecret: i,
1692
+ value: qt(i, l)
1693
1693
  }
1694
1694
  }
1695
1695
  };
@@ -1704,17 +1704,17 @@ function vs(e, t) {
1704
1704
  environment: n,
1705
1705
  inputName: t.name
1706
1706
  });
1707
- const a = r.inputs.find((c) => c.name === t.name), l = a ? a.isSecret : t.isSecret ?? !1;
1708
- return ve(e, n, (c) => ({
1709
- ...c,
1707
+ const a = r.inputs.find((l) => l.name === t.name), i = a ? a.isSecret : t.isSecret ?? !1;
1708
+ return ve(e, n, (l) => ({
1709
+ ...l,
1710
1710
  inputs: [
1711
- ...c.inputs.filter((d) => d.name !== t.name),
1712
- { name: t.name, value: t.value, isSecret: l }
1711
+ ...l.inputs.filter((d) => d.name !== t.name),
1712
+ { name: t.name, value: t.value, isSecret: i }
1713
1713
  ]
1714
1714
  })), {
1715
1715
  isError: !1,
1716
1716
  data: {
1717
- summary: `Upserted input "${t.name}" in "${n}" (${l ? "secret" : "plain"}).`,
1717
+ summary: `Upserted input "${t.name}" in "${n}" (${i ? "secret" : "plain"}).`,
1718
1718
  environment: n
1719
1719
  }
1720
1720
  };
@@ -1747,14 +1747,14 @@ function bs(e, t) {
1747
1747
  "Variable names"
1748
1748
  );
1749
1749
  return r ? h(r, { environment: n, apiId: t.apiId }) : (ve(e, n, (s) => {
1750
- const a = s.servers, l = a.findIndex((u) => u.apiId === t.apiId), c = l >= 0 && t.variables === void 0 ? a[l].variables : t.variables ?? [], d = {
1750
+ const a = s.servers, i = a.findIndex((u) => u.apiId === t.apiId), l = i >= 0 && t.variables === void 0 ? a[i].variables : t.variables ?? [], d = {
1751
1751
  apiId: t.apiId,
1752
1752
  value: t.value,
1753
- variables: c
1753
+ variables: l
1754
1754
  };
1755
1755
  return {
1756
1756
  ...s,
1757
- servers: l >= 0 ? a.toSpliced(l, 1, d) : [d, ...a]
1757
+ servers: i >= 0 ? a.toSpliced(i, 1, d) : [d, ...a]
1758
1758
  };
1759
1759
  }), {
1760
1760
  isError: !1,
@@ -1886,13 +1886,13 @@ const $s = {
1886
1886
  "Tab to open or focus; see tool description for unsaved vs collection actions."
1887
1887
  ),
1888
1888
  tabIndex: A().optional().describe("focus_tab only: zero-based index of an already open tab."),
1889
- collectionId: i().optional().describe("open_collection, open_workflow, or open_step."),
1890
- workflowId: i().optional().describe("open_workflow or open_step."),
1891
- stepId: i().optional().describe("open_step only."),
1892
- operationId: i().optional().describe(
1889
+ collectionId: c().optional().describe("open_collection, open_workflow, or open_step."),
1890
+ workflowId: c().optional().describe("open_workflow or open_step."),
1891
+ stepId: c().optional().describe("open_step only."),
1892
+ operationId: c().optional().describe(
1893
1893
  "open_operation only: OpenAPI operationId from the loaded spec; opens an unsaved request tab for that operation."
1894
1894
  ),
1895
- requestUrl: i().optional().describe(
1895
+ requestUrl: c().optional().describe(
1896
1896
  "open_new_request only: absolute or host URL for an unsaved ad-hoc request (e.g. https://example.com/api). Omit for a blank tab."
1897
1897
  ),
1898
1898
  requestMethod: E(xs).optional().describe("open_new_request with requestUrl: HTTP method; defaults to GET if omitted.")
@@ -1910,7 +1910,7 @@ const $s = {
1910
1910
  }), qs = p({
1911
1911
  outcome: E(["focused", "opened"]),
1912
1912
  activeTabIndex: A().int().nonnegative(),
1913
- tabId: i(),
1913
+ tabId: c(),
1914
1914
  tabType: Oo(x)
1915
1915
  }), Ns = q(qs), Us = {
1916
1916
  description: _s,
@@ -1928,11 +1928,11 @@ function ge({
1928
1928
  }) {
1929
1929
  const a = t.trim();
1930
1930
  if (!a) return { ok: !1, message: o.empty };
1931
- const l = e.filter((c) => n(c) === a);
1932
- return l.length === 1 ? { ok: !0, value: l[0] } : l.length > 1 ? {
1931
+ const i = e.filter((l) => n(l) === a);
1932
+ return i.length === 1 ? { ok: !0, value: i[0] } : i.length > 1 ? {
1933
1933
  ok: !1,
1934
1934
  message: o.ambiguous,
1935
- details: { matches: l.map(r) }
1935
+ details: { matches: i.map(r) }
1936
1936
  } : { ok: !1, message: o.notFound, details: s(a) };
1937
1937
  }
1938
1938
  function Ut(e, t) {
@@ -2001,15 +2001,15 @@ function Dt(e, t, o, n) {
2001
2001
  ambiguous: "Multiple steps share that id in this workflow; ids must be unique.",
2002
2002
  notFound: "No step found with that id in the given workflow."
2003
2003
  },
2004
- getItemId: (l) => l.stepId,
2005
- formatAmbiguousMatch: (l) => ({
2006
- stepId: l.stepId,
2007
- description: l.description
2004
+ getItemId: (i) => i.stepId,
2005
+ formatAmbiguousMatch: (i) => ({
2006
+ stepId: i.stepId,
2007
+ description: i.description
2008
2008
  }),
2009
- buildNotFoundDetails: (l) => ({
2009
+ buildNotFoundDetails: (i) => ({
2010
2010
  collectionId: r.value.collectionId,
2011
2011
  workflowId: r.value.workflowId,
2012
- stepId: l
2012
+ stepId: i
2013
2013
  })
2014
2014
  });
2015
2015
  if (!s.ok) return s;
@@ -2076,16 +2076,16 @@ function Ws(e, t, o, n, r) {
2076
2076
  details: { tabType: t?.data?.type }
2077
2077
  };
2078
2078
  const {
2079
- collectionId: l,
2080
- workflowId: c,
2079
+ collectionId: i,
2080
+ workflowId: l,
2081
2081
  stepId: d
2082
2082
  } = t.data;
2083
- if (!It(l, c, d, "", "", ""))
2083
+ if (!wt(i, l, d, "", "", ""))
2084
2084
  return {
2085
2085
  ok: !1,
2086
2086
  message: "Active tab does not match unsaved draft target. Open the unsaved request tab first, or pass collection/workflow/step ids for a saved step.",
2087
2087
  details: {
2088
- activeTab: { collectionId: l, workflowId: c, stepId: d }
2088
+ activeTab: { collectionId: i, workflowId: l, stepId: d }
2089
2089
  }
2090
2090
  };
2091
2091
  const u = t.data.draftStep;
@@ -2102,25 +2102,25 @@ function Wt(e, t, o, n) {
2102
2102
  if (!r.ok) return r;
2103
2103
  const { step: s, source: a } = r.value;
2104
2104
  if (a.kind === "saved") {
2105
- const c = a;
2105
+ const l = a;
2106
2106
  return {
2107
2107
  ok: !0,
2108
2108
  value: {
2109
2109
  step: s,
2110
- readStep: () => Ee(e.get(b), c) ?? s,
2111
- updateStep: (d) => e.set(b, (u) => wt(u, c, d))
2110
+ readStep: () => Ee(e.get(b), l) ?? s,
2111
+ updateStep: (d) => e.set(b, (u) => It(u, l, d))
2112
2112
  }
2113
2113
  };
2114
2114
  }
2115
- const l = yt(e);
2115
+ const i = yt(e);
2116
2116
  return {
2117
2117
  ok: !0,
2118
2118
  value: {
2119
2119
  step: s,
2120
- readStep: () => Ls(e, l) ?? s,
2121
- updateStep: (c) => uo(e, l, (d) => ({
2120
+ readStep: () => Ls(e, i) ?? s,
2121
+ updateStep: (l) => uo(e, i, (d) => ({
2122
2122
  ...d,
2123
- draftStep: d.draftStep ? c(d.draftStep) : d.draftStep
2123
+ draftStep: d.draftStep ? l(d.draftStep) : d.draftStep
2124
2124
  }))
2125
2125
  }
2126
2126
  };
@@ -2214,14 +2214,14 @@ function zs(e, t, o, n) {
2214
2214
  const s = Ut(t, r);
2215
2215
  if (!s.ok)
2216
2216
  return $(s.message, s.details);
2217
- const { collectionId: a } = s.value, l = e.get(J).findIndex((c) => {
2218
- const d = c.data;
2217
+ const { collectionId: a } = s.value, i = e.get(J).findIndex((l) => {
2218
+ const d = l.data;
2219
2219
  return $e(d, x.Collection) && d.collectionId === a;
2220
2220
  }) !== -1;
2221
2221
  return o.openCollectionTab({
2222
2222
  collectionId: a,
2223
2223
  activeTabName: gt.COLLECTION_SETTINGS
2224
- }), X(e, l ? "focused" : "opened");
2224
+ }), X(e, i ? "focused" : "opened");
2225
2225
  }
2226
2226
  function Hs(e, t, o, n, r) {
2227
2227
  const s = n?.trim(), a = r?.trim();
@@ -2229,32 +2229,32 @@ function Hs(e, t, o, n, r) {
2229
2229
  return $("collectionId is required when action is open_workflow");
2230
2230
  if (!a)
2231
2231
  return $("workflowId is required when action is open_workflow");
2232
- const l = Ne(t, s, a);
2233
- if (!l.ok)
2234
- return $(l.message, l.details);
2235
- const { collectionId: c, workflowId: d } = l.value, u = e.get(J).findIndex((f) => {
2232
+ const i = Ne(t, s, a);
2233
+ if (!i.ok)
2234
+ return $(i.message, i.details);
2235
+ const { collectionId: l, workflowId: d } = i.value, u = e.get(J).findIndex((f) => {
2236
2236
  const m = f.data;
2237
- return $e(m, x.Workflow) && m.workflowId === d && m.collectionId === c;
2237
+ return $e(m, x.Workflow) && m.workflowId === d && m.collectionId === l;
2238
2238
  }) !== -1;
2239
2239
  return o.openWorkflowTab({
2240
- collectionId: c,
2240
+ collectionId: l,
2241
2241
  workflowId: d,
2242
2242
  activeTabName: gt.WORKFLOW_SETTINGS
2243
2243
  }), X(e, u ? "focused" : "opened");
2244
2244
  }
2245
2245
  function Gs(e, t, o, n, r, s) {
2246
- const a = n?.trim(), l = r?.trim(), c = s?.trim();
2246
+ const a = n?.trim(), i = r?.trim(), l = s?.trim();
2247
2247
  if (!a)
2248
2248
  return $("collectionId is required when action is open_step");
2249
- if (!l)
2249
+ if (!i)
2250
2250
  return $("workflowId is required when action is open_step");
2251
- if (!c)
2251
+ if (!l)
2252
2252
  return $("stepId is required when action is open_step");
2253
2253
  const d = Dt(
2254
2254
  t,
2255
2255
  a,
2256
- l,
2257
- c
2256
+ i,
2257
+ l
2258
2258
  );
2259
2259
  if (!d.ok)
2260
2260
  return $(d.message, d.details);
@@ -2262,7 +2262,7 @@ function Gs(e, t, o, n, r, s) {
2262
2262
  collectionId: u,
2263
2263
  workflowId: f,
2264
2264
  stepId: m
2265
- } = d.value, v = e.get(J).find(({ data: w }) => $e(w, x.Step) && w.collectionId === u && w.workflowId === f && w.stepId === m && w.historyId === null) !== void 0;
2265
+ } = d.value, v = e.get(J).find(({ data: I }) => $e(I, x.Step) && I.collectionId === u && I.workflowId === f && I.stepId === m && I.historyId === null) !== void 0;
2266
2266
  return o.openStepTabFromCollection({
2267
2267
  collectionId: u,
2268
2268
  workflowId: f,
@@ -2300,11 +2300,11 @@ Use when: starting a multi-step task after deciding the plan; crossing a major p
2300
2300
  Report at most one status per phase and only a few per task. Do not narrate routine tool calls, repeat the previous status, or use it in place of the final assistant response. Make the message concrete and user-facing: plain text, no markdown; name the relevant Arazzo object; describe milestone intent, not internal reasoning or tool names.
2301
2301
 
2302
2302
  Duplicates of earlier statuses and statuses reported back-to-back with no action in between add no value; when detected, the acknowledgment includes a corrective note - act on it instead of reporting another status. Too many statuses in a row are blocked instead of acknowledged.`, Xs = oe({
2303
- message: i().trim().min(1).max(220).regex(/^[^\r\n]+$/, "must be a single line").describe(
2303
+ message: c().trim().min(1).max(220).regex(/^[^\r\n]+$/, "must be a single line").describe(
2304
2304
  "Short status line for a milestone (plan start, phase boundary, new debug attempt, pivot). Plain text, no markdown. Do not narrate every tool call."
2305
2305
  )
2306
2306
  }), Zs = p({
2307
- acknowledged: I(!0)
2307
+ acknowledged: w(!0)
2308
2308
  }), ea = q(Zs), ta = {
2309
2309
  description: Qs,
2310
2310
  inputSchema: Xs,
@@ -2370,13 +2370,13 @@ const aa = [
2370
2370
  - Re-run after meaningful request/config changes or when validating a fix/hypothesis.
2371
2371
  - Avoid rapid duplicate runs with unchanged inputs when prior output already answers the question.
2372
2372
  - For endpoint exploration, treat one run per endpoint as default budget unless inputs changed or rerun is explicitly needed.`, la = p({
2373
- collectionId: i().describe(
2373
+ collectionId: c().describe(
2374
2374
  "Saved step: collection id. Unsaved draft tab on focus: empty string (with empty workflowId and stepId)."
2375
2375
  ),
2376
- workflowId: i().describe(
2376
+ workflowId: c().describe(
2377
2377
  "Saved step: workflow id. Unsaved draft tab: empty string (with empty collectionId and stepId)."
2378
2378
  ),
2379
- stepId: i().describe(
2379
+ stepId: c().describe(
2380
2380
  "Saved step: step id. Unsaved draft tab: empty string (with empty collectionId and workflowId)."
2381
2381
  )
2382
2382
  }).strict().superRefine((e, t) => {
@@ -2388,10 +2388,10 @@ const aa = [
2388
2388
  });
2389
2389
  }), da = p({
2390
2390
  status: A().optional().describe("HTTP status code."),
2391
- headers: T(ze([i(), i()])).optional().describe("Response headers as key-value pairs."),
2392
- cookies: T(ze([i(), i()])).optional().describe("Response cookies as key-value pairs."),
2393
- body: i().optional().describe("Response body, truncated if too large."),
2394
- url: i().optional().describe("Final response URL."),
2391
+ headers: T(ze([c(), c()])).optional().describe("Response headers as key-value pairs."),
2392
+ cookies: T(ze([c(), c()])).optional().describe("Response cookies as key-value pairs."),
2393
+ body: c().optional().describe("Response body, truncated if too large."),
2394
+ url: c().optional().describe("Final response URL."),
2395
2395
  duration: A().optional().describe("Request duration in milliseconds."),
2396
2396
  size: A().optional().describe("Response size in bytes.")
2397
2397
  }), ua = q(da), pa = {
@@ -2409,13 +2409,13 @@ function fa(e, t) {
2409
2409
  });
2410
2410
  const {
2411
2411
  collectionId: a,
2412
- workflowId: l,
2413
- stepId: c
2412
+ workflowId: i,
2413
+ stepId: l
2414
2414
  } = s.data, d = n.collectionId.trim(), u = n.workflowId.trim(), f = n.stepId.trim();
2415
- if (!It(
2415
+ if (!wt(
2416
2416
  a,
2417
+ i,
2417
2418
  l,
2418
- c,
2419
2419
  d,
2420
2420
  u,
2421
2421
  f
@@ -2425,37 +2425,34 @@ function fa(e, t) {
2425
2425
  {
2426
2426
  activeTab: {
2427
2427
  collectionId: a,
2428
- workflowId: l,
2429
- stepId: c
2428
+ workflowId: i,
2429
+ stepId: l
2430
2430
  },
2431
- hint: a === null && l === null && c === null ? "Focused tab is an unsaved request; pass empty strings for collectionId, workflowId, and stepId." : void 0
2431
+ hint: a === null && i === null && l === null ? "Focused tab is an unsaved request; pass empty strings for collectionId, workflowId, and stepId." : void 0
2432
2432
  }
2433
2433
  );
2434
- const v = t.get(b), w = {
2434
+ const v = t.get(b), I = {
2435
2435
  collectionId: d || null,
2436
2436
  workflowId: u || null,
2437
2437
  stepId: f || null
2438
- }, g = Ee(v, w), O = s.data.draftStep;
2438
+ }, g = Ee(v, I), O = s.data.draftStep;
2439
2439
  let S;
2440
2440
  if (g)
2441
2441
  S = {
2442
2442
  step: g,
2443
- onStepChange: ((P) => t.set(
2444
- b,
2445
- (N) => wt(N, w, P)
2446
- ))
2443
+ onStepChange: (P) => t.set(b, (N) => It(N, I, P))
2447
2444
  };
2448
2445
  else if (O)
2449
2446
  S = {
2450
2447
  step: O,
2451
- onStepChange: ((P) => Me(t, s.id, (N) => ({
2448
+ onStepChange: (P) => Me(t, s.id, (N) => ({
2452
2449
  ...N,
2453
2450
  draftStep: N.draftStep ? P(N.draftStep) : N.draftStep
2454
- })))
2451
+ }))
2455
2452
  };
2456
2453
  else
2457
2454
  return h("No step available for the active tab.");
2458
- const F = V(v, w);
2455
+ const F = V(v, I);
2459
2456
  await fo(
2460
2457
  {
2461
2458
  tabId: s.id,
@@ -2464,8 +2461,8 @@ function fa(e, t) {
2464
2461
  {
2465
2462
  ...S,
2466
2463
  workflow: F,
2467
- onWorkflowChange: (P) => t.set(b, (N) => fe(N, w, P)),
2468
- collection: G(v, w.collectionId),
2464
+ onWorkflowChange: (P) => t.set(b, (N) => fe(N, I, P)),
2465
+ collection: G(v, I.collectionId),
2469
2466
  collections: v
2470
2467
  },
2471
2468
  e,
@@ -2498,11 +2495,11 @@ function st(e) {
2498
2495
  function ha(e) {
2499
2496
  return e.length <= z ? e : `${e.slice(0, z)}… (truncated, total ${e.length} chars)`;
2500
2497
  }
2501
- const Ia = {
2498
+ const wa = {
2502
2499
  name: "run_request",
2503
2500
  definition: pa,
2504
2501
  createExecutor: (e) => fa(e.settings, e.store)
2505
- }, wa = `Run an Arazzo workflow and return its result.
2502
+ }, Ia = `Run an Arazzo workflow and return its result.
2506
2503
 
2507
2504
  **What it does**
2508
2505
  - Executes the whole workflow (all steps, with cross-step \`$steps.*\` resolution) and waits for it to finish.
@@ -2526,16 +2523,16 @@ const Ia = {
2526
2523
  - Report the outcome from this tool's result; do not re-read it with other tools.
2527
2524
  - When \`historyId\` is non-null, link to the run: \`[label](replay://workflow-run?collectionId=...&workflowId=...&historyId=...)\`. That link reopens this exact run; it never starts a new one. When it is null, say the run was not saved instead of building a link; never put the literal text null in the url.
2528
2525
  - Each call starts a NEW run. Call it again only when the user wants another run.`, ya = oe({
2529
- collectionId: i().describe("Id of the collection that holds the workflow."),
2530
- workflowId: i().describe("Id of the workflow to run.")
2526
+ collectionId: c().describe("Id of the collection that holds the workflow."),
2527
+ workflowId: c().describe("Id of the workflow to run.")
2531
2528
  }), va = p({
2532
- stepId: i(),
2529
+ stepId: c(),
2533
2530
  statusCode: A().int().nullable(),
2534
2531
  passed: R()
2535
2532
  }), ga = p({
2536
- collectionId: i().describe("Resolved id of the collection that was run."),
2537
- workflowId: i().describe("Resolved id of the workflow that was run."),
2538
- historyId: i().nullable().describe(
2533
+ collectionId: c().describe("Resolved id of the collection that was run."),
2534
+ workflowId: c().describe("Resolved id of the workflow that was run."),
2535
+ historyId: c().nullable().describe(
2539
2536
  "Id of this saved run. Put it in the workflow-run link as &historyId=... so the user can reopen this exact run. Null when history is not persisted."
2540
2537
  ),
2541
2538
  success: R().describe(
@@ -2551,7 +2548,7 @@ const Ia = {
2551
2548
  "Per-step outcome, in execution order: stepId, HTTP statusCode, and pass/fail only — no check name or failure message."
2552
2549
  )
2553
2550
  }), ba = q(ga), ka = {
2554
- description: wa,
2551
+ description: Ia,
2555
2552
  inputSchema: ya,
2556
2553
  outputSchema: ba,
2557
2554
  needsApproval: !1
@@ -2570,7 +2567,7 @@ function Sa(e, t) {
2570
2567
  a.details
2571
2568
  );
2572
2569
  try {
2573
- const { workflowResult: l, historyId: c, verdict: d } = await t({
2570
+ const { workflowResult: i, historyId: l, verdict: d } = await t({
2574
2571
  collectionId: a.value.collectionId,
2575
2572
  workflowId: a.value.workflowId
2576
2573
  });
@@ -2579,10 +2576,10 @@ function Sa(e, t) {
2579
2576
  data: {
2580
2577
  collectionId: a.value.collectionId,
2581
2578
  workflowId: a.value.workflowId,
2582
- historyId: c,
2579
+ historyId: l,
2583
2580
  success: d.succeeded,
2584
2581
  timedOut: d.timedOut,
2585
- durationMs: l.totalTimeMs,
2582
+ durationMs: i.totalTimeMs,
2586
2583
  totalSteps: d.totalSteps,
2587
2584
  passedSteps: d.passedSteps,
2588
2585
  steps: d.steps.map(({ step: u, passed: f }) => ({
@@ -2592,9 +2589,9 @@ function Sa(e, t) {
2592
2589
  }))
2593
2590
  }
2594
2591
  };
2595
- } catch (l) {
2592
+ } catch (i) {
2596
2593
  return h(
2597
- l instanceof Error ? l.message : "Workflow execution failed."
2594
+ i instanceof Error ? i.message : "Workflow execution failed."
2598
2595
  );
2599
2596
  }
2600
2597
  };
@@ -2604,7 +2601,7 @@ const Ta = {
2604
2601
  definition: ka,
2605
2602
  createExecutor: (e) => Sa(e.store, e.runWorkflow)
2606
2603
  }, Ca = 25, Oa = 'RAG semantic search over OpenAPI specs and Arazzo assets in the current Replay project.\n\n**What it does**\n- Finds OpenAPI and Arazzo entities via natural-language query (scoped by `type`), returning up to `count` matches with detail via `include`.\n\n**Use when**\n- You need **initial schema/context** or request schema details from project assets.\n- You need canonical IDs/coordinates for an API, collection, workflow, or step.\n- You need to find operations/workflows/steps by natural language when IDs are unknown.\n\n**Never use when**\n- You are only verifying post-action UI changes in the active tab.\n- You already have exact IDs and only need active-tab state.\n- You are about to repeat an identical no-result query.\n\n**Input guidance**\n- Rewording the same query rarely helps; change `type`, `query`, or intent instead.\n- "Collection" is ambiguous (Arazzo entity vs API requests by tags/path/criteria). For request lists, use `type: api_operation` with query/filters—not Arazzo `collection`.\n- Pass all known filters (`apiId`, `path`, `method`, `operationId`, `collectionId`, `workflowId`, `stepId`); `query + filters` is most precise.\n- If semantic search returns no matches, ID filters enable direct lookup (see pairing on each filter field).\n- Phrase `query` like indexed text: titles/descriptions for collections/workflows; `step: …`; `operationId: …`; path/method/tags for endpoints.\n- If results are empty and lookup needs missing IDs, the tool may ask for them.\n', Aa = p({
2607
- query: i().optional().describe("Natural language search query."),
2604
+ query: c().optional().describe("Natural language search query."),
2608
2605
  count: A().positive().max(Ca).optional().default(10),
2609
2606
  type: E(["api_operation", "api", "collection", "workflow", "step"]).describe(
2610
2607
  "Scope results to this item type. api = OpenAPI spec; api_operation = API endpoint; collection = Arazzo collection; workflow = Arazzo workflow; step = Arazzo workflow step."
@@ -2624,19 +2621,19 @@ const Ta = {
2624
2621
  "title"
2625
2622
  ])
2626
2623
  ).describe("Fields to include in the response."),
2627
- apiId: i().optional().describe(
2624
+ apiId: c().optional().describe(
2628
2625
  "OpenAPI API ID (from loaded spec). For one endpoint, pair with operationId or path+method."
2629
2626
  ),
2630
- path: i().optional().describe(
2627
+ path: c().optional().describe(
2631
2628
  "Filter by API path (e.g. /users). Use with method for precise operation matching."
2632
2629
  ),
2633
- method: i().optional().describe(
2630
+ method: c().optional().describe(
2634
2631
  "Filter by HTTP method (GET, POST, PUT, DELETE, etc). Use with path for precise operation matching."
2635
2632
  ),
2636
- operationId: i().optional().describe("OpenAPI operationId. Requires apiId."),
2637
- collectionId: i().optional().describe("Arazzo collection ID."),
2638
- workflowId: i().optional().describe("Workflow ID within the collection. Requires collectionId."),
2639
- stepId: i().optional().describe("Step ID within a workflow. Requires collectionId and workflowId.")
2633
+ operationId: c().optional().describe("OpenAPI operationId. Requires apiId."),
2634
+ collectionId: c().optional().describe("Arazzo collection ID."),
2635
+ workflowId: c().optional().describe("Workflow ID within the collection. Requires collectionId."),
2636
+ stepId: c().optional().describe("Step ID within a workflow. Requires collectionId and workflowId.")
2640
2637
  }).strict(), Ea = he(), $a = {
2641
2638
  description: Oa,
2642
2639
  inputSchema: Aa,
@@ -2670,7 +2667,7 @@ function Ra(e) {
2670
2667
  };
2671
2668
  }
2672
2669
  function Pa(e) {
2673
- const t = [], { type: o, apiId: n, path: r, method: s, operationId: a, collectionId: l, workflowId: c, stepId: d, query: u } = e;
2670
+ const t = [], { type: o, apiId: n, path: r, method: s, operationId: a, collectionId: i, workflowId: l, stepId: d, query: u } = e;
2674
2671
  switch (o) {
2675
2672
  case "api":
2676
2673
  n || t.push("apiId");
@@ -2680,23 +2677,23 @@ function Pa(e) {
2680
2677
  t.push("apiId");
2681
2678
  break;
2682
2679
  }
2683
- const w = a != null && a !== "", g = r != null && r !== "" && s != null && s !== "";
2684
- !w && !g && t.push("operationId", "path", "method");
2680
+ const I = a != null && a !== "", g = r != null && r !== "" && s != null && s !== "";
2681
+ !I && !g && t.push("operationId", "path", "method");
2685
2682
  break;
2686
2683
  }
2687
2684
  case "collection":
2688
- l || t.push("collectionId");
2685
+ i || t.push("collectionId");
2689
2686
  break;
2690
2687
  case "workflow":
2691
- l ? c || t.push("workflowId") : t.push("collectionId");
2688
+ i ? l || t.push("workflowId") : t.push("collectionId");
2692
2689
  break;
2693
2690
  case "step":
2694
- l ? c ? d || t.push("stepId") : t.push("workflowId") : t.push("collectionId");
2691
+ i ? l ? d || t.push("stepId") : t.push("workflowId") : t.push("collectionId");
2695
2692
  break;
2696
2693
  default:
2697
- if (l != null && l !== "" && (c ? d || t.push("stepId") : t.push("workflowId")), n != null && n !== "") {
2698
- const w = a != null && a !== "", g = r != null && r !== "" && s != null && s !== "";
2699
- !w && !g && t.push("operationId", "path", "method");
2694
+ if (i != null && i !== "" && (l ? d || t.push("stepId") : t.push("workflowId")), n != null && n !== "") {
2695
+ const I = a != null && a !== "", g = r != null && r !== "" && s != null && s !== "";
2696
+ !I && !g && t.push("operationId", "path", "method");
2700
2697
  }
2701
2698
  }
2702
2699
  u != null && u.trim() !== "" || t.push("query");
@@ -2708,48 +2705,46 @@ function qa(e, t) {
2708
2705
  const o = e.paths ?? {};
2709
2706
  for (const [n, r] of Object.entries(o)) {
2710
2707
  if (!r || typeof r != "object") continue;
2711
- const s = r, a = [
2712
- ...xa.filter((c) => c in r),
2713
- ..._a.filter((c) => c in r)
2708
+ const s = [
2709
+ ...xa.filter((i) => i in r),
2710
+ ..._a.filter((i) => i in r)
2714
2711
  ];
2715
- for (const c of a) {
2716
- const d = r[c];
2717
- if (!d || typeof d != "object") continue;
2718
- const u = d;
2719
- if (!(t.operationId && (u.operationId ?? "") !== t.operationId) && !(t.path && n !== t.path) && !(t.method && c.toUpperCase() !== t.method.toUpperCase()))
2720
- return { path: n, method: c, op: u, pathItem: s };
2712
+ for (const i of s) {
2713
+ const l = r[i];
2714
+ if (!l || typeof l != "object") continue;
2715
+ const d = l;
2716
+ if (!(t.operationId && (d.operationId ?? "") !== t.operationId) && !(t.path && n !== t.path) && !(t.method && i.toUpperCase() !== t.method.toUpperCase()))
2717
+ return { path: n, method: i, op: d, pathItem: r };
2718
+ }
2719
+ const a = r.additionalOperations;
2720
+ if (a && typeof a == "object") {
2721
+ for (const [i, l] of Object.entries(a))
2722
+ if (!(!l || typeof l != "object") && !(t.operationId && (l.operationId ?? "") !== t.operationId) && !(t.path && n !== t.path) && !(t.method && i.toUpperCase() !== t.method.toUpperCase()))
2723
+ return { path: n, method: i, op: l, pathItem: r };
2721
2724
  }
2722
- const l = s.additionalOperations;
2723
- if (l && typeof l == "object")
2724
- for (const [c, d] of Object.entries(l)) {
2725
- if (!d || typeof d != "object") continue;
2726
- const u = d;
2727
- if (!(t.operationId && (u.operationId ?? "") !== t.operationId) && !(t.path && n !== t.path) && !(t.method && c.toUpperCase() !== t.method.toUpperCase()))
2728
- return { path: n, method: c, op: u, pathItem: s };
2729
- }
2730
2725
  }
2731
2726
  return null;
2732
2727
  }
2733
2728
  function Na(e, t) {
2734
2729
  const { type: o, apiId: n, operationId: r, path: s, method: a } = t;
2735
2730
  if (!n) return [];
2736
- const l = e.find((v) => v.id === n);
2737
- if (!l) return [];
2731
+ const i = e.find((v) => v.id === n);
2732
+ if (!i) return [];
2738
2733
  if (o === "api")
2739
- return [{ ...He(l).payload, score: 1 }];
2740
- const c = r != null && r !== "", d = s != null && s !== "" && a != null && a !== "";
2741
- if (!(o === "api_operation" || c || d || o == null && (c || d)))
2742
- return o == null ? [{ ...He(l).payload, score: 1 }] : [];
2743
- const f = qa(l, { operationId: r, path: s, method: a });
2734
+ return [{ ...He(i).payload, score: 1 }];
2735
+ const l = r != null && r !== "", d = s != null && s !== "" && a != null && a !== "";
2736
+ if (!(o === "api_operation" || l || d || o == null && (l || d)))
2737
+ return o == null ? [{ ...He(i).payload, score: 1 }] : [];
2738
+ const f = qa(i, { operationId: r, path: s, method: a });
2744
2739
  return f ? [{ ..._o({
2745
- apiId: l.id,
2746
- apiTitle: l.info?.title ?? "Untitled API",
2740
+ apiId: i.id,
2741
+ apiTitle: i.info?.title ?? "Untitled API",
2747
2742
  path: f.path,
2748
2743
  method: f.method,
2749
2744
  op: f.op,
2750
2745
  pathItem: f.pathItem,
2751
- globalSchemes: Ro(l),
2752
- apiSecurity: l.security
2746
+ globalSchemes: Ro(i),
2747
+ apiSecurity: i.security
2753
2748
  }).payload, score: 1 }] : [];
2754
2749
  }
2755
2750
  function Ua(e, t) {
@@ -2757,10 +2752,10 @@ function Ua(e, t) {
2757
2752
  if (!n) return [];
2758
2753
  const a = e.find((u) => u.id === n);
2759
2754
  if (!a) return [];
2760
- const l = a.info?.title ?? "Untitled Collection";
2755
+ const i = a.info?.title ?? "Untitled Collection";
2761
2756
  if (o === "collection")
2762
2757
  return [{ ...Ge(a).payload, score: 1 }];
2763
- const c = () => {
2758
+ const l = () => {
2764
2759
  if (!r || !s) return [];
2765
2760
  const u = a.workflows?.find((m) => (m.workflowId ?? "") === r);
2766
2761
  if (!u) return [];
@@ -2769,7 +2764,7 @@ function Ua(e, t) {
2769
2764
  {
2770
2765
  ...Po({
2771
2766
  collectionId: n,
2772
- collectionTitle: l,
2767
+ collectionTitle: i,
2773
2768
  workflowId: r,
2774
2769
  workflowTitle: u.summary ?? r,
2775
2770
  step: f
@@ -2782,12 +2777,12 @@ function Ua(e, t) {
2782
2777
  const u = a.workflows?.find((f) => (f.workflowId ?? "") === r);
2783
2778
  return u ? [
2784
2779
  {
2785
- ...qo({ collectionId: n, collectionTitle: l, workflow: u }).payload,
2780
+ ...qo({ collectionId: n, collectionTitle: i, workflow: u }).payload,
2786
2781
  score: 1
2787
2782
  }
2788
2783
  ] : [];
2789
2784
  };
2790
- return o === "step" ? c() : o === "workflow" ? d() : o == null ? s && r ? c() : r ? d() : [{ ...Ge(a).payload, score: 1 }] : [];
2785
+ return o === "step" ? l() : o === "workflow" ? d() : o == null ? s && r ? l() : r ? d() : [{ ...Ge(a).payload, score: 1 }] : [];
2791
2786
  }
2792
2787
  function Da(e, t) {
2793
2788
  const o = e.get(ue), n = e.get(b), { type: r } = t;
@@ -2848,86 +2843,86 @@ const Ya = [
2848
2843
  "password"
2849
2844
  ], Va = {
2850
2845
  grantType: E(Ga).optional().describe("OAuth2 grant type."),
2851
- clientId: i().optional(),
2852
- clientSecret: i().optional(),
2853
- tokenUrl: i().optional(),
2854
- authorizationUrl: i().optional(),
2855
- callbackUrl: i().optional(),
2856
- accessToken: i().optional(),
2857
- username: i().optional().describe("For password grant type."),
2858
- password: i().optional().describe("For password grant type.")
2846
+ clientId: c().optional(),
2847
+ clientSecret: c().optional(),
2848
+ tokenUrl: c().optional(),
2849
+ authorizationUrl: c().optional(),
2850
+ callbackUrl: c().optional(),
2851
+ accessToken: c().optional(),
2852
+ username: c().optional().describe("For password grant type."),
2853
+ password: c().optional().describe("For password grant type.")
2859
2854
  }, Ka = p({
2860
- username: i().optional(),
2861
- password: i().optional()
2855
+ username: c().optional(),
2856
+ password: c().optional()
2862
2857
  }).strict(), Ja = p({
2863
- username: i().optional(),
2864
- password: i().optional()
2858
+ username: c().optional(),
2859
+ password: c().optional()
2865
2860
  }).strict(), Qa = p({
2866
- token: i().optional()
2861
+ token: c().optional()
2867
2862
  }).strict(), Xa = p({
2868
2863
  location: E(["header", "query", "cookie"]).optional(),
2869
- name: i().optional().describe(
2864
+ name: c().optional().describe(
2870
2865
  "Must match the OpenAPI security scheme `name` (header/query/cookie parameter name). Not the scheme component ref id (e.g. UserCookie)."
2871
2866
  ),
2872
- key: i().optional().describe(
2867
+ key: c().optional().describe(
2873
2868
  "Secret value or `$inputs.<name>` / `{$inputs.<name>}`. The `<name>` segment must be identical to `data.name` (OpenAPI apiKey `name`, e.g. accessToken). Wrong example: `data.name` accessToken but key `$inputs.UserCookie` (UserCookie is the securitySchemes ref, not the cookie name)."
2874
2869
  )
2875
2870
  }).strict(), Lt = p({
2876
2871
  ...Va
2877
2872
  }).strict(), Za = Lt.extend({
2878
- openIdConnectUrl: i().optional(),
2879
- userInfoUrl: i().optional()
2880
- }).strict(), Mt = i().optional().describe(
2873
+ openIdConnectUrl: c().optional(),
2874
+ userInfoUrl: c().optional()
2875
+ }).strict(), Mt = c().optional().describe(
2881
2876
  "Target step id for this change. Overrides the top-level stepId; use to batch changes for several steps of the same workflow in one call."
2882
2877
  ), B = Wn.extend({
2883
2878
  action: E(["add", "update"]),
2884
- schemeId: i().optional(),
2879
+ schemeId: c().optional(),
2885
2880
  stepId: Mt
2886
- }), ei = Ie("type", [
2881
+ }), ei = we("type", [
2887
2882
  B.extend({
2888
- type: I(k.BasicAuth),
2883
+ type: w(k.BasicAuth),
2889
2884
  data: Ka.optional()
2890
2885
  }).strict(),
2891
2886
  B.extend({
2892
- type: I(k.DigestAuth),
2887
+ type: w(k.DigestAuth),
2893
2888
  data: Ja.optional()
2894
2889
  }).strict(),
2895
2890
  B.extend({
2896
- type: I(k.JWT),
2891
+ type: w(k.JWT),
2897
2892
  data: Qa.optional()
2898
2893
  }).strict(),
2899
2894
  B.extend({
2900
- type: I(k.APIKey),
2895
+ type: w(k.APIKey),
2901
2896
  data: Xa.optional()
2902
2897
  }).strict(),
2903
2898
  B.extend({
2904
- type: I(k.OAuth2),
2899
+ type: w(k.OAuth2),
2905
2900
  data: Lt.optional()
2906
2901
  }).strict(),
2907
2902
  B.extend({
2908
- type: I(k.OpenIDConnect),
2903
+ type: w(k.OpenIDConnect),
2909
2904
  data: Za.optional()
2910
2905
  }).strict()
2911
2906
  ]), ti = Re.extend({
2912
- action: I("remove"),
2907
+ action: w("remove"),
2913
2908
  index: A().int().min(0).describe(
2914
2909
  "0-based position of the entry in the step's current security list; every index in one call refers to that same list. Position, not schemeId, identifies the entry - a step can list the same scheme more than once."
2915
2910
  ),
2916
2911
  stepId: Mt
2917
2912
  }).strict(), oi = _e([ei, ti]), ni = p({
2918
- collectionId: i().describe(
2913
+ collectionId: c().describe(
2919
2914
  "Saved step: collection id. Unsaved draft tab on focus: empty string (with empty workflowId and stepId)."
2920
2915
  ),
2921
- workflowId: i().describe(
2916
+ workflowId: c().describe(
2922
2917
  "Saved step: workflow id. Unsaved draft tab: empty string (with empty collectionId and stepId)."
2923
2918
  ),
2924
- stepId: i().describe(
2919
+ stepId: c().describe(
2925
2920
  "Saved step: step id (default target for changes without their own stepId; may be empty when every change sets one). Unsaved draft tab: empty string (with empty collectionId and workflowId)."
2926
2921
  ),
2927
2922
  changes: T(oi).min(1).describe("List of security changes to apply.")
2928
2923
  }).strict().superRefine((e, t) => {
2929
- const o = e.collectionId.trim(), n = e.workflowId.trim(), r = e.stepId.trim(), s = e.changes.map((u) => u.stepId?.trim()), a = s.every(Boolean), l = s.some(Boolean);
2930
- !(o && n && (r || a)) && !(!o && !n && !r && !l) && t.addIssue({
2924
+ const o = e.collectionId.trim(), n = e.workflowId.trim(), r = e.stepId.trim(), s = e.changes.map((u) => u.stepId?.trim()), a = s.every(Boolean), i = s.some(Boolean);
2925
+ !(o && n && (r || a)) && !(!o && !n && !r && !i) && t.addIssue({
2931
2926
  code: H.custom,
2932
2927
  message: "Provide collectionId and workflowId plus a stepId for every change (top-level or per-change), or all empty ids for the focused unsaved request tab.",
2933
2928
  path: ["collectionId"]
@@ -2976,7 +2971,7 @@ function it(e, t) {
2976
2971
  const o = Object.entries(t);
2977
2972
  for (const [s, a] of o)
2978
2973
  s === "grantType" && typeof a == "string" && Be[a] && (e.grantType = Be[a]);
2979
- const n = e[e.grantType], r = new Set(Object.keys(Io[e.grantType]));
2974
+ const n = e[e.grantType], r = new Set(Object.keys(wo[e.grantType]));
2980
2975
  for (const [s, a] of o)
2981
2976
  s !== "grantType" && a !== void 0 && r.has(s) && (n[s] = a);
2982
2977
  }
@@ -3030,77 +3025,77 @@ function ct(e, t, o, n) {
3030
3025
  } : null;
3031
3026
  }
3032
3027
  function fi(e, t, o) {
3033
- let n = e;
3028
+ let n = [...e];
3034
3029
  const r = [], s = t.filter(
3035
- (c) => c.action !== _.REMOVE
3030
+ (l) => l.action !== _.REMOVE
3036
3031
  ), a = t.filter(
3037
- (c) => c.action === _.REMOVE
3038
- ), l = /* @__PURE__ */ new Set();
3039
- for (const c of a) {
3040
- const d = ai(e, c);
3032
+ (l) => l.action === _.REMOVE
3033
+ ), i = /* @__PURE__ */ new Set();
3034
+ for (const l of a) {
3035
+ const d = ai(e, l);
3041
3036
  if (!d.ok) return { ok: !1, message: d.message };
3042
- l.add(d.entry);
3037
+ i.add(d.entry);
3043
3038
  }
3044
- for (const c of s) {
3045
- if (c.action === _.ADD) {
3046
- const f = n.length === 1 && n[0].securityType === k.NoAuth, m = f ? -1 : di(n, c);
3039
+ for (const l of s) {
3040
+ if (l.action === _.ADD) {
3041
+ const f = n.length === 1 && n[0].securityType === k.NoAuth, m = f ? -1 : di(n, l);
3047
3042
  if (m >= 0) {
3048
- const w = n[m], g = ct(l, w, m, o);
3043
+ const I = n[m], g = ct(i, I, m, o);
3049
3044
  if (g) return g;
3050
- if (w.securityType !== c.type)
3045
+ if (I.securityType !== l.type)
3051
3046
  return {
3052
3047
  ok: !1,
3053
- message: `Scheme '${c.schemeId}' already exists${o} as ${w.securityType}, not ${c.type}. Match the documented scheme type (plain http/bearer -> JWT with data.token; OAuth 2.0 only for grant-based flows), or use action "update" at index ${m} to intentionally change the type.`
3048
+ message: `Scheme '${l.schemeId}' already exists${o} as ${I.securityType}, not ${l.type}. Match the documented scheme type (plain http/bearer -> JWT with data.token; OAuth 2.0 only for grant-based flows), or use action "update" at index ${m} to intentionally change the type.`
3054
3049
  };
3055
- n = [...n], n[m] = ke(
3056
- structuredClone(w),
3057
- c
3050
+ n[m] = ke(
3051
+ structuredClone(I),
3052
+ l
3058
3053
  ), r.push(
3059
3054
  y(
3060
3055
  "applied",
3061
- `Updated existing ${pi(c)} in place (index: ${m})${o}`
3056
+ `Updated existing ${pi(l)} in place (index: ${m})${o}`
3062
3057
  )
3063
3058
  );
3064
3059
  continue;
3065
3060
  }
3066
- if (ci(c) && ui(c) && !c.data?.grantType)
3061
+ if (ci(l) && ui(l) && !l.data?.grantType)
3067
3062
  return {
3068
3063
  ok: !1,
3069
- message: `grantType is required when adding ${c.type} security with flow values${o}. For a plain http/bearer token use type "${k.JWT}" with data.token instead.`
3064
+ message: `grantType is required when adding ${l.type} security with flow values${o}. For a plain http/bearer token use type "${k.JWT}" with data.token instead.`
3070
3065
  };
3071
- const v = ke(Fe(), c);
3072
- n = f ? [v] : [...n, v], r.push(
3066
+ const v = ke(Fe(), l);
3067
+ f ? n = [v] : n.push(v), r.push(
3073
3068
  y(
3074
3069
  "applied",
3075
- `Added ${c.type} security (index: ${n.length - 1})${o}`
3070
+ `Added ${l.type} security (index: ${n.length - 1})${o}`
3076
3071
  )
3077
3072
  );
3078
3073
  continue;
3079
3074
  }
3080
- if (c.index === void 0)
3075
+ if (l.index === void 0)
3081
3076
  return { ok: !1, message: "index is required for update action." };
3082
- if (c.index >= n.length)
3077
+ if (l.index >= n.length)
3083
3078
  return {
3084
3079
  ok: !1,
3085
- message: `Index ${c.index} out of bounds. Step has ${n.length} security entries.`
3080
+ message: `Index ${l.index} out of bounds. Step has ${n.length} security entries.`
3086
3081
  };
3087
- const d = n[c.index], u = ct(l, d, c.index, o);
3082
+ const d = n[l.index], u = ct(i, d, l.index, o);
3088
3083
  if (u) return u;
3089
3084
  if (d.securitySchemeId) {
3090
3085
  const f = Bt(d);
3091
- if (c.schemeId && f !== c.schemeId)
3086
+ if (l.schemeId && f !== l.schemeId)
3092
3087
  return {
3093
3088
  ok: !1,
3094
- message: `schemeId mismatch at index ${c.index}. Expected ${f ?? "none"}.`
3089
+ message: `schemeId mismatch at index ${l.index}. Expected ${f ?? "none"}.`
3095
3090
  };
3096
3091
  }
3097
- n = [...n], n[c.index] = ke(structuredClone(d), c), r.push(
3098
- y("applied", `Updated ${c.type} at index ${c.index}${o}`)
3092
+ n[l.index] = ke(structuredClone(d), l), r.push(
3093
+ y("applied", `Updated ${l.type} at index ${l.index}${o}`)
3099
3094
  );
3100
3095
  }
3101
- if (l.size > 0) {
3102
- const c = n.filter((u) => !l.has(u)), d = n.length - c.length;
3103
- n = c;
3096
+ if (i.size > 0) {
3097
+ const l = n.filter((u) => !i.has(u)), d = n.length - l.length;
3098
+ n = l;
3104
3099
  for (let u = 0; u < d; u++)
3105
3100
  r.push(y("applied"));
3106
3101
  }
@@ -3108,17 +3103,17 @@ function fi(e, t, o) {
3108
3103
  }
3109
3104
  function mi(e) {
3110
3105
  return async (t) => {
3111
- const { changes: o, collectionId: n, workflowId: r, stepId: s } = t, a = Ft(t), l = s.trim(), c = /* @__PURE__ */ new Map();
3106
+ const { changes: o, collectionId: n, workflowId: r, stepId: s } = t, a = Ft(t), i = s.trim(), l = /* @__PURE__ */ new Map();
3112
3107
  for (const m of o) {
3113
- const v = m.stepId?.trim() || l, w = c.get(v);
3114
- w ? w.push(m) : c.set(v, [m]);
3108
+ const v = m.stepId?.trim() || i, I = l.get(v);
3109
+ I ? I.push(m) : l.set(v, [m]);
3115
3110
  }
3116
3111
  const d = [], u = [];
3117
- for (const [m, v] of c) {
3118
- const w = Wt(e, n, r, m);
3119
- if (!w.ok)
3120
- return h(w.message, w.details);
3121
- const { readStep: g, updateStep: O } = w.value, S = m || w.value.step.stepId, F = c.size > 1 ? ` for step '${S}'` : "", Z = Array.from(g().security), D = fi(Z, v, F);
3112
+ for (const [m, v] of l) {
3113
+ const I = Wt(e, n, r, m);
3114
+ if (!I.ok)
3115
+ return h(I.message, I.details);
3116
+ const { readStep: g, updateStep: O } = I.value, S = m || I.value.step.stepId, F = l.size > 1 ? ` for step '${S}'` : "", Z = Array.from(g().security), D = fi(Z, v, F);
3122
3117
  if (!D.ok) return h(D.message);
3123
3118
  d.push(...D.applied), u.push({ updateStep: O, security: D.security, label: S });
3124
3119
  }
@@ -3143,7 +3138,7 @@ const hi = {
3143
3138
  name: "update_security",
3144
3139
  definition: si,
3145
3140
  createExecutor: (e) => mi(e.store)
3146
- }, Ii = `Update an existing Replay step with atomic changes.
3141
+ }, wi = `Update an existing Replay step with atomic changes.
3147
3142
 
3148
3143
  **What it does**
3149
3144
  - Mutates an existing step only (no create/delete).
@@ -3177,50 +3172,50 @@ const hi = {
3177
3172
  - Batch related edits in one call; include all known edits up front.
3178
3173
  - For OpenAPI-linked steps, avoid method/url changes.
3179
3174
  - After changing path/query parameters, decide whether to add a separate URL change.
3180
- `, wi = ["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"], yi = [
3175
+ `, Ii = ["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"], yi = [
3181
3176
  Y.Text,
3182
3177
  Y.JSON,
3183
3178
  Y.XML
3184
3179
  ], vi = p({
3185
- name: i().min(1),
3180
+ name: c().min(1),
3186
3181
  in: E(["path", "query", "header", "cookie"]),
3187
- value: i()
3182
+ value: c()
3188
3183
  }).strict(), gi = p({
3189
- condition: i().min(1),
3190
- context: i().optional().describe("Context for the expression."),
3184
+ condition: c().min(1),
3185
+ context: c().optional().describe("Context for the expression."),
3191
3186
  type: E(["simple", "regex", "jsonpath", "xpath"]).optional()
3192
3187
  }).strict(), bi = W.extend({
3193
- field: I("url"),
3194
- data: i().min(1).describe("New request URL for step.")
3188
+ field: w("url"),
3189
+ data: c().min(1).describe("New request URL for step.")
3195
3190
  }).strict(), ki = W.extend({
3196
- field: I("description"),
3197
- data: i().describe("New step description text.")
3191
+ field: w("description"),
3192
+ data: c().describe("New step description text.")
3198
3193
  }).strict(), Si = W.extend({
3199
- field: I("method"),
3200
- data: E(wi).describe("New HTTP method for x-operation step.")
3194
+ field: w("method"),
3195
+ data: E(Ii).describe("New HTTP method for x-operation step.")
3201
3196
  }).strict(), Ti = W.extend({
3202
- field: I("parameters"),
3197
+ field: w("parameters"),
3203
3198
  data: vi.optional().describe("Parameter data. Required for add/update actions.")
3204
3199
  }).strict(), Ci = W.extend({
3205
- field: I("outputs"),
3200
+ field: w("outputs"),
3206
3201
  data: p({
3207
- name: i().min(1).describe("Output name."),
3208
- expression: i().min(1).describe("Output expression.")
3202
+ name: c().min(1).describe("Output name."),
3203
+ expression: c().min(1).describe("Output expression.")
3209
3204
  }).strict().optional().describe("Output mapping. Required for add/update actions.")
3210
3205
  }).strict(), Oi = W.extend({
3211
- field: I("successCriteria"),
3206
+ field: w("successCriteria"),
3212
3207
  data: gi.optional().describe(
3213
3208
  "Success criterion. Required for add/update actions."
3214
3209
  )
3215
3210
  }).strict(), Ai = W.extend({
3216
- field: I("body"),
3211
+ field: w("body"),
3217
3212
  data: p({
3218
3213
  contentType: E(yi).optional().describe(
3219
3214
  "Request body content type. Allowed: text/plain, application/json, application/xml."
3220
3215
  ),
3221
- content: i().describe("Request body content as string.")
3216
+ content: c().describe("Request body content as string.")
3222
3217
  }).strict().describe("Request body content and optional content type.")
3223
- }).strict(), Ei = Ie("field", [
3218
+ }).strict(), Ei = we("field", [
3224
3219
  bi,
3225
3220
  ki,
3226
3221
  Si,
@@ -3229,13 +3224,13 @@ const hi = {
3229
3224
  Oi,
3230
3225
  Ai
3231
3226
  ]), $i = p({
3232
- collectionId: i().describe(
3227
+ collectionId: c().describe(
3233
3228
  "Saved step: collection id. Unsaved draft tab on focus: empty string (with empty workflowId and stepId)."
3234
3229
  ),
3235
- workflowId: i().describe(
3230
+ workflowId: c().describe(
3236
3231
  "Saved step: workflow id. Unsaved draft tab: empty string (with empty collectionId and stepId)."
3237
3232
  ),
3238
- stepId: i().describe(
3233
+ stepId: c().describe(
3239
3234
  "Saved step: step id. Unsaved draft tab: empty string (with empty collectionId and workflowId)."
3240
3235
  ),
3241
3236
  changes: T(Ei).min(1).describe("List of individual changes to apply to the step.")
@@ -3247,7 +3242,7 @@ const hi = {
3247
3242
  path: ["collectionId"]
3248
3243
  });
3249
3244
  }), xi = xt, _i = {
3250
- description: Ii,
3245
+ description: wi,
3251
3246
  inputSchema: $i,
3252
3247
  outputSchema: xi,
3253
3248
  needsApproval: () => !0
@@ -3276,7 +3271,7 @@ function Ue(e, t) {
3276
3271
  function de(e, t, o) {
3277
3272
  let n = !1;
3278
3273
  return e((r) => {
3279
- const s = r.findIndex((l) => o.find(l, t));
3274
+ const s = r.findIndex((i) => o.find(i, t));
3280
3275
  if (s < 0) return r;
3281
3276
  const a = [...r];
3282
3277
  return a[s] = o.produce(r[s]), n = !0, a;
@@ -3294,10 +3289,10 @@ function Pi(e, { readStep: t, updateParameters: o }) {
3294
3289
  case _.ADD: {
3295
3290
  if (!e.data)
3296
3291
  return y("failed", "Failed parameter add because data is missing.");
3297
- const { in: n, name: r, value: s } = e.data, a = Se(n), l = dt(n, r, s);
3298
- return Ue(o(a), [l]), y(
3292
+ const { in: n, name: r, value: s } = e.data, a = Se(n), i = dt(n, r, s);
3293
+ return Ue(o(a), [i]), y(
3299
3294
  "applied",
3300
- `Added ${n} parameter '${r}' (id: ${l.id})`
3295
+ `Added ${n} parameter '${r}' (id: ${i.id})`
3301
3296
  );
3302
3297
  }
3303
3298
  case _.UPDATE: {
@@ -3308,11 +3303,11 @@ function Pi(e, { readStep: t, updateParameters: o }) {
3308
3303
  const { in: n, name: r, value: s } = e.data, a = Se(n);
3309
3304
  return de(o(a), e.id, {
3310
3305
  find: Ce,
3311
- produce: (c) => Ae(c) ? {
3306
+ produce: (l) => Ae(l) ? {
3312
3307
  ...dt(n, r, s),
3313
- id: c.id,
3314
- ...c.allowReserved !== void 0 && { allowReserved: c.allowReserved }
3315
- } : c
3308
+ id: l.id,
3309
+ ...l.allowReserved !== void 0 && { allowReserved: l.allowReserved }
3310
+ } : l
3316
3311
  }) ? y("applied") : y("failed", `Parameter with id '${e.id}' not found.`);
3317
3312
  }
3318
3313
  case _.REMOVE: {
@@ -3320,9 +3315,9 @@ function Pi(e, { readStep: t, updateParameters: o }) {
3320
3315
  return y("failed", "Failed parameter remove because id is missing.");
3321
3316
  const n = e.id, r = e.data?.in, s = r ? [Se(r)] : Object.values(ae);
3322
3317
  let a = !1;
3323
- for (const l of s)
3324
- if (t().parameters[l].some((d) => Ce(d, n))) {
3325
- a = De(o(l), n, Ce);
3318
+ for (const i of s)
3319
+ if (t().parameters[i].some((d) => Ce(d, n))) {
3320
+ a = De(o(i), n, Ce);
3326
3321
  break;
3327
3322
  }
3328
3323
  return a ? y("applied") : y("failed", `Parameter with id '${n}' not found.`);
@@ -3334,11 +3329,11 @@ function qi(e, { readStep: t, updateOutputs: o }) {
3334
3329
  case _.ADD: {
3335
3330
  if (!e.data)
3336
3331
  return y("failed", "Failed output add because data is missing.");
3337
- const { name: n, expression: r } = e.data, s = t().outputs.find((l) => l.key === n);
3332
+ const { name: n, expression: r } = e.data, s = t().outputs.find((i) => i.key === n);
3338
3333
  if (s)
3339
3334
  return de(o, s.id, {
3340
3335
  find: Te,
3341
- produce: (l) => ({ ...l, key: n, value: r, active: !0 })
3336
+ produce: (i) => ({ ...i, key: n, value: r, active: !0 })
3342
3337
  }), y(
3343
3338
  "applied",
3344
3339
  `Updated existing output '${n}' in place (id: ${s.id})`
@@ -3420,10 +3415,10 @@ function Ni(e, { updateSuccessCriteria: t }) {
3420
3415
  const ut = { method: "GET", url: "" };
3421
3416
  function Ui(e) {
3422
3417
  return async (t) => {
3423
- const { changes: o, collectionId: n, workflowId: r, stepId: s } = t, a = Ft(t), l = Wt(e, n, r, s);
3424
- if (!l.ok)
3425
- return h(l.message, l.details);
3426
- const { step: c, readStep: d, updateStep: u } = l.value, f = {
3418
+ const { changes: o, collectionId: n, workflowId: r, stepId: s } = t, a = Ft(t), i = Wt(e, n, r, s);
3419
+ if (!i.ok)
3420
+ return h(i.message, i.details);
3421
+ const { step: l, readStep: d, updateStep: u } = i.value, f = {
3427
3422
  readStep: d,
3428
3423
  updateParameters: (g) => (O) => u((S) => ({
3429
3424
  ...S,
@@ -3437,7 +3432,7 @@ function Ui(e) {
3437
3432
  };
3438
3433
  if (o.some(
3439
3434
  (g) => g.field === "method" || g.field === "url"
3440
- ) && c.operation !== null)
3435
+ ) && l.operation !== null)
3441
3436
  return h(
3442
3437
  "Cannot update method or url for a step linked to an OpenAPI operation."
3443
3438
  );
@@ -3459,7 +3454,7 @@ function Ui(e) {
3459
3454
  xOperation: { ...S.xOperation ?? ut, url: O },
3460
3455
  parameters: {
3461
3456
  ...S.parameters,
3462
- queryParameters: wo(
3457
+ queryParameters: Io(
3463
3458
  yo(O),
3464
3459
  S.parameters.queryParameters
3465
3460
  )
@@ -3496,14 +3491,14 @@ function Ui(e) {
3496
3491
  v.push(Ni(g, f));
3497
3492
  break;
3498
3493
  }
3499
- const w = o.some((g) => g.field === "outputs");
3494
+ const I = o.some((g) => g.field === "outputs");
3500
3495
  return {
3501
3496
  isError: !1,
3502
3497
  data: {
3503
3498
  totalChanges: a.totalChanges ?? o.length,
3504
3499
  approvedChanges: a.approvedChanges ?? o.length,
3505
3500
  applied: v,
3506
- ...w && {
3501
+ ...I && {
3507
3502
  resultingState: xe(d().outputs) || "Outputs: (none)"
3508
3503
  }
3509
3504
  }
@@ -3532,8 +3527,8 @@ const Di = {
3532
3527
  **Input guidance**
3533
3528
  - State a clear, self-contained query: what to look up and what to return (facts, links, version numbers, etc.).
3534
3529
  - Prefer one web search call per distinct lookup; do not nest web search calls.`, Li = p({
3535
- task: i().describe("What to search for on the web and what to return"),
3536
- url: i().describe("The URL to execute search on")
3530
+ task: c().describe("What to search for on the web and what to return"),
3531
+ url: c().describe("The URL to execute search on")
3537
3532
  }), Mi = he(), Fi = {
3538
3533
  description: Wi,
3539
3534
  inputSchema: Li,
@@ -3576,7 +3571,6 @@ function Hi(e) {
3576
3571
  tools: t,
3577
3572
  toolChoice: "required",
3578
3573
  stopWhen: $o("web_search"),
3579
- temperature: 0,
3580
3574
  abortSignal: r.abortSignal
3581
3575
  }).text
3582
3576
  }
@@ -3606,7 +3600,7 @@ const Vi = {
3606
3600
  }, jt = [
3607
3601
  Js,
3608
3602
  ia,
3609
- Ia,
3603
+ wa,
3610
3604
  Ta,
3611
3605
  za,
3612
3606
  hi,
@@ -3615,7 +3609,7 @@ const Vi = {
3615
3609
  Gr,
3616
3610
  $s,
3617
3611
  Vi,
3618
- wr
3612
+ Ir
3619
3613
  ];
3620
3614
  function Ki(e) {
3621
3615
  return jt.some((t) => t.name === e);
@@ -3663,7 +3657,7 @@ function Zi(e) {
3663
3657
  approval: { id: e.approval.id, approved: !1 }
3664
3658
  };
3665
3659
  }
3666
- function Ic(e) {
3660
+ function wc(e) {
3667
3661
  const t = [], o = [];
3668
3662
  let n = 0;
3669
3663
  const r = {}, s = () => {
@@ -3672,58 +3666,58 @@ function Ic(e) {
3672
3666
  key: `reasoning-${n++}`,
3673
3667
  items: [...o]
3674
3668
  }), o.length = 0);
3675
- }, a = (l) => {
3676
- const c = l.trim();
3677
- if (c.length === 0)
3669
+ }, a = (i) => {
3670
+ const l = i.trim();
3671
+ if (l.length === 0)
3678
3672
  return;
3679
3673
  const d = o[o.length - 1];
3680
- d?.kind === "action" && d.text === c || o.push({ kind: "action", text: c });
3674
+ d?.kind === "action" && d.text === l || o.push({ kind: "action", text: l });
3681
3675
  };
3682
- for (let l = 0; l < e.length; l++) {
3683
- const c = e[l];
3684
- if (c.type === "step-start")
3676
+ for (let i = 0; i < e.length; i++) {
3677
+ const l = e[i];
3678
+ if (l.type === "step-start")
3685
3679
  continue;
3686
- if (c.type === "text") {
3680
+ if (l.type === "text") {
3687
3681
  s();
3688
- const u = c.text ?? "";
3682
+ const u = l.text ?? "";
3689
3683
  u.length > 0 && t.push({
3690
3684
  kind: "text",
3691
3685
  text: u,
3692
- key: `text-${l}`,
3686
+ key: `text-${i}`,
3693
3687
  workflowRunHistoryIds: Object.fromEntries(
3694
3688
  Object.entries(r).map(([f, m]) => [f, [...m]])
3695
3689
  )
3696
3690
  });
3697
3691
  continue;
3698
3692
  }
3699
- if (!We(c))
3693
+ if (!We(l))
3700
3694
  continue;
3701
- const d = Ji(c.type);
3695
+ const d = Ji(l.type);
3702
3696
  if (d === Wo) {
3703
- const u = tc(c);
3697
+ const u = tc(l);
3704
3698
  if (u) {
3705
3699
  const f = Qi(u.collectionId, u.workflowId), m = r[f] ??= [];
3706
3700
  m.includes(u.historyId) || m.push(u.historyId);
3707
3701
  }
3708
3702
  }
3709
3703
  if (d === Do) {
3710
- const u = oc(c.input);
3704
+ const u = oc(l.input);
3711
3705
  u && a(u);
3712
3706
  continue;
3713
3707
  }
3714
- if (Le(c) || Xi(c)) {
3715
- s(), t.push({ kind: "tool", part: c, key: `tool-${l}` });
3708
+ if (Le(l) || Xi(l)) {
3709
+ s(), t.push({ kind: "tool", part: l, key: `tool-${i}` });
3716
3710
  continue;
3717
3711
  }
3718
3712
  }
3719
3713
  return s(), t;
3720
3714
  }
3721
3715
  const ec = p({
3722
- isError: I(!1),
3716
+ isError: w(!1),
3723
3717
  data: p({
3724
- collectionId: i().min(1),
3725
- workflowId: i().min(1),
3726
- historyId: i().min(1)
3718
+ collectionId: c().min(1),
3719
+ workflowId: c().min(1),
3720
+ historyId: c().min(1)
3727
3721
  })
3728
3722
  });
3729
3723
  function tc(e) {
@@ -3741,7 +3735,7 @@ function oc(e) {
3741
3735
  const o = t.trim();
3742
3736
  return o.length > 0 ? o : void 0;
3743
3737
  }
3744
- function wc(e) {
3738
+ function Ic(e) {
3745
3739
  return e.filter((t) => t.type === "text").map((t) => t.text ?? "").join("");
3746
3740
  }
3747
3741
  function yc(e) {
@@ -3768,7 +3762,7 @@ export {
3768
3762
  _ as C,
3769
3763
  Ji as D,
3770
3764
  Xi as E,
3771
- Ic as F,
3765
+ wc as F,
3772
3766
  vc as G,
3773
3767
  uc as H,
3774
3768
  ae as L,
@@ -3777,12 +3771,12 @@ export {
3777
3771
  Gr as b,
3778
3772
  hi as c,
3779
3773
  Ta as d,
3780
- Ia as e,
3774
+ wa as e,
3781
3775
  ia as f,
3782
- wr as g,
3776
+ Ir as g,
3783
3777
  mc as h,
3784
3778
  hc as i,
3785
- wc as j,
3779
+ Ic as j,
3786
3780
  yc as k,
3787
3781
  Ds as l,
3788
3782
  $s as m,