@vibesdotdev/vessel 0.0.0-stage → 1.0.0-rc.2
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/LICENSE +18 -0
- package/README.md +90 -2
- package/dist/apps/filesystem.vessel.plugin.d.ts +307 -0
- package/dist/apps/filesystem.vessel.plugin.d.ts.map +1 -0
- package/dist/apps/filesystem.vessel.plugin.js +134 -0
- package/dist/apps/filesystem.vessel.plugin.js.map +1 -0
- package/dist/apps/storage.vessel.plugin.d.ts +318 -0
- package/dist/apps/storage.vessel.plugin.d.ts.map +1 -0
- package/dist/apps/storage.vessel.plugin.js +132 -0
- package/dist/apps/storage.vessel.plugin.js.map +1 -0
- package/dist/apps/terminal.vessel.plugin.d.ts +306 -0
- package/dist/apps/terminal.vessel.plugin.d.ts.map +1 -0
- package/dist/apps/terminal.vessel.plugin.js +112 -0
- package/dist/apps/terminal.vessel.plugin.js.map +1 -0
- package/dist/boundary.d.ts +10 -0
- package/dist/boundary.d.ts.map +1 -0
- package/dist/boundary.js +43 -0
- package/dist/boundary.js.map +1 -0
- package/dist/client/helper.d.ts +4 -0
- package/dist/client/helper.d.ts.map +1 -0
- package/dist/client/helper.js +5 -0
- package/dist/client/helper.js.map +1 -0
- package/dist/client/index.d.ts +3 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +3 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/vessel-client.d.ts +39 -0
- package/dist/client/vessel-client.d.ts.map +1 -0
- package/dist/client/vessel-client.js +101 -0
- package/dist/client/vessel-client.js.map +1 -0
- package/dist/docs/vessel.docs.descriptor.d.ts +4 -0
- package/dist/docs/vessel.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/vessel.docs.descriptor.js +96 -0
- package/dist/docs/vessel.docs.descriptor.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -0
- package/dist/kinds.d.ts +24 -0
- package/dist/kinds.d.ts.map +1 -0
- package/dist/kinds.js +78 -0
- package/dist/kinds.js.map +1 -0
- package/dist/launch/cli/descriptor.d.ts +3 -0
- package/dist/launch/cli/descriptor.d.ts.map +1 -0
- package/dist/launch/cli/descriptor.js +24 -0
- package/dist/launch/cli/descriptor.js.map +1 -0
- package/dist/launch/cli/implementation.d.ts +7 -0
- package/dist/launch/cli/implementation.d.ts.map +1 -0
- package/dist/launch/cli/implementation.js +14 -0
- package/dist/launch/cli/implementation.js.map +1 -0
- package/dist/launch/cli/options.d.ts +10 -0
- package/dist/launch/cli/options.d.ts.map +1 -0
- package/dist/launch/cli/options.js +12 -0
- package/dist/launch/cli/options.js.map +1 -0
- package/dist/launch/cli/plugin.d.ts +4 -0
- package/dist/launch/cli/plugin.d.ts.map +1 -0
- package/dist/launch/cli/plugin.js +12 -0
- package/dist/launch/cli/plugin.js.map +1 -0
- package/dist/launch/cli/request.d.ts +23 -0
- package/dist/launch/cli/request.d.ts.map +1 -0
- package/dist/launch/cli/request.js +27 -0
- package/dist/launch/cli/request.js.map +1 -0
- package/dist/launch/ensure-host.d.ts +48 -0
- package/dist/launch/ensure-host.d.ts.map +1 -0
- package/dist/launch/ensure-host.js +54 -0
- package/dist/launch/ensure-host.js.map +1 -0
- package/dist/launch/index.d.ts +9 -0
- package/dist/launch/index.d.ts.map +1 -0
- package/dist/launch/index.js +52 -0
- package/dist/launch/index.js.map +1 -0
- package/dist/launch/plugin.d.ts +6 -0
- package/dist/launch/plugin.d.ts.map +1 -0
- package/dist/launch/plugin.js +20 -0
- package/dist/launch/plugin.js.map +1 -0
- package/dist/launch/schema.d.ts +66 -0
- package/dist/launch/schema.d.ts.map +1 -0
- package/dist/launch/schema.js +71 -0
- package/dist/launch/schema.js.map +1 -0
- package/dist/launch/workspaces.d.ts +134 -0
- package/dist/launch/workspaces.d.ts.map +1 -0
- package/dist/launch/workspaces.js +60 -0
- package/dist/launch/workspaces.js.map +1 -0
- package/dist/module-not-found.d.ts +3 -0
- package/dist/module-not-found.d.ts.map +1 -0
- package/dist/module-not-found.js +18 -0
- package/dist/module-not-found.js.map +1 -0
- package/dist/schemas/platform.config.descriptor.d.ts +34 -0
- package/dist/schemas/platform.config.descriptor.d.ts.map +1 -0
- package/dist/schemas/platform.config.descriptor.js +13 -0
- package/dist/schemas/platform.config.descriptor.js.map +1 -0
- package/dist/schemas.d.ts +2213 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +661 -0
- package/dist/schemas.js.map +1 -0
- package/dist/shell/app-surface.d.ts +55 -0
- package/dist/shell/app-surface.d.ts.map +1 -0
- package/dist/shell/app-surface.js +159 -0
- package/dist/shell/app-surface.js.map +1 -0
- package/dist/shell/dock.d.ts +30 -0
- package/dist/shell/dock.d.ts.map +1 -0
- package/dist/shell/dock.js +75 -0
- package/dist/shell/dock.js.map +1 -0
- package/dist/shell/index.d.ts +11 -0
- package/dist/shell/index.d.ts.map +1 -0
- package/dist/shell/index.js +10 -0
- package/dist/shell/index.js.map +1 -0
- package/dist/shell/launch-resolution.d.ts +49 -0
- package/dist/shell/launch-resolution.d.ts.map +1 -0
- package/dist/shell/launch-resolution.js +163 -0
- package/dist/shell/launch-resolution.js.map +1 -0
- package/dist/shell/layout-grid.d.ts +30 -0
- package/dist/shell/layout-grid.d.ts.map +1 -0
- package/dist/shell/layout-grid.js +56 -0
- package/dist/shell/layout-grid.js.map +1 -0
- package/dist/shell/owner-surface-lifecycle.d.ts +30 -0
- package/dist/shell/owner-surface-lifecycle.d.ts.map +1 -0
- package/dist/shell/owner-surface-lifecycle.js +54 -0
- package/dist/shell/owner-surface-lifecycle.js.map +1 -0
- package/dist/shell/ports.d.ts +107 -0
- package/dist/shell/ports.d.ts.map +1 -0
- package/dist/shell/ports.js +154 -0
- package/dist/shell/ports.js.map +1 -0
- package/dist/shell/types.d.ts +7 -0
- package/dist/shell/types.d.ts.map +1 -0
- package/dist/shell/types.js +2 -0
- package/dist/shell/types.js.map +1 -0
- package/dist/shell/window-manager.d.ts +82 -0
- package/dist/shell/window-manager.d.ts.map +1 -0
- package/dist/shell/window-manager.js +285 -0
- package/dist/shell/window-manager.js.map +1 -0
- package/dist/shell/workspace-memory.d.ts +42 -0
- package/dist/shell/workspace-memory.d.ts.map +1 -0
- package/dist/shell/workspace-memory.js +65 -0
- package/dist/shell/workspace-memory.js.map +1 -0
- package/dist/shell/workspace-state.d.ts +47 -0
- package/dist/shell/workspace-state.d.ts.map +1 -0
- package/dist/shell/workspace-state.js +137 -0
- package/dist/shell/workspace-state.js.map +1 -0
- package/dist/vessel.docs.plugin.d.ts +4 -0
- package/dist/vessel.docs.plugin.d.ts.map +1 -0
- package/dist/vessel.docs.plugin.js +11 -0
- package/dist/vessel.docs.plugin.js.map +1 -0
- package/dist/vessel.plugin.d.ts +3 -0
- package/dist/vessel.plugin.d.ts.map +1 -0
- package/dist/vessel.plugin.js +23 -0
- package/dist/vessel.plugin.js.map +1 -0
- package/dist/vessel.runtime-client.descriptor.d.ts +4 -0
- package/dist/vessel.runtime-client.descriptor.d.ts.map +1 -0
- package/dist/vessel.runtime-client.descriptor.js +13 -0
- package/dist/vessel.runtime-client.descriptor.js.map +1 -0
- package/dist/vessel.workspace-state.plugin.d.ts +4 -0
- package/dist/vessel.workspace-state.plugin.d.ts.map +1 -0
- package/dist/vessel.workspace-state.plugin.js +12 -0
- package/dist/vessel.workspace-state.plugin.js.map +1 -0
- package/dist/vessel.workspace.plugin.d.ts +3 -0
- package/dist/vessel.workspace.plugin.d.ts.map +1 -0
- package/dist/vessel.workspace.plugin.js +17 -0
- package/dist/vessel.workspace.plugin.js.map +1 -0
- package/dist/whiteboard/client.d.ts +35 -0
- package/dist/whiteboard/client.d.ts.map +1 -0
- package/dist/whiteboard/client.js +185 -0
- package/dist/whiteboard/client.js.map +1 -0
- package/dist/whiteboard/descriptor.d.ts +5 -0
- package/dist/whiteboard/descriptor.d.ts.map +1 -0
- package/dist/whiteboard/descriptor.js +14 -0
- package/dist/whiteboard/descriptor.js.map +1 -0
- package/dist/whiteboard/index.d.ts +7 -0
- package/dist/whiteboard/index.d.ts.map +1 -0
- package/dist/whiteboard/index.js +7 -0
- package/dist/whiteboard/index.js.map +1 -0
- package/dist/whiteboard/plugin.d.ts +3 -0
- package/dist/whiteboard/plugin.d.ts.map +1 -0
- package/dist/whiteboard/plugin.js +42 -0
- package/dist/whiteboard/plugin.js.map +1 -0
- package/dist/whiteboard/schemas.d.ts +479 -0
- package/dist/whiteboard/schemas.d.ts.map +1 -0
- package/dist/whiteboard/schemas.js +55 -0
- package/dist/whiteboard/schemas.js.map +1 -0
- package/dist/whiteboard/tools/apply.impl.d.ts +7 -0
- package/dist/whiteboard/tools/apply.impl.d.ts.map +1 -0
- package/dist/whiteboard/tools/apply.impl.js +12 -0
- package/dist/whiteboard/tools/apply.impl.js.map +1 -0
- package/dist/whiteboard/tools/descriptors.d.ts +489 -0
- package/dist/whiteboard/tools/descriptors.d.ts.map +1 -0
- package/dist/whiteboard/tools/descriptors.js +72 -0
- package/dist/whiteboard/tools/descriptors.js.map +1 -0
- package/dist/whiteboard/tools/get.impl.d.ts +7 -0
- package/dist/whiteboard/tools/get.impl.d.ts.map +1 -0
- package/dist/whiteboard/tools/get.impl.js +12 -0
- package/dist/whiteboard/tools/get.impl.js.map +1 -0
- package/dist/whiteboard/tools/open.impl.d.ts +7 -0
- package/dist/whiteboard/tools/open.impl.d.ts.map +1 -0
- package/dist/whiteboard/tools/open.impl.js +12 -0
- package/dist/whiteboard/tools/open.impl.js.map +1 -0
- package/dist/whiteboard/tools/signal.impl.d.ts +7 -0
- package/dist/whiteboard/tools/signal.impl.d.ts.map +1 -0
- package/dist/whiteboard/tools/signal.impl.js +11 -0
- package/dist/whiteboard/tools/signal.impl.js.map +1 -0
- package/dist/whiteboard/vessel-whiteboard.descriptors.d.ts +4 -0
- package/dist/whiteboard/vessel-whiteboard.descriptors.d.ts.map +1 -0
- package/dist/whiteboard/vessel-whiteboard.descriptors.js +61 -0
- package/dist/whiteboard/vessel-whiteboard.descriptors.js.map +1 -0
- package/dist/workspace/vessel-hub.descriptors.d.ts +543 -0
- package/dist/workspace/vessel-hub.descriptors.d.ts.map +1 -0
- package/dist/workspace/vessel-hub.descriptors.js +544 -0
- package/dist/workspace/vessel-hub.descriptors.js.map +1 -0
- package/dist/workspace/vessel-platform.descriptors.d.ts +809 -0
- package/dist/workspace/vessel-platform.descriptors.d.ts.map +1 -0
- package/dist/workspace/vessel-platform.descriptors.js +207 -0
- package/dist/workspace/vessel-platform.descriptors.js.map +1 -0
- package/dist/workspace/vessel-workspace.descriptors.d.ts +537 -0
- package/dist/workspace/vessel-workspace.descriptors.d.ts.map +1 -0
- package/dist/workspace/vessel-workspace.descriptors.js +115 -0
- package/dist/workspace/vessel-workspace.descriptors.js.map +1 -0
- package/dist/workspace-state/index.d.ts +3 -0
- package/dist/workspace-state/index.d.ts.map +1 -0
- package/dist/workspace-state/index.js +3 -0
- package/dist/workspace-state/index.js.map +1 -0
- package/dist/workspace-state/vessel.workspace-state.storage.descriptor.d.ts +51 -0
- package/dist/workspace-state/vessel.workspace-state.storage.descriptor.d.ts.map +1 -0
- package/dist/workspace-state/vessel.workspace-state.storage.descriptor.js +24 -0
- package/dist/workspace-state/vessel.workspace-state.storage.descriptor.js.map +1 -0
- package/package.json +207 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAEN,KAAK,iBAAiB,EACtB,MAAM,wCAAwC,CAAC;AAEhD,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAC3C,eAAO,MAAM,8BAA8B,IAAI,CAAC;AAChD,eAAO,MAAM,qCAAqC,IAAI,CAAC;AAEvD;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,aAOrC,CAAC;AAEH,eAAO,MAAM,0BAA0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,661 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
import { parseVesselValue } from "./boundary.js";
|
|
3
|
+
import { RuntimeDescriptorSchema } from '@vibesdotdev/kernel/schemas/descriptor';
|
|
4
|
+
export const VESSEL_ROUTE_PARAM_LIMIT = 16;
|
|
5
|
+
export const VESSEL_WORKSPACE_RECEIPT_LIMIT = 8;
|
|
6
|
+
export const VESSEL_WORKSPACE_STATE_SCHEMA_VERSION = 1;
|
|
7
|
+
/**
|
|
8
|
+
* Stable host-owned identity for the runtime place pinned to one Vessel window.
|
|
9
|
+
* The place owner resolves this id; Vessel only preserves it without importing
|
|
10
|
+
* runtime-place or leaking it into owner-owned route state.
|
|
11
|
+
*/
|
|
12
|
+
export const vesselRuntimePlaceIdSchema = z
|
|
13
|
+
.string()
|
|
14
|
+
.min(1)
|
|
15
|
+
.max(240)
|
|
16
|
+
.regex(/^[A-Za-z0-9._:-]+$/, 'Runtime place identity may contain only letters, numbers, dot, underscore, colon, and dash.');
|
|
17
|
+
export const vesselPrimitiveValueSchema = z.union([
|
|
18
|
+
z.string().max(512),
|
|
19
|
+
z.number().finite(),
|
|
20
|
+
z.boolean(),
|
|
21
|
+
z.null()
|
|
22
|
+
]);
|
|
23
|
+
const forbiddenPersistedParamKey = /(task|status|priority|assignee|dependency|sync|replica|cloud|native|handle|secret|token|content|body|payload|data)/i;
|
|
24
|
+
const referenceOrPresentationParamKey = /(id|ref|path|route|view|mode|tab|index|line|column|offset|zoom|width|height|^x$|^y$|^cwd$)$/i;
|
|
25
|
+
/**
|
|
26
|
+
* Small, serializable navigation state. Values stay primitive so a return point
|
|
27
|
+
* can hold owner references without becoming a copy of owner-domain records.
|
|
28
|
+
*/
|
|
29
|
+
export const vesselRouteStateSchema = z
|
|
30
|
+
.record(z.string().min(1).max(80), vesselPrimitiveValueSchema)
|
|
31
|
+
.superRefine((state, ctx) => {
|
|
32
|
+
const keys = Object.keys(state);
|
|
33
|
+
if (keys.length > VESSEL_ROUTE_PARAM_LIMIT) {
|
|
34
|
+
ctx.addIssue({
|
|
35
|
+
code: 'custom',
|
|
36
|
+
message: `Route state is limited to ${VESSEL_ROUTE_PARAM_LIMIT} primitive parameters.`
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
for (const key of keys) {
|
|
40
|
+
if (forbiddenPersistedParamKey.test(key) || !referenceOrPresentationParamKey.test(key)) {
|
|
41
|
+
ctx.addIssue({
|
|
42
|
+
code: 'custom',
|
|
43
|
+
path: [key],
|
|
44
|
+
message: `Route parameter '${key}' is not a reference or presentation parameter.`
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
export const vesselOwnerRefSchema = z.object({
|
|
50
|
+
packageName: z.string().min(1),
|
|
51
|
+
entrypoint: z.string().min(1).optional(),
|
|
52
|
+
specPath: z.string().min(1).optional(),
|
|
53
|
+
runtimeKind: z.string().min(1).optional(),
|
|
54
|
+
runtimeId: z.string().min(1).optional()
|
|
55
|
+
});
|
|
56
|
+
export const vesselAppAccentSchema = z.enum([
|
|
57
|
+
'teal',
|
|
58
|
+
'amber',
|
|
59
|
+
'azure',
|
|
60
|
+
'blue',
|
|
61
|
+
'cyan',
|
|
62
|
+
'lime',
|
|
63
|
+
'rose',
|
|
64
|
+
'violet',
|
|
65
|
+
'neutral'
|
|
66
|
+
]);
|
|
67
|
+
/** Semantic identity is always usable without resolving rich artwork. */
|
|
68
|
+
export const vesselAppIdentitySchema = z
|
|
69
|
+
.object({
|
|
70
|
+
glyph: z.string().regex(/^[a-z0-9-]+:[a-z0-9-]+$/, 'Use a namespaced icon token.'),
|
|
71
|
+
artworkId: z.string().min(1).optional(),
|
|
72
|
+
accent: vesselAppAccentSchema.default('neutral')
|
|
73
|
+
})
|
|
74
|
+
.strict();
|
|
75
|
+
const vesselLegacyIconSchema = z
|
|
76
|
+
.object({
|
|
77
|
+
name: z
|
|
78
|
+
.string()
|
|
79
|
+
.regex(/^[a-z0-9-]+:[a-z0-9-]+$/, 'Use a namespaced icon token.')
|
|
80
|
+
.optional(),
|
|
81
|
+
tone: z.enum(['teal', 'amber', 'blue', 'rose', 'neutral']).default('neutral')
|
|
82
|
+
})
|
|
83
|
+
.strict();
|
|
84
|
+
function normalizeLegacyVesselIcon(icon) {
|
|
85
|
+
return vesselAppIdentitySchema.parse({
|
|
86
|
+
glyph: icon?.name ?? 'lucide:box',
|
|
87
|
+
accent: icon?.tone ?? 'neutral'
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
export const vesselAppCategorySchema = z.enum([
|
|
91
|
+
'app',
|
|
92
|
+
'feature',
|
|
93
|
+
'agent',
|
|
94
|
+
'service',
|
|
95
|
+
'tool',
|
|
96
|
+
'settings',
|
|
97
|
+
'docs',
|
|
98
|
+
'runtime',
|
|
99
|
+
'audit'
|
|
100
|
+
]);
|
|
101
|
+
export const vesselWorkLocationSchema = z.enum(['browser', 'computer', 'cloud', 'vessel']);
|
|
102
|
+
export const vesselPlatformComponentRefSchema = z.object({
|
|
103
|
+
id: z.string().min(1),
|
|
104
|
+
version: z.string().min(1).default('latest'),
|
|
105
|
+
origin: z.string().min(1).optional(),
|
|
106
|
+
props: z.record(z.string(), z.unknown()).default({})
|
|
107
|
+
});
|
|
108
|
+
export const vesselLaunchTargetSchema = z.discriminatedUnion('type', [
|
|
109
|
+
z.object({
|
|
110
|
+
type: z.literal('svelte-component'),
|
|
111
|
+
import: z.string().min(1),
|
|
112
|
+
exportName: z.string().min(1).optional()
|
|
113
|
+
}),
|
|
114
|
+
z
|
|
115
|
+
.object({
|
|
116
|
+
type: z.literal('vessel-surface'),
|
|
117
|
+
surfaceId: z.string().min(1),
|
|
118
|
+
initialState: vesselRouteStateSchema.optional()
|
|
119
|
+
})
|
|
120
|
+
.strict(),
|
|
121
|
+
z.object({ type: z.literal('sveltekit-route'), href: z.string().min(1) }),
|
|
122
|
+
z.object({
|
|
123
|
+
type: z.literal('runtime-client'),
|
|
124
|
+
clientId: z.string().min(1),
|
|
125
|
+
view: z.enum(['default', 'inspector']).default('default')
|
|
126
|
+
}),
|
|
127
|
+
z.object({ type: z.literal('tui-app'), route: z.string().min(1) }),
|
|
128
|
+
z.object({ type: z.literal('tool'), toolId: z.string().min(1) }),
|
|
129
|
+
z.object({ type: z.literal('config-manifest'), manifestId: z.string().min(1) }),
|
|
130
|
+
z.object({ type: z.literal('docs-topic'), topicId: z.string().min(1) }),
|
|
131
|
+
z.object({
|
|
132
|
+
type: z.literal('runtime-descriptor'),
|
|
133
|
+
kind: z.string().min(1),
|
|
134
|
+
id: z.string().min(1)
|
|
135
|
+
}),
|
|
136
|
+
z.object({
|
|
137
|
+
type: z.literal('platform-component'),
|
|
138
|
+
componentId: z.string().min(1),
|
|
139
|
+
version: z.string().min(1).default('latest'),
|
|
140
|
+
origin: z.string().min(1).optional(),
|
|
141
|
+
props: z.record(z.string(), z.unknown()).default({})
|
|
142
|
+
}),
|
|
143
|
+
z.object({
|
|
144
|
+
type: z.literal('applet-artifact'),
|
|
145
|
+
artifactId: z.string().min(1),
|
|
146
|
+
componentRef: vesselPlatformComponentRefSchema.optional(),
|
|
147
|
+
browserRuntime: z.boolean().default(false)
|
|
148
|
+
}),
|
|
149
|
+
z.object({ type: z.literal('external-url'), href: z.string().url() })
|
|
150
|
+
]);
|
|
151
|
+
export const vesselAvailabilitySchema = z.object({
|
|
152
|
+
status: z.enum(['available', 'degraded', 'unavailable', 'unknown']).default('unknown'),
|
|
153
|
+
summary: z.string().default('Not checked'),
|
|
154
|
+
lastCheckedAt: z.string().datetime().optional()
|
|
155
|
+
});
|
|
156
|
+
export const vesselWindowDefaultsSchema = z.object({
|
|
157
|
+
width: z.number().int().min(280).default(720),
|
|
158
|
+
height: z.number().int().min(220).default(460),
|
|
159
|
+
x: z.number().int().min(0).default(96),
|
|
160
|
+
y: z.number().int().min(0).default(88),
|
|
161
|
+
minWidth: z.number().int().min(240).default(360),
|
|
162
|
+
minHeight: z.number().int().min(180).default(260)
|
|
163
|
+
});
|
|
164
|
+
export const vesselDefaultWindowDefaults = {
|
|
165
|
+
width: 720,
|
|
166
|
+
height: 460,
|
|
167
|
+
x: 96,
|
|
168
|
+
y: 88,
|
|
169
|
+
minWidth: 360,
|
|
170
|
+
minHeight: 260
|
|
171
|
+
};
|
|
172
|
+
/**
|
|
173
|
+
* Optional I/O ports declared on a vessel/app (xyflow Handles / magnetic wiring).
|
|
174
|
+
* Prefer this over tag heuristics when apps/wrappers know their event schemas.
|
|
175
|
+
* Shape mirrors `vesselAppPortSchema` in shell/ports.ts without a circular import.
|
|
176
|
+
*/
|
|
177
|
+
export const vesselAppPortDeclarationSchema = z.object({
|
|
178
|
+
id: z.string().min(1),
|
|
179
|
+
label: z.string().min(1),
|
|
180
|
+
direction: z.enum(['input', 'output']),
|
|
181
|
+
schema: z
|
|
182
|
+
.object({
|
|
183
|
+
mediaType: z.string().min(1).default('application/json'),
|
|
184
|
+
schemaId: z.string().min(1).optional(),
|
|
185
|
+
shape: z.enum(['any', 'text', 'json', 'event', 'stream', 'binary']).default('any')
|
|
186
|
+
})
|
|
187
|
+
.default({ mediaType: 'application/json', shape: 'any' }),
|
|
188
|
+
multiple: z.boolean().default(true),
|
|
189
|
+
required: z.boolean().default(false)
|
|
190
|
+
});
|
|
191
|
+
export const vesselAppDescriptorSchema = RuntimeDescriptorSchema.extend({
|
|
192
|
+
kind: z.literal('vessel/app'),
|
|
193
|
+
name: z.string().min(1),
|
|
194
|
+
description: z.string().default(''),
|
|
195
|
+
owner: vesselOwnerRefSchema,
|
|
196
|
+
identity: vesselAppIdentitySchema.optional(),
|
|
197
|
+
/** @deprecated Transitional ingress only. New owner descriptors use `identity`. */
|
|
198
|
+
icon: vesselLegacyIconSchema.optional(),
|
|
199
|
+
category: vesselAppCategorySchema,
|
|
200
|
+
launch: vesselLaunchTargetSchema,
|
|
201
|
+
availability: vesselAvailabilitySchema.default({ status: 'unknown', summary: 'Not checked' }),
|
|
202
|
+
defaultWindow: vesselWindowDefaultsSchema.default(vesselDefaultWindowDefaults),
|
|
203
|
+
tags: z.array(z.string()).default([]),
|
|
204
|
+
workLocations: z.array(vesselWorkLocationSchema).default([]),
|
|
205
|
+
readinessAreaIds: z.array(z.string()).default([]),
|
|
206
|
+
setupStepIds: z.array(z.string()).default([]),
|
|
207
|
+
/** Declared I/O ports (preferred). When set, replaces tag-heuristic extras. */
|
|
208
|
+
ports: z.array(vesselAppPortDeclarationSchema).optional()
|
|
209
|
+
}).transform(({ icon, ...app }) => ({
|
|
210
|
+
...app,
|
|
211
|
+
identity: app.identity ?? normalizeLegacyVesselIcon(icon)
|
|
212
|
+
}));
|
|
213
|
+
export const vesselEvidenceSchema = z.discriminatedUnion('type', [
|
|
214
|
+
z.object({
|
|
215
|
+
type: z.literal('runtime-query'),
|
|
216
|
+
kind: z.string().min(1),
|
|
217
|
+
id: z.string().optional(),
|
|
218
|
+
resultSummary: z.string().min(1)
|
|
219
|
+
}),
|
|
220
|
+
z.object({
|
|
221
|
+
type: z.literal('command'),
|
|
222
|
+
cwd: z.string().min(1),
|
|
223
|
+
command: z.string().min(1),
|
|
224
|
+
exitCode: z.number().int(),
|
|
225
|
+
summary: z.string().min(1)
|
|
226
|
+
}),
|
|
227
|
+
z.object({
|
|
228
|
+
type: z.literal('http'),
|
|
229
|
+
method: z.string().min(1),
|
|
230
|
+
url: z.string().min(1),
|
|
231
|
+
status: z.number().int(),
|
|
232
|
+
summary: z.string().min(1)
|
|
233
|
+
}),
|
|
234
|
+
z.object({
|
|
235
|
+
type: z.literal('screenshot'),
|
|
236
|
+
path: z.string().min(1),
|
|
237
|
+
viewport: z.string().min(1).optional(),
|
|
238
|
+
summary: z.string().min(1)
|
|
239
|
+
}),
|
|
240
|
+
z.object({
|
|
241
|
+
type: z.literal('source'),
|
|
242
|
+
path: z.string().min(1),
|
|
243
|
+
line: z.number().int().min(1).optional(),
|
|
244
|
+
summary: z.string().min(1)
|
|
245
|
+
}),
|
|
246
|
+
z.object({
|
|
247
|
+
type: z.literal('spec'),
|
|
248
|
+
path: z.string().min(1),
|
|
249
|
+
heading: z.string().optional(),
|
|
250
|
+
summary: z.string().min(1)
|
|
251
|
+
})
|
|
252
|
+
]);
|
|
253
|
+
export const vesselNextActionSchema = z.object({
|
|
254
|
+
label: z.string().min(1),
|
|
255
|
+
href: z.string().optional(),
|
|
256
|
+
command: z.string().optional()
|
|
257
|
+
});
|
|
258
|
+
export const vesselReadinessStatusSchema = z.enum([
|
|
259
|
+
'ready',
|
|
260
|
+
'needs-setup',
|
|
261
|
+
'planned',
|
|
262
|
+
'blocked',
|
|
263
|
+
'unknown'
|
|
264
|
+
]);
|
|
265
|
+
export const vesselReadinessAreaSchema = RuntimeDescriptorSchema.extend({
|
|
266
|
+
kind: z.literal('vessel/readiness-area'),
|
|
267
|
+
label: z.string().min(1),
|
|
268
|
+
userPromise: z.string().min(1),
|
|
269
|
+
status: vesselReadinessStatusSchema,
|
|
270
|
+
summary: z.string().min(1),
|
|
271
|
+
owner: vesselOwnerRefSchema,
|
|
272
|
+
targetKinds: z.array(z.string()).default([]),
|
|
273
|
+
evidence: z.array(vesselEvidenceSchema).default([]),
|
|
274
|
+
linkedFindingIds: z.array(z.string()).default([]),
|
|
275
|
+
upstreamWorkItemIds: z.array(z.string()).default([]),
|
|
276
|
+
proofGate: z.string().min(1),
|
|
277
|
+
nextAction: vesselNextActionSchema.optional()
|
|
278
|
+
});
|
|
279
|
+
export const vesselSetupStepSchema = RuntimeDescriptorSchema.extend({
|
|
280
|
+
kind: z.literal('vessel/setup-step'),
|
|
281
|
+
areaId: z.string().min(1),
|
|
282
|
+
order: z.number().int().min(0).default(0),
|
|
283
|
+
label: z.string().min(1),
|
|
284
|
+
userAction: z.string().min(1),
|
|
285
|
+
userResult: z.string().min(1),
|
|
286
|
+
place: z.enum(['browser', 'computer', 'cloud', 'vessel', 'vibes']),
|
|
287
|
+
status: vesselReadinessStatusSchema,
|
|
288
|
+
owner: vesselOwnerRefSchema,
|
|
289
|
+
evidence: z.array(vesselEvidenceSchema).default([]),
|
|
290
|
+
upstreamWorkItemIds: z.array(z.string()).default([]),
|
|
291
|
+
proofGate: z.string().min(1),
|
|
292
|
+
nextAction: vesselNextActionSchema.optional(),
|
|
293
|
+
falsifier: z.string().optional()
|
|
294
|
+
}).superRefine((step, ctx) => {
|
|
295
|
+
if (step.status !== 'ready')
|
|
296
|
+
return;
|
|
297
|
+
if (step.evidence.length === 0 || !step.falsifier) {
|
|
298
|
+
ctx.addIssue({
|
|
299
|
+
code: 'custom',
|
|
300
|
+
path: ['evidence'],
|
|
301
|
+
message: 'Ready setup steps require evidence and a falsifier.'
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
});
|
|
305
|
+
export const vesselAuditTargetSchema = z.object({
|
|
306
|
+
kind: z.string().min(1),
|
|
307
|
+
id: z.string().min(1),
|
|
308
|
+
label: z.string().min(1)
|
|
309
|
+
});
|
|
310
|
+
export const vesselAuditFindingSchema = RuntimeDescriptorSchema.extend({
|
|
311
|
+
kind: z.literal('vessel/audit-finding'),
|
|
312
|
+
lensId: z.string().min(1),
|
|
313
|
+
target: vesselAuditTargetSchema,
|
|
314
|
+
status: z.enum(['pass', 'warn', 'fail', 'unknown']),
|
|
315
|
+
severity: z.enum(['info', 'low', 'medium', 'high', 'blocker']),
|
|
316
|
+
title: z.string().min(1),
|
|
317
|
+
summary: z.string().min(1),
|
|
318
|
+
owner: vesselOwnerRefSchema,
|
|
319
|
+
evidence: z.array(vesselEvidenceSchema).default([]),
|
|
320
|
+
falsifier: z.string().optional(),
|
|
321
|
+
nextAction: vesselNextActionSchema.optional(),
|
|
322
|
+
createdAt: z.string().datetime()
|
|
323
|
+
}).superRefine((finding, ctx) => {
|
|
324
|
+
if (finding.status !== 'pass')
|
|
325
|
+
return;
|
|
326
|
+
if (finding.evidence.length === 0 ||
|
|
327
|
+
!finding.evidence.some((evidence) => evidence.type !== 'spec')) {
|
|
328
|
+
ctx.addIssue({
|
|
329
|
+
code: 'custom',
|
|
330
|
+
path: ['evidence'],
|
|
331
|
+
message: 'Passing audit findings require reproducible evidence beyond a spec citation.'
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
if (!finding.falsifier) {
|
|
335
|
+
ctx.addIssue({
|
|
336
|
+
code: 'custom',
|
|
337
|
+
path: ['falsifier'],
|
|
338
|
+
message: 'Passing audit findings require a falsifier.'
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
});
|
|
342
|
+
export const vesselAuditLensDescriptorSchema = RuntimeDescriptorSchema.extend({
|
|
343
|
+
kind: z.literal('vessel/audit-lens'),
|
|
344
|
+
name: z.string().min(1),
|
|
345
|
+
description: z.string().min(1),
|
|
346
|
+
owner: vesselOwnerRefSchema,
|
|
347
|
+
targetKinds: z.array(z.string().min(1)).min(1),
|
|
348
|
+
surfaces: z.array(z.string().min(1)).default([]),
|
|
349
|
+
severityModel: z.string().min(1),
|
|
350
|
+
evidenceRequired: z.array(z.string().min(1)).min(1)
|
|
351
|
+
});
|
|
352
|
+
export const vesselSurfaceAudienceSchema = z.enum([
|
|
353
|
+
'workspace-user',
|
|
354
|
+
'builder',
|
|
355
|
+
'host-integrator',
|
|
356
|
+
'narrow-reviewer'
|
|
357
|
+
]);
|
|
358
|
+
export const vesselSurfaceKindSchema = z.enum(['route', 'component', 'window', 'concept']);
|
|
359
|
+
export const vesselTechnicalLanguagePolicySchema = z.enum(['hide', 'setup-detail', 'allow']);
|
|
360
|
+
export const vesselSurfaceContractSchema = z
|
|
361
|
+
.object({
|
|
362
|
+
apiVersion: z.string().min(1),
|
|
363
|
+
stateSchemaId: z.string().min(1),
|
|
364
|
+
stateSchemaVersion: z.number().int().positive(),
|
|
365
|
+
stateSchema: z.instanceof(z.ZodType)
|
|
366
|
+
})
|
|
367
|
+
.strict();
|
|
368
|
+
export const vesselSurfaceCapabilitySchema = z
|
|
369
|
+
.object({
|
|
370
|
+
id: z.string().min(1),
|
|
371
|
+
reason: z.string().min(1),
|
|
372
|
+
/** Optional fixed runtime asset id selected by the surface owner. */
|
|
373
|
+
selectorId: z.string().min(1).optional(),
|
|
374
|
+
/** Optional route-state key selecting the exact implementation id. */
|
|
375
|
+
selectorParam: z.string().min(1).optional()
|
|
376
|
+
})
|
|
377
|
+
.strict()
|
|
378
|
+
.refine((capability) => !(capability.selectorId && capability.selectorParam), {
|
|
379
|
+
message: 'A surface capability cannot declare both selectorId and selectorParam.'
|
|
380
|
+
});
|
|
381
|
+
export const vesselSurfaceActivationSchema = z.enum(['on-open', 'on-restore', 'background']);
|
|
382
|
+
export const vesselSurfaceExecutionSchema = z.enum(['host-trusted', 'isolated-frame']);
|
|
383
|
+
export const vesselSurfaceDescriptorSchema = RuntimeDescriptorSchema.extend({
|
|
384
|
+
kind: z.literal('vessel/surface'),
|
|
385
|
+
label: z.string().min(1),
|
|
386
|
+
owner: vesselOwnerRefSchema,
|
|
387
|
+
contract: vesselSurfaceContractSchema,
|
|
388
|
+
activation: vesselSurfaceActivationSchema,
|
|
389
|
+
execution: vesselSurfaceExecutionSchema,
|
|
390
|
+
requiredCapabilities: z.array(vesselSurfaceCapabilitySchema),
|
|
391
|
+
optionalCapabilities: z.array(vesselSurfaceCapabilitySchema),
|
|
392
|
+
readinessCheckIds: z.array(z.string().min(1)).default([]),
|
|
393
|
+
surfaceKind: vesselSurfaceKindSchema,
|
|
394
|
+
route: z.string().min(1).optional(),
|
|
395
|
+
primaryAudience: vesselSurfaceAudienceSchema,
|
|
396
|
+
secondaryAudiences: z.array(vesselSurfaceAudienceSchema).default([]),
|
|
397
|
+
defaultSurface: z.boolean().default(false),
|
|
398
|
+
technicalLanguagePolicy: vesselTechnicalLanguagePolicySchema,
|
|
399
|
+
promotionGate: z.string().min(1)
|
|
400
|
+
}).strict();
|
|
401
|
+
export const vesselVisualAssetRoleSchema = z.enum(['app-icon', 'product-icon', 'wallpaper']);
|
|
402
|
+
export const vesselVisualAssetPurposeSchema = z.enum([
|
|
403
|
+
'compact',
|
|
404
|
+
'hero',
|
|
405
|
+
'wallpaper',
|
|
406
|
+
'native',
|
|
407
|
+
'source'
|
|
408
|
+
]);
|
|
409
|
+
export const vesselVisualAssetThemeSchema = z.enum(['any', 'light', 'dark']);
|
|
410
|
+
export const vesselVisualAssetMaskSchema = z.enum([
|
|
411
|
+
'square',
|
|
412
|
+
'rounded-rectangle',
|
|
413
|
+
'squircle',
|
|
414
|
+
'circle'
|
|
415
|
+
]);
|
|
416
|
+
export const vesselVisualAssetVariantSchema = z
|
|
417
|
+
.object({
|
|
418
|
+
id: z.string().min(1),
|
|
419
|
+
purpose: vesselVisualAssetPurposeSchema,
|
|
420
|
+
theme: vesselVisualAssetThemeSchema.default('any'),
|
|
421
|
+
width: z.number().int().positive(),
|
|
422
|
+
height: z.number().int().positive(),
|
|
423
|
+
mediaType: z.enum(['image/png', 'image/webp', 'image/avif', 'image/x-icon']),
|
|
424
|
+
digest: z.string().regex(/^sha256:[a-f0-9]{64}$/)
|
|
425
|
+
})
|
|
426
|
+
.strict();
|
|
427
|
+
/**
|
|
428
|
+
* Universal presentation metadata only. Packaged bytes are supplied by a
|
|
429
|
+
* scope-specific loader, so this descriptor never contains a host path or URL.
|
|
430
|
+
*/
|
|
431
|
+
export const vesselVisualAssetDescriptorSchema = RuntimeDescriptorSchema.extend({
|
|
432
|
+
kind: z.literal('vessel/visual-asset'),
|
|
433
|
+
label: z.string().min(1),
|
|
434
|
+
owner: vesselOwnerRefSchema,
|
|
435
|
+
role: vesselVisualAssetRoleSchema,
|
|
436
|
+
accessibleLabel: z.string().min(1),
|
|
437
|
+
delivery: z.literal('bundled').default('bundled'),
|
|
438
|
+
paletteId: z.string().min(1),
|
|
439
|
+
variants: z.array(vesselVisualAssetVariantSchema).min(1),
|
|
440
|
+
supportedMasks: z.array(vesselVisualAssetMaskSchema).default(['square']),
|
|
441
|
+
safeZone: z.number().min(0.5).max(1).default(0.8),
|
|
442
|
+
provenance: z
|
|
443
|
+
.object({
|
|
444
|
+
recipeId: z.string().min(1),
|
|
445
|
+
sourceDigest: z.string().regex(/^sha256:[a-f0-9]{64}$/)
|
|
446
|
+
})
|
|
447
|
+
.strict()
|
|
448
|
+
}).strict();
|
|
449
|
+
export const vesselWorkspaceReceiptSchema = z
|
|
450
|
+
.object({
|
|
451
|
+
receiptId: z.string().min(1),
|
|
452
|
+
surfaceId: z.string().min(1),
|
|
453
|
+
sourceSurfaceId: z.string().min(1).optional(),
|
|
454
|
+
owner: z
|
|
455
|
+
.object({
|
|
456
|
+
kind: z.string().min(1),
|
|
457
|
+
id: z.string().min(1)
|
|
458
|
+
})
|
|
459
|
+
.strict(),
|
|
460
|
+
action: z.enum(['activate', 'navigate', 'execute', 'restore']),
|
|
461
|
+
outcome: z.enum(['succeeded', 'failed', 'cancelled']),
|
|
462
|
+
occurredAt: z.string().datetime(),
|
|
463
|
+
correlationId: z.string().min(1).optional(),
|
|
464
|
+
evidence: z
|
|
465
|
+
.object({
|
|
466
|
+
kind: z.string().min(1),
|
|
467
|
+
id: z.string().min(1),
|
|
468
|
+
context: vesselRouteStateSchema.optional()
|
|
469
|
+
})
|
|
470
|
+
.strict()
|
|
471
|
+
})
|
|
472
|
+
.strict();
|
|
473
|
+
export const vesselWorkspaceChronologicalCueSchema = z
|
|
474
|
+
.object({
|
|
475
|
+
type: z.enum(['saved', 'changed', 'restored']),
|
|
476
|
+
occurredAt: z.string().datetime(),
|
|
477
|
+
surfaceId: z.string().min(1).optional(),
|
|
478
|
+
receiptId: z.string().min(1).optional()
|
|
479
|
+
})
|
|
480
|
+
.strict();
|
|
481
|
+
export const vesselWorkspacePresentationSchema = z
|
|
482
|
+
.object({
|
|
483
|
+
x: z.number().int().min(0),
|
|
484
|
+
y: z.number().int().min(0),
|
|
485
|
+
width: z.number().int().positive(),
|
|
486
|
+
height: z.number().int().positive(),
|
|
487
|
+
minimized: z.boolean()
|
|
488
|
+
})
|
|
489
|
+
.strict();
|
|
490
|
+
export const vesselWorkspaceAnchorSchema = z
|
|
491
|
+
.object({
|
|
492
|
+
surfaceId: z.string().min(1),
|
|
493
|
+
/** Optional for backwards compatibility with return points saved before place pinning. */
|
|
494
|
+
runtimePlaceId: vesselRuntimePlaceIdSchema.optional(),
|
|
495
|
+
routeParams: vesselRouteStateSchema.default({}),
|
|
496
|
+
presentation: vesselWorkspacePresentationSchema
|
|
497
|
+
})
|
|
498
|
+
.strict();
|
|
499
|
+
export const vesselWorkspaceFocusSchema = z
|
|
500
|
+
.object({
|
|
501
|
+
surfaceId: z.string().min(1),
|
|
502
|
+
ordinal: z.number().int().min(0)
|
|
503
|
+
})
|
|
504
|
+
.strict();
|
|
505
|
+
export const vesselWorkspaceIdSchema = z
|
|
506
|
+
.string()
|
|
507
|
+
.min(1)
|
|
508
|
+
.max(240)
|
|
509
|
+
.regex(/^[A-Za-z0-9._:-]+$/, 'Workspace identity may contain only letters, numbers, dot, underscore, colon, and dash.');
|
|
510
|
+
/**
|
|
511
|
+
* Device-local return projection. It contains surface references and compact
|
|
512
|
+
* presentation state only; feature records remain at their owning runtime kinds.
|
|
513
|
+
*/
|
|
514
|
+
export const vesselWorkspaceStateSchema = z
|
|
515
|
+
.object({
|
|
516
|
+
schemaVersion: z.literal(VESSEL_WORKSPACE_STATE_SCHEMA_VERSION),
|
|
517
|
+
workspaceId: vesselWorkspaceIdSchema,
|
|
518
|
+
revision: z.number().int().positive(),
|
|
519
|
+
savedAt: z.string().datetime(),
|
|
520
|
+
anchors: z.array(vesselWorkspaceAnchorSchema).max(64),
|
|
521
|
+
lastFocus: vesselWorkspaceFocusSchema.optional(),
|
|
522
|
+
chronologicalCue: vesselWorkspaceChronologicalCueSchema,
|
|
523
|
+
receipts: z.array(vesselWorkspaceReceiptSchema).max(VESSEL_WORKSPACE_RECEIPT_LIMIT).default([])
|
|
524
|
+
})
|
|
525
|
+
.strict()
|
|
526
|
+
.superRefine((state, ctx) => {
|
|
527
|
+
const receiptsById = new Map();
|
|
528
|
+
for (const [index, receipt] of state.receipts.entries()) {
|
|
529
|
+
if (receiptsById.has(receipt.receiptId)) {
|
|
530
|
+
ctx.addIssue({
|
|
531
|
+
code: 'custom',
|
|
532
|
+
path: ['receipts', index, 'receiptId'],
|
|
533
|
+
message: 'Receipt ids must be unique within a return point.'
|
|
534
|
+
});
|
|
535
|
+
}
|
|
536
|
+
receiptsById.set(receipt.receiptId, receipt);
|
|
537
|
+
}
|
|
538
|
+
const cue = state.chronologicalCue;
|
|
539
|
+
if (cue.receiptId) {
|
|
540
|
+
const receipt = receiptsById.get(cue.receiptId);
|
|
541
|
+
if (!receipt) {
|
|
542
|
+
ctx.addIssue({
|
|
543
|
+
code: 'custom',
|
|
544
|
+
path: ['chronologicalCue', 'receiptId'],
|
|
545
|
+
message: 'Chronological cue must reference a receipt present in this return point.'
|
|
546
|
+
});
|
|
547
|
+
}
|
|
548
|
+
else if (cue.surfaceId && receipt.surfaceId !== cue.surfaceId) {
|
|
549
|
+
ctx.addIssue({
|
|
550
|
+
code: 'custom',
|
|
551
|
+
path: ['chronologicalCue', 'surfaceId'],
|
|
552
|
+
message: 'Chronological cue surface must match its referenced receipt surface.'
|
|
553
|
+
});
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
const lastFocus = state.lastFocus;
|
|
557
|
+
if (!lastFocus)
|
|
558
|
+
return;
|
|
559
|
+
const matching = state.anchors.filter((anchor) => anchor.surfaceId === lastFocus.surfaceId);
|
|
560
|
+
if (lastFocus.ordinal < matching.length)
|
|
561
|
+
return;
|
|
562
|
+
ctx.addIssue({
|
|
563
|
+
code: 'custom',
|
|
564
|
+
path: ['lastFocus'],
|
|
565
|
+
message: 'Last focus must reference an anchor present in this return point.'
|
|
566
|
+
});
|
|
567
|
+
});
|
|
568
|
+
export const vesselDesignReviewerVerdictSchema = z
|
|
569
|
+
.object({
|
|
570
|
+
reviewerId: z.string().min(1),
|
|
571
|
+
status: z.enum(['approved', 'needs-iteration', 'blocked']),
|
|
572
|
+
feedback: z.string().min(1),
|
|
573
|
+
requiredChange: z.string().min(1).optional()
|
|
574
|
+
})
|
|
575
|
+
.superRefine((verdict, ctx) => {
|
|
576
|
+
if (verdict.status === 'approved')
|
|
577
|
+
return;
|
|
578
|
+
if (!verdict.requiredChange) {
|
|
579
|
+
ctx.addIssue({
|
|
580
|
+
code: 'custom',
|
|
581
|
+
path: ['requiredChange'],
|
|
582
|
+
message: 'Non-approved design review verdicts require a concrete change.'
|
|
583
|
+
});
|
|
584
|
+
}
|
|
585
|
+
});
|
|
586
|
+
export const vesselDesignReviewRecordSchema = RuntimeDescriptorSchema.extend({
|
|
587
|
+
kind: z.literal('vessel/design-review'),
|
|
588
|
+
surfaceId: z.string().min(1),
|
|
589
|
+
goal: z.string().min(1),
|
|
590
|
+
status: z.enum(['approved', 'needs-iteration', 'blocked']),
|
|
591
|
+
visualMethods: z
|
|
592
|
+
.array(z.enum(['imagegen-concept', 'real-browser-screenshot', 'component-shot']))
|
|
593
|
+
.min(1),
|
|
594
|
+
evidence: z.array(vesselEvidenceSchema).min(1),
|
|
595
|
+
verdicts: z.array(vesselDesignReviewerVerdictSchema).min(9)
|
|
596
|
+
});
|
|
597
|
+
export const vesselOsStandardDescriptorSchema = RuntimeDescriptorSchema.extend({
|
|
598
|
+
kind: z.literal('vessel/os-standard'),
|
|
599
|
+
label: z.string().min(1),
|
|
600
|
+
version: z.string().min(1),
|
|
601
|
+
constitutionGates: z.array(z.string().min(1)).min(1),
|
|
602
|
+
requiredSurfaceIds: z.array(z.string().min(1)).min(1),
|
|
603
|
+
promotionGates: z.array(z.string().min(1)).min(1),
|
|
604
|
+
falsifiers: z.array(z.string().min(1)).min(1)
|
|
605
|
+
});
|
|
606
|
+
export const vesselMountPayloadSchema = z
|
|
607
|
+
.object({
|
|
608
|
+
kind: z.literal('vessel/mount-payload').default('vessel/mount-payload'),
|
|
609
|
+
generatedAt: z.string().datetime(),
|
|
610
|
+
source: z
|
|
611
|
+
.object({
|
|
612
|
+
type: z
|
|
613
|
+
.enum(['host-supplied', 'runtime-query', 'fixture', 'file'])
|
|
614
|
+
.default('host-supplied'),
|
|
615
|
+
label: z.string().min(1).optional()
|
|
616
|
+
})
|
|
617
|
+
.default({ type: 'host-supplied' }),
|
|
618
|
+
apps: z.array(vesselAppDescriptorSchema).default([]),
|
|
619
|
+
readinessAreas: z.array(vesselReadinessAreaSchema).default([]),
|
|
620
|
+
setupSteps: z.array(vesselSetupStepSchema).default([]),
|
|
621
|
+
visualAssets: z.array(vesselVisualAssetDescriptorSchema).default([]),
|
|
622
|
+
auditFindings: z.array(vesselAuditFindingSchema).default([]),
|
|
623
|
+
notes: z.array(z.string()).default([])
|
|
624
|
+
})
|
|
625
|
+
.superRefine((payload, ctx) => {
|
|
626
|
+
const assets = new Map(payload.visualAssets.map((asset) => [asset.id, asset]));
|
|
627
|
+
for (const [index, app] of payload.apps.entries()) {
|
|
628
|
+
const artworkId = app.identity.artworkId;
|
|
629
|
+
if (!artworkId)
|
|
630
|
+
continue;
|
|
631
|
+
const asset = assets.get(artworkId);
|
|
632
|
+
if (!asset) {
|
|
633
|
+
ctx.addIssue({
|
|
634
|
+
code: 'custom',
|
|
635
|
+
path: ['apps', index, 'identity', 'artworkId'],
|
|
636
|
+
message: `No admitted vessel/visual-asset owns '${artworkId}'.`
|
|
637
|
+
});
|
|
638
|
+
}
|
|
639
|
+
else if (asset.role !== 'app-icon') {
|
|
640
|
+
ctx.addIssue({
|
|
641
|
+
code: 'custom',
|
|
642
|
+
path: ['apps', index, 'identity', 'artworkId'],
|
|
643
|
+
message: `'${artworkId}' is ${asset.role}, not app-icon artwork.`
|
|
644
|
+
});
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
});
|
|
648
|
+
/** Canonical append-order + bounded-history rule for workspace receipts. */
|
|
649
|
+
export function advanceVesselWorkspaceReceipts(current, appended) {
|
|
650
|
+
return [...current, ...appended].slice(-VESSEL_WORKSPACE_RECEIPT_LIMIT);
|
|
651
|
+
}
|
|
652
|
+
export function parseVesselAppDescriptor(input) {
|
|
653
|
+
return parseVesselValue(vesselAppDescriptorSchema, input);
|
|
654
|
+
}
|
|
655
|
+
export function parseVesselMountPayload(input) {
|
|
656
|
+
return parseVesselValue(vesselMountPayloadSchema, input);
|
|
657
|
+
}
|
|
658
|
+
export function parseVesselWorkspaceState(input) {
|
|
659
|
+
return parseVesselValue(vesselWorkspaceStateSchema, input);
|
|
660
|
+
}
|
|
661
|
+
//# sourceMappingURL=schemas.js.map
|