open-claude-p 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,519 @@
1
+ // Single source of truth for every option that `claude -p` accepts.
2
+ //
3
+ // Each entry describes one flag in a declarative shape so the argv parser,
4
+ // the validator, and the help-text generator can all be derived from this
5
+ // file alone. Adding support for a new flag therefore means appending one
6
+ // entry here — no other module should need to be edited.
7
+ //
8
+ // Entry shape (all fields are stable contract):
9
+ // {
10
+ // name: Canonical long name, e.g. 'output-format'.
11
+ // short: Optional single-character short alias, e.g. 'p'.
12
+ // aliases: Optional extra long aliases, e.g. ['allowedTools'].
13
+ // kind: 'boolean' | 'string' | 'number' | 'enum' | 'array' | 'json'.
14
+ // choices: For 'enum': array of accepted values.
15
+ // default: Default value when omitted.
16
+ // repeatable: For 'array': whether the flag may be specified multiple
17
+ // times (occurrences accumulate); array kind also collects
18
+ // variadic values until the next flag-looking token.
19
+ // env: Optional environment-variable fallback.
20
+ // description: One-line help text.
21
+ // forward: How this option reaches the upstream `claude` process.
22
+ // { type: 'argv', flag: '--name' } pass to spawn argv
23
+ // { type: 'env', name: 'VAR' } set on spawn env
24
+ // { type: 'system-prompt' } fold into injected prompt
25
+ // { type: 'shim' } enforced locally
26
+ // { type: 'unsupported', reason } refuse with message
27
+ // validate: Optional (value, allOptions) => string | undefined.
28
+ // }
29
+ //
30
+ // This file contains the option spec used by the CLI and the library.
31
+
32
+ /** @type {Array<object>} */
33
+ export const OPTION_SPEC = [
34
+ // ── Print / output ────────────────────────────────────────────────────
35
+ {
36
+ name: 'print',
37
+ short: 'p',
38
+ kind: 'boolean',
39
+ default: false,
40
+ description:
41
+ 'Accepted for argv-compatibility with `claude -p`. This tool has no ' +
42
+ 'non-print mode, so the flag is a silent no-op.',
43
+ forward: { type: 'shim' },
44
+ },
45
+ {
46
+ name: 'print-mode',
47
+ kind: 'boolean',
48
+ default: false,
49
+ env: 'OCP_PRINT_MODE',
50
+ description:
51
+ 'Spawn `claude --print` directly (no PTY, no TUI rendering). Raw ' +
52
+ 'markdown formatting (``` fences, ## headings, **bold**) reaches the ' +
53
+ 'caller unchanged. Output for --output-format=json|stream-json passes ' +
54
+ 'through claude\'s native schema rather than the ocp-wrapped schema. ' +
55
+ 'Tool-approval prompts and other interactive features are not ' +
56
+ 'available in this mode; MCP servers are known to hang in print mode.',
57
+ forward: { type: 'shim' },
58
+ },
59
+ {
60
+ name: 'output-format',
61
+ kind: 'enum',
62
+ choices: ['text', 'json', 'stream-json'],
63
+ default: 'text',
64
+ description:
65
+ 'Format of stdout. `text` (default) emits plain assistant text. ' +
66
+ '`json` emits a single result object. `stream-json` emits a ' +
67
+ 'newline-delimited event stream.',
68
+ forward: { type: 'shim' },
69
+ },
70
+
71
+ // ── Spawn-time forwarding ─────────────────────────────────────────────
72
+ {
73
+ name: 'model',
74
+ kind: 'string',
75
+ description: 'Model alias or full name (e.g. `sonnet`, `claude-sonnet-4-6`).',
76
+ forward: { type: 'argv', flag: '--model' },
77
+ },
78
+ {
79
+ name: 'dangerously-skip-permissions',
80
+ kind: 'boolean',
81
+ default: false,
82
+ description:
83
+ 'Bypass all permission checks in the upstream CLI. Never set by the ' +
84
+ 'shim itself; only forwarded when the caller asks for it.',
85
+ forward: { type: 'argv', flag: '--dangerously-skip-permissions' },
86
+ },
87
+ {
88
+ name: 'system-prompt',
89
+ kind: 'string',
90
+ description: 'Override the upstream system prompt.',
91
+ forward: { type: 'argv', flag: '--system-prompt' },
92
+ },
93
+ {
94
+ name: 'allowed-tools',
95
+ aliases: ['allowedTools'],
96
+ kind: 'array',
97
+ repeatable: true,
98
+ description:
99
+ 'Allow-list of tools the model may use. Accepts a variadic list of ' +
100
+ 'tool patterns and/or repeated occurrences of the flag.',
101
+ forward: { type: 'argv', flag: '--allowed-tools' },
102
+ },
103
+ {
104
+ name: 'disallowed-tools',
105
+ aliases: ['disallowedTools'],
106
+ kind: 'array',
107
+ repeatable: true,
108
+ description: 'Deny-list of tools the model may not use. Same shape as `--allowed-tools`.',
109
+ forward: { type: 'argv', flag: '--disallowed-tools' },
110
+ },
111
+ {
112
+ name: 'debug',
113
+ kind: 'boolean',
114
+ default: false,
115
+ description: 'Enable shim debug logs to stderr AND forward `--debug` upstream.',
116
+ forward: { type: 'argv', flag: '--debug' },
117
+ },
118
+ {
119
+ name: 'verbose',
120
+ kind: 'boolean',
121
+ default: false,
122
+ description: 'Verbose mode; useful with `stream-json` output for visibility.',
123
+ forward: { type: 'argv', flag: '--verbose' },
124
+ },
125
+
126
+ // ── Session continuation ──────────────────────────────────────────────
127
+ {
128
+ name: 'continue',
129
+ short: 'c',
130
+ kind: 'boolean',
131
+ default: false,
132
+ description: 'Continue the most recent conversation in `cwd`.',
133
+ forward: { type: 'argv', flag: '--continue' },
134
+ },
135
+ {
136
+ name: 'resume',
137
+ short: 'r',
138
+ kind: 'string',
139
+ description:
140
+ 'Resume a session by its UUID or a search term. Pass a session id ' +
141
+ 'returned by a prior run to continue from it.',
142
+ forward: { type: 'argv', flag: '--resume' },
143
+ },
144
+ {
145
+ name: 'fork-session',
146
+ kind: 'boolean',
147
+ default: false,
148
+ description:
149
+ 'When resuming, create a new session id instead of writing back to ' +
150
+ 'the original. Requires `--resume` or `--continue`.',
151
+ forward: { type: 'argv', flag: '--fork-session' },
152
+ },
153
+ {
154
+ name: 'no-session-persistence',
155
+ kind: 'boolean',
156
+ default: false,
157
+ description: 'Disable saving the session for later resume.',
158
+ forward: { type: 'argv', flag: '--no-session-persistence' },
159
+ },
160
+ {
161
+ name: 'resume-session-at',
162
+ kind: 'string',
163
+ description: 'Resume up to and including a specific message id.',
164
+ forward: { type: 'argv', flag: '--resume-session-at' },
165
+ },
166
+ {
167
+ name: 'rewind-files',
168
+ kind: 'string',
169
+ description:
170
+ 'Restore files to the state they were in at a given user-message id, ' +
171
+ 'then exit.',
172
+ forward: { type: 'argv', flag: '--rewind-files' },
173
+ },
174
+ {
175
+ name: 'session-id',
176
+ kind: 'string',
177
+ description: 'Use a specific UUID for the new session.',
178
+ forward: { type: 'argv', flag: '--session-id' },
179
+ validate(value) {
180
+ if (typeof value !== 'string') return undefined;
181
+ if (!/^[0-9a-fA-F-]{36}$/.test(value)) {
182
+ return `--session-id must be a 36-char UUID; got ${JSON.stringify(value)}`;
183
+ }
184
+ },
185
+ },
186
+ {
187
+ name: 'name',
188
+ short: 'n',
189
+ kind: 'string',
190
+ description: 'Display name for the session.',
191
+ forward: { type: 'argv', flag: '--name' },
192
+ },
193
+
194
+ // ── Print / output (extras) ───────────────────────────────────────────
195
+ {
196
+ name: 'input-format',
197
+ kind: 'enum',
198
+ choices: ['text', 'stream-json'],
199
+ default: 'text',
200
+ description:
201
+ '`text` reads a single prompt from argv or stdin. `stream-json` ' +
202
+ 'reads NDJSON `SDKUserMessage` events from stdin (requires ' +
203
+ '`--output-format=stream-json`).',
204
+ forward: { type: 'shim' },
205
+ },
206
+ {
207
+ name: 'json-schema',
208
+ kind: 'json',
209
+ description:
210
+ 'JSON Schema applied to the final assistant output (`--output-format=json`). ' +
211
+ 'A schema mismatch sets `is_error: true` in the result.',
212
+ forward: { type: 'shim' },
213
+ },
214
+ {
215
+ name: 'replay-user-messages',
216
+ kind: 'boolean',
217
+ default: false,
218
+ description:
219
+ 'Echo user messages back on stdout for acknowledgment ' +
220
+ '(stream-json input + output only).',
221
+ forward: { type: 'shim' },
222
+ },
223
+ {
224
+ name: 'include-hook-events',
225
+ kind: 'boolean',
226
+ default: false,
227
+ description: 'Include hook lifecycle events in stream-json output.',
228
+ forward: { type: 'argv', flag: '--include-hook-events' },
229
+ },
230
+ {
231
+ name: 'include-partial-messages',
232
+ kind: 'boolean',
233
+ default: false,
234
+ description: 'Include partial assistant message chunks in stream-json output.',
235
+ forward: { type: 'argv', flag: '--include-partial-messages' },
236
+ },
237
+
238
+ // ── Model & behavior ──────────────────────────────────────────────────
239
+ {
240
+ name: 'effort',
241
+ kind: 'enum',
242
+ choices: ['low', 'medium', 'high', 'max'],
243
+ description: 'Effort level the model should apply.',
244
+ forward: { type: 'argv', flag: '--effort' },
245
+ },
246
+ {
247
+ name: 'thinking',
248
+ kind: 'enum',
249
+ choices: ['enabled', 'adaptive', 'disabled'],
250
+ description: 'Thinking mode.',
251
+ forward: { type: 'argv', flag: '--thinking' },
252
+ },
253
+ {
254
+ name: 'max-thinking-tokens',
255
+ kind: 'number',
256
+ description: 'Maximum thinking tokens (deprecated upstream, still forwarded).',
257
+ forward: { type: 'argv', flag: '--max-thinking-tokens' },
258
+ },
259
+ {
260
+ name: 'max-turns',
261
+ kind: 'number',
262
+ description:
263
+ 'Maximum agentic turns before early exit. Shim-enforced — the shim ' +
264
+ 'counts assistant events and aborts if the limit is reached.',
265
+ forward: { type: 'shim' },
266
+ },
267
+ {
268
+ name: 'max-budget-usd',
269
+ kind: 'number',
270
+ description: 'Maximum spend in USD. Shim-enforced.',
271
+ forward: { type: 'shim' },
272
+ },
273
+ {
274
+ name: 'task-budget',
275
+ kind: 'number',
276
+ description: 'API-side task budget in tokens. Shim-enforced.',
277
+ forward: { type: 'shim' },
278
+ },
279
+ {
280
+ name: 'fallback-model',
281
+ kind: 'string',
282
+ description: 'Automatic fallback model when the primary is overloaded.',
283
+ forward: { type: 'argv', flag: '--fallback-model' },
284
+ },
285
+
286
+ // ── Permissions / tools / MCP ─────────────────────────────────────────
287
+ {
288
+ name: 'permission-mode',
289
+ kind: 'string',
290
+ description:
291
+ 'Permission mode (`default` | `plan` | `acceptEdits` | ' +
292
+ '`bypassPermissions` | `dontAsk` | `auto`).',
293
+ forward: { type: 'argv', flag: '--permission-mode' },
294
+ },
295
+ {
296
+ name: 'allow-dangerously-skip-permissions',
297
+ kind: 'boolean',
298
+ default: false,
299
+ description:
300
+ 'Allow `--dangerously-skip-permissions` as a choice without enabling it.',
301
+ forward: { type: 'argv', flag: '--allow-dangerously-skip-permissions' },
302
+ },
303
+ {
304
+ name: 'tools',
305
+ kind: 'string',
306
+ description:
307
+ 'Tool set: empty string (none), `default` (all), or a comma/space-' +
308
+ 'separated list of tool names.',
309
+ forward: { type: 'argv', flag: '--tools' },
310
+ },
311
+ {
312
+ name: 'mcp-config',
313
+ kind: 'array',
314
+ repeatable: true,
315
+ description: 'MCP config paths or inline JSON strings (repeatable).',
316
+ forward: { type: 'argv', flag: '--mcp-config' },
317
+ },
318
+ {
319
+ name: 'strict-mcp-config',
320
+ kind: 'boolean',
321
+ default: false,
322
+ description: 'Only use `--mcp-config` sources; ignore project/local MCP configs.',
323
+ forward: { type: 'argv', flag: '--strict-mcp-config' },
324
+ },
325
+ {
326
+ name: 'permission-prompt-tool',
327
+ kind: 'string',
328
+ description: 'MCP tool name to handle permission prompts in headless mode.',
329
+ forward: { type: 'argv', flag: '--permission-prompt-tool' },
330
+ },
331
+
332
+ // ── Prompts / context ─────────────────────────────────────────────────
333
+ {
334
+ name: 'system-prompt-file',
335
+ kind: 'string',
336
+ description: 'Load the system prompt from a file path.',
337
+ forward: { type: 'argv', flag: '--system-prompt-file' },
338
+ },
339
+ {
340
+ name: 'append-system-prompt',
341
+ kind: 'string',
342
+ description: 'Append to the default system prompt.',
343
+ forward: { type: 'argv', flag: '--append-system-prompt' },
344
+ },
345
+ {
346
+ name: 'append-system-prompt-file',
347
+ kind: 'string',
348
+ description: 'Append to the system prompt from a file path.',
349
+ forward: { type: 'argv', flag: '--append-system-prompt-file' },
350
+ },
351
+ {
352
+ name: 'add-dir',
353
+ kind: 'array',
354
+ repeatable: true,
355
+ description: 'Additional directories to allow tool access to (repeatable).',
356
+ forward: { type: 'argv', flag: '--add-dir' },
357
+ },
358
+
359
+ // ── Settings / plugins ────────────────────────────────────────────────
360
+ {
361
+ name: 'settings',
362
+ kind: 'string',
363
+ description: 'Path to a settings JSON file or an inline JSON string.',
364
+ forward: { type: 'argv', flag: '--settings' },
365
+ },
366
+ {
367
+ name: 'setting-sources',
368
+ kind: 'string',
369
+ description: 'Comma-separated sources to load: `user`, `project`, `local`.',
370
+ forward: { type: 'argv', flag: '--setting-sources' },
371
+ },
372
+ {
373
+ name: 'agents',
374
+ kind: 'json',
375
+ description: 'Custom agent definitions as JSON.',
376
+ forward: { type: 'argv', flag: '--agents' },
377
+ },
378
+ {
379
+ name: 'plugin-dir',
380
+ kind: 'array',
381
+ repeatable: true,
382
+ description: 'Load plugins from directory (repeatable).',
383
+ forward: { type: 'argv', flag: '--plugin-dir' },
384
+ },
385
+ {
386
+ name: 'disable-slash-commands',
387
+ kind: 'boolean',
388
+ default: false,
389
+ description: 'Disable all slash commands and skills.',
390
+ forward: { type: 'argv', flag: '--disable-slash-commands' },
391
+ },
392
+ {
393
+ name: 'agent',
394
+ kind: 'string',
395
+ description: 'Selected agent name for this session.',
396
+ forward: { type: 'argv', flag: '--agent' },
397
+ },
398
+ {
399
+ name: 'file',
400
+ kind: 'array',
401
+ repeatable: true,
402
+ description:
403
+ 'File resources to download at startup. Each entry has the form ' +
404
+ '`file_id:relative_path`.',
405
+ forward: { type: 'argv', flag: '--file' },
406
+ },
407
+ {
408
+ name: 'ide',
409
+ kind: 'boolean',
410
+ default: false,
411
+ description: 'Auto-connect to an IDE if exactly one is available.',
412
+ forward: { type: 'argv', flag: '--ide' },
413
+ },
414
+ {
415
+ name: 'enable-auth-status',
416
+ kind: 'boolean',
417
+ default: false,
418
+ description: 'Emit `auth-status` events in stream-json output.',
419
+ forward: { type: 'argv', flag: '--enable-auth-status' },
420
+ },
421
+
422
+ // ── Debug / lifecycle ─────────────────────────────────────────────────
423
+ {
424
+ name: 'bare',
425
+ kind: 'boolean',
426
+ default: false,
427
+ description:
428
+ 'Minimal mode: skip hooks, LSP, plugins, attribution, auto-memory, ' +
429
+ 'background prefetches, keychain. Sets `CLAUDE_CODE_SIMPLE=1`.',
430
+ forward: { type: 'argv', flag: '--bare' },
431
+ },
432
+ {
433
+ name: 'init',
434
+ kind: 'boolean',
435
+ default: false,
436
+ description: 'Run Setup hooks with the `init` trigger, then continue.',
437
+ forward: { type: 'argv', flag: '--init' },
438
+ },
439
+ {
440
+ name: 'init-only',
441
+ kind: 'boolean',
442
+ default: false,
443
+ description: 'Run Setup & SessionStart hooks, then exit.',
444
+ forward: { type: 'argv', flag: '--init-only' },
445
+ },
446
+ {
447
+ name: 'maintenance',
448
+ kind: 'boolean',
449
+ default: false,
450
+ description: 'Run Setup hooks with the `maintenance` trigger, then continue.',
451
+ forward: { type: 'argv', flag: '--maintenance' },
452
+ },
453
+ {
454
+ name: 'debug-file',
455
+ kind: 'string',
456
+ description: 'Write upstream debug logs to a file.',
457
+ forward: { type: 'argv', flag: '--debug-file' },
458
+ },
459
+ {
460
+ name: 'workload',
461
+ kind: 'string',
462
+ description: 'Workload tag for billing (internal SDK daemon use).',
463
+ forward: { type: 'argv', flag: '--workload' },
464
+ },
465
+ {
466
+ name: 'betas',
467
+ kind: 'array',
468
+ repeatable: true,
469
+ description: 'Beta headers for the API (API-key users only).',
470
+ forward: { type: 'argv', flag: '--betas' },
471
+ },
472
+
473
+ // ── Shim-only convenience ─────────────────────────────────────────────
474
+ {
475
+ name: 'cwd',
476
+ kind: 'string',
477
+ description:
478
+ 'Working directory for the spawned `claude` process. Shim-only — the ' +
479
+ 'upstream CLI inherits cwd; this flag sets the PTY spawn cwd.',
480
+ forward: { type: 'shim' },
481
+ },
482
+ {
483
+ name: 'help',
484
+ short: 'h',
485
+ kind: 'boolean',
486
+ default: false,
487
+ description: 'Print this help text and exit.',
488
+ forward: { type: 'shim' },
489
+ },
490
+ {
491
+ name: 'version',
492
+ short: 'V',
493
+ kind: 'boolean',
494
+ default: false,
495
+ description: 'Print the ocp version and exit.',
496
+ forward: { type: 'shim' },
497
+ },
498
+ {
499
+ name: 'no-meta',
500
+ kind: 'boolean',
501
+ default: false,
502
+ description:
503
+ 'Hide the trailing meta line (duration · input/output tokens · USD ' +
504
+ 'cost · tools used) printed to stderr after the response. Same effect ' +
505
+ 'as OCP_NO_META=1. The meta line is printed only when stderr is a TTY.',
506
+ forward: { type: 'shim' },
507
+ },
508
+ ];
509
+
510
+ /**
511
+ * Look up an option by its canonical name, short alias, or long alias.
512
+ * @param {string} name
513
+ * @returns {object | undefined}
514
+ */
515
+ export function getOption(name) {
516
+ return OPTION_SPEC.find(
517
+ (o) => o.name === name || o.short === name || (o.aliases ?? []).includes(name),
518
+ );
519
+ }
@@ -0,0 +1,104 @@
1
+ // Cross-flag validation rules.
2
+ //
3
+ // Per-option validation (range, format) lives on each entry of OPTION_SPEC
4
+ // via its optional `validate` function. This module enforces relationships
5
+ // BETWEEN options — e.g. `--input-format=stream-json` requires
6
+ // `--output-format=stream-json`.
7
+ //
8
+ // Rules are appended to `CROSS_RULES`; the runner returns the concatenated
9
+ // list of human-readable errors.
10
+
11
+ const PERMISSION_MODES = new Set([
12
+ 'default', 'plan', 'acceptEdits', 'bypassPermissions', 'dontAsk', 'auto',
13
+ ]);
14
+
15
+ /** @type {Array<(options: Record<string, unknown>) => string | undefined>} */
16
+ export const CROSS_RULES = [
17
+ // R1. input-format=stream-json => output-format=stream-json
18
+ (o) => {
19
+ if (o['input-format'] === 'stream-json' && o['output-format'] !== 'stream-json') {
20
+ return '`--input-format=stream-json` requires `--output-format=stream-json`.';
21
+ }
22
+ },
23
+ // R2. replay-user-messages => stream-json on both sides
24
+ (o) => {
25
+ if (
26
+ o['replay-user-messages'] === true &&
27
+ (o['input-format'] !== 'stream-json' || o['output-format'] !== 'stream-json')
28
+ ) {
29
+ return '`--replay-user-messages` requires both `--input-format=stream-json` and `--output-format=stream-json`.';
30
+ }
31
+ },
32
+ // R3. include-hook-events => stream-json output
33
+ (o) => {
34
+ if (o['include-hook-events'] === true && o['output-format'] !== 'stream-json') {
35
+ return '`--include-hook-events` requires `--output-format=stream-json`.';
36
+ }
37
+ },
38
+ // R4. include-partial-messages => stream-json output
39
+ (o) => {
40
+ if (o['include-partial-messages'] === true && o['output-format'] !== 'stream-json') {
41
+ return '`--include-partial-messages` requires `--output-format=stream-json`.';
42
+ }
43
+ },
44
+ // R5. max-budget-usd must be a positive number when set
45
+ (o) => {
46
+ const v = o['max-budget-usd'];
47
+ if (v !== undefined && (typeof v !== 'number' || !(v > 0))) {
48
+ return '`--max-budget-usd` must be a positive number.';
49
+ }
50
+ },
51
+ // R6. task-budget must be a positive integer when set
52
+ (o) => {
53
+ const v = o['task-budget'];
54
+ if (v !== undefined && (!Number.isInteger(v) || v <= 0)) {
55
+ return '`--task-budget` must be a positive integer.';
56
+ }
57
+ },
58
+ // R7. session-id format is enforced by the per-option validate callback;
59
+ // we re-check here so the failure surfaces alongside other cross
60
+ // errors in a single batch.
61
+ (o) => {
62
+ const v = o['session-id'];
63
+ if (typeof v === 'string' && v !== '' && !/^[0-9a-fA-F-]{36}$/.test(v)) {
64
+ return '`--session-id` must be a 36-char UUID.';
65
+ }
66
+ },
67
+ // R8. permission-mode must be one of the known values when set
68
+ (o) => {
69
+ const v = o['permission-mode'];
70
+ if (typeof v === 'string' && v !== '' && !PERMISSION_MODES.has(v)) {
71
+ return `\`--permission-mode\` must be one of: ${[...PERMISSION_MODES].join(', ')}.`;
72
+ }
73
+ },
74
+ // R9. resume and continue are mutually exclusive
75
+ (o) => {
76
+ if (typeof o.resume === 'string' && o.resume !== '' && o.continue === true) {
77
+ return '`--resume` and `--continue` are mutually exclusive.';
78
+ }
79
+ },
80
+ // R10. fork-session requires a base session: resume or continue
81
+ (o) => {
82
+ const hasBase =
83
+ (typeof o.resume === 'string' && o.resume !== '') || o.continue === true;
84
+ if (o['fork-session'] === true && !hasBase) {
85
+ return '`--fork-session` requires `--resume <id>` or `--continue`.';
86
+ }
87
+ },
88
+ ];
89
+
90
+ /**
91
+ * Run all cross-flag rules. Returns an array of error messages; empty when
92
+ * the option set is internally consistent.
93
+ *
94
+ * @param {Record<string, unknown>} options
95
+ * @returns {string[]}
96
+ */
97
+ export function validate(options) {
98
+ const errors = [];
99
+ for (const rule of CROSS_RULES) {
100
+ const msg = rule(options);
101
+ if (msg) errors.push(msg);
102
+ }
103
+ return errors;
104
+ }
@@ -0,0 +1,8 @@
1
+ // Barrel re-export for the output module.
2
+ export {
3
+ registerOutputAdapter, unregisterOutputAdapter,
4
+ listOutputAdapters, getOutputAdapter,
5
+ } from './registry.js';
6
+ export { textOutputAdapter } from './text.js';
7
+ export { jsonOutputAdapter } from './json.js';
8
+ export { streamJsonOutputAdapter, EVENT_BUILDERS } from './stream-json.js';