@erdoai/cli 0.242.0 → 0.244.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/dist/index.js +11 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2402,6 +2402,8 @@ var ErdoClient = class {
|
|
|
2402
2402
|
if (options?.record_type) params.set("record_type", options.record_type);
|
|
2403
2403
|
if (options?.limit !== void 0) params.set("limit", String(options.limit));
|
|
2404
2404
|
if (options?.offset !== void 0) params.set("offset", String(options.offset));
|
|
2405
|
+
if (options?.pinned_for_artifact_kind) params.set("pinned_for_artifact_kind", options.pinned_for_artifact_kind);
|
|
2406
|
+
if (options?.pinned_for_agent_key) params.set("pinned_for_agent_key", options.pinned_for_agent_key);
|
|
2405
2407
|
const qs = params.toString();
|
|
2406
2408
|
return this.request("GET", `/v1/knowledge${qs ? `?${qs}` : ""}`);
|
|
2407
2409
|
}
|
|
@@ -11373,7 +11375,7 @@ knowledgeCmd.command("create").description("Create a Knowledge object").required
|
|
|
11373
11375
|
"--type <type>",
|
|
11374
11376
|
"snippet (durable context), skill (reusable instructions), dataset_note, or integration_model (a dated provider/API fact: needs --provider, --source-url, --verified-at and --stale-after)",
|
|
11375
11377
|
"snippet"
|
|
11376
|
-
).option("--category <category>", "category").option("--tags <tags>", "comma-separated tags").option("--agent <name>", "name of the agent making the write").option("--provider <name>", "provider a volatile fact is about, e.g. sec_edgar").option("--api-family <name>", "API family or surface the fact covers").option("--provider-version <version>", "provider API or schema version the fact applies to").option("--source-url <url>", "official source that verified the fact").option("--verified-at <date>", "when the fact was verified (YYYY-MM-DD or RFC 3339)").option("--stale-after <date>", "when the fact must be re-verified (YYYY-MM-DD or RFC 3339)").option("--stale-when <text>", "condition that makes the fact stale sooner").action(async (opts) => {
|
|
11378
|
+
).option("--category <category>", "category").option("--slug <slug>", "stable slug for this typed Knowledge object").option("--tags <tags>", "comma-separated tags").option("--agent <name>", "name of the agent making the write").option("--provider <name>", "provider a volatile fact is about, e.g. sec_edgar").option("--api-family <name>", "API family or surface the fact covers").option("--provider-version <version>", "provider API or schema version the fact applies to").option("--source-url <url>", "official source that verified the fact").option("--verified-at <date>", "when the fact was verified (YYYY-MM-DD or RFC 3339)").option("--stale-after <date>", "when the fact must be re-verified (YYYY-MM-DD or RFC 3339)").option("--stale-when <text>", "condition that makes the fact stale sooner").action(async (opts) => {
|
|
11377
11379
|
try {
|
|
11378
11380
|
const body = readMaybeFile(opts.body) ?? "";
|
|
11379
11381
|
const freshness = knowledgeFreshnessFromOptions(opts);
|
|
@@ -11382,6 +11384,7 @@ knowledgeCmd.command("create").description("Create a Knowledge object").required
|
|
|
11382
11384
|
content: body,
|
|
11383
11385
|
description: opts.description ?? opts.title,
|
|
11384
11386
|
type: opts.type,
|
|
11387
|
+
slug: opts.slug,
|
|
11385
11388
|
category: opts.category,
|
|
11386
11389
|
tags: opts.tags?.split(",").map((tag) => tag.trim()).filter(Boolean),
|
|
11387
11390
|
agent: opts.agent,
|
|
@@ -11433,10 +11436,12 @@ knowledgeCmd.command("update <id>").description("Update a Knowledge object while
|
|
|
11433
11436
|
knowledgeCmd.command("list").description("List knowledge objects").option(
|
|
11434
11437
|
"--public",
|
|
11435
11438
|
"only entries opted into anonymous external surfaces (website widgets)"
|
|
11436
|
-
).option("--record-type <type>", "inspect typed records, including drafts (excludes archived)").option("--limit <n>", "page size (default 20, maximum 100)", (v) => parseInt(v, 10)).option("--offset <n>", "page offset; follow next_offset for typed records", (v) => parseInt(v, 10)).action(async (opts) => {
|
|
11439
|
+
).option("--record-type <type>", "inspect typed records, including drafts (excludes archived)").option("--pinned-for-artifact-kind <kind>", "only skills targeted to this artifact kind").option("--pinned-for-agent-key <key>", "only skills targeted to this agent key").option("--limit <n>", "page size (default 20, maximum 100)", (v) => parseInt(v, 10)).option("--offset <n>", "page offset; follow next_offset for typed records", (v) => parseInt(v, 10)).action(async (opts) => {
|
|
11437
11440
|
try {
|
|
11438
11441
|
print(await new ErdoClient().listKnowledge(opts.public ? "public" : void 0, {
|
|
11439
11442
|
record_type: opts.recordType,
|
|
11443
|
+
pinned_for_artifact_kind: opts.pinnedForArtifactKind,
|
|
11444
|
+
pinned_for_agent_key: opts.pinnedForAgentKey,
|
|
11440
11445
|
limit: opts.limit,
|
|
11441
11446
|
offset: opts.offset
|
|
11442
11447
|
}));
|
|
@@ -11530,7 +11535,7 @@ function scheduleBound(flag, v) {
|
|
|
11530
11535
|
}
|
|
11531
11536
|
autoCmd.command("create <name>").description(
|
|
11532
11537
|
"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"
|
|
11533
|
-
).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("--effort <level>", "Reasoning effort: low, medium, or high (workflow executor defaults to high)").choices(["low", "medium", "high"])).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(
|
|
11538
|
+
).option("--description <text>", "What the automation does").option("--instructions <text>", "Instructions for each run (agent automation), or @path to a UTF-8 file").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("--effort <level>", "Reasoning effort: low, medium, or high (workflow executor defaults to high)").choices(["low", "medium", "high"])).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(
|
|
11534
11539
|
async (name, opts) => {
|
|
11535
11540
|
try {
|
|
11536
11541
|
if (opts.scriptJs && opts.scriptFile) {
|
|
@@ -11541,7 +11546,7 @@ autoCmd.command("create <name>").description(
|
|
|
11541
11546
|
const h = await new ErdoClient().createHeartbeat({
|
|
11542
11547
|
name,
|
|
11543
11548
|
description: opts.description,
|
|
11544
|
-
instructions: opts.instructions,
|
|
11549
|
+
instructions: readMaybeFile(opts.instructions),
|
|
11545
11550
|
script_js: scriptJs,
|
|
11546
11551
|
interval_minutes: opts.interval,
|
|
11547
11552
|
timezone: opts.timezone,
|
|
@@ -11636,7 +11641,7 @@ autoCmd.command("run <id>").description("Trigger an automation now").option("--m
|
|
|
11636
11641
|
fail(e);
|
|
11637
11642
|
}
|
|
11638
11643
|
});
|
|
11639
|
-
autoCmd.command("update <id>").description("Edit an automation \u2014 rename, reschedule (--cron for a scheduled job, --interval/--at for a heartbeat), 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").addOption(new Option2("--effort <level>", "Reasoning effort: low, medium, or high. Omit to keep the current value").choices(["low", "medium", "high"])).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(
|
|
11644
|
+
autoCmd.command("update <id>").description("Edit an automation \u2014 rename, reschedule (--cron for a scheduled job, --interval/--at for a heartbeat), or replace its script/instructions").option("--name <name>", "New name").option("--description <text>", "New description").option("--instructions <text>", "Replacement instructions (agent automation), or @path to a UTF-8 file").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").addOption(new Option2("--effort <level>", "Reasoning effort: low, medium, or high. Omit to keep the current value").choices(["low", "medium", "high"])).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(
|
|
11640
11645
|
"--script-file <path>",
|
|
11641
11646
|
"Read the replacement script body from a file (scripted automation)"
|
|
11642
11647
|
).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").addOption(new Option2("--clear-persona", "Remove the explicit persona binding; template attribution may still apply").conflicts("personaId")).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)").option("--cron <expr>", 'New schedule for a cron-scheduled automation, read in --timezone (or its saved one), e.g. "0 17 * * 5" for Fridays at 17:00. Edits the same automation in place').option("--cron-trigger <id>", "Which cron trigger to change, when the automation has more than one (see list)").action(
|
|
@@ -11666,7 +11671,7 @@ autoCmd.command("update <id>").description("Edit an automation \u2014 rename, re
|
|
|
11666
11671
|
const body = {
|
|
11667
11672
|
name: opts.name,
|
|
11668
11673
|
description: opts.description,
|
|
11669
|
-
instructions: opts.instructions,
|
|
11674
|
+
instructions: readMaybeFile(opts.instructions),
|
|
11670
11675
|
agent_key: opts.agentKey,
|
|
11671
11676
|
model: opts.model,
|
|
11672
11677
|
effort: opts.effort,
|