@miadi/inquiry-weave 0.7.0 → 0.8.0
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 +113 -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 +222 -8
- package/dist/cli.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/package.json +1 -1
|
@@ -0,0 +1,449 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The terminal surface for miadi-chronicle references.
|
|
3
|
+
*
|
|
4
|
+
* Contract: rispecs/miadi-chronicle-dsl/SPEC-TERMINAL.md (v1.2).
|
|
5
|
+
* Grounded in foundations/resource-addressing-and-terminal-hypermedia/.
|
|
6
|
+
*
|
|
7
|
+
* Two jobs the pure module cannot do, because both touch the world:
|
|
8
|
+
*
|
|
9
|
+
* - the OPEN LADDER: turn a resolution into one thing a window manager can
|
|
10
|
+
* act on, preferring what is on this disk over what is on a network.
|
|
11
|
+
* - OSC 8 EMISSION: hand a terminal a link whose label is not its target.
|
|
12
|
+
*
|
|
13
|
+
* Why OSC 8 rather than letting the terminal find URLs in the text: regex
|
|
14
|
+
* linkification is an UNMARKED-ANCHOR mechanism (Grønbæk & Trigg, CACM 37(2),
|
|
15
|
+
* 1994) — the anchor carries no marker, its location must be computed by
|
|
16
|
+
* scanning, and its VALUE IS THE MATCHED TEXT. So under linkification the
|
|
17
|
+
* displayed label and the target are necessarily the same string, and
|
|
18
|
+
* `{{ … | label="Mila gathering" }}` cannot be expressed at all. OSC 8 is a
|
|
19
|
+
* marked anchor: declared, retrievable from the selection, carrying a value
|
|
20
|
+
* independent of what is shown. That is a property of the two anchoring
|
|
21
|
+
* models, not of any terminal's version number.
|
|
22
|
+
*/
|
|
23
|
+
import { hostname } from "node:os";
|
|
24
|
+
import { readdir, stat, readFile } from "node:fs/promises";
|
|
25
|
+
import { join } from "node:path";
|
|
26
|
+
import { parseMiadiChronicleUri, wheelNodeId, WHEEL_ARTIFACT_KINDS, resolveChronicleRef, judgeFragment, } from "./chronicle-dsl.js";
|
|
27
|
+
// ---------------------------------------------------------------------------
|
|
28
|
+
// OSC 8
|
|
29
|
+
// ---------------------------------------------------------------------------
|
|
30
|
+
/** Written as an escape sequence, never as a literal byte — a raw 0x1B in
|
|
31
|
+
* source is invisible to review and one careless editor save from being
|
|
32
|
+
* eaten. */
|
|
33
|
+
const ESC = "\u001b";
|
|
34
|
+
/** OSC — ECMA-48 §8.3.89. `ESC ]`, the 7-bit representation. */
|
|
35
|
+
const OSC = `${ESC}]`;
|
|
36
|
+
/**
|
|
37
|
+
* ST — ECMA-48 §8.3.143. `ESC \`, NOT BEL.
|
|
38
|
+
*
|
|
39
|
+
* BEL as an OSC terminator is xterm legacy from X11R4 (December 1989); xterm
|
|
40
|
+
* itself has accepted and preferred ST — "the documented string terminator in
|
|
41
|
+
* ECMA-48" — since XFree86-3.1.2Ee (August 1996).
|
|
42
|
+
*
|
|
43
|
+
* (The canonical OSC 8 gist misattributes ST to ECMA-48 §8.3.89. That section
|
|
44
|
+
* is OSC. ST is §8.3.143.)
|
|
45
|
+
*/
|
|
46
|
+
const ST = `${ESC}\\`;
|
|
47
|
+
/** VTE and iTerm2 both refuse URIs beyond this. */
|
|
48
|
+
export const MAX_OSC8_URI_BYTES = 2083;
|
|
49
|
+
/**
|
|
50
|
+
* Percent-encode anything outside the OSC command-string repertoire.
|
|
51
|
+
*
|
|
52
|
+
* ECMA-48 §5.6 constrains a command string to bit combinations 00/08–00/13 and
|
|
53
|
+
* 02/00–07/14. In practice for a URI that means bytes 32–126: anything else is
|
|
54
|
+
* undefined behaviour and must be escaped before it reaches the wire.
|
|
55
|
+
*/
|
|
56
|
+
export function encodeForOsc8(uri) {
|
|
57
|
+
let out = "";
|
|
58
|
+
for (const char of uri) {
|
|
59
|
+
const code = char.codePointAt(0) ?? 0;
|
|
60
|
+
if (code >= 0x20 && code <= 0x7e) {
|
|
61
|
+
out += char;
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
64
|
+
for (const byte of new TextEncoder().encode(char)) {
|
|
65
|
+
out += `%${byte.toString(16).toUpperCase().padStart(2, "0")}`;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return out;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Wrap a label in an OSC 8 hyperlink.
|
|
72
|
+
*
|
|
73
|
+
* Emitted unconditionally, because there is no alternative. The OSC 8 spec
|
|
74
|
+
* says so in its own words: "Currently there's no way of detecting whether the
|
|
75
|
+
* terminal emulator supports hyperlinks." Any behaviour that branches on
|
|
76
|
+
* support is unimplementable, and backward compatibility is guaranteed one
|
|
77
|
+
* layer down — a terminal that parses OSC per ECMA-48 discards the payload and
|
|
78
|
+
* shows the label.
|
|
79
|
+
*
|
|
80
|
+
* Returns the bare label when the URI exceeds the byte ceiling: a link that
|
|
81
|
+
* would be truncated mid-URI is worse than no link, because it points
|
|
82
|
+
* somewhere real and wrong.
|
|
83
|
+
*/
|
|
84
|
+
export function osc8(uri, label, options = {}) {
|
|
85
|
+
const encoded = encodeForOsc8(uri);
|
|
86
|
+
if (Buffer.byteLength(encoded, "utf8") > MAX_OSC8_URI_BYTES)
|
|
87
|
+
return label;
|
|
88
|
+
const params = options.id ? `id=${encodeForOsc8(options.id)}` : "";
|
|
89
|
+
return `${OSC}8;${params};${encoded}${ST}${label}${OSC}8;;${ST}`;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* A chronicle reference as a terminal writes it: the marked anchor AND the
|
|
93
|
+
* address in plain sight.
|
|
94
|
+
*
|
|
95
|
+
* Not a fallback — two requirements met at once. The OSC 8 spec: hyperlinks
|
|
96
|
+
* "should not be the only means of figuring out the target." Engelbart's open
|
|
97
|
+
* hyperdocument requirement: every address stays "understandable and readable
|
|
98
|
+
* by a user." And the angle brackets are RFC 3986 Appendix C's explicit
|
|
99
|
+
* recommendation for delimiting a URI in running text, which is what makes the
|
|
100
|
+
* line survive `script`, CI capture, a pipe to a file, GNU screen, and xterm —
|
|
101
|
+
* none of which will ever render the escape.
|
|
102
|
+
*/
|
|
103
|
+
export function terminalRef(uri, label, target, options = {}) {
|
|
104
|
+
return `${osc8(target, label, options)} <${uri}>`;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* The default chronicle room. Verified live 2026-08-16: `/chronicle` and
|
|
108
|
+
* `/chronicle/<folder>` both answer 200 on 127.0.0.1:3335, the same server the
|
|
109
|
+
* voice layer already talks to. The 2026-08-07 draft assumed the surface was
|
|
110
|
+
* down because it probed :3000 — the wrong port — and built a ladder around an
|
|
111
|
+
* outage that was not happening.
|
|
112
|
+
*/
|
|
113
|
+
export const DEFAULT_LOCAL_BASE = "http://127.0.0.1:3335";
|
|
114
|
+
/**
|
|
115
|
+
* Read the bases from the environment. Nothing is probed — reachability is a
|
|
116
|
+
* claim about the reader's network, not about this process, and a resolver
|
|
117
|
+
* that silently dropped an unreachable base would hide exactly the fact a
|
|
118
|
+
* reader elsewhere needs.
|
|
119
|
+
*/
|
|
120
|
+
export function readWebBases(env = process.env) {
|
|
121
|
+
return {
|
|
122
|
+
local: env.MIADI_WEB_URL || DEFAULT_LOCAL_BASE,
|
|
123
|
+
internal: env.MIADI_URL_BASE_INTERNAL || undefined,
|
|
124
|
+
public: env.MIADI_URL_BASE || undefined,
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
function pickBase(bases, order) {
|
|
128
|
+
for (const kind of order) {
|
|
129
|
+
const url = bases[kind];
|
|
130
|
+
if (url)
|
|
131
|
+
return { url: url.replace(/\/$/, ""), kind };
|
|
132
|
+
}
|
|
133
|
+
return null;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* `file://` URLs carry this host's name, always.
|
|
137
|
+
*
|
|
138
|
+
* Browsers ignore the authority in a file URL. OSC 8 explicitly forbids that
|
|
139
|
+
* laxity BECAUSE IT BREAKS UNDER SSH: a terminal is required to refuse opening
|
|
140
|
+
* a local file when the hostname does not match, and to treat empty or
|
|
141
|
+
* "localhost" as local. RFC 8089 formalises `file-auth = "localhost" / host`,
|
|
142
|
+
* so that "a client on another system [can] know that it cannot access the
|
|
143
|
+
* file system."
|
|
144
|
+
*
|
|
145
|
+
* On this stack ssh is the normal case — the chronicle wheel is reached
|
|
146
|
+
* through a tunnel — so `file:///srv/miadi/...` would be a link that opens
|
|
147
|
+
* confidently, on the wrong machine's disk.
|
|
148
|
+
*/
|
|
149
|
+
export function fileUrl(absolutePath, host = hostname()) {
|
|
150
|
+
const encoded = absolutePath
|
|
151
|
+
.split("/")
|
|
152
|
+
.map((segment) => encodeURIComponent(segment))
|
|
153
|
+
.join("/");
|
|
154
|
+
return `file://${encodeURIComponent(host)}${encoded}`;
|
|
155
|
+
}
|
|
156
|
+
async function exists(path) {
|
|
157
|
+
try {
|
|
158
|
+
await stat(path);
|
|
159
|
+
return true;
|
|
160
|
+
}
|
|
161
|
+
catch {
|
|
162
|
+
return false;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Locate a `state-machine` artifact inside an episode.
|
|
167
|
+
*
|
|
168
|
+
* Primary: the `<episode>/diagrams/<name>.smdf.json` convention, which
|
|
169
|
+
* jgwill/smcraft's own rispecs/78-forgewright-episode-rendering.plan.md calls
|
|
170
|
+
* proven. Several matches list as alternates, per SPEC §1's ambiguity rule —
|
|
171
|
+
* ambiguity is data, never an error.
|
|
172
|
+
*
|
|
173
|
+
* Fallback: `services-inventory.json` entries carry `smdf_files`, so the
|
|
174
|
+
* census already walks service → SMDF document → episode. When the convention
|
|
175
|
+
* is empty, the census answers. The chronicle owns episode identity; smcraft
|
|
176
|
+
* owns document identity (a normalized absolute path), and it can already read
|
|
177
|
+
* an episode OUT of a path (`episodeOf`) but has no way back. This is that
|
|
178
|
+
* inverse, and it belongs on this side.
|
|
179
|
+
*/
|
|
180
|
+
async function findStateMachine(episodeDir) {
|
|
181
|
+
const diagrams = join(episodeDir, "diagrams");
|
|
182
|
+
try {
|
|
183
|
+
const found = (await readdir(diagrams))
|
|
184
|
+
.filter((name) => name.endsWith(".smdf.json"))
|
|
185
|
+
.sort()
|
|
186
|
+
.map((name) => join(diagrams, name));
|
|
187
|
+
if (found.length > 0) {
|
|
188
|
+
return {
|
|
189
|
+
kind: "state-machine",
|
|
190
|
+
path: found[0],
|
|
191
|
+
alternates: found.length > 1 ? found.slice(1) : undefined,
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
catch {
|
|
196
|
+
// no diagrams/ directory — fall through to the census
|
|
197
|
+
}
|
|
198
|
+
try {
|
|
199
|
+
const raw = await readFile(join(episodeDir, "services-inventory.json"), "utf8");
|
|
200
|
+
const entries = JSON.parse(raw);
|
|
201
|
+
const files = [
|
|
202
|
+
...new Set(entries.flatMap((entry) => entry.smdf_files ?? [])),
|
|
203
|
+
].sort();
|
|
204
|
+
if (files.length > 0) {
|
|
205
|
+
return {
|
|
206
|
+
kind: "state-machine",
|
|
207
|
+
path: files[0],
|
|
208
|
+
alternates: files.length > 1 ? files.slice(1) : undefined,
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
catch {
|
|
213
|
+
// no census, or it is not the shape we expect — data, not an error
|
|
214
|
+
}
|
|
215
|
+
return null;
|
|
216
|
+
}
|
|
217
|
+
export async function resolveArtifactTarget(kind, episodeDir) {
|
|
218
|
+
// Wheel-backed kinds have no file in the vessel; they are answered by the
|
|
219
|
+
// relational layer and are attached as doors instead.
|
|
220
|
+
if (WHEEL_ARTIFACT_KINDS.includes(kind))
|
|
221
|
+
return null;
|
|
222
|
+
if (kind === "inventory") {
|
|
223
|
+
const path = join(episodeDir, "services-inventory.json");
|
|
224
|
+
return (await exists(path)) ? { kind, path } : null;
|
|
225
|
+
}
|
|
226
|
+
return findStateMachine(episodeDir);
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* The wheel's own doors, and the one endpoint that can be believed.
|
|
230
|
+
*
|
|
231
|
+
* Measured 2026-08-16: `/graph`, `/nodes` and `/relations` all begin
|
|
232
|
+
* `"use client"`. Fetching `/nodes?node=<a real episode id>` and grepping the
|
|
233
|
+
* HTML for the episode name returns **zero hits** — the shell is byte-identical
|
|
234
|
+
* for any parameter, and focus happens in the browser after it fetches
|
|
235
|
+
* `/api/nodes`. `/graph?direction=nowhere` is a 200 too.
|
|
236
|
+
*
|
|
237
|
+
* Forgewright behaves the same way: `?episode=9999-99-99-episode-000-nope`
|
|
238
|
+
* → 200. Two services, two codebases, one trap.
|
|
239
|
+
*
|
|
240
|
+
* **So an HTTP 200 from any of these pages is not evidence the episode
|
|
241
|
+
* exists.** `GET /api/nodes/<id>` is — it returns the node or a real 404
|
|
242
|
+
* (`{"error":"Node not found: chronicle:nope"}`). A resolver that hands a human
|
|
243
|
+
* a page URL without checking it first is handing them a silently empty wheel.
|
|
244
|
+
*/
|
|
245
|
+
export const WHEEL_PAGE_DOORS = [
|
|
246
|
+
{ path: "/graph", label: "wheel·graph" },
|
|
247
|
+
{ path: "/nodes", label: "wheel·node" },
|
|
248
|
+
{ path: "/relations", label: "wheel·relations" },
|
|
249
|
+
];
|
|
250
|
+
export function wheelUrl(env = process.env) {
|
|
251
|
+
return (env.MW_API_URL || "http://127.0.0.1:8040").replace(/\/$/, "");
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* Where a wheel-backed artifact actually lives.
|
|
255
|
+
*
|
|
256
|
+
* Every one is keyed by `episode_path` — the full folder name. The number is
|
|
257
|
+
* not a key: `?episode_number=320` returns 0 records for an episode whose
|
|
258
|
+
* `?episode_path=<folder>` returns 1, because the records carry no
|
|
259
|
+
* `episode_number` field and the filter compares strictly.
|
|
260
|
+
*/
|
|
261
|
+
export function wheelArtifactUrl(kind, episodeFolder, base) {
|
|
262
|
+
const key = `episode_path=${encodeURIComponent(episodeFolder)}`;
|
|
263
|
+
switch (kind) {
|
|
264
|
+
case "captures":
|
|
265
|
+
return `${base}/api/captures?${key}`;
|
|
266
|
+
case "inquiry":
|
|
267
|
+
return `${base}/api/inquiry-weaves?${key}`;
|
|
268
|
+
case "plans":
|
|
269
|
+
return `${base}/api/plan-perspectives?${key}`;
|
|
270
|
+
default:
|
|
271
|
+
return null;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Ask the wheel whether this episode is actually on it.
|
|
276
|
+
*
|
|
277
|
+
* Opt-in (`--verify`) because it is a network call, and because a resolution
|
|
278
|
+
* that answers from the catalog on disk is already true about the disk. What
|
|
279
|
+
* this adds is the other half: whether the relational layer knows the episode
|
|
280
|
+
* too. Both answers are real, and they can disagree — forgewright's UI sees a
|
|
281
|
+
* 28-episode registry while its own disk routes resolve episodes the registry
|
|
282
|
+
* has never heard of.
|
|
283
|
+
*/
|
|
284
|
+
export async function verifyOnWheel(episodeFolder, base, timeoutMs = 8000) {
|
|
285
|
+
const nodeId = wheelNodeId(episodeFolder);
|
|
286
|
+
const url = `${base}/api/nodes/${encodeURIComponent(nodeId)}`;
|
|
287
|
+
const controller = new AbortController();
|
|
288
|
+
const timer = setTimeout(() => controller.abort(), timeoutMs);
|
|
289
|
+
try {
|
|
290
|
+
const response = await fetch(url, { signal: controller.signal });
|
|
291
|
+
return { checked: true, exists: response.ok, nodeId, status: response.status };
|
|
292
|
+
}
|
|
293
|
+
catch (error) {
|
|
294
|
+
// Unreachable is not absent. A wheel that cannot be asked has not said no.
|
|
295
|
+
return { checked: true, exists: false, nodeId, error: error.message };
|
|
296
|
+
}
|
|
297
|
+
finally {
|
|
298
|
+
clearTimeout(timer);
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Enumerate every door this reference opens.
|
|
303
|
+
*
|
|
304
|
+
* Two questions, never collapsed: *"where do I go to read this?"* is a room,
|
|
305
|
+
* *"where does this live?"* is the vessel. The 2026-08-07 draft answered only
|
|
306
|
+
* the second and called it `open`, which is how a chronicle link came to open
|
|
307
|
+
* emacs on raw JSON.
|
|
308
|
+
*/
|
|
309
|
+
export async function buildDestinations(resolution, parsed, chronicleRoot, options = {}) {
|
|
310
|
+
const empty = {
|
|
311
|
+
all: [],
|
|
312
|
+
open: null,
|
|
313
|
+
openKind: "none",
|
|
314
|
+
shareable: null,
|
|
315
|
+
path: null,
|
|
316
|
+
modality: "none",
|
|
317
|
+
};
|
|
318
|
+
const name = resolution.target.name;
|
|
319
|
+
if (!resolution.resolved || !name)
|
|
320
|
+
return { destinations: empty, artifact: null };
|
|
321
|
+
const episodeDir = join(chronicleRoot, name);
|
|
322
|
+
const artifact = parsed.artifact
|
|
323
|
+
? await resolveArtifactTarget(parsed.artifact, episodeDir)
|
|
324
|
+
: null;
|
|
325
|
+
// The local answer — always, whatever any web surface is doing.
|
|
326
|
+
let path = null;
|
|
327
|
+
let fileKind = "vessel";
|
|
328
|
+
if (artifact) {
|
|
329
|
+
path = artifact.path;
|
|
330
|
+
fileKind = "artifact-file";
|
|
331
|
+
}
|
|
332
|
+
else if (await exists(join(episodeDir, "README.md"))) {
|
|
333
|
+
path = join(episodeDir, "README.md");
|
|
334
|
+
fileKind = "readme";
|
|
335
|
+
}
|
|
336
|
+
else if (await exists(episodeDir)) {
|
|
337
|
+
path = episodeDir;
|
|
338
|
+
}
|
|
339
|
+
// Harvest: an artifact ASKED FOR and not found is a partial answer even
|
|
340
|
+
// though the episode resolved. Reported, never inferred away.
|
|
341
|
+
const wheelBacked = parsed.artifact !== null &&
|
|
342
|
+
WHEEL_ARTIFACT_KINDS.includes(parsed.artifact);
|
|
343
|
+
const modality = parsed.artifact && !artifact && !wheelBacked ? "standalone" : "relational";
|
|
344
|
+
const bases = options.bases ?? readWebBases();
|
|
345
|
+
const route = resolution.target.route;
|
|
346
|
+
const ROOM_LABEL = {
|
|
347
|
+
local: "room·local",
|
|
348
|
+
internal: "room·tailnet",
|
|
349
|
+
public: "room·public",
|
|
350
|
+
};
|
|
351
|
+
const doors = [];
|
|
352
|
+
if (route) {
|
|
353
|
+
for (const kind of ["local", "internal", "public"]) {
|
|
354
|
+
const base = bases[kind];
|
|
355
|
+
if (base) {
|
|
356
|
+
doors.push({
|
|
357
|
+
kind: "room",
|
|
358
|
+
base: kind,
|
|
359
|
+
label: ROOM_LABEL[kind],
|
|
360
|
+
url: `${base.replace(/\/$/, "")}${route}`,
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
// The wheel: an artifact endpoint when one is asked for, then the three
|
|
366
|
+
// page doors. Page doors are offered AFTER the room because they are
|
|
367
|
+
// client-routed — see WHEEL_PAGE_DOORS: a 200 from them means nothing.
|
|
368
|
+
const wheel = options.wheelUrl ?? wheelUrl();
|
|
369
|
+
if (wheel) {
|
|
370
|
+
const artifactUrl = parsed.artifact
|
|
371
|
+
? wheelArtifactUrl(parsed.artifact, name, wheel)
|
|
372
|
+
: null;
|
|
373
|
+
if (artifactUrl) {
|
|
374
|
+
doors.push({ kind: "wheel-api", label: `wheel·${parsed.artifact}`, url: artifactUrl });
|
|
375
|
+
}
|
|
376
|
+
const nodeId = encodeURIComponent(wheelNodeId(name));
|
|
377
|
+
for (const door of WHEEL_PAGE_DOORS) {
|
|
378
|
+
doors.push({ kind: "wheel-page", label: door.label, url: `${wheel}${door.path}?node=${nodeId}` });
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
if (path) {
|
|
382
|
+
doors.push({
|
|
383
|
+
kind: fileKind,
|
|
384
|
+
label: artifact ? `file·${parsed.artifact}` : fileKind === "readme" ? "file·readme" : "file·vessel",
|
|
385
|
+
url: fileUrl(path),
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
// The caller may name which door leads. Everything else stays on offer —
|
|
389
|
+
// a preference reorders the list, it never shortens it.
|
|
390
|
+
const prefer = options.prefer;
|
|
391
|
+
if (prefer) {
|
|
392
|
+
// `local-file` names the file-backed kinds specifically. "Anything that is
|
|
393
|
+
// not a room" was wrong the moment the wheel's page doors arrived — they
|
|
394
|
+
// are not rooms and not files, and they silently outranked the file.
|
|
395
|
+
const FILE_KINDS = ["artifact-file", "readme", "vessel"];
|
|
396
|
+
const wanted = (d) => prefer === "local-file" ? FILE_KINDS.includes(d.kind) : d.base === prefer;
|
|
397
|
+
doors.sort((a, b) => Number(wanted(b)) - Number(wanted(a)));
|
|
398
|
+
}
|
|
399
|
+
const shareable = doors.find((d) => d.base === "public")?.url
|
|
400
|
+
?? doors.find((d) => d.base === "internal")?.url
|
|
401
|
+
?? null;
|
|
402
|
+
return {
|
|
403
|
+
destinations: {
|
|
404
|
+
all: doors,
|
|
405
|
+
open: doors[0]?.url ?? null,
|
|
406
|
+
openKind: doors[0]?.kind ?? "none",
|
|
407
|
+
shareable,
|
|
408
|
+
path,
|
|
409
|
+
modality,
|
|
410
|
+
},
|
|
411
|
+
artifact,
|
|
412
|
+
};
|
|
413
|
+
}
|
|
414
|
+
export async function resolveForTerminal(uri, entries, chronicleRoot, options = {}) {
|
|
415
|
+
const parsed = parseMiadiChronicleUri(uri);
|
|
416
|
+
if (!parsed)
|
|
417
|
+
return null;
|
|
418
|
+
const resolution = resolveChronicleRef(parsed, entries);
|
|
419
|
+
const { destinations, artifact } = await buildDestinations(resolution, parsed, chronicleRoot, options);
|
|
420
|
+
const verdict = judgeFragment(parsed.fragment);
|
|
421
|
+
const wheel = options.verify && resolution.target.name
|
|
422
|
+
? await verifyOnWheel(resolution.target.name, options.wheelUrl ?? wheelUrl())
|
|
423
|
+
: undefined;
|
|
424
|
+
return {
|
|
425
|
+
ok: true,
|
|
426
|
+
uri: parsed.uri,
|
|
427
|
+
canonical: parsed.canonical,
|
|
428
|
+
parsed: {
|
|
429
|
+
episodePath: parsed.episodePath,
|
|
430
|
+
segments: parsed.segments,
|
|
431
|
+
episodeSegments: parsed.episodeSegments,
|
|
432
|
+
artifact: parsed.artifact,
|
|
433
|
+
query: parsed.query,
|
|
434
|
+
options: parsed.options,
|
|
435
|
+
fragment: parsed.fragment,
|
|
436
|
+
},
|
|
437
|
+
resolution,
|
|
438
|
+
artifact,
|
|
439
|
+
destinations: destinations.all,
|
|
440
|
+
open: destinations.open,
|
|
441
|
+
openKind: destinations.openKind,
|
|
442
|
+
shareable: destinations.shareable,
|
|
443
|
+
path: destinations.path,
|
|
444
|
+
modality: destinations.modality,
|
|
445
|
+
fragmentWarning: verdict && !verdict.durable ? verdict : undefined,
|
|
446
|
+
wheel,
|
|
447
|
+
};
|
|
448
|
+
}
|
|
449
|
+
//# sourceMappingURL=chronicle-terminal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chronicle-terminal.js","sourceRoot":"","sources":["../src/chronicle-terminal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAClC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EACL,sBAAsB,EACtB,WAAW,EACX,oBAAoB,EACpB,mBAAmB,EACnB,aAAa,GAMd,MAAM,oBAAoB,CAAA;AAE3B,8EAA8E;AAC9E,QAAQ;AACR,8EAA8E;AAE9E;;aAEa;AACb,MAAM,GAAG,GAAG,QAAQ,CAAA;AACpB,gEAAgE;AAChE,MAAM,GAAG,GAAG,GAAG,GAAG,GAAG,CAAA;AACrB;;;;;;;;;GASG;AACH,MAAM,EA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}
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAWH,OAAO,EAGL,gBAAgB,EAIjB,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAWH,OAAO,EAGL,gBAAgB,EAIjB,MAAM,cAAc,CAAA;AAkCrB,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE;QAAE,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAA;IACzC,MAAM,EAAE;QAAE,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAA;CAC1C;AAED,MAAM,WAAW,aAAc,SAAQ,OAAO,CAAC,UAAU,CAAC;IACxD,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAA;IACvB,GAAG,CAAC,EAAE,MAAM,IAAI,CAAA;CACjB;AA24BD,wBAAsB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,GAAE,aAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,CAkEzF;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAA"}
|