@xemahq/agent-session-runtime 0.6.6 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/LICENSE +176 -175
  2. package/README.md +6 -1
  3. package/dist/index.d.ts +1 -0
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/index.js +1 -0
  6. package/dist/index.js.map +1 -1
  7. package/dist/lib/dispatch-contract.d.ts +2 -1
  8. package/dist/lib/dispatch-contract.d.ts.map +1 -1
  9. package/dist/lib/launch-identity/canonical-contract.d.ts +21 -0
  10. package/dist/lib/launch-identity/canonical-contract.d.ts.map +1 -0
  11. package/dist/lib/launch-identity/canonical-contract.js +217 -0
  12. package/dist/lib/launch-identity/canonical-contract.js.map +1 -0
  13. package/dist/lib/launch-identity/compiled-session-launch-plan-store.d.ts +44 -0
  14. package/dist/lib/launch-identity/compiled-session-launch-plan-store.d.ts.map +1 -0
  15. package/dist/lib/launch-identity/compiled-session-launch-plan-store.js +116 -0
  16. package/dist/lib/launch-identity/compiled-session-launch-plan-store.js.map +1 -0
  17. package/dist/lib/launch-identity/compiled-session-launch-plan.d.ts +84 -0
  18. package/dist/lib/launch-identity/compiled-session-launch-plan.d.ts.map +1 -0
  19. package/dist/lib/launch-identity/compiled-session-launch-plan.js +386 -0
  20. package/dist/lib/launch-identity/compiled-session-launch-plan.js.map +1 -0
  21. package/dist/lib/launch-identity/index.d.ts +7 -0
  22. package/dist/lib/launch-identity/index.d.ts.map +1 -0
  23. package/dist/lib/launch-identity/index.js +23 -0
  24. package/dist/lib/launch-identity/index.js.map +1 -0
  25. package/dist/lib/launch-identity/runtime-template-key.d.ts +30 -0
  26. package/dist/lib/launch-identity/runtime-template-key.d.ts.map +1 -0
  27. package/dist/lib/launch-identity/runtime-template-key.js +73 -0
  28. package/dist/lib/launch-identity/runtime-template-key.js.map +1 -0
  29. package/dist/lib/launch-identity/session-binding.d.ts +24 -0
  30. package/dist/lib/launch-identity/session-binding.d.ts.map +1 -0
  31. package/dist/lib/launch-identity/session-binding.js +62 -0
  32. package/dist/lib/launch-identity/session-binding.js.map +1 -0
  33. package/dist/lib/launch-identity/thread-reuse-key.d.ts +19 -0
  34. package/dist/lib/launch-identity/thread-reuse-key.d.ts.map +1 -0
  35. package/dist/lib/launch-identity/thread-reuse-key.js +46 -0
  36. package/dist/lib/launch-identity/thread-reuse-key.js.map +1 -0
  37. package/package.json +15 -4
  38. package/src/index.ts +1 -0
  39. package/src/lib/agent-workspace-manifest.ts +2 -2
  40. package/src/lib/composer.ts +2 -2
  41. package/src/lib/dispatch-contract.ts +4 -9
  42. package/src/lib/drift-detector.ts +2 -2
  43. package/src/lib/environment-resolver.ts +3 -3
  44. package/src/lib/launch-identity/canonical-contract.ts +318 -0
  45. package/src/lib/launch-identity/compiled-session-launch-plan-store.ts +178 -0
  46. package/src/lib/launch-identity/compiled-session-launch-plan.ts +689 -0
  47. package/src/lib/launch-identity/index.ts +6 -0
  48. package/src/lib/launch-identity/runtime-template-key.ts +148 -0
  49. package/src/lib/launch-identity/session-binding.ts +152 -0
  50. package/src/lib/launch-identity/thread-reuse-key.ts +93 -0
  51. package/src/lib/skill-bundle-template-resolver.ts +1 -1
  52. package/src/lib/types.ts +1 -1
