buckyos 0.7.136 → 0.7.138

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/cli/dist/cli.mjs CHANGED
@@ -5106,7 +5106,7 @@ function validateContentHandlers(value, permissions) {
5106
5106
  }
5107
5107
  return value;
5108
5108
  }
5109
- const PACKAGE_VERSION = "0.7.136";
5109
+ const PACKAGE_VERSION = "0.7.138";
5110
5110
  const TOOL_VERSION = PACKAGE_VERSION;
5111
5111
  const SDK_VERSION = PACKAGE_VERSION;
5112
5112
  const PROTOCOL_VERSION = "1";
@@ -9849,7 +9849,7 @@ const GROUPS = [
9849
9849
  function createAiModule() {
9850
9850
  return {
9851
9851
  name: "ai",
9852
- summary: "Read AI provider, routing, and usage state of the AICC service",
9852
+ summary: "Read AI provider, routing, usage and token quota state of the AICC service",
9853
9853
  commands: [
9854
9854
  readCommand({
9855
9855
  verb: "providers",
@@ -9863,10 +9863,36 @@ function createAiModule() {
9863
9863
  method: "routing.get",
9864
9864
  description: "An empty routing object means the default routing of the model catalog."
9865
9865
  }),
9866
- usageCommand()
9866
+ usageCommand(),
9867
+ quotaCommand()
9867
9868
  ]
9868
9869
  };
9869
9870
  }
9871
+ function quotaCommand() {
9872
+ return {
9873
+ verb: "quota",
9874
+ summary: "Show the token quota rules that limit the caller's AI calls and what is left",
9875
+ description: "Admin rules on the caller and the caller's Apps, shared App rules, and the caller's own App limits, each with its current window or total account. A refused call returns quota_exhausted / quota_budget_exceeded with the blocking rules.",
9876
+ options: [
9877
+ { name: "app", description: "Only the rules that apply to calls of this App (an AppId or AgentId)", type: "string" }
9878
+ ],
9879
+ inputSchema: {
9880
+ type: "object",
9881
+ properties: { app: { type: "string", minLength: 1 } },
9882
+ additionalProperties: false
9883
+ },
9884
+ outputSchema: OBJECT_OUTPUT$1,
9885
+ resultSchemaVersion: 1,
9886
+ access: { mode: "fixed", level: "read" },
9887
+ asyncMode: "sync",
9888
+ requiresSession: true,
9889
+ examples: ["buckyos ai quota", "buckyos ai quota --app aiworkspace"],
9890
+ handler: async (ctx, input) => expectObject$4(
9891
+ await callService(ctx, AICC, "quota.query", inputString(input, "app") ? { app_id: inputString(input, "app") } : {}),
9892
+ "quota.query"
9893
+ )
9894
+ };
9895
+ }
9870
9896
  function readCommand(options) {
9871
9897
  return {
9872
9898
  verb: options.verb,