@solidnumber/cli 1.16.2 → 1.19.5
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 +2 -1
- package/dist/commands/accounting.js +3 -0
- package/dist/commands/accounting.js.map +1 -1
- package/dist/commands/analytics.js +2 -0
- package/dist/commands/analytics.js.map +1 -1
- package/dist/commands/audit.js +9 -0
- package/dist/commands/audit.js.map +1 -1
- package/dist/commands/billing.js +16 -0
- package/dist/commands/billing.js.map +1 -1
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +51 -12
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/crm.js +15 -0
- package/dist/commands/crm.js.map +1 -1
- package/dist/commands/dashboard.d.ts.map +1 -1
- package/dist/commands/dashboard.js +1 -0
- package/dist/commands/dashboard.js.map +1 -1
- package/dist/commands/demo.js +4 -1
- package/dist/commands/demo.js.map +1 -1
- package/dist/commands/dev.js +1 -0
- package/dist/commands/dev.js.map +1 -1
- package/dist/commands/domains.js +5 -0
- package/dist/commands/domains.js.map +1 -1
- package/dist/commands/export.js +1 -0
- package/dist/commands/export.js.map +1 -1
- package/dist/commands/graph.d.ts +26 -0
- package/dist/commands/graph.d.ts.map +1 -0
- package/dist/commands/graph.js +355 -0
- package/dist/commands/graph.js.map +1 -0
- package/dist/commands/inventory.js +5 -0
- package/dist/commands/inventory.js.map +1 -1
- package/dist/commands/kb.js +47 -0
- package/dist/commands/kb.js.map +1 -1
- package/dist/commands/llms.js +2 -0
- package/dist/commands/llms.js.map +1 -1
- package/dist/commands/logs.d.ts.map +1 -1
- package/dist/commands/logs.js +2 -0
- package/dist/commands/logs.js.map +1 -1
- package/dist/commands/notifications.js +1 -0
- package/dist/commands/notifications.js.map +1 -1
- package/dist/commands/pages.js +4 -0
- package/dist/commands/pages.js.map +1 -1
- package/dist/commands/payment.js +8 -0
- package/dist/commands/payment.js.map +1 -1
- package/dist/commands/sandbox.js +4 -0
- package/dist/commands/sandbox.js.map +1 -1
- package/dist/commands/schedule.js +9 -0
- package/dist/commands/schedule.js.map +1 -1
- package/dist/commands/seo.js +5 -0
- package/dist/commands/seo.js.map +1 -1
- package/dist/commands/services.js +3 -0
- package/dist/commands/services.js.map +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +1 -0
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/storage.js +1 -0
- package/dist/commands/storage.js.map +1 -1
- package/dist/commands/support.js +1 -0
- package/dist/commands/support.js.map +1 -1
- package/dist/commands/test.d.ts.map +1 -1
- package/dist/commands/test.js +4 -0
- package/dist/commands/test.js.map +1 -1
- package/dist/commands/webhooks.js +4 -1
- package/dist/commands/webhooks.js.map +1 -1
- package/dist/index.js +43 -26
- package/dist/index.js.map +1 -1
- package/dist/lib/api-client.d.ts +25 -0
- package/dist/lib/api-client.d.ts.map +1 -1
- package/dist/lib/api-client.js +8 -10
- package/dist/lib/api-client.js.map +1 -1
- package/dist/lib/command-kit.d.ts +1 -0
- package/dist/lib/command-kit.d.ts.map +1 -1
- package/dist/lib/command-kit.js +1 -0
- package/dist/lib/command-kit.js.map +1 -1
- package/dist/lib/graph-walker.d.ts +95 -0
- package/dist/lib/graph-walker.d.ts.map +1 -0
- package/dist/lib/graph-walker.js +387 -0
- package/dist/lib/graph-walker.js.map +1 -0
- package/package.json +3 -2
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Graph walker for JSON-LD tenant context.
|
|
4
|
+
*
|
|
5
|
+
* Consumes the output of `GET /api/v1/cli/context?format=jsonld` —
|
|
6
|
+
* a Schema.org + solid:* typed graph — and offers the primitives the
|
|
7
|
+
* `solid graph` CLI command (and anything else that wants to navigate
|
|
8
|
+
* the tenant context) needs: a normalised adjacency map, BFS up to N
|
|
9
|
+
* hops from a root IRI, filters by @type, and a short-form expander
|
|
10
|
+
* (``kb/42`` → full IRI).
|
|
11
|
+
*
|
|
12
|
+
* The walker is intentionally schema-light: it treats any string-valued
|
|
13
|
+
* field whose value is an `@id` found in the graph as an outbound edge,
|
|
14
|
+
* plus anything declared ``@type: @id`` in the document's @context. This
|
|
15
|
+
* means the moment a new relationship predicate is added to
|
|
16
|
+
* `services/ai_context_jsonld.py` it is walkable without changing this
|
|
17
|
+
* file.
|
|
18
|
+
*/
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
exports.buildAdjacency = buildAdjacency;
|
|
21
|
+
exports.bfs = bfs;
|
|
22
|
+
exports.bfsOut = bfsOut;
|
|
23
|
+
exports.nodesOfType = nodesOfType;
|
|
24
|
+
exports.listTypes = listTypes;
|
|
25
|
+
exports.resolveIri = resolveIri;
|
|
26
|
+
exports.subgraph = subgraph;
|
|
27
|
+
exports.validate = validate;
|
|
28
|
+
/**
|
|
29
|
+
* Edge discovery — which predicates in a node are links to other nodes.
|
|
30
|
+
*
|
|
31
|
+
* Approach: any string value that matches an ``@id`` already in the
|
|
32
|
+
* graph is considered an outbound edge; any array of strings whose
|
|
33
|
+
* entries match IDs is a bag of outbound edges. That covers every
|
|
34
|
+
* edge declared in the current @context (``provider``, ``company``,
|
|
35
|
+
* ``withinTier``, ``inIndustry``, ``shelfOf``, ``clonedFromTemplate``,
|
|
36
|
+
* ``handles``, ``operatesOn``, ``offers``, ``supersededBy``, ...) plus
|
|
37
|
+
* any future ones, without having to enumerate them here.
|
|
38
|
+
*/
|
|
39
|
+
function collectEdges(node, knownIds) {
|
|
40
|
+
const out = [];
|
|
41
|
+
for (const [key, value] of Object.entries(node)) {
|
|
42
|
+
if (key.startsWith('@'))
|
|
43
|
+
continue;
|
|
44
|
+
if (typeof value === 'string' && knownIds.has(value) && value !== node['@id']) {
|
|
45
|
+
out.push({ predicate: key, target: value });
|
|
46
|
+
}
|
|
47
|
+
else if (Array.isArray(value)) {
|
|
48
|
+
for (const item of value) {
|
|
49
|
+
if (typeof item === 'string' && knownIds.has(item) && item !== node['@id']) {
|
|
50
|
+
out.push({ predicate: key, target: item });
|
|
51
|
+
}
|
|
52
|
+
else if (item && typeof item === 'object' && '@id' in item) {
|
|
53
|
+
const embeddedId = item['@id'];
|
|
54
|
+
if (typeof embeddedId === 'string' && knownIds.has(embeddedId) && embeddedId !== node['@id']) {
|
|
55
|
+
out.push({ predicate: key, target: embeddedId });
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
else if (value && typeof value === 'object' && '@id' in value) {
|
|
61
|
+
// Embedded node reference (e.g. nested schema:Offer) — treat its
|
|
62
|
+
// @id as an outbound edge when it resolves inside the graph.
|
|
63
|
+
const embeddedId = value['@id'];
|
|
64
|
+
if (typeof embeddedId === 'string' && knownIds.has(embeddedId) && embeddedId !== node['@id']) {
|
|
65
|
+
out.push({ predicate: key, target: embeddedId });
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return out;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Build an adjacency map keyed by @id. Every node's outbound and
|
|
73
|
+
* inbound edges are precomputed so BFS + reverse lookup are O(1).
|
|
74
|
+
*/
|
|
75
|
+
function buildAdjacency(doc) {
|
|
76
|
+
const graph = doc.graph ?? [];
|
|
77
|
+
const map = new Map();
|
|
78
|
+
const knownIds = new Set(graph.map((n) => n['@id']));
|
|
79
|
+
for (const node of graph) {
|
|
80
|
+
map.set(node['@id'], { node, outEdges: [], inEdges: [] });
|
|
81
|
+
}
|
|
82
|
+
for (const node of graph) {
|
|
83
|
+
const edges = collectEdges(node, knownIds);
|
|
84
|
+
const entry = map.get(node['@id']);
|
|
85
|
+
if (!entry)
|
|
86
|
+
continue;
|
|
87
|
+
entry.outEdges = edges;
|
|
88
|
+
for (const e of edges) {
|
|
89
|
+
const targetEntry = map.get(e.target);
|
|
90
|
+
if (targetEntry) {
|
|
91
|
+
targetEntry.inEdges.push({ predicate: e.predicate, source: node['@id'] });
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return map;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* BFS outward from a root IRI. Returns the set of visited IDs; depth
|
|
99
|
+
* limit is the maximum number of edges traversed from the root.
|
|
100
|
+
* ``hops = 0`` returns just the root; ``hops = 1`` returns root + all
|
|
101
|
+
* direct neighbors; etc.
|
|
102
|
+
*/
|
|
103
|
+
function bfs(adj, root, hops) {
|
|
104
|
+
if (!adj.has(root))
|
|
105
|
+
return new Set();
|
|
106
|
+
const visited = new Set([root]);
|
|
107
|
+
if (hops <= 0)
|
|
108
|
+
return visited;
|
|
109
|
+
let frontier = [root];
|
|
110
|
+
for (let depth = 0; depth < hops; depth++) {
|
|
111
|
+
const next = [];
|
|
112
|
+
for (const id of frontier) {
|
|
113
|
+
const entry = adj.get(id);
|
|
114
|
+
if (!entry)
|
|
115
|
+
continue;
|
|
116
|
+
for (const e of entry.outEdges) {
|
|
117
|
+
if (!visited.has(e.target)) {
|
|
118
|
+
visited.add(e.target);
|
|
119
|
+
next.push(e.target);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
// Inbound edges too — a "relationships around X" view should show
|
|
123
|
+
// the things that point AT X, not just the things X points at.
|
|
124
|
+
// The user can drop this via --directed.
|
|
125
|
+
for (const e of entry.inEdges) {
|
|
126
|
+
if (!visited.has(e.source)) {
|
|
127
|
+
visited.add(e.source);
|
|
128
|
+
next.push(e.source);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
frontier = next;
|
|
133
|
+
if (!frontier.length)
|
|
134
|
+
break;
|
|
135
|
+
}
|
|
136
|
+
return visited;
|
|
137
|
+
}
|
|
138
|
+
/** Directed variant — only outbound edges. */
|
|
139
|
+
function bfsOut(adj, root, hops) {
|
|
140
|
+
if (!adj.has(root))
|
|
141
|
+
return new Set();
|
|
142
|
+
const visited = new Set([root]);
|
|
143
|
+
if (hops <= 0)
|
|
144
|
+
return visited;
|
|
145
|
+
let frontier = [root];
|
|
146
|
+
for (let depth = 0; depth < hops; depth++) {
|
|
147
|
+
const next = [];
|
|
148
|
+
for (const id of frontier) {
|
|
149
|
+
const entry = adj.get(id);
|
|
150
|
+
if (!entry)
|
|
151
|
+
continue;
|
|
152
|
+
for (const e of entry.outEdges) {
|
|
153
|
+
if (!visited.has(e.target)) {
|
|
154
|
+
visited.add(e.target);
|
|
155
|
+
next.push(e.target);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
frontier = next;
|
|
160
|
+
if (!frontier.length)
|
|
161
|
+
break;
|
|
162
|
+
}
|
|
163
|
+
return visited;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Return every node whose @type array contains ``targetType``. Handles
|
|
167
|
+
* both string and array shapes. ``targetType`` may be a bare Schema.org
|
|
168
|
+
* fragment (``"Service"``), a Solid# vocab term (``"solid:Agent"``), or
|
|
169
|
+
* a full IRI; we match suffix-wise so casual inputs work.
|
|
170
|
+
*/
|
|
171
|
+
function nodesOfType(doc, targetType) {
|
|
172
|
+
const graph = doc.graph ?? [];
|
|
173
|
+
const needle = targetType.toLowerCase();
|
|
174
|
+
return graph.filter((n) => {
|
|
175
|
+
const t = n['@type'];
|
|
176
|
+
if (!t)
|
|
177
|
+
return false;
|
|
178
|
+
const arr = Array.isArray(t) ? t : [t];
|
|
179
|
+
return arr.some((ty) => {
|
|
180
|
+
const s = String(ty).toLowerCase();
|
|
181
|
+
return s === needle || s.endsWith(':' + needle) || s.endsWith('/' + needle);
|
|
182
|
+
});
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
/** Enumerate every distinct @type value in the graph, sorted. */
|
|
186
|
+
function listTypes(doc) {
|
|
187
|
+
const graph = doc.graph ?? [];
|
|
188
|
+
const seen = new Set();
|
|
189
|
+
for (const n of graph) {
|
|
190
|
+
const t = n['@type'];
|
|
191
|
+
if (!t)
|
|
192
|
+
continue;
|
|
193
|
+
const arr = Array.isArray(t) ? t : [t];
|
|
194
|
+
for (const ty of arr)
|
|
195
|
+
seen.add(String(ty));
|
|
196
|
+
}
|
|
197
|
+
return [...seen].sort();
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Short-form expander. Accepts the bare argument the user typed on the
|
|
201
|
+
* CLI and returns the full IRI when it can be resolved:
|
|
202
|
+
*
|
|
203
|
+
* "kb/42" → docRoot + "/kb/42"
|
|
204
|
+
* "co/61/service/3" → SOLID + "/co/61/service/3"
|
|
205
|
+
* "https://solidnumber.com/co/61/kb/42" → unchanged (already full)
|
|
206
|
+
* "tier/builder" → SOLID + "/vocab/tier/builder"
|
|
207
|
+
*
|
|
208
|
+
* ``docRoot`` should be the graph document's own ``@id`` (the tenant
|
|
209
|
+
* Organization) so relative paths resolve against the caller's tenant.
|
|
210
|
+
*/
|
|
211
|
+
function resolveIri(input, docRoot) {
|
|
212
|
+
const trimmed = input.trim();
|
|
213
|
+
if (trimmed.startsWith('http://') || trimmed.startsWith('https://'))
|
|
214
|
+
return trimmed;
|
|
215
|
+
// "vocab/<type>/<slug>" or "tier/<slug>" — platform-wide.
|
|
216
|
+
const platformPrefixes = ['tier/', 'industry/', 'shelf/', 'agent-default/', 'cli-tool/', 'kb-template/'];
|
|
217
|
+
if (platformPrefixes.some((p) => trimmed.startsWith(p))) {
|
|
218
|
+
return `https://solidnumber.com/vocab/${trimmed}`;
|
|
219
|
+
}
|
|
220
|
+
if (trimmed.startsWith('vocab/')) {
|
|
221
|
+
return `https://solidnumber.com/${trimmed}`;
|
|
222
|
+
}
|
|
223
|
+
// "co/<id>/<type>/<entity>" — full company-scoped path sans scheme.
|
|
224
|
+
if (trimmed.startsWith('co/')) {
|
|
225
|
+
return `https://solidnumber.com/${trimmed}`;
|
|
226
|
+
}
|
|
227
|
+
// Relative to this tenant's doc root, e.g. "kb/42" → "<doc>/kb/42".
|
|
228
|
+
if (docRoot)
|
|
229
|
+
return `${docRoot.replace(/\/$/, '')}/${trimmed}`;
|
|
230
|
+
return trimmed;
|
|
231
|
+
}
|
|
232
|
+
/** Extract a subgraph (a fresh JsonLdDocument) containing only the
|
|
233
|
+
* nodes in ``ids`` — useful for ``solid graph --json`` output. */
|
|
234
|
+
function subgraph(doc, ids) {
|
|
235
|
+
const graph = (doc.graph ?? []).filter((n) => ids.has(n['@id']));
|
|
236
|
+
return {
|
|
237
|
+
'@context': doc['@context'],
|
|
238
|
+
'@id': doc['@id'],
|
|
239
|
+
'@type': doc['@type'],
|
|
240
|
+
graph,
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Per-type required-field registry. Matched against the @type array
|
|
245
|
+
* using the same suffix rules as ``nodesOfType``. Each required field
|
|
246
|
+
* is either a predicate that must be present and non-empty, or an
|
|
247
|
+
* edge that must resolve inside @graph.
|
|
248
|
+
*
|
|
249
|
+
* Missing required fields are ERROR by default; edge targets that
|
|
250
|
+
* exist but don't resolve in-document are ERROR. Structural issues
|
|
251
|
+
* (like a duplicate @id) are ERROR too.
|
|
252
|
+
*
|
|
253
|
+
* The registry is permissive: unknown types don't produce issues.
|
|
254
|
+
* New types are validated the moment they're added to this map.
|
|
255
|
+
*/
|
|
256
|
+
const REQUIRED_FIELDS = [
|
|
257
|
+
{ matchType: 'Organization', fields: ['name'] },
|
|
258
|
+
{ matchType: 'solid:Company', fields: ['name', 'identifier'] },
|
|
259
|
+
{ matchType: 'Service', fields: ['name', 'provider'] },
|
|
260
|
+
{ matchType: 'Product', fields: ['name', 'provider'] },
|
|
261
|
+
{ matchType: 'solid:KnowledgeBaseEntry', fields: ['name', 'company'] },
|
|
262
|
+
{ matchType: 'solid:Agent', fields: ['name'] },
|
|
263
|
+
{ matchType: 'solid:WebsitePage', fields: ['name', 'company'] },
|
|
264
|
+
{ matchType: 'solid:Site', fields: ['name', 'company'] },
|
|
265
|
+
{ matchType: 'solid:AgentChain', fields: ['name', 'company'] },
|
|
266
|
+
{ matchType: 'solid:InboundWebhook', fields: ['solid:eventKey', 'company'] },
|
|
267
|
+
{ matchType: 'solid:CustomDomain', fields: ['name', 'company'] },
|
|
268
|
+
{ matchType: 'solid:Tier', fields: ['name'] },
|
|
269
|
+
{ matchType: 'solid:Industry', fields: ['name'] },
|
|
270
|
+
];
|
|
271
|
+
function nodeTypeMatches(node, target) {
|
|
272
|
+
const t = node['@type'];
|
|
273
|
+
if (!t)
|
|
274
|
+
return false;
|
|
275
|
+
const arr = Array.isArray(t) ? t : [t];
|
|
276
|
+
const needle = target.toLowerCase();
|
|
277
|
+
return arr.some((ty) => {
|
|
278
|
+
const s = String(ty).toLowerCase();
|
|
279
|
+
return s === needle || s.endsWith(':' + needle) || s.endsWith('/' + needle);
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
function hasNonEmptyField(node, field) {
|
|
283
|
+
const v = node[field];
|
|
284
|
+
if (v === undefined || v === null || v === '')
|
|
285
|
+
return false;
|
|
286
|
+
if (Array.isArray(v) && v.length === 0)
|
|
287
|
+
return false;
|
|
288
|
+
if (typeof v === 'object' && !Array.isArray(v) && Object.keys(v).length === 0)
|
|
289
|
+
return false;
|
|
290
|
+
return true;
|
|
291
|
+
}
|
|
292
|
+
function validate(doc) {
|
|
293
|
+
const issues = [];
|
|
294
|
+
const graph = doc.graph ?? [];
|
|
295
|
+
const ids = new Set();
|
|
296
|
+
let edgeCount = 0;
|
|
297
|
+
// Pass 1: duplicate @id detection + build the id set.
|
|
298
|
+
for (const node of graph) {
|
|
299
|
+
const id = node['@id'];
|
|
300
|
+
if (!id) {
|
|
301
|
+
issues.push({
|
|
302
|
+
severity: 'error',
|
|
303
|
+
code: 'missing_id',
|
|
304
|
+
nodeId: '(unnamed)',
|
|
305
|
+
message: `node lacks @id — graph cannot reference it`,
|
|
306
|
+
});
|
|
307
|
+
continue;
|
|
308
|
+
}
|
|
309
|
+
if (ids.has(id)) {
|
|
310
|
+
issues.push({
|
|
311
|
+
severity: 'error',
|
|
312
|
+
code: 'duplicate_id',
|
|
313
|
+
nodeId: id,
|
|
314
|
+
message: `@id appears more than once in @graph`,
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
ids.add(id);
|
|
318
|
+
}
|
|
319
|
+
// Pass 2: per-node edge + required-field checks.
|
|
320
|
+
for (const node of graph) {
|
|
321
|
+
const id = node['@id'];
|
|
322
|
+
if (!id)
|
|
323
|
+
continue;
|
|
324
|
+
// Required fields per type.
|
|
325
|
+
for (const rule of REQUIRED_FIELDS) {
|
|
326
|
+
if (!nodeTypeMatches(node, rule.matchType))
|
|
327
|
+
continue;
|
|
328
|
+
for (const field of rule.fields) {
|
|
329
|
+
if (!hasNonEmptyField(node, field)) {
|
|
330
|
+
issues.push({
|
|
331
|
+
severity: 'error',
|
|
332
|
+
code: 'missing_required',
|
|
333
|
+
nodeId: id,
|
|
334
|
+
message: `@type ${rule.matchType} requires field "${field}" — missing or empty`,
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
// Edge targets — any string value resolving to an IRI-shaped id
|
|
340
|
+
// should exist in @graph. This is the same edge-discovery logic
|
|
341
|
+
// the walker uses; dangling edges = bad graph.
|
|
342
|
+
for (const [key, value] of Object.entries(node)) {
|
|
343
|
+
if (key.startsWith('@'))
|
|
344
|
+
continue;
|
|
345
|
+
const targets = [];
|
|
346
|
+
if (typeof value === 'string' && /^https?:\/\//.test(value)) {
|
|
347
|
+
targets.push(value);
|
|
348
|
+
}
|
|
349
|
+
else if (Array.isArray(value)) {
|
|
350
|
+
for (const item of value) {
|
|
351
|
+
if (typeof item === 'string' && /^https?:\/\//.test(item))
|
|
352
|
+
targets.push(item);
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
else if (value && typeof value === 'object' && '@id' in value) {
|
|
356
|
+
const inner = value['@id'];
|
|
357
|
+
if (typeof inner === 'string' && /^https?:\/\//.test(inner))
|
|
358
|
+
targets.push(inner);
|
|
359
|
+
}
|
|
360
|
+
for (const target of targets) {
|
|
361
|
+
edgeCount++;
|
|
362
|
+
// External IRIs (outside solidnumber.com) aren't expected to
|
|
363
|
+
// resolve inside @graph — e.g. schema:image might point at a
|
|
364
|
+
// CDN URL. We only enforce resolution for solidnumber.com IDs.
|
|
365
|
+
if (!target.startsWith('https://solidnumber.com'))
|
|
366
|
+
continue;
|
|
367
|
+
if (target === id)
|
|
368
|
+
continue; // self-ref is benign
|
|
369
|
+
if (!ids.has(target)) {
|
|
370
|
+
issues.push({
|
|
371
|
+
severity: 'error',
|
|
372
|
+
code: 'dangling_edge',
|
|
373
|
+
nodeId: id,
|
|
374
|
+
message: `"${key}" → ${target} — target not in @graph`,
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
return {
|
|
381
|
+
ok: issues.filter((i) => i.severity === 'error').length === 0,
|
|
382
|
+
issues,
|
|
383
|
+
nodeCount: graph.length,
|
|
384
|
+
edgeCount,
|
|
385
|
+
};
|
|
386
|
+
}
|
|
387
|
+
//# sourceMappingURL=graph-walker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-walker.js","sourceRoot":"","sources":["../../src/lib/graph-walker.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;AAmEH,wCAqBC;AAQD,kBA+BC;AAGD,wBAsBC;AAQD,kCAYC;AAGD,8BAUC;AAcD,gCAqBC;AAID,4BAQC;AAoED,4BA2FC;AAhXD;;;;;;;;;;GAUG;AACH,SAAS,YAAY,CAAC,IAAgB,EAAE,QAAqB;IAC3D,MAAM,GAAG,GAAiD,EAAE,CAAC;IAC7D,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QAChD,IAAI,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC;YAAE,SAAS;QAClC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,QAAQ,CAAC,GA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I,KAA6B,CAAC,KAAK,CAAC,CAAC;gBACpD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC;oBAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACnF,CAAC;YAED,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;gBAC7B,SAAS,EAAE,CAAC;gBACZ,6DAA6D;gBAC7D,6DAA6D;gBAC7D,+DAA+D;gBAC/D,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,yBAAyB,CAAC;oBAAE,SAAS;gBAC5D,IAAI,MAAM,KAAK,EAAE;oBAAE,SAAS,CAAE,qBAAqB;gBACnD,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;oBACrB,MAAM,CAAC,IAAI,CAAC;wBACV,QAAQ,EAAE,OAAO;wBACjB,IAAI,EAAE,eAAe;wBACrB,MAAM,EAAE,EAAE;wBACV,OAAO,EAAE,IAAI,GAAG,OAAO,MAAM,yBAAyB;qBACvD,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO;QACL,EAAE,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,MAAM,KAAK,CAAC;QAC7D,MAAM;QACN,SAAS,EAAE,KAAK,CAAC,MAAM;QACvB,SAAS;KACV,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solidnumber/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.19.5",
|
|
4
4
|
"description": "AI business infrastructure from the terminal — CRM, payments, voice AI, 116 agents, 52 industry templates. solid clone plumber → instant business. Also: programmatic TS SDK via @solidnumber/cli/sdk.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -32,8 +32,9 @@
|
|
|
32
32
|
"test:security": "jest --testPathPattern=company-isolation --forceExit",
|
|
33
33
|
"verify:schemas": "ts-node scripts/verify-schemas.ts",
|
|
34
34
|
"audit": "npm audit --audit-level=high",
|
|
35
|
+
"audit:prod": "npm audit --omit=dev --audit-level=high",
|
|
35
36
|
"prepublish:check": "bash scripts/prepublish.sh",
|
|
36
|
-
"prepublishOnly": "npm run build && npm test && npm run test:security"
|
|
37
|
+
"prepublishOnly": "npm run build && npm test && npm run test:security && npm run audit:prod"
|
|
37
38
|
},
|
|
38
39
|
"keywords": [
|
|
39
40
|
"cli",
|