@wiro-ai/wiro-mcp 1.3.3 → 1.4.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 (270) hide show
  1. package/README.md +173 -16
  2. package/dist/client.d.ts +10 -0
  3. package/dist/client.d.ts.map +1 -1
  4. package/dist/client.js +39 -20
  5. package/dist/client.js.map +1 -1
  6. package/dist/index.js +4 -2
  7. package/dist/index.js.map +1 -1
  8. package/dist/instructions.d.ts +2 -0
  9. package/dist/instructions.d.ts.map +1 -0
  10. package/dist/instructions.js +25 -0
  11. package/dist/instructions.js.map +1 -0
  12. package/dist/playbooks.d.ts +8 -0
  13. package/dist/playbooks.d.ts.map +1 -0
  14. package/dist/playbooks.js +665 -0
  15. package/dist/playbooks.js.map +1 -0
  16. package/dist/prompts.d.ts +4 -0
  17. package/dist/prompts.d.ts.map +1 -0
  18. package/dist/prompts.js +133 -0
  19. package/dist/prompts.js.map +1 -0
  20. package/dist/server.d.ts +9 -2
  21. package/dist/server.d.ts.map +1 -1
  22. package/dist/server.js +9 -3
  23. package/dist/server.js.map +1 -1
  24. package/dist/tools/apply-agent-skills.d.ts +4 -0
  25. package/dist/tools/apply-agent-skills.d.ts.map +1 -0
  26. package/dist/tools/apply-agent-skills.js +545 -0
  27. package/dist/tools/apply-agent-skills.js.map +1 -0
  28. package/dist/tools/cancel-agent-message.d.ts +4 -0
  29. package/dist/tools/cancel-agent-message.d.ts.map +1 -0
  30. package/dist/tools/cancel-agent-message.js +126 -0
  31. package/dist/tools/cancel-agent-message.js.map +1 -0
  32. package/dist/tools/cancel-task.js +3 -3
  33. package/dist/tools/cancel-task.js.map +1 -1
  34. package/dist/tools/clone-workflow.d.ts +4 -0
  35. package/dist/tools/clone-workflow.d.ts.map +1 -0
  36. package/dist/tools/clone-workflow.js +83 -0
  37. package/dist/tools/clone-workflow.js.map +1 -0
  38. package/dist/tools/connect-agent-oauth.d.ts +4 -0
  39. package/dist/tools/connect-agent-oauth.d.ts.map +1 -0
  40. package/dist/tools/connect-agent-oauth.js +508 -0
  41. package/dist/tools/connect-agent-oauth.js.map +1 -0
  42. package/dist/tools/control-agent.d.ts +4 -0
  43. package/dist/tools/control-agent.d.ts.map +1 -0
  44. package/dist/tools/control-agent.js +274 -0
  45. package/dist/tools/control-agent.js.map +1 -0
  46. package/dist/tools/create-workflow.d.ts +100 -0
  47. package/dist/tools/create-workflow.d.ts.map +1 -0
  48. package/dist/tools/create-workflow.js +103 -0
  49. package/dist/tools/create-workflow.js.map +1 -0
  50. package/dist/tools/delete-agent-session.d.ts +6 -0
  51. package/dist/tools/delete-agent-session.d.ts.map +1 -0
  52. package/dist/tools/delete-agent-session.js +134 -0
  53. package/dist/tools/delete-agent-session.js.map +1 -0
  54. package/dist/tools/delete-agent.d.ts +4 -0
  55. package/dist/tools/delete-agent.d.ts.map +1 -0
  56. package/dist/tools/delete-agent.js +144 -0
  57. package/dist/tools/delete-agent.js.map +1 -0
  58. package/dist/tools/delete-workflow.d.ts +4 -0
  59. package/dist/tools/delete-workflow.d.ts.map +1 -0
  60. package/dist/tools/delete-workflow.js +77 -0
  61. package/dist/tools/delete-workflow.js.map +1 -0
  62. package/dist/tools/deploy-agent.d.ts +4 -0
  63. package/dist/tools/deploy-agent.d.ts.map +1 -0
  64. package/dist/tools/deploy-agent.js +455 -0
  65. package/dist/tools/deploy-agent.js.map +1 -0
  66. package/dist/tools/disconnect-agent-oauth.d.ts +4 -0
  67. package/dist/tools/disconnect-agent-oauth.d.ts.map +1 -0
  68. package/dist/tools/disconnect-agent-oauth.js +118 -0
  69. package/dist/tools/disconnect-agent-oauth.js.map +1 -0
  70. package/dist/tools/get-account.d.ts +4 -0
  71. package/dist/tools/get-account.d.ts.map +1 -0
  72. package/dist/tools/get-account.js +110 -0
  73. package/dist/tools/get-account.js.map +1 -0
  74. package/dist/tools/get-agent-activity.d.ts +4 -0
  75. package/dist/tools/get-agent-activity.d.ts.map +1 -0
  76. package/dist/tools/get-agent-activity.js +383 -0
  77. package/dist/tools/get-agent-activity.js.map +1 -0
  78. package/dist/tools/get-agent-conversation.d.ts +4 -0
  79. package/dist/tools/get-agent-conversation.d.ts.map +1 -0
  80. package/dist/tools/get-agent-conversation.js +224 -0
  81. package/dist/tools/get-agent-conversation.js.map +1 -0
  82. package/dist/tools/get-agent-message.d.ts +4 -0
  83. package/dist/tools/get-agent-message.d.ts.map +1 -0
  84. package/dist/tools/get-agent-message.js +68 -0
  85. package/dist/tools/get-agent-message.js.map +1 -0
  86. package/dist/tools/get-agent-template.d.ts +4 -0
  87. package/dist/tools/get-agent-template.d.ts.map +1 -0
  88. package/dist/tools/get-agent-template.js +107 -0
  89. package/dist/tools/get-agent-template.js.map +1 -0
  90. package/dist/tools/get-model-schema.d.ts +5 -1
  91. package/dist/tools/get-model-schema.d.ts.map +1 -1
  92. package/dist/tools/get-model-schema.js +136 -8
  93. package/dist/tools/get-model-schema.js.map +1 -1
  94. package/dist/tools/get-my-agent.d.ts +4 -0
  95. package/dist/tools/get-my-agent.d.ts.map +1 -0
  96. package/dist/tools/get-my-agent.js +78 -0
  97. package/dist/tools/get-my-agent.js.map +1 -0
  98. package/dist/tools/get-playbook.d.ts +3 -0
  99. package/dist/tools/get-playbook.d.ts.map +1 -0
  100. package/dist/tools/get-playbook.js +50 -0
  101. package/dist/tools/get-playbook.js.map +1 -0
  102. package/dist/tools/get-task-price.d.ts.map +1 -1
  103. package/dist/tools/get-task-price.js +42 -15
  104. package/dist/tools/get-task-price.js.map +1 -1
  105. package/dist/tools/get-task.d.ts.map +1 -1
  106. package/dist/tools/get-task.js +4 -3
  107. package/dist/tools/get-task.js.map +1 -1
  108. package/dist/tools/get-workflow.d.ts +9 -0
  109. package/dist/tools/get-workflow.d.ts.map +1 -0
  110. package/dist/tools/get-workflow.js +99 -0
  111. package/dist/tools/get-workflow.js.map +1 -0
  112. package/dist/tools/index.d.ts +62 -2
  113. package/dist/tools/index.d.ts.map +1 -1
  114. package/dist/tools/index.js +127 -14
  115. package/dist/tools/index.js.map +1 -1
  116. package/dist/tools/kill-task.d.ts.map +1 -1
  117. package/dist/tools/kill-task.js +10 -6
  118. package/dist/tools/kill-task.js.map +1 -1
  119. package/dist/tools/list-agent-skills.d.ts +4 -0
  120. package/dist/tools/list-agent-skills.d.ts.map +1 -0
  121. package/dist/tools/list-agent-skills.js +242 -0
  122. package/dist/tools/list-agent-skills.js.map +1 -0
  123. package/dist/tools/list-agent-templates.d.ts +4 -0
  124. package/dist/tools/list-agent-templates.d.ts.map +1 -0
  125. package/dist/tools/list-agent-templates.js +110 -0
  126. package/dist/tools/list-agent-templates.js.map +1 -0
  127. package/dist/tools/list-my-agents.d.ts +4 -0
  128. package/dist/tools/list-my-agents.d.ts.map +1 -0
  129. package/dist/tools/list-my-agents.js +90 -0
  130. package/dist/tools/list-my-agents.js.map +1 -0
  131. package/dist/tools/list-studio-results.d.ts +4 -0
  132. package/dist/tools/list-studio-results.d.ts.map +1 -0
  133. package/dist/tools/list-studio-results.js +95 -0
  134. package/dist/tools/list-studio-results.js.map +1 -0
  135. package/dist/tools/list-tasks.d.ts.map +1 -1
  136. package/dist/tools/list-tasks.js +7 -5
  137. package/dist/tools/list-tasks.js.map +1 -1
  138. package/dist/tools/list-workflow-runs.d.ts +4 -0
  139. package/dist/tools/list-workflow-runs.d.ts.map +1 -0
  140. package/dist/tools/list-workflow-runs.js +110 -0
  141. package/dist/tools/list-workflow-runs.js.map +1 -0
  142. package/dist/tools/list-workflows.d.ts +4 -0
  143. package/dist/tools/list-workflows.d.ts.map +1 -0
  144. package/dist/tools/list-workflows.js +143 -0
  145. package/dist/tools/list-workflows.js.map +1 -0
  146. package/dist/tools/manage-agent-billing.d.ts +4 -0
  147. package/dist/tools/manage-agent-billing.d.ts.map +1 -0
  148. package/dist/tools/manage-agent-billing.js +764 -0
  149. package/dist/tools/manage-agent-billing.js.map +1 -0
  150. package/dist/tools/manage-agent-custom-skill.d.ts +4 -0
  151. package/dist/tools/manage-agent-custom-skill.d.ts.map +1 -0
  152. package/dist/tools/manage-agent-custom-skill.js +537 -0
  153. package/dist/tools/manage-agent-custom-skill.js.map +1 -0
  154. package/dist/tools/recommend-model.d.ts.map +1 -1
  155. package/dist/tools/recommend-model.js +6 -5
  156. package/dist/tools/recommend-model.js.map +1 -1
  157. package/dist/tools/resume-workflow-run.d.ts +4 -0
  158. package/dist/tools/resume-workflow-run.d.ts.map +1 -0
  159. package/dist/tools/resume-workflow-run.js +69 -0
  160. package/dist/tools/resume-workflow-run.js.map +1 -0
  161. package/dist/tools/run-model.d.ts.map +1 -1
  162. package/dist/tools/run-model.js +39 -3
  163. package/dist/tools/run-model.js.map +1 -1
  164. package/dist/tools/run-workflow.d.ts +6 -0
  165. package/dist/tools/run-workflow.d.ts.map +1 -0
  166. package/dist/tools/run-workflow.js +132 -0
  167. package/dist/tools/run-workflow.js.map +1 -0
  168. package/dist/tools/save-workflow-from-agent.d.ts +4 -0
  169. package/dist/tools/save-workflow-from-agent.d.ts.map +1 -0
  170. package/dist/tools/save-workflow-from-agent.js +283 -0
  171. package/dist/tools/save-workflow-from-agent.js.map +1 -0
  172. package/dist/tools/schemas.d.ts +62 -12
  173. package/dist/tools/schemas.d.ts.map +1 -1
  174. package/dist/tools/schemas.js +17 -3
  175. package/dist/tools/schemas.js.map +1 -1
  176. package/dist/tools/search-models.js +6 -6
  177. package/dist/tools/search-models.js.map +1 -1
  178. package/dist/tools/send-agent-message.d.ts +4 -0
  179. package/dist/tools/send-agent-message.d.ts.map +1 -0
  180. package/dist/tools/send-agent-message.js +156 -0
  181. package/dist/tools/send-agent-message.js.map +1 -0
  182. package/dist/tools/set-agent-credentials.d.ts +4 -0
  183. package/dist/tools/set-agent-credentials.d.ts.map +1 -0
  184. package/dist/tools/set-agent-credentials.js +529 -0
  185. package/dist/tools/set-agent-credentials.js.map +1 -0
  186. package/dist/tools/update-agent.d.ts +4 -0
  187. package/dist/tools/update-agent.d.ts.map +1 -0
  188. package/dist/tools/update-agent.js +178 -0
  189. package/dist/tools/update-agent.js.map +1 -0
  190. package/dist/tools/update-workflow.d.ts +201 -0
  191. package/dist/tools/update-workflow.d.ts.map +1 -0
  192. package/dist/tools/update-workflow.js +168 -0
  193. package/dist/tools/update-workflow.js.map +1 -0
  194. package/dist/tools/upload-file.d.ts.map +1 -1
  195. package/dist/tools/upload-file.js +4 -3
  196. package/dist/tools/upload-file.js.map +1 -1
  197. package/dist/tools/wait-for-workflow-run.d.ts +259 -0
  198. package/dist/tools/wait-for-workflow-run.d.ts.map +1 -0
  199. package/dist/tools/wait-for-workflow-run.js +190 -0
  200. package/dist/tools/wait-for-workflow-run.js.map +1 -0
  201. package/dist/types.d.ts +22 -4
  202. package/dist/types.d.ts.map +1 -1
  203. package/dist/types.js.map +1 -1
  204. package/dist/utils/agent-catalog.d.ts +1256 -0
  205. package/dist/utils/agent-catalog.d.ts.map +1 -0
  206. package/dist/utils/agent-catalog.js +388 -0
  207. package/dist/utils/agent-catalog.js.map +1 -0
  208. package/dist/utils/agent-config.d.ts +441 -0
  209. package/dist/utils/agent-config.d.ts.map +1 -0
  210. package/dist/utils/agent-config.js +1667 -0
  211. package/dist/utils/agent-config.js.map +1 -0
  212. package/dist/utils/agent-message.d.ts +115 -0
  213. package/dist/utils/agent-message.d.ts.map +1 -0
  214. package/dist/utils/agent-message.js +246 -0
  215. package/dist/utils/agent-message.js.map +1 -0
  216. package/dist/utils/agent-targets.d.ts +76 -0
  217. package/dist/utils/agent-targets.d.ts.map +1 -0
  218. package/dist/utils/agent-targets.js +408 -0
  219. package/dist/utils/agent-targets.js.map +1 -0
  220. package/dist/utils/agent-turns.d.ts +354 -0
  221. package/dist/utils/agent-turns.d.ts.map +1 -0
  222. package/dist/utils/agent-turns.js +623 -0
  223. package/dist/utils/agent-turns.js.map +1 -0
  224. package/dist/utils/api.d.ts +40 -0
  225. package/dist/utils/api.d.ts.map +1 -0
  226. package/dist/utils/api.js +111 -0
  227. package/dist/utils/api.js.map +1 -0
  228. package/dist/utils/format.d.ts +42 -1
  229. package/dist/utils/format.d.ts.map +1 -1
  230. package/dist/utils/format.js +173 -14
  231. package/dist/utils/format.js.map +1 -1
  232. package/dist/utils/media.d.ts +28 -0
  233. package/dist/utils/media.d.ts.map +1 -0
  234. package/dist/utils/media.js +65 -0
  235. package/dist/utils/media.js.map +1 -0
  236. package/dist/utils/poll.d.ts +39 -0
  237. package/dist/utils/poll.d.ts.map +1 -0
  238. package/dist/utils/poll.js +111 -0
  239. package/dist/utils/poll.js.map +1 -0
  240. package/dist/utils/remote-file.js +2 -2
  241. package/dist/utils/remote-file.js.map +1 -1
  242. package/dist/utils/structured.d.ts +2 -0
  243. package/dist/utils/structured.d.ts.map +1 -1
  244. package/dist/utils/structured.js +10 -10
  245. package/dist/utils/structured.js.map +1 -1
  246. package/dist/utils/studio-runs.d.ts +87 -0
  247. package/dist/utils/studio-runs.d.ts.map +1 -0
  248. package/dist/utils/studio-runs.js +167 -0
  249. package/dist/utils/studio-runs.js.map +1 -0
  250. package/dist/utils/user-agent.d.ts +1140 -0
  251. package/dist/utils/user-agent.d.ts.map +1 -0
  252. package/dist/utils/user-agent.js +802 -0
  253. package/dist/utils/user-agent.js.map +1 -0
  254. package/dist/utils/workflow-agent.d.ts +151 -0
  255. package/dist/utils/workflow-agent.d.ts.map +1 -0
  256. package/dist/utils/workflow-agent.js +292 -0
  257. package/dist/utils/workflow-agent.js.map +1 -0
  258. package/dist/utils/workflow-artifacts.d.ts +160 -0
  259. package/dist/utils/workflow-artifacts.d.ts.map +1 -0
  260. package/dist/utils/workflow-artifacts.js +801 -0
  261. package/dist/utils/workflow-artifacts.js.map +1 -0
  262. package/dist/utils/workflow-save.d.ts +123 -0
  263. package/dist/utils/workflow-save.d.ts.map +1 -0
  264. package/dist/utils/workflow-save.js +734 -0
  265. package/dist/utils/workflow-save.js.map +1 -0
  266. package/dist/utils/workflow.d.ts +559 -0
  267. package/dist/utils/workflow.d.ts.map +1 -0
  268. package/dist/utils/workflow.js +613 -0
  269. package/dist/utils/workflow.js.map +1 -0
  270. package/package.json +1 -1
