@bobannomi/client 0.7.0 → 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
@@ -5530,7 +5530,7 @@ var PluginMarketplaceResource = class {
5530
5530
  this.transport = transport;
5531
5531
  }
5532
5532
  transport;
5533
- catalog({ signal, ...query }) {
5533
+ catalog({ signal, ...query } = {}) {
5534
5534
  return this.transport.request(`${market}/catalog`, { query, signal });
5535
5535
  }
5536
5536
  listSources(options) {
@@ -5579,9 +5579,13 @@ var PluginResource = class {
5579
5579
  transport;
5580
5580
  marketplace;
5581
5581
  /** List native plugins for a directory in the daemon environment. */
5582
- list({ signal, cwd }) {
5582
+ list({ signal, cwd } = {}) {
5583
5583
  return this.transport.request("/plugins", { query: { cwd }, signal });
5584
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
+ }
5585
5589
  enable(id2, input, options) {
5586
5590
  return this.transport.request(`/plugins/${encodeURIComponent(id2)}/enable`, { ...options, method: "POST", body: input });
5587
5591
  }
@@ -5623,7 +5627,7 @@ var PluginResource = class {
5623
5627
  uninstall(id2, input, options) {
5624
5628
  return this.transport.request(`/plugins/${encodeURIComponent(id2)}`, { ...options, method: "DELETE", body: input });
5625
5629
  }
5626
- reload(input, options) {
5630
+ reload(input = {}, options) {
5627
5631
  return this.transport.request("/plugins/reload", { ...options, method: "POST", body: input });
5628
5632
  }
5629
5633
  };
@@ -5648,7 +5652,7 @@ var ChannelResource = class {
5648
5652
  disconnect: (options) => this.transport.request("/channels/feishu", { ...options, method: "DELETE" }),
5649
5653
  allowlist: {
5650
5654
  add: (input, options) => this.transport.request("/channels/feishu/allow", { ...options, method: "POST", body: input }),
5651
- 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 } })
5652
5656
  },
5653
5657
  registration: {
5654
5658
  start: (input = {}, options) => this.transport.request("/channels/feishu/registration", { ...options, method: "POST", body: input }),
@@ -5854,6 +5858,11 @@ var McpServersResource = class {
5854
5858
  list(options) {
5855
5859
  return this.request(this.basePath, options);
5856
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
+ }
5857
5866
  getConfig(name, options) {
5858
5867
  return this.request(this.serverPath(name), options);
5859
5868
  }
@@ -5867,13 +5876,13 @@ var McpServersResource = class {
5867
5876
  return this.request(this.serverPath(name), { ...options, method: "PUT", body });
5868
5877
  }
5869
5878
  setEnabled({ name, enabled }, options) {
5870
- 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 } });
5871
5880
  }
5872
5881
  remove(name, options) {
5873
5882
  return this.request(this.serverPath(name), { ...options, method: "DELETE" });
5874
5883
  }
5875
- serverPath(name) {
5876
- return `${this.basePath}/${encodeURIComponent(name)}`;
5884
+ serverPath(name, suffix = "") {
5885
+ return this.transport.path(`${this.basePath}/config/entry${suffix}`, { name });
5877
5886
  }
5878
5887
  async request(path2, options) {
5879
5888
  await requireDaemonFeature(this.transport, "mcpServerManagement", options?.signal);
@@ -5925,7 +5934,7 @@ var McpResource = class {
5925
5934
  }
5926
5935
  async startLogin(name, input, options = {}) {
5927
5936
  return await this.transport.request(
5928
- `/mcp/${encodeURIComponent(name)}/oauth/login`,
5937
+ this.transport.path("/mcp/oauth/login", { name }),
5929
5938
  { method: "POST", body: input, signal: options.signal }
5930
5939
  );
5931
5940
  }
@@ -5949,7 +5958,7 @@ var McpResource = class {
5949
5958
  }
5950
5959
  async logout(name, options = {}) {
5951
5960
  return await this.transport.request(
5952
- `/mcp/${encodeURIComponent(name)}/oauth/logout`,
5961
+ this.transport.path("/mcp/oauth/logout", { name }),
5953
5962
  { method: "POST", body: {}, signal: options.signal }
5954
5963
  );
5955
5964
  }
@@ -6091,6 +6100,8 @@ var MaintenanceResource = class {
6091
6100
  usage = {
6092
6101
  get: (input = {}, options) => this.post("/usage", input, options),
6093
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),
6094
6105
  updateBudget: (input, options) => this.post("/usage/budget", input, options),
6095
6106
  addPrice: (input, options) => this.post("/usage/price", input, options)
6096
6107
  };
@@ -6193,6 +6204,58 @@ var SettingsResource = class {
6193
6204
  this.transport = transport;
6194
6205
  }
6195
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
+ };
6196
6259
  /** Read the daemon's current global settings. */
6197
6260
  getGlobal({ signal } = {}) {
6198
6261
  return this.get({ signal });