@arbium/enterprise-agent-connect-client 0.0.0-stage → 0.1.2-dev.cba5f68

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/steps.d.ts ADDED
@@ -0,0 +1,1448 @@
1
+ import type { Agent, AgentStep, Capability, CertificateInfo, Check, CheckOutcome, ChosenOption, Connection, Connector, Field, LiveCheck, Limits, Provider, ProviderConnection, SiteAccess, Step, TeamsBot, TeamsPlace, TeamsRun, TeamsTrigger, TeamsTriggerInput } from "./types.js";
2
+ /** A copy block's text: a line with {scope} repeats once per scope, {scopes} becomes the
3
+ * scopes space-separated, and any other {key} is filled from the connection's settings.
4
+ * Unknown placeholders stay visible so a missing value is obvious. */
5
+ export declare function expandCopy(lines: string[], scopes: string[], config?: Record<string, string>,
6
+ /** How {scopes} is joined, e.g. ", " in click steps people read. */
7
+ joiner?: string): string;
8
+ /** {name} values the ticked capabilities fill into steps, later ones winning, e.g. the
9
+ * site role: read, or write once adding files is ticked. */
10
+ export declare function fillsFor(connector: Connector, ticked: readonly string[]): Record<string, string>;
11
+ /** The choice fields' values: the stored or typed one, else each field's first option, which
12
+ * also holds while the earlier choice a field `requires` is not made. */
13
+ export declare function choiceValues(connector: {
14
+ fields: Field[];
15
+ }, values: Record<string, string>): Record<string, string>;
16
+ /** True with no condition, or while its option is the chosen one. */
17
+ export declare const isChosen: (option: ChosenOption | undefined, chosen: Record<string, string>) => boolean;
18
+ /** The choice fields shown: one that `requires` an earlier choice only while it is made. */
19
+ export declare const askedFields: (fields: Field[], values: Record<string, string>) => Field[];
20
+ /** The steps that apply under the chosen options (a step with `option` only while chosen)
21
+ * and, given `ticked`, the ticked capabilities (a step with `capabilities` only while one of
22
+ * them is). */
23
+ export declare function chosenSteps(connector: Connector, steps: Step[], values: Record<string, string>, ticked?: readonly string[]): Step[];
24
+ /** Choices that change the permissions the setup steps ask for: made in step 1, with what
25
+ * agents may do, so the steps after it already show those permissions. */
26
+ export declare function permissionChoices(connector: Connector): Field[];
27
+ /** Permissions the chosen options need, e.g. Sites.Read.All for reading every site. */
28
+ export declare function optionScopes(connector: Connector, values: Record<string, string>): string[];
29
+ /** {site} and {siteRef} (how Graph and PowerShell name it: host, or host:/path) for a site's
30
+ * grant steps and note. */
31
+ export declare function siteFills(site: string): Record<string, string>;
32
+ /** The note to send whoever manages SharePoint: the connector's request with the site, the
33
+ * app and the role filled, and its first grant step's commands where it says
34
+ * {grantCommands}. */
35
+ /** The site grant steps for the site role the ticks need (`site_role`). */
36
+ export declare function grantSteps(connector: Connector, siteRole: string | undefined): Step[];
37
+ export declare function siteRequest(connector: Connector, site: string, scopes: string[], config: Record<string, string>): string;
38
+ /** The apps a key uses, in the order the apps are listed. */
39
+ export declare function keyApps(agent: Agent, connectors: Connector[]): Connector[];
40
+ /** How many active keys use an app (a disabled key uses nothing). */
41
+ export declare function keysUsing(agents: Agent[], connectorId: string): number;
42
+ /** The values a connected app reported for its discover probe, e.g. Jira project keys. */
43
+ export declare function discovered(connector: Connector, checks: Check[] | null): string[];
44
+ /** The same, each with the label to show for it (the value itself when the app gave none),
45
+ * e.g. a NetSuite subsidiary's name for its id. */
46
+ export declare function discoveredChoices(connector: Connector, checks: Check[] | null): {
47
+ value: string;
48
+ label: string;
49
+ }[];
50
+ /** Parses free-typed list input ("KAN, SAM1") into values. */
51
+ export declare function splitList(raw: string): string[];
52
+ /** Shown under Click through for a step the vendor offers only as commands. */
53
+ export declare const CLICK_UNAVAILABLE = "Microsoft has no admin center page for this step: it is done only with commands. Open Commands, or send them to whoever manages it.";
54
+ /** What a free-typed list box shows: the admin's own text while it still parses to the
55
+ * saved values (so a typed comma or space stays put), else the values themselves. */
56
+ export declare function listText(typed: string, values: string[]): string;
57
+ /** Scopes or in-app permissions the ticked capabilities need, in connector order, each once. */
58
+ export declare function neededFor(connector: Connector, ticked: readonly string[], kind: "scopes" | "permissions"): string[];
59
+ /** The capabilities after ticking or unticking one, in connector order. Required ones stay on;
60
+ * a destructive one is only turned on when `confirm` accepts its warning. */
61
+ export declare function toggleCapability(connector: Connector, current: readonly string[], id: string, on: boolean, confirm: (warning: string) => boolean): string[];
62
+ export declare function destructiveWarning(connector: Connector, capability: Capability): string;
63
+ /** needs_steps: on, but a step on its page is not done yet. needs_attention: on, but a live
64
+ * check of it could not run, so whether it works is not known. */
65
+ export type AppStatus = "connected" | "needs_reconnect" | "not_connected" | "needs_steps" | "needs_attention";
66
+ /** The provider form's values to send: only the fields on show, so a secret typed and then
67
+ * hidden by going back to the certificate is not sent (a secret sent wins the sign-in). */
68
+ export declare function providerFields(fields: readonly {
69
+ id: string;
70
+ secret?: boolean;
71
+ }[], useSecret: boolean, values: Record<string, string>): Record<string, string>;
72
+ /** Whether a provider connection is usable by its apps. */
73
+ export declare function providerReady(connection: ProviderConnection | null): boolean;
74
+ /** A provider connection's status, as its card and page show it. */
75
+ export declare function providerStatus(connection: ProviderConnection | null): AppStatus;
76
+ /** The Integrations tab's layout: apps of their own first, then each provider's apps
77
+ * together under it, by their `order`, then name. Providers without apps are left out. */
78
+ export declare function groupByProvider<T extends {
79
+ provider?: string;
80
+ order?: number;
81
+ name: string;
82
+ }>(apps: T[], providers: Provider[]): {
83
+ provider: Provider | null;
84
+ apps: T[];
85
+ }[];
86
+ /** What the Integrations tab says about a provider connection: its certificate running out
87
+ * with no new one waiting (every app of it stops that day). */
88
+ export declare function certificateNotice(connection: ProviderConnection | null, now?: number): {
89
+ expiresAt: string;
90
+ } | null;
91
+ /** A certificate expiring within this many days is called out. */
92
+ export declare const CERTIFICATE_WARNING_DAYS = 30;
93
+ export declare function expiresSoon(info: CertificateInfo, now?: number): boolean;
94
+ /** How a provider connection signs in, in the admin's words. */
95
+ export declare function signInMethod(connection: ProviderConnection): string;
96
+ /** A saved connection whose last check failed needs reconnecting, as does one marked so; one
97
+ * whose check passed with a warning (e.g. Jira can browse no project yet) needs steps. */
98
+ export declare function appStatus(connection: Connection | null, healthy?: boolean, warned?: boolean): AppStatus;
99
+ /** A check that passed but found something to do. */
100
+ export declare function checkWarned(health: CheckOutcome | null | undefined): boolean;
101
+ /** What an app's own page shows, so it never contradicts its badge: a failed check, a failed
102
+ * recorded check, or a check that passed with a warning each offer Check again, and a warning
103
+ * leaves Prepare and "What agents can see" not done. */
104
+ export declare function appPageState(connection: Connection | null, health: CheckOutcome | null | undefined): {
105
+ notice: "failed" | "recorded" | "warned" | null;
106
+ prepareDone: boolean;
107
+ seeDone: boolean;
108
+ };
109
+ /** An app of its own on the Integrations tab: its stored status, then its live read-only
110
+ * check (failed: needs reconnecting; could not run: needs attention; warned: needs steps).
111
+ * Before the check answers (`checks` null in `integrationCards`), the stored status alone. */
112
+ export declare function cardStatus(connection: Connection | null, check: CheckOutcome | null): AppStatus;
113
+ /** A provider's status as its card and its page's header show it: the sign-in's, then its
114
+ * apps' (reconnecting, attention, steps), with how many apps are on and how many need steps
115
+ * or attention, each app counted by `appState`, as its row and its own page show it. */
116
+ export declare function providerSummary(definition: Provider, connection: ProviderConnection | null, apps: {
117
+ connector: Connector;
118
+ connection: Connection | null;
119
+ state: AppLive;
120
+ }[], confirmed: string[]): {
121
+ status: AppStatus;
122
+ on: number;
123
+ steps: number;
124
+ attention: number;
125
+ };
126
+ export type TeamsStep = {
127
+ label: string;
128
+ done: boolean;
129
+ detail?: string;
130
+ };
131
+ /** Where a bot's setup stands, in the order the admin does it. The service sees what Add to Teams
132
+ * made and what it published; Teams telling it the bot was added somewhere proves the rest. */
133
+ export declare function teamsSetup(bot: TeamsBot | null): TeamsStep[];
134
+ export declare function placeName(place: TeamsPlace): string;
135
+ /** The trigger form as typed: dollars per answer and per day, comma or space separated ids,
136
+ * the teams it answers in as ticked group ids. */
137
+ export type TriggerForm = {
138
+ enabled: boolean;
139
+ /** Kept as loaded, with its settings: the form edits a Claude trigger's fields only. */
140
+ runner: string;
141
+ settings: Record<string, unknown>;
142
+ managedAgentId: string;
143
+ environmentId: string;
144
+ vaultIds: string;
145
+ budgetDollars: string;
146
+ dailyDollars: string;
147
+ maxRunsPerHour: string;
148
+ replyMode: "mentions" | "all";
149
+ allowedTeams: string[];
150
+ allowedPeople: string;
151
+ anyoneInOrganization: boolean;
152
+ };
153
+ /** The service's default runner, the only one whose fields the trigger form edits. */
154
+ export declare const CLAUDE_RUNNER = "claude-managed-agents";
155
+ export declare function triggerForm(trigger: TeamsTrigger | null): TriggerForm;
156
+ /** The trigger to save, or what to fix. The service checks again, and that the Claude agent
157
+ * and environment exist under the organization's key. */
158
+ export declare function triggerInput(form: TriggerForm): {
159
+ ok: true;
160
+ value: Omit<TeamsTriggerInput, "by">;
161
+ } | {
162
+ ok: false;
163
+ error: string;
164
+ };
165
+ /** One answer in Recent Teams activity, in the admin's words. */
166
+ export declare function runSummary(run: TeamsRun): string;
167
+ /** An agent's address, limited to characters that are inert inside the commands it fills. */
168
+ export declare const AGENT_EMAIL: RegExp;
169
+ /** A Teams bot's name: the setup script hands it to az, which runs through cmd.exe on Windows,
170
+ * so only characters inert there (the same rule as the service's). */
171
+ export declare const BOT_NAME: RegExp;
172
+ /** A key's name as a starting bot name: other characters become spaces. */
173
+ export declare function botNameFrom(name: string): string;
174
+ /** {agentEmail} and {agentName} (the part before the @) for the add-an-agent steps. */
175
+ export declare function agentFills(email: string): Record<string, string>;
176
+ /** The add-an-agent steps for the apps ticked on a new key. */
177
+ export declare function agentSteps(provider: Provider, on: readonly string[]): AgentStep[];
178
+ /** What a new key's agent needs outside the service for the apps ticked on it: its email where an
179
+ * app opens the agent's own address (its mailbox), each provider's steps for those apps, and
180
+ * the apps that give each agent its own bot. Apps with nothing per agent add nothing. */
181
+ export declare function newKeySetup(ticked: Connector[], providers: Provider[]): {
182
+ addressed: {
183
+ id: string;
184
+ name: string;
185
+ description: string;
186
+ logo: string;
187
+ identity: string;
188
+ signsInAs?: "agentBot";
189
+ provider?: string;
190
+ order?: number;
191
+ connectionKind: "guided";
192
+ accountKey: string;
193
+ scopes?: string[];
194
+ setup: {
195
+ title: string;
196
+ body: string;
197
+ link?: {
198
+ label: string;
199
+ href: string;
200
+ };
201
+ copy?: string[];
202
+ shell?: "bash" | "powershell";
203
+ permissions?: boolean;
204
+ certificate?: boolean;
205
+ click?: string[];
206
+ clickUnavailable?: true;
207
+ siteRole?: "read" | "write";
208
+ agentCheck?: boolean;
209
+ confirm?: string;
210
+ live?: string;
211
+ settings?: {
212
+ id: string;
213
+ label: string;
214
+ help?: string;
215
+ placeholder?: string;
216
+ pattern: string;
217
+ }[];
218
+ option?: {
219
+ field: string;
220
+ value: string;
221
+ };
222
+ capabilities?: string[];
223
+ }[];
224
+ afterConnect: {
225
+ title: string;
226
+ body: string;
227
+ link?: {
228
+ label: string;
229
+ href: string;
230
+ };
231
+ copy?: string[];
232
+ shell?: "bash" | "powershell";
233
+ permissions?: boolean;
234
+ certificate?: boolean;
235
+ click?: string[];
236
+ clickUnavailable?: true;
237
+ siteRole?: "read" | "write";
238
+ agentCheck?: boolean;
239
+ confirm?: string;
240
+ live?: string;
241
+ settings?: {
242
+ id: string;
243
+ label: string;
244
+ help?: string;
245
+ placeholder?: string;
246
+ pattern: string;
247
+ }[];
248
+ option?: {
249
+ field: string;
250
+ value: string;
251
+ };
252
+ capabilities?: string[];
253
+ }[];
254
+ fields: {
255
+ id: string;
256
+ label: string;
257
+ help?: string;
258
+ placeholder?: string;
259
+ secret: boolean;
260
+ options?: {
261
+ value: string;
262
+ label: string;
263
+ description: string;
264
+ scopes?: string[];
265
+ }[];
266
+ requires?: {
267
+ field: string;
268
+ value: string;
269
+ };
270
+ optional: boolean;
271
+ }[];
272
+ capabilities: {
273
+ id: string;
274
+ label: string;
275
+ description: string;
276
+ required: boolean;
277
+ destructive: boolean;
278
+ costs?: boolean;
279
+ scopes: string[];
280
+ roles?: string[];
281
+ permissions: string[];
282
+ fill?: {
283
+ [key: string]: string;
284
+ };
285
+ note?: string;
286
+ forbidden?: string;
287
+ claudeKey?: boolean;
288
+ tools: string[];
289
+ }[];
290
+ limits: {
291
+ id: string;
292
+ label: string;
293
+ help: string;
294
+ kind: "list" | "text" | "map";
295
+ required: boolean;
296
+ pattern?: string;
297
+ keys?: string;
298
+ }[];
299
+ siteAccess?: {
300
+ grant: {
301
+ title: string;
302
+ body: string;
303
+ link?: {
304
+ label: string;
305
+ href: string;
306
+ };
307
+ copy?: string[];
308
+ shell?: "bash" | "powershell";
309
+ permissions?: boolean;
310
+ certificate?: boolean;
311
+ click?: string[];
312
+ clickUnavailable?: true;
313
+ siteRole?: "read" | "write";
314
+ agentCheck?: boolean;
315
+ confirm?: string;
316
+ live?: string;
317
+ settings?: {
318
+ id: string;
319
+ label: string;
320
+ help?: string;
321
+ placeholder?: string;
322
+ pattern: string;
323
+ }[];
324
+ option?: {
325
+ field: string;
326
+ value: string;
327
+ };
328
+ }[];
329
+ request: string;
330
+ write: string[];
331
+ };
332
+ agentAccess?: {
333
+ limit: string;
334
+ label: string;
335
+ path: string & (unknown & unknown);
336
+ granted: string;
337
+ notGranted: string;
338
+ notFound: string;
339
+ probes: {
340
+ [key: string]: {
341
+ method: "GET" | "POST" | "PATCH";
342
+ path: string & (unknown & unknown);
343
+ body?: unknown;
344
+ allowed: number[];
345
+ };
346
+ };
347
+ missing?: string;
348
+ };
349
+ verify: {
350
+ method: "GET" | "POST";
351
+ path: string;
352
+ label: string;
353
+ show: string;
354
+ name?: string;
355
+ match?: {
356
+ [key: string]: string | number | boolean;
357
+ };
358
+ body?: {
359
+ [key: string]: unknown;
360
+ };
361
+ ifEmpty
362
+ /** A step whose text fills in a value saved at another step waits until it is saved: its
363
+ * words would show the raw {name} and its commands would not run. */
364
+ ? /** A step whose text fills in a value saved at another step waits until it is saved: its
365
+ * words would show the raw {name} and its commands would not run. */: string;
366
+ } | {
367
+ label: string;
368
+ check: string;
369
+ ifEmpty?: string;
370
+ };
371
+ discover?: {
372
+ method: "GET" | "POST";
373
+ path: string;
374
+ label: string;
375
+ show: string;
376
+ name?: string;
377
+ match?: {
378
+ [key: string]: string | number | boolean;
379
+ };
380
+ body?: {
381
+ [key: string]: unknown;
382
+ };
383
+ ifEmpty?: string;
384
+ } | {
385
+ label: string;
386
+ check: string;
387
+ ifEmpty?: string;
388
+ };
389
+ revoke: string;
390
+ http?: {
391
+ baseUrl: string;
392
+ auth: {
393
+ type: "header";
394
+ header: string;
395
+ value: string;
396
+ prefix?: string;
397
+ } | {
398
+ type: "bearer";
399
+ token: string;
400
+ } | {
401
+ type: "basic";
402
+ username: string;
403
+ password: string;
404
+ } | {
405
+ type: "oauth2";
406
+ tokenUrl: string;
407
+ clientId: string;
408
+ clientSecret: string;
409
+ scope?: string;
410
+ } | {
411
+ type: "query";
412
+ param: string;
413
+ value: string;
414
+ };
415
+ headers: {
416
+ [key: string]: string;
417
+ };
418
+ tools: {
419
+ name: string;
420
+ description: string;
421
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
422
+ path: string;
423
+ params: {
424
+ [key: string]: {
425
+ type: "string" | "number" | "integer" | "boolean" | "array";
426
+ description: string;
427
+ in: "path" | "query" | "body";
428
+ name?: string;
429
+ required: boolean;
430
+ default?: (string | number | boolean) | (string | number | boolean)[];
431
+ enum?: (string | number | boolean)[];
432
+ items?: "string" | "number" | "integer" | "boolean";
433
+ join?: string;
434
+ limit?: string;
435
+ };
436
+ };
437
+ destructive: boolean;
438
+ answerLimits: {
439
+ field: string;
440
+ limit: string;
441
+ }[];
442
+ result?: {
443
+ items?: string;
444
+ fields?: string[];
445
+ };
446
+ paging?: {
447
+ param: string;
448
+ body: string;
449
+ } | {
450
+ param: string;
451
+ header: string;
452
+ } | {
453
+ param: string;
454
+ link: true;
455
+ };
456
+ }[];
457
+ allowInsecureHttp: boolean;
458
+ };
459
+ soap?: {
460
+ endpoint: string;
461
+ version: "1.1" | "1.2";
462
+ namespaces: {
463
+ [key: string]: string;
464
+ };
465
+ auth?: {
466
+ type: "header";
467
+ header: string;
468
+ value: string;
469
+ prefix?: string;
470
+ } | {
471
+ type: "bearer";
472
+ token: string;
473
+ } | {
474
+ type: "basic";
475
+ username: string;
476
+ password: string;
477
+ };
478
+ wsSecurity?: {
479
+ username: string;
480
+ password: string;
481
+ digest: boolean;
482
+ };
483
+ verify?: {
484
+ tool: string;
485
+ args: {
486
+ [key: string]: string | number | boolean;
487
+ };
488
+ show: string;
489
+ };
490
+ tools: {
491
+ name: string;
492
+ description: string;
493
+ operation: string;
494
+ soapAction?: string;
495
+ body: string;
496
+ params: {
497
+ [key: string]: {
498
+ type: "string" | "number" | "integer" | "boolean";
499
+ description: string;
500
+ required: boolean;
501
+ limit?: string;
502
+ };
503
+ };
504
+ result?: string;
505
+ fields?: string[];
506
+ readOnly: boolean;
507
+ destructive: boolean;
508
+ answerLimits: {
509
+ field: string;
510
+ limit: string;
511
+ }[];
512
+ }[];
513
+ allowInsecureHttp: boolean;
514
+ };
515
+ odata?: {
516
+ serviceRoot: string;
517
+ version: "2" | "4";
518
+ auth: {
519
+ type: "header";
520
+ header: string;
521
+ value: string;
522
+ prefix?: string;
523
+ } | {
524
+ type: "bearer";
525
+ token: string;
526
+ } | {
527
+ type: "basic";
528
+ username: string;
529
+ password: string;
530
+ } | {
531
+ type: "oauth2";
532
+ tokenUrl: string;
533
+ clientId: string;
534
+ clientSecret: string;
535
+ scope?: string;
536
+ } | {
537
+ type: "query";
538
+ param: string;
539
+ value: string;
540
+ };
541
+ headers: {
542
+ [key: string]: string;
543
+ };
544
+ csrf: boolean;
545
+ paging: "skip" | "server";
546
+ tools: {
547
+ name: string;
548
+ description: string;
549
+ kind: "list" | "get" | "create" | "update" | "function" | "action";
550
+ entitySet?: string;
551
+ function?: string;
552
+ key: {
553
+ [key: string]: {
554
+ type: "string" | "integer" | "number" | "decimal" | "boolean" | "guid" | "datetime" | "datetimeoffset";
555
+ description: string;
556
+ property?: string;
557
+ required?: boolean;
558
+ limit?: string;
559
+ };
560
+ };
561
+ filters: {
562
+ [key: string]: {
563
+ type: "string" | "integer" | "number" | "decimal" | "boolean" | "guid" | "datetime" | "datetimeoffset";
564
+ description: string;
565
+ property?: string;
566
+ required?: boolean;
567
+ limit?: string;
568
+ op: "eq" | "ne" | "gt" | "ge" | "lt" | "le" | "contains" | "startswith";
569
+ };
570
+ };
571
+ fields: {
572
+ [key: string]: {
573
+ type: "string" | "integer" | "number" | "decimal" | "boolean" | "guid" | "datetime" | "datetimeoffset";
574
+ description: string;
575
+ property?: string;
576
+ required?: boolean;
577
+ limit?: string;
578
+ };
579
+ };
580
+ params: {
581
+ [key: string]: {
582
+ type: "string" | "integer" | "number" | "decimal" | "boolean" | "guid" | "datetime" | "datetimeoffset";
583
+ description: string;
584
+ property?: string;
585
+ required?: boolean;
586
+ limit?: string;
587
+ };
588
+ };
589
+ select: string[];
590
+ orderBy?: string;
591
+ top: number;
592
+ destructive: boolean;
593
+ answerLimits: {
594
+ field: string;
595
+ limit: string;
596
+ }[];
597
+ }[];
598
+ allowInsecureHttp: boolean;
599
+ };
600
+ sql?: {
601
+ engine: "postgres" | "sqlserver" | "mysql" | "oracle";
602
+ host: string;
603
+ port?: number;
604
+ database: string;
605
+ auth: {
606
+ user: string;
607
+ password: string;
608
+ };
609
+ tls: "verify" | "insecure" | "off";
610
+ timeoutSeconds: number;
611
+ maxRows: number;
612
+ tools: {
613
+ name: string;
614
+ description: string;
615
+ sql: string;
616
+ params: {
617
+ [key: string]: {
618
+ type: "string" | "number" | "integer" | "boolean";
619
+ description: string;
620
+ required: boolean;
621
+ limit?: string;
622
+ };
623
+ };
624
+ write: boolean;
625
+ destructive: boolean;
626
+ answerLimits: {
627
+ column: string;
628
+ limit: string;
629
+ }[];
630
+ }[];
631
+ };
632
+ events?: {
633
+ types: {
634
+ id: string;
635
+ label: string;
636
+ }[];
637
+ fields: {
638
+ [key: string]: string;
639
+ };
640
+ limits: {
641
+ [key: string]: string;
642
+ };
643
+ webhook?: {
644
+ verify: {
645
+ type: "hmac-sha256";
646
+ header: string;
647
+ prefix: string;
648
+ } | {
649
+ type: "token";
650
+ header: string;
651
+ } | {
652
+ type: "none";
653
+ };
654
+ allowInsecure: boolean;
655
+ type: {
656
+ field: string;
657
+ } | {
658
+ header: string;
659
+ };
660
+ deliveryId?: {
661
+ field: string;
662
+ } | {
663
+ header: string;
664
+ };
665
+ timestamp?: {
666
+ at: {
667
+ field: string;
668
+ } | {
669
+ header: string;
670
+ };
671
+ unit: "s" | "ms" | "iso";
672
+ toleranceSeconds: number;
673
+ };
674
+ setup: {
675
+ title: string;
676
+ body: string;
677
+ link?: {
678
+ label: string;
679
+ href: string;
680
+ };
681
+ copy?: string[];
682
+ shell?: "bash" | "powershell";
683
+ permissions?: boolean;
684
+ certificate?: boolean;
685
+ click?: string[];
686
+ clickUnavailable?: true;
687
+ siteRole?: "read" | "write";
688
+ agentCheck?: boolean;
689
+ confirm?: string;
690
+ live?: string;
691
+ settings?: {
692
+ id: string;
693
+ label: string;
694
+ help?: string;
695
+ placeholder?: string;
696
+ pattern: string;
697
+ }[];
698
+ option?: {
699
+ field: string;
700
+ value: string;
701
+ };
702
+ }[];
703
+ register?: {
704
+ method: "GET" | "POST" | "PUT";
705
+ path: string;
706
+ body?: unknown;
707
+ location: string;
708
+ };
709
+ };
710
+ self?: {
711
+ request: {
712
+ method: "GET" | "POST" | "PUT";
713
+ path: string;
714
+ body?: unknown;
715
+ };
716
+ id: string;
717
+ fields: string[];
718
+ };
719
+ poll?: {
720
+ request: {
721
+ method: "GET" | "POST" | "PUT";
722
+ path: string;
723
+ body?: unknown;
724
+ };
725
+ filter?: string;
726
+ items: string;
727
+ wrap?: string;
728
+ cursor: string;
729
+ deliveryId: string[];
730
+ types: {
731
+ type: string;
732
+ same?: [string, string];
733
+ }[];
734
+ };
735
+ };
736
+ }[];
737
+ steps: {
738
+ provider: string;
739
+ step: {
740
+ title: string;
741
+ body: string;
742
+ link?: {
743
+ label: string;
744
+ href: string;
745
+ };
746
+ copy?: string[];
747
+ shell?: "bash" | "powershell";
748
+ permissions?: boolean;
749
+ certificate?: boolean;
750
+ click?: string[];
751
+ clickUnavailable?: true;
752
+ siteRole?: "read" | "write";
753
+ agentCheck?: boolean;
754
+ confirm?: string;
755
+ live?: string;
756
+ settings?: {
757
+ id: string;
758
+ label: string;
759
+ help?: string;
760
+ placeholder?: string;
761
+ pattern: string;
762
+ }[];
763
+ option?: {
764
+ field: string;
765
+ value: string;
766
+ };
767
+ apps: string[];
768
+ };
769
+ }[];
770
+ bots: {
771
+ id: string;
772
+ name: string;
773
+ description: string;
774
+ logo: string;
775
+ identity: string;
776
+ signsInAs?: "agentBot";
777
+ provider?: string;
778
+ order?: number;
779
+ connectionKind: "guided";
780
+ accountKey: string;
781
+ scopes?: string[];
782
+ setup: {
783
+ title: string;
784
+ body: string;
785
+ link?: {
786
+ label: string;
787
+ href: string;
788
+ };
789
+ copy?: string[];
790
+ shell?: "bash" | "powershell";
791
+ permissions?: boolean;
792
+ certificate?: boolean;
793
+ click?: string[];
794
+ clickUnavailable?: true;
795
+ siteRole?: "read" | "write";
796
+ agentCheck?: boolean;
797
+ confirm?: string;
798
+ live?: string;
799
+ settings?: {
800
+ id: string;
801
+ label: string;
802
+ help?: string;
803
+ placeholder?: string;
804
+ pattern: string;
805
+ }[];
806
+ option?: {
807
+ field: string;
808
+ value: string;
809
+ };
810
+ capabilities?: string[];
811
+ }[];
812
+ afterConnect: {
813
+ title: string;
814
+ body: string;
815
+ link?: {
816
+ label: string;
817
+ href: string;
818
+ };
819
+ copy?: string[];
820
+ shell?: "bash" | "powershell";
821
+ permissions?: boolean;
822
+ certificate?: boolean;
823
+ click?: string[];
824
+ clickUnavailable?: true;
825
+ siteRole?: "read" | "write";
826
+ agentCheck?: boolean;
827
+ confirm?: string;
828
+ live?: string;
829
+ settings?: {
830
+ id: string;
831
+ label: string;
832
+ help?: string;
833
+ placeholder?: string;
834
+ pattern: string;
835
+ }[];
836
+ option?: {
837
+ field: string;
838
+ value: string;
839
+ };
840
+ capabilities?: string[];
841
+ }[];
842
+ fields: {
843
+ id: string;
844
+ label: string;
845
+ help?: string;
846
+ placeholder?: string;
847
+ secret: boolean;
848
+ options?: {
849
+ value: string;
850
+ label: string;
851
+ description: string;
852
+ scopes?: string[];
853
+ }[];
854
+ requires?: {
855
+ field: string;
856
+ value: string;
857
+ };
858
+ optional: boolean;
859
+ }[];
860
+ capabilities: {
861
+ id: string;
862
+ label: string;
863
+ description: string;
864
+ required: boolean;
865
+ destructive: boolean;
866
+ costs?: boolean;
867
+ scopes: string[];
868
+ roles?: string[];
869
+ permissions: string[];
870
+ fill?: {
871
+ [key: string]: string;
872
+ };
873
+ note?: string;
874
+ forbidden?: string;
875
+ claudeKey?: boolean;
876
+ tools: string[];
877
+ }[];
878
+ limits: {
879
+ id: string;
880
+ label: string;
881
+ help: string;
882
+ kind: "list" | "text" | "map";
883
+ required: boolean;
884
+ pattern?: string;
885
+ keys?: string;
886
+ }[];
887
+ siteAccess?: {
888
+ grant: {
889
+ title: string;
890
+ body: string;
891
+ link?: {
892
+ label: string;
893
+ href: string;
894
+ };
895
+ copy?: string[];
896
+ shell?: "bash" | "powershell";
897
+ permissions?: boolean;
898
+ certificate?: boolean;
899
+ click?: string[];
900
+ clickUnavailable?: true;
901
+ siteRole?: "read" | "write";
902
+ agentCheck?: boolean;
903
+ confirm?: string;
904
+ live?: string;
905
+ settings?: {
906
+ id: string;
907
+ label: string;
908
+ help?: string;
909
+ placeholder?: string;
910
+ pattern: string;
911
+ }[];
912
+ option?: {
913
+ field: string;
914
+ value: string;
915
+ };
916
+ }[];
917
+ request: string;
918
+ write: string[];
919
+ };
920
+ agentAccess?: {
921
+ limit: string;
922
+ label: string;
923
+ path: string & (unknown & unknown);
924
+ granted: string;
925
+ notGranted: string;
926
+ notFound: string;
927
+ probes: {
928
+ [key: string]: {
929
+ method: "GET" | "POST" | "PATCH";
930
+ path: string & (unknown & unknown);
931
+ body?: unknown;
932
+ allowed: number[];
933
+ };
934
+ };
935
+ missing?: string;
936
+ };
937
+ verify: {
938
+ method: "GET" | "POST";
939
+ path: string;
940
+ label: string;
941
+ show: string;
942
+ name?: string;
943
+ match?: {
944
+ [key: string]: string | number | boolean;
945
+ };
946
+ body?: {
947
+ [key: string]: unknown;
948
+ };
949
+ ifEmpty
950
+ /** A step whose text fills in a value saved at another step waits until it is saved: its
951
+ * words would show the raw {name} and its commands would not run. */
952
+ ? /** A step whose text fills in a value saved at another step waits until it is saved: its
953
+ * words would show the raw {name} and its commands would not run. */: string;
954
+ } | {
955
+ label: string;
956
+ check: string;
957
+ ifEmpty?: string;
958
+ };
959
+ discover?: {
960
+ method: "GET" | "POST";
961
+ path: string;
962
+ label: string;
963
+ show: string;
964
+ name?: string;
965
+ match?: {
966
+ [key: string]: string | number | boolean;
967
+ };
968
+ body?: {
969
+ [key: string]: unknown;
970
+ };
971
+ ifEmpty?: string;
972
+ } | {
973
+ label: string;
974
+ check: string;
975
+ ifEmpty?: string;
976
+ };
977
+ revoke: string;
978
+ http?: {
979
+ baseUrl: string;
980
+ auth: {
981
+ type: "header";
982
+ header: string;
983
+ value: string;
984
+ prefix?: string;
985
+ } | {
986
+ type: "bearer";
987
+ token: string;
988
+ } | {
989
+ type: "basic";
990
+ username: string;
991
+ password: string;
992
+ } | {
993
+ type: "oauth2";
994
+ tokenUrl: string;
995
+ clientId: string;
996
+ clientSecret: string;
997
+ scope?: string;
998
+ } | {
999
+ type: "query";
1000
+ param: string;
1001
+ value: string;
1002
+ };
1003
+ headers: {
1004
+ [key: string]: string;
1005
+ };
1006
+ tools: {
1007
+ name: string;
1008
+ description: string;
1009
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
1010
+ path: string;
1011
+ params: {
1012
+ [key: string]: {
1013
+ type: "string" | "number" | "integer" | "boolean" | "array";
1014
+ description: string;
1015
+ in: "path" | "query" | "body";
1016
+ name?: string;
1017
+ required: boolean;
1018
+ default?: (string | number | boolean) | (string | number | boolean)[];
1019
+ enum?: (string | number | boolean)[];
1020
+ items?: "string" | "number" | "integer" | "boolean";
1021
+ join?: string;
1022
+ limit?: string;
1023
+ };
1024
+ };
1025
+ destructive: boolean;
1026
+ answerLimits: {
1027
+ field: string;
1028
+ limit: string;
1029
+ }[];
1030
+ result?: {
1031
+ items?: string;
1032
+ fields?: string[];
1033
+ };
1034
+ paging?: {
1035
+ param: string;
1036
+ body: string;
1037
+ } | {
1038
+ param: string;
1039
+ header: string;
1040
+ } | {
1041
+ param: string;
1042
+ link: true;
1043
+ };
1044
+ }[];
1045
+ allowInsecureHttp: boolean;
1046
+ };
1047
+ soap?: {
1048
+ endpoint: string;
1049
+ version: "1.1" | "1.2";
1050
+ namespaces: {
1051
+ [key: string]: string;
1052
+ };
1053
+ auth?: {
1054
+ type: "header";
1055
+ header: string;
1056
+ value: string;
1057
+ prefix?: string;
1058
+ } | {
1059
+ type: "bearer";
1060
+ token: string;
1061
+ } | {
1062
+ type: "basic";
1063
+ username: string;
1064
+ password: string;
1065
+ };
1066
+ wsSecurity?: {
1067
+ username: string;
1068
+ password: string;
1069
+ digest: boolean;
1070
+ };
1071
+ verify?: {
1072
+ tool: string;
1073
+ args: {
1074
+ [key: string]: string | number | boolean;
1075
+ };
1076
+ show: string;
1077
+ };
1078
+ tools: {
1079
+ name: string;
1080
+ description: string;
1081
+ operation: string;
1082
+ soapAction?: string;
1083
+ body: string;
1084
+ params: {
1085
+ [key: string]: {
1086
+ type: "string" | "number" | "integer" | "boolean";
1087
+ description: string;
1088
+ required: boolean;
1089
+ limit?: string;
1090
+ };
1091
+ };
1092
+ result?: string;
1093
+ fields?: string[];
1094
+ readOnly: boolean;
1095
+ destructive: boolean;
1096
+ answerLimits: {
1097
+ field: string;
1098
+ limit: string;
1099
+ }[];
1100
+ }[];
1101
+ allowInsecureHttp: boolean;
1102
+ };
1103
+ odata?: {
1104
+ serviceRoot: string;
1105
+ version: "2" | "4";
1106
+ auth: {
1107
+ type: "header";
1108
+ header: string;
1109
+ value: string;
1110
+ prefix?: string;
1111
+ } | {
1112
+ type: "bearer";
1113
+ token: string;
1114
+ } | {
1115
+ type: "basic";
1116
+ username: string;
1117
+ password: string;
1118
+ } | {
1119
+ type: "oauth2";
1120
+ tokenUrl: string;
1121
+ clientId: string;
1122
+ clientSecret: string;
1123
+ scope?: string;
1124
+ } | {
1125
+ type: "query";
1126
+ param: string;
1127
+ value: string;
1128
+ };
1129
+ headers: {
1130
+ [key: string]: string;
1131
+ };
1132
+ csrf: boolean;
1133
+ paging: "skip" | "server";
1134
+ tools: {
1135
+ name: string;
1136
+ description: string;
1137
+ kind: "list" | "get" | "create" | "update" | "function" | "action";
1138
+ entitySet?: string;
1139
+ function?: string;
1140
+ key: {
1141
+ [key: string]: {
1142
+ type: "string" | "integer" | "number" | "decimal" | "boolean" | "guid" | "datetime" | "datetimeoffset";
1143
+ description: string;
1144
+ property?: string;
1145
+ required?: boolean;
1146
+ limit?: string;
1147
+ };
1148
+ };
1149
+ filters: {
1150
+ [key: string]: {
1151
+ type: "string" | "integer" | "number" | "decimal" | "boolean" | "guid" | "datetime" | "datetimeoffset";
1152
+ description: string;
1153
+ property?: string;
1154
+ required?: boolean;
1155
+ limit?: string;
1156
+ op: "eq" | "ne" | "gt" | "ge" | "lt" | "le" | "contains" | "startswith";
1157
+ };
1158
+ };
1159
+ fields: {
1160
+ [key: string]: {
1161
+ type: "string" | "integer" | "number" | "decimal" | "boolean" | "guid" | "datetime" | "datetimeoffset";
1162
+ description: string;
1163
+ property?: string;
1164
+ required?: boolean;
1165
+ limit?: string;
1166
+ };
1167
+ };
1168
+ params: {
1169
+ [key: string]: {
1170
+ type: "string" | "integer" | "number" | "decimal" | "boolean" | "guid" | "datetime" | "datetimeoffset";
1171
+ description: string;
1172
+ property?: string;
1173
+ required?: boolean;
1174
+ limit?: string;
1175
+ };
1176
+ };
1177
+ select: string[];
1178
+ orderBy?: string;
1179
+ top: number;
1180
+ destructive: boolean;
1181
+ answerLimits: {
1182
+ field: string;
1183
+ limit: string;
1184
+ }[];
1185
+ }[];
1186
+ allowInsecureHttp: boolean;
1187
+ };
1188
+ sql?: {
1189
+ engine: "postgres" | "sqlserver" | "mysql" | "oracle";
1190
+ host: string;
1191
+ port?: number;
1192
+ database: string;
1193
+ auth: {
1194
+ user: string;
1195
+ password: string;
1196
+ };
1197
+ tls: "verify" | "insecure" | "off";
1198
+ timeoutSeconds: number;
1199
+ maxRows: number;
1200
+ tools: {
1201
+ name: string;
1202
+ description: string;
1203
+ sql: string;
1204
+ params: {
1205
+ [key: string]: {
1206
+ type: "string" | "number" | "integer" | "boolean";
1207
+ description: string;
1208
+ required: boolean;
1209
+ limit?: string;
1210
+ };
1211
+ };
1212
+ write: boolean;
1213
+ destructive: boolean;
1214
+ answerLimits: {
1215
+ column: string;
1216
+ limit: string;
1217
+ }[];
1218
+ }[];
1219
+ };
1220
+ events?: {
1221
+ types: {
1222
+ id: string;
1223
+ label: string;
1224
+ }[];
1225
+ fields: {
1226
+ [key: string]: string;
1227
+ };
1228
+ limits: {
1229
+ [key: string]: string;
1230
+ };
1231
+ webhook?: {
1232
+ verify: {
1233
+ type: "hmac-sha256";
1234
+ header: string;
1235
+ prefix: string;
1236
+ } | {
1237
+ type: "token";
1238
+ header: string;
1239
+ } | {
1240
+ type: "none";
1241
+ };
1242
+ allowInsecure: boolean;
1243
+ type: {
1244
+ field: string;
1245
+ } | {
1246
+ header: string;
1247
+ };
1248
+ deliveryId?: {
1249
+ field: string;
1250
+ } | {
1251
+ header: string;
1252
+ };
1253
+ timestamp?: {
1254
+ at: {
1255
+ field: string;
1256
+ } | {
1257
+ header: string;
1258
+ };
1259
+ unit: "s" | "ms" | "iso";
1260
+ toleranceSeconds: number;
1261
+ };
1262
+ setup: {
1263
+ title: string;
1264
+ body: string;
1265
+ link?: {
1266
+ label: string;
1267
+ href: string;
1268
+ };
1269
+ copy?: string[];
1270
+ shell?: "bash" | "powershell";
1271
+ permissions?: boolean;
1272
+ certificate?: boolean;
1273
+ click?: string[];
1274
+ clickUnavailable?: true;
1275
+ siteRole?: "read" | "write";
1276
+ agentCheck?: boolean;
1277
+ confirm?: string;
1278
+ live?: string;
1279
+ settings?: {
1280
+ id: string;
1281
+ label: string;
1282
+ help?: string;
1283
+ placeholder?: string;
1284
+ pattern: string;
1285
+ }[];
1286
+ option?: {
1287
+ field: string;
1288
+ value: string;
1289
+ };
1290
+ }[];
1291
+ register?: {
1292
+ method: "GET" | "POST" | "PUT";
1293
+ path: string;
1294
+ body?: unknown;
1295
+ location: string;
1296
+ };
1297
+ };
1298
+ self?: {
1299
+ request: {
1300
+ method: "GET" | "POST" | "PUT";
1301
+ path: string;
1302
+ body?: unknown;
1303
+ };
1304
+ id: string;
1305
+ fields: string[];
1306
+ };
1307
+ poll?: {
1308
+ request: {
1309
+ method: "GET" | "POST" | "PUT";
1310
+ path: string;
1311
+ body?: unknown;
1312
+ };
1313
+ filter?: string;
1314
+ items: string;
1315
+ wrap?: string;
1316
+ cursor: string;
1317
+ deliveryId: string[];
1318
+ types: {
1319
+ type: string;
1320
+ same?: [string, string];
1321
+ }[];
1322
+ };
1323
+ };
1324
+ }[];
1325
+ };
1326
+ /** The list limits a new key must be given for an app before it is made (e.g. SharePoint's
1327
+ * sites): required, and not the agent's own address, which comes from its email. */
1328
+ export declare function newKeyLimits(c: Connector): Connector["limits"];
1329
+ /** "App: Limit" for each required list limit still empty on a new key's ticked apps. */
1330
+ export declare function missingNewKeyLimits(ticked: Connector[], chosen: Record<string, Limits>): string[];
1331
+ /** The grants a new key starts with: each ticked app at what its page allows (its ceiling),
1332
+ * with the limits chosen on the form, and the agent's email as its address where the app
1333
+ * has one. */
1334
+ export declare function newKeyGrants(ticked: {
1335
+ connector: Connector;
1336
+ ceiling: string[];
1337
+ }[], email: string, chosen: Record<string, Limits>): {
1338
+ app: string;
1339
+ capabilities: string[];
1340
+ limits: Limits;
1341
+ }[];
1342
+ /** The keys whose `limit` (an agent's own address) is `value`, in any app. */
1343
+ export declare function keysWithAddress(agents: Agent[], connectors: Connector[], value: string): Agent[];
1344
+ /** The warning that active keys already hold an address, or null. */
1345
+ export declare function holdersNotice(holders: Agent[]): string | null;
1346
+ /** A numbered setup step: done (checked live), failing, not done yet, or marked done by the
1347
+ * admin. `confirm`: the service cannot check it, so the admin marks it. `locked`: an earlier step
1348
+ * it needs is not done yet. */
1349
+ export type StepStatus = {
1350
+ /** checking: its live check has not answered yet (the page shows before it does). */
1351
+ state: "done" | "failing" | "todo" | "marked" | "checking";
1352
+ confirm: boolean;
1353
+ detail: string;
1354
+ locked: boolean;
1355
+ /** Why it is locked, when that is more than the step before it. */
1356
+ why?: string;
1357
+ };
1358
+ /** Connecting a provider, before any app: its setup steps (registering its app, which only the
1359
+ * sign-in can prove, so the admin marks it; the certificate, made here, its upload proven by
1360
+ * the sign-in), then connecting, a live sign-in. Each step opens once the one before it
1361
+ * passes. `marks`: the steps the admin marked done; `secret`: the admin chose a client secret
1362
+ * over the certificate. */
1363
+ export declare function providerSteps(setup: Step[], connection: ProviderConnection | null, marks: string[], secret: boolean): StepStatus[];
1364
+ /** One numbered step on a provider app's page, in order: what agents may do, the app's setup
1365
+ * steps (all before turning on: they need only the provider's app ids), the Claude key a
1366
+ * ticked capability needs, turning it on, then what needs it on: its sites, and with
1367
+ * the shared app the steps the service cannot check. Turning on stays locked until every
1368
+ * step before it the admin confirms is marked, and reads as done only once every step is. */
1369
+ export type AppStep = {
1370
+ id: string;
1371
+ kind: "capabilities" | "setup" | "turnOn" | "sites" | "claudeKey";
1372
+ title: string;
1373
+ step?: Step;
1374
+ status: StepStatus;
1375
+ };
1376
+ export declare function appSteps(input: {
1377
+ connector: Connector;
1378
+ connection: Connection | null;
1379
+ /** The provider connection signs in, or the shared app is approved on turning on. */
1380
+ providerReady: boolean;
1381
+ /** Turning on approves the shared app, which asks for the app's permissions itself:
1382
+ * only the steps the service cannot check stay, after turning on (they need the app's ids). */
1383
+ approval?: boolean;
1384
+ /** The app's live check, run when its page loads. */
1385
+ health: CheckOutcome | null;
1386
+ /** The ceiling as ticked on the page. */
1387
+ ceiling: string[];
1388
+ /** Each added site's live access, for an app with `siteAccess`. */
1389
+ sites: SiteAccess[] | null;
1390
+ claudeKey: boolean;
1391
+ /** The `confirm` ids the admin marked done. */
1392
+ marks: string[];
1393
+ /** The set-up-once steps' own live checks (`Step.live`), null when they could not run. */
1394
+ live?: Record<string, LiveCheck> | null;
1395
+ /** The live checks have not answered yet: the steps they decide show as checking. */
1396
+ checking?: boolean;
1397
+ /** Values saved at steps with `settings` (the provider connection's config). */
1398
+ saved?: Record<string, string>;
1399
+ /** The choice fields as typed or stored: a step with `option` shows only while chosen. */
1400
+ choices?: Record<string, string>;
1401
+ }): AppStep[];
1402
+ /** A step whose text fills in a value saved at another step waits until it is saved: its
1403
+ * words would show the raw {name} and its commands would not run. */
1404
+ export declare function waitForSettings(steps: AppStep[], saved: Record<string, string>): AppStep[];
1405
+ /** The status an app's page shows by its name: needing steps while it is on but any step is
1406
+ * not done. */
1407
+ export declare function appPageStatus(connection: Connection | null, healthy: boolean, steps: AppStep[]): AppStatus;
1408
+ /** What an app's steps are checked against, read live and read only when a page loads
1409
+ * (`appStates` in agent-connect.ts). `health` or `sites` null: that check could not run. */
1410
+ export type AppLive = {
1411
+ health: CheckOutcome | null;
1412
+ sites: SiteAccess[] | null;
1413
+ claudeKey: boolean;
1414
+ live: Record<string, LiveCheck> | null;
1415
+ /** Not read yet: the page shows before its live checks answer (`CHECKING`). */
1416
+ checking?: true;
1417
+ };
1418
+ /** An app's live state before its checks answer: steps they decide show as checking, and its
1419
+ * status is the stored one. */
1420
+ export declare const CHECKING: AppLive;
1421
+ /** How a provider's app signs in: through the provider connection, or (nothing connected yet,
1422
+ * where the shared app is offered) by approving that app when turning it on. */
1423
+ export declare function signInRoute(definition: Provider, provider: ProviderConnection | null): {
1424
+ signsIn: boolean;
1425
+ approve: boolean;
1426
+ };
1427
+ /** A provider app's steps and status: the one computation behind its page's badge, its row on
1428
+ * the provider's page and the provider's header and card, so none contradicts another. A
1429
+ * check that could not run needs attention. `ceiling` and `choices`: as ticked and typed on
1430
+ * the app's page, else as saved. */
1431
+ export declare function appState(input: {
1432
+ definition: Provider;
1433
+ provider: ProviderConnection | null;
1434
+ connector: Connector;
1435
+ connection: Connection | null;
1436
+ state: AppLive;
1437
+ marks: string[];
1438
+ ceiling?: string[];
1439
+ choices?: Record<string, string>;
1440
+ }): {
1441
+ steps: AppStep[];
1442
+ status: AppStatus;
1443
+ };
1444
+ /** A key's own addresses (its mailbox), per app that has one, e.g. for its access checks. */
1445
+ export declare function agentAddresses(agent: Agent, connectors: Connector[]): {
1446
+ connector: Connector;
1447
+ value: string;
1448
+ }[];