@erdoai/cli 0.194.0 → 0.195.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.
Files changed (2) hide show
  1. package/dist/index.js +14 -7
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2092,8 +2092,8 @@ var ErdoClient = class {
2092
2092
  createHeartbeat(body) {
2093
2093
  return this.request("POST", "/v1/heartbeats", body);
2094
2094
  }
2095
- runHeartbeat(id) {
2096
- return this.request("POST", `/v1/heartbeats/${encodeURIComponent(id)}/run`, {});
2095
+ runHeartbeat(id, body) {
2096
+ return this.request("POST", `/v1/heartbeats/${encodeURIComponent(id)}/run`, body ?? {});
2097
2097
  }
2098
2098
  listHeartbeatExecutions(id, limit = 10) {
2099
2099
  if (!Number.isInteger(limit) || limit < 1 || limit > 100) {
@@ -10468,7 +10468,7 @@ function scheduleBound(flag, v) {
10468
10468
  }
10469
10469
  autoCmd.command("create <name>").description(
10470
10470
  "Create an automation. Pass --run-at for one-off work at a date (it runs once, then stops for good) instead of a recurring automation that checks the date"
10471
- ).option("--description <text>", "What the automation does").option("--instructions <text>", "Instructions for each run (agent automation)").option("--script-js <js>", "Deterministic script body (scripted automation, no LLM)").option("--script-file <path>", "Read the script body from a file (scripted automation)").requiredOption("--interval <minutes>", "Interval in minutes (minimum 5)", (v) => parseInt(v, 10)).option("--timezone <tz>", "Scheduling timezone, e.g. America/New_York (default UTC)").option("--at <HH:MM>", "Clock time of each run in --timezone, e.g. 21:02").option("--run-after <id>", "Also start when this automation finishes").option("--after-when <when>", "success or finished (default finished)").option("--after-delay <minutes>", "Wait this many minutes after the predecessor finishes", (v) => parseInt(v, 10)).option("--instead-of-schedule", "Run only after --run-after, with no clock of its own").option("--run-at <rfc3339>", "Run once at or after this instant, then stop permanently").option("--ends-at <rfc3339>", "Never run after this instant").addOption(new Option2("--agent-key <key>", "Executor for an agent automation").choices(["erdo.heartbeat-executor", "erdo.workflow-executor"])).addOption(new Option2("--conversation <target>", "Target 'new' (fresh thread) or 'direct' conversation").choices(["new", "direct"])).option("--thread-id <id>", "Post each run into an existing conversation UUID").option("--persona-id <id>", "Org-enabled persona UUID to speak as").action(
10471
+ ).option("--description <text>", "What the automation does").option("--instructions <text>", "Instructions for each run (agent automation)").option("--script-js <js>", "Deterministic script body (scripted automation, no LLM)").option("--script-file <path>", "Read the script body from a file (scripted automation)").requiredOption("--interval <minutes>", "Interval in minutes (minimum 5)", (v) => parseInt(v, 10)).option("--timezone <tz>", "Scheduling timezone, e.g. America/New_York (default UTC)").option("--at <HH:MM>", "Clock time of each run in --timezone, e.g. 21:02").option("--run-after <id>", "Also start when this automation finishes").option("--after-when <when>", "success or finished (default finished)").option("--after-delay <minutes>", "Wait this many minutes after the predecessor finishes", (v) => parseInt(v, 10)).option("--instead-of-schedule", "Run only after --run-after, with no clock of its own").option("--run-at <rfc3339>", "Run once at or after this instant, then stop permanently").option("--ends-at <rfc3339>", "Never run after this instant").addOption(new Option2("--agent-key <key>", "Executor for an agent automation").choices(["erdo.heartbeat-executor", "erdo.workflow-executor"])).option("--model <id>", "LLM for each run, for example claude-haiku-5-5. Omit for the executor default").addOption(new Option2("--conversation <target>", "Target 'new' (fresh thread) or 'direct' conversation").choices(["new", "direct"])).option("--thread-id <id>", "Post each run into an existing conversation UUID").option("--persona-id <id>", "Org-enabled persona UUID to speak as").action(
10472
10472
  async (name, opts) => {
10473
10473
  try {
10474
10474
  if (opts.scriptJs && opts.scriptFile) {
@@ -10491,6 +10491,7 @@ autoCmd.command("create <name>").description(
10491
10491
  run_at: scheduleBound("--run-at", opts.runAt),
10492
10492
  ends_at: scheduleBound("--ends-at", opts.endsAt),
10493
10493
  agent_key: opts.agentKey,
10494
+ model: opts.model,
10494
10495
  conversation: opts.conversation,
10495
10496
  thread_id: opts.threadId,
10496
10497
  persona_id: opts.personaId
@@ -10504,7 +10505,7 @@ autoCmd.command("create <name>").description(
10504
10505
  autoCmd.command("list").description("List automations").action(async () => {
10505
10506
  try {
10506
10507
  const { heartbeats } = await new ErdoClient().listHeartbeats();
10507
- for (const h of heartbeats) console.log(`${h.id} ${h.state} ${h.name} ${h.kind === "script" ? "script" : h.thread_id ? `thread:${h.thread_id}` : h.conversation ?? "new"}${h.persona_id ? ` persona:${h.persona_id}` : ""}${heartbeatBounds(h)}`);
10508
+ for (const h of heartbeats) console.log(`${h.id} ${h.state} ${h.name} ${h.kind === "script" ? "script" : h.thread_id ? `thread:${h.thread_id}` : h.conversation ?? "new"}${h.persona_id ? ` persona:${h.persona_id}` : ""}${h.model ? ` model:${h.model}` : ""}${heartbeatBounds(h)}`);
10508
10509
  } catch (e) {
10509
10510
  fail(e);
10510
10511
  }
@@ -10520,14 +10521,14 @@ autoCmd.command("executions <id>").description("Read recent execution history fo
10520
10521
  fail(e);
10521
10522
  }
10522
10523
  });
10523
- autoCmd.command("run <id>").description("Trigger an automation now").action(async (id) => {
10524
+ autoCmd.command("run <id>").description("Trigger an automation now").option("--model <id>", "LLM for this run only. Omit to use the automation's model").action(async (id, opts) => {
10524
10525
  try {
10525
- print(await new ErdoClient().runHeartbeat(id));
10526
+ print(await new ErdoClient().runHeartbeat(id, opts.model ? { model: opts.model } : void 0));
10526
10527
  } catch (e) {
10527
10528
  fail(e);
10528
10529
  }
10529
10530
  });
10530
- autoCmd.command("update <id>").description("Edit an automation \u2014 rename, reschedule, or replace its script/instructions").option("--name <name>", "New name").option("--description <text>", "New description").option("--instructions <text>", "Replacement instructions (agent automation)").addOption(new Option2("--agent-key <key>", "Executor for an agent automation; omit to keep current").choices(["erdo.heartbeat-executor", "erdo.workflow-executor"])).option("--script-js <js>", "Replacement script body (scripted automation)").option(
10531
+ autoCmd.command("update <id>").description("Edit an automation \u2014 rename, reschedule, or replace its script/instructions").option("--name <name>", "New name").option("--description <text>", "New description").option("--instructions <text>", "Replacement instructions (agent automation)").addOption(new Option2("--agent-key <key>", "Executor for an agent automation; omit to keep current").choices(["erdo.heartbeat-executor", "erdo.workflow-executor"])).option("--model <id>", "Pin the LLM for later runs. Omit to keep the current pin").option("--clear-model", "Remove the model pin so later runs use the skill model, then the executor default").option("--script-js <js>", "Replacement script body (scripted automation)").option(
10531
10532
  "--script-file <path>",
10532
10533
  "Read the replacement script body from a file (scripted automation)"
10533
10534
  ).addOption(new Option2("--conversation <target>", "Target 'new' (fresh thread) or 'direct' conversation").choices(["new", "direct"])).option("--thread-id <id>", "Post each run into an existing conversation UUID").option("--persona-id <id>", "Org-enabled persona UUID to speak as").option("--interval <minutes>", "New interval in minutes (minimum 5)", (v) => parseInt(v, 10)).option("--timezone <tz>", "New scheduling timezone, e.g. America/New_York").option("--at <HH:MM>", "Clock time of each run in the automation timezone, e.g. 21:02").option("--clear-at", "Clear the clock time so the next run is one interval after this save").option("--run-after <id>", "Start when this automation finishes").option("--clear-run-after", "Stop following another automation").option("--after-when <when>", "success or finished").option("--after-delay <minutes>", "Wait this many minutes after the predecessor finishes", (v) => parseInt(v, 10)).option("--instead-of-schedule", "Run only from the chain, with no clock").option("--keep-schedule", "Keep the clock as well as the chain").option("--run-at <rfc3339>", "New one-off fire time: runs once at or after it, then stops permanently (omit to keep)").option("--ends-at <rfc3339>", "New end time after which it never runs (omit to keep)").action(
@@ -10537,6 +10538,10 @@ autoCmd.command("update <id>").description("Edit an automation \u2014 rename, re
10537
10538
  fail(new Error("pass either --script-js or --script-file, not both"));
10538
10539
  return;
10539
10540
  }
10541
+ if (opts.model && opts.clearModel) {
10542
+ fail(new Error("pass either --model or --clear-model, not both"));
10543
+ return;
10544
+ }
10540
10545
  const scriptJs = opts.scriptFile ? readFileSync4(opts.scriptFile, "utf8") : opts.scriptJs;
10541
10546
  if (opts.at !== void 0 && opts.clearAt) {
10542
10547
  fail(new Error("pass either --at or --clear-at, not both"));
@@ -10555,6 +10560,8 @@ autoCmd.command("update <id>").description("Edit an automation \u2014 rename, re
10555
10560
  description: opts.description,
10556
10561
  instructions: opts.instructions,
10557
10562
  agent_key: opts.agentKey,
10563
+ model: opts.model,
10564
+ clear_model: opts.clearModel,
10558
10565
  script_js: scriptJs,
10559
10566
  interval_minutes: opts.interval,
10560
10567
  timezone: opts.timezone,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@erdoai/cli",
3
- "version": "0.194.0",
3
+ "version": "0.195.0",
4
4
  "description": "Erdo CLI \u2014 drive datasets, pages, and evals from the terminal or CI",
5
5
  "type": "module",
6
6
  "bin": {