@goodtiming/baton-sdk 1.1.0 → 1.1.1

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/index.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
 
3
- declare const SDK_VERSION = "ts-1.1.0";
3
+ declare const SDK_VERSION = "ts-1.1.1";
4
4
 
5
5
  /**
6
6
  * Zod schemas + TS types for the Baton event stream per SPEC §11.4.
@@ -2406,9 +2406,8 @@ declare function identityScrub(value: unknown): unknown;
2406
2406
  *
2407
2407
  * The same four sinks as `sinks.py`:
2408
2408
  *
2409
- * - `StdoutSink` — JSONL to a writable stream (default `process.stderr`,
2410
- * for the same reason as Python: MCP stdio transport reserves stdout for
2411
- * JSON-RPC framing).
2409
+ * - `StdoutSink` — JSONL to stderr, or to a stream the vendor passes (MCP
2410
+ * stdio transport reserves stdout for JSON-RPC framing).
2412
2411
  * - `FileSink` — JSONL appended to a file.
2413
2412
  * - `HttpSink` — POST batches to any HTTP endpoint with bearer auth;
2414
2413
  * bounded buffer, retry with backoff, circuit breaker. This is the contract a
@@ -2434,9 +2433,10 @@ declare class SinkClosedError extends Error {
2434
2433
  name: string;
2435
2434
  }
2436
2435
  interface StdoutSinkOptions {
2437
- /** Defaults to `process.stderr` — stdio MCP transport reserves stdout for
2438
- * JSON-RPC framing. Pass `process.stdout` explicitly for non-MCP (library
2439
- * API) use if preferred. */
2436
+ /** Defaults to stderr (`console.warn` where `process.stderr` is missing or
2437
+ * cannot write): the MCP
2438
+ * stdio transport reserves stdout for JSON-RPC framing. Pass
2439
+ * `process.stdout` for non-MCP (library API) use if preferred. */
2440
2440
  stream?: NodeJS.WritableStream;
2441
2441
  }
2442
2442
  declare class StdoutSink implements Sink {
@@ -2556,6 +2556,8 @@ declare class HttpSink implements Sink {
2556
2556
  /** Set for the life of the sink by a 404 or 405 on the batch path. */
2557
2557
  private batchless;
2558
2558
  private exitHooks;
2559
+ /** The `process` the exit hooks were last tried on, so a refusal is not retried per write. */
2560
+ private exitHooksTriedOn;
2559
2561
  /** The least time between two of this sink's loss reports. */
2560
2562
  private static reportIntervalMs;
2561
2563
  /** Totals only grow, so their sum tells whether they changed. */
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
 
3
- declare const SDK_VERSION = "ts-1.1.0";
3
+ declare const SDK_VERSION = "ts-1.1.1";
4
4
 
5
5
  /**
6
6
  * Zod schemas + TS types for the Baton event stream per SPEC §11.4.
@@ -2406,9 +2406,8 @@ declare function identityScrub(value: unknown): unknown;
2406
2406
  *
2407
2407
  * The same four sinks as `sinks.py`:
2408
2408
  *
2409
- * - `StdoutSink` — JSONL to a writable stream (default `process.stderr`,
2410
- * for the same reason as Python: MCP stdio transport reserves stdout for
2411
- * JSON-RPC framing).
2409
+ * - `StdoutSink` — JSONL to stderr, or to a stream the vendor passes (MCP
2410
+ * stdio transport reserves stdout for JSON-RPC framing).
2412
2411
  * - `FileSink` — JSONL appended to a file.
2413
2412
  * - `HttpSink` — POST batches to any HTTP endpoint with bearer auth;
2414
2413
  * bounded buffer, retry with backoff, circuit breaker. This is the contract a
@@ -2434,9 +2433,10 @@ declare class SinkClosedError extends Error {
2434
2433
  name: string;
2435
2434
  }
2436
2435
  interface StdoutSinkOptions {
2437
- /** Defaults to `process.stderr` — stdio MCP transport reserves stdout for
2438
- * JSON-RPC framing. Pass `process.stdout` explicitly for non-MCP (library
2439
- * API) use if preferred. */
2436
+ /** Defaults to stderr (`console.warn` where `process.stderr` is missing or
2437
+ * cannot write): the MCP
2438
+ * stdio transport reserves stdout for JSON-RPC framing. Pass
2439
+ * `process.stdout` for non-MCP (library API) use if preferred. */
2440
2440
  stream?: NodeJS.WritableStream;
2441
2441
  }
2442
2442
  declare class StdoutSink implements Sink {
@@ -2556,6 +2556,8 @@ declare class HttpSink implements Sink {
2556
2556
  /** Set for the life of the sink by a 404 or 405 on the batch path. */
2557
2557
  private batchless;
2558
2558
  private exitHooks;
2559
+ /** The `process` the exit hooks were last tried on, so a refusal is not retried per write. */
2560
+ private exitHooksTriedOn;
2559
2561
  /** The least time between two of this sink's loss reports. */
2560
2562
  private static reportIntervalMs;
2561
2563
  /** Totals only grow, so their sum tells whether they changed. */