@medicine-wheel/developer-repository-mapping 0.27.19 → 0.27.21
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 +45 -1
- package/dist/capability-file.d.ts +108 -5
- package/dist/capability-file.d.ts.map +1 -1
- package/dist/capability-file.js +193 -20
- package/dist/capability-file.js.map +1 -1
- package/dist/capability-scan.d.ts +43 -9
- package/dist/capability-scan.d.ts.map +1 -1
- package/dist/capability-scan.js +90 -14
- package/dist/capability-scan.js.map +1 -1
- package/dist/check.d.ts.map +1 -1
- package/dist/check.js +16 -0
- package/dist/check.js.map +1 -1
- package/dist/cli.d.ts +11 -3
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +166 -15
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -2
- package/dist/index.js.map +1 -1
- package/dist/merge.d.ts.map +1 -1
- package/dist/merge.js +9 -0
- package/dist/merge.js.map +1 -1
- package/dist/node/capability-index.d.ts +65 -0
- package/dist/node/capability-index.d.ts.map +1 -0
- package/dist/node/capability-index.js +127 -0
- package/dist/node/capability-index.js.map +1 -0
- package/dist/node/capability-scan.d.ts +28 -2
- package/dist/node/capability-scan.d.ts.map +1 -1
- package/dist/node/capability-scan.js +104 -11
- package/dist/node/capability-scan.js.map +1 -1
- package/dist/node/fs.d.ts +10 -0
- package/dist/node/fs.d.ts.map +1 -1
- package/dist/node/fs.js +28 -0
- package/dist/node/fs.js.map +1 -1
- package/dist/node/index.d.ts +7 -3
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.js +13 -1
- package/dist/node/index.js.map +1 -1
- package/dist/node/skills.d.ts +37 -0
- package/dist/node/skills.d.ts.map +1 -0
- package/dist/node/skills.js +99 -0
- package/dist/node/skills.js.map +1 -0
- package/dist/package-evidence.d.ts +10 -10
- package/dist/read.d.ts.map +1 -1
- package/dist/read.js +7 -0
- package/dist/read.js.map +1 -1
- package/dist/schemas.d.ts +20 -20
- package/dist/types.d.ts +10 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -0
- package/dist/types.js.map +1 -1
- package/package.json +4 -3
- package/schema/repository-capabilities.v5.schema.json +748 -0
- package/skills/capability-hub/SKILL.md +105 -0
- package/skills/capability-mapping/SKILL.md +162 -0
package/README.md
CHANGED
|
@@ -11,6 +11,7 @@ Each owner keeps a folder in the repository named after them:
|
|
|
11
11
|
repositories.jsonl lifecycle, purpose and horizon in ≤ 55 words, fields, prototypes, git reading
|
|
12
12
|
features.jsonl features observed in a repository (a prototype's three core ones)
|
|
13
13
|
capabilities.jsonl platform capabilities (usually in the meta hub)
|
|
14
|
+
provided.jsonl what each repository provides, copied from its own capability file by `capabilities index`
|
|
14
15
|
relations.jsonl forked-from, grew-into, consumes, provides, realizes, field-aligns-with
|
|
15
16
|
owners.jsonl meta hub only: the hubs it reads
|
|
16
17
|
```
|
|
@@ -27,6 +28,20 @@ npm install @medicine-wheel/developer-repository-mapping # for the library
|
|
|
27
28
|
|
|
28
29
|
Node 19 or later. Depends on `@medicine-wheel/ontology-core`, `@medicine-wheel/capabilities` and `zod`.
|
|
29
30
|
|
|
31
|
+
## The skills it ships
|
|
32
|
+
|
|
33
|
+
The method is in the package, as two skills an agent or a person follows. They describe the version installed beside them.
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
mw-repomap --version
|
|
37
|
+
mw-repomap skill list
|
|
38
|
+
mw-repomap skill show capability-mapping # write and keep a repository's own capability file
|
|
39
|
+
mw-repomap skill show capability-hub # keep an owner's hub, and index what its repositories provide
|
|
40
|
+
mw-repomap skill install --all --dir ~/.claude/skills # or any folder an agent loads skills from; default .mw/skills/
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
A skill is a document: nothing runs it. `skill install` leaves a folder that holds a different `SKILL.md` as it is, and `--replace` writes this version over it.
|
|
44
|
+
|
|
30
45
|
## mw-repomap
|
|
31
46
|
|
|
32
47
|
```bash
|
|
@@ -60,6 +75,14 @@ mw-repomap capabilities scan --check # exit 1 when the file is
|
|
|
60
75
|
mw-repomap capabilities map --root ~/repos --out map.jsonl # go through clones and answer one map
|
|
61
76
|
```
|
|
62
77
|
|
|
78
|
+
A repository whose packages sit in folders that no workspace joins, or whose workspace leaves some out, declares them in the file's own header. The root package is always read. A scan that sees a `package.json` it did not read says so, with this command:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
mw-repomap capabilities scan --write --package-folders cli,server,tools/* # dir, or dir/* for each folder under it; "." removes the list
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
A `SKILL.md` inside a package's folder that the package's `files` list ships names that package, and is read at the package's stage until someone states its own.
|
|
85
|
+
|
|
63
86
|
A skill or a decision defined in code rather than in a file of its own is read by a reader written for that repository and that file (`CODE_READERS`): the medicine wheel's `cli/skills.ts`, and Miadi's `packages/connector/src/claude-models.ts`, the decision of which model a mission runs on (`miadi-capability://jgwill/Miadi/decision/miadi.claude_model_routing`). A decision is one row per decision, named and stated by its file.
|
|
64
87
|
|
|
65
88
|
A rescan keeps what a person wrote and leaves the file alone when nothing changed. Versions come from each `package.json` at the commit read, so a release does not touch the file. A reader skips what a newer format adds and reads the rest; it never reads a row the commit does not provide. A fork keeps the file's repository until `--repository` adopts it. If the repository ignores `*.jsonl`, add `!.miadi/capabilities.jsonl` after that rule.
|
|
@@ -73,6 +96,17 @@ mw-repomap capabilities state app/acme-review --path apps/review --stage prototy
|
|
|
73
96
|
--change "A v0 prompt in apps/prompts/." --hosting-grounding apps/AGENTS.md --episode miadi-chronicle://340 --by Ava # an application, where it runs and how a change reaches it
|
|
74
97
|
```
|
|
75
98
|
|
|
99
|
+
The commands of a command line, capabilities still being built, and who reads a capability (format version 5):
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
mw-repomap capabilities state command/tool/deploy "Deploys the build to a named target. --dry-run prints the plan." --path src/commands/deploy.ts --by Ava # a command, by the file that defines it
|
|
103
|
+
mw-repomap capabilities state command/tool/route "Asks which team carries each step." --stage implementation --stage-grounding acme/tool#97 --by Ava # being built in a pull request
|
|
104
|
+
mw-repomap capabilities state cli/tool --consumer miadi-capability://acme/site/package/@acme/reader,https://site.example.org/runs \
|
|
105
|
+
--reads "Reads the folders a run writes." --by Ava # who reads it, where no package.json says so
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
A command is a capability of its own, kind `command`, named `<cli>/<command>`. It names its CLI in `cli`, and the CLI's row lists the commands the commit carries in `commands`. It is enrolled by naming its file, and every scan confirms that file and that CLI in the commit it reads. A row the commit does not provide is read at `specified` or `retired`, or at `prototype` or `implementation` when its stage is grounded in an issue or a pull request (`owner/repo#n`) or a branch (`owner/repo@<branch>`). `capabilities map --json` answers the consumers a file names as `consumedBy`, beside the dependency edges.
|
|
109
|
+
|
|
76
110
|
An application (`app`) is never guessed: a person names its folder with `--path`, and the scan reads the `package.json` there at every commit while its name is the app's. `hosting` says where a capability runs, who deploys it, where its code is written when not in this repository (`authoredIn`: the copy here is replaced at the next import) and how a change reaches it; `episodes` names the chronicle episodes that hold it. `capabilities show` prints both.
|
|
77
111
|
|
|
78
112
|
Name a plugin's folder to include it in the inventory. The scanner reads its install manifest and component files from the selected commit. Claude plugin skills retain their existing capability addresses. Agents, commands, hook events and MCP servers have names scoped to their plugin, such as `agent/example/assistant-editor`. A plugin lists its components, and each discovered component names the plugin that carries it.
|
|
@@ -87,7 +121,17 @@ git add .miadi/capabilities.jsonl
|
|
|
87
121
|
|
|
88
122
|
`--system` accepts a comma-separated list of RISE system addresses on any capability. A revision may be appended with `@<commit>`. Use `--component` to associate additional capability addresses from the same repository with a plugin. `capabilities show` reads the committed inventory and prints the specification, system and component links.
|
|
89
123
|
|
|
90
|
-
The JSON Schema of a line ships at `schema/repository-capabilities.
|
|
124
|
+
The JSON Schema of a line ships at `schema/repository-capabilities.v5.schema.json`. Version 5 adds the commands of a CLI, consumers and the header's package folders. Version 4 adds plugins, components and systems. Version 3 adds apps, hosting and episodes. Version 2 adds achieves, stage, specifications and issues. Files are written at the lowest version their rows need, and the previous schemas stay published. The format and its rules are in `rispecs/developer-suite/repository-mapping/capabilities.spec.md` of jgwill/medicine-wheel.
|
|
125
|
+
|
|
126
|
+
### A hub's index of what its repositories provide
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
mw-repomap capabilities index <hub> <clone>... --write # or --root <folder of clones>, or --list <file>
|
|
130
|
+
mw-repomap capabilities index <hub> <clone>... --check # exit 1 when the index is behind
|
|
131
|
+
mw-repomap show <owner>/<name> <hub> # what it is, and what it provides
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
`index` copies into the hub's `provided.jsonl` what each repository says it provides. It writes rows only for repositories the hub lists, and only from a repository's own committed capability file, so a public hub never receives anything of a repository it does not name. Rows of repositories not read this time stay. `validate` refuses a row of a repository the hub does not list.
|
|
91
135
|
|
|
92
136
|
### Follow designs and inspect package evidence
|
|
93
137
|
|
|
@@ -29,28 +29,40 @@ export declare const SCAN_AUTHOR = "mw-repomap scan";
|
|
|
29
29
|
* 3 adds the `app` kind, where a capability is hosted and the episodes that
|
|
30
30
|
* hold it (jgwill/medicine-wheel#177). Version 4 adds plugins, their
|
|
31
31
|
* components and links from capabilities to Stateloom systems (#181).
|
|
32
|
+
* Version 5 adds the commands of a CLI, what reads a capability elsewhere
|
|
33
|
+
* (#188), and the package folders a repository declares in the header (#185).
|
|
32
34
|
* A file is written at the lowest version its rows need.
|
|
33
35
|
*/
|
|
34
|
-
export declare const CAPABILITY_FILE_VERSION =
|
|
36
|
+
export declare const CAPABILITY_FILE_VERSION = 5;
|
|
35
37
|
/**
|
|
36
38
|
* `owner/name` as the reference grammar reads it in an address
|
|
37
39
|
* (`miadi-capability://<owner>/<repo>/…`): letters, digits, `.`, `_` and `-`,
|
|
38
40
|
* starting with a letter or a digit, the name not ending in `.git`.
|
|
39
41
|
*/
|
|
40
42
|
export declare const REPOSITORY_NAME: RegExp;
|
|
43
|
+
/** A package folder a repository declares: `dir`, or `dir/*` for each folder under it. Never the root, which is always read. */
|
|
44
|
+
export declare const PackageFolderSchema: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>, string, string>;
|
|
41
45
|
export declare const CapabilityFileHeaderSchema: z.ZodObject<{
|
|
42
46
|
schema: z.ZodLiteral<"medicine-wheel/repository-capabilities">;
|
|
43
47
|
version: z.ZodNumber;
|
|
44
48
|
/** `owner/name`, as the repository was known when the file was written. */
|
|
45
49
|
repository: z.ZodString;
|
|
50
|
+
/**
|
|
51
|
+
* Version 5. The folders whose package.json the scan reads beside what a
|
|
52
|
+
* package manager's workspace declares: for packages no workspace joins
|
|
53
|
+
* (jgwill/medicine-wheel#185). Written by `capabilities scan --package-folders`.
|
|
54
|
+
*/
|
|
55
|
+
packages: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>, string, string>, "many">, string[], string[]>>;
|
|
46
56
|
}, "strict", z.ZodTypeAny, {
|
|
47
57
|
version: number;
|
|
48
58
|
schema: "medicine-wheel/repository-capabilities";
|
|
49
59
|
repository: string;
|
|
60
|
+
packages?: string[] | undefined;
|
|
50
61
|
}, {
|
|
51
62
|
version: number;
|
|
52
63
|
schema: "medicine-wheel/repository-capabilities";
|
|
53
64
|
repository: string;
|
|
65
|
+
packages?: string[] | undefined;
|
|
54
66
|
}>;
|
|
55
67
|
export type CapabilityFileHeader = z.infer<typeof CapabilityFileHeaderSchema>;
|
|
56
68
|
/** A name the registry can give an id to: printable, at most 214 characters, with a letter or a digit. */
|
|
@@ -68,12 +80,29 @@ export declare const CAPABILITY_FILE_V3_KINDS: readonly CapabilityKind[];
|
|
|
68
80
|
/** The fields and kinds that require version 4. */
|
|
69
81
|
export declare const CAPABILITY_FILE_V4_KEYS: readonly string[];
|
|
70
82
|
export declare const CAPABILITY_FILE_V4_KINDS: readonly CapabilityKind[];
|
|
83
|
+
/**
|
|
84
|
+
* The keys version 5 added to a row. A file holding one of them, or a header
|
|
85
|
+
* that declares package folders, is written as version 5. Each is a new key,
|
|
86
|
+
* so a reader of version 4 skips it with a warning and still reads the row.
|
|
87
|
+
*/
|
|
88
|
+
export declare const CAPABILITY_FILE_V5_KEYS: readonly string[];
|
|
71
89
|
/** The package.json an `app` row is read from: the first of its files that is one. Undefined for any other kind. */
|
|
72
90
|
export declare function appManifestOf(row: Pick<CapabilityFileRow, 'kind' | 'grounding'>): string | undefined;
|
|
73
91
|
/** The package.json of an app folder, `.` the repository's root. Undefined for a folder outside the repository. */
|
|
74
92
|
export declare function appManifestIn(folder: string): string | undefined;
|
|
75
93
|
/** A row whose stage says no code is expected to provide it: not yet, or no longer. */
|
|
76
94
|
export declare function stagedWithoutCode(row: Pick<CapabilityFileRow, 'stage'>): boolean;
|
|
95
|
+
/**
|
|
96
|
+
* A row being built somewhere other than the commit read: at stage
|
|
97
|
+
* `prototype` or `implementation`, its stage grounded in an issue or a pull
|
|
98
|
+
* request (`owner/repo#n`) or a branch (`owner/repo@<branch>`). A reader keeps
|
|
99
|
+
* it at that stage, because its grounding says where the code is.
|
|
100
|
+
*/
|
|
101
|
+
export declare function builtElsewhere(row: Pick<CapabilityFileRow, 'stage'>): boolean;
|
|
102
|
+
/** The file of a command a person names, as the repository holds it. Undefined for a path outside the repository. */
|
|
103
|
+
export declare function commandFileIn(file: string): string | undefined;
|
|
104
|
+
/** The CLI a command's name says it belongs to: the first segment of `<cli>/<command>`. Undefined for a name of one segment. */
|
|
105
|
+
export declare function commandCliName(name: string): string | undefined;
|
|
77
106
|
/** The keys a row of this version holds. */
|
|
78
107
|
export declare const CAPABILITY_FILE_ROW_KEYS: readonly string[];
|
|
79
108
|
export declare const CapabilityFileRowSchema: z.ZodEffects<z.ZodObject<{
|
|
@@ -89,7 +118,7 @@ export declare const CapabilityFileRowSchema: z.ZodEffects<z.ZodObject<{
|
|
|
89
118
|
address: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
90
119
|
statement: z.ZodOptional<z.ZodIntersection<z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>>;
|
|
91
120
|
status: z.ZodEnum<["clear", "unclear", "undefinable", "needs-resolution"]>;
|
|
92
|
-
/** For a CLI
|
|
121
|
+
/** For a CLI, or a skill a package's `files` ship: that package. A row with no stage of its own is read at its package's. */
|
|
93
122
|
package: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
94
123
|
/**
|
|
95
124
|
* The platform capabilities this one serves (`capability:<slug>`, capabilities.spec.md):
|
|
@@ -179,6 +208,40 @@ export declare const CapabilityFileRowSchema: z.ZodEffects<z.ZodObject<{
|
|
|
179
208
|
declaredComponents: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
|
|
180
209
|
/** Version 4. The plugin that carries this component. */
|
|
181
210
|
plugin: z.ZodOptional<z.ZodString>;
|
|
211
|
+
/** Version 5. For a command of a CLI: that CLI's address. */
|
|
212
|
+
cli: z.ZodOptional<z.ZodString>;
|
|
213
|
+
/** Version 5. For a CLI: the commands this commit carries, as the scan confirmed them. */
|
|
214
|
+
commands: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
|
|
215
|
+
/**
|
|
216
|
+
* Version 5. What reads this capability, in this repository or another, where no
|
|
217
|
+
* package.json says so: said by a person or an agent, never by the scan.
|
|
218
|
+
*/
|
|
219
|
+
consumers: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodObject<{
|
|
220
|
+
consumer: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>;
|
|
221
|
+
reads: z.ZodOptional<z.ZodIntersection<z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>>;
|
|
222
|
+
statedBy: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>;
|
|
223
|
+
statedAt: z.ZodEffects<z.ZodString, string, string>;
|
|
224
|
+
}, "strict", z.ZodTypeAny, {
|
|
225
|
+
statedBy: string;
|
|
226
|
+
statedAt: string;
|
|
227
|
+
consumer: string;
|
|
228
|
+
reads?: string | undefined;
|
|
229
|
+
}, {
|
|
230
|
+
statedBy: string;
|
|
231
|
+
statedAt: string;
|
|
232
|
+
consumer: string;
|
|
233
|
+
reads?: string | undefined;
|
|
234
|
+
}>, "many">, {
|
|
235
|
+
statedBy: string;
|
|
236
|
+
statedAt: string;
|
|
237
|
+
consumer: string;
|
|
238
|
+
reads?: string | undefined;
|
|
239
|
+
}[], {
|
|
240
|
+
statedBy: string;
|
|
241
|
+
statedAt: string;
|
|
242
|
+
consumer: string;
|
|
243
|
+
reads?: string | undefined;
|
|
244
|
+
}[]>>;
|
|
182
245
|
}, "strict", z.ZodTypeAny, {
|
|
183
246
|
name: string;
|
|
184
247
|
revision: "pending" | "revised" | "affirmed";
|
|
@@ -194,9 +257,11 @@ export declare const CapabilityFileRowSchema: z.ZodEffects<z.ZodObject<{
|
|
|
194
257
|
statedAt: string;
|
|
195
258
|
}[] | undefined;
|
|
196
259
|
package?: string | undefined;
|
|
260
|
+
cli?: string | undefined;
|
|
197
261
|
plugin?: string | undefined;
|
|
198
262
|
statement?: string | undefined;
|
|
199
263
|
components?: string[] | undefined;
|
|
264
|
+
commands?: string[] | undefined;
|
|
200
265
|
issues?: string[] | undefined;
|
|
201
266
|
achieves?: {
|
|
202
267
|
statement: string;
|
|
@@ -222,6 +287,12 @@ export declare const CapabilityFileRowSchema: z.ZodEffects<z.ZodObject<{
|
|
|
222
287
|
episodes?: string[] | undefined;
|
|
223
288
|
systems?: string[] | undefined;
|
|
224
289
|
declaredComponents?: string[] | undefined;
|
|
290
|
+
consumers?: {
|
|
291
|
+
statedBy: string;
|
|
292
|
+
statedAt: string;
|
|
293
|
+
consumer: string;
|
|
294
|
+
reads?: string | undefined;
|
|
295
|
+
}[] | undefined;
|
|
225
296
|
revisedBy?: string | undefined;
|
|
226
297
|
revisedAt?: string | undefined;
|
|
227
298
|
}, {
|
|
@@ -239,9 +310,11 @@ export declare const CapabilityFileRowSchema: z.ZodEffects<z.ZodObject<{
|
|
|
239
310
|
statedAt: string;
|
|
240
311
|
}[] | undefined;
|
|
241
312
|
package?: string | undefined;
|
|
313
|
+
cli?: string | undefined;
|
|
242
314
|
plugin?: string | undefined;
|
|
243
315
|
statement?: string | undefined;
|
|
244
316
|
components?: string[] | undefined;
|
|
317
|
+
commands?: string[] | undefined;
|
|
245
318
|
issues?: string[] | undefined;
|
|
246
319
|
achieves?: {
|
|
247
320
|
statement: string;
|
|
@@ -267,6 +340,12 @@ export declare const CapabilityFileRowSchema: z.ZodEffects<z.ZodObject<{
|
|
|
267
340
|
episodes?: string[] | undefined;
|
|
268
341
|
systems?: string[] | undefined;
|
|
269
342
|
declaredComponents?: string[] | undefined;
|
|
343
|
+
consumers?: {
|
|
344
|
+
statedBy: string;
|
|
345
|
+
statedAt: string;
|
|
346
|
+
consumer: string;
|
|
347
|
+
reads?: string | undefined;
|
|
348
|
+
}[] | undefined;
|
|
270
349
|
revisedBy?: string | undefined;
|
|
271
350
|
revisedAt?: string | undefined;
|
|
272
351
|
}>, {
|
|
@@ -284,9 +363,11 @@ export declare const CapabilityFileRowSchema: z.ZodEffects<z.ZodObject<{
|
|
|
284
363
|
statedAt: string;
|
|
285
364
|
}[] | undefined;
|
|
286
365
|
package?: string | undefined;
|
|
366
|
+
cli?: string | undefined;
|
|
287
367
|
plugin?: string | undefined;
|
|
288
368
|
statement?: string | undefined;
|
|
289
369
|
components?: string[] | undefined;
|
|
370
|
+
commands?: string[] | undefined;
|
|
290
371
|
issues?: string[] | undefined;
|
|
291
372
|
achieves?: {
|
|
292
373
|
statement: string;
|
|
@@ -312,6 +393,12 @@ export declare const CapabilityFileRowSchema: z.ZodEffects<z.ZodObject<{
|
|
|
312
393
|
episodes?: string[] | undefined;
|
|
313
394
|
systems?: string[] | undefined;
|
|
314
395
|
declaredComponents?: string[] | undefined;
|
|
396
|
+
consumers?: {
|
|
397
|
+
statedBy: string;
|
|
398
|
+
statedAt: string;
|
|
399
|
+
consumer: string;
|
|
400
|
+
reads?: string | undefined;
|
|
401
|
+
}[] | undefined;
|
|
315
402
|
revisedBy?: string | undefined;
|
|
316
403
|
revisedAt?: string | undefined;
|
|
317
404
|
}, {
|
|
@@ -329,9 +416,11 @@ export declare const CapabilityFileRowSchema: z.ZodEffects<z.ZodObject<{
|
|
|
329
416
|
statedAt: string;
|
|
330
417
|
}[] | undefined;
|
|
331
418
|
package?: string | undefined;
|
|
419
|
+
cli?: string | undefined;
|
|
332
420
|
plugin?: string | undefined;
|
|
333
421
|
statement?: string | undefined;
|
|
334
422
|
components?: string[] | undefined;
|
|
423
|
+
commands?: string[] | undefined;
|
|
335
424
|
issues?: string[] | undefined;
|
|
336
425
|
achieves?: {
|
|
337
426
|
statement: string;
|
|
@@ -357,6 +446,12 @@ export declare const CapabilityFileRowSchema: z.ZodEffects<z.ZodObject<{
|
|
|
357
446
|
episodes?: string[] | undefined;
|
|
358
447
|
systems?: string[] | undefined;
|
|
359
448
|
declaredComponents?: string[] | undefined;
|
|
449
|
+
consumers?: {
|
|
450
|
+
statedBy: string;
|
|
451
|
+
statedAt: string;
|
|
452
|
+
consumer: string;
|
|
453
|
+
reads?: string | undefined;
|
|
454
|
+
}[] | undefined;
|
|
360
455
|
revisedBy?: string | undefined;
|
|
361
456
|
revisedAt?: string | undefined;
|
|
362
457
|
}>;
|
|
@@ -378,7 +473,9 @@ export interface ParseCapabilityFileOptions {
|
|
|
378
473
|
/** Read the file. Never throws: a bad line is an issue, and the good lines around it are still read. */
|
|
379
474
|
export declare function parseCapabilityFile(text: string, options?: ParseCapabilityFileOptions): ParsedCapabilityFile;
|
|
380
475
|
/** The file's text: the header, then one row per line in a fixed order, so a diff shows only what changed. */
|
|
381
|
-
export declare function renderCapabilityFile(repository: string, rows: readonly CapabilityFileRow[]
|
|
476
|
+
export declare function renderCapabilityFile(repository: string, rows: readonly CapabilityFileRow[], options?: {
|
|
477
|
+
packages?: readonly string[];
|
|
478
|
+
}): string;
|
|
382
479
|
/** The rows a scan's artefacts make: one per capability, the files that say so as grounding. */
|
|
383
480
|
export declare function capabilityFileRows(artefacts: readonly Artefact[], ctx: {
|
|
384
481
|
repository: string;
|
|
@@ -434,10 +531,14 @@ export interface CapabilityStatementInput {
|
|
|
434
531
|
specifications?: string[];
|
|
435
532
|
/** Issues to add, `owner/repo#n`. */
|
|
436
533
|
issues?: string[];
|
|
437
|
-
/** For an app or plugin: its folder in the repository, `.` the root. */
|
|
534
|
+
/** For an app or plugin: its folder in the repository, `.` the root. For a command of a CLI: the file that defines it. */
|
|
438
535
|
path?: string;
|
|
439
536
|
/** The plugin manifest the repository reader verified in `path`. */
|
|
440
537
|
pluginManifest?: string;
|
|
538
|
+
/** What reads it: capability addresses or `https://` URLs. Each one named again replaces what was said of it before. */
|
|
539
|
+
consumers?: string[];
|
|
540
|
+
/** What the consumers given with it read, at most 55 words. */
|
|
541
|
+
reads?: string;
|
|
441
542
|
/** Where it is hosted, said by `by` at `at`. Replaces the hosting held before. */
|
|
442
543
|
hosting?: {
|
|
443
544
|
urls?: string[];
|
|
@@ -455,7 +556,9 @@ export interface CapabilityStatementInput {
|
|
|
455
556
|
/**
|
|
456
557
|
* The file's repository, `owner/name`. With it, a capability the file does not
|
|
457
558
|
* hold yet is added when it is stated at stage `specified`: a capability can be
|
|
458
|
-
* written down before any code provides it.
|
|
559
|
+
* written down before any code provides it. One being built elsewhere is added
|
|
560
|
+
* at `prototype` or `implementation`, its stage grounded in an issue, a pull
|
|
561
|
+
* request or a branch.
|
|
459
562
|
*/
|
|
460
563
|
repository?: string;
|
|
461
564
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capability-file.d.ts","sourceRoot":"","sources":["../src/capability-file.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,
|
|
1
|
+
{"version":3,"file":"capability-file.d.ts","sourceRoot":"","sources":["../src/capability-file.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAwBL,KAAK,eAAe,EAEpB,KAAK,eAAe,EACrB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAQL,KAAK,QAAQ,EACb,KAAK,cAAc,EACpB,MAAM,mBAAmB,CAAC;AAE3B,yDAAyD;AACzD,eAAO,MAAM,eAAe,8BAA8B,CAAC;AAC3D,eAAO,MAAM,sBAAsB,2CAA2C,CAAC;AAC/E,sGAAsG;AACtG,eAAO,MAAM,WAAW,oBAAoB,CAAC;AAE7C;;;;;;;;;GASG;AACH,eAAO,MAAM,uBAAuB,IAAI,CAAC;AAEzC;;;;GAIG;AACH,eAAO,MAAM,eAAe,QAAsF,CAAC;AAmBnH,gIAAgI;AAChI,eAAO,MAAM,mBAAmB,qIAE2G,CAAC;AAE5I,eAAO,MAAM,0BAA0B;;;IAInC,2EAA2E;;IAE3E;;;;OAIG;;;;;;;;;;;;EAQI,CAAC;AACZ,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,0GAA0G;AAC1G,eAAO,MAAM,oBAAoB,uGAAsG,CAAC;AAKxI,gHAAgH;AAChH,eAAO,MAAM,yBAAyB,uGAGrC,CAAC;AAEF,6GAA6G;AAC7G,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,CAGtF;AAED,iIAAiI;AACjI,eAAO,MAAM,uBAA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