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

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/schemas.d.ts CHANGED
@@ -98,16 +98,18 @@ export declare const RepositoryFacetSchema: z.ZodEffects<z.ZodObject<{
98
98
  head?: string | undefined;
99
99
  }>>;
100
100
  }, "strict", z.ZodTypeAny, {
101
+ revision: "pending" | "revised" | "affirmed";
102
+ status: "clear" | "unclear" | "undefinable" | "needs-resolution";
103
+ statedBy: string;
104
+ statedAt: string;
105
+ grounding: string[];
101
106
  nodeId: string;
102
107
  lifecycle: "unclassified" | "prototype" | "implementation" | "maintained" | "archived";
103
108
  origin: "own" | "agent" | "community-fork";
104
- status: "clear" | "unclear" | "undefinable" | "needs-resolution";
105
109
  fields: string[];
106
110
  prototypes: string[];
107
- statedBy: string;
108
- statedAt: string;
109
- grounding: string[];
110
- revision: "pending" | "revised" | "affirmed";
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
+ revision: "pending" | "revised" | "affirmed";
129
+ status: "clear" | "unclear" | "undefinable" | "needs-resolution";
130
+ statedBy: string;
131
+ statedAt: string;
132
+ grounding: string[];
128
133
  nodeId: string;
129
134
  lifecycle: "unclassified" | "prototype" | "implementation" | "maintained" | "archived";
130
135
  origin: "own" | "agent" | "community-fork";
131
- status: "clear" | "unclear" | "undefinable" | "needs-resolution";
132
136
  fields: string[];
133
137
  prototypes: string[];
134
- statedBy: string;
135
- statedAt: string;
136
- grounding: string[];
137
- revision: "pending" | "revised" | "affirmed";
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
+ revision: "pending" | "revised" | "affirmed";
156
+ status: "clear" | "unclear" | "undefinable" | "needs-resolution";
157
+ statedBy: string;
158
+ statedAt: string;
159
+ grounding: string[];
155
160
  nodeId: string;
156
161
  lifecycle: "unclassified" | "prototype" | "implementation" | "maintained" | "archived";
157
162
  origin: "own" | "agent" | "community-fork";
158
- status: "clear" | "unclear" | "undefinable" | "needs-resolution";
159
163
  fields: string[];
160
164
  prototypes: string[];
161
- statedBy: string;
162
- statedAt: string;
163
- grounding: string[];
164
- revision: "pending" | "revised" | "affirmed";
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
+ revision: "pending" | "revised" | "affirmed";
183
+ status: "clear" | "unclear" | "undefinable" | "needs-resolution";
184
+ statedBy: string;
185
+ statedAt: string;
186
+ grounding: string[];
182
187
  nodeId: string;
183
188
  lifecycle: "unclassified" | "prototype" | "implementation" | "maintained" | "archived";
184
189
  origin: "own" | "agent" | "community-fork";
185
- status: "clear" | "unclear" | "undefinable" | "needs-resolution";
186
190
  fields: string[];
187
191
  prototypes: string[];
188
- statedBy: string;
189
- statedAt: string;
190
- grounding: string[];
191
- revision: "pending" | "revised" | "affirmed";
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;
@@ -220,57 +220,57 @@ export declare const FeatureFacetSchema: z.ZodEffects<z.ZodObject<{
220
220
  status: z.ZodEnum<["clear", "unclear", "undefinable", "needs-resolution"]>;
221
221
  realizes: z.ZodOptional<z.ZodString>;
222
222
  }, "strict", z.ZodTypeAny, {
223
- nodeId: string;
224
- repository: string;
223
+ name: string;
224
+ revision: "pending" | "revised" | "affirmed";
225
225
  status: "clear" | "unclear" | "undefinable" | "needs-resolution";
226
+ repository: string;
226
227
  statedBy: string;
227
228
  statedAt: string;
228
229
  grounding: string[];
229
- revision: "pending" | "revised" | "affirmed";
230
- name: string;
230
+ nodeId: 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
- nodeId: string;
237
- repository: string;
236
+ name: string;
237
+ revision: "pending" | "revised" | "affirmed";
238
238
  status: "clear" | "unclear" | "undefinable" | "needs-resolution";
239
+ repository: string;
239
240
  statedBy: string;
240
241
  statedAt: string;
241
242
  grounding: string[];
242
- revision: "pending" | "revised" | "affirmed";
243
- name: string;
243
+ nodeId: 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
- nodeId: string;
250
- repository: string;
249
+ name: string;
250
+ revision: "pending" | "revised" | "affirmed";
251
251
  status: "clear" | "unclear" | "undefinable" | "needs-resolution";
252
+ repository: string;
252
253
  statedBy: string;
253
254
  statedAt: string;
254
255
  grounding: string[];
255
- revision: "pending" | "revised" | "affirmed";
256
- name: string;
256
+ nodeId: 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
- nodeId: string;
263
- repository: string;
262
+ name: string;
263
+ revision: "pending" | "revised" | "affirmed";
264
264
  status: "clear" | "unclear" | "undefinable" | "needs-resolution";
265
+ repository: string;
265
266
  statedBy: string;
266
267
  statedAt: string;
267
268
  grounding: string[];
268
- revision: "pending" | "revised" | "affirmed";
269
- name: string;
269
+ nodeId: 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.11",
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",
@@ -24,6 +24,7 @@
24
24
  "sideEffects": false,
25
25
  "files": [
26
26
  "dist",
27
+ "schema",
27
28
  "README.md"
28
29
  ],
29
30
  "scripts": {
@@ -54,8 +55,8 @@
54
55
  "node": ">=19"
55
56
  },
56
57
  "dependencies": {
57
- "@medicine-wheel/capabilities": "^0.27.9",
58
- "@medicine-wheel/ontology-core": "^0.27.9",
58
+ "@medicine-wheel/capabilities": "^0.27.11",
59
+ "@medicine-wheel/ontology-core": "^0.27.11",
59
60
  "zod": "^3.23.0"
60
61
  },
61
62
  "devDependencies": {
@@ -0,0 +1,233 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://unpkg.com/@medicine-wheel/developer-repository-mapping/schema/repository-capabilities.v1.schema.json",
4
+ "title": "A repository's own capability file, .miadi/capabilities.jsonl, format version 1",
5
+ "description": "One JSON value per line (JSON Lines). The first line is the header; every other line is one capability the repository provides. This schema validates one line. A reader of version 1 reads a file of a later version and skips what it does not know; a writer of version 1 refuses to rewrite it. The rule a statement keeps, at most 55 words, is checked by @medicine-wheel/capabilities, not here. Spec: rispecs/developer-suite/repository-mapping/capabilities.spec.md in jgwill/medicine-wheel.",
6
+ "oneOf": [
7
+ {
8
+ "$ref": "#/$defs/header"
9
+ },
10
+ {
11
+ "$ref": "#/$defs/row"
12
+ }
13
+ ],
14
+ "$defs": {
15
+ "printable": {
16
+ "type": "string",
17
+ "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]*$"
18
+ },
19
+ "timestamp": {
20
+ "type": "string",
21
+ "format": "date-time"
22
+ },
23
+ "header": {
24
+ "type": "object",
25
+ "additionalProperties": false,
26
+ "required": [
27
+ "schema",
28
+ "version",
29
+ "repository"
30
+ ],
31
+ "properties": {
32
+ "schema": {
33
+ "const": "medicine-wheel/repository-capabilities"
34
+ },
35
+ "version": {
36
+ "type": "integer",
37
+ "minimum": 1,
38
+ "description": "1 for this schema. A reader of version 1 reads a higher one and skips what it does not know."
39
+ },
40
+ "repository": {
41
+ "type": "string",
42
+ "minLength": 1,
43
+ "maxLength": 200,
44
+ "description": "owner/name, as the repository was known when the file was written. A fork keeps it until someone adopts the file with --repository."
45
+ }
46
+ }
47
+ },
48
+ "row": {
49
+ "type": "object",
50
+ "additionalProperties": false,
51
+ "required": [
52
+ "kind",
53
+ "name",
54
+ "address",
55
+ "status",
56
+ "statedBy",
57
+ "statedAt",
58
+ "grounding",
59
+ "revision"
60
+ ],
61
+ "properties": {
62
+ "kind": {
63
+ "enum": [
64
+ "package",
65
+ "cli",
66
+ "skill"
67
+ ]
68
+ },
69
+ "name": {
70
+ "allOf": [
71
+ {
72
+ "$ref": "#/$defs/printable"
73
+ },
74
+ {
75
+ "minLength": 1,
76
+ "maxLength": 214,
77
+ "pattern": "[A-Za-z0-9]"
78
+ }
79
+ ]
80
+ },
81
+ "address": {
82
+ "allOf": [
83
+ {
84
+ "$ref": "#/$defs/printable"
85
+ },
86
+ {
87
+ "maxLength": 600
88
+ }
89
+ ],
90
+ "description": "miadi-capability://<header repository>/<kind>/<name>. A reader computes it and warns when a row says otherwise."
91
+ },
92
+ "statement": {
93
+ "allOf": [
94
+ {
95
+ "$ref": "#/$defs/printable"
96
+ },
97
+ {
98
+ "minLength": 1,
99
+ "maxLength": 1200
100
+ }
101
+ ],
102
+ "description": "What the files, or a person, say it is: at most 55 words."
103
+ },
104
+ "status": {
105
+ "enum": [
106
+ "clear",
107
+ "unclear",
108
+ "needs-resolution",
109
+ "undefinable"
110
+ ]
111
+ },
112
+ "package": {
113
+ "allOf": [
114
+ {
115
+ "$ref": "#/$defs/printable"
116
+ },
117
+ {
118
+ "minLength": 1,
119
+ "maxLength": 214
120
+ }
121
+ ],
122
+ "description": "For a CLI: the package that ships it."
123
+ },
124
+ "realizes": {
125
+ "type": "array",
126
+ "minItems": 1,
127
+ "maxItems": 32,
128
+ "items": {
129
+ "type": "object",
130
+ "additionalProperties": false,
131
+ "required": [
132
+ "capability",
133
+ "statedBy",
134
+ "statedAt"
135
+ ],
136
+ "properties": {
137
+ "capability": {
138
+ "type": "string",
139
+ "pattern": "^capability:[a-z0-9]+(?:-[a-z0-9]+)*$"
140
+ },
141
+ "statedBy": {
142
+ "allOf": [
143
+ {
144
+ "$ref": "#/$defs/printable"
145
+ },
146
+ {
147
+ "minLength": 1,
148
+ "maxLength": 200,
149
+ "not": {
150
+ "const": "mw-repomap scan"
151
+ }
152
+ }
153
+ ]
154
+ },
155
+ "statedAt": {
156
+ "$ref": "#/$defs/timestamp"
157
+ }
158
+ }
159
+ },
160
+ "description": "The platform capabilities this one serves (capabilities.spec.md), each with who said so and when. Said by a person or an agent, never by the scan, and kept by every rescan."
161
+ },
162
+ "statedBy": {
163
+ "type": "string",
164
+ "minLength": 1,
165
+ "description": "\"mw-repomap scan\" for a row the scan wrote; any other name is a person's, and a rescan keeps its words."
166
+ },
167
+ "statedAt": {
168
+ "$ref": "#/$defs/timestamp"
169
+ },
170
+ "grounding": {
171
+ "type": "array",
172
+ "minItems": 1,
173
+ "items": {
174
+ "type": "string",
175
+ "minLength": 1
176
+ },
177
+ "description": "The files that say so, relative to the repository. A reader adds the commit it read: owner/name@commit:path."
178
+ },
179
+ "revision": {
180
+ "enum": [
181
+ "pending",
182
+ "revised",
183
+ "affirmed"
184
+ ]
185
+ },
186
+ "revisedBy": {
187
+ "type": "string",
188
+ "minLength": 1
189
+ },
190
+ "revisedAt": {
191
+ "$ref": "#/$defs/timestamp"
192
+ }
193
+ },
194
+ "allOf": [
195
+ {
196
+ "if": {
197
+ "properties": {
198
+ "status": {
199
+ "enum": [
200
+ "clear",
201
+ "unclear"
202
+ ]
203
+ }
204
+ }
205
+ },
206
+ "then": {
207
+ "required": [
208
+ "statement"
209
+ ]
210
+ }
211
+ },
212
+ {
213
+ "if": {
214
+ "properties": {
215
+ "revision": {
216
+ "enum": [
217
+ "revised",
218
+ "affirmed"
219
+ ]
220
+ }
221
+ }
222
+ },
223
+ "then": {
224
+ "required": [
225
+ "revisedBy",
226
+ "revisedAt"
227
+ ]
228
+ }
229
+ }
230
+ ]
231
+ }
232
+ }
233
+ }