@wiro-ai/wiro-mcp 1.9.1 → 2.0.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.
Files changed (213) hide show
  1. package/README.md +94 -42
  2. package/dist/index.js +7 -0
  3. package/dist/index.js.map +1 -1
  4. package/dist/instructions.js +5 -5
  5. package/dist/instructions.js.map +1 -1
  6. package/dist/playbooks.d.ts.map +1 -1
  7. package/dist/playbooks.js +109 -92
  8. package/dist/playbooks.js.map +1 -1
  9. package/dist/prompts.js +7 -7
  10. package/dist/prompts.js.map +1 -1
  11. package/dist/tools/answer-agent-approval.d.ts +4 -0
  12. package/dist/tools/answer-agent-approval.d.ts.map +1 -0
  13. package/dist/tools/answer-agent-approval.js +354 -0
  14. package/dist/tools/answer-agent-approval.js.map +1 -0
  15. package/dist/tools/apply-agent-skills.d.ts.map +1 -1
  16. package/dist/tools/apply-agent-skills.js +81 -30
  17. package/dist/tools/apply-agent-skills.js.map +1 -1
  18. package/dist/tools/bind-agent-project.d.ts.map +1 -1
  19. package/dist/tools/bind-agent-project.js +29 -28
  20. package/dist/tools/bind-agent-project.js.map +1 -1
  21. package/dist/tools/cancel-agent-message.js +1 -1
  22. package/dist/tools/cancel-agent-message.js.map +1 -1
  23. package/dist/tools/check-model-access.d.ts.map +1 -1
  24. package/dist/tools/check-model-access.js +14 -11
  25. package/dist/tools/check-model-access.js.map +1 -1
  26. package/dist/tools/connect-agent-connector.d.ts +4 -0
  27. package/dist/tools/connect-agent-connector.d.ts.map +1 -0
  28. package/dist/tools/connect-agent-connector.js +634 -0
  29. package/dist/tools/connect-agent-connector.js.map +1 -0
  30. package/dist/tools/control-agent.d.ts.map +1 -1
  31. package/dist/tools/control-agent.js +30 -31
  32. package/dist/tools/control-agent.js.map +1 -1
  33. package/dist/tools/delete-agent.d.ts.map +1 -1
  34. package/dist/tools/delete-agent.js +12 -5
  35. package/dist/tools/delete-agent.js.map +1 -1
  36. package/dist/tools/deploy-agent.d.ts.map +1 -1
  37. package/dist/tools/deploy-agent.js +96 -44
  38. package/dist/tools/deploy-agent.js.map +1 -1
  39. package/dist/tools/disconnect-agent-connector.d.ts +4 -0
  40. package/dist/tools/disconnect-agent-connector.d.ts.map +1 -0
  41. package/dist/tools/disconnect-agent-connector.js +184 -0
  42. package/dist/tools/disconnect-agent-connector.js.map +1 -0
  43. package/dist/tools/get-account.d.ts.map +1 -1
  44. package/dist/tools/get-account.js +24 -8
  45. package/dist/tools/get-account.js.map +1 -1
  46. package/dist/tools/get-agent-activity.d.ts.map +1 -1
  47. package/dist/tools/get-agent-activity.js +285 -138
  48. package/dist/tools/get-agent-activity.js.map +1 -1
  49. package/dist/tools/get-agent-connector-permissions.d.ts +145 -0
  50. package/dist/tools/get-agent-connector-permissions.d.ts.map +1 -0
  51. package/dist/tools/get-agent-connector-permissions.js +194 -0
  52. package/dist/tools/get-agent-connector-permissions.js.map +1 -0
  53. package/dist/tools/get-agent-conversation.d.ts.map +1 -1
  54. package/dist/tools/get-agent-conversation.js +39 -10
  55. package/dist/tools/get-agent-conversation.js.map +1 -1
  56. package/dist/tools/get-agent-message.d.ts.map +1 -1
  57. package/dist/tools/get-agent-message.js +13 -5
  58. package/dist/tools/get-agent-message.js.map +1 -1
  59. package/dist/tools/get-agent-template.d.ts.map +1 -1
  60. package/dist/tools/get-agent-template.js +13 -15
  61. package/dist/tools/get-agent-template.js.map +1 -1
  62. package/dist/tools/get-my-agent.d.ts.map +1 -1
  63. package/dist/tools/get-my-agent.js +38 -5
  64. package/dist/tools/get-my-agent.js.map +1 -1
  65. package/dist/tools/get-task-price.d.ts.map +1 -1
  66. package/dist/tools/get-task-price.js +4 -4
  67. package/dist/tools/get-task-price.js.map +1 -1
  68. package/dist/tools/get-task.d.ts.map +1 -1
  69. package/dist/tools/get-task.js +4 -4
  70. package/dist/tools/get-task.js.map +1 -1
  71. package/dist/tools/index.d.ts +8 -3
  72. package/dist/tools/index.d.ts.map +1 -1
  73. package/dist/tools/index.js +17 -6
  74. package/dist/tools/index.js.map +1 -1
  75. package/dist/tools/kill-task.js +1 -1
  76. package/dist/tools/kill-task.js.map +1 -1
  77. package/dist/tools/list-agent-connectors.d.ts +4 -0
  78. package/dist/tools/list-agent-connectors.d.ts.map +1 -0
  79. package/dist/tools/list-agent-connectors.js +325 -0
  80. package/dist/tools/list-agent-connectors.js.map +1 -0
  81. package/dist/tools/list-agent-skills.d.ts.map +1 -1
  82. package/dist/tools/list-agent-skills.js +59 -40
  83. package/dist/tools/list-agent-skills.js.map +1 -1
  84. package/dist/tools/list-agent-templates.d.ts.map +1 -1
  85. package/dist/tools/list-agent-templates.js +7 -5
  86. package/dist/tools/list-agent-templates.js.map +1 -1
  87. package/dist/tools/list-my-agents.d.ts.map +1 -1
  88. package/dist/tools/list-my-agents.js +7 -3
  89. package/dist/tools/list-my-agents.js.map +1 -1
  90. package/dist/tools/list-projects.d.ts.map +1 -1
  91. package/dist/tools/list-projects.js +7 -4
  92. package/dist/tools/list-projects.js.map +1 -1
  93. package/dist/tools/list-studio-results.d.ts.map +1 -1
  94. package/dist/tools/list-studio-results.js +3 -2
  95. package/dist/tools/list-studio-results.js.map +1 -1
  96. package/dist/tools/list-tasks.d.ts.map +1 -1
  97. package/dist/tools/list-tasks.js +6 -3
  98. package/dist/tools/list-tasks.js.map +1 -1
  99. package/dist/tools/manage-agent-billing.d.ts.map +1 -1
  100. package/dist/tools/manage-agent-billing.js +216 -359
  101. package/dist/tools/manage-agent-billing.js.map +1 -1
  102. package/dist/tools/manage-agent-custom-skill.d.ts.map +1 -1
  103. package/dist/tools/manage-agent-custom-skill.js +77 -30
  104. package/dist/tools/manage-agent-custom-skill.js.map +1 -1
  105. package/dist/tools/manage-model-access.js +1 -1
  106. package/dist/tools/manage-model-access.js.map +1 -1
  107. package/dist/tools/manage-spend-limit.js +1 -1
  108. package/dist/tools/manage-spend-limit.js.map +1 -1
  109. package/dist/tools/run-model.d.ts.map +1 -1
  110. package/dist/tools/run-model.js +4 -4
  111. package/dist/tools/run-model.js.map +1 -1
  112. package/dist/tools/schemas.d.ts +11 -0
  113. package/dist/tools/schemas.d.ts.map +1 -1
  114. package/dist/tools/schemas.js +19 -1
  115. package/dist/tools/schemas.js.map +1 -1
  116. package/dist/tools/send-agent-message.d.ts.map +1 -1
  117. package/dist/tools/send-agent-message.js +45 -20
  118. package/dist/tools/send-agent-message.js.map +1 -1
  119. package/dist/tools/set-agent-connector-accounts.d.ts +4 -0
  120. package/dist/tools/set-agent-connector-accounts.d.ts.map +1 -0
  121. package/dist/tools/set-agent-connector-accounts.js +263 -0
  122. package/dist/tools/set-agent-connector-accounts.js.map +1 -0
  123. package/dist/tools/set-agent-connector-permissions.d.ts +4 -0
  124. package/dist/tools/set-agent-connector-permissions.d.ts.map +1 -0
  125. package/dist/tools/set-agent-connector-permissions.js +280 -0
  126. package/dist/tools/set-agent-connector-permissions.js.map +1 -0
  127. package/dist/tools/set-agent-credentials.d.ts.map +1 -1
  128. package/dist/tools/set-agent-credentials.js +52 -169
  129. package/dist/tools/set-agent-credentials.js.map +1 -1
  130. package/dist/tools/update-agent.d.ts.map +1 -1
  131. package/dist/tools/update-agent.js +39 -18
  132. package/dist/tools/update-agent.js.map +1 -1
  133. package/dist/tools/wait-for-task.d.ts.map +1 -1
  134. package/dist/tools/wait-for-task.js +4 -4
  135. package/dist/tools/wait-for-task.js.map +1 -1
  136. package/dist/tools/wait-for-workflow-run.d.ts.map +1 -1
  137. package/dist/tools/wait-for-workflow-run.js +6 -3
  138. package/dist/tools/wait-for-workflow-run.js.map +1 -1
  139. package/dist/utils/agent-approvals.d.ts +328 -0
  140. package/dist/utils/agent-approvals.d.ts.map +1 -0
  141. package/dist/utils/agent-approvals.js +620 -0
  142. package/dist/utils/agent-approvals.js.map +1 -0
  143. package/dist/utils/agent-catalog.d.ts +15 -25
  144. package/dist/utils/agent-catalog.d.ts.map +1 -1
  145. package/dist/utils/agent-catalog.js +27 -36
  146. package/dist/utils/agent-catalog.js.map +1 -1
  147. package/dist/utils/agent-config.d.ts +87 -292
  148. package/dist/utils/agent-config.d.ts.map +1 -1
  149. package/dist/utils/agent-config.js +150 -787
  150. package/dist/utils/agent-config.js.map +1 -1
  151. package/dist/utils/agent-connectors.d.ts +197 -0
  152. package/dist/utils/agent-connectors.d.ts.map +1 -0
  153. package/dist/utils/agent-connectors.js +415 -0
  154. package/dist/utils/agent-connectors.js.map +1 -0
  155. package/dist/utils/agent-message.d.ts +106 -4
  156. package/dist/utils/agent-message.d.ts.map +1 -1
  157. package/dist/utils/agent-message.js +84 -14
  158. package/dist/utils/agent-message.js.map +1 -1
  159. package/dist/utils/agent-setup.d.ts +19 -14
  160. package/dist/utils/agent-setup.d.ts.map +1 -1
  161. package/dist/utils/agent-setup.js +171 -106
  162. package/dist/utils/agent-setup.js.map +1 -1
  163. package/dist/utils/agent-targets.d.ts.map +1 -1
  164. package/dist/utils/agent-targets.js +40 -14
  165. package/dist/utils/agent-targets.js.map +1 -1
  166. package/dist/utils/agent-turns.d.ts +256 -7
  167. package/dist/utils/agent-turns.d.ts.map +1 -1
  168. package/dist/utils/agent-turns.js +260 -71
  169. package/dist/utils/agent-turns.js.map +1 -1
  170. package/dist/utils/connector-permissions.d.ts +184 -0
  171. package/dist/utils/connector-permissions.d.ts.map +1 -0
  172. package/dist/utils/connector-permissions.js +439 -0
  173. package/dist/utils/connector-permissions.js.map +1 -0
  174. package/dist/utils/controls.d.ts +6 -2
  175. package/dist/utils/controls.d.ts.map +1 -1
  176. package/dist/utils/controls.js +20 -9
  177. package/dist/utils/controls.js.map +1 -1
  178. package/dist/utils/format.d.ts +10 -0
  179. package/dist/utils/format.d.ts.map +1 -1
  180. package/dist/utils/format.js +42 -3
  181. package/dist/utils/format.js.map +1 -1
  182. package/dist/utils/quoted-text.d.ts +2 -0
  183. package/dist/utils/quoted-text.d.ts.map +1 -1
  184. package/dist/utils/quoted-text.js +5 -0
  185. package/dist/utils/quoted-text.js.map +1 -1
  186. package/dist/utils/structured.d.ts +3 -0
  187. package/dist/utils/structured.d.ts.map +1 -1
  188. package/dist/utils/structured.js +7 -2
  189. package/dist/utils/structured.js.map +1 -1
  190. package/dist/utils/studio-runs.d.ts.map +1 -1
  191. package/dist/utils/studio-runs.js +6 -4
  192. package/dist/utils/studio-runs.js.map +1 -1
  193. package/dist/utils/user-agent.d.ts +271 -100
  194. package/dist/utils/user-agent.d.ts.map +1 -1
  195. package/dist/utils/user-agent.js +434 -159
  196. package/dist/utils/user-agent.js.map +1 -1
  197. package/dist/utils/wiro-project.d.ts +25 -0
  198. package/dist/utils/wiro-project.d.ts.map +1 -1
  199. package/dist/utils/wiro-project.js +76 -2
  200. package/dist/utils/wiro-project.js.map +1 -1
  201. package/dist/utils/workspace.d.ts +3 -1
  202. package/dist/utils/workspace.d.ts.map +1 -1
  203. package/dist/utils/workspace.js +2 -1
  204. package/dist/utils/workspace.js.map +1 -1
  205. package/package.json +1 -1
  206. package/dist/tools/connect-agent-oauth.d.ts +0 -4
  207. package/dist/tools/connect-agent-oauth.d.ts.map +0 -1
  208. package/dist/tools/connect-agent-oauth.js +0 -778
  209. package/dist/tools/connect-agent-oauth.js.map +0 -1
  210. package/dist/tools/disconnect-agent-oauth.d.ts +0 -4
  211. package/dist/tools/disconnect-agent-oauth.d.ts.map +0 -1
  212. package/dist/tools/disconnect-agent-oauth.js +0 -138
  213. package/dist/tools/disconnect-agent-oauth.js.map +0 -1
