@spine-event-engine/proto-tools 2.0.0-snapshot.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +102 -0
  3. package/REFERENCE.md +80 -0
  4. package/bin/spine-proto.mjs +2 -0
  5. package/dist/src/cli/spine-proto-bootstrap.d.ts +4 -0
  6. package/dist/src/cli/spine-proto-bootstrap.d.ts.map +1 -0
  7. package/dist/src/cli/spine-proto-bootstrap.js +52 -0
  8. package/dist/src/cli/spine-proto-bootstrap.js.map +1 -0
  9. package/dist/src/cli/spine-proto.d.ts +3 -0
  10. package/dist/src/cli/spine-proto.d.ts.map +1 -0
  11. package/dist/src/cli/spine-proto.js +32 -0
  12. package/dist/src/cli/spine-proto.js.map +1 -0
  13. package/dist/src/generation/authored-interface-provider.d.ts +28 -0
  14. package/dist/src/generation/authored-interface-provider.d.ts.map +1 -0
  15. package/dist/src/generation/authored-interface-provider.js +244 -0
  16. package/dist/src/generation/authored-interface-provider.js.map +1 -0
  17. package/dist/src/generation/generated-source-policy.d.ts +21 -0
  18. package/dist/src/generation/generated-source-policy.d.ts.map +1 -0
  19. package/dist/src/generation/generated-source-policy.js +126 -0
  20. package/dist/src/generation/generated-source-policy.js.map +1 -0
  21. package/dist/src/generation/generation-reuse.mjs +84 -0
  22. package/dist/src/generation/generator.d.ts +195 -0
  23. package/dist/src/generation/generator.d.ts.map +1 -0
  24. package/dist/src/generation/generator.js +566 -0
  25. package/dist/src/generation/generator.js.map +1 -0
  26. package/dist/src/generation/handler-generator.d.ts +7 -0
  27. package/dist/src/generation/handler-generator.d.ts.map +1 -0
  28. package/dist/src/generation/handler-generator.js +55 -0
  29. package/dist/src/generation/handler-generator.js.map +1 -0
  30. package/dist/src/generation/interface-generator.d.ts +21 -0
  31. package/dist/src/generation/interface-generator.d.ts.map +1 -0
  32. package/dist/src/generation/interface-generator.js +277 -0
  33. package/dist/src/generation/interface-generator.js.map +1 -0
  34. package/dist/src/generation/interface-provider.d.ts +30 -0
  35. package/dist/src/generation/interface-provider.d.ts.map +1 -0
  36. package/dist/src/generation/interface-provider.js +15 -0
  37. package/dist/src/generation/interface-provider.js.map +1 -0
  38. package/dist/src/generation/rejection-generator.d.ts +9 -0
  39. package/dist/src/generation/rejection-generator.d.ts.map +1 -0
  40. package/dist/src/generation/rejection-generator.js +62 -0
  41. package/dist/src/generation/rejection-generator.js.map +1 -0
  42. package/dist/src/generation/source-view.d.ts +103 -0
  43. package/dist/src/generation/source-view.d.ts.map +1 -0
  44. package/dist/src/generation/source-view.js +298 -0
  45. package/dist/src/generation/source-view.js.map +1 -0
  46. package/dist/src/index.d.ts +139 -0
  47. package/dist/src/index.d.ts.map +1 -0
  48. package/dist/src/index.js +546 -0
  49. package/dist/src/index.js.map +1 -0
  50. package/dist/src/io/atomic-manifest.d.ts +32 -0
  51. package/dist/src/io/atomic-manifest.d.ts.map +1 -0
  52. package/dist/src/io/atomic-manifest.js +56 -0
  53. package/dist/src/io/atomic-manifest.js.map +1 -0
  54. package/dist/src/io/manifest-reader.d.ts +8 -0
  55. package/dist/src/io/manifest-reader.d.ts.map +1 -0
  56. package/dist/src/io/manifest-reader.js +19 -0
  57. package/dist/src/io/manifest-reader.js.map +1 -0
  58. package/dist/src/model/model-graph.d.ts +68 -0
  59. package/dist/src/model/model-graph.d.ts.map +1 -0
  60. package/dist/src/model/model-graph.js +220 -0
  61. package/dist/src/model/model-graph.js.map +1 -0
  62. package/dist/src/model/npm-package-name.d.ts +7 -0
  63. package/dist/src/model/npm-package-name.d.ts.map +1 -0
  64. package/dist/src/model/npm-package-name.js +33 -0
  65. package/dist/src/model/npm-package-name.js.map +1 -0
  66. package/dist/src/model/registry-dependency.d.ts +10 -0
  67. package/dist/src/model/registry-dependency.d.ts.map +1 -0
  68. package/dist/src/model/registry-dependency.js +66 -0
  69. package/dist/src/model/registry-dependency.js.map +1 -0
  70. package/dist/tsconfig.tsbuildinfo +1 -0
  71. package/package.json +51 -0
  72. package/scripts/clean-dist.mjs +7 -0
  73. package/scripts/copy-runtime-modules.mjs +23 -0
