@uipath/maestro-builder-sdk 6.66.5 → 6.66.6

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.
@@ -114,7 +114,7 @@ function serializeVoiceAgent(s, ctx) {
114
114
  const json = voiceAgentJson({
115
115
  systemPrompt: s.systemPrompt, plan, voice: s.voice, maxIterations: s.maxIterations, source, name: ctx.step,
116
116
  });
117
- ctx.sidecar({ path: `${source}/agent.json`, json });
117
+ ctx.sidecar({ path: `${source}/agent.json`, json }, s.source !== undefined ? `voice agent step "${ctx.step}"` : undefined);
118
118
  if (plan.refs.length > 0)
119
119
  ctx.typeAgentInputs(json.inputSchema, plan.refs);
120
120
  // The resource model lives on the definition (its `model.source: true` is
@@ -169,7 +169,7 @@ function serializeConversationalAgent(s, ctx) {
169
169
  maxTokenPerResponse: s.maxTokenPerResponse, maxIterations: s.maxIterations,
170
170
  guardrails: s.guardrails, source, name: ctx.step,
171
171
  }),
172
- });
172
+ }, s.source !== undefined ? `conversational agent step "${ctx.step}"` : undefined);
173
173
  // A SHELL node, like the inline agent's (#927): exactly the keys
174
174
  // `toAgentShellInputs` keeps. The system prompt, the model and the run
175
175
  // settings live only in the sidecar (`metadata.isConversational` there is the
package/dist/serialize.js CHANGED
@@ -292,6 +292,13 @@ export function serializeWithSidecars(built, opts = {}) {
292
292
  const flow = serialize(built, { ...opts, sidecars });
293
293
  return { flow, sidecars };
294
294
  }
295
+ /**
296
+ * A sidecar path as the file system sees it on macOS (default APFS) and
297
+ * Windows, which ignore case: two paths with one key are one file there.
298
+ */
299
+ function sidecarKey(path) {
300
+ return path.toLowerCase();
301
+ }
295
302
  /**
296
303
  * `variables.nodes` — one entry per node OUTPUT, derived from the nodes we just
297
304
  * emitted.
@@ -1815,7 +1822,7 @@ function serializeFlow(built, opts) {
1815
1822
  * gets them and one that does not is unaffected.
1816
1823
  */
1817
1824
  const sidecars = opts.sidecars ?? [];
1818
- /** The sidecar paths an explicit `source` chose → who chose it (see `addSidecar`). */
1825
+ /** The sidecar paths an explicit `source` chose (by {@link sidecarKey}) → who chose it (see `addSidecar`). */
1819
1826
  const explicitSidecars = new Map();
1820
1827
  /**
1821
1828
  * Add one sidecar file. An agent or a resource whose explicit `source` names
@@ -1825,19 +1832,26 @@ function serializeFlow(built, opts) {
1825
1832
  * naming both; `owner` is the one whose `source` is explicit, as the refusal
1826
1833
  * names it (`inline agent step "answer"'s context index "SOP"`). The same file
1827
1834
  * twice (a subflow body emitted for two callers) is not a clash.
1835
+ *
1836
+ * Paths are compared by {@link sidecarKey}, ignoring case: on macOS (default
1837
+ * APFS) and Windows, `D84E2C17-…/agent.json` and `d84e2c17-…/agent.json` are
1838
+ * one file (#1278).
1828
1839
  */
1829
1840
  const addSidecar = (file, owner) => {
1830
- const earlier = sidecars.find((f) => f.path === file.path);
1831
- const earlierOwner = explicitSidecars.get(file.path);
1841
+ const key = sidecarKey(file.path);
1842
+ const earlier = sidecars.find((f) => sidecarKey(f.path) === key);
1843
+ const earlierOwner = explicitSidecars.get(key);
1832
1844
  if (earlier !== undefined && JSON.stringify(earlier.json) !== JSON.stringify(file.json)
1833
1845
  && (owner !== undefined || earlierOwner !== undefined)) {
1834
1846
  const names = [earlierOwner ?? 'another agent or resource', owner ?? 'another agent or resource'];
1835
- throw new CompileRefusal('INLINE_AGENT_RESOURCE_SOURCE_DUP', `${names[0].charAt(0).toUpperCase()}${names[0].slice(1)} and ${names[1]} would both write "${file.path}" with `
1847
+ const where = earlier.path === file.path ? `"${file.path}"`
1848
+ : `"${earlier.path}" and "${file.path}" (one file on macOS and Windows, which ignore case)`;
1849
+ throw new CompileRefusal('INLINE_AGENT_RESOURCE_SOURCE_DUP', `${names[0].charAt(0).toUpperCase()}${names[0].slice(1)} and ${names[1]} would both write ${where} with `
1836
1850
  + 'different content, so the second file would replace the first. Give each its own `source`, or omit '
1837
1851
  + '`source` to derive one.');
1838
1852
  }
1839
1853
  if (owner !== undefined && earlierOwner === undefined)
1840
- explicitSidecars.set(file.path, owner);
1854
+ explicitSidecars.set(key, owner);
1841
1855
  sidecars.push(file);
1842
1856
  };
1843
1857
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/maestro-builder-sdk",
3
- "version": "6.66.5",
3
+ "version": "6.66.6",
4
4
  "description": "Build UiPath Flow, Case, and BPMN artifacts by writing TypeScript.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://docs.uipath.com/maestro",
@@ -100,5 +100,5 @@
100
100
  "@types/node": "^22.7.0",
101
101
  "esbuild": "^0.28.1"
102
102
  },
103
- "gitref": "453ee3d98495e2def39548eab76cb0aedf237337"
103
+ "gitref": "108478742e5fc426dc26ba07020d85a3fdbcaa66"
104
104
  }