@fungi.computer/oyster 0.31.1 → 0.32.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/dist/agent-computer-source.d.ts +1 -0
- package/dist/agent-computer-source.js +1 -0
- package/dist/apps/installation.js +19 -14
- package/dist/embed-metafiles.js +1 -1
- package/dist/embed-scripts.js +2 -2
- package/dist/page/mount.js +20 -1
- package/dist/page-script.js +1 -1
- package/dist/platform-skills.generated.d.ts +11 -0
- package/dist/platform-skills.generated.js +16 -0
- package/dist/standalone/agents.js +1 -0
- package/dist/standalone/computer-skill-source.d.ts +13 -2
- package/dist/standalone/computer-skill-source.js +80 -6
- package/dist/standalone/workflow-host.d.ts +4 -4
- package/dist/standalone/workflows.d.ts +9 -9
- package/dist/storage-frame.d.ts +3 -3
- package/dist/workers.d.ts +1 -1
- package/docs/api/apps.md +33 -33
- package/package.json +3 -3
|
@@ -40,3 +40,4 @@ export declare function readAgentComputerConnections(options: Pick<AgentComputer
|
|
|
40
40
|
export declare function createAgentComputerSource(options: AgentComputerSourceOptions): CapabilitySource;
|
|
41
41
|
/** Advertise only the denied shape; no attachment lookup or Computer wake. */
|
|
42
42
|
export declare function createAgentComputerSurface(): CapabilitySource;
|
|
43
|
+
export { computerSkillsEmpty, createComputerSkillSource, type PlatformSkillName, type SkillComputer, } from "./standalone/computer-skill-source.js";
|
|
@@ -178,19 +178,22 @@ export function applyGrantCommand(current, rawCommand, context) {
|
|
|
178
178
|
let approval = current?.approval ?? null;
|
|
179
179
|
switch (command.kind) {
|
|
180
180
|
case "install":
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
capability
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
:
|
|
181
|
+
// An approver's install approves the install-class set. A member's
|
|
182
|
+
// install approves only the App's own storage, which touches nothing
|
|
183
|
+
// beyond the App's own data; every other capability waits for an approver.
|
|
184
|
+
grants = context.declaration.capabilities
|
|
185
|
+
.filter((capability) => capability === "app.storage" ||
|
|
186
|
+
(approves(context.principal.role) &&
|
|
187
|
+
(permissionCatalog[capability].consent === "install" ||
|
|
188
|
+
(capability === "team.workbenchHost" &&
|
|
189
|
+
context.builtInShell === true))))
|
|
190
|
+
.map((capability) => ({
|
|
191
|
+
capability,
|
|
192
|
+
capabilityApproved: true,
|
|
193
|
+
operations: declared(capability),
|
|
194
|
+
fingerprints: fingerprintsOf(context.declaredOperations, capability, declared(capability)),
|
|
195
|
+
resources: "tenant-scope",
|
|
196
|
+
}));
|
|
194
197
|
break;
|
|
195
198
|
case "change-grants": {
|
|
196
199
|
for (const { capability, grant } of command.changes) {
|
|
@@ -234,7 +237,9 @@ export function applyGrantCommand(current, rawCommand, context) {
|
|
|
234
237
|
}
|
|
235
238
|
if (grants.length === 0)
|
|
236
239
|
approval = null;
|
|
237
|
-
else if (command.kind === "install"
|
|
240
|
+
else if ((command.kind === "install" && approves(context.principal.role)) ||
|
|
241
|
+
command.kind === "change-grants") {
|
|
242
|
+
// A member's install records no approval: nobody approved its storage.
|
|
238
243
|
approval = {
|
|
239
244
|
by: context.principal.actor,
|
|
240
245
|
at: context.now,
|