@miadi/inquiry-weave 0.7.0 → 0.8.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 +159 -188
- package/dist/artefact.d.ts +8 -0
- package/dist/artefact.d.ts.map +1 -1
- package/dist/artefact.js +18 -2
- package/dist/artefact.js.map +1 -1
- package/dist/bin.js +0 -0
- package/dist/chronicle-dsl.d.ts +191 -0
- package/dist/chronicle-dsl.d.ts.map +1 -0
- package/dist/chronicle-dsl.js +327 -0
- package/dist/chronicle-dsl.js.map +1 -0
- package/dist/chronicle-terminal.d.ts +305 -0
- package/dist/chronicle-terminal.d.ts.map +1 -0
- package/dist/chronicle-terminal.js +449 -0
- package/dist/chronicle-terminal.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +335 -34
- package/dist/cli.js.map +1 -1
- package/dist/env.d.ts +1 -3
- package/dist/env.d.ts.map +1 -1
- package/dist/env.js +4 -5
- package/dist/env.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/issue-content.d.ts +2 -0
- package/dist/issue-content.d.ts.map +1 -0
- package/dist/issue-content.js +45 -0
- package/dist/issue-content.js.map +1 -0
- package/dist/issue-ref.d.ts +10 -0
- package/dist/issue-ref.d.ts.map +1 -0
- package/dist/issue-ref.js +20 -0
- package/dist/issue-ref.js.map +1 -0
- package/dist/issue.d.ts +2 -11
- package/dist/issue.d.ts.map +1 -1
- package/dist/issue.js +6 -34
- package/dist/issue.js.map +1 -1
- package/dist/mcp-server.js +0 -0
- package/dist/register.d.ts +1 -1
- package/dist/register.d.ts.map +1 -1
- package/dist/relate.d.ts +1 -3
- package/dist/relate.d.ts.map +1 -1
- package/dist/relate.js +1 -12
- package/dist/relate.js.map +1 -1
- package/dist/skill.d.ts.map +1 -1
- package/dist/skill.js +8 -2
- package/dist/skill.js.map +1 -1
- package/dist/terminal-install.d.ts +84 -0
- package/dist/terminal-install.d.ts.map +1 -0
- package/dist/terminal-install.js +306 -0
- package/dist/terminal-install.js.map +1 -0
- package/dist/weave.d.ts +0 -2
- package/dist/weave.d.ts.map +1 -1
- package/dist/weave.js +0 -2
- package/dist/weave.js.map +1 -1
- package/package.json +11 -9
- package/rispecs/medicine-wheel-registration.spec.md +1 -4
- package/LICENSE +0 -21
- package/dist/legacy-hch.d.ts +0 -28
- package/dist/legacy-hch.d.ts.map +0 -1
- package/dist/legacy-hch.js +0 -120
- package/dist/legacy-hch.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,237 +1,208 @@
|
|
|
1
1
|
# @miadi/inquiry-weave
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`inquiry-weave` keeps three identities in relation:
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
│ $MIADI_INQUIRY_ROOT/<dir> │ │ <chronicle>/<date>- │
|
|
9
|
-
│ (IAIP tree — │ ───────────────────────────► │ episode-NNN-<slug>/ │
|
|
10
|
-
│ system-of-record) │ promote / sync (mirror) │ inquiry/<dir>/ │
|
|
11
|
-
└─────────────┬──────────────┘ └──────────┬───────────┘
|
|
12
|
-
│ │
|
|
13
|
-
│ ┌────────────────────────┐ │
|
|
14
|
-
└──────────► │ GitHub issue │ ◄────────────────┘
|
|
15
|
-
.weave.yaml│ owner/repo#N │ inquiry/weave.yaml
|
|
16
|
-
└────────────────────────┘
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## The three identities (worked example: ep126 / #245)
|
|
20
|
-
|
|
21
|
-
| Identity | Example |
|
|
22
|
-
|---|---|
|
|
23
|
-
| Inquiry artefact | `/src/IAIP/prototypes/artefacts/ep126-mila-ai-event-260715-b08218a8-…` |
|
|
24
|
-
| GitHub issue | `miadisabelle/Etuaptmumk-RSM#245` |
|
|
25
|
-
| Chronicle episode | `…/miadi-chronicle/2026-07-13-episode-126-mila-ai-indigenous-gathering/` |
|
|
5
|
+
- an inquiry artefact in the IAIP artefact shelf;
|
|
6
|
+
- its GitHub issue;
|
|
7
|
+
- the Chronicle episode that carries it.
|
|
26
8
|
|
|
27
|
-
|
|
28
|
-
|
|
9
|
+
It creates issues with the portable `gh` CLI, records both shores of the
|
|
10
|
+
relation, syncs the artefact into the episode, and registers the weave. It does
|
|
11
|
+
not depend on private host scripts or private cache folders.
|
|
29
12
|
|
|
30
|
-
##
|
|
13
|
+
## Install
|
|
31
14
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
This boundary is enforced by an executable test (the vessel must contain relation
|
|
36
|
-
metadata only).
|
|
37
|
-
|
|
38
|
-
## CLI
|
|
39
|
-
|
|
40
|
-
```
|
|
41
|
-
inquiry-weave relate --artefact <name|path> --episode <num|name|path> [--issue owner/repo#N]
|
|
42
|
-
inquiry-weave promote --artefact <name|path> (--episode <ref> | --new-episode <slug> [--title <t>])
|
|
43
|
-
inquiry-weave inquire --episode <ref> --slug <slug> [--title <t>] [--repo owner/repo] [--no-issue]
|
|
44
|
-
inquiry-weave sync (--artefact <ref> [--episode <ref>] | --episode <ref> [--all])
|
|
45
|
-
inquiry-weave status (--episode <ref> | --artefact <ref>) [--json]
|
|
46
|
-
inquiry-weave register (--episode <ref> | --artefact <ref>) [--dry-run]
|
|
47
|
-
inquiry-weave lineage --from <ref> --to <ref> --relation <text> [--kind …] [--reverse]
|
|
48
|
-
inquiry-weave catalog [--chronicle-root <dir>] [--series <name>] [--json]
|
|
49
|
-
inquiry-weave stories [--stories-root <dir>] [--json]
|
|
15
|
+
```bash
|
|
16
|
+
npm install -g @miadi/inquiry-weave passages
|
|
17
|
+
gh auth status
|
|
50
18
|
```
|
|
51
19
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
numbers list their candidates — duplicates exist in the wild).
|
|
20
|
+
`passages` owns canonical episode birth through `mkepisode`. `inquiry-weave`
|
|
21
|
+
owns issue/artefact/episode relation and offers a compatibility episode
|
|
22
|
+
scaffold for combined one-command inquiry flows.
|
|
56
23
|
|
|
57
|
-
|
|
58
|
-
`register`) previews its plan and returns exit 0 without writing to the IAIP tree,
|
|
59
|
-
the chronicle, GitHub, or medicine-wheel. The projected plan matches the live output
|
|
60
|
-
apart from its prefix (`would <verb>:` on relation lines, `dry-run:` on sync lines), and
|
|
61
|
-
— like a live run — a standalone `sync` still refuses an artefact that is not related to
|
|
62
|
-
the episode. Fixed in v0.4.1 — prior to v0.4.1, `inquire`/`relate`/`promote` mutated real
|
|
63
|
-
state during a dry run. v0.4.2 restores the not-related guard on `sync --dry-run` (only
|
|
64
|
-
`promote` previews an as-yet-unpersisted relation).
|
|
65
|
-
|
|
66
|
-
## The two catalogs
|
|
67
|
-
|
|
68
|
-
`catalog` and `stories` expose the package's two read-models — the same manifests
|
|
69
|
-
`app/chronicle` renders — so a person can ask what exists without reading TypeScript.
|
|
70
|
-
Both are read-only: they walk a root and print, and write nothing anywhere.
|
|
24
|
+
## Environment
|
|
71
25
|
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
44 directory Episode-044-Decompose-and-Begin-Again
|
|
78
|
-
-- html the-room-lent-it-ears.html
|
|
79
|
-
…
|
|
80
|
-
episodes: 40(1) 44(2) 131(3) 311(4)
|
|
26
|
+
```bash
|
|
27
|
+
export MIADI_CHRONICLE_ROOT=/srv/miadi/episodes/miadi-chronicle
|
|
28
|
+
export MIADI_INQUIRY_DIR=/a/src/IAIP/prototypes/artefacts
|
|
29
|
+
export MIADI_INQUIRY_GITHUB_REPO=miadisabelle/Etuaptmumk-RSM
|
|
30
|
+
export MW_API_URL="${MW_API_URL:-${MIADI_CHRONICLE_MW_URL:-http://127.0.0.1:8040}}"
|
|
81
31
|
```
|
|
82
32
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
33
|
+
| Flag | Environment |
|
|
34
|
+
| --- | --- |
|
|
35
|
+
| `--chronicle-root` | `MIADI_CHRONICLE_ROOT` |
|
|
36
|
+
| `--inquiry-root` | `MIADI_INQUIRY_DIR` |
|
|
37
|
+
| `--repo` | `MIADI_INQUIRY_GITHUB_REPO` |
|
|
38
|
+
| `--mw-url` | `MW_API_URL` |
|
|
39
|
+
| `--stories-root` | `MIADI_STORIES_ROOT` |
|
|
86
40
|
|
|
87
|
-
`
|
|
88
|
-
|
|
89
|
-
(`episode-number-collision`, `unsafe-artifact-path`, …) as `note:` lines.
|
|
41
|
+
`MIADI_INQUIRY_ROOT`, `INQUIRY_ROOT`, and `MIADI_INQUIRY_REPO` remain fallback
|
|
42
|
+
aliases for older environments.
|
|
90
43
|
|
|
91
|
-
|
|
92
|
-
(`StoryManifestEntry`, `linkStoryForms`, `EpisodeManifestEntry.stories`); this package
|
|
93
|
-
*enumerates* it (`buildStoryLibraryCatalog`) and relates it. It never authors a story —
|
|
94
|
-
deriving a book from a vessel belongs to `packages/passages`.
|
|
44
|
+
## Create an issue and weave the current folder
|
|
95
45
|
|
|
96
|
-
|
|
46
|
+
From an existing inquiry artefact:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
cd "$MIADI_INQUIRY_DIR/ep133-honcho-eval"
|
|
97
50
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
| `MIADI_INQUIRY_REPO` | — | `miadisabelle/Etuaptmumk-RSM` |
|
|
104
|
-
| `INQUIRY_WEAVE_ISSUE_LIB` | → `/a/src/scripts/fn_github_issue.sh` → `/src/scripts/fn_github_issue.sh` | — |
|
|
105
|
-
| `MW_API_URL` | — | `http://127.0.0.1:8040` |
|
|
51
|
+
inquiry-weave inquire \
|
|
52
|
+
--artefact . \
|
|
53
|
+
--episode 133 \
|
|
54
|
+
--title "Honcho evaluation inquiry"
|
|
55
|
+
```
|
|
106
56
|
|
|
107
|
-
|
|
57
|
+
This creates the issue in `MIADI_INQUIRY_GITHUB_REPO`, writes its identity to
|
|
58
|
+
`.weave.yaml`, writes the matching relation to
|
|
59
|
+
`<episode>/inquiry/weave.yaml`, and adds the episode backlink to `AGENTS.md`.
|
|
60
|
+
Before those writes, an unprefixed folder is renamed to
|
|
61
|
+
`ep<episode-number>-<existing-folder-name>`. The prefix is mandatory once the
|
|
62
|
+
episode identity is known; a destination collision stops the command.
|
|
63
|
+
By default, the artefact's Markdown, text, YAML, and JSON documents become the
|
|
64
|
+
issue body. Generated weave metadata, `AGENTS.md`, hidden directories, and
|
|
65
|
+
binary files are excluded. Use `--body <text>` or `--body-file <path>` to
|
|
66
|
+
override that derived body.
|
|
67
|
+
|
|
68
|
+
## Create a new inquiry vessel and issue
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
inquiry-weave inquire \
|
|
72
|
+
--slug honcho-eval \
|
|
73
|
+
--episode 133 \
|
|
74
|
+
--title "Honcho evaluation inquiry"
|
|
75
|
+
```
|
|
108
76
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
77
|
+
The new directory is named `ep<NNN>-<slug>-<YYMMDD>-<uuid>` beneath
|
|
78
|
+
`MIADI_INQUIRY_DIR`. It begins with relation metadata only; inquiry content is
|
|
79
|
+
written afterward by the people and practices conducting the inquiry.
|
|
112
80
|
|
|
113
|
-
|
|
81
|
+
## Create the issue and a new episode together
|
|
114
82
|
|
|
115
|
-
|
|
116
|
-
weave: 1
|
|
117
|
-
episode:
|
|
118
|
-
number: 126
|
|
119
|
-
slug: mila-ai-indigenous-gathering
|
|
120
|
-
path: 2026-07-13-episode-126-mila-ai-indigenous-gathering
|
|
121
|
-
inquiries:
|
|
122
|
-
- artefact: ep126-mila-ai-event-260715-b08218a8-0441-4596-a16e-47483d3ab57c
|
|
123
|
-
issue: miadisabelle/Etuaptmumk-RSM#245
|
|
124
|
-
issue_url: https://github.com/miadisabelle/Etuaptmumk-RSM/issues/245
|
|
125
|
-
related_at: 2026-07-15T00:00:00.000Z
|
|
126
|
-
last_sync:
|
|
127
|
-
at: 2026-07-15T00:00:00.000Z
|
|
128
|
-
tree_sha256: <sha256 of the sorted relpath:filehash:size manifest>
|
|
129
|
-
file_count: 4
|
|
130
|
-
bytes_total: 341001
|
|
131
|
-
```
|
|
83
|
+
Use an existing artefact:
|
|
132
84
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
issue: miadisabelle/Etuaptmumk-RSM#245
|
|
139
|
-
issue_url: https://github.com/miadisabelle/Etuaptmumk-RSM/issues/245
|
|
140
|
-
episodes:
|
|
141
|
-
- path: 2026-07-13-episode-126-mila-ai-indigenous-gathering
|
|
142
|
-
number: 126
|
|
143
|
-
related_at: 2026-07-15T00:00:00.000Z
|
|
85
|
+
```bash
|
|
86
|
+
inquiry-weave inquire \
|
|
87
|
+
--artefact . \
|
|
88
|
+
--new-episode honcho-eval-adequate-memories \
|
|
89
|
+
--title "Honcho evaluation inquiry"
|
|
144
90
|
```
|
|
145
91
|
|
|
146
|
-
|
|
147
|
-
(episode path + `related issue owner/repo#N`) — append-if-missing, never overwriting.
|
|
148
|
-
|
|
149
|
-
### `.hch/` is legacy input — and an open decision
|
|
92
|
+
Or create the artefact vessel, issue, episode, and weave in one command:
|
|
150
93
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
94
|
+
```bash
|
|
95
|
+
inquiry-weave inquire \
|
|
96
|
+
--slug honcho-eval \
|
|
97
|
+
--new-episode honcho-eval-adequate-memories \
|
|
98
|
+
--title "Honcho evaluation inquiry"
|
|
99
|
+
```
|
|
156
100
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
compatible with all three outcomes.
|
|
101
|
+
Both combined forms also sync the artefact snapshot into the new episode. When
|
|
102
|
+
`MW_API_URL` (or `--mw-url`) is present, the command registers the episode card
|
|
103
|
+
and writes its `.mw-registration.json` receipt in the same run.
|
|
161
104
|
|
|
162
|
-
|
|
105
|
+
The combined form uses inquiry-weave's compatibility scaffold. For a fully
|
|
106
|
+
governed episode with an explicit goal and references, create it first with
|
|
107
|
+
`mkepisode`, then use `inquire --episode`:
|
|
163
108
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
109
|
+
```bash
|
|
110
|
+
mkepisode \
|
|
111
|
+
-n 133 \
|
|
112
|
+
-t "honcho eval adequate memories" \
|
|
113
|
+
-g "Establish adequate memories for the honcho evaluation." \
|
|
114
|
+
-r "jgwill/Miadi#133"
|
|
115
|
+
```
|
|
168
116
|
|
|
169
|
-
|
|
170
|
-
`/api/articles` and `/api/articles/seed` (which read `prototypes/artefacts` markdown into
|
|
171
|
-
Redis) — there is no inquiry CRUD. It is a documented future interface; **v0 has no
|
|
172
|
-
dependency on it**, so no host is named here: the URL belongs to a deployment, not to the
|
|
173
|
-
package, and hard-coding one into a published README ships someone's infrastructure to
|
|
174
|
-
everybody who installs it. Set `INQUIRY_WEAVE_API_URL` if a future version needs it.
|
|
117
|
+
## Weave an issue that already exists
|
|
175
118
|
|
|
176
|
-
|
|
177
|
-
|
|
119
|
+
```bash
|
|
120
|
+
inquiry-weave relate \
|
|
121
|
+
--artefact "$MIADI_INQUIRY_DIR/ep133-honcho-eval" \
|
|
122
|
+
--episode 133 \
|
|
123
|
+
--issue jgwill/Miadi#133
|
|
124
|
+
```
|
|
178
125
|
|
|
179
|
-
|
|
126
|
+
To weave the artefact and its already-recorded issue into a newly scaffolded
|
|
127
|
+
episode:
|
|
180
128
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
129
|
+
```bash
|
|
130
|
+
inquiry-weave promote \
|
|
131
|
+
--artefact "$MIADI_INQUIRY_DIR/ep133-honcho-eval" \
|
|
132
|
+
--new-episode honcho-eval-adequate-memories
|
|
133
|
+
```
|
|
186
134
|
|
|
187
|
-
##
|
|
135
|
+
## Sync, inspect, and register
|
|
188
136
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
weave
|
|
193
|
-
|
|
194
|
-
episode views. The contract lives in the RISE specs:
|
|
137
|
+
```bash
|
|
138
|
+
inquiry-weave sync --episode 133 --all
|
|
139
|
+
inquiry-weave status --episode 133
|
|
140
|
+
inquiry-weave register --episode 133
|
|
141
|
+
```
|
|
195
142
|
|
|
196
|
-
-
|
|
197
|
-
|
|
198
|
-
|
|
143
|
+
Sync is one-way from the IAIP artefact to the episode snapshot. The source
|
|
144
|
+
artefact remains authoritative. Registration projects relation metadata to the
|
|
145
|
+
Chronicle medicine wheel; it does not move inquiry content.
|
|
146
|
+
|
|
147
|
+
`--dry-run` previews mutating commands without filesystem, GitHub, or
|
|
148
|
+
medicine-wheel writes. `--no-issue` creates or relates the artefact without
|
|
149
|
+
opening GitHub.
|
|
150
|
+
|
|
151
|
+
## Command surface
|
|
152
|
+
|
|
153
|
+
```text
|
|
154
|
+
inquiry-weave inquire (--episode <ref> | --new-episode <slug>)
|
|
155
|
+
(--artefact <path> | --slug <new-artefact-slug>)
|
|
156
|
+
[--title <text>] [--body <text> | --body-file <path>]
|
|
157
|
+
[--repo owner/repo] [--no-issue]
|
|
158
|
+
inquiry-weave relate --artefact <path> --episode <ref> [--issue owner/repo#N]
|
|
159
|
+
inquiry-weave promote --artefact <path> (--episode <ref> | --new-episode <slug>)
|
|
160
|
+
inquiry-weave sync (--artefact <path> [--episode <ref>] | --episode <ref> --all)
|
|
161
|
+
inquiry-weave status (--episode <ref> | --artefact <path>) [--json]
|
|
162
|
+
inquiry-weave register (--episode <ref> | --artefact <path>) [--dry-run]
|
|
163
|
+
inquiry-weave lineage --from <ref> --to <ref> --relation <sentence>
|
|
164
|
+
[--kind continues-from|relates-to] [--reverse]
|
|
165
|
+
inquiry-weave catalog [--series <name>] [--json]
|
|
166
|
+
inquiry-weave stories [--stories-root <dir>] [--json]
|
|
167
|
+
inquiry-weave resolve <miadi-chronicle:...> [--verify] [--json]
|
|
168
|
+
```
|
|
199
169
|
|
|
200
|
-
|
|
170
|
+
Exit codes are `0` success, `1` operational failure, and `2` usage or identity
|
|
171
|
+
resolution failure.
|
|
201
172
|
|
|
202
|
-
|
|
203
|
-
`/api/nodes` artifact references (`miadi.artifact-ref.v1`, kind
|
|
204
|
-
`chronicle_episode`). `registerEpisodeNode(mwUrl, input)` registers that card:
|
|
205
|
-
it preflights `GET /api/nodes/chronicle:<episode-dir-name>` (an existing card is
|
|
206
|
-
`already-registered` success, never overwritten — medicine-wheel's POST upserts)
|
|
207
|
-
and otherwise POSTs the ep137-proven record. Failure is fail-open: the outcome
|
|
208
|
-
is `{ state: "registered" | "already-registered" | "pending", node_id, error? }`
|
|
209
|
-
and the function never throws, so vessel creation can never fail because of
|
|
210
|
-
registration (jgwill/Miadi#490).
|
|
173
|
+
## Relation records
|
|
211
174
|
|
|
212
|
-
|
|
175
|
+
The artefact owns `.weave.yaml`; the episode owns `inquiry/weave.yaml`, which
|
|
176
|
+
also records sync hashes and counts. These files are authoritative. The
|
|
177
|
+
medicine wheel is their registered projection.
|
|
213
178
|
|
|
214
|
-
Episode
|
|
215
|
-
likely belongs to `packages/passages` ("Narrative Formulations for the Miadi Chronicle").
|
|
216
|
-
This package keeps its `--new-episode` scaffolding inside one exported function
|
|
217
|
-
(`scaffoldEpisode`) so passages can own creation later, and inquiry-weave consumes any
|
|
218
|
-
pre-existing episode regardless of its creator.
|
|
179
|
+
## Episode lineage
|
|
219
180
|
|
|
220
|
-
|
|
181
|
+
```bash
|
|
182
|
+
inquiry-weave lineage \
|
|
183
|
+
--from 132 \
|
|
184
|
+
--to 133 \
|
|
185
|
+
--kind relates-to \
|
|
186
|
+
--relation "The evaluation carries the prior memory contract into practice." \
|
|
187
|
+
--reverse \
|
|
188
|
+
--dry-run
|
|
189
|
+
```
|
|
221
190
|
|
|
222
|
-
|
|
223
|
-
|
|
191
|
+
Drop `--dry-run` to write both shores. The relation sentence must read
|
|
192
|
+
truthfully from both episode rooms.
|
|
224
193
|
|
|
225
194
|
## Development
|
|
226
195
|
|
|
227
|
-
```
|
|
196
|
+
```bash
|
|
228
197
|
pnpm --filter @miadi/inquiry-weave build
|
|
229
198
|
pnpm --filter @miadi/inquiry-weave test
|
|
230
199
|
```
|
|
231
200
|
|
|
232
|
-
Tests
|
|
233
|
-
|
|
201
|
+
Tests use temporary roots and a fake `gh` executable. They make no network or
|
|
202
|
+
real GitHub calls.
|
|
234
203
|
|
|
235
204
|
---
|
|
236
|
-
|
|
237
|
-
|
|
205
|
+
|
|
206
|
+
🌸 `passages` opens the governed episode vessel. `inquiry-weave` ties the
|
|
207
|
+
living inquiry, its issue, and that episode together without pretending they
|
|
208
|
+
are the same thing.
|
package/dist/artefact.d.ts
CHANGED
|
@@ -11,6 +11,14 @@ export interface ArtefactIdentity {
|
|
|
11
11
|
}
|
|
12
12
|
export declare class ArtefactResolutionError extends Error {
|
|
13
13
|
}
|
|
14
|
+
export interface PrefixArtefactResult {
|
|
15
|
+
artefact: ArtefactIdentity;
|
|
16
|
+
renamedFrom?: string;
|
|
17
|
+
}
|
|
18
|
+
/** Give a prepared artefact its episode identity before issue/weave writes. */
|
|
19
|
+
export declare function ensureEpisodePrefix(artefact: ArtefactIdentity, episodeNumber: number, options?: {
|
|
20
|
+
dryRun?: boolean;
|
|
21
|
+
}): Promise<PrefixArtefactResult>;
|
|
14
22
|
export declare function resolveArtefact(inquiryRoot: string, ref: string): ArtefactIdentity;
|
|
15
23
|
export interface ArtefactNameParts {
|
|
16
24
|
episodeNumber: number;
|
package/dist/artefact.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artefact.d.ts","sourceRoot":"","sources":["../src/artefact.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAOH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,qBAAa,uBAAwB,SAAQ,KAAK;CAAG;AAErD,wBAAgB,eAAe,CAAC,WAA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C,CAc/B;AAED,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAclF;AAED,MAAM,WAAW,iBAAiB;IAChC,aAAa,EAAE,MAAM,CAAA;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,8EAA8E;AAC9E,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,CAIlE;AAED,MAAM,WAAW,qBAAqB;IACpC,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;AAED,wBAAsB,cAAc,CAClC,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,qBAA0B,GAClC,OAAO,CAAC,gBAAgB,CAAC,CAU3B;AAED,MAAM,WAAW,aAAa;IAC5B,cAAc,EAAE,MAAM,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED;;;GAGG;AACH,wBAAsB,cAAc,CAClC,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,aAAa,GACnB,OAAO,CAAC,OAAO,CAAC,CAUlB"}
|
package/dist/artefact.js
CHANGED
|
@@ -5,12 +5,28 @@
|
|
|
5
5
|
* directory and nothing else. The inquiry's substance is written by humans
|
|
6
6
|
* (and their chosen ceremonies), never by this package.
|
|
7
7
|
*/
|
|
8
|
-
import { appendFile, mkdir, readFile } from "node:fs/promises";
|
|
8
|
+
import { appendFile, mkdir, readFile, rename } from "node:fs/promises";
|
|
9
9
|
import { existsSync, statSync } from "node:fs";
|
|
10
10
|
import { randomUUID } from "node:crypto";
|
|
11
|
-
import { basename, isAbsolute, join, resolve } from "node:path";
|
|
11
|
+
import { basename, dirname, isAbsolute, join, resolve } from "node:path";
|
|
12
12
|
export class ArtefactResolutionError extends Error {
|
|
13
13
|
}
|
|
14
|
+
/** Give a prepared artefact its episode identity before issue/weave writes. */
|
|
15
|
+
export async function ensureEpisodePrefix(artefact, episodeNumber, options = {}) {
|
|
16
|
+
if (/^ep\d+-/.test(artefact.name))
|
|
17
|
+
return { artefact };
|
|
18
|
+
const targetName = `ep${episodeNumber}-${artefact.name}`;
|
|
19
|
+
const targetDir = join(dirname(artefact.dir), targetName);
|
|
20
|
+
if (existsSync(targetDir)) {
|
|
21
|
+
throw new ArtefactResolutionError(`cannot prefix artefact: destination already exists: ${targetDir}`);
|
|
22
|
+
}
|
|
23
|
+
if (!options.dryRun)
|
|
24
|
+
await rename(artefact.dir, targetDir);
|
|
25
|
+
return {
|
|
26
|
+
artefact: { name: targetName, dir: targetDir },
|
|
27
|
+
renamedFrom: artefact.dir,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
14
30
|
export function resolveArtefact(inquiryRoot, ref) {
|
|
15
31
|
const trimmed = ref.trim().replace(/\/+$/, "");
|
|
16
32
|
const candidates = [
|
package/dist/artefact.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artefact.js","sourceRoot":"","sources":["../src/artefact.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"artefact.js","sourceRoot":"","sources":["../src/artefact.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACtE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAOxE,MAAM,OAAO,uBAAwB,SAAQ,KAAK;CAAG;AAOrD,+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