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