@withone/cli 1.13.5 → 1.13.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.
@@ -301,26 +301,30 @@ function isActionAllowed(actionId, allowedActionIds) {
301
301
  return allowedActionIds.includes("*") || allowedActionIds.includes(actionId);
302
302
  }
303
303
  function buildActionKnowledgeWithGuidance(knowledge, method, platform, actionId) {
304
- return `${knowledge}
304
+ return `CLI EXECUTION GUIDE (read this FIRST)
305
+ ========================================
306
+ To execute this action, use the One CLI with SEPARATE flags for each parameter type.
307
+ Do NOT pass path variables or query parameters in the -d body flag \u2014 this causes 403 errors.
305
308
 
306
- CLI PARAMETER MAPPING
307
- ======================
308
- Use the One CLI to execute this action. Map parameters from the documentation above to CLI flags:
309
+ PARAMETER \u2192 FLAG MAPPING:
310
+ - Path variables (URL placeholders like {userId}, {id}) \u2192 --path-vars '{"userId": "me"}'
311
+ - Query parameters (filtering, pagination, format) \u2192 --query-params '{"key": "value"}'
312
+ - For repeated params, use arrays: --query-params '{"metadataHeaders": ["From", "Subject"]}'
313
+ - Request body (POST/PUT/PATCH payload) \u2192 -d '{"field": "value"}'
309
314
 
310
- - **Path variables** (URL placeholders like {userId}, {id}) \u2192 \`--path-vars '{"userId": "me", "id": "123"}'\`
311
- - **Query parameters** (filtering, pagination, format options) \u2192 \`--query-params '{"key": "value"}'\`
312
- - For repeated params, use arrays: \`--query-params '{"metadataHeaders": ["From", "Subject"]}'\`
313
- - **Request body** (POST/PUT/PATCH data) \u2192 \`-d '{"field": "value"}'\`
314
-
315
- Do NOT pass path variables or query parameters in the -d body flag \u2014 they will be ignored.
316
-
317
- EXAMPLE COMMAND:
315
+ EXAMPLE:
318
316
  one --agent actions execute ${platform} ${actionId} <connectionKey> \\
319
317
  --path-vars '{ ... }' \\
320
318
  --query-params '{ ... }' \\
321
319
  -d '{ ... }'
322
320
 
323
- Replace the JSON objects above with the actual parameters from the documentation. Omit any flag that has no parameters for this action (e.g., omit --path-vars if the URL has no placeholders, omit -d for GET requests).`;
321
+ Omit any flag not needed (e.g., omit --path-vars if URL has no placeholders, omit -d for GET).
322
+
323
+ Read the API documentation below to identify which parameters are path variables, query parameters, or body fields, then map them to the correct flags above.
324
+
325
+ ========================================
326
+
327
+ ${knowledge}`;
324
328
  }
325
329
 
326
330
  // src/lib/flow-engine.ts
@@ -658,7 +662,7 @@ async function executeSubflowStep(step, context, api, permissions, allowedAction
658
662
  if (flowStack.includes(resolvedKey)) {
659
663
  throw new Error(`Circular flow detected: ${[...flowStack, resolvedKey].join(" \u2192 ")}`);
660
664
  }
661
- const { loadFlow: loadFlow2 } = await import("./flow-runner-ZTLAFPFP.js");
665
+ const { loadFlow: loadFlow2 } = await import("./flow-runner-5ZBACWKL.js");
662
666
  const subFlow = loadFlow2(resolvedKey);
663
667
  const subContext = await executeFlow(
664
668
  subFlow,
@@ -4,7 +4,7 @@ import {
4
4
  loadFlow,
5
5
  resolveFlowPath,
6
6
  saveFlow
7
- } from "./chunk-GNYFRZSZ.js";
7
+ } from "./chunk-T54OTDAW.js";
8
8
  export {
9
9
  FlowRunner,
10
10
  listFlows,
package/dist/index.js CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  loadFlow,
12
12
  resolveFlowPath,
13
13
  saveFlow
14
- } from "./chunk-GNYFRZSZ.js";
14
+ } from "./chunk-T54OTDAW.js";
15
15
 
16
16
  // src/index.ts
17
17
  import { createRequire as createRequire2 } from "module";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@withone/cli",
3
- "version": "1.13.5",
3
+ "version": "1.13.6",
4
4
  "description": "CLI for managing One",
5
5
  "type": "module",
6
6
  "files": [