@medicine-wheel/developer-repository-mapping 0.27.9 → 0.27.10

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.
@@ -0,0 +1,271 @@
1
+ "use strict";
2
+ /**
3
+ * Capabilities on Node: read a clone at one commit, from git objects, never
4
+ * from its working tree. A clone on another branch or with edits of its own
5
+ * reads the same as a clean one, and every row names the commit it was read
6
+ * at. `readRepositoryCapabilities` takes the repository's own file first;
7
+ * `writeCapabilityFile` writes it; `buildCapabilityMap` goes through many
8
+ * clones and answers one map. Reading runs git ls-tree, git show and git
9
+ * rev-parse only. Writing touches the one file and commits nothing.
10
+ */
11
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
12
+ if (k2 === undefined) k2 = k;
13
+ var desc = Object.getOwnPropertyDescriptor(m, k);
14
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
15
+ desc = { enumerable: true, get: function() { return m[k]; } };
16
+ }
17
+ Object.defineProperty(o, k2, desc);
18
+ }) : (function(o, m, k, k2) {
19
+ if (k2 === undefined) k2 = k;
20
+ o[k2] = m[k];
21
+ }));
22
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
23
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
24
+ }) : function(o, v) {
25
+ o["default"] = v;
26
+ });
27
+ var __importStar = (this && this.__importStar) || (function () {
28
+ var ownKeys = function(o) {
29
+ ownKeys = Object.getOwnPropertyNames || function (o) {
30
+ var ar = [];
31
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
32
+ return ar;
33
+ };
34
+ return ownKeys(o);
35
+ };
36
+ return function (mod) {
37
+ if (mod && mod.__esModule) return mod;
38
+ var result = {};
39
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
40
+ __setModuleDefault(result, mod);
41
+ return result;
42
+ };
43
+ })();
44
+ Object.defineProperty(exports, "__esModule", { value: true });
45
+ exports.scanRepository = scanRepository;
46
+ exports.readRepositoryCapabilities = readRepositoryCapabilities;
47
+ exports.writeCapabilityFile = writeCapabilityFile;
48
+ exports.stateCapability = stateCapability;
49
+ exports.findClones = findClones;
50
+ exports.buildCapabilityMap = buildCapabilityMap;
51
+ const node_child_process_1 = require("node:child_process");
52
+ const node_fs_1 = require("node:fs");
53
+ const path = __importStar(require("node:path"));
54
+ const node_util_1 = require("node:util");
55
+ const ids_1 = require("../ids");
56
+ const capability_scan_1 = require("../capability-scan");
57
+ const capability_impact_1 = require("../capability-impact");
58
+ const capability_file_1 = require("../capability-file");
59
+ const run = (0, node_util_1.promisify)(node_child_process_1.execFile);
60
+ async function git(clone, args) {
61
+ try {
62
+ const { stdout } = await run('git', ['-C', clone, ...args], { maxBuffer: 256 * 1024 * 1024 });
63
+ return stdout;
64
+ }
65
+ catch {
66
+ return undefined;
67
+ }
68
+ }
69
+ /** `owner/name` from any remote URL: GitHub's forms first, else the last two path segments. */
70
+ function remoteRepository(url) {
71
+ const github = (0, ids_1.parseGithubRemote)(url);
72
+ if (github)
73
+ return github;
74
+ const m = /([A-Za-z0-9][A-Za-z0-9._-]*)\/([A-Za-z0-9][A-Za-z0-9._-]*?)(?:\.git)?\/?$/.exec(url.trim());
75
+ return m && m[1] && m[2] ? { owner: m[1], name: m[2] } : undefined;
76
+ }
77
+ async function scanRepository(clone, options) {
78
+ if ((await git(clone, ['rev-parse', '--git-dir'])) === undefined)
79
+ throw new Error(`not a git clone: ${clone}`);
80
+ const ref = options.ref ?? ((await git(clone, ['rev-parse', '--verify', '-q', 'origin/HEAD'])) ? 'origin/HEAD' : 'HEAD');
81
+ const commit = (await git(clone, ['rev-parse', '--verify', `${ref}^{commit}`]))?.trim();
82
+ if (!commit)
83
+ throw new Error(`${clone}: no commit at ${ref}`);
84
+ let repository = options.repository
85
+ ? options.repository.startsWith('repository:')
86
+ ? options.repository
87
+ : `repository:${options.repository}`
88
+ : undefined;
89
+ if (!repository) {
90
+ const remote = remoteRepository((await git(clone, ['remote', 'get-url', 'origin']))?.trim() ?? '');
91
+ if (!remote)
92
+ throw new Error(`${clone}: no origin remote to name it by; pass --repository owner/name`);
93
+ repository = (0, ids_1.repositoryNodeId)(remote.owner, remote.name);
94
+ }
95
+ const files = ((await git(clone, ['ls-tree', '-r', '--name-only', commit])) ?? '').split('\n').filter(Boolean);
96
+ const show = (file) => git(clone, ['show', `${commit}:${file}`]);
97
+ const globs = (0, capability_scan_1.workspaceGlobs)(await show('package.json'), files.includes('pnpm-workspace.yaml') ? await show('pnpm-workspace.yaml') : undefined);
98
+ const artefacts = [];
99
+ const packages = [];
100
+ for (const manifest of (0, capability_scan_1.packageManifests)(globs, files)) {
101
+ const pkg = (0, capability_scan_1.parsePackageJson)((await show(manifest)) ?? '');
102
+ if (!pkg.name)
103
+ continue;
104
+ packages.push({
105
+ capability: (0, capability_scan_1.capabilityId)('package', pkg.name),
106
+ name: pkg.name,
107
+ ...(pkg.version ? { version: pkg.version } : {}),
108
+ repository,
109
+ path: manifest,
110
+ commit: commit.slice(0, 12),
111
+ dependsOn: pkg.dependsOn,
112
+ ...(pkg.bins.length ? { bins: pkg.bins } : {}),
113
+ });
114
+ artefacts.push({ kind: 'package', name: pkg.name, ...(pkg.description ? { description: pkg.description } : {}), path: manifest });
115
+ for (const bin of pkg.bins) {
116
+ artefacts.push({ kind: 'cli', name: bin, description: `The ${bin} command, shipped by ${pkg.name}.`, path: manifest, package: pkg.name });
117
+ }
118
+ }
119
+ for (const file of (0, capability_scan_1.skillFiles)(files)) {
120
+ const front = (0, capability_scan_1.parseSkillFrontMatter)((await show(file)) ?? '');
121
+ const name = front.name ?? file.split('/').slice(-2, -1)[0];
122
+ if (!name)
123
+ continue;
124
+ artefacts.push({ kind: 'skill', name, ...(front.description ? { description: front.description } : {}), path: file });
125
+ }
126
+ // Capabilities defined in code, each by the reader written for its repository's file.
127
+ for (const reader of capability_scan_1.CODE_READERS) {
128
+ if (reader.repository.toLowerCase() !== repository.toLowerCase() || !files.includes(reader.path))
129
+ continue;
130
+ artefacts.push(...reader.read((await show(reader.path)) ?? ''));
131
+ }
132
+ const observedAt = (options.now ?? new Date()).toISOString();
133
+ return {
134
+ repository,
135
+ ref,
136
+ commit,
137
+ capabilities: (0, capability_scan_1.capabilityRows)(artefacts, { repository, commit, observedBy: options.observedBy, observedAt }),
138
+ packages,
139
+ fileRows: (0, capability_file_1.capabilityFileRows)(artefacts, { repository, statedAt: observedAt }),
140
+ };
141
+ }
142
+ /**
143
+ * What a repository provides at one commit: its own file when the commit
144
+ * holds one, merged with what the commit's files say by the rule a rescan
145
+ * uses, so a file behind its repository still answers every capability.
146
+ * Versions and ranges always come from the commit's package.json files.
147
+ */
148
+ async function readRepositoryCapabilities(clone, options) {
149
+ const scan = await scanRepository(clone, options);
150
+ const text = await git(clone, ['show', `${scan.commit}:${capability_file_1.CAPABILITY_FILE}`]);
151
+ if (text === undefined)
152
+ return { ...scan, source: 'scan', issues: [] };
153
+ const parsed = (0, capability_file_1.parseCapabilityFile)(text);
154
+ const merge = (0, capability_file_1.mergeCapabilityFile)(parsed.rows, scan.fileRows);
155
+ const issues = [...parsed.issues];
156
+ const named = `repository:${parsed.header?.repository ?? ''}`;
157
+ if (parsed.header && named.toLowerCase() !== scan.repository.toLowerCase()) {
158
+ issues.push({ severity: 'warning', file: capability_file_1.CAPABILITY_FILE, message: `written for ${parsed.header.repository}; this clone's origin is ${scan.repository.replace(/^repository:/, '')}` });
159
+ }
160
+ return {
161
+ ...scan,
162
+ capabilities: (0, capability_file_1.capabilityFileFacets)(merge.rows, { repository: scan.repository, commit: scan.commit }),
163
+ source: 'file',
164
+ issues,
165
+ drift: { added: merge.added, removed: merge.removed, changed: merge.changed, keptByPerson: merge.keptByPerson },
166
+ };
167
+ }
168
+ async function workingRoot(clone) {
169
+ const root = (await git(clone, ['rev-parse', '--show-toplevel']))?.trim();
170
+ if (!root)
171
+ throw new Error(`not a git working tree: ${clone}`);
172
+ return root;
173
+ }
174
+ function readWorkingFile(file) {
175
+ return (0, node_fs_1.existsSync)(file) ? (0, capability_file_1.parseCapabilityFile)((0, node_fs_1.readFileSync)(file, 'utf8')) : undefined;
176
+ }
177
+ /**
178
+ * Bring the working tree's file up to what a scan found, keeping what a person
179
+ * wrote. With `write: false` nothing is touched and `differs` says whether a
180
+ * write would change it. Refuses a file with a bad line, because a line that
181
+ * did not parse would not be written back.
182
+ */
183
+ async function writeCapabilityFile(clone, scan, options) {
184
+ const root = await workingRoot(clone);
185
+ const file = path.join(root, capability_file_1.CAPABILITY_FILE);
186
+ const current = readWorkingFile(file);
187
+ const bad = current?.issues.find((i) => i.severity === 'error');
188
+ if (bad)
189
+ throw new Error(`${capability_file_1.CAPABILITY_FILE}${bad.line ? `:${bad.line}` : ''}: ${bad.message} (nothing was written)`);
190
+ const merge = (0, capability_file_1.mergeCapabilityFile)(current?.rows ?? [], scan.fileRows);
191
+ const text = (0, capability_file_1.renderCapabilityFile)(scan.repository, merge.rows);
192
+ const differs = !(0, node_fs_1.existsSync)(file) || (0, node_fs_1.readFileSync)(file, 'utf8') !== text;
193
+ if (differs && options.write) {
194
+ (0, node_fs_1.mkdirSync)(path.dirname(file), { recursive: true });
195
+ (0, node_fs_1.writeFileSync)(file, text, 'utf8');
196
+ }
197
+ return { file, text, differs, wrote: differs && options.write, added: merge.added, removed: merge.removed, changed: merge.changed, keptByPerson: merge.keptByPerson };
198
+ }
199
+ /** A person states or affirms one capability in the working tree's file. */
200
+ async function stateCapability(clone, input) {
201
+ const root = await workingRoot(clone);
202
+ const file = path.join(root, capability_file_1.CAPABILITY_FILE);
203
+ const current = readWorkingFile(file);
204
+ if (!current)
205
+ throw new Error(`${capability_file_1.CAPABILITY_FILE} does not exist: run capabilities scan --write first`);
206
+ const bad = current.issues.find((i) => i.severity === 'error');
207
+ if (bad)
208
+ throw new Error(`${capability_file_1.CAPABILITY_FILE}${bad.line ? `:${bad.line}` : ''}: ${bad.message} (nothing was written)`);
209
+ if (!current.header)
210
+ throw new Error(`${capability_file_1.CAPABILITY_FILE} has no header line (nothing was written)`);
211
+ const answer = (0, capability_file_1.stateCapabilityRow)(current.rows, {
212
+ kind: input.kind,
213
+ name: input.name,
214
+ by: input.by,
215
+ at: (input.now ?? new Date()).toISOString(),
216
+ ...(input.statement !== undefined ? { statement: input.statement } : {}),
217
+ });
218
+ if ('error' in answer)
219
+ throw new Error(answer.error);
220
+ (0, node_fs_1.writeFileSync)(file, (0, capability_file_1.renderCapabilityFile)(current.header.repository, answer.rows), 'utf8');
221
+ return { file, row: answer.rows.find((r) => r.kind === input.kind && r.name === input.name) };
222
+ }
223
+ /** The git clones under a folder: itself, its children, or `owner/name` two levels down. Hidden folders are skipped. */
224
+ function findClones(root) {
225
+ const isClone = (dir) => (0, node_fs_1.existsSync)(path.join(dir, '.git'));
226
+ if (isClone(root))
227
+ return [root];
228
+ const children = (dir) => (0, node_fs_1.readdirSync)(dir, { withFileTypes: true })
229
+ .filter((d) => d.isDirectory() && !d.name.startsWith('.'))
230
+ .map((d) => path.join(dir, d.name));
231
+ const clones = [];
232
+ for (const child of children(root)) {
233
+ if (isClone(child))
234
+ clones.push(child);
235
+ else
236
+ for (const grandchild of children(child))
237
+ if (isClone(grandchild))
238
+ clones.push(grandchild);
239
+ }
240
+ return clones.sort();
241
+ }
242
+ /**
243
+ * Go through clones and answer one map of what they provide. A clone that
244
+ * cannot be read is reported and the others are still read.
245
+ */
246
+ async function buildCapabilityMap(clones, options) {
247
+ const repositories = [];
248
+ const facets = [];
249
+ const packages = [];
250
+ for (const clone of clones) {
251
+ try {
252
+ const read = await readRepositoryCapabilities(clone, options);
253
+ const counts = { package: 0, cli: 0, skill: 0 };
254
+ for (const r of read.capabilities) {
255
+ const kind = /^capability:(package|cli|skill)-/.exec(r.nodeId)?.[1];
256
+ if (kind)
257
+ counts[kind] += 1;
258
+ }
259
+ repositories.push({ clone, repository: read.repository, commit: read.commit, source: read.source, counts, issues: read.issues, ...(read.drift ? { drift: read.drift } : {}) });
260
+ facets.push(...read.capabilities);
261
+ packages.push(...read.packages);
262
+ }
263
+ catch (error) {
264
+ repositories.push({ clone, issues: [], error: error.message });
265
+ }
266
+ }
267
+ const seen = new Set();
268
+ const unique = packages.filter((p) => (seen.has(p.name) ? false : (seen.add(p.name), true)));
269
+ return { repositories, capabilities: (0, capability_scan_1.mergeCapabilityRows)(facets), packages: unique, consumes: (0, capability_impact_1.consumesEdges)(unique) };
270
+ }
271
+ //# sourceMappingURL=capability-scan.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capability-scan.js","sourceRoot":"","sources":["../../src/node/capability-scan.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0EH,wCA8DC;AAgBD,gEAkBC;AA0BD,kDAcC;AAGD,0CAqBC;AAGD,gCAaC;AA2BD,gDAsBC;AAzSD,2DAA8C;AAC9C,qCAA0F;AAC1F,gDAAkC;AAClC,yCAAsC;AAEtC,gCAA6D;AAE7D,wDAY4B;AAC5B,4DAA6F;AAC7F,wDAU4B;AAE5B,MAAM,GAAG,GAAG,IAAA,qBAAS,EAAC,6BAAQ,CAAC,CAAC;AAEhC,KAAK,UAAU,GAAG,CAAC,KAAa,EAAE,IAAc;IAC9C,IAAI,CAAC;QACH,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,GAAG,GAAG,IAAI,GAAG,IAAI,EAAE,CAAC,CAAC;QAC9F,OAAO,MAAM,CAAC;IAChB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC;AAED,+FAA+F;AAC/F,SAAS,gBAAgB,CAAC,GAAW;IACnC,MAAM,MAAM,GAAG,IAAA,uBAAiB,EAAC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C,CAAC;YAClC,QAAQ,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC;QAClC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,YAAY,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAG,KAAe,CAAC,OAAO,EAAE,CAAC,CAAC;QAC5E,CAAC;IACH,CAAC;IACD,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IAC7F,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,IAAA,qCAAmB,EAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAA,iCAAa,EAAC,MAAM,CAAC,EAAE,CAAC;AACxH,CAAC"}
@@ -13,4 +13,6 @@ export type { FetchLike, HubStatus, HubRead, ReadHubOptions } from './hub';
13
13
  export { createMappingServer, toView, LOOPBACK_HOSTS } from './server';
