@erdoai/cli 0.39.0 → 0.40.1

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
@@ -40,6 +40,7 @@ Env overrides for CI/scripting: `ERDO_API_KEY`, `ERDO_ORG`, `ERDO_API_URL`,
40
40
  erdo agent ask "what was revenue last week?" --datasets sales
41
41
  erdo agent thread --name "landing build" # -> thread id
42
42
  erdo agent send <thread> "Build a landing page for ACME ..." --agent erdo.artifact-builder
43
+ erdo agent send <thread> "What should I do next?" --context "Current screen: checkout experiment"
43
44
 
44
45
  erdo pages deploy --title "ACME" --html @page.html --js @page.js --public
45
46
  erdo pages list --type html_page
@@ -96,4 +97,4 @@ git push origin cli-v0.4.1
96
97
  ```
97
98
 
98
99
  The tag's version (`cli-v0.4.1` → `0.4.1`) is the published version; keep
99
- `cli/package.json` in sync so `erdo --version` matches locally.
100
+ `cli/package.json` in sync so `erdo --version` matches locally.
package/dist/index.js CHANGED
@@ -508,9 +508,9 @@ var ErdoClient = class {
508
508
  );
509
509
  }
510
510
  // --- activity feed ---
511
- // The unified, ranked, read-only feed: attention items, approvals, workstream
512
- // events, catalog updates, and urgent cause-clusters. Respond via
513
- // respondAttentionItem / decideApproval — this is a view only.
511
+ // The unified, ranked, read-only feed. It defaults to attention items,
512
+ // approvals, and workstream events; catalog and execution history are opt-in.
513
+ // Respond via respondAttentionItem / decideApproval — this is a view only.
514
514
  listActivityFeed(params) {
515
515
  const q = new URLSearchParams();
516
516
  if (params?.limit) q.set("limit", String(params.limit));
@@ -669,6 +669,13 @@ var ErdoClient = class {
669
669
  body
670
670
  );
671
671
  }
672
+ configureIntegrationDataset(datasetID, body) {
673
+ return this.request(
674
+ "POST",
675
+ `/v1/integration-datasets/${encodeURIComponent(datasetID)}/configure`,
676
+ body
677
+ );
678
+ }
672
679
  // --- integrations ---
673
680
  discoverIntegrationTables(integration, schemaName) {
674
681
  const qs = schemaName ? `?schema_name=${encodeURIComponent(schemaName)}` : "";
@@ -2151,6 +2158,9 @@ thread: ${res.thread_id}`);
2151
2158
  }
2152
2159
  });
2153
2160
  agentCmd.command("send <threadId> <message>").description("Send a message to a thread and print the agent's reply").option("-a, --agent <key>", "agent to invoke (e.g. erdo.artifact-builder)").option(
2161
+ "--context <text>",
2162
+ "application context for this turn; available to the agent but omitted from the visible user message"
2163
+ ).option(
2154
2164
  "--sync",
2155
2165
  "hold one long HTTP request open until the run finishes, instead of polling. Faster for quick questions; a proxy will time it out on any run over ~100s while the run continues server-side"
2156
2166
  ).action(async (threadId, message, opts) => {
@@ -2159,6 +2169,7 @@ agentCmd.command("send <threadId> <message>").description("Send a message to a t
2159
2169
  const baselineRunID = opts.sync ? void 0 : await client.latestRunID(threadId);
2160
2170
  const res = await client.sendMessage(threadId, {
2161
2171
  message,
2172
+ context: opts.context,
2162
2173
  agent_key: opts.agent,
2163
2174
  async: !opts.sync
2164
2175
  });
@@ -2407,7 +2418,7 @@ program.command("activity").alias("feed").description(
2407
2418
  "The unified activity feed \u2014 needs-you items first, then urgent cause-clusters, then recent activity. Read-only: respond with `erdo attention respond` / `erdo approvals decide`."
2408
2419
  ).option("-n, --limit <n>", "max items (default 20, max 100)", (v) => parseInt(v, 10)).option("--offset <n>", "pagination offset", (v) => parseInt(v, 10)).option(
2409
2420
  "--categories <list>",
2410
- "comma-separated: attention,approval,workstream,catalog,job,heartbeat (default excludes runs)"
2421
+ "comma-separated: attention,approval,workstream,catalog,job,heartbeat (default: attention,approval,workstream)"
2411
2422
  ).option("--scope <scope>", "following | all (default all)").option("--json", "raw JSON response").action(
2412
2423
  async (opts) => {
2413
2424
  try {
@@ -2864,6 +2875,20 @@ datasetsCmd.command("from-integration <app>").description("Create a dataset back
2864
2875
  fail(e);
2865
2876
  }
2866
2877
  });
2878
+ datasetsCmd.command("configure-integration <dataset-id>").description("Set an integration dataset's segment scope and optionally enable canonical sync").requiredOption("-s, --segments <csv>", "segment names or ids (see: erdo integrations tables <app>)").option("--enable-sync", "enable canonical data-platform sync").action(async (datasetID, opts) => {
2879
+ try {
2880
+ const segments = opts.segments.split(",").map((segment) => segment.trim()).filter(Boolean);
2881
+ const result = await new ErdoClient().configureIntegrationDataset(datasetID, {
2882
+ segments,
2883
+ enable_sync: opts.enableSync
2884
+ });
2885
+ console.log(
2886
+ `Configured dataset ${result.dataset_id}, status: ${result.status}, sync: ${result.sync_enabled ? "enabled" : "unchanged"}`
2887
+ );
2888
+ } catch (e) {
2889
+ fail(e);
2890
+ }
2891
+ });
2867
2892
  function printAnalyticsTable(columns, rows) {
2868
2893
  const cell = (v) => v === null || v === void 0 ? "" : typeof v === "object" ? JSON.stringify(v) : String(v);
2869
2894
  const widths = columns.map((c, i) => Math.max(c.length, ...rows.map((r) => cell(r[i]).length), 0));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@erdoai/cli",
3
- "version": "0.39.0",
3
+ "version": "0.40.1",
4
4
  "description": "Erdo CLI \u2014 drive datasets, pages, and evals from the terminal or CI",
5
5
  "type": "module",
6
6
  "bin": {
@@ -48,5 +48,8 @@
48
48
  "tsup": "^8.0.0",
49
49
  "tsx": "^4.0.0",
50
50
  "typescript": "^5.7.0"
51
+ },
52
+ "overrides": {
53
+ "esbuild": "^0.28.1"
51
54
  }
52
55
  }