stitchkit 0.68.0 → 0.68.2
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/agent-runtime/admission-lanes.d.ts +1 -1
- package/dist/agent-runtime/compaction.d.ts +2 -2
- package/dist/agent-runtime/events.d.ts +1 -1
- package/dist/agent-runtime/history.d.ts +1 -1
- package/dist/agent-runtime/history.d.ts.map +1 -1
- package/dist/agent-runtime/injection.d.ts +1 -1
- package/dist/agent-runtime/managed-tools.d.ts +3 -3
- package/dist/agent-runtime/models.d.ts +1 -1
- package/dist/agent-runtime/observability.d.ts +1 -1
- package/dist/agent-runtime/prompt.d.ts +1 -1
- package/dist/agent-runtime/prompt.d.ts.map +1 -1
- package/dist/agent-runtime/protocol.d.ts +19 -1
- package/dist/agent-runtime/protocol.d.ts.map +1 -1
- package/dist/agent-runtime/run-execution.d.ts +5 -5
- package/dist/agent-runtime/run-execution.d.ts.map +1 -1
- package/dist/agent-runtime/runtime-internals.d.ts +1 -1
- package/dist/agent-runtime/runtime-result.d.ts +1 -1
- package/dist/agent-runtime/runtime.d.ts +14 -12
- package/dist/agent-runtime/runtime.d.ts.map +1 -1
- package/dist/agent-runtime/store-driver.d.ts +2 -2
- package/dist/agent-runtime/store.d.ts +2 -2
- package/dist/agent-runtime/terminal-commit.d.ts +2 -2
- package/dist/agent-runtime/terminal-status.d.ts +1 -1
- package/dist/agent-runtime-openrouter.d.ts +1 -1
- package/dist/agent-runtime.d.ts +15 -15
- package/dist/agent-runtime.d.ts.map +1 -1
- package/dist/agent-runtime.js +87 -26
- package/dist/application/admission.d.ts +1 -1
- package/dist/application/events.d.ts +2 -2
- package/dist/application/grammy.d.ts +2 -2
- package/dist/application/graph.d.ts +1 -1
- package/dist/application/health.d.ts +1 -1
- package/dist/application/kernel.d.ts +3 -3
- package/dist/application/opentelemetry.d.ts +3 -3
- package/dist/application/resource.d.ts +1 -1
- package/dist/application/schedule.d.ts +1 -1
- package/dist/application/server-resource.d.ts +7 -9
- package/dist/application/server-resource.d.ts.map +1 -1
- package/dist/application-grammy.d.ts +1 -1
- package/dist/application-opentelemetry.d.ts +1 -1
- package/dist/application.d.ts +11 -11
- package/dist/application.js +7 -7
- package/dist/browser/client-multipart.d.ts +1 -1
- package/dist/browser/client-url.d.ts +2 -2
- package/dist/browser/client.d.ts +4 -4
- package/dist/browser/client.d.ts.map +1 -1
- package/dist/browser/contract-stream.d.ts +1 -1
- package/dist/browser/http.d.ts +7 -7
- package/dist/browser/http.d.ts.map +1 -1
- package/dist/browser/socket-io.d.ts +12 -31
- package/dist/browser/socket-io.d.ts.map +1 -1
- package/dist/browser/stream.d.ts +2 -2
- package/dist/cli.d.ts +6 -6
- package/dist/cli.js +4 -3
- package/dist/contract/errors-factory.d.ts +1 -1
- package/dist/contract/factory.d.ts +1 -1
- package/dist/contract/index.d.ts +7 -7
- package/dist/files/boundary.d.ts +1 -1
- package/dist/files.d.ts +2 -2
- package/dist/{index-zd4v31v2.js → index-2ve29dzn.js} +3 -3
- package/dist/{index-nymn7wbg.js → index-3vq6we8m.js} +29 -17
- package/dist/index-7etq650s.js +75 -0
- package/dist/{index-7pn02bgv.js → index-cszjsxy5.js} +22 -83
- package/dist/index-g2j2m6vv.js +63 -0
- package/dist/index.d.ts +10 -10
- package/dist/index.js +4 -4
- package/dist/internal/errors.d.ts +1 -1
- package/dist/internal/observability-sink.d.ts +1 -1
- package/dist/node.d.ts +11 -11
- package/dist/node.d.ts.map +1 -1
- package/dist/node.js +2 -2
- package/dist/observability/audit.d.ts +5 -5
- package/dist/observability/context.d.ts +2 -2
- package/dist/observability/event.d.ts +2 -2
- package/dist/observability/index.d.ts +6 -6
- package/dist/react/entity-cache.d.ts +26 -1
- package/dist/react/entity-cache.d.ts.map +1 -1
- package/dist/react.d.ts +3 -3
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +136 -38
- package/dist/realtime/contract.d.ts +1 -1
- package/dist/realtime/index.d.ts +4 -4
- package/dist/realtime/rejection.d.ts +1 -1
- package/dist/realtime/request.d.ts +1 -1
- package/dist/realtime/socket.d.ts +2 -2
- package/dist/remote.d.ts +1 -1
- package/dist/remote.js +1 -1
- package/dist/server/bun.d.ts +3 -3
- package/dist/server/context-contribution.d.ts +1 -1
- package/dist/server/context.d.ts +4 -4
- package/dist/server/contract-stream.d.ts +2 -2
- package/dist/server/create.d.ts +1 -1
- package/dist/server/error-hook.d.ts +3 -3
- package/dist/server/file.d.ts +1 -1
- package/dist/server/implement.d.ts +2 -2
- package/dist/server/index.d.ts +31 -31
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +9 -9
- package/dist/server/lifecycle.d.ts +1 -1
- package/dist/server/logging.d.ts +1 -1
- package/dist/server/middleware/auth.d.ts +2 -2
- package/dist/server/multipart.d.ts +2 -2
- package/dist/server/node.d.ts +2 -2
- package/dist/server/openapi.d.ts +1 -1
- package/dist/server/process-signal-common.d.ts +1 -1
- package/dist/server/process-signals.d.ts +1 -1
- package/dist/server/realtime.d.ts +4 -4
- package/dist/server/response-metadata.d.ts +1 -1
- package/dist/server/router.d.ts +1 -1
- package/dist/server/shutdown.d.ts +1 -1
- package/dist/server/socket-io-node.d.ts +3 -3
- package/dist/server/socket-io.d.ts +6 -6
- package/dist/server/streaming-route.d.ts +2 -2
- package/dist/server/types.d.ts +6 -6
- package/dist/server/unix-client-body.d.ts +1 -1
- package/dist/server/unix-client-body.d.ts.map +1 -1
- package/dist/server/unix-client-bun.d.ts +1 -1
- package/dist/server/unix-client-bun.d.ts.map +1 -1
- package/dist/server/unix-client.d.ts +16 -5
- package/dist/server/unix-client.d.ts.map +1 -1
- package/dist/testing/agent-store-conformance.d.ts +1 -1
- package/dist/testing/managed-resource-conformance-contract.d.ts +1 -1
- package/dist/testing/managed-resource-conformance-driver.d.ts +2 -2
- package/dist/testing/managed-resource-conformance-scenarios.d.ts +2 -2
- package/dist/testing/managed-resource-conformance.d.ts +2 -2
- package/dist/testing/surface-conformance.d.ts +3 -3
- package/dist/testing/surface-manifest.d.ts +5 -5
- package/dist/testing.d.ts +8 -8
- package/dist/testing.js +1 -1
- package/dist/tool-invoker.d.ts +9 -0
- package/dist/tool-invoker.d.ts.map +1 -0
- package/dist/tool-invoker.js +16 -0
- package/dist/tools/agent.d.ts +4 -4
- package/dist/tools/async-operation.d.ts +3 -3
- package/dist/tools/cli-command.d.ts +3 -3
- package/dist/tools/cli-format.d.ts +1 -1
- package/dist/tools/cli-policy.d.ts +1 -1
- package/dist/tools/cli-wait.d.ts +1 -1
- package/dist/tools/cli.d.ts +7 -7
- package/dist/tools/define-download-tool.d.ts +4 -4
- package/dist/tools/define-upload-tool.d.ts +3 -3
- package/dist/tools/define-view-file-tool.d.ts +3 -3
- package/dist/tools/define-wait-tool.d.ts +2 -2
- package/dist/tools/download-core.d.ts +2 -2
- package/dist/tools/execute.d.ts +2 -2
- package/dist/tools/flatten-join.d.ts +1 -1
- package/dist/tools/internal/surface-projector.d.ts +3 -3
- package/dist/tools/invoker.d.ts +4 -4
- package/dist/tools/lifecycle.d.ts +1 -1
- package/dist/tools/list-names.d.ts +2 -2
- package/dist/tools/managed-file-error.d.ts +1 -1
- package/dist/tools/manifest.d.ts +3 -3
- package/dist/tools/mcp-handler.d.ts +4 -4
- package/dist/tools/mcp-prepare.d.ts +8 -8
- package/dist/tools/mcp-round-policy.d.ts +1 -1
- package/dist/tools/mcp-round.d.ts +3 -3
- package/dist/tools/mcp-stdio-signals.d.ts +2 -2
- package/dist/tools/mcp-stdio.d.ts +3 -3
- package/dist/tools/mcp.d.ts +7 -7
- package/dist/tools/mount-download.d.ts +1 -1
- package/dist/tools/mount-upload.d.ts +1 -1
- package/dist/tools/mount.d.ts +5 -5
- package/dist/tools/native-definition.d.ts +2 -2
- package/dist/tools/native-mcp.d.ts +3 -3
- package/dist/tools/oauth-metadata.d.ts +1 -1
- package/dist/tools/oauth-provider.d.ts +1 -1
- package/dist/tools/presentation.d.ts +1 -1
- package/dist/tools/remote.d.ts +3 -3
- package/dist/tools/runtime-tool.d.ts +2 -2
- package/dist/tools/surface.d.ts +5 -5
- package/dist/tools/tool-logger.d.ts +1 -1
- package/dist/tools/toolkit.d.ts +7 -7
- package/dist/tools/transports.d.ts +2 -2
- package/dist/tools/upload-core.d.ts +1 -1
- package/dist/tools/view-file.d.ts +1 -1
- package/dist/tools.d.ts +42 -42
- package/dist/tools.js +18 -61
- package/llms-full.txt +196 -20
- package/package.json +8 -4
- package/dist/{index-avjd67h6.js → index-cz32amcb.js} +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ProcessSignalName, SignalSource } from './process-signals';
|
|
1
|
+
import type { ProcessSignalName, SignalSource } from './process-signals.js';
|
|
2
2
|
export declare const DEFAULT_PROCESS_SIGNALS: readonly ProcessSignalName[];
|
|
3
3
|
export declare const defaultSignalSource: SignalSource;
|
|
4
4
|
export declare function reportSignalError<TPhase extends string>(phase: TPhase, error: unknown, onError: ((phase: TPhase, error: unknown) => void) | undefined): void;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* throws, and a third signal on a process whose default disposition the first
|
|
10
10
|
* `process.on` already suppressed. → ADR 0076
|
|
11
11
|
*/
|
|
12
|
-
import type { ShutdownOptions, ShutdownResult } from './shutdown';
|
|
12
|
+
import type { ShutdownOptions, ShutdownResult } from './shutdown.js';
|
|
13
13
|
/**
|
|
14
14
|
* Signal names this binding can listen for.
|
|
15
15
|
*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { DefaultEventsMap, Socket, Server as SocketIOServer } from 'socket.io';
|
|
2
|
-
import type { SocketEventMap } from '../browser/socket-io';
|
|
3
|
-
import type { StitchLogger } from '../logger';
|
|
4
|
-
import type { RealtimeContract, RealtimeEventRegistry, RealtimeRejectedEventHook } from '../realtime/contract';
|
|
5
|
-
import { type ValidatedRealtimeSocket } from '../realtime/socket';
|
|
2
|
+
import type { SocketEventMap } from '../browser/socket-io.js';
|
|
3
|
+
import type { StitchLogger } from '../logger.js';
|
|
4
|
+
import type { RealtimeContract, RealtimeEventRegistry, RealtimeRejectedEventHook } from '../realtime/contract.js';
|
|
5
|
+
import { type ValidatedRealtimeSocket } from '../realtime/socket.js';
|
|
6
6
|
export interface RealtimeServerConnection<TServerToClient extends RealtimeEventRegistry, TClientToServer extends RealtimeEventRegistry, TData = any> {
|
|
7
7
|
/**
|
|
8
8
|
* Raw Socket.IO socket for rooms and application-owned delivery policy.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ResponseMetadata } from '../contract';
|
|
1
|
+
import type { ResponseMetadata } from '../contract/index.js';
|
|
2
2
|
/** Create one isolated outbound collector for a response-metadata handler. */
|
|
3
3
|
export declare function createResponseMetadata(): ResponseMetadata;
|
|
4
4
|
/**
|
package/dist/server/router.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LifecycleHooks, MethodDef, RawRoute, ServiceDef } from './types';
|
|
1
|
+
import type { LifecycleHooks, MethodDef, RawRoute, ServiceDef } from './types.js';
|
|
2
2
|
/** A service mounted under a path prefix, carrying optional group hooks. */
|
|
3
3
|
export interface NormalizedGroup {
|
|
4
4
|
prefix: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/** Node-facing Socket.IO surface without Bun engine declarations. */
|
|
2
2
|
import type { Server as HttpServer } from 'node:http';
|
|
3
3
|
import type { DefaultEventsMap, Server as SocketIOServer } from 'socket.io';
|
|
4
|
-
import type { SocketEventMap } from '../browser/socket-io';
|
|
5
|
-
import type { SocketIOServerConfig } from './socket-io-config';
|
|
6
|
-
export type { SocketIOHandshakeConfig, SocketIOPeerLoaders, SocketIORequestPolicy, SocketIOServerConfig, } from './socket-io-config';
|
|
4
|
+
import type { SocketEventMap } from '../browser/socket-io.js';
|
|
5
|
+
import type { SocketIOServerConfig } from './socket-io-config.js';
|
|
6
|
+
export type { SocketIOHandshakeConfig, SocketIOPeerLoaders, SocketIORequestPolicy, SocketIOServerConfig, } from './socket-io-config.js';
|
|
7
7
|
/** The runtime-neutral part of a Socket.IO handle used by `serveNode`. */
|
|
8
8
|
export interface NodeSocketIOServerHandle<TServerEvents extends SocketEventMap, TClientEvents extends SocketEventMap, TData = any> {
|
|
9
9
|
io: SocketIOServer<TClientEvents, TServerEvents, DefaultEventsMap, TData>;
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
import type { Server as HttpServer } from 'node:http';
|
|
19
19
|
import type { Server as BunEngine } from '@socket.io/bun-engine';
|
|
20
20
|
import type { DefaultEventsMap, Server as SocketIOServer } from 'socket.io';
|
|
21
|
-
import type { SocketEventMap } from '../browser/socket-io';
|
|
22
|
-
import type { BunServer } from './bun';
|
|
23
|
-
import type { SocketIOServerConfig } from './socket-io-config';
|
|
24
|
-
import type { RawRoute } from './types';
|
|
25
|
-
import { type ComposedLane } from './websocket';
|
|
26
|
-
export type { SocketIOHandshakeConfig, SocketIOPeerLoaders, SocketIORequestPolicy, SocketIOServerConfig, } from './socket-io-config';
|
|
21
|
+
import type { SocketEventMap } from '../browser/socket-io.js';
|
|
22
|
+
import type { BunServer } from './bun.js';
|
|
23
|
+
import type { SocketIOServerConfig } from './socket-io-config.js';
|
|
24
|
+
import type { RawRoute } from './types.js';
|
|
25
|
+
import { type ComposedLane } from './websocket.js';
|
|
26
|
+
export type { SocketIOHandshakeConfig, SocketIOPeerLoaders, SocketIORequestPolicy, SocketIOServerConfig, } from './socket-io-config.js';
|
|
27
27
|
export interface SocketIOServerLifecycle {
|
|
28
28
|
/**
|
|
29
29
|
* WebSocket handler for `Bun.serve({ websocket })`. Real on Bun; on Node it is
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
* iterable is returned, so a departed subscriber does not leave live work
|
|
40
40
|
* running on the server.
|
|
41
41
|
*/
|
|
42
|
-
import type { HttpMethod } from '../contract/define';
|
|
43
|
-
import type { RawRoute, RawRouteContext } from './types';
|
|
42
|
+
import type { HttpMethod } from '../contract/define.js';
|
|
43
|
+
import type { RawRoute, RawRouteContext } from './types.js';
|
|
44
44
|
/** How a value becomes bytes on the wire. The only thing the two formats differ in. */
|
|
45
45
|
export type StreamingFormat = 'ndjson' | 'sse';
|
|
46
46
|
/**
|
package/dist/server/types.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { ZodType } from 'zod';
|
|
2
|
-
import type { EndpointDef, EndpointMcpPolicy, EndpointResponseMeta, EndpointStreamDescriptor, EndpointToolAnnotations, EndpointUiMeta, HandlerContext, HttpMethod, MultipartBufferedFiles, MultipartDescriptor, ResponseMetadata, RuntimeContext, Transport } from '../contract';
|
|
3
|
-
import type { StitchLogger } from '../logger';
|
|
4
|
-
import type { HttpRequestObserver } from '../observability/audit';
|
|
5
|
-
import type { LogFormat } from './logger';
|
|
6
|
-
import type { CorsConfig } from './middleware/cors';
|
|
2
|
+
import type { EndpointDef, EndpointMcpPolicy, EndpointResponseMeta, EndpointStreamDescriptor, EndpointToolAnnotations, EndpointUiMeta, HandlerContext, HttpMethod, MultipartBufferedFiles, MultipartDescriptor, ResponseMetadata, RuntimeContext, Transport } from '../contract/index.js';
|
|
3
|
+
import type { StitchLogger } from '../logger.js';
|
|
4
|
+
import type { HttpRequestObserver } from '../observability/audit.js';
|
|
5
|
+
import type { LogFormat } from './logger.js';
|
|
6
|
+
import type { CorsConfig } from './middleware/cors.js';
|
|
7
7
|
type Prop<T, K extends string> = K extends keyof T ? T[K] : undefined;
|
|
8
8
|
type InferParams<E> = Prop<E, 'params'> extends ZodType<infer P> ? P : undefined;
|
|
9
9
|
type InferInput<E> = Prop<E, 'input'> extends ZodType<infer I> ? I : undefined;
|
|
@@ -272,7 +272,7 @@ export interface RawRoute<TServer = unknown> {
|
|
|
272
272
|
*/
|
|
273
273
|
handler: (req: Request, ctx: RawRouteContext<TServer>) => Response | Promise<Response>;
|
|
274
274
|
}
|
|
275
|
-
export type { StitchLogger } from '../logger';
|
|
275
|
+
export type { StitchLogger } from '../logger.js';
|
|
276
276
|
/** How a request finished — what `LoggingConfig.enrich` gets to react to. */
|
|
277
277
|
export interface LogOutcome {
|
|
278
278
|
status: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { IncomingMessage } from 'node:http';
|
|
2
2
|
export declare function readBoundedRequestBody(request: Request, maxBytes: number): Promise<Uint8Array | undefined>;
|
|
3
|
-
export declare function
|
|
3
|
+
export declare function incomingResponseBody(response: IncomingMessage, maxBytes: number | undefined, onDone: () => void): ReadableStream<Uint8Array>;
|
|
4
4
|
//# sourceMappingURL=unix-client-body.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unix-client-body.d.ts","sourceRoot":"","sources":["../../src/server/unix-client-body.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAGjD,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CA0CjC;AAED,wBAAgB,
|
|
1
|
+
{"version":3,"file":"unix-client-body.d.ts","sourceRoot":"","sources":["../../src/server/unix-client-body.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAGjD,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CA0CjC;AAED,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,MAAM,EAAE,MAAM,IAAI,GACjB,cAAc,CAAC,UAAU,CAAC,CAsE5B"}
|
|
@@ -3,7 +3,7 @@ export interface BunUnixRequestOptions {
|
|
|
3
3
|
readonly socketPath: string;
|
|
4
4
|
readonly request: Request;
|
|
5
5
|
readonly body?: Uint8Array;
|
|
6
|
-
readonly maxResponseBytes: number;
|
|
6
|
+
readonly maxResponseBytes: number | undefined;
|
|
7
7
|
readonly maxHeaderBytes: number;
|
|
8
8
|
readonly headersTimeoutMs: number;
|
|
9
9
|
registerAbort(abort: () => void): () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unix-client-bun.d.ts","sourceRoot":"","sources":["../../src/server/unix-client-bun.ts"],"names":[],"mappings":"AAqCA,wBAAgB,iBAAiB,IAAI,OAAO,CAE3C;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"unix-client-bun.d.ts","sourceRoot":"","sources":["../../src/server/unix-client-bun.ts"],"names":[],"mappings":"AAqCA,wBAAgB,iBAAiB,IAAI,OAAO,CAE3C;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9C,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,aAAa,CAAC,KAAK,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC;CAC9C;AA8CD,6FAA6F;AAC7F,wBAAgB,cAAc,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,QAAQ,CAAC,CA6ahF"}
|
|
@@ -1,15 +1,26 @@
|
|
|
1
|
-
import type { ClientFetch } from '../browser/transport';
|
|
2
|
-
|
|
1
|
+
import type { ClientFetch } from '../browser/transport.js';
|
|
2
|
+
/** Whether response bytes have a finite lifetime total or only bounded buffering. */
|
|
3
|
+
export type UnixResponseBodyMode = 'bounded' | 'streaming';
|
|
4
|
+
/**
|
|
5
|
+
* Unix transport configuration. Unary responses are cumulatively bounded by
|
|
6
|
+
* default; a long-lived stream must opt into pull-driven streaming explicitly.
|
|
7
|
+
*/
|
|
8
|
+
export type UnixClientTransportConfig = {
|
|
3
9
|
/** Absolute local socket path selected by deployment configuration. */
|
|
4
10
|
socketPath: string;
|
|
5
11
|
maxRequestBytes?: number;
|
|
6
|
-
maxResponseBytes?: number;
|
|
7
12
|
headersTimeoutMs?: number;
|
|
8
13
|
maxHeaderBytes?: number;
|
|
9
14
|
maxConnections?: number;
|
|
10
15
|
/** Redirects stay on this Unix transport. Default 5. */
|
|
11
16
|
maxRedirects?: number;
|
|
12
|
-
}
|
|
17
|
+
} & ({
|
|
18
|
+
responseBodyMode?: 'bounded';
|
|
19
|
+
maxResponseBytes?: number;
|
|
20
|
+
} | {
|
|
21
|
+
responseBodyMode: 'streaming';
|
|
22
|
+
maxResponseBytes?: never;
|
|
23
|
+
});
|
|
13
24
|
export interface UnixClientTransport {
|
|
14
25
|
readonly fetch: ClientFetch;
|
|
15
26
|
readonly closed: boolean;
|
|
@@ -21,5 +32,5 @@ export interface UnixClientTransport {
|
|
|
21
32
|
* configured path and can never fall back to TCP.
|
|
22
33
|
*/
|
|
23
34
|
export declare function createUnixClientTransport(config: UnixClientTransportConfig): UnixClientTransport;
|
|
24
|
-
export { type UnixClientDeliveryState, UnixClientTransportError, type UnixClientTransportErrorCode, } from './unix-client-error';
|
|
35
|
+
export { type UnixClientDeliveryState, UnixClientTransportError, type UnixClientTransportErrorCode, } from './unix-client-error.js';
|
|
25
36
|
//# sourceMappingURL=unix-client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unix-client.d.ts","sourceRoot":"","sources":["../../src/server/unix-client.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAWxD,MAAM,WAAW,yBAAyB;
|
|
1
|
+
{"version":3,"file":"unix-client.d.ts","sourceRoot":"","sources":["../../src/server/unix-client.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAWxD,qFAAqF;AACrF,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,WAAW,CAAC;AAE3D;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,uEAAuE;IACvE,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,wDAAwD;IACxD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,GAAG,CACA;IACE,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAC7B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,GACD;IACE,gBAAgB,EAAE,WAAW,CAAC;IAC9B,gBAAgB,CAAC,EAAE,KAAK,CAAC;CAC1B,CACJ,CAAC;AAEF,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AA4ED;;;;GAIG;AACH,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,yBAAyB,GAChC,mBAAmB,CAuQrB;AAED,OAAO,EACL,KAAK,uBAAuB,EAC5B,wBAAwB,EACxB,KAAK,4BAA4B,GAClC,MAAM,qBAAqB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import type { ManagedResource } from '../application/resource';
|
|
2
|
+
import type { ManagedResource } from '../application/resource.js';
|
|
3
3
|
export declare const ManagedResourceConformanceScenarioIdSchema: z.ZodEnum<{
|
|
4
4
|
"activation-rejection": "activation-rejection";
|
|
5
5
|
"clean-shutdown": "clean-shutdown";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ManagedResource } from '../application/resource';
|
|
2
|
-
import { type ManagedResourceConformanceControls, type ManagedResourceConformancePhase, type ManagedResourceConformanceTraceEntry, type ManagedResourceConformanceTraceOutcome } from './managed-resource-conformance-contract';
|
|
1
|
+
import type { ManagedResource } from '../application/resource.js';
|
|
2
|
+
import { type ManagedResourceConformanceControls, type ManagedResourceConformancePhase, type ManagedResourceConformanceTraceEntry, type ManagedResourceConformanceTraceOutcome } from './managed-resource-conformance-contract.js';
|
|
3
3
|
export interface ManagedResourceConformanceGates {
|
|
4
4
|
readonly controls: ManagedResourceConformanceControls;
|
|
5
5
|
resolve(phase: GatePhase): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type ManagedResourceConformanceScenario, type ManagedResourceConformanceScenarioId } from './managed-resource-conformance-contract';
|
|
2
|
-
import { type ManagedResourceConformanceGates, type ManagedResourceConformanceTrace, observeManagedResource } from './managed-resource-conformance-driver';
|
|
1
|
+
import { type ManagedResourceConformanceScenario, type ManagedResourceConformanceScenarioId } from './managed-resource-conformance-contract.js';
|
|
2
|
+
import { type ManagedResourceConformanceGates, type ManagedResourceConformanceTrace, observeManagedResource } from './managed-resource-conformance-driver.js';
|
|
3
3
|
export declare const MANAGED_RESOURCE_CONFORMANCE_SCENARIOS: (Readonly<{
|
|
4
4
|
id: "clean-shutdown";
|
|
5
5
|
required: true;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type ManagedResourceConformanceConfig } from './managed-resource-conformance-contract';
|
|
1
|
+
import { type ManagedResourceConformanceConfig } from './managed-resource-conformance-contract.js';
|
|
2
2
|
/** Run deterministic black-box lifecycle scenarios against a consumer-owned managed resource. */
|
|
3
3
|
export declare function runManagedResourceConformance(config: ManagedResourceConformanceConfig): Promise<void>;
|
|
4
|
-
export { type ManagedResourceConformanceConfig, type ManagedResourceConformanceControls, ManagedResourceConformanceError, type ManagedResourceConformanceFactoryInput, type ManagedResourceConformanceFixture, type ManagedResourceConformancePhase, ManagedResourceConformancePhaseSchema, type ManagedResourceConformanceScenario, type ManagedResourceConformanceScenarioId, ManagedResourceConformanceScenarioIdSchema, ManagedResourceConformanceScenarioSchema, type ManagedResourceConformanceTraceEntry, ManagedResourceConformanceTraceEntrySchema, type ManagedResourceConformanceTraceOutcome, ManagedResourceConformanceTraceOutcomeSchema, } from './managed-resource-conformance-contract';
|
|
4
|
+
export { type ManagedResourceConformanceConfig, type ManagedResourceConformanceControls, ManagedResourceConformanceError, type ManagedResourceConformanceFactoryInput, type ManagedResourceConformanceFixture, type ManagedResourceConformancePhase, ManagedResourceConformancePhaseSchema, type ManagedResourceConformanceScenario, type ManagedResourceConformanceScenarioId, ManagedResourceConformanceScenarioIdSchema, ManagedResourceConformanceScenarioSchema, type ManagedResourceConformanceTraceEntry, ManagedResourceConformanceTraceEntrySchema, type ManagedResourceConformanceTraceOutcome, ManagedResourceConformanceTraceOutcomeSchema, } from './managed-resource-conformance-contract.js';
|
|
5
5
|
//# sourceMappingURL=managed-resource-conformance.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import type { RealtimeRejectedEventHook } from '../realtime/contract';
|
|
3
|
-
import type { OpenApiDocument } from '../server/openapi';
|
|
4
|
-
import { type SurfaceManifest } from './surface-manifest';
|
|
2
|
+
import type { RealtimeRejectedEventHook } from '../realtime/contract.js';
|
|
3
|
+
import type { OpenApiDocument } from '../server/openapi.js';
|
|
4
|
+
import { type SurfaceManifest } from './surface-manifest.js';
|
|
5
5
|
export declare const RealtimeRejectionObservationSchema: z.ZodObject<{
|
|
6
6
|
direction: z.ZodEnum<{
|
|
7
7
|
"client-inbound": "client-inbound";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import type { RealtimeContract, RealtimeEventRegistry } from '../realtime/contract';
|
|
3
|
-
import type { RouteGroup, ServiceDef } from '../server/types';
|
|
4
|
-
import type { CliCommandDefinition } from '../tools/cli-command';
|
|
5
|
-
import { type McpSchemaValidationConfig, type SurfaceRuntimeToolDefinition, type SurfaceToolExtension } from '../tools/internal/surface-projector';
|
|
2
|
+
import type { RealtimeContract, RealtimeEventRegistry } from '../realtime/contract.js';
|
|
3
|
+
import type { RouteGroup, ServiceDef } from '../server/types.js';
|
|
4
|
+
import type { CliCommandDefinition } from '../tools/cli-command.js';
|
|
5
|
+
import { type McpSchemaValidationConfig, type SurfaceRuntimeToolDefinition, type SurfaceToolExtension } from '../tools/internal/surface-projector.js';
|
|
6
6
|
export declare const SurfaceSchemaDigestsSchema: z.ZodObject<{
|
|
7
7
|
params: z.ZodNullable<z.ZodString>;
|
|
8
8
|
input: z.ZodNullable<z.ZodString>;
|
|
@@ -205,7 +205,7 @@ export type SurfaceManifestToolSurface = z.infer<typeof SurfaceManifestToolSurfa
|
|
|
205
205
|
export type SurfaceManifestRealtimeEvent = z.infer<typeof SurfaceManifestRealtimeEventSchema>;
|
|
206
206
|
export type SurfaceManifestExtension = z.infer<typeof SurfaceManifestExtensionSchema>;
|
|
207
207
|
/** Peer-free runtime-operation descriptor consumed only by manifest projection. */
|
|
208
|
-
export type { IncompatibleSchemaPolicy, McpSchemaValidationConfig, SurfaceRuntimeToolDefinition, SurfaceToolExtension, } from '../tools/internal/surface-projector';
|
|
208
|
+
export type { IncompatibleSchemaPolicy, McpSchemaValidationConfig, SurfaceRuntimeToolDefinition, SurfaceToolExtension, } from '../tools/internal/surface-projector.js';
|
|
209
209
|
/** Plain service/runtime selection shared by every tool transport. */
|
|
210
210
|
export interface SurfaceToolDefinition {
|
|
211
211
|
services?: readonly ServiceDef[];
|
package/dist/testing.d.ts
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* `stitchkit/testing` — integration helpers that preserve the production
|
|
3
3
|
* generated-client and Fetch-handler pipelines without opening a TCP port.
|
|
4
4
|
*/
|
|
5
|
-
import { type ClientConfig, type ContractClientConfig, type ScopedKeys } from './browser/client';
|
|
6
|
-
import type { ContractDef, EndpointDef, ScopedHttpClient } from './contract';
|
|
7
|
-
import type { FetchHandler } from './server/types';
|
|
5
|
+
import { type ClientConfig, type ContractClientConfig, type ScopedKeys } from './browser/client.js';
|
|
6
|
+
import type { ContractDef, EndpointDef, ScopedHttpClient } from './contract/index.js';
|
|
7
|
+
import type { FetchHandler } from './server/types.js';
|
|
8
8
|
export type HandlerTestClientDefaults = Omit<ClientConfig, 'baseUrl' | 'fetch'>;
|
|
9
9
|
export interface HandlerTestTransportConfig<TServer> {
|
|
10
10
|
handler: FetchHandler<TServer>;
|
|
@@ -31,9 +31,9 @@ export declare function createHandlerTestClient<T extends Record<string, Endpoin
|
|
|
31
31
|
export declare function createHandlerTestClients<T extends Record<string, ContractDef<Record<string, EndpointDef>, string>>, TServer = unknown, const K extends string = never>(config: HandlerTestClientsConfig<T, TServer, K>): {
|
|
32
32
|
[P in keyof T]: ScopedHttpClient<T[P]['endpoints'], ScopedKeys<K>>;
|
|
33
33
|
};
|
|
34
|
-
export { type AgentRaceBarrier, type AgentRaceDriver, type AgentRaceTrace, type AgentRaceTraceEntry, createAgentRaceBarrier, createAgentRaceDriver, createAgentRaceTrace, } from './agent-runtime/testing';
|
|
35
|
-
export { type AgentStoreConformanceConfig, type AgentStoreConformanceContext, runAgentStoreConformance, } from './testing/agent-store-conformance';
|
|
36
|
-
export { type ManagedResourceConformanceConfig, type ManagedResourceConformanceControls, ManagedResourceConformanceError, type ManagedResourceConformanceFactoryInput, type ManagedResourceConformanceFixture, type ManagedResourceConformancePhase, ManagedResourceConformancePhaseSchema, type ManagedResourceConformanceScenario, type ManagedResourceConformanceScenarioId, ManagedResourceConformanceScenarioIdSchema, ManagedResourceConformanceScenarioSchema, type ManagedResourceConformanceTraceEntry, ManagedResourceConformanceTraceEntrySchema, type ManagedResourceConformanceTraceOutcome, ManagedResourceConformanceTraceOutcomeSchema, runManagedResourceConformance, } from './testing/managed-resource-conformance';
|
|
37
|
-
export { assertSurfaceDiscovery, type ConformanceTransport, type CreateRealtimeProbeDriverConfig, createRealtimeProbeDriver, type DefineRealtimeProbeConfig, defineRealtimeProbe, type RealtimeDisconnectObservation, RealtimeDisconnectObservationSchema, type RealtimeProbeAdapter, type RealtimeProbeFixture, type RealtimeProbeScenario, type RealtimeRejectionObservation, RealtimeRejectionObservationSchema, type RunSurfaceProbesConfig, runSurfaceProbes, type SurfaceDiscoveryObservation, type SurfaceProbe, type SurfaceProbeDriver, type SurfaceRealtimeDiscoveryObservation, type SurfaceToolDiscoveryObservation, type TransportObservation, TransportObservationSchema, } from './testing/surface-conformance';
|
|
38
|
-
export { assertSurfaceManifestSnapshot, buildSurfaceManifest, type IncompatibleSchemaPolicy, type McpSchemaValidationConfig, type SurfaceAgentProjection, type SurfaceManifest, type SurfaceManifestConfig, type SurfaceManifestExtension, SurfaceManifestExtensionSchema, type SurfaceManifestOperation, SurfaceManifestOperationSchema, type SurfaceManifestRealtimeEvent, SurfaceManifestRealtimeEventSchema, SurfaceManifestSchema, type SurfaceManifestTool, SurfaceManifestToolSchema, type SurfaceManifestToolSurface, SurfaceManifestToolSurfaceSchema, type SurfaceMcpPreparation, SurfaceRealtimeSchemaPairSchema, type SurfaceRuntimeToolDefinition, SurfaceSchemaDigestsSchema, type SurfaceToolDefinition, type SurfaceToolExtension, serializeSurfaceValue, } from './testing/surface-manifest';
|
|
34
|
+
export { type AgentRaceBarrier, type AgentRaceDriver, type AgentRaceTrace, type AgentRaceTraceEntry, createAgentRaceBarrier, createAgentRaceDriver, createAgentRaceTrace, } from './agent-runtime/testing.js';
|
|
35
|
+
export { type AgentStoreConformanceConfig, type AgentStoreConformanceContext, runAgentStoreConformance, } from './testing/agent-store-conformance.js';
|
|
36
|
+
export { type ManagedResourceConformanceConfig, type ManagedResourceConformanceControls, ManagedResourceConformanceError, type ManagedResourceConformanceFactoryInput, type ManagedResourceConformanceFixture, type ManagedResourceConformancePhase, ManagedResourceConformancePhaseSchema, type ManagedResourceConformanceScenario, type ManagedResourceConformanceScenarioId, ManagedResourceConformanceScenarioIdSchema, ManagedResourceConformanceScenarioSchema, type ManagedResourceConformanceTraceEntry, ManagedResourceConformanceTraceEntrySchema, type ManagedResourceConformanceTraceOutcome, ManagedResourceConformanceTraceOutcomeSchema, runManagedResourceConformance, } from './testing/managed-resource-conformance.js';
|
|
37
|
+
export { assertSurfaceDiscovery, type ConformanceTransport, type CreateRealtimeProbeDriverConfig, createRealtimeProbeDriver, type DefineRealtimeProbeConfig, defineRealtimeProbe, type RealtimeDisconnectObservation, RealtimeDisconnectObservationSchema, type RealtimeProbeAdapter, type RealtimeProbeFixture, type RealtimeProbeScenario, type RealtimeRejectionObservation, RealtimeRejectionObservationSchema, type RunSurfaceProbesConfig, runSurfaceProbes, type SurfaceDiscoveryObservation, type SurfaceProbe, type SurfaceProbeDriver, type SurfaceRealtimeDiscoveryObservation, type SurfaceToolDiscoveryObservation, type TransportObservation, TransportObservationSchema, } from './testing/surface-conformance.js';
|
|
38
|
+
export { assertSurfaceManifestSnapshot, buildSurfaceManifest, type IncompatibleSchemaPolicy, type McpSchemaValidationConfig, type SurfaceAgentProjection, type SurfaceManifest, type SurfaceManifestConfig, type SurfaceManifestExtension, SurfaceManifestExtensionSchema, type SurfaceManifestOperation, SurfaceManifestOperationSchema, type SurfaceManifestRealtimeEvent, SurfaceManifestRealtimeEventSchema, SurfaceManifestSchema, type SurfaceManifestTool, SurfaceManifestToolSchema, type SurfaceManifestToolSurface, SurfaceManifestToolSurfaceSchema, type SurfaceMcpPreparation, SurfaceRealtimeSchemaPairSchema, type SurfaceRuntimeToolDefinition, SurfaceSchemaDigestsSchema, type SurfaceToolDefinition, type SurfaceToolExtension, serializeSurfaceValue, } from './testing/surface-manifest.js';
|
|
39
39
|
//# sourceMappingURL=testing.d.ts.map
|
package/dist/testing.js
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Peer-free in-process contract tool dispatch.
|
|
3
|
+
*
|
|
4
|
+
* This entrypoint deliberately excludes MCP and AI SDK adapters. It exposes
|
|
5
|
+
* the same canonical runner used by those mounts for consumers that only need
|
|
6
|
+
* local validated invocation.
|
|
7
|
+
*/
|
|
8
|
+
export { createToolInvoker, type ToolInvocationOptions, type ToolInvoker, type ToolInvokerConfig, type ToolInvokerTransport, } from './tools/invoker.js';
|
|
9
|
+
//# sourceMappingURL=tool-invoker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-invoker.d.ts","sourceRoot":"","sources":["../src/tool-invoker.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EACL,iBAAiB,EACjB,KAAK,qBAAqB,EAC1B,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,GAC1B,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createToolInvoker
|
|
3
|
+
} from "./index-g2j2m6vv.js";
|
|
4
|
+
import"./index-7etq650s.js";
|
|
5
|
+
import"./index-cz32amcb.js";
|
|
6
|
+
import"./index-69m2278y.js";
|
|
7
|
+
import"./index-vkk06pv1.js";
|
|
8
|
+
import"./index-6djpbnda.js";
|
|
9
|
+
import"./index-cby4ar3v.js";
|
|
10
|
+
import"./index-9ky9hhg3.js";
|
|
11
|
+
import"./index-smpbdg6k.js";
|
|
12
|
+
import"./index-0w9abg87.js";
|
|
13
|
+
import"./index-6k1937bx.js";
|
|
14
|
+
export {
|
|
15
|
+
createToolInvoker
|
|
16
|
+
};
|
package/dist/tools/agent.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ToolSet } from 'ai';
|
|
2
|
-
import type { ServiceDef } from '../server/types';
|
|
3
|
-
import { type ErrorHintFn, type ToolCallHooks, type ToolLifecycle } from './execute';
|
|
4
|
-
import { type ToolExtend } from './mount';
|
|
5
|
-
import type { RuntimeToolDefinition } from './runtime-tool';
|
|
2
|
+
import type { ServiceDef } from '../server/types.js';
|
|
3
|
+
import { type ErrorHintFn, type ToolCallHooks, type ToolLifecycle } from './execute.js';
|
|
4
|
+
import { type ToolExtend } from './mount.js';
|
|
5
|
+
import type { RuntimeToolDefinition } from './runtime-tool.js';
|
|
6
6
|
export interface AgentContext {
|
|
7
7
|
[key: string]: unknown;
|
|
8
8
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ZodObject, type ZodType, z } from 'zod';
|
|
2
|
-
import type { ContractDef, EndpointDef, EndpointToolAnnotations, HttpMethod } from '../contract';
|
|
3
|
-
import type { Handlers } from '../server/types';
|
|
4
|
-
import { type RuntimeToolDefinition, type RuntimeToolDefinitionWithOutput, type RuntimeToolHandlerContext, type RuntimeToolTransport } from './runtime-tool';
|
|
2
|
+
import type { ContractDef, EndpointDef, EndpointToolAnnotations, HttpMethod } from '../contract/index.js';
|
|
3
|
+
import type { Handlers } from '../server/types.js';
|
|
4
|
+
import { type RuntimeToolDefinition, type RuntimeToolDefinitionWithOutput, type RuntimeToolHandlerContext, type RuntimeToolTransport } from './runtime-tool.js';
|
|
5
5
|
export declare const AsyncOperationCancelResultSchema: z.ZodDiscriminatedUnion<[ZodObject<{
|
|
6
6
|
outcome: z.ZodLiteral<"accepted">;
|
|
7
7
|
}, z.core.$strip>, ZodObject<{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ZodObject, ZodType, z } from 'zod';
|
|
2
|
-
import type { CliRunOptions } from './cli-args';
|
|
3
|
-
import type { CliWriters } from './cli-format';
|
|
4
|
-
import { type ToolResult } from './execute';
|
|
2
|
+
import type { CliRunOptions } from './cli-args.js';
|
|
3
|
+
import type { CliWriters } from './cli-format.js';
|
|
4
|
+
import { type ToolResult } from './execute.js';
|
|
5
5
|
export interface CliCommandContext<TInput extends ZodObject> extends CliWriters {
|
|
6
6
|
input: z.output<TInput>;
|
|
7
7
|
options: Readonly<CliRunOptions>;
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* return (`formatToolError`), so a script can keep `2>/dev/null` clean while
|
|
12
12
|
* still parsing a success.
|
|
13
13
|
*/
|
|
14
|
-
import type { ErrorHintFn, ToolResult } from './execute';
|
|
14
|
+
import type { ErrorHintFn, ToolResult } from './execute.js';
|
|
15
15
|
/** Map a `ToolResult.code` to a process exit code. */
|
|
16
16
|
export type ExitCodeMap = Record<string, number>;
|
|
17
17
|
/**
|
package/dist/tools/cli-wait.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* poll target from the first result (`poll`), which tool to re-call (`tool`)
|
|
7
7
|
* and when it is done (`done`).
|
|
8
8
|
*/
|
|
9
|
-
import type { ToolResult } from './execute';
|
|
9
|
+
import type { ToolResult } from './execute.js';
|
|
10
10
|
export interface CliWaitConfig {
|
|
11
11
|
/**
|
|
12
12
|
* Extract the poll-tool arguments from the initial result (e.g. `{ id }` from
|
package/dist/tools/cli.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { ServiceDef, StitchLogger } from '../server/types';
|
|
2
|
-
import { type CliCommandDefinition } from './cli-command';
|
|
3
|
-
import { type ExitCodeMap } from './cli-format';
|
|
4
|
-
import { type CliPresentationPolicyConfig } from './cli-policy';
|
|
5
|
-
import { type CliWaitConfig } from './cli-wait';
|
|
6
|
-
import { type ErrorHintFn, type ToolCallHooks, type ToolLifecycle } from './execute';
|
|
7
|
-
import type { RuntimeToolDefinition } from './runtime-tool';
|
|
1
|
+
import type { ServiceDef, StitchLogger } from '../server/types.js';
|
|
2
|
+
import { type CliCommandDefinition } from './cli-command.js';
|
|
3
|
+
import { type ExitCodeMap } from './cli-format.js';
|
|
4
|
+
import { type CliPresentationPolicyConfig } from './cli-policy.js';
|
|
5
|
+
import { type CliWaitConfig } from './cli-wait.js';
|
|
6
|
+
import { type ErrorHintFn, type ToolCallHooks, type ToolLifecycle } from './execute.js';
|
|
7
|
+
import type { RuntimeToolDefinition } from './runtime-tool.js';
|
|
8
8
|
export type CliSurfaceSource<TAuth, TValue> = readonly TValue[] | ((auth: Awaited<TAuth> | undefined) => readonly TValue[]);
|
|
9
9
|
export interface CliConfig<TAuth = unknown, TContext extends Record<string, unknown> = Record<string, unknown>> extends CliPresentationPolicyConfig {
|
|
10
10
|
/** Program name — shown in help and unknown-command messages. */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ZodObject, z } from 'zod';
|
|
2
|
-
import { ManagedFileRefSchema } from '../contract';
|
|
3
|
-
import type { ManagedFileBoundary } from '../files/boundary';
|
|
4
|
-
import { type ManagedNativeToolConfig } from './native-definition';
|
|
5
|
-
import { type RuntimeToolDefinitionWithOutput, type RuntimeToolHandlerContext, type RuntimeToolPresenters } from './runtime-tool';
|
|
2
|
+
import { ManagedFileRefSchema } from '../contract/index.js';
|
|
3
|
+
import type { ManagedFileBoundary } from '../files/boundary.js';
|
|
4
|
+
import { type ManagedNativeToolConfig } from './native-definition.js';
|
|
5
|
+
import { type RuntimeToolDefinitionWithOutput, type RuntimeToolHandlerContext, type RuntimeToolPresenters } from './runtime-tool.js';
|
|
6
6
|
export interface DefineDownloadToolConfig<TInput extends ZodObject> extends ManagedNativeToolConfig {
|
|
7
7
|
input: TInput;
|
|
8
8
|
resolveUrl: (input: z.output<TInput>, context: RuntimeToolHandlerContext<TInput>) => string | null | Promise<string | null>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ZodType, z } from 'zod';
|
|
2
|
-
import type { ManagedFileBoundary, ManagedFileSource } from '../files/boundary';
|
|
3
|
-
import { type ManagedNativeToolConfig } from './native-definition';
|
|
4
|
-
import { type RuntimeToolDefinitionWithOutput, type RuntimeToolHandlerContext, type RuntimeToolPresenters } from './runtime-tool';
|
|
2
|
+
import type { ManagedFileBoundary, ManagedFileSource } from '../files/boundary.js';
|
|
3
|
+
import { type ManagedNativeToolConfig } from './native-definition.js';
|
|
4
|
+
import { type RuntimeToolDefinitionWithOutput, type RuntimeToolHandlerContext, type RuntimeToolPresenters } from './runtime-tool.js';
|
|
5
5
|
export declare const UploadToolInputSchema: z.ZodObject<{
|
|
6
6
|
path: z.ZodString;
|
|
7
7
|
}, z.core.$strip>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { z } from 'zod';
|
|
2
|
-
import { type ManagedNativeToolConfig } from './native-definition';
|
|
3
|
-
import { type RuntimeToolDefinitionWithOutput, type RuntimeToolPresenters } from './runtime-tool';
|
|
4
|
-
import { ViewFileInputSchema, type ViewFileOptions, ViewFileOutputSchema } from './view-file';
|
|
2
|
+
import { type ManagedNativeToolConfig } from './native-definition.js';
|
|
3
|
+
import { type RuntimeToolDefinitionWithOutput, type RuntimeToolPresenters } from './runtime-tool.js';
|
|
4
|
+
import { ViewFileInputSchema, type ViewFileOptions, ViewFileOutputSchema } from './view-file.js';
|
|
5
5
|
export interface DefineViewFileToolConfig extends ManagedNativeToolConfig, ViewFileOptions {
|
|
6
6
|
present?: RuntimeToolPresenters<z.output<typeof ViewFileOutputSchema>>;
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ZodObject, ZodType, z } from 'zod';
|
|
2
|
-
import { type ManagedNativeToolConfig } from './native-definition';
|
|
3
|
-
import { type RuntimeToolDefinitionWithOutput, type RuntimeToolHandlerContext, type RuntimeToolPresenters } from './runtime-tool';
|
|
2
|
+
import { type ManagedNativeToolConfig } from './native-definition.js';
|
|
3
|
+
import { type RuntimeToolDefinitionWithOutput, type RuntimeToolHandlerContext, type RuntimeToolPresenters } from './runtime-tool.js';
|
|
4
4
|
export interface ManagedWaitRender {
|
|
5
5
|
text: string;
|
|
6
6
|
isError: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ManagedFileRef } from '../contract/file-ref';
|
|
2
|
-
import type { ManagedFileBoundary } from '../files/boundary';
|
|
1
|
+
import type { ManagedFileRef } from '../contract/file-ref.js';
|
|
2
|
+
import type { ManagedFileBoundary } from '../files/boundary.js';
|
|
3
3
|
/** Expected, caller-safe download failure; unexpected runtime errors still throw raw. */
|
|
4
4
|
export declare class DownloadOperationError extends Error {
|
|
5
5
|
readonly code: 'DOWNLOAD_HTTP_ERROR' | 'DOWNLOAD_TOO_LARGE';
|
package/dist/tools/execute.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ZodType, z } from 'zod';
|
|
2
|
-
import { AppError, type McpCallContext, type RuntimeContext, type TransportSource } from '../contract';
|
|
3
|
-
import type { OperationIdentity } from '../server/types';
|
|
2
|
+
import { AppError, type McpCallContext, type RuntimeContext, type TransportSource } from '../contract/index.js';
|
|
3
|
+
import type { OperationIdentity } from '../server/types.js';
|
|
4
4
|
export type ToolResult = {
|
|
5
5
|
ok: true;
|
|
6
6
|
data: unknown;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ZodObject, type ZodType } from 'zod';
|
|
2
|
-
import type { EndpointMcpPolicy, EndpointToolAnnotations, EndpointUiMeta, HttpMethod } from '../../contract';
|
|
3
|
-
import type { MethodDef, ServiceDef, StitchLogger } from '../../server/types';
|
|
4
|
-
import type { ToolPresentationSchema } from '../flatten';
|
|
2
|
+
import type { EndpointMcpPolicy, EndpointToolAnnotations, EndpointUiMeta, HttpMethod } from '../../contract/index.js';
|
|
3
|
+
import type { MethodDef, ServiceDef, StitchLogger } from '../../server/types.js';
|
|
4
|
+
import type { ToolPresentationSchema } from '../flatten.js';
|
|
5
5
|
export type ProjectedToolTransport = 'MCP' | 'AGENT' | 'CLI';
|
|
6
6
|
/** Non-executable runtime-tool shape needed to project names and advertised schemas. */
|
|
7
7
|
export interface SurfaceRuntimeToolDefinition {
|
package/dist/tools/invoker.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type Transport, type TransportSource } from '../contract';
|
|
2
|
-
import type { ServiceDef } from '../server/types';
|
|
3
|
-
import { type ToolCallContext, type ToolCallHooks, type ToolLifecycle, type ToolResult } from './execute';
|
|
4
|
-
import { type ToolExtend } from './mount';
|
|
1
|
+
import { type Transport, type TransportSource } from '../contract/index.js';
|
|
2
|
+
import type { ServiceDef } from '../server/types.js';
|
|
3
|
+
import { type ToolCallContext, type ToolCallHooks, type ToolLifecycle, type ToolResult } from './execute.js';
|
|
4
|
+
import { type ToolExtend } from './mount.js';
|
|
5
5
|
export type ToolInvokerTransport = Exclude<Transport, 'HTTP'>;
|
|
6
6
|
/** Configuration for a compiled in-process contract-tool dispatcher. */
|
|
7
7
|
export interface ToolInvokerConfig {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ToolLifecycle } from './execute';
|
|
1
|
+
import type { ToolLifecycle } from './execute.js';
|
|
2
2
|
/** Compose tool lifecycle hooks without inventing HTTP-only phases. */
|
|
3
3
|
export declare function composeToolLifecycle(...hooks: readonly (ToolLifecycle | undefined)[]): ToolLifecycle;
|
|
4
4
|
//# sourceMappingURL=lifecycle.d.ts.map
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
* Built on the mixed-surface collector used by the mounts — the listing cannot
|
|
11
11
|
* drift when pathless runtime tools sit beside contract operations.
|
|
12
12
|
*/
|
|
13
|
-
import type { ContractDef, Transport } from '../contract';
|
|
14
|
-
import { type ToolSurfaceDefinition } from './surface';
|
|
13
|
+
import type { ContractDef, Transport } from '../contract/index.js';
|
|
14
|
+
import { type ToolSurfaceDefinition } from './surface.js';
|
|
15
15
|
/** One mounted tool name and where it comes from. */
|
|
16
16
|
export interface ToolNameEntry {
|
|
17
17
|
/** Whether the operation comes from a contract or a pathless runtime definition. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AppError } from '../contract';
|
|
1
|
+
import { AppError } from '../contract/index.js';
|
|
2
2
|
/** Convert only caller-safe managed failures; unexpected IO retains its raw identity. */
|
|
3
3
|
export declare function managedFileAppError(error: unknown): AppError | null;
|
|
4
4
|
/** Partial/raw tool paths have no throwing runner, so normalize and log unknown failures here. */
|
package/dist/tools/manifest.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { CollectToolsConfig } from './mount';
|
|
2
|
-
import type { RuntimeToolTransport } from './runtime-tool';
|
|
3
|
-
import { type ToolSurfaceDefinition } from './surface';
|
|
1
|
+
import type { CollectToolsConfig } from './mount.js';
|
|
2
|
+
import type { RuntimeToolTransport } from './runtime-tool.js';
|
|
3
|
+
import { type ToolSurfaceDefinition } from './surface.js';
|
|
4
4
|
export interface ToolManifestEntry {
|
|
5
5
|
name: string;
|
|
6
6
|
description: string;
|