@x12i/memorix-metadata 0.0.0-bootstrap.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/README.md +35 -0
- package/dist/abstracts.d.ts +98 -0
- package/dist/abstracts.d.ts.map +1 -0
- package/dist/abstracts.js +419 -0
- package/dist/abstracts.js.map +1 -0
- package/dist/fingerprint.d.ts +11 -0
- package/dist/fingerprint.d.ts.map +1 -0
- package/dist/fingerprint.js +66 -0
- package/dist/fingerprint.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/kind-fields.d.ts +13 -0
- package/dist/kind-fields.d.ts.map +1 -0
- package/dist/kind-fields.js +39 -0
- package/dist/kind-fields.js.map +1 -0
- package/dist/kinds.d.ts +21 -0
- package/dist/kinds.d.ts.map +1 -0
- package/dist/kinds.js +147 -0
- package/dist/kinds.js.map +1 -0
- package/dist/multi-agent-rule.d.ts +15 -0
- package/dist/multi-agent-rule.d.ts.map +1 -0
- package/dist/multi-agent-rule.js +30 -0
- package/dist/multi-agent-rule.js.map +1 -0
- package/dist/normalize.d.ts +26 -0
- package/dist/normalize.d.ts.map +1 -0
- package/dist/normalize.js +114 -0
- package/dist/normalize.js.map +1 -0
- package/dist/resolve.d.ts +85 -0
- package/dist/resolve.d.ts.map +1 -0
- package/dist/resolve.js +464 -0
- package/dist/resolve.js.map +1 -0
- package/dist/types.d.ts +277 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +6 -0
- package/dist/types.js.map +1 -0
- package/dist/validate.d.ts +7 -0
- package/dist/validate.d.ts.map +1 -0
- package/dist/validate.js +563 -0
- package/dist/validate.js.map +1 -0
- package/examples/invalid/agent-classification.json +709 -0
- package/examples/invalid/broken-binding.json +688 -0
- package/examples/invalid/completion-mapping-with-exec-policy.json +659 -0
- package/examples/invalid/missing-parent.json +708 -0
- package/examples/invalid/operational-kind-root.json +720 -0
- package/examples/invalid/pipeline-unknown-service.json +611 -0
- package/examples/invalid/relationship-missing-rules.json +624 -0
- package/examples/invalid/relationship-with-storage.json +631 -0
- package/examples/invalid/service-with-secrets.json +679 -0
- package/examples/ops/normalized/pack.json +1010 -0
- package/examples/ops/raw/abstract-bindings.json +38 -0
- package/examples/ops/raw/abstract-types.json +28 -0
- package/examples/ops/raw/agents.json +33 -0
- package/examples/ops/raw/object-types.json +170 -0
- package/examples/ops/raw/pipelines-and-sources.json +185 -0
- package/examples/ops/raw/relationship-definitions.json +110 -0
- package/examples/ops/raw/view-definitions.json +46 -0
- package/examples/ops/raw/write-and-source-mappings.json +108 -0
- package/examples/project-ops/normalized/pack.json +944 -0
- package/package.json +49 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { FINGERPRINT_EXCLUDED_KEYS, SET_ARRAY_PATHS } from "./kind-fields.js";
|
|
2
|
+
/**
|
|
3
|
+
* Schema-normalize a definition for canonical equality:
|
|
4
|
+
* - drop provenance / install / runtime fields
|
|
5
|
+
* - apply shallow schema defaults (undefined omitted; null parentId → null)
|
|
6
|
+
* - stable object-key ordering
|
|
7
|
+
* - preserve array order except explicit set-arrays (sorted)
|
|
8
|
+
*/
|
|
9
|
+
export function schemaNormalizeForFingerprint(value, keyHint) {
|
|
10
|
+
if (value === undefined)
|
|
11
|
+
return undefined;
|
|
12
|
+
if (value === null)
|
|
13
|
+
return null;
|
|
14
|
+
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
|
15
|
+
return value;
|
|
16
|
+
}
|
|
17
|
+
if (Array.isArray(value)) {
|
|
18
|
+
const normalized = value
|
|
19
|
+
.map((item) => schemaNormalizeForFingerprint(item))
|
|
20
|
+
.filter((item) => item !== undefined);
|
|
21
|
+
if (keyHint && SET_ARRAY_PATHS.has(keyHint)) {
|
|
22
|
+
return [...normalized]
|
|
23
|
+
.map((item) => JSON.stringify(item))
|
|
24
|
+
.sort()
|
|
25
|
+
.map((s) => JSON.parse(s));
|
|
26
|
+
}
|
|
27
|
+
return normalized;
|
|
28
|
+
}
|
|
29
|
+
if (typeof value === "object") {
|
|
30
|
+
const obj = value;
|
|
31
|
+
const out = {};
|
|
32
|
+
const keys = Object.keys(obj)
|
|
33
|
+
.filter((k) => !FINGERPRINT_EXCLUDED_KEYS.has(k))
|
|
34
|
+
.sort();
|
|
35
|
+
for (const key of keys) {
|
|
36
|
+
const next = schemaNormalizeForFingerprint(obj[key], key);
|
|
37
|
+
if (next !== undefined)
|
|
38
|
+
out[key] = next;
|
|
39
|
+
}
|
|
40
|
+
return out;
|
|
41
|
+
}
|
|
42
|
+
return String(value);
|
|
43
|
+
}
|
|
44
|
+
/** Deterministic fingerprint of a schema-normalized definition. */
|
|
45
|
+
export function fingerprintDefinition(definition) {
|
|
46
|
+
const normalized = schemaNormalizeForFingerprint(definition);
|
|
47
|
+
return stableStringify(normalized);
|
|
48
|
+
}
|
|
49
|
+
function stableStringify(value) {
|
|
50
|
+
if (value === null)
|
|
51
|
+
return "null";
|
|
52
|
+
if (typeof value === "string")
|
|
53
|
+
return JSON.stringify(value);
|
|
54
|
+
if (typeof value === "number" || typeof value === "boolean")
|
|
55
|
+
return String(value);
|
|
56
|
+
if (Array.isArray(value)) {
|
|
57
|
+
return `[${value.map((v) => stableStringify(v)).join(",")}]`;
|
|
58
|
+
}
|
|
59
|
+
if (typeof value === "object") {
|
|
60
|
+
const obj = value;
|
|
61
|
+
const keys = Object.keys(obj).sort();
|
|
62
|
+
return `{${keys.map((k) => `${JSON.stringify(k)}:${stableStringify(obj[k])}`).join(",")}}`;
|
|
63
|
+
}
|
|
64
|
+
return JSON.stringify(String(value));
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=fingerprint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fingerprint.js","sourceRoot":"","sources":["../src/fingerprint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,eAAe,EAAE,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CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;IAC7F,CAAC;IACD,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;AACvC,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { METADATA_KIND_IDS, METADATA_KIND_REGISTRY, FORBIDDEN_OPERATIONAL_KIND_IDS, isMetadataKindId, isForbiddenOperationalKindId, getMetadataKind, type MetadataKindId, type MetadataKindSpec, } from "./kinds.js";
|
|
2
|
+
export type * from "./types.js";
|
|
3
|
+
export { validateMetadataPack, assertValidMetadataPack, } from "./validate.js";
|
|
4
|
+
export { normalizeOpsPackBundle } from "./normalize.js";
|
|
5
|
+
export { fingerprintDefinition, schemaNormalizeForFingerprint, } from "./fingerprint.js";
|
|
6
|
+
export { MULTI_AGENT_COMBINATION_RULE, resolveEffectiveMetadata, resolveMultiAgentMetadata, getRawAgentView, collapseAncestorSelections, resolveParentChain, type DefinitionProvenance, type ConflictReport, type EffectiveDefinition, type EffectiveMetadataResult, type ResolveIssue, type RawAgentView, } from "./multi-agent-rule.js";
|
|
7
|
+
export { resolveAbstractBindings, resolveAbstractBindingsFromPack, resolveAbstractReverseWrite, type AbstractResolveIssue, type ConcreteMemberPlan, type PropertyConcretePath, type AbstractPropertyPlan, type AbstractBindingPlan, type RelationshipEndpointExpansion, type AbstractResolutionResult, } from "./abstracts.js";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,8BAA8B,EAC9B,gBAAgB,EAChB,4BAA4B,EAC5B,eAAe,EACf,KAAK,cAAc,EACnB,KAAK,gBAAgB,GACtB,MAAM,YAAY,CAAC;AAEpB,mBAAmB,YAAY,CAAC;AAEhC,OAAO,EACL,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAExD,OAAO,EACL,qBAAqB,EACrB,6BAA6B,GAC9B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,4BAA4B,EAC5B,wBAAwB,EACxB,yBAAyB,EACzB,eAAe,EACf,0BAA0B,EAC1B,kBAAkB,EAClB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,YAAY,EACjB,KAAK,YAAY,GAClB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,uBAAuB,EACvB,+BAA+B,EAC/B,2BAA2B,EAC3B,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,6BAA6B,EAClC,KAAK,wBAAwB,GAC9B,MAAM,gBAAgB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { METADATA_KIND_IDS, METADATA_KIND_REGISTRY, FORBIDDEN_OPERATIONAL_KIND_IDS, isMetadataKindId, isForbiddenOperationalKindId, getMetadataKind, } from "./kinds.js";
|
|
2
|
+
export { validateMetadataPack, assertValidMetadataPack, } from "./validate.js";
|
|
3
|
+
export { normalizeOpsPackBundle } from "./normalize.js";
|
|
4
|
+
export { fingerprintDefinition, schemaNormalizeForFingerprint, } from "./fingerprint.js";
|
|
5
|
+
export { MULTI_AGENT_COMBINATION_RULE, resolveEffectiveMetadata, resolveMultiAgentMetadata, getRawAgentView, collapseAncestorSelections, resolveParentChain, } from "./multi-agent-rule.js";
|
|
6
|
+
export { resolveAbstractBindings, resolveAbstractBindingsFromPack, resolveAbstractReverseWrite, } from "./abstracts.js";
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,8BAA8B,EAC9B,gBAAgB,EAChB,4BAA4B,EAC5B,eAAe,GAGhB,MAAM,YAAY,CAAC;AAIpB,OAAO,EACL,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAExD,OAAO,EACL,qBAAqB,EACrB,6BAA6B,GAC9B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,4BAA4B,EAC5B,wBAAwB,EACxB,yBAAyB,EACzB,eAAe,EACf,0BAA0B,EAC1B,kBAAkB,GAOnB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,uBAAuB,EACvB,+BAA+B,EAC/B,2BAA2B,GAQ5B,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { MetadataKindId } from "./kinds.js";
|
|
2
|
+
import type { MetadataPack } from "./types.js";
|
|
3
|
+
/** Pack array field for each declarative kind (excluding pack envelope). */
|
|
4
|
+
export declare const KIND_TO_PACK_FIELD: Record<Exclude<MetadataKindId, never>, keyof MetadataPack>;
|
|
5
|
+
export declare const PACK_DEFINITION_KINDS: MetadataKindId[];
|
|
6
|
+
/**
|
|
7
|
+
* Arrays treated as unordered sets for fingerprinting only.
|
|
8
|
+
* All other arrays preserve order (semantic).
|
|
9
|
+
*/
|
|
10
|
+
export declare const SET_ARRAY_PATHS: Set<string>;
|
|
11
|
+
/** Fields excluded from equality fingerprints (provenance / install / runtime). */
|
|
12
|
+
export declare const FINGERPRINT_EXCLUDED_KEYS: Set<string>;
|
|
13
|
+
//# sourceMappingURL=kind-fields.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kind-fields.d.ts","sourceRoot":"","sources":["../src/kind-fields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,4EAA4E;AAC5E,eAAO,MAAM,kBAAkB,EAAE,MAAM,CACrC,OAAO,CAAC,cAAc,EAAE,KAAK,CAAC,EAC9B,MAAM,YAAY,CAcnB,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAsC,cAAc,EAAE,CAAC;AAEzF;;;GAGG;AACH,eAAO,MAAM,eAAe,aAI1B,CAAC;AAEH,mFAAmF;AACnF,eAAO,MAAM,yBAAyB,aAWpC,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/** Pack array field for each declarative kind (excluding pack envelope). */
|
|
2
|
+
export const KIND_TO_PACK_FIELD = {
|
|
3
|
+
agents: "agents",
|
|
4
|
+
"object-types": "objectTypes",
|
|
5
|
+
"abstract-types": "abstractTypes",
|
|
6
|
+
"abstract-bindings": "abstractBindings",
|
|
7
|
+
"relationship-definitions": "relationshipDefinitions",
|
|
8
|
+
mappings: "mappings",
|
|
9
|
+
views: "views",
|
|
10
|
+
writes: "writes",
|
|
11
|
+
sources: "sources",
|
|
12
|
+
services: "services",
|
|
13
|
+
pipelines: "pipelines",
|
|
14
|
+
schedules: "schedules",
|
|
15
|
+
};
|
|
16
|
+
export const PACK_DEFINITION_KINDS = Object.keys(KIND_TO_PACK_FIELD);
|
|
17
|
+
/**
|
|
18
|
+
* Arrays treated as unordered sets for fingerprinting only.
|
|
19
|
+
* All other arrays preserve order (semantic).
|
|
20
|
+
*/
|
|
21
|
+
export const SET_ARRAY_PATHS = new Set([
|
|
22
|
+
"capabilities",
|
|
23
|
+
"concreteObjectTypes",
|
|
24
|
+
"abstractTypes",
|
|
25
|
+
]);
|
|
26
|
+
/** Fields excluded from equality fingerprints (provenance / install / runtime). */
|
|
27
|
+
export const FINGERPRINT_EXCLUDED_KEYS = new Set([
|
|
28
|
+
"provenance",
|
|
29
|
+
"inheritancePath",
|
|
30
|
+
"selectedAgentId",
|
|
31
|
+
"definedByAgentId",
|
|
32
|
+
"overridden",
|
|
33
|
+
"fingerprint",
|
|
34
|
+
"installedAt",
|
|
35
|
+
"runtime",
|
|
36
|
+
"runtimeStatus",
|
|
37
|
+
"_system",
|
|
38
|
+
]);
|
|
39
|
+
//# sourceMappingURL=kind-fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kind-fields.js","sourceRoot":"","sources":["../src/kind-fields.ts"],"names":[],"mappings":"AAGA,4EAA4E;AAC5E,MAAM,CAAC,MAAM,kBAAkB,GAG3B;IACF,MAAM,EAAE,QAAQ;IAChB,cAAc,EAAE,aAAa;IAC7B,gBAAgB,EAAE,eAAe;IACjC,mBAAmB,EAAE,kBAAkB;IACvC,0BAA0B,EAAE,yBAAyB;IACrD,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,WAAW;IACtB,SAAS,EAAE,WAAW;CACvB,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAqB,CAAC;AAEzF;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC;IACrC,cAAc;IACd,qBAAqB;IACrB,eAAe;CAChB,CAAC,CAAC;AAEH,mFAAmF;AACnF,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,GAAG,CAAC;IAC/C,YAAY;IACZ,iBAAiB;IACjB,iBAAiB;IACjB,kBAAkB;IAClB,YAAY;IACZ,aAAa;IACb,aAAa;IACb,SAAS;IACT,eAAe;IACf,SAAS;CACV,CAAC,CAAC"}
|
package/dist/kinds.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single registry of supported declarative metadata kinds (Phase 3A).
|
|
3
|
+
* Operational runs/leases/lineage/jobs are NOT metadata kinds.
|
|
4
|
+
*/
|
|
5
|
+
export declare const METADATA_KIND_IDS: readonly ["agents", "object-types", "abstract-types", "abstract-bindings", "relationship-definitions", "mappings", "views", "writes", "sources", "services", "pipelines", "schedules"];
|
|
6
|
+
export type MetadataKindId = (typeof METADATA_KIND_IDS)[number];
|
|
7
|
+
export type MetadataKindSpec = {
|
|
8
|
+
id: MetadataKindId;
|
|
9
|
+
title: string;
|
|
10
|
+
description: string;
|
|
11
|
+
/** Catalog / package migration notes */
|
|
12
|
+
legacyCatalogIds: string[];
|
|
13
|
+
disposition: "canonical" | "replace-legacy" | "create";
|
|
14
|
+
};
|
|
15
|
+
/** Explicit non-kinds: must never appear as declarative metadata kinds. */
|
|
16
|
+
export declare const FORBIDDEN_OPERATIONAL_KIND_IDS: readonly ["pipeline-runs", "memorix-pipeline-runs", "leases", "lineage", "job-records", "graph-runs", "job-type-runs"];
|
|
17
|
+
export declare const METADATA_KIND_REGISTRY: readonly MetadataKindSpec[];
|
|
18
|
+
export declare function isMetadataKindId(value: string): value is MetadataKindId;
|
|
19
|
+
export declare function isForbiddenOperationalKindId(value: string): boolean;
|
|
20
|
+
export declare function getMetadataKind(id: MetadataKindId): MetadataKindSpec;
|
|
21
|
+
//# sourceMappingURL=kinds.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kinds.d.ts","sourceRoot":"","sources":["../src/kinds.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,iBAAiB,wLAapB,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,cAAc,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,wCAAwC;IACxC,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,WAAW,EAAE,WAAW,GAAG,gBAAgB,GAAG,QAAQ,CAAC;CACxD,CAAC;AAEF,2EAA2E;AAC3E,eAAO,MAAM,8BAA8B,wHAQjC,CAAC;AAEX,eAAO,MAAM,sBAAsB,EAAE,SAAS,gBAAgB,EA6GpD,CAAC;AAEX,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,cAAc,CAEvE;AAED,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEnE;AAED,wBAAgB,eAAe,CAAC,EAAE,EAAE,cAAc,GAAG,gBAAgB,CAIpE"}
|
package/dist/kinds.js
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single registry of supported declarative metadata kinds (Phase 3A).
|
|
3
|
+
* Operational runs/leases/lineage/jobs are NOT metadata kinds.
|
|
4
|
+
*/
|
|
5
|
+
export const METADATA_KIND_IDS = [
|
|
6
|
+
"agents",
|
|
7
|
+
"object-types",
|
|
8
|
+
"abstract-types",
|
|
9
|
+
"abstract-bindings",
|
|
10
|
+
"relationship-definitions",
|
|
11
|
+
"mappings",
|
|
12
|
+
"views",
|
|
13
|
+
"writes",
|
|
14
|
+
"sources",
|
|
15
|
+
"services",
|
|
16
|
+
"pipelines",
|
|
17
|
+
"schedules",
|
|
18
|
+
];
|
|
19
|
+
/** Explicit non-kinds: must never appear as declarative metadata kinds. */
|
|
20
|
+
export const FORBIDDEN_OPERATIONAL_KIND_IDS = [
|
|
21
|
+
"pipeline-runs",
|
|
22
|
+
"memorix-pipeline-runs",
|
|
23
|
+
"leases",
|
|
24
|
+
"lineage",
|
|
25
|
+
"job-records",
|
|
26
|
+
"graph-runs",
|
|
27
|
+
"job-type-runs",
|
|
28
|
+
];
|
|
29
|
+
export const METADATA_KIND_REGISTRY = [
|
|
30
|
+
{
|
|
31
|
+
id: "agents",
|
|
32
|
+
title: "Agents",
|
|
33
|
+
description: "Ordinary OO agents; optional parentId; no base/concrete classification.",
|
|
34
|
+
legacyCatalogIds: ["memorix-agents", "memorix-inventory-policies (agents slice)"],
|
|
35
|
+
disposition: "create",
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: "object-types",
|
|
39
|
+
title: "Object / content types",
|
|
40
|
+
description: "Concrete object types and their content-type profiles.",
|
|
41
|
+
legacyCatalogIds: [
|
|
42
|
+
"memorix-object-type-descriptors",
|
|
43
|
+
"memorix-entity-descriptors",
|
|
44
|
+
],
|
|
45
|
+
disposition: "replace-legacy",
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
id: "abstract-types",
|
|
49
|
+
title: "Abstract types",
|
|
50
|
+
description: "Metadata-only abstracts; never materialize abstract records.",
|
|
51
|
+
legacyCatalogIds: ["memorix-abstract-type-descriptors"],
|
|
52
|
+
disposition: "replace-legacy",
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
id: "abstract-bindings",
|
|
56
|
+
title: "Abstract ↔ concrete bindings",
|
|
57
|
+
description: "Union/binding of abstracts to concrete object types.",
|
|
58
|
+
legacyCatalogIds: ["memorix-abstract-bindings"],
|
|
59
|
+
disposition: "replace-legacy",
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
id: "relationship-definitions",
|
|
63
|
+
title: "Relationship definitions",
|
|
64
|
+
description: "Abstract endpoints, directional paths, discovery rules; no physical data-link storage (G4).",
|
|
65
|
+
legacyCatalogIds: [
|
|
66
|
+
"memorix-associator-presets",
|
|
67
|
+
"memorix-associated-properties-registry",
|
|
68
|
+
"memorix-security-relationship-types",
|
|
69
|
+
],
|
|
70
|
+
disposition: "replace-legacy",
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
id: "mappings",
|
|
74
|
+
title: "Mappings",
|
|
75
|
+
description: "Purpose-discriminated mappings: source | abstract | completion. Completion execution policy lives on pipelines.",
|
|
76
|
+
legacyCatalogIds: [
|
|
77
|
+
"memorix-integration-abstraction-maps",
|
|
78
|
+
"memorix-completion-mappings",
|
|
79
|
+
],
|
|
80
|
+
disposition: "replace-legacy",
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
id: "views",
|
|
84
|
+
title: "Views",
|
|
85
|
+
description: "List/item/expansion view definitions.",
|
|
86
|
+
legacyCatalogIds: [
|
|
87
|
+
"lists",
|
|
88
|
+
"memorix-list-descriptors",
|
|
89
|
+
"memorix-item-descriptors",
|
|
90
|
+
"memorix-graph-descriptors",
|
|
91
|
+
],
|
|
92
|
+
disposition: "replace-legacy",
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
id: "writes",
|
|
96
|
+
title: "Write definitions",
|
|
97
|
+
description: "Validated write targets and identity policy hooks.",
|
|
98
|
+
legacyCatalogIds: ["memorix-write-descriptors"],
|
|
99
|
+
disposition: "replace-legacy",
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
id: "sources",
|
|
103
|
+
title: "Sources",
|
|
104
|
+
description: "Memory / fixture / integration source definitions.",
|
|
105
|
+
legacyCatalogIds: [],
|
|
106
|
+
disposition: "create",
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
id: "services",
|
|
110
|
+
title: "Services",
|
|
111
|
+
description: "Logical service capabilities and I/O/invocation contracts; no secrets or deployment/runtime state.",
|
|
112
|
+
legacyCatalogIds: ["memorix-pipeline-services"],
|
|
113
|
+
disposition: "replace-legacy",
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
id: "pipelines",
|
|
117
|
+
title: "Pipelines",
|
|
118
|
+
description: "Declarative pipeline graphs (not run records); may reference services.",
|
|
119
|
+
legacyCatalogIds: [
|
|
120
|
+
"memorix-pipeline-definitions",
|
|
121
|
+
"memorix-pipeline-templates",
|
|
122
|
+
"memorix-pipeline-steps",
|
|
123
|
+
"memorix-enrichment-playbooks",
|
|
124
|
+
],
|
|
125
|
+
disposition: "replace-legacy",
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
id: "schedules",
|
|
129
|
+
title: "Schedules",
|
|
130
|
+
description: "Declarative schedule bindings to pipelines.",
|
|
131
|
+
legacyCatalogIds: ["memorix-pipeline-schedules"],
|
|
132
|
+
disposition: "replace-legacy",
|
|
133
|
+
},
|
|
134
|
+
];
|
|
135
|
+
export function isMetadataKindId(value) {
|
|
136
|
+
return METADATA_KIND_IDS.includes(value);
|
|
137
|
+
}
|
|
138
|
+
export function isForbiddenOperationalKindId(value) {
|
|
139
|
+
return FORBIDDEN_OPERATIONAL_KIND_IDS.includes(value);
|
|
140
|
+
}
|
|
141
|
+
export function getMetadataKind(id) {
|
|
142
|
+
const found = METADATA_KIND_REGISTRY.find((k) => k.id === id);
|
|
143
|
+
if (!found)
|
|
144
|
+
throw new Error(`Unknown metadata kind: ${id}`);
|
|
145
|
+
return found;
|
|
146
|
+
}
|
|
147
|
+
//# sourceMappingURL=kinds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kinds.js","sourceRoot":"","sources":["../src/kinds.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,QAAQ;IACR,cAAc;IACd,gBAAgB;IAChB,mBAAmB;IACnB,0BAA0B;IAC1B,UAAU;IACV,OAAO;IACP,QAAQ;IACR,SAAS;IACT,UAAU;IACV,WAAW;IACX,WAAW;CACH,CAAC;AAaX,2EAA2E;AAC3E,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC5C,eAAe;IACf,uBAAuB;IACvB,QAAQ;IACR,SAAS;IACT,aAAa;IACb,YAAY;IACZ,eAAe;CACP,CAAC;AAEX,MAAM,CAAC,MAAM,sBAAsB,GAAgC;IACjE;QACE,EAAE,EAAE,QAAQ;Q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AC;AACf,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Multi-agent combination rule — implemented in Phase 3B (`resolve.ts`).
|
|
3
|
+
*/
|
|
4
|
+
export declare const MULTI_AGENT_COMBINATION_RULE: {
|
|
5
|
+
readonly id: "g3-multi-agent-combination";
|
|
6
|
+
readonly status: "implemented-phase-3b";
|
|
7
|
+
readonly steps: readonly ["Resolve every selected agent’s single-parent chain oldest-parent-first (with cycle detection).", "Collapse ancestor/descendant selections: if both an ancestor and a descendant appear in agentIds[], keep the descendant’s chain only.", "Within a chain: child adds new definitions; same kind+id completely replaces the parent definition (no deep merge; no silent removal).", "Combine unrelated effective agents additively.", "Deduplicate the same kind+id only when normalized fingerprints are identical.", "Fail differing definitions from unrelated branches with both provenance paths.", "Never use agentIds[] array order as hidden precedence.", "Validate references only after the entire effective set is composed.", "The same textual ID in different metadata kinds is not a conflict."];
|
|
8
|
+
readonly ancestorDescendantCollapse: {
|
|
9
|
+
readonly rule: "When agentIds[] contains both A and B where A is an ancestor of B, resolve B’s parent chain only; A is already covered.";
|
|
10
|
+
readonly rationale: "Prevents duplicate application of the same inherited definitions when operators select both a parent and a child.";
|
|
11
|
+
};
|
|
12
|
+
readonly nonGoals: readonly ["Does not decide relationship storage (G4).", "Does not implement Catalox install/publish.", "Does not execute mappings (mapping checkpoint later).", "Does not compile mappings."];
|
|
13
|
+
};
|
|
14
|
+
export { resolveEffectiveMetadata, resolveMultiAgentMetadata, getRawAgentView, collapseAncestorSelections, resolveParentChain, type DefinitionProvenance, type ConflictReport, type EffectiveDefinition, type EffectiveMetadataResult, type ResolveIssue, type RawAgentView, } from "./resolve.js";
|
|
15
|
+
//# sourceMappingURL=multi-agent-rule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"multi-agent-rule.d.ts","sourceRoot":"","sources":["../src/multi-agent-rule.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,4BAA4B;;;;;;;;;CAyB/B,CAAC;AAEX,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,eAAe,EACf,0BAA0B,EAC1B,kBAAkB,EAClB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,YAAY,EACjB,KAAK,YAAY,GAClB,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Multi-agent combination rule — implemented in Phase 3B (`resolve.ts`).
|
|
3
|
+
*/
|
|
4
|
+
export const MULTI_AGENT_COMBINATION_RULE = {
|
|
5
|
+
id: "g3-multi-agent-combination",
|
|
6
|
+
status: "implemented-phase-3b",
|
|
7
|
+
steps: [
|
|
8
|
+
"Resolve every selected agent’s single-parent chain oldest-parent-first (with cycle detection).",
|
|
9
|
+
"Collapse ancestor/descendant selections: if both an ancestor and a descendant appear in agentIds[], keep the descendant’s chain only.",
|
|
10
|
+
"Within a chain: child adds new definitions; same kind+id completely replaces the parent definition (no deep merge; no silent removal).",
|
|
11
|
+
"Combine unrelated effective agents additively.",
|
|
12
|
+
"Deduplicate the same kind+id only when normalized fingerprints are identical.",
|
|
13
|
+
"Fail differing definitions from unrelated branches with both provenance paths.",
|
|
14
|
+
"Never use agentIds[] array order as hidden precedence.",
|
|
15
|
+
"Validate references only after the entire effective set is composed.",
|
|
16
|
+
"The same textual ID in different metadata kinds is not a conflict.",
|
|
17
|
+
],
|
|
18
|
+
ancestorDescendantCollapse: {
|
|
19
|
+
rule: "When agentIds[] contains both A and B where A is an ancestor of B, resolve B’s parent chain only; A is already covered.",
|
|
20
|
+
rationale: "Prevents duplicate application of the same inherited definitions when operators select both a parent and a child.",
|
|
21
|
+
},
|
|
22
|
+
nonGoals: [
|
|
23
|
+
"Does not decide relationship storage (G4).",
|
|
24
|
+
"Does not implement Catalox install/publish.",
|
|
25
|
+
"Does not execute mappings (mapping checkpoint later).",
|
|
26
|
+
"Does not compile mappings.",
|
|
27
|
+
],
|
|
28
|
+
};
|
|
29
|
+
export { resolveEffectiveMetadata, resolveMultiAgentMetadata, getRawAgentView, collapseAncestorSelections, resolveParentChain, } from "./resolve.js";
|
|
30
|
+
//# sourceMappingURL=multi-agent-rule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"multi-agent-rule.js","sourceRoot":"","sources":["../src/multi-agent-rule.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,EAAE,EAAE,4BAA4B;IAChC,MAAM,EAAE,sBAAsB;IAC9B,KAAK,EAAE;QACL,gGAAgG;QAChG,uIAAuI;QACvI,wIAAwI;QACxI,gDAAgD;QAChD,+EAA+E;QAC/E,gFAAgF;QAChF,wDAAwD;QACxD,sEAAsE;QACtE,oEAAoE;KACrE;IACD,0BAA0B,EAAE;QAC1B,IAAI,EAAE,yHAAyH;QAC/H,SAAS,EACP,mHAAmH;KACtH;IACD,QAAQ,EAAE;QACR,4CAA4C;QAC5C,6CAA6C;QAC7C,uDAAuD;QACvD,4BAA4B;KAC7B;CACO,CAAC;AAEX,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,eAAe,EACf,0BAA0B,EAC1B,kBAAkB,GAOnB,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { MetadataPack } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Normalize a Phase-1 ops-pack style bundle into memorix-metadata/1.
|
|
4
|
+
*/
|
|
5
|
+
export declare function normalizeOpsPackBundle(input: {
|
|
6
|
+
agentId: string;
|
|
7
|
+
version?: string;
|
|
8
|
+
agents?: unknown;
|
|
9
|
+
abstractTypes?: unknown;
|
|
10
|
+
abstractBindings?: unknown;
|
|
11
|
+
objectTypes?: unknown;
|
|
12
|
+
relationshipDefinitions?: unknown;
|
|
13
|
+
viewDefinitions?: unknown;
|
|
14
|
+
writeDefinitions?: unknown;
|
|
15
|
+
sourceMappings?: unknown;
|
|
16
|
+
pipelineDefinitions?: unknown;
|
|
17
|
+
sources?: unknown;
|
|
18
|
+
services?: unknown;
|
|
19
|
+
schedules?: unknown;
|
|
20
|
+
format?: string;
|
|
21
|
+
mappings?: unknown;
|
|
22
|
+
views?: unknown;
|
|
23
|
+
writes?: unknown;
|
|
24
|
+
pipelines?: unknown;
|
|
25
|
+
}): MetadataPack;
|
|
26
|
+
//# sourceMappingURL=normalize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalize.d.ts","sourceRoot":"","sources":["../src/normalize.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,YAAY,EAGb,MAAM,YAAY,CAAC;AA0DpB;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE;IAC5C,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,GAAG,YAAY,CAyFf"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
function unwrapArray(value, key) {
|
|
2
|
+
if (Array.isArray(value))
|
|
3
|
+
return value;
|
|
4
|
+
if (value && typeof value === "object" && Array.isArray(value[key])) {
|
|
5
|
+
return value[key];
|
|
6
|
+
}
|
|
7
|
+
return [];
|
|
8
|
+
}
|
|
9
|
+
function normalizeEndpoint(end) {
|
|
10
|
+
const path = typeof end?.path === "string" && end.path.trim()
|
|
11
|
+
? end.path
|
|
12
|
+
: typeof end?.property === "string"
|
|
13
|
+
? end.property
|
|
14
|
+
: "";
|
|
15
|
+
return {
|
|
16
|
+
abstractType: String(end?.abstractType ?? ""),
|
|
17
|
+
path,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
function normalizeRelationship(raw) {
|
|
21
|
+
const r = raw;
|
|
22
|
+
return {
|
|
23
|
+
id: String(r.id),
|
|
24
|
+
name: String(r.name ?? r.id),
|
|
25
|
+
meaning: String(r.meaning ?? ""),
|
|
26
|
+
directionality: r.directionality === "undirected" ? "undirected" : "directed",
|
|
27
|
+
from: normalizeEndpoint(r.from),
|
|
28
|
+
to: normalizeEndpoint(r.to),
|
|
29
|
+
discoveryRules: Array.isArray(r.discoveryRules)
|
|
30
|
+
? r.discoveryRules
|
|
31
|
+
: [],
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function normalizeMapping(raw) {
|
|
35
|
+
const m = raw;
|
|
36
|
+
const purpose = m.purpose === "abstract" || m.purpose === "completion" || m.purpose === "source"
|
|
37
|
+
? m.purpose
|
|
38
|
+
: "source";
|
|
39
|
+
return {
|
|
40
|
+
id: String(m.id),
|
|
41
|
+
purpose,
|
|
42
|
+
sourceId: typeof m.sourceId === "string" ? m.sourceId : undefined,
|
|
43
|
+
abstractType: typeof m.abstractType === "string" ? m.abstractType : undefined,
|
|
44
|
+
endpoint: typeof m.endpoint === "string" ? m.endpoint : undefined,
|
|
45
|
+
objectType: String(m.objectType ?? ""),
|
|
46
|
+
contentType: String(m.contentType ?? ""),
|
|
47
|
+
mode: typeof m.mode === "string" ? m.mode : undefined,
|
|
48
|
+
trigger: typeof m.trigger === "string" ? m.trigger : undefined,
|
|
49
|
+
map: (m.map && typeof m.map === "object" ? m.map : {}),
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Normalize a Phase-1 ops-pack style bundle into memorix-metadata/1.
|
|
54
|
+
*/
|
|
55
|
+
export function normalizeOpsPackBundle(input) {
|
|
56
|
+
if (input.format === "memorix-metadata/1") {
|
|
57
|
+
return input;
|
|
58
|
+
}
|
|
59
|
+
const agentsRaw = Array.isArray(input.agents) ? input.agents : [];
|
|
60
|
+
const agents = agentsRaw.map((raw) => {
|
|
61
|
+
const a = raw;
|
|
62
|
+
const parentId = a.parentId !== undefined
|
|
63
|
+
? a.parentId
|
|
64
|
+
: (a.parentAgentId ?? null);
|
|
65
|
+
return {
|
|
66
|
+
id: String(a.id),
|
|
67
|
+
name: String(a.name ?? a.id),
|
|
68
|
+
description: typeof a.description === "string" ? a.description : undefined,
|
|
69
|
+
parentId,
|
|
70
|
+
};
|
|
71
|
+
});
|
|
72
|
+
const abstractTypes = unwrapArray(input.abstractTypes, "abstractTypes");
|
|
73
|
+
const abstractBindings = unwrapArray(input.abstractBindings, "bindings");
|
|
74
|
+
const objectTypes = unwrapArray(input.objectTypes, "objectTypes");
|
|
75
|
+
const relationshipDefinitions = unwrapArray(input.relationshipDefinitions, "relationshipDefinitions").map(normalizeRelationship);
|
|
76
|
+
const views = (Array.isArray(input.views)
|
|
77
|
+
? input.views
|
|
78
|
+
: unwrapArray(input.viewDefinitions, "viewDefinitions"));
|
|
79
|
+
const writes = (Array.isArray(input.writes)
|
|
80
|
+
? input.writes
|
|
81
|
+
: unwrapArray(input.writeDefinitions, "writeDefinitions"));
|
|
82
|
+
const mappings = (Array.isArray(input.mappings)
|
|
83
|
+
? input.mappings
|
|
84
|
+
: unwrapArray(input.sourceMappings, "sourceMappings")).map(normalizeMapping);
|
|
85
|
+
const pipelines = (Array.isArray(input.pipelines)
|
|
86
|
+
? input.pipelines
|
|
87
|
+
: unwrapArray(input.pipelineDefinitions, "pipelineDefinitions"));
|
|
88
|
+
let sources = (Array.isArray(input.sources) ? input.sources : unwrapArray(input.sources, "sources"));
|
|
89
|
+
if (sources.length === 0 &&
|
|
90
|
+
input.pipelineDefinitions &&
|
|
91
|
+
typeof input.pipelineDefinitions === "object") {
|
|
92
|
+
sources = unwrapArray(input.pipelineDefinitions, "sources");
|
|
93
|
+
}
|
|
94
|
+
const services = (Array.isArray(input.services) ? input.services : unwrapArray(input.services, "services"));
|
|
95
|
+
const schedules = (Array.isArray(input.schedules) ? input.schedules : []);
|
|
96
|
+
return {
|
|
97
|
+
format: "memorix-metadata/1",
|
|
98
|
+
agentId: input.agentId,
|
|
99
|
+
version: input.version,
|
|
100
|
+
agents,
|
|
101
|
+
objectTypes,
|
|
102
|
+
abstractTypes,
|
|
103
|
+
abstractBindings,
|
|
104
|
+
relationshipDefinitions,
|
|
105
|
+
mappings,
|
|
106
|
+
views,
|
|
107
|
+
writes,
|
|
108
|
+
sources,
|
|
109
|
+
services,
|
|
110
|
+
pipelines,
|
|
111
|
+
schedules,
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
//# sourceMappingURL=normalize.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalize.js","sourceRoot":"","sources":["../src/normalize.ts"],"names":[],"mappings":"AAOA,SAAS,WAAW,CAAC,KAAc,EAAE,GAAW;IAC9C,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IACvC,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAE,KAAiC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;QACjG,OAAQ,KAAiC,CAAC,GAAG,CAAc,CAAC;IAC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,CAAC,KAAK,CAAC,QAAQ,EAAE,UAAU,CAAC,CAClE,CAAC;IAEzB,MAAM,SAAS,GAAG,CAChB,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CACzB,CAAC;IAE/B,OAAO;QACL,MAAM,EAAE,oBAAoB;QAC5B,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,MAAM;QACN,WAAW;QACX,aAAa;QACb,gBAAgB;QAChB,uBAAuB;QACvB,QAAQ;QACR,KAAK;QACL,MAAM;QACN,OAAO;QACP,QAAQ;QACR,SAAS;QACT,SAAS;KACV,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type { MetadataKindId } from "./kinds.js";
|
|
2
|
+
import type { AgentDefinition, MetadataPack, ValidationIssue } from "./types.js";
|
|
3
|
+
export type DefinitionProvenance = {
|
|
4
|
+
kind: MetadataKindId;
|
|
5
|
+
id: string;
|
|
6
|
+
/** Agent that authored the winning definition body. */
|
|
7
|
+
definedByAgentId: string;
|
|
8
|
+
/** Oldest-parent-first chain ending at the defining agent. */
|
|
9
|
+
inheritancePath: string[];
|
|
10
|
+
/** Selected agentIds[] entry that caused this definition to be included. */
|
|
11
|
+
selectedAgentId: string;
|
|
12
|
+
fingerprint: string;
|
|
13
|
+
overridden?: {
|
|
14
|
+
definedByAgentId: string;
|
|
15
|
+
inheritancePath: string[];
|
|
16
|
+
fingerprint: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export type EffectiveDefinition = {
|
|
20
|
+
kind: MetadataKindId;
|
|
21
|
+
id: string;
|
|
22
|
+
definition: Record<string, unknown>;
|
|
23
|
+
provenance: DefinitionProvenance;
|
|
24
|
+
};
|
|
25
|
+
export type ConflictReport = {
|
|
26
|
+
kind: MetadataKindId;
|
|
27
|
+
id: string;
|
|
28
|
+
left: DefinitionProvenance;
|
|
29
|
+
right: DefinitionProvenance;
|
|
30
|
+
reason: string;
|
|
31
|
+
};
|
|
32
|
+
export type ResolveIssue = {
|
|
33
|
+
code: string;
|
|
34
|
+
message: string;
|
|
35
|
+
agentId?: string;
|
|
36
|
+
path?: string[];
|
|
37
|
+
};
|
|
38
|
+
export type EffectiveMetadataResult = {
|
|
39
|
+
ok: boolean;
|
|
40
|
+
selectedAgentIds: string[];
|
|
41
|
+
collapsedAgentIds: string[];
|
|
42
|
+
issues: ResolveIssue[];
|
|
43
|
+
conflicts: ConflictReport[];
|
|
44
|
+
referenceIssues: ValidationIssue[];
|
|
45
|
+
effective: EffectiveDefinition[];
|
|
46
|
+
/** Composed pack used for post-composition reference validation. */
|
|
47
|
+
effectivePack: MetadataPack | null;
|
|
48
|
+
};
|
|
49
|
+
export type RawAgentView = {
|
|
50
|
+
agentId: string;
|
|
51
|
+
agent: AgentDefinition | null;
|
|
52
|
+
pack: MetadataPack | null;
|
|
53
|
+
issues: ResolveIssue[];
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Drop ancestors when a descendant is also selected.
|
|
57
|
+
* Remaining set is sorted for deterministic processing (not precedence).
|
|
58
|
+
*/
|
|
59
|
+
export declare function collapseAncestorSelections(selectedAgentIds: string[], agents: Map<string, AgentDefinition>): string[];
|
|
60
|
+
/**
|
|
61
|
+
* Resolve single-parent chain oldest-parent-first.
|
|
62
|
+
*/
|
|
63
|
+
export declare function resolveParentChain(agentId: string, agents: Map<string, AgentDefinition>): {
|
|
64
|
+
ok: true;
|
|
65
|
+
chain: string[];
|
|
66
|
+
} | {
|
|
67
|
+
ok: false;
|
|
68
|
+
issues: ResolveIssue[];
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* Resolve effective metadata for selected agentIds[].
|
|
72
|
+
* Array order never confers precedence; output is deterministic.
|
|
73
|
+
*/
|
|
74
|
+
export declare function resolveEffectiveMetadata(input: {
|
|
75
|
+
agentIds: string[];
|
|
76
|
+
packsByAgentId: Record<string, MetadataPack>;
|
|
77
|
+
}): EffectiveMetadataResult;
|
|
78
|
+
/** Raw (unresolved) view of a single agent's pack. */
|
|
79
|
+
export declare function getRawAgentView(agentId: string, packsByAgentId: Record<string, MetadataPack>): RawAgentView;
|
|
80
|
+
/** @deprecated use resolveEffectiveMetadata */
|
|
81
|
+
export declare function resolveMultiAgentMetadata(input: {
|
|
82
|
+
agentIds: string[];
|
|
83
|
+
packsByAgentId: Record<string, MetadataPack>;
|
|
84
|
+
}): EffectiveMetadataResult;
|
|
85
|
+
//# sourceMappingURL=resolve.d.ts.map
|