@erdoai/cli 0.217.1 → 0.222.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 +11 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2298,6 +2298,9 @@ var ErdoClient = class {
2298
2298
  if (limit) params.set("limit", String(limit));
2299
2299
  return this.request("GET", `/v1/knowledge-search?${params.toString()}`);
2300
2300
  }
2301
+ deleteKnowledge(id) {
2302
+ return this.request("DELETE", `/v1/knowledge/${encodeURIComponent(id)}`);
2303
+ }
2301
2304
  setKnowledgeVisibility(id, visibility) {
2302
2305
  return this.request("PATCH", `/v1/knowledge/${id}/visibility`, { visibility });
2303
2306
  }
@@ -10985,6 +10988,14 @@ knowledgeCmd.command("visibility <id> <visibility>").description(
10985
10988
  fail(e);
10986
10989
  }
10987
10990
  });
10991
+ knowledgeCmd.command("delete <id>").description("Delete a Knowledge object you can manage (same as the erdo_delete_knowledge MCP tool)").action(async (id) => {
10992
+ try {
10993
+ await new ErdoClient().deleteKnowledge(id);
10994
+ print({ deleted: id });
10995
+ } catch (e) {
10996
+ fail(e);
10997
+ }
10998
+ });
10988
10999
  knowledgeCmd.command("attach <objectId> <file>").description(
10989
11000
  "Attach an image or other small binary to a knowledge object as an org-hosted asset, and print its asset id \u2014 the value a page's assetId field takes. Pass a local path, or --url to have the service download it (the only path for video)."
10990
11001
  ).option("--url <sourceUrl>", "download from this URL instead of reading a local file").option(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@erdoai/cli",
3
- "version": "0.217.1",
3
+ "version": "0.222.0",
4
4
  "description": "Erdo CLI \u2014 drive datasets, pages, and evals from the terminal or CI",
5
5
  "type": "module",
6
6
  "bin": {