@orkestrel/scaffold 0.0.120 → 0.0.121
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/dist/bin/main.js +5 -5
- package/dist/bin/main.js.map +1 -1
- package/dist/host/claude/agents/orkestrel.md +26 -26
- package/dist/host/guides/agent.md +5 -5
- package/dist/host/guides/brief.md +7 -15
- package/dist/host/guides/browser.md +1 -1
- package/dist/host/guides/capture.md +2 -2
- package/dist/host/guides/console.md +4 -30
- package/dist/host/guides/guide.md +0 -1
- package/dist/host/guides/interpret.md +165 -182
- package/dist/host/guides/lsp.md +26 -51
- package/dist/host/guides/mcp.md +220 -276
- package/dist/host/guides/middleware.md +14 -22
- package/dist/host/guides/ollama.md +1 -3
- package/dist/host/guides/probe.md +71 -80
- package/dist/host/guides/program.md +26 -35
- package/dist/host/guides/qualifier.md +0 -6
- package/dist/host/guides/queue.md +0 -4
- package/dist/host/guides/rater.md +6 -12
- package/dist/host/guides/relation.md +0 -2
- package/dist/host/guides/scaffold.md +12 -8
- package/dist/host/guides/sea.md +47 -51
- package/dist/host/guides/server.md +15 -19
- package/dist/host/guides/terminal.md +0 -26
- package/dist/host/guides/toolbox.md +0 -10
- package/dist/host/guides/worker.md +57 -57
- package/dist/host/guides/workflow.md +13 -26
- package/dist/host/guides/workspace.md +15 -21
- package/dist/host/manifest.json +28 -448
- package/dist/src/core/index.cjs +7 -45
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.js +7 -45
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/server/index.cjs +10 -9
- package/dist/src/server/index.cjs.map +1 -1
- package/dist/src/server/index.d.cts +12 -8
- package/dist/src/server/index.d.ts +12 -8
- package/dist/src/server/index.js +10 -9
- package/dist/src/server/index.js.map +1 -1
- package/package.json +5 -5
|
@@ -63,8 +63,6 @@ subclasses regardless of their `name`, and rejects transparent proxies and unbra
|
|
|
63
63
|
|
|
64
64
|
The style engine — text style as data, rendered by a swappable renderer (ANSI default; a browser `%c` renderer at the same seam).
|
|
65
65
|
|
|
66
|
-
A `Shape` cell holds an interface's data members as bare names in braces, `?` marking an optional member and `plus` introducing its call-signature members, and a type alias's own type literal with a union's arms escaped as `\|`. A function row's `Shape` cell holds its signature, and a guard row's the type it narrows to. A class row's `Shape` cell holds the interface it implements, or its constructor signature where it implements none.
|
|
67
|
-
|
|
68
66
|
| Name | Kind | Signature | Summary |
|
|
69
67
|
| ------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
70
68
|
| `Color` | type | `'black' \| 'red' \| 'green' \| 'yellow' \| 'blue' \| 'magenta' \| 'cyan' \| 'white' \| 'brightBlack' \| 'brightRed' \| 'brightGreen' \| 'brightYellow' \| 'brightBlue' \| 'brightMagenta' \| 'brightCyan' \| 'brightWhite' \| 'default'` | Names a terminal color — the 8 standard base colors, their 8 bright variants, and `default` (the target's own default ink, emitting no color code). |
|
|
@@ -88,8 +86,6 @@ A `Shape` cell holds an interface's data members as bare names in braces, `?` ma
|
|
|
88
86
|
|
|
89
87
|
Structured logging — the immutable `LogRecord` + the `entry` event are the transport seam; `Sink` is the one output primitive.
|
|
90
88
|
|
|
91
|
-
A `Shape` cell holds an interface's data members as bare names in braces, `?` marking an optional member and `plus` introducing its call-signature members, and a type alias's own type literal with a union's arms escaped as `\|`. A function row's `Shape` cell holds its signature, and a guard row's the type it narrows to. A class row's `Shape` cell holds the interface it implements, or its constructor signature where it implements none.
|
|
92
|
-
|
|
93
89
|
| Name | Kind | Signature | Summary |
|
|
94
90
|
| ------------------------ | --------- | -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
95
91
|
| `LogLevel` | type | `'debug' \| 'info' \| 'warn' \| 'error'` | Names the severity level of a `LogRecord` — one coherent, ascending scale, `debug` < `info` < `warn` < `error`, that a `LoggerInterface` gates by threshold. |
|
|
@@ -111,16 +107,14 @@ A `Shape` cell holds an interface's data members as bare names in braces, `?` ma
|
|
|
111
107
|
|
|
112
108
|
Narrative reporting — pure width-aware layout renderers + a lean `Reporter` front-end, over the same styler and sink substrate.
|
|
113
109
|
|
|
114
|
-
A `Shape` cell holds an interface's data members as bare names in braces, `?` marking an optional member and `plus` introducing its call-signature members, and a type alias's own type literal with a union's arms escaped as `\|`. A function row's `Shape` cell holds its signature, and a guard row's the type it narrows to. A class row's `Shape` cell holds the interface it implements, or its constructor signature where it implements none.
|
|
115
|
-
|
|
116
110
|
| Name | Kind | Signature | Summary |
|
|
117
111
|
| -------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
118
|
-
| `Alignment` | type | `'left' \| 'center' \| 'right'` | Names the horizontal text alignment within a fixed-width cell — `left` / `center` / `right`, the conventional set a `
|
|
112
|
+
| `Alignment` | type | `'left' \| 'center' \| 'right'` | Names the horizontal text alignment within a fixed-width cell — `left` / `center` / `right`, the conventional set a `TableColumn` (and the box / separator title) aligns by. |
|
|
119
113
|
| `BorderStyle` | type | `'single' \| 'double' \| 'round' \| 'heavy'` | Names a box-drawing border style — `single` / `double` / `round` / `heavy`, the standard Unicode line weights the renderers frame with, each selecting a full junction set in `BORDER_CHARS`. |
|
|
120
114
|
| `BorderChars` | interface | `{ horizontal, vertical, topLeft, topRight, bottomLeft, bottomRight, cross, teeDown, teeUp, teeRight, teeLeft }` | Represents one complete box-drawing junction set for a `BorderStyle` — the edges, the corners, and the `T` / cross junctions the box and table renderers need to frame content and rule a table. |
|
|
121
115
|
| `SeparatorOptions` | interface | `{ title?, width?, fill?, styler?, style? }` | Configures `renderSeparator` — a horizontal rule, optionally carrying a centered title. Every key is optional. |
|
|
122
116
|
| `BoxOptions` | interface | `{ content, title?, padding?, border?, width?, styler?, style? }` | Configures `renderBox` — content framed in box-drawing characters. A `Reporter` supplies its own chrome style only when the caller gives neither `styler` nor `style`. |
|
|
123
|
-
| `
|
|
117
|
+
| `TableColumn` | interface | `{ label, align? }` | Represents one column of a `TableOptions` — its header label and how its cells align. |
|
|
124
118
|
| `TableOptions` | interface | `{ columns, rows, border?, styler?, style? }` | Configures `renderTable` — a bordered grid of columns + rows with per-column alignment and width-aware sizing. A `Reporter` supplies its own chrome style only when the caller gives neither `styler` nor `style`. |
|
|
125
119
|
| `TreeNode` | interface | `{ label, children? }` | Represents one node of a `TreeOptions` tree — a label plus optional children, recursively. |
|
|
126
120
|
| `TreeOptions` | interface | `{ root, border?, styler?, style? }` | Configures `renderTree` — a nested `TreeNode` tree drawn with box-drawing connectors. A `Reporter` supplies its own chrome style only when the caller gives neither `styler` nor `style`. |
|
|
@@ -150,8 +144,6 @@ A `Shape` cell holds an interface's data members as bare names in braces, `?` ma
|
|
|
150
144
|
|
|
151
145
|
Console interception — take control of `console.*` on the read side; a buffered, mirroring, forwarding interceptor with a lifecycle.
|
|
152
146
|
|
|
153
|
-
A `Shape` cell holds an interface's data members as bare names in braces, `?` marking an optional member and `plus` introducing its call-signature members, and a type alias's own type literal with a union's arms escaped as `\|`. A function row's `Shape` cell holds its signature, and a guard row's the type it narrows to. A class row's `Shape` cell holds the interface it implements, or its constructor signature where it implements none.
|
|
154
|
-
|
|
155
147
|
| Name | Kind | Signature | Summary |
|
|
156
148
|
| --------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
157
149
|
| `CaptureLevel` | type | `'log' \| 'info' \| 'warn' \| 'error' \| 'debug'` | Identifies one intercepted `console` method — `log` / `info` / `warn` / `error` / `debug`, the names a `CaptureInterface` patches and reports under. |
|
|
@@ -170,8 +162,6 @@ A `Shape` cell holds an interface's data members as bare names in braces, `?` ma
|
|
|
170
162
|
|
|
171
163
|
The one error type the console layer throws — an internal invariant or unreachable-guard violation.
|
|
172
164
|
|
|
173
|
-
A `Shape` cell holds an interface's data members as bare names in braces, `?` marking an optional member and `plus` introducing its call-signature members, and a type alias's own type literal with a union's arms escaped as `\|`. A function row's `Shape` cell holds its signature, and a guard row's the type it narrows to. A class row's `Shape` cell holds the interface it implements, or its constructor signature where it implements none.
|
|
174
|
-
|
|
175
165
|
| Name | Kind | Signature | Summary |
|
|
176
166
|
| ------------------ | -------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
177
167
|
| `ConsoleErrorCode` | type | `'INVARIANT'` | Names the machine-readable error code a `ConsoleError` carries — `INVARIANT`, the only code the package throws. |
|
|
@@ -182,8 +172,6 @@ A `Shape` cell holds an interface's data members as bare names in braces, `?` ma
|
|
|
182
172
|
|
|
183
173
|
Live activity animations — pure frame producers over the same styler and sink substrate; the line overwrite is the sink's job.
|
|
184
174
|
|
|
185
|
-
A `Shape` cell holds an interface's data members as bare names in braces, `?` marking an optional member and `plus` introducing its call-signature members, and a type alias's own type literal with a union's arms escaped as `\|`. A class row's `Shape` cell holds the interface it implements, or its constructor signature where it implements none.
|
|
186
|
-
|
|
187
175
|
| Name | Kind | Signature | Summary |
|
|
188
176
|
| ------------------- | --------- | ------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
189
177
|
| `BarOptions` | interface | `{ current, total, width?, fill?, empty?, styler?, style? }` | Configures the pure `renderBar` renderer — a determinate progress bar string (`█████░░░░░ 50% (5/10)`), width-aware and styler-optional. |
|
|
@@ -201,8 +189,6 @@ A `Shape` cell holds an interface's data members as bare names in braces, `?` ma
|
|
|
201
189
|
|
|
202
190
|
The SGR code data the ANSI renderer maps through, and the styler's color / attribute axes (`src/core`). All `Object.freeze`d data; the SGR numbers are the fixed ECMA-48 spec.
|
|
203
191
|
|
|
204
|
-
A `Shape` cell holds the constant's declared type.
|
|
205
|
-
|
|
206
192
|
| Name | Kind | Signature | Summary |
|
|
207
193
|
| ------------------ | ----- | ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
208
194
|
| `FOREGROUND_CODES` | const | `Readonly<Record<Exclude<Color, 'default'>, number>>` | Maps each `Color` to its SGR foreground parameter — the 8 base colors at 30–37 and their bright variants at 90–97. `default` is intentionally absent (it emits no code). |
|
|
@@ -224,8 +210,6 @@ A `Shape` cell holds the constant's declared type.
|
|
|
224
210
|
|
|
225
211
|
The level order + label colors, the box-drawing junction sets, status icons / colors, and default widths / glyphs (`src/core`). All `Object.freeze`d data; the box-drawing + braille glyphs are fixed Unicode. There is no separate tree-connector table: a tree derives its branch / corner / guide runs from the same `BORDER_CHARS` set a box or a table draws with, so a box, a table, and a tree all answer to one `border`.
|
|
226
212
|
|
|
227
|
-
A `Shape` cell holds the constant's declared type.
|
|
228
|
-
|
|
229
213
|
| Name | Kind | Signature | Summary |
|
|
230
214
|
| --------------------- | ----- | ---------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
231
215
|
| `LEVEL_SEVERITY` | const | `Readonly<Record<LogLevel, number>>` | Maps each `LogLevel` to its numeric severity — the ascending order the level gate compares through (`debug` 0 < `info` 1 < `warn` 2 < `error` 3). A record is kept when its level's severity is at or above the logger's threshold. The source of truth for level ordering. |
|
|
@@ -240,7 +224,7 @@ A `Shape` cell holds the constant's declared type.
|
|
|
240
224
|
| `DEFAULT_WIDTH` | const | `80` | Sets the default visible column width for the width-aware renderers — the separator rule and a `renderBox` with no explicit `width`, and the reporter's `section` rule. A sane terminal default (80 columns); a caller overrides it per-call or through `ReporterOptions.width`. |
|
|
241
225
|
| `DEFAULT_PADDING` | const | `1` | Sets the default horizontal padding inside a box's edges (`renderBox`) — one cell. |
|
|
242
226
|
| `DEFAULT_BORDER` | const | `BorderStyle` | Sets the default `BorderStyle` the box / table renderers frame with when none is given — `single`. |
|
|
243
|
-
| `DEFAULT_ALIGN` | const | `Alignment` | Sets the default cell `Alignment` a `
|
|
227
|
+
| `DEFAULT_ALIGN` | const | `Alignment` | Sets the default cell `Alignment` a `TableColumn` uses when none is given — `left`. |
|
|
244
228
|
| `SEPARATOR_FILL` | const | `"\u2500"` | Holds the default fill character `renderSeparator` draws its rule with — `─`. |
|
|
245
229
|
| `SEPARATOR_TITLE_GAP` | const | `" "` | Holds the single padding cell on each side of a separator's embedded title (`title`) — keeps the title from butting against the rule. One space. |
|
|
246
230
|
| `SECOND_MS` | const | `1000` | Sets the millisecond threshold at or above which `formatDuration` (and so `Reporter.timing`) switches from a `…ms` rendering to a `…s` (seconds, 2 d.p.) rendering — `1000`, exactly one second. |
|
|
@@ -249,8 +233,6 @@ A `Shape` cell holds the constant's declared type.
|
|
|
249
233
|
|
|
250
234
|
The intercepted-method set, the bounded-buffer cap, the level projection, and the spinner frames / bar glyphs / track width (`src/core`). All `Object.freeze`d data.
|
|
251
235
|
|
|
252
|
-
A `Shape` cell holds the constant's declared type.
|
|
253
|
-
|
|
254
236
|
| Name | Kind | Signature | Summary |
|
|
255
237
|
| -------------------------- | ----- | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
256
238
|
| `CAPTURE_LEVELS` | const | `readonly CaptureLevel[]` | Lists every `CaptureLevel`, frozen — the `console.*` methods a `CaptureInterface` intercepts by default (and the source of truth for the capture-level axis; drives exhaustive tests). The universal console methods: `log`, `info`, `warn`, `error`, `debug`. |
|
|
@@ -266,8 +248,6 @@ A `Shape` cell holds the constant's declared type.
|
|
|
266
248
|
|
|
267
249
|
The browser `%c` console sink — translates the core's ANSI output into a `console.log('%c…', css)` call at the output boundary ([`src/browser`](../src/browser), surfaced through `@src/browser`). The core owns the `SinkInterface` contract + the style data model; this module owns only the browser-side translation.
|
|
268
250
|
|
|
269
|
-
A `Shape` cell holds an interface's data members as bare names in braces, `?` marking an optional member and `plus` introducing its call-signature members, and a type alias's own type literal with a union's arms escaped as `\|`. A function row's `Shape` cell holds its signature, and a guard row's the type it narrows to.
|
|
270
|
-
|
|
271
251
|
| Name | Kind | Signature | Summary |
|
|
272
252
|
| -------------------- | --------- | ----------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
273
253
|
| `BrowserPalette` | interface | `{ color?, attribute? }` | Holds partial browser CSS overrides for the core color and attribute axes — a named `color` or `attribute` entry replaces only that entry, and every omission keeps its default. |
|
|
@@ -283,8 +263,6 @@ A `Shape` cell holds an interface's data members as bare names in braces, `?` ma
|
|
|
283
263
|
|
|
284
264
|
The SGR → CSS translation data the browser sink maps ANSI runs through (`src/browser`). The number↔name mapping is derived from core's code maps, never re-hardcoded; the browser module reads core's `RESET_CODE` directly (no local re-export).
|
|
285
265
|
|
|
286
|
-
A `Shape` cell holds the constant's declared type.
|
|
287
|
-
|
|
288
266
|
| Name | Kind | Signature | Summary |
|
|
289
267
|
| --------------- | ----- | ----------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
290
268
|
| `COLOR_HEX` | const | `Readonly<Record<Exclude<Color, 'default'>, string>>` | Maps each named `Color` to its hex value — the 16 standard terminal colors a browser DevTools console renders the same `Color` names as. The source of truth for the browser color axis: the ANSI renderer maps a `Color` name to an SGR number, and this maps the same name to the CSS color the `%c` sink paints with, so a browser shows the same 16 colors a terminal does. |
|
|
@@ -296,8 +274,6 @@ A `Shape` cell holds the constant's declared type.
|
|
|
296
274
|
|
|
297
275
|
The server output backend — a TTY-aware `Sink` over the real `process` streams with a raw process-stream capture ([`src/server`](../src/server), surfaced through `@src/server`). The core owns the `SinkInterface` / `LogLevel` contracts + the `console` `Capture`; this module owns the server-only stream backend. Color detection lives here and only here: `inferStyled` reads the environment, `createServerSink` fixes each target's `styled` fact at construction, and nothing in core or the browser probes for color (the color-detection contract).
|
|
298
276
|
|
|
299
|
-
A `Shape` cell holds an interface's data members as bare names in braces, `?` marking an optional member and `plus` introducing its call-signature members, and a type alias's own type literal with a union's arms escaped as `\|`. An extended interface's name comes before `plus`, with the members it adds after. A function row's `Shape` cell holds its signature, and a guard row's the type it narrows to. A class row's `Shape` cell holds the interface it implements, or its constructor signature where it implements none.
|
|
300
|
-
|
|
301
277
|
| Name | Kind | Signature | Summary |
|
|
302
278
|
| ------------------------- | --------- | ----------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
303
279
|
| `StreamTargetInterface` | interface | `{ write(), isTTY?, columns? }` | Declares the minimal writable-stream shape the server sink and process capture address — exactly the slice of a Node `tty.WriteStream` / `process.stdout` they touch and no more. |
|
|
@@ -322,8 +298,6 @@ A `Shape` cell holds an interface's data members as bare names in braces, `?` ma
|
|
|
322
298
|
|
|
323
299
|
The default stream set, buffer cap, no-TTY column fallback, and the stream → log-level projection (`src/server`). All `Object.freeze`d data.
|
|
324
300
|
|
|
325
|
-
A `Shape` cell holds the constant's declared type.
|
|
326
|
-
|
|
327
301
|
| Name | Kind | Signature | Summary |
|
|
328
302
|
| ---------------------- | ----- | ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
329
303
|
| `STREAM_LEVELS` | const | `readonly StreamLevel[]` | Lists the process streams a `ProcessCaptureInterface` can intercept, in `stdout`-then-`stderr` order — the `StreamLevel` universe and the default configured set. |
|
|
@@ -335,7 +309,7 @@ A `Shape` cell holds the constant's declared type.
|
|
|
335
309
|
|
|
336
310
|
The public methods of each behavioral interface — one table per type, keyed by its backticked name, every call-signature member listed. Each type's `readonly` data members, for example `emitter` / `active` / `message` / `level` / `name` / `current` / `total` / `succeeded` / `columns`, stay in the preceding Surface rows and are not repeated here. Each implementing class implements its interface exactly, so this doubles as the per-instance method surface.
|
|
337
311
|
|
|
338
|
-
**Data-only / callable surfaces (no `## Methods` subsection).** `ServerSinkInterface` adds `styled` and `columns` data members to `SinkInterface` (its `write` is the inherited contract in the following `SinkInterface` table). Every `*Options` / `*EventMap` / `LogRecord` / `Style` / `Theme` / `ThemeStatus` / `BorderChars` / `
|
|
312
|
+
**Data-only / callable surfaces (no `## Methods` subsection).** `ServerSinkInterface` adds `styled` and `columns` data members to `SinkInterface` (its `write` is the inherited contract in the following `SinkInterface` table). Every `*Options` / `*EventMap` / `LogRecord` / `Style` / `Theme` / `ThemeStatus` / `BorderChars` / `TableColumn` / `TreeNode` / `StepPosition` / `ProgressReport` / `WriterSet` / `CapturedMessage` / `CapturedChunk` / `CaptureResult` / `BrowserPalette` / `ConsoleOutput` / `StyleAccumulator` / `StreamTargetInterface` row is a data / options shape with no behavioral methods.
|
|
339
313
|
|
|
340
314
|
#### `RendererInterface`
|
|
341
315
|
|
|
@@ -173,7 +173,6 @@ directly.
|
|
|
173
173
|
| `extractSignature` | function | `(code: string, source: string) => SurfaceSymbol \| undefined` | Extracts one emitted declaration's signature: the symbol its column-zero `export` head names, carrying the type text the compiler emitted for it. |
|
|
174
174
|
| `extractSignatures` | function | `(declaration: string) => readonly SurfaceSymbol[]` | Extracts every signature one compiler-emitted declaration file declares: each column-zero `export` head read through `extractSignature`, an overload set's emitted heads joined in order as an intersection of parenthesized signatures. |
|
|
175
175
|
| `joinHead` | function | `(lines: readonly string[], start: number) => DeclarationHead \| undefined` | Joins the declaration head starting at `start` into one space-separated line, consuming lines until the first that opens a body: one that ends with `{`, or one that closes an empty body with `{}` or `{ }`. |
|
|
176
|
-
| `escapeRegExp` | function | `(value: string) => string` | Escapes every regex metacharacter in a literal string so it reads as text inside a larger `RegExp` source rather than as syntax. |
|
|
177
176
|
| `collectDeclarations` | function | `(source: string) => ReadonlyMap<string, Declaration>` | Collects every `export class` / `export interface` declaration one file's source text declares, each keyed `${keyword} ${name}` and carrying the body lines and the base identifiers read from its own head, so a body and a heritage clause always come from the same declaration. |
|
|
178
177
|
| `extractDeclaration` | function | `(source: string, keyword: DeclarationKeyword, name: string) => Declaration \| undefined` | Locates the named `export class` / `export interface` declaration in one file's source text and returns its body lines and its base identifiers read from that one head, so a body and a heritage clause always come from the same declaration, or `undefined` when the file declares no such head. |
|
|
179
178
|
| `extractMemberMethods` | function | `(lines: readonly string[]) => readonly MethodEntry[]` | Selects the member lines declaring a callable member: plain, `async`, generator (`*`), and optional (`records?(`) methods all count; getters, setters, `static` members, and `#` privates never do (their keyword or `#` breaks the `name(` shape). The grammar is `collectKeys`'s, read once over `extractBodyLines`'s projection of the body, so commented method-like payload never becomes eligible and each member keys to the owner head that projection supplies. Each member carries its own doc block's description paragraph, read through `collectSummaries`; the first declaration of a name answers for it. |
|