@withone/cli 1.20.0 → 1.20.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -92,7 +92,7 @@ var OneApi = class {
|
|
|
92
92
|
return allPlatforms;
|
|
93
93
|
}
|
|
94
94
|
async searchActions(platform, query, agentType) {
|
|
95
|
-
const isKnowledgeAgent =
|
|
95
|
+
const isKnowledgeAgent = agentType === "knowledge";
|
|
96
96
|
const queryParams = {
|
|
97
97
|
query,
|
|
98
98
|
limit: "5"
|
|
@@ -187,7 +187,7 @@ var OneApi = class {
|
|
|
187
187
|
return { data: knowledge, etag: result.etag, status: result.status };
|
|
188
188
|
}
|
|
189
189
|
async searchActionsWithMeta(platform, query, agentType, ifNoneMatch) {
|
|
190
|
-
const isKnowledgeAgent =
|
|
190
|
+
const isKnowledgeAgent = agentType === "knowledge";
|
|
191
191
|
const queryParams = {
|
|
192
192
|
query,
|
|
193
193
|
limit: "5"
|
|
@@ -782,7 +782,7 @@ async function executeSubflowStep(step, context, api, permissions, allowedAction
|
|
|
782
782
|
if (flowStack.includes(resolvedKey)) {
|
|
783
783
|
throw new Error(`Circular flow detected: ${[...flowStack, resolvedKey].join(" \u2192 ")}`);
|
|
784
784
|
}
|
|
785
|
-
const { loadFlow: loadFlow2 } = await import("./flow-runner-
|
|
785
|
+
const { loadFlow: loadFlow2 } = await import("./flow-runner-UWZL2FPJ.js");
|
|
786
786
|
const subFlow = loadFlow2(resolvedKey);
|
|
787
787
|
const subContext = await executeFlow(
|
|
788
788
|
subFlow,
|
package/dist/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
loadFlow,
|
|
12
12
|
resolveFlowPath,
|
|
13
13
|
saveFlow
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-DPOG6BQ5.js";
|
|
15
15
|
|
|
16
16
|
// src/index.ts
|
|
17
17
|
import { createRequire as createRequire2 } from "module";
|
|
@@ -1689,7 +1689,7 @@ async function actionsSearchCommand(platform, query, options) {
|
|
|
1689
1689
|
const spinner5 = createSpinner();
|
|
1690
1690
|
spinner5.start(`Searching actions on ${pc6.cyan(platform)} for "${query}"...`);
|
|
1691
1691
|
try {
|
|
1692
|
-
const agentType = knowledgeAgent ? "knowledge" : options.type;
|
|
1692
|
+
const agentType = knowledgeAgent ? "knowledge" : options.type || "execute";
|
|
1693
1693
|
const useCache = options.cache !== false;
|
|
1694
1694
|
const cachePath = searchCachePath(platform, query, agentType || "knowledge");
|
|
1695
1695
|
const cached = useCache ? readCache(cachePath) : null;
|
package/package.json
CHANGED
|
@@ -172,14 +172,47 @@ A pure `$.xxx` value resolves to the raw type. A string containing `{{$.xxx}}` d
|
|
|
172
172
|
|
|
173
173
|
### `parallel` — Run steps concurrently
|
|
174
174
|
|
|
175
|
+
Use when fetching from 2+ independent data sources before combining results. Each substep must have the full step schema (`id`, `name`, `type`, and type-specific config).
|
|
176
|
+
|
|
175
177
|
```json
|
|
176
178
|
{
|
|
177
|
-
"id": "
|
|
179
|
+
"id": "fetchAll",
|
|
180
|
+
"name": "Fetch email and calendar data in parallel",
|
|
178
181
|
"type": "parallel",
|
|
179
|
-
"parallel": {
|
|
182
|
+
"parallel": {
|
|
183
|
+
"maxConcurrency": 5,
|
|
184
|
+
"steps": [
|
|
185
|
+
{
|
|
186
|
+
"id": "fetchEmails",
|
|
187
|
+
"name": "Fetch recent emails",
|
|
188
|
+
"type": "action",
|
|
189
|
+
"action": {
|
|
190
|
+
"platform": "gmail",
|
|
191
|
+
"actionId": "conn_mod_def::GmailListMessages::xxx",
|
|
192
|
+
"connectionKey": "$.input.gmailKey",
|
|
193
|
+
"pathVars": { "userId": "me" },
|
|
194
|
+
"queryParams": { "maxResults": 10 }
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"id": "fetchEvents",
|
|
199
|
+
"name": "Fetch today's calendar events",
|
|
200
|
+
"type": "action",
|
|
201
|
+
"action": {
|
|
202
|
+
"platform": "google-calendar",
|
|
203
|
+
"actionId": "conn_mod_def::CalendarListEvents::xxx",
|
|
204
|
+
"connectionKey": "$.input.calendarKey",
|
|
205
|
+
"pathVars": { "calendarId": "primary" },
|
|
206
|
+
"queryParams": { "maxResults": 10 }
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
]
|
|
210
|
+
}
|
|
180
211
|
}
|
|
181
212
|
```
|
|
182
213
|
|
|
214
|
+
After a parallel step, access each substep's output by its `id`: `$.steps.fetchEmails.response`, `$.steps.fetchEvents.response`.
|
|
215
|
+
|
|
183
216
|
### `file-read` / `file-write` — Filesystem access
|
|
184
217
|
|
|
185
218
|
```json
|
|
@@ -247,7 +280,18 @@ Strategies: `fail` (default), `continue`, `retry`, `fallback`.
|
|
|
247
280
|
|
|
248
281
|
Conditional execution: `"if": "$.steps.find.response.data.length > 0"`
|
|
249
282
|
|
|
250
|
-
## AI-Augmented
|
|
283
|
+
## AI-Augmented Patterns
|
|
284
|
+
|
|
285
|
+
### When to use parallel steps
|
|
286
|
+
|
|
287
|
+
Use `parallel` when your workflow fetches from 2+ independent data sources before combining them. Common patterns:
|
|
288
|
+
- Fetch Gmail + Calendar + Sheets → compile into daily briefing
|
|
289
|
+
- Search Exa + scrape with Firecrawl → merge research data
|
|
290
|
+
- Query BigQuery + list Google Drive files → combine for analysis
|
|
291
|
+
|
|
292
|
+
Each substep inside `parallel.steps` must have the full step schema: `id`, `name`, `type`, and the type-specific config (`action`, `code`, etc.). Follow a parallel step with a `code` or `transform` step to combine the results.
|
|
293
|
+
|
|
294
|
+
### file-write -> bash -> code
|
|
251
295
|
|
|
252
296
|
When raw data needs analysis, use this pattern:
|
|
253
297
|
1. `file-write` — save data to temp file (API responses are too large to inline)
|