@fungi.computer/oyster 0.1.0 → 0.2.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-avatars.d.ts +103 -0
- package/dist/agent-avatars.js +66 -0
- package/dist/agents.d.ts +12 -2
- package/dist/agents.js +39 -2
- package/dist/apps/gate.d.ts +7 -7
- package/dist/apps/gate.js +6 -6
- package/dist/apps/installation.d.ts +35 -35
- package/dist/apps/installation.js +20 -19
- package/dist/build/candidate-cli.mjs +55 -5
- package/dist/build-egress.js +4 -4
- package/dist/cloudflare.js +4 -4
- package/dist/frame-binding-wire-script.js +1 -1
- package/dist/frame-binding-wire.d.ts +1 -1
- package/dist/frame-binding-wire.js +1 -1
- package/dist/git-journal.js +4 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/installation-consent.d.ts +3 -1
- package/dist/installation-consent.js +2 -0
- package/dist/page/mount.d.ts +4 -8
- package/dist/page-script.js +4 -4
- package/dist/shell/app-directory.d.ts +37 -37
- package/dist/shell/app-directory.js +15 -18
- package/dist/shell/window-manager.d.ts +5 -1
- package/dist/shell/window-manager.js +21 -2
- package/dist/shell/workbench-directory.d.ts +9 -9
- package/dist/shell/workbench-host-types.d.ts +1 -1
- package/dist/shell/workbench-host.js +5 -0
- package/dist/shell/workbench-model.d.ts +3 -1
- package/dist/standalone/agents.d.ts +11 -4
- package/dist/standalone/agents.js +44 -5
- package/dist/standalone/app-builds-binding.js +6 -6
- package/dist/standalone/computer.js +3 -3
- package/dist/standalone/preview.js +2 -2
- package/dist/standalone/worker.js +2 -2
- package/dist/standalone/workflow-binding.d.ts +10 -10
- package/dist/standalone/workflow-binding.js +2 -2
- package/dist/standalone/workflow-host.d.ts +37 -13
- package/dist/standalone/workflow-host.js +36 -9
- package/dist/standalone/workflow-trigger-host.d.ts +24 -2
- package/dist/standalone/workflows.d.ts +67 -11
- package/dist/workers-git.js +1 -4
- package/package.json +19 -17
|
@@ -20,20 +20,18 @@ export function ownerCodec(schema) {
|
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
/** Installation names cannot contain the tenant separator. */
|
|
23
|
-
export const installationIdSchema = z
|
|
24
|
-
.string()
|
|
25
|
-
.regex(/^[a-z](?:[a-z0-9]|-(?!-)){0,62}$/u);
|
|
23
|
+
export const installationIdSchema = z.lazy(() => z.string().regex(/^[a-z](?:[a-z0-9]|-(?!-)){0,62}$/u));
|
|
26
24
|
/** A resource identity minted and resolved by the host, never by this module. */
|
|
27
|
-
const resourceRefSchema = z
|
|
25
|
+
const resourceRefSchema = z.lazy(() => z
|
|
28
26
|
.strictObject({
|
|
29
27
|
kind: z.string().min(1),
|
|
30
28
|
id: z.string().min(1),
|
|
31
29
|
})
|
|
32
|
-
.readonly();
|
|
33
|
-
const operationsSchema = z
|
|
30
|
+
.readonly());
|
|
31
|
+
const operationsSchema = z.lazy(() => z
|
|
34
32
|
.array(z.string().min(1))
|
|
35
33
|
.refine((values) => new Set(values).size === values.length, "Operations must be unique")
|
|
36
|
-
.readonly();
|
|
34
|
+
.readonly());
|
|
37
35
|
/**
|
|
38
36
|
* Consent approves capabilities, with explicit operation and resource ceilings.
|
|
39
37
|
* A Release adding a method that requires an already-approved capability needs
|
|
@@ -58,10 +56,10 @@ export const approvedGrantSchema = z
|
|
|
58
56
|
})
|
|
59
57
|
.readonly();
|
|
60
58
|
/** One grant per capability keeps operation/resource pairs unambiguous. */
|
|
61
|
-
const approvedGrantsSchema = z
|
|
59
|
+
const approvedGrantsSchema = z.lazy(() => z
|
|
62
60
|
.array(approvedGrantSchema)
|
|
63
61
|
.refine((grants) => new Set(grants.map((grant) => grant.capability)).size === grants.length, "Capabilities must be unique")
|
|
64
|
-
.readonly();
|
|
62
|
+
.readonly());
|
|
65
63
|
/** Shorthand is accepted only on a command and expanded at approval time. */
|
|
66
64
|
const grantRequestSchema = z.union([
|
|
67
65
|
z.literal("none"),
|
|
@@ -74,15 +72,15 @@ const grantRequestSchema = z.union([
|
|
|
74
72
|
.refine((grants) => new Set(grants.map((grant) => grant.capability)).size === grants.length, "Capabilities must be unique")
|
|
75
73
|
.readonly(),
|
|
76
74
|
]);
|
|
77
|
-
const versionSchema = z.number().int().positive();
|
|
75
|
+
const versionSchema = z.lazy(() => z.number().int().positive());
|
|
78
76
|
/** An owner's approval of a fixed operation snapshot. */
|
|
79
|
-
const approvalSchema = z
|
|
77
|
+
const approvalSchema = z.lazy(() => z
|
|
80
78
|
.strictObject({
|
|
81
79
|
by: hostActorSchema,
|
|
82
80
|
at: z.number().int().nonnegative(),
|
|
83
81
|
authorityVersion: versionSchema,
|
|
84
82
|
})
|
|
85
|
-
.readonly();
|
|
83
|
+
.readonly());
|
|
86
84
|
const anonymousMethodsSchema = z
|
|
87
85
|
.array(z
|
|
88
86
|
.strictObject({
|
|
@@ -96,7 +94,7 @@ const anonymousMethodsSchema = z
|
|
|
96
94
|
}), "Anonymous method identities must have unique, sorted names")
|
|
97
95
|
.readonly();
|
|
98
96
|
/** Immutable operation facts derived from descriptor methods and the binding registry. */
|
|
99
|
-
export const declaredOperationsSchema = z.strictObject({
|
|
97
|
+
export const declaredOperationsSchema = z.lazy(() => z.strictObject({
|
|
100
98
|
artifactDigest: ownerCodec(sha256DigestSchema),
|
|
101
99
|
digest: ownerCodec(sha256DigestSchema),
|
|
102
100
|
anonymousMethods: anonymousMethodsSchema,
|
|
@@ -108,7 +106,7 @@ export const declaredOperationsSchema = z.strictObject({
|
|
|
108
106
|
})
|
|
109
107
|
.readonly())
|
|
110
108
|
.readonly(),
|
|
111
|
-
});
|
|
109
|
+
}));
|
|
112
110
|
/** Resolved immutable Release plus host-owned installation and approval state. */
|
|
113
111
|
export const installationSchema = z
|
|
114
112
|
.strictObject({
|
|
@@ -141,7 +139,7 @@ const releaseFields = {
|
|
|
141
139
|
releasePin: installationSchema.shape.releasePin,
|
|
142
140
|
};
|
|
143
141
|
/** Host commands; floating targets have already been resolved to immutable Releases. */
|
|
144
|
-
export const installationCommandSchema = z.discriminatedUnion("kind", [
|
|
142
|
+
export const installationCommandSchema = z.lazy(() => z.discriminatedUnion("kind", [
|
|
145
143
|
z.strictObject({
|
|
146
144
|
kind: z.literal("install"),
|
|
147
145
|
...releaseFields,
|
|
@@ -156,14 +154,17 @@ export const installationCommandSchema = z.discriminatedUnion("kind", [
|
|
|
156
154
|
kind: z.literal("set-visibility"),
|
|
157
155
|
visibility: installationSchema.shape.visibility,
|
|
158
156
|
}),
|
|
159
|
-
z.strictObject({
|
|
157
|
+
z.strictObject({
|
|
158
|
+
kind: z.literal("set-grants"),
|
|
159
|
+
grants: grantRequestSchema,
|
|
160
|
+
}),
|
|
160
161
|
z.strictObject({
|
|
161
162
|
kind: z.literal("approve-anonymous"),
|
|
162
163
|
methods: anonymousMethodsSchema,
|
|
163
164
|
}),
|
|
164
|
-
]);
|
|
165
|
+
]));
|
|
165
166
|
/** Closed refusals: failed commands produce no installation update. */
|
|
166
|
-
export const installationRefusalSchema = z.strictObject({
|
|
167
|
+
export const installationRefusalSchema = z.lazy(() => z.strictObject({
|
|
167
168
|
kind: z.literal("refused"),
|
|
168
169
|
code: z.enum([
|
|
169
170
|
"unavailable",
|
|
@@ -173,7 +174,7 @@ export const installationRefusalSchema = z.strictObject({
|
|
|
173
174
|
"release_app_mismatch",
|
|
174
175
|
"invalid_command",
|
|
175
176
|
]),
|
|
176
|
-
});
|
|
177
|
+
}));
|
|
177
178
|
/** Pure transition; hosts retain transactions, receipts, epochs and delivery. */
|
|
178
179
|
export function applyInstallationCommand(current, rawCommand, context) {
|
|
179
180
|
const refuse = (code) => Result.fail({ kind: "refused", code });
|
|
@@ -19232,6 +19232,17 @@ function nullable(innerType) {
|
|
|
19232
19232
|
innerType
|
|
19233
19233
|
});
|
|
19234
19234
|
}
|
|
19235
|
+
var ZodMiniLazy = /* @__PURE__ */ $constructor("ZodMiniLazy", (inst, def) => {
|
|
19236
|
+
$ZodLazy.init(inst, def);
|
|
19237
|
+
ZodMiniType.init(inst, def);
|
|
19238
|
+
});
|
|
19239
|
+
// @__NO_SIDE_EFFECTS__
|
|
19240
|
+
function _lazy(getter) {
|
|
19241
|
+
return new ZodMiniLazy({
|
|
19242
|
+
type: "lazy",
|
|
19243
|
+
getter
|
|
19244
|
+
});
|
|
19245
|
+
}
|
|
19235
19246
|
var ZodMiniCustom = /* @__PURE__ */ $constructor("ZodMiniCustom", (inst, def) => {
|
|
19236
19247
|
$ZodCustom.init(inst, def);
|
|
19237
19248
|
ZodMiniType.init(inst, def);
|
|
@@ -19292,10 +19303,10 @@ var workflowAttestationSchema = object({
|
|
|
19292
19303
|
/** Actor that armed the run, re-admitted by the host at dispatch. */
|
|
19293
19304
|
armedBy: hostActorSchema
|
|
19294
19305
|
});
|
|
19295
|
-
var backgroundOrigin = strictObject({
|
|
19306
|
+
var backgroundOrigin = _lazy(() => strictObject({
|
|
19296
19307
|
method: string4().check(refine2((name) => isAppApiMethodName(name))),
|
|
19297
19308
|
seal: string4().check(_regex(/^[A-Za-z0-9_-]{43}$/u))
|
|
19298
|
-
});
|
|
19309
|
+
}));
|
|
19299
19310
|
var appMethodCallerSchema = object({
|
|
19300
19311
|
computerId: nullable(identity2),
|
|
19301
19312
|
actor: hostActorSchema,
|
|
@@ -19626,6 +19637,7 @@ var appCapabilityIds = [
|
|
|
19626
19637
|
"agent.list",
|
|
19627
19638
|
"agent.manage",
|
|
19628
19639
|
"agent.rename",
|
|
19640
|
+
"agent.avatar",
|
|
19629
19641
|
"agent.toolPolicy",
|
|
19630
19642
|
"agent.read",
|
|
19631
19643
|
"agent.send",
|
|
@@ -19679,6 +19691,9 @@ var method = Struct({
|
|
|
19679
19691
|
pending: optional2(Literal2(true)),
|
|
19680
19692
|
hidden: optional2(Literal2(true)),
|
|
19681
19693
|
anonymous: optional2(Literal2(true)),
|
|
19694
|
+
present: optional2(Struct({
|
|
19695
|
+
verb: String4.check(isMinLength(1), isMaxLength(32))
|
|
19696
|
+
})),
|
|
19682
19697
|
effect: Literals(["read", "write", "external"]),
|
|
19683
19698
|
requires: ArraySchema(Literals(appCapabilityIds)).pipe(check(makeFilter2((values) => new Set(values).size === values.length)))
|
|
19684
19699
|
}).check(makeFilter2((value) => value.anonymous !== true || value.effect === "read" && value.requires.length === 0, {
|
|
@@ -19774,6 +19789,14 @@ var rowSchemaV1 = Struct({
|
|
|
19774
19789
|
open: optional2(rowOpenSchemaV1)
|
|
19775
19790
|
});
|
|
19776
19791
|
var rowPageSchemaV1 = ArraySchema(rowSchemaV1).pipe(check(isMaxLength(200)));
|
|
19792
|
+
var resultRowSchemaV1 = Struct({
|
|
19793
|
+
...rowSchemaV1.fields,
|
|
19794
|
+
/** A Computer file the receiving host may preview; the host authorizes the read. */
|
|
19795
|
+
media: optional2(Struct({
|
|
19796
|
+
path: rowLabelSchemaV1,
|
|
19797
|
+
format: Literals(["fungi:image", "fungi:video"])
|
|
19798
|
+
}))
|
|
19799
|
+
});
|
|
19777
19800
|
|
|
19778
19801
|
// ../gills/dist/declaration.js
|
|
19779
19802
|
var isUnique = (values) => new Set(values).size === values.length;
|
|
@@ -22020,6 +22043,9 @@ function Pencil() {
|
|
|
22020
22043
|
function InkTrail() {
|
|
22021
22044
|
return (0, import_jsx_runtime.jsx)("path", { style: { fill: art.coral }, d: "M40.804 40.625C38.238 41.462 37.291 41.953 31.169 45.625 15.743 54.871 8.047 56.158 5.879 49.856 5.501 48.754 5.501 48.754 4.843 50.913 1.673 61.302 12.377 61.671 30.386 51.796 39.649 46.719 41.142 46.647 40.81 51.291 40.565 54.775 41.168 56.135 43.486 57.31 49.556 60.387 62.035 54.816 59.605 50.116 58.502 47.983 56.1 47.882 52.163 49.799 47.082 52.273 45.983 51.652 47.998 47.449 50.89 41.416 47.686 38.376 40.804 40.625Z" });
|
|
22022
22045
|
}
|
|
22046
|
+
function Leaf({ transform: transform4 }) {
|
|
22047
|
+
return (0, import_jsx_runtime.jsx)("path", { style: { fill: art.mint }, transform: transform4, d: "M0 0C3 -2 5 -5 5 -8 5 -10.5 3 -12 0 -12S-5 -10.5 -5 -8C-5 -5 -3 -2 0 0Z" });
|
|
22048
|
+
}
|
|
22023
22049
|
|
|
22024
22050
|
// ../sigils/dist/generation-art.js
|
|
22025
22051
|
function GenerateTextArtwork() {
|
|
@@ -22044,8 +22070,8 @@ function InkcapArtwork() {
|
|
|
22044
22070
|
// ../sigils/dist/sigil.js
|
|
22045
22071
|
var { coral, blue, mint, grape, yellow, cream, ink } = art;
|
|
22046
22072
|
var symbols = {
|
|
22047
|
-
//
|
|
22048
|
-
bonsai: (0, import_jsx_runtime4.jsxs)(
|
|
22073
|
+
// Bonsai: a potted tree whose branches end in commits.
|
|
22074
|
+
bonsai: (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [(0, import_jsx_runtime4.jsx)("path", { fill: "none", stroke: mint, strokeWidth: "3.7", strokeLinecap: "round", d: "M35 27.5C36 25 35.5 22.5 34 21S31.5 17.5 31.5 14M36 27C40 26.8 43 26 45 24S47 20.5 47.5 18.5M30.5 31C32.5 26.5 30.5 24.6 26.5 24 22 23.5 18.5 21.6 16.8 18.5M29 37C26.5 34.5 25 33.7 21.5 33.2S15.5 32 13 31.6M36 39.5C38 38 40 37.5 42 36.5S47 34 51 32.2" }), (0, import_jsx_runtime4.jsx)("path", { fill: mint, d: "M25.5 43.5C28 40.5 28 37 27.5 33 27.3 29.5 29.5 27 33.5 26.3L37.5 26V29.5C35 29.8 34.2 31.5 34.3 34 34.5 37.5 37 39.5 41 43.5Z" }), (0, import_jsx_runtime4.jsx)("circle", { fill: blue, cx: "31.5", cy: "10.7", r: "4.8" }), (0, import_jsx_runtime4.jsx)("circle", { fill: grape, cx: "16.6", cy: "18.3", r: "4.6" }), (0, import_jsx_runtime4.jsx)("circle", { fill: yellow, cx: "47.9", cy: "17.7", r: "4.6" }), (0, import_jsx_runtime4.jsx)("circle", { fill: yellow, cx: "12.8", cy: "31.5", r: "4.6" }), (0, import_jsx_runtime4.jsx)("circle", { fill: blue, cx: "50.9", cy: "32.1", r: "4.6" }), (0, import_jsx_runtime4.jsx)("path", { fill: coral, d: "M16 46H47.5C47.5 54 44 58 38 58H25.5C19.5 58 16 54 16 46Z" }), (0, import_jsx_runtime4.jsx)("rect", { fill: coral, x: "14", y: "43", width: "35.5", height: "4.6", rx: "2.3" })] }),
|
|
22049
22075
|
computer: (0, import_jsx_runtime4.jsx)(ComputerArtwork, {}),
|
|
22050
22076
|
prints: (0, import_jsx_runtime4.jsx)(PrintsArtwork, {}),
|
|
22051
22077
|
inkcap: (0, import_jsx_runtime4.jsx)(InkcapArtwork, {}),
|
|
@@ -22070,7 +22096,31 @@ var symbols = {
|
|
|
22070
22096
|
// An App tile dropping into place: another App installed into the Team.
|
|
22071
22097
|
installApps: (0, import_jsx_runtime4.jsxs)("g", { transform: "rotate(-6 32 32)", children: [(0, import_jsx_runtime4.jsx)("rect", { style: { fill: blue }, x: "9", y: "26", width: "46", height: "32", rx: "10" }), (0, import_jsx_runtime4.jsx)("rect", { style: { fill: cream }, x: "17", y: "33", width: "30", height: "18", rx: "5" }), (0, import_jsx_runtime4.jsx)("path", { style: { fill: mint }, d: "M22 38h8v8h-8z" }), (0, import_jsx_runtime4.jsx)("path", { style: { fill: grape }, d: "M34 38h8v8h-8z" }), (0, import_jsx_runtime4.jsx)("path", { style: { stroke: coral }, strokeWidth: "6", strokeLinecap: "round", strokeLinejoin: "round", d: "M32 4v17m-8-7 8 8 8-8" })] }),
|
|
22072
22098
|
restricted: (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [(0, import_jsx_runtime4.jsx)("path", { fill: "none", style: { stroke: coral }, strokeWidth: "9", strokeLinecap: "round", d: "M16 23V19q0-17 16-17t16 17v4" }), (0, import_jsx_runtime4.jsx)("rect", { style: { fill: coral }, x: "8", y: "26", width: "48", height: "36", rx: "9" }), (0, import_jsx_runtime4.jsx)("path", { style: { fill: cream }, d: "M32 34a7 7 0 0 0-4 13v7h8v-7a7 7 0 0 0-4-13Z" })] }),
|
|
22073
|
-
error: (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [(0, import_jsx_runtime4.jsx)("path", { style: { fill: coral }, d: "M32 6q5-8 10 0 9-3 10 6 9 2 5 11 8 6 0 12 3 9-6 11-1 9-10 6-6 8-12 0-9 3-11-6-9-2-6-11-8-6 0-12-3-9 6-11 1-9 10-6Z" }), (0, import_jsx_runtime4.jsx)("path", { fill: "none", style: { stroke: cream }, strokeWidth: "7", strokeLinecap: "round", d: "M32 18v15" }), (0, import_jsx_runtime4.jsx)("circle", { style: { fill: cream }, cx: "32", cy: "45", r: "4" })] })
|
|
22099
|
+
error: (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [(0, import_jsx_runtime4.jsx)("path", { style: { fill: coral }, d: "M32 6q5-8 10 0 9-3 10 6 9 2 5 11 8 6 0 12 3 9-6 11-1 9-10 6-6 8-12 0-9 3-11-6-9-2-6-11-8-6 0-12-3-9 6-11 1-9 10-6Z" }), (0, import_jsx_runtime4.jsx)("path", { fill: "none", style: { stroke: cream }, strokeWidth: "7", strokeLinecap: "round", d: "M32 18v15" }), (0, import_jsx_runtime4.jsx)("circle", { style: { fill: cream }, cx: "32", cy: "45", r: "4" })] }),
|
|
22100
|
+
// Trellis: workflow steps growing up a trellis.
|
|
22101
|
+
trellis: (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [(0, import_jsx_runtime4.jsxs)("g", { fill: yellow, children: [(0, import_jsx_runtime4.jsx)("rect", { x: "17.25", y: "9", width: "3.9", height: "49.2", rx: "1.95" }), (0, import_jsx_runtime4.jsx)("rect", { x: "42.95", y: "9", width: "3.9", height: "49.2", rx: "1.95" }), (0, import_jsx_runtime4.jsx)("rect", { x: "30.4", y: "18", width: "3.2", height: "26" }), (0, import_jsx_runtime4.jsx)("rect", { x: "14.8", y: "15.75", width: "34.4", height: "3.1", rx: "1.55" }), (0, import_jsx_runtime4.jsx)("rect", { x: "14.8", y: "28.85", width: "34.4", height: "3.1", rx: "1.55" }), (0, import_jsx_runtime4.jsx)("rect", { x: "14.8", y: "42.55", width: "34.4", height: "3.1", rx: "1.55" })] }), (0, import_jsx_runtime4.jsx)("path", { fill: "none", stroke: mint, strokeWidth: "3", strokeLinecap: "round", d: "M21.9 56.1C31.5 54.4 32.9 47 32.1 45.8" }), (0, import_jsx_runtime4.jsx)("path", { fill: "none", stroke: mint, strokeWidth: "3", strokeLinecap: "round", d: "M32 44.2C28.7 41.8 25.2 35.7 32 32.3 38.8 28 38.9 24 31.9 18.8 32.4 16.3 32.8 14.7 34.5 12.2" }), (0, import_jsx_runtime4.jsx)(Leaf, { transform: "translate(32.1 14.1) rotate(45) scale(0.45 0.86)" }), (0, import_jsx_runtime4.jsx)(Leaf, { transform: "translate(32.2 14.7) rotate(-60) scale(0.42 0.58)" }), (0, import_jsx_runtime4.jsx)(Leaf, { transform: "translate(34.8 28.3) rotate(65) scale(0.38 0.8)" }), (0, import_jsx_runtime4.jsx)(Leaf, { transform: "translate(28.2 33.1) rotate(-51) scale(0.5 0.57)" }), (0, import_jsx_runtime4.jsx)(Leaf, { transform: "translate(28.6 53.3) rotate(-48) scale(0.47 0.6)" }), (0, import_jsx_runtime4.jsx)("circle", { fill: coral, cx: "31.9", cy: "18.8", r: "4" }), (0, import_jsx_runtime4.jsx)("circle", { fill: blue, cx: "32", cy: "32.3", r: "4" }), (0, import_jsx_runtime4.jsx)("circle", { fill: grape, cx: "32", cy: "44.2", r: "4" })] }),
|
|
22102
|
+
// Games: an arcade stick for the Team's game servers.
|
|
22103
|
+
games: (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [(0, import_jsx_runtime4.jsx)("path", { fill: blue, d: "M18.5 28.5H45.5C49.5 29.5 53 32 54 35 55 37.5 56.8 45.5 56.6 48 56.5 53 52.5 57.5 47 58H15C9.5 56.5 6.6 51 7.6 45.5 8.6 39.5 9.3 35 10.5 33 12 31 14.5 29.5 18.5 28.5Z" }), (0, import_jsx_runtime4.jsx)("ellipse", { fill: cream, cx: "26.8", cy: "37.9", rx: "9.1", ry: "5.6" }), (0, import_jsx_runtime4.jsx)("ellipse", { fill: ink, cx: "27", cy: "37.6", rx: "4.7", ry: "2.2" }), (0, import_jsx_runtime4.jsx)("path", { fill: ink, d: "M23.1 26V35.4A4 4.2 0 0 0 31.1 35.4V26Z" }), (0, import_jsx_runtime4.jsx)("circle", { fill: coral, cx: "27.1", cy: "18.3", r: "12.4" }), (0, import_jsx_runtime4.jsx)("circle", { fill: cream, cx: "22.6", cy: "14.3", r: "3.05" }), (0, import_jsx_runtime4.jsx)("ellipse", { fill: yellow, cx: "45.1", cy: "37.2", rx: "5.6", ry: "3.95" }), (0, import_jsx_runtime4.jsx)("ellipse", { fill: cream, cx: "40.1", cy: "46.6", rx: "6.2", ry: "4.4" })] }),
|
|
22104
|
+
// Oyster: the open shell that holds the Apps' pearl.
|
|
22105
|
+
oyster: (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [(0, import_jsx_runtime4.jsx)("path", { fill: grape, d: "M35.5 6C33.7 6.3 32.3 7.6 31.4 9.4 30.9 10.3 30.4 10.3 29.5 10 25.5 9 20.6 11.6 19.6 15.9 19.4 16.6 19 17 18 17.1 14.5 17.6 12 20.6 12.1 24.2 12.2 25.4 12 25.9 11.5 26.5 7.5 30 10.5 34.5 17.5 34.4 15.3 32.6 16 31 19 29 26 24 37 19.5 43.5 19 46 19 46 22 43 25.5 46.5 23.5 51.5 18.5 53.5 15 55 11 50 7 45 9 43.8 9.4 43.3 9.2 42.5 8 40.7 6.3 38 5.6 35.5 6Z" }), (0, import_jsx_runtime4.jsx)("circle", { fill: cream, cx: "34.9", cy: "41.9", r: "11.3" }), (0, import_jsx_runtime4.jsxs)("g", { fill: ink, children: [(0, import_jsx_runtime4.jsx)("rect", { x: "29.9", y: "33.2", width: "3.2", height: "5.6", rx: "1.6" }), (0, import_jsx_runtime4.jsx)("rect", { x: "36.7", y: "33.2", width: "3.2", height: "5.6", rx: "1.6" })] }), (0, import_jsx_runtime4.jsx)("path", { fill: grape, d: "M49.5 39C47.9 39.3 46.5 40 46.1 41.6 45.8 43.2 45.5 43.5 44 43.5 38.5 43.5 35 48 39 49.5 40 50 39.5 50.5 38 51 35.5 52.5 32.5 52 30 51 29 50.5 28.5 50 29.5 50 33 47.5 30 43.5 24.5 43.5 23.3 43.5 22.9 43.3 22.5 43 20.5 40.5 19 40 17.5 39.5 13 39.5 13 44 17 47.5 18.3 48.4 18.6 48.7 19 49.5 20.5 53 23 55 26 55 26.8 55 27 55.3 27.5 56 31 58.5 36.5 58.5 40 56 40.8 55.2 41.2 55 42 55 45 55 47.5 53 49 49.5 49.6 48.5 50 48 50.5 47.5 56 43.5 55 38.5 49.5 39Z" }), (0, import_jsx_runtime4.jsx)("path", { fill: "none", stroke: yellow, strokeWidth: "3", strokeLinecap: "round", d: "M46.6 31.8 49.2 27.8 M49.4 35.5 52.8 33.7 M21.5 32.5 22.9 33.5 M19.3 37.5 21.1 38.1" })] }),
|
|
22106
|
+
// Tourtois: the desktop shell, a tortoise carrying window panes.
|
|
22107
|
+
tourtois: (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [(0, import_jsx_runtime4.jsx)("rect", { fill: cream, x: "11.07", y: "35.73", width: "26.8", height: "9.7", rx: "3.25", transform: "rotate(-5 24.47 40.58)" }), (0, import_jsx_runtime4.jsx)("path", { fill: yellow, d: "M14.8 16C19 14.6 23 13.5 26.5 12.6 28.4 12.1 29.6 13.4 30.1 15.3L31.6 21 17.4 37.6C13.8 38.2 10.6 37.8 10.1 35.4L9.2 27.8C9.1 26.1 10.1 24.7 11.6 24.1 11.4 22.4 11.4 20.6 11.8 19.1 12.3 17.4 13.3 16.5 14.8 16Z" }), (0, import_jsx_runtime4.jsx)("path", { fill: coral, d: "M14.0 24.1Q13.3 21.2 16.2 20.4L30.7 16.2Q33.6 15.4 34.6 18.2L36.0 22.7Q37.0 25.5 34.7 27.4L20.2 39.7Q17.9 41.6 17.2 38.7Z" }), (0, import_jsx_runtime4.jsx)("path", { fill: blue, d: "M21 23.4 35.5 20.6C37.3 20.2 38.6 21 38.9 22.6L40 34.5C40.1 36.2 39.1 37.3 37.5 37.7 32.6 39.9 26 41 21 41 16 41 12.2 40.2 11 38.8 10.4 37.6 10.8 36.4 12.4 37L19.6 38.4 18.4 27C18.2 25.2 19.3 23.7 21 23.4Z" }), (0, import_jsx_runtime4.jsx)("path", { fill: cream, d: "M22.8 29.6 34.8 26.9C36.2 26.6 37 27.3 37.2 28.6L37.9 33C38.1 34.2 37.5 35 36.3 35.3L24.3 37.8C23 38.1 22.3 37.5 22.1 36.3L21.3 31.6C21.1 30.6 21.7 29.8 22.8 29.6Z" }), (0, import_jsx_runtime4.jsxs)("g", { fill: cream, children: [(0, import_jsx_runtime4.jsx)("circle", { cx: "14.7", cy: "18.45", r: "1" }), (0, import_jsx_runtime4.jsx)("circle", { cx: "17.6", cy: "17.65", r: "1" }), (0, import_jsx_runtime4.jsx)("circle", { cx: "20.5", cy: "16.85", r: "1" }), (0, import_jsx_runtime4.jsx)("circle", { cx: "17.9", cy: "22.2", r: "1" }), (0, import_jsx_runtime4.jsx)("circle", { cx: "21", cy: "21.5", r: "1" }), (0, import_jsx_runtime4.jsx)("circle", { cx: "24.1", cy: "20.75", r: "1" }), (0, import_jsx_runtime4.jsx)("circle", { cx: "28.2", cy: "25.3", r: "1" })] }), (0, import_jsx_runtime4.jsx)("circle", { fill: coral, cx: "21.7", cy: "26.6", r: "1" }), (0, import_jsx_runtime4.jsx)("circle", { fill: yellow, cx: "24.9", cy: "25.9", r: "1.05" }), (0, import_jsx_runtime4.jsxs)("g", { fill: mint, children: [(0, import_jsx_runtime4.jsx)("ellipse", { cx: "8.8", cy: "36.6", rx: "3.6", ry: "1.9", transform: "rotate(22 8.8 36.6)" }), (0, import_jsx_runtime4.jsx)("path", { d: "M12 41C10 41.5 7.5 44.5 7 46.5 7 48 8.5 49.5 10.5 50 12.5 50.5 13.5 50 15 48 15.5 47 16.5 47.5 19 50 22 49.5 22 46.5 22 45.5 20.5 45.5 17 45 16.5 44.5 16.5 44 16.5 42 13.5 40.5 12 41Z" }), (0, import_jsx_runtime4.jsx)("path", { d: "M40 33C39 38 36 42 34.5 41.5 32.5 40.5 29.5 42 28.5 44 26 49 27.5 51.5 32.5 51 36 51 37 50 36 46.5 36 45 37 44.5 38 44.5 38.5 45.5 40.5 49 43.5 50 46.5 47.5 47.5 46.5 46 43.5 44 42 43 41.5 43.5 40.5 44.5 39.5 46 38 47 37.5L47 33Z" })] }), (0, import_jsx_runtime4.jsx)("ellipse", { fill: mint, cx: "46.4", cy: "30.6", rx: "8.1", ry: "8.3" }), (0, import_jsx_runtime4.jsxs)("g", { fill: ink, children: [(0, import_jsx_runtime4.jsx)("rect", { x: "45.05", y: "26.95", width: "2.25", height: "4.6", rx: "1.1", transform: "rotate(-6 46.2 29.3)" }), (0, import_jsx_runtime4.jsx)("rect", { x: "49.25", y: "26.4", width: "2.25", height: "4.6", rx: "1.1", transform: "rotate(-6 50.4 28.7)" })] }), (0, import_jsx_runtime4.jsx)("path", { fill: coral, d: "M46.8 32.2H51C51 34.3 50 35.4 48.9 35.4S46.8 34.3 46.8 32.2Z", transform: "rotate(-8 48.9 33.5)" }), (0, import_jsx_runtime4.jsx)("path", { fill: "none", stroke: yellow, strokeWidth: "3", strokeLinecap: "round", d: "M50.9 17.7 50.5 19.7 M55.2 20.1 53.4 21.9 M56.5 24.5 55.7 24.7" })] }),
|
|
22108
|
+
// The launcher's "All Apps": four App tiles, no install arrow.
|
|
22109
|
+
allApps: (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [(0, import_jsx_runtime4.jsx)("rect", { fill: coral, x: "7", y: "7.25", width: "23.2", height: "22.7", rx: "4.6", transform: "rotate(-6.2 18.6 18.6)" }), (0, import_jsx_runtime4.jsx)("rect", { fill: blue, x: "33.9", y: "7.25", width: "23.2", height: "22.7", rx: "4.6", transform: "rotate(6.2 45.5 18.6)" }), (0, import_jsx_runtime4.jsx)("rect", { fill: mint, x: "7", y: "34.15", width: "23.2", height: "22.7", rx: "4.6", transform: "rotate(6.2 18.6 45.5)" }), (0, import_jsx_runtime4.jsx)("rect", { fill: yellow, x: "33.9", y: "34.15", width: "23.2", height: "22.7", rx: "4.6", transform: "rotate(-6.2 45.5 45.5)" })] }),
|
|
22110
|
+
// Search: a magnifying glass.
|
|
22111
|
+
search: (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [(0, import_jsx_runtime4.jsx)("path", { fill: "none", stroke: blue, strokeWidth: "6.5", d: "M37 37.5 43 43.5" }), (0, import_jsx_runtime4.jsx)("path", { fill: "none", stroke: coral, strokeWidth: "12.6", strokeLinecap: "round", d: "M44.2 43.8 51.4 51.8" }), (0, import_jsx_runtime4.jsx)("path", { fill: "none", stroke: yellow, strokeWidth: "3", strokeLinecap: "round", d: "M47.2 42.4 52.8 47.8" }), (0, import_jsx_runtime4.jsx)("ellipse", { fill: blue, cx: "25.6", cy: "24.6", rx: "19.25", ry: "18.6" }), (0, import_jsx_runtime4.jsx)("ellipse", { fill: cream, cx: "25.2", cy: "24.1", rx: "14.2", ry: "13.6" })] }),
|
|
22112
|
+
// An Agent's web browser: a window with the world inside.
|
|
22113
|
+
browser: (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [(0, import_jsx_runtime4.jsx)("rect", { fill: coral, x: "5.9", y: "6.15", width: "52.2", height: "51.7", rx: "5.5" }), (0, import_jsx_runtime4.jsx)("path", { fill: cream, d: "M10 16.5H29.4C30.3 16.1 31 14.4 31.8 12.5 32.5 10.9 33.2 10 34.5 10H52.2C53.4 10 54 10.7 54 12V16.5C55.2 16.5 56 17.1 56 18.3V52.4C56 53.7 55.1 54.6 53.8 54.6H10.2C8.9 54.6 8 53.7 8 52.4V18.2C8 17.1 8.7 16.5 10 16.5Z" }), (0, import_jsx_runtime4.jsx)("circle", { fill: yellow, cx: "12.2", cy: "11.9", r: "1.95" }), (0, import_jsx_runtime4.jsx)("circle", { fill: blue, cx: "18.6", cy: "11.9", r: "1.95" }), (0, import_jsx_runtime4.jsx)("circle", { fill: grape, cx: "25.1", cy: "11.9", r: "1.95" }), (0, import_jsx_runtime4.jsx)("circle", { fill: mint, cx: "32", cy: "34.9", r: "14.5" }), (0, import_jsx_runtime4.jsxs)("g", { fill: "none", stroke: cream, strokeWidth: "3", children: [(0, import_jsx_runtime4.jsx)("ellipse", { cx: "32", cy: "34.9", rx: "7.7", ry: "13.3" }), (0, import_jsx_runtime4.jsx)("path", { d: "M17.5 34.9H46.5" })] })] }),
|
|
22114
|
+
// The public web: a globe with an orbit.
|
|
22115
|
+
internet: (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [(0, import_jsx_runtime4.jsx)("ellipse", { fill: "none", stroke: yellow, strokeWidth: "4.4", cx: "32.2", cy: "30.2", rx: "25.6", ry: "8.1", transform: "rotate(-20.8 32.2 30.2)" }), (0, import_jsx_runtime4.jsx)("circle", { fill: blue, cx: "32", cy: "32", r: "21.1" }), (0, import_jsx_runtime4.jsxs)("g", { fill: "none", stroke: cream, strokeWidth: "3", children: [(0, import_jsx_runtime4.jsx)("ellipse", { cx: "32", cy: "31.8", rx: "12.2", ry: "18.7" }), (0, import_jsx_runtime4.jsx)("path", { d: "M32 13.1V50.5M15 20.4Q32 29 49 20.4M12.5 39Q32 44.6 51.5 39" })] }), (0, import_jsx_runtime4.jsx)("path", { fill: "none", stroke: yellow, strokeWidth: "4.4", d: "M6.6 30.2A25.6 8.1 0 0 0 57.8 30.2", transform: "rotate(-20.8 32.2 30.2)" })] }),
|
|
22116
|
+
// Members and invites: the people on a Team.
|
|
22117
|
+
members: (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [(0, import_jsx_runtime4.jsx)("circle", { fill: blue, cx: "41.9", cy: "22.85", r: "12.2" }), (0, import_jsx_runtime4.jsx)("path", { fill: blue, d: "M36 34C33.8 34.8 32.2 35.8 31 37 37.5 39.5 40.5 43.5 40.5 49.5V53.5H54.5C57 53.5 58 51 58 47.5 58 40 55 35.5 49 34Z" }), (0, import_jsx_runtime4.jsx)("circle", { fill: coral, cx: "22.95", cy: "27.6", r: "12.85" }), (0, import_jsx_runtime4.jsx)("path", { fill: coral, d: "M15.5 38C10.5 39 7.5 42.5 6.5 47 5.5 50.5 6 53.5 8.5 53.5H38.5C42 52 40 43 36 40 34.5 39 32 38 31 38Z" }), (0, import_jsx_runtime4.jsxs)("g", { fill: ink, children: [(0, import_jsx_runtime4.jsx)("circle", { cx: "18.3", cy: "28", r: "1.6" }), (0, import_jsx_runtime4.jsx)("circle", { cx: "27.9", cy: "28", r: "1.6" }), (0, import_jsx_runtime4.jsx)("circle", { cx: "39.1", cy: "23.05", r: "1.55" }), (0, import_jsx_runtime4.jsx)("circle", { cx: "47.25", cy: "23.05", r: "1.55" })] })] }),
|
|
22118
|
+
// Selling Apps: coins and a price tag.
|
|
22119
|
+
sell: (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [(0, import_jsx_runtime4.jsx)("path", { fill: yellow, d: "M6.4 41.2V48.4C6.4 51.4 13.2 54 21.8 54S37.2 51.4 37.2 48.4V41.2C37.2 37.8 30.4 35 21.8 35S6.4 37.8 6.4 41.2Z" }), (0, import_jsx_runtime4.jsx)("ellipse", { fill: cream, cx: "21.9", cy: "40.8", rx: "13.2", ry: "3.6" }), (0, import_jsx_runtime4.jsxs)("g", { transform: "rotate(-3 22.5 30) translate(0.5 0)", children: [(0, import_jsx_runtime4.jsx)("path", { fill: yellow, d: "M7.5 26V34C7.5 37.3 14.2 40 22.5 40S37.5 37.3 37.5 34V26C37.5 22.7 30.8 20 22.5 20S7.5 22.7 7.5 26Z" }), (0, import_jsx_runtime4.jsx)("ellipse", { fill: cream, cx: "23.7", cy: "26.55", rx: "13.05", ry: "4.4" })] }), (0, import_jsx_runtime4.jsxs)("g", { transform: "translate(46.3 40.3) rotate(-25)", children: [(0, import_jsx_runtime4.jsx)("path", { fill: coral, d: "M-8.5-10Q-8.5-12-7-13L-1.5-16.3Q0-17.2 1.5-16.3L7-13Q8.5-12 8.5-10V9Q8.5 12 5.5 12H-5.5Q-8.5 12-8.5 9Z" }), (0, import_jsx_runtime4.jsx)("circle", { fill: cream, cx: "0", cy: "-10.7", r: "2.2" })] }), (0, import_jsx_runtime4.jsx)(TaperedRay, { fill: yellow, transform: "translate(38.2 18.6) scale(1.1 .86)" }), (0, import_jsx_runtime4.jsx)(TaperedRay, { fill: yellow, transform: "translate(42.8 21.2) rotate(45) scale(1.1 .85)" })] }),
|
|
22120
|
+
// Schedules and recurring runs: a calendar page with a clock.
|
|
22121
|
+
schedule: (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [(0, import_jsx_runtime4.jsx)("rect", { fill: cream, x: "6", y: "11", width: "47.6", height: "44", rx: "6" }), (0, import_jsx_runtime4.jsx)("path", { fill: coral, d: "M12 11H47.6Q53.6 11 53.6 17V21.5H6V17Q6 11 12 11Z" }), (0, import_jsx_runtime4.jsxs)("g", { fill: cream, children: [(0, import_jsx_runtime4.jsx)("circle", { cx: "16.1", cy: "16.15", r: "3.4" }), (0, import_jsx_runtime4.jsx)("circle", { cx: "43.4", cy: "16.15", r: "3.4" })] }), (0, import_jsx_runtime4.jsxs)("g", { fill: blue, children: [(0, import_jsx_runtime4.jsx)("rect", { x: "13.6", y: "6", width: "5", height: "11.2", rx: "2.5" }), (0, import_jsx_runtime4.jsx)("rect", { x: "40.9", y: "6", width: "5", height: "11.2", rx: "2.5" })] }), (0, import_jsx_runtime4.jsxs)("g", { fill: mint, children: [(0, import_jsx_runtime4.jsx)("rect", { x: "11.1", y: "25.1", width: "6.9", height: "6.6", rx: "1.8" }), (0, import_jsx_runtime4.jsx)("rect", { x: "20.7", y: "25.1", width: "6.9", height: "6.6", rx: "1.8" }), (0, import_jsx_runtime4.jsx)("rect", { x: "30.4", y: "25.1", width: "6.9", height: "6.6", rx: "1.8" }), (0, import_jsx_runtime4.jsx)("rect", { x: "20.7", y: "33.9", width: "6.9", height: "6.6", rx: "1.8" }), (0, import_jsx_runtime4.jsx)("rect", { x: "30.4", y: "33.9", width: "6.9", height: "6.6", rx: "1.8" }), (0, import_jsx_runtime4.jsx)("rect", { x: "11.1", y: "42.7", width: "6.9", height: "6.6", rx: "1.8" }), (0, import_jsx_runtime4.jsx)("rect", { x: "30.4", y: "42.7", width: "6.9", height: "6.6", rx: "1.8" })] }), (0, import_jsx_runtime4.jsxs)("g", { fill: grape, children: [(0, import_jsx_runtime4.jsx)("rect", { x: "40.4", y: "25.1", width: "6.9", height: "6.6", rx: "1.8" }), (0, import_jsx_runtime4.jsx)("rect", { x: "11.1", y: "33.9", width: "6.9", height: "6.6", rx: "1.8" }), (0, import_jsx_runtime4.jsx)("rect", { x: "20.7", y: "42.7", width: "6.9", height: "6.6", rx: "1.8" })] }), (0, import_jsx_runtime4.jsx)("circle", { fill: yellow, cx: "45.5", cy: "45.6", r: "12.2" }), (0, import_jsx_runtime4.jsx)("path", { fill: "none", stroke: ink, strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round", d: "M45.1 39.3V46.2L51.3 49.8" }), (0, import_jsx_runtime4.jsx)("circle", { fill: ink, cx: "45.1", cy: "46.2", r: "2.5" })] }),
|
|
22122
|
+
// Fungi: Shiitake, the brand mushroom, winking.
|
|
22123
|
+
fungi: (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [(0, import_jsx_runtime4.jsx)("ellipse", { fill: cream, cx: "33.5", cy: "43.6", rx: "18.6", ry: "14.4", transform: "rotate(-6 33.5 43.6)" }), (0, import_jsx_runtime4.jsx)("path", { fill: coral, d: "M29.5 6.5C22 7.5 16 11 11 18.5 4 29 4.6 39.6 13.5 42.2 24 45 44 40.5 54 34.6 57.6 32.6 58.6 29.2 57.5 25 56.5 20 53 16 48.5 13 43.5 8 37 5.5 29.5 6.5Z" }), (0, import_jsx_runtime4.jsxs)("g", { fill: cream, children: [(0, import_jsx_runtime4.jsx)("ellipse", { cx: "29", cy: "15.7", rx: "8.7", ry: "6.3", transform: "rotate(-15.5 29 15.7)" }), (0, import_jsx_runtime4.jsx)("ellipse", { cx: "50.8", cy: "20.1", rx: "6.5", ry: "3.5", transform: "rotate(51.6 50.8 20.1)" }), (0, import_jsx_runtime4.jsx)("ellipse", { cx: "13", cy: "26.8", rx: "4.2", ry: "3.3", transform: "rotate(-54.5 13 26.8)" })] }), (0, import_jsx_runtime4.jsxs)("g", { fill: ink, transform: "translate(26.6 46.6) scale(1.1) translate(-33.7 -38.5)", children: [(0, import_jsx_runtime4.jsx)("rect", { x: "31.85", y: "35.9", width: "3.75", height: "5.25", rx: "1.85" }), (0, import_jsx_runtime4.jsx)("path", { d: "M 47.4 34.3 C 46 35 44.6 35.8 43.5 36.7 42.9 37.2 43.2 38.3 44 38.4 45.2 38.6 46.5 38.6 47.7 38.4 48.4 38.3 48.3 37.3 47.6 37.3 46.6 37.4 45.7 37.4 45 37.3 45.9 36.7 46.9 36.1 48 35.6 48.7 35.3 48.2 34 47.4 34.3 Z" }), (0, import_jsx_runtime4.jsx)("path", { d: "M 37.4 41.1 C 38.6 44.3 42.6 44.3 43.6 40.5 43.7 40 43.1 39.8 42.9 40.3 41.9 42.8 39.1 42.9 38.3 40.7 38.1 40.2 37.3 40.5 37.4 41.1 Z" })] })] })
|
|
22074
22124
|
};
|
|
22075
22125
|
function isSigilName(name) {
|
|
22076
22126
|
return Object.hasOwn(symbols, name);
|
package/dist/build-egress.js
CHANGED
|
@@ -12,14 +12,14 @@ import { teamAppCandidateManifestSchema, TEAM_APP_CANDIDATE_MANIFEST_MAX_BYTES,
|
|
|
12
12
|
* mounts a Computer build) supplies its own admission, submission and event
|
|
13
13
|
* recording without this module reaching into either host's state.
|
|
14
14
|
*/
|
|
15
|
-
const statusSchema = z.strictObject({
|
|
15
|
+
const statusSchema = z.lazy(() => z.strictObject({
|
|
16
16
|
status: z.enum(["succeeded", "failed"]),
|
|
17
17
|
detail: z.string().max(2_000).optional(),
|
|
18
|
-
});
|
|
19
|
-
const artifactSchema = z.strictObject({
|
|
18
|
+
}));
|
|
19
|
+
const artifactSchema = z.lazy(() => z.strictObject({
|
|
20
20
|
digest: z.string().regex(/^sha256:[0-9a-f]{64}$/),
|
|
21
21
|
bytes: z.number().int().nonnegative(),
|
|
22
|
-
});
|
|
22
|
+
}));
|
|
23
23
|
/** True when an admitted Git principal is a build job's job-scoped read
|
|
24
24
|
* credential rather than an Agent or a Workflow Git pass. A host's Git
|
|
25
25
|
* egress uses this to admit the job-scoped read clone while refusing any
|
package/dist/cloudflare.js
CHANGED
|
@@ -154,20 +154,20 @@ export function frameBindingEntrypoint(methods, dispatch) {
|
|
|
154
154
|
}
|
|
155
155
|
};
|
|
156
156
|
}
|
|
157
|
-
const facetHttpReplySchema = z.strictObject({
|
|
157
|
+
const facetHttpReplySchema = z.lazy(() => z.strictObject({
|
|
158
158
|
status: z.number().int(),
|
|
159
159
|
statusText: z.string(),
|
|
160
160
|
headers: z.array(z.tuple([z.string(), z.string()])),
|
|
161
161
|
body: z.instanceof(ReadableStream).nullable(),
|
|
162
|
-
});
|
|
162
|
+
}));
|
|
163
163
|
// App methods return JSON; HTTP carries binary bytes and lifecycle hooks return void.
|
|
164
164
|
// Binding operation results keep their separate, operation-specific decoders.
|
|
165
|
-
const facetHttpInputSchema = z.strictObject({
|
|
165
|
+
const facetHttpInputSchema = z.lazy(() => z.strictObject({
|
|
166
166
|
url: z.string(),
|
|
167
167
|
method: z.string(),
|
|
168
168
|
headers: z.array(z.tuple([z.string(), z.string()])),
|
|
169
169
|
body: z.instanceof(Uint8Array).nullable(),
|
|
170
|
-
});
|
|
170
|
+
}));
|
|
171
171
|
const facetInvocationSchema = rpcHandleSchema({
|
|
172
172
|
invoke: rpcMethod(z.union([z.json(), z.undefined()])).input(z.tuple([z.string(), z.array(z.unknown()), z.unknown()])),
|
|
173
173
|
http: rpcMethod(facetHttpReplySchema).input(z.tuple([facetHttpInputSchema, z.unknown()])),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const frameBindingWireScript = "var X;function l(e,t,r){function n(u,c){if(u._zod||Object.defineProperty(u,\"_zod\",{value:{def:c,constr:s,traits:new Set},enumerable:!1}),u._zod.traits.has(e))return;u._zod.traits.add(e),t(u,c);let a=s.prototype,p=Object.keys(a);for(let f=0;f<p.length;f++){let d=p[f];d in u||(u[d]=a[d].bind(u))}}let o=r?.Parent??Object;class i extends o{}Object.defineProperty(i,\"name\",{value:e});function s(u){var c;let a=r?.Parent?new i:this;n(a,u),(c=a._zod).deferred??(c.deferred=[]);for(let p of a._zod.deferred)p();return a}return Object.defineProperty(s,\"init\",{value:n}),Object.defineProperty(s,Symbol.hasInstance,{value:u=>r?.Parent&&u instanceof r.Parent?!0:u?._zod?.traits?.has(e)}),Object.defineProperty(s,\"name\",{value:e}),s}var $=class extends Error{constructor(){super(\"Encountered Promise during synchronous parse. Use .parseAsync() instead.\")}};(X=globalThis).__zod_globalConfig??(X.__zod_globalConfig={});var j=globalThis.__zod_globalConfig;function v(e){return e&&Object.assign(j,e),j}function H(e){let t=Object.values(e).filter(n=>typeof n==\"number\");return Object.entries(e).filter(([n,o])=>t.indexOf(+n)===-1).map(([n,o])=>o)}function Q(e,t){return typeof t==\"bigint\"?t.toString():t}function D(e){return{get value(){{let r=e();return Object.defineProperty(this,\"value\",{value:r}),r}throw new Error(\"cached value already set\")}}}function ee(e){let t=e.startsWith(\"^\")?1:0,r=e.endsWith(\"$\")?e.length-1:e.length;return e.slice(t,r)}var Y=Symbol(\"evaluating\");function g(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==Y)return n===void 0&&(n=Y,n=r()),n},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}var L=\"captureStackTrace\"in Error?Error.captureStackTrace:(...e)=>{};function A(e){return typeof e==\"object\"&&e!==null&&!Array.isArray(e)}function te(e){if(A(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=\"function\")return!0;let r=t.prototype;return!(A(r)===!1||Object.prototype.hasOwnProperty.call(r,\"isPrototypeOf\")===!1)}var re=new Set([\"string\",\"number\",\"symbol\"]);function C(e){return e.replace(/[.*+?^${}()|[\\]\\\\]/g,\"\\\\$&\")}function U(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function _(e){let t=e;if(!t)return{};if(typeof t==\"string\")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error(\"Cannot specify both `message` and `error` params\");t.error=t.message}return delete t.message,typeof t.error==\"string\"?{...t,error:()=>t.error}:t}function ne(e){return Object.keys(e).filter(t=>e[t]._zod.optin===\"optional\"&&e[t]._zod.optout===\"optional\")}var xt={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function y(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function oe(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function b(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function T(e){return typeof e==\"string\"?e:e?.message}function Z(e,t,r){let n=e.message?e.message:T(e.inst?._zod.def?.error?.(e))??T(t?.error?.(e))??T(r.customError?.(e))??T(r.localeError?.(e))??\"Invalid input\",{inst:o,continue:i,input:s,...u}=e;return u.path??(u.path=[]),u.message=n,t?.reportInput&&(u.input=s),u}function B(...e){let[t,r,n]=e;return typeof t==\"string\"?{message:t,code:\"custom\",input:r,inst:n}:{...t}}var ie=(e,t)=>{e.name=\"$ZodError\",Object.defineProperty(e,\"_zod\",{value:e._zod,enumerable:!1}),Object.defineProperty(e,\"issues\",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Q,2),Object.defineProperty(e,\"toString\",{value:()=>e.message,enumerable:!1})},se=l(\"$ZodError\",ie),M=l(\"$ZodError\",ie,{Parent:Error});var We=e=>(t,r,n,o)=>{let i=n?{...n,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new $;if(s.issues.length){let u=new(o?.Err??e)(s.issues.map(c=>Z(c,i,v())));throw L(u,o?.callee),u}return s.value},w=We(M),Ke=e=>async(t,r,n,o)=>{let i=n?{...n,async:!0}:{async:!0},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let u=new(o?.Err??e)(s.issues.map(c=>Z(c,i,v())));throw L(u,o?.callee),u}return s.value},k=Ke(M),Ge=e=>(t,r,n)=>{let o=n?{...n,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},o);if(i instanceof Promise)throw new $;return i.issues.length?{success:!1,error:new(e??se)(i.issues.map(s=>Z(s,o,v())))}:{success:!0,data:i.value}},I=Ge(M),Je=e=>async(t,r,n)=>{let o=n?{...n,async:!0}:{async:!0},i=t._zod.run({value:r,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>Z(s,o,v())))}:{success:!0,data:i.value}},S=Je(M);var qe=\"(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))\",Xe=new RegExp(`^${qe}$`);var ue=e=>{let t=e?`[\\\\s\\\\S]{${e?.minimum??0},${e?.maximum??\"\"}}`:\"[\\\\s\\\\S]*\";return new RegExp(`^${t}$`)};var ce=/^-?\\d+(?:\\.\\d+)?$/;var V=l(\"$ZodCheck\",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])});var pe={major:4,minor:4,patch:3};var h=l(\"$ZodType\",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=pe;let n=[...e._zod.def.checks??[]];e._zod.traits.has(\"$ZodCheck\")&&n.unshift(e);for(let o of n)for(let i of o._zod.onattach)i(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let o=(s,u,c)=>{let a=y(s),p;for(let f of u){if(f._zod.def.when){if(oe(s)||!f._zod.def.when(s))continue}else if(a)continue;let d=s.issues.length,m=f._zod.check(s);if(m instanceof Promise&&c?.async===!1)throw new $;if(p||m instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await m,s.issues.length!==d&&(a||(a=y(s,d)))});else{if(s.issues.length===d)continue;a||(a=y(s,d))}}return p?p.then(()=>s):s},i=(s,u,c)=>{if(y(s))return s.aborted=!0,s;let a=o(u,n,c);if(a instanceof Promise){if(c.async===!1)throw new $;return a.then(p=>e._zod.parse(p,c))}return e._zod.parse(a,c)};e._zod.run=(s,u)=>{if(u.skipChecks)return e._zod.parse(s,u);if(u.direction===\"backward\"){let a=e._zod.parse({value:s.value,issues:[]},{...u,skipChecks:!0});return a instanceof Promise?a.then(p=>i(p,s,u)):i(a,s,u)}let c=e._zod.parse(s,u);if(c instanceof Promise){if(u.async===!1)throw new $;return c.then(a=>o(a,n,u))}return o(c,n,u)}}g(e,\"~standard\",()=>({validate:o=>{try{let i=I(e,o);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return S(e,o).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:\"zod\",version:1}))}),xe=l(\"$ZodString\",(e,t)=>{h.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??ue(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value==\"string\"||r.issues.push({expected:\"string\",code:\"invalid_type\",input:r.value,inst:e}),r}});var ge=l(\"$ZodUnknown\",(e,t)=>{h.init(e,t),e._zod.parse=r=>r}),ze=l(\"$ZodNever\",(e,t)=>{h.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:\"never\",code:\"invalid_type\",input:r.value,inst:e}),r)});function le(e,t,r){e.issues.length&&t.issues.push(...b(r,e.issues)),t.value[r]=e.value}var $e=l(\"$ZodArray\",(e,t)=>{h.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!Array.isArray(o))return r.issues.push({expected:\"array\",code:\"invalid_type\",input:o,inst:e}),r;r.value=Array(o.length);let i=[];for(let s=0;s<o.length;s++){let u=o[s],c=t.element._zod.run({value:u,issues:[]},n);c instanceof Promise?i.push(c.then(a=>le(a,r,s))):le(c,r,s)}return i.length?Promise.all(i).then(()=>r):r}});function R(e,t,r,n,o,i){let s=r in n;if(e.issues.length){if(o&&i&&!s)return;t.issues.push(...b(r,e.issues))}if(!s&&!o){e.issues.length||t.issues.push({code:\"invalid_type\",expected:\"nonoptional\",input:void 0,path:[r]});return}e.value===void 0?s&&(t.value[r]=void 0):t.value[r]=e.value}function He(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(\"$ZodType\"))throw new Error(`Invalid element at key \"${n}\": expected a Zod schema`);let r=ne(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function Qe(e,t,r,n,o,i){let s=[],u=o.keySet,c=o.catchall._zod,a=c.def.type,p=c.optin===\"optional\",f=c.optout===\"optional\";for(let d in t){if(d===\"__proto__\"||u.has(d))continue;if(a===\"never\"){s.push(d);continue}let m=c.run({value:t[d],issues:[]},n);m instanceof Promise?e.push(m.then(z=>R(z,r,d,t,p,f))):R(m,r,d,t,p,f)}return s.length&&r.issues.push({code:\"unrecognized_keys\",keys:s,input:t,inst:i}),e.length?Promise.all(e).then(()=>r):r}var ve=l(\"$ZodObject\",(e,t)=>{if(h.init(e,t),!Object.getOwnPropertyDescriptor(t,\"shape\")?.get){let u=t.shape;Object.defineProperty(t,\"shape\",{get:()=>{let c={...u};return Object.defineProperty(t,\"shape\",{value:c}),c}})}let n=D(()=>He(t));g(e._zod,\"propValues\",()=>{let u=t.shape,c={};for(let a in u){let p=u[a]._zod;if(p.values){c[a]??(c[a]=new Set);for(let f of p.values)c[a].add(f)}}return c});let o=A,i=t.catchall,s;e._zod.parse=(u,c)=>{s??(s=n.value);let a=u.value;if(!o(a))return u.issues.push({expected:\"object\",code:\"invalid_type\",input:a,inst:e}),u;u.value={};let p=[],f=s.shape;for(let d of s.keys){let m=f[d],z=m._zod.optin===\"optional\",q=m._zod.optout===\"optional\",N=m._zod.run({value:a[d],issues:[]},c);N instanceof Promise?p.push(N.then(Be=>R(Be,u,d,a,z,q))):R(N,u,d,a,z,q)}return i?Qe(p,a,u,c,n.value,e):p.length?Promise.all(p).then(()=>u):u}});function fe(e,t,r,n){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let o=e.filter(i=>!y(i));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:\"invalid_union\",input:t.value,inst:r,errors:e.map(i=>i.issues.map(s=>Z(s,n,v())))}),t)}var be=l(\"$ZodUnion\",(e,t)=>{h.init(e,t),g(e._zod,\"optin\",()=>t.options.some(n=>n._zod.optin===\"optional\")?\"optional\":void 0),g(e._zod,\"optout\",()=>t.options.some(n=>n._zod.optout===\"optional\")?\"optional\":void 0),g(e._zod,\"values\",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),g(e._zod,\"pattern\",()=>{if(t.options.every(n=>n._zod.pattern)){let n=t.options.map(o=>o._zod.pattern);return new RegExp(`^(${n.map(o=>ee(o.source)).join(\"|\")})$`)}});let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(n,o)=>{if(r)return r(n,o);let i=!1,s=[];for(let u of t.options){let c=u._zod.run({value:n.value,issues:[]},o);if(c instanceof Promise)s.push(c),i=!0;else{if(c.issues.length===0)return c;s.push(c)}}return i?Promise.all(s).then(u=>fe(u,n,e,o)):fe(s,n,e,o)}});var Ze=l(\"$ZodDiscriminatedUnion\",(e,t)=>{t.inclusive=!1,be.init(e,t);let r=e._zod.parse;g(e._zod,\"propValues\",()=>{let o={};for(let i of t.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index \"${t.options.indexOf(i)}\"`);for(let[u,c]of Object.entries(s)){o[u]||(o[u]=new Set);for(let a of c)o[u].add(a)}}return o});let n=D(()=>{let o=t.options,i=new Map;for(let s of o){let u=s._zod.propValues?.[t.discriminator];if(!u||u.size===0)throw new Error(`Invalid discriminated union option at index \"${t.options.indexOf(s)}\"`);for(let c of u){if(i.has(c))throw new Error(`Duplicate discriminator value \"${String(c)}\"`);i.set(c,s)}}return i});e._zod.parse=(o,i)=>{let s=o.value;if(!A(s))return o.issues.push({code:\"invalid_type\",expected:\"object\",input:s,inst:e}),o;let u=n.value.get(s?.[t.discriminator]);return u?u._zod.run(o,i):t.unionFallback||i.direction===\"backward\"?r(o,i):(o.issues.push({code:\"invalid_union\",errors:[],note:\"No matching discriminator\",discriminator:t.discriminator,options:Array.from(n.value.keys()),input:s,path:[t.discriminator],inst:e}),o)}});var W=l(\"$ZodTuple\",(e,t)=>{h.init(e,t);let r=t.items;e._zod.parse=(n,o)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({input:i,inst:e,expected:\"tuple\",code:\"invalid_type\"}),n;n.value=[];let s=[],u=de(r,\"optin\"),c=de(r,\"optout\");if(!t.rest){if(i.length<u)return n.issues.push({code:\"too_small\",minimum:u,inclusive:!0,input:i,inst:e,origin:\"array\"}),n;i.length>r.length&&n.issues.push({code:\"too_big\",maximum:r.length,inclusive:!0,input:i,inst:e,origin:\"array\"})}let a=new Array(r.length);for(let p=0;p<r.length;p++){let f=r[p]._zod.run({value:i[p],issues:[]},o);f instanceof Promise?s.push(f.then(d=>{a[p]=d})):a[p]=f}if(t.rest){let p=r.length-1,f=i.slice(r.length);for(let d of f){p++;let m=t.rest._zod.run({value:d,issues:[]},o);m instanceof Promise?s.push(m.then(z=>me(z,n,p))):me(m,n,p)}}return s.length?Promise.all(s).then(()=>he(a,n,r,i,c)):he(a,n,r,i,c)}});function de(e,t){for(let r=e.length-1;r>=0;r--)if(e[r]._zod[t]!==\"optional\")return r+1;return 0}function me(e,t,r){e.issues.length&&t.issues.push(...b(r,e.issues)),t.value[r]=e.value}function he(e,t,r,n,o){for(let i=0;i<r.length;i++){let s=e[i],u=i<n.length;if(s.issues.length){if(!u&&i>=o){t.value.length=i;break}t.issues.push(...b(i,s.issues))}t.value[i]=s.value}for(let i=t.value.length-1;i>=n.length&&(r[i]._zod.optout===\"optional\"&&t.value[i]===void 0);i--)t.value.length=i;return t}var ye=l(\"$ZodRecord\",(e,t)=>{h.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!te(o))return r.issues.push({expected:\"record\",code:\"invalid_type\",input:o,inst:e}),r;let i=[],s=t.keyType._zod.values;if(s){r.value={};let u=new Set;for(let a of s)if(typeof a==\"string\"||typeof a==\"number\"||typeof a==\"symbol\"){u.add(typeof a==\"number\"?a.toString():a);let p=t.keyType._zod.run({value:a,issues:[]},n);if(p instanceof Promise)throw new Error(\"Async schemas not supported in object keys currently\");if(p.issues.length){r.issues.push({code:\"invalid_key\",origin:\"record\",issues:p.issues.map(m=>Z(m,n,v())),input:a,path:[a],inst:e});continue}let f=p.value,d=t.valueType._zod.run({value:o[a],issues:[]},n);d instanceof Promise?i.push(d.then(m=>{m.issues.length&&r.issues.push(...b(a,m.issues)),r.value[f]=m.value})):(d.issues.length&&r.issues.push(...b(a,d.issues)),r.value[f]=d.value)}let c;for(let a in o)u.has(a)||(c=c??[],c.push(a));c&&c.length>0&&r.issues.push({code:\"unrecognized_keys\",input:o,inst:e,keys:c})}else{r.value={};for(let u of Reflect.ownKeys(o)){if(u===\"__proto__\"||!Object.prototype.propertyIsEnumerable.call(o,u))continue;let c=t.keyType._zod.run({value:u,issues:[]},n);if(c instanceof Promise)throw new Error(\"Async schemas not supported in object keys currently\");if(typeof u==\"string\"&&ce.test(u)&&c.issues.length){let f=t.keyType._zod.run({value:Number(u),issues:[]},n);if(f instanceof Promise)throw new Error(\"Async schemas not supported in object keys currently\");f.issues.length===0&&(c=f)}if(c.issues.length){t.mode===\"loose\"?r.value[u]=o[u]:r.issues.push({code:\"invalid_key\",origin:\"record\",issues:c.issues.map(f=>Z(f,n,v())),input:u,path:[u],inst:e});continue}let p=t.valueType._zod.run({value:o[u],issues:[]},n);p instanceof Promise?i.push(p.then(f=>{f.issues.length&&r.issues.push(...b(u,f.issues)),r.value[c.value]=f.value})):(p.issues.length&&r.issues.push(...b(u,p.issues)),r.value[c.value]=p.value)}}return i.length?Promise.all(i).then(()=>r):r}});var we=l(\"$ZodEnum\",(e,t)=>{h.init(e,t);let r=H(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(o=>re.has(typeof o)).map(o=>typeof o==\"string\"?C(o):o.toString()).join(\"|\")})$`),e._zod.parse=(o,i)=>{let s=o.value;return n.has(s)||o.issues.push({code:\"invalid_value\",values:r,input:s,inst:e}),o}}),ke=l(\"$ZodLiteral\",(e,t)=>{if(h.init(e,t),t.values.length===0)throw new Error(\"Cannot create literal schema with no valid values\");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n==\"string\"?C(n):n?C(n.toString()):String(n)).join(\"|\")})$`),e._zod.parse=(n,o)=>{let i=n.value;return r.has(i)||n.issues.push({code:\"invalid_value\",values:t.values,input:i,inst:e}),n}});var Pe=l(\"$ZodFunction\",(e,t)=>(h.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!=\"function\")throw new Error(\"implement() must be called with a function\");return function(...n){let o=e._def.input?w(e._def.input,n):n,i=Reflect.apply(r,this,o);return e._def.output?w(e._def.output,i):i}},e.implementAsync=r=>{if(typeof r!=\"function\")throw new Error(\"implementAsync() must be called with a function\");return async function(...n){let o=e._def.input?await k(e._def.input,n):n,i=await Reflect.apply(r,this,o);return e._def.output?await k(e._def.output,i):i}},e._zod.parse=(r,n)=>typeof r.value!=\"function\"?(r.issues.push({code:\"invalid_type\",expected:\"function\",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type===\"promise\"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let n=e.constructor;return Array.isArray(r[0])?new n({type:\"function\",input:new W({type:\"tuple\",items:r[0],rest:r[1]}),output:e._def.output}):new n({type:\"function\",input:r[0],output:e._def.output})},e.output=r=>{let n=e.constructor;return new n({type:\"function\",input:e._def.input,output:r})},e)),Ae=l(\"$ZodPromise\",(e,t)=>{h.init(e,t),e._zod.parse=(r,n)=>Promise.resolve(r.value).then(o=>t.innerType._zod.run({value:o,issues:[]},n))});var Ee=l(\"$ZodCustom\",(e,t)=>{V.init(e,t),h.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(i=>_e(i,r,n,e));_e(o,r,n,e)}});function _e(e,t,r,n){if(!e){let o={code:\"custom\",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),t.issues.push(B(o))}}function Me(e,t){return new e({type:\"string\",..._(t)})}function Ie(e){return new e({type:\"unknown\"})}function Se(e,t){return new e({type:\"never\",..._(t)})}function Te(e,t,r){let n=_(r);return n.abort??(n.abort=!0),new e({type:\"custom\",check:\"custom\",fn:t,...n})}var x=l(\"ZodMiniType\",(e,t)=>{if(!e._zod)throw new Error(\"Uninitialized schema in ZodMiniType.\");h.init(e,t),e.def=t,e.type=t.type,e.parse=(r,n)=>w(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>I(e,r,n),e.parseAsync=async(r,n)=>k(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>S(e,r,n),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(n=>typeof n==\"function\"?{_zod:{check:n,def:{check:\"custom\"},onattach:[]}}:n)]},{parent:!0}),e.with=e.check,e.clone=(r,n)=>U(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.apply=r=>r(e)}),rt=l(\"ZodMiniString\",(e,t)=>{xe.init(e,t),x.init(e,t)});function O(e){return Me(rt,e)}var nt=l(\"ZodMiniUnknown\",(e,t)=>{ge.init(e,t),x.init(e,t)});function P(){return Ie(nt)}var ot=l(\"ZodMiniNever\",(e,t)=>{ze.init(e,t),x.init(e,t)});function it(e){return Se(ot,e)}var st=l(\"ZodMiniArray\",(e,t)=>{$e.init(e,t),x.init(e,t)});function K(e,t){return new st({type:\"array\",element:e,..._(t)})}var Re=l(\"ZodMiniObject\",(e,t)=>{ve.init(e,t),x.init(e,t),g(e,\"shape\",()=>t.shape)});function Oe(e,t){let r={type:\"object\",shape:e??{},..._(t)};return new Re(r)}function G(e,t){return new Re({type:\"object\",shape:e,catchall:it(),..._(t)})}var ut=l(\"ZodMiniDiscriminatedUnion\",(e,t)=>{Ze.init(e,t),x.init(e,t)});function Ne(e,t,r){return new ut({type:\"union\",options:t,discriminator:e,..._(r)})}var ct=l(\"ZodMiniTuple\",(e,t)=>{W.init(e,t),x.init(e,t)});function at(e,t,r){let n=t instanceof h,o=n?r:t,i=n?t:null;return new ct({type:\"tuple\",items:e,rest:i,..._(o)})}var Ce=l(\"ZodMiniRecord\",(e,t)=>{ye.init(e,t),x.init(e,t)});function je(e,t,r){return!t||!t._zod?new Ce({type:\"record\",keyType:O(),valueType:e,..._(t)}):new Ce({type:\"record\",keyType:e,valueType:t,..._(r)})}var pt=l(\"ZodMiniEnum\",(e,t)=>{we.init(e,t),x.init(e,t),e.options=Object.values(t.entries)});function Fe(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new pt({type:\"enum\",entries:r,..._(t)})}var lt=l(\"ZodMiniLiteral\",(e,t)=>{ke.init(e,t),x.init(e,t)});function J(e,t){return new lt({type:\"literal\",values:Array.isArray(e)?e:[e],..._(t)})}var ft=l(\"ZodMiniPromise\",(e,t)=>{Ae.init(e,t),x.init(e,t)});function De(e){return new ft({type:\"promise\",innerType:e})}var dt=l(\"ZodMiniCustom\",(e,t)=>{Ee.init(e,t),x.init(e,t)});function mt(e,t){return Te(dt,e??(()=>!0),t)}function Le(e,t={}){let r=mt(n=>n instanceof e,t);return r._zod.bag.Class=e,r._zod.check=n=>{n.value instanceof e||n.issues.push({code:\"invalid_type\",expected:e.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]})},r}var ht=l(\"ZodMiniFunction\",(e,t)=>{Pe.init(e,t),x.init(e,t)});function Ue(e){return new ht({type:\"function\",input:Array.isArray(e?.input)?at(e?.input):e?.input??K(P()),output:e?.output??P()})}var _t=je(O(),Le(Object));function go(e){let t=Ne(\"kind\",[G({kind:J(\"result\"),value:P()}),G({kind:J(\"local_refusal\"),code:Fe(e)})]);class r extends Error{constructor(u){super(`App binding refused: ${u}`);this.code=u}code;name=\"AppInstanceError\"}let n=i=>t.parse(i),o=i=>{let s=t.parse(i);if(s.kind===\"local_refusal\")throw new r(s.code);return s.value};return{decode:n,wrap(i){return Object.fromEntries(Object.entries(_t.parse(i)).map(([s,u])=>[s,new Proxy({},{get(c,a){let p=O().safeParse(a);if(!(!p.success||p.data===\"then\"))return async(...f)=>{let d=Ue({input:K(P()),output:De(P())}),m=Oe({[p.data]:d}).parse(Object.create(u))[p.data];if(m===void 0)throw new Error(\"App binding method unavailable\");return o(await m.apply(u,[...f]))}}})]))}}}export{go as createFrameBindingWire};\n";
|
|
1
|
+
export const frameBindingWireScript = "var X;function l(e,t,r){function n(u,c){if(u._zod||Object.defineProperty(u,\"_zod\",{value:{def:c,constr:s,traits:new Set},enumerable:!1}),u._zod.traits.has(e))return;u._zod.traits.add(e),t(u,c);let a=s.prototype,p=Object.keys(a);for(let f=0;f<p.length;f++){let d=p[f];d in u||(u[d]=a[d].bind(u))}}let o=r?.Parent??Object;class i extends o{}Object.defineProperty(i,\"name\",{value:e});function s(u){var c;let a=r?.Parent?new i:this;n(a,u),(c=a._zod).deferred??(c.deferred=[]);for(let p of a._zod.deferred)p();return a}return Object.defineProperty(s,\"init\",{value:n}),Object.defineProperty(s,Symbol.hasInstance,{value:u=>r?.Parent&&u instanceof r.Parent?!0:u?._zod?.traits?.has(e)}),Object.defineProperty(s,\"name\",{value:e}),s}var $=class extends Error{constructor(){super(\"Encountered Promise during synchronous parse. Use .parseAsync() instead.\")}};(X=globalThis).__zod_globalConfig??(X.__zod_globalConfig={});var j=globalThis.__zod_globalConfig;function v(e){return e&&Object.assign(j,e),j}function H(e){let t=Object.values(e).filter(n=>typeof n==\"number\");return Object.entries(e).filter(([n,o])=>t.indexOf(+n)===-1).map(([n,o])=>o)}function Q(e,t){return typeof t==\"bigint\"?t.toString():t}function D(e){return{get value(){{let r=e();return Object.defineProperty(this,\"value\",{value:r}),r}throw new Error(\"cached value already set\")}}}function ee(e){let t=e.startsWith(\"^\")?1:0,r=e.endsWith(\"$\")?e.length-1:e.length;return e.slice(t,r)}var Y=Symbol(\"evaluating\");function _(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==Y)return n===void 0&&(n=Y,n=r()),n},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}var L=\"captureStackTrace\"in Error?Error.captureStackTrace:(...e)=>{};function A(e){return typeof e==\"object\"&&e!==null&&!Array.isArray(e)}function te(e){if(A(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=\"function\")return!0;let r=t.prototype;return!(A(r)===!1||Object.prototype.hasOwnProperty.call(r,\"isPrototypeOf\")===!1)}var re=new Set([\"string\",\"number\",\"symbol\"]);function C(e){return e.replace(/[.*+?^${}()|[\\]\\\\]/g,\"\\\\$&\")}function U(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function x(e){let t=e;if(!t)return{};if(typeof t==\"string\")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error(\"Cannot specify both `message` and `error` params\");t.error=t.message}return delete t.message,typeof t.error==\"string\"?{...t,error:()=>t.error}:t}function ne(e){return Object.keys(e).filter(t=>e[t]._zod.optin===\"optional\"&&e[t]._zod.optout===\"optional\")}var $t={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function y(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function oe(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function b(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function T(e){return typeof e==\"string\"?e:e?.message}function Z(e,t,r){let n=e.message?e.message:T(e.inst?._zod.def?.error?.(e))??T(t?.error?.(e))??T(r.customError?.(e))??T(r.localeError?.(e))??\"Invalid input\",{inst:o,continue:i,input:s,...u}=e;return u.path??(u.path=[]),u.message=n,t?.reportInput&&(u.input=s),u}function B(...e){let[t,r,n]=e;return typeof t==\"string\"?{message:t,code:\"custom\",input:r,inst:n}:{...t}}var ie=(e,t)=>{e.name=\"$ZodError\",Object.defineProperty(e,\"_zod\",{value:e._zod,enumerable:!1}),Object.defineProperty(e,\"issues\",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Q,2),Object.defineProperty(e,\"toString\",{value:()=>e.message,enumerable:!1})},se=l(\"$ZodError\",ie),M=l(\"$ZodError\",ie,{Parent:Error});var Ge=e=>(t,r,n,o)=>{let i=n?{...n,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new $;if(s.issues.length){let u=new(o?.Err??e)(s.issues.map(c=>Z(c,i,v())));throw L(u,o?.callee),u}return s.value},w=Ge(M),Je=e=>async(t,r,n,o)=>{let i=n?{...n,async:!0}:{async:!0},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let u=new(o?.Err??e)(s.issues.map(c=>Z(c,i,v())));throw L(u,o?.callee),u}return s.value},k=Je(M),qe=e=>(t,r,n)=>{let o=n?{...n,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},o);if(i instanceof Promise)throw new $;return i.issues.length?{success:!1,error:new(e??se)(i.issues.map(s=>Z(s,o,v())))}:{success:!0,data:i.value}},I=qe(M),Xe=e=>async(t,r,n)=>{let o=n?{...n,async:!0}:{async:!0},i=t._zod.run({value:r,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>Z(s,o,v())))}:{success:!0,data:i.value}},S=Xe(M);var Ye=\"(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))\",He=new RegExp(`^${Ye}$`);var ue=e=>{let t=e?`[\\\\s\\\\S]{${e?.minimum??0},${e?.maximum??\"\"}}`:\"[\\\\s\\\\S]*\";return new RegExp(`^${t}$`)};var ce=/^-?\\d+(?:\\.\\d+)?$/;var V=l(\"$ZodCheck\",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])});var pe={major:4,minor:4,patch:3};var h=l(\"$ZodType\",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=pe;let n=[...e._zod.def.checks??[]];e._zod.traits.has(\"$ZodCheck\")&&n.unshift(e);for(let o of n)for(let i of o._zod.onattach)i(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let o=(s,u,c)=>{let a=y(s),p;for(let f of u){if(f._zod.def.when){if(oe(s)||!f._zod.def.when(s))continue}else if(a)continue;let d=s.issues.length,m=f._zod.check(s);if(m instanceof Promise&&c?.async===!1)throw new $;if(p||m instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await m,s.issues.length!==d&&(a||(a=y(s,d)))});else{if(s.issues.length===d)continue;a||(a=y(s,d))}}return p?p.then(()=>s):s},i=(s,u,c)=>{if(y(s))return s.aborted=!0,s;let a=o(u,n,c);if(a instanceof Promise){if(c.async===!1)throw new $;return a.then(p=>e._zod.parse(p,c))}return e._zod.parse(a,c)};e._zod.run=(s,u)=>{if(u.skipChecks)return e._zod.parse(s,u);if(u.direction===\"backward\"){let a=e._zod.parse({value:s.value,issues:[]},{...u,skipChecks:!0});return a instanceof Promise?a.then(p=>i(p,s,u)):i(a,s,u)}let c=e._zod.parse(s,u);if(c instanceof Promise){if(u.async===!1)throw new $;return c.then(a=>o(a,n,u))}return o(c,n,u)}}_(e,\"~standard\",()=>({validate:o=>{try{let i=I(e,o);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return S(e,o).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:\"zod\",version:1}))}),xe=l(\"$ZodString\",(e,t)=>{h.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??ue(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value==\"string\"||r.issues.push({expected:\"string\",code:\"invalid_type\",input:r.value,inst:e}),r}});var ge=l(\"$ZodUnknown\",(e,t)=>{h.init(e,t),e._zod.parse=r=>r}),ze=l(\"$ZodNever\",(e,t)=>{h.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:\"never\",code:\"invalid_type\",input:r.value,inst:e}),r)});function le(e,t,r){e.issues.length&&t.issues.push(...b(r,e.issues)),t.value[r]=e.value}var $e=l(\"$ZodArray\",(e,t)=>{h.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!Array.isArray(o))return r.issues.push({expected:\"array\",code:\"invalid_type\",input:o,inst:e}),r;r.value=Array(o.length);let i=[];for(let s=0;s<o.length;s++){let u=o[s],c=t.element._zod.run({value:u,issues:[]},n);c instanceof Promise?i.push(c.then(a=>le(a,r,s))):le(c,r,s)}return i.length?Promise.all(i).then(()=>r):r}});function R(e,t,r,n,o,i){let s=r in n;if(e.issues.length){if(o&&i&&!s)return;t.issues.push(...b(r,e.issues))}if(!s&&!o){e.issues.length||t.issues.push({code:\"invalid_type\",expected:\"nonoptional\",input:void 0,path:[r]});return}e.value===void 0?s&&(t.value[r]=void 0):t.value[r]=e.value}function et(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(\"$ZodType\"))throw new Error(`Invalid element at key \"${n}\": expected a Zod schema`);let r=ne(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function tt(e,t,r,n,o,i){let s=[],u=o.keySet,c=o.catchall._zod,a=c.def.type,p=c.optin===\"optional\",f=c.optout===\"optional\";for(let d in t){if(d===\"__proto__\"||u.has(d))continue;if(a===\"never\"){s.push(d);continue}let m=c.run({value:t[d],issues:[]},n);m instanceof Promise?e.push(m.then(z=>R(z,r,d,t,p,f))):R(m,r,d,t,p,f)}return s.length&&r.issues.push({code:\"unrecognized_keys\",keys:s,input:t,inst:i}),e.length?Promise.all(e).then(()=>r):r}var ve=l(\"$ZodObject\",(e,t)=>{if(h.init(e,t),!Object.getOwnPropertyDescriptor(t,\"shape\")?.get){let u=t.shape;Object.defineProperty(t,\"shape\",{get:()=>{let c={...u};return Object.defineProperty(t,\"shape\",{value:c}),c}})}let n=D(()=>et(t));_(e._zod,\"propValues\",()=>{let u=t.shape,c={};for(let a in u){let p=u[a]._zod;if(p.values){c[a]??(c[a]=new Set);for(let f of p.values)c[a].add(f)}}return c});let o=A,i=t.catchall,s;e._zod.parse=(u,c)=>{s??(s=n.value);let a=u.value;if(!o(a))return u.issues.push({expected:\"object\",code:\"invalid_type\",input:a,inst:e}),u;u.value={};let p=[],f=s.shape;for(let d of s.keys){let m=f[d],z=m._zod.optin===\"optional\",q=m._zod.optout===\"optional\",N=m._zod.run({value:a[d],issues:[]},c);N instanceof Promise?p.push(N.then(We=>R(We,u,d,a,z,q))):R(N,u,d,a,z,q)}return i?tt(p,a,u,c,n.value,e):p.length?Promise.all(p).then(()=>u):u}});function fe(e,t,r,n){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let o=e.filter(i=>!y(i));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:\"invalid_union\",input:t.value,inst:r,errors:e.map(i=>i.issues.map(s=>Z(s,n,v())))}),t)}var be=l(\"$ZodUnion\",(e,t)=>{h.init(e,t),_(e._zod,\"optin\",()=>t.options.some(n=>n._zod.optin===\"optional\")?\"optional\":void 0),_(e._zod,\"optout\",()=>t.options.some(n=>n._zod.optout===\"optional\")?\"optional\":void 0),_(e._zod,\"values\",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),_(e._zod,\"pattern\",()=>{if(t.options.every(n=>n._zod.pattern)){let n=t.options.map(o=>o._zod.pattern);return new RegExp(`^(${n.map(o=>ee(o.source)).join(\"|\")})$`)}});let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(n,o)=>{if(r)return r(n,o);let i=!1,s=[];for(let u of t.options){let c=u._zod.run({value:n.value,issues:[]},o);if(c instanceof Promise)s.push(c),i=!0;else{if(c.issues.length===0)return c;s.push(c)}}return i?Promise.all(s).then(u=>fe(u,n,e,o)):fe(s,n,e,o)}});var Ze=l(\"$ZodDiscriminatedUnion\",(e,t)=>{t.inclusive=!1,be.init(e,t);let r=e._zod.parse;_(e._zod,\"propValues\",()=>{let o={};for(let i of t.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index \"${t.options.indexOf(i)}\"`);for(let[u,c]of Object.entries(s)){o[u]||(o[u]=new Set);for(let a of c)o[u].add(a)}}return o});let n=D(()=>{let o=t.options,i=new Map;for(let s of o){let u=s._zod.propValues?.[t.discriminator];if(!u||u.size===0)throw new Error(`Invalid discriminated union option at index \"${t.options.indexOf(s)}\"`);for(let c of u){if(i.has(c))throw new Error(`Duplicate discriminator value \"${String(c)}\"`);i.set(c,s)}}return i});e._zod.parse=(o,i)=>{let s=o.value;if(!A(s))return o.issues.push({code:\"invalid_type\",expected:\"object\",input:s,inst:e}),o;let u=n.value.get(s?.[t.discriminator]);return u?u._zod.run(o,i):t.unionFallback||i.direction===\"backward\"?r(o,i):(o.issues.push({code:\"invalid_union\",errors:[],note:\"No matching discriminator\",discriminator:t.discriminator,options:Array.from(n.value.keys()),input:s,path:[t.discriminator],inst:e}),o)}});var W=l(\"$ZodTuple\",(e,t)=>{h.init(e,t);let r=t.items;e._zod.parse=(n,o)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({input:i,inst:e,expected:\"tuple\",code:\"invalid_type\"}),n;n.value=[];let s=[],u=de(r,\"optin\"),c=de(r,\"optout\");if(!t.rest){if(i.length<u)return n.issues.push({code:\"too_small\",minimum:u,inclusive:!0,input:i,inst:e,origin:\"array\"}),n;i.length>r.length&&n.issues.push({code:\"too_big\",maximum:r.length,inclusive:!0,input:i,inst:e,origin:\"array\"})}let a=new Array(r.length);for(let p=0;p<r.length;p++){let f=r[p]._zod.run({value:i[p],issues:[]},o);f instanceof Promise?s.push(f.then(d=>{a[p]=d})):a[p]=f}if(t.rest){let p=r.length-1,f=i.slice(r.length);for(let d of f){p++;let m=t.rest._zod.run({value:d,issues:[]},o);m instanceof Promise?s.push(m.then(z=>me(z,n,p))):me(m,n,p)}}return s.length?Promise.all(s).then(()=>he(a,n,r,i,c)):he(a,n,r,i,c)}});function de(e,t){for(let r=e.length-1;r>=0;r--)if(e[r]._zod[t]!==\"optional\")return r+1;return 0}function me(e,t,r){e.issues.length&&t.issues.push(...b(r,e.issues)),t.value[r]=e.value}function he(e,t,r,n,o){for(let i=0;i<r.length;i++){let s=e[i],u=i<n.length;if(s.issues.length){if(!u&&i>=o){t.value.length=i;break}t.issues.push(...b(i,s.issues))}t.value[i]=s.value}for(let i=t.value.length-1;i>=n.length&&(r[i]._zod.optout===\"optional\"&&t.value[i]===void 0);i--)t.value.length=i;return t}var ye=l(\"$ZodRecord\",(e,t)=>{h.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!te(o))return r.issues.push({expected:\"record\",code:\"invalid_type\",input:o,inst:e}),r;let i=[],s=t.keyType._zod.values;if(s){r.value={};let u=new Set;for(let a of s)if(typeof a==\"string\"||typeof a==\"number\"||typeof a==\"symbol\"){u.add(typeof a==\"number\"?a.toString():a);let p=t.keyType._zod.run({value:a,issues:[]},n);if(p instanceof Promise)throw new Error(\"Async schemas not supported in object keys currently\");if(p.issues.length){r.issues.push({code:\"invalid_key\",origin:\"record\",issues:p.issues.map(m=>Z(m,n,v())),input:a,path:[a],inst:e});continue}let f=p.value,d=t.valueType._zod.run({value:o[a],issues:[]},n);d instanceof Promise?i.push(d.then(m=>{m.issues.length&&r.issues.push(...b(a,m.issues)),r.value[f]=m.value})):(d.issues.length&&r.issues.push(...b(a,d.issues)),r.value[f]=d.value)}let c;for(let a in o)u.has(a)||(c=c??[],c.push(a));c&&c.length>0&&r.issues.push({code:\"unrecognized_keys\",input:o,inst:e,keys:c})}else{r.value={};for(let u of Reflect.ownKeys(o)){if(u===\"__proto__\"||!Object.prototype.propertyIsEnumerable.call(o,u))continue;let c=t.keyType._zod.run({value:u,issues:[]},n);if(c instanceof Promise)throw new Error(\"Async schemas not supported in object keys currently\");if(typeof u==\"string\"&&ce.test(u)&&c.issues.length){let f=t.keyType._zod.run({value:Number(u),issues:[]},n);if(f instanceof Promise)throw new Error(\"Async schemas not supported in object keys currently\");f.issues.length===0&&(c=f)}if(c.issues.length){t.mode===\"loose\"?r.value[u]=o[u]:r.issues.push({code:\"invalid_key\",origin:\"record\",issues:c.issues.map(f=>Z(f,n,v())),input:u,path:[u],inst:e});continue}let p=t.valueType._zod.run({value:o[u],issues:[]},n);p instanceof Promise?i.push(p.then(f=>{f.issues.length&&r.issues.push(...b(u,f.issues)),r.value[c.value]=f.value})):(p.issues.length&&r.issues.push(...b(u,p.issues)),r.value[c.value]=p.value)}}return i.length?Promise.all(i).then(()=>r):r}});var we=l(\"$ZodEnum\",(e,t)=>{h.init(e,t);let r=H(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(o=>re.has(typeof o)).map(o=>typeof o==\"string\"?C(o):o.toString()).join(\"|\")})$`),e._zod.parse=(o,i)=>{let s=o.value;return n.has(s)||o.issues.push({code:\"invalid_value\",values:r,input:s,inst:e}),o}}),ke=l(\"$ZodLiteral\",(e,t)=>{if(h.init(e,t),t.values.length===0)throw new Error(\"Cannot create literal schema with no valid values\");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n==\"string\"?C(n):n?C(n.toString()):String(n)).join(\"|\")})$`),e._zod.parse=(n,o)=>{let i=n.value;return r.has(i)||n.issues.push({code:\"invalid_value\",values:t.values,input:i,inst:e}),n}});var Pe=l(\"$ZodFunction\",(e,t)=>(h.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!=\"function\")throw new Error(\"implement() must be called with a function\");return function(...n){let o=e._def.input?w(e._def.input,n):n,i=Reflect.apply(r,this,o);return e._def.output?w(e._def.output,i):i}},e.implementAsync=r=>{if(typeof r!=\"function\")throw new Error(\"implementAsync() must be called with a function\");return async function(...n){let o=e._def.input?await k(e._def.input,n):n,i=await Reflect.apply(r,this,o);return e._def.output?await k(e._def.output,i):i}},e._zod.parse=(r,n)=>typeof r.value!=\"function\"?(r.issues.push({code:\"invalid_type\",expected:\"function\",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type===\"promise\"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let n=e.constructor;return Array.isArray(r[0])?new n({type:\"function\",input:new W({type:\"tuple\",items:r[0],rest:r[1]}),output:e._def.output}):new n({type:\"function\",input:r[0],output:e._def.output})},e.output=r=>{let n=e.constructor;return new n({type:\"function\",input:e._def.input,output:r})},e)),Ae=l(\"$ZodPromise\",(e,t)=>{h.init(e,t),e._zod.parse=(r,n)=>Promise.resolve(r.value).then(o=>t.innerType._zod.run({value:o,issues:[]},n))}),Ee=l(\"$ZodLazy\",(e,t)=>{h.init(e,t),_(e._zod,\"innerType\",()=>{let r=t;return r._cachedInner||(r._cachedInner=t.getter()),r._cachedInner}),_(e._zod,\"pattern\",()=>e._zod.innerType?._zod?.pattern),_(e._zod,\"propValues\",()=>e._zod.innerType?._zod?.propValues),_(e._zod,\"optin\",()=>e._zod.innerType?._zod?.optin??void 0),_(e._zod,\"optout\",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,n)=>e._zod.innerType._zod.run(r,n)}),Me=l(\"$ZodCustom\",(e,t)=>{V.init(e,t),h.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(i=>_e(i,r,n,e));_e(o,r,n,e)}});function _e(e,t,r,n){if(!e){let o={code:\"custom\",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),t.issues.push(B(o))}}function Ie(e,t){return new e({type:\"string\",...x(t)})}function Se(e){return new e({type:\"unknown\"})}function Te(e,t){return new e({type:\"never\",...x(t)})}function Ce(e,t,r){let n=x(r);return n.abort??(n.abort=!0),new e({type:\"custom\",check:\"custom\",fn:t,...n})}var g=l(\"ZodMiniType\",(e,t)=>{if(!e._zod)throw new Error(\"Uninitialized schema in ZodMiniType.\");h.init(e,t),e.def=t,e.type=t.type,e.parse=(r,n)=>w(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>I(e,r,n),e.parseAsync=async(r,n)=>k(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>S(e,r,n),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(n=>typeof n==\"function\"?{_zod:{check:n,def:{check:\"custom\"},onattach:[]}}:n)]},{parent:!0}),e.with=e.check,e.clone=(r,n)=>U(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.apply=r=>r(e)}),ot=l(\"ZodMiniString\",(e,t)=>{xe.init(e,t),g.init(e,t)});function O(e){return Ie(ot,e)}var it=l(\"ZodMiniUnknown\",(e,t)=>{ge.init(e,t),g.init(e,t)});function P(){return Se(it)}var st=l(\"ZodMiniNever\",(e,t)=>{ze.init(e,t),g.init(e,t)});function ut(e){return Te(st,e)}var ct=l(\"ZodMiniArray\",(e,t)=>{$e.init(e,t),g.init(e,t)});function K(e,t){return new ct({type:\"array\",element:e,...x(t)})}var Oe=l(\"ZodMiniObject\",(e,t)=>{ve.init(e,t),g.init(e,t),_(e,\"shape\",()=>t.shape)});function Ne(e,t){let r={type:\"object\",shape:e??{},...x(t)};return new Oe(r)}function G(e,t){return new Oe({type:\"object\",shape:e,catchall:ut(),...x(t)})}var at=l(\"ZodMiniDiscriminatedUnion\",(e,t)=>{Ze.init(e,t),g.init(e,t)});function je(e,t,r){return new at({type:\"union\",options:t,discriminator:e,...x(r)})}var pt=l(\"ZodMiniTuple\",(e,t)=>{W.init(e,t),g.init(e,t)});function lt(e,t,r){let n=t instanceof h,o=n?r:t,i=n?t:null;return new pt({type:\"tuple\",items:e,rest:i,...x(o)})}var Re=l(\"ZodMiniRecord\",(e,t)=>{ye.init(e,t),g.init(e,t)});function Fe(e,t,r){return!t||!t._zod?new Re({type:\"record\",keyType:O(),valueType:e,...x(t)}):new Re({type:\"record\",keyType:e,valueType:t,...x(r)})}var ft=l(\"ZodMiniEnum\",(e,t)=>{we.init(e,t),g.init(e,t),e.options=Object.values(t.entries)});function De(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new ft({type:\"enum\",entries:r,...x(t)})}var dt=l(\"ZodMiniLiteral\",(e,t)=>{ke.init(e,t),g.init(e,t)});function J(e,t){return new dt({type:\"literal\",values:Array.isArray(e)?e:[e],...x(t)})}var mt=l(\"ZodMiniLazy\",(e,t)=>{Ee.init(e,t),g.init(e,t)});function Le(e){return new mt({type:\"lazy\",getter:e})}var ht=l(\"ZodMiniPromise\",(e,t)=>{Ae.init(e,t),g.init(e,t)});function Ue(e){return new ht({type:\"promise\",innerType:e})}var _t=l(\"ZodMiniCustom\",(e,t)=>{Me.init(e,t),g.init(e,t)});function xt(e,t){return Ce(_t,e??(()=>!0),t)}function Be(e,t={}){let r=xt(n=>n instanceof e,t);return r._zod.bag.Class=e,r._zod.check=n=>{n.value instanceof e||n.issues.push({code:\"invalid_type\",expected:e.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]})},r}var gt=l(\"ZodMiniFunction\",(e,t)=>{Pe.init(e,t),g.init(e,t)});function Ve(e){return new gt({type:\"function\",input:Array.isArray(e?.input)?lt(e?.input):e?.input??K(P()),output:e?.output??P()})}var zt=Le(()=>Fe(O(),Be(Object)));function $o(e){let t=je(\"kind\",[G({kind:J(\"result\"),value:P()}),G({kind:J(\"local_refusal\"),code:De(e)})]);class r extends Error{constructor(u){super(`App binding refused: ${u}`);this.code=u}code;name=\"AppInstanceError\"}let n=i=>t.parse(i),o=i=>{let s=t.parse(i);if(s.kind===\"local_refusal\")throw new r(s.code);return s.value};return{decode:n,wrap(i){return Object.fromEntries(Object.entries(zt.parse(i)).map(([s,u])=>[s,new Proxy({},{get(c,a){let p=O().safeParse(a);if(!(!p.success||p.data===\"then\"))return async(...f)=>{let d=Ve({input:K(P()),output:Ue(P())}),m=Ne({[p.data]:d}).parse(Object.create(u))[p.data];if(m===void 0)throw new Error(\"App binding method unavailable\");return o(await m.apply(u,[...f]))}}})]))}}}export{$o as createFrameBindingWire};\n";
|
|
@@ -12,7 +12,7 @@ export type FrameBindingReply<Value> = Readonly<{
|
|
|
12
12
|
export type FrameBindingWire<Methods> = {
|
|
13
13
|
[Name in keyof Methods]: Methods[Name] extends (...args: infer Args) => Promise<infer Value> ? (...args: Args) => Promise<FrameBindingReply<Value>> : never;
|
|
14
14
|
};
|
|
15
|
-
declare const frameStubsSchema: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniCustom<Object, Object
|
|
15
|
+
declare const frameStubsSchema: z.ZodMiniLazy<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniCustom<Object, Object>>>;
|
|
16
16
|
type FrameBindingStubs = z.output<typeof frameStubsSchema>;
|
|
17
17
|
/** The host supplies its one closed refusal vocabulary to both copies of this decoder. */
|
|
18
18
|
export declare function createFrameBindingWire<const Codes extends readonly [string, ...string[]]>(codes: Codes): {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as z from "zod/mini";
|
|
2
|
-
const frameStubsSchema = z.record(z.string(), z.instanceof(Object));
|
|
2
|
+
const frameStubsSchema = z.lazy(() => z.record(z.string(), z.instanceof(Object)));
|
|
3
3
|
/** The host supplies its one closed refusal vocabulary to both copies of this decoder. */
|
|
4
4
|
export function createFrameBindingWire(codes) {
|
|
5
5
|
const replySchema = z.discriminatedUnion("kind", [
|
package/dist/git-journal.js
CHANGED
|
@@ -5,10 +5,10 @@ import { appGitPushFactSchema, } from "@fungi.computer/agar/git";
|
|
|
5
5
|
import { backgroundWakeSchema, } from "@fungi.computer/puffball/background-replay";
|
|
6
6
|
import { createPost, definePostRoute, } from "@fungi.computer/carrier/post";
|
|
7
7
|
import { Watchdog, } from "@fungi.computer/watchdog";
|
|
8
|
-
const storedFact = z.strictObject({ fact: z.string() });
|
|
9
|
-
const storedEpoch = z.strictObject({
|
|
8
|
+
const storedFact = z.lazy(() => z.strictObject({ fact: z.string() }));
|
|
9
|
+
const storedEpoch = z.lazy(() => z.strictObject({
|
|
10
10
|
epoch: z.number().int().positive().max(Number.MAX_SAFE_INTEGER),
|
|
11
|
-
});
|
|
11
|
+
}));
|
|
12
12
|
const syncKey = (installationId, lane, epoch) => `appsync:${createHash("sha256")
|
|
13
13
|
.update(JSON.stringify([installationId, lane, epoch]))
|
|
14
14
|
.digest("hex")}`;
|
|
@@ -16,7 +16,7 @@ const syncKey = (installationId, lane, epoch) => `appsync:${createHash("sha256")
|
|
|
16
16
|
export function backgroundWakeKey(wake) {
|
|
17
17
|
return syncKey(wake.installationId, wake.lane, wake.epoch);
|
|
18
18
|
}
|
|
19
|
-
const installationIdSchema = z.string().min(1).max(256);
|
|
19
|
+
const installationIdSchema = z.lazy(() => z.string().min(1).max(256));
|
|
20
20
|
const postKey = (installationId, eventId) => `gitpush:${createHash("sha256")
|
|
21
21
|
.update(JSON.stringify([installationId, eventId]))
|
|
22
22
|
.digest("hex")}`;
|
package/dist/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ import type { AppApi } from "@fungi.computer/puffball";
|
|
|
10
10
|
import type { InvocationFrame } from "./invocation.js";
|
|
11
11
|
import type { Installation } from "./apps/installation.js";
|
|
12
12
|
import { type GillCall, type GillReply } from "@fungi.computer/gills";
|
|
13
|
+
export { agentAvatarProjectionSchema, agentAvatarSchema, avatarFromProjection, createAgentAvatarStore, type AgentAvatarStore, } from "./agent-avatars.js";
|
|
13
14
|
/** The Cairn ID family that mints and recognizes App Instance IDs (`instance_…`). */
|
|
14
15
|
export declare const instanceIds: Readonly<{
|
|
15
16
|
readonly instance: import("@fungi.computer/cairn").IdCodec<"app-instance", "instance", 1>;
|
package/dist/index.js
CHANGED
|
@@ -8,6 +8,7 @@ import { releaseIdSchema, appIdSchema } from "@fungi.computer/puffball/effect";
|
|
|
8
8
|
import { appFacetRequest, appFacetResponse } from "./backend-request.js";
|
|
9
9
|
import { appApiSchema } from "@fungi.computer/puffball/app";
|
|
10
10
|
import { gillCallSchema, gillReplySchema, } from "@fungi.computer/gills";
|
|
11
|
+
export { agentAvatarProjectionSchema, agentAvatarSchema, avatarFromProjection, createAgentAvatarStore, } from "./agent-avatars.js";
|
|
11
12
|
/** The Cairn ID family that mints and recognizes App Instance IDs (`instance_…`). */
|
|
12
13
|
export const instanceIds = defineIdFamily({
|
|
13
14
|
family: "app-instance",
|
|
@@ -8,7 +8,7 @@ export declare const installationConsentSchema: Schema.Struct<{
|
|
|
8
8
|
readonly artifactDigest: Schema.refine<import("@fungi.computer/puffball").Sha256Digest, Schema.String>;
|
|
9
9
|
readonly capabilities: Schema.$Array<Schema.Struct<{
|
|
10
10
|
readonly request: Schema.Struct<{
|
|
11
|
-
readonly capability: Schema.Literals<readonly ["agent.list", "agent.manage", "agent.rename", "agent.toolPolicy", "agent.read", "agent.send", "computer.list", "computer.readFile", "computer.writeFile", "computer.execute", "llm.generation", "media.generation", "games:servers", "git.repository", "apps.open", "apps.call", "app.storage", "app.events.emit", "team.workbenchHost", "marketplace.browse", "marketplace.purchase", "workflow.run", "workflow.publish", "workflow.arm", "world", "channels.read", "channels.personal.manage"]>;
|
|
11
|
+
readonly capability: Schema.Literals<readonly ["agent.list", "agent.manage", "agent.rename", "agent.avatar", "agent.toolPolicy", "agent.read", "agent.send", "computer.list", "computer.readFile", "computer.writeFile", "computer.execute", "llm.generation", "media.generation", "games:servers", "git.repository", "apps.open", "apps.call", "app.storage", "app.events.emit", "team.workbenchHost", "marketplace.browse", "marketplace.purchase", "workflow.run", "workflow.publish", "workflow.arm", "world", "channels.read", "channels.personal.manage"]>;
|
|
12
12
|
readonly operations: Schema.$Array<Schema.String>;
|
|
13
13
|
readonly resources: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
14
14
|
}>;
|
|
@@ -22,6 +22,7 @@ export declare const capabilityLabels: {
|
|
|
22
22
|
"agent.list": string;
|
|
23
23
|
"agent.manage": string;
|
|
24
24
|
"agent.rename": string;
|
|
25
|
+
"agent.avatar": string;
|
|
25
26
|
"agent.toolPolicy": string;
|
|
26
27
|
"agent.read": string;
|
|
27
28
|
"agent.send": string;
|
|
@@ -52,6 +53,7 @@ export declare const capabilityDescriptions: {
|
|
|
52
53
|
"agent.list": string;
|
|
53
54
|
"agent.manage": string;
|
|
54
55
|
"agent.rename": string;
|
|
56
|
+
"agent.avatar": string;
|
|
55
57
|
"agent.toolPolicy": string;
|
|
56
58
|
"agent.read": string;
|
|
57
59
|
"agent.send": string;
|
|
@@ -25,6 +25,7 @@ export const capabilityLabels = {
|
|
|
25
25
|
"agent.list": "List Agents",
|
|
26
26
|
"agent.manage": "Create and manage Agents",
|
|
27
27
|
"agent.rename": "Rename Agents",
|
|
28
|
+
"agent.avatar": "Change Agent avatars",
|
|
28
29
|
"agent.toolPolicy": "Allow Agents to use Apps",
|
|
29
30
|
"agent.read": "Read Agent conversations",
|
|
30
31
|
"agent.send": "Send messages to Agents",
|
|
@@ -55,6 +56,7 @@ export const capabilityDescriptions = {
|
|
|
55
56
|
"agent.list": "see which Agents are available.",
|
|
56
57
|
"agent.manage": "create Agents and manage their sessions.",
|
|
57
58
|
"agent.rename": "rename Agents you created.",
|
|
59
|
+
"agent.avatar": "change the avatars of Agents you created.",
|
|
58
60
|
"agent.toolPolicy": "approve Agents to use your installed Apps.",
|
|
59
61
|
"agent.read": "read Agent conversations.",
|
|
60
62
|
"agent.send": "send messages to Agents.",
|
package/dist/page/mount.d.ts
CHANGED
|
@@ -30,11 +30,9 @@ export declare const oysterAppConfigSchema: Schema.Struct<{
|
|
|
30
30
|
keybind?: string | undefined;
|
|
31
31
|
}>) | undefined;
|
|
32
32
|
help?: Readonly<{
|
|
33
|
-
order
|
|
34
|
-
/** Role and App opens, routed by the embedding shell; the App never names a surface. */
|
|
35
|
-
? /** Role and App opens, routed by the embedding shell; the App never names a surface. */: number | undefined;
|
|
33
|
+
order?: number | undefined;
|
|
36
34
|
}> | undefined;
|
|
37
|
-
menu
|
|
35
|
+
menu? /** Which App that role's open would reach, or null when none fills it. */: Readonly<{
|
|
38
36
|
order?: number | undefined;
|
|
39
37
|
}> | undefined;
|
|
40
38
|
palette?: Readonly<{
|
|
@@ -64,11 +62,9 @@ export declare const oysterAppConfigSchema: Schema.Struct<{
|
|
|
64
62
|
keybind?: string | undefined;
|
|
65
63
|
}>) | undefined;
|
|
66
64
|
help?: Readonly<{
|
|
67
|
-
order
|
|
68
|
-
/** Role and App opens, routed by the embedding shell; the App never names a surface. */
|
|
69
|
-
? /** Role and App opens, routed by the embedding shell; the App never names a surface. */: number | undefined;
|
|
65
|
+
order?: number | undefined;
|
|
70
66
|
}> | undefined;
|
|
71
|
-
menu
|
|
67
|
+
menu? /** Which App that role's open would reach, or null when none fills it. */: Readonly<{
|
|
72
68
|
order?: number | undefined;
|
|
73
69
|
}> | undefined;
|
|
74
70
|
palette?: Readonly<{
|