14
14
  export type { MappingView, MappingServerOptions } from './server';
15
15
  export { MAPPING_PAGE } from './page';
16
+ export { buildCapabilityMap, findClones, readRepositoryCapabilities, scanRepository, stateCapability, writeCapabilityFile } from './capability-scan';
17
+ export type { CapabilityMap, CapabilityMapRepository, RepositoryCapabilities, ScanOptions, ScanResult, WriteCapabilityFileResult } from './capability-scan';
16
18
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,cA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AAE,0BAA0B,EAAE,cAAc,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACrJ,YAAY,EAAE,aAAa,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,WAAW,EAAE,UAAU,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC"}
@@ -7,7 +7,7 @@
7
7
  * meta hub with every owner hub it registers, and serve the small web page.
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.MAPPING_PAGE = exports.LOOPBACK_HOSTS = exports.toView = exports.createMappingServer = exports.HUB_FETCH_TIMEOUT_MS = exports.readHub = exports.readMappingSource = exports.defaultHubSource = exports.originRepository = exports.readActivity = exports.initMappingDir = exports.writeMappingDir = exports.readMappingDir = exports.findMappingDir = void 0;
10
+ exports.writeCapabilityFile = exports.stateCapability = exports.scanRepository = exports.readRepositoryCapabilities = exports.findClones = exports.buildCapabilityMap = exports.MAPPING_PAGE = exports.LOOPBACK_HOSTS = exports.toView = exports.createMappingServer = exports.HUB_FETCH_TIMEOUT_MS = exports.readHub = exports.readMappingSource = exports.defaultHubSource = exports.originRepository = exports.readActivity = exports.initMappingDir = exports.writeMappingDir = exports.readMappingDir = exports.findMappingDir = void 0;
11
11
  var fs_1 = require("./fs");
