@lucern/pack-host 0.3.0-alpha.9 → 1.0.1
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/domain-pack/authoring.core.d.ts +161 -0
- package/dist/domain-pack/authoring.core.js +411 -0
- package/dist/domain-pack/authoring.core.js.map +1 -0
- package/dist/domain-pack/authoring.d.ts +12 -170
- package/dist/domain-pack/authoring.js +1155 -1098
- package/dist/domain-pack/authoring.js.map +1 -1
- package/dist/domain-pack/authoring.validation.d.ts +28 -0
- package/dist/domain-pack/authoring.validation.js +1944 -0
- package/dist/domain-pack/authoring.validation.js.map +1 -0
- package/dist/domain-pack/index.d.ts +2 -1
- package/dist/domain-pack/index.js +1979 -1917
- package/dist/domain-pack/index.js.map +1 -1
- package/dist/domain-pack/packs/engineering-accelerator-tail.d.ts +256 -0
- package/dist/domain-pack/packs/engineering-accelerator-tail.js +716 -0
- package/dist/domain-pack/packs/engineering-accelerator-tail.js.map +1 -0
- package/dist/domain-pack/packs/engineering-accelerator.js +790 -785
- package/dist/domain-pack/packs/engineering-accelerator.js.map +1 -1
- package/dist/domain-pack/packs/index.js +790 -785
- package/dist/domain-pack/packs/index.js.map +1 -1
- package/dist/domain-pack.d.ts +2 -1
- package/dist/domain-pack.js +1979 -1917
- package/dist/domain-pack.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +1843 -1661
- package/dist/index.js.map +1 -1
- package/dist/manifests/chat-v1.js +17 -6
- package/dist/manifests/chat-v1.js.map +1 -1
- package/dist/manifests/deals-v1.js +10 -7
- package/dist/manifests/deals-v1.js.map +1 -1
- package/dist/manifests/decisions-v1.js +11 -4
- package/dist/manifests/decisions-v1.js.map +1 -1
- package/dist/manifests/documents-v1.js +12 -12
- package/dist/manifests/documents-v1.js.map +1 -1
- package/dist/manifests/epistemic-algorithms-v1.js +11 -6
- package/dist/manifests/epistemic-algorithms-v1.js.map +1 -1
- package/dist/manifests/graph-visualization-v1.js +9 -5
- package/dist/manifests/graph-visualization-v1.js.map +1 -1
- package/dist/manifests/index.d.ts +1 -0
- package/dist/manifests/index.js +230 -110
- package/dist/manifests/index.js.map +1 -1
- package/dist/manifests/news-v1.js +12 -13
- package/dist/manifests/news-v1.js.map +1 -1
- package/dist/manifests/philosophy-mode-v1.js +10 -12
- package/dist/manifests/philosophy-mode-v1.js.map +1 -1
- package/dist/manifests/sprints-v1.d.ts +10 -0
- package/dist/manifests/sprints-v1.js +106 -0
- package/dist/manifests/sprints-v1.js.map +1 -0
- package/dist/manifests/task-management-v1.js +18 -6
- package/dist/manifests/task-management-v1.js.map +1 -1
- package/dist/manifests/team-analysis-v1.js +12 -9
- package/dist/manifests/team-analysis-v1.js.map +1 -1
- package/dist/manifests/themes-v1.js +12 -16
- package/dist/manifests/themes-v1.js.map +1 -1
- package/dist/manifests/user-profiles-v1.js +9 -13
- package/dist/manifests/user-profiles-v1.js.map +1 -1
- package/dist/manifests.d.ts +1 -0
- package/dist/manifests.js +230 -110
- package/dist/manifests.js.map +1 -1
- package/dist/proof-attestation.json +1 -1
- package/dist/registry.js +229 -109
- package/dist/registry.js.map +1 -1
- package/package.json +2 -1
|
@@ -60,1122 +60,1186 @@ function defineDomainPack(input) {
|
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
// src/domain-pack/
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
// src/domain-pack/authoring.core.ts
|
|
64
|
+
var DOMAIN_PACK_MANIFEST_KIND = "lucern-domain-pack-manifest";
|
|
65
|
+
var CURRENT_MANIFEST_VERSION = "1.0.0";
|
|
66
|
+
function isPlainObject(value) {
|
|
67
|
+
return typeof value === "object" && value !== null && !Array.isArray(value) && Object.getPrototypeOf(value) === Object.prototype;
|
|
66
68
|
}
|
|
67
|
-
|
|
68
|
-
var SEMVER = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;
|
|
69
|
-
var SHAPING_QUESTION_TYPES = /* @__PURE__ */ new Set([
|
|
70
|
-
"validation",
|
|
71
|
-
"falsification",
|
|
72
|
-
"assumption_probe",
|
|
73
|
-
"counterfactual",
|
|
74
|
-
"scope",
|
|
75
|
-
"comparison",
|
|
76
|
-
"mechanism",
|
|
77
|
-
"general"
|
|
78
|
-
]);
|
|
79
|
-
var RUNTIME_TARGETS = /* @__PURE__ */ new Set(["claude-code", "codex", "hybrid", "portable"]);
|
|
80
|
-
var ONTOLOGY_PROVISION_MODES = /* @__PURE__ */ new Set(["bind", "seed", "extend"]);
|
|
81
|
-
function validateStringArray(values, path, label) {
|
|
69
|
+
function dedupeStrings2(values) {
|
|
82
70
|
if (!values) {
|
|
83
|
-
return
|
|
71
|
+
return void 0;
|
|
84
72
|
}
|
|
85
|
-
return
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
issue(
|
|
89
|
-
"INVALID_SHAPING_CONDITION",
|
|
90
|
-
`${label} must not contain empty strings`,
|
|
91
|
-
`${path}[${index}]`
|
|
92
|
-
)
|
|
93
|
-
];
|
|
94
|
-
}
|
|
95
|
-
return [];
|
|
96
|
-
});
|
|
73
|
+
return Array.from(
|
|
74
|
+
new Set(values.map((value) => value.trim()).filter((value) => value.length))
|
|
75
|
+
);
|
|
97
76
|
}
|
|
98
|
-
function
|
|
99
|
-
|
|
100
|
-
for (const [index, value] of (values || []).entries()) {
|
|
101
|
-
if (!RUNTIME_TARGETS.has(value)) {
|
|
102
|
-
issues.push(
|
|
103
|
-
issue(
|
|
104
|
-
"INVALID_RUNTIME_TARGET",
|
|
105
|
-
`Unsupported runtime target "${value}"`,
|
|
106
|
-
`${path}[${index}]`
|
|
107
|
-
)
|
|
108
|
-
);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
return issues;
|
|
77
|
+
function normalizeRuntimeTargets2(values) {
|
|
78
|
+
return values ? dedupeStrings2(values) : void 0;
|
|
112
79
|
}
|
|
113
|
-
function
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
if (!prompt.promptId?.trim()) {
|
|
117
|
-
issues.push(
|
|
118
|
-
issue(
|
|
119
|
-
"MISSING_PROMPT_ID",
|
|
120
|
-
"prompt binding requires promptId",
|
|
121
|
-
`${path}.promptId`
|
|
122
|
-
)
|
|
123
|
-
);
|
|
80
|
+
function normalizeFrameworks(frameworks) {
|
|
81
|
+
if (!frameworks) {
|
|
82
|
+
return void 0;
|
|
124
83
|
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
)
|
|
84
|
+
return frameworks.map((framework) => ({
|
|
85
|
+
...framework,
|
|
86
|
+
frameworkId: framework.frameworkId.trim(),
|
|
87
|
+
version: framework.version.trim(),
|
|
88
|
+
versionConstraint: framework.versionConstraint?.trim(),
|
|
89
|
+
runtimeTargets: normalizeRuntimeTargets2(framework.runtimeTargets)
|
|
90
|
+
}));
|
|
91
|
+
}
|
|
92
|
+
function normalizeSchemaExtensions(extensions) {
|
|
93
|
+
if (!extensions) {
|
|
94
|
+
return void 0;
|
|
129
95
|
}
|
|
130
|
-
|
|
131
|
-
...
|
|
132
|
-
|
|
133
|
-
|
|
96
|
+
return extensions.map((extension) => ({
|
|
97
|
+
...extension,
|
|
98
|
+
extensionId: extension.extensionId.trim(),
|
|
99
|
+
target: extension.target,
|
|
100
|
+
description: extension.description.trim(),
|
|
101
|
+
version: extension.version.trim(),
|
|
102
|
+
extends: extension.extends?.trim()
|
|
103
|
+
}));
|
|
134
104
|
}
|
|
135
|
-
function
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
if (!tool.toolId?.trim()) {
|
|
139
|
-
issues.push(
|
|
140
|
-
issue("MISSING_TOOL_ID", "tool binding requires toolId", `${path}.toolId`)
|
|
141
|
-
);
|
|
105
|
+
function normalizeOntologyExtensions(extensions) {
|
|
106
|
+
if (!extensions) {
|
|
107
|
+
return void 0;
|
|
142
108
|
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
109
|
+
return extensions.map((extension) => ({
|
|
110
|
+
...extension,
|
|
111
|
+
extensionId: extension.extensionId.trim(),
|
|
112
|
+
ontologyId: extension.ontologyId.trim(),
|
|
113
|
+
baseVersionConstraint: extension.baseVersionConstraint.trim(),
|
|
114
|
+
entityTypes: extension.entityTypes?.map((entityType) => ({
|
|
115
|
+
...entityType,
|
|
116
|
+
value: entityType.value.trim(),
|
|
117
|
+
label: entityType.label.trim(),
|
|
118
|
+
description: entityType.description?.trim(),
|
|
119
|
+
subtypes: dedupeStrings2(entityType.subtypes)
|
|
120
|
+
})),
|
|
121
|
+
edgeTypes: extension.edgeTypes?.map((edgeType) => ({
|
|
122
|
+
...edgeType,
|
|
123
|
+
value: edgeType.value.trim(),
|
|
124
|
+
label: edgeType.label.trim(),
|
|
125
|
+
description: edgeType.description?.trim(),
|
|
126
|
+
sourceTypes: dedupeStrings2(edgeType.sourceTypes),
|
|
127
|
+
targetTypes: dedupeStrings2(edgeType.targetTypes)
|
|
128
|
+
}))
|
|
129
|
+
}));
|
|
130
|
+
}
|
|
131
|
+
function normalizeLineage(lineage) {
|
|
132
|
+
if (!lineage) {
|
|
133
|
+
return { mode: "root" };
|
|
151
134
|
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
135
|
+
return {
|
|
136
|
+
mode: lineage.mode,
|
|
137
|
+
parentPackId: lineage.parentPackId?.trim(),
|
|
138
|
+
parentVersion: lineage.parentVersion?.trim(),
|
|
139
|
+
parentManifestDigest: lineage.parentManifestDigest?.trim(),
|
|
140
|
+
supersedesPackId: lineage.supersedesPackId?.trim(),
|
|
141
|
+
notes: lineage.notes?.trim()
|
|
142
|
+
};
|
|
156
143
|
}
|
|
157
|
-
function
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
if (!asset.assetId?.trim()) {
|
|
161
|
-
issues.push(
|
|
162
|
-
issue(
|
|
163
|
-
"MISSING_SETUP_ASSET_ID",
|
|
164
|
-
"setup asset requires assetId",
|
|
165
|
-
`${path}.assetId`
|
|
166
|
-
)
|
|
167
|
-
);
|
|
144
|
+
function normalizeMetadata(metadata) {
|
|
145
|
+
if (!metadata) {
|
|
146
|
+
return void 0;
|
|
168
147
|
}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
148
|
+
return {
|
|
149
|
+
description: metadata.description?.trim(),
|
|
150
|
+
owner: metadata.owner?.trim(),
|
|
151
|
+
tags: dedupeStrings2(metadata.tags)
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
function toDomainPack(pack) {
|
|
155
|
+
return defineDomainPack(pack);
|
|
156
|
+
}
|
|
157
|
+
function defineDomainPackAuthoringManifest(input) {
|
|
158
|
+
return {
|
|
159
|
+
kind: input.kind ?? DOMAIN_PACK_MANIFEST_KIND,
|
|
160
|
+
manifestVersion: input.manifestVersion?.trim() || CURRENT_MANIFEST_VERSION,
|
|
161
|
+
pack: toDomainPack(input.pack),
|
|
162
|
+
frameworks: normalizeFrameworks(input.frameworks),
|
|
163
|
+
schemaExtensions: normalizeSchemaExtensions(input.schemaExtensions),
|
|
164
|
+
ontologyExtensions: normalizeOntologyExtensions(input.ontologyExtensions),
|
|
165
|
+
lineage: normalizeLineage(input.lineage),
|
|
166
|
+
metadata: normalizeMetadata(input.metadata)
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
function countManifestArtifacts(manifest) {
|
|
170
|
+
if (!manifest) {
|
|
171
|
+
return {
|
|
172
|
+
topicRoots: 0,
|
|
173
|
+
workflows: 0,
|
|
174
|
+
gates: 0,
|
|
175
|
+
artifacts: 0,
|
|
176
|
+
roles: 0,
|
|
177
|
+
prompts: 0,
|
|
178
|
+
tools: 0,
|
|
179
|
+
setupAssets: 0,
|
|
180
|
+
installProfiles: 0,
|
|
181
|
+
frameworks: 0,
|
|
182
|
+
schemaExtensions: 0,
|
|
183
|
+
ontologyExtensions: 0
|
|
184
|
+
};
|
|
177
185
|
}
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
186
|
+
return {
|
|
187
|
+
topicRoots: manifest.pack.topicRoots.length,
|
|
188
|
+
workflows: manifest.pack.workflows.length,
|
|
189
|
+
gates: manifest.pack.gates.length,
|
|
190
|
+
artifacts: manifest.pack.artifacts.length,
|
|
191
|
+
roles: manifest.pack.roles.length,
|
|
192
|
+
prompts: manifest.pack.operatingSystem?.prompts?.length ?? 0,
|
|
193
|
+
tools: manifest.pack.operatingSystem?.tools?.length ?? 0,
|
|
194
|
+
setupAssets: manifest.pack.operatingSystem?.setupAssets?.length ?? 0,
|
|
195
|
+
installProfiles: manifest.pack.operatingSystem?.installProfiles?.length ?? 0,
|
|
196
|
+
frameworks: manifest.frameworks?.length ?? 0,
|
|
197
|
+
schemaExtensions: manifest.schemaExtensions?.length ?? 0,
|
|
198
|
+
ontologyExtensions: manifest.ontologyExtensions?.length ?? 0
|
|
199
|
+
};
|
|
182
200
|
}
|
|
183
|
-
function
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
if (!template.templateId?.trim()) {
|
|
187
|
-
issues.push(
|
|
188
|
-
issue(
|
|
189
|
-
"MISSING_SHAPING_TEMPLATE_ID",
|
|
190
|
-
"question template requires templateId",
|
|
191
|
-
`${path}.templateId`
|
|
192
|
-
)
|
|
193
|
-
);
|
|
201
|
+
function sortJsonValue(value) {
|
|
202
|
+
if (Array.isArray(value)) {
|
|
203
|
+
return value.map(sortJsonValue);
|
|
194
204
|
}
|
|
195
|
-
if (
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
"MISSING_SHAPING_TEMPLATE",
|
|
199
|
-
"question template requires template text",
|
|
200
|
-
`${path}.template`
|
|
201
|
-
)
|
|
205
|
+
if (isPlainObject(value)) {
|
|
206
|
+
return Object.fromEntries(
|
|
207
|
+
Object.entries(value).filter(([, entryValue]) => entryValue !== void 0).sort(([left], [right]) => left.localeCompare(right)).map(([key, entryValue]) => [key, sortJsonValue(entryValue)])
|
|
202
208
|
);
|
|
203
209
|
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
`${path}.questionType`
|
|
210
|
-
)
|
|
211
|
-
);
|
|
210
|
+
return value;
|
|
211
|
+
}
|
|
212
|
+
function toYamlScalar(value) {
|
|
213
|
+
if (value === null) {
|
|
214
|
+
return "null";
|
|
212
215
|
}
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
template.whenObjectiveIncludes,
|
|
216
|
-
`${path}.whenObjectiveIncludes`,
|
|
217
|
-
"whenObjectiveIncludes"
|
|
218
|
-
)
|
|
219
|
-
);
|
|
220
|
-
return issues;
|
|
221
|
-
}
|
|
222
|
-
function validateTaskTemplate(template, index) {
|
|
223
|
-
const path = `inquiryShaping.taskTemplates[${index}]`;
|
|
224
|
-
const issues = [];
|
|
225
|
-
if (!template.templateId?.trim()) {
|
|
226
|
-
issues.push(
|
|
227
|
-
issue(
|
|
228
|
-
"MISSING_TASK_GENERATOR_ID",
|
|
229
|
-
"task template requires templateId",
|
|
230
|
-
`${path}.templateId`
|
|
231
|
-
)
|
|
232
|
-
);
|
|
216
|
+
if (typeof value === "boolean" || typeof value === "number") {
|
|
217
|
+
return String(value);
|
|
233
218
|
}
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
219
|
+
return JSON.stringify(String(value));
|
|
220
|
+
}
|
|
221
|
+
function renderYaml(value, indent = 0) {
|
|
222
|
+
const prefix = " ".repeat(indent);
|
|
223
|
+
if (Array.isArray(value)) {
|
|
224
|
+
if (value.length === 0) {
|
|
225
|
+
return [`${prefix}[]`];
|
|
226
|
+
}
|
|
227
|
+
return value.flatMap((entry) => {
|
|
228
|
+
if (Array.isArray(entry) || isPlainObject(entry)) {
|
|
229
|
+
return [`${prefix}-`, ...renderYaml(entry, indent + 2)];
|
|
230
|
+
}
|
|
231
|
+
return [`${prefix}- ${toYamlScalar(entry)}`];
|
|
232
|
+
});
|
|
242
233
|
}
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
`${
|
|
247
|
-
"whenObjectiveIncludes"
|
|
248
|
-
)
|
|
249
|
-
);
|
|
250
|
-
issues.push(
|
|
251
|
-
...validateStringArray(
|
|
252
|
-
template.whenQuestionTypes,
|
|
253
|
-
`${path}.whenQuestionTypes`,
|
|
254
|
-
"whenQuestionTypes"
|
|
255
|
-
)
|
|
256
|
-
);
|
|
257
|
-
for (const [questionTypeIndex, questionType] of (template.whenQuestionTypes || []).entries()) {
|
|
258
|
-
if (!SHAPING_QUESTION_TYPES.has(questionType)) {
|
|
259
|
-
issues.push(
|
|
260
|
-
issue(
|
|
261
|
-
"INVALID_TASK_GENERATOR_QUESTION_TYPE",
|
|
262
|
-
`Unsupported whenQuestionTypes value "${questionType}"`,
|
|
263
|
-
`${path}.whenQuestionTypes[${questionTypeIndex}]`
|
|
264
|
-
)
|
|
265
|
-
);
|
|
234
|
+
if (isPlainObject(value)) {
|
|
235
|
+
const entries = Object.entries(value);
|
|
236
|
+
if (entries.length === 0) {
|
|
237
|
+
return [`${prefix}{}`];
|
|
266
238
|
}
|
|
239
|
+
return entries.flatMap(([key, entryValue]) => {
|
|
240
|
+
if (entryValue === void 0) {
|
|
241
|
+
return [];
|
|
242
|
+
}
|
|
243
|
+
if (Array.isArray(entryValue)) {
|
|
244
|
+
if (entryValue.length === 0) {
|
|
245
|
+
return [`${prefix}${key}: []`];
|
|
246
|
+
}
|
|
247
|
+
return [`${prefix}${key}:`, ...renderYaml(entryValue, indent + 2)];
|
|
248
|
+
}
|
|
249
|
+
if (isPlainObject(entryValue)) {
|
|
250
|
+
if (Object.keys(entryValue).length === 0) {
|
|
251
|
+
return [`${prefix}${key}: {}`];
|
|
252
|
+
}
|
|
253
|
+
return [`${prefix}${key}:`, ...renderYaml(entryValue, indent + 2)];
|
|
254
|
+
}
|
|
255
|
+
return [`${prefix}${key}: ${toYamlScalar(entryValue)}`];
|
|
256
|
+
});
|
|
267
257
|
}
|
|
268
|
-
return
|
|
258
|
+
return [`${prefix}${toYamlScalar(value)}`];
|
|
269
259
|
}
|
|
270
|
-
function
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
"framework hint requires frameworkName",
|
|
278
|
-
`${path}.frameworkName`
|
|
279
|
-
)
|
|
280
|
-
);
|
|
260
|
+
function countIndent(line) {
|
|
261
|
+
return line.length - line.trimStart().length;
|
|
262
|
+
}
|
|
263
|
+
function parseYamlScalar(raw) {
|
|
264
|
+
const value = raw.trim();
|
|
265
|
+
if (value === "null") {
|
|
266
|
+
return null;
|
|
281
267
|
}
|
|
282
|
-
if (
|
|
283
|
-
|
|
284
|
-
issue(
|
|
285
|
-
"INVALID_FRAMEWORK_HOOK_BOOST",
|
|
286
|
-
"framework hint boost must be a non-negative number",
|
|
287
|
-
`${path}.boost`
|
|
288
|
-
)
|
|
289
|
-
);
|
|
268
|
+
if (value === "true") {
|
|
269
|
+
return true;
|
|
290
270
|
}
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
hint.whenObjectiveIncludes,
|
|
294
|
-
`${path}.whenObjectiveIncludes`,
|
|
295
|
-
"whenObjectiveIncludes"
|
|
296
|
-
)
|
|
297
|
-
);
|
|
298
|
-
issues.push(
|
|
299
|
-
...validateStringArray(
|
|
300
|
-
hint.whenQuestionTypes,
|
|
301
|
-
`${path}.whenQuestionTypes`,
|
|
302
|
-
"whenQuestionTypes"
|
|
303
|
-
)
|
|
304
|
-
);
|
|
305
|
-
for (const [questionTypeIndex, questionType] of (hint.whenQuestionTypes || []).entries()) {
|
|
306
|
-
if (!SHAPING_QUESTION_TYPES.has(questionType)) {
|
|
307
|
-
issues.push(
|
|
308
|
-
issue(
|
|
309
|
-
"INVALID_FRAMEWORK_HOOK_QUESTION_TYPE",
|
|
310
|
-
`Unsupported whenQuestionTypes value "${questionType}"`,
|
|
311
|
-
`${path}.whenQuestionTypes[${questionTypeIndex}]`
|
|
312
|
-
)
|
|
313
|
-
);
|
|
314
|
-
}
|
|
271
|
+
if (value === "false") {
|
|
272
|
+
return false;
|
|
315
273
|
}
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
function validateTopicTemplate(template, index, knownTopicSlugs) {
|
|
319
|
-
const path = `operatingSystem.topicTemplates[${index}]`;
|
|
320
|
-
const issues = [];
|
|
321
|
-
if (!template.slug?.trim()) {
|
|
322
|
-
issues.push(
|
|
323
|
-
issue(
|
|
324
|
-
"MISSING_TOPIC_TEMPLATE_SLUG",
|
|
325
|
-
"topic template requires slug",
|
|
326
|
-
`${path}.slug`
|
|
327
|
-
)
|
|
328
|
-
);
|
|
329
|
-
} else if (!KEBAB_CASE.test(template.slug)) {
|
|
330
|
-
issues.push(
|
|
331
|
-
issue(
|
|
332
|
-
"INVALID_TOPIC_TEMPLATE_SLUG",
|
|
333
|
-
`topic template slug "${template.slug}" must be kebab-case`,
|
|
334
|
-
`${path}.slug`
|
|
335
|
-
)
|
|
336
|
-
);
|
|
274
|
+
if (/^-?\d+(?:\.\d+)?$/.test(value)) {
|
|
275
|
+
return Number(value);
|
|
337
276
|
}
|
|
338
|
-
if (
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
`${path}.name`
|
|
344
|
-
)
|
|
345
|
-
);
|
|
277
|
+
if (value.startsWith('"') && value.endsWith('"') || value.startsWith("'") && value.endsWith("'")) {
|
|
278
|
+
if (value.startsWith("'")) {
|
|
279
|
+
return value.slice(1, -1).replace(/''/g, "'");
|
|
280
|
+
}
|
|
281
|
+
return JSON.parse(value);
|
|
346
282
|
}
|
|
347
|
-
if (
|
|
348
|
-
|
|
349
|
-
issue(
|
|
350
|
-
"MISSING_TOPIC_TEMPLATE_DESCRIPTION",
|
|
351
|
-
"topic template requires description",
|
|
352
|
-
`${path}.description`
|
|
353
|
-
)
|
|
354
|
-
);
|
|
283
|
+
if (value === "[]") {
|
|
284
|
+
return [];
|
|
355
285
|
}
|
|
356
|
-
if (
|
|
357
|
-
|
|
358
|
-
issue(
|
|
359
|
-
"UNKNOWN_TOPIC_PARENT",
|
|
360
|
-
`topic template references unknown parent "${template.parentSlug}"`,
|
|
361
|
-
`${path}.parentSlug`
|
|
362
|
-
)
|
|
363
|
-
);
|
|
286
|
+
if (value === "{}") {
|
|
287
|
+
return {};
|
|
364
288
|
}
|
|
365
|
-
return
|
|
289
|
+
return value;
|
|
366
290
|
}
|
|
367
|
-
function
|
|
368
|
-
const
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
issues.push(
|
|
372
|
-
issue(
|
|
373
|
-
"MISSING_INSTALL_PROFILE_ID",
|
|
374
|
-
"install profile requires profileId",
|
|
375
|
-
`${path}.profileId`
|
|
376
|
-
)
|
|
377
|
-
);
|
|
291
|
+
function splitYamlKeyValue(trimmed) {
|
|
292
|
+
const separatorIndex = trimmed.indexOf(":");
|
|
293
|
+
if (separatorIndex === -1) {
|
|
294
|
+
throw new Error(`Invalid YAML mapping entry: ${trimmed}`);
|
|
378
295
|
}
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
);
|
|
296
|
+
const key = trimmed.slice(0, separatorIndex).trim();
|
|
297
|
+
const value = trimmed.slice(separatorIndex + 1).trim();
|
|
298
|
+
return { key, value: value.length ? value : null };
|
|
299
|
+
}
|
|
300
|
+
function parseYamlDocument(text) {
|
|
301
|
+
const rawLines = text.replace(/\r\n/g, "\n").split("\n").map((line) => line.replace(/\t/g, " "));
|
|
302
|
+
const lines = rawLines.filter((line) => {
|
|
303
|
+
const trimmed = line.trim();
|
|
304
|
+
return trimmed.length > 0 && trimmed !== "---" && trimmed !== "...";
|
|
305
|
+
});
|
|
306
|
+
let index = 0;
|
|
307
|
+
function parseBlock(indent) {
|
|
308
|
+
if (index >= lines.length) {
|
|
309
|
+
return {};
|
|
310
|
+
}
|
|
311
|
+
const currentLine = lines[index];
|
|
312
|
+
const currentIndent = countIndent(currentLine);
|
|
313
|
+
if (currentIndent < indent) {
|
|
314
|
+
return {};
|
|
315
|
+
}
|
|
316
|
+
if (currentLine.trimStart().startsWith("-")) {
|
|
317
|
+
return parseArray(indent);
|
|
318
|
+
}
|
|
319
|
+
return parseObject(indent);
|
|
387
320
|
}
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
)
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
"UNKNOWN_PROMPT_REF",
|
|
411
|
-
`install profile references unknown prompt "${promptId}"`,
|
|
412
|
-
`${path}.promptIds[${promptIndex}]`
|
|
413
|
-
)
|
|
414
|
-
);
|
|
321
|
+
function parseArray(indent) {
|
|
322
|
+
const items = [];
|
|
323
|
+
while (index < lines.length) {
|
|
324
|
+
const line = lines[index];
|
|
325
|
+
const currentIndent = countIndent(line);
|
|
326
|
+
if (currentIndent < indent) {
|
|
327
|
+
break;
|
|
328
|
+
}
|
|
329
|
+
if (currentIndent !== indent) {
|
|
330
|
+
throw new Error(`Invalid YAML indentation near: ${line.trim()}`);
|
|
331
|
+
}
|
|
332
|
+
const trimmed = line.trimStart();
|
|
333
|
+
if (!trimmed.startsWith("-")) {
|
|
334
|
+
break;
|
|
335
|
+
}
|
|
336
|
+
const rest = trimmed.slice(1).trimStart();
|
|
337
|
+
index += 1;
|
|
338
|
+
if (!rest.length) {
|
|
339
|
+
items.push(parseBlock(indent + 2));
|
|
340
|
+
continue;
|
|
341
|
+
}
|
|
342
|
+
items.push(parseYamlScalar(rest));
|
|
415
343
|
}
|
|
344
|
+
return items;
|
|
416
345
|
}
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
)
|
|
346
|
+
function parseObject(indent) {
|
|
347
|
+
const objectValue = {};
|
|
348
|
+
while (index < lines.length) {
|
|
349
|
+
const line = lines[index];
|
|
350
|
+
const currentIndent = countIndent(line);
|
|
351
|
+
if (currentIndent < indent) {
|
|
352
|
+
break;
|
|
353
|
+
}
|
|
354
|
+
if (currentIndent !== indent) {
|
|
355
|
+
throw new Error(`Invalid YAML indentation near: ${line.trim()}`);
|
|
356
|
+
}
|
|
357
|
+
const trimmed = line.trim();
|
|
358
|
+
if (trimmed.startsWith("-")) {
|
|
359
|
+
break;
|
|
360
|
+
}
|
|
361
|
+
const { key, value } = splitYamlKeyValue(trimmed);
|
|
362
|
+
index += 1;
|
|
363
|
+
objectValue[key] = value === null ? parseBlock(indent + 2) : parseYamlScalar(value);
|
|
426
364
|
}
|
|
365
|
+
return objectValue;
|
|
427
366
|
}
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
367
|
+
return parseBlock(0);
|
|
368
|
+
}
|
|
369
|
+
function detectDomainPackManifestFormat(source, explicitFormat) {
|
|
370
|
+
if (explicitFormat) {
|
|
371
|
+
return explicitFormat;
|
|
372
|
+
}
|
|
373
|
+
const trimmed = source.trim();
|
|
374
|
+
if (trimmed.startsWith("{")) {
|
|
375
|
+
return "json";
|
|
376
|
+
}
|
|
377
|
+
return "yaml";
|
|
378
|
+
}
|
|
379
|
+
function serializeDomainPackAuthoringManifest(manifest, format = "json") {
|
|
380
|
+
const canonicalValue = sortJsonValue(manifest);
|
|
381
|
+
if (format === "json") {
|
|
382
|
+
return `${JSON.stringify(canonicalValue, null, 2)}
|
|
383
|
+
`;
|
|
384
|
+
}
|
|
385
|
+
return `${renderYaml(canonicalValue).join("\n")}
|
|
386
|
+
`;
|
|
387
|
+
}
|
|
388
|
+
function parseDomainPackAuthoringManifest(source, format) {
|
|
389
|
+
const detectedFormat = detectDomainPackManifestFormat(source, format);
|
|
390
|
+
const parsed = detectedFormat === "json" ? JSON.parse(source) : parseYamlDocument(source);
|
|
391
|
+
if (!isPlainObject(parsed)) {
|
|
392
|
+
throw new Error("Domain pack manifest must parse to an object.");
|
|
393
|
+
}
|
|
394
|
+
if (!("pack" in parsed)) {
|
|
395
|
+
throw new Error("Domain pack manifest requires a top-level pack object.");
|
|
396
|
+
}
|
|
397
|
+
return defineDomainPackAuthoringManifest({
|
|
398
|
+
kind: parsed.kind,
|
|
399
|
+
manifestVersion: parsed.manifestVersion,
|
|
400
|
+
pack: parsed.pack,
|
|
401
|
+
frameworks: parsed.frameworks,
|
|
402
|
+
schemaExtensions: parsed.schemaExtensions,
|
|
403
|
+
ontologyExtensions: parsed.ontologyExtensions,
|
|
404
|
+
lineage: parsed.lineage,
|
|
405
|
+
metadata: parsed.metadata
|
|
406
|
+
});
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
// src/domain-pack/validation.ts
|
|
410
|
+
function issue(code, message, path, severity = "error") {
|
|
411
|
+
return { code, severity, message, path };
|
|
412
|
+
}
|
|
413
|
+
var KEBAB_CASE = /^[a-z][a-z0-9]*(-[a-z0-9]+)*$/;
|
|
414
|
+
var SEMVER = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;
|
|
415
|
+
var SHAPING_QUESTION_TYPES = /* @__PURE__ */ new Set([
|
|
416
|
+
"validation",
|
|
417
|
+
"falsification",
|
|
418
|
+
"assumption_probe",
|
|
419
|
+
"counterfactual",
|
|
420
|
+
"scope",
|
|
421
|
+
"comparison",
|
|
422
|
+
"mechanism",
|
|
423
|
+
"general"
|
|
424
|
+
]);
|
|
425
|
+
var RUNTIME_TARGETS = /* @__PURE__ */ new Set(["claude-code", "codex", "hybrid", "portable"]);
|
|
426
|
+
var ONTOLOGY_PROVISION_MODES = /* @__PURE__ */ new Set(["bind", "seed", "extend"]);
|
|
427
|
+
function validateStringArray(values, path, label) {
|
|
428
|
+
if (!values) {
|
|
429
|
+
return [];
|
|
430
|
+
}
|
|
431
|
+
return values.flatMap((value, index) => {
|
|
432
|
+
if (!value?.trim()) {
|
|
433
|
+
return [
|
|
431
434
|
issue(
|
|
432
|
-
"
|
|
433
|
-
|
|
434
|
-
`${path}
|
|
435
|
+
"INVALID_SHAPING_CONDITION",
|
|
436
|
+
`${label} must not contain empty strings`,
|
|
437
|
+
`${path}[${index}]`
|
|
435
438
|
)
|
|
436
|
-
|
|
439
|
+
];
|
|
437
440
|
}
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
+
return [];
|
|
442
|
+
});
|
|
443
|
+
}
|
|
444
|
+
function validateRuntimeTargets(values, path) {
|
|
445
|
+
const issues = validateStringArray(values, path, "runtimeTargets");
|
|
446
|
+
for (const [index, value] of (values || []).entries()) {
|
|
447
|
+
if (!RUNTIME_TARGETS.has(value)) {
|
|
441
448
|
issues.push(
|
|
442
449
|
issue(
|
|
443
|
-
"
|
|
444
|
-
`
|
|
445
|
-
`${path}
|
|
450
|
+
"INVALID_RUNTIME_TARGET",
|
|
451
|
+
`Unsupported runtime target "${value}"`,
|
|
452
|
+
`${path}[${index}]`
|
|
446
453
|
)
|
|
447
454
|
);
|
|
448
455
|
}
|
|
449
456
|
}
|
|
450
457
|
return issues;
|
|
451
458
|
}
|
|
452
|
-
function
|
|
459
|
+
function validatePromptBinding(prompt, index) {
|
|
460
|
+
const path = `operatingSystem.prompts[${index}]`;
|
|
453
461
|
const issues = [];
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
462
|
+
if (!prompt.promptId?.trim()) {
|
|
463
|
+
issues.push(
|
|
464
|
+
issue(
|
|
465
|
+
"MISSING_PROMPT_ID",
|
|
466
|
+
"prompt binding requires promptId",
|
|
467
|
+
`${path}.promptId`
|
|
468
|
+
)
|
|
469
|
+
);
|
|
470
|
+
}
|
|
471
|
+
if (!prompt.ref?.trim()) {
|
|
472
|
+
issues.push(
|
|
473
|
+
issue("MISSING_PROMPT_REF", "prompt binding requires ref", `${path}.ref`)
|
|
474
|
+
);
|
|
467
475
|
}
|
|
476
|
+
issues.push(
|
|
477
|
+
...validateRuntimeTargets(prompt.runtimeTargets, `${path}.runtimeTargets`)
|
|
478
|
+
);
|
|
468
479
|
return issues;
|
|
469
480
|
}
|
|
470
|
-
function
|
|
481
|
+
function validateToolBinding(tool, index) {
|
|
482
|
+
const path = `operatingSystem.tools[${index}]`;
|
|
471
483
|
const issues = [];
|
|
472
|
-
if (!
|
|
473
|
-
issues.push(
|
|
474
|
-
|
|
484
|
+
if (!tool.toolId?.trim()) {
|
|
485
|
+
issues.push(
|
|
486
|
+
issue("MISSING_TOOL_ID", "tool binding requires toolId", `${path}.toolId`)
|
|
487
|
+
);
|
|
488
|
+
}
|
|
489
|
+
if (!tool.entrypoint?.trim()) {
|
|
475
490
|
issues.push(
|
|
476
491
|
issue(
|
|
477
|
-
"
|
|
478
|
-
|
|
479
|
-
|
|
492
|
+
"MISSING_TOOL_ENTRYPOINT",
|
|
493
|
+
"tool binding requires entrypoint",
|
|
494
|
+
`${path}.entrypoint`
|
|
480
495
|
)
|
|
481
496
|
);
|
|
482
497
|
}
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
498
|
+
issues.push(
|
|
499
|
+
...validateRuntimeTargets(tool.runtimeTargets, `${path}.runtimeTargets`)
|
|
500
|
+
);
|
|
501
|
+
return issues;
|
|
502
|
+
}
|
|
503
|
+
function validateSetupAsset(asset, index) {
|
|
504
|
+
const path = `operatingSystem.setupAssets[${index}]`;
|
|
505
|
+
const issues = [];
|
|
506
|
+
if (!asset.assetId?.trim()) {
|
|
489
507
|
issues.push(
|
|
490
508
|
issue(
|
|
491
|
-
"
|
|
492
|
-
|
|
493
|
-
|
|
509
|
+
"MISSING_SETUP_ASSET_ID",
|
|
510
|
+
"setup asset requires assetId",
|
|
511
|
+
`${path}.assetId`
|
|
494
512
|
)
|
|
495
513
|
);
|
|
496
514
|
}
|
|
497
|
-
if (!
|
|
515
|
+
if (!asset.path?.trim()) {
|
|
498
516
|
issues.push(
|
|
499
517
|
issue(
|
|
500
|
-
"
|
|
501
|
-
"
|
|
502
|
-
|
|
518
|
+
"MISSING_SETUP_ASSET_PATH",
|
|
519
|
+
"setup asset requires path",
|
|
520
|
+
`${path}.path`
|
|
503
521
|
)
|
|
504
522
|
);
|
|
505
|
-
} else {
|
|
506
|
-
for (const [i, binding] of pack.ontologyBindings.entries()) {
|
|
507
|
-
if (!binding.ontologyId?.trim()) {
|
|
508
|
-
issues.push(
|
|
509
|
-
issue(
|
|
510
|
-
"MISSING_ONTOLOGY_ID",
|
|
511
|
-
`ontologyBinding[${i}].ontologyId is required`,
|
|
512
|
-
`ontologyBindings[${i}].ontologyId`
|
|
513
|
-
)
|
|
514
|
-
);
|
|
515
|
-
}
|
|
516
|
-
if (!binding.versionConstraint?.trim()) {
|
|
517
|
-
issues.push(
|
|
518
|
-
issue(
|
|
519
|
-
"MISSING_VERSION_CONSTRAINT",
|
|
520
|
-
`ontologyBinding[${i}].versionConstraint is required`,
|
|
521
|
-
`ontologyBindings[${i}].versionConstraint`
|
|
522
|
-
)
|
|
523
|
-
);
|
|
524
|
-
}
|
|
525
|
-
if (binding.provisionMode && !ONTOLOGY_PROVISION_MODES.has(binding.provisionMode)) {
|
|
526
|
-
issues.push(
|
|
527
|
-
issue(
|
|
528
|
-
"INVALID_ONTOLOGY_PROVISION_MODE",
|
|
529
|
-
`Unsupported provisionMode "${binding.provisionMode}"`,
|
|
530
|
-
`ontologyBindings[${i}].provisionMode`
|
|
531
|
-
)
|
|
532
|
-
);
|
|
533
|
-
}
|
|
534
|
-
if (binding.provisionMode && binding.provisionMode !== "bind" && !binding.seedRef?.trim()) {
|
|
535
|
-
issues.push(
|
|
536
|
-
issue(
|
|
537
|
-
"MISSING_ONTOLOGY_SEED_REF",
|
|
538
|
-
`ontologyBinding[${i}] requires seedRef when provisionMode is "${binding.provisionMode}"`,
|
|
539
|
-
`ontologyBindings[${i}].seedRef`
|
|
540
|
-
)
|
|
541
|
-
);
|
|
542
|
-
}
|
|
543
|
-
issues.push(
|
|
544
|
-
...validateStringArray(
|
|
545
|
-
binding.requiredEntityTypes,
|
|
546
|
-
`ontologyBindings[${i}].requiredEntityTypes`,
|
|
547
|
-
"requiredEntityTypes"
|
|
548
|
-
),
|
|
549
|
-
...validateStringArray(
|
|
550
|
-
binding.requiredEdgeTypes,
|
|
551
|
-
`ontologyBindings[${i}].requiredEdgeTypes`,
|
|
552
|
-
"requiredEdgeTypes"
|
|
553
|
-
)
|
|
554
|
-
);
|
|
555
|
-
}
|
|
556
523
|
}
|
|
557
|
-
|
|
524
|
+
issues.push(
|
|
525
|
+
...validateRuntimeTargets(asset.runtimeTargets, `${path}.runtimeTargets`)
|
|
526
|
+
);
|
|
527
|
+
return issues;
|
|
528
|
+
}
|
|
529
|
+
function validateQuestionTemplate(template, index) {
|
|
530
|
+
const path = `inquiryShaping.questionTemplates[${index}]`;
|
|
531
|
+
const issues = [];
|
|
532
|
+
if (!template.templateId?.trim()) {
|
|
558
533
|
issues.push(
|
|
559
534
|
issue(
|
|
560
|
-
"
|
|
561
|
-
"
|
|
562
|
-
|
|
535
|
+
"MISSING_SHAPING_TEMPLATE_ID",
|
|
536
|
+
"question template requires templateId",
|
|
537
|
+
`${path}.templateId`
|
|
563
538
|
)
|
|
564
539
|
);
|
|
565
|
-
}
|
|
540
|
+
}
|
|
541
|
+
if (!template.template?.trim()) {
|
|
566
542
|
issues.push(
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
"
|
|
570
|
-
|
|
543
|
+
issue(
|
|
544
|
+
"MISSING_SHAPING_TEMPLATE",
|
|
545
|
+
"question template requires template text",
|
|
546
|
+
`${path}.template`
|
|
571
547
|
)
|
|
572
548
|
);
|
|
573
549
|
}
|
|
574
|
-
if (
|
|
575
|
-
const knownRootSlugs = new Set(
|
|
576
|
-
pack.topicRoots?.map((topic) => topic.slug) ?? []
|
|
577
|
-
);
|
|
578
|
-
if (pack.operatingSystem.prompts) {
|
|
579
|
-
issues.push(
|
|
580
|
-
...checkDuplicateIds(
|
|
581
|
-
pack.operatingSystem.prompts,
|
|
582
|
-
"promptId",
|
|
583
|
-
"operatingSystem.prompts"
|
|
584
|
-
)
|
|
585
|
-
);
|
|
586
|
-
pack.operatingSystem.prompts.forEach((prompt, index) => {
|
|
587
|
-
issues.push(...validatePromptBinding(prompt, index));
|
|
588
|
-
});
|
|
589
|
-
}
|
|
590
|
-
if (pack.operatingSystem.tools) {
|
|
591
|
-
issues.push(
|
|
592
|
-
...checkDuplicateIds(
|
|
593
|
-
pack.operatingSystem.tools,
|
|
594
|
-
"toolId",
|
|
595
|
-
"operatingSystem.tools"
|
|
596
|
-
)
|
|
597
|
-
);
|
|
598
|
-
pack.operatingSystem.tools.forEach((tool, index) => {
|
|
599
|
-
issues.push(...validateToolBinding(tool, index));
|
|
600
|
-
});
|
|
601
|
-
}
|
|
602
|
-
if (pack.operatingSystem.setupAssets) {
|
|
603
|
-
issues.push(
|
|
604
|
-
...checkDuplicateIds(
|
|
605
|
-
pack.operatingSystem.setupAssets,
|
|
606
|
-
"assetId",
|
|
607
|
-
"operatingSystem.setupAssets"
|
|
608
|
-
)
|
|
609
|
-
);
|
|
610
|
-
pack.operatingSystem.setupAssets.forEach((asset, index) => {
|
|
611
|
-
issues.push(...validateSetupAsset(asset, index));
|
|
612
|
-
});
|
|
613
|
-
}
|
|
614
|
-
const templateSlugs = /* @__PURE__ */ new Set();
|
|
615
|
-
if (pack.operatingSystem.topicTemplates) {
|
|
616
|
-
issues.push(
|
|
617
|
-
...checkDuplicateIds(
|
|
618
|
-
pack.operatingSystem.topicTemplates,
|
|
619
|
-
"slug",
|
|
620
|
-
"operatingSystem.topicTemplates"
|
|
621
|
-
)
|
|
622
|
-
);
|
|
623
|
-
pack.operatingSystem.topicTemplates.forEach((template) => {
|
|
624
|
-
if (template.slug) {
|
|
625
|
-
templateSlugs.add(template.slug);
|
|
626
|
-
}
|
|
627
|
-
});
|
|
628
|
-
const knownTopicSlugs = /* @__PURE__ */ new Set([...knownRootSlugs, ...templateSlugs]);
|
|
629
|
-
pack.operatingSystem.topicTemplates.forEach((template, index) => {
|
|
630
|
-
issues.push(...validateTopicTemplate(template, index, knownTopicSlugs));
|
|
631
|
-
});
|
|
632
|
-
}
|
|
633
|
-
if (pack.operatingSystem.installProfiles) {
|
|
634
|
-
issues.push(
|
|
635
|
-
...checkDuplicateIds(
|
|
636
|
-
pack.operatingSystem.installProfiles,
|
|
637
|
-
"profileId",
|
|
638
|
-
"operatingSystem.installProfiles"
|
|
639
|
-
)
|
|
640
|
-
);
|
|
641
|
-
const knownPromptIds = new Set(
|
|
642
|
-
pack.operatingSystem.prompts?.map((prompt) => prompt.promptId) ?? []
|
|
643
|
-
);
|
|
644
|
-
const knownToolIds = new Set(
|
|
645
|
-
pack.operatingSystem.tools?.map((tool) => tool.toolId) ?? []
|
|
646
|
-
);
|
|
647
|
-
const knownAssetIds = new Set(
|
|
648
|
-
pack.operatingSystem.setupAssets?.map((asset) => asset.assetId) ?? []
|
|
649
|
-
);
|
|
650
|
-
const knownTopicSlugs = /* @__PURE__ */ new Set([...knownRootSlugs, ...templateSlugs]);
|
|
651
|
-
pack.operatingSystem.installProfiles.forEach((profile, index) => {
|
|
652
|
-
issues.push(
|
|
653
|
-
...validateInstallProfile(
|
|
654
|
-
profile,
|
|
655
|
-
index,
|
|
656
|
-
knownPromptIds,
|
|
657
|
-
knownToolIds,
|
|
658
|
-
knownAssetIds,
|
|
659
|
-
knownTopicSlugs
|
|
660
|
-
)
|
|
661
|
-
);
|
|
662
|
-
});
|
|
663
|
-
}
|
|
664
|
-
}
|
|
665
|
-
if (!pack.roles || pack.roles.length === 0) {
|
|
666
|
-
issues.push(
|
|
667
|
-
issue("MISSING_ROLES", "At least one reasoning role is required", "roles")
|
|
668
|
-
);
|
|
669
|
-
} else {
|
|
550
|
+
if (!SHAPING_QUESTION_TYPES.has(template.questionType)) {
|
|
670
551
|
issues.push(
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
"
|
|
674
|
-
|
|
552
|
+
issue(
|
|
553
|
+
"INVALID_SHAPING_QUESTION_TYPE",
|
|
554
|
+
`Unsupported questionType "${template.questionType}"`,
|
|
555
|
+
`${path}.questionType`
|
|
675
556
|
)
|
|
676
557
|
);
|
|
677
558
|
}
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
559
|
+
issues.push(
|
|
560
|
+
...validateStringArray(
|
|
561
|
+
template.whenObjectiveIncludes,
|
|
562
|
+
`${path}.whenObjectiveIncludes`,
|
|
563
|
+
"whenObjectiveIncludes"
|
|
564
|
+
)
|
|
681
565
|
);
|
|
682
|
-
|
|
683
|
-
|
|
566
|
+
return issues;
|
|
567
|
+
}
|
|
568
|
+
function validateTaskTemplate(template, index) {
|
|
569
|
+
const path = `inquiryShaping.taskTemplates[${index}]`;
|
|
570
|
+
const issues = [];
|
|
571
|
+
if (!template.templateId?.trim()) {
|
|
684
572
|
issues.push(
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
"
|
|
688
|
-
|
|
573
|
+
issue(
|
|
574
|
+
"MISSING_TASK_GENERATOR_ID",
|
|
575
|
+
"task template requires templateId",
|
|
576
|
+
`${path}.templateId`
|
|
689
577
|
)
|
|
690
578
|
);
|
|
691
|
-
for (const [i, gate] of pack.gates.entries()) {
|
|
692
|
-
if (!gate.criteria || gate.criteria.length === 0) {
|
|
693
|
-
issues.push(
|
|
694
|
-
issue(
|
|
695
|
-
"EMPTY_GATE_CRITERIA",
|
|
696
|
-
`Gate "${gate.gateId}" has no criteria`,
|
|
697
|
-
`gates[${i}].criteria`,
|
|
698
|
-
"warning"
|
|
699
|
-
)
|
|
700
|
-
);
|
|
701
|
-
} else {
|
|
702
|
-
issues.push(
|
|
703
|
-
...checkDuplicateIds(
|
|
704
|
-
gate.criteria,
|
|
705
|
-
"criterionId",
|
|
706
|
-
`gates[${i}].criteria`
|
|
707
|
-
)
|
|
708
|
-
);
|
|
709
|
-
}
|
|
710
|
-
}
|
|
711
579
|
}
|
|
712
|
-
if (
|
|
580
|
+
if (!template.title?.trim()) {
|
|
713
581
|
issues.push(
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
"
|
|
717
|
-
|
|
582
|
+
issue(
|
|
583
|
+
"MISSING_TASK_GENERATOR_TITLE",
|
|
584
|
+
"task template requires title",
|
|
585
|
+
`${path}.title`
|
|
718
586
|
)
|
|
719
587
|
);
|
|
720
588
|
}
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
issue(
|
|
745
|
-
"UNKNOWN_ARTIFACT_REF",
|
|
746
|
-
`Workflow "${workflow.workflowId}" references unknown artifact "${artifactId}"`,
|
|
747
|
-
`workflows[${wi}].requiredArtifacts`
|
|
748
|
-
)
|
|
749
|
-
);
|
|
750
|
-
}
|
|
751
|
-
}
|
|
752
|
-
for (const [si, step] of workflow.steps.entries()) {
|
|
753
|
-
for (const roleId of step.requiredRoles) {
|
|
754
|
-
if (!knownRoleIds.has(roleId)) {
|
|
755
|
-
issues.push(
|
|
756
|
-
issue(
|
|
757
|
-
"UNKNOWN_ROLE_REF",
|
|
758
|
-
`Step "${step.stepId}" references unknown role "${roleId}"`,
|
|
759
|
-
`workflows[${wi}].steps[${si}].requiredRoles`
|
|
760
|
-
)
|
|
761
|
-
);
|
|
762
|
-
}
|
|
763
|
-
}
|
|
764
|
-
if (step.gateId && !knownGateIds.has(step.gateId)) {
|
|
765
|
-
issues.push(
|
|
766
|
-
issue(
|
|
767
|
-
"UNKNOWN_GATE_REF",
|
|
768
|
-
`Step "${step.stepId}" references unknown gate "${step.gateId}"`,
|
|
769
|
-
`workflows[${wi}].steps[${si}].gateId`
|
|
770
|
-
)
|
|
771
|
-
);
|
|
772
|
-
}
|
|
773
|
-
if (step.produces) {
|
|
774
|
-
for (const artifactId of step.produces) {
|
|
775
|
-
if (!knownArtifactIds.has(artifactId)) {
|
|
776
|
-
issues.push(
|
|
777
|
-
issue(
|
|
778
|
-
"UNKNOWN_ARTIFACT_REF",
|
|
779
|
-
`Step "${step.stepId}" references unknown artifact "${artifactId}"`,
|
|
780
|
-
`workflows[${wi}].steps[${si}].produces`
|
|
781
|
-
)
|
|
782
|
-
);
|
|
783
|
-
}
|
|
784
|
-
}
|
|
785
|
-
}
|
|
786
|
-
}
|
|
589
|
+
issues.push(
|
|
590
|
+
...validateStringArray(
|
|
591
|
+
template.whenObjectiveIncludes,
|
|
592
|
+
`${path}.whenObjectiveIncludes`,
|
|
593
|
+
"whenObjectiveIncludes"
|
|
594
|
+
)
|
|
595
|
+
);
|
|
596
|
+
issues.push(
|
|
597
|
+
...validateStringArray(
|
|
598
|
+
template.whenQuestionTypes,
|
|
599
|
+
`${path}.whenQuestionTypes`,
|
|
600
|
+
"whenQuestionTypes"
|
|
601
|
+
)
|
|
602
|
+
);
|
|
603
|
+
for (const [questionTypeIndex, questionType] of (template.whenQuestionTypes || []).entries()) {
|
|
604
|
+
if (!SHAPING_QUESTION_TYPES.has(questionType)) {
|
|
605
|
+
issues.push(
|
|
606
|
+
issue(
|
|
607
|
+
"INVALID_TASK_GENERATOR_QUESTION_TYPE",
|
|
608
|
+
`Unsupported whenQuestionTypes value "${questionType}"`,
|
|
609
|
+
`${path}.whenQuestionTypes[${questionTypeIndex}]`
|
|
610
|
+
)
|
|
611
|
+
);
|
|
787
612
|
}
|
|
788
613
|
}
|
|
789
|
-
|
|
790
|
-
|
|
614
|
+
return issues;
|
|
615
|
+
}
|
|
616
|
+
function validateFrameworkHint(hint, index) {
|
|
617
|
+
const path = `inquiryShaping.frameworkHints[${index}]`;
|
|
618
|
+
const issues = [];
|
|
619
|
+
if (!hint.frameworkName?.trim()) {
|
|
620
|
+
issues.push(
|
|
621
|
+
issue(
|
|
622
|
+
"MISSING_FRAMEWORK_HOOK_NAME",
|
|
623
|
+
"framework hint requires frameworkName",
|
|
624
|
+
`${path}.frameworkName`
|
|
625
|
+
)
|
|
626
|
+
);
|
|
627
|
+
}
|
|
628
|
+
if (hint.boost != null && (!Number.isFinite(hint.boost) || hint.boost < 0)) {
|
|
629
|
+
issues.push(
|
|
630
|
+
issue(
|
|
631
|
+
"INVALID_FRAMEWORK_HOOK_BOOST",
|
|
632
|
+
"framework hint boost must be a non-negative number",
|
|
633
|
+
`${path}.boost`
|
|
634
|
+
)
|
|
635
|
+
);
|
|
636
|
+
}
|
|
637
|
+
issues.push(
|
|
638
|
+
...validateStringArray(
|
|
639
|
+
hint.whenObjectiveIncludes,
|
|
640
|
+
`${path}.whenObjectiveIncludes`,
|
|
641
|
+
"whenObjectiveIncludes"
|
|
642
|
+
)
|
|
643
|
+
);
|
|
644
|
+
issues.push(
|
|
645
|
+
...validateStringArray(
|
|
646
|
+
hint.whenQuestionTypes,
|
|
647
|
+
`${path}.whenQuestionTypes`,
|
|
648
|
+
"whenQuestionTypes"
|
|
649
|
+
)
|
|
650
|
+
);
|
|
651
|
+
for (const [questionTypeIndex, questionType] of (hint.whenQuestionTypes || []).entries()) {
|
|
652
|
+
if (!SHAPING_QUESTION_TYPES.has(questionType)) {
|
|
791
653
|
issues.push(
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
"
|
|
795
|
-
|
|
654
|
+
issue(
|
|
655
|
+
"INVALID_FRAMEWORK_HOOK_QUESTION_TYPE",
|
|
656
|
+
`Unsupported whenQuestionTypes value "${questionType}"`,
|
|
657
|
+
`${path}.whenQuestionTypes[${questionTypeIndex}]`
|
|
796
658
|
)
|
|
797
659
|
);
|
|
798
|
-
pack.inquiryShaping.questionTemplates.forEach((template, index) => {
|
|
799
|
-
issues.push(...validateQuestionTemplate(template, index));
|
|
800
|
-
});
|
|
801
660
|
}
|
|
802
|
-
|
|
661
|
+
}
|
|
662
|
+
return issues;
|
|
663
|
+
}
|
|
664
|
+
function validateTopicTemplate(template, index, knownTopicSlugs) {
|
|
665
|
+
const path = `operatingSystem.topicTemplates[${index}]`;
|
|
666
|
+
const issues = [];
|
|
667
|
+
if (!template.slug?.trim()) {
|
|
668
|
+
issues.push(
|
|
669
|
+
issue(
|
|
670
|
+
"MISSING_TOPIC_TEMPLATE_SLUG",
|
|
671
|
+
"topic template requires slug",
|
|
672
|
+
`${path}.slug`
|
|
673
|
+
)
|
|
674
|
+
);
|
|
675
|
+
} else if (!KEBAB_CASE.test(template.slug)) {
|
|
676
|
+
issues.push(
|
|
677
|
+
issue(
|
|
678
|
+
"INVALID_TOPIC_TEMPLATE_SLUG",
|
|
679
|
+
`topic template slug "${template.slug}" must be kebab-case`,
|
|
680
|
+
`${path}.slug`
|
|
681
|
+
)
|
|
682
|
+
);
|
|
683
|
+
}
|
|
684
|
+
if (!template.name?.trim()) {
|
|
685
|
+
issues.push(
|
|
686
|
+
issue(
|
|
687
|
+
"MISSING_TOPIC_TEMPLATE_NAME",
|
|
688
|
+
"topic template requires name",
|
|
689
|
+
`${path}.name`
|
|
690
|
+
)
|
|
691
|
+
);
|
|
692
|
+
}
|
|
693
|
+
if (!template.description?.trim()) {
|
|
694
|
+
issues.push(
|
|
695
|
+
issue(
|
|
696
|
+
"MISSING_TOPIC_TEMPLATE_DESCRIPTION",
|
|
697
|
+
"topic template requires description",
|
|
698
|
+
`${path}.description`
|
|
699
|
+
)
|
|
700
|
+
);
|
|
701
|
+
}
|
|
702
|
+
if (template.parentSlug && !knownTopicSlugs.has(template.parentSlug)) {
|
|
703
|
+
issues.push(
|
|
704
|
+
issue(
|
|
705
|
+
"UNKNOWN_TOPIC_PARENT",
|
|
706
|
+
`topic template references unknown parent "${template.parentSlug}"`,
|
|
707
|
+
`${path}.parentSlug`
|
|
708
|
+
)
|
|
709
|
+
);
|
|
710
|
+
}
|
|
711
|
+
return issues;
|
|
712
|
+
}
|
|
713
|
+
function validateInstallProfile(profile, index, knownPromptIds, knownToolIds, knownAssetIds, knownTopicSlugs) {
|
|
714
|
+
const path = `operatingSystem.installProfiles[${index}]`;
|
|
715
|
+
const issues = [];
|
|
716
|
+
if (!profile.profileId?.trim()) {
|
|
717
|
+
issues.push(
|
|
718
|
+
issue(
|
|
719
|
+
"MISSING_INSTALL_PROFILE_ID",
|
|
720
|
+
"install profile requires profileId",
|
|
721
|
+
`${path}.profileId`
|
|
722
|
+
)
|
|
723
|
+
);
|
|
724
|
+
}
|
|
725
|
+
if (!profile.name?.trim()) {
|
|
726
|
+
issues.push(
|
|
727
|
+
issue(
|
|
728
|
+
"MISSING_INSTALL_PROFILE_NAME",
|
|
729
|
+
"install profile requires name",
|
|
730
|
+
`${path}.name`
|
|
731
|
+
)
|
|
732
|
+
);
|
|
733
|
+
}
|
|
734
|
+
if (!profile.description?.trim()) {
|
|
735
|
+
issues.push(
|
|
736
|
+
issue(
|
|
737
|
+
"MISSING_INSTALL_PROFILE_DESCRIPTION",
|
|
738
|
+
"install profile requires description",
|
|
739
|
+
`${path}.description`
|
|
740
|
+
)
|
|
741
|
+
);
|
|
742
|
+
}
|
|
743
|
+
if (!RUNTIME_TARGETS.has(profile.runtimeTarget)) {
|
|
744
|
+
issues.push(
|
|
745
|
+
issue(
|
|
746
|
+
"INVALID_RUNTIME_TARGET",
|
|
747
|
+
`Unsupported runtime target "${profile.runtimeTarget}"`,
|
|
748
|
+
`${path}.runtimeTarget`
|
|
749
|
+
)
|
|
750
|
+
);
|
|
751
|
+
}
|
|
752
|
+
for (const [promptIndex, promptId] of profile.promptIds.entries()) {
|
|
753
|
+
if (!knownPromptIds.has(promptId)) {
|
|
803
754
|
issues.push(
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
"
|
|
807
|
-
|
|
755
|
+
issue(
|
|
756
|
+
"UNKNOWN_PROMPT_REF",
|
|
757
|
+
`install profile references unknown prompt "${promptId}"`,
|
|
758
|
+
`${path}.promptIds[${promptIndex}]`
|
|
808
759
|
)
|
|
809
760
|
);
|
|
810
|
-
pack.inquiryShaping.taskTemplates.forEach((template, index) => {
|
|
811
|
-
issues.push(...validateTaskTemplate(template, index));
|
|
812
|
-
});
|
|
813
761
|
}
|
|
814
|
-
|
|
762
|
+
}
|
|
763
|
+
for (const [toolIndex, toolId] of profile.toolIds.entries()) {
|
|
764
|
+
if (!knownToolIds.has(toolId)) {
|
|
815
765
|
issues.push(
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
}
|
|
820
|
-
"frameworkName",
|
|
821
|
-
"inquiryShaping.frameworkHints"
|
|
766
|
+
issue(
|
|
767
|
+
"UNKNOWN_TOOL_REF",
|
|
768
|
+
`install profile references unknown tool "${toolId}"`,
|
|
769
|
+
`${path}.toolIds[${toolIndex}]`
|
|
822
770
|
)
|
|
823
771
|
);
|
|
824
|
-
pack.inquiryShaping.frameworkHints.forEach((hint, index) => {
|
|
825
|
-
issues.push(...validateFrameworkHint(hint, index));
|
|
826
|
-
});
|
|
827
772
|
}
|
|
828
773
|
}
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
var SEMVER2 = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;
|
|
840
|
-
var LEGACY_PUBLIC_KEYS = /* @__PURE__ */ new Set([
|
|
841
|
-
"project",
|
|
842
|
-
"projects",
|
|
843
|
-
"projectId",
|
|
844
|
-
"projectIds"
|
|
845
|
-
]);
|
|
846
|
-
var SCHEMA_EXTENSION_TARGETS = /* @__PURE__ */ new Set([
|
|
847
|
-
"artifact",
|
|
848
|
-
"workflow",
|
|
849
|
-
"gate",
|
|
850
|
-
"prompt",
|
|
851
|
-
"tool",
|
|
852
|
-
"install-profile",
|
|
853
|
-
"topic-template"
|
|
854
|
-
]);
|
|
855
|
-
var ONTOLOGY_CONSTRAINT_SEVERITIES = /* @__PURE__ */ new Set([
|
|
856
|
-
"error",
|
|
857
|
-
"warning",
|
|
858
|
-
"informational"
|
|
859
|
-
]);
|
|
860
|
-
var LINEAGE_MODES = /* @__PURE__ */ new Set(["root", "remix", "fork"]);
|
|
861
|
-
var AUTHORING_TOOL_NAMES = {
|
|
862
|
-
validate: "validate_domain_pack_manifest",
|
|
863
|
-
preview: "preview_domain_pack_manifest",
|
|
864
|
-
publish: "publish_domain_pack_manifest"
|
|
865
|
-
};
|
|
866
|
-
function issue2(code, message, path, source, severity = "error") {
|
|
867
|
-
return { code, message, path, severity, source };
|
|
868
|
-
}
|
|
869
|
-
function emptyCounts() {
|
|
870
|
-
return {
|
|
871
|
-
topicRoots: 0,
|
|
872
|
-
workflows: 0,
|
|
873
|
-
gates: 0,
|
|
874
|
-
artifacts: 0,
|
|
875
|
-
roles: 0,
|
|
876
|
-
prompts: 0,
|
|
877
|
-
tools: 0,
|
|
878
|
-
setupAssets: 0,
|
|
879
|
-
installProfiles: 0,
|
|
880
|
-
frameworks: 0,
|
|
881
|
-
schemaExtensions: 0,
|
|
882
|
-
ontologyExtensions: 0
|
|
883
|
-
};
|
|
884
|
-
}
|
|
885
|
-
function isPlainObject(value) {
|
|
886
|
-
return typeof value === "object" && value !== null && !Array.isArray(value) && Object.getPrototypeOf(value) === Object.prototype;
|
|
887
|
-
}
|
|
888
|
-
function describeParseFailure(error) {
|
|
889
|
-
return error instanceof Error ? error.message : "Manifest parse failed.";
|
|
890
|
-
}
|
|
891
|
-
function dedupeStrings2(values) {
|
|
892
|
-
if (!values) {
|
|
893
|
-
return void 0;
|
|
894
|
-
}
|
|
895
|
-
return Array.from(
|
|
896
|
-
new Set(values.map((value) => value.trim()).filter((value) => value.length))
|
|
897
|
-
);
|
|
898
|
-
}
|
|
899
|
-
function normalizeRuntimeTargets2(values) {
|
|
900
|
-
return values ? dedupeStrings2(values) : void 0;
|
|
901
|
-
}
|
|
902
|
-
function normalizeFrameworks(frameworks) {
|
|
903
|
-
if (!frameworks) {
|
|
904
|
-
return void 0;
|
|
905
|
-
}
|
|
906
|
-
return frameworks.map((framework) => ({
|
|
907
|
-
...framework,
|
|
908
|
-
frameworkId: framework.frameworkId.trim(),
|
|
909
|
-
version: framework.version.trim(),
|
|
910
|
-
versionConstraint: framework.versionConstraint?.trim(),
|
|
911
|
-
runtimeTargets: normalizeRuntimeTargets2(framework.runtimeTargets)
|
|
912
|
-
}));
|
|
913
|
-
}
|
|
914
|
-
function normalizeSchemaExtensions(extensions) {
|
|
915
|
-
if (!extensions) {
|
|
916
|
-
return void 0;
|
|
917
|
-
}
|
|
918
|
-
return extensions.map((extension) => ({
|
|
919
|
-
...extension,
|
|
920
|
-
extensionId: extension.extensionId.trim(),
|
|
921
|
-
target: extension.target,
|
|
922
|
-
description: extension.description.trim(),
|
|
923
|
-
version: extension.version.trim(),
|
|
924
|
-
extends: extension.extends?.trim()
|
|
925
|
-
}));
|
|
926
|
-
}
|
|
927
|
-
function normalizeOntologyExtensions(extensions) {
|
|
928
|
-
if (!extensions) {
|
|
929
|
-
return void 0;
|
|
930
|
-
}
|
|
931
|
-
return extensions.map((extension) => ({
|
|
932
|
-
...extension,
|
|
933
|
-
extensionId: extension.extensionId.trim(),
|
|
934
|
-
ontologyId: extension.ontologyId.trim(),
|
|
935
|
-
baseVersionConstraint: extension.baseVersionConstraint.trim(),
|
|
936
|
-
entityTypes: extension.entityTypes?.map((entityType) => ({
|
|
937
|
-
...entityType,
|
|
938
|
-
value: entityType.value.trim(),
|
|
939
|
-
label: entityType.label.trim(),
|
|
940
|
-
description: entityType.description?.trim(),
|
|
941
|
-
subtypes: dedupeStrings2(entityType.subtypes)
|
|
942
|
-
})),
|
|
943
|
-
edgeTypes: extension.edgeTypes?.map((edgeType) => ({
|
|
944
|
-
...edgeType,
|
|
945
|
-
value: edgeType.value.trim(),
|
|
946
|
-
label: edgeType.label.trim(),
|
|
947
|
-
description: edgeType.description?.trim(),
|
|
948
|
-
sourceTypes: dedupeStrings2(edgeType.sourceTypes),
|
|
949
|
-
targetTypes: dedupeStrings2(edgeType.targetTypes)
|
|
950
|
-
}))
|
|
951
|
-
}));
|
|
952
|
-
}
|
|
953
|
-
function normalizeLineage(lineage) {
|
|
954
|
-
if (!lineage) {
|
|
955
|
-
return { mode: "root" };
|
|
774
|
+
for (const [assetIndex, assetId] of profile.assetIds.entries()) {
|
|
775
|
+
if (!knownAssetIds.has(assetId)) {
|
|
776
|
+
issues.push(
|
|
777
|
+
issue(
|
|
778
|
+
"UNKNOWN_SETUP_ASSET_REF",
|
|
779
|
+
`install profile references unknown setup asset "${assetId}"`,
|
|
780
|
+
`${path}.assetIds[${assetIndex}]`
|
|
781
|
+
)
|
|
782
|
+
);
|
|
783
|
+
}
|
|
956
784
|
}
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
if (!metadata) {
|
|
968
|
-
return void 0;
|
|
785
|
+
for (const [topicIndex, topicSlug] of profile.defaultTopicSlugs.entries()) {
|
|
786
|
+
if (!knownTopicSlugs.has(topicSlug)) {
|
|
787
|
+
issues.push(
|
|
788
|
+
issue(
|
|
789
|
+
"UNKNOWN_TOPIC_REF",
|
|
790
|
+
`install profile references unknown topic "${topicSlug}"`,
|
|
791
|
+
`${path}.defaultTopicSlugs[${topicIndex}]`
|
|
792
|
+
)
|
|
793
|
+
);
|
|
794
|
+
}
|
|
969
795
|
}
|
|
970
|
-
return
|
|
971
|
-
description: metadata.description?.trim(),
|
|
972
|
-
owner: metadata.owner?.trim(),
|
|
973
|
-
tags: dedupeStrings2(metadata.tags)
|
|
974
|
-
};
|
|
975
|
-
}
|
|
976
|
-
function toDomainPack(pack) {
|
|
977
|
-
return defineDomainPack(pack);
|
|
978
|
-
}
|
|
979
|
-
function defineDomainPackAuthoringManifest(input) {
|
|
980
|
-
return {
|
|
981
|
-
kind: input.kind ?? DOMAIN_PACK_MANIFEST_KIND,
|
|
982
|
-
manifestVersion: input.manifestVersion?.trim() || CURRENT_MANIFEST_VERSION,
|
|
983
|
-
pack: toDomainPack(input.pack),
|
|
984
|
-
frameworks: normalizeFrameworks(input.frameworks),
|
|
985
|
-
schemaExtensions: normalizeSchemaExtensions(input.schemaExtensions),
|
|
986
|
-
ontologyExtensions: normalizeOntologyExtensions(input.ontologyExtensions),
|
|
987
|
-
lineage: normalizeLineage(input.lineage),
|
|
988
|
-
metadata: normalizeMetadata(input.metadata)
|
|
989
|
-
};
|
|
796
|
+
return issues;
|
|
990
797
|
}
|
|
991
|
-
function
|
|
992
|
-
|
|
993
|
-
|
|
798
|
+
function checkDuplicateIds(items, idField, path) {
|
|
799
|
+
const issues = [];
|
|
800
|
+
const seen = /* @__PURE__ */ new Set();
|
|
801
|
+
for (const item of items) {
|
|
802
|
+
const id = item[idField];
|
|
803
|
+
if (seen.has(id)) {
|
|
804
|
+
issues.push(
|
|
805
|
+
issue(
|
|
806
|
+
"DUPLICATE_ID",
|
|
807
|
+
`Duplicate ${idField} "${id}"`,
|
|
808
|
+
`${path}.${idField}`
|
|
809
|
+
)
|
|
810
|
+
);
|
|
811
|
+
}
|
|
812
|
+
seen.add(id);
|
|
994
813
|
}
|
|
995
|
-
return
|
|
996
|
-
topicRoots: manifest.pack.topicRoots.length,
|
|
997
|
-
workflows: manifest.pack.workflows.length,
|
|
998
|
-
gates: manifest.pack.gates.length,
|
|
999
|
-
artifacts: manifest.pack.artifacts.length,
|
|
1000
|
-
roles: manifest.pack.roles.length,
|
|
1001
|
-
prompts: manifest.pack.operatingSystem?.prompts?.length ?? 0,
|
|
1002
|
-
tools: manifest.pack.operatingSystem?.tools?.length ?? 0,
|
|
1003
|
-
setupAssets: manifest.pack.operatingSystem?.setupAssets?.length ?? 0,
|
|
1004
|
-
installProfiles: manifest.pack.operatingSystem?.installProfiles?.length ?? 0,
|
|
1005
|
-
frameworks: manifest.frameworks?.length ?? 0,
|
|
1006
|
-
schemaExtensions: manifest.schemaExtensions?.length ?? 0,
|
|
1007
|
-
ontologyExtensions: manifest.ontologyExtensions?.length ?? 0
|
|
1008
|
-
};
|
|
814
|
+
return issues;
|
|
1009
815
|
}
|
|
1010
|
-
function
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
if (
|
|
1015
|
-
|
|
1016
|
-
|
|
816
|
+
function validateDomainPack(pack) {
|
|
817
|
+
const issues = [];
|
|
818
|
+
if (!pack.packId || !pack.packId.trim()) {
|
|
819
|
+
issues.push(issue("MISSING_PACK_ID", "packId is required", "packId"));
|
|
820
|
+
} else if (!KEBAB_CASE.test(pack.packId)) {
|
|
821
|
+
issues.push(
|
|
822
|
+
issue(
|
|
823
|
+
"INVALID_PACK_ID",
|
|
824
|
+
`packId "${pack.packId}" must be kebab-case`,
|
|
825
|
+
"packId"
|
|
826
|
+
)
|
|
1017
827
|
);
|
|
1018
828
|
}
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
function toYamlScalar(value) {
|
|
1022
|
-
if (value === null) {
|
|
1023
|
-
return "null";
|
|
829
|
+
if (!pack.name || !pack.name.trim()) {
|
|
830
|
+
issues.push(issue("MISSING_NAME", "name is required", "name"));
|
|
1024
831
|
}
|
|
1025
|
-
if (
|
|
1026
|
-
|
|
832
|
+
if (!pack.version || !pack.version.trim()) {
|
|
833
|
+
issues.push(issue("MISSING_VERSION", "version is required", "version"));
|
|
834
|
+
} else if (!SEMVER.test(pack.version)) {
|
|
835
|
+
issues.push(
|
|
836
|
+
issue(
|
|
837
|
+
"INVALID_VERSION",
|
|
838
|
+
`version "${pack.version}" must be valid semver`,
|
|
839
|
+
"version"
|
|
840
|
+
)
|
|
841
|
+
);
|
|
1027
842
|
}
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
843
|
+
if (!pack.ontologyBindings || pack.ontologyBindings.length === 0) {
|
|
844
|
+
issues.push(
|
|
845
|
+
issue(
|
|
846
|
+
"MISSING_ONTOLOGY_BINDINGS",
|
|
847
|
+
"At least one ontologyBinding is required",
|
|
848
|
+
"ontologyBindings"
|
|
849
|
+
)
|
|
850
|
+
);
|
|
851
|
+
} else {
|
|
852
|
+
for (const [i, binding] of pack.ontologyBindings.entries()) {
|
|
853
|
+
if (!binding.ontologyId?.trim()) {
|
|
854
|
+
issues.push(
|
|
855
|
+
issue(
|
|
856
|
+
"MISSING_ONTOLOGY_ID",
|
|
857
|
+
`ontologyBinding[${i}].ontologyId is required`,
|
|
858
|
+
`ontologyBindings[${i}].ontologyId`
|
|
859
|
+
)
|
|
860
|
+
);
|
|
1039
861
|
}
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
return entries.flatMap(([key, entryValue]) => {
|
|
1049
|
-
if (entryValue === void 0) {
|
|
1050
|
-
return [];
|
|
862
|
+
if (!binding.versionConstraint?.trim()) {
|
|
863
|
+
issues.push(
|
|
864
|
+
issue(
|
|
865
|
+
"MISSING_VERSION_CONSTRAINT",
|
|
866
|
+
`ontologyBinding[${i}].versionConstraint is required`,
|
|
867
|
+
`ontologyBindings[${i}].versionConstraint`
|
|
868
|
+
)
|
|
869
|
+
);
|
|
1051
870
|
}
|
|
1052
|
-
if (
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
871
|
+
if (binding.provisionMode && !ONTOLOGY_PROVISION_MODES.has(binding.provisionMode)) {
|
|
872
|
+
issues.push(
|
|
873
|
+
issue(
|
|
874
|
+
"INVALID_ONTOLOGY_PROVISION_MODE",
|
|
875
|
+
`Unsupported provisionMode "${binding.provisionMode}"`,
|
|
876
|
+
`ontologyBindings[${i}].provisionMode`
|
|
877
|
+
)
|
|
878
|
+
);
|
|
1057
879
|
}
|
|
1058
|
-
if (
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
880
|
+
if (binding.provisionMode && binding.provisionMode !== "bind" && !binding.seedRef?.trim()) {
|
|
881
|
+
issues.push(
|
|
882
|
+
issue(
|
|
883
|
+
"MISSING_ONTOLOGY_SEED_REF",
|
|
884
|
+
`ontologyBinding[${i}] requires seedRef when provisionMode is "${binding.provisionMode}"`,
|
|
885
|
+
`ontologyBindings[${i}].seedRef`
|
|
886
|
+
)
|
|
887
|
+
);
|
|
1063
888
|
}
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
}
|
|
1077
|
-
if (value === "true") {
|
|
1078
|
-
return true;
|
|
1079
|
-
}
|
|
1080
|
-
if (value === "false") {
|
|
1081
|
-
return false;
|
|
1082
|
-
}
|
|
1083
|
-
if (/^-?\d+(?:\.\d+)?$/.test(value)) {
|
|
1084
|
-
return Number(value);
|
|
1085
|
-
}
|
|
1086
|
-
if (value.startsWith('"') && value.endsWith('"') || value.startsWith("'") && value.endsWith("'")) {
|
|
1087
|
-
if (value.startsWith("'")) {
|
|
1088
|
-
return value.slice(1, -1).replace(/''/g, "'");
|
|
889
|
+
issues.push(
|
|
890
|
+
...validateStringArray(
|
|
891
|
+
binding.requiredEntityTypes,
|
|
892
|
+
`ontologyBindings[${i}].requiredEntityTypes`,
|
|
893
|
+
"requiredEntityTypes"
|
|
894
|
+
),
|
|
895
|
+
...validateStringArray(
|
|
896
|
+
binding.requiredEdgeTypes,
|
|
897
|
+
`ontologyBindings[${i}].requiredEdgeTypes`,
|
|
898
|
+
"requiredEdgeTypes"
|
|
899
|
+
)
|
|
900
|
+
);
|
|
1089
901
|
}
|
|
1090
|
-
return JSON.parse(value);
|
|
1091
|
-
}
|
|
1092
|
-
if (value === "[]") {
|
|
1093
|
-
return [];
|
|
1094
902
|
}
|
|
1095
|
-
if (
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
903
|
+
if (!pack.topicRoots || pack.topicRoots.length === 0) {
|
|
904
|
+
issues.push(
|
|
905
|
+
issue(
|
|
906
|
+
"MISSING_TOPIC_ROOTS",
|
|
907
|
+
"At least one topicRoot is required",
|
|
908
|
+
"topicRoots"
|
|
909
|
+
)
|
|
910
|
+
);
|
|
911
|
+
} else {
|
|
912
|
+
issues.push(
|
|
913
|
+
...checkDuplicateIds(
|
|
914
|
+
pack.topicRoots,
|
|
915
|
+
"slug",
|
|
916
|
+
"topicRoots"
|
|
917
|
+
)
|
|
918
|
+
);
|
|
1104
919
|
}
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
920
|
+
if (pack.operatingSystem) {
|
|
921
|
+
const knownRootSlugs = new Set(
|
|
922
|
+
pack.topicRoots?.map((topic) => topic.slug) ?? []
|
|
923
|
+
);
|
|
924
|
+
if (pack.operatingSystem.prompts) {
|
|
925
|
+
issues.push(
|
|
926
|
+
...checkDuplicateIds(
|
|
927
|
+
pack.operatingSystem.prompts,
|
|
928
|
+
"promptId",
|
|
929
|
+
"operatingSystem.prompts"
|
|
930
|
+
)
|
|
931
|
+
);
|
|
932
|
+
pack.operatingSystem.prompts.forEach((prompt, index) => {
|
|
933
|
+
issues.push(...validatePromptBinding(prompt, index));
|
|
934
|
+
});
|
|
1119
935
|
}
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
936
|
+
if (pack.operatingSystem.tools) {
|
|
937
|
+
issues.push(
|
|
938
|
+
...checkDuplicateIds(
|
|
939
|
+
pack.operatingSystem.tools,
|
|
940
|
+
"toolId",
|
|
941
|
+
"operatingSystem.tools"
|
|
942
|
+
)
|
|
943
|
+
);
|
|
944
|
+
pack.operatingSystem.tools.forEach((tool, index) => {
|
|
945
|
+
issues.push(...validateToolBinding(tool, index));
|
|
946
|
+
});
|
|
1124
947
|
}
|
|
1125
|
-
if (
|
|
1126
|
-
|
|
948
|
+
if (pack.operatingSystem.setupAssets) {
|
|
949
|
+
issues.push(
|
|
950
|
+
...checkDuplicateIds(
|
|
951
|
+
pack.operatingSystem.setupAssets,
|
|
952
|
+
"assetId",
|
|
953
|
+
"operatingSystem.setupAssets"
|
|
954
|
+
)
|
|
955
|
+
);
|
|
956
|
+
pack.operatingSystem.setupAssets.forEach((asset, index) => {
|
|
957
|
+
issues.push(...validateSetupAsset(asset, index));
|
|
958
|
+
});
|
|
959
|
+
}
|
|
960
|
+
const templateSlugs = /* @__PURE__ */ new Set();
|
|
961
|
+
if (pack.operatingSystem.topicTemplates) {
|
|
962
|
+
issues.push(
|
|
963
|
+
...checkDuplicateIds(
|
|
964
|
+
pack.operatingSystem.topicTemplates,
|
|
965
|
+
"slug",
|
|
966
|
+
"operatingSystem.topicTemplates"
|
|
967
|
+
)
|
|
968
|
+
);
|
|
969
|
+
pack.operatingSystem.topicTemplates.forEach((template) => {
|
|
970
|
+
if (template.slug) {
|
|
971
|
+
templateSlugs.add(template.slug);
|
|
972
|
+
}
|
|
973
|
+
});
|
|
974
|
+
const knownTopicSlugs = /* @__PURE__ */ new Set([...knownRootSlugs, ...templateSlugs]);
|
|
975
|
+
pack.operatingSystem.topicTemplates.forEach((template, index) => {
|
|
976
|
+
issues.push(...validateTopicTemplate(template, index, knownTopicSlugs));
|
|
977
|
+
});
|
|
978
|
+
}
|
|
979
|
+
if (pack.operatingSystem.installProfiles) {
|
|
980
|
+
issues.push(
|
|
981
|
+
...checkDuplicateIds(
|
|
982
|
+
pack.operatingSystem.installProfiles,
|
|
983
|
+
"profileId",
|
|
984
|
+
"operatingSystem.installProfiles"
|
|
985
|
+
)
|
|
986
|
+
);
|
|
987
|
+
const knownPromptIds = new Set(
|
|
988
|
+
pack.operatingSystem.prompts?.map((prompt) => prompt.promptId) ?? []
|
|
989
|
+
);
|
|
990
|
+
const knownToolIds = new Set(
|
|
991
|
+
pack.operatingSystem.tools?.map((tool) => tool.toolId) ?? []
|
|
992
|
+
);
|
|
993
|
+
const knownAssetIds = new Set(
|
|
994
|
+
pack.operatingSystem.setupAssets?.map((asset) => asset.assetId) ?? []
|
|
995
|
+
);
|
|
996
|
+
const knownTopicSlugs = /* @__PURE__ */ new Set([...knownRootSlugs, ...templateSlugs]);
|
|
997
|
+
pack.operatingSystem.installProfiles.forEach((profile, index) => {
|
|
998
|
+
issues.push(
|
|
999
|
+
...validateInstallProfile(
|
|
1000
|
+
profile,
|
|
1001
|
+
index,
|
|
1002
|
+
knownPromptIds,
|
|
1003
|
+
knownToolIds,
|
|
1004
|
+
knownAssetIds,
|
|
1005
|
+
knownTopicSlugs
|
|
1006
|
+
)
|
|
1007
|
+
);
|
|
1008
|
+
});
|
|
1127
1009
|
}
|
|
1128
|
-
return parseObject(indent);
|
|
1129
1010
|
}
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1011
|
+
if (!pack.roles || pack.roles.length === 0) {
|
|
1012
|
+
issues.push(
|
|
1013
|
+
issue("MISSING_ROLES", "At least one reasoning role is required", "roles")
|
|
1014
|
+
);
|
|
1015
|
+
} else {
|
|
1016
|
+
issues.push(
|
|
1017
|
+
...checkDuplicateIds(
|
|
1018
|
+
pack.roles,
|
|
1019
|
+
"roleId",
|
|
1020
|
+
"roles"
|
|
1021
|
+
)
|
|
1022
|
+
);
|
|
1023
|
+
}
|
|
1024
|
+
const knownGateIds = new Set(pack.gates?.map((g) => g.gateId) ?? []);
|
|
1025
|
+
const knownArtifactIds = new Set(
|
|
1026
|
+
pack.artifacts?.map((a) => a.artifactId) ?? []
|
|
1027
|
+
);
|
|
1028
|
+
const knownRoleIds = new Set(pack.roles?.map((r) => r.roleId) ?? []);
|
|
1029
|
+
if (pack.gates) {
|
|
1030
|
+
issues.push(
|
|
1031
|
+
...checkDuplicateIds(
|
|
1032
|
+
pack.gates,
|
|
1033
|
+
"gateId",
|
|
1034
|
+
"gates"
|
|
1035
|
+
)
|
|
1036
|
+
);
|
|
1037
|
+
for (const [i, gate] of pack.gates.entries()) {
|
|
1038
|
+
if (!gate.criteria || gate.criteria.length === 0) {
|
|
1039
|
+
issues.push(
|
|
1040
|
+
issue(
|
|
1041
|
+
"EMPTY_GATE_CRITERIA",
|
|
1042
|
+
`Gate "${gate.gateId}" has no criteria`,
|
|
1043
|
+
`gates[${i}].criteria`,
|
|
1044
|
+
"warning"
|
|
1045
|
+
)
|
|
1046
|
+
);
|
|
1047
|
+
} else {
|
|
1048
|
+
issues.push(
|
|
1049
|
+
...checkDuplicateIds(
|
|
1050
|
+
gate.criteria,
|
|
1051
|
+
"criterionId",
|
|
1052
|
+
`gates[${i}].criteria`
|
|
1053
|
+
)
|
|
1054
|
+
);
|
|
1137
1055
|
}
|
|
1138
|
-
|
|
1139
|
-
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
1058
|
+
if (pack.artifacts) {
|
|
1059
|
+
issues.push(
|
|
1060
|
+
...checkDuplicateIds(
|
|
1061
|
+
pack.artifacts,
|
|
1062
|
+
"artifactId",
|
|
1063
|
+
"artifacts"
|
|
1064
|
+
)
|
|
1065
|
+
);
|
|
1066
|
+
}
|
|
1067
|
+
if (pack.workflows) {
|
|
1068
|
+
issues.push(
|
|
1069
|
+
...checkDuplicateIds(
|
|
1070
|
+
pack.workflows,
|
|
1071
|
+
"workflowId",
|
|
1072
|
+
"workflows"
|
|
1073
|
+
)
|
|
1074
|
+
);
|
|
1075
|
+
for (const [wi, workflow] of pack.workflows.entries()) {
|
|
1076
|
+
for (const gateId of workflow.gateCheckpoints) {
|
|
1077
|
+
if (!knownGateIds.has(gateId)) {
|
|
1078
|
+
issues.push(
|
|
1079
|
+
issue(
|
|
1080
|
+
"UNKNOWN_GATE_REF",
|
|
1081
|
+
`Workflow "${workflow.workflowId}" references unknown gate "${gateId}"`,
|
|
1082
|
+
`workflows[${wi}].gateCheckpoints`
|
|
1083
|
+
)
|
|
1084
|
+
);
|
|
1085
|
+
}
|
|
1140
1086
|
}
|
|
1141
|
-
const
|
|
1142
|
-
|
|
1143
|
-
|
|
1087
|
+
for (const artifactId of workflow.requiredArtifacts) {
|
|
1088
|
+
if (!knownArtifactIds.has(artifactId)) {
|
|
1089
|
+
issues.push(
|
|
1090
|
+
issue(
|
|
1091
|
+
"UNKNOWN_ARTIFACT_REF",
|
|
1092
|
+
`Workflow "${workflow.workflowId}" references unknown artifact "${artifactId}"`,
|
|
1093
|
+
`workflows[${wi}].requiredArtifacts`
|
|
1094
|
+
)
|
|
1095
|
+
);
|
|
1096
|
+
}
|
|
1144
1097
|
}
|
|
1145
|
-
const
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1098
|
+
for (const [si, step] of workflow.steps.entries()) {
|
|
1099
|
+
for (const roleId of step.requiredRoles) {
|
|
1100
|
+
if (!knownRoleIds.has(roleId)) {
|
|
1101
|
+
issues.push(
|
|
1102
|
+
issue(
|
|
1103
|
+
"UNKNOWN_ROLE_REF",
|
|
1104
|
+
`Step "${step.stepId}" references unknown role "${roleId}"`,
|
|
1105
|
+
`workflows[${wi}].steps[${si}].requiredRoles`
|
|
1106
|
+
)
|
|
1107
|
+
);
|
|
1108
|
+
}
|
|
1109
|
+
}
|
|
1110
|
+
if (step.gateId && !knownGateIds.has(step.gateId)) {
|
|
1111
|
+
issues.push(
|
|
1112
|
+
issue(
|
|
1113
|
+
"UNKNOWN_GATE_REF",
|
|
1114
|
+
`Step "${step.stepId}" references unknown gate "${step.gateId}"`,
|
|
1115
|
+
`workflows[${wi}].steps[${si}].gateId`
|
|
1116
|
+
)
|
|
1117
|
+
);
|
|
1118
|
+
}
|
|
1119
|
+
if (step.produces) {
|
|
1120
|
+
for (const artifactId of step.produces) {
|
|
1121
|
+
if (!knownArtifactIds.has(artifactId)) {
|
|
1122
|
+
issues.push(
|
|
1123
|
+
issue(
|
|
1124
|
+
"UNKNOWN_ARTIFACT_REF",
|
|
1125
|
+
`Step "${step.stepId}" references unknown artifact "${artifactId}"`,
|
|
1126
|
+
`workflows[${wi}].steps[${si}].produces`
|
|
1127
|
+
)
|
|
1128
|
+
);
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1150
1132
|
}
|
|
1151
|
-
items.push(parseYamlScalar(rest));
|
|
1152
1133
|
}
|
|
1153
|
-
return items;
|
|
1154
1134
|
}
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1135
|
+
if (pack.inquiryShaping) {
|
|
1136
|
+
if (pack.inquiryShaping.questionTemplates) {
|
|
1137
|
+
issues.push(
|
|
1138
|
+
...checkDuplicateIds(
|
|
1139
|
+
pack.inquiryShaping.questionTemplates,
|
|
1140
|
+
"templateId",
|
|
1141
|
+
"inquiryShaping.questionTemplates"
|
|
1142
|
+
)
|
|
1143
|
+
);
|
|
1144
|
+
pack.inquiryShaping.questionTemplates.forEach((template, index) => {
|
|
1145
|
+
issues.push(...validateQuestionTemplate(template, index));
|
|
1146
|
+
});
|
|
1147
|
+
}
|
|
1148
|
+
if (pack.inquiryShaping.taskTemplates) {
|
|
1149
|
+
issues.push(
|
|
1150
|
+
...checkDuplicateIds(
|
|
1151
|
+
pack.inquiryShaping.taskTemplates,
|
|
1152
|
+
"templateId",
|
|
1153
|
+
"inquiryShaping.taskTemplates"
|
|
1154
|
+
)
|
|
1155
|
+
);
|
|
1156
|
+
pack.inquiryShaping.taskTemplates.forEach((template, index) => {
|
|
1157
|
+
issues.push(...validateTaskTemplate(template, index));
|
|
1158
|
+
});
|
|
1159
|
+
}
|
|
1160
|
+
if (pack.inquiryShaping.frameworkHints) {
|
|
1161
|
+
issues.push(
|
|
1162
|
+
...checkDuplicateIds(
|
|
1163
|
+
pack.inquiryShaping.frameworkHints.map((hint) => ({
|
|
1164
|
+
frameworkName: hint.frameworkName
|
|
1165
|
+
})),
|
|
1166
|
+
"frameworkName",
|
|
1167
|
+
"inquiryShaping.frameworkHints"
|
|
1168
|
+
)
|
|
1169
|
+
);
|
|
1170
|
+
pack.inquiryShaping.frameworkHints.forEach((hint, index) => {
|
|
1171
|
+
issues.push(...validateFrameworkHint(hint, index));
|
|
1172
|
+
});
|
|
1173
1173
|
}
|
|
1174
|
-
return objectValue;
|
|
1175
1174
|
}
|
|
1176
|
-
return
|
|
1175
|
+
return {
|
|
1176
|
+
valid: issues.filter((i) => i.severity === "error").length === 0,
|
|
1177
|
+
issues
|
|
1178
|
+
};
|
|
1177
1179
|
}
|
|
1178
|
-
|
|
1180
|
+
|
|
1181
|
+
// src/domain-pack/authoring.validation.ts
|
|
1182
|
+
var KEBAB_CASE2 = /^[a-z][a-z0-9]*(-[a-z0-9]+)*$/;
|
|
1183
|
+
var SEMVER2 = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;
|
|
1184
|
+
var LEGACY_PUBLIC_KEYS = /* @__PURE__ */ new Set([
|
|
1185
|
+
"project",
|
|
1186
|
+
"projects",
|
|
1187
|
+
"projectId",
|
|
1188
|
+
"projectIds",
|
|
1189
|
+
"sprint",
|
|
1190
|
+
"sprints",
|
|
1191
|
+
"sprintId",
|
|
1192
|
+
"sprintIds"
|
|
1193
|
+
]);
|
|
1194
|
+
var SCHEMA_EXTENSION_TARGETS = /* @__PURE__ */ new Set([
|
|
1195
|
+
"artifact",
|
|
1196
|
+
"workflow",
|
|
1197
|
+
"gate",
|
|
1198
|
+
"prompt",
|
|
1199
|
+
"tool",
|
|
1200
|
+
"install-profile",
|
|
1201
|
+
"topic-template"
|
|
1202
|
+
]);
|
|
1203
|
+
var ONTOLOGY_CONSTRAINT_SEVERITIES = /* @__PURE__ */ new Set([
|
|
1204
|
+
"error",
|
|
1205
|
+
"warning",
|
|
1206
|
+
"informational"
|
|
1207
|
+
]);
|
|
1208
|
+
var LINEAGE_MODES = /* @__PURE__ */ new Set(["root", "remix", "fork"]);
|
|
1209
|
+
var AUTHORING_TOOL_NAMES = {
|
|
1210
|
+
validate: "validate_domain_pack_manifest",
|
|
1211
|
+
preview: "preview_domain_pack_manifest",
|
|
1212
|
+
publish: "publish_domain_pack_manifest"
|
|
1213
|
+
};
|
|
1214
|
+
function issue2(code, message, path, source, severity = "error") {
|
|
1215
|
+
return { code, message, path, severity, source };
|
|
1216
|
+
}
|
|
1217
|
+
function emptyCounts() {
|
|
1218
|
+
return {
|
|
1219
|
+
topicRoots: 0,
|
|
1220
|
+
workflows: 0,
|
|
1221
|
+
gates: 0,
|
|
1222
|
+
artifacts: 0,
|
|
1223
|
+
roles: 0,
|
|
1224
|
+
prompts: 0,
|
|
1225
|
+
tools: 0,
|
|
1226
|
+
setupAssets: 0,
|
|
1227
|
+
installProfiles: 0,
|
|
1228
|
+
frameworks: 0,
|
|
1229
|
+
schemaExtensions: 0,
|
|
1230
|
+
ontologyExtensions: 0
|
|
1231
|
+
};
|
|
1232
|
+
}
|
|
1233
|
+
function isPlainObject2(value) {
|
|
1234
|
+
return typeof value === "object" && value !== null && !Array.isArray(value) && Object.getPrototypeOf(value) === Object.prototype;
|
|
1235
|
+
}
|
|
1236
|
+
function describeParseFailure(error) {
|
|
1237
|
+
return error instanceof Error ? error.message : "Manifest parse failed.";
|
|
1238
|
+
}
|
|
1239
|
+
function asToolDefinition(tool) {
|
|
1240
|
+
return tool;
|
|
1241
|
+
}
|
|
1242
|
+
function detectDomainPackManifestFormat2(source, explicitFormat) {
|
|
1179
1243
|
if (explicitFormat) {
|
|
1180
1244
|
return explicitFormat;
|
|
1181
1245
|
}
|
|
@@ -1185,35 +1249,6 @@ function detectDomainPackManifestFormat(source, explicitFormat) {
|
|
|
1185
1249
|
}
|
|
1186
1250
|
return "yaml";
|
|
1187
1251
|
}
|
|
1188
|
-
function serializeDomainPackAuthoringManifest(manifest, format = "json") {
|
|
1189
|
-
const canonicalValue = sortJsonValue(manifest);
|
|
1190
|
-
if (format === "json") {
|
|
1191
|
-
return `${JSON.stringify(canonicalValue, null, 2)}
|
|
1192
|
-
`;
|
|
1193
|
-
}
|
|
1194
|
-
return `${renderYaml(canonicalValue).join("\n")}
|
|
1195
|
-
`;
|
|
1196
|
-
}
|
|
1197
|
-
function parseDomainPackAuthoringManifest(source, format) {
|
|
1198
|
-
const detectedFormat = detectDomainPackManifestFormat(source, format);
|
|
1199
|
-
const parsed = detectedFormat === "json" ? JSON.parse(source) : parseYamlDocument(source);
|
|
1200
|
-
if (!isPlainObject(parsed)) {
|
|
1201
|
-
throw new Error("Domain pack manifest must parse to an object.");
|
|
1202
|
-
}
|
|
1203
|
-
if (!("pack" in parsed)) {
|
|
1204
|
-
throw new Error("Domain pack manifest requires a top-level pack object.");
|
|
1205
|
-
}
|
|
1206
|
-
return defineDomainPackAuthoringManifest({
|
|
1207
|
-
kind: parsed.kind,
|
|
1208
|
-
manifestVersion: parsed.manifestVersion,
|
|
1209
|
-
pack: parsed.pack,
|
|
1210
|
-
frameworks: parsed.frameworks,
|
|
1211
|
-
schemaExtensions: parsed.schemaExtensions,
|
|
1212
|
-
ontologyExtensions: parsed.ontologyExtensions,
|
|
1213
|
-
lineage: parsed.lineage,
|
|
1214
|
-
metadata: parsed.metadata
|
|
1215
|
-
});
|
|
1216
|
-
}
|
|
1217
1252
|
function validateFrameworks(frameworks) {
|
|
1218
1253
|
if (!frameworks) {
|
|
1219
1254
|
return [];
|
|
@@ -1342,7 +1377,7 @@ function validateSchemaExtensions(extensions) {
|
|
|
1342
1377
|
)
|
|
1343
1378
|
);
|
|
1344
1379
|
}
|
|
1345
|
-
if (!
|
|
1380
|
+
if (!isPlainObject2(extension.schema)) {
|
|
1346
1381
|
issues.push(
|
|
1347
1382
|
issue2(
|
|
1348
1383
|
"INVALID_SCHEMA_EXTENSION_SCHEMA",
|
|
@@ -1424,85 +1459,89 @@ function validateOntologyExtensions(extensions) {
|
|
|
1424
1459
|
);
|
|
1425
1460
|
}
|
|
1426
1461
|
const entityTypeValues = /* @__PURE__ */ new Set();
|
|
1427
|
-
extension.entityTypes?.forEach(
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1462
|
+
extension.entityTypes?.forEach(
|
|
1463
|
+
(entityType, entityTypeIndex) => {
|
|
1464
|
+
const entityPath = `${path}.entityTypes[${entityTypeIndex}]`;
|
|
1465
|
+
if (!entityType.value || !KEBAB_CASE2.test(entityType.value)) {
|
|
1466
|
+
issues.push(
|
|
1467
|
+
issue2(
|
|
1468
|
+
"INVALID_ONTOLOGY_ENTITY_VALUE",
|
|
1469
|
+
"entity extension value must be kebab-case",
|
|
1470
|
+
`${entityPath}.value`,
|
|
1471
|
+
"ontology-extension"
|
|
1472
|
+
)
|
|
1473
|
+
);
|
|
1474
|
+
} else if (entityTypeValues.has(entityType.value)) {
|
|
1475
|
+
issues.push(
|
|
1476
|
+
issue2(
|
|
1477
|
+
"DUPLICATE_ONTOLOGY_ENTITY_VALUE",
|
|
1478
|
+
`Duplicate entity extension value "${entityType.value}"`,
|
|
1479
|
+
`${entityPath}.value`,
|
|
1480
|
+
"ontology-extension"
|
|
1481
|
+
)
|
|
1482
|
+
);
|
|
1483
|
+
} else {
|
|
1484
|
+
entityTypeValues.add(entityType.value);
|
|
1485
|
+
}
|
|
1486
|
+
if (!entityType.label) {
|
|
1487
|
+
issues.push(
|
|
1488
|
+
issue2(
|
|
1489
|
+
"MISSING_ONTOLOGY_ENTITY_LABEL",
|
|
1490
|
+
"entity extension label is required",
|
|
1491
|
+
`${entityPath}.label`,
|
|
1492
|
+
"ontology-extension"
|
|
1493
|
+
)
|
|
1494
|
+
);
|
|
1495
|
+
}
|
|
1459
1496
|
}
|
|
1460
|
-
|
|
1497
|
+
);
|
|
1461
1498
|
const edgeTypeValues = /* @__PURE__ */ new Set();
|
|
1462
|
-
extension.edgeTypes?.forEach(
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1499
|
+
extension.edgeTypes?.forEach(
|
|
1500
|
+
(edgeType, edgeTypeIndex) => {
|
|
1501
|
+
const edgePath = `${path}.edgeTypes[${edgeTypeIndex}]`;
|
|
1502
|
+
if (!edgeType.value || !KEBAB_CASE2.test(edgeType.value)) {
|
|
1503
|
+
issues.push(
|
|
1504
|
+
issue2(
|
|
1505
|
+
"INVALID_ONTOLOGY_EDGE_VALUE",
|
|
1506
|
+
"edge extension value must be kebab-case",
|
|
1507
|
+
`${edgePath}.value`,
|
|
1508
|
+
"ontology-extension"
|
|
1509
|
+
)
|
|
1510
|
+
);
|
|
1511
|
+
} else if (edgeTypeValues.has(edgeType.value)) {
|
|
1512
|
+
issues.push(
|
|
1513
|
+
issue2(
|
|
1514
|
+
"DUPLICATE_ONTOLOGY_EDGE_VALUE",
|
|
1515
|
+
`Duplicate edge extension value "${edgeType.value}"`,
|
|
1516
|
+
`${edgePath}.value`,
|
|
1517
|
+
"ontology-extension"
|
|
1518
|
+
)
|
|
1519
|
+
);
|
|
1520
|
+
} else {
|
|
1521
|
+
edgeTypeValues.add(edgeType.value);
|
|
1522
|
+
}
|
|
1523
|
+
if (!edgeType.label) {
|
|
1524
|
+
issues.push(
|
|
1525
|
+
issue2(
|
|
1526
|
+
"MISSING_ONTOLOGY_EDGE_LABEL",
|
|
1527
|
+
"edge extension label is required",
|
|
1528
|
+
`${edgePath}.label`,
|
|
1529
|
+
"ontology-extension"
|
|
1530
|
+
)
|
|
1531
|
+
);
|
|
1532
|
+
}
|
|
1533
|
+
if (edgeType.constraintSeverity && !ONTOLOGY_CONSTRAINT_SEVERITIES.has(edgeType.constraintSeverity)) {
|
|
1534
|
+
issues.push(
|
|
1535
|
+
issue2(
|
|
1536
|
+
"INVALID_ONTOLOGY_EDGE_SEVERITY",
|
|
1537
|
+
`Unsupported constraint severity "${edgeType.constraintSeverity}"`,
|
|
1538
|
+
`${edgePath}.constraintSeverity`,
|
|
1539
|
+
"ontology-extension"
|
|
1540
|
+
)
|
|
1541
|
+
);
|
|
1542
|
+
}
|
|
1504
1543
|
}
|
|
1505
|
-
|
|
1544
|
+
);
|
|
1506
1545
|
});
|
|
1507
1546
|
return issues;
|
|
1508
1547
|
}
|
|
@@ -1621,7 +1660,7 @@ function scanLegacyPublicKeys(value, path = "") {
|
|
|
1621
1660
|
});
|
|
1622
1661
|
return issues;
|
|
1623
1662
|
}
|
|
1624
|
-
if (!
|
|
1663
|
+
if (!isPlainObject2(value)) {
|
|
1625
1664
|
return issues;
|
|
1626
1665
|
}
|
|
1627
1666
|
Object.entries(value).forEach(([key, entryValue]) => {
|
|
@@ -1720,7 +1759,7 @@ function validateDomainPackAuthoringManifest(manifest) {
|
|
|
1720
1759
|
);
|
|
1721
1760
|
}
|
|
1722
1761
|
function validateDomainPackAuthoringManifestSource(source, format) {
|
|
1723
|
-
const detectedFormat =
|
|
1762
|
+
const detectedFormat = detectDomainPackManifestFormat2(source, format);
|
|
1724
1763
|
try {
|
|
1725
1764
|
const manifest = parseDomainPackAuthoringManifest(source, detectedFormat);
|
|
1726
1765
|
return evaluateDomainPackAuthoringManifest(manifest, detectedFormat);
|
|
@@ -1870,27 +1909,45 @@ function createDomainPackAuthoringTools() {
|
|
|
1870
1909
|
additionalProperties: false
|
|
1871
1910
|
};
|
|
1872
1911
|
return {
|
|
1873
|
-
validate: {
|
|
1912
|
+
validate: asToolDefinition({
|
|
1874
1913
|
name: AUTHORING_TOOL_NAMES.validate,
|
|
1875
1914
|
description: "Validate a domain pack authoring manifest and return structural, lineage, terminology, and extension issues.",
|
|
1876
1915
|
inputSchema,
|
|
1877
1916
|
execute: (args) => validateDomainPackAuthoringManifestSource(args.manifestText, args.format)
|
|
1878
|
-
},
|
|
1879
|
-
preview: {
|
|
1917
|
+
}),
|
|
1918
|
+
preview: asToolDefinition({
|
|
1880
1919
|
name: AUTHORING_TOOL_NAMES.preview,
|
|
1881
1920
|
description: "Preview a domain pack manifest with canonical JSON/YAML renderings, runtime targets, and publication readiness.",
|
|
1882
1921
|
inputSchema,
|
|
1883
1922
|
execute: (args) => previewDomainPackAuthoringManifestSource(args.manifestText, args.format)
|
|
1884
|
-
},
|
|
1885
|
-
publish: {
|
|
1923
|
+
}),
|
|
1924
|
+
publish: asToolDefinition({
|
|
1886
1925
|
name: AUTHORING_TOOL_NAMES.publish,
|
|
1887
1926
|
description: "Build a publication-ready domain pack artifact when validation passes, including remix/fork lineage metadata.",
|
|
1888
1927
|
inputSchema,
|
|
1889
1928
|
execute: (args) => publishDomainPackAuthoringManifestSource(args.manifestText, args.format)
|
|
1890
|
-
}
|
|
1929
|
+
})
|
|
1891
1930
|
};
|
|
1892
1931
|
}
|
|
1932
|
+
var domainPackAuthoringValidation = {
|
|
1933
|
+
validateDomainPackAuthoringManifest,
|
|
1934
|
+
validateDomainPackAuthoringManifestSource,
|
|
1935
|
+
previewDomainPackAuthoringManifest,
|
|
1936
|
+
previewDomainPackAuthoringManifestSource,
|
|
1937
|
+
publishDomainPackAuthoringManifest,
|
|
1938
|
+
publishDomainPackAuthoringManifestSource,
|
|
1939
|
+
createDomainPackAuthoringTools
|
|
1940
|
+
};
|
|
1941
|
+
|
|
1942
|
+
// src/domain-pack/authoring.ts
|
|
1943
|
+
var validateDomainPackAuthoringManifest2 = domainPackAuthoringValidation.validateDomainPackAuthoringManifest;
|
|
1944
|
+
var validateDomainPackAuthoringManifestSource2 = domainPackAuthoringValidation.validateDomainPackAuthoringManifestSource;
|
|
1945
|
+
var previewDomainPackAuthoringManifest2 = domainPackAuthoringValidation.previewDomainPackAuthoringManifest;
|
|
1946
|
+
var previewDomainPackAuthoringManifestSource2 = domainPackAuthoringValidation.previewDomainPackAuthoringManifestSource;
|
|
1947
|
+
var publishDomainPackAuthoringManifest2 = domainPackAuthoringValidation.publishDomainPackAuthoringManifest;
|
|
1948
|
+
var publishDomainPackAuthoringManifestSource2 = domainPackAuthoringValidation.publishDomainPackAuthoringManifestSource;
|
|
1949
|
+
var createDomainPackAuthoringTools2 = domainPackAuthoringValidation.createDomainPackAuthoringTools;
|
|
1893
1950
|
|
|
1894
|
-
export { createDomainPackAuthoringTools, defineDomainPackAuthoringManifest, parseDomainPackAuthoringManifest, previewDomainPackAuthoringManifest, previewDomainPackAuthoringManifestSource, publishDomainPackAuthoringManifest, publishDomainPackAuthoringManifestSource, serializeDomainPackAuthoringManifest, validateDomainPackAuthoringManifest, validateDomainPackAuthoringManifestSource };
|
|
1951
|
+
export { createDomainPackAuthoringTools2 as createDomainPackAuthoringTools, defineDomainPackAuthoringManifest, parseDomainPackAuthoringManifest, previewDomainPackAuthoringManifest2 as previewDomainPackAuthoringManifest, previewDomainPackAuthoringManifestSource2 as previewDomainPackAuthoringManifestSource, publishDomainPackAuthoringManifest2 as publishDomainPackAuthoringManifest, publishDomainPackAuthoringManifestSource2 as publishDomainPackAuthoringManifestSource, serializeDomainPackAuthoringManifest, validateDomainPackAuthoringManifest2 as validateDomainPackAuthoringManifest, validateDomainPackAuthoringManifestSource2 as validateDomainPackAuthoringManifestSource };
|
|
1895
1952
|
//# sourceMappingURL=authoring.js.map
|
|
1896
1953
|
//# sourceMappingURL=authoring.js.map
|