flagstaff 1.7.2 → 1.7.4
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 +5 -5
- package/dist/boxen.d.ts +0 -7
- package/dist/cli-table3.d.ts +0 -7
- package/dist/cli.js +7 -2
- package/dist/import.d.ts +0 -15
- package/dist/index.d.ts +0 -6
- package/dist/link.d.ts +0 -17
- package/dist/plugin.d.ts +0 -10
- package/dist/progress.d.ts +0 -10
- package/dist/projection.d.ts +0 -20
- package/dist/schema.json +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -362,14 +362,14 @@ restore-cursor, onetime, mimic-function, signal-exit, is-interactive, is-unicode
|
|
|
362
362
|
stdin-discarder, yoctocolors, strip-ansi, ansi-regex, get-east-asian-width. `flagstaff/ora`
|
|
363
363
|
is 55,641 B across **two** — itself and roundel — **49% of ora's**, and 20,250 B of that is
|
|
364
364
|
the spinner corpus ora's API re-exports. Nothing in it reaches the frame loop, so a program
|
|
365
|
-
that migrates its spinner today can adopt `hoist()` a file at a time, or never.
|
|
365
|
+
that migrates its spinner today can adopt `hoist()` a file at a time, or never ([measured](https://burgee.interlace.tools/docs/benchmarks)).
|
|
366
366
|
|
|
367
367
|
Both sides are counted the same way, so the number reproduces: shipped code and data —
|
|
368
368
|
`.js`/`.mjs`/`.cjs` plus the `.json` a module imports, `package.json` never counted. Ours is
|
|
369
369
|
the import graph walked from `dist/` by `weight.test.ts`; ora's is every package that graph
|
|
370
370
|
touches in ora's own resolved tree, counted whole. Counting ora the stricter way — only the
|
|
371
371
|
27 files its graph actually reaches — gives 101,809 B, and `flagstaff/ora` is still 55% of
|
|
372
|
-
that.
|
|
372
|
+
that ([measured](https://burgee.interlace.tools/docs/benchmarks)).
|
|
373
373
|
|
|
374
374
|
The cursor comes back the way ora's does. A spinner that hid the cursor restores it on a
|
|
375
375
|
clean exit **and** on `SIGINT`, `SIGTERM` and `SIGHUP` — node does not run `'exit'`
|
|
@@ -412,7 +412,7 @@ so clipping a frame to the terminal's height is an array slice. `signal-exit`, 2
|
|
|
412
412
|
those sixteen, is `closeout`'s to own, shared with the ora façade because both
|
|
413
413
|
incumbents port the same `cli-cursor` → `restore-cursor` → `signal-exit` chain. Ctrl+C
|
|
414
414
|
mid-frame puts your cursor back, and still terminates — unless your program installed its
|
|
415
|
-
own `SIGINT` handler, in which case it is delivered once, to you, and this stays out of it.
|
|
415
|
+
own `SIGINT` handler, in which case it is delivered once, to you, and this stays out of it ([measured](https://burgee.interlace.tools/docs/benchmarks)).
|
|
416
416
|
|
|
417
417
|
**This is the one façade that lowers a layer guarantee, and it says so.** R5 — no cursor
|
|
418
418
|
escape off a terminal — cannot survive here: log-update's own suite asserts erase sequences
|
|
@@ -495,7 +495,7 @@ roundel counted, against boxen 9's own 114.9 KB across fourteen; `flagstaff/cli-
|
|
|
495
495
|
`width.js`, and the first two share `closeout`; none reaches another's port, and none
|
|
496
496
|
reaches the core. `sideEffects: false` lets a
|
|
497
497
|
bundler drop what a program does not use. ESM with a `default` condition, so
|
|
498
|
-
`require('flagstaff/spinner')` works from CommonJS on Node 20.19+ and 22.13
|
|
498
|
+
`require('flagstaff/spinner')` works from CommonJS on Node 20.19+ and 22.13+ ([measured](https://burgee.interlace.tools/docs/benchmarks)).
|
|
499
499
|
|
|
500
500
|
## Benchmarks
|
|
501
501
|
|
|
@@ -572,7 +572,7 @@ keeps both true.
|
|
|
572
572
|
| Package | What it is | Migrates from |
|
|
573
573
|
| :-- | :-- | :-- |
|
|
574
574
|
| [burgee](https://burgee.interlace.tools/docs/packages/burgee) | The CLI framework: one declaration, every surface | commander, yargs and meow |
|
|
575
|
-
| [roundel](https://roundel.interlace.tools/docs) | Colour: one output policy, semantic tokens, a theme | chalk
|
|
575
|
+
| [roundel](https://roundel.interlace.tools/docs) | Colour: one output policy, semantic tokens, a theme | chalk, colorette, kleur, picocolors, supports-color and yoctocolors |
|
|
576
576
|
| **flagstaff** (this package) | The frame loop: spinners, progress, boxes and tables | ora, log-update, boxen and cli-table3 |
|
|
577
577
|
| [caique](https://caique.interlace.tools/docs) | Prompts that are flags first, and never hang | @inquirer/core |
|
|
578
578
|
| [linegauge](https://linegauge.interlace.tools/docs) | Measuring, wrapping, truncating and slicing styled text | string-width, wrap-ansi, strip-ansi, slice-ansi, cli-truncate and widest-line |
|
package/dist/boxen.d.ts
CHANGED
|
@@ -56,12 +56,5 @@ export type CustomBorderStyle = BoxenBorderStyle;
|
|
|
56
56
|
export type Boxes = typeof BOXES;
|
|
57
57
|
/**
|
|
58
58
|
* Draw a box around `text`, exactly as boxen 9 draws it.
|
|
59
|
-
*
|
|
60
|
-
* An invalid colour throws rather than drawing something plausible, because boxen throws: a
|
|
61
|
-
* colour name that is not one is a typo, and a box drawn in the wrong colour is a bug somebody
|
|
62
|
-
* ships.
|
|
63
|
-
*
|
|
64
|
-
* `import boxen from 'boxen'` is the incumbent's surface. A named export here would break
|
|
65
|
-
* every migration this file exists to serve, so the house rule yields to the host.
|
|
66
59
|
*/
|
|
67
60
|
export default function boxen(input: string, options?: BoxenOptions): string;
|
package/dist/cli-table3.d.ts
CHANGED
|
@@ -8,13 +8,6 @@ export declare function wordWrap(maxLength: number, input: string, wrapOnWordBou
|
|
|
8
8
|
* OSC 8 — the terminal hyperlink escape, and **not this package's to spell** (R12). The
|
|
9
9
|
* sequence is paratext's `link` capability rendered against {@link EMITTING}; this function
|
|
10
10
|
* contributes the argument order and upstream's `url || text`, and nothing else.
|
|
11
|
-
*
|
|
12
|
-
* Upstream's `hyperlink()` is an escape *builder*, not a policy decision: `utils-test.js`
|
|
13
|
-
* grades its exact bytes with no terminal anywhere in the call, and a cell given an `href`
|
|
14
|
-
* gets a sequence whatever `process.stdout` is. So this stays unconditional — the caller
|
|
15
|
-
* already decided — and the runtime handed to paratext says so out loud. `flagstaff/table`
|
|
16
|
-
* is the surface that *asks* whether the terminal can (rule 6); a façade that started asking
|
|
17
|
-
* would be reinterpreting its host, and `link.test.ts` pins these bytes against upstream's.
|
|
18
11
|
*/
|
|
19
12
|
export declare function hyperlink(url: string, text: string): string;
|
|
20
13
|
export interface TableChars {
|
package/dist/cli.js
CHANGED
|
@@ -6,6 +6,12 @@ import { hoist, manualClock } from './loop.js';
|
|
|
6
6
|
import { PluginError, register, registered } from './plugin.js';
|
|
7
7
|
import { processRuntime } from './runtime.js';
|
|
8
8
|
import { spinner } from './spinner.js';
|
|
9
|
+
async function load(path) {
|
|
10
|
+
if (path.endsWith('.json'))
|
|
11
|
+
return JSON.parse(new TextDecoder().decode(readFileSync(path)));
|
|
12
|
+
const loaded = (await import(pathToFileURL(path).href));
|
|
13
|
+
return loaded.default ?? loaded;
|
|
14
|
+
}
|
|
9
15
|
const rt = processRuntime();
|
|
10
16
|
const MODES = ['tty', 'pipe', 'ci', 'json', 'accessible'];
|
|
11
17
|
const ENV = { tty: {}, pipe: {}, ci: { CI: 'true' }, json: {}, accessible: { CLI_ACCESSIBLE: '1' } };
|
|
@@ -110,8 +116,7 @@ async function main(argv, write) {
|
|
|
110
116
|
if (typeof file === 'number')
|
|
111
117
|
return file;
|
|
112
118
|
const before = new Set(registered().plugins);
|
|
113
|
-
const
|
|
114
|
-
const plugin = loaded.default ?? loaded;
|
|
119
|
+
const plugin = await load(resolve(file));
|
|
115
120
|
register(plugin);
|
|
116
121
|
const { name, spinners = {}, components = {} } = plugin;
|
|
117
122
|
const { line, total } = census(plugin);
|
package/dist/import.d.ts
CHANGED
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `flagstaff/import` (R11) — the two data corpora the ecosystem already has, as plugins.
|
|
3
|
-
*
|
|
4
|
-
* cli-spinners ships ~80 spinner styles and cli-boxes ships eight border sets, both as
|
|
5
|
-
* plain JSON that thousands of programs already depend on. Neither is bundled here: the
|
|
6
|
-
* weight of a corpus nobody asked for is exactly what U5 is about, and a caller who wants
|
|
7
|
-
* one already has it on disk. So these take the JSON and hand back a plugin:
|
|
8
|
-
*
|
|
9
3
|
* ```js
|
|
10
4
|
* import cliSpinners from 'cli-spinners';
|
|
11
5
|
* import { fromCliSpinners } from 'flagstaff/import';
|
|
@@ -14,10 +8,6 @@
|
|
|
14
8
|
* register(fromCliSpinners(cliSpinners));
|
|
15
9
|
* spinner('moon');
|
|
16
10
|
* ```
|
|
17
|
-
*
|
|
18
|
-
* The result is an ordinary plugin — it goes through the same `register()`, is validated
|
|
19
|
-
* against the same schema, and can be replaced by another. That is the point: the gallery
|
|
20
|
-
* opens full, and a third-party plugin starts as a copy of one of these.
|
|
21
11
|
*/
|
|
22
12
|
import { type BorderStyle, type Plugin } from './plugin.js';
|
|
23
13
|
/** cli-spinners' shape: no `static`, because it has no projection for a pipe. */
|
|
@@ -33,11 +23,6 @@ export interface FromCliSpinnersOptions {
|
|
|
33
23
|
/**
|
|
34
24
|
* The static projection for a style, given its name and its frames. Default: `'…'` for
|
|
35
25
|
* every one of them.
|
|
36
|
-
*
|
|
37
|
-
* The design sketched "the first frame" here, and that turned out to be wrong when it met
|
|
38
|
-
* the corpus: a frozen `⠋` or `▰` is an animation stopped mid-stride, not a projection —
|
|
39
|
-
* it tells a pipe, an agent and a screen reader nothing that `…` does not tell them
|
|
40
|
-
* better. The parameter exists because it is the author's call, not this function's.
|
|
41
26
|
*/
|
|
42
27
|
staticFor?: (name: string, spinner: CliSpinner) => string;
|
|
43
28
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* flagstaff — the staff the flag flies from. Re-exports only; each subpath is its own entry
|
|
3
3
|
* and costs only itself, so prefer `flagstaff/spinner` when that is all you need.
|
|
4
|
-
*
|
|
5
|
-
* `./loop.js` is first on purpose. esbuild emits modules in import order, and its renamer hands
|
|
6
|
-
* out the one-character names in that order, so `import { hoist } from 'flagstaff'` came out 2
|
|
7
|
-
* bytes off the same import from `flagstaff/loop` once the loop reached `linegauge` through
|
|
8
|
-
* `box.js`'s edge before its own. Same code, different names: `tree-shake-fixture.test.ts`
|
|
9
|
-
* holds the two equal, and loop-first keeps them equal.
|
|
10
4
|
*/
|
|
11
5
|
export * from './loop.js';
|
|
12
6
|
export * from './box.js';
|
package/dist/link.d.ts
CHANGED
|
@@ -1,22 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The one place this package reaches OSC 8, and it does not implement it (R12).
|
|
3
|
-
*
|
|
4
|
-
* **Why `paratext/link` and not `paratext`.** The root entry reaches 20,221 B across ten
|
|
5
|
-
* modules and calls `registerBuiltins()` at import — a side effect, in a package that declares
|
|
6
|
-
* `sideEffects: false` so a bundler may drop what a program does not use. `paratext/link` is
|
|
7
|
-
* **2,410 B across four modules and registers nothing**, and it carries the whole of what the
|
|
8
|
-
* built-ins need: the guess (`supportsLink`), the bytes (`linkFor`) and the capability record.
|
|
9
|
-
* The 17,811 B difference would land on `flagstaff/table`, whose entire budget is 4,000 B, so
|
|
10
|
-
* this was not a close call — but it was measured rather than assumed, which is the rule.
|
|
11
|
-
* What the narrow entry gives up is the registry: a host that re-registered `link` to correct
|
|
12
|
-
* paratext's guess does not change what a box or a table emits. A program that needs that
|
|
13
|
-
* imports `paratext` and calls `emit()` itself.
|
|
14
|
-
*
|
|
15
|
-
* **What this module is allowed to decide: nothing.** `supportsLink` is asked, never
|
|
16
|
-
* re-derived — `box.ts` and `table.ts` read `live` to choose a *layout* (a url that is about
|
|
17
|
-
* to be carried by an escape must not also be carried by the columns), and `paint` for the
|
|
18
|
-
* bytes. Neither file names `isTTY`, `TERM`, or an escape. PRINCIPLES rule 6 is therefore
|
|
19
|
-
* paratext's to keep, and `link.test.ts` checks it was kept.
|
|
20
3
|
*/
|
|
21
4
|
import { linkFor } from 'paratext/link';
|
|
22
5
|
/**
|
package/dist/plugin.d.ts
CHANGED
|
@@ -49,16 +49,6 @@ export interface Plugin {
|
|
|
49
49
|
* `flagstaff check` adds for what only a renderer can discover: a plugin that validates but
|
|
50
50
|
* contributes nothing renderable, and a component whose `static` throws on the state it is
|
|
51
51
|
* shown with.
|
|
52
|
-
*
|
|
53
|
-
* The last two lived as bare string literals in `cli.ts` until 2026-09-09, which is exactly
|
|
54
|
-
* the hole R8 exists to close: a second host could spell `E_COMPONENT_THREW` its own way and
|
|
55
|
-
* nothing would notice. `scripts/plugin-error-vocabulary-lock.test.ts` now reads this
|
|
56
|
-
* declaration out of the source and refuses any `'E_…'` literal in a host that is not in it.
|
|
57
|
-
*
|
|
58
|
-
* It stays a *type* rather than a `const` array on purpose. R3 forbids one layer importing
|
|
59
|
-
* another, so a runtime list could not be shared with roundel or caique even if it existed —
|
|
60
|
-
* the lock has to read the source to work across the family, and it does. A `const` array
|
|
61
|
-
* would therefore buy nothing and cost ~195 B on `./spinner`, which has 82 B of headroom.
|
|
62
52
|
*/
|
|
63
53
|
export type PluginErrorCode = 'E_PLUGIN_SCHEMA' | 'E_NO_STATIC_PROJECTION' | 'E_PLUGIN_CONTRACT' | 'E_UNKNOWN_SPINNER' | 'E_UNKNOWN_BORDER' | 'E_NO_CONTRIBUTION' | 'E_COMPONENT_THREW' | 'E_UNKNOWN_KIND';
|
|
64
54
|
/** A refused plugin says what is wrong, where, and what to do about it. */
|
package/dist/progress.d.ts
CHANGED
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The progress bar, which reports to an MCP client instead of drawing when it runs inside a
|
|
3
3
|
* burgee `--mcp` tool call that asked for progress (mcp-current R5).
|
|
4
|
-
*
|
|
5
|
-
* A bar drawn into an agent's tool result is noise the agent has to read past; the same count
|
|
6
|
-
* sent as `notifications/progress` is what the client shows its user while the call runs. burgee's
|
|
7
|
-
* server publishes the call it is serving under `Symbol.for('burgee.mcp')`, and its `progress` is
|
|
8
|
-
* the call's `ctx.progress`: it sends with the call's token, and drops a value that does not rise.
|
|
9
|
-
* So the bar reads the symbol on every render, not once, and imports nothing of burgee's.
|
|
10
|
-
* Anywhere else — no server, or a call without a `progressToken` — it draws as it always has.
|
|
11
|
-
*
|
|
12
|
-
* Only this subpath carries the bridge. The root `flagstaff` entry's `progress` always draws:
|
|
13
|
-
* every flagstaff user pays for the root, and only a program served over MCP needs this.
|
|
14
4
|
*/
|
|
15
5
|
import { type Component } from './plugin.js';
|
|
16
6
|
import { type ProgressOptions, type ProgressState } from './progress-bar.js';
|
package/dist/projection.d.ts
CHANGED
|
@@ -31,12 +31,6 @@ export declare const DEFAULT_INTERVAL = 80;
|
|
|
31
31
|
* line, and writes only what changed since the last paint, wrapped in synchronized output;
|
|
32
32
|
* a frame identical to the last writes nothing. `release` forgets the painted frame without
|
|
33
33
|
* erasing it: what is on screen becomes scrollback, and the next paint starts at the cursor.
|
|
34
|
-
*
|
|
35
|
-
* Between paints the cursor rests at the end of the frame's last row, which is where the
|
|
36
|
-
* hoisted projection has always left it. A frame taller than the terminal cannot be reached
|
|
37
|
-
* above its top row, so one is clipped (frames-fit-the-screen R2): its tail, the lines that
|
|
38
|
-
* change, under one dim `… N more` line. `release` then writes the whole frame once, because
|
|
39
|
-
* a final write needs no repaint, so nothing the frame held is lost to the clip.
|
|
40
34
|
*/
|
|
41
35
|
export interface FrameWriter {
|
|
42
36
|
paint(lines: readonly string[]): void;
|
|
@@ -47,20 +41,6 @@ export declare function frameWriter(out: Writer): FrameWriter;
|
|
|
47
41
|
export declare function ttyProjection<S>(component: Component<S>, out: Writer, clock: Clock): Projection<S>;
|
|
48
42
|
/**
|
|
49
43
|
* A pipe, CI, or a screen reader: the static projection, once per change, and nothing else.
|
|
50
|
-
*
|
|
51
|
-
* "Once per change" is finer than "when the text differs". A component whose projection is
|
|
52
|
-
* a list — `tasks`, whose static is every task that has settled — grows it a line at a
|
|
53
|
-
* time, and printing the whole list on every change repeats every line already in the log:
|
|
54
|
-
*
|
|
55
|
-
* ✔ install ← install settled
|
|
56
|
-
* ✔ install ← build settled, and install is printed again
|
|
57
|
-
* ✔ build
|
|
58
|
-
*
|
|
59
|
-
* So what is written is the lines *past the common prefix* with what was written last. A
|
|
60
|
-
* component whose text replaces itself rather than growing shares no prefix and is printed
|
|
61
|
-
* whole, which is the ordinary case; one that grows is appended to, which is what a log
|
|
62
|
-
* wants. An empty projection writes nothing at all — a component with nothing to say yet
|
|
63
|
-
* should not cost a blank line.
|
|
64
44
|
*/
|
|
65
45
|
export declare function staticProjection<S>(component: Component<S>, out: Writer): Projection<S>;
|
|
66
46
|
/** `--json`: one NDJSON event per transition on stderr, so stdout stays the envelope's (R1). */
|
package/dist/schema.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://github.com/ofri-peretz/burgee/blob/main/packages/flagstaff/src/schema.json","title":"flagstaff plugin","description":"A plugin is one plain object. Everything in it is data that can be read without running it; the only functions allowed are a component's `static` (required) and `frame` (optional). A spinner or component without a static projection is refused at register().","type":"object","required":["name"],"additionalProperties":true,"properties":{"name":{"type":"string","minLength":1,"description":"The plugin's name; also the prefix a host may use when two plugins contribute the same key."},"contract":{"type":"integer","minimum":1,"description":"The plugin contract this object follows: `1` today. A host refuses a newer contract than it knows, and burgee also refuses a plugin that declares none — `definePlugin` stamps it, a plain object writes `contract: 1`."},"tokens":{"type":"object","description":"A roundel theme: semantic token name to a hex colour, contrast-checked when flown.","additionalProperties":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"propertyNames":{"enum":["error","warn","ok","hint","muted","command","flag","value","heading","ground"],"description":"roundel's ten semantic tokens, and nothing else — `roundel`'s own validate() refuses any other name."}},"glyphs":{"type":"object","description":"Symbols by meaning: `ok`, `fail`, `warn`, `info`, `running`. A plugin that ships glyphs changes every built-in that draws one.","additionalProperties":{"type":"string","minLength":1}},"spinners":{"type":"object","description":"Spinner styles by name, in cli-spinners' shape plus the static projection.","additionalProperties":{"$ref":"#/$defs/spinner"}},"borders":{"type":"object","description":"Border styles a box can be drawn with, by name.","additionalProperties":{"$ref":"#/$defs/border"}},"components":{"type":"object","description":"Components by name: `static(state)` returns the text a pipe, an agent or a screen reader gets; `frame(t, state)` is the optional animated form.","additionalProperties":{"$ref":"#/$defs/component"}},"capabilities":{"$ref":"#/$defs/capabilities"},"widths":{"$ref":"#/$defs/widths"},"resolvers":{"type":"object","description":"bellpull resolvers by name: extra directories searched for an executable, before PATH (negative rank) or after it (positive). Two resolvers with one name shadow; two names both apply, in rank order.","additionalProperties":{"$ref":"#/$defs/resolver"}},"widgets":{"type":"object","description":"caique prompt widgets by kind. The six built-in kinds — text, confirm, select, multiselect, password, path — cannot be replaced: a plugin adds kinds of its own.","additionalProperties":{"$ref":"#/$defs/widget"}},"handlers":{"type":"array","description":"closeout exit handlers. The phase decides the order they run in, not their position in this list.","items":{"$ref":"#/$defs/handler"}},"sources":{"type":"object","description":"seniority configuration sources by name, ranked against the built-in layers: a flag is 0 and a declared default is 40, and a plugin source sits strictly between.","additionalProperties":{"$ref":"#/$defs/source"}},"commands":{"type":"array","description":"burgee commands this plugin contributes. Each is read by exactly the code a program's own command is, and a burgee plugin must declare `contract`.","items":{"$ref":"#/$defs/command"}},"hooks":{"type":"object","description":"burgee lifecycle hooks. parse rewrites argv before a command is resolved; preRun opens around a command, and exactly one of postRun or onError closes; shutdown fires once as the program leaves, by any path.","additionalProperties":false,"properties":{"parse":{"$ref":"#/$defs/hook"},"preRun":{"$ref":"#/$defs/hook"},"postRun":{"$ref":"#/$defs/hook"},"onError":{"$ref":"#/$defs/hook"},"shutdown":{"$ref":"#/$defs/hook"}}},"enforce":{"type":"string","pattern":"^(pre|post)$","description":"burgee: order this plugin's hooks before (`pre`) or after (`post`) the others."},"locales":{"type":"object","description":"burgee locale packs (localised-human-surfaces R4): a BCP 47 language tag, as Intl.Locale writes it, mapped to catalog ids and their translations. A message is a string, or for a message whose English carries a count placeholder, one string per plural form Intl.PluralRules selects for the locale. burgee/locale-pack-schema.json lists every id with its English; `burgee check` renders a pack or refuses it.","propertyNames":{"pattern":"^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$"},"additionalProperties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","propertyNames":{"enum":["zero","one","two","few","many","other"]},"required":["other"],"additionalProperties":{"type":"string"}}]}}},"keymaps":{"$ref":"#/$defs/keymaps"},"panes":{"$ref":"#/$defs/panes"}},"$defs":{"spinner":{"type":"object","required":["frames","interval","static"],"properties":{"frames":{"type":"array","items":{"type":"string"},"minItems":1},"interval":{"type":"integer","minimum":1,"description":"Milliseconds between frames on a terminal."},"static":{"type":"string","description":"What a pipe prints instead of the animation."}}},"component":{"type":"object","required":["static"],"properties":{"static":{"description":"(state) => string. Required: the projection every non-terminal mode prints."},"frame":{"description":"(t, state) => string. Optional: the frame at t milliseconds since hoisting."},"sample":{"type":"object","required":["running","done"],"description":"Two states to *show* this component with: `flagstaff check` and the docs gallery render `running` then `done`. Omitted, they assume `{ phase: 'running' }` and `{ phase: 'done' }` and say so in the output. The loop never reads it — a running program's state comes from the program.","properties":{"running":{"description":"The state to open with."},"done":{"description":"The state to close with."}}},"interval":{"type":"integer","minimum":1,"description":"Milliseconds between repaints when `frame` is given; 80 when omitted."}}},"border":{"type":"object","required":["topLeft","top","topRight","left","right","bottomLeft","bottom","bottomRight"],"description":"cli-boxes' shape exactly, so that corpus imports unchanged.","properties":{"topLeft":{"type":"string"},"top":{"type":"string"},"topRight":{"type":"string"},"left":{"type":"string"},"right":{"type":"string"},"bottomLeft":{"type":"string"},"bottom":{"type":"string"},"bottomRight":{"type":"string"}}},"capability":{"type":"object","required":["name","osc","when","encode","fallback"],"additionalProperties":false,"description":"One paratext capability: what it says to the terminal, when the terminal is believed to understand it, and what prints when it does not. No functions, so it travels through JSON. `encode` and `fallback` are templates: `{field}` is the field's value, `{field|base64}` is it base64-encoded, and `[ … ]` is emitted only when every field inside it has a value.","properties":{"name":{"type":"string","minLength":1,"description":"How callers name it. Registering an existing name replaces it — how a caller corrects a guess we got wrong."},"osc":{"description":"The OSC code this speaks, or 'BEL' for the bell and for protocols that are not OSC at all, such as Kitty's.","oneOf":[{"type":"integer","minimum":0},{"const":"BEL"}]},"when":{"type":"object","description":"When the terminal is believed to understand it. Every clause must hold; `termProgram` and `envAny` are ORs within themselves. Guesses — no terminal answers 'do you do OSC 1337' — and therefore data a caller can replace.","additionalProperties":false,"properties":{"tty":{"type":"boolean","description":"Refuse a pipe. Almost always true: a file that receives OSC gets control bytes in it."},"termProgram":{"type":"array","items":{"type":"string"},"description":"Any one of these TERM_PROGRAM values."},"envAny":{"type":"array","items":{"type":"string"},"description":"Any one of these environment variables merely being set, as VTE announces itself."},"term":{"type":"string","description":"An exact TERM — Kitty is xterm-kitty."}}},"encode":{"type":"string","minLength":1,"description":"The bytes, as a template, for a terminal that does understand."},"fallback":{"type":"string","description":"What to print when it does not — PRINCIPLES rule 6. '' is a legitimate answer, a window title having nothing to say in a log; absence is not, which is why this is required and may be ''."}},"examples":[{"name":"kitty-image","osc":"BEL","when":{"tty":true,"term":"xterm-kitty"},"encode":"\u001b_Ga=T,f=100;{base64}\u001b\\","fallback":"{caption}"}]},"capabilities":{"type":"object","description":"paratext capabilities by name — the OSC section of a plugin, read the way flagstaff reads `spinners`.","additionalProperties":{"$ref":"#/$defs/capability"}},"capabilityDocument":{"description":"What paratext's `check()` accepts. Two shapes, and only one of them survives 1.0.","oneOf":[{"description":"The family shape: a plugin carrying its capabilities under `capabilities`.","type":"object","required":["name","capabilities"],"properties":{"name":{"type":"string","minLength":1},"contract":{"type":"integer","minimum":1},"capabilities":{"$ref":"#/$defs/capabilities"}}},{"deprecated":true,"description":"Deprecated: one capability as the whole document, the shape paratext's schema had before this one absorbed it. Accepted for one minor release, removed at 1.0 — `check()` validates it and says so.","$ref":"#/$defs/capability"}]},"widthRange":{"type":"array","description":"One inclusive code-point range, as [low, high]. A single code point is written [n, n].","items":{"type":"integer","minimum":0,"maximum":1114111},"minItems":2,"maxItems":2},"widthOverride":{"type":"object","description":"A linegauge width override: the column count a named set of code-point ranges occupies, for a terminal that disagrees with the Unicode tables. Data only — no function, so it can be written in a config file, diffed, and printed by `linegauge check` without running anyone code.","required":["ranges","columns","why"],"additionalProperties":false,"properties":{"ranges":{"type":"array","description":"The code points this override applies to.","items":{"$ref":"#/$defs/widthRange"},"minItems":1},"columns":{"type":"integer","description":"Columns each cluster in those ranges occupies: 0 for a zero-width mark, 1 narrow, 2 wide.","minimum":0,"maximum":2},"why":{"type":"string","description":"The terminal or the reason. Required, because a width table with no provenance is one nobody can audit when it turns out to be wrong — which is the normal outcome for ambiguous width.","minLength":1}}},"widths":{"type":"object","description":"linegauge width overrides by name — the measurement section of a plugin, read the way flagstaff reads `spinners`.","additionalProperties":{"$ref":"#/$defs/widthOverride"}},"resolver":{"type":"object","required":["rank","paths"],"description":"One bellpull resolver: where to look for an executable, and when.","properties":{"rank":{"type":"number","description":"Search order against PATH: negative searches before it, positive after."},"paths":{"type":"array","minItems":1,"description":"Directories to search. `{VAR}` is substituted from the environment; each must be absolute, or start with a `{VAR}` that holds an absolute path.","items":{"type":"string","minLength":1,"pattern":"^(/|\\{|[A-Za-z]:[\\\\/]|\\\\\\\\)"}},"extensions":{"type":"array","items":{"type":"string"},"description":"Extensions to try on Windows, in place of PATHEXT."},"when":{"type":"object","description":"When the resolver applies. Leave it out and it always does. Only `platform` and `envAny` are conditions: any other key is refused, because a condition nobody reads would make the resolver apply everywhere.","additionalProperties":false,"properties":{"platform":{"type":"array","items":{"type":"string"},"description":"process.platform values it applies on."},"envAny":{"type":"array","items":{"type":"string"},"description":"It applies when any of these environment variables is set."}}}}},"widget":{"type":"object","required":["static"],"description":"One caique widget: how a prompt kind of the plugin's own is drawn.","properties":{"static":{"description":"(spec) => string. Required: what a pipe, an agent or a screen reader gets instead of the interactive prompt. `spec` is the prompt — `{ kind, message }` plus any field the kind reads; `caique check` passes `{ kind, message: 'preview', ...sample.done }`."},"frame":{"description":"(t, spec) => string. Optional: the animated form; leave it out and the widget is line-mode only."},"sample":{"type":"object","required":["running","done"],"description":"Two named states of plain data that `caique check` renders the widget with, e.g. `{ running: { value: 0 }, done: { value: 4 } }`; each is spread into the `spec` that `static` receives."}}},"handler":{"type":"object","required":["name","run"],"description":"One closeout exit handler.","properties":{"name":{"type":"string","minLength":1,"description":"How the handler is named in a report, including the one the deadline prints when it does not return."},"phase":{"type":"string","pattern":"^(flush|release)$","description":"When it runs. Defaults to `release`; `restore` is closeout's own last phase and a plugin may not use it."},"run":{"description":"(info) => void | Promise<void>. Required: the cleanup itself."}}},"source":{"type":"object","required":["rank"],"description":"One seniority source. Exactly one of `values` (static) or `read(runtime)` (fetched) gives its answer.","properties":{"rank":{"type":"integer","minimum":1,"maximum":39,"description":"Precedence, strictly between the flag (0) and the declared default (40): a source may not beat what the user typed, nor sink below the default. Lower wins, and the built-in layers are flag 0, environment 10, config file 20, package.json 30, default 40 — so 11 to 19 ranks above the config file and below the environment."},"values":{"type":"object","description":"Option name to value."},"read":{"description":"(runtime) => { values, location? } | undefined."},"location":{"type":"string","description":"The file, URL or variable set a person would go and look at."}}},"option":{"type":"object","required":["type"],"description":"One burgee option, keyed by its camelCase name; the flag is its kebab-case form.","properties":{"type":{"type":"string","pattern":"^(string|boolean|number)$"},"description":{"type":"string"},"short":{"type":"string","minLength":1},"required":{"type":"boolean"},"env":{"type":"string"},"choices":{"type":"array","items":{"type":"string"}},"dependsOn":{"type":"array","items":{"type":"string"},"description":"Options that must be set with this one; each must be another option of the same command."},"exclusive":{"type":"array","items":{"type":"string"},"description":"Options that may not be set with this one; each must be another option of the same command."},"deprecated":{"description":"What replaces this option, e.g. '--force'. `true` alone, or an empty string, is refused: a deprecation names its replacement."}}},"command":{"type":"object","required":["path"],"description":"One burgee command node, declared exactly as a program's own command is.","properties":{"path":{"type":"array","minItems":1,"items":{"type":"string","minLength":1},"description":"The words a user types. May not repeat a path the program or an earlier plugin already declares."},"description":{"type":"string"},"options":{"type":"object","additionalProperties":{"$ref":"#/$defs/option"}},"effects":{"type":"string","pattern":"^(read_only|idempotent|non_idempotent|withheld)$","description":"What running it does to the world. Required on any command that runs; `withheld` serves it to people and keeps it out of the MCP tool list."},"deprecated":{"description":"What replaces this command. `true` alone, or an empty string, is refused."},"run":{"description":"(ctx) => unknown. What the command does; its return value is the `--json` envelope's data."},"load":{"description":"() => Promise<module>. A lazy form of `run`, imported on dispatch."}}},"hook":{"type":"object","required":["handler"],"description":"One burgee hook.","properties":{"filter":{"type":"object","required":["command"],"description":"`{ command: RegExp }`, e.g. `{ command: /^deploy/ }`: fire only for commands whose path, its words joined by spaces, matches. Leave it out and the hook fires for every command."},"handler":{"description":"(ctx) => void | Promise<void>. Required. On parse it may return the string[] argv to use instead."}}},"keymaps":{"type":"object","description":"controlroom keymaps by name: key spec to action name, and the label each action shows in the hint line. `default` replaces the built-in keymap.","additionalProperties":{"$ref":"#/$defs/keymap"}},"keymap":{"type":"object","required":["keys"],"additionalProperties":false,"properties":{"keys":{"type":"object","description":"Key spec, as caique/keys spells it ('left', 'enter', 'ctrl+c', 'shift+tab', 's'), to an action name ('tab.next', 'toggle:status', or the program's own).","additionalProperties":{"type":"string","minLength":1}},"labels":{"type":"object","description":"Action name to the label the hint line shows. An action with no label is bound but not advertised.","additionalProperties":{"type":"string","minLength":1}}}},"panes":{"type":"object","description":"controlroom panes by name: the flagstaff component that draws each one, and its label. A tab bar is a pane over flagstaff's `tab-bar`.","additionalProperties":{"$ref":"#/$defs/pane"}},"pane":{"type":"object","required":["component"],"additionalProperties":false,"properties":{"component":{"type":"string","minLength":1,"description":"The name of a component flagstaff has registered, e.g. 'log-tail' or 'tab-bar'."},"label":{"type":"string","description":"The text a static projection prints above the pane."}}}}}
|
|
1
|
+
{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://github.com/ofri-peretz/burgee/blob/main/packages/flagstaff/src/schema.json","title":"flagstaff plugin","description":"A plugin is one plain object. Everything in it is data that can be read without running it; the only functions allowed are a component's `static` (required) and `frame` (optional). A spinner or component without a static projection is refused at register().","type":"object","required":["name"],"additionalProperties":true,"properties":{"name":{"type":"string","minLength":1,"description":"The plugin's name; also the prefix a host may use when two plugins contribute the same key."},"contract":{"type":"integer","minimum":1,"description":"The plugin contract this object follows: `1` today. A host refuses a newer contract than it knows, and burgee also refuses a plugin that declares none — `definePlugin` stamps it, a plain object writes `contract: 1`."},"tokens":{"type":"object","description":"A roundel theme: semantic token name to a hex colour, contrast-checked when flown.","additionalProperties":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"propertyNames":{"enum":["error","warn","ok","hint","muted","command","flag","value","heading","ground"],"description":"roundel's ten semantic tokens, and nothing else — `roundel`'s own validate() refuses any other name."}},"glyphs":{"type":"object","description":"Symbols by meaning: `ok`, `fail`, `warn`, `info`, `running`. A plugin that ships glyphs changes every built-in that draws one.","additionalProperties":{"type":"string","minLength":1}},"spinners":{"type":"object","description":"Spinner styles by name, in cli-spinners' shape plus the static projection.","additionalProperties":{"$ref":"#/$defs/spinner"}},"borders":{"type":"object","description":"Border styles a box can be drawn with, by name.","additionalProperties":{"$ref":"#/$defs/border"}},"components":{"type":"object","description":"Components by name: `static(state)` returns the text a pipe, an agent or a screen reader gets; `frame(t, state)` is the optional animated form.","additionalProperties":{"$ref":"#/$defs/component"}},"capabilities":{"$ref":"#/$defs/capabilities"},"widths":{"$ref":"#/$defs/widths"},"resolvers":{"type":"object","description":"bellpull resolvers by name: extra directories searched for an executable, before PATH (negative rank) or after it (positive). Two resolvers with one name shadow; two names both apply, in rank order.","additionalProperties":{"$ref":"#/$defs/resolver"}},"widgets":{"type":"object","description":"caique prompt widgets by kind. The six built-in kinds — text, confirm, select, multiselect, password, path — cannot be replaced: a plugin adds kinds of its own.","additionalProperties":{"$ref":"#/$defs/widget"}},"handlers":{"type":"array","description":"closeout exit handlers. The phase decides the order they run in, not their position in this list.","items":{"$ref":"#/$defs/handler"}},"sources":{"type":"object","description":"seniority configuration sources by name, ranked against the built-in layers: a flag is 0 and a declared default is 40, and a plugin source sits strictly between.","additionalProperties":{"$ref":"#/$defs/source"}},"commands":{"type":"array","description":"burgee commands this plugin contributes. Each is read by exactly the code a program's own command is, and a burgee plugin must declare `contract`.","items":{"$ref":"#/$defs/command"}},"hooks":{"type":"object","description":"burgee lifecycle hooks. parse rewrites argv before a command is resolved; preRun opens around a command, and exactly one of postRun or onError closes; shutdown fires once as the program leaves, by any path.","additionalProperties":false,"properties":{"parse":{"$ref":"#/$defs/hook"},"preRun":{"$ref":"#/$defs/hook"},"postRun":{"$ref":"#/$defs/hook"},"onError":{"$ref":"#/$defs/hook"},"shutdown":{"$ref":"#/$defs/hook"}}},"enforce":{"type":"string","pattern":"^(pre|post)$","description":"burgee: order this plugin's hooks before (`pre`) or after (`post`) the others."},"locales":{"type":"object","description":"burgee locale packs (localised-human-surfaces R4): a BCP 47 language tag, as Intl.Locale writes it, mapped to catalog ids and their translations. A message is a string, or for a message whose English carries a count placeholder, one string per plural form Intl.PluralRules selects for the locale. burgee/locale-pack-schema.json lists every id with its English; `burgee check` renders a pack or refuses it.","propertyNames":{"pattern":"^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$"},"additionalProperties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","propertyNames":{"enum":["zero","one","two","few","many","other"]},"required":["other"],"additionalProperties":{"type":"string"}}]}}},"formats":{"type":"object","description":"burgee output formats (agent-headroom RF): a name a caller types as `--format=<name>`, mapped to how a success's data is rendered under it. burgee registers `agent` and `tsv` the same way; `text`, `json`, `json-pretty` and every name already registered are taken. A format renders data only, never a failure. `--format` lists every name; `burgee check` checks them.","propertyNames":{"pattern":"^[a-z][a-z0-9-]*$"},"additionalProperties":{"$ref":"#/$defs/format"}},"keymaps":{"$ref":"#/$defs/keymaps"},"panes":{"$ref":"#/$defs/panes"}},"$defs":{"spinner":{"type":"object","required":["frames","interval","static"],"properties":{"frames":{"type":"array","items":{"type":"string"},"minItems":1},"interval":{"type":"integer","minimum":1,"description":"Milliseconds between frames on a terminal."},"static":{"type":"string","description":"What a pipe prints instead of the animation."}}},"component":{"type":"object","required":["static"],"properties":{"static":{"description":"(state) => string. Required: the projection every non-terminal mode prints."},"frame":{"description":"(t, state) => string. Optional: the frame at t milliseconds since hoisting."},"sample":{"type":"object","required":["running","done"],"description":"Two states to *show* this component with: `flagstaff check` and the docs gallery render `running` then `done`. Omitted, they assume `{ phase: 'running' }` and `{ phase: 'done' }` and say so in the output. The loop never reads it — a running program's state comes from the program.","properties":{"running":{"description":"The state to open with."},"done":{"description":"The state to close with."}}},"interval":{"type":"integer","minimum":1,"description":"Milliseconds between repaints when `frame` is given; 80 when omitted."}}},"border":{"type":"object","required":["topLeft","top","topRight","left","right","bottomLeft","bottom","bottomRight"],"description":"cli-boxes' shape exactly, so that corpus imports unchanged.","properties":{"topLeft":{"type":"string"},"top":{"type":"string"},"topRight":{"type":"string"},"left":{"type":"string"},"right":{"type":"string"},"bottomLeft":{"type":"string"},"bottom":{"type":"string"},"bottomRight":{"type":"string"}}},"capability":{"type":"object","required":["name","osc","when","encode","fallback"],"additionalProperties":false,"description":"One paratext capability: what it says to the terminal, when the terminal is believed to understand it, and what prints when it does not. No functions, so it travels through JSON. `encode` and `fallback` are templates: `{field}` is the field's value, `{field|base64}` is it base64-encoded, and `[ … ]` is emitted only when every field inside it has a value.","properties":{"name":{"type":"string","minLength":1,"description":"How callers name it. Registering an existing name replaces it — how a caller corrects a guess we got wrong."},"osc":{"description":"The OSC code this speaks, or 'BEL' for the bell and for protocols that are not OSC at all, such as Kitty's.","oneOf":[{"type":"integer","minimum":0},{"const":"BEL"}]},"when":{"type":"object","description":"When the terminal is believed to understand it. Every clause must hold; `termProgram` and `envAny` are ORs within themselves. Guesses — no terminal answers 'do you do OSC 1337' — and therefore data a caller can replace.","additionalProperties":false,"properties":{"tty":{"type":"boolean","description":"Refuse a pipe. Almost always true: a file that receives OSC gets control bytes in it."},"termProgram":{"type":"array","items":{"type":"string"},"description":"Any one of these TERM_PROGRAM values."},"envAny":{"type":"array","items":{"type":"string"},"description":"Any one of these environment variables merely being set, as VTE announces itself."},"term":{"type":"string","description":"An exact TERM — Kitty is xterm-kitty."}}},"encode":{"type":"string","minLength":1,"description":"The bytes, as a template, for a terminal that does understand."},"fallback":{"type":"string","description":"What to print when it does not — PRINCIPLES rule 6. '' is a legitimate answer, a window title having nothing to say in a log; absence is not, which is why this is required and may be ''."}},"examples":[{"name":"kitty-image","osc":"BEL","when":{"tty":true,"term":"xterm-kitty"},"encode":"\u001b_Ga=T,f=100;{base64}\u001b\\","fallback":"{caption}"}]},"capabilities":{"type":"object","description":"paratext capabilities by name — the OSC section of a plugin, read the way flagstaff reads `spinners`.","additionalProperties":{"$ref":"#/$defs/capability"}},"capabilityDocument":{"description":"What paratext's `check()` accepts. Two shapes, and only one of them survives 1.0.","oneOf":[{"description":"The family shape: a plugin carrying its capabilities under `capabilities`.","type":"object","required":["name","capabilities"],"properties":{"name":{"type":"string","minLength":1},"contract":{"type":"integer","minimum":1},"capabilities":{"$ref":"#/$defs/capabilities"}}},{"deprecated":true,"description":"Deprecated: one capability as the whole document, the shape paratext's schema had before this one absorbed it. Accepted for one minor release, removed at 1.0 — `check()` validates it and says so.","$ref":"#/$defs/capability"}]},"widthRange":{"type":"array","description":"One inclusive code-point range, as [low, high]. A single code point is written [n, n].","items":{"type":"integer","minimum":0,"maximum":1114111},"minItems":2,"maxItems":2},"widthOverride":{"type":"object","description":"A linegauge width override: the column count a named set of code-point ranges occupies, for a terminal that disagrees with the Unicode tables. Data only — no function, so it can be written in a config file, diffed, and printed by `linegauge check` without running anyone code.","required":["ranges","columns","why"],"additionalProperties":false,"properties":{"ranges":{"type":"array","description":"The code points this override applies to.","items":{"$ref":"#/$defs/widthRange"},"minItems":1},"columns":{"type":"integer","description":"Columns each cluster in those ranges occupies: 0 for a zero-width mark, 1 narrow, 2 wide.","minimum":0,"maximum":2},"why":{"type":"string","description":"The terminal or the reason. Required, because a width table with no provenance is one nobody can audit when it turns out to be wrong — which is the normal outcome for ambiguous width.","minLength":1}}},"widths":{"type":"object","description":"linegauge width overrides by name — the measurement section of a plugin, read the way flagstaff reads `spinners`.","additionalProperties":{"$ref":"#/$defs/widthOverride"}},"resolver":{"type":"object","required":["rank","paths"],"description":"One bellpull resolver: where to look for an executable, and when.","properties":{"rank":{"type":"number","description":"Search order against PATH: negative searches before it, positive after."},"paths":{"type":"array","minItems":1,"description":"Directories to search. `{VAR}` is substituted from the environment; each must be absolute, or start with a `{VAR}` that holds an absolute path.","items":{"type":"string","minLength":1,"pattern":"^(/|\\{|[A-Za-z]:[\\\\/]|\\\\\\\\)"}},"extensions":{"type":"array","items":{"type":"string"},"description":"Extensions to try on Windows, in place of PATHEXT."},"when":{"type":"object","description":"When the resolver applies. Leave it out and it always does. Only `platform` and `envAny` are conditions: any other key is refused, because a condition nobody reads would make the resolver apply everywhere.","additionalProperties":false,"properties":{"platform":{"type":"array","items":{"type":"string"},"description":"process.platform values it applies on."},"envAny":{"type":"array","items":{"type":"string"},"description":"It applies when any of these environment variables is set."}}}}},"widget":{"type":"object","required":["static"],"description":"One caique widget: how a prompt kind of the plugin's own is drawn.","properties":{"static":{"description":"(spec) => string. Required: what a pipe, an agent or a screen reader gets instead of the interactive prompt. `spec` is the prompt — `{ kind, message }` plus any field the kind reads; `caique check` passes `{ kind, message: 'preview', ...sample.done }`."},"frame":{"description":"(t, spec) => string. Optional: the animated form; leave it out and the widget is line-mode only."},"sample":{"type":"object","required":["running","done"],"description":"Two named states of plain data that `caique check` renders the widget with, e.g. `{ running: { value: 0 }, done: { value: 4 } }`; each is spread into the `spec` that `static` receives."}}},"handler":{"type":"object","required":["name","run"],"description":"One closeout exit handler.","properties":{"name":{"type":"string","minLength":1,"description":"How the handler is named in a report, including the one the deadline prints when it does not return."},"phase":{"type":"string","pattern":"^(flush|release)$","description":"When it runs. Defaults to `release`; `restore` is closeout's own last phase and a plugin may not use it."},"run":{"description":"(info) => void | Promise<void>. Required: the cleanup itself."}}},"source":{"type":"object","required":["rank"],"description":"One seniority source. Exactly one of `values` (static) or `read(runtime)` (fetched) gives its answer.","properties":{"rank":{"type":"integer","minimum":1,"maximum":39,"description":"Precedence, strictly between the flag (0) and the declared default (40): a source may not beat what the user typed, nor sink below the default. Lower wins, and the built-in layers are flag 0, environment 10, config file 20, package.json 30, default 40 — so 11 to 19 ranks above the config file and below the environment."},"values":{"type":"object","description":"Option name to value."},"read":{"description":"(runtime) => { values, location? } | undefined."},"location":{"type":"string","description":"The file, URL or variable set a person would go and look at."}}},"option":{"type":"object","required":["type"],"description":"One burgee option, keyed by its camelCase name; the flag is its kebab-case form.","properties":{"type":{"type":"string","pattern":"^(string|boolean|number)$"},"description":{"type":"string"},"short":{"type":"string","minLength":1},"required":{"type":"boolean"},"env":{"type":"string"},"choices":{"type":"array","items":{"type":"string"}},"dependsOn":{"type":"array","items":{"type":"string"},"description":"Options that must be set with this one; each must be another option of the same command."},"exclusive":{"type":"array","items":{"type":"string"},"description":"Options that may not be set with this one; each must be another option of the same command."},"deprecated":{"description":"What replaces this option, e.g. '--force'. `true` alone, or an empty string, is refused: a deprecation names its replacement."}}},"command":{"type":"object","required":["path"],"description":"One burgee command node, declared exactly as a program's own command is.","properties":{"path":{"type":"array","minItems":1,"items":{"type":"string","minLength":1},"description":"The words a user types. May not repeat a path the program or an earlier plugin already declares."},"description":{"type":"string"},"options":{"type":"object","additionalProperties":{"$ref":"#/$defs/option"}},"effects":{"type":"string","pattern":"^(read_only|idempotent|non_idempotent|withheld)$","description":"What running it does to the world. Required on any command that runs; `withheld` serves it to people and keeps it out of the MCP tool list."},"deprecated":{"description":"What replaces this command. `true` alone, or an empty string, is refused."},"run":{"description":"(ctx) => unknown. What the command does; its return value is the `--json` envelope's data."},"load":{"description":"() => Promise<module>. A lazy form of `run`, imported on dispatch."}}},"hook":{"type":"object","required":["handler"],"description":"One burgee hook.","properties":{"filter":{"type":"object","required":["command"],"description":"`{ command: RegExp }`, e.g. `{ command: /^deploy/ }`: fire only for commands whose path, its words joined by spaces, matches. Leave it out and the hook fires for every command."},"handler":{"description":"(ctx) => void | Promise<void>. Required. On parse it may return the string[] argv to use instead."}}},"format":{"type":"object","required":["render","description"],"description":"One burgee output format.","properties":{"render":{"description":"(value) => string. Required: the data `--json` would carry, `toJSON` applied and `undefined` dropped, as the text a caller reads. Called for a success only."},"description":{"type":"string","minLength":1,"description":"Required: the one line `--format` lists beside the name."}}},"keymaps":{"type":"object","description":"controlroom keymaps by name: key spec to action name, and the label each action shows in the hint line. `default` replaces the built-in keymap.","additionalProperties":{"$ref":"#/$defs/keymap"}},"keymap":{"type":"object","required":["keys"],"additionalProperties":false,"properties":{"keys":{"type":"object","description":"Key spec, as caique/keys spells it ('left', 'enter', 'ctrl+c', 'shift+tab', 's'), to an action name ('tab.next', 'toggle:status', or the program's own).","additionalProperties":{"type":"string","minLength":1}},"labels":{"type":"object","description":"Action name to the label the hint line shows. An action with no label is bound but not advertised.","additionalProperties":{"type":"string","minLength":1}}}},"panes":{"type":"object","description":"controlroom panes by name: the flagstaff component that draws each one, and its label. A tab bar is a pane over flagstaff's `tab-bar`.","additionalProperties":{"$ref":"#/$defs/pane"}},"pane":{"type":"object","required":["component"],"additionalProperties":false,"properties":{"component":{"type":"string","minLength":1,"description":"The name of a component flagstaff has registered, e.g. 'log-tail' or 'tab-bar'."},"label":{"type":"string","description":"The text a static projection prints above the pane."}}}}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flagstaff",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.4",
|
|
4
4
|
"description": "Spinners, progress, boxes and tables on one terminal frame loop, with a static projection for pipes, screen readers and agents, and a plugin host. No dependency outside the burgee family. Drop-in paths for ora, log-update, boxen and cli-table3.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -163,10 +163,10 @@
|
|
|
163
163
|
"json"
|
|
164
164
|
],
|
|
165
165
|
"dependencies": {
|
|
166
|
-
"closeout": "^1.1.
|
|
167
|
-
"linegauge": "^1.1.
|
|
168
|
-
"paratext": "^1.0.
|
|
169
|
-
"roundel": "^1.1
|
|
166
|
+
"closeout": "^1.1.8",
|
|
167
|
+
"linegauge": "^1.1.5",
|
|
168
|
+
"paratext": "^1.0.11",
|
|
169
|
+
"roundel": "^1.2.1"
|
|
170
170
|
},
|
|
171
171
|
"devDependencies": {
|
|
172
172
|
"fast-check": "^4.10.2",
|