@org-dashboard/cli 0.0.1-beta.8 → 0.0.1-beta.9

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 +0 -165
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -4093,55 +4093,6 @@ class OrgDashboardClient {
4093
4093
  body: JSON.stringify(input)
4094
4094
  });
4095
4095
  }
4096
- async kbSearch(params) {
4097
- const searchParams = new URLSearchParams;
4098
- if (params.query)
4099
- searchParams.set("query", params.query);
4100
- if (params.type)
4101
- searchParams.set("type", params.type);
4102
- if (params.subtype)
4103
- searchParams.set("subtype", params.subtype);
4104
- if (params.tags?.length)
4105
- searchParams.set("tags", params.tags.join(","));
4106
- if (params.limit)
4107
- searchParams.set("limit", String(params.limit));
4108
- if (params.offset)
4109
- searchParams.set("offset", String(params.offset));
4110
- return this.request(`/knowledge?${searchParams}`);
4111
- }
4112
- async kbGet(id) {
4113
- return this.request(`/knowledge/${id}`);
4114
- }
4115
- async kbBrowse(type) {
4116
- return this.request(`/knowledge?type=${encodeURIComponent(type)}`);
4117
- }
4118
- async kbCreate(input) {
4119
- return this.request("/knowledge", {
4120
- method: "POST",
4121
- body: JSON.stringify(input)
4122
- });
4123
- }
4124
- async kbUpdate(id, input) {
4125
- return this.request(`/knowledge/${id}`, {
4126
- method: "PATCH",
4127
- body: JSON.stringify(input)
4128
- });
4129
- }
4130
- async kbAppend(id, input) {
4131
- return this.request(`/knowledge/${id}/append`, {
4132
- method: "POST",
4133
- body: JSON.stringify(input)
4134
- });
4135
- }
4136
- async kbReplace(id, input) {
4137
- return this.request(`/knowledge/${id}/replace`, {
4138
- method: "POST",
4139
- body: JSON.stringify(input)
4140
- });
4141
- }
4142
- async kbHistory(id) {
4143
- return this.request(`/knowledge/${id}/history`);
4144
- }
4145
4096
  async actionPropose(action2) {
4146
4097
  return this.request("/actions", {
4147
4098
  method: "POST",
@@ -4209,9 +4160,6 @@ COMMANDS
4209
4160
 
4210
4161
  action propose <action> Propose a write action for approval
4211
4162
 
4212
- skill list List available learned skills
4213
- skill run <name> Execute a learned skill
4214
-
4215
4163
  dashboard summary Get a structured org status summary
4216
4164
  `.trim();
4217
4165
  async function help(_args) {
@@ -4752,79 +4700,6 @@ function parseJson(raw) {
4752
4700
  }
4753
4701
  }
4754
4702
 
4755
- // commands/kb.ts
4756
- async function kbSearch(client, args) {
4757
- const query = args.join(" ");
4758
- const results = await client.kbSearch({ query });
4759
- console.log(JSON.stringify(results, null, 2));
4760
- }
4761
- async function kbGet(client, id) {
4762
- if (!id) {
4763
- console.error("Usage: org kb get <id>");
4764
- process.exit(1);
4765
- }
4766
- const entry = await client.kbGet(id);
4767
- console.log(JSON.stringify(entry, null, 2));
4768
- }
4769
- async function kbBrowse(client, type) {
4770
- if (!type) {
4771
- console.error("Usage: org kb browse <type>");
4772
- console.error("Types: entity, sop, skill, context, insight");
4773
- process.exit(1);
4774
- }
4775
- const entries = await client.kbBrowse(type);
4776
- console.log(JSON.stringify(entries, null, 2));
4777
- }
4778
- async function kbCreate(client, args) {
4779
- const type = args[0];
4780
- const dataStr = args.slice(1).join(" ");
4781
- if (!type || !dataStr) {
4782
- console.error("Usage: org kb create <type> <json-data>");
4783
- process.exit(1);
4784
- }
4785
- const data = JSON.parse(dataStr);
4786
- const entry = await client.kbCreate({ type, ...data });
4787
- console.log(JSON.stringify(entry, null, 2));
4788
- }
4789
- async function kbUpdate(client, id, args) {
4790
- if (!id) {
4791
- console.error("Usage: org kb update <id> <json-patch>");
4792
- process.exit(1);
4793
- }
4794
- const patchStr = args.join(" ");
4795
- const patch = JSON.parse(patchStr);
4796
- const entry = await client.kbUpdate(id, patch);
4797
- console.log(JSON.stringify(entry, null, 2));
4798
- }
4799
- async function kbAppend(client, id, args) {
4800
- if (!id) {
4801
- console.error("Usage: org kb append <id> <json-content>");
4802
- process.exit(1);
4803
- }
4804
- const contentStr = args.join(" ");
4805
- const content = JSON.parse(contentStr);
4806
- const entry = await client.kbAppend(id, content);
4807
- console.log(JSON.stringify(entry, null, 2));
4808
- }
4809
- async function kbReplace(client, id, args) {
4810
- if (!id) {
4811
- console.error("Usage: org kb replace <id> <json-replace>");
4812
- process.exit(1);
4813
- }
4814
- const replaceStr = args.join(" ");
4815
- const replaceData = JSON.parse(replaceStr);
4816
- const entry = await client.kbReplace(id, replaceData);
4817
- console.log(JSON.stringify(entry, null, 2));
4818
- }
4819
- async function kbHistory(client, id) {
4820
- if (!id) {
4821
- console.error("Usage: org kb history <id>");
4822
- process.exit(1);
4823
- }
4824
- const history = await client.kbHistory(id);
4825
- console.log(JSON.stringify(history, null, 2));
4826
- }
4827
-
4828
4703
  // commands/action.ts
4829
4704
  async function actionPropose(client, args) {
4830
4705
  const dataStr = args.join(" ");
@@ -4837,20 +4712,6 @@ async function actionPropose(client, args) {
4837
4712
  console.log(JSON.stringify(result, null, 2));
4838
4713
  }
4839
4714
 
4840
- // commands/skill.ts
4841
- async function skillList(client) {
4842
- const skills = await client.kbBrowse("skill");
4843
- console.log(JSON.stringify(skills, null, 2));
4844
- }
4845
- async function skillRun(_client, name) {
4846
- if (!name) {
4847
- console.error("Usage: org skill run <name>");
4848
- process.exit(1);
4849
- }
4850
- console.error("Skill execution is not yet implemented.");
4851
- process.exit(1);
4852
- }
4853
-
4854
4715
  // commands/dashboard.ts
4855
4716
  async function dashboardSummary(client) {
4856
4717
  const summary = await client.dashboardSummary();
@@ -4888,36 +4749,10 @@ async function main() {
4888
4749
  break;
4889
4750
  case "tools":
4890
4751
  return tools(client, args.slice(1));
4891
- case "kb":
4892
- switch (subcommand) {
4893
- case "search":
4894
- return kbSearch(client, args.slice(2));
4895
- case "get":
4896
- return kbGet(client, args[2]);
4897
- case "browse":
4898
- return kbBrowse(client, args[2]);
4899
- case "create":
4900
- return kbCreate(client, args.slice(2));
4901
- case "update":
4902
- return kbUpdate(client, args[2], args.slice(3));
4903
- case "append":
4904
- return kbAppend(client, args[2], args.slice(3));
4905
- case "replace":
4906
- return kbReplace(client, args[2], args.slice(3));
4907
- case "history":
4908
- return kbHistory(client, args[2]);
4909
- }
4910
- break;
4911
4752
  case "action":
4912
4753
  if (subcommand === "propose")
4913
4754
  return actionPropose(client, args.slice(2));
4914
4755
  break;
4915
- case "skill":
4916
- if (subcommand === "list")
4917
- return skillList(client);
4918
- if (subcommand === "run")
4919
- return skillRun(client, args[2]);
4920
- break;
4921
4756
  case "dashboard":
4922
4757
  if (subcommand === "summary")
4923
4758
  return dashboardSummary(client);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@org-dashboard/cli",
3
- "version": "0.0.1-beta.8",
3
+ "version": "0.0.1-beta.9",
4
4
  "description": "OrgDashboard CLI for authenticating and using org-scoped AI tools",
5
5
  "type": "module",
6
6
  "files": [