@pipelex/mthds-ui 0.13.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-XCZLRCEJ.js → chunk-O62372BD.js} +64 -2
- package/dist/chunk-O62372BD.js.map +1 -0
- package/dist/chunk-QD5YDMWV.js +1 -0
- package/dist/{chunk-IMQ7MVYL.js → chunk-YC7TW3BW.js} +16 -2
- package/dist/chunk-YC7TW3BW.js.map +1 -0
- package/dist/graph/index.d.ts +38 -3
- package/dist/graph/index.js +13 -3
- package/dist/graph/react/graph-core.css +71 -2
- package/dist/graph/react/index.d.ts +8 -2
- package/dist/graph/react/index.js +282 -143
- package/dist/graph/react/index.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +13 -3
- package/dist/pipeRefs-BQJO5nh5.d.ts +19 -0
- package/dist/standalone/graph-standalone.html +82 -12
- package/dist/standalone/graph-viewer.css +71 -2
- package/dist/standalone/graph-viewer.js +11 -10
- package/dist/static-graph/index.d.ts +18 -1
- package/dist/static-graph/index.js +39 -12
- package/dist/static-graph/index.js.map +1 -1
- package/dist/{types-Cm4147S5.d.ts → types-DFIZ_rx6.d.ts} +42 -4
- package/package.json +1 -1
- package/dist/chunk-IMQ7MVYL.js.map +0 -1
- package/dist/chunk-L24K3TZU.js +0 -1
- package/dist/chunk-XCZLRCEJ.js.map +0 -1
- /package/dist/{chunk-L24K3TZU.js.map → chunk-QD5YDMWV.js.map} +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { C as ConceptInfo, P as PipeBlueprintUnion, G as GraphSpec, V as ValidationIssue } from '../types-
|
|
1
|
+
import { C as ConceptInfo, P as PipeBlueprintUnion, G as GraphSpec, V as ValidationIssue } from '../types-DFIZ_rx6.js';
|
|
2
|
+
export { P as ParsedPipeRef, m as makePipeRef, p as parsePipeRef } from '../pipeRefs-BQJO5nh5.js';
|
|
2
3
|
|
|
3
4
|
type DiagnosticSeverity = "error" | "warning";
|
|
4
5
|
type DiagnosticCode = "toml-parse-error" | "missing-domain" | "invalid-bundle-shape" | "invalid-concept-entry" | "invalid-pipe-entry" | "unknown-pipe-type" | "invalid-concept-ref" | "missing-pipe-output" | "invalid-sub-pipe" | "incomplete-batch-spec" | "duplicate-concept" | "duplicate-pipe" | "unresolved-pipe-ref" | "cyclic-pipe-ref" | "missing-main-pipe" | "no-entry-pipe" | "conflicting-input-concept";
|
|
@@ -13,6 +14,19 @@ interface Diagnostic {
|
|
|
13
14
|
message: string;
|
|
14
15
|
/** TOML-style locator for the offending entry, e.g. `pipe.analyze_candidate.output`. */
|
|
15
16
|
path?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Domain of the bundle namespace the diagnostic belongs to — the declaring-file
|
|
19
|
+
* identity a host needs to qualify a `pipe.<code>` locator into a full pipe ref
|
|
20
|
+
* (`domain_code.pipe_code`). Stamped wherever the owning namespace is known:
|
|
21
|
+
* per-file diagnostics get their bundle's domain ({@link UNKNOWN_DOMAIN} when
|
|
22
|
+
* the bundle declares none), merge/walk diagnostics the namespace being
|
|
23
|
+
* processed, and entry selection stamps the diagnostics it can attribute (a
|
|
24
|
+
* missing or unresolvable `main_pipe` names its declaring domain). Absent only
|
|
25
|
+
* when no owning bundle can be resolved: unparseable TOML, or entry selection
|
|
26
|
+
* with no resolvable owner (no bundles, no pipes anywhere, or a host-supplied
|
|
27
|
+
* entry ref that matches nothing).
|
|
28
|
+
*/
|
|
29
|
+
domain_code?: string;
|
|
16
30
|
}
|
|
17
31
|
/**
|
|
18
32
|
* One `.mthds` file, parsed and normalized. Pipes are narrowed to the same
|
|
@@ -112,6 +126,9 @@ declare function buildStaticGraphSpecFromToml(tomlTexts: string | string[], opti
|
|
|
112
126
|
* so a host can feed them straight into `GraphViewer`'s `validationIssues`.
|
|
113
127
|
* The TOML-style `path` becomes the locator chip; `origin: "static"` lets the
|
|
114
128
|
* panel (and the host's issue policy) distinguish them from validator verdicts.
|
|
129
|
+
* When the path identifies a pipe declaration or a precise invocation, the
|
|
130
|
+
* targeting fields (`pipeRef` / `nodeId`) are filled so the viewer can
|
|
131
|
+
* decorate the affected graph nodes.
|
|
115
132
|
*/
|
|
116
133
|
declare function staticDiagnosticsToValidationIssues(diagnostics: Diagnostic[]): ValidationIssue[];
|
|
117
134
|
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
|
-
KNOWN_PIPE_TYPES
|
|
3
|
-
|
|
2
|
+
KNOWN_PIPE_TYPES,
|
|
3
|
+
makePipeRef,
|
|
4
|
+
parsePipeRef
|
|
5
|
+
} from "../chunk-YC7TW3BW.js";
|
|
4
6
|
import {
|
|
5
7
|
__spreadProps,
|
|
6
8
|
__spreadValues
|
|
@@ -559,7 +561,7 @@ function emptyBundle() {
|
|
|
559
561
|
};
|
|
560
562
|
}
|
|
561
563
|
function parseMthdsBundle(tomlText) {
|
|
562
|
-
var _a;
|
|
564
|
+
var _a, _b;
|
|
563
565
|
const diagnostics = [];
|
|
564
566
|
let root;
|
|
565
567
|
try {
|
|
@@ -613,6 +615,9 @@ function parseMthdsBundle(tomlText) {
|
|
|
613
615
|
}
|
|
614
616
|
}
|
|
615
617
|
}
|
|
618
|
+
for (const diagnostic of diagnostics) {
|
|
619
|
+
(_b = diagnostic.domain_code) != null ? _b : diagnostic.domain_code = domain;
|
|
620
|
+
}
|
|
616
621
|
return { bundle, diagnostics };
|
|
617
622
|
}
|
|
618
623
|
|
|
@@ -651,7 +656,8 @@ function mergeBundles(bundles) {
|
|
|
651
656
|
severity: "warning",
|
|
652
657
|
code: "duplicate-concept",
|
|
653
658
|
message: `concept "${domain}.${code}" declared more than once \u2014 keeping the first declaration`,
|
|
654
|
-
path: `concept.${code}
|
|
659
|
+
path: `concept.${code}`,
|
|
660
|
+
domain_code: domain
|
|
655
661
|
});
|
|
656
662
|
continue;
|
|
657
663
|
}
|
|
@@ -663,7 +669,8 @@ function mergeBundles(bundles) {
|
|
|
663
669
|
severity: "warning",
|
|
664
670
|
code: "duplicate-pipe",
|
|
665
671
|
message: `pipe "${domain}.${code}" declared more than once \u2014 keeping the first declaration`,
|
|
666
|
-
path: `pipe.${code}
|
|
672
|
+
path: `pipe.${code}`,
|
|
673
|
+
domain_code: domain
|
|
667
674
|
});
|
|
668
675
|
continue;
|
|
669
676
|
}
|
|
@@ -806,13 +813,17 @@ function pickEntryPipe(set, explicitRef, diagnostics) {
|
|
|
806
813
|
diagnostics.push({
|
|
807
814
|
severity: "warning",
|
|
808
815
|
code: "unresolved-pipe-ref",
|
|
809
|
-
message: `main_pipe "${set.mainPipe}" not found \u2014 falling back to a root heuristic
|
|
816
|
+
message: `main_pipe "${set.mainPipe}" not found \u2014 falling back to a root heuristic`,
|
|
817
|
+
// The owning bundle is known (the namespace that declares this main_pipe),
|
|
818
|
+
// so stamp it — this is not an ownerless diagnostic.
|
|
819
|
+
domain_code: fallbackDomain
|
|
810
820
|
});
|
|
811
821
|
} else {
|
|
812
822
|
diagnostics.push({
|
|
813
823
|
severity: "warning",
|
|
814
824
|
code: "missing-main-pipe",
|
|
815
|
-
message: "no main_pipe declared \u2014 falling back to a root heuristic"
|
|
825
|
+
message: "no main_pipe declared \u2014 falling back to a root heuristic",
|
|
826
|
+
domain_code: fallbackDomain
|
|
816
827
|
});
|
|
817
828
|
}
|
|
818
829
|
const domainWithPipes = [fallbackDomain, ...domainsInOrder].find(
|
|
@@ -894,7 +905,8 @@ function bindInputs(ctx, blueprint, scope) {
|
|
|
894
905
|
severity: "warning",
|
|
895
906
|
code: "conflicting-input-concept",
|
|
896
907
|
message: `pipe "${blueprint.code}": dangling input "${name}" is declared as ${conceptKey(spec.concept)} here but was first seen as ${conceptKey(bound.concept)} \u2014 keeping the first`,
|
|
897
|
-
path: `pipe.${blueprint.code}.inputs.${name}
|
|
908
|
+
path: `pipe.${blueprint.code}.inputs.${name}`,
|
|
909
|
+
domain_code: blueprint.domain_code
|
|
898
910
|
});
|
|
899
911
|
}
|
|
900
912
|
}
|
|
@@ -934,7 +946,10 @@ function walkPipe(ctx, ref, currentDomain, nodeId, parentId, scope, inv) {
|
|
|
934
946
|
severity: "warning",
|
|
935
947
|
code: "unresolved-pipe-ref",
|
|
936
948
|
message: `pipe ref "${ref}" cannot be resolved \u2014 node skipped`,
|
|
937
|
-
path: nodeId
|
|
949
|
+
path: nodeId,
|
|
950
|
+
// The uttering file's domain: a bare ref belongs to the namespace that
|
|
951
|
+
// wrote it, mirroring the runtime's `_qualify_pipe_ref` inference.
|
|
952
|
+
domain_code: currentDomain
|
|
938
953
|
});
|
|
939
954
|
return null;
|
|
940
955
|
}
|
|
@@ -960,7 +975,8 @@ function walkPipe(ctx, ref, currentDomain, nodeId, parentId, scope, inv) {
|
|
|
960
975
|
severity: "warning",
|
|
961
976
|
code: "cyclic-pipe-ref",
|
|
962
977
|
message: `pipe "${qualified}" is invoked recursively \u2014 rendered as a leaf`,
|
|
963
|
-
path: nodeId
|
|
978
|
+
path: nodeId,
|
|
979
|
+
domain_code: domain
|
|
964
980
|
});
|
|
965
981
|
return finishLeaf(ctx, node, blueprint, nodeId, inv);
|
|
966
982
|
}
|
|
@@ -1256,13 +1272,22 @@ function walkInlineBatch(ctx, sub, domain, nodeId, parentId, scope) {
|
|
|
1256
1272
|
}
|
|
1257
1273
|
|
|
1258
1274
|
// src/static-graph/validationIssues.ts
|
|
1275
|
+
function targetFromPath(path, domainCode) {
|
|
1276
|
+
if (!path) return {};
|
|
1277
|
+
if (path.includes("/")) return { nodeId: path };
|
|
1278
|
+
if (path.startsWith("pipe.")) {
|
|
1279
|
+
const code = path.split(".")[1];
|
|
1280
|
+
if (code && domainCode) return { pipeRef: makePipeRef(domainCode, code) };
|
|
1281
|
+
}
|
|
1282
|
+
return {};
|
|
1283
|
+
}
|
|
1259
1284
|
function staticDiagnosticsToValidationIssues(diagnostics) {
|
|
1260
|
-
return diagnostics.map((diagnostic) => ({
|
|
1285
|
+
return diagnostics.map((diagnostic) => __spreadValues({
|
|
1261
1286
|
severity: diagnostic.severity,
|
|
1262
1287
|
message: diagnostic.message,
|
|
1263
1288
|
context: diagnostic.path,
|
|
1264
1289
|
origin: "static"
|
|
1265
|
-
}));
|
|
1290
|
+
}, targetFromPath(diagnostic.path, diagnostic.domain_code)));
|
|
1266
1291
|
}
|
|
1267
1292
|
export {
|
|
1268
1293
|
NATIVE_CONCEPT_CODES,
|
|
@@ -1270,9 +1295,11 @@ export {
|
|
|
1270
1295
|
UNKNOWN_DOMAIN,
|
|
1271
1296
|
buildStaticGraphSpec,
|
|
1272
1297
|
buildStaticGraphSpecFromToml,
|
|
1298
|
+
makePipeRef,
|
|
1273
1299
|
mergeBundles,
|
|
1274
1300
|
parseConceptRef,
|
|
1275
1301
|
parseMthdsBundle,
|
|
1302
|
+
parsePipeRef,
|
|
1276
1303
|
staticDiagnosticsToValidationIssues
|
|
1277
1304
|
};
|
|
1278
1305
|
//# sourceMappingURL=index.js.map
|