@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/README.md +1 -0
- package/dist/index.cjs +142 -110
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -7
- package/dist/index.d.ts +9 -7
- package/dist/index.js +142 -110
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
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.
|
|
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
|
|
2410
|
-
*
|
|
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`
|
|
2438
|
-
*
|
|
2439
|
-
*
|
|
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.
|
|
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
|
|
2410
|
-
*
|
|
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`
|
|
2438
|
-
*
|
|
2439
|
-
*
|
|
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. */
|