@withone/cli 2.9.2 → 2.10.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.
package/README.md CHANGED
@@ -527,6 +527,17 @@ What `one skills add connect` does:
527
527
 
528
528
  Commit `.agents/skills/one-connect` and the agent links so your team's agents share the skill. Agent mode (`--agent`) returns JSON for every subcommand.
529
529
 
530
+ ### `one connect`
531
+
532
+ Create and update a [One Connect](https://www.npmjs.com/package/@withone/connect) app from `one.connect.ts`, typed by `defineConnectApp` from `@withone/connect/config` (0.19.0 or later).
533
+
534
+ ```bash
535
+ one connect types # writes one-connect-env.d.ts: tool slugs and action names autocomplete
536
+ one connect create # approve the app in the browser; re-run to review and apply changes
537
+ ```
538
+
539
+ `one connect create` opens a setup page in your signed-in browser, where you review the app (or, on a re-run, its new version) and approve it; nothing is created or changed with your API key. A new app's client secret and connect key are made there and shown once, so they never pass through the terminal. Once you approve, the CLI writes `ONE_CLIENT_ID`, `ONE_PERMISSION_SET` and `ONE_REDIRECT_URI` to `.env.local` (or `.env`). Each tool in `ask` takes `access`: `read-only`, `read-write`, `full-access`, or `custom` with `actions`, named as `one connect types` wrote them or by id from `one actions find <platform> "<what it does>" --no-knowledge`. Options: `--config <file>`, `--env-file <file>`, `--no-open`. Install `@withone/connect` (0.19.0 or later) in the project first. A `.ts` config needs Node 22.18 or later; on older Node use `one.connect.mjs`.
540
+
530
541
  ### `one guide [topic]`
531
542
 
532
543
  Get the full CLI usage guide, designed for AI agents that only have the binary (no MCP, no IDE skills).
@@ -1120,6 +1120,22 @@ var OneApi = class {
1120
1120
  };
1121
1121
  }
1122
1122
  }
1123
+ /** Every action on a platform, page by page, following the server's `pages`. */
1124
+ async listAllAvailableActions(platform) {
1125
+ const all = [];
1126
+ let page = 1;
1127
+ let totalPages = 1;
1128
+ do {
1129
+ const response = await this.requestFull({
1130
+ path: `/available-actions/${encodeURIComponent(platform)}`,
1131
+ queryParams: { page: String(page), limit: "100" }
1132
+ });
1133
+ all.push(...response.rows || []);
1134
+ totalPages = response.pages || 1;
1135
+ page++;
1136
+ } while (page <= totalPages);
1137
+ return all;
1138
+ }
1123
1139
  // Webhook Relay methods
1124
1140
  async createRelayEndpoint(body) {
1125
1141
  return this.requestFull({ path: "/webhooks/relay", method: "POST", body });
@@ -2961,7 +2977,7 @@ async function executeSubflowStep(step, context, api, permissions, allowedAction
2961
2977
  if (flowStack.includes(resolvedKey)) {
2962
2978
  throw new Error(`Circular flow detected: ${[...flowStack, resolvedKey].join(" \u2192 ")}`);
2963
2979
  }
2964
- const { loadFlowWithMeta: loadFlowWithMeta2 } = await import("./flow-runner-K73VDSS3.js");
2980
+ const { loadFlowWithMeta: loadFlowWithMeta2 } = await import("./flow-runner-P23IZDWM.js");
2965
2981
  const { flow: subFlow, rootDir: subRootDir } = loadFlowWithMeta2(resolvedKey);
2966
2982
  const subContext = await executeFlow(
2967
2983
  subFlow,
@@ -12,7 +12,7 @@ import {
12
12
  stripStepsAlias,
13
13
  summarizeFlowInputs,
14
14
  walkSteps
15
- } from "./chunk-UP2L4XJH.js";
15
+ } from "./chunk-5CPQHXTO.js";
16
16
  import "./chunk-44CV5IMX.js";
17
17
  import "./chunk-Q6PWTATS.js";
18
18
  import "./chunk-HTXZZQ6U.js";