@xemahq/agent-session-runtime 0.11.0 → 0.11.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/package.json +4 -5
- package/dist/lib/launch-identity/compiled-session-launch-plan-store.d.ts +0 -44
- package/dist/lib/launch-identity/compiled-session-launch-plan-store.d.ts.map +0 -1
- package/dist/lib/launch-identity/compiled-session-launch-plan-store.js +0 -116
- package/dist/lib/launch-identity/compiled-session-launch-plan-store.js.map +0 -1
- package/dist/lib/launch-identity/compiled-session-launch-plan.d.ts +0 -84
- package/dist/lib/launch-identity/compiled-session-launch-plan.d.ts.map +0 -1
- package/dist/lib/launch-identity/compiled-session-launch-plan.js +0 -382
- package/dist/lib/launch-identity/compiled-session-launch-plan.js.map +0 -1
- package/dist/lib/launch-identity/preparation-generation.d.ts +0 -26
- package/dist/lib/launch-identity/preparation-generation.d.ts.map +0 -1
- package/dist/lib/launch-identity/preparation-generation.js +0 -88
- package/dist/lib/launch-identity/preparation-generation.js.map +0 -1
- package/dist/lib/launch-identity/prepared-launch-variant.d.ts +0 -46
- package/dist/lib/launch-identity/prepared-launch-variant.d.ts.map +0 -1
- package/dist/lib/launch-identity/prepared-launch-variant.js +0 -118
- package/dist/lib/launch-identity/prepared-launch-variant.js.map +0 -1
- package/src/index.ts +0 -36
- package/src/lib/agent-resolution.ts +0 -557
- package/src/lib/agent-workspace-manifest.ts +0 -632
- package/src/lib/composer.ts +0 -1315
- package/src/lib/dispatch-contract.ts +0 -151
- package/src/lib/drift-detector.ts +0 -497
- package/src/lib/environment-resolver.ts +0 -480
- package/src/lib/errors.ts +0 -43
- package/src/lib/launch-identity/canonical-contract.ts +0 -352
- package/src/lib/launch-identity/index.ts +0 -4
- package/src/lib/launch-identity/runtime-template-key.ts +0 -143
- package/src/lib/launch-identity/session-binding.ts +0 -152
- package/src/lib/launch-identity/thread-reuse-key.ts +0 -93
- package/src/lib/lifecycle-state.ts +0 -30
- package/src/lib/skill-bundle-template-resolver.ts +0 -147
- package/src/lib/types.ts +0 -453
|
@@ -1,382 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LaunchPlanBindingSlotCardinality = exports.LaunchPlanBindingSlotKind = void 0;
|
|
4
|
-
exports.createCompiledSessionLaunchPlan = createCompiledSessionLaunchPlan;
|
|
5
|
-
exports.encodeCompiledSessionLaunchPlan = encodeCompiledSessionLaunchPlan;
|
|
6
|
-
exports.decodeCompiledSessionLaunchPlan = decodeCompiledSessionLaunchPlan;
|
|
7
|
-
exports.hashCompiledSessionLaunchPlan = hashCompiledSessionLaunchPlan;
|
|
8
|
-
exports.hashCompiledWorkspaceLaunchPlan = hashCompiledWorkspaceLaunchPlan;
|
|
9
|
-
const canonical_contract_1 = require("./canonical-contract");
|
|
10
|
-
const runtime_template_key_1 = require("./runtime-template-key");
|
|
11
|
-
var LaunchPlanBindingSlotKind;
|
|
12
|
-
(function (LaunchPlanBindingSlotKind) {
|
|
13
|
-
LaunchPlanBindingSlotKind["OrganizationId"] = "organization-id";
|
|
14
|
-
LaunchPlanBindingSlotKind["ProjectId"] = "project-id";
|
|
15
|
-
LaunchPlanBindingSlotKind["UserId"] = "user-id";
|
|
16
|
-
LaunchPlanBindingSlotKind["SessionId"] = "session-id";
|
|
17
|
-
LaunchPlanBindingSlotKind["ThreadId"] = "thread-id";
|
|
18
|
-
LaunchPlanBindingSlotKind["InvocationId"] = "invocation-id";
|
|
19
|
-
LaunchPlanBindingSlotKind["DomainRef"] = "domain-ref";
|
|
20
|
-
LaunchPlanBindingSlotKind["Input"] = "input";
|
|
21
|
-
LaunchPlanBindingSlotKind["DynamicContext"] = "dynamic-context";
|
|
22
|
-
LaunchPlanBindingSlotKind["StorageAllocationRef"] = "storage-allocation-ref";
|
|
23
|
-
LaunchPlanBindingSlotKind["WorkingFileSourceRef"] = "working-file-source-ref";
|
|
24
|
-
LaunchPlanBindingSlotKind["OutputRouteRef"] = "output-route-ref";
|
|
25
|
-
LaunchPlanBindingSlotKind["ActorTokenRef"] = "actor-token-ref";
|
|
26
|
-
LaunchPlanBindingSlotKind["ServiceTokenRef"] = "service-token-ref";
|
|
27
|
-
LaunchPlanBindingSlotKind["ProviderTokenRef"] = "provider-token-ref";
|
|
28
|
-
LaunchPlanBindingSlotKind["CredentialGrantRef"] = "credential-grant-ref";
|
|
29
|
-
LaunchPlanBindingSlotKind["DatabaseGrantRef"] = "database-grant-ref";
|
|
30
|
-
LaunchPlanBindingSlotKind["SecretRef"] = "secret-ref";
|
|
31
|
-
})(LaunchPlanBindingSlotKind || (exports.LaunchPlanBindingSlotKind = LaunchPlanBindingSlotKind = {}));
|
|
32
|
-
var LaunchPlanBindingSlotCardinality;
|
|
33
|
-
(function (LaunchPlanBindingSlotCardinality) {
|
|
34
|
-
LaunchPlanBindingSlotCardinality["One"] = "one";
|
|
35
|
-
LaunchPlanBindingSlotCardinality["Many"] = "many";
|
|
36
|
-
})(LaunchPlanBindingSlotCardinality || (exports.LaunchPlanBindingSlotCardinality = LaunchPlanBindingSlotCardinality = {}));
|
|
37
|
-
const PLAN_KEYS = [
|
|
38
|
-
'schemaVersion',
|
|
39
|
-
'runtimeTemplateKey',
|
|
40
|
-
'agent',
|
|
41
|
-
'subagents',
|
|
42
|
-
'skills',
|
|
43
|
-
'tools',
|
|
44
|
-
'mcpDescriptors',
|
|
45
|
-
'capabilityDescriptors',
|
|
46
|
-
'workspace',
|
|
47
|
-
'runtimeRequirements',
|
|
48
|
-
'policyCompatibility',
|
|
49
|
-
'outputSurface',
|
|
50
|
-
'bindingSlots',
|
|
51
|
-
];
|
|
52
|
-
const RESOURCE_KEYS = ['kind', 'ref', 'revisionRef', 'contentHash'];
|
|
53
|
-
const WORKSPACE_KEYS = [
|
|
54
|
-
'manifestRef',
|
|
55
|
-
'manifestHash',
|
|
56
|
-
'structure',
|
|
57
|
-
'layout',
|
|
58
|
-
];
|
|
59
|
-
const RUNTIME_REQUIREMENT_KEYS = [
|
|
60
|
-
'runtimeRef',
|
|
61
|
-
'runtimeRevision',
|
|
62
|
-
'imageDigest',
|
|
63
|
-
'requirementsHash',
|
|
64
|
-
'requirements',
|
|
65
|
-
];
|
|
66
|
-
const POLICY_KEYS = [
|
|
67
|
-
'tenantDependency',
|
|
68
|
-
'trustPolicy',
|
|
69
|
-
'compatibleSurfaces',
|
|
70
|
-
'policies',
|
|
71
|
-
];
|
|
72
|
-
const OUTPUT_SURFACE_KEYS = [
|
|
73
|
-
'kind',
|
|
74
|
-
'schemaRef',
|
|
75
|
-
'schemaHash',
|
|
76
|
-
'schema',
|
|
77
|
-
];
|
|
78
|
-
const BINDING_SLOT_KEYS = ['name', 'kind', 'cardinality', 'required'];
|
|
79
|
-
const BINDING_SLOT_KINDS = Object.values(LaunchPlanBindingSlotKind);
|
|
80
|
-
const BINDING_SLOT_CARDINALITIES = Object.values(LaunchPlanBindingSlotCardinality);
|
|
81
|
-
const TENANT_DEPENDENCIES = Object.values(runtime_template_key_1.RuntimeTemplateTenantDependency);
|
|
82
|
-
const TRUST_POLICIES = Object.values(runtime_template_key_1.RuntimeTemplateTrustPolicy);
|
|
83
|
-
const BINDING_SLOT_NAME_PATTERN = /^[a-z][a-z0-9]*(?:[.-][a-z][a-z0-9]*)*$/u;
|
|
84
|
-
const DYNAMIC_LITERAL_PATTERN = /\$\{\s*(?:input|tenant|org|organization|project|user|session|thread|domain|token|secret|credential)(?:[.:[\]}]|$)/iu;
|
|
85
|
-
const SECRET_REFERENCE_PATTERN = /^(?:secret|vault|credential|token)(?:-ref)?:\/\//iu;
|
|
86
|
-
const DYNAMIC_FIELD_NAMES = new Set([
|
|
87
|
-
'apikey',
|
|
88
|
-
'authorization',
|
|
89
|
-
'cookie',
|
|
90
|
-
'credential',
|
|
91
|
-
'credentialgrantref',
|
|
92
|
-
'credentialref',
|
|
93
|
-
'databasegrantref',
|
|
94
|
-
'domain',
|
|
95
|
-
'domainid',
|
|
96
|
-
'domainref',
|
|
97
|
-
'input',
|
|
98
|
-
'invocationid',
|
|
99
|
-
'organization',
|
|
100
|
-
'organizationid',
|
|
101
|
-
'org',
|
|
102
|
-
'orgid',
|
|
103
|
-
'password',
|
|
104
|
-
'privatekey',
|
|
105
|
-
'project',
|
|
106
|
-
'projectid',
|
|
107
|
-
'secret',
|
|
108
|
-
'secretref',
|
|
109
|
-
'session',
|
|
110
|
-
'sessionid',
|
|
111
|
-
'storageref',
|
|
112
|
-
'tenant',
|
|
113
|
-
'tenantid',
|
|
114
|
-
'thread',
|
|
115
|
-
'threadid',
|
|
116
|
-
'token',
|
|
117
|
-
'tokenref',
|
|
118
|
-
'user',
|
|
119
|
-
'userid',
|
|
120
|
-
'value',
|
|
121
|
-
]);
|
|
122
|
-
const SECRET_OR_CREDENTIAL_FIELD_PATTERN = /(?:apikey|authorization|cookie|credential|password|privatekey|secret|token)(?:ref)?$/u;
|
|
123
|
-
function createCompiledSessionLaunchPlan(input) {
|
|
124
|
-
const object = (0, canonical_contract_1.requireExactObject)(input, 'CompiledSessionLaunchPlan', PLAN_KEYS);
|
|
125
|
-
if (object.schemaVersion !== 1) {
|
|
126
|
-
throw new TypeError('CompiledSessionLaunchPlan.schemaVersion must be 1.');
|
|
127
|
-
}
|
|
128
|
-
const runtimeTemplateKey = (0, runtime_template_key_1.createRuntimeTemplateKey)(object.runtimeTemplateKey);
|
|
129
|
-
const agent = requirePinnedResource(object.agent, 'CompiledSessionLaunchPlan.agent');
|
|
130
|
-
const subagents = requirePinnedResources(object.subagents, 'CompiledSessionLaunchPlan.subagents');
|
|
131
|
-
const skills = requirePinnedResources(object.skills, 'CompiledSessionLaunchPlan.skills');
|
|
132
|
-
const tools = requirePinnedResources(object.tools, 'CompiledSessionLaunchPlan.tools');
|
|
133
|
-
const mcpDescriptors = requirePinnedResources(object.mcpDescriptors, 'CompiledSessionLaunchPlan.mcpDescriptors');
|
|
134
|
-
const capabilityDescriptors = requirePinnedResources(object.capabilityDescriptors, 'CompiledSessionLaunchPlan.capabilityDescriptors');
|
|
135
|
-
const workspace = requireWorkspace(object.workspace);
|
|
136
|
-
const runtimeRequirements = requireRuntimeRequirements(object.runtimeRequirements);
|
|
137
|
-
const policyCompatibility = requirePolicyCompatibility(object.policyCompatibility);
|
|
138
|
-
const outputSurface = requireOutputSurface(object.outputSurface);
|
|
139
|
-
const bindingSlots = requireBindingSlots(object.bindingSlots);
|
|
140
|
-
assertTemplateConsistency({
|
|
141
|
-
runtimeTemplateKey,
|
|
142
|
-
agent,
|
|
143
|
-
subagents,
|
|
144
|
-
skills,
|
|
145
|
-
tools,
|
|
146
|
-
mcpDescriptors,
|
|
147
|
-
capabilityDescriptors,
|
|
148
|
-
workspace,
|
|
149
|
-
runtimeRequirements,
|
|
150
|
-
policyCompatibility,
|
|
151
|
-
});
|
|
152
|
-
assertDeclaredBindingSlotReferences([workspace.structure, workspace.layout, runtimeRequirements.requirements], bindingSlots);
|
|
153
|
-
return Object.freeze({
|
|
154
|
-
schemaVersion: 1,
|
|
155
|
-
runtimeTemplateKey,
|
|
156
|
-
agent,
|
|
157
|
-
subagents,
|
|
158
|
-
skills,
|
|
159
|
-
tools,
|
|
160
|
-
mcpDescriptors,
|
|
161
|
-
capabilityDescriptors,
|
|
162
|
-
workspace,
|
|
163
|
-
runtimeRequirements,
|
|
164
|
-
policyCompatibility,
|
|
165
|
-
outputSurface,
|
|
166
|
-
bindingSlots,
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
function encodeCompiledSessionLaunchPlan(input) {
|
|
170
|
-
return (0, canonical_contract_1.canonicalContractJson)(createCompiledSessionLaunchPlan(input));
|
|
171
|
-
}
|
|
172
|
-
function decodeCompiledSessionLaunchPlan(encoded) {
|
|
173
|
-
let parsed;
|
|
174
|
-
try {
|
|
175
|
-
parsed = JSON.parse(encoded);
|
|
176
|
-
}
|
|
177
|
-
catch (error) {
|
|
178
|
-
throw new TypeError(`CompiledSessionLaunchPlan is not valid JSON: ${error instanceof Error ? error.message : String(error)}`);
|
|
179
|
-
}
|
|
180
|
-
return createCompiledSessionLaunchPlan(parsed);
|
|
181
|
-
}
|
|
182
|
-
function hashCompiledSessionLaunchPlan(input) {
|
|
183
|
-
return (0, canonical_contract_1.hashCanonicalContract)(createCompiledSessionLaunchPlan(input));
|
|
184
|
-
}
|
|
185
|
-
function hashCompiledWorkspaceLaunchPlan(input) {
|
|
186
|
-
return (0, canonical_contract_1.hashCanonicalContract)(input);
|
|
187
|
-
}
|
|
188
|
-
function requirePinnedResource(value, path) {
|
|
189
|
-
const object = (0, canonical_contract_1.requireExactObject)(value, path, RESOURCE_KEYS);
|
|
190
|
-
return Object.freeze({
|
|
191
|
-
kind: (0, canonical_contract_1.requireNonEmptyString)(object.kind, `${path}.kind`),
|
|
192
|
-
ref: (0, canonical_contract_1.requireNonEmptyString)(object.ref, `${path}.ref`),
|
|
193
|
-
revisionRef: (0, canonical_contract_1.requireNonEmptyString)(object.revisionRef, `${path}.revisionRef`),
|
|
194
|
-
contentHash: (0, canonical_contract_1.requireSha256)(object.contentHash, `${path}.contentHash`),
|
|
195
|
-
});
|
|
196
|
-
}
|
|
197
|
-
function requirePinnedResources(value, path) {
|
|
198
|
-
if (!Array.isArray(value)) {
|
|
199
|
-
throw new TypeError(`${path} must be an array.`);
|
|
200
|
-
}
|
|
201
|
-
const resources = value.map((entry, index) => requirePinnedResource(entry, `${path}[${index}]`));
|
|
202
|
-
const identities = new Set();
|
|
203
|
-
for (const resource of resources) {
|
|
204
|
-
const identity = `${resource.kind}\u0000${resource.ref}`;
|
|
205
|
-
if (identities.has(identity)) {
|
|
206
|
-
throw new TypeError(`${path} contains duplicate resource '${resource.kind}:${resource.ref}'.`);
|
|
207
|
-
}
|
|
208
|
-
identities.add(identity);
|
|
209
|
-
}
|
|
210
|
-
return Object.freeze(resources.toSorted((left, right) => (0, canonical_contract_1.canonicalContractJson)(left).localeCompare((0, canonical_contract_1.canonicalContractJson)(right))));
|
|
211
|
-
}
|
|
212
|
-
function requireWorkspace(value) {
|
|
213
|
-
const path = 'CompiledSessionLaunchPlan.workspace';
|
|
214
|
-
const object = (0, canonical_contract_1.requireExactObject)(value, path, WORKSPACE_KEYS);
|
|
215
|
-
return Object.freeze({
|
|
216
|
-
manifestRef: (0, canonical_contract_1.requireNonEmptyString)(object.manifestRef, `${path}.manifestRef`),
|
|
217
|
-
manifestHash: (0, canonical_contract_1.requireSha256)(object.manifestHash, `${path}.manifestHash`),
|
|
218
|
-
structure: requireStaticPayload(object.structure, `${path}.structure`),
|
|
219
|
-
layout: requireStaticPayload(object.layout, `${path}.layout`),
|
|
220
|
-
});
|
|
221
|
-
}
|
|
222
|
-
function requireRuntimeRequirements(value) {
|
|
223
|
-
const path = 'CompiledSessionLaunchPlan.runtimeRequirements';
|
|
224
|
-
const object = (0, canonical_contract_1.requireExactObject)(value, path, RUNTIME_REQUIREMENT_KEYS);
|
|
225
|
-
const imageDigest = (0, canonical_contract_1.requireImageDigest)(object.imageDigest, `${path}.imageDigest`);
|
|
226
|
-
const requirements = requireStaticPayload(object.requirements, `${path}.requirements`);
|
|
227
|
-
const requirementsHash = (0, canonical_contract_1.requireSha256)(object.requirementsHash, `${path}.requirementsHash`);
|
|
228
|
-
assertContentHash(requirementsHash, requirements, `${path}.requirementsHash`);
|
|
229
|
-
return Object.freeze({
|
|
230
|
-
runtimeRef: (0, canonical_contract_1.requireNonEmptyString)(object.runtimeRef, `${path}.runtimeRef`),
|
|
231
|
-
runtimeRevision: (0, canonical_contract_1.requireNonEmptyString)(object.runtimeRevision, `${path}.runtimeRevision`),
|
|
232
|
-
imageDigest,
|
|
233
|
-
requirementsHash,
|
|
234
|
-
requirements,
|
|
235
|
-
});
|
|
236
|
-
}
|
|
237
|
-
function requirePolicyCompatibility(value) {
|
|
238
|
-
const path = 'CompiledSessionLaunchPlan.policyCompatibility';
|
|
239
|
-
const object = (0, canonical_contract_1.requireExactObject)(value, path, POLICY_KEYS);
|
|
240
|
-
return Object.freeze({
|
|
241
|
-
tenantDependency: (0, canonical_contract_1.requireEnumValue)(object.tenantDependency, `${path}.tenantDependency`, TENANT_DEPENDENCIES),
|
|
242
|
-
trustPolicy: (0, canonical_contract_1.requireEnumValue)(object.trustPolicy, `${path}.trustPolicy`, TRUST_POLICIES),
|
|
243
|
-
compatibleSurfaces: (0, canonical_contract_1.requireStringRefs)(object.compatibleSurfaces, `${path}.compatibleSurfaces`),
|
|
244
|
-
policies: requirePinnedResources(object.policies, `${path}.policies`),
|
|
245
|
-
});
|
|
246
|
-
}
|
|
247
|
-
function requireOutputSurface(value) {
|
|
248
|
-
const path = 'CompiledSessionLaunchPlan.outputSurface';
|
|
249
|
-
const object = (0, canonical_contract_1.requireExactObject)(value, path, OUTPUT_SURFACE_KEYS);
|
|
250
|
-
const schema = (0, canonical_contract_1.requireCanonicalJsonObject)(object.schema, `${path}.schema`);
|
|
251
|
-
const schemaHash = (0, canonical_contract_1.requireSha256)(object.schemaHash, `${path}.schemaHash`);
|
|
252
|
-
assertContentHash(schemaHash, schema, `${path}.schemaHash`);
|
|
253
|
-
return Object.freeze({
|
|
254
|
-
kind: (0, canonical_contract_1.requireNonEmptyString)(object.kind, `${path}.kind`),
|
|
255
|
-
schemaRef: (0, canonical_contract_1.requireNonEmptyString)(object.schemaRef, `${path}.schemaRef`),
|
|
256
|
-
schemaHash,
|
|
257
|
-
schema,
|
|
258
|
-
});
|
|
259
|
-
}
|
|
260
|
-
function requireBindingSlots(value) {
|
|
261
|
-
const path = 'CompiledSessionLaunchPlan.bindingSlots';
|
|
262
|
-
if (!Array.isArray(value)) {
|
|
263
|
-
throw new TypeError(`${path} must be an array.`);
|
|
264
|
-
}
|
|
265
|
-
const slots = value.map((entry, index) => {
|
|
266
|
-
const slotPath = `${path}[${index}]`;
|
|
267
|
-
const object = (0, canonical_contract_1.requireExactObject)(entry, slotPath, BINDING_SLOT_KEYS);
|
|
268
|
-
const name = (0, canonical_contract_1.requireNonEmptyString)(object.name, `${slotPath}.name`);
|
|
269
|
-
if (!BINDING_SLOT_NAME_PATTERN.test(name)) {
|
|
270
|
-
throw new TypeError(`${slotPath}.name must be a lowercase dotted or hyphenated identifier.`);
|
|
271
|
-
}
|
|
272
|
-
return Object.freeze({
|
|
273
|
-
name,
|
|
274
|
-
kind: (0, canonical_contract_1.requireEnumValue)(object.kind, `${slotPath}.kind`, BINDING_SLOT_KINDS),
|
|
275
|
-
cardinality: (0, canonical_contract_1.requireEnumValue)(object.cardinality, `${slotPath}.cardinality`, BINDING_SLOT_CARDINALITIES),
|
|
276
|
-
required: (0, canonical_contract_1.requireBoolean)(object.required, `${slotPath}.required`),
|
|
277
|
-
});
|
|
278
|
-
});
|
|
279
|
-
const names = new Set();
|
|
280
|
-
for (const slot of slots) {
|
|
281
|
-
if (names.has(slot.name)) {
|
|
282
|
-
throw new TypeError(`${path} contains duplicate slot '${slot.name}'.`);
|
|
283
|
-
}
|
|
284
|
-
names.add(slot.name);
|
|
285
|
-
}
|
|
286
|
-
return Object.freeze(slots.toSorted((left, right) => left.name.localeCompare(right.name)));
|
|
287
|
-
}
|
|
288
|
-
function requireStaticPayload(value, path) {
|
|
289
|
-
const normalized = (0, canonical_contract_1.requireCanonicalJsonObject)(value, path);
|
|
290
|
-
assertStaticPayloadNode(normalized, path);
|
|
291
|
-
return normalized;
|
|
292
|
-
}
|
|
293
|
-
function assertStaticPayloadNode(value, path) {
|
|
294
|
-
if (typeof value === 'string') {
|
|
295
|
-
if (DYNAMIC_LITERAL_PATTERN.test(value) ||
|
|
296
|
-
SECRET_REFERENCE_PATTERN.test(value)) {
|
|
297
|
-
throw new TypeError(`${path} embeds dynamic or secret data; use a typed $bindingSlot reference.`);
|
|
298
|
-
}
|
|
299
|
-
return;
|
|
300
|
-
}
|
|
301
|
-
if (value === null || typeof value !== 'object') {
|
|
302
|
-
return;
|
|
303
|
-
}
|
|
304
|
-
if (Array.isArray(value)) {
|
|
305
|
-
value.forEach((entry, index) => assertStaticPayloadNode(entry, `${path}[${index}]`));
|
|
306
|
-
return;
|
|
307
|
-
}
|
|
308
|
-
if (Object.hasOwn(value, '$bindingSlot')) {
|
|
309
|
-
const marker = (0, canonical_contract_1.requireExactObject)(value, path, ['$bindingSlot']);
|
|
310
|
-
(0, canonical_contract_1.requireNonEmptyString)(marker.$bindingSlot, `${path}.$bindingSlot`);
|
|
311
|
-
return;
|
|
312
|
-
}
|
|
313
|
-
for (const [key, entry] of Object.entries(value)) {
|
|
314
|
-
const normalizedKey = key.replaceAll(/[^a-z0-9]/giu, '').toLowerCase();
|
|
315
|
-
if (DYNAMIC_FIELD_NAMES.has(normalizedKey) ||
|
|
316
|
-
SECRET_OR_CREDENTIAL_FIELD_PATTERN.test(normalizedKey)) {
|
|
317
|
-
if (!isBindingSlotMarker(entry)) {
|
|
318
|
-
throw new TypeError(`${path}.${key} is dynamic data; its value must be a typed $bindingSlot reference.`);
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
assertStaticPayloadNode(entry, `${path}.${key}`);
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
function isBindingSlotMarker(value) {
|
|
325
|
-
return (value !== null &&
|
|
326
|
-
typeof value === 'object' &&
|
|
327
|
-
!Array.isArray(value) &&
|
|
328
|
-
Object.hasOwn(value, '$bindingSlot'));
|
|
329
|
-
}
|
|
330
|
-
function assertDeclaredBindingSlotReferences(values, slots) {
|
|
331
|
-
const declared = new Set(slots.map((slot) => slot.name));
|
|
332
|
-
for (const [index, value] of values.entries()) {
|
|
333
|
-
inspectBindingSlotReferences(value, `staticPayloads[${index}]`, declared);
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
function inspectBindingSlotReferences(value, path, declared) {
|
|
337
|
-
if (value === null || typeof value !== 'object') {
|
|
338
|
-
return;
|
|
339
|
-
}
|
|
340
|
-
if (Array.isArray(value)) {
|
|
341
|
-
value.forEach((entry, index) => inspectBindingSlotReferences(entry, `${path}[${index}]`, declared));
|
|
342
|
-
return;
|
|
343
|
-
}
|
|
344
|
-
if (isBindingSlotMarker(value)) {
|
|
345
|
-
const name = value.$bindingSlot;
|
|
346
|
-
if (typeof name !== 'string' || !declared.has(name)) {
|
|
347
|
-
throw new TypeError(`${path} references undeclared binding slot '${String(name)}'.`);
|
|
348
|
-
}
|
|
349
|
-
return;
|
|
350
|
-
}
|
|
351
|
-
for (const [key, entry] of Object.entries(value)) {
|
|
352
|
-
inspectBindingSlotReferences(entry, `${path}.${key}`, declared);
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
function assertTemplateConsistency(input) {
|
|
356
|
-
const key = input.runtimeTemplateKey;
|
|
357
|
-
assertEqual(input.agent.revisionRef, key.agentRevision, 'agent.revisionRef', 'runtimeTemplateKey.agentRevision');
|
|
358
|
-
assertEqual(input.agent.contentHash, key.primaryAgentHash, 'agent.contentHash', 'runtimeTemplateKey.primaryAgentHash');
|
|
359
|
-
assertContentHash(key.subagentsHash, input.subagents, 'subagents');
|
|
360
|
-
assertContentHash(key.skillsHash, input.skills, 'skills');
|
|
361
|
-
assertContentHash(key.toolsHash, input.tools, 'tools');
|
|
362
|
-
assertContentHash(key.mcpDescriptorsHash, input.mcpDescriptors, 'mcpDescriptors');
|
|
363
|
-
assertContentHash(key.capabilityDescriptorsHash, input.capabilityDescriptors, 'capabilityDescriptors');
|
|
364
|
-
assertContentHash(key.workspacePlanHash, input.workspace, 'runtimeTemplateKey.workspacePlanHash');
|
|
365
|
-
assertEqual(input.runtimeRequirements.runtimeRef, key.runtimeRef, 'runtimeRequirements.runtimeRef', 'runtimeTemplateKey.runtimeRef');
|
|
366
|
-
assertEqual(input.runtimeRequirements.runtimeRevision, key.runtimeRevision, 'runtimeRequirements.runtimeRevision', 'runtimeTemplateKey.runtimeRevision');
|
|
367
|
-
assertEqual(input.runtimeRequirements.imageDigest, key.imageDigest, 'runtimeRequirements.imageDigest', 'runtimeTemplateKey.imageDigest');
|
|
368
|
-
assertEqual(input.policyCompatibility.tenantDependency, key.tenantDependency, 'policyCompatibility.tenantDependency', 'runtimeTemplateKey.tenantDependency');
|
|
369
|
-
assertEqual(input.policyCompatibility.trustPolicy, key.trustPolicy, 'policyCompatibility.trustPolicy', 'runtimeTemplateKey.trustPolicy');
|
|
370
|
-
}
|
|
371
|
-
function assertContentHash(expectedHash, content, path) {
|
|
372
|
-
const actualHash = (0, canonical_contract_1.hashCanonicalContract)(content);
|
|
373
|
-
if (actualHash !== expectedHash) {
|
|
374
|
-
throw new TypeError(`${path} content hash mismatch: expected '${expectedHash}', computed '${actualHash}'.`);
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
function assertEqual(actual, expected, actualPath, expectedPath) {
|
|
378
|
-
if (actual !== expected) {
|
|
379
|
-
throw new TypeError(`${actualPath} must equal ${expectedPath}; received '${actual}' and '${expected}'.`);
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
//# sourceMappingURL=compiled-session-launch-plan.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compiled-session-launch-plan.js","sourceRoot":"","sources":["../../../src/lib/launch-identity/compiled-session-launch-plan.ts"],"names":[],"mappings":";;;AA0MA,0EAiFC;AAED,0EAIC;AAED,0EAYC;AAED,sEAIC;AAED,0EAIC;AA3TD,6DAY8B;AAC9B,iEAKgC;AAEhC,IAAY,yBAmBX;AAnBD,WAAY,yBAAyB;IACnC,+DAAkC,CAAA;IAClC,qDAAwB,CAAA;IACxB,+CAAkB,CAAA;IAClB,qDAAwB,CAAA;IACxB,mDAAsB,CAAA;IACtB,2DAA8B,CAAA;IAC9B,qDAAwB,CAAA;IACxB,4CAAe,CAAA;IACf,+DAAkC,CAAA;IAClC,4EAA+C,CAAA;IAC/C,6EAAgD,CAAA;IAChD,gEAAmC,CAAA;IACnC,8DAAiC,CAAA;IACjC,kEAAqC,CAAA;IACrC,oEAAuC,CAAA;IACvC,wEAA2C,CAAA;IAC3C,oEAAuC,CAAA;IACvC,qDAAwB,CAAA;AAC1B,CAAC,EAnBW,yBAAyB,yCAAzB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AChC,MAAM,IAAI,SAAS,CACjB,GAAG,IAAI,qCAAqC,YAAY,gBAAgB,UAAU,IAAI,CACvF,CAAC;IACJ,CAAC;AACH,CAAC;AAED,SAAS,WAAW,CAClB,MAAc,EACd,QAAgB,EAChB,UAAkB,EAClB,YAAoB;IAEpB,IAAI,MAAM,KAAK,QAAQ,EAAE,CAAC;QACxB,MAAM,IAAI,SAAS,CACjB,GAAG,UAAU,eAAe,YAAY,eAAe,MAAM,UAAU,QAAQ,IAAI,CACpF,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export declare enum PreparationGenerationStatus {
|
|
2
|
-
Validating = "validating",
|
|
3
|
-
Materializing = "materializing",
|
|
4
|
-
Ready = "ready",
|
|
5
|
-
Failed = "failed",
|
|
6
|
-
Superseded = "superseded"
|
|
7
|
-
}
|
|
8
|
-
export interface PreparationFailure {
|
|
9
|
-
readonly code: string;
|
|
10
|
-
readonly message: string;
|
|
11
|
-
}
|
|
12
|
-
export interface PreparationGeneration {
|
|
13
|
-
readonly id: string;
|
|
14
|
-
readonly agentRevisionId: string;
|
|
15
|
-
readonly sourceGenerationHash: string;
|
|
16
|
-
readonly requiredVariantKeyHashes: readonly string[];
|
|
17
|
-
readonly status: PreparationGenerationStatus;
|
|
18
|
-
readonly failure?: PreparationFailure;
|
|
19
|
-
readonly rowVersion: number;
|
|
20
|
-
}
|
|
21
|
-
export declare function createPreparationFailure(input: unknown): PreparationFailure;
|
|
22
|
-
export declare function createPreparationGeneration(input: unknown): PreparationGeneration;
|
|
23
|
-
export declare function serializePreparationGeneration(input: PreparationGeneration): string;
|
|
24
|
-
export declare function hashPreparationGeneration(input: PreparationGeneration): string;
|
|
25
|
-
export declare function requirePreparationFailureForStatus(value: unknown, hasFailure: boolean, failed: boolean, path: string): PreparationFailure | undefined;
|
|
26
|
-
//# sourceMappingURL=preparation-generation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"preparation-generation.d.ts","sourceRoot":"","sources":["../../../src/lib/launch-identity/preparation-generation.ts"],"names":[],"mappings":"AAUA,oBAAY,2BAA2B;IACrC,UAAU,eAAe;IACzB,aAAa,kBAAkB;IAC/B,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,UAAU,eAAe;CAC1B;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;IACtC,QAAQ,CAAC,wBAAwB,EAAE,SAAS,MAAM,EAAE,CAAC;IACrD,QAAQ,CAAC,MAAM,EAAE,2BAA2B,CAAC;IAC7C,QAAQ,CAAC,OAAO,CAAC,EAAE,kBAAkB,CAAC;IACtC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAcD,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,kBAAkB,CAS3E;AAED,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,OAAO,GACb,qBAAqB,CAwCvB;AAED,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,qBAAqB,GAC3B,MAAM,CAER;AAED,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,qBAAqB,GAC3B,MAAM,CAER;AAED,wBAAgB,kCAAkC,CAChD,KAAK,EAAE,OAAO,EACd,UAAU,EAAE,OAAO,EACnB,MAAM,EAAE,OAAO,EACf,IAAI,EAAE,MAAM,GACX,kBAAkB,GAAG,SAAS,CAahC"}
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PreparationGenerationStatus = void 0;
|
|
4
|
-
exports.createPreparationFailure = createPreparationFailure;
|
|
5
|
-
exports.createPreparationGeneration = createPreparationGeneration;
|
|
6
|
-
exports.serializePreparationGeneration = serializePreparationGeneration;
|
|
7
|
-
exports.hashPreparationGeneration = hashPreparationGeneration;
|
|
8
|
-
exports.requirePreparationFailureForStatus = requirePreparationFailureForStatus;
|
|
9
|
-
const canonical_contract_1 = require("./canonical-contract");
|
|
10
|
-
var PreparationGenerationStatus;
|
|
11
|
-
(function (PreparationGenerationStatus) {
|
|
12
|
-
PreparationGenerationStatus["Validating"] = "validating";
|
|
13
|
-
PreparationGenerationStatus["Materializing"] = "materializing";
|
|
14
|
-
PreparationGenerationStatus["Ready"] = "ready";
|
|
15
|
-
PreparationGenerationStatus["Failed"] = "failed";
|
|
16
|
-
PreparationGenerationStatus["Superseded"] = "superseded";
|
|
17
|
-
})(PreparationGenerationStatus || (exports.PreparationGenerationStatus = PreparationGenerationStatus = {}));
|
|
18
|
-
const GENERATION_KEYS = [
|
|
19
|
-
'id',
|
|
20
|
-
'agentRevisionId',
|
|
21
|
-
'sourceGenerationHash',
|
|
22
|
-
'requiredVariantKeyHashes',
|
|
23
|
-
'status',
|
|
24
|
-
'rowVersion',
|
|
25
|
-
];
|
|
26
|
-
const GENERATION_OPTIONAL_KEYS = ['failure'];
|
|
27
|
-
const FAILURE_KEYS = ['code', 'message'];
|
|
28
|
-
const GENERATION_STATUSES = Object.values(PreparationGenerationStatus);
|
|
29
|
-
function createPreparationFailure(input) {
|
|
30
|
-
const object = (0, canonical_contract_1.requireExactObject)(input, 'PreparationFailure', FAILURE_KEYS);
|
|
31
|
-
return Object.freeze({
|
|
32
|
-
code: (0, canonical_contract_1.requireNonEmptyString)(object.code, 'PreparationFailure.code'),
|
|
33
|
-
message: (0, canonical_contract_1.requireNonEmptyString)(object.message, 'PreparationFailure.message'),
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
function createPreparationGeneration(input) {
|
|
37
|
-
const object = (0, canonical_contract_1.requireExactObject)(input, 'PreparationGeneration', GENERATION_KEYS, GENERATION_OPTIONAL_KEYS);
|
|
38
|
-
const status = (0, canonical_contract_1.requireEnumValue)(object.status, 'PreparationGeneration.status', GENERATION_STATUSES);
|
|
39
|
-
const failure = requireFailureForStatus(object.failure, Object.hasOwn(object, 'failure'), status, 'PreparationGeneration');
|
|
40
|
-
return Object.freeze({
|
|
41
|
-
id: (0, canonical_contract_1.requireNonEmptyString)(object.id, 'PreparationGeneration.id'),
|
|
42
|
-
agentRevisionId: (0, canonical_contract_1.requireNonEmptyString)(object.agentRevisionId, 'PreparationGeneration.agentRevisionId'),
|
|
43
|
-
sourceGenerationHash: (0, canonical_contract_1.requireSha256)(object.sourceGenerationHash, 'PreparationGeneration.sourceGenerationHash'),
|
|
44
|
-
requiredVariantKeyHashes: requireSortedUniqueHashes(object.requiredVariantKeyHashes, 'PreparationGeneration.requiredVariantKeyHashes'),
|
|
45
|
-
status,
|
|
46
|
-
...(failure === undefined ? {} : { failure }),
|
|
47
|
-
rowVersion: (0, canonical_contract_1.requireNonNegativeSafeInteger)(object.rowVersion, 'PreparationGeneration.rowVersion'),
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
function serializePreparationGeneration(input) {
|
|
51
|
-
return (0, canonical_contract_1.canonicalContractJson)(createPreparationGeneration(input));
|
|
52
|
-
}
|
|
53
|
-
function hashPreparationGeneration(input) {
|
|
54
|
-
return (0, canonical_contract_1.hashCanonicalContract)(createPreparationGeneration(input));
|
|
55
|
-
}
|
|
56
|
-
function requirePreparationFailureForStatus(value, hasFailure, failed, path) {
|
|
57
|
-
if (failed) {
|
|
58
|
-
if (!hasFailure) {
|
|
59
|
-
throw new TypeError(`${path}.failure is required when status is failed.`);
|
|
60
|
-
}
|
|
61
|
-
return createPreparationFailure(value);
|
|
62
|
-
}
|
|
63
|
-
if (hasFailure) {
|
|
64
|
-
throw new TypeError(`${path}.failure is only supported when status is failed.`);
|
|
65
|
-
}
|
|
66
|
-
return undefined;
|
|
67
|
-
}
|
|
68
|
-
function requireFailureForStatus(value, hasFailure, status, path) {
|
|
69
|
-
return requirePreparationFailureForStatus(value, hasFailure, status === PreparationGenerationStatus.Failed, path);
|
|
70
|
-
}
|
|
71
|
-
function requireSortedUniqueHashes(value, path) {
|
|
72
|
-
if (!Array.isArray(value)) {
|
|
73
|
-
throw new TypeError(`${path} must be an array.`);
|
|
74
|
-
}
|
|
75
|
-
const hashes = value.map((entry, index) => (0, canonical_contract_1.requireSha256)(entry, `${path}[${index}]`));
|
|
76
|
-
for (let index = 1; index < hashes.length; index += 1) {
|
|
77
|
-
const previous = hashes[index - 1];
|
|
78
|
-
const current = hashes[index];
|
|
79
|
-
if (previous === undefined || current === undefined) {
|
|
80
|
-
throw new TypeError(`${path} contains an invalid sparse entry.`);
|
|
81
|
-
}
|
|
82
|
-
if (previous >= current) {
|
|
83
|
-
throw new TypeError(`${path} must contain unique hashes in ascending lexical order.`);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
return Object.freeze(hashes);
|
|
87
|
-
}
|
|
88
|
-
//# sourceMappingURL=preparation-generation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"preparation-generation.js","sourceRoot":"","sources":["../../../src/lib/launch-identity/preparation-generation.ts"],"names":[],"mappings":";;;AA6CA,4DASC;AAED,kEA0CC;AAED,wEAIC;AAED,8DAIC;AAED,gFAkBC;AAlID,6DAQ8B;AAE9B,IAAY,2BAMX;AAND,WAAY,2BAA2B;IACrC,wDAAyB,CAAA;IACzB,8DAA+B,CAAA;IAC/B,8CAAe,CAAA;IACf,gDAAiB,CAAA;IACjB,wDAAyB,CAAA;AAC3B,CAAC,EANW,2BAA2B,2CAA3B,2BAA2B,QAMtC;AAiBD,MAAM,eAAe,GAAG;IACtB,IAAI;IACJ,iBAAiB;IACjB,sBAAsB;IACtB,0BAA0B;IAC1B,QAAQ;IACR,YAAY;CACJ,CAAC;AACX,MAAM,wBAAwB,GAAG,CAAC,S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,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CACxC,IAAA,kCAAa,EAAC,KAAK,EAAE,GAAG,IAAI,IAAI,KAAK,GAAG,CAAC,CAC1C,CAAC;IACF,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QACtD,MAAM,QAAQ,GAAG,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;QACnC,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;QAC9B,IAAI,QAAQ,KAAK,SAAS,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;YACpD,MAAM,IAAI,SAAS,CAAC,GAAG,IAAI,oCAAoC,CAAC,CAAC;QACnE,CAAC;QACD,IAAI,QAAQ,IAAI,OAAO,EAAE,CAAC;YACxB,MAAM,IAAI,SAAS,CACjB,GAAG,IAAI,yDAAyD,CACjE,CAAC;QACJ,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAC/B,CAAC"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { WorkerRuntimeKind } from '@xemahq/kernel-contracts/worker-runtime';
|
|
2
|
-
import { type PreparationFailure } from './preparation-generation';
|
|
3
|
-
import { RuntimeTemplateTenantDependency, RuntimeTemplateTrustPolicy } from './runtime-template-key';
|
|
4
|
-
export declare enum PreparedLaunchVariantStatus {
|
|
5
|
-
Materializing = "materializing",
|
|
6
|
-
Ready = "ready",
|
|
7
|
-
Failed = "failed",
|
|
8
|
-
Retired = "retired"
|
|
9
|
-
}
|
|
10
|
-
export type PreparedLaunchTenantDependency = {
|
|
11
|
-
readonly kind: RuntimeTemplateTenantDependency.OrganizationNeutral;
|
|
12
|
-
} | {
|
|
13
|
-
readonly kind: RuntimeTemplateTenantDependency.OrganizationBound;
|
|
14
|
-
readonly organizationScopeHash: string;
|
|
15
|
-
};
|
|
16
|
-
export interface PreparedLaunchVariantKey {
|
|
17
|
-
readonly schemaVersion: 1;
|
|
18
|
-
readonly runtimeKind: WorkerRuntimeKind;
|
|
19
|
-
readonly runtimeRevision: string;
|
|
20
|
-
readonly imageDigest: `sha256:${string}`;
|
|
21
|
-
readonly layoutProfileRef: string;
|
|
22
|
-
readonly staticDependencyClosureHash: string;
|
|
23
|
-
readonly tenantDependency: PreparedLaunchTenantDependency;
|
|
24
|
-
readonly trustPolicy: RuntimeTemplateTrustPolicy;
|
|
25
|
-
readonly policyGenerationHash: string;
|
|
26
|
-
readonly region: string;
|
|
27
|
-
}
|
|
28
|
-
export interface PreparedLaunchVariant {
|
|
29
|
-
readonly id: string;
|
|
30
|
-
readonly preparationGenerationId: string;
|
|
31
|
-
readonly key: PreparedLaunchVariantKey;
|
|
32
|
-
readonly keyHash: string;
|
|
33
|
-
readonly compiledLaunchPlanHash: string;
|
|
34
|
-
readonly preparedRuntimeTemplateHash: string;
|
|
35
|
-
readonly preparedRuntimeTemplateRef: string;
|
|
36
|
-
readonly status: PreparedLaunchVariantStatus;
|
|
37
|
-
readonly failure?: PreparationFailure;
|
|
38
|
-
readonly rowVersion: number;
|
|
39
|
-
}
|
|
40
|
-
export declare function createPreparedLaunchVariantKey(input: unknown): PreparedLaunchVariantKey;
|
|
41
|
-
export declare function serializePreparedLaunchVariantKey(input: PreparedLaunchVariantKey): string;
|
|
42
|
-
export declare function hashPreparedLaunchVariantKey(input: PreparedLaunchVariantKey): string;
|
|
43
|
-
export declare function createPreparedLaunchVariant(input: unknown): PreparedLaunchVariant;
|
|
44
|
-
export declare function serializePreparedLaunchVariant(input: PreparedLaunchVariant): string;
|
|
45
|
-
export declare function hashPreparedLaunchVariant(input: PreparedLaunchVariant): string;
|
|
46
|
-
//# sourceMappingURL=prepared-launch-variant.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prepared-launch-variant.d.ts","s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