@a5c-ai/agent-catalog 5.0.1-staging.893fe96d → 5.0.1-staging.a3d60f68
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/atlas-bridge.d.ts +28 -0
- package/dist/atlas-bridge.d.ts.map +1 -0
- package/dist/atlas-bridge.js +178 -0
- package/dist/cli.js +29 -29
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +295 -102
- package/dist/discovery-snapshot.json +11211 -11211
- package/dist/evidence.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/models.d.ts +3 -0
- package/dist/models.d.ts.map +1 -1
- package/dist/sdk.d.ts.map +1 -1
- package/dist/sdk.js +16 -11
- package/evidence/ontology-evidence/claims/runtime-core.json +18935 -104
- package/evidence/ontology-evidence/evidence-sources/catalog-processes-and-packaging.json +88 -33
- package/evidence/ontology-evidence/evidence-sources/plugins-hooks-discovery.json +35 -77
- package/evidence/ontology-evidence/evidence-sources/runtime-core.json +709 -51
- package/evidence/ontology-evidence/evidence-sources/vendor-web.json +3173 -909
- package/evidence/ontology-evidence/manifest.json +6 -24
- package/package.json +4 -6
- package/graph/agent-catalog.graph.yaml +0 -43
- package/graph/edges/relations/agent-runtime/babysitter-agent.yaml +0 -31
- package/graph/edges/relations/agent-runtime/discovery-and-paths.yaml +0 -433
- package/graph/edges/relations/agent-runtime/session-and-lifecycle.yaml +0 -137
- package/graph/edges/relations/agent-runtime/transports-and-modalities.yaml +0 -387
- package/graph/edges/relations/capabilities/babysitter-agent-links.yaml +0 -46
- package/graph/edges/relations/capabilities/capability-vocabulary-links-agents.yaml +0 -478
- package/graph/edges/relations/capabilities/capability-vocabulary-links-providers.yaml +0 -40
- package/graph/edges/relations/capabilities/capability-vocabulary-links-transports.yaml +0 -70
- package/graph/edges/relations/capabilities/support-record-links-agents.yaml +0 -478
- package/graph/edges/relations/capabilities/support-record-links-providers.yaml +0 -40
- package/graph/edges/relations/capabilities/support-record-links-transports.yaml +0 -70
- package/graph/edges/relations/evolution.yaml +0 -16
- package/graph/edges/relations/hooks-and-plugins.yaml +0 -462
- package/graph/edges/relations/identity-babysitter-agent.yaml +0 -11
- package/graph/edges/relations/identity.yaml +0 -218
- package/graph/edges/relations/processes-and-packages.yaml +0 -71
- package/graph/edges/relations/provenance/babysitter-agent-and-claude-web.yaml +0 -102
- package/graph/edges/relations/provenance/catalog-core-agents.yaml +0 -370
- package/graph/edges/relations/provenance/catalog-core-models.yaml +0 -88
- package/graph/edges/relations/provenance/catalog-core-providers.yaml +0 -220
- package/graph/edges/relations/provenance/evidence-sources.yaml +0 -136
- package/graph/edges/relations/provenance/hooks-plugins-and-discovery-discovery.yaml +0 -124
- package/graph/edges/relations/provenance/hooks-plugins-and-discovery-hooks.yaml +0 -244
- package/graph/edges/relations/provenance/hooks-plugins-and-discovery-plugins.yaml +0 -166
- package/graph/edges/relations/provenance/processes-packages-and-paths.yaml +0 -490
- package/graph/edges/relations/provenance/runtime-and-capabilities-capability.yaml +0 -202
- package/graph/edges/relations/provenance/runtime-and-capabilities-capabilitySupport-agents-claude.yaml +0 -210
- package/graph/edges/relations/provenance/runtime-and-capabilities-capabilitySupport-agents-codex.yaml +0 -302
- package/graph/edges/relations/provenance/runtime-and-capabilities-capabilitySupport-agents-copilot.yaml +0 -170
- package/graph/edges/relations/provenance/runtime-and-capabilities-capabilitySupport-agents-cursor.yaml +0 -146
- package/graph/edges/relations/provenance/runtime-and-capabilities-capabilitySupport-agents-gemini.yaml +0 -143
- package/graph/edges/relations/provenance/runtime-and-capabilities-capabilitySupport-agents-omp.yaml +0 -76
- package/graph/edges/relations/provenance/runtime-and-capabilities-capabilitySupport-agents-openclaw.yaml +0 -112
- package/graph/edges/relations/provenance/runtime-and-capabilities-capabilitySupport-agents-opencode.yaml +0 -139
- package/graph/edges/relations/provenance/runtime-and-capabilities-capabilitySupport-agents-pi.yaml +0 -40
- package/graph/edges/relations/provenance/runtime-and-capabilities-capabilitySupport-providers.yaml +0 -112
- package/graph/edges/relations/provenance/runtime-and-capabilities-capabilitySupport-transports.yaml +0 -190
- package/graph/edges/relations/provenance/runtime-and-capabilities-modality.yaml +0 -88
- package/graph/edges/relations/provenance/runtime-and-capabilities-transport.yaml +0 -172
- package/graph/nodes/agents/babysitter-agent.yaml +0 -43
- package/graph/nodes/agents/products.yaml +0 -163
- package/graph/nodes/agents/versions.yaml +0 -282
- package/graph/nodes/capabilities/capabilities.yaml +0 -234
- package/graph/nodes/capabilities/modalities.yaml +0 -74
- package/graph/nodes/capabilities/supports/agents/babysitter-agent.yaml +0 -46
- package/graph/nodes/capabilities/supports/agents/claude.yaml +0 -166
- package/graph/nodes/capabilities/supports/agents/codex.yaml +0 -190
- package/graph/nodes/capabilities/supports/agents/copilot.yaml +0 -121
- package/graph/nodes/capabilities/supports/agents/cursor.yaml +0 -104
- package/graph/nodes/capabilities/supports/agents/gemini.yaml +0 -104
- package/graph/nodes/capabilities/supports/agents/omp.yaml +0 -74
- package/graph/nodes/capabilities/supports/agents/openclaw.yaml +0 -67
- package/graph/nodes/capabilities/supports/agents/opencode.yaml +0 -103
- package/graph/nodes/capabilities/supports/agents/pi.yaml +0 -65
- package/graph/nodes/capabilities/supports/provider-versions.yaml +0 -73
- package/graph/nodes/capabilities/supports/transport-runtimes.yaml +0 -122
- package/graph/nodes/evidence/babysitter-agent-and-claude-web.yaml +0 -83
- package/graph/nodes/evidence/claims.yaml +0 -315
- package/graph/nodes/evidence/claude-code-capability-claims.yaml +0 -170
- package/graph/nodes/evidence/claude-code-docs-core.yaml +0 -103
- package/graph/nodes/evidence/claude-code-docs-extensions.yaml +0 -114
- package/graph/nodes/evidence/codex-web.yaml +0 -155
- package/graph/nodes/evidence/copilot-web.yaml +0 -213
- package/graph/nodes/evidence/cursor-web.yaml +0 -191
- package/graph/nodes/evidence/evidence-sources.yaml +0 -206
- package/graph/nodes/evidence/gemini-cli-web.yaml +0 -177
- package/graph/nodes/evidence/omp-web.yaml +0 -129
- package/graph/nodes/evidence/opencode-web.yaml +0 -144
- package/graph/nodes/hooks-and-plugins/hook-mappings.yaml +0 -399
- package/graph/nodes/hooks-and-plugins/hook-surfaces.yaml +0 -160
- package/graph/nodes/hooks-and-plugins/plugin-artifacts.yaml +0 -229
- package/graph/nodes/hooks-and-plugins/plugin-targets.yaml +0 -330
- package/graph/nodes/models.yaml +0 -103
- package/graph/nodes/processes-and-packages/ci-surfaces.yaml +0 -45
- package/graph/nodes/processes-and-packages/packages.yaml +0 -89
- package/graph/nodes/processes-and-packages/processes.yaml +0 -44
- package/graph/nodes/providers/products.yaml +0 -102
- package/graph/nodes/providers/versions.yaml +0 -108
- package/graph/nodes/runtime-semantics/discovery-signals-hooks.yaml +0 -185
- package/graph/nodes/runtime-semantics/discovery-signals-host.yaml +0 -254
- package/graph/nodes/runtime-semantics/lifecycle-semantics.yaml +0 -151
- package/graph/nodes/runtime-semantics/paths.yaml +0 -289
- package/graph/nodes/runtime-semantics/session-semantics.yaml +0 -214
- package/graph/nodes/transports.yaml +0 -202
- package/graph/schema/ontology-schema.yaml +0 -529
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Atlas bridge for agent-catalog.
|
|
3
|
+
*
|
|
4
|
+
* Adapts the Atlas graph singleton (`@a5c-ai/atlas`) into the same query
|
|
5
|
+
* surface that `graph.ts` previously exposed. All data comes from Atlas —
|
|
6
|
+
* there is no fallback to local YAML files.
|
|
7
|
+
*/
|
|
8
|
+
import type { CatalogGraph, GraphDocument, GraphEdge, GraphNode, GraphRelationship, OntologySchema } from "./models";
|
|
9
|
+
export declare function listGraphNodes(): GraphNode[];
|
|
10
|
+
export declare function listNodesByKind(kind: GraphNode["kind"]): GraphNode[];
|
|
11
|
+
export declare function getNodeById<TNode extends GraphNode = GraphNode>(nodeId: string): TNode | undefined;
|
|
12
|
+
export declare function listRelationshipsByRelation(relation: string): GraphRelationship[];
|
|
13
|
+
export declare function listGraphEdges(): GraphRelationship[];
|
|
14
|
+
export declare function listOutgoingTargets(nodeId: string, relation: string): GraphNode[];
|
|
15
|
+
export declare function listIncomingSources(nodeId: string, relation: string): GraphNode[];
|
|
16
|
+
export declare function listRelationshipsForNode(nodeId: string): GraphRelationship[];
|
|
17
|
+
export declare function getGraphDocument(): GraphDocument;
|
|
18
|
+
export declare function getOntologySchema(): OntologySchema;
|
|
19
|
+
export declare function getCatalogGraph(): CatalogGraph;
|
|
20
|
+
export declare function listEdgesForNode(catalog: {
|
|
21
|
+
graph: GraphEdge[];
|
|
22
|
+
}, nodeId: string): GraphEdge[];
|
|
23
|
+
export declare function listEdgesByRelation(catalog: {
|
|
24
|
+
graph: GraphEdge[];
|
|
25
|
+
}, relation: string): GraphEdge[];
|
|
26
|
+
export declare function assertGraphFileCoverage(): void;
|
|
27
|
+
export declare function clearAtlasBridgeCache(): void;
|
|
28
|
+
//# sourceMappingURL=atlas-bridge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atlas-bridge.d.ts","sourceRoot":"","sources":["../src/atlas-bridge.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,EACV,YAAY,EACZ,aAAa,EACb,SAAS,EACT,SAAS,EACT,iBAAiB,EACjB,cAAc,EACf,MAAM,UAAU,CAAC;AAuElB,wBAAgB,cAAc,IAAI,SAAS,EAAE,CAE5C;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,GAAG,SAAS,EAAE,CAEpE;AAED,wBAAgB,WAAW,CAAC,KAAK,SAAS,SAAS,GAAG,SAAS,EAC7D,MAAM,EAAE,MAAM,GACb,KAAK,GAAG,SAAS,CAGnB;AAED,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,MAAM,GACf,iBAAiB,EAAE,CAErB;AAED,wBAAgB,cAAc,IAAI,iBAAiB,EAAE,CAEpD;AAED,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,GACf,SAAS,EAAE,CAOb;AAED,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,GACf,SAAS,EAAE,CAOb;AAED,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,iBAAiB,EAAE,CAI5E;AAMD,wBAAgB,gBAAgB,IAAI,aAAa,CAYhD;AAED,wBAAgB,iBAAiB,IAAI,cAAc,CAelD;AAED,wBAAgB,eAAe,IAAI,YAAY,CAO9C;AAMD,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE;IAAE,KAAK,EAAE,SAAS,EAAE,CAAA;CAAE,EAC/B,MAAM,EAAE,MAAM,GACb,SAAS,EAAE,CAIb;AAED,wBAAgB,mBAAmB,CACjC,OAAO,EAAE;IAAE,KAAK,EAAE,SAAS,EAAE,CAAA;CAAE,EAC/B,QAAQ,EAAE,MAAM,GACf,SAAS,EAAE,CAEb;AAED,wBAAgB,uBAAuB,IAAI,IAAI,CAE9C;AAMD,wBAAgB,qBAAqB,IAAI,IAAI,CAI5C"}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Atlas bridge for agent-catalog.
|
|
4
|
+
*
|
|
5
|
+
* Adapts the Atlas graph singleton (`@a5c-ai/atlas`) into the same query
|
|
6
|
+
* surface that `graph.ts` previously exposed. All data comes from Atlas —
|
|
7
|
+
* there is no fallback to local YAML files.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.listGraphNodes = listGraphNodes;
|
|
11
|
+
exports.listNodesByKind = listNodesByKind;
|
|
12
|
+
exports.getNodeById = getNodeById;
|
|
13
|
+
exports.listRelationshipsByRelation = listRelationshipsByRelation;
|
|
14
|
+
exports.listGraphEdges = listGraphEdges;
|
|
15
|
+
exports.listOutgoingTargets = listOutgoingTargets;
|
|
16
|
+
exports.listIncomingSources = listIncomingSources;
|
|
17
|
+
exports.listRelationshipsForNode = listRelationshipsForNode;
|
|
18
|
+
exports.getGraphDocument = getGraphDocument;
|
|
19
|
+
exports.getOntologySchema = getOntologySchema;
|
|
20
|
+
exports.getCatalogGraph = getCatalogGraph;
|
|
21
|
+
exports.listEdgesForNode = listEdgesForNode;
|
|
22
|
+
exports.listEdgesByRelation = listEdgesByRelation;
|
|
23
|
+
exports.assertGraphFileCoverage = assertGraphFileCoverage;
|
|
24
|
+
exports.clearAtlasBridgeCache = clearAtlasBridgeCache;
|
|
25
|
+
const atlas_1 = require("@a5c-ai/atlas");
|
|
26
|
+
// ---------------------------------------------------------------------------
|
|
27
|
+
// Record adaptation: Atlas `_kind` -> agent-catalog `kind`
|
|
28
|
+
// ---------------------------------------------------------------------------
|
|
29
|
+
const AGENT_CATALOG_KINDS = new Set([
|
|
30
|
+
"AgentProduct", "AgentVersion", "Capability", "CapabilitySupport",
|
|
31
|
+
"CiSurface", "Claim", "DiscoverySignal", "EvidenceSource",
|
|
32
|
+
"HookMapping", "HookSurface", "LifecycleSemantics", "Modality",
|
|
33
|
+
"ModelFamily", "ModelProviderProduct", "ModelProviderVersion", "ModelVersion",
|
|
34
|
+
"PackageSurface", "PathDescriptor", "PluginArtifact", "PluginTarget",
|
|
35
|
+
"ProcessDescriptor", "SessionSemantics", "TransportProtocol", "TransportRuntime",
|
|
36
|
+
]);
|
|
37
|
+
function isAgentCatalogRecord(record) {
|
|
38
|
+
return AGENT_CATALOG_KINDS.has(record._kind);
|
|
39
|
+
}
|
|
40
|
+
function adaptRecord(record) {
|
|
41
|
+
const { _kind, _file, _cluster, ...rest } = record;
|
|
42
|
+
return { ...rest, kind: _kind };
|
|
43
|
+
}
|
|
44
|
+
function adaptEdge(edge, index) {
|
|
45
|
+
return {
|
|
46
|
+
id: `edge:${edge.from}->${edge.to}:${edge.kind}:${index}`,
|
|
47
|
+
relation: edge.kind,
|
|
48
|
+
from: edge.from,
|
|
49
|
+
to: edge.to,
|
|
50
|
+
...(edge.attributes ?? {}),
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
// ---------------------------------------------------------------------------
|
|
54
|
+
// Cached projections
|
|
55
|
+
// ---------------------------------------------------------------------------
|
|
56
|
+
let cachedNodes;
|
|
57
|
+
let cachedEdges;
|
|
58
|
+
let cachedNodeIds;
|
|
59
|
+
function allNodes() {
|
|
60
|
+
if (!cachedNodes) {
|
|
61
|
+
cachedNodes = atlas_1.atlas.getAllRecords().filter(isAgentCatalogRecord).map(adaptRecord);
|
|
62
|
+
}
|
|
63
|
+
return cachedNodes;
|
|
64
|
+
}
|
|
65
|
+
function agentCatalogNodeIds() {
|
|
66
|
+
if (!cachedNodeIds) {
|
|
67
|
+
cachedNodeIds = new Set(allNodes().map((node) => node.id));
|
|
68
|
+
}
|
|
69
|
+
return cachedNodeIds;
|
|
70
|
+
}
|
|
71
|
+
function allEdges() {
|
|
72
|
+
if (!cachedEdges) {
|
|
73
|
+
const nodeIds = agentCatalogNodeIds();
|
|
74
|
+
cachedEdges = atlas_1.atlas
|
|
75
|
+
.getIndex()
|
|
76
|
+
.edges.filter((edge) => nodeIds.has(edge.from) && nodeIds.has(edge.to))
|
|
77
|
+
.map(adaptEdge);
|
|
78
|
+
}
|
|
79
|
+
return cachedEdges;
|
|
80
|
+
}
|
|
81
|
+
// ---------------------------------------------------------------------------
|
|
82
|
+
// Public API — drop-in replacements for graph.ts functions
|
|
83
|
+
// ---------------------------------------------------------------------------
|
|
84
|
+
function listGraphNodes() {
|
|
85
|
+
return [...allNodes()];
|
|
86
|
+
}
|
|
87
|
+
function listNodesByKind(kind) {
|
|
88
|
+
return atlas_1.atlas.getRecordsByKind(kind).filter(isAgentCatalogRecord).map(adaptRecord);
|
|
89
|
+
}
|
|
90
|
+
function getNodeById(nodeId) {
|
|
91
|
+
const record = atlas_1.atlas.getRecord(nodeId);
|
|
92
|
+
return record ? adaptRecord(record) : undefined;
|
|
93
|
+
}
|
|
94
|
+
function listRelationshipsByRelation(relation) {
|
|
95
|
+
return allEdges().filter((edge) => edge.relation === relation);
|
|
96
|
+
}
|
|
97
|
+
function listGraphEdges() {
|
|
98
|
+
return [...allEdges()];
|
|
99
|
+
}
|
|
100
|
+
function listOutgoingTargets(nodeId, relation) {
|
|
101
|
+
return atlas_1.atlas
|
|
102
|
+
.getOutgoing(nodeId)
|
|
103
|
+
.filter((edge) => edge.kind === relation)
|
|
104
|
+
.map((edge) => atlas_1.atlas.getRecord(edge.to))
|
|
105
|
+
.filter((record) => record !== undefined)
|
|
106
|
+
.map(adaptRecord);
|
|
107
|
+
}
|
|
108
|
+
function listIncomingSources(nodeId, relation) {
|
|
109
|
+
return atlas_1.atlas
|
|
110
|
+
.getIncoming(nodeId)
|
|
111
|
+
.filter((edge) => edge.kind === relation)
|
|
112
|
+
.map((edge) => atlas_1.atlas.getRecord(edge.from))
|
|
113
|
+
.filter((record) => record !== undefined)
|
|
114
|
+
.map(adaptRecord);
|
|
115
|
+
}
|
|
116
|
+
function listRelationshipsForNode(nodeId) {
|
|
117
|
+
return allEdges().filter((edge) => edge.from === nodeId || edge.to === nodeId);
|
|
118
|
+
}
|
|
119
|
+
// ---------------------------------------------------------------------------
|
|
120
|
+
// Synthetic graph document and schema
|
|
121
|
+
// ---------------------------------------------------------------------------
|
|
122
|
+
function getGraphDocument() {
|
|
123
|
+
return {
|
|
124
|
+
kind: "GraphDocument",
|
|
125
|
+
id: "graph:agent-catalog",
|
|
126
|
+
graphId: "graph:agent-catalog",
|
|
127
|
+
schemaVersion: "2026.04.agent-catalog-v2",
|
|
128
|
+
catalogVersion: "2026.04.agent-catalog-v2",
|
|
129
|
+
generatedAt: new Date().toISOString(),
|
|
130
|
+
owners: ["@a5c-ai"],
|
|
131
|
+
imports: [],
|
|
132
|
+
schemaPath: "schema/ontology-schema.yaml",
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
function getOntologySchema() {
|
|
136
|
+
const nodeKinds = {};
|
|
137
|
+
for (const [name, def] of Object.entries(atlas_1.atlas.getNodeKinds())) {
|
|
138
|
+
nodeKinds[name] = { requiredAttributes: ["id", "kind"], ...def };
|
|
139
|
+
}
|
|
140
|
+
const edgeKinds = {};
|
|
141
|
+
for (const [name, def] of Object.entries(atlas_1.atlas.getEdgeKinds())) {
|
|
142
|
+
edgeKinds[name] = { requiredAttributes: ["id", "relation", "from", "to"], ...def };
|
|
143
|
+
}
|
|
144
|
+
return {
|
|
145
|
+
kind: "OntologySchema",
|
|
146
|
+
id: "schema:agent-catalog-ontology",
|
|
147
|
+
nodeKinds,
|
|
148
|
+
edgeKinds,
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
function getCatalogGraph() {
|
|
152
|
+
return {
|
|
153
|
+
document: getGraphDocument(),
|
|
154
|
+
schema: getOntologySchema(),
|
|
155
|
+
nodes: allNodes(),
|
|
156
|
+
edges: allEdges(),
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
// ---------------------------------------------------------------------------
|
|
160
|
+
// Utility functions (previously in graph.ts)
|
|
161
|
+
// ---------------------------------------------------------------------------
|
|
162
|
+
function listEdgesForNode(catalog, nodeId) {
|
|
163
|
+
return catalog.graph.filter((edge) => edge.from === nodeId || edge.to === nodeId);
|
|
164
|
+
}
|
|
165
|
+
function listEdgesByRelation(catalog, relation) {
|
|
166
|
+
return catalog.graph.filter((edge) => edge.relation === relation);
|
|
167
|
+
}
|
|
168
|
+
function assertGraphFileCoverage() {
|
|
169
|
+
// No-op: validation handled by Atlas indexer at build time.
|
|
170
|
+
}
|
|
171
|
+
// ---------------------------------------------------------------------------
|
|
172
|
+
// Cache management
|
|
173
|
+
// ---------------------------------------------------------------------------
|
|
174
|
+
function clearAtlasBridgeCache() {
|
|
175
|
+
cachedNodes = undefined;
|
|
176
|
+
cachedEdges = undefined;
|
|
177
|
+
cachedNodeIds = undefined;
|
|
178
|
+
}
|
package/dist/cli.js
CHANGED
|
@@ -13,7 +13,7 @@ exports.listCliAgentRelations = listCliAgentRelations;
|
|
|
13
13
|
exports.listCliPackageRelations = listCliPackageRelations;
|
|
14
14
|
exports.listCliProcessRelations = listCliProcessRelations;
|
|
15
15
|
const data_1 = require("./data");
|
|
16
|
-
const
|
|
16
|
+
const atlas_bridge_1 = require("./atlas-bridge");
|
|
17
17
|
const transport_mux_cutover_1 = require("./transport-mux-cutover");
|
|
18
18
|
function valueAsString(value) {
|
|
19
19
|
return typeof value === "string" ? value : "";
|
|
@@ -69,8 +69,8 @@ function toCliGraphNodeRow(node) {
|
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
71
|
function toCliGraphEdgeRow(edge) {
|
|
72
|
-
const fromNode = (0,
|
|
73
|
-
const toNode = (0,
|
|
72
|
+
const fromNode = (0, atlas_bridge_1.getNodeById)(edge.from);
|
|
73
|
+
const toNode = (0, atlas_bridge_1.getNodeById)(edge.to);
|
|
74
74
|
const { id, relation, from, to, evidenceRefs, ...attributes } = edge;
|
|
75
75
|
return {
|
|
76
76
|
edgeId: id,
|
|
@@ -87,16 +87,16 @@ function toCliGraphEdgeRow(edge) {
|
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
89
|
function claimNodesFor(nodeId) {
|
|
90
|
-
return (0,
|
|
90
|
+
return (0, atlas_bridge_1.listOutgoingTargets)(nodeId, "supported_by_claim").filter((node) => node.kind === "Claim");
|
|
91
91
|
}
|
|
92
92
|
function sourceNodesForClaim(claimNodeId) {
|
|
93
|
-
const claimNode = (0,
|
|
94
|
-
const sourceNodes = (0,
|
|
93
|
+
const claimNode = (0, atlas_bridge_1.getNodeById)(claimNodeId);
|
|
94
|
+
const sourceNodes = (0, atlas_bridge_1.listOutgoingTargets)(claimNodeId, "sourced_from").filter((node) => node.kind === "EvidenceSource");
|
|
95
95
|
if (sourceNodes.length > 0) {
|
|
96
96
|
return sourceNodes;
|
|
97
97
|
}
|
|
98
98
|
return stringArray(claimNode?.evidenceIds)
|
|
99
|
-
.map((evidenceId) => (0,
|
|
99
|
+
.map((evidenceId) => (0, atlas_bridge_1.getNodeById)(`evidence:${evidenceId}`))
|
|
100
100
|
.filter((node) => node?.kind === "EvidenceSource");
|
|
101
101
|
}
|
|
102
102
|
function toCliEvidenceClaimRow(node) {
|
|
@@ -114,17 +114,17 @@ function toCliEvidenceClaimRow(node) {
|
|
|
114
114
|
};
|
|
115
115
|
}
|
|
116
116
|
function claimsForEvidence(evidenceId) {
|
|
117
|
-
const directClaimIds = (0,
|
|
117
|
+
const directClaimIds = (0, atlas_bridge_1.listGraphEdges)()
|
|
118
118
|
.filter((edge) => edge.relation === "sourced_from" && edge.to === `evidence:${evidenceId}`)
|
|
119
119
|
.map((edge) => {
|
|
120
|
-
const claimNode = (0,
|
|
120
|
+
const claimNode = (0, atlas_bridge_1.getNodeById)(edge.from);
|
|
121
121
|
return valueAsString(claimNode?.claimId);
|
|
122
122
|
})
|
|
123
123
|
.filter(Boolean);
|
|
124
124
|
if (directClaimIds.length > 0) {
|
|
125
125
|
return uniqueStrings(directClaimIds);
|
|
126
126
|
}
|
|
127
|
-
return (0,
|
|
127
|
+
return (0, atlas_bridge_1.listGraphNodes)()
|
|
128
128
|
.filter((node) => node.kind === "Claim" && stringArray(node.evidenceIds).includes(evidenceId))
|
|
129
129
|
.map((node) => valueAsString(node.claimId))
|
|
130
130
|
.filter(Boolean);
|
|
@@ -141,12 +141,12 @@ function toCliEvidenceSourceRow(node) {
|
|
|
141
141
|
};
|
|
142
142
|
}
|
|
143
143
|
function capabilityLabel(capabilityId) {
|
|
144
|
-
return displayLabel((0,
|
|
144
|
+
return displayLabel((0, atlas_bridge_1.getNodeById)(`capability:${capabilityId}`)) || capabilityId;
|
|
145
145
|
}
|
|
146
146
|
function nodeRelationRow(edge, direction, nodeId) {
|
|
147
147
|
const row = toCliGraphEdgeRow(edge);
|
|
148
148
|
const relatedNodeId = direction === "outgoing" ? edge.to : edge.from;
|
|
149
|
-
const relatedNode = (0,
|
|
149
|
+
const relatedNode = (0, atlas_bridge_1.getNodeById)(relatedNodeId);
|
|
150
150
|
return {
|
|
151
151
|
...row,
|
|
152
152
|
direction,
|
|
@@ -174,12 +174,12 @@ function getCliCatalogSummary() {
|
|
|
174
174
|
};
|
|
175
175
|
}
|
|
176
176
|
function listCliGraphNodes(kind) {
|
|
177
|
-
return (0,
|
|
177
|
+
return (0, atlas_bridge_1.listGraphNodes)()
|
|
178
178
|
.filter((node) => !kind || node.kind === kind)
|
|
179
179
|
.map(toCliGraphNodeRow);
|
|
180
180
|
}
|
|
181
181
|
function listCliGraphEdges(filter = {}) {
|
|
182
|
-
return (0,
|
|
182
|
+
return (0, atlas_bridge_1.listGraphEdges)()
|
|
183
183
|
.filter((edge) => !filter.relation || edge.relation === filter.relation)
|
|
184
184
|
.filter((edge) => !filter.fromNodeId || edge.from === filter.fromNodeId)
|
|
185
185
|
.filter((edge) => !filter.toNodeId || edge.to === filter.toNodeId)
|
|
@@ -187,7 +187,7 @@ function listCliGraphEdges(filter = {}) {
|
|
|
187
187
|
.map(toCliGraphEdgeRow);
|
|
188
188
|
}
|
|
189
189
|
function listCliNodeRelations(filter) {
|
|
190
|
-
return (0,
|
|
190
|
+
return (0, atlas_bridge_1.listGraphEdges)()
|
|
191
191
|
.filter((edge) => !filter.relation || edge.relation === filter.relation)
|
|
192
192
|
.filter((edge) => {
|
|
193
193
|
if (filter.direction === "incoming") {
|
|
@@ -201,7 +201,7 @@ function listCliNodeRelations(filter) {
|
|
|
201
201
|
.map((edge) => nodeRelationRow(edge, edge.from === filter.nodeId ? "outgoing" : "incoming", filter.nodeId));
|
|
202
202
|
}
|
|
203
203
|
function getCliNodeQuery(nodeId) {
|
|
204
|
-
const node = (0,
|
|
204
|
+
const node = (0, atlas_bridge_1.getNodeById)(nodeId);
|
|
205
205
|
if (!node) {
|
|
206
206
|
return undefined;
|
|
207
207
|
}
|
|
@@ -215,7 +215,7 @@ function getCliNodeQuery(nodeId) {
|
|
|
215
215
|
}
|
|
216
216
|
function listCliEvidenceClaims(filter = {}) {
|
|
217
217
|
const nodeIdFilter = filter.nodeId;
|
|
218
|
-
const claims = (nodeIdFilter ? claimNodesFor(nodeIdFilter) : (0,
|
|
218
|
+
const claims = (nodeIdFilter ? claimNodesFor(nodeIdFilter) : (0, atlas_bridge_1.listGraphNodes)().filter((node) => node.kind === "Claim")).map(toCliEvidenceClaimRow);
|
|
219
219
|
return claims
|
|
220
220
|
.filter((claim) => !filter.claimId || claim.claimId === filter.claimId)
|
|
221
221
|
.filter((claim) => !filter.subjectId || claim.subjectId === filter.subjectId)
|
|
@@ -226,15 +226,15 @@ function listCliEvidenceSources(filter = {}) {
|
|
|
226
226
|
const nodeIdFilter = filter.nodeId;
|
|
227
227
|
const sources = (nodeIdFilter
|
|
228
228
|
? uniqueStrings(claimNodesFor(nodeIdFilter).flatMap((claim) => sourceNodesForClaim(claim.id).map((source) => source.id)))
|
|
229
|
-
.map((nodeId) => (0,
|
|
229
|
+
.map((nodeId) => (0, atlas_bridge_1.getNodeById)(nodeId))
|
|
230
230
|
.filter((node) => Boolean(node))
|
|
231
|
-
: (0,
|
|
231
|
+
: (0, atlas_bridge_1.listGraphNodes)().filter((node) => node.kind === "EvidenceSource")).map(toCliEvidenceSourceRow);
|
|
232
232
|
return sources
|
|
233
233
|
.filter((source) => !filter.evidenceId || source.evidenceId === filter.evidenceId)
|
|
234
234
|
.filter((source) => !filter.claimId || source.claimIds.includes(filter.claimId));
|
|
235
235
|
}
|
|
236
236
|
function listCliCapabilitySupport(filter = {}) {
|
|
237
|
-
return (0,
|
|
237
|
+
return (0, atlas_bridge_1.listGraphNodes)()
|
|
238
238
|
.filter((node) => node.kind === "CapabilitySupport")
|
|
239
239
|
.filter((node) => !filter.supportId || valueAsString(node.supportId) === filter.supportId)
|
|
240
240
|
.filter((node) => !filter.capabilityId || valueAsString(node.capabilityId) === filter.capabilityId)
|
|
@@ -245,7 +245,7 @@ function listCliCapabilitySupport(filter = {}) {
|
|
|
245
245
|
.filter((node) => !filter.versionRange || valueAsString(node.versionRange) === filter.versionRange)
|
|
246
246
|
.map((node) => {
|
|
247
247
|
const claimRows = listCliEvidenceClaims({ nodeId: node.id });
|
|
248
|
-
const subjectNode = (0,
|
|
248
|
+
const subjectNode = (0, atlas_bridge_1.getNodeById)(valueAsString(node.subjectId));
|
|
249
249
|
const sourceIds = uniqueStrings(claimRows.flatMap((claim) => claim.sourceIds));
|
|
250
250
|
return {
|
|
251
251
|
supportId: valueAsString(node.supportId),
|
|
@@ -264,7 +264,7 @@ function listCliCapabilitySupport(filter = {}) {
|
|
|
264
264
|
});
|
|
265
265
|
}
|
|
266
266
|
function listCliAgentRelations(agentId) {
|
|
267
|
-
return (0,
|
|
267
|
+
return (0, atlas_bridge_1.listGraphNodes)()
|
|
268
268
|
.filter((node) => node.kind === "AgentVersion")
|
|
269
269
|
.filter((node) => !agentId || valueAsString(node.agentId) === agentId)
|
|
270
270
|
.map((node) => {
|
|
@@ -287,14 +287,14 @@ function listCliAgentRelations(agentId) {
|
|
|
287
287
|
});
|
|
288
288
|
}
|
|
289
289
|
function listCliPackageRelations(packageId) {
|
|
290
|
-
return (0,
|
|
290
|
+
return (0, atlas_bridge_1.listGraphNodes)()
|
|
291
291
|
.filter((node) => node.kind === "PackageSurface")
|
|
292
292
|
.filter((node) => !packageId || valueAsString(node.packageId) === packageId)
|
|
293
293
|
.map((node) => {
|
|
294
|
-
const processes = (0,
|
|
295
|
-
const paths = (0,
|
|
296
|
-
const ciSurfaces = (0,
|
|
297
|
-
const graphIds = (0,
|
|
294
|
+
const processes = (0, atlas_bridge_1.listOutgoingTargets)(node.id, "surfaces_process");
|
|
295
|
+
const paths = (0, atlas_bridge_1.listOutgoingTargets)(node.id, "references_path");
|
|
296
|
+
const ciSurfaces = (0, atlas_bridge_1.listOutgoingTargets)(node.id, "validated_by_ci");
|
|
297
|
+
const graphIds = (0, atlas_bridge_1.listGraphEdges)()
|
|
298
298
|
.filter((edge) => edge.from === node.id && edge.relation === "wraps_graph")
|
|
299
299
|
.map((edge) => edge.to);
|
|
300
300
|
return {
|
|
@@ -315,11 +315,11 @@ function listCliPackageRelations(packageId) {
|
|
|
315
315
|
});
|
|
316
316
|
}
|
|
317
317
|
function listCliProcessRelations(processId) {
|
|
318
|
-
return (0,
|
|
318
|
+
return (0, atlas_bridge_1.listGraphNodes)()
|
|
319
319
|
.filter((node) => node.kind === "ProcessDescriptor")
|
|
320
320
|
.filter((node) => !processId || valueAsString(node.processId) === processId)
|
|
321
321
|
.map((node) => {
|
|
322
|
-
const paths = (0,
|
|
322
|
+
const paths = (0, atlas_bridge_1.listOutgoingTargets)(node.id, "references_path");
|
|
323
323
|
return {
|
|
324
324
|
nodeId: node.id,
|
|
325
325
|
processId: valueAsString(node.processId),
|
package/dist/data.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../src/data.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../src/data.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EACV,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,mBAAmB,EACnB,oBAAoB,EAIpB,WAAW,EACX,cAAc,EAEd,aAAa,EAEb,uBAAuB,EACvB,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,qBAAqB,EACrB,iBAAiB,EACjB,eAAe,EACf,oBAAoB,EACpB,YAAY,EACZ,kBAAkB,EAGlB,sBAAsB,EACtB,iBAAiB,EACjB,aAAa,EACb,mBAAmB,EACnB,cAAc,EACf,MAAM,UAAU,CAAC;AA8sBlB,UAAU,qBAAqB;IAC7B,KAAK,EAAE,YAAY,CAAC;IACpB,aAAa,EAAE,aAAa,CAAC;IAC7B,cAAc,EAAE,cAAc,CAAC;IAC/B,QAAQ,EAAE,cAAc,EAAE,CAAC;IAC3B,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,SAAS,EAAE,oBAAoB,EAAE,CAAC;IAClC,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,UAAU,EAAE,mBAAmB,EAAE,CAAC;IAClC,YAAY,EAAE,oBAAoB,EAAE,CAAC;IACrC,UAAU,EAAE,kBAAkB,EAAE,CAAC;IACjC,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,cAAc,EAAE,aAAa,EAAE,CAAC;IAChC,gBAAgB,EAAE,eAAe,EAAE,CAAC;IACpC,SAAS,EAAE,iBAAiB,EAAE,CAAC;IAC/B,kBAAkB,EAAE,iBAAiB,EAAE,CAAC;IACxC,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACxC,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,EAAE,CAAC,CAAC;IACxD,sBAAsB,EAAE,qBAAqB,EAAE,CAAC;IAChD,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAC;IAC1D,aAAa,EAAE,iBAAiB,EAAE,CAAC;IACnC,aAAa,EAAE,sBAAsB,EAAE,CAAC;IACxC,oBAAoB,EAAE,mBAAmB,EAAE,CAAC;IAC5C,YAAY,EAAE,YAAY,CAAC;CAC5B;AA2FD,wBAAgB,0BAA0B,IAAI,IAAI,CAGjD;AAED,wBAAgB,mBAAmB,IAAI,qBAAqB,CAK3D;AAoDD,eAAO,MAAM,cAAc,eAA8D,CAAC;AAC1F,eAAO,MAAM,eAAe,gBAA+D,CAAC;AAC5F,eAAO,MAAM,QAAQ,kBAAwD,CAAC;AAC9E,eAAO,MAAM,MAAM,eAAsD,CAAC;AAC1E,eAAO,MAAM,SAAS,wBAAyD,CAAC;AAChF,eAAO,MAAM,MAAM,gBAAsD,CAAC;AAC1E,eAAO,MAAM,UAAU,uBAA0D,CAAC;AAClF,eAAO,MAAM,YAAY,wBAA4D,CAAC;AACtF,eAAO,MAAM,UAAU,sBAA0D,CAAC;AAClF,eAAO,MAAM,KAAK,kBAAqD,CAAC;AACxE,eAAO,MAAM,eAAe,iBAA8D,CAAC;AAC3F,eAAO,MAAM,iBAAiB,mBAAgE,CAAC;AAC/F,eAAO,MAAM,SAAS,qBAAyD,CAAC;AAChF,eAAO,MAAM,oBAAoB,qBAAkE,CAAC;AACpG,eAAO,MAAM,MAAM,gBAAsD,CAAC;AAC1E,eAAO,MAAM,eAAe,0BAA8D,CAAC;AAC3F,eAAO,MAAM,oBAAoB,qCAAmE,CAAC;AACrG,eAAO,MAAM,yBAAyB,yBAAsE,CAAC;AAC7G,eAAO,MAAM,iBAAiB,yCAAiE,CAAC;AAChG,eAAO,MAAM,cAAc,qBAA6D,CAAC;AACzF,eAAO,MAAM,cAAc,0BAA6D,CAAC;AACzF,eAAO,MAAM,qBAAqB,uBAAoE,CAAC;AACvG,eAAO,MAAM,aAAa,cAA6D,CAAC"}
|