@wiro-ai/wiro-mcp 1.8.0 → 1.9.1

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 (83) hide show
  1. package/README.md +54 -7
  2. package/dist/instructions.js +4 -4
  3. package/dist/instructions.js.map +1 -1
  4. package/dist/playbooks.d.ts +1 -1
  5. package/dist/playbooks.d.ts.map +1 -1
  6. package/dist/playbooks.js +176 -6
  7. package/dist/playbooks.js.map +1 -1
  8. package/dist/tools/check-model-access.d.ts +4 -0
  9. package/dist/tools/check-model-access.d.ts.map +1 -0
  10. package/dist/tools/check-model-access.js +281 -0
  11. package/dist/tools/check-model-access.js.map +1 -0
  12. package/dist/tools/get-account.d.ts +5 -1
  13. package/dist/tools/get-account.d.ts.map +1 -1
  14. package/dist/tools/get-account.js +39 -4
  15. package/dist/tools/get-account.js.map +1 -1
  16. package/dist/tools/get-agent-conversation.d.ts.map +1 -1
  17. package/dist/tools/get-agent-conversation.js +3 -2
  18. package/dist/tools/get-agent-conversation.js.map +1 -1
  19. package/dist/tools/get-controls.d.ts +4 -0
  20. package/dist/tools/get-controls.d.ts.map +1 -0
  21. package/dist/tools/get-controls.js +365 -0
  22. package/dist/tools/get-controls.js.map +1 -0
  23. package/dist/tools/index.d.ts +6 -2
  24. package/dist/tools/index.d.ts.map +1 -1
  25. package/dist/tools/index.js +22 -8
  26. package/dist/tools/index.js.map +1 -1
  27. package/dist/tools/manage-model-access.d.ts +4 -0
  28. package/dist/tools/manage-model-access.d.ts.map +1 -0
  29. package/dist/tools/manage-model-access.js +816 -0
  30. package/dist/tools/manage-model-access.js.map +1 -0
  31. package/dist/tools/manage-spend-limit.d.ts +4 -0
  32. package/dist/tools/manage-spend-limit.d.ts.map +1 -0
  33. package/dist/tools/manage-spend-limit.js +535 -0
  34. package/dist/tools/manage-spend-limit.js.map +1 -0
  35. package/dist/tools/resume-workflow-run.d.ts +2 -1
  36. package/dist/tools/resume-workflow-run.d.ts.map +1 -1
  37. package/dist/tools/resume-workflow-run.js +4 -4
  38. package/dist/tools/resume-workflow-run.js.map +1 -1
  39. package/dist/tools/run-model.d.ts +2 -1
  40. package/dist/tools/run-model.d.ts.map +1 -1
  41. package/dist/tools/run-model.js +10 -9
  42. package/dist/tools/run-model.js.map +1 -1
  43. package/dist/tools/run-workflow.d.ts +2 -1
  44. package/dist/tools/run-workflow.d.ts.map +1 -1
  45. package/dist/tools/run-workflow.js +4 -4
  46. package/dist/tools/run-workflow.js.map +1 -1
  47. package/dist/tools/schemas.d.ts.map +1 -1
  48. package/dist/tools/schemas.js +18 -1
  49. package/dist/tools/schemas.js.map +1 -1
  50. package/dist/tools/send-agent-message.d.ts +2 -1
  51. package/dist/tools/send-agent-message.d.ts.map +1 -1
  52. package/dist/tools/send-agent-message.js +9 -4
  53. package/dist/tools/send-agent-message.js.map +1 -1
  54. package/dist/tools/update-agent.d.ts +2 -1
  55. package/dist/tools/update-agent.d.ts.map +1 -1
  56. package/dist/tools/update-agent.js +3 -3
  57. package/dist/tools/update-agent.js.map +1 -1
  58. package/dist/utils/agent-catalog.d.ts +1 -1
  59. package/dist/utils/agent-message.d.ts +6 -0
  60. package/dist/utils/agent-message.d.ts.map +1 -1
  61. package/dist/utils/agent-message.js +21 -1
  62. package/dist/utils/agent-message.js.map +1 -1
  63. package/dist/utils/agent-targets.d.ts +9 -3
  64. package/dist/utils/agent-targets.d.ts.map +1 -1
  65. package/dist/utils/agent-targets.js +41 -12
  66. package/dist/utils/agent-targets.js.map +1 -1
  67. package/dist/utils/agent-turns.d.ts +4 -0
  68. package/dist/utils/agent-turns.d.ts.map +1 -1
  69. package/dist/utils/agent-turns.js +5 -3
  70. package/dist/utils/agent-turns.js.map +1 -1
  71. package/dist/utils/api.d.ts +52 -5
  72. package/dist/utils/api.d.ts.map +1 -1
  73. package/dist/utils/api.js +98 -10
  74. package/dist/utils/api.js.map +1 -1
  75. package/dist/utils/controls.d.ts +427 -0
  76. package/dist/utils/controls.d.ts.map +1 -0
  77. package/dist/utils/controls.js +910 -0
  78. package/dist/utils/controls.js.map +1 -0
  79. package/dist/utils/wiro-project.d.ts +2 -0
  80. package/dist/utils/wiro-project.d.ts.map +1 -1
  81. package/dist/utils/wiro-project.js +1 -0
  82. package/dist/utils/wiro-project.js.map +1 -1
  83. package/package.json +1 -1
