@withone/cli 1.13.2 → 1.13.4
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.
|
@@ -655,7 +655,7 @@ async function executeSubflowStep(step, context, api, permissions, allowedAction
|
|
|
655
655
|
if (flowStack.includes(resolvedKey)) {
|
|
656
656
|
throw new Error(`Circular flow detected: ${[...flowStack, resolvedKey].join(" \u2192 ")}`);
|
|
657
657
|
}
|
|
658
|
-
const { loadFlow: loadFlow2 } = await import("./flow-runner-
|
|
658
|
+
const { loadFlow: loadFlow2 } = await import("./flow-runner-EPSYHAD6.js");
|
|
659
659
|
const subFlow = loadFlow2(resolvedKey);
|
|
660
660
|
const subContext = await executeFlow(
|
|
661
661
|
subFlow,
|
|
@@ -991,12 +991,18 @@ var FlowRunner = class _FlowRunner {
|
|
|
991
991
|
ensureDir(LOGS_DIR);
|
|
992
992
|
this.statePath = path2.join(RUNS_DIR, `${flow.key}-${this.runId}.state.json`);
|
|
993
993
|
this.logPath = path2.join(LOGS_DIR, `${flow.key}-${this.runId}.log`);
|
|
994
|
+
const resolvedInputs = { ...inputs };
|
|
995
|
+
for (const [name, decl] of Object.entries(flow.inputs)) {
|
|
996
|
+
if (resolvedInputs[name] === void 0 && decl.default !== void 0) {
|
|
997
|
+
resolvedInputs[name] = decl.default;
|
|
998
|
+
}
|
|
999
|
+
}
|
|
994
1000
|
this.state = {
|
|
995
1001
|
runId: this.runId,
|
|
996
1002
|
flowKey: flow.key,
|
|
997
1003
|
status: "running",
|
|
998
1004
|
startedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
999
|
-
inputs,
|
|
1005
|
+
inputs: resolvedInputs,
|
|
1000
1006
|
completedSteps: [],
|
|
1001
1007
|
context: {
|
|
1002
1008
|
input: inputs,
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
package/skills/one-flow/SKILL.md
CHANGED
|
@@ -428,7 +428,7 @@ Runs a shell command. **Requires `--allow-bash` flag** for security.
|
|
|
428
428
|
"type": "bash",
|
|
429
429
|
"bash": {
|
|
430
430
|
"command": "claude --print 'Analyze: {{$.steps.fetchData.response}}' --output-format json",
|
|
431
|
-
"timeout":
|
|
431
|
+
"timeout": 180000,
|
|
432
432
|
"parseJson": true
|
|
433
433
|
}
|
|
434
434
|
}
|
|
@@ -763,7 +763,7 @@ This example demonstrates the **file-write → bash → code** pattern. Instead
|
|
|
763
763
|
"type": "bash",
|
|
764
764
|
"bash": {
|
|
765
765
|
"command": "cat /tmp/competitor-analysis-deals.json | claude --print 'You are a competitive intelligence analyst. Analyze these CRM deals and return a JSON object with: {\"totalDeals\": number, \"competitorMentions\": [{\"competitor\": \"name\", \"count\": number, \"winRate\": number, \"commonObjections\": [\"...\"]}], \"summary\": \"2-3 paragraph executive summary\", \"recommendations\": [\"actionable items\"]}. Return ONLY valid JSON.' --output-format json",
|
|
766
|
-
"timeout":
|
|
766
|
+
"timeout": 180000,
|
|
767
767
|
"parseJson": true
|
|
768
768
|
}
|
|
769
769
|
},
|
|
@@ -828,7 +828,7 @@ Use this pattern whenever raw API data needs analysis, summarization, scoring, c
|
|
|
828
828
|
"type": "bash",
|
|
829
829
|
"bash": {
|
|
830
830
|
"command": "cat /tmp/{{$.input.flowKey}}-data.json | claude --print 'You are a [domain] analyst. Analyze this data and return JSON with: {\"summary\": \"...\", \"insights\": [...], \"score\": 0-100, \"recommendations\": [...]}. Return ONLY valid JSON, no markdown.' --output-format json",
|
|
831
|
-
"timeout":
|
|
831
|
+
"timeout": 180000,
|
|
832
832
|
"parseJson": true
|
|
833
833
|
}
|
|
834
834
|
}
|
|
@@ -860,6 +860,12 @@ Use this pattern whenever raw API data needs analysis, summarization, scoring, c
|
|
|
860
860
|
- **Include domain context** — "You are a B2B sales analyst" produces better results than a generic prompt
|
|
861
861
|
- **Keep prompts focused** — one analysis task per bash step; chain multiple bash steps for multi-stage analysis
|
|
862
862
|
|
|
863
|
+
### Concurrency and timeout guidance
|
|
864
|
+
|
|
865
|
+
- **Always set `timeout` to at least `180000` (3 minutes)** for bash steps calling `claude --print`. The default 30s bash timeout will fail on nearly all AI analysis tasks. Claude typically needs 60-90s, and under resource contention this can double.
|
|
866
|
+
- **Run Claude-heavy flows sequentially, not in parallel.** Each `claude --print` spawns a separate process. Running multiple flows with bash+Claude steps concurrently causes resource contention and timeout failures — even when individual prompts are small. If orchestrating multiple AI workflows, execute them one at a time.
|
|
867
|
+
- **If a bash+Claude step times out**, the cause is almost always the timeout value or concurrent execution — not prompt size. Increase the timeout and ensure no other Claude-heavy flows are running before assuming the prompt needs to be reduced.
|
|
868
|
+
|
|
863
869
|
## 10. CLI Commands Reference
|
|
864
870
|
|
|
865
871
|
```bash
|