@fungi.computer/oyster 0.34.0 → 0.35.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/host.d.ts CHANGED
@@ -212,6 +212,8 @@ export type OysterHost = Readonly<{
212
212
  bootUi: (release: Release) => Promise<UiBootCheckOutcome>;
213
213
  /** Fixed Computer selected by the host; request input never selects it. */
214
214
  computerId?: string;
215
+ /** The selected Computer's name from its owner; never derived from its ID. */
216
+ computerName?: string | null;
215
217
  /** The fixed Computer's advertised calls for one admitted caller, or null
216
218
  * when the caller holds no Computer access (for a key, without its own
217
219
  * `computer.use` grant). The Computer owner accepts each call against the
package/dist/host.js CHANGED
@@ -1191,6 +1191,7 @@ export function oysterRouteTable(host) {
1191
1191
  const uiPath = `/ui/${installation.installationId}/${installation.release.releaseId}/`;
1192
1192
  // Immutable App documents also carry the host's sandbox policy.
1193
1193
  const uiUrl = `${uiPath}?${new URLSearchParams({ sandbox: appSandbox }).toString()}`;
1194
+ const computerId = invocationCallerContext(principal, host.computerId ?? null).computerId;
1194
1195
  const config = {
1195
1196
  workbench,
1196
1197
  // The home shell's own code: the module its Release ships beside
@@ -1204,8 +1205,8 @@ export function oysterRouteTable(host) {
1204
1205
  host.workbench !== undefined &&
1205
1206
  (declaration?.storage?.length ?? 0) > 0,
1206
1207
  appsOpen: declaration?.capabilities.includes("apps.open") === true,
1207
- computerId: invocationCallerContext(principal, host.computerId ?? null)
1208
- .computerId,
1208
+ computerId,
1209
+ computerName: computerId === null ? null : (host.computerName ?? null),
1209
1210
  authorityVersion: installation.authority.authorityVersion,
1210
1211
  capabilities,
1211
1212
  commands: declaration?.commands ?? [],
@@ -338,6 +338,7 @@ async function openOysterApp(options, appWindow, opening, navigate) {
338
338
  version: 1,
339
339
  value: {
340
340
  computerId: config.computerId,
341
+ computerName: config.computerName,
341
342
  focus: { editing: false, surface: null },
342
343
  openRequest: options.openRequest ?? null,
343
344
  visibility: "visible",
@@ -8,6 +8,7 @@ export declare const oysterAppConfigSchema: Schema.Struct<{
8
8
  /** The Release declares `apps.open`; only an embedding shell can serve it. */
9
9
  readonly appsOpen: Schema.Boolean;
10
10
  readonly computerId: Schema.NullOr<Schema.String>;
11
+ readonly computerName: Schema.optional<Schema.NullOr<Schema.String>>;
11
12
  readonly authorityVersion: Schema.Int;
12
13
  readonly commands: Schema.$Array<Schema.Codec<Readonly<{
13
14
  id: string;
@@ -10,6 +10,7 @@ export const oysterAppConfigSchema = Schema.Struct({
10
10
  /** The Release declares `apps.open`; only an embedding shell can serve it. */
11
11
  appsOpen: Schema.Boolean,
12
12
  computerId: Schema.NullOr(Schema.String),
13
+ computerName: Schema.optional(Schema.NullOr(Schema.String)),
13
14
  authorityVersion: Schema.Int,
14
15
  commands: Schema.Array(appDeclaredCommandSchema),
15
16
  icon: Schema.NullOr(Schema.String),