@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/src/powers.test.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { manifestJsonSchema } from "./json-schema.js";
|
|
3
3
|
import { ExtensionManifestSchema } from "./manifest.js";
|
|
4
|
-
import { powersOf } from "./powers-diff.js";
|
|
4
|
+
import { diffPowers, powersOf } from "./powers-diff.js";
|
|
5
5
|
|
|
6
6
|
// Every power the schema declares must COUNT: a manifest that sets the field folds to exactly one more power than the
|
|
7
7
|
// same manifest without it, under the key and sentence below. The powers are the owner's approval (a workspace
|
|
@@ -33,6 +33,18 @@ const VIEW = { id: "board", label: "Board", surface: "rail" } as const;
|
|
|
33
33
|
const COMMAND = { command: "acme.run", title: "Run" };
|
|
34
34
|
const SETTING = { key: "token", type: "string", title: "Token" } as const;
|
|
35
35
|
const SERVER = { server: "dist/server.js" };
|
|
36
|
+
const LISTENER = {
|
|
37
|
+
provider: "acme",
|
|
38
|
+
events: [{ type: "message", label: "A message" }],
|
|
39
|
+
automation: { label: "Acme", channel: { label: "Channel", placeholder: "#general" }, starterPrompt: "Answer it." },
|
|
40
|
+
};
|
|
41
|
+
const WATCH_KIND = {
|
|
42
|
+
id: "pypi",
|
|
43
|
+
label: "PyPI package",
|
|
44
|
+
description: "A version on PyPI.",
|
|
45
|
+
sentence: "PyPI {package}",
|
|
46
|
+
fields: [{ key: "package", label: "Package", required: true }],
|
|
47
|
+
};
|
|
36
48
|
// One card of each kind, so every arm of the capability union is reached through it.
|
|
37
49
|
const CARDS: readonly Card[] = [
|
|
38
50
|
CLI_CARD,
|
|
@@ -66,6 +78,78 @@ const ROWS: readonly Row[] = [
|
|
|
66
78
|
with: { permissions: { daemon: ["GET /workspace/tree"] } },
|
|
67
79
|
adds: ["daemon:GET /workspace/tree", "its backend calls the daemon route GET /workspace/tree"],
|
|
68
80
|
},
|
|
81
|
+
{
|
|
82
|
+
power: "events:run",
|
|
83
|
+
without: { permissions: { events: [] } },
|
|
84
|
+
with: { permissions: { events: ["run"] } },
|
|
85
|
+
adds: ["events:run", "its backend hears when a conversation it started finishes a turn"],
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
power: "events:activity",
|
|
89
|
+
without: { permissions: { events: ["run"] } },
|
|
90
|
+
with: { permissions: { events: ["run", "activity"] } },
|
|
91
|
+
adds: ["events:activity", "its backend hears whether any agent turn is running in the sandbox"],
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
power: "events:ci",
|
|
95
|
+
without: { permissions: { events: ["run"] } },
|
|
96
|
+
with: { permissions: { events: ["run", "ci"] } },
|
|
97
|
+
adds: ["events:ci", "its backend hears every CI run and job the workspace's forges report"],
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
power: "turn:browser",
|
|
101
|
+
without: { permissions: { turn: [] } },
|
|
102
|
+
with: { permissions: { turn: ["browser"] } },
|
|
103
|
+
adds: ["turn:browser", "its agent tools drive the sandbox's signed-in browsers, for the accounts the calling turn holds and on those accounts' own sites"],
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
power: "turn:owner-browser",
|
|
107
|
+
without: { permissions: { turn: ["browser"] } },
|
|
108
|
+
with: { permissions: { turn: ["browser", "owner-browser"] } },
|
|
109
|
+
adds: ["turn:owner-browser", "its agent tools use the owner's own browser when the calling turn holds it"],
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
power: "turn:jobs",
|
|
113
|
+
without: { permissions: { turn: [] } },
|
|
114
|
+
with: { permissions: { turn: ["jobs"] } },
|
|
115
|
+
adds: ["turn:jobs", "its agent tools start background jobs in the calling conversation"],
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
power: "identity:sign",
|
|
119
|
+
without: { permissions: { identity: [] } },
|
|
120
|
+
with: { permissions: { identity: ["sign"] } },
|
|
121
|
+
adds: ["identity:sign", "its backend signs records as this sandbox, which anyone can verify with the sandbox's public key"],
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
power: "work",
|
|
125
|
+
without: { permissions: { work: false } },
|
|
126
|
+
with: { permissions: { work: true } },
|
|
127
|
+
adds: ["work", "its backend keeps the sandbox awake, and a restart waiting, while it holds work in flight"],
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
power: "exec:command",
|
|
131
|
+
without: { permissions: { exec: [] } },
|
|
132
|
+
with: { permissions: { exec: ["command"] } },
|
|
133
|
+
adds: ["exec:command", "its backend runs commands, admitted like an agent's"],
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
power: "exec:toolchain",
|
|
137
|
+
without: { permissions: { exec: ["command"] } },
|
|
138
|
+
with: { permissions: { exec: ["command", "toolchain"] } },
|
|
139
|
+
adds: ["exec:toolchain", "its backend runs heavy tools, queued with the sandbox's builds and tests"],
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
power: "fires:${value}",
|
|
143
|
+
without: { permissions: { fires: [] } },
|
|
144
|
+
with: { permissions: { fires: ["sweep"] } },
|
|
145
|
+
adds: ["fires:sweep", 'the sandbox\'s automations wake its backend\'s "sweep" handler'],
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
power: "watch-kind:${id}",
|
|
149
|
+
without: contributes({ watchKinds: [] }, SERVER),
|
|
150
|
+
with: contributes({ watchKinds: [WATCH_KIND] }, SERVER),
|
|
151
|
+
adds: ["watch-kind:pypi", 'its backend checks "PyPI package" watches for the sandbox\'s automations'],
|
|
152
|
+
},
|
|
69
153
|
{ power: "view:${id}", without: contributes({ views: [] }), with: contributes({ views: [VIEW] }), adds: ["view:board", 'a rail view "Board"'] },
|
|
70
154
|
{
|
|
71
155
|
power: "view-badge:${id}",
|
|
@@ -161,15 +245,27 @@ const ROWS: readonly Row[] = [
|
|
|
161
245
|
{
|
|
162
246
|
power: "listener:${provider}",
|
|
163
247
|
without: contributes({}),
|
|
164
|
-
with: contributes({
|
|
165
|
-
listener: {
|
|
166
|
-
provider: "acme",
|
|
167
|
-
events: [{ type: "message", label: "A message" }],
|
|
168
|
-
automation: { label: "Acme", channel: { label: "Channel", placeholder: "#general" }, starterPrompt: "Answer it." },
|
|
169
|
-
},
|
|
170
|
-
}),
|
|
248
|
+
with: contributes({ listener: LISTENER }),
|
|
171
249
|
adds: ["listener:acme", 'a realtime listener provider "acme"'],
|
|
172
250
|
},
|
|
251
|
+
{
|
|
252
|
+
power: "listener-strangers:${provider}",
|
|
253
|
+
without: contributes({ listener: LISTENER }),
|
|
254
|
+
with: contributes({ listener: { ...LISTENER, strangers: "visitor" } }),
|
|
255
|
+
adds: ["listener-strangers:acme", 'anyone on the internet can wake an agent through its "acme" listener'],
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
power: "public:${path}",
|
|
259
|
+
without: contributes({ publicRoutes: [] }, SERVER),
|
|
260
|
+
with: contributes({ publicRoutes: [{ path: "hook", methods: ["POST"], signature: { scheme: "github", secret: "HOOK_SECRET" } }] }, SERVER),
|
|
261
|
+
adds: ["public:hook", "anyone on the internet can call its backend at POST /hook when signed with your secret HOOK_SECRET"],
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
power: "wakes:${path}",
|
|
265
|
+
without: contributes({ publicRoutes: [{ path: "hook", methods: ["POST"] }] }, SERVER),
|
|
266
|
+
with: contributes({ publicRoutes: [{ path: "hook", methods: ["POST"], wakes: true }] }, SERVER),
|
|
267
|
+
adds: ["wakes:hook", "a call to /hook wakes the sandbox while it sleeps, which spends its awake hours"],
|
|
268
|
+
},
|
|
173
269
|
{ power: "bin", without: contributes({}), with: contributes({ bin: "bin" }), adds: ["bin", "puts its shipped tools on the agent's PATH"] },
|
|
174
270
|
{
|
|
175
271
|
power: "tools${perCard?-${perCard}:}",
|
|
@@ -215,3 +311,15 @@ describe("powersOf", () => {
|
|
|
215
311
|
expect([...before].filter(([key]) => !after.has(key))).toEqual([]);
|
|
216
312
|
});
|
|
217
313
|
});
|
|
314
|
+
|
|
315
|
+
// (2026-11-28) Signing as the sandbox is a power of its own: an update that starts declaring it asks again, naming it.
|
|
316
|
+
test("an update that declares permissions.identity sign asks for it as a new power", () => {
|
|
317
|
+
const before = manifest(SERVER);
|
|
318
|
+
const after = manifest({ ...SERVER, permissions: { identity: ["sign"] } });
|
|
319
|
+
expect(diffPowers(before, after)).toEqual({
|
|
320
|
+
added: ["its backend signs records as this sandbox, which anyone can verify with the sandbox's public key"],
|
|
321
|
+
removed: [],
|
|
322
|
+
unchanged: ["runs a backend bundle inside the daemon's extension host"],
|
|
323
|
+
});
|
|
324
|
+
expect(diffPowers(after, after).added).toEqual([]);
|
|
325
|
+
});
|