esoul-sdk 0.24.0 → 0.25.2
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 +58 -0
- package/README.md +23 -6
- package/api-reference.md +202 -18
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/machine/shell.js +2 -2
- package/dist/manifest.d.ts +1113 -31
- package/dist/manifest.js +175 -17
- package/dist/react.d.ts +13 -6
- package/dist/react.js +2 -2
- package/dist/server.d.ts +73 -9
- package/dist/server.js +16 -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/dist/types.d.ts +15 -0
- package/docs/02-manifest.md +11 -3
- package/docs/04-tools.md +6 -0
- package/docs/05-ui.md +25 -0
- package/docs/06-server.md +55 -7
- package/docs/08-connections.md +322 -105
- package/docs/10-testing.md +29 -0
- package/docs/17-editing-and-merging.md +22 -0
- package/docs/18-your-computer.md +35 -13
- package/docs/20-a-service-on-your-computer.md +291 -0
- package/llms-full.txt +823 -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.
|
|
227
243
|
|
|
228
244
|
```ts
|
|
229
|
-
const CREDENTIAL_FAMILIES: readonly ["google"]
|
|
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`.
|
|
251
|
+
|
|
252
|
+
```ts
|
|
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.
|
|
@@ -765,6 +805,22 @@ function normaliseGoogleScope(scope: string): string | "implicit" | null
|
|
|
765
805
|
function normaliseTransferPath(path: string | undefined | null): string
|
|
766
806
|
```
|
|
767
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
|
+
|
|
768
824
|
#### `OpInputError` — class · src/ops.ts
|
|
769
825
|
|
|
770
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.
|
|
@@ -775,7 +831,7 @@ class OpInputError extends Error { … }
|
|
|
775
831
|
|
|
776
832
|
#### `opTool` — const · src/index.ts
|
|
777
833
|
|
|
778
|
-
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.
|
|
779
835
|
|
|
780
836
|
```ts
|
|
781
837
|
const opTool: <T extends OpInputs, K extends keyof T & string, R = unknown>(ops: T, name: K, cfg: OpToolConfig<T[K], R>) => DerivedTool
|
|
@@ -898,7 +954,7 @@ class PluginCallError extends Error { … }
|
|
|
898
954
|
The zod schema one entry of a manifest's `connections` must satisfy.
|
|
899
955
|
|
|
900
956
|
```ts
|
|
901
|
-
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[]; }>
|
|
902
958
|
```
|
|
903
959
|
|
|
904
960
|
#### `PluginCredentialSlotSchema` — const · src/manifest.ts
|
|
@@ -906,7 +962,7 @@ const PluginConnectionSchema: z.ZodEffects<z.ZodObject<{ key: z.ZodString; kind:
|
|
|
906
962
|
One slot of a manifest's `credentials` block.
|
|
907
963
|
|
|
908
964
|
```ts
|
|
909
|
-
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; }>]>
|
|
910
966
|
```
|
|
911
967
|
|
|
912
968
|
#### `PluginCredentialsSchema` — const · src/manifest.ts
|
|
@@ -914,7 +970,7 @@ const PluginCredentialSlotSchema: z.ZodObject<{ family: z.ZodLiteral<"google">;
|
|
|
914
970
|
The `credentials` block: slot name → slot. At most ONE slot per app for now.
|
|
915
971
|
|
|
916
972
|
```ts
|
|
917
|
-
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; }>>
|
|
918
974
|
```
|
|
919
975
|
|
|
920
976
|
#### `pluginEndpointProblem` — function · src/manifest.ts
|
|
@@ -954,7 +1010,7 @@ const PluginLlmSchema: z.ZodObject<{ why: z.ZodString; dailyBudgetUsd: z.ZodOpti
|
|
|
954
1010
|
The zod schema `plugin.json` must satisfy — the sync and `check_app` refuse a manifest that fails it, with the path.
|
|
955
1011
|
|
|
956
1012
|
```ts
|
|
957
|
-
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>; }>; }>
|
|
958
1014
|
```
|
|
959
1015
|
|
|
960
1016
|
#### `PluginRolesSchema` — const · src/manifest.ts
|
|
@@ -962,7 +1018,7 @@ const PluginManifestSchema: z.ZodEffects<z.ZodObject<{ manifestVersion: z.ZodLit
|
|
|
962
1018
|
WHAT THE APP CALLS ITS PEOPLE.
|
|
963
1019
|
|
|
964
1020
|
```ts
|
|
965
|
-
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">; }>
|
|
966
1022
|
```
|
|
967
1023
|
|
|
968
1024
|
#### `pluginRouteUrl` — function · src/helpers.ts
|
|
@@ -978,7 +1034,7 @@ function pluginRouteUrl( pluginId: string, routeName: string, nodeId: string, pa
|
|
|
978
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`).
|
|
979
1035
|
|
|
980
1036
|
```ts
|
|
981
|
-
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"; }>
|
|
982
1038
|
```
|
|
983
1039
|
|
|
984
1040
|
#### `previewPersona` — function · src/helpers.ts
|
|
@@ -1021,6 +1077,14 @@ Render one declared command. Throws `DeviceCommandError` with a sentence for any
|
|
|
1021
1077
|
function renderCommand(block: DeviceBlock, name: string, params: Record<string, unknown> = {}): RenderedCommand
|
|
1022
1078
|
```
|
|
1023
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
|
+
|
|
1024
1088
|
#### `resolveAppRole` — function · src/roles.ts
|
|
1025
1089
|
|
|
1026
1090
|
The app's word for this caller.
|
|
@@ -1221,7 +1285,7 @@ A manifest with one entry removed (the bytes stay; they may be shared). Pure.
|
|
|
1221
1285
|
function withoutAsset(assets: AssetsManifest | null | undefined, pluginId: string, name: string): AssetsManifest
|
|
1222
1286
|
```
|
|
1223
1287
|
|
|
1224
|
-
### Types (
|
|
1288
|
+
### Types (106)
|
|
1225
1289
|
|
|
1226
1290
|
#### `AgentRunToolContext` — interface · src/types.ts
|
|
1227
1291
|
|
|
@@ -1238,6 +1302,18 @@ interface AgentRunToolContext {
|
|
|
1238
1302
|
}
|
|
1239
1303
|
```
|
|
1240
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
|
+
|
|
1241
1317
|
#### `ApplicationIdentifier` — interface · src/types.ts
|
|
1242
1318
|
|
|
1243
1319
|
MIRRORS the host's `ApplicationIdentifier` (venus-sdk.ts) exactly.
|
|
@@ -1736,6 +1812,11 @@ interface EventDefinition<StateType extends ApplicationIdentifier> {
|
|
|
1736
1812
|
conflictScope?: (eventData: any) => string[] | null | undefined;
|
|
1737
1813
|
merge?: MergeDescription;
|
|
1738
1814
|
baseMerge?: BaseMerge;
|
|
1815
|
+
resolveConcurrent?: (
|
|
1816
|
+
state: any,
|
|
1817
|
+
eventData: any,
|
|
1818
|
+
ctx: { theirsSess: string | null },
|
|
1819
|
+
) => { eventData: any; detail?: unknown } | null;
|
|
1739
1820
|
}
|
|
1740
1821
|
```
|
|
1741
1822
|
|
|
@@ -1911,6 +1992,12 @@ interface FileWriteResult {
|
|
|
1911
1992
|
type GoogleCredentialScope = (typeof GOOGLE_CREDENTIAL_SCOPES)[number];
|
|
1912
1993
|
```
|
|
1913
1994
|
|
|
1995
|
+
#### `GoogleCredentialSlot` — type · src/manifest.ts
|
|
1996
|
+
|
|
1997
|
+
```ts
|
|
1998
|
+
type GoogleCredentialSlot = z.infer<typeof GoogleCredentialSlotSchema>;
|
|
1999
|
+
```
|
|
2000
|
+
|
|
1914
2001
|
#### `InstalledPluginInfo` — interface · src/manifest.ts
|
|
1915
2002
|
|
|
1916
2003
|
Data-only row the host codegen inlines into registry.gen.ts.
|
|
@@ -2025,6 +2112,18 @@ What `notify`'s caller asked for. Absent = the topic's own audience, aimed at th
|
|
|
2025
2112
|
type NotifyTarget = { viewerIds: string[] } | { role: string } | "apps";
|
|
2026
2113
|
```
|
|
2027
2114
|
|
|
2115
|
+
#### `OAuth2CredentialSlot` — type · src/manifest.ts
|
|
2116
|
+
|
|
2117
|
+
```ts
|
|
2118
|
+
type OAuth2CredentialSlot = z.infer<typeof OAuth2CredentialSlotSchema>;
|
|
2119
|
+
```
|
|
2120
|
+
|
|
2121
|
+
#### `OAuth2Provider` — type · src/manifest.ts
|
|
2122
|
+
|
|
2123
|
+
```ts
|
|
2124
|
+
type OAuth2Provider = z.infer<typeof OAuth2ProviderSchema>;
|
|
2125
|
+
```
|
|
2126
|
+
|
|
2028
2127
|
#### `OpInput` — type · src/ops.ts
|
|
2029
2128
|
|
|
2030
2129
|
An op's input is always an object: it is the wire body AND a tool's parameters.
|
|
@@ -2421,11 +2520,11 @@ interface UsesDecl {
|
|
|
2421
2520
|
```
|
|
2422
2521
|
|
|
2423
2522
|
==============================================================================
|
|
2424
|
-
## `esoul-sdk/server` —
|
|
2523
|
+
## `esoul-sdk/server` — 119 exports
|
|
2425
2524
|
|
|
2426
2525
|
Server code only (server.ts, ops, routes, tasks): the viewer, the app's database, files, connections, machines, charts, route tokens.
|
|
2427
2526
|
|
|
2428
|
-
### Functions and values (
|
|
2527
|
+
### Functions and values (37)
|
|
2429
2528
|
|
|
2430
2529
|
#### `APPROVAL_WAIT` — const · src/computer.ts
|
|
2431
2530
|
|
|
@@ -2523,6 +2622,14 @@ Read the sealed credentials of a plugin-declared connection (auto- refreshes exp
|
|
|
2523
2622
|
function getPluginConnectionCredentials( _connectionId: string, _pluginId: string, ): Promise<PluginConnectionCredentials>
|
|
2524
2623
|
```
|
|
2525
2624
|
|
|
2625
|
+
#### `headlessBridge` — function · src/server.ts
|
|
2626
|
+
|
|
2627
|
+
Run a web page in the platform's headless browser and drive it over `postMessage` — see the `HeadlessBridgeArgs` note above: `url` (https, public), `boot` (the page's ready message), `calls` (each posted to the page's window, answered by the first message whose `[replyField]` equals its `id`). Warm between calls for the same url; not available in a Forge box.
|
|
2628
|
+
|
|
2629
|
+
```ts
|
|
2630
|
+
function headlessBridge(_ctx: { pluginId: string; nodeId: string; origin?: string }, _args: HeadlessBridgeArgs): Promise<HeadlessBridgeResult>
|
|
2631
|
+
```
|
|
2632
|
+
|
|
2526
2633
|
#### `isCredentialUnavailable` — function · src/server.ts
|
|
2527
2634
|
|
|
2528
2635
|
True for a `CredentialUnavailable`, also across bundle boundaries where `instanceof` fails.
|
|
@@ -2715,7 +2822,7 @@ WHO IS THIS, IN WORDS. The caller's own name and email, for an app with a reason
|
|
|
2715
2822
|
function viewerProfile(_viewer: PluginViewer): Promise<ViewerProfile | null>
|
|
2716
2823
|
```
|
|
2717
2824
|
|
|
2718
|
-
### Types (
|
|
2825
|
+
### Types (82)
|
|
2719
2826
|
|
|
2720
2827
|
#### `AppQuestion` — interface · src/server.ts
|
|
2721
2828
|
|
|
@@ -2947,7 +3054,9 @@ What `status()` answers. `account` is present only when the caller is the accoun
|
|
|
2947
3054
|
interface CredentialStatus {
|
|
2948
3055
|
state: "ready" | "not_bound" | "needs_consent" | "reconnect" | "not_allowed";
|
|
2949
3056
|
account?: { email: string | null };
|
|
3057
|
+
provider?: { name: string; family: "google" | "oauth2" | "apiKey" };
|
|
2950
3058
|
missingScopes?: string[];
|
|
3059
|
+
missingHosts?: string[];
|
|
2951
3060
|
connectUrl?: string;
|
|
2952
3061
|
reason?: string;
|
|
2953
3062
|
candidates?: { storeId: string; email: string | null }[];
|
|
@@ -3208,6 +3317,41 @@ interface GeneratedAppImage {
|
|
|
3208
3317
|
}
|
|
3209
3318
|
```
|
|
3210
3319
|
|
|
3320
|
+
#### `HeadlessBridgeArgs` — interface · src/server.ts
|
|
3321
|
+
|
|
3322
|
+
```ts
|
|
3323
|
+
interface HeadlessBridgeArgs {
|
|
3324
|
+
url: string;
|
|
3325
|
+
boot?: { field: string; oneOf: string[]; timeoutMs?: number };
|
|
3326
|
+
calls: HeadlessBridgeCall[];
|
|
3327
|
+
viewport?: { width: number; height: number };
|
|
3328
|
+
}
|
|
3329
|
+
```
|
|
3330
|
+
|
|
3331
|
+
#### `HeadlessBridgeCall` — interface · src/server.ts
|
|
3332
|
+
|
|
3333
|
+
The headless bridge — a page opened in a headless browser ON THE PLATFORM and driven over `postMessage`, for an app whose engine only exists as a web page (a WebAssembly CAD kernel, a canvas renderer). "No computer should be required": the person's tab is one place the page can run; this is the other, on Vercel, with nobody's tab open.
|
|
3334
|
+
|
|
3335
|
+
```ts
|
|
3336
|
+
interface HeadlessBridgeCall {
|
|
3337
|
+
id: string;
|
|
3338
|
+
message: Record<string, unknown>;
|
|
3339
|
+
replyField?: string;
|
|
3340
|
+
timeoutMs?: number;
|
|
3341
|
+
}
|
|
3342
|
+
```
|
|
3343
|
+
|
|
3344
|
+
#### `HeadlessBridgeResult` — interface · src/server.ts
|
|
3345
|
+
|
|
3346
|
+
```ts
|
|
3347
|
+
interface HeadlessBridgeResult {
|
|
3348
|
+
boot: Record<string, unknown> | null;
|
|
3349
|
+
replies: (Record<string, unknown> | null)[];
|
|
3350
|
+
timings: Record<string, number>;
|
|
3351
|
+
warm: boolean;
|
|
3352
|
+
}
|
|
3353
|
+
```
|
|
3354
|
+
|
|
3211
3355
|
#### `JsonOutcome` — interface · src/computer.ts
|
|
3212
3356
|
|
|
3213
3357
|
Flat, like every outcome here. `ok` with `json`; otherwise `error` in words.
|
|
@@ -4437,7 +4581,9 @@ What `useCredential` answers — the same state the app's server code gets from
|
|
|
4437
4581
|
interface UseCredential {
|
|
4438
4582
|
state: "ready" | "not_bound" | "needs_consent" | "reconnect" | "not_allowed" | "loading" | "error";
|
|
4439
4583
|
account?: { email: string | null };
|
|
4584
|
+
provider?: { name: string; family: "google" | "oauth2" | "apiKey" };
|
|
4440
4585
|
missingScopes?: string[];
|
|
4586
|
+
missingHosts?: string[];
|
|
4441
4587
|
reason?: string;
|
|
4442
4588
|
connect(): void;
|
|
4443
4589
|
refresh(): Promise<void>;
|
|
@@ -4517,11 +4663,11 @@ interface WorkspaceTools {
|
|
|
4517
4663
|
```
|
|
4518
4664
|
|
|
4519
4665
|
==============================================================================
|
|
4520
|
-
## `esoul-sdk/testing` —
|
|
4666
|
+
## `esoul-sdk/testing` — 62 exports
|
|
4521
4667
|
|
|
4522
4668
|
Tests: run an op as a persona, an in-memory database with the real rules, recorders.
|
|
4523
4669
|
|
|
4524
|
-
### Functions and values (
|
|
4670
|
+
### Functions and values (17)
|
|
4525
4671
|
|
|
4526
4672
|
#### `capture` — function · src/testing/ops.ts
|
|
4527
4673
|
|
|
@@ -4563,6 +4709,14 @@ Fill a `uses` slot with a stand-in provider, so a consumer's op can be tested wi
|
|
|
4563
4709
|
function fakeApps(fixtures: Record<string, BoundAppFixture>): Record<string, unknown>
|
|
4564
4710
|
```
|
|
4565
4711
|
|
|
4712
|
+
#### `fakeCredentials` — function · src/testing/credentials.ts
|
|
4713
|
+
|
|
4714
|
+
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.
|
|
4715
|
+
|
|
4716
|
+
```ts
|
|
4717
|
+
function fakeCredentials(slots: Record<string, FakeCredentialSlot>): FakeCredentials
|
|
4718
|
+
```
|
|
4719
|
+
|
|
4566
4720
|
#### `fakeViewer` — function · src/testing/db.ts
|
|
4567
4721
|
|
|
4568
4722
|
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`.
|
|
@@ -4651,7 +4805,7 @@ Be told when the list changes (the banner re-renders on it); returns the unsubsc
|
|
|
4651
4805
|
function subscribeFailedRequests(l: Listener): () => void
|
|
4652
4806
|
```
|
|
4653
4807
|
|
|
4654
|
-
### Types (
|
|
4808
|
+
### Types (45)
|
|
4655
4809
|
|
|
4656
4810
|
#### `BoundAppFixture` — interface · src/testing/ops.ts
|
|
4657
4811
|
|
|
@@ -4760,6 +4914,36 @@ interface EmitCall {
|
|
|
4760
4914
|
}
|
|
4761
4915
|
```
|
|
4762
4916
|
|
|
4917
|
+
#### `FakeCredentialCall` — interface · src/testing/credentials.ts
|
|
4918
|
+
|
|
4919
|
+
```ts
|
|
4920
|
+
interface FakeCredentialCall {
|
|
4921
|
+
slot: string;
|
|
4922
|
+
method: string;
|
|
4923
|
+
url: string;
|
|
4924
|
+
headers: Record<string, string>;
|
|
4925
|
+
}
|
|
4926
|
+
```
|
|
4927
|
+
|
|
4928
|
+
#### `FakeCredentials` — interface · src/testing/credentials.ts
|
|
4929
|
+
|
|
4930
|
+
```ts
|
|
4931
|
+
interface FakeCredentials {
|
|
4932
|
+
credentials(ctx: object): Credentials;
|
|
4933
|
+
calls: FakeCredentialCall[];
|
|
4934
|
+
}
|
|
4935
|
+
```
|
|
4936
|
+
|
|
4937
|
+
#### `FakeCredentialSlot` — interface · src/testing/credentials.ts
|
|
4938
|
+
|
|
4939
|
+
```ts
|
|
4940
|
+
interface FakeCredentialSlot {
|
|
4941
|
+
status?: CredentialStatus;
|
|
4942
|
+
hosts?: string[];
|
|
4943
|
+
fetch?: (url: URL, init: RequestInit) => Response | Promise<Response>;
|
|
4944
|
+
}
|
|
4945
|
+
```
|
|
4946
|
+
|
|
4763
4947
|
#### `FaultRule` — interface · src/testing/sim-gmail/faults.ts
|
|
4764
4948
|
|
|
4765
4949
|
```ts
|