@@ -0,0 +1,545 @@
1
+ import { z } from 'zod';
2
+ import { asString, errorResult, errorText, requireApiSuccess, toNumber, unixToIso, } from '../utils/api.js';
3
+ import { agentStatusLabel, agentStatusOf, checkSkillSet, credentialsNeededFor, describeSkillsApplyError, diffSkills, enabledSkillNames, estimateProratedUsd, formatUsd, isAgentRunning, loadSkillRegistry, newSkillChangeKey, parseSkillChangeKey, planBilling, planSkillChanges, readUserAgent, restartNote, skillChangeDigest, skillPriceTag, workspaceHint, } from '../utils/agent-config.js';
4
+ import { outcomeUnknown } from '../utils/user-agent.js';
5
+ import { DEFAULT_WAIT_SECONDS } from '../utils/poll.js';
6
+ import { nextActionSchema } from './schemas.js';
7
+ const pricingSchema = z.object({
8
+ currentMonthlyUsd: z.number().nullable(),
9
+ newMonthlyUsd: z.number().nullable(),
10
+ deltaMonthlyUsd: z.number().nullable(),
11
+ currentMonthlyCredits: z.number().nullable(),
12
+ newMonthlyCredits: z.number().nullable(),
13
+ deltaMonthlyCredits: z.number().nullable(),
14
+ });
15
+ const outputSchema = {
16
+ agentGuid: z.string(),
17
+ status: z.enum(['quote', 'applied', 'no_change', 'refused']),
18
+ idempotencyKey: z.string().optional(),
19
+ priceChanged: z.boolean().optional(),
20
+ changes: z.object({
21
+ enable: z.array(z.string()),
22
+ disable: z.array(z.string()),
23
+ addedDependencies: z.array(z.string()),
24
+ alreadySet: z.array(z.string()),
25
+ }),
26
+ tier: z.object({
27
+ current: z.string().nullable(),
28
+ next: z.string().nullable(),
29
+ }),
30
+ pricing: pricingSchema.optional(),
31
+ billing: z.object({
32
+ plan: z.enum(['prepaid', 'card', 'none']),
33
+ subscriptionStatus: z.string().nullable(),
34
+ wallet: z.enum(['team', 'personal']),
35
+ estimatedChargeNowUsd: z.number().nullable().optional(),
36
+ chargedNowUsd: z.number().nullable().optional(),
37
+ note: z.string(),
38
+ }),
39
+ enabledSkills: z.array(z.string()).optional(),
40
+ credentialsNeeded: z.array(z.object({
41
+ skill: z.string(),
42
+ credentials: z.array(z.string()),
43
+ })),
44
+ agentStatus: z.string(),
45
+ restart: z.string(),
46
+ error: z.object({
47
+ code: z.number().nullable(),
48
+ message: z.string(),
49
+ deps: z.array(z.object({ skill: z.string(), requires: z.string() })).optional(),
50
+ conflicts: z.array(z.object({ a: z.string(), b: z.string() })).optional(),
51
+ requiredUsd: z.number().nullable().optional(),
52
+ availableUsd: z.number().nullable().optional(),
53
+ }).optional(),
54
+ nextAction: nextActionSchema.optional(),
55
+ };
56
+ const UNCHANGED_RESTART = 'Nothing changed, so the agent does not restart.';
57
+ // A credit for skills turned off goes to the wallet with an end date: it can be
58
+ // spent until the plan's current period ends.
59
+ const CREDIT_SPEND_BY = 'It can be spent until this period ends.';
60
+ function difference(next, current) {
61
+ return next === null || current === null ? null : Math.round((next - current) * 100) / 100;
62
+ }
63
+ /**
64
+ * The wallet of the agent's workspace, which Wiro charges or credits for a
65
+ * skill change: the team's for a team agent, else its owner's personal wallet.
66
+ * Only the owner can change a personal agent's skills, so that wallet is the
67
+ * caller's own.
68
+ */
69
+ function walletName(billing) {
70
+ return billing.wallet === 'team' ? 'the team wallet' : 'your personal wallet';
71
+ }
72
+ /** For a cancelled plan, a skill change only covers the days left: nothing renews at the new price. */
73
+ function cancelledNote(billing) {
74
+ const end = billing.periodEnd !== null ? unixToIso(billing.periodEnd) : undefined;
75
+ if (billing.plan === 'card') {
76
+ return `The plan is set to end${end ? ` after ${end}` : ' with this period'} and does not renew.`;
77
+ }
78
+ return `The plan is cancelled and ends about a day after ${end ?? 'the end of this period'}, so this covers only the days left and the new price is not renewed. Undo the cancellation with manage_agent_billing (renew) to keep the plan.`;
79
+ }
80
+ function quoteBillingNote(billing, delta, estimate, nextPrice) {
81
+ const after = billing.cancelAtPeriodEnd
82
+ ? ` ${cancelledNote(billing)}`
83
+ : nextPrice !== null ? ` The plan then renews at ${formatUsd(nextPrice)} a month.` : '';
84
+ if (billing.plan === 'none') {
85
+ return 'The agent has no subscription yet, so nothing is charged now. The new monthly price applies once it is subscribed.';
86
+ }
87
+ if (billing.status !== 'active') {
88
+ return `The subscription is ${billing.status ?? 'not active'}. Skills can only change on an active subscription, so renew it with manage_agent_billing first.`;
89
+ }
90
+ if (delta === null) {
91
+ return billing.plan === 'prepaid'
92
+ ? `The difference for the rest of this period is taken from, or credited to, ${walletName(billing)} when the change is applied. A credit can be spent until this period ends.${after}`
93
+ : `Any prorated difference appears on the next invoice.${after}`;
94
+ }
95
+ if (Math.abs(delta) < 0.005)
96
+ return 'The monthly price does not change, so nothing is charged.';
97
+ if (billing.plan === 'card') {
98
+ return `Nothing is charged now. The card subscription is updated and the prorated difference appears on the next invoice.${after}`;
99
+ }
100
+ const days = billing.daysRemaining !== null ? ` for the ${billing.daysRemaining} days left in this period` : ' for the rest of this period';
101
+ if (delta > 0) {
102
+ return `About ${formatUsd(estimate ?? 0)} is taken from ${walletName(billing)} now${days}.${after}`;
103
+ }
104
+ return `About ${formatUsd(Math.abs(estimate ?? 0))} is credited back to ${walletName(billing)} now${days}. ${CREDIT_SPEND_BY}${after}`;
105
+ }
106
+ function chargeNote(billing, body) {
107
+ const charged = toNumber(body.prepaidWalletDelta);
108
+ const cancelled = billing.cancelAtPeriodEnd && billing.status === 'active' ? ` ${cancelledNote(billing)}` : '';
109
+ if (charged !== null && charged > 0) {
110
+ return { charged, note: `${formatUsd(charged)} was taken from ${walletName(billing)} for the rest of this period.${cancelled}` };
111
+ }
112
+ if (charged !== null && charged < 0) {
113
+ return { charged, note: `${formatUsd(Math.abs(charged))} was credited to ${walletName(billing)}. ${CREDIT_SPEND_BY}${cancelled}` };
114
+ }
115
+ if (body.stripeProrationApplied === true) {
116
+ return { charged: null, note: `The card subscription was updated; any prorated difference appears on the next invoice.${cancelled}` };
117
+ }
118
+ if (billing.plan === 'none') {
119
+ return { charged: null, note: 'Nothing was charged: the agent has no subscription yet.' };
120
+ }
121
+ return { charged: null, note: `Nothing was charged now.${cancelled}` };
122
+ }
123
+ /** What the change charged, then any notes Wiro adds about its billing, as Wiro wrote them. */
124
+ function appliedBillingNote(billing, body) {
125
+ const result = chargeNote(billing, body);
126
+ const warnings = (Array.isArray(body.warnings) ? body.warnings : [])
127
+ .map(warning => asString(warning)?.trim())
128
+ .filter((warning) => Boolean(warning));
129
+ return warnings.length > 0 ? { ...result, note: [result.note, ...warnings].join(' ') } : result;
130
+ }
131
+ function listLine(label, names) {
132
+ return names.length > 0 ? `**${label}:** ${names.join(', ')}` : null;
133
+ }
134
+ /** Whether the agent's live skills and tier are what this change asked for; null when that cannot be read. */
135
+ async function changeHolds(client, agentGuid, requested, tier, signal) {
136
+ let live;
137
+ try {
138
+ live = await readUserAgent(client, agentGuid, signal);
139
+ }
140
+ catch {
141
+ return null;
142
+ }
143
+ const enabled = new Set(enabledSkillNames(live));
144
+ const skillsHold = Object.entries(requested).every(([name, on]) => enabled.has(name) === on);
145
+ return skillsHold && (!tier || asString(live.tier) === tier);
146
+ }
147
+ export function registerApplyAgentSkills(server, client) {
148
+ server.registerTool('apply_agent_skills', {
149
+ title: 'Change an agent\'s skills',
150
+ description: 'Turn registry skills on or off for a deployed agent, and optionally move it '
151
+ + 'from Starter to Pro, as one billed change. Skills set the agent\'s monthly price and monthly credits. '
152
+ + 'Steps: 1) call without confirm. The tool checks the names, adds the skills they '
153
+ + 'depend on, and returns the current and new monthly price, an estimate of what is '
154
+ + 'charged now and an idempotency_key. Nothing changes yet. 2) Show the price to the '
155
+ + 'user. 3) After they approve, call again with confirm: true and that idempotency_key. '
156
+ + 'The key is tied to the quoted prices: if the price changed since the quote, nothing '
157
+ + 'is applied and a new quote with a new key comes back. Reusing the key after a timeout '
158
+ + 'is safe, the change is applied once. Billing: on a prepaid plan the monthly difference '
159
+ + 'for the days left in the period is taken from the wallet at once, or credited to it '
160
+ + 'when the price drops, and that credit can be spent until the period ends; on a card '
161
+ + 'plan it is added to the next invoice. A running agent '
162
+ + 'restarts once to load the skills. Newly enabled skills may still need credentials '
163
+ + '(set_agent_credentials, connect_agent_oauth) and do not create scheduled tasks '
164
+ + '(manage_agent_custom_skill does). Find skill names with list_agent_skills and the '
165
+ + 'agent\'s current skills with get_my_agent. The agents playbook (get_playbook) has the '
166
+ + 'full setup walkthrough.',
167
+ inputSchema: {
168
+ agent_guid: z.string().min(1).describe('The deployed agent\'s guid, from list_my_agents.'),
169
+ skills: z.record(z.string(), z.boolean())
170
+ .describe('Skills to change, as name: true to turn on or name: false to turn off, for example {"int-instagram-post": true}. Registry names only (list_agent_skills). Custom skills and scheduled tasks (cs-...) are managed with manage_agent_custom_skill; channels such as Telegram turn on through set_agent_credentials.'),
171
+ tier: z.enum(['starter', 'pro']).optional()
172
+ .describe('Optional: also move from Starter to Pro in this billed change. To upgrade without a skill change, use manage_agent_billing (upgrade_to_pro).'),
173
+ add_dependencies: z.boolean().default(true)
174
+ .describe('Also turn on the skills that the enabled skills depend on (default true). Without them the change is refused.'),
175
+ confirm: z.boolean().default(false)
176
+ .describe('false (default) only returns the quote. true applies the change and charges it; it needs the idempotency_key from the quote.'),
177
+ idempotency_key: z.string().min(8).max(128).optional()
178
+ .describe('With confirm: true, the key from the quote the user approved. It ties the approval to the quoted prices, and repeating the call with it after a timeout never applies the change twice. Omit it to get a quote.'),
179
+ },
180
+ outputSchema,
181
+ annotations: {
182
+ readOnlyHint: false,
183
+ destructiveHint: false,
184
+ idempotentHint: true,
185
+ openWorldHint: true,
186
+ },
187
+ }, async ({ agent_guid, skills, tier, add_dependencies, confirm, idempotency_key }, extra) => {
188
+ try {
189
+ if (Object.keys(skills).length === 0 && !tier) {
190
+ return errorResult(new Error('Nothing to change: pass at least one skill or a tier.'));
191
+ }
192
+ const registry = await loadSkillRegistry(client, extra.signal);
193
+ const plan = planSkillChanges(skills, registry, add_dependencies);
194
+ if (plan.errors.length > 0) {
195
+ return errorResult(new Error(`The change was not sent:\n\n- ${plan.errors.join('\n- ')}`));
196
+ }
197
+ const row = await readUserAgent(client, agent_guid, extra.signal);
198
+ const status = agentStatusOf(row);
199
+ const currentTier = asString(row.tier) ?? null;
200
+ if (tier === 'starter' && currentTier === 'pro') {
201
+ return errorResult(new Error('A Pro plan cannot be moved back to Starter here. Cancel the plan with manage_agent_billing and subscribe again at Starter once it ends.'));
202
+ }
203
+ const tierChange = tier && tier !== currentTier ? tier : undefined;
204
+ const digest = skillChangeDigest(agent_guid, plan.requested, tier);
205
+ const givenKey = idempotency_key ? parseSkillChangeKey(idempotency_key) : null;
206
+ if (givenKey && givenKey.digest !== digest) {
207
+ return errorResult(new Error('This idempotency_key belongs to a different skill change. Omit idempotency_key to start a new change, or repeat the exact change it was issued for.'));
208
+ }
209
+ const enabledNow = enabledSkillNames(row);
210
+ const diff = diffSkills(plan.requested, enabledNow);
211
+ const check = checkSkillSet(enabledNow, diff.changes, registry);
212
+ if (check.deps.length > 0 || check.conflicts.length > 0) {
213
+ const problems = [
214
+ ...check.deps.map(dep => (diff.disable.includes(dep.requires)
215
+ ? `${dep.skill} needs ${dep.requires}. Keep ${dep.requires} on, or also turn off ${dep.skill}.`
216
+ : `${dep.skill} needs ${dep.requires}, which is off. Turn ${dep.requires} on in the same change.`)),
217
+ ...check.conflicts.map(pair => `${pair.a} and ${pair.b} cannot be on together. Keep only one.`),
218
+ ];
219
+ return errorResult(new Error(`The change was not sent:\n\n- ${[...new Set(problems)].join('\n- ')}`));
220
+ }
221
+ const billing = planBilling(row);
222
+ const running = isAgentRunning(status);
223
+ const changes = {
224
+ enable: diff.enable,
225
+ disable: diff.disable,
226
+ addedDependencies: plan.addedDependencies.filter(name => diff.enable.includes(name)),
227
+ alreadySet: diff.alreadySet.filter(name => !plan.addedDependencies.includes(name)),
228
+ };
229
+ const credentialsNeeded = credentialsNeededFor(diff.enable, registry, row);
230
+ const nothingToDo = Object.keys(diff.changes).length === 0 && !tierChange;
231
+ const base = {
232
+ agentGuid: agent_guid,
233
+ changes,
234
+ tier: { current: currentTier, next: tierChange ?? currentTier },
235
+ credentialsNeeded,
236
+ agentStatus: agentStatusLabel(status),
237
+ };
238
+ const billingBase = { plan: billing.plan, subscriptionStatus: billing.status, wallet: billing.wallet };
239
+ // An empty change cannot charge anything. With a key issued for this
240
+ // same change, Wiro returns the saved result of an earlier call with
241
+ // it, which is how a retry after a timeout learns what happened.
242
+ if (nothingToDo && !(confirm && givenKey)) {
243
+ return {
244
+ content: [{ type: 'text', text: `## No change needed\n\nThe skills${tier ? ' and tier' : ''} are already as requested on agent \`${agent_guid}\`.` }],
245
+ structuredContent: {
246
+ ...base,
247
+ status: 'no_change',
248
+ billing: { ...billingBase, note: 'Nothing is charged.' },
249
+ restart: UNCHANGED_RESTART,
250
+ },
251
+ };
252
+ }
253
+ const currentPrice = toNumber(row.monthlypriceusd);
254
+ const currentCredits = toNumber(row.monthlycredits);
255
+ const key = idempotency_key?.trim() ?? '';
256
+ if (!nothingToDo) {
257
+ const preview = requireApiSuccess(await client.post('/UserAgent/PricingPreview', {
258
+ useragentguid: agent_guid,
259
+ skillOverrides: diff.changes,
260
+ ...(tierChange ? { tier: tierChange } : {}),
261
+ }, extra.signal), 'Could not price this change.');
262
+ const newPrice = toNumber(preview.totalPriceUsd);
263
+ if (newPrice === null) {
264
+ throw new Error('Wiro did not return the new monthly price of this change, so it cannot be quoted. Try again later.');
265
+ }
266
+ const priceTag = skillPriceTag(currentPrice, newPrice);
267
+ const approved = confirm && givenKey !== null && givenKey.priceTag === priceTag;
268
+ if (!approved) {
269
+ const newCredits = toNumber(preview.totalMonthlyCredits);
270
+ const delta = difference(newPrice, currentPrice);
271
+ const estimate = billing.plan === 'prepaid' && billing.status === 'active' && delta !== null
272
+ ? estimateProratedUsd(delta, billing.periodEnd)
273
+ : null;
274
+ const note = quoteBillingNote(billing, delta, estimate, newPrice);
275
+ const quoteKey = givenKey?.priceTag === priceTag ? key : newSkillChangeKey(digest, priceTag);
276
+ const priceChanged = confirm && givenKey !== null;
277
+ const blocked = billing.plan !== 'none' && billing.status !== 'active';
278
+ const restart = restartNote(status, 'new skills');
279
+ const pricing = {
280
+ currentMonthlyUsd: currentPrice,
281
+ newMonthlyUsd: newPrice,
282
+ deltaMonthlyUsd: delta,
283
+ currentMonthlyCredits: currentCredits,
284
+ newMonthlyCredits: newCredits,
285
+ deltaMonthlyCredits: difference(newCredits, currentCredits),
286
+ };
287
+ const nextAction = blocked
288
+ ? {
289
+ tool: 'manage_agent_billing',
290
+ arguments: { agent_guid, action: 'renew' },
291
+ reason: 'The subscription must be active before skills can change.',
292
+ }
293
+ : {
294
+ tool: 'apply_agent_skills',
295
+ arguments: {
296
+ agent_guid,
297
+ skills,
298
+ ...(tier ? { tier } : {}),
299
+ add_dependencies,
300
+ confirm: true,
301
+ idempotency_key: quoteKey,
302
+ },
303
+ reason: delta === null || delta > 0
304
+ ? 'Ask the user to approve this charge first.'
305
+ : 'Ask the user to confirm this change first.',
306
+ };
307
+ const lead = !confirm
308
+ ? null
309
+ : priceChanged
310
+ ? 'The price changed since the quote, so nothing was applied or charged. This is the new quote with a new idempotency_key; show it to the user and ask again.'
311
+ : 'Nothing was applied: confirming needs the idempotency_key of a quote, which ties the approval to the price. This is the quote; show it to the user first.';
312
+ const lines = [
313
+ '## Skill change quote',
314
+ '',
315
+ ...(lead ? [lead, ''] : []),
316
+ `**Agent:** \`${agent_guid}\` (${agentStatusLabel(status)})`,
317
+ listLine('Turn on', changes.enable),
318
+ listLine('Added because other skills need them', changes.addedDependencies),
319
+ listLine('Turn off', changes.disable),
320
+ listLine('Already as requested', changes.alreadySet),
321
+ tierChange ? `**Plan:** ${currentTier ?? 'unknown'} to ${tierChange}` : null,
322
+ `**Monthly price:** ${currentPrice !== null ? formatUsd(currentPrice) : 'unknown'} now, ${formatUsd(newPrice)} after the change${delta !== null ? ` (${delta >= 0 ? '+' : ''}${formatUsd(delta)})` : ''}`,
323
+ newCredits !== null ? `**Monthly credits:** ${currentCredits ?? 'unknown'} now, ${newCredits} after the change` : null,
324
+ `**Billing:** ${note}`,
325
+ `**Restart:** ${restart}`,
326
+ credentialsNeeded.length > 0
327
+ ? `**Credentials the new skills need:** ${credentialsNeeded.map(entry => `${entry.skill} (${entry.credentials.join(', ')})`).join('; ')}`
328
+ : null,
329
+ '',
330
+ blocked
331
+ ? 'Renew the subscription with manage_agent_billing before applying this change.'
332
+ : `Nothing has changed yet. After the user approves, call apply_agent_skills again with confirm: true and idempotency_key \`${quoteKey}\`.`,
333
+ ].filter((line) => line !== null);
334
+ return {
335
+ content: [{ type: 'text', text: lines.join('\n') }],
336
+ structuredContent: {
337
+ ...base,
338
+ status: 'quote',
339
+ idempotencyKey: quoteKey,
340
+ ...(priceChanged ? { priceChanged: true } : {}),
341
+ pricing,
342
+ billing: { ...billingBase, estimatedChargeNowUsd: estimate, note },
343
+ ...(Array.isArray(preview.enabledSkills) ? { enabledSkills: preview.enabledSkills.map(String) } : {}),
344
+ restart,
345
+ nextAction,
346
+ },
347
+ };
348
+ }
349
+ }
350
+ const sentEmpty = nothingToDo;
351
+ let applied;
352
+ try {
353
+ applied = requireApiSuccess(await client.post('/UserAgent/SkillsApply', {
354
+ useragentguid: agent_guid,
355
+ skills: diff.changes,
356
+ idempotencyKey: key,
357
+ ...(tierChange ? { tier: tierChange } : {}),
358
+ }, extra.signal), 'The skill change was refused.');
359
+ }
360
+ catch (error) {
361
+ if (extra.signal.aborted)
362
+ throw error;
363
+ if (!outcomeUnknown(error)) {
364
+ const failure = describeSkillsApplyError(error, billing.plan);
365
+ const text = [
366
+ '## Skill change not applied',
367
+ '',
368
+ failure.message,
369
+ failure.guidance ? `\n${failure.guidance}` : '',
370
+ failure.retrySameKey ? `\nidempotency_key: \`${key}\`` : '',
371
+ ].join('\n').trim();
372
+ return {
373
+ content: [{ type: 'text', text }],
374
+ structuredContent: {
375
+ ...base,
376
+ status: 'refused',
377
+ idempotencyKey: key,
378
+ billing: { ...billingBase, note: failure.guidance || failure.message },
379
+ restart: UNCHANGED_RESTART,
380
+ error: {
381
+ code: failure.code,
382
+ message: failure.message,
383
+ ...(failure.deps ? { deps: failure.deps } : {}),
384
+ ...(failure.conflicts ? { conflicts: failure.conflicts } : {}),
385
+ ...(failure.requiredUsd !== undefined ? { requiredUsd: failure.requiredUsd } : {}),
386
+ ...(failure.availableUsd !== undefined ? { availableUsd: failure.availableUsd } : {}),
387
+ },
388
+ },
389
+ isError: true,
390
+ };
391
+ }
392
+ const message = errorText(error);
393
+ if (sentEmpty) {
394
+ const note = `The agent's skills are already as requested. Wiro answered with an error (${message}) when asked for the result of the earlier call with this idempotency_key, so what that call charged is not shown here; get_agent_activity with kind usage shows it.`;
395
+ return {
396
+ content: [{ type: 'text', text: `## No change needed\n\n${note}` }],
397
+ structuredContent: {
398
+ ...base,
399
+ status: 'no_change',
400
+ idempotencyKey: key,
401
+ billing: { ...billingBase, note },
402
+ restart: UNCHANGED_RESTART,
403
+ },
404
+ };
405
+ }
406
+ // The outcome is open: the change may have been saved and charged,
407
+ // so the agent is read again before reporting anything.
408
+ const holds = await changeHolds(client, agent_guid, plan.requested, tierChange, extra.signal);
409
+ if (holds === true) {
410
+ const note = `Wiro answered with an error (${message}), but the agent's skills are now as requested, so the change was saved. ${billing.plan === 'prepaid' && billing.status === 'active' ? `The difference for the rest of this period was probably taken from, or credited to, ${walletName(billing)}, and a credit can be spent until this period ends; get_agent_activity with kind usage and get_account show it.` : 'Any price difference follows the plan\'s usual billing.'} Do not repeat the change.`;
411
+ return {
412
+ content: [{ type: 'text', text: [
413
+ '## Skills updated (with an error report)',
414
+ '',
415
+ `**Agent:** \`${agent_guid}\``,
416
+ listLine('Turned on', changes.enable),
417
+ listLine('Turned off', changes.disable),
418
+ `**Billing:** ${note}`,
419
+ `**Restart:** ${restartNote(status, 'new skills')}`,
420
+ ].filter((line) => line !== null).join('\n') }],
421
+ structuredContent: {
422
+ ...base,
423
+ status: 'applied',
424
+ idempotencyKey: key,
425
+ billing: { ...billingBase, chargedNowUsd: null, note },
426
+ restart: restartNote(status, 'new skills'),
427
+ },
428
+ };
429
+ }
430
+ const unverified = holds === null;
431
+ const note = unverified
432
+ ? `Wiro answered with an error (${message}), and the agent could not be read to check whether the change was saved. Check get_my_agent before trying again. Repeating this call with the same idempotency_key never applies the change twice.`
433
+ : `Wiro answered with an error (${message}) and the agent's skills are unchanged, so the change was not applied. Repeating this call with the same idempotency_key is safe.`;
434
+ return {
435
+ content: [{ type: 'text', text: `## Skill change ${unverified ? 'not confirmed' : 'not applied'}\n\n${note}\n\nidempotency_key: \`${key}\`` }],
436
+ structuredContent: {
437
+ ...base,
438
+ status: 'refused',
439
+ idempotencyKey: key,
440
+ billing: { ...billingBase, note },
441
+ restart: unverified ? 'The agent restarts if the change was saved.' : UNCHANGED_RESTART,
442
+ error: { code: null, message },
443
+ },
444
+ isError: true,
445
+ };
446
+ }
447
+ // A reused key gets the saved answer of the call that first used it,
448
+ // so the live agent is checked against this change.
449
+ const holds = await changeHolds(client, agent_guid, plan.requested, tierChange, extra.signal);
450
+ if (holds === false) {
451
+ const note = 'Wiro answered with the saved result of an earlier call that used this idempotency_key, and the agent\'s skills are not as this change asks, so this change was probably not applied by this call. Check get_my_agent; if the skills are still not as requested, call apply_agent_skills again without idempotency_key to get a new quote.';
452
+ return {
453
+ content: [{ type: 'text', text: `## Skill change not applied\n\n${note}` }],
454
+ structuredContent: {
455
+ ...base,
456
+ status: 'refused',
457
+ idempotencyKey: key,
458
+ billing: { ...billingBase, note },
459
+ restart: UNCHANGED_RESTART,
460
+ error: { code: null, message: note },
461
+ nextAction: {
462
+ tool: 'apply_agent_skills',
463
+ arguments: { agent_guid, skills, ...(tier ? { tier } : {}), add_dependencies },
464
+ reason: 'Get a new quote for this change.',
465
+ },
466
+ },
467
+ isError: true,
468
+ };
469
+ }
470
+ // An empty request that comes back as a real change is the saved
471
+ // result of the earlier call with this key, not a new charge.
472
+ const replayed = sentEmpty && !applied.noOp;
473
+ const serverPricing = applied.pricing ?? {};
474
+ const pricing = applied.noOp
475
+ ? undefined
476
+ : {
477
+ currentMonthlyUsd: toNumber(serverPricing.previousPriceUsd),
478
+ newMonthlyUsd: toNumber(serverPricing.newPriceUsd),
479
+ deltaMonthlyUsd: toNumber(serverPricing.deltaUsd),
480
+ currentMonthlyCredits: toNumber(serverPricing.previousMonthlyCredits),
481
+ newMonthlyCredits: toNumber(serverPricing.newMonthlyCredits),
482
+ deltaMonthlyCredits: toNumber(serverPricing.deltaCredits),
483
+ };
484
+ const charge = appliedBillingNote(billing, applied);
485
+ const billingNote = replayed
486
+ ? `This change was already applied by an earlier call with this idempotency_key, and nothing new was charged now. That call's billing: ${charge.note}`
487
+ : charge.note;
488
+ const restart = applied.noOp || replayed
489
+ ? UNCHANGED_RESTART
490
+ : restartNote(status, 'new skills');
491
+ const firstCredential = credentialsNeeded[0]?.credentials[0];
492
+ const nextAction = applied.noOp || replayed
493
+ ? undefined
494
+ : firstCredential
495
+ ? {
496
+ tool: 'set_agent_credentials',
497
+ arguments: { agent_guid, credential: firstCredential },
498
+ reason: `See what ${firstCredential} needs before asking the user for it.`,
499
+ }
500
+ : running
501
+ ? {
502
+ tool: 'get_my_agent',
503
+ arguments: { agent_guid, wait_seconds: DEFAULT_WAIT_SECONDS },
504
+ reason: 'Check that the agent is running again with the new skills.',
505
+ }
506
+ : undefined;
507
+ const lines = [
508
+ applied.noOp ? '## No change needed' : replayed ? '## Already applied' : '## Skills updated',
509
+ '',
510
+ `**Agent:** \`${agent_guid}\``,
511
+ listLine('Turned on', changes.enable),
512
+ listLine('Turned off', changes.disable),
513
+ applied.noOp || replayed ? listLine('Already as requested', changes.alreadySet) : null,
514
+ tierChange && !applied.noOp ? `**Plan:** now ${asString(applied.tier) ?? tierChange}` : null,
515
+ pricing?.newMonthlyUsd !== undefined && pricing.newMonthlyUsd !== null
516
+ ? `**Monthly price:** ${formatUsd(pricing.newMonthlyUsd)}${pricing.currentMonthlyUsd !== null ? ` (was ${formatUsd(pricing.currentMonthlyUsd)})` : ''}`
517
+ : null,
518
+ `**Billing:** ${billingNote}`,
519
+ `**Restart:** ${restart}`,
520
+ holds === null ? 'The agent could not be read afterwards to confirm the new skills; get_my_agent shows them.' : null,
521
+ credentialsNeeded.length > 0
522
+ ? `**Still needed:** credentials for ${credentialsNeeded.map(entry => `${entry.skill} (${entry.credentials.join(', ')})`).join('; ')}. Set them with set_agent_credentials or connect_agent_oauth.`
523
+ : null,
524
+ ].filter((line) => line !== null);
525
+ return {
526
+ content: [{ type: 'text', text: lines.join('\n') }],
527
+ structuredContent: {
528
+ ...base,
529
+ status: applied.noOp ? 'no_change' : 'applied',
530
+ idempotencyKey: key,
531
+ ...(pricing ? { pricing } : {}),
532
+ billing: { ...billingBase, chargedNowUsd: charge.charged, note: billingNote },
533
+ ...(Array.isArray(serverPricing.enabledSkills) ? { enabledSkills: serverPricing.enabledSkills.map(String) } : {}),
534
+ restart,
535
+ ...(nextAction ? { nextAction } : {}),
536
+ },
537
+ };
538
+ }
539
+ catch (error) {
540
+ const hint = error instanceof Error ? workspaceHint(error.message) : undefined;
541
+ return errorResult(hint && error instanceof Error ? new Error(`${error.message} ${hint}`) : error);
542
+ }
543
+ });
544
+ }
545
+ //# sourceMappingURL=apply-agent-skills.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apply-agent-skills.js","sourceRoot":"","sources":["../../src/tools/apply-agent-skills.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,QAAQ,EACR,WAAW,EACX,SAAS,EACT,iBAAiB,EACjB,QAAQ,EACR,SAAS,GAEV,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,oBAAoB,EACpB,wBAAwB,EACxB,UAAU,EACV,iBAAiB,EACjB,mBAAmB,EACnB,SAAS,EACT,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,WAAW,EACX,gBAAgB,EAChB,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,aA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AAI,EAAE,WAAW,EAAE;oBAC7E,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,aAAa,CAAC,aAAa,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;oBACjH,OAAO;oBACP,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;iBACtC;aACF,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,IAAI,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YAC/E,OAAO,WAAW,CAAC,IAAI,IAAI,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,GAAG,KAAK,CAAC,OAAO,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QACrG,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import type { WiroClient } from '../client.js';
3
+ export declare function registerCancelAgentMessage(server: McpServer, client: WiroClient): void;
4
+ //# sourceMappingURL=cancel-agent-message.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cancel-agent-message.d.ts","sourceRoot":"","sources":["../../src/tools/cancel-agent-message.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEzE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AA0C/C,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,GAAG,IAAI,CAwGtF"}