@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.
- package/LICENSE +176 -175
- package/README.md +6 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/dispatch-contract.d.ts +2 -1
- package/dist/lib/dispatch-contract.d.ts.map +1 -1
- package/dist/lib/launch-identity/canonical-contract.d.ts +21 -0
- package/dist/lib/launch-identity/canonical-contract.d.ts.map +1 -0
- package/dist/lib/launch-identity/canonical-contract.js +217 -0
- package/dist/lib/launch-identity/canonical-contract.js.map +1 -0
- package/dist/lib/launch-identity/compiled-session-launch-plan-store.d.ts +44 -0
- package/dist/lib/launch-identity/compiled-session-launch-plan-store.d.ts.map +1 -0
- package/dist/lib/launch-identity/compiled-session-launch-plan-store.js +116 -0
- package/dist/lib/launch-identity/compiled-session-launch-plan-store.js.map +1 -0
- package/dist/lib/launch-identity/compiled-session-launch-plan.d.ts +84 -0
- package/dist/lib/launch-identity/compiled-session-launch-plan.d.ts.map +1 -0
- package/dist/lib/launch-identity/compiled-session-launch-plan.js +386 -0
- package/dist/lib/launch-identity/compiled-session-launch-plan.js.map +1 -0
- package/dist/lib/launch-identity/index.d.ts +7 -0
- package/dist/lib/launch-identity/index.d.ts.map +1 -0
- package/dist/lib/launch-identity/index.js +23 -0
- package/dist/lib/launch-identity/index.js.map +1 -0
- package/dist/lib/launch-identity/runtime-template-key.d.ts +30 -0
- package/dist/lib/launch-identity/runtime-template-key.d.ts.map +1 -0
- package/dist/lib/launch-identity/runtime-template-key.js +73 -0
- package/dist/lib/launch-identity/runtime-template-key.js.map +1 -0
- package/dist/lib/launch-identity/session-binding.d.ts +24 -0
- package/dist/lib/launch-identity/session-binding.d.ts.map +1 -0
- package/dist/lib/launch-identity/session-binding.js +62 -0
- package/dist/lib/launch-identity/session-binding.js.map +1 -0
- package/dist/lib/launch-identity/thread-reuse-key.d.ts +19 -0
- package/dist/lib/launch-identity/thread-reuse-key.d.ts.map +1 -0
- package/dist/lib/launch-identity/thread-reuse-key.js +46 -0
- package/dist/lib/launch-identity/thread-reuse-key.js.map +1 -0
- package/package.json +15 -4
- package/src/index.ts +1 -0
- package/src/lib/agent-workspace-manifest.ts +2 -2
- package/src/lib/composer.ts +2 -2
- package/src/lib/dispatch-contract.ts +4 -9
- package/src/lib/drift-detector.ts +2 -2
- package/src/lib/environment-resolver.ts +3 -3
- package/src/lib/launch-identity/canonical-contract.ts +318 -0
- package/src/lib/launch-identity/compiled-session-launch-plan-store.ts +178 -0
- package/src/lib/launch-identity/compiled-session-launch-plan.ts +689 -0
- package/src/lib/launch-identity/index.ts +6 -0
- package/src/lib/launch-identity/runtime-template-key.ts +148 -0
- package/src/lib/launch-identity/session-binding.ts +152 -0
- package/src/lib/launch-identity/thread-reuse-key.ts +93 -0
- package/src/lib/skill-bundle-template-resolver.ts +1 -1
- package/src/lib/types.ts +1 -1
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import {
|
|
2
|
+
assertNoTenantOrSecretTemplateFields,
|
|
3
|
+
canonicalContractJson,
|
|
4
|
+
hashCanonicalContract,
|
|
5
|
+
requireEnumValue,
|
|
6
|
+
requireExactObject,
|
|
7
|
+
requireNonEmptyString,
|
|
8
|
+
requireSha256,
|
|
9
|
+
} from './canonical-contract';
|
|
10
|
+
|
|
11
|
+
export enum RuntimeTemplateTenantDependency {
|
|
12
|
+
OrganizationNeutral = 'organization-neutral',
|
|
13
|
+
OrganizationBound = 'organization-bound',
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export enum RuntimeTemplateTrustPolicy {
|
|
17
|
+
Shared = 'shared',
|
|
18
|
+
Dedicated = 'dedicated',
|
|
19
|
+
Confidential = 'confidential',
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface RuntimeTemplateKey {
|
|
23
|
+
readonly schemaVersion: 1;
|
|
24
|
+
readonly tenantDependency: RuntimeTemplateTenantDependency;
|
|
25
|
+
readonly trustPolicy: RuntimeTemplateTrustPolicy;
|
|
26
|
+
readonly runtimeRef: string;
|
|
27
|
+
readonly runtimeRevision: string;
|
|
28
|
+
readonly imageDigest: string;
|
|
29
|
+
readonly agentRevision: string;
|
|
30
|
+
readonly primaryAgentHash: string;
|
|
31
|
+
readonly subagentsHash: string;
|
|
32
|
+
readonly skillsHash: string;
|
|
33
|
+
readonly toolsHash: string;
|
|
34
|
+
readonly capabilityDescriptorsHash: string;
|
|
35
|
+
readonly mcpDescriptorsHash: string;
|
|
36
|
+
readonly workspacePlanHash: string;
|
|
37
|
+
readonly layoutProfile: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const REQUIRED_KEYS = [
|
|
41
|
+
'schemaVersion',
|
|
42
|
+
'tenantDependency',
|
|
43
|
+
'trustPolicy',
|
|
44
|
+
'runtimeRef',
|
|
45
|
+
'runtimeRevision',
|
|
46
|
+
'imageDigest',
|
|
47
|
+
'agentRevision',
|
|
48
|
+
'primaryAgentHash',
|
|
49
|
+
'subagentsHash',
|
|
50
|
+
'skillsHash',
|
|
51
|
+
'toolsHash',
|
|
52
|
+
'capabilityDescriptorsHash',
|
|
53
|
+
'mcpDescriptorsHash',
|
|
54
|
+
'workspacePlanHash',
|
|
55
|
+
'layoutProfile',
|
|
56
|
+
] as const;
|
|
57
|
+
|
|
58
|
+
const TENANT_DEPENDENCIES = Object.values(RuntimeTemplateTenantDependency);
|
|
59
|
+
const TRUST_POLICIES = Object.values(RuntimeTemplateTrustPolicy);
|
|
60
|
+
const IMAGE_DIGEST_PATTERN = /^sha256:[a-f0-9]{64}$/u;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Validates and canonicalizes the immutable execution dimensions used to
|
|
64
|
+
* select warm compute. Tenant, invocation and credential data have no valid
|
|
65
|
+
* slot in this contract and are rejected even when supplied as extra fields.
|
|
66
|
+
*/
|
|
67
|
+
export function createRuntimeTemplateKey(input: unknown): RuntimeTemplateKey {
|
|
68
|
+
assertNoTenantOrSecretTemplateFields(input, 'RuntimeTemplateKey');
|
|
69
|
+
const object = requireExactObject(input, 'RuntimeTemplateKey', REQUIRED_KEYS);
|
|
70
|
+
|
|
71
|
+
if (object.schemaVersion !== 1) {
|
|
72
|
+
throw new TypeError('RuntimeTemplateKey.schemaVersion must be 1.');
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const imageDigest = requireNonEmptyString(
|
|
76
|
+
object.imageDigest,
|
|
77
|
+
'RuntimeTemplateKey.imageDigest',
|
|
78
|
+
);
|
|
79
|
+
if (!IMAGE_DIGEST_PATTERN.test(imageDigest)) {
|
|
80
|
+
throw new TypeError(
|
|
81
|
+
'RuntimeTemplateKey.imageDigest must be an immutable sha256 image digest.',
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return Object.freeze({
|
|
86
|
+
schemaVersion: 1,
|
|
87
|
+
tenantDependency: requireEnumValue(
|
|
88
|
+
object.tenantDependency,
|
|
89
|
+
'RuntimeTemplateKey.tenantDependency',
|
|
90
|
+
TENANT_DEPENDENCIES,
|
|
91
|
+
),
|
|
92
|
+
trustPolicy: requireEnumValue(
|
|
93
|
+
object.trustPolicy,
|
|
94
|
+
'RuntimeTemplateKey.trustPolicy',
|
|
95
|
+
TRUST_POLICIES,
|
|
96
|
+
),
|
|
97
|
+
runtimeRef: requireNonEmptyString(
|
|
98
|
+
object.runtimeRef,
|
|
99
|
+
'RuntimeTemplateKey.runtimeRef',
|
|
100
|
+
),
|
|
101
|
+
runtimeRevision: requireNonEmptyString(
|
|
102
|
+
object.runtimeRevision,
|
|
103
|
+
'RuntimeTemplateKey.runtimeRevision',
|
|
104
|
+
),
|
|
105
|
+
imageDigest,
|
|
106
|
+
agentRevision: requireNonEmptyString(
|
|
107
|
+
object.agentRevision,
|
|
108
|
+
'RuntimeTemplateKey.agentRevision',
|
|
109
|
+
),
|
|
110
|
+
primaryAgentHash: requireSha256(
|
|
111
|
+
object.primaryAgentHash,
|
|
112
|
+
'RuntimeTemplateKey.primaryAgentHash',
|
|
113
|
+
),
|
|
114
|
+
subagentsHash: requireSha256(
|
|
115
|
+
object.subagentsHash,
|
|
116
|
+
'RuntimeTemplateKey.subagentsHash',
|
|
117
|
+
),
|
|
118
|
+
skillsHash: requireSha256(
|
|
119
|
+
object.skillsHash,
|
|
120
|
+
'RuntimeTemplateKey.skillsHash',
|
|
121
|
+
),
|
|
122
|
+
toolsHash: requireSha256(object.toolsHash, 'RuntimeTemplateKey.toolsHash'),
|
|
123
|
+
capabilityDescriptorsHash: requireSha256(
|
|
124
|
+
object.capabilityDescriptorsHash,
|
|
125
|
+
'RuntimeTemplateKey.capabilityDescriptorsHash',
|
|
126
|
+
),
|
|
127
|
+
mcpDescriptorsHash: requireSha256(
|
|
128
|
+
object.mcpDescriptorsHash,
|
|
129
|
+
'RuntimeTemplateKey.mcpDescriptorsHash',
|
|
130
|
+
),
|
|
131
|
+
workspacePlanHash: requireSha256(
|
|
132
|
+
object.workspacePlanHash,
|
|
133
|
+
'RuntimeTemplateKey.workspacePlanHash',
|
|
134
|
+
),
|
|
135
|
+
layoutProfile: requireNonEmptyString(
|
|
136
|
+
object.layoutProfile,
|
|
137
|
+
'RuntimeTemplateKey.layoutProfile',
|
|
138
|
+
),
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export function serializeRuntimeTemplateKey(input: RuntimeTemplateKey): string {
|
|
143
|
+
return canonicalContractJson(createRuntimeTemplateKey(input));
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export function hashRuntimeTemplateKey(input: RuntimeTemplateKey): string {
|
|
147
|
+
return hashCanonicalContract(createRuntimeTemplateKey(input));
|
|
148
|
+
}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import {
|
|
2
|
+
canonicalContractJson,
|
|
3
|
+
type CanonicalJsonValue,
|
|
4
|
+
hashCanonicalContract,
|
|
5
|
+
type ResourceBindingRef,
|
|
6
|
+
requireExactObject,
|
|
7
|
+
requireNonEmptyString,
|
|
8
|
+
requireNonNegativeSafeInteger,
|
|
9
|
+
requireResourceBindingRefs,
|
|
10
|
+
requireSecretFreeJsonObject,
|
|
11
|
+
requireStringRefs,
|
|
12
|
+
} from './canonical-contract';
|
|
13
|
+
|
|
14
|
+
export interface SessionBinding {
|
|
15
|
+
readonly schemaVersion: 1;
|
|
16
|
+
readonly sessionId: string;
|
|
17
|
+
readonly organizationId: string;
|
|
18
|
+
readonly projectId: string;
|
|
19
|
+
readonly userId: string;
|
|
20
|
+
readonly domainRefs: readonly ResourceBindingRef[];
|
|
21
|
+
readonly storageAllocationRef: string;
|
|
22
|
+
readonly workingFileSourceRefs: readonly string[];
|
|
23
|
+
readonly outputRouteRef: string;
|
|
24
|
+
readonly actorTokenRef?: string;
|
|
25
|
+
readonly serviceTokenRef?: string;
|
|
26
|
+
readonly providerTokenRefs: readonly string[];
|
|
27
|
+
readonly credentialGrantRefs: readonly string[];
|
|
28
|
+
readonly databaseGrantRefs: readonly string[];
|
|
29
|
+
readonly dynamicContext: Readonly<Record<string, CanonicalJsonValue>>;
|
|
30
|
+
readonly bindingRevision: string;
|
|
31
|
+
readonly bindingEpoch: number;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const REQUIRED_KEYS = [
|
|
35
|
+
'schemaVersion',
|
|
36
|
+
'sessionId',
|
|
37
|
+
'organizationId',
|
|
38
|
+
'projectId',
|
|
39
|
+
'userId',
|
|
40
|
+
'domainRefs',
|
|
41
|
+
'storageAllocationRef',
|
|
42
|
+
'workingFileSourceRefs',
|
|
43
|
+
'outputRouteRef',
|
|
44
|
+
'providerTokenRefs',
|
|
45
|
+
'credentialGrantRefs',
|
|
46
|
+
'databaseGrantRefs',
|
|
47
|
+
'dynamicContext',
|
|
48
|
+
'bindingRevision',
|
|
49
|
+
'bindingEpoch',
|
|
50
|
+
] as const;
|
|
51
|
+
|
|
52
|
+
const OPTIONAL_KEYS = ['actorTokenRef', 'serviceTokenRef'] as const;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Canonical tenant/session state applied atomically after a runtime claim.
|
|
56
|
+
* Credentials are represented only by opaque refs; raw secrets are rejected
|
|
57
|
+
* from dynamicContext.
|
|
58
|
+
*/
|
|
59
|
+
export function createSessionBinding(input: unknown): SessionBinding {
|
|
60
|
+
const object = requireExactObject(
|
|
61
|
+
input,
|
|
62
|
+
'SessionBinding',
|
|
63
|
+
REQUIRED_KEYS,
|
|
64
|
+
OPTIONAL_KEYS,
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
if (object.schemaVersion !== 1) {
|
|
68
|
+
throw new TypeError('SessionBinding.schemaVersion must be 1.');
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const actorTokenRef =
|
|
72
|
+
object.actorTokenRef === undefined
|
|
73
|
+
? undefined
|
|
74
|
+
: requireNonEmptyString(
|
|
75
|
+
object.actorTokenRef,
|
|
76
|
+
'SessionBinding.actorTokenRef',
|
|
77
|
+
);
|
|
78
|
+
const serviceTokenRef =
|
|
79
|
+
object.serviceTokenRef === undefined
|
|
80
|
+
? undefined
|
|
81
|
+
: requireNonEmptyString(
|
|
82
|
+
object.serviceTokenRef,
|
|
83
|
+
'SessionBinding.serviceTokenRef',
|
|
84
|
+
);
|
|
85
|
+
|
|
86
|
+
return Object.freeze({
|
|
87
|
+
schemaVersion: 1,
|
|
88
|
+
sessionId: requireNonEmptyString(
|
|
89
|
+
object.sessionId,
|
|
90
|
+
'SessionBinding.sessionId',
|
|
91
|
+
),
|
|
92
|
+
organizationId: requireNonEmptyString(
|
|
93
|
+
object.organizationId,
|
|
94
|
+
'SessionBinding.organizationId',
|
|
95
|
+
),
|
|
96
|
+
projectId: requireNonEmptyString(
|
|
97
|
+
object.projectId,
|
|
98
|
+
'SessionBinding.projectId',
|
|
99
|
+
),
|
|
100
|
+
userId: requireNonEmptyString(object.userId, 'SessionBinding.userId'),
|
|
101
|
+
domainRefs: requireResourceBindingRefs(
|
|
102
|
+
object.domainRefs,
|
|
103
|
+
'SessionBinding.domainRefs',
|
|
104
|
+
),
|
|
105
|
+
storageAllocationRef: requireNonEmptyString(
|
|
106
|
+
object.storageAllocationRef,
|
|
107
|
+
'SessionBinding.storageAllocationRef',
|
|
108
|
+
),
|
|
109
|
+
workingFileSourceRefs: requireStringRefs(
|
|
110
|
+
object.workingFileSourceRefs,
|
|
111
|
+
'SessionBinding.workingFileSourceRefs',
|
|
112
|
+
),
|
|
113
|
+
outputRouteRef: requireNonEmptyString(
|
|
114
|
+
object.outputRouteRef,
|
|
115
|
+
'SessionBinding.outputRouteRef',
|
|
116
|
+
),
|
|
117
|
+
...(actorTokenRef === undefined ? {} : { actorTokenRef }),
|
|
118
|
+
...(serviceTokenRef === undefined ? {} : { serviceTokenRef }),
|
|
119
|
+
providerTokenRefs: requireStringRefs(
|
|
120
|
+
object.providerTokenRefs,
|
|
121
|
+
'SessionBinding.providerTokenRefs',
|
|
122
|
+
),
|
|
123
|
+
credentialGrantRefs: requireStringRefs(
|
|
124
|
+
object.credentialGrantRefs,
|
|
125
|
+
'SessionBinding.credentialGrantRefs',
|
|
126
|
+
),
|
|
127
|
+
databaseGrantRefs: requireStringRefs(
|
|
128
|
+
object.databaseGrantRefs,
|
|
129
|
+
'SessionBinding.databaseGrantRefs',
|
|
130
|
+
),
|
|
131
|
+
dynamicContext: requireSecretFreeJsonObject(
|
|
132
|
+
object.dynamicContext,
|
|
133
|
+
'SessionBinding.dynamicContext',
|
|
134
|
+
),
|
|
135
|
+
bindingRevision: requireNonEmptyString(
|
|
136
|
+
object.bindingRevision,
|
|
137
|
+
'SessionBinding.bindingRevision',
|
|
138
|
+
),
|
|
139
|
+
bindingEpoch: requireNonNegativeSafeInteger(
|
|
140
|
+
object.bindingEpoch,
|
|
141
|
+
'SessionBinding.bindingEpoch',
|
|
142
|
+
),
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export function serializeSessionBinding(input: SessionBinding): string {
|
|
147
|
+
return canonicalContractJson(createSessionBinding(input));
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export function hashSessionBinding(input: SessionBinding): string {
|
|
151
|
+
return hashCanonicalContract(createSessionBinding(input));
|
|
152
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import {
|
|
2
|
+
canonicalContractJson,
|
|
3
|
+
hashCanonicalContract,
|
|
4
|
+
type ResourceBindingRef,
|
|
5
|
+
requireEnumValue,
|
|
6
|
+
requireExactObject,
|
|
7
|
+
requireNonEmptyString,
|
|
8
|
+
requireResourceBindingRefs,
|
|
9
|
+
requireSha256,
|
|
10
|
+
} from './canonical-contract';
|
|
11
|
+
|
|
12
|
+
export enum ThreadReusePolicy {
|
|
13
|
+
ExplicitlyShareable = 'explicitly-shareable',
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface ThreadReuseKey {
|
|
17
|
+
readonly schemaVersion: 1;
|
|
18
|
+
readonly reusePolicy: ThreadReusePolicy.ExplicitlyShareable;
|
|
19
|
+
readonly organizationId: string;
|
|
20
|
+
readonly projectId: string;
|
|
21
|
+
readonly userId: string;
|
|
22
|
+
readonly runtimeTemplateHash: string;
|
|
23
|
+
readonly conversationRef: string;
|
|
24
|
+
readonly workspaceRef: string;
|
|
25
|
+
readonly domainRefs: readonly ResourceBindingRef[];
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const REQUIRED_KEYS = [
|
|
29
|
+
'schemaVersion',
|
|
30
|
+
'reusePolicy',
|
|
31
|
+
'organizationId',
|
|
32
|
+
'projectId',
|
|
33
|
+
'userId',
|
|
34
|
+
'runtimeTemplateHash',
|
|
35
|
+
'conversationRef',
|
|
36
|
+
'workspaceRef',
|
|
37
|
+
'domainRefs',
|
|
38
|
+
] as const;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Canonical identity for the deliberately narrower same-user conversation and
|
|
42
|
+
* filesystem reuse decision. A RuntimeTemplateKey match alone never permits
|
|
43
|
+
* Thread reuse.
|
|
44
|
+
*/
|
|
45
|
+
export function createThreadReuseKey(input: unknown): ThreadReuseKey {
|
|
46
|
+
const object = requireExactObject(input, 'ThreadReuseKey', REQUIRED_KEYS);
|
|
47
|
+
|
|
48
|
+
if (object.schemaVersion !== 1) {
|
|
49
|
+
throw new TypeError('ThreadReuseKey.schemaVersion must be 1.');
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return Object.freeze({
|
|
53
|
+
schemaVersion: 1,
|
|
54
|
+
reusePolicy: requireEnumValue(
|
|
55
|
+
object.reusePolicy,
|
|
56
|
+
'ThreadReuseKey.reusePolicy',
|
|
57
|
+
[ThreadReusePolicy.ExplicitlyShareable],
|
|
58
|
+
),
|
|
59
|
+
organizationId: requireNonEmptyString(
|
|
60
|
+
object.organizationId,
|
|
61
|
+
'ThreadReuseKey.organizationId',
|
|
62
|
+
),
|
|
63
|
+
projectId: requireNonEmptyString(
|
|
64
|
+
object.projectId,
|
|
65
|
+
'ThreadReuseKey.projectId',
|
|
66
|
+
),
|
|
67
|
+
userId: requireNonEmptyString(object.userId, 'ThreadReuseKey.userId'),
|
|
68
|
+
runtimeTemplateHash: requireSha256(
|
|
69
|
+
object.runtimeTemplateHash,
|
|
70
|
+
'ThreadReuseKey.runtimeTemplateHash',
|
|
71
|
+
),
|
|
72
|
+
conversationRef: requireNonEmptyString(
|
|
73
|
+
object.conversationRef,
|
|
74
|
+
'ThreadReuseKey.conversationRef',
|
|
75
|
+
),
|
|
76
|
+
workspaceRef: requireNonEmptyString(
|
|
77
|
+
object.workspaceRef,
|
|
78
|
+
'ThreadReuseKey.workspaceRef',
|
|
79
|
+
),
|
|
80
|
+
domainRefs: requireResourceBindingRefs(
|
|
81
|
+
object.domainRefs,
|
|
82
|
+
'ThreadReuseKey.domainRefs',
|
|
83
|
+
),
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export function serializeThreadReuseKey(input: ThreadReuseKey): string {
|
|
88
|
+
return canonicalContractJson(createThreadReuseKey(input));
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function hashThreadReuseKey(input: ThreadReuseKey): string {
|
|
92
|
+
return hashCanonicalContract(createThreadReuseKey(input));
|
|
93
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// ═══════════════════════════════════════════════════════════════════════════
|
|
2
2
|
// ── Skill-bundle-backed TemplateResolver ──
|
|
3
3
|
//
|
|
4
|
-
//
|
|
4
|
+
// Seed-file templates used to
|
|
5
5
|
// live in `workspace-manifests-api` (the `workspace_manifest_templates` table)
|
|
6
6
|
// and were fetched by name. They are now SKILL-BUNDLE RESOURCES served by
|
|
7
7
|
// `skill-registry-api` (`GET /skills/bundle`): a biome that ships templates
|
package/src/lib/types.ts
CHANGED
|
@@ -69,7 +69,7 @@ export interface ComposeWorkspaceImageRequest {
|
|
|
69
69
|
readonly templateResolver?: TemplateResolver;
|
|
70
70
|
/**
|
|
71
71
|
* Kernel-shipped System-scope skill slugs to PREPEND to the composer's
|
|
72
|
-
* mounted skill set. Per
|
|
72
|
+
* mounted skill set. Per the skill composition rules,
|
|
73
73
|
* skills owned by `SkillSpace.System` are auto-injected into every
|
|
74
74
|
* agent's mounted bundle — they ship from `@xemahq/system-skills`
|
|
75
75
|
* via the System-tier seeder in `skill-registry-api`. The caller
|