@@ -23,9 +23,9 @@ export declare function agentStatusHint(status: number | null | undefined, plain
23
23
  /** Stopping, queued and starting move on by themselves; every other status stays until someone acts. */
24
24
  export declare function isTransitionalStatus(status: number | null | undefined): boolean;
25
25
  /**
26
- * The plans an agent can have, smallest first. Every plan includes every skill,
27
- * and each has a fixed monthly price and monthly credits, the same for every
28
- * template and custom build. The numbers come from Wiro, never from here.
26
+ * The plans an agent can have, smallest first. Every plan includes every skill, and each has a fixed monthly
27
+ * price that it also includes as AI usage each month, the same for every template and custom build. After the
28
+ * included usage, the agent uses the Wiro balance of its workspace. The numbers come from Wiro, never from here.
29
29
  */
30
30
  export declare const AGENT_PLANS: readonly ["starter", "pro", "max"];
31
31
  export type AgentPlan = typeof AGENT_PLANS[number];
@@ -36,49 +36,85 @@ export declare function planName(plan: string | null | undefined): string;
36
36
  export declare function comparePlans(a: AgentPlan, b: AgentPlan): number;
37
37
  export declare const planPriceSchema: z.ZodObject<{
38
38
  priceUsd: z.ZodNumber;
39
- monthlyCredits: z.ZodNumber;
39
+ includedUsageUsd: z.ZodNumber;
40
40
  }, z.core.$strip>;
41
41
  export type PlanPrice = z.infer<typeof planPriceSchema>;
42
42
  export declare const planPricingSchema: z.ZodObject<{
43
43
  starter: z.ZodOptional<z.ZodObject<{
44
44
  priceUsd: z.ZodNumber;
45
- monthlyCredits: z.ZodNumber;
45
+ includedUsageUsd: z.ZodNumber;
46
46
  }, z.core.$strip>>;
47
47
  pro: z.ZodOptional<z.ZodObject<{
48
48
  priceUsd: z.ZodNumber;
49
- monthlyCredits: z.ZodNumber;
49
+ includedUsageUsd: z.ZodNumber;
50
50
  }, z.core.$strip>>;
51
51
  max: z.ZodOptional<z.ZodObject<{
52
52
  priceUsd: z.ZodNumber;
53
- monthlyCredits: z.ZodNumber;
53
+ includedUsageUsd: z.ZodNumber;
54
54
  }, z.core.$strip>>;
55
55
  }, z.core.$strip>;
56
56
  export type PlanPricing = z.infer<typeof planPricingSchema>;
57
- /** Each plan's price and monthly credits as Wiro lists them (its tiers), or null when it lists none. */
58
- export declare function toPlanPricing(value: unknown): PlanPricing | null;
57
+ /**
58
+ * Each plan's price and the AI usage it includes, as an answer lists them, or null when it lists none. source
59
+ * holds the plans as plans ([{ key, priceUsd, includedUsageUsd }]) or, in their older form, as tiers
60
+ * ({ starter: { priceUsd }, ... }).
61
+ */
62
+ export declare function toPlanPricing(source: unknown): PlanPricing | null;
59
63
  /** A plan's monthly price in a list: whole dollars without cents, such as $5, and other amounts with them. */
60
64
  export declare function formatPlanUsd(value: number): string;
61
- /** One plan with its price and credits: "Pro $30 (3,000 credits)". */
65
+ /** One plan with its price and the AI usage it includes: "Pro $30 a month, includes $30 of AI usage". */
62
66
  export declare function planPriceText(plan: AgentPlan, price: PlanPrice): string;
63
67
  /**
64
- * The plans Wiro lists, smallest first, as one line: "Starter $5 (500 credits), Pro $30 (3,000 credits),
65
- * Max $100 (10,000 credits) per month". except leaves one plan out, such as the one a quote is for.
68
+ * The plans Wiro lists, smallest first, as one line: "Starter $5 a month, includes $5 of AI usage; Pro $30 a
69
+ * month, includes $30 of AI usage; ...". except leaves one plan out, such as the one a quote is for.
66
70
  */
67
71
  export declare function planLineText(pricing: PlanPricing, except?: AgentPlan): string;
68
72
  export declare function formatUsd(value: number | null | undefined): string;
69
- export declare function formatCredits(value: number | null | undefined): string;
73
+ /** A whole count, such as tokens or turns: 50,147. */
74
+ export declare function formatCount(value: number | null | undefined): string;
70
75
  export declare function roundUsd(value: number): number;
76
+ /** Without included AI usage left, an agent's new turn needs this much in the Wiro balance. */
77
+ export declare const MIN_RUN_BALANCE_USD = 0.5;
78
+ /** What pays for an agent's chat and scheduled tasks, for a sentence such as "every run uses ...". */
79
+ export declare const AGENT_AI_USAGE = "the agent's AI usage (its plan first, then the workspace balance)";
80
+ /** The Wiro dashboard page where funds are added to a balance. No tool adds funds. */
81
+ export declare const ADD_FUNDS_URL = "https://wiro.ai/panel/wallet/deposit/credit-card";
82
+ /**
83
+ * What pays an agent plan: one rule for every plan payment, a new plan, a renewal, a move to a larger plan and the
84
+ * automatic renewal alike. The balance's deposits, its store revenue and its coupon credit count, except coupon credit
85
+ * limited to certain models, which pays no plan.
86
+ */
87
+ export declare const PLAN_FUNDS_TEXT: string;
88
+ /** Where funds are added, as a sentence. A team agent's balance is its team's wallet. */
89
+ export declare function addFundsText(workspace: 'personal' | 'team'): string;
90
+ /**
91
+ * What Wiro says is missing from the balance for a plan payment it refused: its neededusd, the amount to add in USD
92
+ * (rounded up to the cent, at least the deposit minimum), or the older "Insufficient wallet balance" answer. A
93
+ * refusal for a paused agent carries agentusage instead, and any other refusal, a 97 that refuses a team member
94
+ * included, is null.
95
+ */
96
+ export declare function balanceShortfall(error: unknown): {
97
+ neededUsd: number | null;
98
+ } | null;
99
+ /** The agent's AI usage a refusal carries (agentusage), when Wiro refused it because the agent is paused. */
100
+ export declare function pausedUsage(body: Record<string, unknown>): AgentUsage | null;
101
+ /**
102
+ * The words after a plan payment refused for a short balance: what was not done, how much to add, and where.
103
+ * teamHint says which team to select in the dashboard, when one is to be selected.
104
+ */
105
+ export declare function shortBalanceNote(neededUsd: number | null, teamHint: string, nothingDone?: string): string;
71
106
  export declare const AMOUNT_TOLERANCE_USD = 0.005;
72
107
  export declare function sameAmount(quoted: number, approved: number): boolean;
73
108
  export declare const subscriptionSchema: z.ZodObject<{
74
109
  status: z.ZodString;
75
110
  billing: z.ZodEnum<{
76
- wallet: "wallet";
77
111
  card: "card";
112
+ wallet: "wallet";
78
113
  }>;
79
114
  switchingToWallet: z.ZodBoolean;
80
115
  amountUsd: z.ZodNullable<z.ZodNumber>;
81
116
  periodEndsAt: z.ZodOptional<z.ZodString>;
117
+ renewsOrEndsAt: z.ZodOptional<z.ZodString>;
82
118
  daysRemaining: z.ZodNullable<z.ZodNumber>;
83
119
  cancelAtPeriodEnd: z.ZodBoolean;
84
120
  atPeriodEnd: z.ZodOptional<z.ZodEnum<{
@@ -88,42 +124,102 @@ export declare const subscriptionSchema: z.ZodObject<{
88
124
  }>>;
89
125
  }, z.core.$strip>;
90
126
  export type AgentSubscription = z.infer<typeof subscriptionSchema>;
127
+ /**
128
+ * When an active plan renews, or ends when it is set to end, for a sentence: the moment Wiro shows
129
+ * (renewsOrEndsAt), which is never gone by, else, in an answer without it, the period end. The period end itself
130
+ * can be gone by while the plan is active: a wallet plan whose renewal the balance cannot pay stays active while
131
+ * Wiro tries again for up to a day after it.
132
+ */
133
+ export declare function renewalMoment(plan: Pick<AgentSubscription, 'renewsOrEndsAt' | 'periodEndsAt'> | null | undefined): string | undefined;
91
134
  /**
92
135
  * Whether a plan ends with its current period: true when it ends, false when
93
136
  * it renews, null when that is not known. A wallet plan says so itself, and a
94
- * card plan moving to wallet billing renews from the wallet, even though its
137
+ * card plan moving to the wallet renews from the Wiro balance, even though its
95
138
  * card subscription is set to end with the period. Any other card plan is
96
139
  * known only when the row carries its card state (cardEnds).
97
140
  */
98
141
  export declare function planEndsWithPeriod(subscription: Record<string, unknown>, cardEnds?: unknown): boolean | null;
99
142
  export declare function toSubscription(value: unknown, cardEnds?: unknown): AgentSubscription | null;
100
- /** How a new charge for this plan is paid right now. */
101
- export declare function chargeRoute(subscription: unknown): 'wallet' | 'card' | null;
143
+ /** The exception a card plan's text adds, with a leading space; none for a plan already set to move. */
144
+ export declare function cardPlanOnceMoreNote(plan: Pick<AgentSubscription, 'switchingToWallet'> | null | undefined): string;
102
145
  /** A plan that has not ended and is not active, such as a card plan whose last payment did not go through. */
103
146
  export declare function isUnsettledPlan(plan: Pick<AgentSubscription, 'status'> | null | undefined): boolean;
147
+ /** The Wiro balance that pays for an agent's plan: the personal wallet, or the team wallet for a team agent. */
148
+ export declare function planBalanceName(workspace: 'personal' | 'team'): string;
104
149
  /**
105
- * What to do about a plan that has not ended and is not active. Wiro starts no new plan beside it, and renews,
106
- * changes, cancels and adds packs only to an active plan, so the dashboard settles it: a card plan whose last
107
- * payment did not go through renews by itself once its open invoice is paid in the billing portal, which Billing
108
- * opens in the personal workspace of whoever pays for the plan. lead says what the call could not do, after the
150
+ * What to do about a plan that has not ended and is not active, such as a card plan from before agent plans were
151
+ * paid from the Wiro balance only, whose last payment did not go through. Wiro starts no new plan beside it, and
152
+ * renews, changes and cancels only an active plan, and no card payment is taken here, so nothing here settles it:
153
+ * once a card plan has ended, a new plan is paid from the balance. lead says what the call could not do, after the
109
154
  * plan's state.
110
155
  */
111
156
  export declare function unsettledPlanText(plan: Pick<AgentSubscription, 'status' | 'billing'>, agent: {
112
157
  guid: string;
113
158
  workspace: 'personal' | 'team';
114
159
  }, lead?: string): string;
115
- export declare const creditsSchema: z.ZodObject<{
116
- monthly: z.ZodNumber;
117
- renewal: z.ZodOptional<z.ZodNumber>;
118
- extra: z.ZodNumber;
119
- used: z.ZodNumber;
120
- remaining: z.ZodNumber;
160
+ /** Wiro keeps some amounts in hundredths of a dollar; this is the same amount in USD. */
161
+ export declare function centsToUsd(value: number): number;
162
+ export declare const agentUsageSchema: z.ZodObject<{
121
163
  period: z.ZodOptional<z.ZodString>;
164
+ resetsAt: z.ZodOptional<z.ZodString>;
165
+ renewalDue: z.ZodOptional<z.ZodBoolean>;
166
+ includedUsd: z.ZodNumber;
167
+ usedUsd: z.ZodNumber;
168
+ leftUsd: z.ZodNumber;
169
+ renewalUsd: z.ZodOptional<z.ZodNumber>;
170
+ fromBalanceUsd: z.ZodOptional<z.ZodNumber>;
171
+ balanceUsd: z.ZodOptional<z.ZodNumber>;
172
+ wallet: z.ZodOptional<z.ZodEnum<{
173
+ team: "team";
174
+ personal: "personal";
175
+ }>>;
176
+ planBalanceUsd: z.ZodOptional<z.ZodNumber>;
177
+ minBalanceUsd: z.ZodOptional<z.ZodNumber>;
178
+ paused: z.ZodBoolean;
179
+ pausedReason: z.ZodOptional<z.ZodEnum<{
180
+ spendlimit: "spendlimit";
181
+ plan: "plan";
182
+ balance: "balance";
183
+ }>>;
184
+ extraUsd: z.ZodOptional<z.ZodNumber>;
185
+ legacy: z.ZodOptional<z.ZodBoolean>;
186
+ }, z.core.$strip>;
187
+ export type AgentUsage = z.infer<typeof agentUsageSchema>;
188
+ export declare const agentSpendSchema: z.ZodObject<{
189
+ month: z.ZodOptional<z.ZodString>;
190
+ totalUsd: z.ZodNumber;
191
+ planUsd: z.ZodNumber;
192
+ aiUsageBalanceUsd: z.ZodNumber;
193
+ aiUsagePlanUsd: z.ZodNumber;
194
+ modelRunsUsd: z.ZodNumber;
195
+ fundsAddedUsd: z.ZodNumber;
122
196
  }, z.core.$strip>;
123
- export type AgentCredits = z.infer<typeof creditsSchema>;
124
- export declare function toCredits(row: Record<string, unknown>): AgentCredits;
125
- /** The monthly credits as said in a line: those of this period, and those of each renewal when they differ. */
126
- export declare function monthlyCreditsText(credits: Pick<AgentCredits, 'monthly' | 'renewal'>): string;
197
+ export type AgentSpend = z.infer<typeof agentSpendSchema>;
198
+ /**
199
+ * The agent's AI usage in USD from its row: Wiro's usage object, or, in an answer from an older Wiro release, its
200
+ * credit fields, which count hundredths of a dollar.
201
+ */
202
+ export declare function toAgentUsage(row: Record<string, unknown>): AgentUsage;
203
+ /** What the agent cost this calendar month, or undefined when Wiro does not say. */
204
+ export declare function toAgentSpend(row: Record<string, unknown>): AgentSpend | undefined;
205
+ /**
206
+ * The name of the agent's AI usage line, as the agent's page titles it: Included AI usage while the plan period
207
+ * includes some, and AI usage when it includes none (no live plan, so the balance paid all of it).
208
+ */
209
+ export declare function aiUsageLabel(usage: Pick<AgentUsage, 'includedUsd'>): string;
210
+ /**
211
+ * The agent's AI usage this period as said in a line: "$12.40 of $30.00 included; then the workspace balance
212
+ * ($42.10)", or "nothing included (no active plan)" for an agent without one, with what the balance paid so far and
213
+ * why the agent is paused when it is.
214
+ */
215
+ export declare function aiUsageText(usage: AgentUsage): string;
216
+ /**
217
+ * The agent's AI usage in a list row: "AI usage $12.40 of $30.00 included, balance $42.10, paused (balance short)",
218
+ * or "no AI usage included, balance $42.10, paused (no active plan)" for an agent without a plan.
219
+ */
220
+ export declare function aiUsageShortText(usage: AgentUsage): string;
221
+ /** What the agent cost this month as said in a line: "$33.20 (plan $30.00, model runs $3.20); ...". */
222
+ export declare function spendText(spend: AgentSpend): string;
127
223
  /** Plain text from catalog HTML. Links keep their target so setup steps stay usable. */
128
224
  export declare function htmlToText(value: unknown, maxLength?: number): string;
129
225
  export declare function toStringArray(value: unknown): string[];
@@ -131,7 +227,6 @@ export declare const credentialStatusSchema: z.ZodObject<{
131
227
  key: z.ZodString;
132
228
  title: z.ZodString;
133
229
  optional: z.ZodBoolean;
134
- oauth: z.ZodBoolean;
135
230
  connected: z.ZodBoolean;
136
231
  filled: z.ZodBoolean;
137
232
  requiredMissing: z.ZodBoolean;
@@ -160,6 +255,7 @@ export declare const agentTaskSchema: z.ZodObject<{
160
255
  description: z.ZodOptional<z.ZodString>;
161
256
  enabled: z.ZodBoolean;
162
257
  notWritten: z.ZodOptional<z.ZodBoolean>;
258
+ editable: z.ZodOptional<z.ZodBoolean>;
163
259
  ownerSkills: z.ZodOptional<z.ZodArray<z.ZodString>>;
164
260
  skillOff: z.ZodOptional<z.ZodBoolean>;
165
261
  offSkills: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString>>>;
@@ -174,19 +270,9 @@ export declare const agentTaskSchema: z.ZodObject<{
174
270
  }, z.core.$strip>;
175
271
  export type AgentTask = z.infer<typeof agentTaskSchema>;
176
272
  /** Custom instructions and scheduled tasks, with the instruction text cut short. */
177
- export declare function summarizeTasks(value: unknown, maxInstructionLength?: number): AgentTask[];
178
- declare const selectableModelSchema: z.ZodObject<{
179
- slug: z.ZodString;
180
- label: z.ZodOptional<z.ZodString>;
181
- inputCreditsPer1M: z.ZodOptional<z.ZodNumber>;
182
- outputCreditsPer1M: z.ZodOptional<z.ZodNumber>;
183
- }, z.core.$strip>;
184
- type SelectableModel = z.infer<typeof selectableModelSchema>;
185
- export declare const extraCreditPackSchema: z.ZodObject<{
186
- pack: z.ZodString;
187
- credits: z.ZodNumber;
188
- priceUsd: z.ZodNumber;
189
- }, z.core.$strip>;
273
+ export declare function summarizeTasks(value: unknown, maxInstructionLength?: number, options?: {
274
+ deployed?: boolean;
275
+ }): AgentTask[];
190
276
  export declare const agentSummarySchema: z.ZodObject<{
191
277
  guid: z.ZodString;
192
278
  title: z.ZodString;
@@ -215,23 +301,50 @@ export declare const agentSummarySchema: z.ZodObject<{
215
301
  tier: z.ZodOptional<z.ZodString>;
216
302
  nextPlan: z.ZodOptional<z.ZodNullable<z.ZodString>>;
217
303
  monthlyPriceUsd: z.ZodNullable<z.ZodNumber>;
218
- credits: z.ZodObject<{
219
- monthly: z.ZodNumber;
220
- renewal: z.ZodOptional<z.ZodNumber>;
221
- extra: z.ZodNumber;
222
- used: z.ZodNumber;
223
- remaining: z.ZodNumber;
304
+ usage: z.ZodObject<{
224
305
  period: z.ZodOptional<z.ZodString>;
306
+ resetsAt: z.ZodOptional<z.ZodString>;
307
+ renewalDue: z.ZodOptional<z.ZodBoolean>;
308
+ includedUsd: z.ZodNumber;
309
+ usedUsd: z.ZodNumber;
310
+ leftUsd: z.ZodNumber;
311
+ renewalUsd: z.ZodOptional<z.ZodNumber>;
312
+ fromBalanceUsd: z.ZodOptional<z.ZodNumber>;
313
+ balanceUsd: z.ZodOptional<z.ZodNumber>;
314
+ wallet: z.ZodOptional<z.ZodEnum<{
315
+ team: "team";
316
+ personal: "personal";
317
+ }>>;
318
+ planBalanceUsd: z.ZodOptional<z.ZodNumber>;
319
+ minBalanceUsd: z.ZodOptional<z.ZodNumber>;
320
+ paused: z.ZodBoolean;
321
+ pausedReason: z.ZodOptional<z.ZodEnum<{
322
+ spendlimit: "spendlimit";
323
+ plan: "plan";
324
+ balance: "balance";
325
+ }>>;
326
+ extraUsd: z.ZodOptional<z.ZodNumber>;
327
+ legacy: z.ZodOptional<z.ZodBoolean>;
225
328
  }, z.core.$strip>;
329
+ spend: z.ZodOptional<z.ZodObject<{
330
+ month: z.ZodOptional<z.ZodString>;
331
+ totalUsd: z.ZodNumber;
332
+ planUsd: z.ZodNumber;
333
+ aiUsageBalanceUsd: z.ZodNumber;
334
+ aiUsagePlanUsd: z.ZodNumber;
335
+ modelRunsUsd: z.ZodNumber;
336
+ fundsAddedUsd: z.ZodNumber;
337
+ }, z.core.$strip>>;
226
338
  subscription: z.ZodNullable<z.ZodObject<{
227
339
  status: z.ZodString;
228
340
  billing: z.ZodEnum<{
229
- wallet: "wallet";
230
341
  card: "card";
342
+ wallet: "wallet";
231
343
  }>;
232
344
  switchingToWallet: z.ZodBoolean;
233
345
  amountUsd: z.ZodNullable<z.ZodNumber>;
234
346
  periodEndsAt: z.ZodOptional<z.ZodString>;
347
+ renewsOrEndsAt: z.ZodOptional<z.ZodString>;
235
348
  daysRemaining: z.ZodNullable<z.ZodNumber>;
236
349
  cancelAtPeriodEnd: z.ZodBoolean;
237
350
  atPeriodEnd: z.ZodOptional<z.ZodEnum<{
@@ -276,23 +389,50 @@ export declare const agentDetailSchema: z.ZodObject<{
276
389
  tier: z.ZodOptional<z.ZodString>;
277
390
  nextPlan: z.ZodOptional<z.ZodNullable<z.ZodString>>;
278
391
  monthlyPriceUsd: z.ZodNullable<z.ZodNumber>;
279
- credits: z.ZodObject<{
280
- monthly: z.ZodNumber;
281
- renewal: z.ZodOptional<z.ZodNumber>;
282
- extra: z.ZodNumber;
283
- used: z.ZodNumber;
284
- remaining: z.ZodNumber;
392
+ usage: z.ZodObject<{
285
393
  period: z.ZodOptional<z.ZodString>;
394
+ resetsAt: z.ZodOptional<z.ZodString>;
395
+ renewalDue: z.ZodOptional<z.ZodBoolean>;
396
+ includedUsd: z.ZodNumber;
397
+ usedUsd: z.ZodNumber;
398
+ leftUsd: z.ZodNumber;
399
+ renewalUsd: z.ZodOptional<z.ZodNumber>;
400
+ fromBalanceUsd: z.ZodOptional<z.ZodNumber>;
401
+ balanceUsd: z.ZodOptional<z.ZodNumber>;
402
+ wallet: z.ZodOptional<z.ZodEnum<{
403
+ team: "team";
404
+ personal: "personal";
405
+ }>>;
406
+ planBalanceUsd: z.ZodOptional<z.ZodNumber>;
407
+ minBalanceUsd: z.ZodOptional<z.ZodNumber>;
408
+ paused: z.ZodBoolean;
409
+ pausedReason: z.ZodOptional<z.ZodEnum<{
410
+ spendlimit: "spendlimit";
411
+ plan: "plan";
412
+ balance: "balance";
413
+ }>>;
414
+ extraUsd: z.ZodOptional<z.ZodNumber>;
415
+ legacy: z.ZodOptional<z.ZodBoolean>;
286
416
  }, z.core.$strip>;
417
+ spend: z.ZodOptional<z.ZodObject<{
418
+ month: z.ZodOptional<z.ZodString>;
419
+ totalUsd: z.ZodNumber;
420
+ planUsd: z.ZodNumber;
421
+ aiUsageBalanceUsd: z.ZodNumber;
422
+ aiUsagePlanUsd: z.ZodNumber;
423
+ modelRunsUsd: z.ZodNumber;
424
+ fundsAddedUsd: z.ZodNumber;
425
+ }, z.core.$strip>>;
287
426
  subscription: z.ZodNullable<z.ZodObject<{
288
427
  status: z.ZodString;
289
428
  billing: z.ZodEnum<{
290
- wallet: "wallet";
291
429
  card: "card";
430
+ wallet: "wallet";
292
431
  }>;
293
432
  switchingToWallet: z.ZodBoolean;
294
433
  amountUsd: z.ZodNullable<z.ZodNumber>;
295
434
  periodEndsAt: z.ZodOptional<z.ZodString>;
435
+ renewsOrEndsAt: z.ZodOptional<z.ZodString>;
296
436
  daysRemaining: z.ZodNullable<z.ZodNumber>;
297
437
  cancelAtPeriodEnd: z.ZodBoolean;
298
438
  atPeriodEnd: z.ZodOptional<z.ZodEnum<{
@@ -313,22 +453,17 @@ export declare const agentDetailSchema: z.ZodObject<{
313
453
  pricing: z.ZodNullable<z.ZodObject<{
314
454
  starter: z.ZodOptional<z.ZodObject<{
315
455
  priceUsd: z.ZodNumber;
316
- monthlyCredits: z.ZodNumber;
456
+ includedUsageUsd: z.ZodNumber;
317
457
  }, z.core.$strip>>;
318
458
  pro: z.ZodOptional<z.ZodObject<{
319
459
  priceUsd: z.ZodNumber;
320
- monthlyCredits: z.ZodNumber;
460
+ includedUsageUsd: z.ZodNumber;
321
461
  }, z.core.$strip>>;
322
462
  max: z.ZodOptional<z.ZodObject<{
323
463
  priceUsd: z.ZodNumber;
324
- monthlyCredits: z.ZodNumber;
464
+ includedUsageUsd: z.ZodNumber;
325
465
  }, z.core.$strip>>;
326
466
  }, z.core.$strip>>;
327
- extraCreditPacks: z.ZodArray<z.ZodObject<{
328
- pack: z.ZodString;
329
- credits: z.ZodNumber;
330
- priceUsd: z.ZodNumber;
331
- }, z.core.$strip>>;
332
467
  models: z.ZodOptional<z.ZodObject<{
333
468
  chat: z.ZodNullable<z.ZodString>;
334
469
  cron: z.ZodNullable<z.ZodString>;
@@ -338,8 +473,8 @@ export declare const agentDetailSchema: z.ZodObject<{
338
473
  selectableModels: z.ZodOptional<z.ZodArray<z.ZodObject<{
339
474
  slug: z.ZodString;
340
475
  label: z.ZodOptional<z.ZodString>;
341
- inputCreditsPer1M: z.ZodOptional<z.ZodNumber>;
342
- outputCreditsPer1M: z.ZodOptional<z.ZodNumber>;
476
+ inputUsdPer1M: z.ZodOptional<z.ZodNumber>;
477
+ outputUsdPer1M: z.ZodOptional<z.ZodNumber>;
343
478
  }, z.core.$strip>>>;
344
479
  enabledCommands: z.ZodNullable<z.ZodArray<z.ZodString>>;
345
480
  chatSetup: z.ZodOptional<z.ZodEnum<{
@@ -351,7 +486,6 @@ export declare const agentDetailSchema: z.ZodObject<{
351
486
  key: z.ZodString;
352
487
  title: z.ZodString;
353
488
  optional: z.ZodBoolean;
354
- oauth: z.ZodBoolean;
355
489
  connected: z.ZodBoolean;
356
490
  filled: z.ZodBoolean;
357
491
  requiredMissing: z.ZodBoolean;
@@ -359,7 +493,6 @@ export declare const agentDetailSchema: z.ZodObject<{
359
493
  missingCredentials: z.ZodArray<z.ZodObject<{
360
494
  key: z.ZodString;
361
495
  title: z.ZodString;
362
- oauth: z.ZodBoolean;
363
496
  }, z.core.$strip>>;
364
497
  channels: z.ZodArray<z.ZodObject<{
365
498
  id: z.ZodString;
@@ -374,6 +507,7 @@ export declare const agentDetailSchema: z.ZodObject<{
374
507
  description: z.ZodOptional<z.ZodString>;
375
508
  enabled: z.ZodBoolean;
376
509
  notWritten: z.ZodOptional<z.ZodBoolean>;
510
+ editable: z.ZodOptional<z.ZodBoolean>;
377
511
  ownerSkills: z.ZodOptional<z.ZodArray<z.ZodString>>;
378
512
  skillOff: z.ZodOptional<z.ZodBoolean>;
379
513
  offSkills: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString>>>;
@@ -391,6 +525,7 @@ export declare const agentDetailSchema: z.ZodObject<{
391
525
  description: z.ZodOptional<z.ZodString>;
392
526
  enabled: z.ZodBoolean;
393
527
  notWritten: z.ZodOptional<z.ZodBoolean>;
528
+ editable: z.ZodOptional<z.ZodBoolean>;
394
529
  ownerSkills: z.ZodOptional<z.ZodArray<z.ZodString>>;
395
530
  skillOff: z.ZodOptional<z.ZodBoolean>;
396
531
  offSkills: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString>>>;
@@ -440,23 +575,50 @@ export declare const deployedAgentSchema: z.ZodObject<{
440
575
  tier: z.ZodOptional<z.ZodString>;
441
576
  nextPlan: z.ZodOptional<z.ZodNullable<z.ZodString>>;
442
577
  monthlyPriceUsd: z.ZodNullable<z.ZodNumber>;
443
- credits: z.ZodObject<{
444
- monthly: z.ZodNumber;
445
- renewal: z.ZodOptional<z.ZodNumber>;
446
- extra: z.ZodNumber;
447
- used: z.ZodNumber;
448
- remaining: z.ZodNumber;
578
+ usage: z.ZodObject<{
449
579
  period: z.ZodOptional<z.ZodString>;
580
+ resetsAt: z.ZodOptional<z.ZodString>;
581
+ renewalDue: z.ZodOptional<z.ZodBoolean>;
582
+ includedUsd: z.ZodNumber;
583
+ usedUsd: z.ZodNumber;
584
+ leftUsd: z.ZodNumber;
585
+ renewalUsd: z.ZodOptional<z.ZodNumber>;
586
+ fromBalanceUsd: z.ZodOptional<z.ZodNumber>;
587
+ balanceUsd: z.ZodOptional<z.ZodNumber>;
588
+ wallet: z.ZodOptional<z.ZodEnum<{
589
+ team: "team";
590
+ personal: "personal";
591
+ }>>;
592
+ planBalanceUsd: z.ZodOptional<z.ZodNumber>;
593
+ minBalanceUsd: z.ZodOptional<z.ZodNumber>;
594
+ paused: z.ZodBoolean;
595
+ pausedReason: z.ZodOptional<z.ZodEnum<{
596
+ spendlimit: "spendlimit";
597
+ plan: "plan";
598
+ balance: "balance";
599
+ }>>;
600
+ extraUsd: z.ZodOptional<z.ZodNumber>;
601
+ legacy: z.ZodOptional<z.ZodBoolean>;
450
602
  }, z.core.$strip>;
603
+ spend: z.ZodOptional<z.ZodObject<{
604
+ month: z.ZodOptional<z.ZodString>;
605
+ totalUsd: z.ZodNumber;
606
+ planUsd: z.ZodNumber;
607
+ aiUsageBalanceUsd: z.ZodNumber;
608
+ aiUsagePlanUsd: z.ZodNumber;
609
+ modelRunsUsd: z.ZodNumber;
610
+ fundsAddedUsd: z.ZodNumber;
611
+ }, z.core.$strip>>;
451
612
  subscription: z.ZodNullable<z.ZodObject<{
452
613
  status: z.ZodString;
453
614
  billing: z.ZodEnum<{
454
- wallet: "wallet";
455
615
  card: "card";
616
+ wallet: "wallet";
456
617
  }>;
457
618
  switchingToWallet: z.ZodBoolean;
458
619
  amountUsd: z.ZodNullable<z.ZodNumber>;
459
620
  periodEndsAt: z.ZodOptional<z.ZodString>;
621
+ renewsOrEndsAt: z.ZodOptional<z.ZodString>;
460
622
  daysRemaining: z.ZodNullable<z.ZodNumber>;
461
623
  cancelAtPeriodEnd: z.ZodBoolean;
462
624
  atPeriodEnd: z.ZodOptional<z.ZodEnum<{
@@ -479,7 +641,6 @@ export declare const deployedAgentSchema: z.ZodObject<{
479
641
  missingCredentials: z.ZodArray<z.ZodObject<{
480
642
  key: z.ZodString;
481
643
  title: z.ZodString;
482
- oauth: z.ZodBoolean;
483
644
  }, z.core.$strip>>;
484
645
  channels: z.ZodArray<z.ZodObject<{
485
646
  id: z.ZodString;
@@ -498,7 +659,7 @@ export declare function toDeployedAgent(agent: AgentDetail): DeployedAgent;
498
659
  * It can be the agent's own plan, which then renews at that plan's price today.
499
660
  */
500
661
  export declare function readNextPlan(row: Record<string, unknown>): AgentPlan | null | undefined;
501
- /** The plans' prices on an agent row (its agent's tiers), or null when it lists none. */
662
+ /** The plans' prices on an agent row (its agent's plans), or null when it lists none. */
502
663
  export declare function rowPlanPricing(row: Record<string, unknown>): PlanPricing | null;
503
664
  /** The compact row used by list_my_agents. */
504
665
  export declare function toAgentSummary(row: Record<string, unknown>): AgentSummary;
@@ -506,37 +667,40 @@ export declare function toAgentSummary(row: Record<string, unknown>): AgentSumma
506
667
  export declare function selectableModelSlugs(row: Record<string, unknown>): Set<string>;
507
668
  /**
508
669
  * The keys of the credentials an agent's setup waits for: a credential with a
509
- * required field empty, a required credential that holds no value yet, or a
510
- * required sign-in that is not connected. A custom build's setup waits only for
670
+ * required field empty, or a required credential that holds no value yet. A custom build's setup waits only for
511
671
  * the main credential of each active skill, which skillsmeta lists. Its chat
512
672
  * channels are never among them.
513
673
  */
514
674
  export declare function credentialKeysSetupWaitsFor(row: Record<string, unknown>): Set<string>;
515
675
  /**
516
676
  * The full view of one deployed agent (Detail, Deploy and Update rows): its
517
- * status, plan, prices, credits and settings, and the state of each
677
+ * status, plan, prices, AI usage and settings, and the state of each
518
678
  * credential and channel.
519
679
  */
520
680
  export declare function toAgentDetail(row: Record<string, unknown>): AgentDetail;
521
- export declare function formatSubscriptionLine(subscription: AgentSubscription | null, plainMember?: boolean): string;
522
- /** Without an active plan, an agent starts only on the extra credits it has left. */
523
- export declare function startNeedsPlan(agent: Pick<AgentSummary, 'subscription' | 'credits'>): boolean;
681
+ export declare function formatSubscriptionLine(subscription: AgentSubscription | null, plainMember?: boolean, renewalDue?: boolean): string;
682
+ /**
683
+ * An agent starts only with an active plan. An answer from an older Wiro release can still show usage bought
684
+ * earlier, on which an agent without a plan starts too.
685
+ */
686
+ export declare function startNeedsPlan(agent: Pick<AgentSummary, 'subscription' | 'usage'>): boolean;
524
687
  /** An agent's title inside a line of this server's own text: on one line, in a code span it cannot close. */
525
688
  export declare function agentTitleSpan(title: string): string;
526
689
  /**
527
690
  * The move set for the next renewal, as a clause after the plan: "moves to Starter from the renewal after
528
691
  * <date>", or for the agent's own plan "from the renewal after <date> it is billed at today's Starter
529
- * price". Empty when none is set, or when the plan ends with its period instead of renewing.
692
+ * price". Empty when none is set, or when the plan ends with its period instead of renewing. While the renewal is
693
+ * due, it starts from the renewal due now.
530
694
  */
531
- export declare function nextPlanText(agent: Pick<AgentSummary, 'tier' | 'nextPlan' | 'subscription'>): string;
695
+ export declare function nextPlanText(agent: Pick<AgentSummary, 'tier' | 'nextPlan' | 'subscription' | 'usage'>): string;
532
696
  /** The plan by name, with the move set for its next renewal: "Max, moves to Starter from the renewal after ...". */
533
- export declare function planSummaryText(agent: Pick<AgentSummary, 'tier' | 'nextPlan' | 'subscription'>): string;
697
+ export declare function planSummaryText(agent: Pick<AgentSummary, 'tier' | 'nextPlan' | 'subscription' | 'usage'>): string;
534
698
  export declare function formatAgentSummaryLines(agent: AgentSummary, plainMember?: boolean): string[];
535
699
  /** Names inside a sentence: a, b and c. */
536
700
  export declare function nameList(names: readonly string[], word: 'and' | 'or'): string;
537
701
  /**
538
- * A name made from a key, as the dashboard makes it, for when there is no title: int-brevo-email reads
539
- * Brevo Email and ga4-attribution-auditor GA4 Attribution Auditor. known: false leaves the list of brands
702
+ * A name made from a key, as the dashboard makes it, for when there is no title: util-video-creator reads
703
+ * Video Creator and ga4-attribution-auditor GA4 Attribution Auditor. known: false leaves the list of brands
540
704
  * and acronyms out, for a name the customer typed.
541
705
  */
542
706
  export declare function wordsFromKey(key: string, { known }?: {
@@ -555,8 +719,8 @@ export declare function taskNamedByWiro(task: {
555
719
  ownerSkills?: string[];
556
720
  }): boolean;
557
721
  /**
558
- * A skill as people see it, by its catalog title, with the name apply_agent_skills takes: Gmail Check
559
- * (`int-gmail-check`). Without the title, words made from the name stand in for it.
722
+ * A skill as people see it, by its catalog title, with the name apply_agent_skills takes: Video Creator
723
+ * (`util-video-creator`). Without the title, words made from the name stand in for it.
560
724
  */
561
725
  export declare function skillLabel(name: string, titles?: ReadonlyMap<string, string>): string;
562
726
  /**
@@ -584,10 +748,18 @@ export declare function skillOffTasksNote(tasks: ReadonlyArray<{
584
748
  export declare function formatScheduledTaskLine(task: AgentTask, shortenedNote?: string, titles?: ReadonlyMap<string, string>): string;
585
749
  /** A custom instruction as a list line: name and key, on or off and description, then shortenedNote if its text was cut. */
586
750
  export declare function formatCustomInstructionLine(task: AgentTask, shortenedNote?: string): string;
587
- /** Each model with its credits per 1M input and output tokens, separated by semicolons. */
588
- export declare function formatModelRates(models: readonly SelectableModel[]): string;
751
+ /** A rate in USD per 1M tokens, with cents and up to four decimals: $6.25, $0.125. */
752
+ export declare function formatRateUsd(value: number): string;
753
+ /** Each model with what 1M input and output tokens cost in USD, separated by semicolons. */
754
+ export declare function formatModelRates(models: ReadonlyArray<{
755
+ slug: string;
756
+ label?: string;
757
+ inputUsdPer1M?: number;
758
+ outputUsdPer1M?: number;
759
+ }>): string;
589
760
  /** titles names skills as people see them: the agent's own (activeSkillTitles) and those a paused task waits for (pausedSkillTitles). */
590
- export declare function formatAgentDetail(agent: AgentDetail, plainMember?: boolean, titles?: ReadonlyMap<string, string>): string;
761
+ /** extraLines: sections that go before the dashboard link, such as the agent's connectors. */
762
+ export declare function formatAgentDetail(agent: AgentDetail, plainMember?: boolean, titles?: ReadonlyMap<string, string>, extraLines?: readonly string[]): string;
591
763
  export declare function normalizeCustomSkillKey(input: string, interval?: string | null): string | null;
592
764
  export declare function isGuid(value: string): boolean;
593
765
  export interface AgentApiClient {
@@ -646,9 +818,8 @@ export declare function isKnownFailedChange(error: unknown): boolean;
646
818
  * other answer, a network failure or a server error leaves it open.
647
819
  */
648
820
  export declare function outcomeUnknown(error: unknown): boolean;
649
- /** Advice for a status reached after a start, renew or deploy. With the agent, a failed agent without a plan or extra credits is sent to billing. */
650
- export declare function settledStatusAdvice(status: number | null, plainMember?: boolean, agent?: Pick<AgentSummary, 'guid' | 'workspace' | 'subscription' | 'credits'>): string;
821
+ /** Advice for a status reached after a start, renew or deploy. With the agent, a failed agent without a plan is sent to billing. */
822
+ export declare function settledStatusAdvice(status: number | null, plainMember?: boolean, agent?: Pick<AgentSummary, 'guid' | 'workspace' | 'subscription' | 'usage'>): string;
651
823
  /** Advice for a read, which cannot tell whether a start came first: a stopped agent gets what holds now. */
652
- export declare function readStatusAdvice(agent: Pick<AgentSummary, 'guid' | 'workspace' | 'status' | 'subscription' | 'credits'>, plainMember?: boolean): string;
653
- export {};
824
+ export declare function readStatusAdvice(agent: Pick<AgentSummary, 'guid' | 'workspace' | 'status' | 'subscription' | 'usage'>, plainMember?: boolean): string;
654
825
  //# sourceMappingURL=user-agent.d.ts.map