@basis-theory-labs/cli 4.2.0 → 4.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -19,7 +19,7 @@ $ npm install -g @basis-theory-labs/cli
19
19
  $ bt COMMAND
20
20
  running command...
21
21
  $ bt (--version)
22
- @basis-theory-labs/cli/4.2.0 linux-x64 node-v22.23.1
22
+ @basis-theory-labs/cli/4.4.0 linux-x64 node-v22.23.3
23
23
  $ bt --help [COMMAND]
24
24
  USAGE
25
25
  $ bt COMMAND
@@ -36,11 +36,15 @@ USAGE
36
36
  * [`bt proxies create`](#bt-proxies-create)
37
37
  * [`bt proxies delete ID`](#bt-proxies-delete-id)
38
38
  * [`bt proxies logs [ID]`](#bt-proxies-logs-id)
39
+ * [`bt proxies logs read ID`](#bt-proxies-logs-read-id)
40
+ * [`bt proxies logs tail ID`](#bt-proxies-logs-tail-id)
39
41
  * [`bt proxies update ID`](#bt-proxies-update-id)
40
42
  * [`bt reactors`](#bt-reactors)
41
43
  * [`bt reactors create`](#bt-reactors-create)
42
44
  * [`bt reactors delete ID`](#bt-reactors-delete-id)
43
45
  * [`bt reactors logs [ID]`](#bt-reactors-logs-id)
46
+ * [`bt reactors logs read ID`](#bt-reactors-logs-read-id)
47
+ * [`bt reactors logs tail ID`](#bt-reactors-logs-tail-id)
44
48
  * [`bt reactors update ID`](#bt-reactors-update-id)
45
49
 
46
50
  ## `bt applications`
@@ -62,7 +66,7 @@ EXAMPLES
62
66
  $ bt applications
63
67
  ```
64
68
 
65
- _See code: [dist/commands/applications/index.ts](https://github.com/Basis-Theory-Labs/basistheory-cli/blob/v4.2.0/dist/commands/applications/index.ts)_
69
+ _See code: [dist/commands/applications/index.ts](https://github.com/Basis-Theory-Labs/basistheory-cli/blob/v4.4.0/dist/commands/applications/index.ts)_
66
70
 
67
71
  ## `bt applications create`
68
72
 
@@ -151,7 +155,7 @@ EXAMPLES
151
155
  $ bt proxies
152
156
  ```
153
157
 
154
- _See code: [dist/commands/proxies/index.ts](https://github.com/Basis-Theory-Labs/basistheory-cli/blob/v4.2.0/dist/commands/proxies/index.ts)_
158
+ _See code: [dist/commands/proxies/index.ts](https://github.com/Basis-Theory-Labs/basistheory-cli/blob/v4.4.0/dist/commands/proxies/index.ts)_
155
159
 
156
160
  ## `bt proxies create`
157
161
 
@@ -256,7 +260,7 @@ EXAMPLES
256
260
 
257
261
  ## `bt proxies logs [ID]`
258
262
 
259
- Display live Proxy Transform logs output. Requires `proxy:update` Management Application permissions
263
+ Legacy tunnel-based Proxy Transform logs. Opens a local tunnel and updates logging configuration. For v2/runtime debugging, use `bt proxies logs tail <id>` or `bt proxies logs read <id>`. Requires `proxy:update` Management Application permissions
260
264
 
261
265
  ```
262
266
  USAGE
@@ -270,7 +274,9 @@ FLAGS
270
274
  -x, --management-key=<value> (required) management key used for connecting with the reactor / proxy
271
275
 
272
276
  DESCRIPTION
273
- Display live Proxy Transform logs output. Requires `proxy:update` Management Application permissions
277
+ Legacy tunnel-based Proxy Transform logs. Opens a local tunnel and updates logging configuration. For v2/runtime
278
+ debugging, use `bt proxies logs tail <id>` or `bt proxies logs read <id>`. Requires `proxy:update` Management
279
+ Application permissions
274
280
 
275
281
  EXAMPLES
276
282
  $ bt proxies logs
@@ -280,6 +286,115 @@ EXAMPLES
280
286
  $ bt proxies logs 03858bf5-32d3-4a2e-b74b-daeea0883bca -p 3000
281
287
  ```
282
288
 
289
+ ## `bt proxies logs read ID`
290
+
291
+ Read a fixed window of Proxy runtime logs through Events and exit. Requires `event:read` and runtime logging already enabled.
292
+
293
+ ```
294
+ USAGE
295
+ $ bt proxies logs read ID -x <value> [--trace-id <value>] [--transform-type request_transform|response_transform]
296
+ [--since <value>] [--until <value>] [--format pretty|json|json-pretty]
297
+
298
+ ARGUMENTS
299
+ ID Proxy id
300
+
301
+ FLAGS
302
+ -x, --management-key=<value> (required) management key used for connecting with the reactor / proxy
303
+ --format=<option> [default: pretty] pretty: readable logs; json: compact objects; json-pretty: indented
304
+ objects. Entries are separated by blank lines; colors are enabled in terminals
305
+ <options: pretty|json|json-pretty>
306
+ --since=<value> window start: positive duration (30s, 5m, 2h, 1d, 1w) or ISO timestamp with timezone;
307
+ defaults to five minutes before the end
308
+ --trace-id=<value> exact, case-sensitive stored BT trace ID; combines with transform direction using AND
309
+ --transform-type=<option> exact transform direction; includes both directions when omitted
310
+ <options: request_transform|response_transform>
311
+ --until=<value> window end (exclusive): positive duration or ISO timestamp with timezone; defaults to
312
+ command start
313
+
314
+ DESCRIPTION
315
+ Read a fixed window of Proxy runtime logs through Events and exit. Requires `event:read` and runtime logging already
316
+ enabled.
317
+
318
+ Optional --trace-id matches the effective stored BT trace ID exactly and case-sensitively. A submitted header may be
319
+ sanitized by Vault; the CLI does not normalize or trim it. A reused trace ID can match multiple invocations.
320
+ --transform-type filters request or response transforms, alone or combined with trace ID using AND; omitting it
321
+ includes both directions.
322
+
323
+ Defaults to the five minutes preceding --until, or command start when --until is omitted, regardless of filters.
324
+ Supply --since, for example --since 30d, to request a larger window. Explicit relative values use command-start time.
325
+ Windows include their start and exclude their end, filtering event batch timestamps rather than individual record
326
+ occurrence times. Each matching batch is expanded in record sequence; flattened output has no global chronological
327
+ ordering. History is limited by server retention and tenant entitlements; the API clamps unavailable history. Indexing
328
+ is asynchronous and pagination is not a snapshot, so empty or exhausted results do not prove complete coverage. Large
329
+ windows may hit bounded work limits and fail with partial output. Application logs come from the injected `logger`,
330
+ not arbitrary stdout or `console.log`; collection requires resource opt-in and the platform runtime-log gate. Does not
331
+ enable logging or open a tunnel.
332
+
333
+ EXAMPLES
334
+ $ bt proxies logs read 03858bf5-32d3-4a2e-b74b-daeea0883bca --trace-id customer_Order-42 --since 30d
335
+
336
+ $ bt proxies logs read 03858bf5-32d3-4a2e-b74b-daeea0883bca --transform-type request_transform
337
+
338
+ $ bt proxies logs read 03858bf5-32d3-4a2e-b74b-daeea0883bca --trace-id customer_Order-42 --transform-type response_transform --since 30m
339
+
340
+ $ bt proxies logs read 03858bf5-32d3-4a2e-b74b-daeea0883bca --since 1h --until 30m
341
+
342
+ $ bt proxies logs read 03858bf5-32d3-4a2e-b74b-daeea0883bca --since 2026-10-01T10:00:00Z --until 2026-10-01T10:15:00Z --format json
343
+ ```
344
+
345
+ ## `bt proxies logs tail ID`
346
+
347
+ Tail Proxy runtime logs through Events. Requires `event:read` and runtime logging already enabled.
348
+
349
+ ```
350
+ USAGE
351
+ $ bt proxies logs tail ID -x <value> [--trace-id <value>] [--transform-type request_transform|response_transform]
352
+ [--since <value>] [--format pretty|json|json-pretty]
353
+
354
+ ARGUMENTS
355
+ ID Proxy id
356
+
357
+ FLAGS
358
+ -x, --management-key=<value> (required) management key used for connecting with the reactor / proxy
359
+ --format=<option> [default: pretty] pretty: readable logs; json: compact objects; json-pretty: indented
360
+ objects. Entries are separated by blank lines; colors are enabled in terminals
361
+ <options: pretty|json|json-pretty>
362
+ --since=<value> include initial history from a positive duration (30s, 5m, 2h, 1d, 1w) or ISO timestamp
363
+ with timezone; omitted means watch from command start
364
+ --trace-id=<value> exact, case-sensitive stored BT trace ID; combines with transform direction using AND
365
+ --transform-type=<option> exact transform direction; includes both directions when omitted
366
+ <options: request_transform|response_transform>
367
+
368
+ DESCRIPTION
369
+ Tail Proxy runtime logs through Events. Requires `event:read` and runtime logging already enabled.
370
+
371
+ Optional --trace-id matches the effective stored BT trace ID exactly and case-sensitively. A submitted header may be
372
+ sanitized by Vault; the CLI does not normalize or trim it. A reused trace ID can match multiple invocations.
373
+ --transform-type filters request or response transforms, alone or combined with trace ID using AND; omitting it
374
+ includes both directions. Filters apply to initial history and every live poll.
375
+
376
+ Starts watching from command time, regardless of filters. Supply --since to retrieve initial history before following
377
+ new logs. Polls every five seconds with a rolling five-minute overlap that never reaches before the requested start.
378
+ Time windows filter event batches, not individual record occurrence times; a newly arriving batch can contain records
379
+ that occurred before command start. History is limited by server retention and tenant entitlements; the API clamps
380
+ unavailable history. Large initial windows may hit bounded work limits and fail with partial output. Visibility is
381
+ delayed and best-effort; output has no durable resume or global chronological ordering. Application logs come from the
382
+ injected `logger`, not arbitrary stdout or `console.log`; collection requires resource opt-in and the platform
383
+ runtime-log gate. Silence does not distinguish an idle resource, a wrong ID or filter, disabled collection, or delayed
384
+ indexing. Runs until interrupted, output closes, or an error occurs.
385
+
386
+ EXAMPLES
387
+ $ bt proxies logs tail 03858bf5-32d3-4a2e-b74b-daeea0883bca
388
+
389
+ $ bt proxies logs tail 03858bf5-32d3-4a2e-b74b-daeea0883bca --trace-id customer_Order-42
390
+
391
+ $ bt proxies logs tail 03858bf5-32d3-4a2e-b74b-daeea0883bca --transform-type request_transform
392
+
393
+ $ bt proxies logs tail 03858bf5-32d3-4a2e-b74b-daeea0883bca --trace-id customer_Order-42 --transform-type response_transform --since 30m --format json
394
+
395
+ $ bt proxies logs tail 03858bf5-32d3-4a2e-b74b-daeea0883bca --since 30m --format json
396
+ ```
397
+
283
398
  ## `bt proxies update ID`
284
399
 
285
400
  Updates an existing Pre-Configured Proxy. Requires `proxy:update` Management Application permission
@@ -382,7 +497,7 @@ EXAMPLES
382
497
  $ bt reactors
383
498
  ```
384
499
 
385
- _See code: [dist/commands/reactors/index.ts](https://github.com/Basis-Theory-Labs/basistheory-cli/blob/v4.2.0/dist/commands/reactors/index.ts)_
500
+ _See code: [dist/commands/reactors/index.ts](https://github.com/Basis-Theory-Labs/basistheory-cli/blob/v4.4.0/dist/commands/reactors/index.ts)_
386
501
 
387
502
  ## `bt reactors create`
388
503
 
@@ -456,7 +571,7 @@ EXAMPLES
456
571
 
457
572
  ## `bt reactors logs [ID]`
458
573
 
459
- Display live Reactor logs output. Requires `reactor:update` Management Application permissions
574
+ Legacy tunnel-based Reactor logs. Opens a local tunnel and updates logging configuration. For v2/runtime debugging, use `bt reactors logs tail <id>` or `bt reactors logs read <id>`. Requires `reactor:update` Management Application permissions
460
575
 
461
576
  ```
462
577
  USAGE
@@ -470,7 +585,9 @@ FLAGS
470
585
  -x, --management-key=<value> (required) management key used for connecting with the reactor / proxy
471
586
 
472
587
  DESCRIPTION
473
- Display live Reactor logs output. Requires `reactor:update` Management Application permissions
588
+ Legacy tunnel-based Reactor logs. Opens a local tunnel and updates logging configuration. For v2/runtime debugging,
589
+ use `bt reactors logs tail <id>` or `bt reactors logs read <id>`. Requires `reactor:update` Management Application
590
+ permissions
474
591
 
475
592
  EXAMPLES
476
593
  $ bt reactors logs
@@ -480,6 +597,100 @@ EXAMPLES
480
597
  $ bt reactors logs 03858bf5-32d3-4a2e-b74b-daeea0883bca -p 3000
481
598
  ```
482
599
 
600
+ ## `bt reactors logs read ID`
601
+
602
+ Read a fixed window of Reactor runtime logs through Events and exit. Requires `event:read` and runtime logging already enabled.
603
+
604
+ ```
605
+ USAGE
606
+ $ bt reactors logs read ID -x <value> [--trace-id <value>] [--since <value>] [--until <value>] [--format
607
+ pretty|json|json-pretty]
608
+
609
+ ARGUMENTS
610
+ ID Reactor id
611
+
612
+ FLAGS
613
+ -x, --management-key=<value> (required) management key used for connecting with the reactor / proxy
614
+ --format=<option> [default: pretty] pretty: readable logs; json: compact objects; json-pretty: indented
615
+ objects. Entries are separated by blank lines; colors are enabled in terminals
616
+ <options: pretty|json|json-pretty>
617
+ --since=<value> window start: positive duration (30s, 5m, 2h, 1d, 1w) or ISO timestamp with timezone;
618
+ defaults to five minutes before the end
619
+ --trace-id=<value> exact, case-sensitive stored BT trace ID
620
+ --until=<value> window end (exclusive): positive duration or ISO timestamp with timezone; defaults to
621
+ command start
622
+
623
+ DESCRIPTION
624
+ Read a fixed window of Reactor runtime logs through Events and exit. Requires `event:read` and runtime logging already
625
+ enabled.
626
+
627
+ Optional --trace-id matches the effective stored BT trace ID exactly and case-sensitively. A submitted header may be
628
+ sanitized by Vault; the CLI does not normalize or trim it. A reused trace ID can match multiple invocations.
629
+
630
+ Defaults to the five minutes preceding --until, or command start when --until is omitted, regardless of filters.
631
+ Supply --since, for example --since 30d, to request a larger window. Explicit relative values use command-start time.
632
+ Windows include their start and exclude their end, filtering event batch timestamps rather than individual record
633
+ occurrence times. Each matching batch is expanded in record sequence; flattened output has no global chronological
634
+ ordering. History is limited by server retention and tenant entitlements; the API clamps unavailable history. Indexing
635
+ is asynchronous and pagination is not a snapshot, so empty or exhausted results do not prove complete coverage. Large
636
+ windows may hit bounded work limits and fail with partial output. Application logs come from the injected `logger`,
637
+ not arbitrary stdout or `console.log`; collection requires resource opt-in and the platform runtime-log gate. Does not
638
+ enable logging or open a tunnel.
639
+
640
+ EXAMPLES
641
+ $ bt reactors logs read 03858bf5-32d3-4a2e-b74b-daeea0883bca --trace-id customer_Order-42 --since 30d
642
+
643
+ $ bt reactors logs read 03858bf5-32d3-4a2e-b74b-daeea0883bca --since 1h --until 30m
644
+
645
+ $ bt reactors logs read 03858bf5-32d3-4a2e-b74b-daeea0883bca --since 2026-10-01T10:00:00Z --until 2026-10-01T10:15:00Z --format json
646
+ ```
647
+
648
+ ## `bt reactors logs tail ID`
649
+
650
+ Tail Reactor runtime logs through Events. Requires `event:read` and runtime logging already enabled.
651
+
652
+ ```
653
+ USAGE
654
+ $ bt reactors logs tail ID -x <value> [--trace-id <value>] [--since <value>] [--format pretty|json|json-pretty]
655
+
656
+ ARGUMENTS
657
+ ID Reactor id
658
+
659
+ FLAGS
660
+ -x, --management-key=<value> (required) management key used for connecting with the reactor / proxy
661
+ --format=<option> [default: pretty] pretty: readable logs; json: compact objects; json-pretty: indented
662
+ objects. Entries are separated by blank lines; colors are enabled in terminals
663
+ <options: pretty|json|json-pretty>
664
+ --since=<value> include initial history from a positive duration (30s, 5m, 2h, 1d, 1w) or ISO timestamp
665
+ with timezone; omitted means watch from command start
666
+ --trace-id=<value> exact, case-sensitive stored BT trace ID
667
+
668
+ DESCRIPTION
669
+ Tail Reactor runtime logs through Events. Requires `event:read` and runtime logging already enabled.
670
+
671
+ Optional --trace-id matches the effective stored BT trace ID exactly and case-sensitively. A submitted header may be
672
+ sanitized by Vault; the CLI does not normalize or trim it. A reused trace ID can match multiple invocations.
673
+
674
+ Starts watching from command time, regardless of filters. Supply --since to retrieve initial history before following
675
+ new logs. Polls every five seconds with a rolling five-minute overlap that never reaches before the requested start.
676
+ Time windows filter event batches, not individual record occurrence times; a newly arriving batch can contain records
677
+ that occurred before command start. History is limited by server retention and tenant entitlements; the API clamps
678
+ unavailable history. Large initial windows may hit bounded work limits and fail with partial output. Visibility is
679
+ delayed and best-effort; output has no durable resume or global chronological ordering. Application logs come from the
680
+ injected `logger`, not arbitrary stdout or `console.log`; collection requires resource opt-in and the platform
681
+ runtime-log gate. Silence does not distinguish an idle resource, a wrong ID or filter, disabled collection, or delayed
682
+ indexing. Runs until interrupted, output closes, or an error occurs.
683
+
684
+ EXAMPLES
685
+ $ bt reactors logs tail 03858bf5-32d3-4a2e-b74b-daeea0883bca
686
+
687
+ $ bt reactors logs tail 03858bf5-32d3-4a2e-b74b-daeea0883bca --trace-id customer_Order-42
688
+
689
+ $ bt reactors logs tail 03858bf5-32d3-4a2e-b74b-daeea0883bca --trace-id customer_Order-42 --since 30m --format json
690
+
691
+ $ bt reactors logs tail 03858bf5-32d3-4a2e-b74b-daeea0883bca --since 30m --format json
692
+ ```
693
+
483
694
  ## `bt reactors update ID`
484
695
 
485
696
  Updates an existing Reactor. Requires `reactor:update` Management Application permission
@@ -0,0 +1,16 @@
1
+ import { BaseCommand } from '../../../base';
2
+ export default class Read extends BaseCommand {
3
+ static description: string;
4
+ static examples: string[];
5
+ static args: {
6
+ id: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
7
+ };
8
+ static flags: {
9
+ 'trace-id': import("@oclif/core/lib/interfaces/parser").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
10
+ 'transform-type': import("@oclif/core/lib/interfaces/parser").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
11
+ since: import("@oclif/core/lib/interfaces/parser").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
12
+ until: import("@oclif/core/lib/interfaces/parser").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
13
+ format: import("@oclif/core/lib/interfaces/parser").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
14
+ };
15
+ run(): Promise<void>;
16
+ }
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const base_1 = require("../../../base");
5
+ const runtime_1 = require("../../../logs/runtime");
6
+ const time_1 = require("../../../logs/time");
7
+ class Read extends base_1.BaseCommand {
8
+ async run() {
9
+ const now = Date.now();
10
+ const { flags: { 'management-key': apiKey, 'api-base-url': apiBaseUrl, 'trace-id': traceId, 'transform-type': transformType, format, since, until, }, args: { id }, } = await this.parse(Read);
11
+ if (!id.trim()) {
12
+ this.error('Proxy id must not be blank');
13
+ }
14
+ if (traceId !== undefined && !traceId.trim()) {
15
+ this.error('--trace-id must not be blank');
16
+ }
17
+ await (0, runtime_1.readEventLogs)({
18
+ apiKey,
19
+ apiBaseUrl,
20
+ resourceType: 'proxy',
21
+ resourceId: id,
22
+ traceId,
23
+ transformType: transformType,
24
+ format: format,
25
+ window: (0, time_1.resolveLogWindow)({
26
+ since,
27
+ until,
28
+ }, now),
29
+ });
30
+ // Cleanup has completed. Oclif's final flush would stall on a pending write.
31
+ if (process.stdout.writableLength > 0 && process.exitCode !== undefined) {
32
+ this.exit(process.exitCode);
33
+ }
34
+ }
35
+ }
36
+ exports.default = Read;
37
+ Read.description = 'Read a fixed window of Proxy runtime logs through Events and exit. Requires `event:read` and runtime logging already enabled.\n\n' +
38
+ 'Optional --trace-id matches the effective stored BT trace ID exactly and case-sensitively. A submitted header may be sanitized by Vault; the CLI does not normalize or trim it. A reused trace ID can match multiple invocations. --transform-type filters request or response transforms, alone or combined with trace ID using AND; omitting it includes both directions.\n\n' +
39
+ 'Defaults to the five minutes preceding --until, or command start when --until is omitted, regardless of filters. Supply --since, for example --since 30d, to request a larger window. Explicit relative values use command-start time. Windows include their start and exclude their end, filtering event batch timestamps rather than individual record occurrence times. Each matching batch is expanded in record sequence; flattened output has no global chronological ordering. History is limited by server retention and tenant entitlements; the API clamps unavailable history. Indexing is asynchronous and pagination is not a snapshot, so empty or exhausted results do not prove complete coverage. Large windows may hit bounded work limits and fail with partial output. Application logs come from the injected `logger`, not arbitrary stdout or `console.log`; collection requires resource opt-in and the platform runtime-log gate. Does not enable logging or open a tunnel.';
40
+ Read.examples = [
41
+ '<%= config.bin %> proxies logs read 03858bf5-32d3-4a2e-b74b-daeea0883bca --trace-id customer_Order-42 --since 30d',
42
+ '<%= config.bin %> proxies logs read 03858bf5-32d3-4a2e-b74b-daeea0883bca --transform-type request_transform',
43
+ '<%= config.bin %> proxies logs read 03858bf5-32d3-4a2e-b74b-daeea0883bca --trace-id customer_Order-42 --transform-type response_transform --since 30m',
44
+ '<%= config.bin %> proxies logs read 03858bf5-32d3-4a2e-b74b-daeea0883bca --since 1h --until 30m',
45
+ '<%= config.bin %> proxies logs read 03858bf5-32d3-4a2e-b74b-daeea0883bca --since 2026-10-01T10:00:00Z --until 2026-10-01T10:15:00Z --format json',
46
+ ];
47
+ Read.args = {
48
+ id: core_1.Args.string({
49
+ description: 'Proxy id',
50
+ required: true,
51
+ }),
52
+ };
53
+ Read.flags = {
54
+ 'trace-id': core_1.Flags.string({
55
+ description: 'exact, case-sensitive stored BT trace ID; combines with transform direction using AND',
56
+ }),
57
+ 'transform-type': core_1.Flags.string({
58
+ description: 'exact transform direction; includes both directions when omitted',
59
+ options: ['request_transform', 'response_transform'],
60
+ }),
61
+ since: core_1.Flags.string({
62
+ description: 'window start: positive duration (30s, 5m, 2h, 1d, 1w) or ISO timestamp with timezone; defaults to five minutes before the end',
63
+ }),
64
+ until: core_1.Flags.string({
65
+ description: 'window end (exclusive): positive duration or ISO timestamp with timezone; defaults to command start',
66
+ }),
67
+ format: core_1.Flags.string({
68
+ description: 'pretty: readable logs; json: compact objects; json-pretty: indented objects. Entries are separated by blank lines; colors are enabled in terminals',
69
+ options: ['pretty', 'json', 'json-pretty'],
70
+ default: 'pretty',
71
+ }),
72
+ };
@@ -0,0 +1,15 @@
1
+ import { BaseCommand } from '../../../base';
2
+ export default class Tail extends BaseCommand {
3
+ static description: string;
4
+ static examples: string[];
5
+ static args: {
6
+ id: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
7
+ };
8
+ static flags: {
9
+ 'trace-id': import("@oclif/core/lib/interfaces/parser").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
10
+ 'transform-type': import("@oclif/core/lib/interfaces/parser").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
11
+ since: import("@oclif/core/lib/interfaces/parser").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
12
+ format: import("@oclif/core/lib/interfaces/parser").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
13
+ };
14
+ run(): Promise<void>;
15
+ }
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const base_1 = require("../../../base");
5
+ const runtime_1 = require("../../../logs/runtime");
6
+ const time_1 = require("../../../logs/time");
7
+ class Tail extends base_1.BaseCommand {
8
+ async run() {
9
+ const now = Date.now();
10
+ const { flags: { 'management-key': apiKey, 'api-base-url': apiBaseUrl, 'trace-id': traceId, 'transform-type': transformType, format, since, }, args: { id }, } = await this.parse(Tail);
11
+ if (!id.trim()) {
12
+ this.error('Proxy id must not be blank');
13
+ }
14
+ if (traceId !== undefined && !traceId.trim()) {
15
+ this.error('--trace-id must not be blank');
16
+ }
17
+ await (0, runtime_1.followEventLogs)({
18
+ apiKey,
19
+ apiBaseUrl,
20
+ resourceType: 'proxy',
21
+ resourceId: id,
22
+ traceId,
23
+ transformType: transformType,
24
+ format: format,
25
+ window: (0, time_1.resolveTailWindow)({ since }, now),
26
+ });
27
+ // Cleanup has completed. Oclif's final flush would stall on a pending write.
28
+ if (process.stdout.writableLength > 0 && process.exitCode !== undefined) {
29
+ this.exit(process.exitCode);
30
+ }
31
+ }
32
+ }
33
+ exports.default = Tail;
34
+ Tail.description = 'Tail Proxy runtime logs through Events. Requires `event:read` and runtime logging already enabled.\n\n' +
35
+ 'Optional --trace-id matches the effective stored BT trace ID exactly and case-sensitively. A submitted header may be sanitized by Vault; the CLI does not normalize or trim it. A reused trace ID can match multiple invocations. --transform-type filters request or response transforms, alone or combined with trace ID using AND; omitting it includes both directions. Filters apply to initial history and every live poll.\n\n' +
36
+ 'Starts watching from command time, regardless of filters. Supply --since to retrieve initial history before following new logs. Polls every five seconds with a rolling five-minute overlap that never reaches before the requested start. Time windows filter event batches, not individual record occurrence times; a newly arriving batch can contain records that occurred before command start. History is limited by server retention and tenant entitlements; the API clamps unavailable history. Large initial windows may hit bounded work limits and fail with partial output. Visibility is delayed and best-effort; output has no durable resume or global chronological ordering. Application logs come from the injected `logger`, not arbitrary stdout or `console.log`; collection requires resource opt-in and the platform runtime-log gate. Silence does not distinguish an idle resource, a wrong ID or filter, disabled collection, or delayed indexing. Runs until interrupted, output closes, or an error occurs.';
37
+ Tail.examples = [
38
+ '<%= config.bin %> proxies logs tail 03858bf5-32d3-4a2e-b74b-daeea0883bca',
39
+ '<%= config.bin %> proxies logs tail 03858bf5-32d3-4a2e-b74b-daeea0883bca --trace-id customer_Order-42',
40
+ '<%= config.bin %> proxies logs tail 03858bf5-32d3-4a2e-b74b-daeea0883bca --transform-type request_transform',
41
+ '<%= config.bin %> proxies logs tail 03858bf5-32d3-4a2e-b74b-daeea0883bca --trace-id customer_Order-42 --transform-type response_transform --since 30m --format json',
42
+ '<%= config.bin %> proxies logs tail 03858bf5-32d3-4a2e-b74b-daeea0883bca --since 30m --format json',
43
+ ];
44
+ Tail.args = {
45
+ id: core_1.Args.string({
46
+ description: 'Proxy id',
47
+ required: true,
48
+ }),
49
+ };
50
+ Tail.flags = {
51
+ 'trace-id': core_1.Flags.string({
52
+ description: 'exact, case-sensitive stored BT trace ID; combines with transform direction using AND',
53
+ }),
54
+ 'transform-type': core_1.Flags.string({
55
+ description: 'exact transform direction; includes both directions when omitted',
56
+ options: ['request_transform', 'response_transform'],
57
+ }),
58
+ since: core_1.Flags.string({
59
+ description: 'include initial history from a positive duration (30s, 5m, 2h, 1d, 1w) or ISO timestamp with timezone; omitted means watch from command start',
60
+ }),
61
+ format: core_1.Flags.string({
62
+ description: 'pretty: readable logs; json: compact objects; json-pretty: indented objects. Entries are separated by blank lines; colors are enabled in terminals',
63
+ options: ['pretty', 'json', 'json-pretty'],
64
+ default: 'pretty',
65
+ }),
66
+ };
@@ -19,7 +19,7 @@ class Logs extends base_1.BaseCommand {
19
19
  }
20
20
  }
21
21
  exports.default = Logs;
22
- Logs.description = 'Display live Proxy Transform logs output. Requires `proxy:update` Management Application permissions';
22
+ Logs.description = 'Legacy tunnel-based Proxy Transform logs. Opens a local tunnel and updates logging configuration. For v2/runtime debugging, use `bt proxies logs tail <id>` or `bt proxies logs read <id>`. Requires `proxy:update` Management Application permissions';
23
23
  Logs.examples = [
24
24
  '<%= config.bin %> <%= command.id %>',
25
25
  '<%= config.bin %> <%= command.id %> 03858bf5-32d3-4a2e-b74b-daeea0883bca',
@@ -0,0 +1,15 @@
1
+ import { BaseCommand } from '../../../base';
2
+ export default class Read extends BaseCommand {
3
+ static description: string;
4
+ static examples: string[];
5
+ static args: {
6
+ id: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
7
+ };
8
+ static flags: {
9
+ 'trace-id': import("@oclif/core/lib/interfaces/parser").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
10
+ since: import("@oclif/core/lib/interfaces/parser").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
11
+ until: import("@oclif/core/lib/interfaces/parser").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
12
+ format: import("@oclif/core/lib/interfaces/parser").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
13
+ };
14
+ run(): Promise<void>;
15
+ }
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const base_1 = require("../../../base");
5
+ const runtime_1 = require("../../../logs/runtime");
6
+ const time_1 = require("../../../logs/time");
7
+ class Read extends base_1.BaseCommand {
8
+ async run() {
9
+ const now = Date.now();
10
+ const { flags: { 'management-key': apiKey, 'api-base-url': apiBaseUrl, 'trace-id': traceId, format, since, until, }, args: { id }, } = await this.parse(Read);
11
+ if (!id.trim()) {
12
+ this.error('Reactor id must not be blank');
13
+ }
14
+ if (traceId !== undefined && !traceId.trim()) {
15
+ this.error('--trace-id must not be blank');
16
+ }
17
+ await (0, runtime_1.readEventLogs)({
18
+ apiKey,
19
+ apiBaseUrl,
20
+ resourceType: 'reactor',
21
+ resourceId: id,
22
+ traceId,
23
+ format: format,
24
+ window: (0, time_1.resolveLogWindow)({
25
+ since,
26
+ until,
27
+ }, now),
28
+ });
29
+ // Cleanup has completed. Oclif's final flush would stall on a pending write.
30
+ if (process.stdout.writableLength > 0 && process.exitCode !== undefined) {
31
+ this.exit(process.exitCode);
32
+ }
33
+ }
34
+ }
35
+ exports.default = Read;
36
+ Read.description = 'Read a fixed window of Reactor runtime logs through Events and exit. Requires `event:read` and runtime logging already enabled.\n\n' +
37
+ 'Optional --trace-id matches the effective stored BT trace ID exactly and case-sensitively. A submitted header may be sanitized by Vault; the CLI does not normalize or trim it. A reused trace ID can match multiple invocations.\n\n' +
38
+ 'Defaults to the five minutes preceding --until, or command start when --until is omitted, regardless of filters. Supply --since, for example --since 30d, to request a larger window. Explicit relative values use command-start time. Windows include their start and exclude their end, filtering event batch timestamps rather than individual record occurrence times. Each matching batch is expanded in record sequence; flattened output has no global chronological ordering. History is limited by server retention and tenant entitlements; the API clamps unavailable history. Indexing is asynchronous and pagination is not a snapshot, so empty or exhausted results do not prove complete coverage. Large windows may hit bounded work limits and fail with partial output. Application logs come from the injected `logger`, not arbitrary stdout or `console.log`; collection requires resource opt-in and the platform runtime-log gate. Does not enable logging or open a tunnel.';
39
+ Read.examples = [
40
+ '<%= config.bin %> reactors logs read 03858bf5-32d3-4a2e-b74b-daeea0883bca --trace-id customer_Order-42 --since 30d',
41
+ '<%= config.bin %> reactors logs read 03858bf5-32d3-4a2e-b74b-daeea0883bca --since 1h --until 30m',
42
+ '<%= config.bin %> reactors logs read 03858bf5-32d3-4a2e-b74b-daeea0883bca --since 2026-10-01T10:00:00Z --until 2026-10-01T10:15:00Z --format json',
43
+ ];
44
+ Read.args = {
45
+ id: core_1.Args.string({
46
+ description: 'Reactor id',
47
+ required: true,
48
+ }),
49
+ };
50
+ Read.flags = {
51
+ 'trace-id': core_1.Flags.string({
52
+ description: 'exact, case-sensitive stored BT trace ID',
53
+ }),
54
+ since: core_1.Flags.string({
55
+ description: 'window start: positive duration (30s, 5m, 2h, 1d, 1w) or ISO timestamp with timezone; defaults to five minutes before the end',
56
+ }),
57
+ until: core_1.Flags.string({
58
+ description: 'window end (exclusive): positive duration or ISO timestamp with timezone; defaults to command start',
59
+ }),
60
+ format: core_1.Flags.string({
61
+ description: 'pretty: readable logs; json: compact objects; json-pretty: indented objects. Entries are separated by blank lines; colors are enabled in terminals',
62
+ options: ['pretty', 'json', 'json-pretty'],
63
+ default: 'pretty',
64
+ }),
65
+ };
@@ -0,0 +1,14 @@
1
+ import { BaseCommand } from '../../../base';
2
+ export default class Tail extends BaseCommand {
3
+ static description: string;
4
+ static examples: string[];
5
+ static args: {
6
+ id: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
7
+ };
8
+ static flags: {
9
+ 'trace-id': import("@oclif/core/lib/interfaces/parser").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
10
+ since: import("@oclif/core/lib/interfaces/parser").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
11
+ format: import("@oclif/core/lib/interfaces/parser").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
12
+ };
13
+ run(): Promise<void>;
14
+ }