@@ -0,0 +1,427 @@
1
+ import { z } from 'zod';
2
+ import { type WiroClient } from '../client.js';
3
+ export declare const CONTROL_SCOPES: readonly ["account", "member", "project", "surface", "agent"];
4
+ export type ControlScope = typeof CONTROL_SCOPES[number];
5
+ export declare const SURFACES: readonly ["web", "api", "mcp", "llm-gateway", "extension", "agent"];
6
+ export type Surface = typeof SURFACES[number];
7
+ export declare const PERIODS: readonly ["month", "day"];
8
+ export type Period = typeof PERIODS[number];
9
+ export declare const CATEGORY_KEYS: readonly ["image", "video", "audio", "music", "3d", "llm", "utilities"];
10
+ export type CategoryKey = typeof CATEGORY_KEYS[number];
11
+ export type Access = 'allow' | 'block';
12
+ export type CategoryLabels = Record<CategoryKey, string>;
13
+ /** How Wiro names each way in, as its refusals do. */
14
+ export declare const SURFACE_LABELS: Record<Surface, string>;
15
+ /** What each way in covers. A local install of this server sends its calls with an API key, so it counts as api. */
16
+ export declare const SURFACE_DESCRIPTIONS: Record<Surface, string>;
17
+ /** Wiro's limit on one rule: it can name at most this many models. */
18
+ export declare const MAX_RULE_MODELS = 500;
19
+ export declare const NOTHING_CHANGED = "Nothing was changed.";
20
+ export declare function isScope(value: unknown): value is ControlScope;
21
+ export declare function isSurface(value: unknown): value is Surface;
22
+ export declare function isCategory(value: unknown): value is CategoryKey;
23
+ export declare function cents(value: number): number;
24
+ /** An amount in USD with cents, such as $248.70. */
25
+ export declare function usd(value: number): string;
26
+ /** A time in plain words, in UTC, as Wiro's refusals give it: "December 1, 2026 at 00:00 UTC". */
27
+ export declare function utcText(unixSeconds: number): string;
28
+ export declare function isoTime(unixSeconds: number | undefined): string | undefined;
29
+ export interface ControlsWorkspace {
30
+ kind: 'personal' | 'team' | 'unknown';
31
+ teamGuid?: string;
32
+ /** Whether Wiro would take a change from this connection; undefined when its answer did not say. */
33
+ canManage?: boolean;
34
+ }
35
+ /** How Wiro counts calls through this connection: the surface, the API key's project and, in a team, the member. */
36
+ export interface Caller {
37
+ surface?: Surface;
38
+ projectId?: string;
39
+ /** In a team, the user id of the person this connection acts as: the creator of its key's project. */
40
+ memberUuid?: string;
41
+ }
42
+ /** Who changed a limit or a rule last, as Wiro names them. */
43
+ export interface ChangedBy {
44
+ useruuid: string;
45
+ /** Their name or e-mail, or "the organization owner"; absent for someone who is no longer in the team. */
46
+ name?: string;
47
+ }
48
+ export declare const changedBySchema: z.ZodObject<{
49
+ useruuid: z.ZodString;
50
+ name: z.ZodOptional<z.ZodString>;
51
+ }, z.core.$strip>;
52
+ /**
53
+ * "last changed by `Jane Doe` on November 18, 2026 at 14:02 UTC", or undefined when Wiro did not say who. A name
54
+ * people wrote stays in a code span; Wiro's own label for the organization's owner reads as words.
55
+ */
56
+ export declare function changedByText(row: {
57
+ updatedBy?: ChangedBy;
58
+ updatedAt?: number;
59
+ createdAt?: number;
60
+ }, kind: ControlsWorkspace['kind'], caller: Caller | undefined): string | undefined;
61
+ /** Who may change controls, for a sentence after a refusal or in a read. */
62
+ export declare function whoCanChange(kind: ControlsWorkspace['kind']): string;
63
+ /** The whole wallet's name, by the kind of workspace. */
64
+ export declare function wholeWallet(kind: ControlsWorkspace['kind']): string;
65
+ export interface LimitRow {
66
+ guid?: string;
67
+ scope: ControlScope;
68
+ /** '' for the whole wallet. */
69
+ target: string;
70
+ targetName?: string;
71
+ period: Period;
72
+ amountUsd: number;
73
+ spentUsd: number;
74
+ /** What work that is still running holds against the limit. */
75
+ heldUsd?: number;
76
+ alertPercent: number | null;
77
+ periodStart?: number;
78
+ resetsAt?: number;
79
+ createdAt?: number;
80
+ updatedAt?: number;
81
+ updatedBy?: ChangedBy;
82
+ }
83
+ /** A limit row of SpendLimit/List, /Preview or /Set, rebuilt from an allowlist. */
84
+ export declare function toLimitRow(row: Record<string, unknown>): LimitRow | null;
85
+ /** What is left for new work: the amount less what was spent and what running work holds. */
86
+ export declare function leftOf(row: LimitRow): number;
87
+ export declare function isUsedUp(row: Pick<LimitRow, 'amountUsd' | 'spentUsd'>): boolean;
88
+ /**
89
+ * A row's version, as a change summary records it: its last change, 0 when there is no row. A
90
+ * confirmed change goes ahead only while the row still has the version the user saw.
91
+ */
92
+ export declare function versionOf(row: {
93
+ updatedAt?: number;
94
+ createdAt?: number;
95
+ } | null | undefined): number;
96
+ /** What a confirm repeats from a change summary's nextAction. */
97
+ export interface ConfirmArgs {
98
+ confirm: boolean;
99
+ updated_at?: number;
100
+ summary_id?: string;
101
+ }
102
+ /**
103
+ * Where a call stands: a summary to show, or a confirm. A confirm writes only when it repeats the summary of this
104
+ * very change, made from the row's current version.
105
+ * summary no confirm: show the change summary.
106
+ * changed the row changed after the summary the user saw.
107
+ * no-summary confirm without the summary's updated_at and summary_id.
108
+ * differs confirm of another change than the summary it repeats.
109
+ * confirmed write.
110
+ */
111
+ export type ConfirmState = 'summary' | 'changed' | 'no-summary' | 'differs' | 'confirmed';
112
+ export declare function confirmState(args: ConfirmArgs, version: number, id: string): ConfirmState;
113
+ /**
114
+ * The id of a change summary: a digest of the exact change it shows and the version of the row it was made from,
115
+ * keyed by this connection's API key. It cannot be made up without the key, and every server of one deployment
116
+ * gives the same id for the same change.
117
+ */
118
+ export declare function summaryId(client: WiroClient, change: Record<string, unknown>): string;
119
+ /** The sentence a summary opens with when a confirm did not write, by why it did not. */
120
+ export declare function confirmLead(state: ConfirmState, what: 'limit' | 'rule'): string | null;
121
+ export declare const summaryIdSchema: z.ZodOptional<z.ZodString>;
122
+ export declare function periodWord(period: Period): string;
123
+ /** The label of a period's spending so far: "Today so far" or "This month so far". */
124
+ export declare function soFarLabel(period: Period): string;
125
+ /** A phrase of this server's text at the start of a sentence. */
126
+ export declare function capitalized(text: string): string;
127
+ /** "$500.00 a month". */
128
+ export declare function amountPerPeriod(amountUsd: number, period: Period): string;
129
+ export declare function alertText(alertPercent: number | null): string;
130
+ /** When a period ends, or the time a row gives. */
131
+ export declare function resetText(row: Pick<LimitRow, 'period' | 'resetsAt'>): string;
132
+ export interface TargetView {
133
+ scope: ControlScope;
134
+ target?: string;
135
+ targetName?: string;
136
+ /** This connection's own API key, the surface this connection counts as, or in a team the member it acts as. */
137
+ thisConnection?: boolean;
138
+ }
139
+ export declare function isThisConnection(scope: ControlScope, target: string, caller: Caller | undefined): boolean;
140
+ /** What a limit or a rule covers, as one phrase of this server's own text. */
141
+ export declare function targetText(view: TargetView, kind: ControlsWorkspace['kind']): string;
142
+ /** The argument that names a scope's target in the manage tools, or none for the whole wallet. */
143
+ export declare function targetArgument(scope: ControlScope, target: string): Record<string, string>;
144
+ export declare const limitViewSchema: z.ZodObject<{
145
+ guid: z.ZodOptional<z.ZodString>;
146
+ scope: z.ZodEnum<{
147
+ agent: "agent";
148
+ project: "project";
149
+ member: "member";
150
+ surface: "surface";
151
+ account: "account";
152
+ }>;
153
+ target: z.ZodOptional<z.ZodString>;
154
+ targetName: z.ZodOptional<z.ZodString>;
155
+ thisConnection: z.ZodOptional<z.ZodBoolean>;
156
+ period: z.ZodEnum<{
157
+ month: "month";
158
+ day: "day";
159
+ }>;
160
+ amountUsd: z.ZodNumber;
161
+ spentUsd: z.ZodNumber;
162
+ heldUsd: z.ZodOptional<z.ZodNumber>;
163
+ leftUsd: z.ZodNumber;
164
+ usedUp: z.ZodBoolean;
165
+ alertPercent: z.ZodNullable<z.ZodNumber>;
166
+ periodStart: z.ZodOptional<z.ZodString>;
167
+ resetsAt: z.ZodOptional<z.ZodString>;
168
+ updatedAt: z.ZodOptional<z.ZodNumber>;
169
+ updatedBy: z.ZodOptional<z.ZodObject<{
170
+ useruuid: z.ZodString;
171
+ name: z.ZodOptional<z.ZodString>;
172
+ }, z.core.$strip>>;
173
+ }, z.core.$strip>;
174
+ export type LimitView = z.infer<typeof limitViewSchema>;
175
+ export declare function limitView(row: LimitRow, caller: Caller | undefined): LimitView;
176
+ /** "$248.70 of $500.00 used, $20.00 held by work still running, $231.30 left". */
177
+ export declare function spendingText(row: LimitRow): string;
178
+ /** One line of a limit list. */
179
+ export declare function limitLine(row: LimitRow, kind: ControlsWorkspace['kind'], caller: Caller | undefined): string;
180
+ export interface RuleModelEntry {
181
+ id: string;
182
+ /** The model's owner/slug; null when it is no longer on Wiro. */
183
+ model: string | null;
184
+ title?: string;
185
+ access: Access;
186
+ }
187
+ export interface RuleRow {
188
+ guid?: string;
189
+ scope: ControlScope;
190
+ target: string;
191
+ targetName?: string;
192
+ /** What every model the rule names neither by category nor by name gets ("everything else"). */
193
+ access: Access;
194
+ categories: Partial<Record<CategoryKey, Access>>;
195
+ models: RuleModelEntry[];
196
+ createdAt?: number;
197
+ updatedAt?: number;
198
+ updatedBy?: ChangedBy;
199
+ }
200
+ /** A rule row of ModelAccess/List, /Preview, /Set or /Check, rebuilt from an allowlist. */
201
+ export declare function toRuleRow(row: Record<string, unknown>): RuleRow | null;
202
+ /** The category labels a ModelAccess/List answer gives, over the built-in ones. */
203
+ export declare function toCategoryLabels(value: unknown): CategoryLabels;
204
+ export declare function categoryList(labels: CategoryLabels): Array<{
205
+ category: CategoryKey;
206
+ label: string;
207
+ }>;
208
+ /** A model of a rule by its owner/slug, or by its id when it is no longer on Wiro. */
209
+ export declare function entryName(entry: Pick<RuleModelEntry, 'id' | 'model'>, quote: boolean): string;
210
+ /**
211
+ * A rule in plain words: "Every model except Video Generation; bytedance/seedance-v2-5-flash allowed by name" or
212
+ * "Only Image Generation and openai/gpt-6-2-astra". In a rule that allows every other model an allowed category
213
+ * decides nothing (a block among a model's categories wins), so it is left out.
214
+ */
215
+ export declare function ruleSummary(rule: RuleRow, labels: CategoryLabels, options?: {
216
+ quote?: boolean;
217
+ maxModels?: number;
218
+ }): string;
219
+ /** Whether a rule blocks anything at all. One that does not changes no decision. */
220
+ export declare function blocksSomething(rule: {
221
+ access: Access;
222
+ categories: RuleRow['categories'];
223
+ models: Array<{
224
+ access: Access;
225
+ }>;
226
+ }): boolean;
227
+ export declare const ruleViewSchema: z.ZodObject<{
228
+ guid: z.ZodOptional<z.ZodString>;
229
+ scope: z.ZodEnum<{
230
+ agent: "agent";
231
+ project: "project";
232
+ member: "member";
233
+ surface: "surface";
234
+ account: "account";
235
+ }>;
236
+ target: z.ZodOptional<z.ZodString>;
237
+ targetName: z.ZodOptional<z.ZodString>;
238
+ thisConnection: z.ZodOptional<z.ZodBoolean>;
239
+ everythingElse: z.ZodEnum<{
240
+ allow: "allow";
241
+ block: "block";
242
+ }>;
243
+ categories: z.ZodArray<z.ZodObject<{
244
+ category: z.ZodEnum<{
245
+ image: "image";
246
+ audio: "audio";
247
+ video: "video";
248
+ music: "music";
249
+ "3d": "3d";
250
+ llm: "llm";
251
+ utilities: "utilities";
252
+ }>;
253
+ label: z.ZodString;
254
+ access: z.ZodEnum<{
255
+ allow: "allow";
256
+ block: "block";
257
+ }>;
258
+ }, z.core.$strip>>;
259
+ models: z.ZodArray<z.ZodObject<{
260
+ id: z.ZodString;
261
+ model: z.ZodNullable<z.ZodString>;
262
+ title: z.ZodOptional<z.ZodString>;
263
+ access: z.ZodEnum<{
264
+ allow: "allow";
265
+ block: "block";
266
+ }>;
267
+ }, z.core.$strip>>;
268
+ summary: z.ZodString;
269
+ updatedAt: z.ZodOptional<z.ZodNumber>;
270
+ updatedBy: z.ZodOptional<z.ZodObject<{
271
+ useruuid: z.ZodString;
272
+ name: z.ZodOptional<z.ZodString>;
273
+ }, z.core.$strip>>;
274
+ }, z.core.$strip>;
275
+ export type RuleView = z.infer<typeof ruleViewSchema>;
276
+ export declare function ruleView(rule: RuleRow, labels: CategoryLabels, caller: Caller | undefined): RuleView;
277
+ /** One line of a rule list: at most ten models are named in the text. */
278
+ export declare function ruleLine(rule: RuleRow, labels: CategoryLabels, kind: ControlsWorkspace['kind'], caller: Caller | undefined): string;
279
+ /** The model that transcribes the voice notes of an agent that chats on Gemini. It is an LLM & Chat model too. */
280
+ export declare const GEMINI_VOICE_MODEL = "google/gemini-3-flash";
281
+ /** What an agent's own rule gives its built-in voice. */
282
+ export interface AgentVoice {
283
+ /** Whether the agent chats on Gemini, so that GEMINI_VOICE_MODEL transcribes its voice notes. */
284
+ gemini: boolean;
285
+ /** Its voice notes: transcribed, or not. */
286
+ notes: Access;
287
+ /** Whether the rule's entry for GEMINI_VOICE_MODEL decides the voice notes (an agent that chats on Gemini). */
288
+ notesByName: boolean;
289
+ /** Its voice replies: spoken, or sent as text. */
290
+ replies: Access;
291
+ }
292
+ /**
293
+ * What an agent's own rule gives its built-in voice; null for no rule. Its voice models count as Audio & Speech, so the
294
+ * rule's Audio & Speech entry decides them, else what it gives every other model, and allowing LLM & Chat does not
295
+ * open them. An agent that chats on Gemini has its voice notes transcribed by GEMINI_VOICE_MODEL, which has to pass
296
+ * the rule both as an Audio & Speech model and as the LLM & Chat model it is: a rule entry that names it decides
297
+ * both, else Audio & Speech and LLM & Chat must both let it run.
298
+ */
299
+ export declare function agentVoice(rule: Pick<RuleRow, 'access' | 'categories' | 'models'> | null, chatModel: string | undefined): AgentVoice;
300
+ export type Decision = 'allow' | 'block';
301
+ export type DecidedBy = 'model' | 'category' | 'default';
302
+ /** How one rule decides a model for a run, as ModelAccess/Check explains it. */
303
+ export interface RuleDecision {
304
+ rule: RuleRow;
305
+ decides: Decision;
306
+ by: DecidedBy;
307
+ category: string | null;
308
+ }
309
+ /** The rules of a ModelAccess/Check answer that apply to the run, widest first, each with its decision. */
310
+ export declare function toRuleDecisions(value: unknown): RuleDecision[];
311
+ /** The run a ModelAccess/Check answer says it checked. A key acts as its creator, so in a team that is the member. */
312
+ export interface CheckedRun {
313
+ surface: Surface;
314
+ member?: {
315
+ uuid: string;
316
+ name?: string;
317
+ };
318
+ project?: {
319
+ id: string;
320
+ name?: string;
321
+ };
322
+ agent?: {
323
+ guid: string;
324
+ name?: string;
325
+ };
326
+ }
327
+ /** check.context of a ModelAccess/Check answer; undefined when the answer has none (an older Wiro API). */
328
+ export declare function toCheckedRun(value: unknown): CheckedRun | undefined;
329
+ /** Why one rule decides the model as it does, as the end of a sentence about that rule. */
330
+ export declare function decisionReason(decision: Pick<RuleDecision, 'decides' | 'by' | 'category'>, labels: CategoryLabels): string;
331
+ export interface LimitList {
332
+ workspace: ControlsWorkspace;
333
+ caller?: Caller;
334
+ limits: LimitRow[];
335
+ }
336
+ export interface RuleList {
337
+ workspace: ControlsWorkspace;
338
+ caller?: Caller;
339
+ rules: RuleRow[];
340
+ labels: CategoryLabels;
341
+ }
342
+ /** The workspace's spend limits with this period's spending. Throws when they cannot be read. */
343
+ export declare function readLimitList(client: WiroClient, signal?: AbortSignal): Promise<LimitList>;
344
+ /** The workspace's Model Access rules and the categories a rule can name. Throws when they cannot be read. */
345
+ export declare function readRuleList(client: WiroClient, signal?: AbortSignal): Promise<RuleList>;
346
+ export interface TargetArgs {
347
+ scope?: ControlScope;
348
+ member?: string;
349
+ project?: string;
350
+ surface?: Surface;
351
+ agent?: string;
352
+ }
353
+ export interface ResolvedTarget {
354
+ scope: ControlScope;
355
+ /** '' for the whole wallet. */
356
+ target: string;
357
+ targetName?: string;
358
+ thisConnection: boolean;
359
+ }
360
+ /** Checks before any call that the target arguments fit the scope. Throws a sentence. */
361
+ export declare function checkTargetArguments(args: TargetArgs): void;
362
+ interface ProjectChoice {
363
+ id: string;
364
+ name?: string;
365
+ connected: boolean;
366
+ }
367
+ /** A project named by its id or its exact name; left out, this connection's own. */
368
+ export declare function resolveProject(client: WiroClient, value: string | undefined, caller: Caller | undefined, signal?: AbortSignal): Promise<ProjectChoice>;
369
+ interface MemberChoice {
370
+ uuid: string;
371
+ name?: string;
372
+ }
373
+ export interface TeamMember {
374
+ uuid: string;
375
+ name?: string;
376
+ email?: string;
377
+ role?: 'admin' | 'member';
378
+ }
379
+ /** The active members of a team, in Wiro's order. Throws when they cannot be read. */
380
+ export declare function readTeamMembers(client: WiroClient, teamGuid: string, signal?: AbortSignal): Promise<TeamMember[]>;
381
+ /** A team member named by e-mail or user id. Only an e-mail needs the team's member list. */
382
+ export declare function resolveMember(client: WiroClient, value: string, workspace: ControlsWorkspace, signal?: AbortSignal): Promise<MemberChoice>;
383
+ interface AgentChoice {
384
+ guid: string;
385
+ name?: string;
386
+ }
387
+ /** An agent of this workspace named by its guid or its exact name. */
388
+ export declare function resolveAgent(client: WiroClient, value: string, signal?: AbortSignal): Promise<AgentChoice>;
389
+ /** A limit's or a rule's target from the manage tools' arguments: an e-mail, a name or this connection's key become ids. */
390
+ export declare function resolveTarget(client: WiroClient, args: TargetArgs & {
391
+ scope: ControlScope;
392
+ }, context: {
393
+ workspace: ControlsWorkspace;
394
+ caller?: Caller;
395
+ }, signal?: AbortSignal): Promise<ResolvedTarget>;
396
+ export type ControlsPage = 'spend-limits' | 'model-access';
397
+ /** The workspace a Controls link opens in, where it is known. */
398
+ export type LinkedWorkspace = Pick<ControlsWorkspace, 'kind' | 'teamGuid'>;
399
+ /**
400
+ * A Controls page of the Wiro dashboard, in the workspace it is about: ?workspace=<team guid> for a team, or
401
+ * ?workspace=personal for a personal account, opens the page in that workspace whichever one the browser is on.
402
+ * The page's plain address when the workspace is not known.
403
+ */
404
+ export declare function controlsPageUrl(page: ControlsPage, workspace?: LinkedWorkspace): string;
405
+ /** An older Wiro API has no change summary for controls, so no change goes through this server. */
406
+ export declare function previewMissingText(page: ControlsPage, workspace?: LinkedWorkspace): string;
407
+ /** Wiro's refusal of a change, with what fixes it where that is known. */
408
+ export declare function refusalText(message: string): string;
409
+ /** Why a read for a change failed, as one sentence that says nothing changed. */
410
+ export declare function readFailure(what: string, error: unknown): Error;
411
+ /** Why a change summary could not be made. A route the API does not have means the change cannot be previewed. */
412
+ export declare function previewFailure(error: unknown, page: ControlsPage, workspace?: LinkedWorkspace): Error;
413
+ /**
414
+ * Why a change failed. A clean refusal changed nothing. Without a clear answer the change may have
415
+ * gone through, so `unknownText` says how to find out.
416
+ */
417
+ export declare function changeFailure(error: unknown, page: ControlsPage, unknownText: string, workspace?: LinkedWorkspace): Error;
418
+ /** The sentence for a connection that may read controls but not change them. */
419
+ export declare function cannotChangeText(workspace: LinkedWorkspace, what: 'spend limits' | 'Model Access rules', page: ControlsPage): string;
420
+ export declare const dashboardSchema: z.ZodObject<{
421
+ spendLimits: z.ZodString;
422
+ modelAccess: z.ZodString;
423
+ }, z.core.$strip>;
424
+ /** The Controls pages of the Wiro dashboard, in the given workspace where it is known. */
425
+ export declare function dashboardOf(workspace?: LinkedWorkspace): z.infer<typeof dashboardSchema>;
426
+ export {};
427
+ //# sourceMappingURL=controls.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"controls.d.ts","sourceRoot":"","sources":["../../src/utils/controls.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAgB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAyB7D,eAAO,MAAM,cAAc,+DAAgE,CAAC;AAC5F,MAAM,MAAM,YAAY,GAAG,OAAO,cAAc,CAAC,MAAM,CAAC,CAAC;AAEzD,eAAO,MAAM,QAAQ,qEAAsE,CAAC;AAC5F,MAAM,MAAM,OAAO,GAAG,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC;AAE9C,eAAO,MAAM,OAAO,2BAA4B,CAAC;AACjD,MAAM,MAAM,MAAM,GAAG,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC;AAE5C,eAAO,MAAM,aAAa,yEAA0E,CAAC;AACrG,MAAM,MAAM,WAAW,GAAG,OAAO,aAAa,CAAC,MAAM,CAAC,CAAC;AAEvD,MAAM,MAAM,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;AAEvC,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;AAYzD,sDAAsD;AACtD,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,OAAO,EAA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