@bobannomi/client 0.6.1 → 0.8.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.
package/dist/service.js CHANGED
@@ -5472,6 +5472,18 @@ function createRuntimeResources(transport, providers) {
5472
5472
  },
5473
5473
  skills: {
5474
5474
  list: (options) => transport.request("/skills", options),
5475
+ /** Install a ZIP into the current daemon's personal or authorized project skill directory. */
5476
+ async install(input, options) {
5477
+ const target = new URLSearchParams({ scope: input.scope });
5478
+ if (input.scope === "project") target.set("projectId", input.projectId);
5479
+ const response = await transport.requestResponse(`/skills/install?${target}`, {
5480
+ ...options,
5481
+ method: "POST",
5482
+ headers: { "content-type": "application/zip" },
5483
+ body: input.archive
5484
+ });
5485
+ return response.json();
5486
+ },
5475
5487
  marketplace: {
5476
5488
  list: (options) => transport.request("/skills/marketplace", options),
5477
5489
  install: (body, options) => transport.request("/skills/marketplace/install", { ...options, method: "POST", body })
@@ -5518,7 +5530,7 @@ var PluginMarketplaceResource = class {
5518
5530
  this.transport = transport;
5519
5531
  }
5520
5532
  transport;
5521
- catalog({ signal, ...query }) {
5533
+ catalog({ signal, ...query } = {}) {
5522
5534
  return this.transport.request(`${market}/catalog`, { query, signal });
5523
5535
  }
5524
5536
  listSources(options) {
@@ -5567,9 +5579,13 @@ var PluginResource = class {
5567
5579
  transport;
5568
5580
  marketplace;
5569
5581
  /** List native plugins for a directory in the daemon environment. */
5570
- list({ signal, cwd }) {
5582
+ list({ signal, cwd } = {}) {
5571
5583
  return this.transport.request("/plugins", { query: { cwd }, signal });
5572
5584
  }
5585
+ /** Load an image from an installed plugin or a marketplace entry in the daemon. */
5586
+ getIcon(input, options) {
5587
+ return this.transport.request("/plugins/icon", { ...options, query: input });
5588
+ }
5573
5589
  enable(id2, input, options) {
5574
5590
  return this.transport.request(`/plugins/${encodeURIComponent(id2)}/enable`, { ...options, method: "POST", body: input });
5575
5591
  }
@@ -5611,7 +5627,7 @@ var PluginResource = class {
5611
5627
  uninstall(id2, input, options) {
5612
5628
  return this.transport.request(`/plugins/${encodeURIComponent(id2)}`, { ...options, method: "DELETE", body: input });
5613
5629
  }
5614
- reload(input, options) {
5630
+ reload(input = {}, options) {
5615
5631
  return this.transport.request("/plugins/reload", { ...options, method: "POST", body: input });
5616
5632
  }
5617
5633
  };
@@ -5636,7 +5652,7 @@ var ChannelResource = class {
5636
5652
  disconnect: (options) => this.transport.request("/channels/feishu", { ...options, method: "DELETE" }),
5637
5653
  allowlist: {
5638
5654
  add: (input, options) => this.transport.request("/channels/feishu/allow", { ...options, method: "POST", body: input }),
5639
- remove: (key, options) => this.transport.request(`/channels/feishu/allow/${encodeURIComponent(key)}`, { ...options, method: "DELETE" })
5655
+ remove: (key, options) => this.transport.request("/channels/feishu/allow", { ...options, method: "DELETE", query: { key } })
5640
5656
  },
5641
5657
  registration: {
5642
5658
  start: (input = {}, options) => this.transport.request("/channels/feishu/registration", { ...options, method: "POST", body: input }),
@@ -5842,6 +5858,11 @@ var McpServersResource = class {
5842
5858
  list(options) {
5843
5859
  return this.request(this.basePath, options);
5844
5860
  }
5861
+ /** List manually configured and application-registered connections without credentials. */
5862
+ async inventory(options) {
5863
+ await requireDaemonFeature(this.transport, "mcpServerInventory", options?.signal);
5864
+ return this.request(`${this.basePath}/config/inventory`, options);
5865
+ }
5845
5866
  getConfig(name, options) {
5846
5867
  return this.request(this.serverPath(name), options);
5847
5868
  }
@@ -5855,13 +5876,13 @@ var McpServersResource = class {
5855
5876
  return this.request(this.serverPath(name), { ...options, method: "PUT", body });
5856
5877
  }
5857
5878
  setEnabled({ name, enabled }, options) {
5858
- return this.request(`${this.serverPath(name)}/enabled`, { ...options, method: "PUT", body: { enabled } });
5879
+ return this.request(this.serverPath(name, "/enabled"), { ...options, method: "PUT", body: { enabled } });
5859
5880
  }
5860
5881
  remove(name, options) {
5861
5882
  return this.request(this.serverPath(name), { ...options, method: "DELETE" });
5862
5883
  }
5863
- serverPath(name) {
5864
- return `${this.basePath}/${encodeURIComponent(name)}`;
5884
+ serverPath(name, suffix = "") {
5885
+ return this.transport.path(`${this.basePath}/config/entry${suffix}`, { name });
5865
5886
  }
5866
5887
  async request(path2, options) {
5867
5888
  await requireDaemonFeature(this.transport, "mcpServerManagement", options?.signal);
@@ -5913,7 +5934,7 @@ var McpResource = class {
5913
5934
  }
5914
5935
  async startLogin(name, input, options = {}) {
5915
5936
  return await this.transport.request(
5916
- `/mcp/${encodeURIComponent(name)}/oauth/login`,
5937
+ this.transport.path("/mcp/oauth/login", { name }),
5917
5938
  { method: "POST", body: input, signal: options.signal }
5918
5939
  );
5919
5940
  }
@@ -5937,7 +5958,7 @@ var McpResource = class {
5937
5958
  }
5938
5959
  async logout(name, options = {}) {
5939
5960
  return await this.transport.request(
5940
- `/mcp/${encodeURIComponent(name)}/oauth/logout`,
5961
+ this.transport.path("/mcp/oauth/logout", { name }),
5941
5962
  { method: "POST", body: {}, signal: options.signal }
5942
5963
  );
5943
5964
  }
@@ -6079,6 +6100,8 @@ var MaintenanceResource = class {
6079
6100
  usage = {
6080
6101
  get: (input = {}, options) => this.post("/usage", input, options),
6081
6102
  getSettings: (options) => this.transport.request("/maintenance/usage/settings", options),
6103
+ /** Read whether known usage has reached the current monthly budget. */
6104
+ getBudgetStatus: (options) => this.transport.request("/maintenance/usage/budget", options),
6082
6105
  updateBudget: (input, options) => this.post("/usage/budget", input, options),
6083
6106
  addPrice: (input, options) => this.post("/usage/price", input, options)
6084
6107
  };
@@ -6181,6 +6204,58 @@ var SettingsResource = class {
6181
6204
  this.transport = transport;
6182
6205
  }
6183
6206
  transport;
6207
+ /** Runtime environment management from an existing full daemon connection. */
6208
+ runtimeEnvironment = {
6209
+ get: async ({ cwd } = {}, options) => {
6210
+ await requireDaemonFeature(this.transport, "runtimeEnvironmentSettings", options?.signal);
6211
+ return this.transport.request(this.transport.path("/settings/runtime-environment", { cwd }), options);
6212
+ },
6213
+ save: async (input, options) => {
6214
+ await requireDaemonFeature(this.transport, "runtimeEnvironmentSettings", options?.signal);
6215
+ return this.transport.request("/settings/runtime-environment", { ...options, method: "PATCH", body: input });
6216
+ },
6217
+ check: async (input, options) => {
6218
+ await requireDaemonFeature(this.transport, "runtimeEnvironmentSettings", options?.signal);
6219
+ return this.transport.request("/settings/runtime-environment/check", { ...options, method: "POST", body: input });
6220
+ }
6221
+ };
6222
+ /** Global or registered-project memory configuration from a full daemon connection. */
6223
+ personalization = {
6224
+ get: async ({ projectId } = {}, options) => {
6225
+ await requireDaemonFeature(this.transport, "personalizationSettings", options?.signal);
6226
+ return this.transport.request(this.transport.path("/settings/personalization", { projectId }), options);
6227
+ },
6228
+ save: async (input, options) => {
6229
+ await requireDaemonFeature(this.transport, "personalizationSettings", options?.signal);
6230
+ return this.transport.request("/settings/personalization", { ...options, method: "PATCH", body: input });
6231
+ }
6232
+ };
6233
+ /** Export selected non-secret settings and confirm an import preview from the same daemon. */
6234
+ portable = {
6235
+ export: async (categories, options) => {
6236
+ await requireDaemonFeature(this.transport, "portableConfigurationSettings", options?.signal);
6237
+ return this.transport.request("/settings/portable/export", { ...options, method: "POST", body: { categories } });
6238
+ },
6239
+ preview: async (value, options) => {
6240
+ await requireDaemonFeature(this.transport, "portableConfigurationSettings", options?.signal);
6241
+ return this.transport.request("/settings/portable/preview", { ...options, method: "POST", body: { value } });
6242
+ },
6243
+ apply: async ({ id: id2, categories }, options) => {
6244
+ await requireDaemonFeature(this.transport, "portableConfigurationSettings", options?.signal);
6245
+ await this.update({ importConfiguration: { previewId: id2, categories } }, options);
6246
+ }
6247
+ };
6248
+ /** Read the daemon's effective isolation availability or check a draft rule without running it. */
6249
+ permissionConfiguration = {
6250
+ get: async (options) => {
6251
+ await requireDaemonFeature(this.transport, "permissionConfigurationSettings", options?.signal);
6252
+ return this.transport.request("/settings/permissions", options);
6253
+ },
6254
+ check: async (input, options) => {
6255
+ await requireDaemonFeature(this.transport, "permissionConfigurationSettings", options?.signal);
6256
+ return this.transport.request("/settings/permissions/check", { ...options, method: "POST", body: input });
6257
+ }
6258
+ };
6184
6259
  /** Read the daemon's current global settings. */
6185
6260
  getGlobal({ signal } = {}) {
6186
6261
  return this.get({ signal });