@intentic/extension-manifest 1.431.0 → 1.433.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +48 -2
- package/dist/manifest.d.ts +296 -0
- package/dist/manifest.d.ts.map +1 -1
- package/dist/manifest.js +105 -1
- package/dist/manifest.js.map +1 -1
- package/dist/permissions.d.ts +27 -0
- package/dist/permissions.d.ts.map +1 -1
- package/dist/permissions.js +32 -1
- package/dist/permissions.js.map +1 -1
- package/dist/points/automation-templates.d.ts +68 -0
- package/dist/points/automation-templates.d.ts.map +1 -1
- package/dist/points/automation-templates.js +29 -1
- package/dist/points/automation-templates.js.map +1 -1
- package/dist/points/capabilities.d.ts +357 -50
- package/dist/points/capabilities.d.ts.map +1 -1
- package/dist/points/capabilities.js +22 -51
- package/dist/points/capabilities.js.map +1 -1
- package/dist/points/capability-broker.d.ts +110 -0
- package/dist/points/capability-broker.d.ts.map +1 -0
- package/dist/points/capability-broker.js +125 -0
- package/dist/points/capability-broker.js.map +1 -0
- package/dist/points/channel-facts.d.ts +46 -0
- package/dist/points/channel-facts.d.ts.map +1 -0
- package/dist/points/channel-facts.js +80 -0
- package/dist/points/channel-facts.js.map +1 -0
- package/dist/points/index.d.ts +587 -0
- package/dist/points/index.d.ts.map +1 -1
- package/dist/points/index.js +12 -0
- package/dist/points/index.js.map +1 -1
- package/dist/points/listener.d.ts +12 -0
- package/dist/points/listener.d.ts.map +1 -1
- package/dist/points/listener.js +6 -0
- package/dist/points/listener.js.map +1 -1
- package/dist/points/model-roles.d.ts +31 -0
- package/dist/points/model-roles.d.ts.map +1 -0
- package/dist/points/model-roles.js +27 -0
- package/dist/points/model-roles.js.map +1 -0
- package/dist/points/public-routes.d.ts +91 -0
- package/dist/points/public-routes.d.ts.map +1 -0
- package/dist/points/public-routes.js +140 -0
- package/dist/points/public-routes.js.map +1 -0
- package/dist/points/sleep-watch.d.ts +15 -0
- package/dist/points/sleep-watch.d.ts.map +1 -0
- package/dist/points/sleep-watch.js +30 -0
- package/dist/points/sleep-watch.js.map +1 -0
- package/dist/points/watch-kinds.d.ts +102 -0
- package/dist/points/watch-kinds.d.ts.map +1 -0
- package/dist/points/watch-kinds.js +118 -0
- package/dist/points/watch-kinds.js.map +1 -0
- package/intentic-extension.schema.json +1398 -34
- package/package.json +2 -2
- package/src/manifest.ts +145 -1
- package/src/permissions.test.ts +48 -1
- package/src/permissions.ts +99 -4
- package/src/points/automation-templates.ts +43 -5
- package/src/points/capabilities.ts +37 -80
- package/src/points/capability-broker.ts +203 -0
- package/src/points/channel-facts.test.ts +38 -0
- package/src/points/channel-facts.ts +119 -0
- package/src/points/index.ts +12 -0
- package/src/points/listener.ts +16 -0
- package/src/points/model-roles.ts +44 -0
- package/src/points/public-routes.test.ts +132 -0
- package/src/points/public-routes.ts +198 -0
- package/src/points/sleep-watch.ts +54 -0
- package/src/points/watch-kinds.test.ts +73 -0
- package/src/points/watch-kinds.ts +172 -0
- package/src/powers.test.ts +116 -8
package/README.md
CHANGED
|
@@ -38,8 +38,11 @@ flowchart LR
|
|
|
38
38
|
between slashes and matches one whole path segment, never a `.` or `..` the URL would resolve away. A malformed entry
|
|
39
39
|
(`**`, a `*` inside a segment, an unknown method, a relative path) fails the manifest parse rather than the first
|
|
40
40
|
call it gates.
|
|
41
|
-
- `extensionRouteReach` is the whole rule for an extension's own token: the
|
|
42
|
-
itself (`EXTENSION_OWN_ROUTES`: its settings and its event stream
|
|
41
|
+
- `extensionRouteReach` is the whole rule for an extension's own token: the routes every extension reaches about
|
|
42
|
+
itself (`EXTENSION_OWN_ROUTES`: its settings and its event stream, the doors its other `permissions` open, since
|
|
43
|
+
2026-11-26 the turn doors its tools' calls open, each judged by the daemon on its own declaration and the call's
|
|
44
|
+
ticket, and since 2026-11-28 the sandbox's identity document and the door that signs as it, which only a manifest
|
|
45
|
+
declaring `permissions.identity: ["sign"]` passes), its own listener provider's routes, and whatever
|
|
43
46
|
`permissions.daemon` declares. The daemon's grant and the SDK's test fake both judge by it, and `./permissions` exports
|
|
44
47
|
the rule alone, for a process that should not load the manifest schema.
|
|
45
48
|
- What a field MEANS to the host is declared on the field, with `.meta({ power, effect, mintsServer })`
|
|
@@ -47,6 +50,49 @@ flowchart LR
|
|
|
47
50
|
when it adds one), the effects a card discloses in the capability catalog, and the capability kinds whose ids
|
|
48
51
|
become `mcp__<id>__` servers in the contract's reserved-name check. A new field is either given a meaning where it
|
|
49
52
|
is defined or has none.
|
|
53
|
+
- `automationTemplates` takes every field the daemon's own templates carry (a `once` or webhook trigger's fields, `tz`,
|
|
54
|
+
`afterSessions`, a watch's `source`, `fireOn`, `until` and `target`), shaped loosely here and parsed by the daemon's
|
|
55
|
+
own template schema when it builds the catalogue, which drops what would not save (2026-11-26).
|
|
56
|
+
- `watchKinds` (`points/watch-kinds.ts`, 2026-11-26) declares a ready-made check the extension's backend answers: its
|
|
57
|
+
id, label, the sentence a source of it reads as, and its parameters as fields. `watchSentence` and
|
|
58
|
+
`watchParamsProblem` are the one reading of a declaration, which the daemon, the Automations view and the approval
|
|
59
|
+
card share; the `automations` command repeats the sentence rule in plain JavaScript. A `superRefine` on the envelope
|
|
60
|
+
holds a kind to a `server` bundle and to the extension's own cards.
|
|
61
|
+
- `modelRoles` (`points/model-roles.ts`, 2026-11-26) declares the jobs the extension starts agent runs for, which the
|
|
62
|
+
owner puts on model setups beside the sandbox's own: an id (`MODEL_ROLE_ID`, the key a stored choice and a run's
|
|
63
|
+
`job` name), a label, an explanation, an icon and the setup it is suggested. The contract serves a declaration as
|
|
64
|
+
a job (`contributedModelRole`), always a whole session, suggested `medium` unless it says otherwise. An id declared
|
|
65
|
+
twice in one manifest fails its parse.
|
|
66
|
+
- `publicRoutes` (`points/public-routes.ts`, 2026-11-26) declares routes anyone on the internet may call at
|
|
67
|
+
`/door/<id>/<path>`, each a power whose sentence names the route and the secret a signed one is checked against: a
|
|
68
|
+
path of lowercase words and lone `*`s, its methods, and which of the core's protections apply (`automation` reads an
|
|
69
|
+
automation of the extension's own listener from the first `*`, `origins: "listed"` holds a browser to its allowed
|
|
70
|
+
origins and `key` lets a caller with no Origin present its door key instead, `signature` names a scheme and a sandbox
|
|
71
|
+
secret, `turnstile` names the sandbox secret a Cloudflare Turnstile token is verified with, `keyFromBrowsers` lets an
|
|
72
|
+
automation that opts in admit an unlisted browser with its key, `proofOfWork`, `rate`, `dailyMax` (a number, or
|
|
73
|
+
`"none"` on a GET-only route), `bodyMax`, and (2026-11-27) `wakes`, a power of its own: a call at the route's wake
|
|
74
|
+
URL may wake a sleeping hosted sandbox, its only `*` an automation's). `publicRouteFor` is the one reading of which declared route a
|
|
75
|
+
request lands on, which the daemon's door and the SDK's fake share; a `superRefine` holds the routes to a `server`
|
|
76
|
+
bundle and an automation's route to the extension's own `contributes.listener`.
|
|
77
|
+
- `listener.strangers` (`visitor` or `report`, 2026-11-26; `contact`, 2026-11-27) says anyone on the internet reaches
|
|
78
|
+
the source, which holds its wakes to the owner's admission floor for a website visitor, a bug report or a contact
|
|
79
|
+
request from a sandbox that is not a contact yet, instead of a team chat's; the daemon reads it in place of a table of
|
|
80
|
+
provider names. It is a power of its own.
|
|
81
|
+
- A cli card may declare `sleepWatch` (`points/sleep-watch.ts`, 2026-11-27): the one credential Intentic's servers may
|
|
82
|
+
hold while a hosted sandbox sleeps, for a service that delivers only over a live connection (`discord`, the only one
|
|
83
|
+
the platform speaks). It names the secret field and a consent field, which the parse holds to a switch (`boolean`)
|
|
84
|
+
declared `hosted: true` and off by default; a field declaring `hosted` is drawn only on a sandbox Intentic hosts.
|
|
85
|
+
`sleepWatchConsented` is the one reading of the switch. A `processors` path may sit under a `when` over the card's
|
|
86
|
+
answers, as Discord's path to Intentic sits under that switch.
|
|
87
|
+
- A card states facts about its platform (`points/channel-facts.ts`, 2026-11-26), which the core reads in place of its
|
|
88
|
+
own tables keyed by provider name: `channel.messageLimit`, `channel.publish.target` (a pattern of the targets its
|
|
89
|
+
backend publishes an approved post to, which must compile), `channel.posting`, `processors` (one entry per path its
|
|
90
|
+
data takes: a flow the Data protection page words, operator, region, third country, hosts, a `hostField`), and on a
|
|
91
|
+
cli card `status: { from: "listener" }`. Each only describes, so none is a power.
|
|
92
|
+
- A cli card's `commandActions` entry says who decides its rule (`gatedBy`: `sandbox`, the command guard, or `backend`,
|
|
93
|
+
the card's backend asking the outward-action door) and what it comes to while no rule names it (`unruled`: `allow` or
|
|
94
|
+
`hold`). `commandActionGate` is the one reading, `selfGated: true`, deprecated since 2.52.0, counting as `backend`
|
|
95
|
+
and `hold`.
|
|
50
96
|
- `toolServersOf` is the one reading of which MCP servers a manifest serves the agent: `contributes.tools`, or a cli
|
|
51
97
|
card's `mcp`, its alias for one release. A `superRefine` on the envelope says what no single field can: tools need
|
|
52
98
|
a `server` bundle or a declared process to serve them.
|
package/dist/manifest.d.ts
CHANGED
|
@@ -16,6 +16,12 @@ export declare const ExtensionManifestSchema: z.ZodObject<{
|
|
|
16
16
|
permissions: z.ZodOptional<z.ZodObject<{
|
|
17
17
|
sandbox: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
18
18
|
daemon: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
19
|
+
events: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"run">, z.ZodLiteral<"activity">, z.ZodLiteral<"ci">]>>>;
|
|
20
|
+
work: z.ZodOptional<z.ZodBoolean>;
|
|
21
|
+
exec: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"command">, z.ZodLiteral<"toolchain">]>>>;
|
|
22
|
+
fires: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
23
|
+
turn: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"browser">, z.ZodLiteral<"owner-browser">, z.ZodLiteral<"jobs">]>>>;
|
|
24
|
+
identity: z.ZodOptional<z.ZodArray<z.ZodLiteral<"sign">>>;
|
|
19
25
|
}, z.core.$strip>>;
|
|
20
26
|
contributes: z.ZodOptional<z.ZodObject<{
|
|
21
27
|
agent: z.ZodOptional<z.ZodObject<{
|
|
@@ -31,16 +37,50 @@ export declare const ExtensionManifestSchema: z.ZodObject<{
|
|
|
31
37
|
kind: z.ZodEnum<{
|
|
32
38
|
event: "event";
|
|
33
39
|
listener: "listener";
|
|
40
|
+
once: "once";
|
|
34
41
|
schedule: "schedule";
|
|
35
42
|
workspace: "workspace";
|
|
36
43
|
}>;
|
|
37
44
|
cron: z.ZodOptional<z.ZodString>;
|
|
45
|
+
tz: z.ZodOptional<z.ZodString>;
|
|
46
|
+
afterSessions: z.ZodOptional<z.ZodNumber>;
|
|
47
|
+
at: z.ZodOptional<z.ZodNumber>;
|
|
48
|
+
dailyMax: z.ZodOptional<z.ZodNumber>;
|
|
49
|
+
signature: z.ZodOptional<z.ZodObject<{
|
|
50
|
+
scheme: z.ZodString;
|
|
51
|
+
secret: z.ZodString;
|
|
52
|
+
}, z.core.$strip>>;
|
|
38
53
|
provider: z.ZodOptional<z.ZodString>;
|
|
54
|
+
channelId: z.ZodOptional<z.ZodString>;
|
|
39
55
|
eventType: z.ZodOptional<z.ZodString>;
|
|
40
56
|
mentioned: z.ZodOptional<z.ZodBoolean>;
|
|
57
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
58
|
+
allowedOrigins: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
41
59
|
event: z.ZodOptional<z.ZodString>;
|
|
60
|
+
repo: z.ZodOptional<z.ZodString>;
|
|
42
61
|
}, z.core.$strip>;
|
|
43
62
|
guard: z.ZodOptional<z.ZodString>;
|
|
63
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
64
|
+
kind: z.ZodString;
|
|
65
|
+
}, z.core.$catchall<z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>>>;
|
|
66
|
+
fireOn: z.ZodOptional<z.ZodEnum<{
|
|
67
|
+
change: "change";
|
|
68
|
+
pass: "pass";
|
|
69
|
+
}>>;
|
|
70
|
+
until: z.ZodOptional<z.ZodEnum<{
|
|
71
|
+
"first-fire": "first-fire";
|
|
72
|
+
}>>;
|
|
73
|
+
target: z.ZodOptional<z.ZodObject<{
|
|
74
|
+
kind: z.ZodEnum<{
|
|
75
|
+
agent: "agent";
|
|
76
|
+
conversation: "conversation";
|
|
77
|
+
extension: "extension";
|
|
78
|
+
notify: "notify";
|
|
79
|
+
}>;
|
|
80
|
+
conversationId: z.ZodOptional<z.ZodString>;
|
|
81
|
+
extension: z.ZodOptional<z.ZodString>;
|
|
82
|
+
handler: z.ZodOptional<z.ZodString>;
|
|
83
|
+
}, z.core.$strip>>;
|
|
44
84
|
holdForSeconds: z.ZodOptional<z.ZodNumber>;
|
|
45
85
|
prompt: z.ZodString;
|
|
46
86
|
note: z.ZodOptional<z.ZodString>;
|
|
@@ -76,6 +116,27 @@ export declare const ExtensionManifestSchema: z.ZodObject<{
|
|
|
76
116
|
url: z.ZodString;
|
|
77
117
|
}, z.core.$strip>>>;
|
|
78
118
|
}, z.core.$strip>;
|
|
119
|
+
channel: z.ZodOptional<z.ZodObject<{
|
|
120
|
+
messageLimit: z.ZodOptional<z.ZodNumber>;
|
|
121
|
+
publish: z.ZodOptional<z.ZodObject<{
|
|
122
|
+
target: z.ZodString;
|
|
123
|
+
}, z.core.$strip>>;
|
|
124
|
+
posting: z.ZodOptional<z.ZodString>;
|
|
125
|
+
}, z.core.$strip>>;
|
|
126
|
+
processors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
127
|
+
flow: z.ZodEnum<{
|
|
128
|
+
connector: "connector";
|
|
129
|
+
"email-imap": "email-imap";
|
|
130
|
+
"email-smtp": "email-smtp";
|
|
131
|
+
"team-chat": "team-chat";
|
|
132
|
+
}>;
|
|
133
|
+
operator: z.ZodOptional<z.ZodString>;
|
|
134
|
+
region: z.ZodOptional<z.ZodString>;
|
|
135
|
+
thirdCountry: z.ZodOptional<z.ZodBoolean>;
|
|
136
|
+
hosts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
137
|
+
hostField: z.ZodOptional<z.ZodString>;
|
|
138
|
+
when: z.ZodOptional<z.ZodString>;
|
|
139
|
+
}, z.core.$strip>>>;
|
|
79
140
|
kind: z.ZodLiteral<"cli">;
|
|
80
141
|
fields: z.ZodArray<z.ZodObject<{
|
|
81
142
|
key: z.ZodString;
|
|
@@ -87,6 +148,7 @@ export declare const ExtensionManifestSchema: z.ZodObject<{
|
|
|
87
148
|
advanced: z.ZodOptional<z.ZodBoolean>;
|
|
88
149
|
boolean: z.ZodOptional<z.ZodBoolean>;
|
|
89
150
|
hint: z.ZodOptional<z.ZodString>;
|
|
151
|
+
hosted: z.ZodOptional<z.ZodBoolean>;
|
|
90
152
|
rebuild: z.ZodOptional<z.ZodBoolean>;
|
|
91
153
|
default: z.ZodOptional<z.ZodString>;
|
|
92
154
|
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -188,7 +250,53 @@ export declare const ExtensionManifestSchema: z.ZodObject<{
|
|
|
188
250
|
}>;
|
|
189
251
|
why: z.ZodOptional<z.ZodString>;
|
|
190
252
|
}, z.core.$strip>>>;
|
|
253
|
+
actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
254
|
+
action: z.ZodString;
|
|
255
|
+
methods: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
256
|
+
paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
257
|
+
read: z.ZodOptional<z.ZodBoolean>;
|
|
258
|
+
channel: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
259
|
+
field: z.ZodString;
|
|
260
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
261
|
+
after: z.ZodString;
|
|
262
|
+
}, z.core.$strip>]>>;
|
|
263
|
+
content: z.ZodOptional<z.ZodObject<{
|
|
264
|
+
field: z.ZodString;
|
|
265
|
+
}, z.core.$strip>>;
|
|
266
|
+
}, z.core.$strip>>>;
|
|
267
|
+
}, z.core.$strip>>;
|
|
268
|
+
status: z.ZodOptional<z.ZodObject<{
|
|
269
|
+
from: z.ZodLiteral<"listener">;
|
|
270
|
+
pairingSteps: z.ZodOptional<z.ZodString>;
|
|
271
|
+
}, z.core.$strip>>;
|
|
272
|
+
sleepWatch: z.ZodOptional<z.ZodObject<{
|
|
273
|
+
service: z.ZodEnum<{
|
|
274
|
+
discord: "discord";
|
|
275
|
+
}>;
|
|
276
|
+
credential: z.ZodString;
|
|
277
|
+
consent: z.ZodString;
|
|
191
278
|
}, z.core.$strip>>;
|
|
279
|
+
commandActions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
280
|
+
action: z.ZodString;
|
|
281
|
+
command: z.ZodArray<z.ZodString>;
|
|
282
|
+
read: z.ZodOptional<z.ZodBoolean>;
|
|
283
|
+
channel: z.ZodOptional<z.ZodObject<{
|
|
284
|
+
arg: z.ZodNumber;
|
|
285
|
+
}, z.core.$strip>>;
|
|
286
|
+
content: z.ZodOptional<z.ZodObject<{
|
|
287
|
+
arg: z.ZodNumber;
|
|
288
|
+
rest: z.ZodOptional<z.ZodBoolean>;
|
|
289
|
+
}, z.core.$strip>>;
|
|
290
|
+
gatedBy: z.ZodOptional<z.ZodEnum<{
|
|
291
|
+
backend: "backend";
|
|
292
|
+
sandbox: "sandbox";
|
|
293
|
+
}>>;
|
|
294
|
+
unruled: z.ZodOptional<z.ZodEnum<{
|
|
295
|
+
allow: "allow";
|
|
296
|
+
hold: "hold";
|
|
297
|
+
}>>;
|
|
298
|
+
selfGated: z.ZodOptional<z.ZodBoolean>;
|
|
299
|
+
}, z.core.$strip>>>;
|
|
192
300
|
mcp: z.ZodOptional<z.ZodString>;
|
|
193
301
|
}, z.core.$strip>, z.ZodObject<{
|
|
194
302
|
id: z.ZodString;
|
|
@@ -223,6 +331,7 @@ export declare const ExtensionManifestSchema: z.ZodObject<{
|
|
|
223
331
|
advanced: z.ZodOptional<z.ZodBoolean>;
|
|
224
332
|
boolean: z.ZodOptional<z.ZodBoolean>;
|
|
225
333
|
hint: z.ZodOptional<z.ZodString>;
|
|
334
|
+
hosted: z.ZodOptional<z.ZodBoolean>;
|
|
226
335
|
rebuild: z.ZodOptional<z.ZodBoolean>;
|
|
227
336
|
default: z.ZodOptional<z.ZodString>;
|
|
228
337
|
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -254,6 +363,27 @@ export declare const ExtensionManifestSchema: z.ZodObject<{
|
|
|
254
363
|
microsoft: "microsoft";
|
|
255
364
|
}>>;
|
|
256
365
|
}, z.core.$strip>>;
|
|
366
|
+
channel: z.ZodOptional<z.ZodObject<{
|
|
367
|
+
messageLimit: z.ZodOptional<z.ZodNumber>;
|
|
368
|
+
publish: z.ZodOptional<z.ZodObject<{
|
|
369
|
+
target: z.ZodString;
|
|
370
|
+
}, z.core.$strip>>;
|
|
371
|
+
posting: z.ZodOptional<z.ZodString>;
|
|
372
|
+
}, z.core.$strip>>;
|
|
373
|
+
processors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
374
|
+
flow: z.ZodEnum<{
|
|
375
|
+
connector: "connector";
|
|
376
|
+
"email-imap": "email-imap";
|
|
377
|
+
"email-smtp": "email-smtp";
|
|
378
|
+
"team-chat": "team-chat";
|
|
379
|
+
}>;
|
|
380
|
+
operator: z.ZodOptional<z.ZodString>;
|
|
381
|
+
region: z.ZodOptional<z.ZodString>;
|
|
382
|
+
thirdCountry: z.ZodOptional<z.ZodBoolean>;
|
|
383
|
+
hosts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
384
|
+
hostField: z.ZodOptional<z.ZodString>;
|
|
385
|
+
when: z.ZodOptional<z.ZodString>;
|
|
386
|
+
}, z.core.$strip>>>;
|
|
257
387
|
kind: z.ZodLiteral<"browser">;
|
|
258
388
|
loginUrl: z.ZodOptional<z.ZodURL>;
|
|
259
389
|
homeUrl: z.ZodOptional<z.ZodURL>;
|
|
@@ -291,6 +421,7 @@ export declare const ExtensionManifestSchema: z.ZodObject<{
|
|
|
291
421
|
advanced: z.ZodOptional<z.ZodBoolean>;
|
|
292
422
|
boolean: z.ZodOptional<z.ZodBoolean>;
|
|
293
423
|
hint: z.ZodOptional<z.ZodString>;
|
|
424
|
+
hosted: z.ZodOptional<z.ZodBoolean>;
|
|
294
425
|
rebuild: z.ZodOptional<z.ZodBoolean>;
|
|
295
426
|
default: z.ZodOptional<z.ZodString>;
|
|
296
427
|
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -322,6 +453,27 @@ export declare const ExtensionManifestSchema: z.ZodObject<{
|
|
|
322
453
|
microsoft: "microsoft";
|
|
323
454
|
}>>;
|
|
324
455
|
}, z.core.$strip>>;
|
|
456
|
+
channel: z.ZodOptional<z.ZodObject<{
|
|
457
|
+
messageLimit: z.ZodOptional<z.ZodNumber>;
|
|
458
|
+
publish: z.ZodOptional<z.ZodObject<{
|
|
459
|
+
target: z.ZodString;
|
|
460
|
+
}, z.core.$strip>>;
|
|
461
|
+
posting: z.ZodOptional<z.ZodString>;
|
|
462
|
+
}, z.core.$strip>>;
|
|
463
|
+
processors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
464
|
+
flow: z.ZodEnum<{
|
|
465
|
+
connector: "connector";
|
|
466
|
+
"email-imap": "email-imap";
|
|
467
|
+
"email-smtp": "email-smtp";
|
|
468
|
+
"team-chat": "team-chat";
|
|
469
|
+
}>;
|
|
470
|
+
operator: z.ZodOptional<z.ZodString>;
|
|
471
|
+
region: z.ZodOptional<z.ZodString>;
|
|
472
|
+
thirdCountry: z.ZodOptional<z.ZodBoolean>;
|
|
473
|
+
hosts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
474
|
+
hostField: z.ZodOptional<z.ZodString>;
|
|
475
|
+
when: z.ZodOptional<z.ZodString>;
|
|
476
|
+
}, z.core.$strip>>>;
|
|
325
477
|
kind: z.ZodLiteral<"device">;
|
|
326
478
|
skill: z.ZodString;
|
|
327
479
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -357,6 +509,7 @@ export declare const ExtensionManifestSchema: z.ZodObject<{
|
|
|
357
509
|
advanced: z.ZodOptional<z.ZodBoolean>;
|
|
358
510
|
boolean: z.ZodOptional<z.ZodBoolean>;
|
|
359
511
|
hint: z.ZodOptional<z.ZodString>;
|
|
512
|
+
hosted: z.ZodOptional<z.ZodBoolean>;
|
|
360
513
|
rebuild: z.ZodOptional<z.ZodBoolean>;
|
|
361
514
|
default: z.ZodOptional<z.ZodString>;
|
|
362
515
|
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -388,6 +541,27 @@ export declare const ExtensionManifestSchema: z.ZodObject<{
|
|
|
388
541
|
microsoft: "microsoft";
|
|
389
542
|
}>>;
|
|
390
543
|
}, z.core.$strip>>;
|
|
544
|
+
channel: z.ZodOptional<z.ZodObject<{
|
|
545
|
+
messageLimit: z.ZodOptional<z.ZodNumber>;
|
|
546
|
+
publish: z.ZodOptional<z.ZodObject<{
|
|
547
|
+
target: z.ZodString;
|
|
548
|
+
}, z.core.$strip>>;
|
|
549
|
+
posting: z.ZodOptional<z.ZodString>;
|
|
550
|
+
}, z.core.$strip>>;
|
|
551
|
+
processors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
552
|
+
flow: z.ZodEnum<{
|
|
553
|
+
connector: "connector";
|
|
554
|
+
"email-imap": "email-imap";
|
|
555
|
+
"email-smtp": "email-smtp";
|
|
556
|
+
"team-chat": "team-chat";
|
|
557
|
+
}>;
|
|
558
|
+
operator: z.ZodOptional<z.ZodString>;
|
|
559
|
+
region: z.ZodOptional<z.ZodString>;
|
|
560
|
+
thirdCountry: z.ZodOptional<z.ZodBoolean>;
|
|
561
|
+
hosts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
562
|
+
hostField: z.ZodOptional<z.ZodString>;
|
|
563
|
+
when: z.ZodOptional<z.ZodString>;
|
|
564
|
+
}, z.core.$strip>>>;
|
|
391
565
|
kind: z.ZodLiteral<"webext">;
|
|
392
566
|
install: z.ZodOptional<z.ZodURL>;
|
|
393
567
|
skill: z.ZodString;
|
|
@@ -424,6 +598,7 @@ export declare const ExtensionManifestSchema: z.ZodObject<{
|
|
|
424
598
|
advanced: z.ZodOptional<z.ZodBoolean>;
|
|
425
599
|
boolean: z.ZodOptional<z.ZodBoolean>;
|
|
426
600
|
hint: z.ZodOptional<z.ZodString>;
|
|
601
|
+
hosted: z.ZodOptional<z.ZodBoolean>;
|
|
427
602
|
rebuild: z.ZodOptional<z.ZodBoolean>;
|
|
428
603
|
default: z.ZodOptional<z.ZodString>;
|
|
429
604
|
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -455,6 +630,27 @@ export declare const ExtensionManifestSchema: z.ZodObject<{
|
|
|
455
630
|
microsoft: "microsoft";
|
|
456
631
|
}>>;
|
|
457
632
|
}, z.core.$strip>>;
|
|
633
|
+
channel: z.ZodOptional<z.ZodObject<{
|
|
634
|
+
messageLimit: z.ZodOptional<z.ZodNumber>;
|
|
635
|
+
publish: z.ZodOptional<z.ZodObject<{
|
|
636
|
+
target: z.ZodString;
|
|
637
|
+
}, z.core.$strip>>;
|
|
638
|
+
posting: z.ZodOptional<z.ZodString>;
|
|
639
|
+
}, z.core.$strip>>;
|
|
640
|
+
processors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
641
|
+
flow: z.ZodEnum<{
|
|
642
|
+
connector: "connector";
|
|
643
|
+
"email-imap": "email-imap";
|
|
644
|
+
"email-smtp": "email-smtp";
|
|
645
|
+
"team-chat": "team-chat";
|
|
646
|
+
}>;
|
|
647
|
+
operator: z.ZodOptional<z.ZodString>;
|
|
648
|
+
region: z.ZodOptional<z.ZodString>;
|
|
649
|
+
thirdCountry: z.ZodOptional<z.ZodBoolean>;
|
|
650
|
+
hosts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
651
|
+
hostField: z.ZodOptional<z.ZodString>;
|
|
652
|
+
when: z.ZodOptional<z.ZodString>;
|
|
653
|
+
}, z.core.$strip>>>;
|
|
458
654
|
kind: z.ZodLiteral<"phone">;
|
|
459
655
|
install: z.ZodOptional<z.ZodURL>;
|
|
460
656
|
skill: z.ZodString;
|
|
@@ -491,6 +687,7 @@ export declare const ExtensionManifestSchema: z.ZodObject<{
|
|
|
491
687
|
advanced: z.ZodOptional<z.ZodBoolean>;
|
|
492
688
|
boolean: z.ZodOptional<z.ZodBoolean>;
|
|
493
689
|
hint: z.ZodOptional<z.ZodString>;
|
|
690
|
+
hosted: z.ZodOptional<z.ZodBoolean>;
|
|
494
691
|
rebuild: z.ZodOptional<z.ZodBoolean>;
|
|
495
692
|
default: z.ZodOptional<z.ZodString>;
|
|
496
693
|
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -522,6 +719,27 @@ export declare const ExtensionManifestSchema: z.ZodObject<{
|
|
|
522
719
|
microsoft: "microsoft";
|
|
523
720
|
}>>;
|
|
524
721
|
}, z.core.$strip>>;
|
|
722
|
+
channel: z.ZodOptional<z.ZodObject<{
|
|
723
|
+
messageLimit: z.ZodOptional<z.ZodNumber>;
|
|
724
|
+
publish: z.ZodOptional<z.ZodObject<{
|
|
725
|
+
target: z.ZodString;
|
|
726
|
+
}, z.core.$strip>>;
|
|
727
|
+
posting: z.ZodOptional<z.ZodString>;
|
|
728
|
+
}, z.core.$strip>>;
|
|
729
|
+
processors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
730
|
+
flow: z.ZodEnum<{
|
|
731
|
+
connector: "connector";
|
|
732
|
+
"email-imap": "email-imap";
|
|
733
|
+
"email-smtp": "email-smtp";
|
|
734
|
+
"team-chat": "team-chat";
|
|
735
|
+
}>;
|
|
736
|
+
operator: z.ZodOptional<z.ZodString>;
|
|
737
|
+
region: z.ZodOptional<z.ZodString>;
|
|
738
|
+
thirdCountry: z.ZodOptional<z.ZodBoolean>;
|
|
739
|
+
hosts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
740
|
+
hostField: z.ZodOptional<z.ZodString>;
|
|
741
|
+
when: z.ZodOptional<z.ZodString>;
|
|
742
|
+
}, z.core.$strip>>>;
|
|
525
743
|
kind: z.ZodLiteral<"agent">;
|
|
526
744
|
}, z.core.$strip>], "kind">>>;
|
|
527
745
|
commands: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -550,6 +768,11 @@ export declare const ExtensionManifestSchema: z.ZodObject<{
|
|
|
550
768
|
type: z.ZodString;
|
|
551
769
|
label: z.ZodString;
|
|
552
770
|
}, z.core.$strip>>;
|
|
771
|
+
strangers: z.ZodOptional<z.ZodEnum<{
|
|
772
|
+
contact: "contact";
|
|
773
|
+
report: "report";
|
|
774
|
+
visitor: "visitor";
|
|
775
|
+
}>>;
|
|
553
776
|
automation: z.ZodObject<{
|
|
554
777
|
label: z.ZodString;
|
|
555
778
|
mentionLabel: z.ZodOptional<z.ZodString>;
|
|
@@ -576,6 +799,17 @@ export declare const ExtensionManifestSchema: z.ZodObject<{
|
|
|
576
799
|
starterPrompt: z.ZodString;
|
|
577
800
|
}, z.core.$strip>;
|
|
578
801
|
}, z.core.$strip>>;
|
|
802
|
+
modelRoles: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
803
|
+
id: z.ZodString;
|
|
804
|
+
label: z.ZodString;
|
|
805
|
+
explanation: z.ZodString;
|
|
806
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
807
|
+
setup: z.ZodOptional<z.ZodEnum<{
|
|
808
|
+
high: "high";
|
|
809
|
+
low: "low";
|
|
810
|
+
medium: "medium";
|
|
811
|
+
}>>;
|
|
812
|
+
}, z.core.$strip>>>;
|
|
579
813
|
processes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
580
814
|
name: z.ZodString;
|
|
581
815
|
command: z.ZodString;
|
|
@@ -584,6 +818,41 @@ export declare const ExtensionManifestSchema: z.ZodObject<{
|
|
|
584
818
|
preview: z.ZodOptional<z.ZodBoolean>;
|
|
585
819
|
autoStart: z.ZodOptional<z.ZodBoolean>;
|
|
586
820
|
}, z.core.$strip>>>;
|
|
821
|
+
publicRoutes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
822
|
+
path: z.ZodString;
|
|
823
|
+
methods: z.ZodArray<z.ZodEnum<{
|
|
824
|
+
DELETE: "DELETE";
|
|
825
|
+
GET: "GET";
|
|
826
|
+
PATCH: "PATCH";
|
|
827
|
+
POST: "POST";
|
|
828
|
+
PUT: "PUT";
|
|
829
|
+
}>>;
|
|
830
|
+
automation: z.ZodOptional<z.ZodLiteral<true>>;
|
|
831
|
+
origins: z.ZodOptional<z.ZodEnum<{
|
|
832
|
+
any: "any";
|
|
833
|
+
listed: "listed";
|
|
834
|
+
}>>;
|
|
835
|
+
key: z.ZodOptional<z.ZodLiteral<true>>;
|
|
836
|
+
keyFromBrowsers: z.ZodOptional<z.ZodLiteral<true>>;
|
|
837
|
+
signature: z.ZodOptional<z.ZodObject<{
|
|
838
|
+
scheme: z.ZodEnum<{
|
|
839
|
+
github: "github";
|
|
840
|
+
linear: "linear";
|
|
841
|
+
sentry: "sentry";
|
|
842
|
+
"standard-webhooks": "standard-webhooks";
|
|
843
|
+
stripe: "stripe";
|
|
844
|
+
}>;
|
|
845
|
+
secret: z.ZodString;
|
|
846
|
+
}, z.core.$strip>>;
|
|
847
|
+
turnstile: z.ZodOptional<z.ZodObject<{
|
|
848
|
+
secret: z.ZodString;
|
|
849
|
+
}, z.core.$strip>>;
|
|
850
|
+
proofOfWork: z.ZodOptional<z.ZodLiteral<true>>;
|
|
851
|
+
rate: z.ZodOptional<z.ZodNumber>;
|
|
852
|
+
dailyMax: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"none">]>>;
|
|
853
|
+
bodyMax: z.ZodOptional<z.ZodNumber>;
|
|
854
|
+
wakes: z.ZodOptional<z.ZodLiteral<true>>;
|
|
855
|
+
}, z.core.$strip>>>;
|
|
587
856
|
settings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
588
857
|
key: z.ZodString;
|
|
589
858
|
type: z.ZodEnum<{
|
|
@@ -633,8 +902,35 @@ export declare const ExtensionManifestSchema: z.ZodObject<{
|
|
|
633
902
|
}>;
|
|
634
903
|
badge: z.ZodOptional<z.ZodBoolean>;
|
|
635
904
|
}, z.core.$strip>>>;
|
|
905
|
+
watchKinds: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
906
|
+
id: z.ZodString;
|
|
907
|
+
label: z.ZodString;
|
|
908
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
909
|
+
logo: z.ZodOptional<z.ZodString>;
|
|
910
|
+
description: z.ZodString;
|
|
911
|
+
sentence: z.ZodString;
|
|
912
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
913
|
+
key: z.ZodString;
|
|
914
|
+
label: z.ZodString;
|
|
915
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
916
|
+
switch: "switch";
|
|
917
|
+
text: "text";
|
|
918
|
+
}>>;
|
|
919
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
920
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
921
|
+
hint: z.ZodOptional<z.ZodString>;
|
|
922
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
923
|
+
patternHint: z.ZodOptional<z.ZodString>;
|
|
924
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
925
|
+
}, z.core.$strip>>;
|
|
926
|
+
capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
927
|
+
}, z.core.$strip>>>;
|
|
636
928
|
}, z.core.$strip>>;
|
|
637
929
|
}, z.core.$strip>;
|
|
638
930
|
export type ExtensionManifest = z.infer<typeof ExtensionManifestSchema>;
|
|
931
|
+
export declare const declaredOfBackend: (manifest: Pick<ExtensionManifest, "permissions" | "contributes">) => {
|
|
932
|
+
declared: import("./permissions.js").ExtensionDeclaredReach;
|
|
933
|
+
watchKinds: string[];
|
|
934
|
+
};
|
|
639
935
|
export declare const extensionIdOf: (manifest: Pick<ExtensionManifest, "publisher" | "name">) => string;
|
|
640
936
|
//# sourceMappingURL=manifest.d.ts.map
|
package/dist/manifest.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA8PxB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAyC,CAAC;AAC9E,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAIxE,eAAO,MAAM,iBAAiB,aAAc,IAAI,CAAC,iBAAiB,EAAE,aAAa,GAAG,aAAa,CAAC;IAC9F,QAAQ;IACR,UAAU;CACZ,CAAC;AAIH,eAAO,MAAM,aAAa,aAAc,IAAI,CAAC,iBAAiB,EAAE,WAAW,GAAG,MAAM,CAAC,KAAG,MAAkD,CAAC"}
|
package/dist/manifest.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { MARK_FIELDS } from "./mark.js";
|
|
3
|
-
import { permissionProblem } from "./permissions.js";
|
|
3
|
+
import { declaredReachOf, EXTENSION_FIRE_HANDLER, permissionProblem } from "./permissions.js";
|
|
4
4
|
import { contributesSchema } from "./points/index.js";
|
|
5
5
|
const permissionEntry = () => z.string().superRefine((entry, ctx) => {
|
|
6
6
|
const problem = permissionProblem(entry);
|
|
@@ -46,11 +46,108 @@ const ManifestShape = z.object({
|
|
|
46
46
|
.array(permissionEntry().meta({ power: { key: "daemon:${value}", sentence: "its backend calls the daemon route ${value}" } }))
|
|
47
47
|
.optional()
|
|
48
48
|
.describe("Daemon routes your SERVER half may call. Separate from `sandbox` because the two halves run as different principals: the UI as the owner's session, the backend as a minted per-extension token, so a grant to one must never quietly widen the other."),
|
|
49
|
+
events: z
|
|
50
|
+
.array(z.union([
|
|
51
|
+
z.literal("run").meta({ power: { key: "events:run", sentence: "its backend hears when a conversation it started finishes a turn" } }),
|
|
52
|
+
z
|
|
53
|
+
.literal("activity")
|
|
54
|
+
.meta({ power: { key: "events:activity", sentence: "its backend hears whether any agent turn is running in the sandbox" } }),
|
|
55
|
+
z
|
|
56
|
+
.literal("ci")
|
|
57
|
+
.meta({ power: { key: "events:ci", sentence: "its backend hears every CI run and job the workspace's forges report" } }),
|
|
58
|
+
]))
|
|
59
|
+
.optional()
|
|
60
|
+
.describe("Events your backend hears through `api.events` beyond its settings and the workspace's changes: `run`, a turn ending in a conversation it started through POST /agent with its own token; `activity`, whether any agent turn is running in the sandbox; `ci`, each run and job the workspace's GitHub and GitLab forges report as it is heard (the CI feed)."),
|
|
61
|
+
work: z
|
|
62
|
+
.boolean()
|
|
63
|
+
.meta({ power: { key: "work", sentence: "its backend keeps the sandbox awake, and a restart waiting, while it holds work in flight" } })
|
|
64
|
+
.optional()
|
|
65
|
+
.describe("Whether your backend may hold work in flight with `api.work.hold(label)`: while held, the sandbox stays awake and an update or restart waits for it, as for an agent's turn."),
|
|
66
|
+
exec: z
|
|
67
|
+
.array(z.union([
|
|
68
|
+
z.literal("command").meta({ power: { key: "exec:command", sentence: "its backend runs commands, admitted like an agent's" } }),
|
|
69
|
+
z
|
|
70
|
+
.literal("toolchain")
|
|
71
|
+
.meta({ power: { key: "exec:toolchain", sentence: "its backend runs heavy tools, queued with the sandbox's builds and tests" } }),
|
|
72
|
+
]))
|
|
73
|
+
.optional()
|
|
74
|
+
.describe("The workload classes `api.exec` may run a command under: `command`, admitted and ranked as an agent's shell command; `toolchain`, a heavy tool (a build, a test run, an analyser), which also takes turns in the sandbox's heavy-command queue."),
|
|
75
|
+
fires: z
|
|
76
|
+
.array(z
|
|
77
|
+
.string()
|
|
78
|
+
.regex(EXTENSION_FIRE_HANDLER, "a handler is a lowercase word: letters, digits and dashes")
|
|
79
|
+
.meta({ power: { key: "fires:${value}", sentence: 'the sandbox\'s automations wake its backend\'s "${value}" handler' } }))
|
|
80
|
+
.optional()
|
|
81
|
+
.describe("Handlers an automation may fire in your backend (`api.automations.onFire(name, handler)`): an automation whose target is `{ kind: \"extension\" }` names this extension and one of these, and fires it on its trigger under the scheduler's admission, holds and journal, without an agent."),
|
|
82
|
+
turn: z
|
|
83
|
+
.array(z.union([
|
|
84
|
+
z.literal("browser").meta({
|
|
85
|
+
power: {
|
|
86
|
+
key: "turn:browser",
|
|
87
|
+
sentence: "its agent tools drive the sandbox's signed-in browsers, for the accounts the calling turn holds and on those accounts' own sites",
|
|
88
|
+
},
|
|
89
|
+
}),
|
|
90
|
+
z
|
|
91
|
+
.literal("owner-browser")
|
|
92
|
+
.meta({ power: { key: "turn:owner-browser", sentence: "its agent tools use the owner's own browser when the calling turn holds it" } }),
|
|
93
|
+
z.literal("jobs").meta({ power: { key: "turn:jobs", sentence: "its agent tools start background jobs in the calling conversation" } }),
|
|
94
|
+
]))
|
|
95
|
+
.optional()
|
|
96
|
+
.describe("What your agent tools (`contributes.tools`, served by `api.tools.serve`) may do with the grants of the turn that calls them: `browser`, drive the sandbox's signed-in browser of an account the turn holds, on that account's own sites (`api.browser.call`); `owner-browser`, call the owner's own browser the turn holds (`api.ownerBrowser.call`); `jobs`, start a background job in the calling conversation that the agent collects with `wait` (`api.jobs.start`). Never more than the turn holds."),
|
|
97
|
+
identity: z
|
|
98
|
+
.array(z.literal("sign").meta({
|
|
99
|
+
power: {
|
|
100
|
+
key: "identity:sign",
|
|
101
|
+
sentence: "its backend signs records as this sandbox, which anyone can verify with the sandbox's public key",
|
|
102
|
+
},
|
|
103
|
+
}))
|
|
104
|
+
.optional()
|
|
105
|
+
.describe("What your backend may do as this sandbox's identity: `sign`, have the daemon sign a JSON record as this sandbox (`api.identity.sign(purpose, payload)`), under a domain naming your extension and the record's purpose, which anyone verifies with the sandbox's published keys. The key never reaches your code."),
|
|
49
106
|
})
|
|
50
107
|
.optional()
|
|
51
108
|
.describe('How far this extension may reach into the daemon, as "<METHOD> <path-glob>" entries where `*` matches one path segment: e.g. "GET /panels", "POST /panels/*/start". The install dialog shows these, the host refuses anything undeclared, and the usage ledger records which were actually earned.'),
|
|
52
109
|
contributes: contributesSchema.optional(),
|
|
53
110
|
});
|
|
111
|
+
const servedChecks = (manifest, ctx) => {
|
|
112
|
+
const kinds = manifest.contributes?.watchKinds ?? [];
|
|
113
|
+
if (kinds.length > 0 && manifest.server === undefined) {
|
|
114
|
+
ctx.addIssue({ code: "custom", path: ["contributes", "watchKinds"], message: "watch kinds need a `server` bundle to answer their checks" });
|
|
115
|
+
}
|
|
116
|
+
const cards = new Set((manifest.contributes?.capabilities ?? []).map((card) => card.id));
|
|
117
|
+
for (const [index, kind] of kinds.entries()) {
|
|
118
|
+
const foreign = (kind.capabilities ?? []).find((card) => !cards.has(card));
|
|
119
|
+
if (foreign !== undefined) {
|
|
120
|
+
ctx.addIssue({ code: "custom", path: ["contributes", "watchKinds", index, "capabilities"], message: `"${foreign}" is not one of this extension's own capability cards` });
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
const ids = kinds.map((kind) => kind.id);
|
|
124
|
+
const doubled = ids.find((id, index) => ids.indexOf(id) !== index);
|
|
125
|
+
if (doubled !== undefined) {
|
|
126
|
+
ctx.addIssue({ code: "custom", path: ["contributes", "watchKinds"], message: `the watch kind "${doubled}" is declared twice` });
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
const declaredRoles = (manifest, ctx) => {
|
|
130
|
+
const ids = (manifest.contributes?.modelRoles ?? []).map((role) => role.id);
|
|
131
|
+
const doubled = ids.find((id, index) => ids.indexOf(id) !== index);
|
|
132
|
+
if (doubled !== undefined) {
|
|
133
|
+
ctx.addIssue({ code: "custom", path: ["contributes", "modelRoles"], message: `the model role "${doubled}" is declared twice` });
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
const servedPublicRoutes = (manifest, ctx) => {
|
|
137
|
+
const routes = manifest.contributes?.publicRoutes ?? [];
|
|
138
|
+
if (routes.length > 0 && manifest.server === undefined) {
|
|
139
|
+
ctx.addIssue({ code: "custom", path: ["contributes", "publicRoutes"], message: "public routes need a `server` bundle to answer them" });
|
|
140
|
+
}
|
|
141
|
+
for (const [index, route] of routes.entries()) {
|
|
142
|
+
if (route.automation === true && manifest.contributes?.listener === undefined) {
|
|
143
|
+
ctx.addIssue({
|
|
144
|
+
code: "custom",
|
|
145
|
+
path: ["contributes", "publicRoutes", index, "automation"],
|
|
146
|
+
message: "a route scoped to an automation reads it from this extension's own `contributes.listener`, which it does not declare",
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
};
|
|
54
151
|
const servedTools = (manifest, ctx) => {
|
|
55
152
|
const contributes = manifest.contributes;
|
|
56
153
|
const tools = contributes?.tools;
|
|
@@ -60,6 +157,9 @@ const servedTools = (manifest, ctx) => {
|
|
|
60
157
|
ctx.addIssue({ code: "custom", path: ["contributes", "capabilities"], message: `card "${card.id}" declares \`mcp\`, which only a \`server\` bundle can answer` });
|
|
61
158
|
}
|
|
62
159
|
}
|
|
160
|
+
servedChecks(manifest, ctx);
|
|
161
|
+
declaredRoles(manifest, ctx);
|
|
162
|
+
servedPublicRoutes(manifest, ctx);
|
|
63
163
|
if (tools === undefined) {
|
|
64
164
|
return;
|
|
65
165
|
}
|
|
@@ -84,5 +184,9 @@ const servedTools = (manifest, ctx) => {
|
|
|
84
184
|
}
|
|
85
185
|
};
|
|
86
186
|
export const ExtensionManifestSchema = ManifestShape.superRefine(servedTools);
|
|
187
|
+
export const declaredOfBackend = (manifest) => ({
|
|
188
|
+
declared: declaredReachOf(manifest.permissions),
|
|
189
|
+
watchKinds: (manifest.contributes?.watchKinds ?? []).map((kind) => kind.id),
|
|
190
|
+
});
|
|
87
191
|
export const extensionIdOf = (manifest) => `${manifest.publisher}.${manifest.name}`;
|
|
88
192
|
//# sourceMappingURL=manifest.js.map
|