@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.
@@ -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";
@@ -86,3 +86,4 @@ export function createAgentComputerSurface() {
86
86
  }),
87
87
  });
88
88
  }
89
+ export { computerSkillsEmpty, createComputerSkillSource, } 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
- grants = approves(context.principal.role)
182
- ? context.declaration.capabilities
183
- .filter((capability) => permissionCatalog[capability].consent === "install" ||
184
- (capability === "team.workbenchHost" &&
185
- context.builtInShell === true))
186
- .map((capability) => ({
187
- capability,
188
- capabilityApproved: true,
189
- operations: declared(capability),
190
- fingerprints: fingerprintsOf(context.declaredOperations, capability, declared(capability)),
191
- resources: "tenant-scope",
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" || command.kind === "change-grants") {
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,