esoul-sdk 0.23.0 → 0.25.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.
- package/CHANGELOG.md +43 -0
- package/README.md +23 -6
- package/api-reference.md +214 -18
- package/dist/agent-wait.d.ts +47 -0
- package/dist/agent-wait.js +47 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/machine/shell.js +2 -2
- package/dist/manifest.d.ts +1157 -75
- package/dist/manifest.js +175 -17
- package/dist/react.d.ts +13 -6
- package/dist/react.js +2 -2
- package/dist/server.d.ts +84 -9
- package/dist/server.js +29 -2
- package/dist/testing/credentials.d.ts +42 -0
- package/dist/testing/credentials.js +73 -0
- package/dist/testing/index.d.ts +2 -0
- package/dist/testing/index.js +1 -0
- package/docs/02-manifest.md +11 -3
- package/docs/04-tools.md +33 -0
- package/docs/05-ui.md +25 -0
- package/docs/06-server.md +52 -7
- package/docs/08-connections.md +322 -105
- package/docs/10-testing.md +29 -0
- package/docs/18-your-computer.md +35 -13
- package/docs/20-a-service-on-your-computer.md +291 -0
- package/llms-full.txt +825 -134
- package/llms.txt +11 -8
- package/package.json +1 -1
- package/schemas/plugin.schema.json +240 -35
- package/scripts/build-llms.mjs +5 -3
package/api-reference.md
CHANGED
|
@@ -7,11 +7,27 @@ the complete list it teaches from. In a Forge workbench the source itself is rea
|
|
|
7
7
|
Regenerate: `npm run docs:api`.
|
|
8
8
|
|
|
9
9
|
==============================================================================
|
|
10
|
-
## `esoul-sdk` —
|
|
10
|
+
## `esoul-sdk` — 265 exports
|
|
11
11
|
|
|
12
12
|
Manifest, events, tools, ops, bindings, contracts, charts, access words — what app.tsx and the shared modules import.
|
|
13
13
|
|
|
14
|
-
### Functions and values (
|
|
14
|
+
### Functions and values (159)
|
|
15
|
+
|
|
16
|
+
#### `ApiKeyCredentialSlotSchema` — const · src/manifest.ts
|
|
17
|
+
|
|
18
|
+
An `apiKey` slot: a key the person pastes.
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
const ApiKeyCredentialSlotSchema: z.ZodObject<{ family: z.ZodLiteral<"apiKey">; provider: z.ZodEffects<z.ZodObject<{ name: z.ZodString; hosts: z.ZodArray<z.ZodString, "many">; header: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>; prefix: z.ZodOptional<z.ZodString>; keyHelp: z.ZodOptional<z.ZodString>; verifyUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>; }, "strict", z.ZodTypeAny, { name?: string; hosts?: string[]; header?: string; prefix?: string; keyHelp?: string; verifyUrl?: string; }, { name?: string; hosts?: string[]; header?: string; prefix?: string; keyHelp?: string; verifyUrl?: string; }>, { name?: string; hosts?: string[]; header?: string; prefix?: string; keyHelp?: string; verifyUrl?: string; }, { name?: string; hosts?: string[]; header?: string; prefix?: string; keyHelp?: string; verifyUrl?: string; }>; label: z.ZodOptional<z.ZodString>; why: z.ZodString; background: z.ZodOptional<z.ZodBoolean>; }, "strict", z.ZodTypeAny, { family?: "apiKey"; provider?: { name?: string; hosts?: string[]; header?: string; prefix?: string; keyHelp?: string; verifyUrl?: string; }; label?: string; why?: string; background?: boolean; }, { family?: "apiKey"; provider?: { name?: string; hosts?: string[]; header?: string; prefix?: string; keyHelp?: string; verifyUrl?: string; }; label?: string; why?: string; background?: boolean; }>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
#### `ApiKeyProviderSchema` — const · src/manifest.ts
|
|
25
|
+
|
|
26
|
+
The service an `apiKey` slot sends a pasted key to.
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
const ApiKeyProviderSchema: z.ZodEffects<z.ZodObject<{ name: z.ZodString; hosts: z.ZodArray<z.ZodString, "many">; header: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>; prefix: z.ZodOptional<z.ZodString>; keyHelp: z.ZodOptional<z.ZodString>; verifyUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>; }, "strict", z.ZodTypeAny, { name?: string; hosts?: string[]; header?: string; prefix?: string; keyHelp?: string; verifyUrl?: string; }, { name?: string; hosts?: string[]; header?: string; prefix?: string; keyHelp?: string; verifyUrl?: string; }>, { name?: string; hosts?: string[]; header?: string; prefix?: string; keyHelp?: string; verifyUrl?: string; }, { name?: string; hosts?: string[]; header?: string; prefix?: string; keyHelp?: string; verifyUrl?: string; }>
|
|
30
|
+
```
|
|
15
31
|
|
|
16
32
|
#### `ASSET_APP_MAX_BYTES` — const · src/assets.ts
|
|
17
33
|
|
|
@@ -223,10 +239,18 @@ function compileEnvelope( raw: CustomRolesEnvelopeRaw | undefined, models: Recor
|
|
|
223
239
|
|
|
224
240
|
#### `CREDENTIAL_FAMILIES` — const · src/manifest.ts
|
|
225
241
|
|
|
226
|
-
|
|
242
|
+
THE PERSON'S ACCOUNTS — used by an app without the app ever holding them.
|
|
243
|
+
|
|
244
|
+
```ts
|
|
245
|
+
const CREDENTIAL_FAMILIES: readonly ["google", "oauth2", "apiKey"]
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
#### `CREDENTIAL_HOST_RE` — const · src/manifest.ts
|
|
249
|
+
|
|
250
|
+
An API host an `oauth2` or `apiKey` secret may be sent to: a DNS name (`graph.microsoft.com`), lower-case, no scheme, no port, no IP address, no `localhost`.
|
|
227
251
|
|
|
228
252
|
```ts
|
|
229
|
-
const
|
|
253
|
+
const CREDENTIAL_HOST_RE: RegExp
|
|
230
254
|
```
|
|
231
255
|
|
|
232
256
|
#### `CREDENTIAL_SLOT_RE` — const · src/manifest.ts
|
|
@@ -237,6 +261,14 @@ Slot names: lower-case words joined by `-` (`mailbox`, `work-calendar`).
|
|
|
237
261
|
const CREDENTIAL_SLOT_RE: RegExp
|
|
238
262
|
```
|
|
239
263
|
|
|
264
|
+
#### `credentialProviderKey` — function · src/manifest.ts
|
|
265
|
+
|
|
266
|
+
Which accounts serve a slot: accounts of one provider are interchangeable between apps. `oauth2` — the sign-in AND token endpoints (lower-case host, path), so a slot that points either one somewhere else is another provider and never reuses a person's client or account; `apiKey` — the sorted host list. Pure, so the platform, the box and the SDK agree.
|
|
267
|
+
|
|
268
|
+
```ts
|
|
269
|
+
function credentialProviderKey(slot: { family: string; provider?: { authorizeUrl?: string; tokenUrl?: string; hosts?: readonly string[] } }): string | null
|
|
270
|
+
```
|
|
271
|
+
|
|
240
272
|
#### `currentShareId` — function · src/helpers.ts
|
|
241
273
|
|
|
242
274
|
The public share this page is being viewed through, or null.
|
|
@@ -485,6 +517,14 @@ Granted with every sign-in; never declared, never counted as missing.
|
|
|
485
517
|
const GOOGLE_IMPLICIT_SCOPES: readonly ["openid", "email", "profile"]
|
|
486
518
|
```
|
|
487
519
|
|
|
520
|
+
#### `GoogleCredentialSlotSchema` — const · src/manifest.ts
|
|
521
|
+
|
|
522
|
+
A `google` slot of a manifest's `credentials` block.
|
|
523
|
+
|
|
524
|
+
```ts
|
|
525
|
+
const GoogleCredentialSlotSchema: z.ZodObject<{ family: z.ZodLiteral<"google">; scopes: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>; label: z.ZodOptional<z.ZodString>; why: z.ZodString; background: z.ZodOptional<z.ZodBoolean>; }, "strict", z.ZodTypeAny, { family?: "google"; label?: string; why?: string; background?: boolean; scopes?: string[]; }, { family?: "google"; label?: string; why?: string; background?: boolean; scopes?: string[]; }>
|
|
526
|
+
```
|
|
527
|
+
|
|
488
528
|
#### `handleOp` — function · src/ops.ts
|
|
489
529
|
|
|
490
530
|
Wrap an op so it receives PARSED input and refuses what does not fit. A missing body is `{}`, so an op declared `z.object({})` is called with no arguments the way `callPluginOp(id, "browse", nodeId)` calls it.
|
|
@@ -621,6 +661,14 @@ A gateway model id: `provider/model` ("deepseek/deepseek-v3.2").
|
|
|
621
661
|
const LLM_MODEL_ID_RE: RegExp
|
|
622
662
|
```
|
|
623
663
|
|
|
664
|
+
#### `mailWaitDirective` — function · src/agent-wait.ts
|
|
665
|
+
|
|
666
|
+
The wait's event, for the toolkit's `eventCallback`. Throws on a malformed wait.
|
|
667
|
+
|
|
668
|
+
```ts
|
|
669
|
+
function mailWaitDirective(runCtx: AgentRunToolContext, a: MailWaitArgs): Record<string, unknown>
|
|
670
|
+
```
|
|
671
|
+
|
|
624
672
|
#### `makeOpTool` — function · src/ops.ts
|
|
625
673
|
|
|
626
674
|
`opTool`, bound to a caller. The package binds its own `callPluginOp`; the platform binds the one that carries the acting viewer and targets this deployment — same tool, different wire, decided once at the index.
|
|
@@ -757,6 +805,22 @@ function normaliseGoogleScope(scope: string): string | "implicit" | null
|
|
|
757
805
|
function normaliseTransferPath(path: string | undefined | null): string
|
|
758
806
|
```
|
|
759
807
|
|
|
808
|
+
#### `OAuth2CredentialSlotSchema` — const · src/manifest.ts
|
|
809
|
+
|
|
810
|
+
An `oauth2` slot: any OAuth 2.0 provider.
|
|
811
|
+
|
|
812
|
+
```ts
|
|
813
|
+
const OAuth2CredentialSlotSchema: z.ZodObject<{ family: z.ZodLiteral<"oauth2">; provider: z.ZodEffects<z.ZodObject<{ name: z.ZodString; authorizeUrl: z.ZodEffects<z.ZodString, string, string>; tokenUrl: z.ZodEffects<z.ZodString, string, string>; scopes: z.ZodArray<z.ZodString, "many">; hosts: z.ZodArray<z.ZodString, "many">; accountUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>; accountField: z.ZodOptional<z.ZodString>; authorizeParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; tokenAuth: z.ZodOptional<z.ZodEnum<["body", "basic"]>>; clientIdEnv: z.ZodOptional<z.ZodString>; clientSecretEnv: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { name?: string; hosts?: string[]; scopes?: string[]; authorizeUrl?: string; tokenUrl?: string; accountUrl?: string; accountField?: string; authorizeParams?: Record<string, string>; tokenAuth?: "body" | "basic"; clientIdEnv?: string; clientSecretEnv?: string; }, { name?: string; hosts?: string[]; scopes?: string[]; authorizeUrl?: string; tokenUrl?: string; accountUrl?: string; accountField?: string; authorizeParams?: Record<string, string>; tokenAuth?: "body" | "basic"; clientIdEnv?: string; clientSecretEnv?: string; }>, { name?: string; hosts?: string[]; scopes?: string[]; authorizeUrl?: string; tokenUrl?: string; accountUrl?: string; accountField?: string; authorizeParams?: Record<string, string>; tokenAuth?: "body" | "basic"; clientIdEnv?: string; clientSecretEnv?: string; }, { name?: string; hosts?: string[]; scopes?: string[]; authorizeUrl?: string; tokenUrl?: string; accountUrl?: string; accountField?: string; authorizeParams?: Record<string, string>; tokenAuth?: "body" | "basic"; clientIdEnv?: string; clientSecretEnv?: string; }>; label: z.ZodOptional<z.ZodString>; why: z.ZodString; background: z.ZodOptional<z.ZodBoolean>; }, "strict", z.ZodTypeAny, { family?: "oauth2"; provider?: { name?: string; hosts?: string[]; scopes?: string[]; authorizeUrl?: string; tokenUrl?: string; accountUrl?: string; accountField?: string; authorizeParams?: Record<string, string>; tokenAuth?: "body" | "basic"; clientIdEnv?: string; clientSecretEnv?: string; }; label?: string; why?: string; background?: boolean; }, { family?: "oauth2"; provider?: { name?: string; hosts?: string[]; scopes?: string[]; authorizeUrl?: string; tokenUrl?: string; accountUrl?: string; accountField?: string; authorizeParams?: Record<string, string>; tokenAuth?: "body" | "basic"; clientIdEnv?: string; clientSecretEnv?: string; }; label?: string; why?: string; background?: boolean; }>
|
|
814
|
+
```
|
|
815
|
+
|
|
816
|
+
#### `OAuth2ProviderSchema` — const · src/manifest.ts
|
|
817
|
+
|
|
818
|
+
The OAuth 2.0 provider an `oauth2` slot signs in with.
|
|
819
|
+
|
|
820
|
+
```ts
|
|
821
|
+
const OAuth2ProviderSchema: z.ZodEffects<z.ZodObject<{ name: z.ZodString; authorizeUrl: z.ZodEffects<z.ZodString, string, string>; tokenUrl: z.ZodEffects<z.ZodString, string, string>; scopes: z.ZodArray<z.ZodString, "many">; hosts: z.ZodArray<z.ZodString, "many">; accountUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>; accountField: z.ZodOptional<z.ZodString>; authorizeParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; tokenAuth: z.ZodOptional<z.ZodEnum<["body", "basic"]>>; clientIdEnv: z.ZodOptional<z.ZodString>; clientSecretEnv: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { name?: string; hosts?: string[]; scopes?: string[]; authorizeUrl?: string; tokenUrl?: string; accountUrl?: string; accountField?: string; authorizeParams?: Record<string, string>; tokenAuth?: "body" | "basic"; clientIdEnv?: string; clientSecretEnv?: string; }, { name?: string; hosts?: string[]; scopes?: string[]; authorizeUrl?: string; tokenUrl?: string; accountUrl?: string; accountField?: string; authorizeParams?: Record<string, string>; tokenAuth?: "body" | "basic"; clientIdEnv?: string; clientSecretEnv?: string; }>, { name?: string; hosts?: string[]; scopes?: string[]; authorizeUrl?: string; tokenUrl?: string; accountUrl?: string; accountField?: string; authorizeParams?: Record<string, string>; tokenAuth?: "body" | "basic"; clientIdEnv?: string; clientSecretEnv?: string; }, { name?: string; hosts?: string[]; scopes?: string[]; authorizeUrl?: string; tokenUrl?: string; accountUrl?: string; accountField?: string; authorizeParams?: Record<string, string>; tokenAuth?: "body" | "basic"; clientIdEnv?: string; clientSecretEnv?: string; }>
|
|
822
|
+
```
|
|
823
|
+
|
|
760
824
|
#### `OpInputError` — class · src/ops.ts
|
|
761
825
|
|
|
762
826
|
What a handler throws when the call does not fit the declared input. The platform's op routes answer it as `invalid` (400) — the same code the door uses for a malformed call — so a tool relays "add-product does not take imageUrl" rather than a 502 with a zod dump in it.
|
|
@@ -767,7 +831,7 @@ class OpInputError extends Error { … }
|
|
|
767
831
|
|
|
768
832
|
#### `opTool` — const · src/index.ts
|
|
769
833
|
|
|
770
|
-
The agent tool for one op, declared once: `opTool(ops
|
|
834
|
+
The agent tool for one op, declared once: `opTool(ops, "play", { pluginId, nodeId, description, say })` in app.tsx gives a tool whose parameters ARE the op's zod input and whose call goes to `callPluginOp` — as the acting viewer on the platform, over the preview's own route in a Forge box. `say` turns the op's result into the words the model reads.
|
|
771
835
|
|
|
772
836
|
```ts
|
|
773
837
|
const opTool: <T extends OpInputs, K extends keyof T & string, R = unknown>(ops: T, name: K, cfg: OpToolConfig<T[K], R>) => DerivedTool
|
|
@@ -890,7 +954,7 @@ class PluginCallError extends Error { … }
|
|
|
890
954
|
The zod schema one entry of a manifest's `connections` must satisfy.
|
|
891
955
|
|
|
892
956
|
```ts
|
|
893
|
-
const PluginConnectionSchema: z.ZodEffects<z.ZodObject<{ key: z.ZodString; kind: z.ZodEnum<["oauth2", "apiKey"]>; label: z.ZodString; description: z.ZodOptional<z.ZodString>; authorizeUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>; tokenUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>; oauthScopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; clientIdEnv: z.ZodOptional<z.ZodString>; clientSecretEnv: z.ZodOptional<z.ZodString>; headerNames: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strict", z.ZodTypeAny, {
|
|
957
|
+
const PluginConnectionSchema: z.ZodEffects<z.ZodObject<{ key: z.ZodString; kind: z.ZodEnum<["oauth2", "apiKey"]>; label: z.ZodString; description: z.ZodOptional<z.ZodString>; authorizeUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>; tokenUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>; oauthScopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; clientIdEnv: z.ZodOptional<z.ZodString>; clientSecretEnv: z.ZodOptional<z.ZodString>; headerNames: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strict", z.ZodTypeAny, { label?: string; authorizeUrl?: string; tokenUrl?: string; clientIdEnv?: string; clientSecretEnv?: string; key?: string; kind?: "apiKey" | "oauth2"; description?: string; oauthScopes?: string[]; headerNames?: string[]; }, { label?: string; authorizeUrl?: string; tokenUrl?: string; clientIdEnv?: string; clientSecretEnv?: string; key?: string; kind?: "apiKey" | "oauth2"; description?: string; oauthScopes?: string[]; headerNames?: string[]; }>, { label?: string; authorizeUrl?: string; tokenUrl?: string; clientIdEnv?: string; clientSecretEnv?: string; key?: string; kind?: "apiKey" | "oauth2"; description?: string; oauthScopes?: string[]; headerNames?: string[]; }, { label?: string; authorizeUrl?: string; tokenUrl?: string; clientIdEnv?: string; clientSecretEnv?: string; key?: string; kind?: "apiKey" | "oauth2"; description?: string; oauthScopes?: string[]; headerNames?: string[]; }>
|
|
894
958
|
```
|
|
895
959
|
|
|
896
960
|
#### `PluginCredentialSlotSchema` — const · src/manifest.ts
|
|
@@ -898,7 +962,7 @@ const PluginConnectionSchema: z.ZodEffects<z.ZodObject<{ key: z.ZodString; kind:
|
|
|
898
962
|
One slot of a manifest's `credentials` block.
|
|
899
963
|
|
|
900
964
|
```ts
|
|
901
|
-
const PluginCredentialSlotSchema: z.ZodObject<{ family: z.ZodLiteral<"google">; scopes: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>; label: z.ZodOptional<z.ZodString>; why: z.ZodString; background: z.ZodOptional<z.ZodBoolean>; }, "strict", z.ZodTypeAny, { label?: string; family?: "google"; scopes?: string[]; why?: string; background?: boolean; }, { label?: string; family?: "
|
|
965
|
+
const PluginCredentialSlotSchema: z.ZodDiscriminatedUnion<"family", [z.ZodObject<{ family: z.ZodLiteral<"google">; scopes: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>; label: z.ZodOptional<z.ZodString>; why: z.ZodString; background: z.ZodOptional<z.ZodBoolean>; }, "strict", z.ZodTypeAny, { family?: "google"; label?: string; why?: string; background?: boolean; scopes?: string[]; }, { family?: "google"; label?: string; why?: string; background?: boolean; scopes?: string[]; }>, z.ZodObject<{ family: z.ZodLiteral<"oauth2">; provider: z.ZodEffects<z.ZodObject<{ name: z.ZodString; authorizeUrl: z.ZodEffects<z.ZodString, string, string>; tokenUrl: z.ZodEffects<z.ZodString, string, string>; scopes: z.ZodArray<z.ZodString, "many">; hosts: z.ZodArray<z.ZodString, "many">; accountUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>; accountField: z.ZodOptional<z.ZodString>; authorizeParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; tokenAuth: z.ZodOptional<z.ZodEnum<["body", "basic"]>>; clientIdEnv: z.ZodOptional<z.ZodString>; clientSecretEnv: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { name?: string; hosts?: string[]; scopes?: string[]; authorizeUrl?: string; tokenUrl?: string; accountUrl?: string; accountField?: string; authorizeParams?: Record<string, string>; tokenAuth?: "body" | "basic"; clientIdEnv?: string; clientSecretEnv?: string; }, { name?: string; hosts?: string[]; scopes?: string[]; authorizeUrl?: string; tokenUrl?: string; accountUrl?: string; accountField?: string; authorizeParams?: Record<string, string>; tokenAuth?: "body" | "basic"; clientIdEnv?: string; clientSecretEnv?: string; }>, { name?: string; hosts?: string[]; scopes?: string[]; authorizeUrl?: string; tokenUrl?: string; accountUrl?: string; accountField?: string; authorizeParams?: Record<string, string>; tokenAuth?: "body" | "basic"; clientIdEnv?: string; clientSecretEnv?: string; }, { name?: string; hosts?: string[]; scopes?: string[]; authorizeUrl?: string; tokenUrl?: string; accountUrl?: string; accountField?: string; authorizeParams?: Record<string, string>; tokenAuth?: "body" | "basic"; clientIdEnv?: string; clientSecretEnv?: string; }>; label: z.ZodOptional<z.ZodString>; why: z.ZodString; background: z.ZodOptional<z.ZodBoolean>; }, "strict", z.ZodTypeAny, { family?: "oauth2"; provider?: { name?: string; hosts?: string[]; scopes?: string[]; authorizeUrl?: string; tokenUrl?: string; accountUrl?: string; accountField?: string; authorizeParams?: Record<string, string>; tokenAuth?: "body" | "basic"; clientIdEnv?: string; clientSecretEnv?: string; }; label?: string; why?: string; background?: boolean; }, { family?: "oauth2"; provider?: { name?: string; hosts?: string[]; scopes?: string[]; authorizeUrl?: string; tokenUrl?: string; accountUrl?: string; accountField?: string; authorizeParams?: Record<string, string>; tokenAuth?: "body" | "basic"; clientIdEnv?: string; clientSecretEnv?: string; }; label?: string; why?: string; background?: boolean; }>, z.ZodObject<{ family: z.ZodLiteral<"apiKey">; provider: z.ZodEffects<z.ZodObject<{ name: z.ZodString; hosts: z.ZodArray<z.ZodString, "many">; header: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>; prefix: z.ZodOptional<z.ZodString>; keyHelp: z.ZodOptional<z.ZodString>; verifyUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>; }, "strict", z.ZodTypeAny, { name?: string; hosts?: string[]; header?: string; prefix?: string; keyHelp?: string; verifyUrl?: string; }, { name?: string; hosts?: string[]; header?: string; prefix?: string; keyHelp?: string; verifyUrl?: string; }>, { name?: string; hosts?: string[]; header?: string; prefix?: string; keyHelp?: string; verifyUrl?: string; }, { name?: string; hosts?: string[]; header?: string; prefix?: string; keyHelp?: string; verifyUrl?: string; }>; label: z.ZodOptional<z.ZodString>; why: z.ZodString; background: z.ZodOptional<z.ZodBoolean>; }, "strict", z.ZodTypeAny, { family?: "apiKey"; provider?: { name?: string; hosts?: string[]; header?: string; prefix?: string; keyHelp?: string; verifyUrl?: string; }; label?: string; why?: string; background?: boolean; }, { family?: "apiKey"; provider?: { name?: string; hosts?: string[]; header?: string; prefix?: string; keyHelp?: string; verifyUrl?: string; }; label?: string; why?: string; background?: boolean; }>]>
|
|
902
966
|
```
|
|
903
967
|
|
|
904
968
|
#### `PluginCredentialsSchema` — const · src/manifest.ts
|
|
@@ -906,7 +970,7 @@ const PluginCredentialSlotSchema: z.ZodObject<{ family: z.ZodLiteral<"google">;
|
|
|
906
970
|
The `credentials` block: slot name → slot. At most ONE slot per app for now.
|
|
907
971
|
|
|
908
972
|
```ts
|
|
909
|
-
const PluginCredentialsSchema: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodObject<{ family: z.ZodLiteral<"google">; scopes: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>; label: z.ZodOptional<z.ZodString>; why: z.ZodString; background: z.ZodOptional<z.ZodBoolean>; }, "strict", z.ZodTypeAny, { label?: string; family?: "google"; scopes?: string[]; why?: string; background?: boolean; }, { label?: string; family?: "
|
|
973
|
+
const PluginCredentialsSchema: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<"family", [z.ZodObject<{ family: z.ZodLiteral<"google">; scopes: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>; label: z.ZodOptional<z.ZodString>; why: z.ZodString; background: z.ZodOptional<z.ZodBoolean>; }, "strict", z.ZodTypeAny, { family?: "google"; label?: string; why?: string; background?: boolean; scopes?: string[]; }, { family?: "google"; label?: string; why?: string; background?: boolean; scopes?: string[]; }>, z.ZodObject<{ family: z.ZodLiteral<"oauth2">; provider: z.ZodEffects<z.ZodObject<{ name: z.ZodString; authorizeUrl: z.ZodEffects<z.ZodString, string, string>; tokenUrl: z.ZodEffects<z.ZodString, string, string>; scopes: z.ZodArray<z.ZodString, "many">; hosts: z.ZodArray<z.ZodString, "many">; accountUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>; accountField: z.ZodOptional<z.ZodString>; authorizeParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; tokenAuth: z.ZodOptional<z.ZodEnum<["body", "basic"]>>; clientIdEnv: z.ZodOptional<z.ZodString>; clientSecretEnv: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { name?: string; hosts?: string[]; scopes?: string[]; authorizeUrl?: string; tokenUrl?: string; accountUrl?: string; accountField?: string; authorizeParams?: Record<string, string>; tokenAuth?: "body" | "basic"; clientIdEnv?: string; clientSecretEnv?: string; }, { name?: string; hosts?: string[]; scopes?: string[]; authorizeUrl?: string; tokenUrl?: string; accountUrl?: string; accountField?: string; authorizeParams?: Record<string, string>; tokenAuth?: "body" | "basic"; clientIdEnv?: string; clientSecretEnv?: string; }>, { name?: string; hosts?: string[]; scopes?: string[]; authorizeUrl?: string; tokenUrl?: string; accountUrl?: string; accountField?: string; authorizeParams?: Record<string, string>; tokenAuth?: "body" | "basic"; clientIdEnv?: string; clientSecretEnv?: string; }, { name?: string; hosts?: string[]; scopes?: string[]; authorizeUrl?: string; tokenUrl?: string; accountUrl?: string; accountField?: string; authorizeParams?: Record<string, string>; tokenAuth?: "body" | "basic"; clientIdEnv?: string; clientSecretEnv?: string; }>; label: z.ZodOptional<z.ZodString>; why: z.ZodString; background: z.ZodOptional<z.ZodBoolean>; }, "strict", z.ZodTypeAny, { family?: "oauth2"; provider?: { name?: string; hosts?: string[]; scopes?: string[]; authorizeUrl?: string; tokenUrl?: string; accountUrl?: string; accountField?: string; authorizeParams?: Record<string, string>; tokenAuth?: "body" | "basic"; clientIdEnv?: string; clientSecretEnv?: string; }; label?: string; why?: string; background?: boolean; }, { family?: "oauth2"; provider?: { name?: string; hosts?: string[]; scopes?: string[]; authorizeUrl?: string; tokenUrl?: string; accountUrl?: string; accountField?: string; authorizeParams?: Record<string, string>; tokenAuth?: "body" | "basic"; clientIdEnv?: string; clientSecretEnv?: string; }; label?: string; why?: string; background?: boolean; }>, z.ZodObject<{ family: z.ZodLiteral<"apiKey">; provider: z.ZodEffects<z.ZodObject<{ name: z.ZodString; hosts: z.ZodArray<z.ZodString, "many">; header: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>; prefix: z.ZodOptional<z.ZodString>; keyHelp: z.ZodOptional<z.ZodString>; verifyUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>; }, "strict", z.ZodTypeAny, { name?: string; hosts?: string[]; header?: string; prefix?: string; keyHelp?: string; verifyUrl?: string; }, { name?: string; hosts?: string[]; header?: string; prefix?: string; keyHelp?: string; verifyUrl?: string; }>, { name?: string; hosts?: string[]; header?: string; prefix?: string; keyHelp?: string; verifyUrl?: string; }, { name?: string; hosts?: string[]; header?: string; prefix?: string; keyHelp?: string; verifyUrl?: string; }>; label: z.ZodOptional<z.ZodString>; why: z.ZodString; background: z.ZodOptional<z.ZodBoolean>; }, "strict", z.ZodTypeAny, { family?: "apiKey"; provider?: { name?: string; hosts?: string[]; header?: string; prefix?: string; keyHelp?: string; verifyUrl?: string; }; label?: string; why?: string; background?: boolean; }, { family?: "apiKey"; provider?: { name?: string; hosts?: string[]; header?: string; prefix?: string; keyHelp?: string; verifyUrl?: string; }; label?: string; why?: string; background?: boolean; }>]>>, Record<string, { family?: "apiKey"; provider?: { name?: string; hosts?: string[]; header?: string; prefix?: string; keyHelp?: string; verifyUrl?: string; }; label?: string; why?: string; background?: boolean; } | { family?: "google"; label?: string; why?: string; background?: boolean; scopes?: string[]; } | { family?: "oauth2"; provider?: { name?: string; hosts?: string[]; scopes?: string[]; authorizeUrl?: string; tokenUrl?: string; accountUrl?: string; accountField?: string; authorizeParams?: Record<string, string>; tokenAuth?: "body" | "basic"; clientIdEnv?: string; clientSecretEnv?: string; }; label?: string; why?: string; background?: boolean; }>, Record<string, { family?: "apiKey"; provider?: { name?: string; hosts?: string[]; header?: string; prefix?: string; keyHelp?: string; verifyUrl?: string; }; label?: string; why?: string; background?: boolean; } | { family?: "google"; label?: string; why?: string; background?: boolean; scopes?: string[]; } | { family?: "oauth2"; provider?: { name?: string; hosts?: string[]; scopes?: string[]; authorizeUrl?: string; tokenUrl?: string; accountUrl?: string; accountField?: string; authorizeParams?: Record<string, string>; tokenAuth?: "body" | "basic"; clientIdEnv?: string; clientSecretEnv?: string; }; label?: string; why?: string; background?: boolean; }>>
|
|
910
974
|
```
|
|
911
975
|
|
|
912
976
|
#### `pluginEndpointProblem` — function · src/manifest.ts
|
|
@@ -946,7 +1010,7 @@ const PluginLlmSchema: z.ZodObject<{ why: z.ZodString; dailyBudgetUsd: z.ZodOpti
|
|
|
946
1010
|
The zod schema `plugin.json` must satisfy — the sync and `check_app` refuse a manifest that fails it, with the path.
|
|
947
1011
|
|
|
948
1012
|
```ts
|
|
949
|
-
const PluginManifestSchema: z.ZodEffects<z.ZodObject<{ manifestVersion: z.ZodLiteral<1>; id: z.ZodString; name: z.ZodString; version: z.ZodString; description: z.ZodString; applicationType: z.ZodString; entry: z.ZodString; icon: z.ZodOptional<z.ZodString>; author: z.ZodOptional<z.ZodObject<{ name: z.ZodString; email: z.ZodOptional<z.ZodString>; url: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { email?: string; name?: string; url?: string; }, { email?: string; name?: string; url?: string; }>>; kickableTasks: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodRecord<z.ZodString, z.ZodObject<{ access: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodEnum<["write", "read", "public", "token"]>, z.ZodArray<z.ZodString, "many">]>>>; requires: z.ZodOptional<z.ZodLiteral<"account">>; }, "strict", z.ZodTypeAny, { access?: "write" | "read" | "public" | "token" | string[]; requires?: "account"; }, { access?: "write" | "read" | "public" | "token" | string[]; requires?: "account"; }>>]>>>; webhooks: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>; ops: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodRecord<z.ZodString, z.ZodObject<{ access: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodEnum<["write", "read", "public", "token"]>, z.ZodArray<z.ZodString, "many">]>>>; requires: z.ZodOptional<z.ZodLiteral<"account">>; }, "strict", z.ZodTypeAny, { access?: "write" | "read" | "public" | "token" | string[]; requires?: "account"; }, { access?: "write" | "read" | "public" | "token" | string[]; requires?: "account"; }>>]>>>; routes: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodRecord<z.ZodString, z.ZodObject<{ access: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodEnum<["write", "read", "public", "token"]>, z.ZodArray<z.ZodString, "many">]>>>; requires: z.ZodOptional<z.ZodLiteral<"account">>; }, "strict", z.ZodTypeAny, { access?: "write" | "read" | "public" | "token" | string[]; requires?: "account"; }, { access?: "write" | "read" | "public" | "token" | string[]; requires?: "account"; }>>]>>>; pollTasks: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{ task: z.ZodString; everyMinutes: z.ZodNumber; }, "strip", z.ZodTypeAny, { task?: string; everyMinutes?: number; }, { task?: string; everyMinutes?: number; }>, "many">>>; platformApi: z.ZodOptional<z.ZodObject<{ min: z.ZodString; max: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { min?: string; max?: string; }, { min?: string; max?: string; }>>; scopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>; roles: z.ZodOptional<z.ZodEffects<z.ZodObject<{ vocabulary: z.ZodArray<z.ZodString, "many">; default: z.ZodDefault<z.ZodOptional<z.ZodObject<{ owner: z.ZodOptional<z.ZodString>; "member-edit": z.ZodOptional<z.ZodString>; "member-readonly": z.ZodOptional<z.ZodString>; visitor: z.ZodOptional<z.ZodString>; anonymous: z.ZodOptional<z.ZodString>; agent: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { owner?: string; "member-edit"?: string; "member-readonly"?: string; visitor?: string; anonymous?: string; agent?: string; }, { owner?: string; "member-edit"?: string; "member-readonly"?: string; visitor?: string; anonymous?: string; agent?: string; }>>>; describe: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["string", "int", "boolean"]>>>; custom: z.ZodOptional<z.ZodObject<{ attributes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; models: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{ where: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; hide: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; update: z.ZodOptional<z.ZodObject<{ fields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; transitions: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { fields?: string[]; transitions?: string; }, { fields?: string[]; transitions?: string; }>>; }, "strict", z.ZodTypeAny, { where?: string[]; hide?: string[]; update?: { fields?: string[]; transitions?: string; }; }, { where?: string[]; hide?: string[]; update?: { fields?: string[]; transitions?: string; }; }>>>; ops: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strict", z.ZodTypeAny, { models?: Record<string, { where?: string[]; hide?: string[]; update?: { fields?: string[]; transitions?: string; }; }>; ops?: string[]; attributes?: string[]; }, { models?: Record<string, { where?: string[]; hide?: string[]; update?: { fields?: string[]; transitions?: string; }; }>; ops?: string[]; attributes?: string[]; }>>; }, "strict", z.ZodTypeAny, { default?: { owner?: string; "member-edit"?: string; "member-readonly"?: string; visitor?: string; anonymous?: string; agent?: string; }; custom?: { models?: Record<string, { where?: string[]; hide?: string[]; update?: { fields?: string[]; transitions?: string; }; }>; ops?: string[]; attributes?: string[]; }; vocabulary?: string[]; describe?: Record<string, string>; attributes?: Record<string, "string" | "boolean" | "int">; }, { default?: { owner?: string; "member-edit"?: string; "member-readonly"?: string; visitor?: string; anonymous?: string; agent?: string; }; custom?: { models?: Record<string, { where?: string[]; hide?: string[]; update?: { fields?: string[]; transitions?: string; }; }>; ops?: string[]; attributes?: string[]; }; vocabulary?: string[]; describe?: Record<string, string>; attributes?: Record<string, "string" | "boolean" | "int">; }>, { default?: { owner?: string; "member-edit"?: string; "member-readonly"?: string; visitor?: string; anonymous?: string; agent?: string; }; custom?: { models?: Record<string, { where?: string[]; hide?: string[]; update?: { fields?: string[]; transitions?: string; }; }>; ops?: string[]; attributes?: string[]; }; vocabulary?: string[]; describe?: Record<string, string>; attributes?: Record<string, "string" | "boolean" | "int">; }, { default?: { owner?: string; "member-edit"?: string; "member-readonly"?: string; visitor?: string; anonymous?: string; agent?: string; }; custom?: { models?: Record<string, { where?: string[]; hide?: string[]; update?: { fields?: string[]; transitions?: string; }; }>; ops?: string[]; attributes?: string[]; }; vocabulary?: string[]; describe?: Record<string, string>; attributes?: Record<string, "string" | "boolean" | "int">; }>>; workspaceTools: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>; device: z.ZodOptional<z.ZodEffects<z.ZodObject<{ commands: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{ argv: z.ZodArray<z.ZodString, "many">; params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodEnum<["int", "number", "bool", "string"]>, z.ZodObject<{ type: z.ZodEnum<["int", "number"]>; min: z.ZodOptional<z.ZodNumber>; max: z.ZodOptional<z.ZodNumber>; describe: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { type?: "number" | "int"; min?: number; max?: number; describe?: string; }, { type?: "number" | "int"; min?: number; max?: number; describe?: string; }>, z.ZodObject<{ type: z.ZodLiteral<"string">; pattern: z.ZodOptional<z.ZodString>; maxLength: z.ZodOptional<z.ZodNumber>; allowDash: z.ZodOptional<z.ZodBoolean>; describe: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { type?: "string"; maxLength?: number; describe?: string; pattern?: string; allowDash?: boolean; }, { type?: "string"; maxLength?: number; describe?: string; pattern?: string; allowDash?: boolean; }>, z.ZodObject<{ type: z.ZodLiteral<"enum">; values: z.ZodArray<z.ZodString, "many">; describe: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { values?: string[]; type?: "enum"; describe?: string; }, { values?: string[]; type?: "enum"; describe?: string; }>, z.ZodObject<{ type: z.ZodLiteral<"bool">; describe: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { type?: "bool"; describe?: string; }, { type?: "bool"; describe?: string; }>]>>>; cwd: z.ZodOptional<z.ZodString>; env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; config: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; timeoutSeconds: z.ZodOptional<z.ZodNumber>; onRestart: z.ZodOptional<z.ZodEnum<["report", "rerun"]>>; output: z.ZodOptional<z.ZodObject<{ mode: z.ZodOptional<z.ZodEnum<["live", "batched", "final"]>>; flushMs: z.ZodOptional<z.ZodNumber>; maxChunkKb: z.ZodOptional<z.ZodNumber>; keep: z.ZodOptional<z.ZodEnum<["head", "tail", "both"]>>; maxKb: z.ZodOptional<z.ZodNumber>; }, "strict", z.ZodTypeAny, { mode?: "live" | "batched" | "final"; flushMs?: number; maxChunkKb?: number; keep?: "head" | "tail" | "both"; maxKb?: number; }, { mode?: "live" | "batched" | "final"; flushMs?: number; maxChunkKb?: number; keep?: "head" | "tail" | "both"; maxKb?: number; }>>; result: z.ZodOptional<z.ZodEnum<["text", "json"]>>; describe: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { params?: Record<string, "string" | "number" | "int" | "bool" | { type?: "number" | "int"; min?: number; max?: number; describe?: string; } | { type?: "string"; maxLength?: number; describe?: string; pattern?: string; allowDash?: boolean; } | { values?: string[]; type?: "enum"; describe?: string; } | { type?: "bool"; describe?: string; }>; describe?: string; argv?: string[]; cwd?: string; env?: Record<string, string>; config?: string[]; timeoutSeconds?: number; onRestart?: "report" | "rerun"; output?: { mode?: "live" | "batched" | "final"; flushMs?: number; maxChunkKb?: number; keep?: "head" | "tail" | "both"; maxKb?: number; }; result?: "text" | "json"; }, { params?: Record<string, "string" | "number" | "int" | "bool" | { type?: "number" | "int"; min?: number; max?: number; describe?: string; } | { type?: "string"; maxLength?: number; describe?: string; pattern?: string; allowDash?: boolean; } | { values?: string[]; type?: "enum"; describe?: string; } | { type?: "bool"; describe?: string; }>; describe?: string; argv?: string[]; cwd?: string; env?: Record<string, string>; config?: string[]; timeoutSeconds?: number; onRestart?: "report" | "rerun"; output?: { mode?: "live" | "batched" | "final"; flushMs?: number; maxChunkKb?: number; keep?: "head" | "tail" | "both"; maxKb?: number; }; result?: "text" | "json"; }>>>; program: z.ZodOptional<z.ZodObject<{ main: z.ZodString; resident: z.ZodOptional<z.ZodBoolean>; setup: z.ZodOptional<z.ZodArray<z.ZodObject<{ id: z.ZodString; describe: z.ZodString; run: z.ZodArray<z.ZodString, "many">; inputs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; timeoutSeconds: z.ZodOptional<z.ZodNumber>; }, "strict", z.ZodTypeAny, { id?: string; describe?: string; timeoutSeconds?: number; run?: string[]; inputs?: string[]; }, { id?: string; describe?: string; timeoutSeconds?: number; run?: string[]; inputs?: string[]; }>, "many">>; selfTest: z.ZodOptional<z.ZodObject<{ run: z.ZodArray<z.ZodString, "many">; timeoutSeconds: z.ZodOptional<z.ZodNumber>; }, "strict", z.ZodTypeAny, { timeoutSeconds?: number; run?: string[]; }, { timeoutSeconds?: number; run?: string[]; }>>; }, "strict", z.ZodTypeAny, { main?: string; resident?: boolean; setup?: { id?: string; describe?: string; timeoutSeconds?: number; run?: string[]; inputs?: string[]; }[]; selfTest?: { timeoutSeconds?: number; run?: string[]; }; }, { main?: string; resident?: boolean; setup?: { id?: string; describe?: string; timeoutSeconds?: number; run?: string[]; inputs?: string[]; }[]; selfTest?: { timeoutSeconds?: number; run?: string[]; }; }>>; config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{ secret: z.ZodOptional<z.ZodBoolean>; required: z.ZodOptional<z.ZodBoolean>; describe: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { required?: boolean; describe?: string; secret?: boolean; }, { required?: boolean; describe?: string; secret?: boolean; }>>>; redact: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; onAppDeleted: z.ZodOptional<z.ZodEnum<["kill", "finish"]>>; }, "strict", z.ZodTypeAny, { config?: Record<string, { required?: boolean; describe?: string; secret?: boolean; }>; commands?: Record<string, { params?: Record<string, "string" | "number" | "int" | "bool" | { type?: "number" | "int"; min?: number; max?: number; describe?: string; } | { type?: "string"; maxLength?: number; describe?: string; pattern?: string; allowDash?: boolean; } | { values?: string[]; type?: "enum"; describe?: string; } | { type?: "bool"; describe?: string; }>; describe?: string; argv?: string[]; cwd?: string; env?: Record<string, string>; config?: string[]; timeoutSeconds?: number; onRestart?: "report" | "rerun"; output?: { mode?: "live" | "batched" | "final"; flushMs?: number; maxChunkKb?: number; keep?: "head" | "tail" | "both"; maxKb?: number; }; result?: "text" | "json"; }>; program?: { main?: string; resident?: boolean; setup?: { id?: string; describe?: string; timeoutSeconds?: number; run?: string[]; inputs?: string[]; }[]; selfTest?: { timeoutSeconds?: number; run?: string[]; }; }; redact?: string[]; onAppDeleted?: "kill" | "finish"; }, { config?: Record<string, { required?: boolean; describe?: string; secret?: boolean; }>; commands?: Record<string, { params?: Record<string, "string" | "number" | "int" | "bool" | { type?: "number" | "int"; min?: number; max?: number; describe?: string; } | { type?: "string"; maxLength?: number; describe?: string; pattern?: string; allowDash?: boolean; } | { values?: string[]; type?: "enum"; describe?: string; } | { type?: "bool"; describe?: string; }>; describe?: string; argv?: string[]; cwd?: string; env?: Record<string, string>; config?: string[]; timeoutSeconds?: number; onRestart?: "report" | "rerun"; output?: { mode?: "live" | "batched" | "final"; flushMs?: number; maxChunkKb?: number; keep?: "head" | "tail" | "both"; maxKb?: number; }; result?: "text" | "json"; }>; program?: { main?: string; resident?: boolean; setup?: { id?: string; describe?: string; timeoutSeconds?: number; run?: string[]; inputs?: string[]; }[]; selfTest?: { timeoutSeconds?: number; run?: string[]; }; }; redact?: string[]; onAppDeleted?: "kill" | "finish"; }>, { config?: Record<string, { required?: boolean; describe?: string; secret?: boolean; }>; commands?: Record<string, { params?: Record<string, "string" | "number" | "int" | "bool" | { type?: "number" | "int"; min?: number; max?: number; describe?: string; } | { type?: "string"; maxLength?: number; describe?: string; pattern?: string; allowDash?: boolean; } | { values?: string[]; type?: "enum"; describe?: string; } | { type?: "bool"; describe?: string; }>; describe?: string; argv?: string[]; cwd?: string; env?: Record<string, string>; config?: string[]; timeoutSeconds?: number; onRestart?: "report" | "rerun"; output?: { mode?: "live" | "batched" | "final"; flushMs?: number; maxChunkKb?: number; keep?: "head" | "tail" | "both"; maxKb?: number; }; result?: "text" | "json"; }>; program?: { main?: string; resident?: boolean; setup?: { id?: string; describe?: string; timeoutSeconds?: number; run?: string[]; inputs?: string[]; }[]; selfTest?: { timeoutSeconds?: number; run?: string[]; }; }; redact?: string[]; onAppDeleted?: "kill" | "finish"; }, { config?: Record<string, { required?: boolean; describe?: string; secret?: boolean; }>; commands?: Record<string, { params?: Record<string, "string" | "number" | "int" | "bool" | { type?: "number" | "int"; min?: number; max?: number; describe?: string; } | { type?: "string"; maxLength?: number; describe?: string; pattern?: string; allowDash?: boolean; } | { values?: string[]; type?: "enum"; describe?: string; } | { type?: "bool"; describe?: string; }>; describe?: string; argv?: string[]; cwd?: string; env?: Record<string, string>; config?: string[]; timeoutSeconds?: number; onRestart?: "report" | "rerun"; output?: { mode?: "live" | "batched" | "final"; flushMs?: number; maxChunkKb?: number; keep?: "head" | "tail" | "both"; maxKb?: number; }; result?: "text" | "json"; }>; program?: { main?: string; resident?: boolean; setup?: { id?: string; describe?: string; timeoutSeconds?: number; run?: string[]; inputs?: string[]; }[]; selfTest?: { timeoutSeconds?: number; run?: string[]; }; }; redact?: string[]; onAppDeleted?: "kill" | "finish"; }>>; connections: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{ key: z.ZodString; kind: z.ZodEnum<["oauth2", "apiKey"]>; label: z.ZodString; description: z.ZodOptional<z.ZodString>; authorizeUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>; tokenUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>; oauthScopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; clientIdEnv: z.ZodOptional<z.ZodString>; clientSecretEnv: z.ZodOptional<z.ZodString>; headerNames: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strict", z.ZodTypeAny, { key?: string; kind?: "oauth2" | "apiKey"; label?: string; description?: string; authorizeUrl?: string; tokenUrl?: string; oauthScopes?: string[]; clientIdEnv?: string; clientSecretEnv?: string; headerNames?: string[]; }, { key?: string; kind?: "oauth2" | "apiKey"; label?: string; description?: string; authorizeUrl?: string; tokenUrl?: string; oauthScopes?: string[]; clientIdEnv?: string; clientSecretEnv?: string; headerNames?: string[]; }>, { key?: string; kind?: "oauth2" | "apiKey"; label?: string; description?: string; authorizeUrl?: string; tokenUrl?: string; oauthScopes?: string[]; clientIdEnv?: string; clientSecretEnv?: string; headerNames?: string[]; }, { key?: string; kind?: "oauth2" | "apiKey"; label?: string; description?: string; authorizeUrl?: string; tokenUrl?: string; oauthScopes?: string[]; clientIdEnv?: string; clientSecretEnv?: string; headerNames?: string[]; }>, "many">>>; credentials: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodObject<{ family: z.ZodLiteral<"google">; scopes: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>; label: z.ZodOptional<z.ZodString>; why: z.ZodString; background: z.ZodOptional<z.ZodBoolean>; }, "strict", z.ZodTypeAny, { label?: string; family?: "google"; scopes?: string[]; why?: string; background?: boolean; }, { label?: string; family?: "google"; scopes?: string[]; why?: string; background?: boolean; }>>, Record<string, { label?: string; family?: "google"; scopes?: string[]; why?: string; background?: boolean; }>, Record<string, { label?: string; family?: "google"; scopes?: string[]; why?: string; background?: boolean; }>>>; llm: z.ZodOptional<z.ZodObject<{ why: z.ZodString; dailyBudgetUsd: z.ZodOptional<z.ZodNumber>; models: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strict", z.ZodTypeAny, { why?: string; dailyBudgetUsd?: number; models?: string[]; }, { why?: string; dailyBudgetUsd?: number; models?: string[]; }>>; fileSources: z.ZodOptional<z.ZodEffects<z.ZodObject<{ workspace: z.ZodOptional<z.ZodEnum<["read", "readwrite"]>>; providers: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>; write: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strict", z.ZodTypeAny, { write?: string[]; workspace?: "read" | "readwrite"; providers?: string[]; }, { write?: string[]; workspace?: "read" | "readwrite"; providers?: string[]; }>, { write?: string[]; workspace?: "read" | "readwrite"; providers?: string[]; }, { write?: string[]; workspace?: "read" | "readwrite"; providers?: string[]; }>>; fileProviders: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{ key: z.ZodString; connectionKey: z.ZodString; label: z.ZodString; }, "strict", z.ZodTypeAny, { key?: string; label?: string; connectionKey?: string; }, { key?: string; label?: string; connectionKey?: string; }>, "many">>>; fileProducers: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{ key: z.ZodString; label: z.ZodString; }, "strict", z.ZodTypeAny, { key?: string; label?: string; }, { key?: string; label?: string; }>, "many">>>; uses: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{ contract: z.ZodString; label: z.ZodOptional<z.ZodString>; optional: z.ZodOptional<z.ZodBoolean>; }, "strict", z.ZodTypeAny, { label?: string; contract?: string; optional?: boolean; }, { label?: string; contract?: string; optional?: boolean; }>>>; provides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{ tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; events: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; models: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strict", z.ZodTypeAny, { models?: string[]; tools?: string[]; events?: string[]; }, { models?: string[]; tools?: string[]; events?: string[]; }>>>; channel: z.ZodOptional<z.ZodObject<{ topics: z.ZodRecord<z.ZodString, z.ZodObject<{ audience: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"all">, z.ZodLiteral<"viewer">, z.ZodString]>>; mayAddress: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; description: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { description?: string; audience?: string; mayAddress?: string[]; }, { description?: string; audience?: string; mayAddress?: string[]; }>>; }, "strict", z.ZodTypeAny, { topics?: Record<string, { description?: string; audience?: string; mayAddress?: string[]; }>; }, { topics?: Record<string, { description?: string; audience?: string; mayAddress?: string[]; }>; }>>; db: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{ scope: z.ZodOptional<z.ZodEnum<["instance", "workspace", "user"]>>; owner: z.ZodOptional<z.ZodLiteral<"creator">>; fields: z.ZodRecord<z.ZodString, z.ZodString>; sealed: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; unique: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">>; indexes: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodObject<{ fields: z.ZodArray<z.ZodString, "many">; kind: z.ZodOptional<z.ZodEnum<["btree", "contains", "text"]>>; }, "strict", z.ZodTypeAny, { kind?: "text" | "btree" | "contains"; fields?: string[]; }, { kind?: "text" | "btree" | "contains"; fields?: string[]; }>]>, "many">>; rules: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>; }, "strict", z.ZodTypeAny, { owner?: "creator"; fields?: Record<string, string>; scope?: "workspace" | "instance" | "user"; sealed?: string[]; unique?: string[][]; indexes?: (string[] | { kind?: "text" | "btree" | "contains"; fields?: string[]; })[]; rules?: Record<string, unknown>; }, { owner?: "creator"; fields?: Record<string, string>; scope?: "workspace" | "instance" | "user"; sealed?: string[]; unique?: string[][]; indexes?: (string[] | { kind?: "text" | "btree" | "contains"; fields?: string[]; })[]; rules?: Record<string, unknown>; }>>>; }, "strict", z.ZodTypeAny, { roles?: { default?: { owner?: string; "member-edit"?: string; "member-readonly"?: string; visitor?: string; anonymous?: string; agent?: string; }; custom?: { models?: Record<string, { where?: string[]; hide?: string[]; update?: { fields?: string[]; transitions?: string; }; }>; ops?: string[]; attributes?: string[]; }; vocabulary?: string[]; describe?: Record<string, string>; attributes?: Record<string, "string" | "boolean" | "int">; }; description?: string; scopes?: string[]; manifestVersion?: 1; id?: string; name?: string; version?: string; applicationType?: string; entry?: string; icon?: string; author?: { email?: string; name?: string; url?: string; }; kickableTasks?: string[] | Record<string, { access?: "write" | "read" | "public" | "token" | string[]; requires?: "account"; }>; webhooks?: string[]; ops?: string[] | Record<string, { access?: "write" | "read" | "public" | "token" | string[]; requires?: "account"; }>; routes?: string[] | Record<string, { access?: "write" | "read" | "public" | "token" | string[]; requires?: "account"; }>; pollTasks?: { task?: string; everyMinutes?: number; }[]; platformApi?: { min?: string; max?: string; }; workspaceTools?: string[]; device?: { config?: Record<string, { required?: boolean; describe?: string; secret?: boolean; }>; commands?: Record<string, { params?: Record<string, "string" | "number" | "int" | "bool" | { type?: "number" | "int"; min?: number; max?: number; describe?: string; } | { type?: "string"; maxLength?: number; describe?: string; pattern?: string; allowDash?: boolean; } | { values?: string[]; type?: "enum"; describe?: string; } | { type?: "bool"; describe?: string; }>; describe?: string; argv?: string[]; cwd?: string; env?: Record<string, string>; config?: string[]; timeoutSeconds?: number; onRestart?: "report" | "rerun"; output?: { mode?: "live" | "batched" | "final"; flushMs?: number; maxChunkKb?: number; keep?: "head" | "tail" | "both"; maxKb?: number; }; result?: "text" | "json"; }>; program?: { main?: string; resident?: boolean; setup?: { id?: string; describe?: string; timeoutSeconds?: number; run?: string[]; inputs?: string[]; }[]; selfTest?: { timeoutSeconds?: number; run?: string[]; }; }; redact?: string[]; onAppDeleted?: "kill" | "finish"; }; connections?: { key?: string; kind?: "oauth2" | "apiKey"; label?: string; description?: string; authorizeUrl?: string; tokenUrl?: string; oauthScopes?: string[]; clientIdEnv?: string; clientSecretEnv?: string; headerNames?: string[]; }[]; credentials?: Record<string, { label?: string; family?: "google"; scopes?: string[]; why?: string; background?: boolean; }>; llm?: { why?: string; dailyBudgetUsd?: number; models?: string[]; }; fileSources?: { write?: string[]; workspace?: "read" | "readwrite"; providers?: string[]; }; fileProviders?: { key?: string; label?: string; connectionKey?: string; }[]; fileProducers?: { key?: string; label?: string; }[]; uses?: Record<string, { label?: string; contract?: string; optional?: boolean; }>; provides?: Record<string, { models?: string[]; tools?: string[]; events?: string[]; }>; channel?: { topics?: Record<string, { description?: string; audience?: string; mayAddress?: string[]; }>; }; db?: Record<string, { owner?: "creator"; fields?: Record<string, string>; scope?: "workspace" | "instance" | "user"; sealed?: string[]; unique?: string[][]; indexes?: (string[] | { kind?: "text" | "btree" | "contains"; fields?: string[]; })[]; rules?: Record<string, unknown>; }>; }, { roles?: { default?: { owner?: string; "member-edit"?: string; "member-readonly"?: string; visitor?: string; anonymous?: string; agent?: string; }; custom?: { models?: Record<string, { where?: string[]; hide?: string[]; update?: { fields?: string[]; transitions?: string; }; }>; ops?: string[]; attributes?: string[]; }; vocabulary?: string[]; describe?: Record<string, string>; attributes?: Record<string, "string" | "boolean" | "int">; }; description?: string; scopes?: string[]; manifestVersion?: 1; id?: string; name?: string; version?: string; applicationType?: string; entry?: string; icon?: string; author?: { email?: string; name?: string; url?: string; }; kickableTasks?: string[] | Record<string, { access?: "write" | "read" | "public" | "token" | string[]; requires?: "account"; }>; webhooks?: string[]; ops?: string[] | Record<string, { access?: "write" | "read" | "public" | "token" | string[]; requires?: "account"; }>; routes?: string[] | Record<string, { access?: "write" | "read" | "public" | "token" | string[]; requires?: "account"; }>; pollTasks?: { task?: string; everyMinutes?: number; }[]; platformApi?: { min?: string; max?: string; }; workspaceTools?: string[]; device?: { config?: Record<string, { required?: boolean; describe?: string; secret?: boolean; }>; commands?: Record<string, { params?: Record<string, "string" | "number" | "int" | "bool" | { type?: "number" | "int"; min?: number; max?: number; describe?: string; } | { type?: "string"; maxLength?: number; describe?: string; pattern?: string; allowDash?: boolean; } | { values?: string[]; type?: "enum"; describe?: string; } | { type?: "bool"; describe?: string; }>; describe?: string; argv?: string[]; cwd?: string; env?: Record<string, string>; config?: string[]; timeoutSeconds?: number; onRestart?: "report" | "rerun"; output?: { mode?: "live" | "batched" | "final"; flushMs?: number; maxChunkKb?: number; keep?: "head" | "tail" | "both"; maxKb?: number; }; result?: "text" | "json"; }>; program?: { main?: string; resident?: boolean; setup?: { id?: string; describe?: string; timeoutSeconds?: number; run?: string[]; inputs?: string[]; }[]; selfTest?: { timeoutSeconds?: number; run?: string[]; }; }; redact?: string[]; onAppDeleted?: "kill" | "finish"; }; connections?: { key?: string; kind?: "oauth2" | "apiKey"; label?: string; description?: string; authorizeUrl?: string; tokenUrl?: string; oauthScopes?: string[]; clientIdEnv?: string; clientSecretEnv?: string; headerNames?: string[]; }[]; credentials?: Record<string, { label?: string; family?: "google"; scopes?: string[]; why?: string; background?: boolean; }>; llm?: { why?: string; dailyBudgetUsd?: number; models?: string[]; }; fileSources?: { write?: string[]; workspace?: "read" | "readwrite"; providers?: string[]; }; fileProviders?: { key?: string; label?: string; connectionKey?: string; }[]; fileProducers?: { key?: string; label?: string; }[]; uses?: Record<string, { label?: string; contract?: string; optional?: boolean; }>; provides?: Record<string, { models?: string[]; tools?: string[]; events?: string[]; }>; channel?: { topics?: Record<string, { description?: string; audience?: string; mayAddress?: string[]; }>; }; db?: Record<string, { owner?: "creator"; fields?: Record<string, string>; scope?: "workspace" | "instance" | "user"; sealed?: string[]; unique?: string[][]; indexes?: (string[] | { kind?: "text" | "btree" | "contains"; fields?: string[]; })[]; rules?: Record<string, unknown>; }>; }>, { roles?: { default?: { owner?: string; "member-edit"?: string; "member-readonly"?: string; visitor?: string; anonymous?: string; agent?: string; }; custom?: { models?: Record<string, { where?: string[]; hide?: string[]; update?: { fields?: string[]; transitions?: string; }; }>; ops?: string[]; attributes?: string[]; }; vocabulary?: string[]; describe?: Record<string, string>; attributes?: Record<string, "string" | "boolean" | "int">; }; description?: string; scopes?: string[]; manifestVersion?: 1; id?: string; name?: string; version?: string; applicationType?: string; entry?: string; icon?: string; author?: { email?: string; name?: string; url?: string; }; kickableTasks?: string[] | Record<string, { access?: "write" | "read" | "public" | "token" | string[]; requires?: "account"; }>; webhooks?: string[]; ops?: string[] | Record<string, { access?: "write" | "read" | "public" | "token" | string[]; requires?: "account"; }>; routes?: string[] | Record<string, { access?: "write" | "read" | "public" | "token" | string[]; requires?: "account"; }>; pollTasks?: { task?: string; everyMinutes?: number; }[]; platformApi?: { min?: string; max?: string; }; workspaceTools?: string[]; device?: { config?: Record<string, { required?: boolean; describe?: string; secret?: boolean; }>; commands?: Record<string, { params?: Record<string, "string" | "number" | "int" | "bool" | { type?: "number" | "int"; min?: number; max?: number; describe?: string; } | { type?: "string"; maxLength?: number; describe?: string; pattern?: string; allowDash?: boolean; } | { values?: string[]; type?: "enum"; describe?: string; } | { type?: "bool"; describe?: string; }>; describe?: string; argv?: string[]; cwd?: string; env?: Record<string, string>; config?: string[]; timeoutSeconds?: number; onRestart?: "report" | "rerun"; output?: { mode?: "live" | "batched" | "final"; flushMs?: number; maxChunkKb?: number; keep?: "head" | "tail" | "both"; maxKb?: number; }; result?: "text" | "json"; }>; program?: { main?: string; resident?: boolean; setup?: { id?: string; describe?: string; timeoutSeconds?: number; run?: string[]; inputs?: string[]; }[]; selfTest?: { timeoutSeconds?: number; run?: string[]; }; }; redact?: string[]; onAppDeleted?: "kill" | "finish"; }; connections?: { key?: string; kind?: "oauth2" | "apiKey"; label?: string; description?: string; authorizeUrl?: string; tokenUrl?: string; oauthScopes?: string[]; clientIdEnv?: string; clientSecretEnv?: string; headerNames?: string[]; }[]; credentials?: Record<string, { label?: string; family?: "google"; scopes?: string[]; why?: string; background?: boolean; }>; llm?: { why?: string; dailyBudgetUsd?: number; models?: string[]; }; fileSources?: { write?: string[]; workspace?: "read" | "readwrite"; providers?: string[]; }; fileProviders?: { key?: string; label?: string; connectionKey?: string; }[]; fileProducers?: { key?: string; label?: string; }[]; uses?: Record<string, { label?: string; contract?: string; optional?: boolean; }>; provides?: Record<string, { models?: string[]; tools?: string[]; events?: string[]; }>; channel?: { topics?: Record<string, { description?: string; audience?: string; mayAddress?: string[]; }>; }; db?: Record<string, { owner?: "creator"; fields?: Record<string, string>; scope?: "workspace" | "instance" | "user"; sealed?: string[]; unique?: string[][]; indexes?: (string[] | { kind?: "text" | "btree" | "contains"; fields?: string[]; })[]; rules?: Record<string, unknown>; }>; }, { roles?: { default?: { owner?: string; "member-edit"?: string; "member-readonly"?: string; visitor?: string; anonymous?: string; agent?: string; }; custom?: { models?: Record<string, { where?: string[]; hide?: string[]; update?: { fields?: string[]; transitions?: string; }; }>; ops?: string[]; attributes?: string[]; }; vocabulary?: string[]; describe?: Record<string, string>; attributes?: Record<string, "string" | "boolean" | "int">; }; description?: string; scopes?: string[]; manifestVersion?: 1; id?: string; name?: string; version?: string; applicationType?: string; entry?: string; icon?: string; author?: { email?: string; name?: string; url?: string; }; kickableTasks?: string[] | Record<string, { access?: "write" | "read" | "public" | "token" | string[]; requires?: "account"; }>; webhooks?: string[]; ops?: string[] | Record<string, { access?: "write" | "read" | "public" | "token" | string[]; requires?: "account"; }>; routes?: string[] | Record<string, { access?: "write" | "read" | "public" | "token" | string[]; requires?: "account"; }>; pollTasks?: { task?: string; everyMinutes?: number; }[]; platformApi?: { min?: string; max?: string; }; workspaceTools?: string[]; device?: { config?: Record<string, { required?: boolean; describe?: string; secret?: boolean; }>; commands?: Record<string, { params?: Record<string, "string" | "number" | "int" | "bool" | { type?: "number" | "int"; min?: number; max?: number; describe?: string; } | { type?: "string"; maxLength?: number; describe?: string; pattern?: string; allowDash?: boolean; } | { values?: string[]; type?: "enum"; describe?: string; } | { type?: "bool"; describe?: string; }>; describe?: string; argv?: string[]; cwd?: string; env?: Record<string, string>; config?: string[]; timeoutSeconds?: number; onRestart?: "report" | "rerun"; output?: { mode?: "live" | "batched" | "final"; flushMs?: number; maxChunkKb?: number; keep?: "head" | "tail" | "both"; maxKb?: number; }; result?: "text" | "json"; }>; program?: { main?: string; resident?: boolean; setup?: { id?: string; describe?: string; timeoutSeconds?: number; run?: string[]; inputs?: string[]; }[]; selfTest?: { timeoutSeconds?: number; run?: string[]; }; }; redact?: string[]; onAppDeleted?: "kill" | "finish"; }; connections?: { key?: string; kind?: "oauth2" | "apiKey"; label?: string; description?: string; authorizeUrl?: string; tokenUrl?: string; oauthScopes?: string[]; clientIdEnv?: string; clientSecretEnv?: string; headerNames?: string[]; }[]; credentials?: Record<string, { label?: string; family?: "google"; scopes?: string[]; why?: string; background?: boolean; }>; llm?: { why?: string; dailyBudgetUsd?: number; models?: string[]; }; fileSources?: { write?: string[]; workspace?: "read" | "readwrite"; providers?: string[]; }; fileProviders?: { key?: string; label?: string; connectionKey?: string; }[]; fileProducers?: { key?: string; label?: string; }[]; uses?: Record<string, { label?: string; contract?: string; optional?: boolean; }>; provides?: Record<string, { models?: string[]; tools?: string[]; events?: string[]; }>; channel?: { topics?: Record<string, { description?: string; audience?: string; mayAddress?: string[]; }>; }; db?: Record<string, { owner?: "creator"; fields?: Record<string, string>; scope?: "workspace" | "instance" | "user"; sealed?: string[]; unique?: string[][]; indexes?: (string[] | { kind?: "text" | "btree" | "contains"; fields?: string[]; })[]; rules?: Record<string, unknown>; }>; }>
|
|
1013
|
+
const PluginManifestSchema: z.ZodEffects<z.ZodObject<{ manifestVersion: z.ZodLiteral<1>; id: z.ZodString; name: z.ZodString; version: z.ZodString; description: z.ZodString; applicationType: z.ZodString; entry: z.ZodString; icon: z.ZodOptional<z.ZodString>; author: z.ZodOptional<z.ZodObject<{ name: z.ZodString; email: z.ZodOptional<z.ZodString>; url: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { name?: string; email?: string; url?: string; }, { name?: string; email?: string; url?: string; }>>; kickableTasks: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodRecord<z.ZodString, z.ZodObject<{ access: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodEnum<["write", "read", "public", "token"]>, z.ZodArray<z.ZodString, "many">]>>>; requires: z.ZodOptional<z.ZodLiteral<"account">>; }, "strict", z.ZodTypeAny, { access?: string[] | "write" | "read" | "public" | "token"; requires?: "account"; }, { access?: string[] | "write" | "read" | "public" | "token"; requires?: "account"; }>>]>>>; webhooks: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>; ops: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodRecord<z.ZodString, z.ZodObject<{ access: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodEnum<["write", "read", "public", "token"]>, z.ZodArray<z.ZodString, "many">]>>>; requires: z.ZodOptional<z.ZodLiteral<"account">>; }, "strict", z.ZodTypeAny, { access?: string[] | "write" | "read" | "public" | "token"; requires?: "account"; }, { access?: string[] | "write" | "read" | "public" | "token"; requires?: "account"; }>>]>>>; routes: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodRecord<z.ZodString, z.ZodObject<{ access: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodEnum<["write", "read", "public", "token"]>, z.ZodArray<z.ZodString, "many">]>>>; requires: z.ZodOptional<z.ZodLiteral<"account">>; }, "strict", z.ZodTypeAny, { access?: string[] | "write" | "read" | "public" | "token"; requires?: "account"; }, { access?: string[] | "write" | "read" | "public" | "token"; requires?: "account"; }>>]>>>; pollTasks: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{ task: z.ZodString; everyMinutes: z.ZodNumber; }, "strip", z.ZodTypeAny, { task?: string; everyMinutes?: number; }, { task?: string; everyMinutes?: number; }>, "many">>>; platformApi: z.ZodOptional<z.ZodObject<{ min: z.ZodString; max: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { min?: string; max?: string; }, { min?: string; max?: string; }>>; scopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>; roles: z.ZodOptional<z.ZodEffects<z.ZodObject<{ vocabulary: z.ZodArray<z.ZodString, "many">; default: z.ZodDefault<z.ZodOptional<z.ZodObject<{ owner: z.ZodOptional<z.ZodString>; "member-edit": z.ZodOptional<z.ZodString>; "member-readonly": z.ZodOptional<z.ZodString>; visitor: z.ZodOptional<z.ZodString>; anonymous: z.ZodOptional<z.ZodString>; agent: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { owner?: string; "member-edit"?: string; "member-readonly"?: string; visitor?: string; anonymous?: string; agent?: string; }, { owner?: string; "member-edit"?: string; "member-readonly"?: string; visitor?: string; anonymous?: string; agent?: string; }>>>; describe: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["string", "int", "boolean"]>>>; custom: z.ZodOptional<z.ZodObject<{ attributes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; models: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{ where: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; hide: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; update: z.ZodOptional<z.ZodObject<{ fields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; transitions: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { fields?: string[]; transitions?: string; }, { fields?: string[]; transitions?: string; }>>; }, "strict", z.ZodTypeAny, { where?: string[]; hide?: string[]; update?: { fields?: string[]; transitions?: string; }; }, { where?: string[]; hide?: string[]; update?: { fields?: string[]; transitions?: string; }; }>>>; ops: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strict", z.ZodTypeAny, { models?: Record<string, { where?: string[]; hide?: string[]; update?: { fields?: string[]; transitions?: string; }; }>; ops?: string[]; attributes?: string[]; }, { models?: Record<string, { where?: string[]; hide?: string[]; update?: { fields?: string[]; transitions?: string; }; }>; ops?: string[]; attributes?: string[]; }>>; }, "strict", z.ZodTypeAny, { custom?: { models?: Record<string, { where?: string[]; hide?: string[]; update?: { fields?: string[]; transitions?: string; }; }>; ops?: string[]; attributes?: string[]; }; default?: { owner?: string; "member-edit"?: string; "member-readonly"?: string; visitor?: string; anonymous?: string; agent?: string; }; vocabulary?: string[]; describe?: Record<string, string>; attributes?: Record<string, "string" | "boolean" | "int">; }, { custom?: { models?: Record<string, { where?: string[]; hide?: string[]; update?: { fields?: string[]; transitions?: string; }; }>; ops?: string[]; attributes?: string[]; }; default?: { owner?: string; "member-edit"?: string; "member-readonly"?: string; visitor?: string; anonymous?: string; agent?: string; }; vocabulary?: string[]; describe?: Record<string, string>; attributes?: Record<string, "string" | "boolean" | "int">; }>, { custom?: { models?: Record<string, { where?: string[]; hide?: string[]; update?: { fields?: string[]; transitions?: string; }; }>; ops?: string[]; attributes?: string[]; }; default?: { owner?: string; "member-edit"?: string; "member-readonly"?: string; visitor?: string; anonymous?: string; agent?: string; }; vocabulary?: string[]; describe?: Record<string, string>; attributes?: Record<string, "string" | "boolean" | "int">; }, { custom?: { models?: Record<string, { where?: string[]; hide?: string[]; update?: { fields?: string[]; transitions?: string; }; }>; ops?: string[]; attributes?: string[]; }; default?: { owner?: string; "member-edit"?: string; "member-readonly"?: string; visitor?: string; anonymous?: string; agent?: string; }; vocabulary?: string[]; describe?: Record<string, string>; attributes?: Record<string, "string" | "boolean" | "int">; }>>; workspaceTools: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>; device: z.ZodOptional<z.ZodEffects<z.ZodObject<{ commands: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{ argv: z.ZodArray<z.ZodString, "many">; params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodEnum<["int", "number", "bool", "string"]>, z.ZodObject<{ type: z.ZodEnum<["int", "number"]>; min: z.ZodOptional<z.ZodNumber>; max: z.ZodOptional<z.ZodNumber>; describe: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { type?: "number" | "int"; min?: number; max?: number; describe?: string; }, { type?: "number" | "int"; min?: number; max?: number; describe?: string; }>, z.ZodObject<{ type: z.ZodLiteral<"string">; pattern: z.ZodOptional<z.ZodString>; maxLength: z.ZodOptional<z.ZodNumber>; allowDash: z.ZodOptional<z.ZodBoolean>; describe: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { type?: "string"; maxLength?: number; describe?: string; pattern?: string; allowDash?: boolean; }, { type?: "string"; maxLength?: number; describe?: string; pattern?: string; allowDash?: boolean; }>, z.ZodObject<{ type: z.ZodLiteral<"enum">; values: z.ZodArray<z.ZodString, "many">; describe: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { values?: string[]; type?: "enum"; describe?: string; }, { values?: string[]; type?: "enum"; describe?: string; }>, z.ZodObject<{ type: z.ZodLiteral<"bool">; describe: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { type?: "bool"; describe?: string; }, { type?: "bool"; describe?: string; }>]>>>; cwd: z.ZodOptional<z.ZodString>; env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; config: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; timeoutSeconds: z.ZodOptional<z.ZodNumber>; onRestart: z.ZodOptional<z.ZodEnum<["report", "rerun"]>>; output: z.ZodOptional<z.ZodObject<{ mode: z.ZodOptional<z.ZodEnum<["live", "batched", "final"]>>; flushMs: z.ZodOptional<z.ZodNumber>; maxChunkKb: z.ZodOptional<z.ZodNumber>; keep: z.ZodOptional<z.ZodEnum<["head", "tail", "both"]>>; maxKb: z.ZodOptional<z.ZodNumber>; }, "strict", z.ZodTypeAny, { mode?: "live" | "batched" | "final"; flushMs?: number; maxChunkKb?: number; keep?: "head" | "tail" | "both"; maxKb?: number; }, { mode?: "live" | "batched" | "final"; flushMs?: number; maxChunkKb?: number; keep?: "head" | "tail" | "both"; maxKb?: number; }>>; result: z.ZodOptional<z.ZodEnum<["text", "json"]>>; describe: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { params?: Record<string, "string" | "number" | "int" | "bool" | { type?: "number" | "int"; min?: number; max?: number; describe?: string; } | { type?: "string"; maxLength?: number; describe?: string; pattern?: string; allowDash?: boolean; } | { values?: string[]; type?: "enum"; describe?: string; } | { type?: "bool"; describe?: string; }>; describe?: string; argv?: string[]; cwd?: string; env?: Record<string, string>; config?: string[]; timeoutSeconds?: number; onRestart?: "report" | "rerun"; output?: { mode?: "live" | "batched" | "final"; flushMs?: number; maxChunkKb?: number; keep?: "head" | "tail" | "both"; maxKb?: number; }; result?: "text" | "json"; }, { params?: Record<string, "string" | "number" | "int" | "bool" | { type?: "number" | "int"; min?: number; max?: number; describe?: string; } | { type?: "string"; maxLength?: number; describe?: string; pattern?: string; allowDash?: boolean; } | { values?: string[]; type?: "enum"; describe?: string; } | { type?: "bool"; describe?: string; }>; describe?: string; argv?: string[]; cwd?: string; env?: Record<string, string>; config?: string[]; timeoutSeconds?: number; onRestart?: "report" | "rerun"; output?: { mode?: "live" | "batched" | "final"; flushMs?: number; maxChunkKb?: number; keep?: "head" | "tail" | "both"; maxKb?: number; }; result?: "text" | "json"; }>>>; program: z.ZodOptional<z.ZodObject<{ main: z.ZodString; resident: z.ZodOptional<z.ZodBoolean>; setup: z.ZodOptional<z.ZodArray<z.ZodObject<{ id: z.ZodString; describe: z.ZodString; run: z.ZodArray<z.ZodString, "many">; inputs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; timeoutSeconds: z.ZodOptional<z.ZodNumber>; }, "strict", z.ZodTypeAny, { id?: string; describe?: string; timeoutSeconds?: number; run?: string[]; inputs?: string[]; }, { id?: string; describe?: string; timeoutSeconds?: number; run?: string[]; inputs?: string[]; }>, "many">>; selfTest: z.ZodOptional<z.ZodObject<{ run: z.ZodArray<z.ZodString, "many">; timeoutSeconds: z.ZodOptional<z.ZodNumber>; }, "strict", z.ZodTypeAny, { timeoutSeconds?: number; run?: string[]; }, { timeoutSeconds?: number; run?: string[]; }>>; }, "strict", z.ZodTypeAny, { main?: string; resident?: boolean; setup?: { id?: string; describe?: string; timeoutSeconds?: number; run?: string[]; inputs?: string[]; }[]; selfTest?: { timeoutSeconds?: number; run?: string[]; }; }, { main?: string; resident?: boolean; setup?: { id?: string; describe?: string; timeoutSeconds?: number; run?: string[]; inputs?: string[]; }[]; selfTest?: { timeoutSeconds?: number; run?: string[]; }; }>>; config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{ secret: z.ZodOptional<z.ZodBoolean>; required: z.ZodOptional<z.ZodBoolean>; describe: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { required?: boolean; describe?: string; secret?: boolean; }, { required?: boolean; describe?: string; secret?: boolean; }>>>; redact: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; onAppDeleted: z.ZodOptional<z.ZodEnum<["kill", "finish"]>>; }, "strict", z.ZodTypeAny, { config?: Record<string, { required?: boolean; describe?: string; secret?: boolean; }>; commands?: Record<string, { params?: Record<string, "string" | "number" | "int" | "bool" | { type?: "number" | "int"; min?: number; max?: number; describe?: string; } | { type?: "string"; maxLength?: number; describe?: string; pattern?: string; allowDash?: boolean; } | { values?: string[]; type?: "enum"; describe?: string; } | { type?: "bool"; describe?: string; }>; describe?: string; argv?: string[]; cwd?: string; env?: Record<string, string>; config?: string[]; timeoutSeconds?: number; onRestart?: "report" | "rerun"; output?: { mode?: "live" | "batched" | "final"; flushMs?: number; maxChunkKb?: number; keep?: "head" | "tail" | "both"; maxKb?: number; }; result?: "text" | "json"; }>; program?: { main?: string; resident?: boolean; setup?: { id?: string; describe?: string; timeoutSeconds?: number; run?: string[]; inputs?: string[]; }[]; selfTest?: { timeoutSeconds?: number; run?: string[]; }; }; redact?: string[]; onAppDeleted?: "kill" | "finish"; }, { config?: Record<string, { required?: boolean; describe?: string; secret?: boolean; }>; commands?: Record<string, { params?: Record<string, "string" | "number" | "int" | "bool" | { type?: "number" | "int"; min?: number; max?: number; describe?: string; } | { type?: "string"; maxLength?: number; describe?: string; pattern?: string; allowDash?: boolean; } | { values?: string[]; type?: "enum"; describe?: string; } | { type?: "bool"; describe?: string; }>; describe?: string; argv?: string[]; cwd?: string; env?: Record<string, string>; config?: string[]; timeoutSeconds?: number; onRestart?: "report" | "rerun"; output?: { mode?: "live" | "batched" | "final"; flushMs?: number; maxChunkKb?: number; keep?: "head" | "tail" | "both"; maxKb?: number; }; result?: "text" | "json"; }>; program?: { main?: string; resident?: boolean; setup?: { id?: string; describe?: string; timeoutSeconds?: number; run?: string[]; inputs?: string[]; }[]; selfTest?: { timeoutSeconds?: number; run?: string[]; }; }; redact?: string[]; onAppDeleted?: "kill" | "finish"; }>, { config?: Record<string, { required?: boolean; describe?: string; secret?: boolean; }>; commands?: Record<string, { params?: Record<string, "string" | "number" | "int" | "bool" | { type?: "number" | "int"; min?: number; max?: number; describe?: string; } | { type?: "string"; maxLength?: number; describe?: string; pattern?: string; allowDash?: boolean; } | { values?: string[]; type?: "enum"; describe?: string; } | { type?: "bool"; describe?: string; }>; describe?: string; argv?: string[]; cwd?: string; env?: Record<string, string>; config?: string[]; timeoutSeconds?: number; onRestart?: "report" | "rerun"; output?: { mode?: "live" | "batched" | "final"; flushMs?: number; maxChunkKb?: number; keep?: "head" | "tail" | "both"; maxKb?: number; }; result?: "text" | "json"; }>; program?: { main?: string; resident?: boolean; setup?: { id?: string; describe?: string; timeoutSeconds?: number; run?: string[]; inputs?: string[]; }[]; selfTest?: { timeoutSeconds?: number; run?: string[]; }; }; redact?: string[]; onAppDeleted?: "kill" | "finish"; }, { config?: Record<string, { required?: boolean; describe?: string; secret?: boolean; }>; commands?: Record<string, { params?: Record<string, "string" | "number" | "int" | "bool" | { type?: "number" | "int"; min?: number; max?: number; describe?: string; } | { type?: "string"; maxLength?: number; describe?: string; pattern?: string; allowDash?: boolean; } | { values?: string[]; type?: "enum"; describe?: string; } | { type?: "bool"; describe?: string; }>; describe?: string; argv?: string[]; cwd?: string; env?: Record<string, string>; config?: string[]; timeoutSeconds?: number; onRestart?: "report" | "rerun"; output?: { mode?: "live" | "batched" | "final"; flushMs?: number; maxChunkKb?: number; keep?: "head" | "tail" | "both"; maxKb?: number; }; result?: "text" | "json"; }>; program?: { main?: string; resident?: boolean; setup?: { id?: string; describe?: string; timeoutSeconds?: number; run?: string[]; inputs?: string[]; }[]; selfTest?: { timeoutSeconds?: number; run?: string[]; }; }; redact?: string[]; onAppDeleted?: "kill" | "finish"; }>>; connections: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{ key: z.ZodString; kind: z.ZodEnum<["oauth2", "apiKey"]>; label: z.ZodString; description: z.ZodOptional<z.ZodString>; authorizeUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>; tokenUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>; oauthScopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; clientIdEnv: z.ZodOptional<z.ZodString>; clientSecretEnv: z.ZodOptional<z.ZodString>; headerNames: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strict", z.ZodTypeAny, { label?: string; authorizeUrl?: string; tokenUrl?: string; clientIdEnv?: string; clientSecretEnv?: string; key?: string; kind?: "apiKey" | "oauth2"; description?: string; oauthScopes?: string[]; headerNames?: string[]; }, { label?: string; authorizeUrl?: string; tokenUrl?: string; clientIdEnv?: string; clientSecretEnv?: string; key?: string; kind?: "apiKey" | "oauth2"; description?: string; oauthScopes?: string[]; headerNames?: string[]; }>, { label?: string; authorizeUrl?: string; tokenUrl?: string; clientIdEnv?: string; clientSecretEnv?: string; key?: string; kind?: "apiKey" | "oauth2"; description?: string; oauthScopes?: string[]; headerNames?: string[]; }, { label?: string; authorizeUrl?: string; tokenUrl?: string; clientIdEnv?: string; clientSecretEnv?: string; key?: string; kind?: "apiKey" | "oauth2"; description?: string; oauthScopes?: string[]; headerNames?: string[]; }>, "many">>>; credentials: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<"family", [z.ZodObject<{ family: z.ZodLiteral<"google">; scopes: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>; label: z.ZodOptional<z.ZodString>; why: z.ZodString; background: z.ZodOptional<z.ZodBoolean>; }, "strict", z.ZodTypeAny, { family?: "google"; label?: string; why?: string; background?: boolean; scopes?: string[]; }, { family?: "google"; label?: string; why?: string; background?: boolean; scopes?: string[]; }>, z.ZodObject<{ family: z.ZodLiteral<"oauth2">; provider: z.ZodEffects<z.ZodObject<{ name: z.ZodString; authorizeUrl: z.ZodEffects<z.ZodString, string, string>; tokenUrl: z.ZodEffects<z.ZodString, string, string>; scopes: z.ZodArray<z.ZodString, "many">; hosts: z.ZodArray<z.ZodString, "many">; accountUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>; accountField: z.ZodOptional<z.ZodString>; authorizeParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; tokenAuth: z.ZodOptional<z.ZodEnum<["body", "basic"]>>; clientIdEnv: z.ZodOptional<z.ZodString>; clientSecretEnv: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { name?: string; hosts?: string[]; scopes?: string[]; authorizeUrl?: string; tokenUrl?: string; accountUrl?: string; accountField?: string; authorizeParams?: Record<string, string>; tokenAuth?: "body" | "basic"; clientIdEnv?: string; clientSecretEnv?: string; }, { name?: string; hosts?: string[]; scopes?: string[]; authorizeUrl?: string; tokenUrl?: string; accountUrl?: string; accountField?: string; authorizeParams?: Record<string, string>; tokenAuth?: "body" | "basic"; clientIdEnv?: string; clientSecretEnv?: string; }>, { name?: string; hosts?: string[]; scopes?: string[]; authorizeUrl?: string; tokenUrl?: string; accountUrl?: string; accountField?: string; authorizeParams?: Record<string, string>; tokenAuth?: "body" | "basic"; clientIdEnv?: string; clientSecretEnv?: string; }, { name?: string; hosts?: string[]; scopes?: string[]; authorizeUrl?: string; tokenUrl?: string; accountUrl?: string; accountField?: string; authorizeParams?: Record<string, string>; tokenAuth?: "body" | "basic"; clientIdEnv?: string; clientSecretEnv?: string; }>; label: z.ZodOptional<z.ZodString>; why: z.ZodString; background: z.ZodOptional<z.ZodBoolean>; }, "strict", z.ZodTypeAny, { family?: "oauth2"; provider?: { name?: string; hosts?: string[]; scopes?: string[]; authorizeUrl?: string; tokenUrl?: string; accountUrl?: string; accountField?: string; authorizeParams?: Record<string, string>; tokenAuth?: "body" | "basic"; clientIdEnv?: string; clientSecretEnv?: string; }; label?: string; why?: string; background?: boolean; }, { family?: "oauth2"; provider?: { name?: string; hosts?: string[]; scopes?: string[]; authorizeUrl?: string; tokenUrl?: string; accountUrl?: string; accountField?: string; authorizeParams?: Record<string, string>; tokenAuth?: "body" | "basic"; clientIdEnv?: string; clientSecretEnv?: string; }; label?: string; why?: string; background?: boolean; }>, z.ZodObject<{ family: z.ZodLiteral<"apiKey">; provider: z.ZodEffects<z.ZodObject<{ name: z.ZodString; hosts: z.ZodArray<z.ZodString, "many">; header: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>; prefix: z.ZodOptional<z.ZodString>; keyHelp: z.ZodOptional<z.ZodString>; verifyUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>; }, "strict", z.ZodTypeAny, { name?: string; hosts?: string[]; header?: string; prefix?: string; keyHelp?: string; verifyUrl?: string; }, { name?: string; hosts?: string[]; header?: string; prefix?: string; keyHelp?: string; verifyUrl?: string; }>, { name?: string; hosts?: string[]; header?: string; prefix?: string; keyHelp?: string; verifyUrl?: string; }, { name?: string; hosts?: string[]; header?: string; prefix?: string; keyHelp?: string; verifyUrl?: string; }>; label: z.ZodOptional<z.ZodString>; why: z.ZodString; background: z.ZodOptional<z.ZodBoolean>; }, "strict", z.ZodTypeAny, { family?: "apiKey"; provider?: { name?: string; hosts?: string[]; header?: string; prefix?: string; keyHelp?: string; verifyUrl?: string; }; label?: string; why?: string; background?: boolean; }, { family?: "apiKey"; provider?: { name?: string; hosts?: string[]; header?: string; prefix?: string; keyHelp?: string; verifyUrl?: string; }; label?: string; why?: string; background?: boolean; }>]>>, Record<string, { family?: "apiKey"; provider?: { name?: string; hosts?: string[]; header?: string; prefix?: string; keyHelp?: string; verifyUrl?: string; }; label?: string; why?: string; background?: boolean; } | { family?: "google"; label?: string; why?: string; background?: boolean; scopes?: string[]; } | { family?: "oauth2"; provider?: { name?: string; hosts?: string[]; scopes?: string[]; authorizeUrl?: string; tokenUrl?: string; accountUrl?: string; accountField?: string; authorizeParams?: Record<string, string>; tokenAuth?: "body" | "basic"; clientIdEnv?: string; clientSecretEnv?: string; }; label?: string; why?: string; background?: boolean; }>, Record<string, { family?: "apiKey"; provider?: { name?: string; hosts?: string[]; header?: string; prefix?: string; keyHelp?: string; verifyUrl?: string; }; label?: string; why?: string; background?: boolean; } | { family?: "google"; label?: string; why?: string; background?: boolean; scopes?: string[]; } | { family?: "oauth2"; provider?: { name?: string; hosts?: string[]; scopes?: string[]; authorizeUrl?: string; tokenUrl?: string; accountUrl?: string; accountField?: string; authorizeParams?: Record<string, string>; tokenAuth?: "body" | "basic"; clientIdEnv?: string; clientSecretEnv?: string; }; label?: string; why?: string; background?: boolean; }>>>; llm: z.ZodOptional<z.ZodObject<{ why: z.ZodString; dailyBudgetUsd: z.ZodOptional<z.ZodNumber>; models: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strict", z.ZodTypeAny, { why?: string; dailyBudgetUsd?: number; models?: string[]; }, { why?: string; dailyBudgetUsd?: number; models?: string[]; }>>; fileSources: z.ZodOptional<z.ZodEffects<z.ZodObject<{ workspace: z.ZodOptional<z.ZodEnum<["read", "readwrite"]>>; providers: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>; write: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strict", z.ZodTypeAny, { write?: string[]; workspace?: "read" | "readwrite"; providers?: string[]; }, { write?: string[]; workspace?: "read" | "readwrite"; providers?: string[]; }>, { write?: string[]; workspace?: "read" | "readwrite"; providers?: string[]; }, { write?: string[]; workspace?: "read" | "readwrite"; providers?: string[]; }>>; fileProviders: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{ key: z.ZodString; connectionKey: z.ZodString; label: z.ZodString; }, "strict", z.ZodTypeAny, { label?: string; key?: string; connectionKey?: string; }, { label?: string; key?: string; connectionKey?: string; }>, "many">>>; fileProducers: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{ key: z.ZodString; label: z.ZodString; }, "strict", z.ZodTypeAny, { label?: string; key?: string; }, { label?: string; key?: string; }>, "many">>>; uses: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{ contract: z.ZodString; label: z.ZodOptional<z.ZodString>; optional: z.ZodOptional<z.ZodBoolean>; }, "strict", z.ZodTypeAny, { label?: string; contract?: string; optional?: boolean; }, { label?: string; contract?: string; optional?: boolean; }>>>; provides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{ tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; events: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; models: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strict", z.ZodTypeAny, { models?: string[]; tools?: string[]; events?: string[]; }, { models?: string[]; tools?: string[]; events?: string[]; }>>>; channel: z.ZodOptional<z.ZodObject<{ topics: z.ZodRecord<z.ZodString, z.ZodObject<{ audience: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"all">, z.ZodLiteral<"viewer">, z.ZodString]>>; mayAddress: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; description: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { description?: string; audience?: string; mayAddress?: string[]; }, { description?: string; audience?: string; mayAddress?: string[]; }>>; }, "strict", z.ZodTypeAny, { topics?: Record<string, { description?: string; audience?: string; mayAddress?: string[]; }>; }, { topics?: Record<string, { description?: string; audience?: string; mayAddress?: string[]; }>; }>>; db: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{ scope: z.ZodOptional<z.ZodEnum<["instance", "workspace", "user"]>>; owner: z.ZodOptional<z.ZodLiteral<"creator">>; fields: z.ZodRecord<z.ZodString, z.ZodString>; sealed: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; unique: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">>; indexes: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodObject<{ fields: z.ZodArray<z.ZodString, "many">; kind: z.ZodOptional<z.ZodEnum<["btree", "contains", "text"]>>; }, "strict", z.ZodTypeAny, { kind?: "text" | "btree" | "contains"; fields?: string[]; }, { kind?: "text" | "btree" | "contains"; fields?: string[]; }>]>, "many">>; rules: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>; }, "strict", z.ZodTypeAny, { owner?: "creator"; fields?: Record<string, string>; scope?: "workspace" | "instance" | "user"; sealed?: string[]; unique?: string[][]; indexes?: (string[] | { kind?: "text" | "btree" | "contains"; fields?: string[]; })[]; rules?: Record<string, unknown>; }, { owner?: "creator"; fields?: Record<string, string>; scope?: "workspace" | "instance" | "user"; sealed?: string[]; unique?: string[][]; indexes?: (string[] | { kind?: "text" | "btree" | "contains"; fields?: string[]; })[]; rules?: Record<string, unknown>; }>>>; }, "strict", z.ZodTypeAny, { name?: string; scopes?: string[]; roles?: { custom?: { models?: Record<string, { where?: string[]; hide?: string[]; update?: { fields?: string[]; transitions?: string; }; }>; ops?: string[]; attributes?: string[]; }; default?: { owner?: string; "member-edit"?: string; "member-readonly"?: string; visitor?: string; anonymous?: string; agent?: string; }; vocabulary?: string[]; describe?: Record<string, string>; attributes?: Record<string, "string" | "boolean" | "int">; }; description?: string; manifestVersion?: 1; id?: string; version?: string; applicationType?: string; entry?: string; icon?: string; author?: { name?: string; email?: string; url?: string; }; kickableTasks?: string[] | Record<string, { access?: string[] | "write" | "read" | "public" | "token"; requires?: "account"; }>; webhooks?: string[]; ops?: string[] | Record<string, { access?: string[] | "write" | "read" | "public" | "token"; requires?: "account"; }>; routes?: string[] | Record<string, { access?: string[] | "write" | "read" | "public" | "token"; requires?: "account"; }>; pollTasks?: { task?: string; everyMinutes?: number; }[]; platformApi?: { min?: string; max?: string; }; workspaceTools?: string[]; device?: { config?: Record<string, { required?: boolean; describe?: string; secret?: boolean; }>; commands?: Record<string, { params?: Record<string, "string" | "number" | "int" | "bool" | { type?: "number" | "int"; min?: number; max?: number; describe?: string; } | { type?: "string"; maxLength?: number; describe?: string; pattern?: string; allowDash?: boolean; } | { values?: string[]; type?: "enum"; describe?: string; } | { type?: "bool"; describe?: string; }>; describe?: string; argv?: string[]; cwd?: string; env?: Record<string, string>; config?: string[]; timeoutSeconds?: number; onRestart?: "report" | "rerun"; output?: { mode?: "live" | "batched" | "final"; flushMs?: number; maxChunkKb?: number; keep?: "head" | "tail" | "both"; maxKb?: number; }; result?: "text" | "json"; }>; program?: { main?: string; resident?: boolean; setup?: { id?: string; describe?: string; timeoutSeconds?: number; run?: string[]; inputs?: string[]; }[]; selfTest?: { timeoutSeconds?: number; run?: string[]; }; }; redact?: string[]; onAppDeleted?: "kill" | "finish"; }; connections?: { label?: string; authorizeUrl?: string; tokenUrl?: string; clientIdEnv?: string; clientSecretEnv?: string; key?: string; kind?: "apiKey" | "oauth2"; description?: string; oauthScopes?: string[]; headerNames?: string[]; }[]; credentials?: Record<string, { family?: "apiKey"; provider?: { name?: string; hosts?: string[]; header?: string; prefix?: string; keyHelp?: string; verifyUrl?: string; }; label?: string; why?: string; background?: boolean; } | { family?: "google"; label?: string; why?: string; background?: boolean; scopes?: string[]; } | { family?: "oauth2"; provider?: { name?: string; hosts?: string[]; scopes?: string[]; authorizeUrl?: string; tokenUrl?: string; accountUrl?: string; accountField?: string; authorizeParams?: Record<string, string>; tokenAuth?: "body" | "basic"; clientIdEnv?: string; clientSecretEnv?: string; }; label?: string; why?: string; background?: boolean; }>; llm?: { why?: string; dailyBudgetUsd?: number; models?: string[]; }; fileSources?: { write?: string[]; workspace?: "read" | "readwrite"; providers?: string[]; }; fileProviders?: { label?: string; key?: string; connectionKey?: string; }[]; fileProducers?: { label?: string; key?: string; }[]; uses?: Record<string, { label?: string; contract?: string; optional?: boolean; }>; provides?: Record<string, { models?: string[]; tools?: string[]; events?: string[]; }>; channel?: { topics?: Record<string, { description?: string; audience?: string; mayAddress?: string[]; }>; }; db?: Record<string, { owner?: "creator"; fields?: Record<string, string>; scope?: "workspace" | "instance" | "user"; sealed?: string[]; unique?: string[][]; indexes?: (string[] | { kind?: "text" | "btree" | "contains"; fields?: string[]; })[]; rules?: Record<string, unknown>; }>; }, { name?: string; scopes?: string[]; roles?: { custom?: { models?: Record<string, { where?: string[]; hide?: string[]; update?: { fields?: string[]; transitions?: string; }; }>; ops?: string[]; attributes?: string[]; }; default?: { owner?: string; "member-edit"?: string; "member-readonly"?: string; visitor?: string; anonymous?: string; agent?: string; }; vocabulary?: string[]; describe?: Record<string, string>; attributes?: Record<string, "string" | "boolean" | "int">; }; description?: string; manifestVersion?: 1; id?: string; version?: string; applicationType?: string; entry?: string; icon?: string; author?: { name?: string; email?: string; url?: string; }; kickableTasks?: string[] | Record<string, { access?: string[] | "write" | "read" | "public" | "token"; requires?: "account"; }>; webhooks?: string[]; ops?: string[] | Record<string, { access?: string[] | "write" | "read" | "public" | "token"; requires?: "account"; }>; routes?: string[] | Record<string, { access?: string[] | "write" | "read" | "public" | "token"; requires?: "account"; }>; pollTasks?: { task?: string; everyMinutes?: number; }[]; platformApi?: { min?: string; max?: string; }; workspaceTools?: string[]; device?: { config?: Record<string, { required?: boolean; describe?: string; secret?: boolean; }>; commands?: Record<string, { params?: Record<string, "string" | "number" | "int" | "bool" | { type?: "number" | "int"; min?: number; max?: number; describe?: string; } | { type?: "string"; maxLength?: number; describe?: string; pattern?: string; allowDash?: boolean; } | { values?: string[]; type?: "enum"; describe?: string; } | { type?: "bool"; describe?: string; }>; describe?: string; argv?: string[]; cwd?: string; env?: Record<string, string>; config?: string[]; timeoutSeconds?: number; onRestart?: "report" | "rerun"; output?: { mode?: "live" | "batched" | "final"; flushMs?: number; maxChunkKb?: number; keep?: "head" | "tail" | "both"; maxKb?: number; }; result?: "text" | "json"; }>; program?: { main?: string; resident?: boolean; setup?: { id?: string; describe?: string; timeoutSeconds?: number; run?: string[]; inputs?: string[]; }[]; selfTest?: { timeoutSeconds?: number; run?: string[]; }; }; redact?: string[]; onAppDeleted?: "kill" | "finish"; }; connections?: { label?: string; authorizeUrl?: string; tokenUrl?: string; clientIdEnv?: string; clientSecretEnv?: string; key?: string; kind?: "apiKey" | "oauth2"; description?: string; oauthScopes?: string[]; headerNames?: string[]; }[]; credentials?: Record<string, { family?: "apiKey"; provider?: { name?: string; hosts?: string[]; header?: string; prefix?: string; keyHelp?: string; verifyUrl?: string; }; label?: string; why?: string; background?: boolean; } | { family?: "google"; label?: string; why?: string; background?: boolean; scopes?: string[]; } | { family?: "oauth2"; provider?: { name?: string; hosts?: string[]; scopes?: string[]; authorizeUrl?: string; tokenUrl?: string; accountUrl?: string; accountField?: string; authorizeParams?: Record<string, string>; tokenAuth?: "body" | "basic"; clientIdEnv?: string; clientSecretEnv?: string; }; label?: string; why?: string; background?: boolean; }>; llm?: { why?: string; dailyBudgetUsd?: number; models?: string[]; }; fileSources?: { write?: string[]; workspace?: "read" | "readwrite"; providers?: string[]; }; fileProviders?: { label?: string; key?: string; connectionKey?: string; }[]; fileProducers?: { label?: string; key?: string; }[]; uses?: Record<string, { label?: string; contract?: string; optional?: boolean; }>; provides?: Record<string, { models?: string[]; tools?: string[]; events?: string[]; }>; channel?: { topics?: Record<string, { description?: string; audience?: string; mayAddress?: string[]; }>; }; db?: Record<string, { owner?: "creator"; fields?: Record<string, string>; scope?: "workspace" | "instance" | "user"; sealed?: string[]; unique?: string[][]; indexes?: (string[] | { kind?: "text" | "btree" | "contains"; fields?: string[]; })[]; rules?: Record<string, unknown>; }>; }>, { name?: string; scopes?: string[]; roles?: { custom?: { models?: Record<string, { where?: string[]; hide?: string[]; update?: { fields?: string[]; transitions?: string; }; }>; ops?: string[]; attributes?: string[]; }; default?: { owner?: string; "member-edit"?: string; "member-readonly"?: string; visitor?: string; anonymous?: string; agent?: string; }; vocabulary?: string[]; describe?: Record<string, string>; attributes?: Record<string, "string" | "boolean" | "int">; }; description?: string; manifestVersion?: 1; id?: string; version?: string; applicationType?: string; entry?: string; icon?: string; author?: { name?: string; email?: string; url?: string; }; kickableTasks?: string[] | Record<string, { access?: string[] | "write" | "read" | "public" | "token"; requires?: "account"; }>; webhooks?: string[]; ops?: string[] | Record<string, { access?: string[] | "write" | "read" | "public" | "token"; requires?: "account"; }>; routes?: string[] | Record<string, { access?: string[] | "write" | "read" | "public" | "token"; requires?: "account"; }>; pollTasks?: { task?: string; everyMinutes?: number; }[]; platformApi?: { min?: string; max?: string; }; workspaceTools?: string[]; device?: { config?: Record<string, { required?: boolean; describe?: string; secret?: boolean; }>; commands?: Record<string, { params?: Record<string, "string" | "number" | "int" | "bool" | { type?: "number" | "int"; min?: number; max?: number; describe?: string; } | { type?: "string"; maxLength?: number; describe?: string; pattern?: string; allowDash?: boolean; } | { values?: string[]; type?: "enum"; describe?: string; } | { type?: "bool"; describe?: string; }>; describe?: string; argv?: string[]; cwd?: string; env?: Record<string, string>; config?: string[]; timeoutSeconds?: number; onRestart?: "report" | "rerun"; output?: { mode?: "live" | "batched" | "final"; flushMs?: number; maxChunkKb?: number; keep?: "head" | "tail" | "both"; maxKb?: number; }; result?: "text" | "json"; }>; program?: { main?: string; resident?: boolean; setup?: { id?: string; describe?: string; timeoutSeconds?: number; run?: string[]; inputs?: string[]; }[]; selfTest?: { timeoutSeconds?: number; run?: string[]; }; }; redact?: string[]; onAppDeleted?: "kill" | "finish"; }; connections?: { label?: string; authorizeUrl?: string; tokenUrl?: string; clientIdEnv?: string; clientSecretEnv?: string; key?: string; kind?: "apiKey" | "oauth2"; description?: string; oauthScopes?: string[]; headerNames?: string[]; }[]; credentials?: Record<string, { family?: "apiKey"; provider?: { name?: string; hosts?: string[]; header?: string; prefix?: string; keyHelp?: string; verifyUrl?: string; }; label?: string; why?: string; background?: boolean; } | { family?: "google"; label?: string; why?: string; background?: boolean; scopes?: string[]; } | { family?: "oauth2"; provider?: { name?: string; hosts?: string[]; scopes?: string[]; authorizeUrl?: string; tokenUrl?: string; accountUrl?: string; accountField?: string; authorizeParams?: Record<string, string>; tokenAuth?: "body" | "basic"; clientIdEnv?: string; clientSecretEnv?: string; }; label?: string; why?: string; background?: boolean; }>; llm?: { why?: string; dailyBudgetUsd?: number; models?: string[]; }; fileSources?: { write?: string[]; workspace?: "read" | "readwrite"; providers?: string[]; }; fileProviders?: { label?: string; key?: string; connectionKey?: string; }[]; fileProducers?: { label?: string; key?: string; }[]; uses?: Record<string, { label?: string; contract?: string; optional?: boolean; }>; provides?: Record<string, { models?: string[]; tools?: string[]; events?: string[]; }>; channel?: { topics?: Record<string, { description?: string; audience?: string; mayAddress?: string[]; }>; }; db?: Record<string, { owner?: "creator"; fields?: Record<string, string>; scope?: "workspace" | "instance" | "user"; sealed?: string[]; unique?: string[][]; indexes?: (string[] | { kind?: "text" | "btree" | "contains"; fields?: string[]; })[]; rules?: Record<string, unknown>; }>; }, { name?: string; scopes?: string[]; roles?: { custom?: { models?: Record<string, { where?: string[]; hide?: string[]; update?: { fields?: string[]; transitions?: string; }; }>; ops?: string[]; attributes?: string[]; }; default?: { owner?: string; "member-edit"?: string; "member-readonly"?: string; visitor?: string; anonymous?: string; agent?: string; }; vocabulary?: string[]; describe?: Record<string, string>; attributes?: Record<string, "string" | "boolean" | "int">; }; description?: string; manifestVersion?: 1; id?: string; version?: string; applicationType?: string; entry?: string; icon?: string; author?: { name?: string; email?: string; url?: string; }; kickableTasks?: string[] | Record<string, { access?: string[] | "write" | "read" | "public" | "token"; requires?: "account"; }>; webhooks?: string[]; ops?: string[] | Record<string, { access?: string[] | "write" | "read" | "public" | "token"; requires?: "account"; }>; routes?: string[] | Record<string, { access?: string[] | "write" | "read" | "public" | "token"; requires?: "account"; }>; pollTasks?: { task?: string; everyMinutes?: number; }[]; platformApi?: { min?: string; max?: string; }; workspaceTools?: string[]; device?: { config?: Record<string, { required?: boolean; describe?: string; secret?: boolean; }>; commands?: Record<string, { params?: Record<string, "string" | "number" | "int" | "bool" | { type?: "number" | "int"; min?: number; max?: number; describe?: string; } | { type?: "string"; maxLength?: number; describe?: string; pattern?: string; allowDash?: boolean; } | { values?: string[]; type?: "enum"; describe?: string; } | { type?: "bool"; describe?: string; }>; describe?: string; argv?: string[]; cwd?: string; env?: Record<string, string>; config?: string[]; timeoutSeconds?: number; onRestart?: "report" | "rerun"; output?: { mode?: "live" | "batched" | "final"; flushMs?: number; maxChunkKb?: number; keep?: "head" | "tail" | "both"; maxKb?: number; }; result?: "text" | "json"; }>; program?: { main?: string; resident?: boolean; setup?: { id?: string; describe?: string; timeoutSeconds?: number; run?: string[]; inputs?: string[]; }[]; selfTest?: { timeoutSeconds?: number; run?: string[]; }; }; redact?: string[]; onAppDeleted?: "kill" | "finish"; }; connections?: { label?: string; authorizeUrl?: string; tokenUrl?: string; clientIdEnv?: string; clientSecretEnv?: string; key?: string; kind?: "apiKey" | "oauth2"; description?: string; oauthScopes?: string[]; headerNames?: string[]; }[]; credentials?: Record<string, { family?: "apiKey"; provider?: { name?: string; hosts?: string[]; header?: string; prefix?: string; keyHelp?: string; verifyUrl?: string; }; label?: string; why?: string; background?: boolean; } | { family?: "google"; label?: string; why?: string; background?: boolean; scopes?: string[]; } | { family?: "oauth2"; provider?: { name?: string; hosts?: string[]; scopes?: string[]; authorizeUrl?: string; tokenUrl?: string; accountUrl?: string; accountField?: string; authorizeParams?: Record<string, string>; tokenAuth?: "body" | "basic"; clientIdEnv?: string; clientSecretEnv?: string; }; label?: string; why?: string; background?: boolean; }>; llm?: { why?: string; dailyBudgetUsd?: number; models?: string[]; }; fileSources?: { write?: string[]; workspace?: "read" | "readwrite"; providers?: string[]; }; fileProviders?: { label?: string; key?: string; connectionKey?: string; }[]; fileProducers?: { label?: string; key?: string; }[]; uses?: Record<string, { label?: string; contract?: string; optional?: boolean; }>; provides?: Record<string, { models?: string[]; tools?: string[]; events?: string[]; }>; channel?: { topics?: Record<string, { description?: string; audience?: string; mayAddress?: string[]; }>; }; db?: Record<string, { owner?: "creator"; fields?: Record<string, string>; scope?: "workspace" | "instance" | "user"; sealed?: string[]; unique?: string[][]; indexes?: (string[] | { kind?: "text" | "btree" | "contains"; fields?: string[]; })[]; rules?: Record<string, unknown>; }>; }>
|
|
950
1014
|
```
|
|
951
1015
|
|
|
952
1016
|
#### `PluginRolesSchema` — const · src/manifest.ts
|
|
@@ -954,7 +1018,7 @@ const PluginManifestSchema: z.ZodEffects<z.ZodObject<{ manifestVersion: z.ZodLit
|
|
|
954
1018
|
WHAT THE APP CALLS ITS PEOPLE.
|
|
955
1019
|
|
|
956
1020
|
```ts
|
|
957
|
-
const PluginRolesSchema: z.ZodEffects<z.ZodObject<{ vocabulary: z.ZodArray<z.ZodString, "many">; default: z.ZodDefault<z.ZodOptional<z.ZodObject<{ owner: z.ZodOptional<z.ZodString>; "member-edit": z.ZodOptional<z.ZodString>; "member-readonly": z.ZodOptional<z.ZodString>; visitor: z.ZodOptional<z.ZodString>; anonymous: z.ZodOptional<z.ZodString>; agent: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { owner?: string; "member-edit"?: string; "member-readonly"?: string; visitor?: string; anonymous?: string; agent?: string; }, { owner?: string; "member-edit"?: string; "member-readonly"?: string; visitor?: string; anonymous?: string; agent?: string; }>>>; describe: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["string", "int", "boolean"]>>>; custom: z.ZodOptional<z.ZodObject<{ attributes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; models: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{ where: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; hide: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; update: z.ZodOptional<z.ZodObject<{ fields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; transitions: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { fields?: string[]; transitions?: string; }, { fields?: string[]; transitions?: string; }>>; }, "strict", z.ZodTypeAny, { where?: string[]; hide?: string[]; update?: { fields?: string[]; transitions?: string; }; }, { where?: string[]; hide?: string[]; update?: { fields?: string[]; transitions?: string; }; }>>>; ops: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strict", z.ZodTypeAny, { models?: Record<string, { where?: string[]; hide?: string[]; update?: { fields?: string[]; transitions?: string; }; }>; ops?: string[]; attributes?: string[]; }, { models?: Record<string, { where?: string[]; hide?: string[]; update?: { fields?: string[]; transitions?: string; }; }>; ops?: string[]; attributes?: string[]; }>>; }, "strict", z.ZodTypeAny, {
|
|
1021
|
+
const PluginRolesSchema: z.ZodEffects<z.ZodObject<{ vocabulary: z.ZodArray<z.ZodString, "many">; default: z.ZodDefault<z.ZodOptional<z.ZodObject<{ owner: z.ZodOptional<z.ZodString>; "member-edit": z.ZodOptional<z.ZodString>; "member-readonly": z.ZodOptional<z.ZodString>; visitor: z.ZodOptional<z.ZodString>; anonymous: z.ZodOptional<z.ZodString>; agent: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { owner?: string; "member-edit"?: string; "member-readonly"?: string; visitor?: string; anonymous?: string; agent?: string; }, { owner?: string; "member-edit"?: string; "member-readonly"?: string; visitor?: string; anonymous?: string; agent?: string; }>>>; describe: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["string", "int", "boolean"]>>>; custom: z.ZodOptional<z.ZodObject<{ attributes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; models: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{ where: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; hide: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; update: z.ZodOptional<z.ZodObject<{ fields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; transitions: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { fields?: string[]; transitions?: string; }, { fields?: string[]; transitions?: string; }>>; }, "strict", z.ZodTypeAny, { where?: string[]; hide?: string[]; update?: { fields?: string[]; transitions?: string; }; }, { where?: string[]; hide?: string[]; update?: { fields?: string[]; transitions?: string; }; }>>>; ops: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strict", z.ZodTypeAny, { models?: Record<string, { where?: string[]; hide?: string[]; update?: { fields?: string[]; transitions?: string; }; }>; ops?: string[]; attributes?: string[]; }, { models?: Record<string, { where?: string[]; hide?: string[]; update?: { fields?: string[]; transitions?: string; }; }>; ops?: string[]; attributes?: string[]; }>>; }, "strict", z.ZodTypeAny, { custom?: { models?: Record<string, { where?: string[]; hide?: string[]; update?: { fields?: string[]; transitions?: string; }; }>; ops?: string[]; attributes?: string[]; }; default?: { owner?: string; "member-edit"?: string; "member-readonly"?: string; visitor?: string; anonymous?: string; agent?: string; }; vocabulary?: string[]; describe?: Record<string, string>; attributes?: Record<string, "string" | "boolean" | "int">; }, { custom?: { models?: Record<string, { where?: string[]; hide?: string[]; update?: { fields?: string[]; transitions?: string; }; }>; ops?: string[]; attributes?: string[]; }; default?: { owner?: string; "member-edit"?: string; "member-readonly"?: string; visitor?: string; anonymous?: string; agent?: string; }; vocabulary?: string[]; describe?: Record<string, string>; attributes?: Record<string, "string" | "boolean" | "int">; }>, { custom?: { models?: Record<string, { where?: string[]; hide?: string[]; update?: { fields?: string[]; transitions?: string; }; }>; ops?: string[]; attributes?: string[]; }; default?: { owner?: string; "member-edit"?: string; "member-readonly"?: string; visitor?: string; anonymous?: string; agent?: string; }; vocabulary?: string[]; describe?: Record<string, string>; attributes?: Record<string, "string" | "boolean" | "int">; }, { custom?: { models?: Record<string, { where?: string[]; hide?: string[]; update?: { fields?: string[]; transitions?: string; }; }>; ops?: string[]; attributes?: string[]; }; default?: { owner?: string; "member-edit"?: string; "member-readonly"?: string; visitor?: string; anonymous?: string; agent?: string; }; vocabulary?: string[]; describe?: Record<string, string>; attributes?: Record<string, "string" | "boolean" | "int">; }>
|
|
958
1022
|
```
|
|
959
1023
|
|
|
960
1024
|
#### `pluginRouteUrl` — function · src/helpers.ts
|
|
@@ -970,7 +1034,7 @@ function pluginRouteUrl( pluginId: string, routeName: string, nodeId: string, pa
|
|
|
970
1034
|
`access` is a platform level — or a LIST OF THE APP'S OWN ROLE WORDS, which opens the surface to exactly those roles (the owner always passes) and to nobody else, whatever their workspace standing. A granted outsider who holds `staff` reaches `set-order-status` this way; a workspace editor the owner never named does not. A composed role reaches it only when it was handed the surface (`roles.custom.ops`).
|
|
971
1035
|
|
|
972
1036
|
```ts
|
|
973
|
-
const PluginSurfaceEntrySchema: z.ZodObject<{ access: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodEnum<["write", "read", "public", "token"]>, z.ZodArray<z.ZodString, "many">]>>>; requires: z.ZodOptional<z.ZodLiteral<"account">>; }, "strict", z.ZodTypeAny, { access?: "write" | "read" | "public" | "token"
|
|
1037
|
+
const PluginSurfaceEntrySchema: z.ZodObject<{ access: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodEnum<["write", "read", "public", "token"]>, z.ZodArray<z.ZodString, "many">]>>>; requires: z.ZodOptional<z.ZodLiteral<"account">>; }, "strict", z.ZodTypeAny, { access?: string[] | "write" | "read" | "public" | "token"; requires?: "account"; }, { access?: string[] | "write" | "read" | "public" | "token"; requires?: "account"; }>
|
|
974
1038
|
```
|
|
975
1039
|
|
|
976
1040
|
#### `previewPersona` — function · src/helpers.ts
|
|
@@ -1013,6 +1077,14 @@ Render one declared command. Throws `DeviceCommandError` with a sentence for any
|
|
|
1013
1077
|
function renderCommand(block: DeviceBlock, name: string, params: Record<string, unknown> = {}): RenderedCommand
|
|
1014
1078
|
```
|
|
1015
1079
|
|
|
1080
|
+
#### `RESERVED_AUTHORIZE_PARAMS` — const · src/manifest.ts
|
|
1081
|
+
|
|
1082
|
+
Authorize parameters the platform sets itself; a slot may not override them.
|
|
1083
|
+
|
|
1084
|
+
```ts
|
|
1085
|
+
const RESERVED_AUTHORIZE_PARAMS: readonly ["response_type", "client_id", "redirect_uri", "scope", "state", "code_challenge", "code_challenge_method", "nonce"]
|
|
1086
|
+
```
|
|
1087
|
+
|
|
1016
1088
|
#### `resolveAppRole` — function · src/roles.ts
|
|
1017
1089
|
|
|
1018
1090
|
The app's word for this caller.
|
|
@@ -1213,7 +1285,7 @@ A manifest with one entry removed (the bytes stay; they may be shared). Pure.
|
|
|
1213
1285
|
function withoutAsset(assets: AssetsManifest | null | undefined, pluginId: string, name: string): AssetsManifest
|
|
1214
1286
|
```
|
|
1215
1287
|
|
|
1216
|
-
### Types (
|
|
1288
|
+
### Types (106)
|
|
1217
1289
|
|
|
1218
1290
|
#### `AgentRunToolContext` — interface · src/types.ts
|
|
1219
1291
|
|
|
@@ -1230,6 +1302,18 @@ interface AgentRunToolContext {
|
|
|
1230
1302
|
}
|
|
1231
1303
|
```
|
|
1232
1304
|
|
|
1305
|
+
#### `ApiKeyCredentialSlot` — type · src/manifest.ts
|
|
1306
|
+
|
|
1307
|
+
```ts
|
|
1308
|
+
type ApiKeyCredentialSlot = z.infer<typeof ApiKeyCredentialSlotSchema>;
|
|
1309
|
+
```
|
|
1310
|
+
|
|
1311
|
+
#### `ApiKeyProvider` — type · src/manifest.ts
|
|
1312
|
+
|
|
1313
|
+
```ts
|
|
1314
|
+
type ApiKeyProvider = z.infer<typeof ApiKeyProviderSchema>;
|
|
1315
|
+
```
|
|
1316
|
+
|
|
1233
1317
|
#### `ApplicationIdentifier` — interface · src/types.ts
|
|
1234
1318
|
|
|
1235
1319
|
MIRRORS the host's `ApplicationIdentifier` (venus-sdk.ts) exactly.
|
|
@@ -1903,6 +1987,12 @@ interface FileWriteResult {
|
|
|
1903
1987
|
type GoogleCredentialScope = (typeof GOOGLE_CREDENTIAL_SCOPES)[number];
|
|
1904
1988
|
```
|
|
1905
1989
|
|
|
1990
|
+
#### `GoogleCredentialSlot` — type · src/manifest.ts
|
|
1991
|
+
|
|
1992
|
+
```ts
|
|
1993
|
+
type GoogleCredentialSlot = z.infer<typeof GoogleCredentialSlotSchema>;
|
|
1994
|
+
```
|
|
1995
|
+
|
|
1906
1996
|
#### `InstalledPluginInfo` — interface · src/manifest.ts
|
|
1907
1997
|
|
|
1908
1998
|
Data-only row the host codegen inlines into registry.gen.ts.
|
|
@@ -1976,6 +2066,25 @@ interface LabelShape {
|
|
|
1976
2066
|
}
|
|
1977
2067
|
```
|
|
1978
2068
|
|
|
2069
|
+
#### `MailWaitArgs` — interface · src/agent-wait.ts
|
|
2070
|
+
|
|
2071
|
+
```ts
|
|
2072
|
+
interface MailWaitArgs {
|
|
2073
|
+
workspaceId: string;
|
|
2074
|
+
inboxNodeId: string;
|
|
2075
|
+
inboxName: string;
|
|
2076
|
+
toolName: string;
|
|
2077
|
+
threadId?: string;
|
|
2078
|
+
fromEmail?: string;
|
|
2079
|
+
subject?: string;
|
|
2080
|
+
afterTimestamp: number;
|
|
2081
|
+
timeoutSeconds?: number;
|
|
2082
|
+
directiveId: string;
|
|
2083
|
+
onResume?: string;
|
|
2084
|
+
onTimeout?: string;
|
|
2085
|
+
}
|
|
2086
|
+
```
|
|
2087
|
+
|
|
1979
2088
|
#### `MergeDescription` — interface · src/types.ts
|
|
1980
2089
|
|
|
1981
2090
|
```ts
|
|
@@ -1998,6 +2107,18 @@ What `notify`'s caller asked for. Absent = the topic's own audience, aimed at th
|
|
|
1998
2107
|
type NotifyTarget = { viewerIds: string[] } | { role: string } | "apps";
|
|
1999
2108
|
```
|
|
2000
2109
|
|
|
2110
|
+
#### `OAuth2CredentialSlot` — type · src/manifest.ts
|
|
2111
|
+
|
|
2112
|
+
```ts
|
|
2113
|
+
type OAuth2CredentialSlot = z.infer<typeof OAuth2CredentialSlotSchema>;
|
|
2114
|
+
```
|
|
2115
|
+
|
|
2116
|
+
#### `OAuth2Provider` — type · src/manifest.ts
|
|
2117
|
+
|
|
2118
|
+
```ts
|
|
2119
|
+
type OAuth2Provider = z.infer<typeof OAuth2ProviderSchema>;
|
|
2120
|
+
```
|
|
2121
|
+
|
|
2001
2122
|
#### `OpInput` — type · src/ops.ts
|
|
2002
2123
|
|
|
2003
2124
|
An op's input is always an object: it is the wire body AND a tool's parameters.
|
|
@@ -2394,11 +2515,11 @@ interface UsesDecl {
|
|
|
2394
2515
|
```
|
|
2395
2516
|
|
|
2396
2517
|
==============================================================================
|
|
2397
|
-
## `esoul-sdk/server` —
|
|
2518
|
+
## `esoul-sdk/server` — 115 exports
|
|
2398
2519
|
|
|
2399
2520
|
Server code only (server.ts, ops, routes, tasks): the viewer, the app's database, files, connections, machines, charts, route tokens.
|
|
2400
2521
|
|
|
2401
|
-
### Functions and values (
|
|
2522
|
+
### Functions and values (36)
|
|
2402
2523
|
|
|
2403
2524
|
#### `APPROVAL_WAIT` — const · src/computer.ts
|
|
2404
2525
|
|
|
@@ -2632,6 +2753,14 @@ The consent-enforcing files API for plugin server code. Every call re-checks you
|
|
|
2632
2753
|
function pluginFiles(_ctx: PluginFilesCtx): Promise<FilesApi>
|
|
2633
2754
|
```
|
|
2634
2755
|
|
|
2756
|
+
#### `questions` — function · src/server.ts
|
|
2757
|
+
|
|
2758
|
+
THE PLATFORM'S QUESTIONS BELL. A question an app needs the person to answer (an agent waiting on a decision) reaches them wherever they are — the bell, on every workspace — not only when they open the app:
|
|
2759
|
+
|
|
2760
|
+
```ts
|
|
2761
|
+
function questions(_ctx: { pluginId: string; workspaceId: string; nodeId: string; viewer?: { userId: string | null } }): Questions
|
|
2762
|
+
```
|
|
2763
|
+
|
|
2635
2764
|
#### `readAppState` — function · src/server.ts
|
|
2636
2765
|
|
|
2637
2766
|
Read one app's state folded to head, by nodeId — server truth for an op, route, task or webhook. It reads for the app instance of the call the platform is running: your own app and other instances of its type in your workspace; another app type only when plugin.json `workspaceTools` grants a tool of that type (the refusal names the line to add). Null when no such app exists — an app in another workspace is null too. A webhook (it runs for no instance) finds only instances of its own type. Outside a running call it throws. HOST-ONLY.
|
|
@@ -2680,7 +2809,23 @@ WHO IS THIS, IN WORDS. The caller's own name and email, for an app with a reason
|
|
|
2680
2809
|
function viewerProfile(_viewer: PluginViewer): Promise<ViewerProfile | null>
|
|
2681
2810
|
```
|
|
2682
2811
|
|
|
2683
|
-
### Types (
|
|
2812
|
+
### Types (79)
|
|
2813
|
+
|
|
2814
|
+
#### `AppQuestion` — interface · src/server.ts
|
|
2815
|
+
|
|
2816
|
+
A question for the person (questions(ctx).ask).
|
|
2817
|
+
|
|
2818
|
+
```ts
|
|
2819
|
+
interface AppQuestion {
|
|
2820
|
+
key: string;
|
|
2821
|
+
question: string;
|
|
2822
|
+
options?: string[];
|
|
2823
|
+
details?: Record<string, unknown>;
|
|
2824
|
+
open?: { kind: string; key: string; label?: string };
|
|
2825
|
+
answer: { op: string; args?: Record<string, unknown> };
|
|
2826
|
+
expiresInSeconds?: number;
|
|
2827
|
+
}
|
|
2828
|
+
```
|
|
2684
2829
|
|
|
2685
2830
|
#### `AppRolePerson` — interface · src/server.ts
|
|
2686
2831
|
|
|
@@ -2896,7 +3041,9 @@ What `status()` answers. `account` is present only when the caller is the accoun
|
|
|
2896
3041
|
interface CredentialStatus {
|
|
2897
3042
|
state: "ready" | "not_bound" | "needs_consent" | "reconnect" | "not_allowed";
|
|
2898
3043
|
account?: { email: string | null };
|
|
3044
|
+
provider?: { name: string; family: "google" | "oauth2" | "apiKey" };
|
|
2899
3045
|
missingScopes?: string[];
|
|
3046
|
+
missingHosts?: string[];
|
|
2900
3047
|
connectUrl?: string;
|
|
2901
3048
|
reason?: string;
|
|
2902
3049
|
candidates?: { storeId: string; email: string | null }[];
|
|
@@ -3479,6 +3626,15 @@ interface ProgramStepState {
|
|
|
3479
3626
|
}
|
|
3480
3627
|
```
|
|
3481
3628
|
|
|
3629
|
+
#### `Questions` — interface · src/server.ts
|
|
3630
|
+
|
|
3631
|
+
```ts
|
|
3632
|
+
interface Questions {
|
|
3633
|
+
ask(q: AppQuestion): Promise<{ questionId: string; created: boolean }>;
|
|
3634
|
+
settle(key: string, outcome: { answer: string } | { cancelled: true }): Promise<void>;
|
|
3635
|
+
}
|
|
3636
|
+
```
|
|
3637
|
+
|
|
3482
3638
|
#### `RouteTokenGrant` — interface · src/server.ts
|
|
3483
3639
|
|
|
3484
3640
|
```ts
|
|
@@ -4377,7 +4533,9 @@ What `useCredential` answers — the same state the app's server code gets from
|
|
|
4377
4533
|
interface UseCredential {
|
|
4378
4534
|
state: "ready" | "not_bound" | "needs_consent" | "reconnect" | "not_allowed" | "loading" | "error";
|
|
4379
4535
|
account?: { email: string | null };
|
|
4536
|
+
provider?: { name: string; family: "google" | "oauth2" | "apiKey" };
|
|
4380
4537
|
missingScopes?: string[];
|
|
4538
|
+
missingHosts?: string[];
|
|
4381
4539
|
reason?: string;
|
|
4382
4540
|
connect(): void;
|
|
4383
4541
|
refresh(): Promise<void>;
|
|
@@ -4457,11 +4615,11 @@ interface WorkspaceTools {
|
|
|
4457
4615
|
```
|
|
4458
4616
|
|
|
4459
4617
|
==============================================================================
|
|
4460
|
-
## `esoul-sdk/testing` —
|
|
4618
|
+
## `esoul-sdk/testing` — 62 exports
|
|
4461
4619
|
|
|
4462
4620
|
Tests: run an op as a persona, an in-memory database with the real rules, recorders.
|
|
4463
4621
|
|
|
4464
|
-
### Functions and values (
|
|
4622
|
+
### Functions and values (17)
|
|
4465
4623
|
|
|
4466
4624
|
#### `capture` — function · src/testing/ops.ts
|
|
4467
4625
|
|
|
@@ -4503,6 +4661,14 @@ Fill a `uses` slot with a stand-in provider, so a consumer's op can be tested wi
|
|
|
4503
4661
|
function fakeApps(fixtures: Record<string, BoundAppFixture>): Record<string, unknown>
|
|
4504
4662
|
```
|
|
4505
4663
|
|
|
4664
|
+
#### `fakeCredentials` — function · src/testing/credentials.ts
|
|
4665
|
+
|
|
4666
|
+
A stand-in for `credentials(ctx)` from `esoul-sdk/server`: each slot answers as the test says (`status`, `hosts`, `fetch`), the platform's refusals apply, and `calls` records every request.
|
|
4667
|
+
|
|
4668
|
+
```ts
|
|
4669
|
+
function fakeCredentials(slots: Record<string, FakeCredentialSlot>): FakeCredentials
|
|
4670
|
+
```
|
|
4671
|
+
|
|
4506
4672
|
#### `fakeViewer` — function · src/testing/db.ts
|
|
4507
4673
|
|
|
4508
4674
|
A caller to run something as. Give it a `role` when your app declares its own vocabulary, or let `memoryDb(manifest).as("visitor")` map it for you from the manifest's own `roles.default`.
|
|
@@ -4591,7 +4757,7 @@ Be told when the list changes (the banner re-renders on it); returns the unsubsc
|
|
|
4591
4757
|
function subscribeFailedRequests(l: Listener): () => void
|
|
4592
4758
|
```
|
|
4593
4759
|
|
|
4594
|
-
### Types (
|
|
4760
|
+
### Types (45)
|
|
4595
4761
|
|
|
4596
4762
|
#### `BoundAppFixture` — interface · src/testing/ops.ts
|
|
4597
4763
|
|
|
@@ -4700,6 +4866,36 @@ interface EmitCall {
|
|
|
4700
4866
|
}
|
|
4701
4867
|
```
|
|
4702
4868
|
|
|
4869
|
+
#### `FakeCredentialCall` — interface · src/testing/credentials.ts
|
|
4870
|
+
|
|
4871
|
+
```ts
|
|
4872
|
+
interface FakeCredentialCall {
|
|
4873
|
+
slot: string;
|
|
4874
|
+
method: string;
|
|
4875
|
+
url: string;
|
|
4876
|
+
headers: Record<string, string>;
|
|
4877
|
+
}
|
|
4878
|
+
```
|
|
4879
|
+
|
|
4880
|
+
#### `FakeCredentials` — interface · src/testing/credentials.ts
|
|
4881
|
+
|
|
4882
|
+
```ts
|
|
4883
|
+
interface FakeCredentials {
|
|
4884
|
+
credentials(ctx: object): Credentials;
|
|
4885
|
+
calls: FakeCredentialCall[];
|
|
4886
|
+
}
|
|
4887
|
+
```
|
|
4888
|
+
|
|
4889
|
+
#### `FakeCredentialSlot` — interface · src/testing/credentials.ts
|
|
4890
|
+
|
|
4891
|
+
```ts
|
|
4892
|
+
interface FakeCredentialSlot {
|
|
4893
|
+
status?: CredentialStatus;
|
|
4894
|
+
hosts?: string[];
|
|
4895
|
+
fetch?: (url: URL, init: RequestInit) => Response | Promise<Response>;
|
|
4896
|
+
}
|
|
4897
|
+
```
|
|
4898
|
+
|
|
4703
4899
|
#### `FaultRule` — interface · src/testing/sim-gmail/faults.ts
|
|
4704
4900
|
|
|
4705
4901
|
```ts
|