@inf-monkeys-tech/monkeys 1.1.16 → 1.1.18
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/README.md +20 -0
- package/lib/contracts/action-program-http.d.ts +1021 -0
- package/lib/contracts/action-program-http.d.ts.map +1 -0
- package/lib/contracts/action-program-http.js +42 -0
- package/lib/contracts/action-program-http.js.map +1 -0
- package/lib/contracts/declarative-control-http.d.ts +11365 -18
- package/lib/contracts/declarative-control-http.d.ts.map +1 -1
- package/lib/contracts/declarative-control.d.ts +3263 -1022
- package/lib/contracts/declarative-control.d.ts.map +1 -1
- package/lib/contracts/declarative-control.js +278 -5
- package/lib/contracts/declarative-control.js.map +1 -1
- package/lib/contracts/declarative-publication-job.d.ts +3356 -8
- package/lib/contracts/declarative-publication-job.d.ts.map +1 -1
- package/lib/contracts/index.d.ts +1 -0
- package/lib/contracts/index.d.ts.map +1 -1
- package/lib/contracts/index.js +1 -0
- package/lib/contracts/index.js.map +1 -1
- package/lib/esm/contracts/index.mjs +342 -3
- package/lib/esm/contracts/index.mjs.map +1 -1
- package/lib/esm/index.mjs +689 -29
- package/lib/esm/index.mjs.map +1 -1
- package/lib/esm/runtime/index.mjs +639 -29
- package/lib/esm/runtime/index.mjs.map +1 -1
- package/lib/esm/schemas/index.mjs +4088 -3797
- package/lib/esm/schemas/index.mjs.map +1 -1
- package/lib/json-schema/action-program-artifact.schema.json +1226 -0
- package/lib/json-schema/action-program-definition.schema.json +1205 -0
- package/lib/json-schema/index.json +2 -0
- package/lib/json-schema/navigation-release.schema.json +1 -0
- package/lib/json-schema/navigation-runtime-bundle.schema.json +1 -0
- package/lib/json-schema/page-release.schema.json +1 -0
- package/lib/json-schema/page-runtime-bundle.schema.json +2436 -0
- package/lib/json-schema/page.schema.json +941 -0
- package/lib/json-schema/workbench-release.schema.json +1 -0
- package/lib/json-schema/workbench-runtime-bundle.schema.json +1 -0
- package/lib/runtime/action-program-author.d.ts +40 -0
- package/lib/runtime/action-program-author.d.ts.map +1 -0
- package/lib/runtime/action-program-author.js +178 -0
- package/lib/runtime/action-program-author.js.map +1 -0
- package/lib/runtime/declarative-control-compiler.d.ts +9 -1
- package/lib/runtime/declarative-control-compiler.d.ts.map +1 -1
- package/lib/runtime/declarative-control-compiler.js +123 -7
- package/lib/runtime/declarative-control-compiler.js.map +1 -1
- package/lib/runtime/declarative-runtime-contract.d.ts.map +1 -1
- package/lib/runtime/declarative-runtime-contract.js +40 -2
- package/lib/runtime/declarative-runtime-contract.js.map +1 -1
- package/lib/runtime/index.d.ts +1 -0
- package/lib/runtime/index.d.ts.map +1 -1
- package/lib/runtime/index.js +1 -0
- package/lib/runtime/index.js.map +1 -1
- package/lib/schemas/index.d.ts +2216 -1232
- package/lib/schemas/index.d.ts.map +1 -1
- package/lib/schemas/index.js +116 -111
- package/lib/schemas/index.js.map +1 -1
- package/package.json +4 -2
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { ActionProgramDefinition, RevisionRef } from "../contracts/declarative-control";
|
|
2
|
+
import type { SchemaDefinition } from "../contracts/semantic";
|
|
3
|
+
export interface ProgramCapability {
|
|
4
|
+
input: unknown;
|
|
5
|
+
result: unknown;
|
|
6
|
+
}
|
|
7
|
+
export type ProgramCapabilityMap = Record<string, ProgramCapability>;
|
|
8
|
+
export interface ActionProgramContext<Q extends ProgramCapabilityMap, C extends ProgramCapabilityMap, F extends Record<string, unknown> = Record<string, unknown>, S extends Record<string, unknown> = Record<string, unknown>, R extends string = string> {
|
|
9
|
+
query<K extends keyof Q & string>(id: K, input: Q[K]["input"]): Promise<Q[K]["result"]>;
|
|
10
|
+
command<K extends keyof C & string>(id: K, input: C[K]["input"], options: {
|
|
11
|
+
stepKey: string;
|
|
12
|
+
}): Promise<C[K]["result"]>;
|
|
13
|
+
ui: {
|
|
14
|
+
form<K extends keyof F & string>(schemaId: K, value: F[K]): Promise<{
|
|
15
|
+
status: "submitted";
|
|
16
|
+
value: F[K];
|
|
17
|
+
} | {
|
|
18
|
+
status: "cancelled";
|
|
19
|
+
}>;
|
|
20
|
+
toast(message: string, tone: "success" | "error" | "info"): Promise<void>;
|
|
21
|
+
refresh(alias: R): Promise<void>;
|
|
22
|
+
download(handle: string): Promise<{
|
|
23
|
+
status: "started";
|
|
24
|
+
}>;
|
|
25
|
+
};
|
|
26
|
+
state: {
|
|
27
|
+
get<K extends keyof S & string>(alias: K): Promise<S[K]>;
|
|
28
|
+
set<K extends keyof S & string>(alias: K, value: S[K]): Promise<void>;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export interface ProgramSchemaRegistration {
|
|
32
|
+
definitionRevisionRef: RevisionRef;
|
|
33
|
+
definition: SchemaDefinition;
|
|
34
|
+
}
|
|
35
|
+
/** Strict structural projection. Validation-only keywords remain enforced by runtime AJV. */
|
|
36
|
+
export declare function programSchemaType(schema: unknown, path?: string, depth?: number): string;
|
|
37
|
+
export declare function generateActionProgramTypes(definition: ActionProgramDefinition, schemas: readonly ProgramSchemaRegistration[]): string;
|
|
38
|
+
/** Validates JSON values without imposing a component render-model object shape. */
|
|
39
|
+
export declare function compileProgramValueValidator(schema: Record<string, unknown>, documents?: readonly Record<string, unknown>[]): import("ajv/dist/types").ValidateFunction<unknown>;
|
|
40
|
+
//# sourceMappingURL=action-program-author.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action-program-author.d.ts","sourceRoot":"","sources":["../../src/runtime/action-program-author.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,uBAAuB,EACvB,WAAW,EACZ,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAM9D,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;CACjB;AACD,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;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K,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;QACjC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;YAAE,MAAM,EAAE,SAAS,CAAA;SAAE,CAAC,CAAC;KAC1D,CAAC;IACF,KAAK,EAAE;QACL,GAAG,CAAC,CAAC,SAAS,MAAM,CAAC,GAAG,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACzD,GAAG,CAAC,CAAC,SAAS,MAAM,CAAC,GAAG,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;KACvE,CAAC;CACH;AACD,MAAM,WAAW,yBAAyB;IACxC,qBAAqB,EAAE,WAAW,CAAC;IACnC,UAAU,EAAE,gBAAgB,CAAC;CAC9B;AAED,6FAA6F;AAC7F,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,OAAO,EACf,IAAI,SAAM,EACV,KAAK,SAAI,GACR,MAAM,CAoHR;AAED,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,uBAAuB,EACnC,OAAO,EAAE,SAAS,yBAAyB,EAAE,GAC5C,MAAM,CA0ER;AAED,oFAAoF;AACpF,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS,GAAE,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAO,sDAK/H"}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.compileProgramValueValidator = exports.generateActionProgramTypes = exports.programSchemaType = void 0;
|
|
7
|
+
const _2020_1 = __importDefault(require("ajv/dist/2020"));
|
|
8
|
+
const declarative_control_compiler_1 = require("./declarative-control-compiler");
|
|
9
|
+
/** Strict structural projection. Validation-only keywords remain enforced by runtime AJV. */
|
|
10
|
+
function programSchemaType(schema, path = "$", depth = 0) {
|
|
11
|
+
if (depth > 32 ||
|
|
12
|
+
!schema ||
|
|
13
|
+
typeof schema !== "object" ||
|
|
14
|
+
Array.isArray(schema))
|
|
15
|
+
throw new Error(`Unsupported schema at ${path}`);
|
|
16
|
+
const value = schema;
|
|
17
|
+
const allowed = new Set([
|
|
18
|
+
"$schema",
|
|
19
|
+
"$id",
|
|
20
|
+
"title",
|
|
21
|
+
"description",
|
|
22
|
+
"type",
|
|
23
|
+
"properties",
|
|
24
|
+
"required",
|
|
25
|
+
"additionalProperties",
|
|
26
|
+
"items",
|
|
27
|
+
"enum",
|
|
28
|
+
"const",
|
|
29
|
+
"anyOf",
|
|
30
|
+
"oneOf",
|
|
31
|
+
"minLength",
|
|
32
|
+
"maxLength",
|
|
33
|
+
"pattern",
|
|
34
|
+
"format",
|
|
35
|
+
"minimum",
|
|
36
|
+
"maximum",
|
|
37
|
+
"exclusiveMinimum",
|
|
38
|
+
"exclusiveMaximum",
|
|
39
|
+
"multipleOf",
|
|
40
|
+
"minItems",
|
|
41
|
+
"maxItems",
|
|
42
|
+
"uniqueItems",
|
|
43
|
+
"minProperties",
|
|
44
|
+
"maxProperties",
|
|
45
|
+
"default",
|
|
46
|
+
"examples",
|
|
47
|
+
"readOnly",
|
|
48
|
+
"writeOnly",
|
|
49
|
+
]);
|
|
50
|
+
for (const key of Object.keys(value))
|
|
51
|
+
if (!allowed.has(key))
|
|
52
|
+
throw new Error(`Unsupported schema keyword ${path}.${key}`);
|
|
53
|
+
const child = (schema, key) => programSchemaType(schema, `${path}.${key}`, depth + 1);
|
|
54
|
+
const literal = (input) => {
|
|
55
|
+
if (input !== null &&
|
|
56
|
+
!["string", "number", "boolean"].includes(typeof input))
|
|
57
|
+
throw new Error(`Unsupported literal at ${path}`);
|
|
58
|
+
return JSON.stringify(input);
|
|
59
|
+
};
|
|
60
|
+
if ("const" in value)
|
|
61
|
+
return literal(value.const);
|
|
62
|
+
if (Array.isArray(value.enum) && value.enum.length)
|
|
63
|
+
return value.enum.map(literal).join(" | ");
|
|
64
|
+
if (Array.isArray(value.anyOf) || Array.isArray(value.oneOf))
|
|
65
|
+
return ((value.anyOf ?? value.oneOf)
|
|
66
|
+
.map((schema, i) => `(${child(schema, String(i))})`)
|
|
67
|
+
.join(" | ") || "never");
|
|
68
|
+
if (Array.isArray(value.type))
|
|
69
|
+
return value.type
|
|
70
|
+
.map((type) => child({ ...value, type }, String(type)))
|
|
71
|
+
.join(" | ");
|
|
72
|
+
switch (value.type) {
|
|
73
|
+
case "null":
|
|
74
|
+
return "null";
|
|
75
|
+
case "boolean":
|
|
76
|
+
return "boolean";
|
|
77
|
+
case "string":
|
|
78
|
+
return "string";
|
|
79
|
+
case "number":
|
|
80
|
+
case "integer":
|
|
81
|
+
return "number";
|
|
82
|
+
case "array":
|
|
83
|
+
return `Array<${child(value.items, "items")}>`;
|
|
84
|
+
case "object": {
|
|
85
|
+
const properties = value.properties ?? {};
|
|
86
|
+
if (typeof properties !== "object" ||
|
|
87
|
+
!properties ||
|
|
88
|
+
Array.isArray(properties))
|
|
89
|
+
throw new Error(`Invalid properties at ${path}`);
|
|
90
|
+
const required = value.required ?? [];
|
|
91
|
+
if (!Array.isArray(required) ||
|
|
92
|
+
required.some((key) => typeof key !== "string" ||
|
|
93
|
+
!Object.prototype.hasOwnProperty.call(properties, key)))
|
|
94
|
+
throw new Error(`Unsupported required keys at ${path}`);
|
|
95
|
+
const fields = Object.entries(properties).map(([key, schema]) => `${JSON.stringify(key)}${required.includes(key) ? "" : "?"}: ${child(schema, key)};`);
|
|
96
|
+
if (value.additionalProperties !== false) {
|
|
97
|
+
// A schema-valued index signature could conflict with named fields; reject it explicitly.
|
|
98
|
+
if (value.additionalProperties !== undefined &&
|
|
99
|
+
value.additionalProperties !== true)
|
|
100
|
+
throw new Error(`Unsupported additionalProperties at ${path}`);
|
|
101
|
+
fields.push("[key: string]: unknown;");
|
|
102
|
+
}
|
|
103
|
+
return `{ ${fields.join(" ")} }`;
|
|
104
|
+
}
|
|
105
|
+
default:
|
|
106
|
+
throw new Error(`Schema needs a supported explicit type at ${path}`);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
exports.programSchemaType = programSchemaType;
|
|
110
|
+
function generateActionProgramTypes(definition, schemas) {
|
|
111
|
+
const resolve = (ref) => {
|
|
112
|
+
const matches = schemas.filter((entry) => (0, declarative_control_compiler_1.sameRevisionRef)(entry.definitionRevisionRef, ref));
|
|
113
|
+
if (matches.length !== 1 ||
|
|
114
|
+
(0, declarative_control_compiler_1.canonicalContentHash)(matches[0].definition) !== ref.contentHash)
|
|
115
|
+
throw new Error(`Missing exact Schema ${ref.id}`);
|
|
116
|
+
return programSchemaType(matches[0].definition.document);
|
|
117
|
+
};
|
|
118
|
+
const formRefs = new Map([
|
|
119
|
+
definition.inputSchemaRevisionRef,
|
|
120
|
+
definition.resultSchemaRevisionRef,
|
|
121
|
+
...definition.dependencies.flatMap((dep) => [
|
|
122
|
+
dep.inputSchemaRevisionRef,
|
|
123
|
+
dep.resultSchemaRevisionRef,
|
|
124
|
+
]),
|
|
125
|
+
].map((ref) => [ref.id, ref]));
|
|
126
|
+
for (const ref of [
|
|
127
|
+
definition.inputSchemaRevisionRef,
|
|
128
|
+
definition.resultSchemaRevisionRef,
|
|
129
|
+
...definition.dependencies.flatMap((dep) => [
|
|
130
|
+
dep.inputSchemaRevisionRef,
|
|
131
|
+
dep.resultSchemaRevisionRef,
|
|
132
|
+
]),
|
|
133
|
+
]) {
|
|
134
|
+
if (!(0, declarative_control_compiler_1.sameRevisionRef)(formRefs.get(ref.id), ref))
|
|
135
|
+
throw new Error("Ambiguous form Schema revision " + ref.id);
|
|
136
|
+
}
|
|
137
|
+
const forms = "{" +
|
|
138
|
+
[...formRefs]
|
|
139
|
+
.map(([id, ref]) => JSON.stringify(id) + ": " + resolve(ref) + ";")
|
|
140
|
+
.join(" ") +
|
|
141
|
+
"}";
|
|
142
|
+
const states = "{" +
|
|
143
|
+
definition.stateAliases
|
|
144
|
+
.map((entry) => JSON.stringify(entry.alias) +
|
|
145
|
+
": " +
|
|
146
|
+
resolve(entry.schemaRevisionRef) +
|
|
147
|
+
";")
|
|
148
|
+
.join(" ") +
|
|
149
|
+
"}";
|
|
150
|
+
const refresh = definition.refreshAliases
|
|
151
|
+
.map((alias) => JSON.stringify(alias))
|
|
152
|
+
.join(" | ") || "never";
|
|
153
|
+
const capabilityMap = (kind) => `{\n${definition.dependencies
|
|
154
|
+
.filter((dep) => dep.kind === kind)
|
|
155
|
+
.map((dep) => `${JSON.stringify(dep.revisionRef.id)}: {input: ${"Pick<" + resolve(dep.inputSchemaRevisionRef) + ", " + (dep.dynamicInputKeys.map((key) => JSON.stringify(key)).join(" | ") || "never") + ">"}; result: ${resolve(dep.resultSchemaRevisionRef)}};`)
|
|
156
|
+
.join("\n")}\n}`;
|
|
157
|
+
return `// Generated from exact program/schema revisions. Do not edit.\nimport type { ActionProgramContext } from "@inf-monkeys-tech/monkeys";\nexport type Input = ${resolve(definition.inputSchemaRevisionRef)};\nexport type Result = ${resolve(definition.resultSchemaRevisionRef)};\nexport type Queries = ${capabilityMap("query")};\nexport type Commands = ${capabilityMap("command")};\nexport type BaseContext = ActionProgramContext<Queries, Commands, ${forms}, ${states}, ${refresh}>;\nexport type Context = Omit<BaseContext, "ui" | "state"> & {ui: Pick<BaseContext["ui"], ${definition.effects
|
|
158
|
+
.filter((effect) => !effect.startsWith("state."))
|
|
159
|
+
.map((effect) => JSON.stringify(effect))
|
|
160
|
+
.join(" | ") || "never"}>; state: Pick<BaseContext["state"], ${definition.effects
|
|
161
|
+
.filter((effect) => effect.startsWith("state."))
|
|
162
|
+
.map((effect) => JSON.stringify(effect.slice(6)))
|
|
163
|
+
.join(" | ") || "never"}>};\nexport type Program = (context: Context, input: Input) => Promise<Result>;\n`;
|
|
164
|
+
}
|
|
165
|
+
exports.generateActionProgramTypes = generateActionProgramTypes;
|
|
166
|
+
/** Validates JSON values without imposing a component render-model object shape. */
|
|
167
|
+
function compileProgramValueValidator(schema, documents = []) {
|
|
168
|
+
const ajv = new _2020_1.default({ strict: false, allErrors: false, coerceTypes: false, removeAdditional: false, useDefaults: false });
|
|
169
|
+
const ids = new Set();
|
|
170
|
+
for (const document of documents)
|
|
171
|
+
if (typeof document.$id === "string" && document.$id !== schema.$id && !ids.has(document.$id)) {
|
|
172
|
+
ajv.addSchema(document);
|
|
173
|
+
ids.add(document.$id);
|
|
174
|
+
}
|
|
175
|
+
return ajv.compile(schema);
|
|
176
|
+
}
|
|
177
|
+
exports.compileProgramValueValidator = compileProgramValueValidator;
|
|
178
|
+
//# sourceMappingURL=action-program-author.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action-program-author.js","sourceRoot":"","sources":["../../src/runtime/action-program-author.ts"],"names":[],"mappings":";;;;;;AAAA,0DAAoC;AAMpC,iFAGwC;AA0CxC,6FAA6F;AAC7F,SAAgB,iBAAiB,CAC/B,MAAe,EACf,IAAI,GAAG,GAAG,EACV,KAAK,GAAG,CAAC;IAET,IACE,KAAK,GAAG,EAAE;QACV,CAAC,MAAM;QACP,OAAO,MAAM,KAAK,QAAQ;QAC1B,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;QAErB,MAAM,IAAI,KAAK,CAAC,yBAAyB,IAAI,EAAE,CAAC,CAAC;IACnD,MAAM,KAAK,GAAG,MAAiC,CAAC;IAChD,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC;QACtB,SAAS;QACT,KAAK;QACL,OAAO;QACP,aAAa;QACb,MAAM;QACN,YAAY;QACZ,UAAU;QACV,sBAAsB;QACtB,OAAO;QACP,MAAM;QACN,OAAO;QACP,OAAO;QACP,OAAO;QACP,WAAW;QACX,W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QAAQ,IAAI,QAAQ,CAAC,GAAG,KAAK,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YAAC,GAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;YAAC,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;QAAC,CAAC;IACpL,OAAO,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;AAC7B,CAAC;AALD,oEAKC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type DeclarativeCreateTemplateRegistration, type DeclarativeProductResourceRegistration, type DeclarativeRouteSpaceRegistration, type DeclarativeSchemaDefinitionRegistration, type DesignCapabilityCatalogArtifact, type DesignCapabilityCatalogEntry, type ProductDeclarativeCapabilityRegistration } from "../contracts/declarative-control-http";
|
|
2
|
-
import { type AccessPolicy, type CompiledRouteClaim, type DeclarativeRouteOwnerIndex, type DeclarativeRouteOwnerIndexEntry, type DeclarativeRouteClaim, type DeclarativeWorkbenchCatalog, type DeclarativeWorkbenchCatalogEntry, type DomainQueryDefinition, type LegacyRouteTakeoverAuthorization, type PermissionAlternativePolicy, type Navigation, type NavigationRelease, type NavigationRuntimeBundle, type Page, type ResolvedPage, type PageRelease, type PageRuntimeBundle, type LegacyPageRuntimeBundle, type RevisionRef, type RouteClaim, type RouteSpace, type StableRef, type TenantScope, type Workbench, type WorkbenchRelease, type WorkbenchRuntimeBundle } from "../contracts/declarative-control";
|
|
2
|
+
import { type ActionProgramDefinition, type AccessPolicy, type CompiledRouteClaim, type DeclarativeRouteOwnerIndex, type DeclarativeRouteOwnerIndexEntry, type DeclarativeRouteClaim, type DeclarativeWorkbenchCatalog, type DeclarativeWorkbenchCatalogEntry, type DomainQueryDefinition, type LegacyRouteTakeoverAuthorization, type PermissionAlternativePolicy, type Navigation, type NavigationRelease, type NavigationRuntimeBundle, type Page, type ResolvedPage, type PageRelease, type PageRuntimeBundle, type LegacyPageRuntimeBundle, type ReleaseDependency, type RevisionRef, type RouteClaim, type RouteSpace, type StableRef, type TenantScope, type Workbench, type WorkbenchRelease, type WorkbenchRuntimeBundle } from "../contracts/declarative-control";
|
|
3
3
|
import type { DomainCommandDefinition } from "../contracts/semantic";
|
|
4
4
|
export type DeclarativeControlCompilationErrorCode = "AUDIENCE_WIDER_THAN_TARGET" | "CAPABILITY_BINDING_MISMATCH" | "CAPABILITY_NOT_EDITOR_ELIGIBLE" | "COMMAND_DEFINITION_MISMATCH" | "CROSS_TENANT_REFERENCE" | "DEPENDENCY_MISSING" | "DESIGN_CATALOG_INVALID" | "HEAD_CONFLICT" | "NAV_DEPTH_EXCEEDED" | "NAV_ACTION_INPUT_INVALID" | "NAV_NODE_LIMIT_EXCEEDED" | "NAV_TARGET_UNRELEASED" | "PAGE_ENTRY_TARGET_UNRELEASED" | "PORT_TYPE_MISMATCH" | "PRODUCT_CAPABILITY_CATALOG_INVALID" | "QUERY_DEFINITION_MISMATCH" | "RENDER_DEPTH_EXCEEDED" | "RENDER_TREE_INVALID" | "RENDER_NODE_LIMIT_EXCEEDED" | "RELEASE_OPERATION_INVALID" | "RELEASE_VALIDATION_FAILED" | "REGISTRY_CONFLICT" | "REVISION_MISMATCH" | "ROUTE_CONFLICT" | "ROUTE_RESERVED" | "ROUTE_TAKEOVER_INVALID" | "SCHEMA_DEFINITION_MISMATCH" | "ROUTE_SPACE_MISSING" | "ROUTE_SPACE_MISMATCH" | "SHELL_CHROME_UNAVAILABLE" | "SHELL_REVISION_MISMATCH" | "SHELL_SURFACE_MISMATCH" | "WORKBENCH_INSTANCE_LIMIT_EXCEEDED" | "WORKBENCH_RELEASE_SET_INVALID" | "WORKBENCH_TEMPLATE_UNRELEASABLE";
|
|
5
5
|
export declare class DeclarativeControlCompilationError extends Error {
|
|
@@ -34,6 +34,10 @@ export interface DeclarativeCapabilityRegistration {
|
|
|
34
34
|
outputPorts: readonly CapabilityPortRegistration[];
|
|
35
35
|
allowedSideEffects: readonly ("network" | "storage" | "navigation" | "clipboard" | "worker" | "websocket")[];
|
|
36
36
|
}
|
|
37
|
+
export interface ActionProgramRegistration {
|
|
38
|
+
definitionRevisionRef: RevisionRef;
|
|
39
|
+
definition: ActionProgramDefinition;
|
|
40
|
+
}
|
|
37
41
|
export interface DomainQueryRegistration {
|
|
38
42
|
definitionRevisionRef: RevisionRef;
|
|
39
43
|
definition: DomainQueryDefinition;
|
|
@@ -57,6 +61,7 @@ export interface ResolvePageInput {
|
|
|
57
61
|
productResources?: readonly DeclarativeProductResourceRegistration[];
|
|
58
62
|
capabilityRegistry: readonly DeclarativeCapabilityRegistration[];
|
|
59
63
|
domainQueryRegistry?: readonly DomainQueryRegistration[];
|
|
64
|
+
programRegistry?: readonly ActionProgramRegistration[];
|
|
60
65
|
domainCommandRegistry?: readonly DomainCommandRegistration[];
|
|
61
66
|
schemaRegistry?: readonly DeclarativeSchemaDefinitionRegistration[];
|
|
62
67
|
targetRegistry?: readonly NavigationRouteTargetRegistration[];
|
|
@@ -110,6 +115,7 @@ export interface CompilePageRuntimeBundleInput {
|
|
|
110
115
|
limits: DeclarativeControlCompileLimits;
|
|
111
116
|
capabilityRegistry: readonly DeclarativeCapabilityRegistration[];
|
|
112
117
|
domainQueryRegistry?: readonly DomainQueryRegistration[];
|
|
118
|
+
programRegistry?: readonly ActionProgramRegistration[];
|
|
113
119
|
targetRegistry?: readonly NavigationRouteTargetRegistration[];
|
|
114
120
|
shellRegistration: DeclarativeProductResourceRegistration;
|
|
115
121
|
}
|
|
@@ -239,4 +245,6 @@ export declare const resolveWorkbenchEntry: (input: {
|
|
|
239
245
|
requestedWorkbenchId?: string;
|
|
240
246
|
isAllowed: (bundle: WorkbenchRuntimeBundle) => boolean;
|
|
241
247
|
}) => WorkbenchEntryResolution;
|
|
248
|
+
export declare const programDependencies: (definition: ActionProgramDefinition) => ReleaseDependency[];
|
|
249
|
+
export declare function assertProgramRegistration(registration: ActionProgramRegistration, scope: TenantScope, surface: string, path?: string): void;
|
|
242
250
|
//# sourceMappingURL=declarative-control-compiler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"declarative-control-compiler.d.ts","sourceRoot":"","sources":["../../src/runtime/declarative-control-compiler.ts"],"names":[],"mappings":"AAEA,OAAO,EAKL,KAAK,qCAAqC,EAC1C,KAAK,sCAAsC,EAC3C,KAAK,iCAAiC,EACtC,KAAK,uCAAuC,EAC5C,KAAK,+BAA+B,EACpC,KAAK,4BAA4B,EACjC,KAAK,wCAAwC,EAC9C,MAAM,uCAAuC,CAAC;AAG/C,OAAO,
|
|
1
|
+
{"version":3,"file":"declarative-control-compiler.d.ts","sourceRoot":"","sources":["../../src/runtime/declarative-control-compiler.ts"],"names":[],"mappings":"AAEA,OAAO,EAKL,KAAK,qCAAqC,EAC1C,KAAK,sCAAsC,EAC3C,KAAK,iCAAiC,EACtC,KAAK,uCAAuC,EAC5C,KAAK,+BAA+B,EACpC,KAAK,4BAA4B,EACjC,KAAK,wCAAwC,EAC9C,MAAM,uCAAuC,CAAC;AAG/C,OAAO,EAEL,KAAK,uBAAuB,EA6B5B,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,0BAA0B,EAC/B,KAAK,+BAA+B,EACpC,KAAK,qBAAqB,EAC1B,KAAK,2BAA2B,EAChC,KAAK,gCAAgC,EACrC,KAAK,qBAAqB,EAC1B,KAAK,gCAAgC,EACrC,KAAK,2BAA2B,EAChC,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,IAAI,EACT,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,gBAAgB,EACrB,KAAK,sBAA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C,YAAY,EAAE,yBAAyB,EACvC,KAAK,EAAE,WAAW,EAClB,OAAO,EAAE,MAAM,EACf,IAAI,SAAY,QAuBjB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resolveWorkbenchEntry = exports.validateWorkbenchRuntimeSet = exports.compileNavigationRuntimeBundle = exports.compileWorkbenchRuntimeBundle = exports.compilePageRuntimeBundle = exports.compileLegacyPageRuntimeBundle = exports.resolvePage = exports.materializeRouteSpacePath = exports.matchCompiledRouteClaim = exports.compileRouteClaims = exports.compiledRouteClaimsOverlap = exports.accessPolicyChainImplies = exports.parseExactDesignCapabilityCatalogArtifact = exports.parseExactProductDeclarativeCapabilityRegistration = exports.compileDesignCapabilityCatalogArtifact = exports.designCapabilityCatalogArtifactHash = exports.declarativeProductResourceRevisionHash = exports.declarativeProductResourceSourceHash = exports.declarativeRouteSpaceRevisionHash = exports.declarativeRouteSpaceSourceHash = exports.declarativeCreateTemplateRevisionHash = exports.declarativeCreateTemplateSourceHash = exports.compileDeclarativeWorkbenchCatalog = exports.compileDeclarativeRouteOwnerIndex = exports.permissionAlternativePolicyAllows = exports.parseExactLegacyRouteTakeoverAuthorization = exports.legacyRouteTakeoverAuthorizationHash = exports.compileLegacyRouteTakeoverAuthorization = exports.declarativeWorkbenchCatalogProjectionId = exports.declarativeRouteOwnerIndexProjectionId = exports.declarativeRuntimeProjectionId = exports.canonicalContentHash = exports.sameSchemaContract = exports.sameRevisionRef = exports.sameStableRef = exports.revisionRefKey = exports.stableRefKey = exports.DeclarativeControlCompilationError = void 0;
|
|
3
|
+
exports.assertProgramRegistration = exports.programDependencies = exports.resolveWorkbenchEntry = exports.validateWorkbenchRuntimeSet = exports.compileNavigationRuntimeBundle = exports.compileWorkbenchRuntimeBundle = exports.compilePageRuntimeBundle = exports.compileLegacyPageRuntimeBundle = exports.resolvePage = exports.materializeRouteSpacePath = exports.matchCompiledRouteClaim = exports.compileRouteClaims = exports.compiledRouteClaimsOverlap = exports.accessPolicyChainImplies = exports.parseExactDesignCapabilityCatalogArtifact = exports.parseExactProductDeclarativeCapabilityRegistration = exports.compileDesignCapabilityCatalogArtifact = exports.designCapabilityCatalogArtifactHash = exports.declarativeProductResourceRevisionHash = exports.declarativeProductResourceSourceHash = exports.declarativeRouteSpaceRevisionHash = exports.declarativeRouteSpaceSourceHash = exports.declarativeCreateTemplateRevisionHash = exports.declarativeCreateTemplateSourceHash = exports.compileDeclarativeWorkbenchCatalog = exports.compileDeclarativeRouteOwnerIndex = exports.permissionAlternativePolicyAllows = exports.parseExactLegacyRouteTakeoverAuthorization = exports.legacyRouteTakeoverAuthorizationHash = exports.compileLegacyRouteTakeoverAuthorization = exports.declarativeWorkbenchCatalogProjectionId = exports.declarativeRouteOwnerIndexProjectionId = exports.declarativeRuntimeProjectionId = exports.canonicalContentHash = exports.sameSchemaContract = exports.sameRevisionRef = exports.sameStableRef = exports.revisionRefKey = exports.stableRefKey = exports.DeclarativeControlCompilationError = void 0;
|
|
4
4
|
const common_1 = require("../contracts/common");
|
|
5
5
|
const declarative_control_http_1 = require("../contracts/declarative-control-http");
|
|
6
6
|
const render_tree_compiler_1 = require("./render-tree-compiler");
|
|
@@ -871,6 +871,17 @@ const pageDependencies = (page, compilerRevisionRef) => [
|
|
|
871
871
|
]
|
|
872
872
|
: []),
|
|
873
873
|
]),
|
|
874
|
+
...(page.programBindings ?? []).flatMap((binding) => [
|
|
875
|
+
{
|
|
876
|
+
role: "action-program",
|
|
877
|
+
revisionRef: binding.programRevisionRef,
|
|
878
|
+
},
|
|
879
|
+
{
|
|
880
|
+
role: "schema",
|
|
881
|
+
revisionRef: binding.sourceIntentSchemaRevisionRef,
|
|
882
|
+
},
|
|
883
|
+
...(0, exports.programDependencies)(binding.definition),
|
|
884
|
+
]),
|
|
874
885
|
...page.actionBindings.flatMap((binding) => [
|
|
875
886
|
{ role: "action", revisionRef: binding.commandRevisionRef },
|
|
876
887
|
{
|
|
@@ -1041,6 +1052,7 @@ const resolvePage = (input) => {
|
|
|
1041
1052
|
const capabilityInstances = [];
|
|
1042
1053
|
const queryBindings = [];
|
|
1043
1054
|
const actionBindings = [];
|
|
1055
|
+
const programBindings = [];
|
|
1044
1056
|
const interactionBindings = [];
|
|
1045
1057
|
const nodesById = new Map();
|
|
1046
1058
|
const indexNode = (node) => {
|
|
@@ -1207,6 +1219,55 @@ const resolvePage = (input) => {
|
|
|
1207
1219
|
resultSchemaRevisionRef,
|
|
1208
1220
|
});
|
|
1209
1221
|
}
|
|
1222
|
+
for (const [index, binding] of (node.programActions ?? []).entries()) {
|
|
1223
|
+
const path = `page.body.${node.id}.programActions[${index}]`;
|
|
1224
|
+
const matches = (input.programRegistry ?? []).filter((entry) => entry.definition.programId === binding.program);
|
|
1225
|
+
if (matches.length !== 1)
|
|
1226
|
+
throw new DeclarativeControlCompilationError("DEPENDENCY_MISSING", path, "Expected one exact program registration.");
|
|
1227
|
+
const program = matches[0];
|
|
1228
|
+
const definition = declarative_control_1.ActionProgramDefinitionSchema.parse(program.definition);
|
|
1229
|
+
assertProgramRegistration(program, page.tenantScope, page.surface, path);
|
|
1230
|
+
const port = registration.outputPorts.find((candidate) => candidate.name === binding.port);
|
|
1231
|
+
if (!port)
|
|
1232
|
+
throw new DeclarativeControlCompilationError("PORT_TYPE_MISMATCH", path, "Program source port is not registered.");
|
|
1233
|
+
if ((node.actions ?? []).some((action) => action.port === binding.port) ||
|
|
1234
|
+
programBindings.some((action) => action.source.capabilityInstanceId === node.id &&
|
|
1235
|
+
action.source.port === binding.port))
|
|
1236
|
+
throw new DeclarativeControlCompilationError("CAPABILITY_BINDING_MISMATCH", path, "A program output port must have one exclusive action binding.");
|
|
1237
|
+
for (const dep of definition.dependencies) {
|
|
1238
|
+
const registrations = dep.kind === "query" ? queryRegistrations : commandRegistrations;
|
|
1239
|
+
const actual = registrations.find((entry) => (0, exports.sameRevisionRef)(entry.revisionRef, dep.revisionRef));
|
|
1240
|
+
if (!actual ||
|
|
1241
|
+
(0, exports.canonicalContentHash)(actual.definition) !==
|
|
1242
|
+
dep.revisionRef.contentHash ||
|
|
1243
|
+
("sensitiveInputPaths" in actual.definition &&
|
|
1244
|
+
!!actual.definition.sensitiveInputPaths?.length) ||
|
|
1245
|
+
("sensitiveResultPaths" in actual.definition &&
|
|
1246
|
+
!!actual.definition.sensitiveResultPaths?.length) ||
|
|
1247
|
+
("queryId" in actual.definition
|
|
1248
|
+
? !(0, exports.sameRevisionRef)(actual.definition.inputSchemaRevisionRef, dep.inputSchemaRevisionRef) ||
|
|
1249
|
+
!(0, exports.sameRevisionRef)(actual.definition.resultSchemaRevisionRef, dep.resultSchemaRevisionRef)
|
|
1250
|
+
: actual.definition.inputSchemaRef !==
|
|
1251
|
+
dep.inputSchemaRevisionRef.id ||
|
|
1252
|
+
actual.definition.outputSchemaRef !==
|
|
1253
|
+
dep.resultSchemaRevisionRef.id))
|
|
1254
|
+
throw new DeclarativeControlCompilationError("DEPENDENCY_MISSING", path, "Program capability/schema revision is not registered.");
|
|
1255
|
+
}
|
|
1256
|
+
for (const ref of (0, exports.programDependencies)(definition)
|
|
1257
|
+
.filter((dep) => dep.role === "schema")
|
|
1258
|
+
.map((dep) => dep.revisionRef)) {
|
|
1259
|
+
if (!schemaRegistrations.some((entry) => (0, exports.sameRevisionRef)(entry.revisionRef, ref)))
|
|
1260
|
+
throw new DeclarativeControlCompilationError("SCHEMA_DEFINITION_MISMATCH", path, "Program requires an exact registered Schema.");
|
|
1261
|
+
}
|
|
1262
|
+
const { program: _program, port: _port, ...rest } = binding;
|
|
1263
|
+
programBindings.push({
|
|
1264
|
+
...rest,
|
|
1265
|
+
source: { capabilityInstanceId: node.id, port: binding.port },
|
|
1266
|
+
sourceIntentSchemaRevisionRef: port.schemaRevisionRef,
|
|
1267
|
+
programRevisionRef: program.definitionRevisionRef,
|
|
1268
|
+
definition,
|
|
1269
|
+
});
|
|
1270
|
+
}
|
|
1210
1271
|
for (const [index, binding] of (node.on ?? []).entries()) {
|
|
1211
1272
|
const port = registration.outputPorts.find((candidate) => candidate.name === binding.port);
|
|
1212
1273
|
if (!port) {
|
|
@@ -1280,6 +1341,7 @@ const resolvePage = (input) => {
|
|
|
1280
1341
|
ontologyBindings: [],
|
|
1281
1342
|
...(queryBindings.length ? { queryBindings } : {}),
|
|
1282
1343
|
actionBindings,
|
|
1344
|
+
...(programBindings.length ? { programBindings } : {}),
|
|
1283
1345
|
pageAccessPolicy: page.access,
|
|
1284
1346
|
managementAccess: page.managementAccess,
|
|
1285
1347
|
tokenRevisionRefs,
|
|
@@ -1531,7 +1593,16 @@ const compilePageRuntimeBundleInternal = (input, legacy) => {
|
|
|
1531
1593
|
throw new DeclarativeControlCompilationError("PORT_TYPE_MISMATCH", `interactionBindings[${index}].sourceIntentSchemaRevisionRef`, "Interaction source intent does not match the registered capability output port.");
|
|
1532
1594
|
}
|
|
1533
1595
|
});
|
|
1534
|
-
page.
|
|
1596
|
+
(page.programBindings ?? []).forEach((binding, index) => {
|
|
1597
|
+
const path = `programBindings[${index}]`;
|
|
1598
|
+
const registration = (input.programRegistry ?? []).find((entry) => (0, exports.sameRevisionRef)(entry.definitionRevisionRef, binding.programRevisionRef));
|
|
1599
|
+
if (!registration ||
|
|
1600
|
+
(0, exports.canonicalContentHash)(registration.definition) !==
|
|
1601
|
+
(0, exports.canonicalContentHash)(binding.definition))
|
|
1602
|
+
throw new DeclarativeControlCompilationError("DEPENDENCY_MISSING", path, "Exact program registration does not match binding.");
|
|
1603
|
+
assertProgramRegistration(registration, page.tenantScope, release.target.surface, path);
|
|
1604
|
+
});
|
|
1605
|
+
[...page.actionBindings, ...(page.programBindings ?? [])].forEach((binding, index) => {
|
|
1535
1606
|
const instance = page.capabilityInstances.find((candidate) => candidate.instanceId === binding.source.capabilityInstanceId);
|
|
1536
1607
|
const registration = instance &&
|
|
1537
1608
|
registrationsByPair.get(`${(0, exports.revisionRefKey)(instance.capabilityRevisionRef)}:${(0, exports.revisionRefKey)(instance.providerRevisionRef)}`);
|
|
@@ -1657,6 +1728,9 @@ const compilePageRuntimeBundleInternal = (input, legacy) => {
|
|
|
1657
1728
|
ontologyBindings: page.ontologyBindings,
|
|
1658
1729
|
queryBindings: page.queryBindings,
|
|
1659
1730
|
actionBindings: page.actionBindings,
|
|
1731
|
+
...(page.programBindings?.length
|
|
1732
|
+
? { programBindings: page.programBindings }
|
|
1733
|
+
: {}),
|
|
1660
1734
|
pageAccessPolicy: page.pageAccessPolicy,
|
|
1661
1735
|
tokenRevisionRefs: page.tokenRevisionRefs,
|
|
1662
1736
|
performanceBudgetRef: page.performanceBudgetRef,
|
|
@@ -1901,7 +1975,9 @@ const compileNavigationRuntimeBundle = (input) => {
|
|
|
1901
1975
|
const releaseRevisionRef = declarative_control_1.RevisionRefSchema.parse(input.releaseRevisionRef);
|
|
1902
1976
|
const compilerRevisionRef = declarative_control_1.RevisionRefSchema.parse(input.compilerRevisionRef);
|
|
1903
1977
|
const scope = declarative_control_1.TenantScopeSchema.parse(navigation.tenantScope);
|
|
1904
|
-
const verifiedKernelPageReferences = [
|
|
1978
|
+
const verifiedKernelPageReferences = [
|
|
1979
|
+
...(input.verifiedKernelPageReferences ?? []),
|
|
1980
|
+
].map((reference, index) => {
|
|
1905
1981
|
const parsed = declarative_control_1.RevisionRefSchema.parse(reference);
|
|
1906
1982
|
if (release.target.surface !== "kernel" ||
|
|
1907
1983
|
parsed.visibility !== "tenant" ||
|
|
@@ -2028,7 +2104,8 @@ const compileNavigationRuntimeBundle = (input) => {
|
|
|
2028
2104
|
node.targetRef.kind === "page" &&
|
|
2029
2105
|
((unavailable && (0, exports.sameStableRef)(unavailable.stableTargetRef, node.targetRef)) ||
|
|
2030
2106
|
(released && (0, exports.sameStableRef)(released.stableTargetRef, node.targetRef)))) {
|
|
2031
|
-
if (!released ||
|
|
2107
|
+
if (!released ||
|
|
2108
|
+
!verifiedKernelPageReferenceKeys.has((0, exports.revisionRefKey)(released.targetRevisionRef))) {
|
|
2032
2109
|
assertTenantCompatible(node.targetRef, scope, `nodes[${index}].targetRef`);
|
|
2033
2110
|
}
|
|
2034
2111
|
if (unavailable?.accessPolicy &&
|
|
@@ -2052,9 +2129,14 @@ const compileNavigationRuntimeBundle = (input) => {
|
|
|
2052
2129
|
if (!registration ||
|
|
2053
2130
|
(!released && !(currentPage && unavailable && (0, exports.sameStableRef)(unavailable.stableTargetRef, node.targetRef))) ||
|
|
2054
2131
|
!(0, exports.sameStableRef)(registration.stableTargetRef, stableFromRevision(registration.targetRevisionRef)) ||
|
|
2055
|
-
(released &&
|
|
2056
|
-
|
|
2057
|
-
(!currentPage &&
|
|
2132
|
+
(released &&
|
|
2133
|
+
!(0, exports.sameStableRef)(registration.stableTargetRef, released.stableTargetRef)) ||
|
|
2134
|
+
(!currentPage &&
|
|
2135
|
+
released &&
|
|
2136
|
+
!(0, exports.sameRevisionRef)(registration.targetRevisionRef, released.targetRevisionRef)) ||
|
|
2137
|
+
(!currentPage &&
|
|
2138
|
+
released &&
|
|
2139
|
+
registration.kind === "route" &&
|
|
2058
2140
|
(Boolean(registration.releaseRevisionRef) !==
|
|
2059
2141
|
Boolean(released.releaseRevisionRef) ||
|
|
2060
2142
|
(registration.releaseRevisionRef &&
|
|
@@ -2251,4 +2333,38 @@ const resolveWorkbenchEntry = (input) => {
|
|
|
2251
2333
|
return { status: "forbidden", workbenchId: "" };
|
|
2252
2334
|
};
|
|
2253
2335
|
exports.resolveWorkbenchEntry = resolveWorkbenchEntry;
|
|
2336
|
+
const programDependencies = (definition) => [
|
|
2337
|
+
...[
|
|
2338
|
+
definition.inputSchemaRevisionRef,
|
|
2339
|
+
definition.resultSchemaRevisionRef,
|
|
2340
|
+
...definition.stateAliases.map((entry) => entry.schemaRevisionRef),
|
|
2341
|
+
].map((revisionRef) => ({ role: "schema", revisionRef })),
|
|
2342
|
+
...definition.dependencies.flatMap((dep) => [
|
|
2343
|
+
{
|
|
2344
|
+
role: dep.kind === "query"
|
|
2345
|
+
? "query-definition"
|
|
2346
|
+
: "action",
|
|
2347
|
+
revisionRef: dep.revisionRef,
|
|
2348
|
+
},
|
|
2349
|
+
{ role: "schema", revisionRef: dep.inputSchemaRevisionRef },
|
|
2350
|
+
{ role: "schema", revisionRef: dep.resultSchemaRevisionRef },
|
|
2351
|
+
]),
|
|
2352
|
+
];
|
|
2353
|
+
exports.programDependencies = programDependencies;
|
|
2354
|
+
function assertProgramRegistration(registration, scope, surface, path = "program") {
|
|
2355
|
+
const definition = declarative_control_1.ActionProgramDefinitionSchema.parse(registration.definition);
|
|
2356
|
+
const ref = declarative_control_1.RevisionRefSchema.parse(registration.definitionRevisionRef);
|
|
2357
|
+
if (ref.kind !== "action-program" ||
|
|
2358
|
+
ref.id !== definition.programId ||
|
|
2359
|
+
ref.ownerRepo !== definition.ownerRepo ||
|
|
2360
|
+
ref.visibility !== "tenant" ||
|
|
2361
|
+
(0, exports.canonicalContentHash)(ref.tenantScope) !== (0, exports.canonicalContentHash)(scope) ||
|
|
2362
|
+
(0, exports.canonicalContentHash)(definition.tenantScope) !==
|
|
2363
|
+
(0, exports.canonicalContentHash)(scope) ||
|
|
2364
|
+
ref.schemaVersion !== definition.schemaVersion ||
|
|
2365
|
+
ref.contentHash !== (0, exports.canonicalContentHash)(definition) ||
|
|
2366
|
+
definition.supportedSurface !== surface)
|
|
2367
|
+
throw new DeclarativeControlCompilationError("CROSS_TENANT_REFERENCE", path, "Program identity, scope, surface or content hash does not match its exact reference.");
|
|
2368
|
+
}
|
|
2369
|
+
exports.assertProgramRegistration = assertProgramRegistration;
|
|
2254
2370
|
//# sourceMappingURL=declarative-control-compiler.js.map
|