@ingestron/core 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +6 -0
  3. package/README.md +56 -0
  4. package/SECURITY.md +44 -0
  5. package/THIRD_PARTY_NOTICES.md +693 -0
  6. package/dist/assets/schemas/ODCS-LICENSE +201 -0
  7. package/dist/assets/schemas/odcs-3.1.0.json +2929 -0
  8. package/dist/assets/schemas/provenance.json +16 -0
  9. package/dist/compiler-fingerprint.json +84 -0
  10. package/dist/core/authoring.d.ts +55 -0
  11. package/dist/core/authoring.js +315 -0
  12. package/dist/core/config.d.ts +34 -0
  13. package/dist/core/config.js +233 -0
  14. package/dist/core/connections.d.ts +19 -0
  15. package/dist/core/connections.js +203 -0
  16. package/dist/core/connector-package.d.ts +37 -0
  17. package/dist/core/connector-package.js +43 -0
  18. package/dist/core/contracts.d.ts +8 -0
  19. package/dist/core/contracts.js +45 -0
  20. package/dist/core/deliveries.d.ts +16 -0
  21. package/dist/core/deliveries.js +28 -0
  22. package/dist/core/delivery-exports.d.ts +20 -0
  23. package/dist/core/delivery-exports.js +119 -0
  24. package/dist/core/development.d.ts +50 -0
  25. package/dist/core/development.js +94 -0
  26. package/dist/core/ecosystem-authoring.d.ts +13 -0
  27. package/dist/core/ecosystem-authoring.js +82 -0
  28. package/dist/core/errors.d.ts +12 -0
  29. package/dist/core/errors.js +43 -0
  30. package/dist/core/execution.d.ts +28 -0
  31. package/dist/core/execution.js +297 -0
  32. package/dist/core/extension-packs.d.ts +8 -0
  33. package/dist/core/extension-packs.js +34 -0
  34. package/dist/core/fingerprint.d.ts +1 -0
  35. package/dist/core/fingerprint.js +16 -0
  36. package/dist/core/generate.d.ts +16 -0
  37. package/dist/core/generate.js +198 -0
  38. package/dist/core/installation.d.ts +3 -0
  39. package/dist/core/installation.js +14 -0
  40. package/dist/core/installed-plugins.d.ts +41 -0
  41. package/dist/core/installed-plugins.js +92 -0
  42. package/dist/core/model-pack-schema.d.ts +46 -0
  43. package/dist/core/model-pack-schema.js +81 -0
  44. package/dist/core/model-packs.d.ts +4 -0
  45. package/dist/core/model-packs.js +33 -0
  46. package/dist/core/operations.d.ts +346 -0
  47. package/dist/core/operations.js +760 -0
  48. package/dist/core/package-references.d.ts +36 -0
  49. package/dist/core/package-references.js +103 -0
  50. package/dist/core/packages.d.ts +340 -0
  51. package/dist/core/packages.js +579 -0
  52. package/dist/core/planner.d.ts +114 -0
  53. package/dist/core/planner.js +821 -0
  54. package/dist/core/project-build.d.ts +13 -0
  55. package/dist/core/project-build.js +266 -0
  56. package/dist/core/provider-commands.d.ts +83 -0
  57. package/dist/core/provider-commands.js +252 -0
  58. package/dist/core/provider-starter.d.ts +5 -0
  59. package/dist/core/provider-starter.js +155 -0
  60. package/dist/core/report-pack-schema.d.ts +13 -0
  61. package/dist/core/report-pack-schema.js +15 -0
  62. package/dist/core/schema.d.ts +257 -0
  63. package/dist/core/schema.js +126 -0
  64. package/dist/core/workflows.d.ts +91 -0
  65. package/dist/core/workflows.js +438 -0
  66. package/dist/plugins/authoring.d.ts +88 -0
  67. package/dist/plugins/authoring.js +34 -0
  68. package/dist/plugins/compatibility.d.ts +23 -0
  69. package/dist/plugins/compatibility.js +55 -0
  70. package/dist/plugins/generation.d.ts +5 -0
  71. package/dist/plugins/generation.js +105 -0
  72. package/dist/plugins/provider-renderer.d.ts +7 -0
  73. package/dist/plugins/provider-renderer.js +37 -0
  74. package/dist/plugins/provider-worker.d.ts +1 -0
  75. package/dist/plugins/provider-worker.js +74 -0
  76. package/dist/sdk/adapter.d.ts +15 -0
  77. package/dist/sdk/adapter.js +15 -0
  78. package/dist/sdk/index.d.ts +4 -0
  79. package/dist/sdk/index.js +3 -0
  80. package/dist/sdk/schemas.d.ts +34 -0
  81. package/dist/sdk/schemas.js +74 -0
  82. package/dist/version.d.ts +5 -0
  83. package/dist/version.js +7 -0
  84. package/package.json +72 -0
