@miadi/relational-git-repository-mapper 0.6.0 → 0.6.1
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/index.d.ts +1 -1
- package/dist/join.d.ts +7 -3
- package/dist/join.js +9 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -126,7 +126,8 @@ and its files. It never fetches: a clone that does not hold the commit, or whose
|
|
|
126
126
|
another repository, is refused (`CommitReadError`). `changedCapabilities` is the pure half.
|
|
127
127
|
|
|
128
128
|
A record's `capabilities[]` is read back: `capabilitySessions(address, records)` lists the
|
|
129
|
-
sessions whose record names a capability,
|
|
129
|
+
sessions whose record names a capability, each with every entry its record holds for it
|
|
130
|
+
(`entries`: relation, version, evidence, in the record's order), and `findCapability(parts, { sessions: true })`
|
|
130
131
|
carries them. The app's `/api/repositories/capability` answers them to the write tier only.
|
|
131
132
|
|
|
132
133
|
## Where a repository lives
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type { RepositorySession, MappingState, HubState, RepositoryView, RepositorySummary, InventoryState, RepositoryListing, } from "./types";
|
|
2
|
-
export { dayOf, teamOf, dispositionOf, sessionOf, repositoryKey, parseTraceRef, repositoriesOfRecord, capabilityKey, capabilitySessions, type CapabilitySession, sessionsByRepository, repositoryView, listRepositories, type SessionsByRepository, } from "./join";
|
|
2
|
+
export { dayOf, teamOf, dispositionOf, sessionOf, repositoryKey, parseTraceRef, repositoriesOfRecord, capabilityKey, capabilitySessions, type CapabilitySession, type CapabilityEntry, sessionsByRepository, repositoryView, listRepositories, type SessionsByRepository, } from "./join";
|
|
3
3
|
export { LineageRowSchema, parseLineage, lineageOf, lineageGraph, type LineageRow, type LineageEdge, type LineageLink, type RepositoryLineage, type LineageGraph, } from "./lineage";
|
|
4
4
|
export { SHIPPED_LINEAGE_JSONL, SHIPPED_LINEAGE_SOURCE } from "./shipped-lineage";
|
|
5
5
|
export { CAPABILITY_KINDS, capabilityId, kindOf, parsePackageJson, parseSkillFrontMatter, workspaceGlobs, packageManifests, skillFiles, capabilityRows, mergeCapabilityRows, providesEdges, capabilitiesOf, capabilityAddress, medicineWheelSkills, CODE_READERS, type CapabilityKind, type CodeReader, type Artefact, type CapabilityRowContext, type ProvidesEdge, } from "./capabilities";
|
package/dist/join.d.ts
CHANGED
|
@@ -38,13 +38,17 @@ export interface SessionsByRepository {
|
|
|
38
38
|
export declare function sessionsByRepository(records: ReadonlyMap<string, InventorySnapshot>): SessionsByRepository;
|
|
39
39
|
/** A capability address without its scheme, owner and repository case-folded: `miadi-capability:` and `miadi-capability://` read the same. */
|
|
40
40
|
export declare function capabilityKey(address: string): string | undefined;
|
|
41
|
-
/** One
|
|
42
|
-
export interface
|
|
41
|
+
/** One thing a record says the session did with a capability. */
|
|
42
|
+
export interface CapabilityEntry {
|
|
43
43
|
/** uses, revises or brings-into-being, as the record writes it */
|
|
44
44
|
relation?: string;
|
|
45
45
|
version?: string;
|
|
46
46
|
/** the record's evidence for it: commits, issues, npm versions */
|
|
47
|
-
|
|
47
|
+
evidence?: string[];
|
|
48
|
+
}
|
|
49
|
+
/** One session whose record names a capability, with every entry it holds for it, in the record's order. */
|
|
50
|
+
export interface CapabilitySession extends RepositorySession {
|
|
51
|
+
entries: CapabilityEntry[];
|
|
48
52
|
}
|
|
49
53
|
/** The sessions whose record's `capabilities[]` names this capability, newest first. */
|
|
50
54
|
export declare function capabilitySessions(address: string, records: ReadonlyMap<string, InventorySnapshot>): CapabilitySession[];
|
package/dist/join.js
CHANGED
|
@@ -128,15 +128,15 @@ function capabilitySessions(address, records) {
|
|
|
128
128
|
return [];
|
|
129
129
|
const out = [];
|
|
130
130
|
for (const [id, snapshot] of records) {
|
|
131
|
-
const
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
...
|
|
136
|
-
...(
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
131
|
+
const entries = (snapshot.capabilities ?? [])
|
|
132
|
+
.filter((c) => capabilityKey(c.capability) === key)
|
|
133
|
+
.map((c) => ({
|
|
134
|
+
...(c.relation ? { relation: c.relation } : {}),
|
|
135
|
+
...(c.version ? { version: c.version } : {}),
|
|
136
|
+
...(c.evidence?.length ? { evidence: c.evidence } : {}),
|
|
137
|
+
}));
|
|
138
|
+
if (entries.length)
|
|
139
|
+
out.push({ ...sessionOf(id, snapshot), entries });
|
|
140
140
|
}
|
|
141
141
|
return out.sort(newestFirst);
|
|
142
142
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@miadi/relational-git-repository-mapper",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "A git repository as Miadi sees it (git, never a database Repository or Data Mapper): the rows its owner hub holds (@medicine-wheel/developer-repository-mapping) beside the agent sessions that worked in it (the witness team's session inventory), joined by owner/name; which git repository learned from which (a lineage, never a dependency); what each provides, its packages, CLIs and skills as capability nodes; where each lives; and what a version bump touches downstream.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Miadi",
|