fascicle 0.17.2 → 0.17.3
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/CHANGELOG.md +10 -0
- package/dist/AGENTS.md +9 -8
- package/dist/diagram_bin.js +33 -5
- package/dist/diagram_bin.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v0.17.3 — 2026-10-30
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- **`fascicle-diagram --outline` prints the plain `describe` outline.** The plain outline that `describe(step)` prints, with each node's kind, id, and config, was only reachable from code, so seeing it meant writing a script. `--outline` prints it from the terminal in place of the diagram, from the same module and export. It takes `--prefix`, and `--width`, `--replays`, and `--internals` with it are usage errors, since only the diagram reads them.
|
|
8
|
+
|
|
9
|
+
### Internal
|
|
10
|
+
|
|
11
|
+
- **Lesson 7 says why the solver needs a `diagram.ts`, and the roadmap is current to 0.17.2.** The lesson explains that `fascicle-diagram` can't build the solver from `flow.ts`, which wants an engine, or from `main.ts`, which would run it. The roadmap's Shipped list and near-term plans catch up with 0.17.2.
|
|
12
|
+
|
|
3
13
|
## v0.17.2 — 2026-10-28
|
|
4
14
|
|
|
5
15
|
### Changed
|
package/dist/AGENTS.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
This file is for a coding agent (Claude Code, Codex, Cursor, or another) that's
|
|
4
4
|
working in a project which uses the published `fascicle` package. A person who
|
|
5
5
|
is learning Fascicle will usually import it from their `CLAUDE.md`, as
|
|
6
|
-
[lesson 0](https://github.com/robmclarty/fascicle/blob/v0.17.
|
|
6
|
+
[lesson 0](https://github.com/robmclarty/fascicle/blob/v0.17.3/docs/learn/00-set-up.md) shows. Every shape, rule, and error message below
|
|
7
7
|
was checked against `fascicle` 0.16.3, and against 0.15.0 where the two differ,
|
|
8
8
|
except what's marked 0.17.0 and later, which was checked against 0.17.0. A rule
|
|
9
9
|
that a later release changes says what changed.
|
|
@@ -79,7 +79,8 @@ Two commands ship in the package: `fascicle-viewer <trajectory.jsonl>` and
|
|
|
79
79
|
`fascicle-diagram <module.ts>`, both run with `pnpm exec`. `fascicle-diagram`
|
|
80
80
|
reads the module's `flow` export, which is either a Step or a function with no
|
|
81
81
|
arguments that builds one, and it takes `--prefix ' * '`, `--width <n>`, and
|
|
82
|
-
`--export <name>`, plus `--internals` after 0.16.3
|
|
82
|
+
`--export <name>`, plus `--internals` after 0.16.3 and `--outline` after
|
|
83
|
+
0.17.2, which prints the plain `describe` outline instead of the diagram.
|
|
83
84
|
|
|
84
85
|
## The Core Vocabulary
|
|
85
86
|
|
|
@@ -396,11 +397,11 @@ describe('the calculator', () => {
|
|
|
396
397
|
|
|
397
398
|
## Where to Look Next
|
|
398
399
|
|
|
399
|
-
- [blueprint.md](https://github.com/robmclarty/fascicle/blob/v0.17.
|
|
400
|
-
- [leaf-arm-spine.md](https://github.com/robmclarty/fascicle/blob/v0.17.
|
|
400
|
+
- [blueprint.md](https://github.com/robmclarty/fascicle/blob/v0.17.3/docs/blueprint.md) for the layout of a growing app.
|
|
401
|
+
- [leaf-arm-spine.md](https://github.com/robmclarty/fascicle/blob/v0.17.3/docs/leaf-arm-spine.md) for choosing a primitive at each
|
|
401
402
|
layer.
|
|
402
|
-
- [composition.md](https://github.com/robmclarty/fascicle/blob/v0.17.
|
|
403
|
-
- [cookbook.md](https://github.com/robmclarty/fascicle/blob/v0.17.
|
|
403
|
+
- [composition.md](https://github.com/robmclarty/fascicle/blob/v0.17.3/docs/composition.md) for one line on every composer.
|
|
404
|
+
- [cookbook.md](https://github.com/robmclarty/fascicle/blob/v0.17.3/docs/cookbook.md) for worked patterns, including tool loops with
|
|
404
405
|
`define_tool`.
|
|
405
|
-
- [testing.md](https://github.com/robmclarty/fascicle/blob/v0.17.
|
|
406
|
-
- [troubleshooting.md](https://github.com/robmclarty/fascicle/blob/v0.17.
|
|
406
|
+
- [testing.md](https://github.com/robmclarty/fascicle/blob/v0.17.3/docs/testing.md) for the stand-in engines.
|
|
407
|
+
- [troubleshooting.md](https://github.com/robmclarty/fascicle/blob/v0.17.3/docs/troubleshooting.md) for errors and their causes.
|
package/dist/diagram_bin.js
CHANGED
|
@@ -10,13 +10,15 @@ import { parseArgs } from "node:util";
|
|
|
10
10
|
* fascicle-diagram <module> print the diagram of the module's `flow`
|
|
11
11
|
* fascicle-diagram <module> --export <name> read another export instead
|
|
12
12
|
*
|
|
13
|
-
* Flags: --export <name> --width <n> --prefix <text> --replays --internals --help
|
|
13
|
+
* Flags: --export <name> --width <n> --prefix <text> --replays --internals --outline --help
|
|
14
14
|
*
|
|
15
15
|
* The export is a Step, or a function that builds one with no arguments,
|
|
16
16
|
* which is where an app wires its flow to stub dependencies so that drawing
|
|
17
17
|
* it needs no credentials. The diagram is `describe.diagram` of that Step, so
|
|
18
18
|
* it is what the code builds today and can be compared with the header in
|
|
19
|
-
* `flow.ts` at a glance.
|
|
19
|
+
* `flow.ts` at a glance. `--outline` prints the plain `describe` outline
|
|
20
|
+
* instead, with each node's kind, id, and config, which is the view to read
|
|
21
|
+
* when the diagram hides something.
|
|
20
22
|
*
|
|
21
23
|
* This file holds every decision the command makes and touches nothing of
|
|
22
24
|
* the process: output and module loading arrive through `DiagramCliIo`.
|
|
@@ -38,8 +40,15 @@ Options:
|
|
|
38
40
|
--prefix <text> start every line with text, for example ' * '
|
|
39
41
|
--replays mark the steps a resumed run would pay for again
|
|
40
42
|
--internals draw a named composite's internal steps, not only its parts
|
|
43
|
+
--outline print describe()'s plain outline, with ids and config,
|
|
44
|
+
instead of the diagram (no --width, --replays, or --internals)
|
|
41
45
|
--help show this message
|
|
42
46
|
`;
|
|
47
|
+
const DIAGRAM_ONLY = [
|
|
48
|
+
"width",
|
|
49
|
+
"replays",
|
|
50
|
+
"internals"
|
|
51
|
+
];
|
|
43
52
|
/**
|
|
44
53
|
* Run the CLI over `argv` and resolve to its exit code: 0 once the diagram is
|
|
45
54
|
* printed, 1 when the module cannot be loaded or holds no Step, and 2 for a
|
|
@@ -56,7 +65,7 @@ async function run_diagram_cli(argv, io) {
|
|
|
56
65
|
io.err(`fascicle-diagram: ${parsed.message}\n\n${HELP}`);
|
|
57
66
|
return 2;
|
|
58
67
|
}
|
|
59
|
-
const { module, export_name, options } = parsed.args;
|
|
68
|
+
const { module, export_name, outline, options } = parsed.args;
|
|
60
69
|
const path = resolve(module);
|
|
61
70
|
let exports;
|
|
62
71
|
try {
|
|
@@ -82,13 +91,22 @@ async function run_diagram_cli(argv, io) {
|
|
|
82
91
|
io.err(`fascicle-diagram: ${export_name} in ${module} is not a Step: export the flow itself, or a function that builds it with no arguments\n`);
|
|
83
92
|
return 1;
|
|
84
93
|
}
|
|
85
|
-
|
|
94
|
+
const text = outline ? outline_of(flow, options.prefix) : describe.diagram(flow, options);
|
|
95
|
+
io.out(`${text}\n`);
|
|
86
96
|
return 0;
|
|
87
97
|
}
|
|
88
98
|
/**
|
|
99
|
+
* Render `describe`'s plain outline of `flow`, starting every line with
|
|
100
|
+
* `prefix` the way the diagram does.
|
|
101
|
+
*/
|
|
102
|
+
function outline_of(flow, prefix = "") {
|
|
103
|
+
return describe(flow).split("\n").map((line) => `${prefix}${line}`).join("\n");
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
89
106
|
* Parse argv into a run request, a help request, or a usage error. Unknown
|
|
90
107
|
* flags and a missing module are usage errors, and so is a width that is not
|
|
91
|
-
* a positive integer.
|
|
108
|
+
* a positive integer. `--outline` with an option that only the diagram reads
|
|
109
|
+
* is one too, since the outline would drop it without a word.
|
|
92
110
|
*/
|
|
93
111
|
function parse(argv) {
|
|
94
112
|
let parsed;
|
|
@@ -111,6 +129,14 @@ function parse(argv) {
|
|
|
111
129
|
kind: "usage",
|
|
112
130
|
message: `expected one <module>, got ${positionals.join(" ")}`
|
|
113
131
|
};
|
|
132
|
+
const outline = values.outline === true;
|
|
133
|
+
if (outline) {
|
|
134
|
+
const dropped = DIAGRAM_ONLY.filter((flag) => values[flag] !== void 0);
|
|
135
|
+
if (dropped.length > 0) return {
|
|
136
|
+
kind: "usage",
|
|
137
|
+
message: `--outline can't take ${dropped.map((flag) => `--${flag}`).join(", ")}, which only the diagram reads`
|
|
138
|
+
};
|
|
139
|
+
}
|
|
114
140
|
const options = {};
|
|
115
141
|
if (values.width !== void 0) {
|
|
116
142
|
const width = Number(values.width);
|
|
@@ -128,6 +154,7 @@ function parse(argv) {
|
|
|
128
154
|
args: {
|
|
129
155
|
module,
|
|
130
156
|
export_name: values.export ?? "flow",
|
|
157
|
+
outline,
|
|
131
158
|
options
|
|
132
159
|
}
|
|
133
160
|
};
|
|
@@ -146,6 +173,7 @@ function parse_flags(argv) {
|
|
|
146
173
|
prefix: { type: "string" },
|
|
147
174
|
replays: { type: "boolean" },
|
|
148
175
|
internals: { type: "boolean" },
|
|
176
|
+
outline: { type: "boolean" },
|
|
149
177
|
help: { type: "boolean" }
|
|
150
178
|
}
|
|
151
179
|
});
|
package/dist/diagram_bin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagram_bin.js","names":[],"sources":["../src/diagram_cli.ts","../src/diagram_bin.ts"],"sourcesContent":["/**\n * fascicle-diagram CLI.\n *\n * fascicle-diagram <module> print the diagram of the module's `flow`\n * fascicle-diagram <module> --export <name> read another export instead\n *\n * Flags: --export <name> --width <n> --prefix <text> --replays --internals --help\n *\n * The export is a Step, or a function that builds one with no arguments,\n * which is where an app wires its flow to stub dependencies so that drawing\n * it needs no credentials. The diagram is `describe.diagram` of that Step, so\n * it is what the code builds today and can be compared with the header in\n * `flow.ts` at a glance.\n *\n * This file holds every decision the command makes and touches nothing of\n * the process: output and module loading arrive through `DiagramCliIo`.\n * diagram_bin.ts binds that io to the real streams and to the project's\n * `tsx`, and is the entry that the package's bin shim runs.\n */\n\nimport { resolve } from 'node:path'\nimport { parseArgs } from 'node:util'\nimport { describe, is_step } from '#core'\nimport type { DiagramOptions } from '#core'\n\nexport type DiagramCliIo = {\n readonly out: (text: string) => void\n readonly err: (text: string) => void\n /** Import the module at an absolute path and return its exports. */\n readonly load: (path: string) => Promise<Readonly<Record<string, unknown>>>\n}\n\ntype CliArgs = {\n readonly module: string\n readonly export_name: string\n readonly options: DiagramOptions\n}\n\ntype Parsed =\n | { readonly kind: 'help' }\n | { readonly kind: 'usage'; readonly message: string }\n | { readonly kind: 'run'; readonly args: CliArgs }\n\nconst HELP = `\\\nfascicle-diagram prints a flow as an annotated box-drawing tree.\n\nUsage:\n fascicle-diagram <module> draw the module's \\`flow\\` export\n fascicle-diagram <module> --export <name> draw another export instead\n\nThe export is a Step, or a function that builds one with no arguments.\n\nOptions:\n --export <name> the export to draw (default flow)\n --width <n> wrap descriptions so no line runs wider than n\n --prefix <text> start every line with text, for example ' * '\n --replays mark the steps a resumed run would pay for again\n --internals draw a named composite's internal steps, not only its parts\n --help show this message\n`\n\n\n/**\n * Run the CLI over `argv` and resolve to its exit code: 0 once the diagram is\n * printed, 1 when the module cannot be loaded or holds no Step, and 2 for a\n * usage error. Output and loading go through `io`, so the caller owns the\n * process.\n */\nexport async function run_diagram_cli(argv: readonly string[], io: DiagramCliIo): Promise<number> {\n const parsed = parse(argv)\n if (parsed.kind === 'help') {\n io.out(HELP)\n return 0\n }\n if (parsed.kind === 'usage') {\n io.err(`fascicle-diagram: ${parsed.message}\\n\\n${HELP}`)\n return 2\n }\n const { module, export_name, options } = parsed.args\n const path = resolve(module)\n let exports: Readonly<Record<string, unknown>>\n try {\n exports = await io.load(path)\n } catch (err) {\n io.err(`fascicle-diagram: could not load ${module}: ${message_of(err)}\\n`)\n return 1\n }\n if (!Object.hasOwn(exports, export_name)) {\n const names = Object.keys(exports).join(', ') || 'nothing'\n io.err(\n `fascicle-diagram: ${module} has no export named ${export_name}: pass --export <name> (it exports ${names})\\n`,\n )\n return 1\n }\n let flow: unknown\n try {\n flow = await build(exports[export_name])\n } catch (err) {\n io.err(\n `fascicle-diagram: calling ${export_name}() in ${module} threw: ${message_of(err)}\\n` +\n 'Export a function that builds the flow with no arguments, wired to stub dependencies.\\n',\n )\n return 1\n }\n if (!is_step(flow)) {\n io.err(\n `fascicle-diagram: ${export_name} in ${module} is not a Step: export the flow itself, or a function that builds it with no arguments\\n`,\n )\n return 1\n }\n io.out(`${describe.diagram(flow, options)}\\n`)\n return 0\n}\n\n/**\n * Parse argv into a run request, a help request, or a usage error. Unknown\n * flags and a missing module are usage errors, and so is a width that is not\n * a positive integer.\n */\nfunction parse(argv: readonly string[]): Parsed {\n let parsed: ReturnType<typeof parse_flags>\n try {\n parsed = parse_flags(argv)\n } catch (err) {\n return { kind: 'usage', message: message_of(err) }\n }\n const { values, positionals } = parsed\n if (values.help === true) return { kind: 'help' }\n const [module, ...extra] = positionals\n if (module === undefined) return { kind: 'usage', message: 'a <module> to draw is required' }\n if (extra.length > 0) return { kind: 'usage', message: `expected one <module>, got ${positionals.join(' ')}` }\n const options: { width?: number; prefix?: string; replays?: boolean; internals?: boolean } = {}\n if (values.width !== undefined) {\n const width = Number(values.width)\n if (!Number.isInteger(width) || width <= 0) {\n return { kind: 'usage', message: `invalid --width '${values.width}': expected a positive integer` }\n }\n options.width = width\n }\n if (values.prefix !== undefined) options.prefix = values.prefix\n if (values.replays === true) options.replays = true\n if (values.internals === true) options.internals = true\n return { kind: 'run', args: { module, export_name: values.export ?? 'flow', options } }\n}\n\n/**\n * Read the CLI's flags with `node:util`'s strict parser, which throws on a\n * flag it does not know.\n */\nfunction parse_flags(argv: readonly string[]) {\n return parseArgs({\n args: [...argv],\n allowPositionals: true,\n options: {\n export: { type: 'string' },\n width: { type: 'string' },\n prefix: { type: 'string' },\n replays: { type: 'boolean' },\n internals: { type: 'boolean' },\n help: { type: 'boolean' },\n },\n })\n}\n\n/**\n * The Step an export stands for: the export itself, or what calling it with\n * no arguments returns (awaited, so an async builder works too).\n */\nasync function build(value: unknown): Promise<unknown> {\n return typeof value === 'function' ? await value() : value\n}\n\n/**\n * Render a thrown value as its message.\n */\nfunction message_of(err: unknown): string {\n return err instanceof Error ? err.message : String(err)\n}\n","/**\n * The process side of the fascicle-diagram bin: the real streams, and module\n * loading through the project's own `tsx`.\n *\n * Every decision the command makes lives in diagram_cli.ts, which is unit\n * tested through an injected io. This file only binds that io to the process,\n * so it is exercised by spawning it (__tests__/diagram_bin.test.ts) and kept\n * out of mutation testing, which cannot see a spawned child's coverage.\n *\n * A TypeScript module loads through `tsx` because Node's built-in type\n * stripping cannot follow the `./flow.js` specifiers that point at `.ts`\n * files under NodeNext resolution. Anything else, or a project without\n * `tsx`, goes through a plain `import()`.\n */\n\nimport { createRequire } from 'node:module'\nimport { resolve } from 'node:path'\nimport { fileURLToPath, pathToFileURL } from 'node:url'\nimport { run_diagram_cli } from './diagram_cli.js'\n\nconst TS_MODULE = /\\.[cm]?tsx?$/\n\n/**\n * Run the fascicle-diagram command over `argv` against the real process, and\n * leave its exit code on `process.exitCode`. A reader that closes the pipe\n * early (`| head`) ends the output quietly instead of crashing the command on\n * an unhandled EPIPE.\n */\nexport async function run_diagram_bin(argv: readonly string[]): Promise<void> {\n process.stdout.once('error', (err: NodeJS.ErrnoException) => {\n if (err.code !== 'EPIPE') throw err\n })\n process.exitCode = await run_diagram_cli(argv, {\n out: (text) => process.stdout.write(text),\n err: (text) => process.stderr.write(text),\n load: load_module,\n })\n}\n\n/**\n * Import the module at `path`. A TypeScript module goes through the `tsx`\n * that the project installs, looked up from the module's own directory and\n * then from the working directory. Everything else is a plain dynamic import.\n */\nasync function load_module(path: string): Promise<Readonly<Record<string, unknown>>> {\n const url = pathToFileURL(path).href\n if (!TS_MODULE.test(path)) return as_record(await import(url))\n const tsx = find_tsx([path, resolve('package.json')])\n if (tsx === undefined) return import_without_tsx(url)\n const api: unknown = await import(pathToFileURL(tsx).href)\n const ts_import = as_record(api)['tsImport']\n if (typeof ts_import !== 'function') return as_record(await import(url))\n return as_record(await ts_import(url, import.meta.url))\n}\n\n/**\n * Import a TypeScript module with Node's own type stripping, which handles\n * only erasable syntax and specifiers that name real files. A failure says\n * that tsx is the fix, since this path is taken only when none was found.\n */\nasync function import_without_tsx(url: string): Promise<Readonly<Record<string, unknown>>> {\n try {\n return as_record(await import(url))\n } catch (err) {\n const reason = err instanceof Error ? err.message : String(err)\n throw new Error(`${reason} (no tsx was found to load TypeScript: install it with pnpm add -D tsx)`, {\n cause: err,\n })\n }\n}\n\n/**\n * Resolve tsx's programmatic API from the first of `origins` that can see it,\n * or `undefined` when none can.\n */\nfunction find_tsx(origins: readonly string[]): string | undefined {\n for (const origin of origins) {\n try {\n return createRequire(origin).resolve('tsx/esm/api')\n } catch {\n // Not installed where this origin looks; try the next one.\n }\n }\n return undefined\n}\n\n/**\n * View a loaded module namespace as a record of its exports.\n */\nfunction as_record(value: unknown): Readonly<Record<string, unknown>> {\n return typeof value === 'object' && value !== null ? { ...value } : {}\n}\n\n// Auto-run only when this file is the entry script (`tsx src/diagram_bin.ts`),\n// never when the bundle that contains it is imported. The path comparison is\n// the same guard the viewer CLI uses.\nconst invoked_directly =\n process.argv[1] !== undefined && process.argv[1] === fileURLToPath(import.meta.url)\n\nif (invoked_directly) void run_diagram_bin(process.argv.slice(2))\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;AAyBb,eAAsB,gBAAgB,MAAyB,IAAmC;CAChG,MAAM,SAAS,MAAM,IAAI;CACzB,IAAI,OAAO,SAAS,QAAQ;EAC1B,GAAG,IAAI,IAAI;EACX,OAAO;CACT;CACA,IAAI,OAAO,SAAS,SAAS;EAC3B,GAAG,IAAI,qBAAqB,OAAO,QAAQ,MAAM,MAAM;EACvD,OAAO;CACT;CACA,MAAM,EAAE,QAAQ,aAAa,YAAY,OAAO;CAChD,MAAM,OAAO,QAAQ,MAAM;CAC3B,IAAI;CACJ,IAAI;EACF,UAAU,MAAM,GAAG,KAAK,IAAI;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AAK,IAAI,GAAG,OAAO,UAAU,MAAM,OAAO,IAAI;CAC7D,MAAM,MAAM,SAAS,CAAC,MAAM,QAAQ,cAAc,CAAC,CAAC;CACpD,IAAI,QAAQ,KAAA,GAAW,OAAO,mBAAmB,GAAG;CAEpD,MAAM,YAAY,UAAU,MADD,OAAO,cAAc,GAAG,CAAC,CAAC,KACtB,CAAC,CAAC;CACjC,IAAI,OAAO,cAAc,YAAY,OAAO,UAAU,MAAM,OAAO,IAAI;CACvE,OAAO,UAAU,MAAM,UAAU,KAAK,YAAY,GAAG,CAAC;AACxD;;;;;;AAOA,eAAe,mBAAmB,KAAyD;CACzF,IAAI;EACF,OAAO,UAAU,MAAM,OAAO,IAAI;CACpC,SAAS,KAAK;EACZ,MAAM,SAAS,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG;EAC9D,MAAM,IAAI,MAAM,GAAG,OAAO,0EAA0E,EAClG,OAAO,IACT,CAAC;CACH;AACF;;;;;AAMA,SAAS,SAAS,SAAgD;CAChE,KAAK,MAAM,UAAU,SACnB,IAAI;EACF,OAAO,cAAc,MAAM,CAAC,CAAC,QAAQ,aAAa;CACpD,QAAQ,CAER;AAGJ;;;;AAKA,SAAS,UAAU,OAAmD;CACpE,OAAO,OAAO,UAAU,YAAY,UAAU,OAAO,EAAE,GAAG,MAAM,IAAI,CAAC;AACvE;AAQA,IAFE,QAAQ,KAAK,OAAO,KAAA,KAAa,QAAQ,KAAK,OAAO,cAAc,YAAY,GAAG,GAE9D,gBAAqB,QAAQ,KAAK,MAAM,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"diagram_bin.js","names":[],"sources":["../src/diagram_cli.ts","../src/diagram_bin.ts"],"sourcesContent":["/**\n * fascicle-diagram CLI.\n *\n * fascicle-diagram <module> print the diagram of the module's `flow`\n * fascicle-diagram <module> --export <name> read another export instead\n *\n * Flags: --export <name> --width <n> --prefix <text> --replays --internals --outline --help\n *\n * The export is a Step, or a function that builds one with no arguments,\n * which is where an app wires its flow to stub dependencies so that drawing\n * it needs no credentials. The diagram is `describe.diagram` of that Step, so\n * it is what the code builds today and can be compared with the header in\n * `flow.ts` at a glance. `--outline` prints the plain `describe` outline\n * instead, with each node's kind, id, and config, which is the view to read\n * when the diagram hides something.\n *\n * This file holds every decision the command makes and touches nothing of\n * the process: output and module loading arrive through `DiagramCliIo`.\n * diagram_bin.ts binds that io to the real streams and to the project's\n * `tsx`, and is the entry that the package's bin shim runs.\n */\n\nimport { resolve } from 'node:path'\nimport { parseArgs } from 'node:util'\nimport { describe, is_step } from '#core'\nimport type { AnyStep, DiagramOptions } from '#core'\n\nexport type DiagramCliIo = {\n readonly out: (text: string) => void\n readonly err: (text: string) => void\n /** Import the module at an absolute path and return its exports. */\n readonly load: (path: string) => Promise<Readonly<Record<string, unknown>>>\n}\n\ntype CliArgs = {\n readonly module: string\n readonly export_name: string\n readonly outline: boolean\n readonly options: DiagramOptions\n}\n\ntype Parsed =\n | { readonly kind: 'help' }\n | { readonly kind: 'usage'; readonly message: string }\n | { readonly kind: 'run'; readonly args: CliArgs }\n\nconst HELP = `\\\nfascicle-diagram prints a flow as an annotated box-drawing tree.\n\nUsage:\n fascicle-diagram <module> draw the module's \\`flow\\` export\n fascicle-diagram <module> --export <name> draw another export instead\n\nThe export is a Step, or a function that builds one with no arguments.\n\nOptions:\n --export <name> the export to draw (default flow)\n --width <n> wrap descriptions so no line runs wider than n\n --prefix <text> start every line with text, for example ' * '\n --replays mark the steps a resumed run would pay for again\n --internals draw a named composite's internal steps, not only its parts\n --outline print describe()'s plain outline, with ids and config,\n instead of the diagram (no --width, --replays, or --internals)\n --help show this message\n`\n\n// The flags that only the diagram reads, which `--outline` refuses.\nconst DIAGRAM_ONLY = ['width', 'replays', 'internals'] as const\n\n/**\n * Run the CLI over `argv` and resolve to its exit code: 0 once the diagram is\n * printed, 1 when the module cannot be loaded or holds no Step, and 2 for a\n * usage error. Output and loading go through `io`, so the caller owns the\n * process.\n */\nexport async function run_diagram_cli(argv: readonly string[], io: DiagramCliIo): Promise<number> {\n const parsed = parse(argv)\n if (parsed.kind === 'help') {\n io.out(HELP)\n return 0\n }\n if (parsed.kind === 'usage') {\n io.err(`fascicle-diagram: ${parsed.message}\\n\\n${HELP}`)\n return 2\n }\n const { module, export_name, outline, options } = parsed.args\n const path = resolve(module)\n let exports: Readonly<Record<string, unknown>>\n try {\n exports = await io.load(path)\n } catch (err) {\n io.err(`fascicle-diagram: could not load ${module}: ${message_of(err)}\\n`)\n return 1\n }\n if (!Object.hasOwn(exports, export_name)) {\n const names = Object.keys(exports).join(', ') || 'nothing'\n io.err(\n `fascicle-diagram: ${module} has no export named ${export_name}: pass --export <name> (it exports ${names})\\n`,\n )\n return 1\n }\n let flow: unknown\n try {\n flow = await build(exports[export_name])\n } catch (err) {\n io.err(\n `fascicle-diagram: calling ${export_name}() in ${module} threw: ${message_of(err)}\\n` +\n 'Export a function that builds the flow with no arguments, wired to stub dependencies.\\n',\n )\n return 1\n }\n if (!is_step(flow)) {\n io.err(\n `fascicle-diagram: ${export_name} in ${module} is not a Step: export the flow itself, or a function that builds it with no arguments\\n`,\n )\n return 1\n }\n const text = outline ? outline_of(flow, options.prefix) : describe.diagram(flow, options)\n io.out(`${text}\\n`)\n return 0\n}\n\n/**\n * Render `describe`'s plain outline of `flow`, starting every line with\n * `prefix` the way the diagram does.\n */\nfunction outline_of(flow: AnyStep, prefix = ''): string {\n return describe(flow)\n .split('\\n')\n .map((line) => `${prefix}${line}`)\n .join('\\n')\n}\n\n/**\n * Parse argv into a run request, a help request, or a usage error. Unknown\n * flags and a missing module are usage errors, and so is a width that is not\n * a positive integer. `--outline` with an option that only the diagram reads\n * is one too, since the outline would drop it without a word.\n */\nfunction parse(argv: readonly string[]): Parsed {\n let parsed: ReturnType<typeof parse_flags>\n try {\n parsed = parse_flags(argv)\n } catch (err) {\n return { kind: 'usage', message: message_of(err) }\n }\n const { values, positionals } = parsed\n if (values.help === true) return { kind: 'help' }\n const [module, ...extra] = positionals\n if (module === undefined) return { kind: 'usage', message: 'a <module> to draw is required' }\n if (extra.length > 0) return { kind: 'usage', message: `expected one <module>, got ${positionals.join(' ')}` }\n const outline = values.outline === true\n if (outline) {\n const dropped = DIAGRAM_ONLY.filter((flag) => values[flag] !== undefined)\n if (dropped.length > 0) {\n const flags = dropped.map((flag) => `--${flag}`).join(', ')\n return { kind: 'usage', message: `--outline can't take ${flags}, which only the diagram reads` }\n }\n }\n const options: { width?: number; prefix?: string; replays?: boolean; internals?: boolean } = {}\n if (values.width !== undefined) {\n const width = Number(values.width)\n if (!Number.isInteger(width) || width <= 0) {\n return { kind: 'usage', message: `invalid --width '${values.width}': expected a positive integer` }\n }\n options.width = width\n }\n if (values.prefix !== undefined) options.prefix = values.prefix\n if (values.replays === true) options.replays = true\n if (values.internals === true) options.internals = true\n return { kind: 'run', args: { module, export_name: values.export ?? 'flow', outline, options } }\n}\n\n/**\n * Read the CLI's flags with `node:util`'s strict parser, which throws on a\n * flag it does not know.\n */\nfunction parse_flags(argv: readonly string[]) {\n return parseArgs({\n args: [...argv],\n allowPositionals: true,\n options: {\n export: { type: 'string' },\n width: { type: 'string' },\n prefix: { type: 'string' },\n replays: { type: 'boolean' },\n internals: { type: 'boolean' },\n outline: { type: 'boolean' },\n help: { type: 'boolean' },\n },\n })\n}\n\n/**\n * The Step an export stands for: the export itself, or what calling it with\n * no arguments returns (awaited, so an async builder works too).\n */\nasync function build(value: unknown): Promise<unknown> {\n return typeof value === 'function' ? await value() : value\n}\n\n/**\n * Render a thrown value as its message.\n */\nfunction message_of(err: unknown): string {\n return err instanceof Error ? err.message : String(err)\n}\n","/**\n * The process side of the fascicle-diagram bin: the real streams, and module\n * loading through the project's own `tsx`.\n *\n * Every decision the command makes lives in diagram_cli.ts, which is unit\n * tested through an injected io. This file only binds that io to the process,\n * so it is exercised by spawning it (__tests__/diagram_bin.test.ts) and kept\n * out of mutation testing, which cannot see a spawned child's coverage.\n *\n * A TypeScript module loads through `tsx` because Node's built-in type\n * stripping cannot follow the `./flow.js` specifiers that point at `.ts`\n * files under NodeNext resolution. Anything else, or a project without\n * `tsx`, goes through a plain `import()`.\n */\n\nimport { createRequire } from 'node:module'\nimport { resolve } from 'node:path'\nimport { fileURLToPath, pathToFileURL } from 'node:url'\nimport { run_diagram_cli } from './diagram_cli.js'\n\nconst TS_MODULE = /\\.[cm]?tsx?$/\n\n/**\n * Run the fascicle-diagram command over `argv` against the real process, and\n * leave its exit code on `process.exitCode`. A reader that closes the pipe\n * early (`| head`) ends the output quietly instead of crashing the command on\n * an unhandled EPIPE.\n */\nexport async function run_diagram_bin(argv: readonly string[]): Promise<void> {\n process.stdout.once('error', (err: NodeJS.ErrnoException) => {\n if (err.code !== 'EPIPE') throw err\n })\n process.exitCode = await run_diagram_cli(argv, {\n out: (text) => process.stdout.write(text),\n err: (text) => process.stderr.write(text),\n load: load_module,\n })\n}\n\n/**\n * Import the module at `path`. A TypeScript module goes through the `tsx`\n * that the project installs, looked up from the module's own directory and\n * then from the working directory. Everything else is a plain dynamic import.\n */\nasync function load_module(path: string): Promise<Readonly<Record<string, unknown>>> {\n const url = pathToFileURL(path).href\n if (!TS_MODULE.test(path)) return as_record(await import(url))\n const tsx = find_tsx([path, resolve('package.json')])\n if (tsx === undefined) return import_without_tsx(url)\n const api: unknown = await import(pathToFileURL(tsx).href)\n const ts_import = as_record(api)['tsImport']\n if (typeof ts_import !== 'function') return as_record(await import(url))\n return as_record(await ts_import(url, import.meta.url))\n}\n\n/**\n * Import a TypeScript module with Node's own type stripping, which handles\n * only erasable syntax and specifiers that name real files. A failure says\n * that tsx is the fix, since this path is taken only when none was found.\n */\nasync function import_without_tsx(url: string): Promise<Readonly<Record<string, unknown>>> {\n try {\n return as_record(await import(url))\n } catch (err) {\n const reason = err instanceof Error ? err.message : String(err)\n throw new Error(`${reason} (no tsx was found to load TypeScript: install it with pnpm add -D tsx)`, {\n cause: err,\n })\n }\n}\n\n/**\n * Resolve tsx's programmatic API from the first of `origins` that can see it,\n * or `undefined` when none can.\n */\nfunction find_tsx(origins: readonly string[]): string | undefined {\n for (const origin of origins) {\n try {\n return createRequire(origin).resolve('tsx/esm/api')\n } catch {\n // Not installed where this origin looks; try the next one.\n }\n }\n return undefined\n}\n\n/**\n * View a loaded module namespace as a record of its exports.\n */\nfunction as_record(value: unknown): Readonly<Record<string, unknown>> {\n return typeof value === 'object' && value !== null ? { ...value } : {}\n}\n\n// Auto-run only when this file is the entry script (`tsx src/diagram_bin.ts`),\n// never when the bundle that contains it is imported. The path comparison is\n// the same guard the viewer CLI uses.\nconst invoked_directly =\n process.argv[1] !== undefined && process.argv[1] === fileURLToPath(import.meta.url)\n\nif (invoked_directly) void run_diagram_bin(process.argv.slice(2))\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;AAqBb,MAAM,eAAe;CAAC;CAAS;CAAW;AAAW;;;;;;;AAQrD,eAAsB,gBAAgB,MAAyB,IAAmC;CAChG,MAAM,SAAS,MAAM,IAAI;CACzB,IAAI,OAAO,SAAS,QAAQ;EAC1B,GAAG,IAAI,IAAI;EACX,OAAO;CACT;CACA,IAAI,OAAO,SAAS,SAAS;EAC3B,GAAG,IAAI,qBAAqB,OAAO,QAAQ,MAAM,MAAM;EACvD,OAAO;CACT;CACA,MAAM,EAAE,QAAQ,aAAa,SAAS,YAAY,OAAO;CACzD,MAAM,OAAO,QAAQ,MAAM;CAC3B,IAAI;CACJ,IAAI;EACF,UAAU,MAAM,GAAG,KAAK,IAAI;CAC9B,SAAS,KAAK;EACZ,GAAG,IAAI,oCAAoC,OAAO,IAAI,WAAW,GAAG,EAAE,GAAG;EACzE,OAAO;CACT;CACA,IAAI,CAAC,OAAO,OAAO,SAAS,WAAW,GAAG;EACxC,MAAM,QAAQ,OAAO,KAAK,OAAO,CAAC,CAAC,KAAK,IAAI,KAAK;EACjD,GAAG,IACD,qBAAqB,OAAO,uBAAuB,YAAY,qCAAqC,MAAM,IA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@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fascicle",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.3",
|
|
4
4
|
"description": "Compose agents like plain values. A TypeScript toolkit that wires LLM calls, tools, and functions into typed steps over eight providers. No framework, no ambient state.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agents",
|