@@ -0,0 +1,105 @@
1
+ import { deliveryExports } from "../core/delivery-exports.js";
2
+ import { Ajv } from "ajv";
3
+ import { executeProvider } from "./provider-renderer.js";
4
+ import { contractColumns } from "../core/contracts.js";
5
+ import { check } from "../core/errors.js";
6
+ import { Configuration } from "../core/config.js";
7
+ import { stringify } from "yaml";
8
+ function guestPlan(plan) {
9
+ const needed = new Set(plan.nodes
10
+ .flatMap((n) => [n.generation?.codeRef, n.generation?.runtimeRef])
11
+ .filter(Boolean));
12
+ return {
13
+ ...plan,
14
+ activitySources: Object.fromEntries(Object.entries(plan.activitySources).filter(([ref]) => needed.has(ref))),
15
+ };
16
+ }
17
+ export function validateProviderPlan(plan) {
18
+ if (plan.selection.delivery) {
19
+ for (const entry of deliveryExports(plan))
20
+ validateProviderPlan(entry.plan);
21
+ return;
22
+ }
23
+ const renderer = plan.nodes[0]?.runtime?.rendererRef;
24
+ check(renderer && plan.nodes.every((n) => n.runtime?.rendererRef === renderer), "PROVIDER", "An export must select one provider renderer");
25
+ executeProvider(plan.activitySources[renderer], {
26
+ ...guestPlan(plan),
27
+ nodes: plan.nodes.map((n) => ({
28
+ ...n,
29
+ columns: n.contract ? contractColumns(n.contract) : [],
30
+ sql: "",
31
+ })),
32
+ }, true);
33
+ }
34
+ export function generateProvider(root, plan) {
35
+ if (plan.selection.delivery) {
36
+ const files = {};
37
+ let count = 0, bytes = 0;
38
+ const add = (name, content) => {
39
+ count++;
40
+ bytes += Buffer.byteLength(content);
41
+ check(count <= 10000 && bytes <= 10 * 1024 * 1024, "LIMIT", "Delivery exceeds 10000 files or 10 MiB");
42
+ files[name] = content;
43
+ };
44
+ const exports = deliveryExports(plan);
45
+ for (const entry of exports)
46
+ for (const [name, content] of Object.entries(generateProvider(root, entry.plan)))
47
+ add(`${entry.directory}/${name}`, content);
48
+ add("ingestron-delivery.json", JSON.stringify({
49
+ apiVersion: "ingestron.delivery/v1",
50
+ project: plan.project,
51
+ environment: plan.environment,
52
+ planDigest: plan.digest,
53
+ evidence: "offline",
54
+ execution: "not-run",
55
+ exports: exports.map(({ plan: part, ...entry }) => ({
56
+ ...entry,
57
+ planDigest: part.digest,
58
+ nodes: part.nodes.map((n) => n.id),
59
+ })),
60
+ }, null, 2) + "\n");
61
+ return files;
62
+ }
63
+ validateProviderPlan(plan);
64
+ const reader = new Configuration(root);
65
+ const request = {
66
+ ...guestPlan(plan),
67
+ nodes: plan.nodes.map((n) => ({
68
+ ...n,
69
+ columns: n.contract ? contractColumns(n.contract) : [],
70
+ sql: n.with.sqlFile ? reader.text(n.with.sqlFile) : undefined,
71
+ sqlFile: n.with.sqlFile,
72
+ })),
73
+ };
74
+ const assets = executeProvider(plan.activitySources[plan.nodes[0].runtime.rendererRef], request);
75
+ const files = Object.fromEntries(Object.entries(assets).map(([name, a]) => [
76
+ name,
77
+ a.format === "json"
78
+ ? JSON.stringify(a.value, null, 2) + "\n"
79
+ : a.format === "yaml"
80
+ ? stringify(a.value)
81
+ : a.value,
82
+ ]));
83
+ const hooks = [
84
+ ...new Set(plan.nodes.map((n) => n.runtime?.lifecycleRef).filter(Boolean)),
85
+ ];
86
+ for (const ref of hooks) {
87
+ const node = plan.nodes.find((n) => n.runtime?.lifecycleRef === ref);
88
+ const schemas = node.runtime?.outputSchemasRef
89
+ ? JSON.parse(plan.activitySources[node.runtime.outputSchemasRef])
90
+ : {};
91
+ validateProviderFiles(plan.activitySources[ref], schemas, files);
92
+ }
93
+ return files;
94
+ }
95
+ /** The same provider schema gate applies after native rendering and project assembly. */
96
+ export function validateProviderFiles(code, schemas, files) {
97
+ const response = executeProvider(code, { apiVersion: "ingestron.provider-output/v1", files }, false, "validateOutput");
98
+ check(Array.isArray(response.documents) && response.documents.length <= 100, "PROVIDER", "Invalid output validation response");
99
+ const ajv = new Ajv({ allErrors: true, strict: false });
100
+ for (const doc of response.documents) {
101
+ check(typeof schemas[doc.schema] === "string", "PROVIDER", "Undeclared output schema");
102
+ const validate = ajv.compile(JSON.parse(schemas[doc.schema]));
103
+ check(validate(doc.value), "PROVIDER", `Provider output schema: ${ajv.errorsText(validate.errors)}`);
104
+ }
105
+ }
@@ -0,0 +1,7 @@
1
+ export type ProviderAssets = Record<string, {
2
+ format: "json" | "yaml" | "text";
3
+ value: any;
4
+ }>;
5
+ /** Only JSON crosses the process/VM boundary. The guest cannot access files or networks. */
6
+ export declare function executeProvider(code: string, input: unknown, validateOnly?: boolean, operation?: "render" | "expand" | "command" | "author" | "model" | "validateOutput"): ProviderAssets;
7
+ export declare function expandProvider(code: string, input: unknown): any;
@@ -0,0 +1,37 @@
1
+ import { compiledPath } from "../core/installation.js";
2
+ import { execFileSync } from "node:child_process";
3
+ import { mkdtempSync, writeFileSync, rmSync } from "node:fs";
4
+ import { tmpdir } from "node:os";
5
+ import { resolve } from "node:path";
6
+ import { check, Problem } from "../core/errors.js";
7
+ /** Only JSON crosses the process/VM boundary. The guest cannot access files or networks. */
8
+ export function executeProvider(code, input, validateOnly = false, operation = "render") {
9
+ const request = JSON.stringify({ code, input, validateOnly, operation });
10
+ check(request.length <= 10_000_000, "PROVIDER", "Provider request exceeds 10 MB");
11
+ let response;
12
+ // A private request file avoids large synchronous stdin pipe stalls. The VM
13
+ // receives parsed JSON only; it never receives host filesystem access.
14
+ const temporary = mkdtempSync(resolve(tmpdir(), "ingestron-worker-"));
15
+ const requestPath = resolve(temporary, "request.json");
16
+ try {
17
+ writeFileSync(requestPath, request, { mode: 0o600, flag: "wx" });
18
+ response = JSON.parse(execFileSync(process.execPath, [compiledPath("plugins/provider-worker.js"), requestPath], {
19
+ encoding: "utf8",
20
+ env: {},
21
+ timeout: 30000,
22
+ maxBuffer: 10_000_000,
23
+ stdio: ["ignore", "pipe", "pipe"],
24
+ }));
25
+ }
26
+ catch {
27
+ throw new Problem("PROVIDER", "Provider exceeded its process limits or could not run");
28
+ }
29
+ finally {
30
+ rmSync(temporary, { recursive: true, force: true });
31
+ }
32
+ check(response.ok, "PROVIDER", response.error ?? "Provider renderer failed");
33
+ return response.assets;
34
+ }
35
+ export function expandProvider(code, input) {
36
+ return executeProvider(code, input, false, "expand");
37
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,74 @@
1
+ /** Isolated provider generation: one ES module, JSON in/out, no host APIs. */
2
+ import { getQuickJS } from "quickjs-emscripten";
3
+ import { readFileSync } from "node:fs";
4
+ import { isMap, check } from "../core/errors.js";
5
+ const request = JSON.parse(readFileSync(process.argv[2] ?? 0, "utf8"));
6
+ try {
7
+ check(typeof request.code === "string" && request.code.length <= 2_000_000, "PROVIDER", "Provider source exceeds 2 MB");
8
+ const engine = await getQuickJS(), runtime = engine.newRuntime();
9
+ runtime.setMemoryLimit(64 * 1024 * 1024);
10
+ runtime.setMaxStackSize(512 * 1024);
11
+ const deadline = Date.now() + 2000;
12
+ runtime.setInterruptHandler(() => Date.now() > deadline);
13
+ runtime.setModuleLoader((name) => {
14
+ if (name !== "provider-entry")
15
+ throw new Error("Provider imports are forbidden");
16
+ return request.code;
17
+ });
18
+ const context = runtime.newContext();
19
+ const evaluate = (source, module = false) => {
20
+ const result = context.evalCode(source, module ? "provider.mjs" : "request.js", { type: module ? "module" : "global" });
21
+ if (result.error) {
22
+ const message = context.dump(result.error);
23
+ result.error.dispose();
24
+ throw new Error(message.message ?? String(message));
25
+ }
26
+ const value = context.dump(result.value);
27
+ result.value.dispose();
28
+ return value;
29
+ };
30
+ try {
31
+ evaluate("globalThis.Date = undefined; globalThis.performance = undefined; Math.random = () => { throw new Error('Providers must be deterministic'); };");
32
+ evaluate("import * as provider from 'provider-entry'; globalThis.__provider = provider;", true);
33
+ const encoded = JSON.stringify(JSON.stringify(request.input));
34
+ const result = evaluate(["command", "author", "model", "validateOutput"].includes(request.operation)
35
+ ? `JSON.stringify((() => { const value = __provider[${JSON.stringify(request.operation)}](JSON.parse(${encoded})); if (value && typeof value.then === 'function') throw new Error('Provider command must be synchronous'); return value; })())`
36
+ : request.operation === "expand"
37
+ ? `JSON.stringify((() => { const value = __provider.expand(JSON.parse(${encoded})); if (value && typeof value.then === 'function') throw new Error('Provider expand must be synchronous'); return value; })())`
38
+ : `JSON.stringify((() => { const input = JSON.parse(${encoded}); const validation = __provider.validate(input); if (validation && typeof validation.then === 'function') throw new Error('Provider validate must be synchronous'); const result = ${request.validateOnly ? "{}" : "__provider.render(input)"}; if (result && typeof result.then === 'function') throw new Error('Provider render must be synchronous'); return result; })())`);
39
+ check(typeof result === "string" && result.length <= 8_000_000, "PROVIDER", "Provider output exceeds 8 MB or is not synchronous JSON");
40
+ const assets = JSON.parse(result);
41
+ check(isMap(assets) && Object.keys(assets).length <= 1000, "PROVIDER", "Provider must return at most 1000 assets");
42
+ if (request.operation === "expand") {
43
+ check(Array.isArray(assets.steps) &&
44
+ assets.steps.length <= 1000 &&
45
+ isMap(assets.recovery) &&
46
+ Object.keys(assets).every((k) => ["steps", "recovery"].includes(k)), "PROVIDER", "Invalid provider planning response");
47
+ }
48
+ for (const [path, asset] of request.operation !== "render"
49
+ ? []
50
+ : Object.entries(assets)) {
51
+ check(path.length <= 512 &&
52
+ !path.startsWith("/") &&
53
+ !path.includes("\\") &&
54
+ !path.includes("\0") &&
55
+ path.split("/").every((p) => p && p !== "." && p !== ".."), "PROVIDER", "Unsafe provider output path");
56
+ check(isMap(asset) &&
57
+ ["json", "yaml", "text"].includes(asset.format) &&
58
+ Object.hasOwn(asset, "value") &&
59
+ Object.keys(asset).every((k) => ["format", "value"].includes(k)), "PROVIDER", "Invalid provider asset envelope");
60
+ check(asset.format !== "text" || typeof asset.value === "string", "PROVIDER", "Text asset must contain a string");
61
+ }
62
+ process.stdout.write(JSON.stringify({ ok: true, assets }));
63
+ }
64
+ finally {
65
+ context.dispose();
66
+ runtime.dispose();
67
+ }
68
+ }
69
+ catch (error) {
70
+ process.stdout.write(JSON.stringify({
71
+ ok: false,
72
+ error: error instanceof Error ? error.message : String(error),
73
+ }));
74
+ }
@@ -0,0 +1,15 @@
1
+ /** First-party adapter helpers; version-lock adapters to this package. */
2
+ export { Configuration } from "../core/config.js";
3
+ export { fence, packageYaml, resolvePackage } from "../core/packages.js";
4
+ export { check, Problem } from "../core/errors.js";
5
+ export { friendlyReference } from "../core/package-references.js";
6
+ export { installPackage, installedProviders } from "../core/packages.js";
7
+ export { digest, canonical } from "../core/errors.js";
8
+ export { planProject, inspectProject } from "../core/planner.js";
9
+ export { renderProject, writeOutput, validateOutput, } from "../core/generate.js";
10
+ export { checkPluginCompatibility } from "../plugins/compatibility.js";
11
+ export { canonicalPackageReference, packageLock, extensionPackSchema, } from "../core/packages.js";
12
+ export { taggedVersions, providerVersions, } from "../core/package-references.js";
13
+ export { initialise, addFlow, addTable, apply } from "../core/authoring.js";
14
+ export { contractColumns } from "../core/contracts.js";
15
+ export { browseProviders, pluginKindLabel } from "../core/installed-plugins.js";
@@ -0,0 +1,15 @@
1
+ /** First-party adapter helpers; version-lock adapters to this package. */
2
+ export { Configuration } from "../core/config.js";
3
+ export { fence, packageYaml, resolvePackage } from "../core/packages.js";
4
+ export { check, Problem } from "../core/errors.js";
5
+ export { friendlyReference } from "../core/package-references.js";
6
+ export { installPackage, installedProviders } from "../core/packages.js";
7
+ export { digest, canonical } from "../core/errors.js";
8
+ export { planProject, inspectProject } from "../core/planner.js";
9
+ export { renderProject, writeOutput, validateOutput, } from "../core/generate.js";
10
+ export { checkPluginCompatibility } from "../plugins/compatibility.js";
11
+ export { canonicalPackageReference, packageLock, extensionPackSchema, } from "../core/packages.js";
12
+ export { taggedVersions, providerVersions, } from "../core/package-references.js";
13
+ export { initialise, addFlow, addTable, apply } from "../core/authoring.js";
14
+ export { contractColumns } from "../core/contracts.js";
15
+ export { browseProviders, pluginKindLabel } from "../core/installed-plugins.js";
@@ -0,0 +1,4 @@
1
+ /** Node runtime API. Import /schemas for editor-only validation without runtime loading. */
2
+ export { execute, executeAsync, operationSchemas } from "../core/operations.js";
3
+ export type { Context, Result, OperationName } from "../core/operations.js";
4
+ export { version } from "../version.js";
@@ -0,0 +1,3 @@
1
+ /** Node runtime API. Import /schemas for editor-only validation without runtime loading. */
2
+ export { execute, executeAsync, operationSchemas } from "../core/operations.js";
3
+ export { version } from "../version.js";
@@ -0,0 +1,34 @@
1
+ import { projectSchema, flowSchema, environmentSchema, stepSchema } from "../core/schema.js";
2
+ export { projectSchema, flowSchema, environmentSchema, stepSchema };
3
+ export declare const documentSchemas: {
4
+ readonly project: typeof projectSchema;
5
+ readonly flow: typeof flowSchema;
6
+ readonly environment: typeof environmentSchema;
7
+ readonly step: typeof stepSchema;
8
+ };
9
+ export type DocumentKind = keyof typeof documentSchemas;
10
+ export interface DocumentDiagnostic {
11
+ code: string;
12
+ message: string;
13
+ file: string;
14
+ pointer: string;
15
+ /** Zero-based UTF-16 offsets into the supplied content; end is exclusive. */
16
+ range: {
17
+ start: number;
18
+ end: number;
19
+ };
20
+ /** One-based line and column for the start offset. */
21
+ line: number;
22
+ column: number;
23
+ }
24
+ export interface DocumentValidation {
25
+ apiVersion: "ingestron.document-validation/v1";
26
+ valid: boolean;
27
+ diagnostics: DocumentDiagnostic[];
28
+ }
29
+ /** Validate the caller's unsaved YAML/JSON buffer, never the on-disk file. */
30
+ export declare function validateDocument(input: {
31
+ kind: DocumentKind;
32
+ content: string;
33
+ uri: string;
34
+ }): DocumentValidation;
@@ -0,0 +1,74 @@
1
+ /** Editor-safe exports: no filesystem access, runtime loading or plugin execution. */
2
+ import { LineCounter, parseDocument, isMap, isSeq } from "yaml";
3
+ import { projectSchema, flowSchema, environmentSchema, stepSchema, } from "../core/schema.js";
4
+ export { projectSchema, flowSchema, environmentSchema, stepSchema };
5
+ export const documentSchemas = {
6
+ project: projectSchema,
7
+ flow: flowSchema,
8
+ environment: environmentSchema,
9
+ step: stepSchema,
10
+ };
11
+ /** Validate the caller's unsaved YAML/JSON buffer, never the on-disk file. */
12
+ export function validateDocument(input) {
13
+ const lines = new LineCounter();
14
+ const doc = parseDocument(input.content, { lineCounter: lines });
15
+ const diagnostics = [];
16
+ const add = (code, message, path, start, end) => {
17
+ const position = lines.linePos(start);
18
+ diagnostics.push({
19
+ code,
20
+ message,
21
+ file: input.uri,
22
+ pointer: path.length
23
+ ? "/" +
24
+ path
25
+ .map((p) => String(p).replaceAll("~", "~0").replaceAll("/", "~1"))
26
+ .join("/")
27
+ : "",
28
+ range: { start, end },
29
+ line: position.line,
30
+ column: position.col,
31
+ });
32
+ };
33
+ for (const error of doc.errors)
34
+ add("YAML", error.message, [], error.pos[0], error.pos[1]);
35
+ if (diagnostics.length)
36
+ return {
37
+ apiVersion: "ingestron.document-validation/v1",
38
+ valid: false,
39
+ diagnostics,
40
+ };
41
+ try {
42
+ const schema = Object.hasOwn(documentSchemas, input.kind)
43
+ ? documentSchemas[input.kind]
44
+ : undefined;
45
+ if (!schema) {
46
+ add("SCHEMA", "Unsupported document kind", [], 0, 0);
47
+ }
48
+ else {
49
+ const result = schema.safeParse(doc.toJS({ maxAliasCount: 100 }));
50
+ if (!result.success)
51
+ for (const issue of result.error.issues) {
52
+ let node = doc.contents;
53
+ for (const key of issue.path) {
54
+ const child = isMap(node) || isSeq(node) ? node.get(key, true) : undefined;
55
+ if (!child)
56
+ break;
57
+ node = child;
58
+ }
59
+ const range = node && typeof node === "object" && "range" in node
60
+ ? node.range
61
+ : null;
62
+ add("SCHEMA", issue.message, issue.path, range?.[0] ?? 0, range?.[1] ?? 0);
63
+ }
64
+ }
65
+ }
66
+ catch (error) {
67
+ add("YAML", error instanceof Error ? error.message : String(error), [], 0, 0);
68
+ }
69
+ return {
70
+ apiVersion: "ingestron.document-validation/v1",
71
+ valid: diagnostics.length === 0,
72
+ diagnostics,
73
+ };
74
+ }
@@ -0,0 +1,5 @@
1
+ export declare const version: string;
2
+ /** Legacy minimumCli values describe the existing plugin ABI, not the reset app
3
+ * release number. Keep this compatibility level until manifests gain an explicit
4
+ * protocol range; never raise it without installed-provider acceptance tests. */
5
+ export declare const pluginCompatibilityVersion = "4.2.0";
@@ -0,0 +1,7 @@
1
+ import { installationRoot } from "./core/installation.js";
2
+ import { readFileSync } from "node:fs";
3
+ export const version = JSON.parse(readFileSync(installationRoot + "/package.json", "utf8")).version;
4
+ /** Legacy minimumCli values describe the existing plugin ABI, not the reset app
5
+ * release number. Keep this compatibility level until manifests gain an explicit
6
+ * protocol range; never raise it without installed-provider acceptance tests. */
7
+ export const pluginCompatibilityVersion = "4.2.0";
package/package.json ADDED
@@ -0,0 +1,72 @@
1
+ {
2
+ "name": "@ingestron/core",
3
+ "version": "0.12.0",
4
+ "type": "module",
5
+ "description": "Shared Ingestron project compiler, operations and editor schemas",
6
+ "license": "Apache-2.0",
7
+ "engines": {
8
+ "node": ">=22 <23"
9
+ },
10
+ "files": [
11
+ "dist",
12
+ "README.md",
13
+ "SECURITY.md",
14
+ "LICENSE",
15
+ "NOTICE",
16
+ "THIRD_PARTY_NOTICES.md"
17
+ ],
18
+ "exports": {
19
+ ".": {
20
+ "types": "./dist/sdk/index.d.ts",
21
+ "import": "./dist/sdk/index.js"
22
+ },
23
+ "./schemas": {
24
+ "types": "./dist/sdk/schemas.d.ts",
25
+ "import": "./dist/sdk/schemas.js"
26
+ },
27
+ "./adapter": {
28
+ "types": "./dist/sdk/adapter.d.ts",
29
+ "import": "./dist/sdk/adapter.js"
30
+ }
31
+ },
32
+ "dependencies": {
33
+ "@lezer/python": "1.1.19",
34
+ "ajv": "8.20.0",
35
+ "ajv-formats": "3.0.1",
36
+ "quickjs-emscripten": "0.32.0",
37
+ "yaml": "2.9.0",
38
+ "zod": "4.5.4"
39
+ },
40
+ "publishConfig": {
41
+ "access": "public",
42
+ "registry": "https://registry.npmjs.org/"
43
+ },
44
+ "repository": {
45
+ "type": "git",
46
+ "url": "git+https://github.com/ingestron/core.git"
47
+ },
48
+ "scripts": {
49
+ "build": "node scripts/build-assets.mjs && tsc && node scripts/compiler-fingerprint.mjs",
50
+ "test": "tsx --test --test-concurrency=1 test/unit/*.test.ts test/providers/*.test.ts test/integration/*.test.ts",
51
+ "format": "prettier --write .",
52
+ "format:check": "prettier --check .",
53
+ "secrets:check": "node scripts/secrets.mjs",
54
+ "release:check": "node scripts/release-check.mjs",
55
+ "package:check": "tsx scripts/package-check.ts",
56
+ "validate": "pnpm format:check && pnpm build && pnpm test && pnpm secrets:check && pnpm release:check && pnpm package:check",
57
+ "prepack": "npm run build",
58
+ "prepublishOnly": "node scripts/release-check.mjs --publish",
59
+ "licences:inventory": "node scripts/licence-inventory.mjs"
60
+ },
61
+ "packageManager": "pnpm@10.15.0",
62
+ "devDependencies": {
63
+ "@types/node": "22.20.1",
64
+ "prettier": "3.9.6",
65
+ "tsx": "4.23.13",
66
+ "typescript": "7.0.2"
67
+ },
68
+ "homepage": "https://ingestron.io",
69
+ "bugs": {
70
+ "url": "https://github.com/ingestron/core/issues"
71
+ }
72
+ }