@erdoai/cli 0.193.0 → 0.194.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
@@ -114,6 +114,7 @@ erdo agent ask "what was revenue last week?" --datasets sales
114
114
  erdo threads create --name "landing build" # -> thread id
115
115
  erdo agent send <thread> "Build a landing page for ACME ..." --agent erdo.artifact-builder
116
116
  erdo agent send <thread> "What should I do next?" --context "Current screen: checkout experiment"
117
+ erdo agent send <thread> "Summarize the existing data" --read-only
117
118
 
118
119
  erdo pages deploy --title "ACME" --html @page.html --js @page.js --public
119
120
  erdo pages list --type html_page
@@ -122,6 +123,9 @@ erdo pages get <artifact-id>
122
123
 
123
124
  `--html/--js/--css` accept `@path` to read a file. Sending a message to a thread
124
125
  runs an agent — that's also how the artifact-builder produces a page from a brief.
126
+ Use `--read-only` to limit the default `erdo.data-question-answerer` turn to
127
+ read-only agent tools. Other agents are rejected, and the flag is omitted by
128
+ default so existing sends retain their behavior.
125
129
 
126
130
  ```bash
127
131
  erdo runs list --agent erdo.artifact-builder --status failed # inspect agent runs
package/dist/index.js CHANGED
@@ -1515,6 +1515,9 @@ var ErdoClient = class {
1515
1515
  setProviderLeadSource(input) {
1516
1516
  return this.request("PUT", "/v1/provider-lead-sources", input, false);
1517
1517
  }
1518
+ upsertDeclaration(input) {
1519
+ return this.request("PUT", "/v1/declarations", input, false);
1520
+ }
1518
1521
  importLeadSourceRows(input) {
1519
1522
  return this.request("POST", "/v1/provider-lead-sources/import", input, false);
1520
1523
  }
@@ -4943,7 +4946,7 @@ agentCmd.command("send <threadId> <message>").description("Send a message to a t
4943
4946
  ).option(
4944
4947
  "--sync",
4945
4948
  "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"
4946
- ).action(async (threadId, message, opts) => {
4949
+ ).option("--read-only", "restrict the default data-question-answerer turn to read-only tools").action(async (threadId, message, opts) => {
4947
4950
  try {
4948
4951
  const client = new ErdoClient();
4949
4952
  const baselineRunID = opts.sync ? void 0 : await client.latestRunID(threadId);
@@ -4951,7 +4954,8 @@ agentCmd.command("send <threadId> <message>").description("Send a message to a t
4951
4954
  message: readMaybeFile(message) ?? "",
4952
4955
  context: readMaybeFile(opts.context),
4953
4956
  agent_key: opts.agent,
4954
- async: !opts.sync
4957
+ async: !opts.sync,
4958
+ read_only: opts.readOnly
4955
4959
  });
4956
4960
  if (res.error) throw new Error(res.error);
4957
4961
  if (opts.sync) {
@@ -10305,6 +10309,25 @@ pipelinesCmd.command("mark-handled <slug>").description("Record that failed exec
10305
10309
  fail(e);
10306
10310
  }
10307
10311
  });
10312
+ var declarationsCmd = program.command("declarations").description("Metric and other declarations an app commits for this organization");
10313
+ declarationsCmd.command("upsert").description("Write one declaration. The same namespace, kind, key and scope update the existing row").requiredOption("--namespace <namespace>", "the owning app's namespace").requiredOption("--kind <kind>", "declaration kind, for example metric").requiredOption("--key <key>", "what is declared, for example spend").option("--meaning <meaning>", "the expression; leave empty with --adopt to take the connector template").option("--status <status>", "confirmed only after the owning app merged it through a reviewed pull request; anything else is a draft", "draft").option("--source <source>", "synced source the declaration covers (requires --table)").option("--table <table>", "synced table the declaration covers (requires --source)").option("--adopt", "copy the connector template for this kind, key, source and table").option("--reasoning <text>", "why").option("--confidence <level>", "confidence in a proposal").action(async (opts) => {
10314
+ try {
10315
+ if (Boolean(opts.source) !== Boolean(opts.table)) throw new Error("--source and --table must be set together");
10316
+ print(await new ErdoClient().upsertDeclaration({
10317
+ namespace: opts.namespace,
10318
+ kind: opts.kind,
10319
+ key: opts.key,
10320
+ meaning: opts.meaning ?? "",
10321
+ status: opts.status,
10322
+ reasoning: opts.reasoning,
10323
+ confidence: opts.confidence,
10324
+ adopt: opts.adopt,
10325
+ scope: opts.source && opts.table ? { source: opts.source, table: opts.table } : void 0
10326
+ }));
10327
+ } catch (e) {
10328
+ fail(e);
10329
+ }
10330
+ });
10308
10331
  var knowledgeCmd = program.command("knowledge").description("Knowledge objects");
10309
10332
  knowledgeCmd.command("create").description("Create a Knowledge object").requiredOption("--title <title>", "title").requiredOption("--body <body>", "body text, or @file").option("--description <description>", "short description").option("--type <type>", "snippet or skill", "snippet").option("--category <category>", "category").option("--tags <tags>", "comma-separated tags").option("--agent <name>", "name of the agent making the write").action(async (opts) => {
10310
10333
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@erdoai/cli",
3
- "version": "0.193.0",
3
+ "version": "0.194.0",
4
4
  "description": "Erdo CLI \u2014 drive datasets, pages, and evals from the terminal or CI",
5
5
  "type": "module",
6
6
  "bin": {