openmeld 0.3.206 → 0.3.207
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/{add-me-membership-BkHWMxE4.js → add-me-membership-1JHMjZoR.js} +2 -2
- package/dist/{add-me-membership-BkHWMxE4.js.map → add-me-membership-1JHMjZoR.js.map} +1 -1
- package/dist/{agents-BOTlKiwS.js → agents-CIDsThyG.js} +150 -108
- package/dist/agents-CIDsThyG.js.map +1 -0
- package/dist/{api-client-foundation-6ms5gSu8.js → api-client-foundation-D6_NXHPV.js} +1 -1
- package/dist/{api-client-foundation-DpgDs0rw.js → api-client-foundation-DSurenul.js} +3 -3
- package/dist/{api-client-foundation-DpgDs0rw.js.map → api-client-foundation-DSurenul.js.map} +1 -1
- package/dist/auth-session-B7QMhHwh.js +4 -0
- package/dist/{auth-session-BjSqMLTz.js → auth-session-CO5XtFaq.js} +266 -75
- package/dist/auth-session-CO5XtFaq.js.map +1 -0
- package/dist/{base-url-CRAYNW-4.js → base-url-BE3pFiOZ.js} +1 -1
- package/dist/{base-url-9A557X2K.js → base-url-C6sHRNGu.js} +2 -2
- package/dist/{base-url-9A557X2K.js.map → base-url-C6sHRNGu.js.map} +1 -1
- package/dist/cli-binary-manifest-DiUulkp0.js +117 -0
- package/dist/cli-binary-manifest-DiUulkp0.js.map +1 -0
- package/dist/{command-CkbzbvXy.js → command-Bzt9zgnI.js} +13 -11
- package/dist/{command-CkbzbvXy.js.map → command-Bzt9zgnI.js.map} +1 -1
- package/dist/computer-connection-BOl79Ftf.js +54 -0
- package/dist/computer-connection-BOl79Ftf.js.map +1 -0
- package/dist/computer-connection-review-BTOvbJYL.js +39 -0
- package/dist/computer-connection-review-BTOvbJYL.js.map +1 -0
- package/dist/{computer-setup-continuation-Cd9nhLQ-.js → computer-setup-continuation-DmKdhR5u.js} +4 -4
- package/dist/{computer-setup-continuation-Cd9nhLQ-.js.map → computer-setup-continuation-DmKdhR5u.js.map} +1 -1
- package/dist/control-plane-D9jDcbMZ.js +1211 -0
- package/dist/control-plane-D9jDcbMZ.js.map +1 -0
- package/dist/daemon-local-state-file-jOXuXrky.js +45 -0
- package/dist/daemon-local-state-file-jOXuXrky.js.map +1 -0
- package/dist/daemon-runtime-lease-Dd4hdHNo.js +50 -0
- package/dist/daemon-runtime-lease-Dd4hdHNo.js.map +1 -0
- package/dist/{daemon-runtime-lease-BG9g0a6Z.js → daemon-runtime-lease-y3n1K0-C.js} +1 -1
- package/dist/{daemon-service-manager-DqVtRLBY.js → daemon-service-manager-Bh0LoLed.js} +1 -1
- package/dist/{daemon-service-manager-BVipiZwK.js → daemon-service-manager-GiMCiTmu.js} +99 -85
- package/dist/daemon-service-manager-GiMCiTmu.js.map +1 -0
- package/dist/daemon-service-runtime-DQW9gSLT.js +3642 -0
- package/dist/daemon-service-runtime-DQW9gSLT.js.map +1 -0
- package/dist/{daemon-state-BwIoDq7_.js → daemon-state-C37ZtIZK.js} +11 -5
- package/dist/daemon-state-C37ZtIZK.js.map +1 -0
- package/dist/{dist-CxadJClH.js → dist-D-kJdWZE.js} +726 -579
- package/dist/dist-D-kJdWZE.js.map +1 -0
- package/dist/dist-DTG_Vqc7.js +4 -0
- package/dist/distribution-DY2fBeSW.js +72 -0
- package/dist/distribution-DY2fBeSW.js.map +1 -0
- package/dist/{elapsed-time-C7P-nWIO.js → elapsed-time-CcoM2R3N.js} +7 -4
- package/dist/{elapsed-time-C7P-nWIO.js.map → elapsed-time-CcoM2R3N.js.map} +1 -1
- package/dist/{installation-inventory-P49sTjhe.js → installation-inventory-DJlwXa1q.js} +7 -6
- package/dist/{installation-inventory-P49sTjhe.js.map → installation-inventory-DJlwXa1q.js.map} +1 -1
- package/dist/{lock-CvBnBcFK.js → lock-Dxp6o_t_.js} +56 -7
- package/dist/lock-Dxp6o_t_.js.map +1 -0
- package/dist/{openmeld-ChOHuaqH.js → openmeld-CiL4AiB0.js} +226 -21
- package/dist/openmeld-CiL4AiB0.js.map +1 -0
- package/dist/openmeld-dev.js +1 -1
- package/dist/openmeld-environment-target-NtJYJe1D.js +256 -0
- package/dist/openmeld-environment-target-NtJYJe1D.js.map +1 -0
- package/dist/{openmeld-maintenance-worker-C7WykyDt.js → openmeld-maintenance-worker-DjdmRASI.js} +9 -8
- package/dist/{openmeld-maintenance-worker-C7WykyDt.js.map → openmeld-maintenance-worker-DjdmRASI.js.map} +1 -1
- package/dist/{openmeld-tools-update-coordinator-BBZhGo1A.js → openmeld-tools-update-coordinator-D9Skj8IE.js} +52 -4013
- package/dist/openmeld-tools-update-coordinator-D9Skj8IE.js.map +1 -0
- package/dist/openmeld.js +3 -3
- package/dist/{prepare-session-executor-CLmDoHom.js → prepare-session-executor-B0NtjHEL.js} +15 -13
- package/dist/{prepare-session-executor-CLmDoHom.js.map → prepare-session-executor-B0NtjHEL.js.map} +1 -1
- package/dist/{profiles-BCecj4Pj.js → runtime-transport-QIZmAo4-.js} +936 -2127
- package/dist/runtime-transport-QIZmAo4-.js.map +1 -0
- package/dist/service-account-authorization-Dt8kGvq8.js +56 -0
- package/dist/service-account-authorization-Dt8kGvq8.js.map +1 -0
- package/dist/service-control-capabilities-BU5F75zi.js +54 -0
- package/dist/service-control-capabilities-BU5F75zi.js.map +1 -0
- package/dist/service-control-capabilities-CzUB1ovW.js +4 -0
- package/dist/upgrade-DLECkjMt.js +4 -0
- package/dist/{upgrade-l_5Tge_z.js → upgrade-NxpTydHp.js} +6 -4
- package/dist/upgrade-NxpTydHp.js.map +1 -0
- package/package.json +2 -2
- package/dist/agents-BOTlKiwS.js.map +0 -1
- package/dist/auth-session-BjSqMLTz.js.map +0 -1
- package/dist/auth-session-ahQ5VXiF.js +0 -4
- package/dist/daemon-runtime-lease-CXlGR-iA.js +0 -87
- package/dist/daemon-runtime-lease-CXlGR-iA.js.map +0 -1
- package/dist/daemon-service-manager-BVipiZwK.js.map +0 -1
- package/dist/daemon-state-BwIoDq7_.js.map +0 -1
- package/dist/dist-0boZRalP.js +0 -4
- package/dist/dist-CxadJClH.js.map +0 -1
- package/dist/lock-CvBnBcFK.js.map +0 -1
- package/dist/openmeld-ChOHuaqH.js.map +0 -1
- package/dist/openmeld-tools-update-coordinator-BBZhGo1A.js.map +0 -1
- package/dist/profiles-BCecj4Pj.js.map +0 -1
- package/dist/upgrade-BKEAZKre.js +0 -4
- package/dist/upgrade-l_5Tge_z.js.map +0 -1
|
@@ -0,0 +1,1211 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { c as agentControllerConversationRefSchema, s as runtimeTransportModeSchema } from "./controller-contract-pe3_Re-c.js";
|
|
4
|
+
import * as z$1 from "zod/v4";
|
|
5
|
+
//#region ../../packages/schemas/dist/schemas/protocol/shared.js
|
|
6
|
+
const trimmedStringFromUnknown = (value) => String(value ?? "").trim();
|
|
7
|
+
const nonEmptyTrimmedStringFromUnknown = z$1.preprocess(trimmedStringFromUnknown, z$1.string().min(1));
|
|
8
|
+
const finiteIntegerNumber = z$1.number().int().finite();
|
|
9
|
+
const optionalBooleanQuerySchema = z$1.preprocess((value) => {
|
|
10
|
+
if (value === void 0 || value === null || value === "") return;
|
|
11
|
+
if (typeof value === "boolean") return value;
|
|
12
|
+
const normalized = String(value).trim().toLowerCase();
|
|
13
|
+
if (normalized === "true" || normalized === "1") return true;
|
|
14
|
+
if (normalized === "false" || normalized === "0") return false;
|
|
15
|
+
return value;
|
|
16
|
+
}, z$1.boolean().optional());
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region ../../packages/schemas/dist/schemas/protocol/profile.js
|
|
19
|
+
const PROFILE_KIND_VALUES = [
|
|
20
|
+
"human",
|
|
21
|
+
"agent",
|
|
22
|
+
"system"
|
|
23
|
+
];
|
|
24
|
+
const PROFILE_HANDLE_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/;
|
|
25
|
+
const UUID_PROFILE_ID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
|
|
26
|
+
const AGENT_PROFILE_ID_PATTERN = /^agt_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
|
|
27
|
+
const normalizeOptionalProfileLabel = (value) => {
|
|
28
|
+
const normalized = trimmedStringFromUnknown(value);
|
|
29
|
+
if (normalized.length === 0) return;
|
|
30
|
+
return normalized.slice(0, 64);
|
|
31
|
+
};
|
|
32
|
+
const normalizeOptionalProfileHandle = (value) => {
|
|
33
|
+
const normalized = trimmedStringFromUnknown(value);
|
|
34
|
+
if (normalized.length === 0) return;
|
|
35
|
+
return profileHandleSchema.safeParse(normalized).success ? normalized : void 0;
|
|
36
|
+
};
|
|
37
|
+
const MAX_PROFILE_WORKING_DIRECTORY_LENGTH = 4096;
|
|
38
|
+
const profileWorkspaceModeSchema = z$1.enum(["openmeld_managed", "custom"]);
|
|
39
|
+
const profileWorkingDirectorySchema = z$1.string().min(1).max(MAX_PROFILE_WORKING_DIRECTORY_LENGTH).refine((value) => !value.includes("\0"), { message: "workingDirectory must not contain NUL bytes" });
|
|
40
|
+
const normalizeOptionalWorkingDirectory = (value) => {
|
|
41
|
+
if (typeof value !== "string") return;
|
|
42
|
+
const parsed = profileWorkingDirectorySchema.safeParse(value);
|
|
43
|
+
return parsed.success ? parsed.data : void 0;
|
|
44
|
+
};
|
|
45
|
+
const HTTPS_URL_PATTERN = /^https?:\/\//i;
|
|
46
|
+
/**
|
|
47
|
+
* Avatar URLs are a public identity field that travels with the Profile across
|
|
48
|
+
* domains. Only http(s) URLs are accepted so the value is safe to render as an
|
|
49
|
+
* `<img src>` on web clients (rejects javascript:/data: injection vectors).
|
|
50
|
+
*/
|
|
51
|
+
const normalizeOptionalAvatarUrl = (value) => {
|
|
52
|
+
const normalized = trimmedStringFromUnknown(value);
|
|
53
|
+
if (normalized.length === 0 || normalized.length > 2048) return;
|
|
54
|
+
return HTTPS_URL_PATTERN.test(normalized) ? normalized : void 0;
|
|
55
|
+
};
|
|
56
|
+
/** Unknown or invalid kinds are normalized to "agent" for wire compatibility. */
|
|
57
|
+
const profileKindWithFallbackSchema = z$1.preprocess((value) => {
|
|
58
|
+
const parsed = z$1.enum(PROFILE_KIND_VALUES).safeParse(value);
|
|
59
|
+
return parsed.success ? parsed.data : "agent";
|
|
60
|
+
}, z$1.enum(PROFILE_KIND_VALUES));
|
|
61
|
+
const profileKindSchema = z$1.enum(PROFILE_KIND_VALUES);
|
|
62
|
+
const profileLabelSchema = z$1.string().min(1).max(64);
|
|
63
|
+
const profileHandleSchema = z$1.string().min(1).max(128).regex(PROFILE_HANDLE_PATTERN);
|
|
64
|
+
const genericProfileIdSchema = z$1.preprocess(trimmedStringFromUnknown, z$1.string().min(1).max(64));
|
|
65
|
+
const uuidProfileIdSchema = z$1.preprocess(trimmedStringFromUnknown, z$1.string().min(1).max(64).regex(UUID_PROFILE_ID_PATTERN));
|
|
66
|
+
const agentProfileIdSchema = z$1.preprocess(trimmedStringFromUnknown, z$1.string().min(1).max(64).regex(AGENT_PROFILE_ID_PATTERN));
|
|
67
|
+
/**
|
|
68
|
+
* Runtime OpenMeld profile IDs are auth-backed and follow these rules:
|
|
69
|
+
* - human/system profiles use a UUID
|
|
70
|
+
* - agent profiles use agt_<UUID>
|
|
71
|
+
*
|
|
72
|
+
* Generic test fixtures or legacy intermediary strings should not reuse this
|
|
73
|
+
* schema unless they represent a real runtime profile identity.
|
|
74
|
+
*/
|
|
75
|
+
const openMeldRuntimeProfileIdSchema = z$1.preprocess(trimmedStringFromUnknown, z$1.string().min(1).max(64).refine((value) => UUID_PROFILE_ID_PATTERN.test(value) || AGENT_PROFILE_ID_PATTERN.test(value), "Invalid OpenMeld runtime profile ID"));
|
|
76
|
+
/**
|
|
77
|
+
* Generic wire/profile normalization rules:
|
|
78
|
+
* - trims and validates profileId as a non-empty string
|
|
79
|
+
* - defaults missing/invalid kind to "agent"
|
|
80
|
+
* - truncates profileName/owner labels to max length
|
|
81
|
+
* - preserves agent workingDirectory verbatim when it is a valid string
|
|
82
|
+
* - keeps owner only for agent profiles
|
|
83
|
+
*
|
|
84
|
+
* This schema intentionally stays broader than auth-backed runtime IDs because
|
|
85
|
+
* protocol/system messages may still use internal synthetic profile IDs such as
|
|
86
|
+
* `openmeld-system`.
|
|
87
|
+
*/
|
|
88
|
+
const profileSchema = z$1.object({
|
|
89
|
+
kind: profileKindWithFallbackSchema.optional(),
|
|
90
|
+
profileId: genericProfileIdSchema,
|
|
91
|
+
profileHandle: z$1.unknown().optional(),
|
|
92
|
+
profileName: z$1.unknown().optional(),
|
|
93
|
+
owner: z$1.unknown().optional(),
|
|
94
|
+
ownerName: z$1.unknown().optional(),
|
|
95
|
+
agentControllerRef: z$1.unknown().optional(),
|
|
96
|
+
agentControllerConversationId: z$1.unknown().optional(),
|
|
97
|
+
workingDirectory: z$1.unknown().optional(),
|
|
98
|
+
avatarUrl: z$1.unknown().optional()
|
|
99
|
+
}).transform((value) => {
|
|
100
|
+
const kind = value.kind ?? "agent";
|
|
101
|
+
const profileHandle = normalizeOptionalProfileHandle(value.profileHandle);
|
|
102
|
+
const profileName = normalizeOptionalProfileLabel(value.profileName);
|
|
103
|
+
const owner = kind === "agent" ? normalizeOptionalProfileLabel(value.owner) : void 0;
|
|
104
|
+
const ownerName = kind === "agent" ? normalizeOptionalProfileLabel(value.ownerName) : void 0;
|
|
105
|
+
const agentControllerRef = kind === "agent" ? normalizeOptionalProfileLabel(value.agentControllerRef) : void 0;
|
|
106
|
+
const agentControllerConversationId = kind === "agent" ? normalizeOptionalProfileLabel(value.agentControllerConversationId) : void 0;
|
|
107
|
+
const workingDirectory = kind === "agent" ? normalizeOptionalWorkingDirectory(value.workingDirectory) : void 0;
|
|
108
|
+
const avatarUrl = normalizeOptionalAvatarUrl(value.avatarUrl);
|
|
109
|
+
return {
|
|
110
|
+
kind,
|
|
111
|
+
profileId: value.profileId,
|
|
112
|
+
...profileHandle ? { profileHandle } : {},
|
|
113
|
+
...profileName ? { profileName } : {},
|
|
114
|
+
...owner ? { owner } : {},
|
|
115
|
+
...ownerName ? { ownerName } : {},
|
|
116
|
+
...agentControllerRef ? { agentControllerRef } : {},
|
|
117
|
+
...agentControllerConversationId ? { agentControllerConversationId } : {},
|
|
118
|
+
...workingDirectory ? { workingDirectory } : {},
|
|
119
|
+
...avatarUrl ? { avatarUrl } : {}
|
|
120
|
+
};
|
|
121
|
+
});
|
|
122
|
+
//#endregion
|
|
123
|
+
//#region ../../packages/schemas/dist/lazy-zod.js
|
|
124
|
+
const NEVER = z$1.NEVER;
|
|
125
|
+
const ZodIssueCode = z$1.ZodIssueCode;
|
|
126
|
+
const DEFERRED_SCHEMA_METHODS = /* @__PURE__ */ new Set([
|
|
127
|
+
"and",
|
|
128
|
+
"array",
|
|
129
|
+
"base64",
|
|
130
|
+
"base64url",
|
|
131
|
+
"catch",
|
|
132
|
+
"catchall",
|
|
133
|
+
"check",
|
|
134
|
+
"cidrv4",
|
|
135
|
+
"cidrv6",
|
|
136
|
+
"clone",
|
|
137
|
+
"cuid",
|
|
138
|
+
"cuid2",
|
|
139
|
+
"date",
|
|
140
|
+
"datetime",
|
|
141
|
+
"default",
|
|
142
|
+
"duration",
|
|
143
|
+
"e164",
|
|
144
|
+
"email",
|
|
145
|
+
"emoji",
|
|
146
|
+
"endsWith",
|
|
147
|
+
"exactOptional",
|
|
148
|
+
"exclude",
|
|
149
|
+
"extend",
|
|
150
|
+
"extract",
|
|
151
|
+
"gt",
|
|
152
|
+
"gte",
|
|
153
|
+
"guid",
|
|
154
|
+
"includes",
|
|
155
|
+
"input",
|
|
156
|
+
"int",
|
|
157
|
+
"ipv4",
|
|
158
|
+
"ipv6",
|
|
159
|
+
"jwt",
|
|
160
|
+
"keyof",
|
|
161
|
+
"ksuid",
|
|
162
|
+
"length",
|
|
163
|
+
"loose",
|
|
164
|
+
"lowercase",
|
|
165
|
+
"lt",
|
|
166
|
+
"lte",
|
|
167
|
+
"max",
|
|
168
|
+
"merge",
|
|
169
|
+
"mime",
|
|
170
|
+
"min",
|
|
171
|
+
"multipleOf",
|
|
172
|
+
"nanoid",
|
|
173
|
+
"negative",
|
|
174
|
+
"nonempty",
|
|
175
|
+
"nonnegative",
|
|
176
|
+
"nonoptional",
|
|
177
|
+
"nonpositive",
|
|
178
|
+
"normalize",
|
|
179
|
+
"nullable",
|
|
180
|
+
"nullish",
|
|
181
|
+
"omit",
|
|
182
|
+
"optional",
|
|
183
|
+
"or",
|
|
184
|
+
"output",
|
|
185
|
+
"overwrite",
|
|
186
|
+
"partial",
|
|
187
|
+
"passthrough",
|
|
188
|
+
"pick",
|
|
189
|
+
"pipe",
|
|
190
|
+
"positive",
|
|
191
|
+
"prefault",
|
|
192
|
+
"readonly",
|
|
193
|
+
"refine",
|
|
194
|
+
"regex",
|
|
195
|
+
"removeCatch",
|
|
196
|
+
"removeDefault",
|
|
197
|
+
"required",
|
|
198
|
+
"rest",
|
|
199
|
+
"safe",
|
|
200
|
+
"safeExtend",
|
|
201
|
+
"size",
|
|
202
|
+
"slugify",
|
|
203
|
+
"startsWith",
|
|
204
|
+
"step",
|
|
205
|
+
"strict",
|
|
206
|
+
"strip",
|
|
207
|
+
"superRefine",
|
|
208
|
+
"time",
|
|
209
|
+
"toLowerCase",
|
|
210
|
+
"toUpperCase",
|
|
211
|
+
"transform",
|
|
212
|
+
"trim",
|
|
213
|
+
"ulid",
|
|
214
|
+
"unwrap",
|
|
215
|
+
"uppercase",
|
|
216
|
+
"url",
|
|
217
|
+
"uuid",
|
|
218
|
+
"uuidv4",
|
|
219
|
+
"uuidv6",
|
|
220
|
+
"uuidv7",
|
|
221
|
+
"with",
|
|
222
|
+
"xid"
|
|
223
|
+
]);
|
|
224
|
+
const SELF_RETURNING_METHODS = /* @__PURE__ */ new Set(["brand", "finite"]);
|
|
225
|
+
const UNHANDLED_PROPERTY = Symbol("unhandled lazy Zod property");
|
|
226
|
+
const globalRegistry = z$1.globalRegistry;
|
|
227
|
+
function lazySchema(createSchema) {
|
|
228
|
+
let schema;
|
|
229
|
+
let proxy;
|
|
230
|
+
const target = Object.create(null);
|
|
231
|
+
let targetIsMaterialized = false;
|
|
232
|
+
const resolveSchema = () => {
|
|
233
|
+
schema ??= createSchema();
|
|
234
|
+
return schema;
|
|
235
|
+
};
|
|
236
|
+
const readResolvedProperty = (property) => {
|
|
237
|
+
const resolved = resolveSchema();
|
|
238
|
+
const value = Reflect.get(resolved, property, resolved);
|
|
239
|
+
return typeof value === "function" ? value.bind(resolved) : value;
|
|
240
|
+
};
|
|
241
|
+
const deferSchemaMethod = (property, args) => lazySchema(() => {
|
|
242
|
+
const resolved = resolveSchema();
|
|
243
|
+
const method = Reflect.get(resolved, property, resolved);
|
|
244
|
+
if (typeof method !== "function") throw new TypeError(`Lazy Zod property ${String(property)} is not callable`);
|
|
245
|
+
const result = Reflect.apply(method, resolved, args);
|
|
246
|
+
if (!(result instanceof z$1.ZodType)) throw new TypeError(`Lazy Zod method ${String(property)} did not return a schema`);
|
|
247
|
+
return result;
|
|
248
|
+
});
|
|
249
|
+
const materializeTarget = () => {
|
|
250
|
+
const resolved = resolveSchema();
|
|
251
|
+
if (targetIsMaterialized) return resolved;
|
|
252
|
+
Reflect.setPrototypeOf(target, Reflect.getPrototypeOf(resolved));
|
|
253
|
+
for (const property of Reflect.ownKeys(resolved)) {
|
|
254
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(resolved, property);
|
|
255
|
+
if (descriptor) Reflect.defineProperty(target, property, descriptor);
|
|
256
|
+
}
|
|
257
|
+
targetIsMaterialized = true;
|
|
258
|
+
return resolved;
|
|
259
|
+
};
|
|
260
|
+
const readSpecialProperty = (property) => {
|
|
261
|
+
switch (property) {
|
|
262
|
+
case "description": {
|
|
263
|
+
const metadata = globalRegistry.get(proxy);
|
|
264
|
+
return metadata && typeof metadata === "object" ? Reflect.get(metadata, "description") : void 0;
|
|
265
|
+
}
|
|
266
|
+
case "apply": return (operation) => operation(proxy);
|
|
267
|
+
case "register": return (registry, ...metadata) => {
|
|
268
|
+
registry.add(proxy, ...metadata);
|
|
269
|
+
return proxy;
|
|
270
|
+
};
|
|
271
|
+
case "meta": return (...metadata) => {
|
|
272
|
+
if (metadata.length === 0) return globalRegistry.get(proxy);
|
|
273
|
+
const registered = deferSchemaMethod(property, withoutRegistryIdentity(metadata));
|
|
274
|
+
globalRegistry.add(registered, ...metadata);
|
|
275
|
+
return registered;
|
|
276
|
+
};
|
|
277
|
+
case "describe": return (description) => {
|
|
278
|
+
const described = deferSchemaMethod(property, [description]);
|
|
279
|
+
globalRegistry.add(described, { description });
|
|
280
|
+
return described;
|
|
281
|
+
};
|
|
282
|
+
case "toJSONSchema": return (...args) => Reflect.apply(z$1.toJSONSchema, z$1, [proxy, ...args]);
|
|
283
|
+
default: return UNHANDLED_PROPERTY;
|
|
284
|
+
}
|
|
285
|
+
};
|
|
286
|
+
proxy = new Proxy(target, {
|
|
287
|
+
deleteProperty(_target, property) {
|
|
288
|
+
const deletedFromTarget = Reflect.deleteProperty(target, property);
|
|
289
|
+
const deletedFromSchema = Reflect.deleteProperty(resolveSchema(), property);
|
|
290
|
+
return deletedFromTarget && deletedFromSchema;
|
|
291
|
+
},
|
|
292
|
+
get(_target, property, receiver) {
|
|
293
|
+
const specialProperty = readSpecialProperty(property);
|
|
294
|
+
if (specialProperty !== UNHANDLED_PROPERTY) return specialProperty;
|
|
295
|
+
if (SELF_RETURNING_METHODS.has(property)) return () => proxy;
|
|
296
|
+
if (DEFERRED_SCHEMA_METHODS.has(property)) return (...args) => deferSchemaMethod(property, args);
|
|
297
|
+
return Reflect.getOwnPropertyDescriptor(target, property) ? Reflect.get(target, property, receiver) : readResolvedProperty(property);
|
|
298
|
+
},
|
|
299
|
+
getOwnPropertyDescriptor(_target, property) {
|
|
300
|
+
const targetDescriptor = Reflect.getOwnPropertyDescriptor(target, property);
|
|
301
|
+
if (targetDescriptor || targetIsMaterialized) return targetDescriptor;
|
|
302
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(resolveSchema(), property);
|
|
303
|
+
return descriptor ? {
|
|
304
|
+
...descriptor,
|
|
305
|
+
configurable: true
|
|
306
|
+
} : void 0;
|
|
307
|
+
},
|
|
308
|
+
getPrototypeOf() {
|
|
309
|
+
return targetIsMaterialized ? Reflect.getPrototypeOf(target) : Reflect.getPrototypeOf(resolveSchema());
|
|
310
|
+
},
|
|
311
|
+
has(_target, property) {
|
|
312
|
+
return Reflect.has(target, property) || Reflect.has(resolveSchema(), property);
|
|
313
|
+
},
|
|
314
|
+
ownKeys() {
|
|
315
|
+
if (targetIsMaterialized) return Reflect.ownKeys(target);
|
|
316
|
+
return [.../* @__PURE__ */ new Set([...Reflect.ownKeys(target), ...Reflect.ownKeys(resolveSchema())])];
|
|
317
|
+
},
|
|
318
|
+
preventExtensions() {
|
|
319
|
+
const resolved = materializeTarget();
|
|
320
|
+
return Reflect.preventExtensions(resolved) && Reflect.preventExtensions(target);
|
|
321
|
+
},
|
|
322
|
+
set(_target, property, value) {
|
|
323
|
+
const resolved = resolveSchema();
|
|
324
|
+
if (!targetIsMaterialized) return Reflect.set(resolved, property, value);
|
|
325
|
+
return Reflect.set(resolved, property, value) && Reflect.set(target, property, value);
|
|
326
|
+
}
|
|
327
|
+
});
|
|
328
|
+
return proxy;
|
|
329
|
+
}
|
|
330
|
+
function withoutRegistryIdentity(metadata) {
|
|
331
|
+
const [firstMetadata] = metadata;
|
|
332
|
+
if (!(firstMetadata && typeof firstMetadata === "object" && "id" in firstMetadata)) return metadata;
|
|
333
|
+
return [Object.fromEntries(Object.entries(firstMetadata).filter(([key]) => key !== "id")), ...metadata.slice(1)];
|
|
334
|
+
}
|
|
335
|
+
function snapshotFactoryArgument(value) {
|
|
336
|
+
return Array.isArray(value) ? [...value] : value;
|
|
337
|
+
}
|
|
338
|
+
function lazyFactory(factory) {
|
|
339
|
+
const invoke = factory;
|
|
340
|
+
return ((...args) => {
|
|
341
|
+
const declaredArgs = args.map(snapshotFactoryArgument);
|
|
342
|
+
return lazySchema(() => invoke(...declaredArgs));
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
const array = lazyFactory(z$1.array);
|
|
346
|
+
const boolean = lazyFactory(z$1.boolean);
|
|
347
|
+
const discriminatedUnion = lazyFactory(z$1.discriminatedUnion);
|
|
348
|
+
const email = lazyFactory(z$1.email);
|
|
349
|
+
const enumFactory = lazyFactory(z$1.enum);
|
|
350
|
+
const int = lazyFactory(z$1.int);
|
|
351
|
+
const literal = lazyFactory(z$1.literal);
|
|
352
|
+
const neverFactory = lazyFactory(z$1.never);
|
|
353
|
+
const nullFactory = lazyFactory(z$1.null);
|
|
354
|
+
const number = lazyFactory(z$1.number);
|
|
355
|
+
const object = lazyFactory(z$1.object);
|
|
356
|
+
const preprocess = lazyFactory(z$1.preprocess);
|
|
357
|
+
const record = lazyFactory(z$1.record);
|
|
358
|
+
const strictObject = lazyFactory(z$1.strictObject);
|
|
359
|
+
const string = lazyFactory(z$1.string);
|
|
360
|
+
const tuple = lazyFactory(z$1.tuple);
|
|
361
|
+
const union = lazyFactory(z$1.union);
|
|
362
|
+
const undefinedFactory = lazyFactory(z$1.undefined);
|
|
363
|
+
const unknown = lazyFactory(z$1.unknown);
|
|
364
|
+
const url = lazyFactory(z$1.url);
|
|
365
|
+
const coerce = {
|
|
366
|
+
...z$1.coerce,
|
|
367
|
+
bigint: lazyFactory(z$1.coerce.bigint),
|
|
368
|
+
boolean: lazyFactory(z$1.coerce.boolean),
|
|
369
|
+
date: lazyFactory(z$1.coerce.date),
|
|
370
|
+
number: lazyFactory(z$1.coerce.number),
|
|
371
|
+
string: lazyFactory(z$1.coerce.string)
|
|
372
|
+
};
|
|
373
|
+
const iso = {
|
|
374
|
+
...z$1.iso,
|
|
375
|
+
date: lazyFactory(z$1.iso.date),
|
|
376
|
+
datetime: lazyFactory(z$1.iso.datetime),
|
|
377
|
+
duration: lazyFactory(z$1.iso.duration),
|
|
378
|
+
time: lazyFactory(z$1.iso.time)
|
|
379
|
+
};
|
|
380
|
+
//#endregion
|
|
381
|
+
//#region ../../packages/schemas/dist/schemas/local-components.js
|
|
382
|
+
const nonEmptyStringSchema = string().trim().min(1);
|
|
383
|
+
const nullableNonEmptyStringSchema$1 = nonEmptyStringSchema.nullable();
|
|
384
|
+
const localComponentStatusSchema = enumFactory([
|
|
385
|
+
"ok",
|
|
386
|
+
"update_available",
|
|
387
|
+
"update_required"
|
|
388
|
+
]);
|
|
389
|
+
const localComponentUpdatePolicySchema = enumFactory([
|
|
390
|
+
"ok",
|
|
391
|
+
"available",
|
|
392
|
+
"required"
|
|
393
|
+
]);
|
|
394
|
+
const localComponentUpdateStatusSchema = enumFactory([
|
|
395
|
+
"current",
|
|
396
|
+
"update_available",
|
|
397
|
+
"update_required",
|
|
398
|
+
"unknown"
|
|
399
|
+
]);
|
|
400
|
+
const openMeldToolsUpdateOperationPhaseSchema = enumFactory([
|
|
401
|
+
"waiting_for_work",
|
|
402
|
+
"updating",
|
|
403
|
+
"updated",
|
|
404
|
+
"restored",
|
|
405
|
+
"needs_help"
|
|
406
|
+
]);
|
|
407
|
+
const openMeldToolsUpdateRequestSourceSchema = enumFactory([
|
|
408
|
+
"automatic",
|
|
409
|
+
"center_agent",
|
|
410
|
+
"cli",
|
|
411
|
+
"web"
|
|
412
|
+
]);
|
|
413
|
+
const openMeldToolsUpdateOperationSchema = strictObject({
|
|
414
|
+
operationId: nonEmptyStringSchema,
|
|
415
|
+
phase: openMeldToolsUpdateOperationPhaseSchema,
|
|
416
|
+
requestSource: openMeldToolsUpdateRequestSourceSchema,
|
|
417
|
+
requestedAt: iso.datetime({ offset: true }),
|
|
418
|
+
targetVersion: nonEmptyStringSchema,
|
|
419
|
+
updatedAt: iso.datetime({ offset: true }),
|
|
420
|
+
urgency: enumFactory(["available", "required"])
|
|
421
|
+
});
|
|
422
|
+
const openMeldToolsMaintenanceProjectionSchema = strictObject({
|
|
423
|
+
automaticUpdatesEnabled: boolean(),
|
|
424
|
+
status: enumFactory(["ready", "needs_help"])
|
|
425
|
+
});
|
|
426
|
+
const openMeldToolsControlCapabilitySchema = strictObject({
|
|
427
|
+
requestAutomaticUpdate: literal(true).optional(),
|
|
428
|
+
requestUpdate: literal(true).optional(),
|
|
429
|
+
setAutomaticUpdates: literal(true).optional()
|
|
430
|
+
});
|
|
431
|
+
const openMeldToolsUpdateRequestResultSchema = discriminatedUnion("status", [
|
|
432
|
+
strictObject({ status: literal("disabled") }),
|
|
433
|
+
strictObject({ status: literal("unavailable") }),
|
|
434
|
+
strictObject({
|
|
435
|
+
currentVersion: nonEmptyStringSchema,
|
|
436
|
+
status: literal("current")
|
|
437
|
+
}),
|
|
438
|
+
strictObject({
|
|
439
|
+
operation: openMeldToolsUpdateOperationSchema,
|
|
440
|
+
status: enumFactory(["started", "already_running"])
|
|
441
|
+
})
|
|
442
|
+
]);
|
|
443
|
+
const openMeldToolsMaintenanceMutationResultSchema = strictObject({
|
|
444
|
+
automaticUpdatesEnabled: boolean(),
|
|
445
|
+
status: enumFactory(["updated", "unchanged"])
|
|
446
|
+
});
|
|
447
|
+
const openMeldToolsControlRequestSchema = discriminatedUnion("operation", [strictObject({
|
|
448
|
+
operation: literal("request_update"),
|
|
449
|
+
requestSource: enumFactory([
|
|
450
|
+
"automatic",
|
|
451
|
+
"center_agent",
|
|
452
|
+
"web"
|
|
453
|
+
])
|
|
454
|
+
}), strictObject({
|
|
455
|
+
automaticUpdatesEnabled: boolean(),
|
|
456
|
+
operation: literal("set_automatic_updates"),
|
|
457
|
+
requestSource: enumFactory(["center_agent", "web"])
|
|
458
|
+
})]);
|
|
459
|
+
const openMeldToolsControlResultSchema = discriminatedUnion("operation", [strictObject({
|
|
460
|
+
operation: literal("request_update"),
|
|
461
|
+
result: openMeldToolsUpdateRequestResultSchema
|
|
462
|
+
}), strictObject({
|
|
463
|
+
operation: literal("set_automatic_updates"),
|
|
464
|
+
result: openMeldToolsMaintenanceMutationResultSchema
|
|
465
|
+
})]);
|
|
466
|
+
const openMeldToolsUpdateAttemptSchema = strictObject({
|
|
467
|
+
v: literal(1),
|
|
468
|
+
attempts: number().int().nonnegative(),
|
|
469
|
+
errorMessage: nullableNonEmptyStringSchema$1,
|
|
470
|
+
operation: openMeldToolsUpdateOperationSchema
|
|
471
|
+
});
|
|
472
|
+
const localSetupActionSchema = enumFactory([
|
|
473
|
+
"none",
|
|
474
|
+
"connect_service",
|
|
475
|
+
"reconnect_service",
|
|
476
|
+
"update_service",
|
|
477
|
+
"connect_local_agent",
|
|
478
|
+
"update_skills",
|
|
479
|
+
"update_cli"
|
|
480
|
+
]);
|
|
481
|
+
const localSetupEntrypointSchema = literal("setup");
|
|
482
|
+
const localComponentsManifestSchema = strictObject({
|
|
483
|
+
schemaVersion: literal(1),
|
|
484
|
+
openMeldReleaseVersion: nonEmptyStringSchema,
|
|
485
|
+
cli: strictObject({
|
|
486
|
+
packageVersion: nonEmptyStringSchema,
|
|
487
|
+
commandContractVersion: nonEmptyStringSchema
|
|
488
|
+
}),
|
|
489
|
+
service: strictObject({
|
|
490
|
+
bundleHash: nullableNonEmptyStringSchema$1,
|
|
491
|
+
bundleVersion: nonEmptyStringSchema,
|
|
492
|
+
runtimeContractEpoch: nonEmptyStringSchema,
|
|
493
|
+
serviceContractVersion: nonEmptyStringSchema
|
|
494
|
+
}),
|
|
495
|
+
skills: strictObject({
|
|
496
|
+
bundleHash: nullableNonEmptyStringSchema$1,
|
|
497
|
+
skillContractVersion: nonEmptyStringSchema,
|
|
498
|
+
skillIds: array(nonEmptyStringSchema)
|
|
499
|
+
})
|
|
500
|
+
});
|
|
501
|
+
strictObject({
|
|
502
|
+
schemaVersion: literal(1),
|
|
503
|
+
updatedAt: iso.datetime({ offset: true }),
|
|
504
|
+
components: strictObject({
|
|
505
|
+
cli: strictObject({
|
|
506
|
+
packageVersion: nonEmptyStringSchema,
|
|
507
|
+
commandContractVersion: nonEmptyStringSchema,
|
|
508
|
+
updatePolicy: localComponentUpdatePolicySchema,
|
|
509
|
+
reason: nonEmptyStringSchema
|
|
510
|
+
}),
|
|
511
|
+
service: strictObject({
|
|
512
|
+
bundleHash: nullableNonEmptyStringSchema$1,
|
|
513
|
+
bundleVersion: nonEmptyStringSchema,
|
|
514
|
+
runtimeContractEpoch: nonEmptyStringSchema,
|
|
515
|
+
serviceContractVersion: nonEmptyStringSchema,
|
|
516
|
+
updatePolicy: localComponentUpdatePolicySchema,
|
|
517
|
+
reason: nonEmptyStringSchema
|
|
518
|
+
}),
|
|
519
|
+
skills: strictObject({
|
|
520
|
+
bundleHash: nullableNonEmptyStringSchema$1,
|
|
521
|
+
skillContractVersion: nonEmptyStringSchema,
|
|
522
|
+
skillIds: array(nonEmptyStringSchema),
|
|
523
|
+
updatePolicy: localComponentUpdatePolicySchema,
|
|
524
|
+
reason: nonEmptyStringSchema
|
|
525
|
+
})
|
|
526
|
+
})
|
|
527
|
+
});
|
|
528
|
+
const installedLocalComponentsSnapshotSchema = strictObject({
|
|
529
|
+
schemaVersion: literal(1),
|
|
530
|
+
installedAt: iso.datetime({ offset: true }),
|
|
531
|
+
source: enumFactory([
|
|
532
|
+
"setup",
|
|
533
|
+
"repair",
|
|
534
|
+
"manual"
|
|
535
|
+
]),
|
|
536
|
+
manifest: localComponentsManifestSchema
|
|
537
|
+
});
|
|
538
|
+
const localComponentProjectionSchema = strictObject({
|
|
539
|
+
reasonCodes: array(nonEmptyStringSchema),
|
|
540
|
+
status: localComponentStatusSchema
|
|
541
|
+
});
|
|
542
|
+
const localCliComponentProjectionSchema = localComponentProjectionSchema.extend({
|
|
543
|
+
commandContractVersion: nonEmptyStringSchema,
|
|
544
|
+
latestPackageVersion: nullableNonEmptyStringSchema$1,
|
|
545
|
+
packageVersion: nonEmptyStringSchema,
|
|
546
|
+
requiredCommandContractVersion: nullableNonEmptyStringSchema$1
|
|
547
|
+
});
|
|
548
|
+
const localServiceComponentProjectionSchema = localComponentProjectionSchema.extend({
|
|
549
|
+
expectedBundleHash: nullableNonEmptyStringSchema$1,
|
|
550
|
+
expectedBundleVersion: nonEmptyStringSchema,
|
|
551
|
+
installedBundleHash: nullableNonEmptyStringSchema$1,
|
|
552
|
+
installedBundleVersion: nullableNonEmptyStringSchema$1,
|
|
553
|
+
runtimeContractEpoch: nonEmptyStringSchema,
|
|
554
|
+
serviceContractVersion: nonEmptyStringSchema
|
|
555
|
+
});
|
|
556
|
+
const localSkillsComponentProjectionSchema = localComponentProjectionSchema.extend({
|
|
557
|
+
contentRelease: strictObject({
|
|
558
|
+
revision: number().int().positive(),
|
|
559
|
+
minimumCliVersion: string().regex(/^\d+\.\d+\.\d+$/)
|
|
560
|
+
}).optional(),
|
|
561
|
+
expectedBundleHash: nullableNonEmptyStringSchema$1,
|
|
562
|
+
installedBundleHash: nullableNonEmptyStringSchema$1,
|
|
563
|
+
skillContractVersion: nonEmptyStringSchema,
|
|
564
|
+
targetCount: number().int().nonnegative()
|
|
565
|
+
});
|
|
566
|
+
const localComponentsStatusSchema = strictObject({
|
|
567
|
+
schemaVersion: literal(1),
|
|
568
|
+
generatedAt: iso.datetime({ offset: true }),
|
|
569
|
+
entrypoint: localSetupEntrypointSchema,
|
|
570
|
+
summaryLabel: nonEmptyStringSchema,
|
|
571
|
+
summaryDescription: nonEmptyStringSchema,
|
|
572
|
+
setupAction: localSetupActionSchema,
|
|
573
|
+
setupActionLabel: nonEmptyStringSchema,
|
|
574
|
+
setupActionDescription: nonEmptyStringSchema,
|
|
575
|
+
maintenance: openMeldToolsMaintenanceProjectionSchema.optional(),
|
|
576
|
+
updateOperation: openMeldToolsUpdateOperationSchema.optional(),
|
|
577
|
+
cli: localCliComponentProjectionSchema,
|
|
578
|
+
service: localServiceComponentProjectionSchema,
|
|
579
|
+
skills: localSkillsComponentProjectionSchema
|
|
580
|
+
});
|
|
581
|
+
const localServiceComponentUpdateProjectionSchema = strictObject({
|
|
582
|
+
installedVersion: nullableNonEmptyStringSchema$1,
|
|
583
|
+
latestVersion: nullableNonEmptyStringSchema$1,
|
|
584
|
+
reasonCodes: array(nonEmptyStringSchema),
|
|
585
|
+
requiredVersion: nullableNonEmptyStringSchema$1,
|
|
586
|
+
status: localComponentUpdateStatusSchema,
|
|
587
|
+
updatePolicy: localComponentUpdatePolicySchema,
|
|
588
|
+
wakeBlocked: boolean()
|
|
589
|
+
});
|
|
590
|
+
const localCliComponentUpdateProjectionSchema = strictObject({
|
|
591
|
+
commandContractVersion: nullableNonEmptyStringSchema$1,
|
|
592
|
+
installedPackageVersion: nullableNonEmptyStringSchema$1,
|
|
593
|
+
latestPackageVersion: nullableNonEmptyStringSchema$1,
|
|
594
|
+
reasonCodes: array(nonEmptyStringSchema),
|
|
595
|
+
requiredCommandContractVersion: nullableNonEmptyStringSchema$1,
|
|
596
|
+
status: localComponentUpdateStatusSchema,
|
|
597
|
+
updatePolicy: localComponentUpdatePolicySchema,
|
|
598
|
+
wakeBlocked: boolean()
|
|
599
|
+
});
|
|
600
|
+
const localSkillsComponentUpdateProjectionSchema = strictObject({
|
|
601
|
+
expectedBundleHash: nullableNonEmptyStringSchema$1,
|
|
602
|
+
expectedTargetCount: number().int().nonnegative(),
|
|
603
|
+
installedBundleHash: nullableNonEmptyStringSchema$1,
|
|
604
|
+
reasonCodes: array(nonEmptyStringSchema),
|
|
605
|
+
skillContractVersion: nullableNonEmptyStringSchema$1,
|
|
606
|
+
status: localComponentUpdateStatusSchema,
|
|
607
|
+
targetCount: number().int().nonnegative().nullable(),
|
|
608
|
+
updatePolicy: localComponentUpdatePolicySchema,
|
|
609
|
+
wakeBlocked: boolean()
|
|
610
|
+
});
|
|
611
|
+
const localComponentUpdateProjectionSchema = strictObject({
|
|
612
|
+
schemaVersion: literal(1),
|
|
613
|
+
generatedAt: iso.datetime({ offset: true }),
|
|
614
|
+
setupAction: localSetupActionSchema,
|
|
615
|
+
setupActionLabel: nonEmptyStringSchema,
|
|
616
|
+
setupActionDescription: nonEmptyStringSchema,
|
|
617
|
+
humanSetupCommand: nonEmptyStringSchema,
|
|
618
|
+
agentSetupCommand: nonEmptyStringSchema,
|
|
619
|
+
maintenance: openMeldToolsMaintenanceProjectionSchema.optional(),
|
|
620
|
+
updateOperation: openMeldToolsUpdateOperationSchema.optional(),
|
|
621
|
+
cli: localCliComponentUpdateProjectionSchema,
|
|
622
|
+
service: localServiceComponentUpdateProjectionSchema,
|
|
623
|
+
skills: localSkillsComponentUpdateProjectionSchema
|
|
624
|
+
});
|
|
625
|
+
function formatLocalSetupActionLabel(action) {
|
|
626
|
+
switch (action) {
|
|
627
|
+
case "connect_service": return "Connect Computer";
|
|
628
|
+
case "reconnect_service": return "Reconnect Computer";
|
|
629
|
+
case "update_service": return "Update OpenMeld on Computer";
|
|
630
|
+
case "connect_local_agent": return "Connect local agent";
|
|
631
|
+
case "update_skills": return "Update OpenMeld skills";
|
|
632
|
+
case "update_cli": return "Update OpenMeld CLI";
|
|
633
|
+
case "none": return "Everything is up to date";
|
|
634
|
+
default: return action;
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
function formatLocalComponentsSummaryLabel(input) {
|
|
638
|
+
if (input.setupAction !== "none") return formatLocalSetupActionLabel(input.setupAction);
|
|
639
|
+
switch (input.cliStatus) {
|
|
640
|
+
case "update_required": return "Update OpenMeld CLI";
|
|
641
|
+
case "update_available": return "OpenMeld CLI update available";
|
|
642
|
+
case "ok": return "Everything is up to date";
|
|
643
|
+
default: return input.cliStatus;
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
function formatLocalComponentsSummaryDescription(input) {
|
|
647
|
+
if (input.setupAction !== "none") return formatLocalSetupActionDescription(input.setupAction);
|
|
648
|
+
switch (input.cliStatus) {
|
|
649
|
+
case "update_required": return "Update OpenMeld CLI before running this setup flow.";
|
|
650
|
+
case "update_available": return "OpenMeld CLI can be updated, but this setup flow can continue.";
|
|
651
|
+
case "ok": return "OpenMeld local components are aligned for this computer.";
|
|
652
|
+
default: return input.cliStatus;
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
function formatLocalSetupActionDescription(action) {
|
|
656
|
+
switch (action) {
|
|
657
|
+
case "connect_service": return "Connect this computer to OpenMeld so local agents can reply in Spaces.";
|
|
658
|
+
case "reconnect_service": return "Reconnect this computer to the current OpenMeld account.";
|
|
659
|
+
case "update_service": return "Update OpenMeld on this computer.";
|
|
660
|
+
case "connect_local_agent": return "Connect this Agent Profile to a local agent runtime on this computer.";
|
|
661
|
+
case "update_skills": return "Update OpenMeld skills through setup on this computer.";
|
|
662
|
+
case "update_cli": return "Update OpenMeld CLI before running this setup flow.";
|
|
663
|
+
case "none": return "OpenMeld local components are aligned for this computer.";
|
|
664
|
+
default: return action;
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
//#endregion
|
|
668
|
+
//#region ../../packages/schemas/dist/schemas/daemon/conversation-lifecycle.js
|
|
669
|
+
const conversationBootstrapReasonSchema = z$1.enum([
|
|
670
|
+
"missing_bootstrap_state",
|
|
671
|
+
"compatibility_recreate",
|
|
672
|
+
"template_changed",
|
|
673
|
+
"idle_stale",
|
|
674
|
+
"dispatch_count_stale",
|
|
675
|
+
"context_healed",
|
|
676
|
+
"context_replaced"
|
|
677
|
+
]);
|
|
678
|
+
const localRuntimeContextReasonSchema = z$1.enum([
|
|
679
|
+
"first_local_runtime_context",
|
|
680
|
+
"workspace_changed",
|
|
681
|
+
"transport_mode_changed",
|
|
682
|
+
"policy_changed",
|
|
683
|
+
"execution_state_missing",
|
|
684
|
+
"controller_changed"
|
|
685
|
+
]);
|
|
686
|
+
const agentControllerConversationResumePlanBlockedReasonSchema = z$1.enum(["controller_changed"]);
|
|
687
|
+
const agentControllerConversationResumePlanSchema = z$1.discriminatedUnion("status", [
|
|
688
|
+
z$1.strictObject({ status: z$1.literal("not_bound") }),
|
|
689
|
+
z$1.strictObject({ status: z$1.literal("continue_existing") }),
|
|
690
|
+
z$1.strictObject({
|
|
691
|
+
status: z$1.literal("blocked"),
|
|
692
|
+
reason: agentControllerConversationResumePlanBlockedReasonSchema
|
|
693
|
+
})
|
|
694
|
+
]);
|
|
695
|
+
const localRuntimeContextPlanSchema = z$1.strictObject({
|
|
696
|
+
status: z$1.enum(["reuse", "recreate"]),
|
|
697
|
+
reason: z$1.union([localRuntimeContextReasonSchema, z$1.null()])
|
|
698
|
+
});
|
|
699
|
+
const conversationBootstrapSchema = z$1.discriminatedUnion("status", [z$1.strictObject({
|
|
700
|
+
reason: z$1.null(),
|
|
701
|
+
status: z$1.literal("applied")
|
|
702
|
+
}), z$1.strictObject({
|
|
703
|
+
reason: conversationBootstrapReasonSchema,
|
|
704
|
+
status: z$1.literal("pending")
|
|
705
|
+
})]);
|
|
706
|
+
z$1.strictObject({
|
|
707
|
+
agentControllerConversationResume: agentControllerConversationResumePlanSchema,
|
|
708
|
+
localRuntimeContext: localRuntimeContextPlanSchema,
|
|
709
|
+
bootstrap: conversationBootstrapSchema
|
|
710
|
+
});
|
|
711
|
+
const agentControllerConversationResumeSchema = z$1.discriminatedUnion("status", [
|
|
712
|
+
z$1.strictObject({ status: z$1.literal("not_bound") }),
|
|
713
|
+
z$1.strictObject({ status: z$1.literal("continued") }),
|
|
714
|
+
z$1.strictObject({ status: z$1.literal("replaced_by_provider") })
|
|
715
|
+
]);
|
|
716
|
+
const localRuntimeContextExecutionSchema = z$1.strictObject({
|
|
717
|
+
status: z$1.enum(["reused", "recreated"]),
|
|
718
|
+
reason: z$1.union([localRuntimeContextReasonSchema, z$1.null()])
|
|
719
|
+
});
|
|
720
|
+
const dispatchExecutionSchema = z$1.strictObject({
|
|
721
|
+
agentControllerConversationResume: agentControllerConversationResumeSchema,
|
|
722
|
+
localRuntimeContext: localRuntimeContextExecutionSchema,
|
|
723
|
+
bootstrap: conversationBootstrapSchema
|
|
724
|
+
});
|
|
725
|
+
//#endregion
|
|
726
|
+
//#region ../../packages/schemas/dist/schemas/daemon/conversation-execution-state.js
|
|
727
|
+
const ISO_DATE_TIME_SCHEMA = z$1.iso.datetime({ offset: true });
|
|
728
|
+
const bootstrapTemplateFactsSchema = z$1.strictObject({
|
|
729
|
+
templateVersion: z$1.string().min(1),
|
|
730
|
+
contentFingerprint: z$1.string().min(1)
|
|
731
|
+
});
|
|
732
|
+
const conversationExecutionStateSchema = z$1.strictObject({
|
|
733
|
+
agentContextLookupKey: z$1.string().min(1),
|
|
734
|
+
activeContextId: z$1.string().min(1).nullable(),
|
|
735
|
+
lastResolvedAgentControllerConversation: agentControllerConversationRefSchema.optional(),
|
|
736
|
+
lastRuntimeWorkspacePath: profileWorkingDirectorySchema.optional(),
|
|
737
|
+
runtimeWorkspaceFingerprint: z$1.string().min(1),
|
|
738
|
+
bootstrapLastAppliedAt: ISO_DATE_TIME_SCHEMA.optional(),
|
|
739
|
+
bootstrapLastActivatedAt: ISO_DATE_TIME_SCHEMA.optional(),
|
|
740
|
+
dispatchesSinceBootstrapApplied: z$1.number().int().min(0),
|
|
741
|
+
lastAppliedTemplateVersion: z$1.string().min(1).optional(),
|
|
742
|
+
lastAppliedContentFingerprint: z$1.string().min(1).optional(),
|
|
743
|
+
pendingBootstrapReason: conversationBootstrapReasonSchema.optional(),
|
|
744
|
+
updatedAt: ISO_DATE_TIME_SCHEMA
|
|
745
|
+
});
|
|
746
|
+
//#endregion
|
|
747
|
+
//#region ../../packages/schemas/dist/schemas/daemon/provider-runtime-context.js
|
|
748
|
+
const providerDispatchRuntimeContextSchema = z$1.strictObject({ providerRuntimeWorkingDirectory: z$1.string().trim().min(1).max(MAX_PROFILE_WORKING_DIRECTORY_LENGTH).refine((value) => !value.includes("\0"), { message: "providerRuntimeWorkingDirectory must not contain NUL bytes" }) });
|
|
749
|
+
enumFactory([
|
|
750
|
+
"status",
|
|
751
|
+
"health",
|
|
752
|
+
"history",
|
|
753
|
+
"interrupt",
|
|
754
|
+
"cancel",
|
|
755
|
+
"conversation_execution_status",
|
|
756
|
+
"request_agent_activity_sync",
|
|
757
|
+
"sync_route_catalog",
|
|
758
|
+
"set_local_agent_enabled",
|
|
759
|
+
"set_profile_workspace",
|
|
760
|
+
"service_update_readiness",
|
|
761
|
+
"account_control_capabilities",
|
|
762
|
+
"shutdown"
|
|
763
|
+
]);
|
|
764
|
+
const openMeldDaemonHealthStateSchema = enumFactory([
|
|
765
|
+
"ok",
|
|
766
|
+
"degraded",
|
|
767
|
+
"down"
|
|
768
|
+
]);
|
|
769
|
+
const openMeldDaemonRuntimeHealthStateSchema = enumFactory([
|
|
770
|
+
"healthy",
|
|
771
|
+
"idle",
|
|
772
|
+
"suspect",
|
|
773
|
+
"down"
|
|
774
|
+
]);
|
|
775
|
+
const openMeldDaemonControlTargetSelectorSchema = discriminatedUnion("by", [strictObject({
|
|
776
|
+
by: literal("dispatch"),
|
|
777
|
+
dispatchId: string().min(1)
|
|
778
|
+
}), strictObject({
|
|
779
|
+
by: literal("task"),
|
|
780
|
+
taskId: string().min(1)
|
|
781
|
+
})]);
|
|
782
|
+
const openMeldDaemonInterruptRequestPayloadSchema = strictObject({
|
|
783
|
+
runtimeCoordinatorExecutionId: string().min(1).optional(),
|
|
784
|
+
target: openMeldDaemonControlTargetSelectorSchema,
|
|
785
|
+
mode: enumFactory(["graceful", "force"]).optional(),
|
|
786
|
+
reason: string().min(1).optional()
|
|
787
|
+
});
|
|
788
|
+
const openMeldDaemonCancelRequestPayloadSchema = strictObject({
|
|
789
|
+
runtimeCoordinatorExecutionId: string().min(1).optional(),
|
|
790
|
+
target: openMeldDaemonControlTargetSelectorSchema,
|
|
791
|
+
reason: string().min(1).optional()
|
|
792
|
+
});
|
|
793
|
+
const openMeldDaemonShutdownRequestPayloadSchema = strictObject({
|
|
794
|
+
accountAdmissionId: string().uuid().optional(),
|
|
795
|
+
mode: enumFactory(["graceful", "force"]).default("graceful"),
|
|
796
|
+
gracePeriodMs: number().int().nonnegative().default(5e3)
|
|
797
|
+
});
|
|
798
|
+
const openMeldDaemonServiceUpdateReadinessPayloadSchema = strictObject({
|
|
799
|
+
acceptedWakeCount: number().int().nonnegative(),
|
|
800
|
+
safeToSwitch: boolean(),
|
|
801
|
+
unacknowledgedResultCount: number().int().nonnegative()
|
|
802
|
+
});
|
|
803
|
+
const openMeldDaemonConversationExecutionControllerLaunchStatusSchema = enumFactory([
|
|
804
|
+
"missing",
|
|
805
|
+
"disabled",
|
|
806
|
+
"repair_required",
|
|
807
|
+
"ready"
|
|
808
|
+
]);
|
|
809
|
+
const nullableAgentControllerRefSchema = union([string().min(1), nullFactory()]);
|
|
810
|
+
const nullableNonEmptyStringSchema = union([string().min(1), nullFactory()]);
|
|
811
|
+
const openMeldDaemonConversationExecutionStatusRequestPayloadSchema = strictObject({
|
|
812
|
+
boundAgentControllerRef: nullableAgentControllerRefSchema,
|
|
813
|
+
agentControllerConversationId: nullableNonEmptyStringSchema,
|
|
814
|
+
agentControllerRef: string().min(1),
|
|
815
|
+
spaceId: nonEmptyTrimmedStringFromUnknown,
|
|
816
|
+
targetProfileId: agentProfileIdSchema,
|
|
817
|
+
transportMode: runtimeTransportModeSchema,
|
|
818
|
+
validate: boolean()
|
|
819
|
+
});
|
|
820
|
+
const openMeldDaemonSyncRouteCatalogRequestPayloadSchema = strictObject({ reason: string().min(1) });
|
|
821
|
+
const openMeldDaemonRequestAgentActivitySyncRequestPayloadSchema = strictObject({ reason: string().trim().min(1).max(128) });
|
|
822
|
+
const openMeldDaemonSetLocalAgentEnabledRequestPayloadSchema = strictObject({
|
|
823
|
+
agentId: string().trim().min(1).max(256),
|
|
824
|
+
enabled: boolean()
|
|
825
|
+
});
|
|
826
|
+
const localAgentInstallationOptionSchema = strictObject({
|
|
827
|
+
installationId: string().trim().min(1).max(256),
|
|
828
|
+
name: string().trim().min(1).max(256),
|
|
829
|
+
details: string().trim().min(1).max(256),
|
|
830
|
+
selected: boolean()
|
|
831
|
+
});
|
|
832
|
+
const openMeldDaemonManageLocalAgentInstallationRequestPayloadSchema = discriminatedUnion("operation", [strictObject({
|
|
833
|
+
agentId: string().trim().min(1).max(256),
|
|
834
|
+
operation: literal("list")
|
|
835
|
+
}), strictObject({
|
|
836
|
+
agentId: string().trim().min(1).max(256),
|
|
837
|
+
installationId: string().trim().min(1).max(256),
|
|
838
|
+
operation: literal("select")
|
|
839
|
+
})]);
|
|
840
|
+
const openMeldDaemonSetProfileWorkspaceRequestPayloadSchema = strictObject({
|
|
841
|
+
targetProfileId: agentProfileIdSchema,
|
|
842
|
+
workspaceMode: profileWorkspaceModeSchema,
|
|
843
|
+
workspacePath: profileWorkingDirectorySchema.optional()
|
|
844
|
+
}).superRefine((value, context) => {
|
|
845
|
+
if (value.workspaceMode === "custom" && !value.workspacePath) context.addIssue({
|
|
846
|
+
code: "custom",
|
|
847
|
+
message: "workspacePath is required for a custom profile workspace",
|
|
848
|
+
path: ["workspacePath"]
|
|
849
|
+
});
|
|
850
|
+
if (value.workspaceMode === "openmeld_managed" && value.workspacePath) context.addIssue({
|
|
851
|
+
code: "custom",
|
|
852
|
+
message: "workspacePath must be omitted for an OpenMeld-managed profile workspace",
|
|
853
|
+
path: ["workspacePath"]
|
|
854
|
+
});
|
|
855
|
+
});
|
|
856
|
+
const openMeldDaemonConversationExecutionRuntimeWorkspaceSchema = discriminatedUnion("status", [
|
|
857
|
+
strictObject({
|
|
858
|
+
configPath: string().min(1),
|
|
859
|
+
configuredWorkspacePath: string().min(1),
|
|
860
|
+
fingerprint: string().min(1),
|
|
861
|
+
path: string().min(1),
|
|
862
|
+
reasonCode: nullFactory(),
|
|
863
|
+
reasonText: nullFactory(),
|
|
864
|
+
runtimeContext: providerDispatchRuntimeContextSchema,
|
|
865
|
+
status: literal("ready"),
|
|
866
|
+
workspaceMode: profileWorkspaceModeSchema
|
|
867
|
+
}),
|
|
868
|
+
strictObject({
|
|
869
|
+
configPath: string().min(1),
|
|
870
|
+
configuredWorkspacePath: nullFactory(),
|
|
871
|
+
fingerprint: nullFactory(),
|
|
872
|
+
path: nullFactory(),
|
|
873
|
+
reasonCode: literal("workspace.missing"),
|
|
874
|
+
reasonText: string().min(1),
|
|
875
|
+
runtimeContext: nullFactory(),
|
|
876
|
+
status: literal("missing"),
|
|
877
|
+
workspaceMode: nullFactory()
|
|
878
|
+
}),
|
|
879
|
+
strictObject({
|
|
880
|
+
configPath: string().min(1),
|
|
881
|
+
configuredWorkspacePath: union([string().min(1), nullFactory()]),
|
|
882
|
+
fingerprint: nullFactory(),
|
|
883
|
+
path: nullFactory(),
|
|
884
|
+
reasonCode: literal("workspace.invalid"),
|
|
885
|
+
reasonText: string().min(1),
|
|
886
|
+
runtimeContext: nullFactory(),
|
|
887
|
+
status: literal("invalid"),
|
|
888
|
+
workspaceMode: union([profileWorkspaceModeSchema, nullFactory()])
|
|
889
|
+
})
|
|
890
|
+
]);
|
|
891
|
+
const openMeldDaemonConversationExecutionLocalRuntimeContextStatusSchema = enumFactory([
|
|
892
|
+
"missing",
|
|
893
|
+
"mismatch",
|
|
894
|
+
"ready"
|
|
895
|
+
]);
|
|
896
|
+
const openMeldDaemonProviderConversationProofStatusSchema = enumFactory([
|
|
897
|
+
"failed",
|
|
898
|
+
"not_applicable",
|
|
899
|
+
"not_run",
|
|
900
|
+
"passed"
|
|
901
|
+
]);
|
|
902
|
+
const openMeldDaemonProviderConversationProofProviderSchema = enumFactory([
|
|
903
|
+
"codex",
|
|
904
|
+
"claude-code",
|
|
905
|
+
"openclaw"
|
|
906
|
+
]);
|
|
907
|
+
const openMeldDaemonProviderConversationProofMethodSchema = enumFactory(["codex_app_server_thread_resume"]);
|
|
908
|
+
const openMeldDaemonProviderConversationProofSchema = strictObject({
|
|
909
|
+
agentControllerConversationId: nullableNonEmptyStringSchema,
|
|
910
|
+
checkedAt: union([iso.datetime({ offset: true }), nullFactory()]),
|
|
911
|
+
errorCode: nullableNonEmptyStringSchema,
|
|
912
|
+
errorMessage: nullableNonEmptyStringSchema,
|
|
913
|
+
errorType: nullableNonEmptyStringSchema,
|
|
914
|
+
expiresAt: union([iso.datetime({ offset: true }), nullFactory()]),
|
|
915
|
+
intrusive: literal(false),
|
|
916
|
+
method: union([openMeldDaemonProviderConversationProofMethodSchema, nullFactory()]),
|
|
917
|
+
provider: union([openMeldDaemonProviderConversationProofProviderSchema, nullFactory()]),
|
|
918
|
+
status: openMeldDaemonProviderConversationProofStatusSchema,
|
|
919
|
+
transportMode: union([runtimeTransportModeSchema, nullFactory()])
|
|
920
|
+
});
|
|
921
|
+
const openMeldDaemonConversationExecutionStatusPayloadSchema = strictObject({
|
|
922
|
+
agentContextLookupKey: string().min(1),
|
|
923
|
+
controllerLaunchStatus: openMeldDaemonConversationExecutionControllerLaunchStatusSchema,
|
|
924
|
+
executionState: conversationExecutionStateSchema.nullable(),
|
|
925
|
+
localRuntimeContext: strictObject({
|
|
926
|
+
agentContextLookupKey: string().min(1),
|
|
927
|
+
runtimeWorkspaceFingerprint: nullableNonEmptyStringSchema,
|
|
928
|
+
status: openMeldDaemonConversationExecutionLocalRuntimeContextStatusSchema
|
|
929
|
+
}),
|
|
930
|
+
providerConversationProof: openMeldDaemonProviderConversationProofSchema,
|
|
931
|
+
runtimeWorkspace: openMeldDaemonConversationExecutionRuntimeWorkspaceSchema
|
|
932
|
+
});
|
|
933
|
+
const openMeldDaemonSyncRouteCatalogStatusSchema = enumFactory([
|
|
934
|
+
"changed",
|
|
935
|
+
"registered",
|
|
936
|
+
"unchanged",
|
|
937
|
+
"failed",
|
|
938
|
+
"deferred"
|
|
939
|
+
]);
|
|
940
|
+
const skippedDaemonProfileSchema = strictObject({
|
|
941
|
+
profileId: agentProfileIdSchema,
|
|
942
|
+
profileName: nullableNonEmptyStringSchema,
|
|
943
|
+
skipReason: enumFactory([
|
|
944
|
+
"projection.missing",
|
|
945
|
+
"controller.registry.disabled",
|
|
946
|
+
"controller.launch.needs_repair",
|
|
947
|
+
"runtime.adapter.unsupported",
|
|
948
|
+
"controller.binding.disabled",
|
|
949
|
+
"controller.binding.incomplete",
|
|
950
|
+
"profile.status.inactive",
|
|
951
|
+
"profile.binding.read_unavailable",
|
|
952
|
+
"profile.binding.unbound",
|
|
953
|
+
"workspace.missing",
|
|
954
|
+
"workspace.invalid"
|
|
955
|
+
])
|
|
956
|
+
});
|
|
957
|
+
const openMeldDaemonSyncRouteCatalogPayloadSchema = strictObject({
|
|
958
|
+
accepted: boolean(),
|
|
959
|
+
syncStatus: openMeldDaemonSyncRouteCatalogStatusSchema,
|
|
960
|
+
profileIds: array(agentProfileIdSchema),
|
|
961
|
+
addedProfileIds: array(agentProfileIdSchema).optional(),
|
|
962
|
+
keptProfileIds: array(agentProfileIdSchema).optional(),
|
|
963
|
+
removedProfileIds: array(agentProfileIdSchema).optional(),
|
|
964
|
+
skippedProfiles: array(skippedDaemonProfileSchema).optional(),
|
|
965
|
+
note: string().min(1).optional(),
|
|
966
|
+
errorMessage: string().min(1).optional()
|
|
967
|
+
});
|
|
968
|
+
const openMeldDaemonRequestAgentActivitySyncPayloadSchema = strictObject({ accepted: boolean() });
|
|
969
|
+
const openMeldDaemonSetLocalAgentEnabledPayloadSchema = strictObject({
|
|
970
|
+
accepted: boolean(),
|
|
971
|
+
agentControllerRef: string().min(1).optional(),
|
|
972
|
+
agentId: string().trim().min(1).max(256),
|
|
973
|
+
changed: boolean(),
|
|
974
|
+
enabled: boolean(),
|
|
975
|
+
message: string().min(1).optional(),
|
|
976
|
+
reasonCode: string().min(1).optional(),
|
|
977
|
+
reportSyncStatus: enumFactory([
|
|
978
|
+
"submitted",
|
|
979
|
+
"skipped",
|
|
980
|
+
"failed"
|
|
981
|
+
]),
|
|
982
|
+
status: enumFactory([
|
|
983
|
+
"updated",
|
|
984
|
+
"unchanged",
|
|
985
|
+
"rejected"
|
|
986
|
+
])
|
|
987
|
+
});
|
|
988
|
+
const openMeldDaemonManageLocalAgentInstallationPayloadSchema = discriminatedUnion("accepted", [strictObject({
|
|
989
|
+
accepted: literal(true),
|
|
990
|
+
agentControllerRef: string().min(1),
|
|
991
|
+
agentId: string().trim().min(1).max(256),
|
|
992
|
+
changed: boolean(),
|
|
993
|
+
installations: array(localAgentInstallationOptionSchema),
|
|
994
|
+
reportSyncStatus: enumFactory([
|
|
995
|
+
"submitted",
|
|
996
|
+
"skipped",
|
|
997
|
+
"failed"
|
|
998
|
+
]),
|
|
999
|
+
selectionStatus: enumFactory([
|
|
1000
|
+
"available",
|
|
1001
|
+
"blocked_by_work",
|
|
1002
|
+
"operation_in_progress"
|
|
1003
|
+
]).optional(),
|
|
1004
|
+
selectedInstallationId: string().trim().min(1).max(256).nullable(),
|
|
1005
|
+
status: enumFactory([
|
|
1006
|
+
"listed",
|
|
1007
|
+
"updated",
|
|
1008
|
+
"unchanged"
|
|
1009
|
+
])
|
|
1010
|
+
}), strictObject({
|
|
1011
|
+
accepted: literal(false),
|
|
1012
|
+
agentId: string().trim().min(1).max(256),
|
|
1013
|
+
changed: literal(false),
|
|
1014
|
+
installations: array(localAgentInstallationOptionSchema),
|
|
1015
|
+
message: string().min(1).optional(),
|
|
1016
|
+
reasonCode: string().min(1).optional(),
|
|
1017
|
+
reportSyncStatus: literal("failed"),
|
|
1018
|
+
selectionStatus: enumFactory([
|
|
1019
|
+
"available",
|
|
1020
|
+
"blocked_by_work",
|
|
1021
|
+
"operation_in_progress"
|
|
1022
|
+
]).optional(),
|
|
1023
|
+
selectedInstallationId: string().trim().min(1).max(256).nullable(),
|
|
1024
|
+
status: literal("rejected")
|
|
1025
|
+
})]);
|
|
1026
|
+
const openMeldDaemonSetProfileWorkspacePayloadSchema = discriminatedUnion("accepted", [strictObject({
|
|
1027
|
+
accepted: literal(true),
|
|
1028
|
+
targetProfileId: agentProfileIdSchema,
|
|
1029
|
+
status: literal("updated"),
|
|
1030
|
+
workspaceMode: profileWorkspaceModeSchema,
|
|
1031
|
+
workspacePath: string().min(1)
|
|
1032
|
+
}), strictObject({
|
|
1033
|
+
accepted: literal(false),
|
|
1034
|
+
targetProfileId: agentProfileIdSchema,
|
|
1035
|
+
message: string().min(1).optional(),
|
|
1036
|
+
reasonCode: string().min(1).optional(),
|
|
1037
|
+
status: literal("rejected")
|
|
1038
|
+
})]);
|
|
1039
|
+
const openMeldDaemonControlPlaneRequestBaseSchema = strictObject({
|
|
1040
|
+
v: literal(1),
|
|
1041
|
+
requestId: string().min(1).optional(),
|
|
1042
|
+
authToken: string().min(1).optional()
|
|
1043
|
+
});
|
|
1044
|
+
const openMeldDaemonControlPlaneRequestSchema = discriminatedUnion("command", [
|
|
1045
|
+
openMeldDaemonControlPlaneRequestBaseSchema.extend({ command: literal("account_control_capabilities") }),
|
|
1046
|
+
openMeldDaemonControlPlaneRequestBaseSchema.extend({ command: literal("status") }),
|
|
1047
|
+
openMeldDaemonControlPlaneRequestBaseSchema.extend({ command: literal("health") }),
|
|
1048
|
+
openMeldDaemonControlPlaneRequestBaseSchema.extend({ command: literal("history") }),
|
|
1049
|
+
openMeldDaemonControlPlaneRequestBaseSchema.extend({
|
|
1050
|
+
command: literal("interrupt"),
|
|
1051
|
+
payload: openMeldDaemonInterruptRequestPayloadSchema
|
|
1052
|
+
}),
|
|
1053
|
+
openMeldDaemonControlPlaneRequestBaseSchema.extend({
|
|
1054
|
+
command: literal("cancel"),
|
|
1055
|
+
payload: openMeldDaemonCancelRequestPayloadSchema
|
|
1056
|
+
}),
|
|
1057
|
+
openMeldDaemonControlPlaneRequestBaseSchema.extend({
|
|
1058
|
+
command: literal("conversation_execution_status"),
|
|
1059
|
+
payload: openMeldDaemonConversationExecutionStatusRequestPayloadSchema
|
|
1060
|
+
}),
|
|
1061
|
+
openMeldDaemonControlPlaneRequestBaseSchema.extend({
|
|
1062
|
+
command: literal("sync_route_catalog"),
|
|
1063
|
+
payload: openMeldDaemonSyncRouteCatalogRequestPayloadSchema
|
|
1064
|
+
}),
|
|
1065
|
+
openMeldDaemonControlPlaneRequestBaseSchema.extend({
|
|
1066
|
+
command: literal("request_agent_activity_sync"),
|
|
1067
|
+
payload: openMeldDaemonRequestAgentActivitySyncRequestPayloadSchema
|
|
1068
|
+
}),
|
|
1069
|
+
openMeldDaemonControlPlaneRequestBaseSchema.extend({
|
|
1070
|
+
command: literal("set_local_agent_enabled"),
|
|
1071
|
+
payload: openMeldDaemonSetLocalAgentEnabledRequestPayloadSchema
|
|
1072
|
+
}),
|
|
1073
|
+
openMeldDaemonControlPlaneRequestBaseSchema.extend({
|
|
1074
|
+
command: literal("set_profile_workspace"),
|
|
1075
|
+
payload: openMeldDaemonSetProfileWorkspaceRequestPayloadSchema
|
|
1076
|
+
}),
|
|
1077
|
+
openMeldDaemonControlPlaneRequestBaseSchema.extend({ command: literal("service_update_readiness") }),
|
|
1078
|
+
openMeldDaemonControlPlaneRequestBaseSchema.extend({
|
|
1079
|
+
command: literal("shutdown"),
|
|
1080
|
+
payload: openMeldDaemonShutdownRequestPayloadSchema.optional()
|
|
1081
|
+
})
|
|
1082
|
+
]);
|
|
1083
|
+
const openMeldDaemonStatusPayloadSchema = strictObject({
|
|
1084
|
+
installed: boolean(),
|
|
1085
|
+
running: boolean(),
|
|
1086
|
+
daemonVersion: string().min(1),
|
|
1087
|
+
runtimeRoot: string().min(1),
|
|
1088
|
+
checkedAt: string().min(1)
|
|
1089
|
+
});
|
|
1090
|
+
const openMeldDaemonHealthPayloadSchema = strictObject({
|
|
1091
|
+
state: openMeldDaemonHealthStateSchema,
|
|
1092
|
+
runtimeState: openMeldDaemonRuntimeHealthStateSchema.optional(),
|
|
1093
|
+
reasonCode: string().min(1),
|
|
1094
|
+
checkedAt: string().min(1)
|
|
1095
|
+
});
|
|
1096
|
+
const openMeldDaemonHistoryPayloadSchema = strictObject({
|
|
1097
|
+
entries: array(strictObject({
|
|
1098
|
+
id: string().min(1),
|
|
1099
|
+
ts: string().min(1),
|
|
1100
|
+
code: string().min(1),
|
|
1101
|
+
message: string().min(1)
|
|
1102
|
+
})),
|
|
1103
|
+
nextCursor: string().min(1).optional()
|
|
1104
|
+
});
|
|
1105
|
+
const openMeldDaemonInterruptPayloadSchema = strictObject({
|
|
1106
|
+
accepted: boolean(),
|
|
1107
|
+
target: openMeldDaemonControlTargetSelectorSchema,
|
|
1108
|
+
resolvedDispatchId: string().min(1).optional(),
|
|
1109
|
+
resolvedRuntimeCoordinatorExecutionId: string().min(1).optional(),
|
|
1110
|
+
resolvedTaskId: string().min(1).optional(),
|
|
1111
|
+
note: string().min(1).optional(),
|
|
1112
|
+
reasonCode: string().min(1).optional()
|
|
1113
|
+
});
|
|
1114
|
+
const openMeldDaemonCancelPayloadSchema = strictObject({
|
|
1115
|
+
accepted: boolean(),
|
|
1116
|
+
target: openMeldDaemonControlTargetSelectorSchema,
|
|
1117
|
+
resolvedDispatchId: string().min(1).optional(),
|
|
1118
|
+
resolvedRuntimeCoordinatorExecutionId: string().min(1).optional(),
|
|
1119
|
+
resolvedTaskId: string().min(1).optional(),
|
|
1120
|
+
note: string().min(1).optional(),
|
|
1121
|
+
reasonCode: string().min(1).optional()
|
|
1122
|
+
});
|
|
1123
|
+
const openMeldDaemonControlPlaneErrorPayloadSchema = strictObject({
|
|
1124
|
+
errorCode: string().min(1),
|
|
1125
|
+
errorMessage: string().min(1),
|
|
1126
|
+
note: string().min(1).optional()
|
|
1127
|
+
});
|
|
1128
|
+
const openMeldDaemonShutdownPayloadSchema = strictObject({
|
|
1129
|
+
accepted: boolean(),
|
|
1130
|
+
mode: enumFactory(["graceful", "force"]),
|
|
1131
|
+
gracePeriodMs: number().int().nonnegative()
|
|
1132
|
+
});
|
|
1133
|
+
const openMeldDaemonControlPlaneResponseBaseSchema = strictObject({
|
|
1134
|
+
v: literal(1),
|
|
1135
|
+
requestId: string().min(1).optional()
|
|
1136
|
+
});
|
|
1137
|
+
const openMeldDaemonStatusResponseSchema = openMeldDaemonControlPlaneResponseBaseSchema.extend({
|
|
1138
|
+
code: literal("service.status"),
|
|
1139
|
+
payload: openMeldDaemonStatusPayloadSchema
|
|
1140
|
+
});
|
|
1141
|
+
const openMeldDaemonHealthResponseSchema = openMeldDaemonControlPlaneResponseBaseSchema.extend({
|
|
1142
|
+
code: literal("service.health"),
|
|
1143
|
+
payload: openMeldDaemonHealthPayloadSchema
|
|
1144
|
+
});
|
|
1145
|
+
const openMeldDaemonHistoryResponseSchema = openMeldDaemonControlPlaneResponseBaseSchema.extend({
|
|
1146
|
+
code: literal("service.history"),
|
|
1147
|
+
payload: openMeldDaemonHistoryPayloadSchema
|
|
1148
|
+
});
|
|
1149
|
+
const openMeldDaemonInterruptResponseSchema = openMeldDaemonControlPlaneResponseBaseSchema.extend({
|
|
1150
|
+
code: literal("service.interrupt"),
|
|
1151
|
+
payload: openMeldDaemonInterruptPayloadSchema
|
|
1152
|
+
});
|
|
1153
|
+
const openMeldDaemonCancelResponseSchema = openMeldDaemonControlPlaneResponseBaseSchema.extend({
|
|
1154
|
+
code: literal("service.cancel"),
|
|
1155
|
+
payload: openMeldDaemonCancelPayloadSchema
|
|
1156
|
+
});
|
|
1157
|
+
const openMeldDaemonConversationExecutionStatusResponseSchema = openMeldDaemonControlPlaneResponseBaseSchema.extend({
|
|
1158
|
+
code: literal("service.conversation_execution_status"),
|
|
1159
|
+
payload: openMeldDaemonConversationExecutionStatusPayloadSchema
|
|
1160
|
+
});
|
|
1161
|
+
const openMeldDaemonSyncRouteCatalogResponseSchema = openMeldDaemonControlPlaneResponseBaseSchema.extend({
|
|
1162
|
+
code: literal("service.sync_route_catalog"),
|
|
1163
|
+
payload: openMeldDaemonSyncRouteCatalogPayloadSchema
|
|
1164
|
+
});
|
|
1165
|
+
const openMeldDaemonRequestAgentActivitySyncResponseSchema = openMeldDaemonControlPlaneResponseBaseSchema.extend({
|
|
1166
|
+
code: literal("service.agent_activity_sync_requested"),
|
|
1167
|
+
payload: openMeldDaemonRequestAgentActivitySyncPayloadSchema
|
|
1168
|
+
});
|
|
1169
|
+
const openMeldDaemonSetLocalAgentEnabledResponseSchema = openMeldDaemonControlPlaneResponseBaseSchema.extend({
|
|
1170
|
+
code: literal("service.set_local_agent_enabled"),
|
|
1171
|
+
payload: openMeldDaemonSetLocalAgentEnabledPayloadSchema
|
|
1172
|
+
});
|
|
1173
|
+
const openMeldDaemonSetProfileWorkspaceResponseSchema = openMeldDaemonControlPlaneResponseBaseSchema.extend({
|
|
1174
|
+
code: literal("service.set_profile_workspace"),
|
|
1175
|
+
payload: openMeldDaemonSetProfileWorkspacePayloadSchema
|
|
1176
|
+
});
|
|
1177
|
+
const openMeldDaemonShutdownResponseSchema = openMeldDaemonControlPlaneResponseBaseSchema.extend({
|
|
1178
|
+
code: literal("service.shutdown"),
|
|
1179
|
+
payload: openMeldDaemonShutdownPayloadSchema
|
|
1180
|
+
});
|
|
1181
|
+
const openMeldDaemonServiceUpdateReadinessResponseSchema = openMeldDaemonControlPlaneResponseBaseSchema.extend({
|
|
1182
|
+
code: literal("service.update_readiness"),
|
|
1183
|
+
payload: openMeldDaemonServiceUpdateReadinessPayloadSchema
|
|
1184
|
+
});
|
|
1185
|
+
const openMeldDaemonControlPlaneErrorResponseSchema = openMeldDaemonControlPlaneResponseBaseSchema.extend({
|
|
1186
|
+
code: literal("service.error"),
|
|
1187
|
+
payload: openMeldDaemonControlPlaneErrorPayloadSchema
|
|
1188
|
+
});
|
|
1189
|
+
const openMeldDaemonControlPlaneResponseSchema = discriminatedUnion("code", [
|
|
1190
|
+
openMeldDaemonControlPlaneResponseBaseSchema.extend({
|
|
1191
|
+
code: literal("service.account_control_capabilities"),
|
|
1192
|
+
payload: strictObject({ supported: boolean() })
|
|
1193
|
+
}),
|
|
1194
|
+
openMeldDaemonStatusResponseSchema,
|
|
1195
|
+
openMeldDaemonHealthResponseSchema,
|
|
1196
|
+
openMeldDaemonHistoryResponseSchema,
|
|
1197
|
+
openMeldDaemonInterruptResponseSchema,
|
|
1198
|
+
openMeldDaemonCancelResponseSchema,
|
|
1199
|
+
openMeldDaemonConversationExecutionStatusResponseSchema,
|
|
1200
|
+
openMeldDaemonSyncRouteCatalogResponseSchema,
|
|
1201
|
+
openMeldDaemonRequestAgentActivitySyncResponseSchema,
|
|
1202
|
+
openMeldDaemonSetLocalAgentEnabledResponseSchema,
|
|
1203
|
+
openMeldDaemonSetProfileWorkspaceResponseSchema,
|
|
1204
|
+
openMeldDaemonServiceUpdateReadinessResponseSchema,
|
|
1205
|
+
openMeldDaemonShutdownResponseSchema,
|
|
1206
|
+
openMeldDaemonControlPlaneErrorResponseSchema
|
|
1207
|
+
]);
|
|
1208
|
+
//#endregion
|
|
1209
|
+
export { literal as $, localComponentsStatusSchema as A, openMeldToolsUpdateRequestResultSchema as B, formatLocalSetupActionDescription as C, uuidProfileIdSchema as Ct, localComponentUpdatePolicySchema as D, trimmedStringFromUnknown as Dt, localCliComponentUpdateProjectionSchema as E, optionalBooleanQuerySchema as Et, openMeldToolsMaintenanceMutationResultSchema as F, boolean as G, NEVER as H, openMeldToolsMaintenanceProjectionSchema as I, email as J, coerce as K, openMeldToolsUpdateAttemptSchema as L, openMeldToolsControlCapabilitySchema as M, openMeldToolsControlRequestSchema as N, localComponentUpdateProjectionSchema as O, openMeldToolsControlResultSchema as P, lazySchema as Q, openMeldToolsUpdateOperationPhaseSchema as R, formatLocalComponentsSummaryLabel as S, profileWorkspaceModeSchema as St, installedLocalComponentsSnapshotSchema as T, nonEmptyTrimmedStringFromUnknown as Tt, ZodIssueCode as U, openMeldToolsUpdateRequestSourceSchema as V, array as W, int as X, enumFactory as Y, iso as Z, providerDispatchRuntimeContextSchema as _, profileHandleSchema as _t, openMeldDaemonControlPlaneResponseSchema as a, record as at, dispatchExecutionSchema as b, profileSchema as bt, openMeldDaemonManageLocalAgentInstallationPayloadSchema as c, tuple as ct, openMeldDaemonSetLocalAgentEnabledRequestPayloadSchema as d, unknown as dt, neverFactory as et, openMeldDaemonSetProfileWorkspacePayloadSchema as f, url as ft, skippedDaemonProfileSchema as g, openMeldRuntimeProfileIdSchema as gt, openMeldDaemonSyncRouteCatalogRequestPayloadSchema as h, normalizeOptionalWorkingDirectory as ht, openMeldDaemonControlPlaneRequestSchema as i, preprocess as it, localServiceComponentUpdateProjectionSchema as j, localComponentUpdateStatusSchema as k, openMeldDaemonManageLocalAgentInstallationRequestPayloadSchema as l, undefinedFactory as lt, openMeldDaemonSyncRouteCatalogPayloadSchema as m, agentProfileIdSchema as mt, openMeldDaemonCancelPayloadSchema as n, number as nt, openMeldDaemonInterruptPayloadSchema as o, strictObject as ot, openMeldDaemonSetProfileWorkspaceRequestPayloadSchema as p, MAX_PROFILE_WORKING_DIRECTORY_LENGTH as pt, discriminatedUnion as q, openMeldDaemonCancelRequestPayloadSchema as r, object as rt, openMeldDaemonInterruptRequestPayloadSchema as s, string as st, localAgentInstallationOptionSchema as t, nullFactory as tt, openMeldDaemonSetLocalAgentEnabledPayloadSchema as u, union as ut, bootstrapTemplateFactsSchema as v, profileKindSchema as vt, formatLocalSetupActionLabel as w, finiteIntegerNumber as wt, formatLocalComponentsSummaryDescription as x, profileWorkingDirectorySchema as xt, conversationExecutionStateSchema as y, profileLabelSchema as yt, openMeldToolsUpdateOperationSchema as z };
|
|
1210
|
+
|
|
1211
|
+
//# sourceMappingURL=control-plane-D9jDcbMZ.js.map
|