@fungi.computer/nacre 0.1.1 → 0.1.3
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/app-directory.d.ts +3 -5
- package/dist/app-directory.js +2 -4
- package/dist/shell-module.d.ts +14 -0
- package/dist/shell-module.js +17 -3
- package/docs/api/app-directory.md +1 -3
- package/package.json +3 -3
package/dist/app-directory.d.ts
CHANGED
|
@@ -105,7 +105,7 @@ export declare const appDirectoryEntrySchema: z.ZodObject<{
|
|
|
105
105
|
agent?: (Readonly<{
|
|
106
106
|
order?: number | undefined;
|
|
107
107
|
}> & Readonly<{
|
|
108
|
-
keybind
|
|
108
|
+
keybind?: string | undefined;
|
|
109
109
|
}>) | undefined;
|
|
110
110
|
help?: Readonly<{
|
|
111
111
|
order?: number | undefined;
|
|
@@ -220,11 +220,10 @@ export declare const appGenerationPermissionsSchema: z.ZodObject<{
|
|
|
220
220
|
}, z.core.$strict>;
|
|
221
221
|
/** Decoded generation permissions attached to an App directory entry. */
|
|
222
222
|
export type AppGenerationPermissions = z.output<typeof appGenerationPermissionsSchema>;
|
|
223
|
-
/** Whether an App may browse
|
|
223
|
+
/** Whether an App may browse or request marketplace acquisitions. */
|
|
224
224
|
export declare const appMarketplacePermissionsSchema: z.ZodObject<{
|
|
225
225
|
browse: z.ZodBoolean;
|
|
226
226
|
purchase: z.ZodBoolean;
|
|
227
|
-
installFree: z.ZodBoolean;
|
|
228
227
|
}, z.core.$strict>;
|
|
229
228
|
/** Decoded marketplace permissions attached to an App directory entry. */
|
|
230
229
|
export type AppMarketplacePermissions = z.output<typeof appMarketplacePermissionsSchema>;
|
|
@@ -298,7 +297,7 @@ export declare const appDirectoryResponseSchema: z.ZodLazy<z.ZodObject<{
|
|
|
298
297
|
agent?: (Readonly<{
|
|
299
298
|
order?: number | undefined;
|
|
300
299
|
}> & Readonly<{
|
|
301
|
-
keybind
|
|
300
|
+
keybind?: string | undefined;
|
|
302
301
|
}>) | undefined;
|
|
303
302
|
help?: Readonly<{
|
|
304
303
|
order?: number | undefined;
|
|
@@ -371,7 +370,6 @@ export declare const appDirectoryResponseSchema: z.ZodLazy<z.ZodObject<{
|
|
|
371
370
|
marketplacePermissions: z.ZodObject<{
|
|
372
371
|
browse: z.ZodBoolean;
|
|
373
372
|
purchase: z.ZodBoolean;
|
|
374
|
-
installFree: z.ZodBoolean;
|
|
375
373
|
}, z.core.$strict>;
|
|
376
374
|
agentPermission: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
377
375
|
kind: z.ZodLiteral<"all-team-agents">;
|
package/dist/app-directory.js
CHANGED
|
@@ -184,14 +184,12 @@ export const appGenerationPermissionsSchema = z.strictObject({
|
|
|
184
184
|
/** Whether the App may use media generation. */
|
|
185
185
|
media: z.boolean(),
|
|
186
186
|
});
|
|
187
|
-
/** Whether an App may browse
|
|
187
|
+
/** Whether an App may browse or request marketplace acquisitions. */
|
|
188
188
|
export const appMarketplacePermissionsSchema = z.strictObject({
|
|
189
189
|
/** Whether the App may browse marketplace entries. */
|
|
190
190
|
browse: z.boolean(),
|
|
191
|
-
/** Whether the App may
|
|
191
|
+
/** Whether the App may request an acquisition, confirmed by the owner. */
|
|
192
192
|
purchase: z.boolean(),
|
|
193
|
-
/** Whether the App may install free marketplace entries. */
|
|
194
|
-
installFree: z.boolean(),
|
|
195
193
|
});
|
|
196
194
|
/**
|
|
197
195
|
* A host's Team App directory with its permission projection, parsed strictly
|
package/dist/shell-module.d.ts
CHANGED
|
@@ -90,6 +90,20 @@ export declare class ShellModuleError extends Error {
|
|
|
90
90
|
/** Always ShellModuleError. */
|
|
91
91
|
readonly name = "ShellModuleError";
|
|
92
92
|
}
|
|
93
|
+
/**
|
|
94
|
+
* The picked shell's module could not be fetched or evaluated. A browser keeps
|
|
95
|
+
* a failed module fetch for the life of the document, so only loading the
|
|
96
|
+
* page again can recover it.
|
|
97
|
+
*/
|
|
98
|
+
export declare class ShellModuleUnavailable extends Error {
|
|
99
|
+
/** The module URL that could not load. */
|
|
100
|
+
readonly moduleUrl: string;
|
|
101
|
+
/** Always ShellModuleUnavailable. */
|
|
102
|
+
readonly name = "ShellModuleUnavailable";
|
|
103
|
+
constructor(
|
|
104
|
+
/** The module URL that could not load. */
|
|
105
|
+
moduleUrl: string, options: ErrorOptions);
|
|
106
|
+
}
|
|
93
107
|
/**
|
|
94
108
|
* Import the picked shell Release's module from the host's own origin and
|
|
95
109
|
* check that it exports `mountShell`, and `mountPlatformControls` when it
|
package/dist/shell-module.js
CHANGED
|
@@ -61,6 +61,22 @@ export class ShellModuleError extends Error {
|
|
|
61
61
|
/** Always ShellModuleError. */
|
|
62
62
|
name = "ShellModuleError";
|
|
63
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* The picked shell's module could not be fetched or evaluated. A browser keeps
|
|
66
|
+
* a failed module fetch for the life of the document, so only loading the
|
|
67
|
+
* page again can recover it.
|
|
68
|
+
*/
|
|
69
|
+
export class ShellModuleUnavailable extends Error {
|
|
70
|
+
moduleUrl;
|
|
71
|
+
/** Always ShellModuleUnavailable. */
|
|
72
|
+
name = "ShellModuleUnavailable";
|
|
73
|
+
constructor(
|
|
74
|
+
/** The module URL that could not load. */
|
|
75
|
+
moduleUrl, options) {
|
|
76
|
+
super("The picked shell could not be loaded", options);
|
|
77
|
+
this.moduleUrl = moduleUrl;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
64
80
|
/**
|
|
65
81
|
* Import the picked shell Release's module from the host's own origin and
|
|
66
82
|
* check that it exports `mountShell`, and `mountPlatformControls` when it
|
|
@@ -74,9 +90,7 @@ export async function importShellModule(moduleUrl, hostOrigin) {
|
|
|
74
90
|
namespace = await import(/* @vite-ignore */ moduleUrl.href);
|
|
75
91
|
}
|
|
76
92
|
catch (cause) {
|
|
77
|
-
throw new
|
|
78
|
-
cause,
|
|
79
|
-
});
|
|
93
|
+
throw new ShellModuleUnavailable(moduleUrl.href, { cause });
|
|
80
94
|
}
|
|
81
95
|
const decoded = shellModuleSchema().safeParse(namespace);
|
|
82
96
|
if (!decoded.success)
|
|
@@ -378,13 +378,12 @@ const appMarketplacePermissionsSchema: ZodObject<
|
|
|
378
378
|
{
|
|
379
379
|
browse: ZodBoolean;
|
|
380
380
|
purchase: ZodBoolean;
|
|
381
|
-
installFree: ZodBoolean;
|
|
382
381
|
},
|
|
383
382
|
$strict
|
|
384
383
|
>;
|
|
385
384
|
```
|
|
386
385
|
|
|
387
|
-
Whether an App may browse
|
|
386
|
+
Whether an App may browse or request marketplace acquisitions.
|
|
388
387
|
|
|
389
388
|
---
|
|
390
389
|
|
|
@@ -458,7 +457,6 @@ const appDirectoryResponseSchema: ZodLazy<ZodObject<{
|
|
|
458
457
|
marketplacePermissions: ZodObject<{
|
|
459
458
|
browse: ZodBoolean;
|
|
460
459
|
purchase: ZodBoolean;
|
|
461
|
-
installFree: ZodBoolean;
|
|
462
460
|
}, $strict>;
|
|
463
461
|
agentPermission: ZodDiscriminatedUnion<[ZodObject<{
|
|
464
462
|
kind: ZodLiteral<...>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fungi.computer/nacre",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"author": "Levi <levi@technomancy.dev>",
|
|
5
5
|
"description": "The shell client for hosting Apps: workbench, command host, keys, commands, window manager and App directory rows",
|
|
6
6
|
"type": "module",
|
|
@@ -52,10 +52,10 @@
|
|
|
52
52
|
"LICENSE"
|
|
53
53
|
],
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@fungi.computer/agar": "0.
|
|
55
|
+
"@fungi.computer/agar": "0.7.0",
|
|
56
56
|
"@fungi.computer/ear-tag": "0.1.0",
|
|
57
57
|
"@fungi.computer/gills": "0.2.0",
|
|
58
|
-
"@fungi.computer/puffball": "0.
|
|
58
|
+
"@fungi.computer/puffball": "0.5.0",
|
|
59
59
|
"@fungi.computer/whistle": "0.3.0",
|
|
60
60
|
"effect": "4.0.2",
|
|
61
61
|
"zod": "4.4.3"
|