@erdoai/cli 0.241.2 → 0.244.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 +22 -2
  2. 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
  }
@@ -2463,6 +2465,12 @@ var ErdoClient = class {
2463
2465
  { state }
2464
2466
  );
2465
2467
  }
2468
+ deleteHeartbeat(id) {
2469
+ return this.request(
2470
+ "DELETE",
2471
+ `/v1/heartbeats/${encodeURIComponent(id)}`
2472
+ );
2473
+ }
2466
2474
  // --- kv (named key/value stores, a.k.a. collections) ---
2467
2475
  listKVStores() {
2468
2476
  return this.request("GET", "/v1/kv");
@@ -11367,7 +11375,7 @@ knowledgeCmd.command("create").description("Create a Knowledge object").required
11367
11375
  "--type <type>",
11368
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)",
11369
11377
  "snippet"
11370
- ).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) => {
11371
11379
  try {
11372
11380
  const body = readMaybeFile(opts.body) ?? "";
11373
11381
  const freshness = knowledgeFreshnessFromOptions(opts);
@@ -11376,6 +11384,7 @@ knowledgeCmd.command("create").description("Create a Knowledge object").required
11376
11384
  content: body,
11377
11385
  description: opts.description ?? opts.title,
11378
11386
  type: opts.type,
11387
+ slug: opts.slug,
11379
11388
  category: opts.category,
11380
11389
  tags: opts.tags?.split(",").map((tag) => tag.trim()).filter(Boolean),
11381
11390
  agent: opts.agent,
@@ -11427,10 +11436,12 @@ knowledgeCmd.command("update <id>").description("Update a Knowledge object while
11427
11436
  knowledgeCmd.command("list").description("List knowledge objects").option(
11428
11437
  "--public",
11429
11438
  "only entries opted into anonymous external surfaces (website widgets)"
11430
- ).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) => {
11431
11440
  try {
11432
11441
  print(await new ErdoClient().listKnowledge(opts.public ? "public" : void 0, {
11433
11442
  record_type: opts.recordType,
11443
+ pinned_for_artifact_kind: opts.pinnedForArtifactKind,
11444
+ pinned_for_agent_key: opts.pinnedForAgentKey,
11434
11445
  limit: opts.limit,
11435
11446
  offset: opts.offset
11436
11447
  }));
@@ -11709,6 +11720,15 @@ autoCmd.command("enable <id>").description("Re-enable a disabled automation").ac
11709
11720
  fail(e);
11710
11721
  }
11711
11722
  });
11723
+ autoCmd.command("delete <id>").description("Delete an automation for good, with its schedule and run history (use disable to pause it instead)").action(async (id) => {
11724
+ try {
11725
+ const result = await new ErdoClient().deleteHeartbeat(id);
11726
+ if (!result.deleted) throw new Error(`Automation ${id} was not deleted`);
11727
+ console.log(`Deleted automation ${result.id}`);
11728
+ } catch (e) {
11729
+ fail(e);
11730
+ }
11731
+ });
11712
11732
  var kvCmd = program.command("kv").description("Named key/value stores");
11713
11733
  kvCmd.command("list").description("List KV stores").action(async () => {
11714
11734
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@erdoai/cli",
3
- "version": "0.241.2",
3
+ "version": "0.244.0",
4
4
  "description": "Erdo CLI \u2014 drive datasets, pages, and evals from the terminal or CI",
5
5
  "type": "module",
6
6
  "bin": {