@@ -0,0 +1,55 @@
1
+ /*
2
+ * Copyright 2026, CodeMatters. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5
+ * in compliance with the License. You may obtain a copy of the License at
6
+ *
7
+ * https://www.apache.org/licenses/LICENSE-2.0
8
+ *
9
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
10
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11
+ * or implied. See the License for the specific language governing permissions and limitations under
12
+ * the License.
13
+ */
14
+ import { generateHandlerRegistry } from "@spine-event-engine/server/internal/handler-codegen";
15
+ import { existsSync, readFileSync, writeFileSync } from "node:fs";
16
+ import { join } from "node:path";
17
+ import { ProtoConfig, ProtoManifest } from "../index.js";
18
+ import { generatedSource } from "./generated-source-policy.js";
19
+ /**
20
+ * Generates application handler registries.
21
+ */
22
+ export const HandlerGeneration = Object.freeze({
23
+ // prettier-ignore
24
+ /**
25
+ * Generates an application's conventional handler registry from its TypeScript project.
26
+ *
27
+ * @param applicationRoot The application package root.
28
+ * @returns Nothing.
29
+ */
30
+ generate(applicationRoot) {
31
+ const config = existsSync(join(applicationRoot, "spine-proto.json"))
32
+ ? ProtoConfig.read(applicationRoot)
33
+ : undefined;
34
+ const sources = config?.mode === "application"
35
+ ? config.modelPackages.flatMap((modelPackage) => {
36
+ const modelRoot = join(applicationRoot, "node_modules", modelPackage);
37
+ const manifest = join(modelRoot, "spine-proto-manifest.json");
38
+ if (existsSync(manifest))
39
+ return ProtoManifest.read(modelRoot).protoFiles;
40
+ const module = join(modelRoot, "dist", "generated", "proto-module.js");
41
+ return existsSync(module)
42
+ ? [...readFileSync(module, "utf8").matchAll(/^ \* Source Proto: (.+)$/gmu)].map((match) => match[1] ?? "")
43
+ : [];
44
+ })
45
+ : [];
46
+ if (sources.length === 0)
47
+ throw new Error("spine-proto: handler generation requires model Proto provenance");
48
+ generateHandlerRegistry({ appRoot: applicationRoot }, {
49
+ write(path, source) {
50
+ writeFileSync(path, generatedSource(source, sources), "utf8");
51
+ },
52
+ });
53
+ },
54
+ });
55
+ //# sourceMappingURL=handler-generator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler-generator.js","sourceRoot":"","sources":["../../../src/generation/handler-generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,qDAAqD,CAAC;AAC9F,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/D;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAC5B,MAAM,CAAC,MAAM,CAAC;IACZ,kBAAkB;IAElB;;;;;OAKG;IACH,QAAQ,CAAC,eAAuB;QAC9B,MAAM,MAAM,GAAG,UAAU,CAAC,IAAI,CAAC,eAAe,EAAE,kBAAkB,CAAC,CAAC;YAClE,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,eAAe,CAAC;YACnC,CAAC,CAAC,SAAS,CAAC;QACd,MAAM,OAAO,GAAG,MAAM,EAAE,IAAI,KAAK,aAAa;YAC5C,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,YAAoB,EAAE,EAAE;gBACpD,MAAM,SAAS,GAAG,IAAI,CAAC,eAAe,EAAE,cAAc,EAAE,YAAY,CAAC,CAAC;gBACtE,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,EAAE,2BAA2B,CAAC,CAAC;gBAC9D,IAAI,UAAU,CAAC,QAAQ,CAAC;oBAAE,OAAO,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC;gBAC1E,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,iBAAiB,CAAC,CAAC;gBACvE,OAAO,UAAU,CAAC,MAAM,CAAC;oBACvB,CAAC,CAAC,CAAC,GAAG,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,6BAA6B,CAAC,CAAC,CAAC,GAAG,CAC3E,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAC1B;oBACH,CAAC,CAAC,EAAE,CAAC;YACT,CAAC,CAAC;YACJ,CAAC,CAAC,EAAE,CAAC;QACP,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;YACtB,MAAM,IAAI,KAAK,CAAC,iEAAiE,CAAC,CAAC;QACrF,uBAAuB,CACrB,EAAE,OAAO,EAAE,eAAe,EAAE,EAC5B;YACE,KAAK,CAAC,IAAI,EAAE,MAAM;gBAChB,aAAa,CAAC,IAAI,EAAE,eAAe,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC;YAChE,CAAC;SACF,CACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { type Schema } from "@bufbuild/protoplugin";
2
+ import type { InterfaceDeclarationProvider } from "./interface-provider.js";
3
+ import type { ModelSourceView } from "./source-view.js";
4
+ /**
5
+ * Reads the immutable source-view handoff for the post-Buf interface phase.
6
+ *
7
+ * @param cwd Plugin working directory containing its staged `output` tree.
8
+ * @returns A validated source view, or undefined when no handoff was supplied.
9
+ */
10
+ export declare function stagedSourceView(cwd?: string): ModelSourceView | undefined;
11
+ /**
12
+ * Generates file-scoped empty TypeScript interfaces and nominal schema tokens.
13
+ *
14
+ * Provider-resolved authored declarations are emitted when a compatible
15
+ * discovery provider supplies them; unresolved declarations are omitted.
16
+ */
17
+ export declare const InterfaceGenerator: Readonly<{
18
+ generateCompanions(schema: Schema): void;
19
+ generateWithProvider(schema: Schema, provider: InterfaceDeclarationProvider, sourceView?: ModelSourceView): void;
20
+ }>;
21
+ //# sourceMappingURL=interface-generator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interface-generator.d.ts","sourceRoot":"","sources":["../../../src/generation/interface-generator.ts"],"names":[],"mappings":"AAeA,OAAO,EAAqC,KAAK,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAKvF,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAWxD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,GAAE,MAAsB,GAAG,eAAe,GAAG,SAAS,CAsEzF;AAqGD;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC;IACxC,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACzC,oBAAoB,CAClB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,4BAA4B,EACtC,UAAU,CAAC,EAAE,eAAe,GAC3B,IAAI,CAAC;CACT,CAsIC,CAAC"}
@@ -0,0 +1,277 @@
1
+ /*
2
+ * Copyright 2026, CodeMatters. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5
+ * in compliance with the License. You may obtain a copy of the License at
6
+ *
7
+ * https://www.apache.org/licenses/LICENSE-2.0
8
+ *
9
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
10
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11
+ * or implied. See the License for the specific language governing permissions and limitations under
12
+ * the License.
13
+ */
14
+ import { getOption } from "@bufbuild/protobuf";
15
+ import { createEcmaScriptPlugin, runNodeJs } from "@bufbuild/protoplugin";
16
+ import { basename, dirname, isAbsolute, join, relative, resolve } from "node:path";
17
+ import { fileURLToPath } from "node:url";
18
+ import { existsSync, readFileSync } from "node:fs";
19
+ const authoredProviderModule = (await import(import.meta.url.endsWith(".ts")
20
+ ? "./authored-interface-provider.ts"
21
+ : "./authored-interface-provider.js"));
22
+ const { AuthoredInterfaceProvider } = authoredProviderModule;
23
+ const typescriptIdentifier = /^[A-Za-z_$][A-Za-z0-9_$]*$/u;
24
+ /**
25
+ * Reads the immutable source-view handoff for the post-Buf interface phase.
26
+ *
27
+ * @param cwd Plugin working directory containing its staged `output` tree.
28
+ * @returns A validated source view, or undefined when no handoff was supplied.
29
+ */
30
+ export function stagedSourceView(cwd = process.cwd()) {
31
+ const path = join(cwd, ".spine-source-view.json");
32
+ if (!existsSync(path))
33
+ return undefined;
34
+ const value = JSON.parse(readFileSync(path, "utf8"));
35
+ if (value === null || typeof value !== "object")
36
+ throw new Error("spine-proto: invalid staged source view");
37
+ const view = value;
38
+ const expectedStage = resolve(cwd, "output");
39
+ const within = (root, path) => {
40
+ const pathRelative = relative(root, path);
41
+ return pathRelative === "" || (!pathRelative.startsWith("..") && !isAbsolute(pathRelative));
42
+ };
43
+ if (typeof view.packageRoot !== "string" ||
44
+ typeof view.stagedGeneratedRoot !== "string" ||
45
+ typeof view.liveGeneratedRoot !== "string" ||
46
+ !Array.isArray(view.authoredFiles) ||
47
+ !Array.isArray(view.compilerFiles))
48
+ throw new Error("spine-proto: invalid staged source view");
49
+ const packageRoot = view.packageRoot;
50
+ const stagedGeneratedRoot = view.stagedGeneratedRoot;
51
+ const liveGeneratedRoot = view.liveGeneratedRoot;
52
+ const rawAuthoredFiles = view.authoredFiles;
53
+ const rawCompilerFiles = view.compilerFiles;
54
+ const authoredFiles = rawAuthoredFiles.filter((file) => typeof file === "string");
55
+ const compilerFiles = rawCompilerFiles.filter((file) => typeof file === "string");
56
+ const liveParent = dirname(liveGeneratedRoot);
57
+ const liveName = basename(liveGeneratedRoot);
58
+ const transactionStage = join(liveParent, `.${liveName}.stage-`);
59
+ const transactionBackup = join(liveParent, `.${liveName}.`);
60
+ const isTransactionArtifact = (file) => file.startsWith(transactionStage) ||
61
+ (file.startsWith(transactionBackup) && file.includes(".backup"));
62
+ if (!isAbsolute(packageRoot) ||
63
+ resolve(packageRoot) !== packageRoot ||
64
+ !isAbsolute(stagedGeneratedRoot) ||
65
+ resolve(stagedGeneratedRoot) !== stagedGeneratedRoot ||
66
+ stagedGeneratedRoot !== expectedStage ||
67
+ !isAbsolute(liveGeneratedRoot) ||
68
+ resolve(liveGeneratedRoot) !== liveGeneratedRoot ||
69
+ !within(packageRoot, liveGeneratedRoot) ||
70
+ authoredFiles.length !== rawAuthoredFiles.length ||
71
+ compilerFiles.length !== rawCompilerFiles.length ||
72
+ authoredFiles.some((file) => !compilerFiles.includes(file)) ||
73
+ [...authoredFiles, ...compilerFiles].some((file) => !isAbsolute(file) ||
74
+ resolve(file) !== file ||
75
+ !within(packageRoot, file) ||
76
+ within(liveGeneratedRoot, file) ||
77
+ within(stagedGeneratedRoot, file) ||
78
+ isTransactionArtifact(file)))
79
+ throw new Error("spine-proto: invalid staged source view");
80
+ return Object.freeze({
81
+ authoredFiles: Object.freeze(authoredFiles.map((file) => file)),
82
+ compilerFiles: Object.freeze(compilerFiles.map((file) => file)),
83
+ liveGeneratedRoot,
84
+ packageRoot,
85
+ stagedGeneratedRoot,
86
+ });
87
+ }
88
+ const reservedTypeScriptWords = new Set([
89
+ "await",
90
+ "break",
91
+ "case",
92
+ "catch",
93
+ "class",
94
+ "const",
95
+ "continue",
96
+ "debugger",
97
+ "default",
98
+ "delete",
99
+ "do",
100
+ "else",
101
+ "enum",
102
+ "export",
103
+ "extends",
104
+ "false",
105
+ "finally",
106
+ "for",
107
+ "function",
108
+ "if",
109
+ "implements",
110
+ "import",
111
+ "in",
112
+ "instanceof",
113
+ "interface",
114
+ "let",
115
+ "new",
116
+ "null",
117
+ "package",
118
+ "private",
119
+ "protected",
120
+ "public",
121
+ "return",
122
+ "super",
123
+ "switch",
124
+ "static",
125
+ "this",
126
+ "throw",
127
+ "true",
128
+ "try",
129
+ "typeof",
130
+ "var",
131
+ "void",
132
+ "while",
133
+ "with",
134
+ "yield",
135
+ ]);
136
+ const protoPackage = "@spine-event-engine/proto";
137
+ const packagedOptions = (await import(protoPackage).catch(() => undefined));
138
+ function optionExtension(files, name) {
139
+ const visited = new Set();
140
+ const find = (candidates) => {
141
+ for (const file of candidates) {
142
+ if (visited.has(file))
143
+ continue;
144
+ visited.add(file);
145
+ const extension = file.extensions.find((candidate) => candidate.name === name);
146
+ if (extension !== undefined)
147
+ return extension;
148
+ const nested = find(file.dependencies);
149
+ if (nested !== undefined)
150
+ return nested;
151
+ }
152
+ return undefined;
153
+ };
154
+ const extension = find(files);
155
+ if (extension !== undefined)
156
+ return extension;
157
+ const packaged = name === "every_is" ? packagedOptions?.every_is : packagedOptions?.is;
158
+ if (packaged !== undefined)
159
+ return packaged;
160
+ throw new Error(`spine-proto: missing (${name}) option descriptor`);
161
+ }
162
+ function companionPath(name) {
163
+ return `interfaces/${name.replace(/([a-z0-9])([A-Z])/gu, "$1-$2").toLowerCase()}.ts`;
164
+ }
165
+ function collectMessages(messages) {
166
+ return messages.flatMap((message) => [message, ...collectMessages(message.nestedMessages)]);
167
+ }
168
+ function assertTypeName(name, source) {
169
+ if (!typescriptIdentifier.test(name) || reservedTypeScriptWords.has(name)) {
170
+ throw new Error(`spine-proto: ${source}: ts_type must be a non-empty TypeScript identifier`);
171
+ }
172
+ }
173
+ function validateMessageDeclarations(isOption, file) {
174
+ for (const message of collectMessages(file.messages)) {
175
+ const option = getOption(message, isOption);
176
+ if (option.tsType.length > 0)
177
+ assertTypeName(option.tsType, `${file.proto.name}:${message.name}`);
178
+ }
179
+ }
180
+ /**
181
+ * Generates file-scoped empty TypeScript interfaces and nominal schema tokens.
182
+ *
183
+ * Provider-resolved authored declarations are emitted when a compatible
184
+ * discovery provider supplies them; unresolved declarations are omitted.
185
+ */
186
+ export const InterfaceGenerator = Object.freeze({
187
+ generateCompanions(schema) {
188
+ InterfaceGenerator.generateWithProvider(schema, new AuthoredInterfaceProvider());
189
+ },
190
+ generateWithProvider(schema, provider, suppliedSourceView) {
191
+ const optionFiles = schema.allFiles ?? schema.files;
192
+ const everyIs = optionExtension(optionFiles, "every_is");
193
+ const isOption = optionExtension(optionFiles, "is");
194
+ const sourceView = suppliedSourceView ?? stagedSourceView();
195
+ const authored = new Map();
196
+ const generated = new Map();
197
+ for (const file of schema.files) {
198
+ validateMessageDeclarations(isOption, file);
199
+ for (const message of collectMessages(file.messages)) {
200
+ const declaration = getOption(message, isOption);
201
+ if (declaration.tsType.length === 0)
202
+ continue;
203
+ const members = authored.get(declaration.tsType) ?? [];
204
+ members.push(message);
205
+ authored.set(declaration.tsType, members);
206
+ }
207
+ const declaration = getOption(file, everyIs);
208
+ if (declaration.generate) {
209
+ assertTypeName(declaration.tsType, file.proto.name);
210
+ if (generated.has(declaration.tsType))
211
+ throw new Error(`spine-proto: ${file.proto.name}: duplicate generated interface name`);
212
+ generated.set(declaration.tsType, { file, members: collectMessages(file.messages) });
213
+ }
214
+ else if (declaration.tsType.length > 0) {
215
+ const members = authored.get(declaration.tsType) ?? [];
216
+ members.push(...collectMessages(file.messages));
217
+ authored.set(declaration.tsType, members);
218
+ }
219
+ }
220
+ for (const name of authored.keys()) {
221
+ if (generated.has(name))
222
+ throw new Error(`spine-proto: generated and authored interface names conflict`);
223
+ }
224
+ const paths = new Set();
225
+ for (const name of [...generated.keys(), ...authored.keys()]) {
226
+ const path = companionPath(name);
227
+ if (paths.has(path))
228
+ throw new Error(`spine-proto: duplicate interface companion path ${path}`);
229
+ paths.add(path);
230
+ }
231
+ const resolved = [...authored.entries()].map(([name, members]) => ({
232
+ name,
233
+ members,
234
+ declaration: provider.resolve(name, members, sourceView),
235
+ }));
236
+ for (const candidate of generated.values()) {
237
+ if (candidate.members.length === 0)
238
+ throw new Error(`${candidate.file.proto.name}: every_is cannot target an empty message set`);
239
+ }
240
+ for (const candidate of resolved) {
241
+ if (candidate.declaration !== undefined &&
242
+ (candidate.declaration.name !== candidate.name ||
243
+ candidate.declaration.importPath.length === 0))
244
+ throw new Error("spine-proto: authored interface provider returned an irreconcilable declaration");
245
+ }
246
+ for (const [name, candidate] of generated) {
247
+ const members = candidate.members;
248
+ const output = schema.generateFile(companionPath(name));
249
+ const define = output.import("MessageInterfaces", "@spine-event-engine/core");
250
+ const token = output.import("MessageInterface", "@spine-event-engine/core", true);
251
+ const schemaImports = members.map((member) => output.importSchema(member));
252
+ output.preamble(candidate.file);
253
+ output.print("/** Generated file-level message interface. */\n", `export interface ${name} {}\n\n`, "const memberSchemas: readonly [", ...schemaImports.flatMap((member, index) => index === 0 ? ["typeof ", member] : [", typeof ", member]), "] = [", ...schemaImports.flatMap((member, index) => (index === 0 ? [member] : [", ", member])), "];\n\n", "/** Generated nominal runtime token for this message interface. */\n", output.export("const", name), ": ", token, `<${name}, typeof memberSchemas> = `, define, `.define<${name}, typeof memberSchemas>(memberSchemas);\n`);
254
+ }
255
+ for (const candidate of resolved) {
256
+ if (candidate.declaration === undefined)
257
+ continue;
258
+ const output = schema.generateFile(companionPath(candidate.name));
259
+ const define = output.import("MessageInterfaces", "@spine-event-engine/core");
260
+ const token = output.import("MessageInterface", "@spine-event-engine/core", true);
261
+ const schemaImports = candidate.members.map((member) => output.importSchema(member));
262
+ const sourceFile = candidate.members[0]?.file;
263
+ if (sourceFile === undefined)
264
+ throw new Error("spine-proto: authored interface has no members");
265
+ output.preamble(sourceFile);
266
+ output.print(`import type { ${candidate.declaration.name} as Authored${candidate.name} } from ${JSON.stringify(candidate.declaration.importPath)};\n\n`, `export type ${candidate.name} = Authored${candidate.name};\n\n`, "const memberSchemas: readonly [", ...schemaImports.flatMap((member, index) => index === 0 ? ["typeof ", member] : [", typeof ", member]), "] = [", ...schemaImports.flatMap((member, index) => (index === 0 ? [member] : [", ", member])), `];\n\nexport const ${candidate.name}: `, token, `<Authored${candidate.name}, typeof memberSchemas> = `, define, `.define<Authored${candidate.name}, typeof memberSchemas>(memberSchemas);\n`);
267
+ }
268
+ },
269
+ });
270
+ const interfacePlugin = createEcmaScriptPlugin({
271
+ name: "protoc-gen-spine-interfaces",
272
+ version: "1.0.0",
273
+ generateTs: InterfaceGenerator.generateCompanions,
274
+ });
275
+ if (process.argv[1] !== undefined && resolve(process.argv[1]) === fileURLToPath(import.meta.url))
276
+ runNodeJs(interfacePlugin);
277
+ //# sourceMappingURL=interface-generator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interface-generator.js","sourceRoot":"","sources":["../../../src/generation/interface-generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,SAAS,EAAuD,MAAM,oBAAoB,CAAC;AACpG,OAAO,EAAE,sBAAsB,EAAE,SAAS,EAAe,MAAM,uBAAuB,CAAC;AACvF,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAKnD,MAAM,sBAAsB,GAAG,CAAC,MAAM,MAAM,CAC1C,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC;IAC7B,CAAC,CAAC,kCAAkC;IACpC,CAAC,CAAC,kCAAkC,CACvC,CAA8F,CAAC;AAChG,MAAM,EAAE,yBAAyB,EAAE,GAAG,sBAAsB,CAAC;AAE7D,MAAM,oBAAoB,GAAG,6BAA6B,CAAC;AAE3D;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAc,OAAO,CAAC,GAAG,EAAE;IAC1D,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,EAAE,yBAAyB,CAAC,CAAC;IAClD,IAAI,CAAC,UAAU,CAAC,IA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AAI,CAAC,CAAC,CAAC,KAAK,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;IAC9F,SAAS,CAAC,eAAe,CAAC,CAAC"}
@@ -0,0 +1,30 @@
1
+ import type { DescMessage } from "@bufbuild/protobuf";
2
+ import type { ModelSourceView } from "./source-view.js";
3
+ /**
4
+ * A resolved authored interface declaration supplied by an authored-interface provider.
5
+ */
6
+ export interface AuthoredInterfaceDeclaration {
7
+ /**
8
+ * Public TypeScript identifier of the authored interface.
9
+ */
10
+ readonly name: string;
11
+ /**
12
+ * Module specifier from which the authored interface is imported.
13
+ */
14
+ readonly importPath: string;
15
+ }
16
+ /**
17
+ * Resolves authored interface declarations for generated message membership.
18
+ */
19
+ export interface InterfaceDeclarationProvider {
20
+ /**
21
+ * Resolves one compatible authored interface declaration, if available.
22
+ *
23
+ * @param name The requested generated TypeScript interface name.
24
+ * @param members Concrete generated message members of that interface.
25
+ * @param sourceView The validated compiler input view, when generation supplies one.
26
+ * @returns The authored declaration to alias, or `undefined` when unresolved.
27
+ */
28
+ resolve(name: string, members: readonly DescMessage[], sourceView: ModelSourceView | undefined): AuthoredInterfaceDeclaration | undefined;
29
+ }
30
+ //# sourceMappingURL=interface-provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interface-provider.d.ts","sourceRoot":"","sources":["../../../src/generation/interface-provider.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAG3C;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAItB;;OAEG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAG3C;;;;;;;OAOG;IACH,OAAO,CACL,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,SAAS,WAAW,EAAE,EAC/B,UAAU,EAAE,eAAe,GAAG,SAAS,GACtC,4BAA4B,GAAG,SAAS,CAAC;CAC7C"}
@@ -0,0 +1,15 @@
1
+ /*
2
+ * Copyright 2026, CodeMatters. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5
+ * in compliance with the License. You may obtain a copy of the License at
6
+ *
7
+ * https://www.apache.org/licenses/LICENSE-2.0
8
+ *
9
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
10
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11
+ * or implied. See the License for the specific language governing permissions and limitations under
12
+ * the License.
13
+ */
14
+ export {};
15
+ //# sourceMappingURL=interface-provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interface-provider.js","sourceRoot":"","sources":["../../../src/generation/interface-provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG"}
@@ -0,0 +1,9 @@
1
+ import { type Schema } from "@bufbuild/protoplugin";
2
+ /**
3
+ * Generates typed throwable companions for top-level owned rejection messages.
4
+ */
5
+ export declare const RejectionGenerator: Readonly<{
6
+ generateCompanions(schema: Schema): void;
7
+ tsDoc(comment: string | undefined): string;
8
+ }>;
9
+ //# sourceMappingURL=rejection-generator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rejection-generator.d.ts","sourceRoot":"","sources":["../../../src/generation/rejection-generator.ts"],"names":[],"mappings":"AAcA,OAAO,EAAkD,KAAK,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAIpG;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC;IACxC,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACzC,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;CAC5C,CAoDC,CAAC"}
@@ -0,0 +1,62 @@
1
+ /*
2
+ * Copyright 2026, CodeMatters. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5
+ * in compliance with the License. You may obtain a copy of the License at
6
+ *
7
+ * https://www.apache.org/licenses/LICENSE-2.0
8
+ *
9
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
10
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11
+ * or implied. See the License for the specific language governing permissions and limitations under
12
+ * the License.
13
+ */
14
+ import { createEcmaScriptPlugin, getComments, runNodeJs } from "@bufbuild/protoplugin";
15
+ import { fileURLToPath } from "node:url";
16
+ import { resolve } from "node:path";
17
+ /**
18
+ * Generates typed throwable companions for top-level owned rejection messages.
19
+ */
20
+ export const RejectionGenerator = Object.freeze({
21
+ generateCompanions(schema) {
22
+ for (const file of schema.files) {
23
+ const sourceName = file.proto.name.split(/[\\/]/u).at(-1);
24
+ const usesRejectionName = sourceName === "rejections.proto" || sourceName?.endsWith("_rejections.proto") === true;
25
+ if (!usesRejectionName || file.proto.name.startsWith("spine/delivery/"))
26
+ continue;
27
+ const messages = file.messages.filter((message) => message.parent === undefined);
28
+ if (messages.length === 0)
29
+ continue;
30
+ const output = schema.generateFile(`${file.name}.ts`);
31
+ const throwable = output.import("RejectionThrowable", "@spine-event-engine/core");
32
+ const messageInit = output.import("MessageInitShape", "@bufbuild/protobuf", true);
33
+ output.preamble(file);
34
+ for (const message of messages) {
35
+ const messageSchema = output.importSchema(message);
36
+ output.print(RejectionGenerator.tsDoc(getComments(message).leading), output.export("const", message.name), ": { readonly create: (input: ", messageInit, "<typeof ", messageSchema, ">) => ", throwable, "<typeof ", messageSchema, "> } = {\n create(input) {\n return ", throwable, ".create(", messageSchema, ", input);\n },\n};\n");
37
+ }
38
+ }
39
+ },
40
+ /**
41
+ * Renders a leading Proto comment as deterministic TypeScript documentation.
42
+ */
43
+ tsDoc(comment) {
44
+ const lines = (comment ?? "Creates this rejection throwable.")
45
+ .replaceAll("*/", "*&#47;")
46
+ .split(/\r?\n/u)
47
+ .map((line) => line
48
+ .trim()
49
+ .replace(/^\/\/\s?/u, "")
50
+ .replace(/^@/u, "\\@"))
51
+ .filter(Boolean);
52
+ return `/**\n * ${lines.join(" ") || "Creates this rejection throwable."}\n */\n`;
53
+ },
54
+ });
55
+ const rejectionPlugin = createEcmaScriptPlugin({
56
+ name: "protoc-gen-spine-rejections",
57
+ version: "1.0.0",
58
+ generateTs: RejectionGenerator.generateCompanions,
59
+ });
60
+ if (process.argv[1] !== undefined && resolve(process.argv[1]) === fileURLToPath(import.meta.url))
61
+ runNodeJs(rejectionPlugin);
62
+ //# sourceMappingURL=rejection-generator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rejection-generator.js","sourceRoot":"","sources":["../../../src/generation/rejection-generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,sBAAsB,EAAE,WAAW,EAAE,SAAS,EAAe,MAAM,uBAAuB,CAAC;AACpG,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAG1B,MAAM,CAAC,MAAM,CAAC;IACjB,kBAAkB,CAAC,MAAc;QAC/B,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;YAChC,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;YAC1D,MAAM,iBAAiB,GACrB,UAAU,KAAK,kBAAkB,IAAI,UAAU,EAAE,QAAQ,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAC;YAC1F,IAAI,CAA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AK,CAAC,QAAQ,CAAC;aACf,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CACZ,IAAI;aACD,IAAI,EAAE;aACN,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC;aACxB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CACzB;aACA,MAAM,CAAC,OAAO,CAAC,CAAC;QACnB,OAAO,WAAW,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,mCAAmC,SAAS,CAAC;IACpF,CAAC;CACF,CAAC,CAAC;AAEH,MAAM,eAAe,GAAG,sBAAsB,CAAC;IAC7C,IAAI,EAAE,6BAA6B;IACnC,OAAO,EAAE,OAAO;IAChB,UAAU,EAAE,kBAAkB,CAAC,kBAAkB;CAClD,CAAC,CAAC;AAEH,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;IAC9F,SAAS,CAAC,eAAe,CAAC,CAAC"}
@@ -0,0 +1,103 @@
1
+ /**
2
+ * Race-safe reads for files owned by a compiler source view.
3
+ */
4
+ export declare const SourceViewInputs: Readonly<{
5
+ read(path: string): Buffer;
6
+ }>;
7
+ /**
8
+ * Stable compiler input view for authored sources and staged generated output.
9
+ */
10
+ export interface ModelSourceView {
11
+ /**
12
+ * Eligible authored TypeScript files, excluding generated publication trees.
13
+ */
14
+ readonly authoredFiles: readonly string[];
15
+ /**
16
+ * Complete same-module compiler inputs, including declarations and allowed JavaScript.
17
+ */
18
+ readonly compilerFiles?: readonly string[];
19
+ /**
20
+ * Absolute model package root used to resolve authored imports.
21
+ */
22
+ readonly packageRoot: string;
23
+ /**
24
+ * Canonical live generated root excluded from authored-interface candidates.
25
+ */
26
+ readonly liveGeneratedRoot: string;
27
+ /**
28
+ * Redirect root used when compiler imports address generated model sources.
29
+ */
30
+ readonly stagedGeneratedRoot: string;
31
+ }
32
+ /**
33
+ * Internal source view carrying the required publication revalidation digest.
34
+ */
35
+ export interface PublicationSourceView extends ModelSourceView {
36
+ /**
37
+ * Complete same-module compiler inputs captured by the publication transaction.
38
+ */
39
+ readonly compilerFiles: readonly string[];
40
+ /**
41
+ * Fingerprint of configured authored sources and recursive TypeScript configuration inputs.
42
+ */
43
+ readonly inventoryDigest: string;
44
+ }
45
+ /**
46
+ * Fixed internal handoff retained by a root model-generation transaction.
47
+ */
48
+ export interface SourceViewPublicationRecord {
49
+ /**
50
+ * Fixed internal record format version.
51
+ */
52
+ readonly formatVersion: 1;
53
+ /**
54
+ * SHA-256 fingerprint of the live authored-source and configuration inventory.
55
+ */
56
+ readonly inventoryDigest: string;
57
+ /**
58
+ * Canonical live generated root excluded from the inventory.
59
+ */
60
+ readonly liveGeneratedRoot: string;
61
+ /**
62
+ * Canonical live model package root used to recompute the inventory.
63
+ */
64
+ readonly livePackageRoot: string;
65
+ }
66
+ /**
67
+ * Checks that the immutable authored-source inventory is current before publication.
68
+ *
69
+ * @param sourceView Compiler input snapshot captured before generation.
70
+ */
71
+ export declare function assertSourceViewCurrent(sourceView: PublicationSourceView): void;
72
+ /**
73
+ * Writes the fixed internal source-view handoff for an outer generation stage.
74
+ *
75
+ * @param stageRoot Outer staged model package root.
76
+ * @param sourceView Captured live-authored/staged-generated source view.
77
+ */
78
+ export declare function writeViewRecord(stageRoot: string, sourceView: PublicationSourceView): void;
79
+ /**
80
+ * Reads one bounded root-transaction source-view handoff.
81
+ *
82
+ * @param stageRoot Outer staged model package root.
83
+ * @param expectedLivePackageRoot Canonical selected live model package root.
84
+ * @param expectedLiveGeneratedRoot Canonical selected live generated root.
85
+ * @returns Validated immutable internal handoff.
86
+ */
87
+ export declare function readViewRecord(stageRoot: string, expectedLivePackageRoot: string, expectedLiveGeneratedRoot: string): SourceViewPublicationRecord;
88
+ /**
89
+ * Rejects a changed live source/configuration inventory captured in a handoff.
90
+ *
91
+ * @param record Validated internal root-transaction handoff.
92
+ */
93
+ export declare function assertViewRecordCurrent(record: SourceViewPublicationRecord): void;
94
+ /**
95
+ * Creates a live-authored/staged-generated compiler source view.
96
+ *
97
+ * @param packageRoot Model package root.
98
+ * @param generatedRoot Configured live generated root.
99
+ * @param stagedGeneratedRoot Generated tree inside the current stage.
100
+ * @returns Authored compiler candidates and the staged generated redirect root.
101
+ */
102
+ export declare function modelSourceView(packageRoot: string, generatedRoot: string, stagedGeneratedRoot: string): PublicationSourceView;
103
+ //# sourceMappingURL=source-view.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source-view.d.ts","sourceRoot":"","sources":["../../../src/generation/source-view.ts"],"names":[],"mappings":"AAsCA;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC;IACtC,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;CAC5B,CA0BC,CAAC;AAEH;;GAEG;AACH,MAAM,WAAW,eAAe;IAG9B;;OAEG;IACH,QAAQ,CAAC,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;IAI1C;;OAEG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAI3C;;OAEG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAI7B;;OAEG;IACH,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IAInC;;OAEG;IACH,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;CACtC;AAED;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,eAAe;IAG5D;;OAEG;IACH,QAAQ,CAAC,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;IAI1C;;OAEG;IACH,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;CAClC;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAG1C;;OAEG;IACH,QAAQ,CAAC,aAAa,EAAE,CAAC,CAAC;IAE1B;;OAEG;IACH,QAAQ,CAA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