@fungi.computer/oyster 0.1.0 → 0.3.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 +376 -72
- package/dist/agent-avatars.d.ts +103 -0
- package/dist/agent-avatars.js +66 -0
- package/dist/agents.d.ts +15 -4
- package/dist/agents.js +43 -4
- package/dist/app-builds.d.ts +81 -8
- package/dist/app-builds.js +210 -60
- package/dist/app-storage.d.ts +3 -3
- package/dist/approval-capability.d.ts +5 -0
- package/dist/approval-capability.js +46 -0
- package/dist/approval-home.d.ts +51 -0
- package/dist/approval-home.js +226 -0
- package/dist/apps/catalog.d.ts +335 -0
- package/dist/apps/catalog.js +46 -0
- package/dist/apps/gate.d.ts +26 -12
- package/dist/apps/gate.js +48 -22
- package/dist/apps/index.d.ts +3 -1
- package/dist/apps/index.js +3 -1
- package/dist/apps/installation.d.ts +147 -66
- package/dist/apps/installation.js +193 -86
- package/dist/apps/permissions.d.ts +247 -0
- package/dist/apps/permissions.js +255 -0
- package/dist/boot-capability-route.d.ts +15 -0
- package/dist/boot-capability-route.js +196 -0
- package/dist/boot-capability.d.ts +103 -0
- package/dist/boot-capability.js +141 -0
- package/dist/boot-construction.d.ts +12 -0
- package/dist/boot-construction.js +175 -0
- package/dist/boot-gate.d.ts +267 -0
- package/dist/boot-gate.js +236 -0
- package/dist/boot-host-script.d.ts +2 -0
- package/dist/boot-host-script.js +1 -0
- package/dist/boot-mount.d.ts +21 -0
- package/dist/boot-mount.js +65 -0
- package/dist/browser/boot.d.ts +73 -0
- package/dist/browser/boot.js +502 -0
- package/dist/browser/browser.d.ts +104 -0
- package/dist/browser/browser.js +374 -0
- package/dist/browser/capability-source.d.ts +76 -0
- package/dist/browser/capability-source.js +338 -0
- package/dist/browser/cdp-client.d.ts +56 -0
- package/dist/browser/cdp-client.js +184 -0
- package/dist/browser/errors.d.ts +79 -0
- package/dist/browser/errors.js +32 -0
- package/dist/browser/index.d.ts +16 -0
- package/dist/browser/index.js +14 -0
- package/dist/browser/lease-registry.d.ts +61 -0
- package/dist/browser/lease-registry.js +101 -0
- package/dist/browser/operations.d.ts +225 -0
- package/dist/browser/operations.js +137 -0
- package/dist/browser/page.d.ts +25 -0
- package/dist/browser/page.js +172 -0
- package/dist/browser/quick-reads.d.ts +29 -0
- package/dist/browser/quick-reads.js +160 -0
- package/dist/browser/sessions.d.ts +52 -0
- package/dist/browser/sessions.js +118 -0
- package/dist/browser/url-policy.d.ts +18 -0
- package/dist/browser/url-policy.js +58 -0
- package/dist/build/app-imports.d.ts +12 -0
- package/dist/build/app-imports.js +105 -0
- package/dist/build/build-policy.d.ts +5 -3
- package/dist/build/build-policy.js +5 -3
- package/dist/build/candidate-builder.d.ts +1 -1
- package/dist/build/candidate-cli.mjs +8428 -337
- package/dist/build/local-build.d.ts +2 -0
- package/dist/build/local-build.js +28 -6
- package/dist/build/snapshot-package-store.d.ts +1 -1
- package/dist/build/snapshot-package-store.js +7 -2
- package/dist/build/workspace-build.d.ts +92 -5
- package/dist/build/workspace-build.js +93 -19
- package/dist/build-egress.js +4 -4
- package/dist/build.d.ts +1 -1
- package/dist/build.js +1 -1
- package/dist/catalog-frame.js +1 -1
- package/dist/cloudflare.d.ts +13 -3
- package/dist/cloudflare.js +106 -8
- package/dist/frame-binding-wire-script.js +1 -1
- package/dist/frame-binding-wire.d.ts +1 -1
- package/dist/frame-binding-wire.js +5 -3
- package/dist/git-auth.d.ts +0 -2
- package/dist/git-auth.js +0 -2
- package/dist/git-journal.js +4 -4
- package/dist/git.d.ts +0 -1
- package/dist/git.js +0 -2
- package/dist/host.d.ts +39 -13
- package/dist/host.js +268 -142
- package/dist/index.d.ts +26 -15
- package/dist/index.js +40 -16
- package/dist/install-release-cli.d.ts +2 -0
- package/dist/install-release-cli.js +46 -0
- package/dist/installation-client.d.ts +43 -0
- package/dist/installation-client.js +178 -0
- package/dist/installation-execution.d.ts +11 -0
- package/dist/installation-execution.js +184 -0
- package/dist/installation-operations.d.ts +1437 -0
- package/dist/installation-operations.js +664 -0
- package/dist/installation-store-generation.d.ts +3 -0
- package/dist/installation-store-generation.js +16 -0
- package/dist/instance-id.d.ts +10 -0
- package/dist/instance-id.js +10 -0
- package/dist/instance-refusal.d.ts +11 -0
- package/dist/instance-refusal.js +21 -0
- package/dist/internal/delivery.js +4 -2
- package/dist/internal/host-gate.js +7 -1
- package/dist/internal/registry-installations.js +4 -4
- package/dist/keys.d.ts +5 -1
- package/dist/keys.js +10 -2
- package/dist/machine-link/authority.d.ts +89 -0
- package/dist/machine-link/authority.js +37 -0
- package/dist/machine-link/client.d.ts +66 -0
- package/dist/machine-link/client.js +94 -0
- package/dist/machine-link/delivery.d.ts +18 -0
- package/dist/machine-link/delivery.js +55 -0
- package/dist/machine-link/enrollment.d.ts +111 -0
- package/dist/machine-link/enrollment.js +286 -0
- package/dist/machine-link/fences.d.ts +37 -0
- package/dist/machine-link/fences.js +166 -0
- package/dist/machine-link/home.d.ts +20 -0
- package/dist/machine-link/home.js +24 -0
- package/dist/machine-link/host.d.ts +43 -0
- package/dist/machine-link/host.js +189 -0
- package/dist/machine-link/index.d.ts +15 -0
- package/dist/machine-link/index.js +15 -0
- package/dist/machine-link/link.d.ts +48 -0
- package/dist/machine-link/link.js +223 -0
- package/dist/machine-link/presence.d.ts +10 -0
- package/dist/machine-link/presence.js +25 -0
- package/dist/machine-link/workers.d.ts +6 -0
- package/dist/machine-link/workers.js +6 -0
- package/dist/mcp-owner.d.ts +2 -2
- package/dist/mcp-owner.js +41 -33
- package/dist/mcp.d.ts +15 -3
- package/dist/mcp.js +146 -25
- package/dist/pack.d.ts +14 -3
- package/dist/pack.js +44 -19
- package/dist/page/app-access.d.ts +7 -0
- package/dist/page/app-access.js +75 -0
- package/dist/page/boot-host.js +57 -0
- package/dist/page/capabilities.d.ts +3 -3
- package/dist/page/capabilities.js +16 -12
- package/dist/page/computer-handles.d.ts +3 -3
- package/dist/page/computer-target.d.ts +3 -0
- package/dist/page/computer-target.js +9 -0
- package/dist/page/mount.d.ts +23 -7
- package/dist/page/mount.js +152 -16
- package/dist/page-assets.d.ts +22 -0
- package/dist/page-assets.js +28 -0
- package/dist/page-script.d.ts +3 -0
- package/dist/page-script.js +5 -4
- package/dist/release.d.ts +13 -6
- package/dist/release.js +10 -7
- package/dist/root-data.d.ts +16 -6
- package/dist/root-data.js +2 -2
- package/dist/source/index.d.ts +1 -1
- package/dist/source/team-source.d.ts +20 -8
- package/dist/source/team-source.js +39 -10
- package/dist/source/template-seed.d.ts +2 -2
- package/dist/standalone/agent-mail.d.ts +24 -0
- package/dist/standalone/agent-mail.js +62 -0
- package/dist/standalone/agent-store.d.ts +9 -0
- package/dist/standalone/agent-store.js +30 -0
- package/dist/standalone/agents.d.ts +78 -12
- package/dist/standalone/agents.js +470 -59
- package/dist/standalone/app-builds-binding.d.ts +20 -2
- package/dist/standalone/app-builds-binding.js +151 -27
- package/dist/standalone/app-set.d.ts +5 -2
- package/dist/standalone/app-set.js +174 -143
- package/dist/standalone/browser.d.ts +11 -0
- package/dist/standalone/browser.js +72 -0
- package/dist/standalone/builds.d.ts +13 -4
- package/dist/standalone/builds.js +28 -44
- package/dist/standalone/computer-egress.d.ts +2 -0
- package/dist/standalone/computer-egress.js +13 -4
- package/dist/standalone/computer-fleet.d.ts +43 -0
- package/dist/standalone/computer-fleet.js +200 -0
- package/dist/standalone/computer.d.ts +44 -9
- package/dist/standalone/computer.js +132 -25
- package/dist/standalone/install-apps-cli.js +43 -6
- package/dist/standalone/instance.d.ts +2 -2
- package/dist/standalone/instance.js +8 -11
- package/dist/standalone/machine-link.d.ts +354 -0
- package/dist/standalone/machine-link.js +368 -0
- package/dist/standalone/media.d.ts +2 -2
- package/dist/standalone/media.js +19 -16
- package/dist/standalone/preview.d.ts +2 -2
- package/dist/standalone/preview.js +39 -12
- package/dist/standalone/registry.d.ts +149 -9
- package/dist/standalone/registry.js +299 -8
- package/dist/standalone/worker.d.ts +19 -5
- package/dist/standalone/worker.js +90 -54
- package/dist/standalone/workflow-binding.d.ts +28 -32
- package/dist/standalone/workflow-binding.js +20 -20
- package/dist/standalone/workflow-control.d.ts +4 -0
- package/dist/standalone/workflow-control.js +40 -0
- package/dist/standalone/workflow-events.d.ts +2 -2
- package/dist/standalone/workflow-events.js +9 -10
- package/dist/standalone/workflow-git-capture.js +4 -3
- package/dist/standalone/workflow-host.d.ts +177 -152
- package/dist/standalone/workflow-host.js +137 -30
- package/dist/standalone/workflow-node-capture.js +11 -4
- package/dist/standalone/workflow-schedules.d.ts +5 -2
- package/dist/standalone/workflow-schedules.js +9 -10
- package/dist/standalone/workflow-trigger-host.d.ts +88 -6
- package/dist/standalone/workflow-trigger-host.js +2 -2
- package/dist/standalone/workflow-webhooks.d.ts +22 -0
- package/dist/standalone/workflow-webhooks.js +39 -0
- package/dist/standalone/workflows.d.ts +203 -50
- package/dist/standalone/workflows.js +198 -39
- package/dist/storage-frame.d.ts +6 -6
- package/dist/testing/capabilities.js +14 -3
- package/dist/testing/installation.js +26 -2
- package/dist/testing/worker.js +1 -1
- package/dist/testing/workers-runtime.d.ts +8 -2
- package/dist/testing/workers-runtime.js +20 -2
- package/dist/webhook-abuse.d.ts +25 -0
- package/dist/webhook-abuse.js +54 -0
- package/dist/webhook-custody.d.ts +144 -0
- package/dist/webhook-custody.js +222 -0
- package/dist/webhook-ingress.d.ts +36 -0
- package/dist/webhook-ingress.js +146 -0
- package/dist/webhooks.d.ts +111 -0
- package/dist/webhooks.js +189 -0
- package/dist/workers-git.d.ts +12 -17
- package/dist/workers-git.js +60 -55
- package/dist/workers.d.ts +224 -13
- package/dist/workers.js +351 -51
- package/dist/workflow-agent-authority.d.ts +8 -0
- package/dist/workflow-agent-authority.js +42 -0
- package/dist/workflows.d.ts +66 -0
- package/dist/workflows.js +97 -0
- package/docs/api/README.md +63 -37
- package/docs/api/agents.md +17 -0
- package/docs/api/app-storage.md +1 -1
- package/docs/api/apps.md +1394 -543
- package/docs/api/browser/boot.md +132 -0
- package/docs/api/browser.md +1440 -0
- package/docs/api/build-contract.md +38 -25
- package/docs/api/build.md +263 -84
- package/docs/api/cloudflare.md +93 -7
- package/docs/api/git.md +3 -13
- package/docs/api/host.md +944 -118
- package/docs/api/index.md +320 -18
- package/docs/api/keys.md +24 -1
- package/docs/api/mcp.md +59 -12
- package/docs/api/modules.md +33 -40
- package/docs/api/pack.md +57 -8
- package/docs/api/page/mount.md +92 -4
- package/docs/api/workers-git.md +103 -24
- package/docs/api/workers.md +1581 -244
- package/docs/site/agent-quickstart.mdx +28 -14
- package/examples/standalone/worker.ts +3 -1
- package/examples/standalone/wrangler.jsonc +2 -0
- package/package.json +73 -69
- package/dist/installation-consent.d.ts +0 -79
- package/dist/installation-consent.js +0 -82
- package/dist/shell/app-directory.d.ts +0 -542
- package/dist/shell/app-directory.js +0 -199
- package/dist/shell/browser-actions.d.ts +0 -7
- package/dist/shell/browser-actions.js +0 -56
- package/dist/shell/command-host.d.ts +0 -112
- package/dist/shell/command-host.js +0 -502
- package/dist/shell/commands.d.ts +0 -25
- package/dist/shell/commands.js +0 -78
- package/dist/shell/index.d.ts +0 -8
- package/dist/shell/index.js +0 -8
- package/dist/shell/keys.d.ts +0 -41
- package/dist/shell/keys.js +0 -134
- package/dist/shell/shell-module.d.ts +0 -55
- package/dist/shell/shell-module.js +0 -86
- package/dist/shell/window-manager.d.ts +0 -124
- package/dist/shell/window-manager.js +0 -711
- package/dist/shell/workbench-contract.d.ts +0 -68
- package/dist/shell/workbench-directory.d.ts +0 -332
- package/dist/shell/workbench-directory.js +0 -35
- package/dist/shell/workbench-host-types.d.ts +0 -96
- package/dist/shell/workbench-host-types.js +0 -1
- package/dist/shell/workbench-host.d.ts +0 -34
- package/dist/shell/workbench-host.js +0 -347
- package/dist/shell/workbench-model.d.ts +0 -192
- package/dist/shell/workbench-model.js +0 -53
- package/dist/shell/workbench.d.ts +0 -4
- package/dist/shell/workbench.js +0 -2
- package/docs/api/shell/app-directory.md +0 -599
- package/docs/api/shell/command-host.md +0 -224
- package/docs/api/shell/commands.md +0 -197
- package/docs/api/shell/keys.md +0 -183
- package/docs/api/shell/shell-module.md +0 -204
- package/docs/api/shell/window-manager.md +0 -267
- package/docs/api/shell/workbench-directory.md +0 -119
- package/docs/api/shell/workbench.md +0 -205
- package/docs/api/shell.md +0 -1915
- /package/dist/{shell/workbench-contract.js → page/boot-host.d.ts} +0 -0
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import * as Schema from "effect/Schema";
|
|
3
|
+
import { hostActorSchema } from "@fungi.computer/puffball/app-method-runtime";
|
|
4
|
+
import { ApprovalLedger, } from "@fungi.computer/approvals";
|
|
5
|
+
import { invokeModuleOperation } from "@fungi.computer/mycelium/remote";
|
|
6
|
+
import { oysterPrincipalIsOwner } from "./host.js";
|
|
7
|
+
import { sha256 } from "./release.js";
|
|
8
|
+
import { keyAppAccess } from "./keys.js";
|
|
9
|
+
const identity = z.string().min(1).max(256);
|
|
10
|
+
const targetSchema = z.strictObject({
|
|
11
|
+
actor: hostActorSchema,
|
|
12
|
+
installationId: identity,
|
|
13
|
+
sessionId: identity.nullable(),
|
|
14
|
+
});
|
|
15
|
+
const callSchema = targetSchema.extend({
|
|
16
|
+
operation: identity,
|
|
17
|
+
access: z.enum(["write", "external"]),
|
|
18
|
+
authorityFence: identity,
|
|
19
|
+
idempotencyKey: identity,
|
|
20
|
+
input: z.json(),
|
|
21
|
+
});
|
|
22
|
+
const decodeJson = Schema.decodeUnknownSync(Schema.fromJsonString(Schema.Json));
|
|
23
|
+
const intentRow = Schema.decodeUnknownSync(Schema.Struct({ target_json: Schema.String }));
|
|
24
|
+
/** The registry's durable App effect home. Mycelium still owns operation/schema invocation. */
|
|
25
|
+
export class OysterApprovalHome {
|
|
26
|
+
host;
|
|
27
|
+
ledger;
|
|
28
|
+
constructor(host) {
|
|
29
|
+
this.host = host;
|
|
30
|
+
host.owner.sql.exec("CREATE TABLE IF NOT EXISTS oyster_approval_targets (record_id TEXT PRIMARY KEY, target_json TEXT NOT NULL) STRICT");
|
|
31
|
+
this.ledger = this.createLedger();
|
|
32
|
+
// A new native home represents boot, not a live per-call ledger facade.
|
|
33
|
+
this.ledger.recoverClaims();
|
|
34
|
+
}
|
|
35
|
+
createLedger(persistIntent) {
|
|
36
|
+
const home = { kind: "oyster", id: this.host.scope.tenantId };
|
|
37
|
+
const host = { owner: this.host.owner, home, now: Date.now };
|
|
38
|
+
if (persistIntent === undefined)
|
|
39
|
+
return new ApprovalLedger(host);
|
|
40
|
+
return new ApprovalLedger({ ...host, persistIntent });
|
|
41
|
+
}
|
|
42
|
+
async submit(raw) {
|
|
43
|
+
// Maintained decoder snapshots the host's serialized call before any await.
|
|
44
|
+
const call = callSchema.parse(raw);
|
|
45
|
+
const actor = call.actor;
|
|
46
|
+
const target = targetSchema.parse({
|
|
47
|
+
actor: call.actor,
|
|
48
|
+
installationId: call.installationId,
|
|
49
|
+
sessionId: call.sessionId,
|
|
50
|
+
});
|
|
51
|
+
const principalId = await sha256(new TextEncoder().encode(JSON.stringify(target.actor)));
|
|
52
|
+
const ledger = this.createLedger((record) => {
|
|
53
|
+
this.host.owner.sql.exec("INSERT INTO oyster_approval_targets VALUES (?, ?)", record.recordId, JSON.stringify(target));
|
|
54
|
+
});
|
|
55
|
+
const staged = await this.host.commit(() => ledger.request({
|
|
56
|
+
requester: {
|
|
57
|
+
principalId,
|
|
58
|
+
agentId: actor.kind === "agent" ? actor.agentId : null,
|
|
59
|
+
sessionId: target.sessionId,
|
|
60
|
+
displayName: actor.kind === "member"
|
|
61
|
+
? actor.memberId
|
|
62
|
+
: actor.kind === "agent"
|
|
63
|
+
? actor.agentId
|
|
64
|
+
: actor.keyId,
|
|
65
|
+
},
|
|
66
|
+
module: "oyster-app:" + target.installationId,
|
|
67
|
+
operation: call.operation,
|
|
68
|
+
access: call.access,
|
|
69
|
+
reversibility: call.access === "external" ? "irreversible-external" : "reversible",
|
|
70
|
+
authorityFence: call.authorityFence,
|
|
71
|
+
idempotencyKey: call.idempotencyKey,
|
|
72
|
+
inputJson: JSON.stringify(call.input),
|
|
73
|
+
}), () => ledger.nextWakeAt());
|
|
74
|
+
if (staged.kind === "refused")
|
|
75
|
+
return staged;
|
|
76
|
+
// Only this call's own policy approval applies inline; a retry reports
|
|
77
|
+
// status and leaves every other approved record to the home's work loop.
|
|
78
|
+
if (!staged.created || staged.record.state !== "approved")
|
|
79
|
+
return ledger.outcome(staged.record);
|
|
80
|
+
// The native commit is complete before any external effect can run.
|
|
81
|
+
return ledger.applyInline(staged.record.recordId, this.execution());
|
|
82
|
+
}
|
|
83
|
+
/** Bind each read/decision to current membership, not the renderer's actor bytes. */
|
|
84
|
+
capability(rawActor) {
|
|
85
|
+
const actor = hostActorSchema.parse(rawActor);
|
|
86
|
+
return this.ledger.capability({
|
|
87
|
+
actor: async (record) => {
|
|
88
|
+
if (actor.kind === "agent")
|
|
89
|
+
return { kind: "agent" };
|
|
90
|
+
if (actor.kind === "team-key")
|
|
91
|
+
return { kind: "key" };
|
|
92
|
+
const host = await this.host.current();
|
|
93
|
+
const principal = await host.auth.resolve(actor);
|
|
94
|
+
if (principal === null ||
|
|
95
|
+
!("role" in principal) ||
|
|
96
|
+
principal.actor.memberId !== actor.memberId)
|
|
97
|
+
return null;
|
|
98
|
+
return {
|
|
99
|
+
kind: "human",
|
|
100
|
+
memberId: actor.memberId,
|
|
101
|
+
role: principal.role,
|
|
102
|
+
actingForAgent: false,
|
|
103
|
+
mayUseOperation: record === null ||
|
|
104
|
+
(await this.resolve(record, actor)).kind === "authorized",
|
|
105
|
+
};
|
|
106
|
+
},
|
|
107
|
+
decision: async (recordId) => {
|
|
108
|
+
await this.ledger.apply(recordId, this.execution());
|
|
109
|
+
},
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
/** One native alarm quantum; apply owns the fresh grant/fence check and single claim. */
|
|
113
|
+
async reconcile() {
|
|
114
|
+
this.ledger.expirePending();
|
|
115
|
+
for (const recordId of this.ledger.pendingApplications())
|
|
116
|
+
await this.ledger.apply(recordId, this.execution());
|
|
117
|
+
return this.ledger.nextWakeAt();
|
|
118
|
+
}
|
|
119
|
+
async resolve(record, answerer) {
|
|
120
|
+
const raw = this.host.owner.sql
|
|
121
|
+
.exec("SELECT target_json FROM oyster_approval_targets WHERE record_id = ?", record.recordId)
|
|
122
|
+
.toArray()[0];
|
|
123
|
+
if (raw === undefined)
|
|
124
|
+
throw new Error("Native approval target is missing");
|
|
125
|
+
const target = targetSchema.parse(decodeJson(intentRow(raw).target_json));
|
|
126
|
+
const actor = answerer ?? target.actor;
|
|
127
|
+
const host = await this.host.current();
|
|
128
|
+
// resolve() admits background humans only. Non-human callers retain their
|
|
129
|
+
// tag and prove their own current grant below, never a member role.
|
|
130
|
+
const principal = actor.kind === "member" ? await host.auth.resolve(actor) : { actor };
|
|
131
|
+
if (principal === null)
|
|
132
|
+
return {
|
|
133
|
+
kind: "refused",
|
|
134
|
+
reason: "not-granted",
|
|
135
|
+
};
|
|
136
|
+
const installation = await host.installations.get(target.installationId);
|
|
137
|
+
if (installation?.status !== "enabled")
|
|
138
|
+
return {
|
|
139
|
+
kind: "refused",
|
|
140
|
+
reason: "not-granted",
|
|
141
|
+
};
|
|
142
|
+
const { oysterAppSnapshot, appSurfaceCache } = await import("./mcp.js");
|
|
143
|
+
let access = null;
|
|
144
|
+
if (actor.kind === "agent") {
|
|
145
|
+
const policy = await host.appToolPolicy?.(actor);
|
|
146
|
+
if (policy === null || policy === undefined)
|
|
147
|
+
return {
|
|
148
|
+
kind: "refused",
|
|
149
|
+
reason: "not-granted",
|
|
150
|
+
};
|
|
151
|
+
access = { kind: "agent", policy };
|
|
152
|
+
}
|
|
153
|
+
else if (actor.kind === "team-key") {
|
|
154
|
+
const key = await host.keys?.live(actor.keyId);
|
|
155
|
+
if (key === null || key === undefined)
|
|
156
|
+
return {
|
|
157
|
+
kind: "refused",
|
|
158
|
+
reason: "not-granted",
|
|
159
|
+
};
|
|
160
|
+
const owner = await host.auth.resolve({
|
|
161
|
+
kind: "member",
|
|
162
|
+
memberId: key.owner,
|
|
163
|
+
});
|
|
164
|
+
if (owner?.actor.kind !== "member" ||
|
|
165
|
+
owner.actor.memberId !== key.owner ||
|
|
166
|
+
!oysterPrincipalIsOwner(owner))
|
|
167
|
+
return {
|
|
168
|
+
kind: "refused",
|
|
169
|
+
reason: "not-granted",
|
|
170
|
+
};
|
|
171
|
+
const policy = keyAppAccess(key, target.installationId);
|
|
172
|
+
if (policy === null)
|
|
173
|
+
return {
|
|
174
|
+
kind: "refused",
|
|
175
|
+
reason: "not-granted",
|
|
176
|
+
};
|
|
177
|
+
access = {
|
|
178
|
+
kind: "key",
|
|
179
|
+
keyId: actor.keyId,
|
|
180
|
+
byInstallation: new Map([[target.installationId, policy]]),
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
const snapshot = await oysterAppSnapshot(host, appSurfaceCache(host), principal, [installation], access, target.sessionId ?? undefined);
|
|
184
|
+
const module = snapshot.modules[record.module];
|
|
185
|
+
const fence = snapshot.fences[record.module];
|
|
186
|
+
const effect = snapshot.effects[record.module]?.[record.operation];
|
|
187
|
+
if (module === undefined || fence === undefined || effect === undefined)
|
|
188
|
+
return {
|
|
189
|
+
kind: "refused",
|
|
190
|
+
reason: "not-granted",
|
|
191
|
+
};
|
|
192
|
+
if (snapshot.levels[record.module] !== "write" || effect !== record.access)
|
|
193
|
+
return {
|
|
194
|
+
kind: "refused",
|
|
195
|
+
reason: "read-only",
|
|
196
|
+
};
|
|
197
|
+
return { kind: "authorized", module, fence };
|
|
198
|
+
}
|
|
199
|
+
execution() {
|
|
200
|
+
return {
|
|
201
|
+
recheck: async (record) => {
|
|
202
|
+
const current = await this.resolve(record);
|
|
203
|
+
return current.kind === "refused"
|
|
204
|
+
? current
|
|
205
|
+
: { kind: "authorized", authorityFence: current.fence };
|
|
206
|
+
},
|
|
207
|
+
dispatch: async ({ record, input }) => {
|
|
208
|
+
// Reconstruct again at dispatch; never widen a captured operation or fence.
|
|
209
|
+
const current = await this.resolve(record);
|
|
210
|
+
if (current.kind === "refused")
|
|
211
|
+
return current;
|
|
212
|
+
if (current.fence !== record.authorityFence)
|
|
213
|
+
return { kind: "refused", reason: "not-granted" };
|
|
214
|
+
const deadlineAt = Date.now() + 30_000;
|
|
215
|
+
const signal = AbortSignal.timeout(30_000);
|
|
216
|
+
const output = await invokeModuleOperation(current.module, record.operation, input, {
|
|
217
|
+
executionId: "approval:" + record.recordId,
|
|
218
|
+
toolCallId: "approval:" + record.recordId,
|
|
219
|
+
deadlineAt,
|
|
220
|
+
signal,
|
|
221
|
+
});
|
|
222
|
+
return { kind: "completed", output };
|
|
223
|
+
},
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
}
|
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
import type { SigilName } from "@fungi.computer/sigils";
|
|
2
|
+
/** Consent and resource semantics belong to the grant owner, not its UI. */
|
|
3
|
+
export type PermissionCatalogEntry = Readonly<{
|
|
4
|
+
group: "computers" | "agents" | "generation" | "bazaar" | "data" | "workflows" | "git" | "channels" | "apps" | "shell" | "other";
|
|
5
|
+
label: string;
|
|
6
|
+
caption: string;
|
|
7
|
+
description: string;
|
|
8
|
+
sigil: SigilName;
|
|
9
|
+
/** Presentation class only; invocation authority always comes from stored grants. */
|
|
10
|
+
consent: "affordance" | "install" | "ask";
|
|
11
|
+
scope: "computer" | "agent" | null;
|
|
12
|
+
warning: string | null;
|
|
13
|
+
}>;
|
|
14
|
+
/** Every capability selects one consent class and one resource grammar. */
|
|
15
|
+
export declare const permissionCatalog: {
|
|
16
|
+
approvals: Readonly<{
|
|
17
|
+
group: "computers" | "agents" | "generation" | "bazaar" | "data" | "workflows" | "git" | "channels" | "apps" | "shell" | "other";
|
|
18
|
+
label: string;
|
|
19
|
+
caption: string;
|
|
20
|
+
description: string;
|
|
21
|
+
sigil: SigilName;
|
|
22
|
+
/** Presentation class only; invocation authority always comes from stored grants. */
|
|
23
|
+
consent: "affordance" | "install" | "ask";
|
|
24
|
+
scope: "computer" | "agent" | null;
|
|
25
|
+
warning: string | null;
|
|
26
|
+
}>;
|
|
27
|
+
"agent.list": Readonly<{
|
|
28
|
+
group: "computers" | "agents" | "generation" | "bazaar" | "data" | "workflows" | "git" | "channels" | "apps" | "shell" | "other";
|
|
29
|
+
label: string;
|
|
30
|
+
caption: string;
|
|
31
|
+
description: string;
|
|
32
|
+
sigil: SigilName;
|
|
33
|
+
/** Presentation class only; invocation authority always comes from stored grants. */
|
|
34
|
+
consent: "affordance" | "install" | "ask";
|
|
35
|
+
scope: "computer" | "agent" | null;
|
|
36
|
+
warning: string | null;
|
|
37
|
+
}>;
|
|
38
|
+
"agent.manage": Readonly<{
|
|
39
|
+
group: "computers" | "agents" | "generation" | "bazaar" | "data" | "workflows" | "git" | "channels" | "apps" | "shell" | "other";
|
|
40
|
+
label: string;
|
|
41
|
+
caption: string;
|
|
42
|
+
description: string;
|
|
43
|
+
sigil: SigilName;
|
|
44
|
+
/** Presentation class only; invocation authority always comes from stored grants. */
|
|
45
|
+
consent: "affordance" | "install" | "ask";
|
|
46
|
+
scope: "computer" | "agent" | null;
|
|
47
|
+
warning: string | null;
|
|
48
|
+
}>;
|
|
49
|
+
"agent.rename": Readonly<{
|
|
50
|
+
group: "computers" | "agents" | "generation" | "bazaar" | "data" | "workflows" | "git" | "channels" | "apps" | "shell" | "other";
|
|
51
|
+
label: string;
|
|
52
|
+
caption: string;
|
|
53
|
+
description: string;
|
|
54
|
+
sigil: SigilName;
|
|
55
|
+
/** Presentation class only; invocation authority always comes from stored grants. */
|
|
56
|
+
consent: "affordance" | "install" | "ask";
|
|
57
|
+
scope: "computer" | "agent" | null;
|
|
58
|
+
warning: string | null;
|
|
59
|
+
}>;
|
|
60
|
+
"agent.avatar": Readonly<{
|
|
61
|
+
group: "computers" | "agents" | "generation" | "bazaar" | "data" | "workflows" | "git" | "channels" | "apps" | "shell" | "other";
|
|
62
|
+
label: string;
|
|
63
|
+
caption: string;
|
|
64
|
+
description: string;
|
|
65
|
+
sigil: SigilName;
|
|
66
|
+
/** Presentation class only; invocation authority always comes from stored grants. */
|
|
67
|
+
consent: "affordance" | "install" | "ask";
|
|
68
|
+
scope: "computer" | "agent" | null;
|
|
69
|
+
warning: string | null;
|
|
70
|
+
}>;
|
|
71
|
+
"agent.toolPolicy": Readonly<{
|
|
72
|
+
group: "computers" | "agents" | "generation" | "bazaar" | "data" | "workflows" | "git" | "channels" | "apps" | "shell" | "other";
|
|
73
|
+
label: string;
|
|
74
|
+
caption: string;
|
|
75
|
+
description: string;
|
|
76
|
+
sigil: SigilName;
|
|
77
|
+
/** Presentation class only; invocation authority always comes from stored grants. */
|
|
78
|
+
consent: "affordance" | "install" | "ask";
|
|
79
|
+
scope: "computer" | "agent" | null;
|
|
80
|
+
warning: string | null;
|
|
81
|
+
}>;
|
|
82
|
+
"agent.read": Readonly<{
|
|
83
|
+
group: "computers" | "agents" | "generation" | "bazaar" | "data" | "workflows" | "git" | "channels" | "apps" | "shell" | "other";
|
|
84
|
+
label: string;
|
|
85
|
+
caption: string;
|
|
86
|
+
description: string;
|
|
87
|
+
sigil: SigilName;
|
|
88
|
+
/** Presentation class only; invocation authority always comes from stored grants. */
|
|
89
|
+
consent: "affordance" | "install" | "ask";
|
|
90
|
+
scope: "computer" | "agent" | null;
|
|
91
|
+
warning: string | null;
|
|
92
|
+
}>;
|
|
93
|
+
"agent.send": Readonly<{
|
|
94
|
+
group: "computers" | "agents" | "generation" | "bazaar" | "data" | "workflows" | "git" | "channels" | "apps" | "shell" | "other";
|
|
95
|
+
label: string;
|
|
96
|
+
caption: string;
|
|
97
|
+
description: string;
|
|
98
|
+
sigil: SigilName;
|
|
99
|
+
/** Presentation class only; invocation authority always comes from stored grants. */
|
|
100
|
+
consent: "affordance" | "install" | "ask";
|
|
101
|
+
scope: "computer" | "agent" | null;
|
|
102
|
+
warning: string | null;
|
|
103
|
+
}>;
|
|
104
|
+
"computer.list": Readonly<{
|
|
105
|
+
group: "computers" | "agents" | "generation" | "bazaar" | "data" | "workflows" | "git" | "channels" | "apps" | "shell" | "other";
|
|
106
|
+
label: string;
|
|
107
|
+
caption: string;
|
|
108
|
+
description: string;
|
|
109
|
+
sigil: SigilName;
|
|
110
|
+
/** Presentation class only; invocation authority always comes from stored grants. */
|
|
111
|
+
consent: "affordance" | "install" | "ask";
|
|
112
|
+
scope: "computer" | "agent" | null;
|
|
113
|
+
warning: string | null;
|
|
114
|
+
}>;
|
|
115
|
+
"computer.readFile": Readonly<{
|
|
116
|
+
group: "computers" | "agents" | "generation" | "bazaar" | "data" | "workflows" | "git" | "channels" | "apps" | "shell" | "other";
|
|
117
|
+
label: string;
|
|
118
|
+
caption: string;
|
|
119
|
+
description: string;
|
|
120
|
+
sigil: SigilName;
|
|
121
|
+
/** Presentation class only; invocation authority always comes from stored grants. */
|
|
122
|
+
consent: "affordance" | "install" | "ask";
|
|
123
|
+
scope: "computer" | "agent" | null;
|
|
124
|
+
warning: string | null;
|
|
125
|
+
}>;
|
|
126
|
+
"computer.writeFile": Readonly<{
|
|
127
|
+
group: "computers" | "agents" | "generation" | "bazaar" | "data" | "workflows" | "git" | "channels" | "apps" | "shell" | "other";
|
|
128
|
+
label: string;
|
|
129
|
+
caption: string;
|
|
130
|
+
description: string;
|
|
131
|
+
sigil: SigilName;
|
|
132
|
+
/** Presentation class only; invocation authority always comes from stored grants. */
|
|
133
|
+
consent: "affordance" | "install" | "ask";
|
|
134
|
+
scope: "computer" | "agent" | null;
|
|
135
|
+
warning: string | null;
|
|
136
|
+
}>;
|
|
137
|
+
"computer.execute": Readonly<{
|
|
138
|
+
group: "computers" | "agents" | "generation" | "bazaar" | "data" | "workflows" | "git" | "channels" | "apps" | "shell" | "other";
|
|
139
|
+
label: string;
|
|
140
|
+
caption: string;
|
|
141
|
+
description: string;
|
|
142
|
+
sigil: SigilName;
|
|
143
|
+
/** Presentation class only; invocation authority always comes from stored grants. */
|
|
144
|
+
consent: "affordance" | "install" | "ask";
|
|
145
|
+
scope: "computer" | "agent" | null;
|
|
146
|
+
warning: string | null;
|
|
147
|
+
}>;
|
|
148
|
+
"llm.generation": Readonly<{
|
|
149
|
+
group: "computers" | "agents" | "generation" | "bazaar" | "data" | "workflows" | "git" | "channels" | "apps" | "shell" | "other";
|
|
150
|
+
label: string;
|
|
151
|
+
caption: string;
|
|
152
|
+
description: string;
|
|
153
|
+
sigil: SigilName;
|
|
154
|
+
/** Presentation class only; invocation authority always comes from stored grants. */
|
|
155
|
+
consent: "affordance" | "install" | "ask";
|
|
156
|
+
scope: "computer" | "agent" | null;
|
|
157
|
+
warning: string | null;
|
|
158
|
+
}>;
|
|
159
|
+
"media.generation": Readonly<{
|
|
160
|
+
group: "computers" | "agents" | "generation" | "bazaar" | "data" | "workflows" | "git" | "channels" | "apps" | "shell" | "other";
|
|
161
|
+
label: string;
|
|
162
|
+
caption: string;
|
|
163
|
+
description: string;
|
|
164
|
+
sigil: SigilName;
|
|
165
|
+
/** Presentation class only; invocation authority always comes from stored grants. */
|
|
166
|
+
consent: "affordance" | "install" | "ask";
|
|
167
|
+
scope: "computer" | "agent" | null;
|
|
168
|
+
warning: string | null;
|
|
169
|
+
}>;
|
|
170
|
+
"games:servers": Readonly<{
|
|
171
|
+
group: "computers" | "agents" | "generation" | "bazaar" | "data" | "workflows" | "git" | "channels" | "apps" | "shell" | "other";
|
|
172
|
+
label: string;
|
|
173
|
+
caption: string;
|
|
174
|
+
description: string;
|
|
175
|
+
sigil: SigilName;
|
|
176
|
+
/** Presentation class only; invocation authority always comes from stored grants. */
|
|
177
|
+
consent: "affordance" | "install" | "ask";
|
|
178
|
+
scope: "computer" | "agent" | null;
|
|
179
|
+
warning: string | null;
|
|
180
|
+
}>;
|
|
181
|
+
"git.repository": Readonly<{
|
|
182
|
+
group: "computers" | "agents" | "generation" | "bazaar" | "data" | "workflows" | "git" | "channels" | "apps" | "shell" | "other";
|
|
183
|
+
label: string;
|
|
184
|
+
caption: string;
|
|
185
|
+
description: string;
|
|
186
|
+
sigil: SigilName;
|
|
187
|
+
/** Presentation class only; invocation authority always comes from stored grants. */
|
|
188
|
+
consent: "affordance" | "install" | "ask";
|
|
189
|
+
scope: "computer" | "agent" | null;
|
|
190
|
+
warning: string | null;
|
|
191
|
+
}>;
|
|
192
|
+
"apps.open": Readonly<{
|
|
193
|
+
group: "computers" | "agents" | "generation" | "bazaar" | "data" | "workflows" | "git" | "channels" | "apps" | "shell" | "other";
|
|
194
|
+
label: string;
|
|
195
|
+
caption: string;
|
|
196
|
+
description: string;
|
|
197
|
+
sigil: SigilName;
|
|
198
|
+
/** Presentation class only; invocation authority always comes from stored grants. */
|
|
199
|
+
consent: "affordance" | "install" | "ask";
|
|
200
|
+
scope: "computer" | "agent" | null;
|
|
201
|
+
warning: string | null;
|
|
202
|
+
}>;
|
|
203
|
+
"apps.call": Readonly<{
|
|
204
|
+
group: "computers" | "agents" | "generation" | "bazaar" | "data" | "workflows" | "git" | "channels" | "apps" | "shell" | "other";
|
|
205
|
+
label: string;
|
|
206
|
+
caption: string;
|
|
207
|
+
description: string;
|
|
208
|
+
sigil: SigilName;
|
|
209
|
+
/** Presentation class only; invocation authority always comes from stored grants. */
|
|
210
|
+
consent: "affordance" | "install" | "ask";
|
|
211
|
+
scope: "computer" | "agent" | null;
|
|
212
|
+
warning: string | null;
|
|
213
|
+
}>;
|
|
214
|
+
"app.storage": Readonly<{
|
|
215
|
+
group: "computers" | "agents" | "generation" | "bazaar" | "data" | "workflows" | "git" | "channels" | "apps" | "shell" | "other";
|
|
216
|
+
label: string;
|
|
217
|
+
caption: string;
|
|
218
|
+
description: string;
|
|
219
|
+
sigil: SigilName;
|
|
220
|
+
/** Presentation class only; invocation authority always comes from stored grants. */
|
|
221
|
+
consent: "affordance" | "install" | "ask";
|
|
222
|
+
scope: "computer" | "agent" | null;
|
|
223
|
+
warning: string | null;
|
|
224
|
+
}>;
|
|
225
|
+
"app.events.emit": Readonly<{
|
|
226
|
+
group: "computers" | "agents" | "generation" | "bazaar" | "data" | "workflows" | "git" | "channels" | "apps" | "shell" | "other";
|
|
227
|
+
label: string;
|
|
228
|
+
caption: string;
|
|
229
|
+
description: string;
|
|
230
|
+
sigil: SigilName;
|
|
231
|
+
/** Presentation class only; invocation authority always comes from stored grants. */
|
|
232
|
+
consent: "affordance" | "install" | "ask";
|
|
233
|
+
scope: "computer" | "agent" | null;
|
|
234
|
+
warning: string | null;
|
|
235
|
+
}>;
|
|
236
|
+
"team.workbenchHost": Readonly<{
|
|
237
|
+
group: "computers" | "agents" | "generation" | "bazaar" | "data" | "workflows" | "git" | "channels" | "apps" | "shell" | "other";
|
|
238
|
+
label: string;
|
|
239
|
+
caption: string;
|
|
240
|
+
description: string;
|
|
241
|
+
sigil: SigilName;
|
|
242
|
+
/** Presentation class only; invocation authority always comes from stored grants. */
|
|
243
|
+
consent: "affordance" | "install" | "ask";
|
|
244
|
+
scope: "computer" | "agent" | null;
|
|
245
|
+
warning: string | null;
|
|
246
|
+
}>;
|
|
247
|
+
"marketplace.browse": Readonly<{
|
|
248
|
+
group: "computers" | "agents" | "generation" | "bazaar" | "data" | "workflows" | "git" | "channels" | "apps" | "shell" | "other";
|
|
249
|
+
label: string;
|
|
250
|
+
caption: string;
|
|
251
|
+
description: string;
|
|
252
|
+
sigil: SigilName;
|
|
253
|
+
/** Presentation class only; invocation authority always comes from stored grants. */
|
|
254
|
+
consent: "affordance" | "install" | "ask";
|
|
255
|
+
scope: "computer" | "agent" | null;
|
|
256
|
+
warning: string | null;
|
|
257
|
+
}>;
|
|
258
|
+
"marketplace.purchase": Readonly<{
|
|
259
|
+
group: "computers" | "agents" | "generation" | "bazaar" | "data" | "workflows" | "git" | "channels" | "apps" | "shell" | "other";
|
|
260
|
+
label: string;
|
|
261
|
+
caption: string;
|
|
262
|
+
description: string;
|
|
263
|
+
sigil: SigilName;
|
|
264
|
+
/** Presentation class only; invocation authority always comes from stored grants. */
|
|
265
|
+
consent: "affordance" | "install" | "ask";
|
|
266
|
+
scope: "computer" | "agent" | null;
|
|
267
|
+
warning: string | null;
|
|
268
|
+
}>;
|
|
269
|
+
"workflow.run": Readonly<{
|
|
270
|
+
group: "computers" | "agents" | "generation" | "bazaar" | "data" | "workflows" | "git" | "channels" | "apps" | "shell" | "other";
|
|
271
|
+
label: string;
|
|
272
|
+
caption: string;
|
|
273
|
+
description: string;
|
|
274
|
+
sigil: SigilName;
|
|
275
|
+
/** Presentation class only; invocation authority always comes from stored grants. */
|
|
276
|
+
consent: "affordance" | "install" | "ask";
|
|
277
|
+
scope: "computer" | "agent" | null;
|
|
278
|
+
warning: string | null;
|
|
279
|
+
}>;
|
|
280
|
+
"workflow.publish": Readonly<{
|
|
281
|
+
group: "computers" | "agents" | "generation" | "bazaar" | "data" | "workflows" | "git" | "channels" | "apps" | "shell" | "other";
|
|
282
|
+
label: string;
|
|
283
|
+
caption: string;
|
|
284
|
+
description: string;
|
|
285
|
+
sigil: SigilName;
|
|
286
|
+
/** Presentation class only; invocation authority always comes from stored grants. */
|
|
287
|
+
consent: "affordance" | "install" | "ask";
|
|
288
|
+
scope: "computer" | "agent" | null;
|
|
289
|
+
warning: string | null;
|
|
290
|
+
}>;
|
|
291
|
+
"workflow.arm": Readonly<{
|
|
292
|
+
group: "computers" | "agents" | "generation" | "bazaar" | "data" | "workflows" | "git" | "channels" | "apps" | "shell" | "other";
|
|
293
|
+
label: string;
|
|
294
|
+
caption: string;
|
|
295
|
+
description: string;
|
|
296
|
+
sigil: SigilName;
|
|
297
|
+
/** Presentation class only; invocation authority always comes from stored grants. */
|
|
298
|
+
consent: "affordance" | "install" | "ask";
|
|
299
|
+
scope: "computer" | "agent" | null;
|
|
300
|
+
warning: string | null;
|
|
301
|
+
}>;
|
|
302
|
+
world: Readonly<{
|
|
303
|
+
group: "computers" | "agents" | "generation" | "bazaar" | "data" | "workflows" | "git" | "channels" | "apps" | "shell" | "other";
|
|
304
|
+
label: string;
|
|
305
|
+
caption: string;
|
|
306
|
+
description: string;
|
|
307
|
+
sigil: SigilName;
|
|
308
|
+
/** Presentation class only; invocation authority always comes from stored grants. */
|
|
309
|
+
consent: "affordance" | "install" | "ask";
|
|
310
|
+
scope: "computer" | "agent" | null;
|
|
311
|
+
warning: string | null;
|
|
312
|
+
}>;
|
|
313
|
+
"channels.read": Readonly<{
|
|
314
|
+
group: "computers" | "agents" | "generation" | "bazaar" | "data" | "workflows" | "git" | "channels" | "apps" | "shell" | "other";
|
|
315
|
+
label: string;
|
|
316
|
+
caption: string;
|
|
317
|
+
description: string;
|
|
318
|
+
sigil: SigilName;
|
|
319
|
+
/** Presentation class only; invocation authority always comes from stored grants. */
|
|
320
|
+
consent: "affordance" | "install" | "ask";
|
|
321
|
+
scope: "computer" | "agent" | null;
|
|
322
|
+
warning: string | null;
|
|
323
|
+
}>;
|
|
324
|
+
"channels.personal.manage": Readonly<{
|
|
325
|
+
group: "computers" | "agents" | "generation" | "bazaar" | "data" | "workflows" | "git" | "channels" | "apps" | "shell" | "other";
|
|
326
|
+
label: string;
|
|
327
|
+
caption: string;
|
|
328
|
+
description: string;
|
|
329
|
+
sigil: SigilName;
|
|
330
|
+
/** Presentation class only; invocation authority always comes from stored grants. */
|
|
331
|
+
consent: "affordance" | "install" | "ask";
|
|
332
|
+
scope: "computer" | "agent" | null;
|
|
333
|
+
warning: string | null;
|
|
334
|
+
}>;
|
|
335
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
function entry(group, label, description, sigil, consent, scope = null, warning = null) {
|
|
2
|
+
return {
|
|
3
|
+
group,
|
|
4
|
+
label,
|
|
5
|
+
caption: label,
|
|
6
|
+
description,
|
|
7
|
+
sigil,
|
|
8
|
+
consent,
|
|
9
|
+
scope,
|
|
10
|
+
warning,
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
/** Every capability selects one consent class and one resource grammar. */
|
|
14
|
+
export const permissionCatalog = {
|
|
15
|
+
approvals: entry("apps", "Review approvals",
|
|
16
|
+
// Interim plain consent; the product decision on approvals stays with Levi.
|
|
17
|
+
"This App can approve or deny your Agents' pending actions as you, and turn on automatic approval.", "list", "ask"),
|
|
18
|
+
"agent.list": entry("agents", "List Agents", "see which Agents are available.", "listAgents", "install"),
|
|
19
|
+
"agent.manage": entry("agents", "Create and manage Agents", "create Agents and manage their sessions.", "createAgents", "install", "agent"),
|
|
20
|
+
"agent.rename": entry("agents", "Rename Agents", "rename Agents you created.", "createAgents", "install"),
|
|
21
|
+
"agent.avatar": entry("agents", "Change Agent avatars", "change the avatars of Agents you created.", "createAgents", "install"),
|
|
22
|
+
"agent.toolPolicy": entry("agents", "Allow Agents to use Apps", "approve Agents to use your installed Apps.", "createAgents", "install"),
|
|
23
|
+
"agent.read": entry("agents", "Read Agent conversations", "read Agent conversations.", "readConversations", "install", "agent"),
|
|
24
|
+
"agent.send": entry("agents", "Send messages to Agents", "send messages to Agents.", "sendPrompts", "install", "agent"),
|
|
25
|
+
"computer.list": entry("computers", "List Computers", "see which Computers are available.", "list", "install", "computer"),
|
|
26
|
+
"computer.readFile": entry("computers", "Read files", "read files on your Computers.", "read", "install", "computer"),
|
|
27
|
+
"computer.writeFile": entry("computers", "Change files", "create and change files on your Computers.", "write", "install", "computer"),
|
|
28
|
+
"computer.execute": entry("computers", "Run commands", "run commands on your Computers.", "run", "install", "computer"),
|
|
29
|
+
"llm.generation": entry("generation", "Generate text", "ask AI models to generate text.", "generateText", "install"),
|
|
30
|
+
"media.generation": entry("generation", "Generate images and videos", "ask AI models to generate images and videos.", "generateMedia", "install"),
|
|
31
|
+
"games:servers": entry("other", "Use game servers", "connect to game servers.", "list", "install"),
|
|
32
|
+
"git.repository": entry("git", "Use Git repositories", "work with Git repositories.", "read", "ask"),
|
|
33
|
+
"apps.open": entry("apps", "Open Apps", "open other Apps.", "list", "affordance"),
|
|
34
|
+
"apps.call": entry("apps", "Call declared App methods", "call the listed methods in other Apps as you. Renamed target methods need approval again.", "run", "install"),
|
|
35
|
+
"app.storage": entry("data", "Store App data", "save its App data.", "write", "install"),
|
|
36
|
+
"app.events.emit": entry("workflows", "Send events", "tell your Workflows when something happens.", "sendPrompts", "ask"),
|
|
37
|
+
"team.workbenchHost": entry("shell", "Arrange the workbench", "arrange Apps on your workbench.", "list", "ask", null, "The shell runs with full access to your Team and every App inside it. Only pick a shell you trust."),
|
|
38
|
+
"marketplace.browse": entry("bazaar", "Browse the marketplace", "browse Apps in the marketplace.", "browseBazaar", "install"),
|
|
39
|
+
"marketplace.purchase": entry("bazaar", "Purchase from the marketplace", "purchase Apps from the marketplace.", "buyApps", "install"),
|
|
40
|
+
"workflow.run": entry("workflows", "Run Workflows", "start Workflows.", "run", "install"),
|
|
41
|
+
"workflow.publish": entry("workflows", "Publish Workflows", "publish Workflow definitions.", "write", "ask"),
|
|
42
|
+
"workflow.arm": entry("workflows", "Arm Workflow triggers", "enable Workflow triggers.", "run", "ask"),
|
|
43
|
+
world: entry("other", "Connect to external services", "connect to external services.", "list", "install"),
|
|
44
|
+
"channels.read": entry("channels", "Read channels", "read messages from channels.", "read", "ask"),
|
|
45
|
+
"channels.personal.manage": entry("channels", "Manage personal channels", "manage personal channels.", "write", "ask"),
|
|
46
|
+
};
|