@@ -0,0 +1,386 @@
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 IMAGE_DIGEST_PATTERN = /^sha256:[a-f0-9]{64}$/u;
84
+ const BINDING_SLOT_NAME_PATTERN = /^[a-z][a-z0-9]*(?:[.-][a-z][a-z0-9]*)*$/u;
85
+ const DYNAMIC_LITERAL_PATTERN = /\$\{\s*(?:input|tenant|org|organization|project|user|session|thread|domain|token|secret|credential)(?:[.:[\]}]|$)/iu;
86
+ const SECRET_REFERENCE_PATTERN = /^(?:secret|vault|credential|token)(?:-ref)?:\/\//iu;
87
+ const DYNAMIC_FIELD_NAMES = new Set([
88
+ 'apikey',
89
+ 'authorization',
90
+ 'cookie',
91
+ 'credential',
92
+ 'credentialgrantref',
93
+ 'credentialref',
94
+ 'databasegrantref',
95
+ 'domain',
96
+ 'domainid',
97
+ 'domainref',
98
+ 'input',
99
+ 'invocationid',
100
+ 'organization',
101
+ 'organizationid',
102
+ 'org',
103
+ 'orgid',
104
+ 'password',
105
+ 'privatekey',
106
+ 'project',
107
+ 'projectid',
108
+ 'secret',
109
+ 'secretref',
110
+ 'session',
111
+ 'sessionid',
112
+ 'storageref',
113
+ 'tenant',
114
+ 'tenantid',
115
+ 'thread',
116
+ 'threadid',
117
+ 'token',
118
+ 'tokenref',
119
+ 'user',
120
+ 'userid',
121
+ 'value',
122
+ ]);
123
+ const SECRET_OR_CREDENTIAL_FIELD_PATTERN = /(?:apikey|authorization|cookie|credential|password|privatekey|secret|token)(?:ref)?$/u;
124
+ function createCompiledSessionLaunchPlan(input) {
125
+ const object = (0, canonical_contract_1.requireExactObject)(input, 'CompiledSessionLaunchPlan', PLAN_KEYS);
126
+ if (object.schemaVersion !== 1) {
127
+ throw new TypeError('CompiledSessionLaunchPlan.schemaVersion must be 1.');
128
+ }
129
+ const runtimeTemplateKey = (0, runtime_template_key_1.createRuntimeTemplateKey)(object.runtimeTemplateKey);
130
+ const agent = requirePinnedResource(object.agent, 'CompiledSessionLaunchPlan.agent');
131
+ const subagents = requirePinnedResources(object.subagents, 'CompiledSessionLaunchPlan.subagents');
132
+ const skills = requirePinnedResources(object.skills, 'CompiledSessionLaunchPlan.skills');
133
+ const tools = requirePinnedResources(object.tools, 'CompiledSessionLaunchPlan.tools');
134
+ const mcpDescriptors = requirePinnedResources(object.mcpDescriptors, 'CompiledSessionLaunchPlan.mcpDescriptors');
135
+ const capabilityDescriptors = requirePinnedResources(object.capabilityDescriptors, 'CompiledSessionLaunchPlan.capabilityDescriptors');
136
+ const workspace = requireWorkspace(object.workspace);
137
+ const runtimeRequirements = requireRuntimeRequirements(object.runtimeRequirements);
138
+ const policyCompatibility = requirePolicyCompatibility(object.policyCompatibility);
139
+ const outputSurface = requireOutputSurface(object.outputSurface);
140
+ const bindingSlots = requireBindingSlots(object.bindingSlots);
141
+ assertTemplateConsistency({
142
+ runtimeTemplateKey,
143
+ agent,
144
+ subagents,
145
+ skills,
146
+ tools,
147
+ mcpDescriptors,
148
+ capabilityDescriptors,
149
+ workspace,
150
+ runtimeRequirements,
151
+ policyCompatibility,
152
+ });
153
+ assertDeclaredBindingSlotReferences([workspace.structure, workspace.layout, runtimeRequirements.requirements], bindingSlots);
154
+ return Object.freeze({
155
+ schemaVersion: 1,
156
+ runtimeTemplateKey,
157
+ agent,
158
+ subagents,
159
+ skills,
160
+ tools,
161
+ mcpDescriptors,
162
+ capabilityDescriptors,
163
+ workspace,
164
+ runtimeRequirements,
165
+ policyCompatibility,
166
+ outputSurface,
167
+ bindingSlots,
168
+ });
169
+ }
170
+ function encodeCompiledSessionLaunchPlan(input) {
171
+ return (0, canonical_contract_1.canonicalContractJson)(createCompiledSessionLaunchPlan(input));
172
+ }
173
+ function decodeCompiledSessionLaunchPlan(encoded) {
174
+ let parsed;
175
+ try {
176
+ parsed = JSON.parse(encoded);
177
+ }
178
+ catch (error) {
179
+ throw new TypeError(`CompiledSessionLaunchPlan is not valid JSON: ${error instanceof Error ? error.message : String(error)}`);
180
+ }
181
+ return createCompiledSessionLaunchPlan(parsed);
182
+ }
183
+ function hashCompiledSessionLaunchPlan(input) {
184
+ return (0, canonical_contract_1.hashCanonicalContract)(createCompiledSessionLaunchPlan(input));
185
+ }
186
+ function hashCompiledWorkspaceLaunchPlan(input) {
187
+ return (0, canonical_contract_1.hashCanonicalContract)(input);
188
+ }
189
+ function requirePinnedResource(value, path) {
190
+ const object = (0, canonical_contract_1.requireExactObject)(value, path, RESOURCE_KEYS);
191
+ return Object.freeze({
192
+ kind: (0, canonical_contract_1.requireNonEmptyString)(object.kind, `${path}.kind`),
193
+ ref: (0, canonical_contract_1.requireNonEmptyString)(object.ref, `${path}.ref`),
194
+ revisionRef: (0, canonical_contract_1.requireNonEmptyString)(object.revisionRef, `${path}.revisionRef`),
195
+ contentHash: (0, canonical_contract_1.requireSha256)(object.contentHash, `${path}.contentHash`),
196
+ });
197
+ }
198
+ function requirePinnedResources(value, path) {
199
+ if (!Array.isArray(value)) {
200
+ throw new TypeError(`${path} must be an array.`);
201
+ }
202
+ const resources = value.map((entry, index) => requirePinnedResource(entry, `${path}[${index}]`));
203
+ const identities = new Set();
204
+ for (const resource of resources) {
205
+ const identity = `${resource.kind}\u0000${resource.ref}`;
206
+ if (identities.has(identity)) {
207
+ throw new TypeError(`${path} contains duplicate resource '${resource.kind}:${resource.ref}'.`);
208
+ }
209
+ identities.add(identity);
210
+ }
211
+ return Object.freeze(resources.toSorted((left, right) => (0, canonical_contract_1.canonicalContractJson)(left).localeCompare((0, canonical_contract_1.canonicalContractJson)(right))));
212
+ }
213
+ function requireWorkspace(value) {
214
+ const path = 'CompiledSessionLaunchPlan.workspace';
215
+ const object = (0, canonical_contract_1.requireExactObject)(value, path, WORKSPACE_KEYS);
216
+ return Object.freeze({
217
+ manifestRef: (0, canonical_contract_1.requireNonEmptyString)(object.manifestRef, `${path}.manifestRef`),
218
+ manifestHash: (0, canonical_contract_1.requireSha256)(object.manifestHash, `${path}.manifestHash`),
219
+ structure: requireStaticPayload(object.structure, `${path}.structure`),
220
+ layout: requireStaticPayload(object.layout, `${path}.layout`),
221
+ });
222
+ }
223
+ function requireRuntimeRequirements(value) {
224
+ const path = 'CompiledSessionLaunchPlan.runtimeRequirements';
225
+ const object = (0, canonical_contract_1.requireExactObject)(value, path, RUNTIME_REQUIREMENT_KEYS);
226
+ const imageDigest = (0, canonical_contract_1.requireNonEmptyString)(object.imageDigest, `${path}.imageDigest`);
227
+ if (!IMAGE_DIGEST_PATTERN.test(imageDigest)) {
228
+ throw new TypeError(`${path}.imageDigest must be an immutable sha256 image digest.`);
229
+ }
230
+ const requirements = requireStaticPayload(object.requirements, `${path}.requirements`);
231
+ const requirementsHash = (0, canonical_contract_1.requireSha256)(object.requirementsHash, `${path}.requirementsHash`);
232
+ assertContentHash(requirementsHash, requirements, `${path}.requirementsHash`);
233
+ return Object.freeze({
234
+ runtimeRef: (0, canonical_contract_1.requireNonEmptyString)(object.runtimeRef, `${path}.runtimeRef`),
235
+ runtimeRevision: (0, canonical_contract_1.requireNonEmptyString)(object.runtimeRevision, `${path}.runtimeRevision`),
236
+ imageDigest,
237
+ requirementsHash,
238
+ requirements,
239
+ });
240
+ }
241
+ function requirePolicyCompatibility(value) {
242
+ const path = 'CompiledSessionLaunchPlan.policyCompatibility';
243
+ const object = (0, canonical_contract_1.requireExactObject)(value, path, POLICY_KEYS);
244
+ return Object.freeze({
245
+ tenantDependency: (0, canonical_contract_1.requireEnumValue)(object.tenantDependency, `${path}.tenantDependency`, TENANT_DEPENDENCIES),
246
+ trustPolicy: (0, canonical_contract_1.requireEnumValue)(object.trustPolicy, `${path}.trustPolicy`, TRUST_POLICIES),
247
+ compatibleSurfaces: (0, canonical_contract_1.requireStringRefs)(object.compatibleSurfaces, `${path}.compatibleSurfaces`),
248
+ policies: requirePinnedResources(object.policies, `${path}.policies`),
249
+ });
250
+ }
251
+ function requireOutputSurface(value) {
252
+ const path = 'CompiledSessionLaunchPlan.outputSurface';
253
+ const object = (0, canonical_contract_1.requireExactObject)(value, path, OUTPUT_SURFACE_KEYS);
254
+ const schema = (0, canonical_contract_1.requireCanonicalJsonObject)(object.schema, `${path}.schema`);
255
+ const schemaHash = (0, canonical_contract_1.requireSha256)(object.schemaHash, `${path}.schemaHash`);
256
+ assertContentHash(schemaHash, schema, `${path}.schemaHash`);
257
+ return Object.freeze({
258
+ kind: (0, canonical_contract_1.requireNonEmptyString)(object.kind, `${path}.kind`),
259
+ schemaRef: (0, canonical_contract_1.requireNonEmptyString)(object.schemaRef, `${path}.schemaRef`),
260
+ schemaHash,
261
+ schema,
262
+ });
263
+ }
264
+ function requireBindingSlots(value) {
265
+ const path = 'CompiledSessionLaunchPlan.bindingSlots';
266
+ if (!Array.isArray(value)) {
267
+ throw new TypeError(`${path} must be an array.`);
268
+ }
269
+ const slots = value.map((entry, index) => {
270
+ const slotPath = `${path}[${index}]`;
271
+ const object = (0, canonical_contract_1.requireExactObject)(entry, slotPath, BINDING_SLOT_KEYS);
272
+ const name = (0, canonical_contract_1.requireNonEmptyString)(object.name, `${slotPath}.name`);
273
+ if (!BINDING_SLOT_NAME_PATTERN.test(name)) {
274
+ throw new TypeError(`${slotPath}.name must be a lowercase dotted or hyphenated identifier.`);
275
+ }
276
+ return Object.freeze({
277
+ name,
278
+ kind: (0, canonical_contract_1.requireEnumValue)(object.kind, `${slotPath}.kind`, BINDING_SLOT_KINDS),
279
+ cardinality: (0, canonical_contract_1.requireEnumValue)(object.cardinality, `${slotPath}.cardinality`, BINDING_SLOT_CARDINALITIES),
280
+ required: (0, canonical_contract_1.requireBoolean)(object.required, `${slotPath}.required`),
281
+ });
282
+ });
283
+ const names = new Set();
284
+ for (const slot of slots) {
285
+ if (names.has(slot.name)) {
286
+ throw new TypeError(`${path} contains duplicate slot '${slot.name}'.`);
287
+ }
288
+ names.add(slot.name);
289
+ }
290
+ return Object.freeze(slots.toSorted((left, right) => left.name.localeCompare(right.name)));
291
+ }
292
+ function requireStaticPayload(value, path) {
293
+ const normalized = (0, canonical_contract_1.requireCanonicalJsonObject)(value, path);
294
+ assertStaticPayloadNode(normalized, path);
295
+ return normalized;
296
+ }
297
+ function assertStaticPayloadNode(value, path) {
298
+ if (typeof value === 'string') {
299
+ if (DYNAMIC_LITERAL_PATTERN.test(value) ||
300
+ SECRET_REFERENCE_PATTERN.test(value)) {
301
+ throw new TypeError(`${path} embeds dynamic or secret data; use a typed $bindingSlot reference.`);
302
+ }
303
+ return;
304
+ }
305
+ if (value === null || typeof value !== 'object') {
306
+ return;
307
+ }
308
+ if (Array.isArray(value)) {
309
+ value.forEach((entry, index) => assertStaticPayloadNode(entry, `${path}[${index}]`));
310
+ return;
311
+ }
312
+ if (Object.hasOwn(value, '$bindingSlot')) {
313
+ const marker = (0, canonical_contract_1.requireExactObject)(value, path, ['$bindingSlot']);
314
+ (0, canonical_contract_1.requireNonEmptyString)(marker.$bindingSlot, `${path}.$bindingSlot`);
315
+ return;
316
+ }
317
+ for (const [key, entry] of Object.entries(value)) {
318
+ const normalizedKey = key.replaceAll(/[^a-z0-9]/giu, '').toLowerCase();
319
+ if (DYNAMIC_FIELD_NAMES.has(normalizedKey) ||
320
+ SECRET_OR_CREDENTIAL_FIELD_PATTERN.test(normalizedKey)) {
321
+ if (!isBindingSlotMarker(entry)) {
322
+ throw new TypeError(`${path}.${key} is dynamic data; its value must be a typed $bindingSlot reference.`);
323
+ }
324
+ }
325
+ assertStaticPayloadNode(entry, `${path}.${key}`);
326
+ }
327
+ }
328
+ function isBindingSlotMarker(value) {
329
+ return (value !== null &&
330
+ typeof value === 'object' &&
331
+ !Array.isArray(value) &&
332
+ Object.hasOwn(value, '$bindingSlot'));
333
+ }
334
+ function assertDeclaredBindingSlotReferences(values, slots) {
335
+ const declared = new Set(slots.map((slot) => slot.name));
336
+ for (const [index, value] of values.entries()) {
337
+ inspectBindingSlotReferences(value, `staticPayloads[${index}]`, declared);
338
+ }
339
+ }
340
+ function inspectBindingSlotReferences(value, path, declared) {
341
+ if (value === null || typeof value !== 'object') {
342
+ return;
343
+ }
344
+ if (Array.isArray(value)) {
345
+ value.forEach((entry, index) => inspectBindingSlotReferences(entry, `${path}[${index}]`, declared));
346
+ return;
347
+ }
348
+ if (isBindingSlotMarker(value)) {
349
+ const name = value.$bindingSlot;
350
+ if (typeof name !== 'string' || !declared.has(name)) {
351
+ throw new TypeError(`${path} references undeclared binding slot '${String(name)}'.`);
352
+ }
353
+ return;
354
+ }
355
+ for (const [key, entry] of Object.entries(value)) {
356
+ inspectBindingSlotReferences(entry, `${path}.${key}`, declared);
357
+ }
358
+ }
359
+ function assertTemplateConsistency(input) {
360
+ const key = input.runtimeTemplateKey;
361
+ assertEqual(input.agent.revisionRef, key.agentRevision, 'agent.revisionRef', 'runtimeTemplateKey.agentRevision');
362
+ assertEqual(input.agent.contentHash, key.primaryAgentHash, 'agent.contentHash', 'runtimeTemplateKey.primaryAgentHash');
363
+ assertContentHash(key.subagentsHash, input.subagents, 'subagents');
364
+ assertContentHash(key.skillsHash, input.skills, 'skills');
365
+ assertContentHash(key.toolsHash, input.tools, 'tools');
366
+ assertContentHash(key.mcpDescriptorsHash, input.mcpDescriptors, 'mcpDescriptors');
367
+ assertContentHash(key.capabilityDescriptorsHash, input.capabilityDescriptors, 'capabilityDescriptors');
368
+ assertContentHash(key.workspacePlanHash, input.workspace, 'runtimeTemplateKey.workspacePlanHash');
369
+ assertEqual(input.runtimeRequirements.runtimeRef, key.runtimeRef, 'runtimeRequirements.runtimeRef', 'runtimeTemplateKey.runtimeRef');
370
+ assertEqual(input.runtimeRequirements.runtimeRevision, key.runtimeRevision, 'runtimeRequirements.runtimeRevision', 'runtimeTemplateKey.runtimeRevision');
371
+ assertEqual(input.runtimeRequirements.imageDigest, key.imageDigest, 'runtimeRequirements.imageDigest', 'runtimeTemplateKey.imageDigest');
372
+ assertEqual(input.policyCompatibility.tenantDependency, key.tenantDependency, 'policyCompatibility.tenantDependency', 'runtimeTemplateKey.tenantDependency');
373
+ assertEqual(input.policyCompatibility.trustPolicy, key.trustPolicy, 'policyCompatibility.trustPolicy', 'runtimeTemplateKey.trustPolicy');
374
+ }
375
+ function assertContentHash(expectedHash, content, path) {
376
+ const actualHash = (0, canonical_contract_1.hashCanonicalContract)(content);
377
+ if (actualHash !== expectedHash) {
378
+ throw new TypeError(`${path} content hash mismatch: expected '${expectedHash}', computed '${actualHash}'.`);
379
+ }
380
+ }
381
+ function assertEqual(actual, expected, actualPath, expectedPath) {
382
+ if (actual !== expected) {
383
+ throw new TypeError(`${actualPath} must equal ${expectedPath}; received '${actual}' and '${expected}'.`);
384
+ }
385
+ }
386
+ //# sourceMappingURL=compiled-session-launch-plan.js.map
@@ -0,0 +1 @@
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,6DAW8B;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,yBAAyB,QAmBpC;AAED,IAAY,gCAGX;AAHD,WAAY,gCAAgC;IAC1C,+CAAW,CAAA;IACX,iDAAa,CAAA;AACf,CAAC,EAHW,gCAAgC,gDAAhC,gCAAgC,QAG3C;AAkED,MAAM,SAAS,GAAG;IAChB,eAAe;IACf,oBAAoB;IACpB,OAAO;IACP,WAAW;IACX,QAAQ;IACR,OAAO;IACP,gBAAgB;IAChB,uBAAuB;IACvB,WAAW;IACX,qBAAqB;IACrB,qBAAqB;IACrB,eAAe;IACf,cAAc;CACN,CAAC;AACX,MAAM,aAAa,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,aAAa,CAAU,CAAC;AAC7E,MAAM,cAAc,GAAG;IACrB,aAAa;IACb,cAAc;IACd,WAAW;IACX,QAAQ;CACA,CAAC;AACX,MAAM,wBAAwB,GAAG;IAC/B,YAAY;IACZ,iBAAiB;IAC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-contract';
2
+ export * from './compiled-session-launch-plan';
3
+ export * from './compiled-session-launch-plan-store';
4
+ export * from './runtime-template-key';
5
+ export * from './session-binding';
6
+ export * from './thread-reuse-key';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/launch-identity/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sCAAsC,CAAC;AACrD,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./canonical-contract"), exports);
18
+ __exportStar(require("./compiled-session-launch-plan"), exports);
19
+ __exportStar(require("./compiled-session-launch-plan-store"), exports);
20
+ __exportStar(require("./runtime-template-key"), exports);
21
+ __exportStar(require("./session-binding"), exports);
22
+ __exportStar(require("./thread-reuse-key"), exports);
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/launch-identity/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,iEAA+C;AAC/C,uEAAqD;AACrD,yDAAuC;AACvC,oDAAkC;AAClC,qDAAmC"}
@@ -0,0 +1,30 @@
1
+ export declare enum RuntimeTemplateTenantDependency {
2
+ OrganizationNeutral = "organization-neutral",
3
+ OrganizationBound = "organization-bound"
4
+ }
5
+ export declare enum RuntimeTemplateTrustPolicy {
6
+ Shared = "shared",
7
+ Dedicated = "dedicated",
8
+ Confidential = "confidential"
9
+ }
10
+ export interface RuntimeTemplateKey {
11
+ readonly schemaVersion: 1;
12
+ readonly tenantDependency: RuntimeTemplateTenantDependency;
13
+ readonly trustPolicy: RuntimeTemplateTrustPolicy;
14
+ readonly runtimeRef: string;
15
+ readonly runtimeRevision: string;
16
+ readonly imageDigest: string;
17
+ readonly agentRevision: string;
18
+ readonly primaryAgentHash: string;
19
+ readonly subagentsHash: string;
20
+ readonly skillsHash: string;
21
+ readonly toolsHash: string;
22
+ readonly capabilityDescriptorsHash: string;
23
+ readonly mcpDescriptorsHash: string;
24
+ readonly workspacePlanHash: string;
25
+ readonly layoutProfile: string;
26
+ }
27
+ export declare function createRuntimeTemplateKey(input: unknown): RuntimeTemplateKey;
28
+ export declare function serializeRuntimeTemplateKey(input: RuntimeTemplateKey): string;
29
+ export declare function hashRuntimeTemplateKey(input: RuntimeTemplateKey): string;
30
+ //# sourceMappingURL=runtime-template-key.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-template-key.d.ts","sourceRoot":"","sources":["../../../src/lib/launch-identity/runtime-template-key.ts"],"names":[],"mappings":"AAUA,oBAAY,+BAA+B;IACzC,mBAAmB,yBAAyB;IAC5C,iBAAiB,uBAAuB;CACzC;AAED,oBAAY,0BAA0B;IACpC,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,YAAY,iBAAiB;CAC9B;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,aAAa,EAAE,CAAC,CAAC;IAC1B,QAAQ,CAAC,gBAAgB,EAAE,+BAA+B,CAAC;IAC3D,QAAQ,CAAC,WAAW,EAAE,0BAA0B,CAAC;IACjD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,yBAAyB,EAAE,MAAM,CAAC;IAC3C,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAChC;AA6BD,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,kBAAkB,CAyE3E;AAED,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,kBAAkB,GAAG,MAAM,CAE7E;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,kBAAkB,GAAG,MAAM,CAExE"}
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RuntimeTemplateTrustPolicy = exports.RuntimeTemplateTenantDependency = void 0;
4
+ exports.createRuntimeTemplateKey = createRuntimeTemplateKey;
5
+ exports.serializeRuntimeTemplateKey = serializeRuntimeTemplateKey;
6
+ exports.hashRuntimeTemplateKey = hashRuntimeTemplateKey;
7
+ const canonical_contract_1 = require("./canonical-contract");
8
+ var RuntimeTemplateTenantDependency;
9
+ (function (RuntimeTemplateTenantDependency) {
10
+ RuntimeTemplateTenantDependency["OrganizationNeutral"] = "organization-neutral";
11
+ RuntimeTemplateTenantDependency["OrganizationBound"] = "organization-bound";
12
+ })(RuntimeTemplateTenantDependency || (exports.RuntimeTemplateTenantDependency = RuntimeTemplateTenantDependency = {}));
13
+ var RuntimeTemplateTrustPolicy;
14
+ (function (RuntimeTemplateTrustPolicy) {
15
+ RuntimeTemplateTrustPolicy["Shared"] = "shared";
16
+ RuntimeTemplateTrustPolicy["Dedicated"] = "dedicated";
17
+ RuntimeTemplateTrustPolicy["Confidential"] = "confidential";
18
+ })(RuntimeTemplateTrustPolicy || (exports.RuntimeTemplateTrustPolicy = RuntimeTemplateTrustPolicy = {}));
19
+ const REQUIRED_KEYS = [
20
+ 'schemaVersion',
21
+ 'tenantDependency',
22
+ 'trustPolicy',
23
+ 'runtimeRef',
24
+ 'runtimeRevision',
25
+ 'imageDigest',
26
+ 'agentRevision',
27
+ 'primaryAgentHash',
28
+ 'subagentsHash',
29
+ 'skillsHash',
30
+ 'toolsHash',
31
+ 'capabilityDescriptorsHash',
32
+ 'mcpDescriptorsHash',
33
+ 'workspacePlanHash',
34
+ 'layoutProfile',
35
+ ];
36
+ const TENANT_DEPENDENCIES = Object.values(RuntimeTemplateTenantDependency);
37
+ const TRUST_POLICIES = Object.values(RuntimeTemplateTrustPolicy);
38
+ const IMAGE_DIGEST_PATTERN = /^sha256:[a-f0-9]{64}$/u;
39
+ function createRuntimeTemplateKey(input) {
40
+ (0, canonical_contract_1.assertNoTenantOrSecretTemplateFields)(input, 'RuntimeTemplateKey');
41
+ const object = (0, canonical_contract_1.requireExactObject)(input, 'RuntimeTemplateKey', REQUIRED_KEYS);
42
+ if (object.schemaVersion !== 1) {
43
+ throw new TypeError('RuntimeTemplateKey.schemaVersion must be 1.');
44
+ }
45
+ const imageDigest = (0, canonical_contract_1.requireNonEmptyString)(object.imageDigest, 'RuntimeTemplateKey.imageDigest');
46
+ if (!IMAGE_DIGEST_PATTERN.test(imageDigest)) {
47
+ throw new TypeError('RuntimeTemplateKey.imageDigest must be an immutable sha256 image digest.');
48
+ }
49
+ return Object.freeze({
50
+ schemaVersion: 1,
51
+ tenantDependency: (0, canonical_contract_1.requireEnumValue)(object.tenantDependency, 'RuntimeTemplateKey.tenantDependency', TENANT_DEPENDENCIES),
52
+ trustPolicy: (0, canonical_contract_1.requireEnumValue)(object.trustPolicy, 'RuntimeTemplateKey.trustPolicy', TRUST_POLICIES),
53
+ runtimeRef: (0, canonical_contract_1.requireNonEmptyString)(object.runtimeRef, 'RuntimeTemplateKey.runtimeRef'),
54
+ runtimeRevision: (0, canonical_contract_1.requireNonEmptyString)(object.runtimeRevision, 'RuntimeTemplateKey.runtimeRevision'),
55
+ imageDigest,
56
+ agentRevision: (0, canonical_contract_1.requireNonEmptyString)(object.agentRevision, 'RuntimeTemplateKey.agentRevision'),
57
+ primaryAgentHash: (0, canonical_contract_1.requireSha256)(object.primaryAgentHash, 'RuntimeTemplateKey.primaryAgentHash'),
58
+ subagentsHash: (0, canonical_contract_1.requireSha256)(object.subagentsHash, 'RuntimeTemplateKey.subagentsHash'),
59
+ skillsHash: (0, canonical_contract_1.requireSha256)(object.skillsHash, 'RuntimeTemplateKey.skillsHash'),
60
+ toolsHash: (0, canonical_contract_1.requireSha256)(object.toolsHash, 'RuntimeTemplateKey.toolsHash'),
61
+ capabilityDescriptorsHash: (0, canonical_contract_1.requireSha256)(object.capabilityDescriptorsHash, 'RuntimeTemplateKey.capabilityDescriptorsHash'),
62
+ mcpDescriptorsHash: (0, canonical_contract_1.requireSha256)(object.mcpDescriptorsHash, 'RuntimeTemplateKey.mcpDescriptorsHash'),
63
+ workspacePlanHash: (0, canonical_contract_1.requireSha256)(object.workspacePlanHash, 'RuntimeTemplateKey.workspacePlanHash'),
64
+ layoutProfile: (0, canonical_contract_1.requireNonEmptyString)(object.layoutProfile, 'RuntimeTemplateKey.layoutProfile'),
65
+ });
66
+ }
67
+ function serializeRuntimeTemplateKey(input) {
68
+ return (0, canonical_contract_1.canonicalContractJson)(createRuntimeTemplateKey(input));
69
+ }
70
+ function hashRuntimeTemplateKey(input) {
71
+ return (0, canonical_contract_1.hashCanonicalContract)(createRuntimeTemplateKey(input));
72
+ }
73
+ //# sourceMappingURL=runtime-template-key.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-template-key.js","sourceRoot":"","sources":["../../../src/lib/launch-identity/runtime-template-key.ts"],"names":[],"mappings":";;;AAkEA,4DAyEC;AAED,kEAEC;AAED,wDAEC;AAnJD,6DAQ8B;AAE9B,IAAY,+BAGX;AAHD,WAAY,+BAA+B;IACzC,+EAA4C,CAAA;IAC5C,2EAAwC,CAAA;AAC1C,CAAC,EAHW,+BAA+B,+CAA/B,+BAA+B,QAG1C;AAED,IAAY,0BAIX;AAJD,WAAY,0BAA0B;IACpC,+CAAiB,CAAA;IACjB,qDAAuB,CAAA;IACvB,2DAA6B,CAAA;AAC/B,CAAC,EAJW,0BAA0B,0CAA1B,0BAA0B,QAIrC;AAoBD,MAAM,aAAa,GAAG;IACpB,eAAe;IACf,kBAAkB;IAClB,aAAa;IACb,YAAY;IACZ,iBAAiB;IACjB,aAAa;IACb,eAAe;IACf,kBAAkB;IAClB,eAAe;IACf,YAAY;IACZ,WAAW;IACX,2BAA2B;IAC3B,oBAAoB;IACpB,mBAAmB;IACnB,eAAe;CACP,CAAC;AAEX,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,CAAC,+BAA+B,CAAC,CAAC;AAC3E,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,0BAA0B,CAAC,CAAC;AACjE,MAAM,oBAAoB,GAAG,wBAAwB,CAAC;AAOtD,SAAgB,wBAAwB,CAAC,KAAc;IACrD,IAAA,yDAAoC,EAAC,KAAK,EAAE,oBAAoB,CAAC,CAAC;IAClE,MAAM,MAAM,GAAG,IAAA,uCAAkB,EAAC,KAAK,EAAE,oBAAoB,EAAE,aAAa,CAAC,CAAC;IAE9E,IAAI,MAAM,CAAC,aAAa,KAAK,CAAC,EAAE,CAAC;QAC/B,MAAM,IAAI,SAAS,CAAC,6CAA6C,CAAC,CA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,CAAC,iBAAiB,EACxB,sCAAsC,CACvC;QACD,aAAa,EAAE,IAAA,0CAAqB,EAClC,MAAM,CAAC,aAAa,EACpB,kCAAkC,CACnC;KACF,CAAC,CAAC;AACL,CAAC;AAED,SAAgB,2BAA2B,CAAC,KAAyB;IACnE,OAAO,IAAA,0CAAqB,EAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC,CAAC;AAChE,CAAC;AAED,SAAgB,sBAAsB,CAAC,KAAyB;IAC9D,OAAO,IAAA,0CAAqB,EAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC,CAAC;AAChE,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { type CanonicalJsonValue, type ResourceBindingRef } from './canonical-contract';
2
+ export interface SessionBinding {
3
+ readonly schemaVersion: 1;
4
+ readonly sessionId: string;
5
+ readonly organizationId: string;
6
+ readonly projectId: string;
7
+ readonly userId: string;
8
+ readonly domainRefs: readonly ResourceBindingRef[];
9
+ readonly storageAllocationRef: string;
10
+ readonly workingFileSourceRefs: readonly string[];
11
+ readonly outputRouteRef: string;
12
+ readonly actorTokenRef?: string;
13
+ readonly serviceTokenRef?: string;
14
+ readonly providerTokenRefs: readonly string[];
15
+ readonly credentialGrantRefs: readonly string[];
16
+ readonly databaseGrantRefs: readonly string[];
17
+ readonly dynamicContext: Readonly<Record<string, CanonicalJsonValue>>;
18
+ readonly bindingRevision: string;
19
+ readonly bindingEpoch: number;
20
+ }
21
+ export declare function createSessionBinding(input: unknown): SessionBinding;
22
+ export declare function serializeSessionBinding(input: SessionBinding): string;
23
+ export declare function hashSessionBinding(input: SessionBinding): string;
24
+ //# sourceMappingURL=session-binding.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-binding.d.ts","sourceRoot":"","sources":["../../../src/lib/launch-identity/session-binding.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,kBAAkB,EAEvB,KAAK,kBAAkB,EAOxB,MAAM,sBAAsB,CAAC;AAE9B,MAAM,WAAW,cA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