12
12
  Object.defineProperty(exports, "findMappingDir", { enumerable: true, get: function () { return fs_1.findMappingDir; } });
13
13
  Object.defineProperty(exports, "readMappingDir", { enumerable: true, get: function () { return fs_1.readMappingDir; } });
@@ -27,4 +27,11 @@ Object.defineProperty(exports, "toView", { enumerable: true, get: function () {
27
27
  Object.defineProperty(exports, "LOOPBACK_HOSTS", { enumerable: true, get: function () { return server_1.LOOPBACK_HOSTS; } });
28
28
  var page_1 = require("./page");
29
29
  Object.defineProperty(exports, "MAPPING_PAGE", { enumerable: true, get: function () { return page_1.MAPPING_PAGE; } });
30
+ var capability_scan_1 = require("./capability-scan");
31
+ Object.defineProperty(exports, "buildCapabilityMap", { enumerable: true, get: function () { return capability_scan_1.buildCapabilityMap; } });
32
+ Object.defineProperty(exports, "findClones", { enumerable: true, get: function () { return capability_scan_1.findClones; } });
33
+ Object.defineProperty(exports, "readRepositoryCapabilities", { enumerable: true, get: function () { return capability_scan_1.readRepositoryCapabilities; } });
34
+ Object.defineProperty(exports, "scanRepository", { enumerable: true, get: function () { return capability_scan_1.scanRepository; } });
35
+ Object.defineProperty(exports, "stateCapability", { enumerable: true, get: function () { return capability_scan_1.stateCapability; } });
36
+ Object.defineProperty(exports, "writeCapabilityFile", { enumerable: true, get: function () { return capability_scan_1.writeCapabilityFile; } });
30
37
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,2BAAuF;AAA9E,oGAAA,cAAc,OAAA;AAAE,oGAAA,cAAc,OAAA;AAAE,qGAAA,eAAe,OAAA;AAAE,oGAAA,cAAc,OAAA;AACxE,6BAAuD;AAA9C,mGAAA,YAAY,OAAA;AAAE,uGAAA,gBAAgB,OAAA;AAEvC,6BAA2F;AAAlF,uGAAA,gBAAgB,OAAA;AAAE,wGAAA,iBAAiB,OAAA;AAAE,8FAAA,OAAO,OAAA;AAAE,2GAAA,oBAAoB,OAAA;AAE3E,mCAAuE;AAA9D,6GAAA,mBAAmB,OAAA;AAAE,gGAAA,MAAM,OAAA;AAAE,wGAAA,cAAc,OAAA;AAEpD,+BAAsC;AAA7B,oGAAA,YAAY,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,2BAAuF;AAA9E,oGAAA,cAAc,OAAA;AAAE,oGAAA,cAAc,OAAA;AAAE,qGAAA,eAAe,OAAA;AAAE,oGAAA,cAAc,OAAA;AACxE,6BAAuD;AAA9C,mGAAA,YAAY,OAAA;AAAE,uGAAA,gBAAgB,OAAA;AAEvC,6BAA2F;AAAlF,uGAAA,gBAAgB,OAAA;AAAE,wGAAA,iBAAiB,OAAA;AAAE,8FAAA,OAAO,OAAA;AAAE,2GAAA,oBAAoB,OAAA;AAE3E,mCAAuE;AAA9D,6GAAA,mBAAmB,OAAA;AAAE,gGAAA,MAAM,OAAA;AAAE,wGAAA,cAAc,OAAA;AAEpD,+BAAsC;AAA7B,oGAAA,YAAY,OAAA;AACrB,qDAAqJ;AAA5I,qHAAA,kBAAkB,OAAA;AAAE,6GAAA,UAAU,OAAA;AAAE,6HAAA,0BAA0B,OAAA;AAAE,iHAAA,cAAc,OAAA;AAAE,kHAAA,eAAe,OAAA;AAAE,sHAAA,mBAAmB,OAAA"}
package/dist/schemas.d.ts CHANGED
@@ -99,15 +99,17 @@ export declare const RepositoryFacetSchema: z.ZodEffects<z.ZodObject<{
99
99
  }>>;
100
100
  }, "strict", z.ZodTypeAny, {
101
101
  nodeId: string;
102
- lifecycle: "unclassified" | "prototype" | "implementation" | "maintained" | "archived";
103
- origin: "own" | "agent" | "community-fork";
102
+ revision: "pending" | "revised" | "affirmed";
104
103
  status: "clear" | "unclear" | "undefinable" | "needs-resolution";
105
- fields: string[];
106
- prototypes: string[];
107
104
  statedBy: string;
108
105
  statedAt: string;
109
106
  grounding: string[];
110
- revision: "pending" | "revised" | "affirmed";
107
+ lifecycle: "unclassified" | "prototype" | "implementation" | "maintained" | "archived";
108
+ origin: "own" | "agent" | "community-fork";
109
+ fields: string[];
110
+ prototypes: string[];
111
+ revisedBy?: string | undefined;
112
+ revisedAt?: string | undefined;
111
113
  observed?: {
112
114
  observedBy: string;
113
115
  observedAt: string;
@@ -122,19 +124,19 @@ export declare const RepositoryFacetSchema: z.ZodEffects<z.ZodObject<{
122
124
  purpose?: string | undefined;
123
125
  horizon?: string | undefined;
124
126
  holder?: string | undefined;
125
- revisedBy?: string | undefined;
126
- revisedAt?: string | undefined;
127
127
  }, {
128
128
  nodeId: string;
129
- lifecycle: "unclassified" | "prototype" | "implementation" | "maintained" | "archived";
130
- origin: "own" | "agent" | "community-fork";
129
+ revision: "pending" | "revised" | "affirmed";
131
130
  status: "clear" | "unclear" | "undefinable" | "needs-resolution";
132
- fields: string[];
133
- prototypes: string[];
134
131
  statedBy: string;
135
132
  statedAt: string;
136
133
  grounding: string[];
137
- revision: "pending" | "revised" | "affirmed";
134
+ lifecycle: "unclassified" | "prototype" | "implementation" | "maintained" | "archived";
135
+ origin: "own" | "agent" | "community-fork";
136
+ fields: string[];
137
+ prototypes: string[];
138
+ revisedBy?: string | undefined;
139
+ revisedAt?: string | undefined;
138
140
  observed?: {
139
141
  observedBy: string;
140
142
  observedAt: string;
@@ -149,19 +151,19 @@ export declare const RepositoryFacetSchema: z.ZodEffects<z.ZodObject<{
149
151
  purpose?: string | undefined;
150
152
  horizon?: string | undefined;
151
153
  holder?: string | undefined;
152
- revisedBy?: string | undefined;
153
- revisedAt?: string | undefined;
154
154
  }>, {
155
155
  nodeId: string;
156
- lifecycle: "unclassified" | "prototype" | "implementation" | "maintained" | "archived";
157
- origin: "own" | "agent" | "community-fork";
156
+ revision: "pending" | "revised" | "affirmed";
158
157
  status: "clear" | "unclear" | "undefinable" | "needs-resolution";
159
- fields: string[];
160
- prototypes: string[];
161
158
  statedBy: string;
162
159
  statedAt: string;
163
160
  grounding: string[];
164
- revision: "pending" | "revised" | "affirmed";
161
+ lifecycle: "unclassified" | "prototype" | "implementation" | "maintained" | "archived";
162
+ origin: "own" | "agent" | "community-fork";
163
+ fields: string[];
164
+ prototypes: string[];
165
+ revisedBy?: string | undefined;
166
+ revisedAt?: string | undefined;
165
167
  observed?: {
166
168
  observedBy: string;
167
169
  observedAt: string;
@@ -176,19 +178,19 @@ export declare const RepositoryFacetSchema: z.ZodEffects<z.ZodObject<{
176
178
  purpose?: string | undefined;
177
179
  horizon?: string | undefined;
178
180
  holder?: string | undefined;
179
- revisedBy?: string | undefined;
180
- revisedAt?: string | undefined;
181
181
  }, {
182
182
  nodeId: string;
183
- lifecycle: "unclassified" | "prototype" | "implementation" | "maintained" | "archived";
184
- origin: "own" | "agent" | "community-fork";
183
+ revision: "pending" | "revised" | "affirmed";
185
184
  status: "clear" | "unclear" | "undefinable" | "needs-resolution";
186
- fields: string[];
187
- prototypes: string[];
188
185
  statedBy: string;
189
186
  statedAt: string;
190
187
  grounding: string[];
191
- revision: "pending" | "revised" | "affirmed";
188
+ lifecycle: "unclassified" | "prototype" | "implementation" | "maintained" | "archived";
189
+ origin: "own" | "agent" | "community-fork";
190
+ fields: string[];
191
+ prototypes: string[];
192
+ revisedBy?: string | undefined;
193
+ revisedAt?: string | undefined;
192
194
  observed?: {
193
195
  observedBy: string;
194
196
  observedAt: string;
@@ -203,8 +205,6 @@ export declare const RepositoryFacetSchema: z.ZodEffects<z.ZodObject<{
203
205
  purpose?: string | undefined;
204
206
  horizon?: string | undefined;
205
207
  holder?: string | undefined;
206
- revisedBy?: string | undefined;
207
- revisedAt?: string | undefined;
208
208
  }>;
209
209
  export declare const FeatureFacetSchema: z.ZodEffects<z.ZodObject<{
210
210
  statedBy: z.ZodString;
@@ -221,56 +221,56 @@ export declare const FeatureFacetSchema: z.ZodEffects<z.ZodObject<{
221
221
  realizes: z.ZodOptional<z.ZodString>;
222
222
  }, "strict", z.ZodTypeAny, {
223
223
  nodeId: string;
224
- repository: string;
224
+ name: string;
225
+ revision: "pending" | "revised" | "affirmed";
225
226
  status: "clear" | "unclear" | "undefinable" | "needs-resolution";
227
+ repository: string;
226
228
  statedBy: string;
227
229
  statedAt: string;
228
230
  grounding: string[];
229
- revision: "pending" | "revised" | "affirmed";
230
- name: string;
231
231
  realizes?: string | undefined;
232
+ statement?: string | undefined;
232
233
  revisedBy?: string | undefined;
233
234
  revisedAt?: string | undefined;
234
- statement?: string | undefined;
235
235
  }, {
236
236
  nodeId: string;
237
- repository: string;
237
+ name: string;
238
+ revision: "pending" | "revised" | "affirmed";
238
239
  status: "clear" | "unclear" | "undefinable" | "needs-resolution";
240
+ repository: string;
239
241
  statedBy: string;
240
242
  statedAt: string;
241
243
  grounding: string[];
242
- revision: "pending" | "revised" | "affirmed";
243
- name: string;
244
244
  realizes?: string | undefined;
245
+ statement?: string | undefined;
245
246
  revisedBy?: string | undefined;
246
247
  revisedAt?: string | undefined;
247
- statement?: string | undefined;
248
248
  }>, {
249
249
  nodeId: string;
250
- repository: string;
250
+ name: string;
251
+ revision: "pending" | "revised" | "affirmed";
251
252
  status: "clear" | "unclear" | "undefinable" | "needs-resolution";
253
+ repository: string;
252
254
  statedBy: string;
253
255
  statedAt: string;
254
256
  grounding: string[];
255
- revision: "pending" | "revised" | "affirmed";
256
- name: string;
257
257
  realizes?: string | undefined;
258
+ statement?: string | undefined;
258
259
  revisedBy?: string | undefined;
259
260
  revisedAt?: string | undefined;
260
- statement?: string | undefined;
261
261
  }, {
262
262
  nodeId: string;
263
- repository: string;
263
+ name: string;
264
+ revision: "pending" | "revised" | "affirmed";
264
265
  status: "clear" | "unclear" | "undefinable" | "needs-resolution";
266
+ repository: string;
265
267
  statedBy: string;
266
268
  statedAt: string;
267
269
  grounding: string[];
268
- revision: "pending" | "revised" | "affirmed";
269
- name: string;
270
270
  realizes?: string | undefined;
271
+ statement?: string | undefined;
271
272
  revisedBy?: string | undefined;
272
273
  revisedAt?: string | undefined;
273
- statement?: string | undefined;
274
274
  }>;
275
275
  export declare const RelationRowSchema: z.ZodEffects<z.ZodObject<{
276
276
  statedBy: z.ZodString;
@@ -284,49 +284,49 @@ export declare const RelationRowSchema: z.ZodEffects<z.ZodObject<{
284
284
  type: z.ZodEnum<["forked-from", "grew-into", "provides", "realizes", "consumes", "field-aligns-with"]>;
285
285
  description: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
286
286
  }, "strict", z.ZodTypeAny, {
287
- to: string;
287
+ revision: "pending" | "revised" | "affirmed";
288
+ type: "forked-from" | "grew-into" | "provides" | "realizes" | "consumes" | "field-aligns-with";
288
289
  statedBy: string;
289
290
  statedAt: string;
290
291
  grounding: string[];
291
- revision: "pending" | "revised" | "affirmed";
292
- type: "forked-from" | "grew-into" | "provides" | "realizes" | "consumes" | "field-aligns-with";
293
292
  from: string;
293
+ to: string;
294
+ description?: string | undefined;
294
295
  revisedBy?: string | undefined;
295
296
  revisedAt?: string | undefined;
296
- description?: string | undefined;
297
297
  }, {
298
- to: string;
298
+ revision: "pending" | "revised" | "affirmed";
299
+ type: "forked-from" | "grew-into" | "provides" | "realizes" | "consumes" | "field-aligns-with";
299
300
  statedBy: string;
300
301
  statedAt: string;
301
302
  grounding: string[];
302
- revision: "pending" | "revised" | "affirmed";
303
- type: "forked-from" | "grew-into" | "provides" | "realizes" | "consumes" | "field-aligns-with";
304
303
  from: string;
304
+ to: string;
305
+ description?: string | undefined;
305
306
  revisedBy?: string | undefined;
306
307
  revisedAt?: string | undefined;
307
- description?: string | undefined;
308
308
  }>, {
309
- to: string;
309
+ revision: "pending" | "revised" | "affirmed";
310
+ type: "forked-from" | "grew-into" | "provides" | "realizes" | "consumes" | "field-aligns-with";
310
311
  statedBy: string;
311
312
  statedAt: string;
312
313
  grounding: string[];
313
- revision: "pending" | "revised" | "affirmed";
314
- type: "forked-from" | "grew-into" | "provides" | "realizes" | "consumes" | "field-aligns-with";
315
314
  from: string;
315
+ to: string;
316
+ description?: string | undefined;
316
317
  revisedBy?: string | undefined;
317
318
  revisedAt?: string | undefined;
318
- description?: string | undefined;
319
319
  }, {
320
- to: string;
320
+ revision: "pending" | "revised" | "affirmed";
321
+ type: "forked-from" | "grew-into" | "provides" | "realizes" | "consumes" | "field-aligns-with";
321
322
  statedBy: string;
322
323
  statedAt: string;
323
324
  grounding: string[];
324
- revision: "pending" | "revised" | "affirmed";
325
- type: "forked-from" | "grew-into" | "provides" | "realizes" | "consumes" | "field-aligns-with";
326
325
  from: string;
326
+ to: string;
327
+ description?: string | undefined;
327
328
  revisedBy?: string | undefined;
328
329
  revisedAt?: string | undefined;
329
- description?: string | undefined;
330
330
  }>;
331
331
  export declare const OwnerRegistrationSchema: z.ZodEffects<z.ZodObject<{
332
332
  owner: z.ZodString;
@@ -373,31 +373,31 @@ export declare const MappingManifestSchema: z.ZodEffects<z.ZodObject<{
373
373
  description: z.ZodOptional<z.ZodString>;
374
374
  }, "strict", z.ZodTypeAny, {
375
375
  owner: string;
376
- hub: string;
377
- schema: "medicine-wheel/repository-mapping";
378
376
  version: 1;
377
+ schema: "medicine-wheel/repository-mapping";
379
378
  kind: "owner" | "meta";
379
+ hub: string;
380
380
  description?: string | undefined;
381
381
  }, {
382
382
  owner: string;
383
- hub: string;
384
- schema: "medicine-wheel/repository-mapping";
385
383
  version: 1;
384
+ schema: "medicine-wheel/repository-mapping";
386
385
  kind: "owner" | "meta";
386
+ hub: string;
387
387
  description?: string | undefined;
388
388
  }>, {
389
389
  owner: string;
390
- hub: string;
391
- schema: "medicine-wheel/repository-mapping";
392
390
  version: 1;
391
+ schema: "medicine-wheel/repository-mapping";
393
392
  kind: "owner" | "meta";
393
+ hub: string;
394
394
  description?: string | undefined;
395
395
  }, {
396
396
  owner: string;
397
- hub: string;
398
- schema: "medicine-wheel/repository-mapping";
399
397
  version: 1;
398
+ schema: "medicine-wheel/repository-mapping";
400
399
  kind: "owner" | "meta";
400
+ hub: string;
401
401
  description?: string | undefined;
402
402
  }>;
403
403
  export type ValidatedActivityReading = z.infer<typeof ActivityReadingSchema>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medicine-wheel/developer-repository-mapping",
3
- "version": "0.27.9",
3
+ "version": "0.27.10",
4
4
  "description": "Repository mapping for the Medicine Wheel Developer Suite — owner hubs of JSONL rows in <owner>/<owner>/.miadi/repository-mapping/, a lifecycle state machine checked against git, a meta mapping that reads other hubs without copying them, the projection into wheel nodes and edges, and the mw-repomap CLI with a small web page",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -54,8 +54,8 @@
54
54
  "node": ">=19"
55
55
  },
56
56
  "dependencies": {
57
- "@medicine-wheel/capabilities": "^0.27.9",
58
- "@medicine-wheel/ontology-core": "^0.27.9",
57
+ "@medicine-wheel/capabilities": "^0.27.10",
58
+ "@medicine-wheel/ontology-core": "^0.27.10",
59
59
  "zod": "^3.23.0"
60
60
  },
61
61
  "devDependencies": {