@hop-top/kit 0.5.0-alpha.1 → 0.5.0-alpha.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.
Files changed (101) hide show
  1. package/CHANGELOG.md +87 -0
  2. package/README.md +237 -9
  3. package/dist/aim-CTp-kJW2.d.ts +139 -0
  4. package/dist/aim.d.ts +1 -116
  5. package/dist/alias-dhhr08Ei.d.ts +88 -0
  6. package/dist/alias.d.ts +2 -73
  7. package/dist/api-miiso81x.d.ts +77 -0
  8. package/dist/api.d.ts +1 -62
  9. package/dist/auth-2-jfgiHn.d.ts +34 -0
  10. package/dist/auth.d.ts +1 -26
  11. package/dist/cli-DgOEOsPB.d.ts +450 -0
  12. package/dist/cli.d.ts +5 -309
  13. package/dist/cli.js +190 -62
  14. package/dist/config-BUY7_W2n.d.ts +103 -0
  15. package/dist/config.d.ts +1 -97
  16. package/dist/errcorrect-BcX1Ft0K.d.ts +44 -0
  17. package/dist/errcorrect.d.ts +1 -37
  18. package/dist/id/index.d.ts +2 -83
  19. package/dist/index--C7Mtsmm.d.ts +328 -0
  20. package/dist/index-C3Zw4wDJ.d.ts +359 -0
  21. package/dist/index-MLrRDvEG.d.ts +1073 -0
  22. package/dist/index-QSffbLnj.d.ts +94 -0
  23. package/dist/index.d.ts +26 -0
  24. package/dist/index.js +5863 -0
  25. package/dist/llm-B5XUWH8T.d.ts +231 -0
  26. package/dist/llm.d.ts +1 -188
  27. package/dist/mcp/index.d.ts +2 -0
  28. package/dist/mcp/index.js +1453 -0
  29. package/dist/netpolicy-asvCfwi8.d.ts +138 -0
  30. package/dist/netpolicy.d.ts +1 -0
  31. package/dist/netpolicy.js +118 -0
  32. package/dist/output-VFFLqor9.d.ts +521 -0
  33. package/dist/output.d.ts +2 -213
  34. package/dist/output.js +554 -43
  35. package/dist/progress-CAzyxeWl.d.ts +38 -0
  36. package/dist/progress.d.ts +1 -30
  37. package/dist/provenance-SMFHm5gx.d.ts +30 -0
  38. package/dist/provenance.d.ts +1 -24
  39. package/dist/routellm-PGSt2D1y.d.ts +75 -0
  40. package/dist/routellm.d.ts +2 -64
  41. package/dist/rpc-D5xLEf8V.d.ts +32 -0
  42. package/dist/rpc.d.ts +2 -25
  43. package/dist/safety-CUaYEjZc.d.ts +30 -0
  44. package/dist/safety.d.ts +1 -24
  45. package/dist/scope-BrhYB4ij.d.ts +141 -0
  46. package/dist/scope.d.ts +1 -121
  47. package/dist/stream-CrjeCp0M.d.ts +44 -0
  48. package/dist/stream.d.ts +1 -35
  49. package/dist/telemetry/index.d.ts +1 -315
  50. package/dist/telemetry/index.js +12 -1
  51. package/dist/tui/index.d.ts +4 -298
  52. package/dist/tui/index.js +1 -9
  53. package/dist/upgrade-p_zh3pvV.d.ts +102 -0
  54. package/dist/upgrade.d.ts +1 -95
  55. package/dist/xdg-DB7Shoib.d.ts +179 -0
  56. package/dist/xdg.d.ts +1 -169
  57. package/package.json +21 -3
  58. package/src/cli.offline.test.ts +93 -0
  59. package/src/cli.parity.test.ts +192 -0
  60. package/src/cli.ts +112 -12
  61. package/src/index.test.ts +58 -0
  62. package/src/index.ts +36 -0
  63. package/src/log.parity.test.ts +105 -0
  64. package/src/log.ts +64 -13
  65. package/src/mcp/bridge.test.ts +150 -0
  66. package/src/mcp/bridge.ts +246 -0
  67. package/src/mcp/conformance.test.ts +336 -0
  68. package/src/mcp/dispatch.ts +313 -0
  69. package/src/mcp/index.ts +138 -0
  70. package/src/mcp/legacy.ts +314 -0
  71. package/src/mcp/mcp.test.ts +697 -0
  72. package/src/mcp/modern-confirm.test.ts +520 -0
  73. package/src/mcp/modern-confirm.ts +452 -0
  74. package/src/mcp/modern.ts +723 -0
  75. package/src/mcp/tasks.ts +82 -0
  76. package/src/mcp/testtree.ts +250 -0
  77. package/src/mcp/types.ts +504 -0
  78. package/src/netpolicy.test.ts +202 -0
  79. package/src/netpolicy.ts +231 -0
  80. package/src/output/dispatch.ts +10 -2
  81. package/src/output/error.ts +293 -0
  82. package/src/output/formatter.ts +29 -5
  83. package/src/output/formatters/csv.ts +48 -12
  84. package/src/output/formatters/json.ts +4 -25
  85. package/src/output/formatters/project.ts +34 -0
  86. package/src/output/formatters/table.ts +8 -6
  87. package/src/output/formatters/text.ts +7 -3
  88. package/src/output/formatters/yaml.ts +5 -22
  89. package/src/output/projection.test.ts +298 -0
  90. package/src/output/projection.ts +33 -59
  91. package/src/output/template.ts +11 -21
  92. package/src/output.surface.test.ts +41 -0
  93. package/src/output.ts +39 -3
  94. package/src/telemetry/client.test.ts +31 -0
  95. package/src/telemetry/client.ts +7 -1
  96. package/src/telemetry/offline.test.ts +64 -0
  97. package/src/tui/parity.test.ts +120 -31
  98. package/src/tui/parity.ts +58 -7
  99. package/test/output/csv.test.ts +164 -0
  100. package/test/output/error.test.ts +241 -0
  101. package/src/tui/parity.json +0 -74
@@ -0,0 +1,231 @@
1
+ /**
2
+ * @packageDocumentation
3
+ *
4
+ * LLM client facade — mirrors Go `llm` package interfaces as TS types.
5
+ *
6
+ * Provides URI parsing, config loading, provider registry, Client facade
7
+ * with fallback, and typed errors. Adapter implementations (OpenAI,
8
+ * Anthropic, Ollama) are deferred; register them via {@link register}.
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * import { createLLM, register } from '@hop-top/kit/llm';
13
+ *
14
+ * register('mock', (cfg) => ({ complete: async (r) => ({ content: 'hi', role: 'assistant' }), close() {} }));
15
+ * const client = createLLM('mock://model-1');
16
+ * const resp = await client.complete({ messages: [{ role: 'user', content: 'hello' }] });
17
+ * ```
18
+ */
19
+ interface Message {
20
+ role: string;
21
+ content: string;
22
+ }
23
+ interface Request {
24
+ messages: Message[];
25
+ model?: string;
26
+ temperature?: number;
27
+ maxTokens?: number;
28
+ stopSequences?: string[];
29
+ extensions?: Record<string, unknown>;
30
+ }
31
+ interface Response {
32
+ content: string;
33
+ role: string;
34
+ usage?: Usage;
35
+ finishReason?: string;
36
+ }
37
+ interface Usage {
38
+ promptTokens: number;
39
+ completionTokens: number;
40
+ totalTokens: number;
41
+ }
42
+ interface Token {
43
+ content: string;
44
+ done: boolean;
45
+ }
46
+ interface ToolDef {
47
+ name: string;
48
+ description: string;
49
+ parameters: unknown;
50
+ }
51
+ interface ToolCall {
52
+ id: string;
53
+ name: string;
54
+ arguments: unknown;
55
+ }
56
+ interface ToolResponse {
57
+ content: string;
58
+ toolCalls: ToolCall[];
59
+ }
60
+ interface Completer {
61
+ complete(req: Request): Promise<Response>;
62
+ }
63
+ interface Streamer {
64
+ stream(req: Request): AsyncIterable<Token>;
65
+ }
66
+ interface ToolCaller {
67
+ callWithTools(req: Request, tools: ToolDef[]): Promise<ToolResponse>;
68
+ }
69
+ interface Provider extends Partial<Completer & Streamer & ToolCaller> {
70
+ close(): void;
71
+ }
72
+ interface URI {
73
+ scheme: string;
74
+ model: string;
75
+ host?: string;
76
+ params?: Record<string, string>;
77
+ }
78
+ interface ProviderConfig {
79
+ apiKey?: string;
80
+ baseURL?: string;
81
+ model: string;
82
+ params?: Record<string, string>;
83
+ extras?: Record<string, unknown>;
84
+ }
85
+ interface ResolvedConfig {
86
+ uri: URI;
87
+ provider: ProviderConfig;
88
+ fallbacks: string[];
89
+ }
90
+ declare class LLMError extends Error {
91
+ statusCode?: number;
92
+ code?: string;
93
+ constructor(message: string);
94
+ }
95
+ declare class ProviderNotFoundError extends LLMError {
96
+ scheme: string;
97
+ constructor(scheme: string);
98
+ }
99
+ declare class CapabilityNotSupportedError extends LLMError {
100
+ capability: string;
101
+ provider: string;
102
+ constructor(capability: string, provider: string);
103
+ }
104
+ declare class AuthError extends LLMError {
105
+ provider: string;
106
+ constructor(provider: string);
107
+ }
108
+ declare class RateLimitError extends LLMError {
109
+ provider: string;
110
+ retryAfter?: number;
111
+ constructor(provider: string, retryAfter?: number);
112
+ }
113
+ declare class ModelError extends LLMError {
114
+ model: string;
115
+ provider: string;
116
+ constructor(model: string, provider: string);
117
+ }
118
+ declare class FallbackExhaustedError extends LLMError {
119
+ errors: Error[];
120
+ constructor(errors: Error[]);
121
+ }
122
+ /**
123
+ * Returns true when `err` should trigger a fallback attempt.
124
+ *
125
+ * Fallbackable conditions:
126
+ * - LLMError with statusCode >= 500
127
+ * - RateLimitError (429)
128
+ * - Connection/timeout errors (ECONNREFUSED, ETIMEDOUT, ECONNRESET)
129
+ */
130
+ declare function isFallbackable(err: Error): boolean;
131
+ /**
132
+ * Parses an LLM URI string into its components.
133
+ *
134
+ * Format: `scheme://[host[:port]/]model[?params]`
135
+ *
136
+ * When the path portion contains a host:port prefix (detected by the
137
+ * presence of a numeric port), the first segment is treated as host.
138
+ * Otherwise the entire path is the model name.
139
+ */
140
+ declare function parseURI(raw: string): URI;
141
+ /**
142
+ * Builds a {@link ResolvedConfig} from a URI string + env vars.
143
+ *
144
+ * When `uriStr` is empty/undefined, falls back to `LLM_PROVIDER`
145
+ * env var as a full default URI. If neither is provided, throws.
146
+ *
147
+ * URI query params `api_key` and `base_url` populate provider
148
+ * config. If `uri.host` is set, it derives a baseURL. Env vars
149
+ * `LLM_API_KEY` and `LLM_BASE_URL` override last.
150
+ *
151
+ * Env vars:
152
+ * - `LLM_PROVIDER` — full default URI when no arg provided
153
+ * - `LLM_API_KEY` — overrides provider API key
154
+ * - `LLM_BASE_URL` — overrides provider base URL
155
+ * - `LLM_FALLBACK` — comma-separated fallback URIs
156
+ */
157
+ declare function loadConfig(uriStr?: string): ResolvedConfig;
158
+ type Factory = (cfg: ResolvedConfig) => Provider;
159
+ /** Register a provider factory for the given URI scheme. */
160
+ declare function register(scheme: string, factory: Factory): void;
161
+ /** Resolve a URI to a Provider instance via the registry. */
162
+ declare function resolve(uriStr: string): Provider;
163
+ /** Clear the registry (for tests). */
164
+ declare function clearRegistry(): void;
165
+ interface ClientOptions {
166
+ fallback?: string[];
167
+ onRequest?: (req: Request) => void;
168
+ onResponse?: (resp: Response, durationMs: number) => void;
169
+ onError?: (err: Error) => void;
170
+ onFallback?: (from: number, to: number, err: Error) => void;
171
+ }
172
+ interface Client {
173
+ complete(req: Request): Promise<Response>;
174
+ stream(req: Request): AsyncIterable<Token>;
175
+ callWithTools(req: Request, tools: ToolDef[]): Promise<ToolResponse>;
176
+ capabilities(): string[];
177
+ provider(): Provider;
178
+ close(): void;
179
+ }
180
+ /**
181
+ * Create an LLM client with fallback support and event hooks.
182
+ *
183
+ * The returned Client delegates to the provider resolved from `uri`.
184
+ * On fallbackable errors, it tries each fallback URI in order.
185
+ */
186
+ declare function createLLM(uri: string, opts?: ClientOptions): Client;
187
+
188
+ type llm_AuthError = AuthError;
189
+ declare const llm_AuthError: typeof AuthError;
190
+ type llm_CapabilityNotSupportedError = CapabilityNotSupportedError;
191
+ declare const llm_CapabilityNotSupportedError: typeof CapabilityNotSupportedError;
192
+ type llm_Client = Client;
193
+ type llm_ClientOptions = ClientOptions;
194
+ type llm_Completer = Completer;
195
+ type llm_Factory = Factory;
196
+ type llm_FallbackExhaustedError = FallbackExhaustedError;
197
+ declare const llm_FallbackExhaustedError: typeof FallbackExhaustedError;
198
+ type llm_LLMError = LLMError;
199
+ declare const llm_LLMError: typeof LLMError;
200
+ type llm_Message = Message;
201
+ type llm_ModelError = ModelError;
202
+ declare const llm_ModelError: typeof ModelError;
203
+ type llm_Provider = Provider;
204
+ type llm_ProviderConfig = ProviderConfig;
205
+ type llm_ProviderNotFoundError = ProviderNotFoundError;
206
+ declare const llm_ProviderNotFoundError: typeof ProviderNotFoundError;
207
+ type llm_RateLimitError = RateLimitError;
208
+ declare const llm_RateLimitError: typeof RateLimitError;
209
+ type llm_Request = Request;
210
+ type llm_ResolvedConfig = ResolvedConfig;
211
+ type llm_Response = Response;
212
+ type llm_Streamer = Streamer;
213
+ type llm_Token = Token;
214
+ type llm_ToolCall = ToolCall;
215
+ type llm_ToolCaller = ToolCaller;
216
+ type llm_ToolDef = ToolDef;
217
+ type llm_ToolResponse = ToolResponse;
218
+ type llm_URI = URI;
219
+ type llm_Usage = Usage;
220
+ declare const llm_clearRegistry: typeof clearRegistry;
221
+ declare const llm_createLLM: typeof createLLM;
222
+ declare const llm_isFallbackable: typeof isFallbackable;
223
+ declare const llm_loadConfig: typeof loadConfig;
224
+ declare const llm_parseURI: typeof parseURI;
225
+ declare const llm_register: typeof register;
226
+ declare const llm_resolve: typeof resolve;
227
+ declare namespace llm {
228
+ export { llm_AuthError as AuthError, llm_CapabilityNotSupportedError as CapabilityNotSupportedError, type llm_Client as Client, type llm_ClientOptions as ClientOptions, type llm_Completer as Completer, type llm_Factory as Factory, llm_FallbackExhaustedError as FallbackExhaustedError, llm_LLMError as LLMError, type llm_Message as Message, llm_ModelError as ModelError, type llm_Provider as Provider, type llm_ProviderConfig as ProviderConfig, llm_ProviderNotFoundError as ProviderNotFoundError, llm_RateLimitError as RateLimitError, type llm_Request as Request, type llm_ResolvedConfig as ResolvedConfig, type llm_Response as Response, type llm_Streamer as Streamer, type llm_Token as Token, type llm_ToolCall as ToolCall, type llm_ToolCaller as ToolCaller, type llm_ToolDef as ToolDef, type llm_ToolResponse as ToolResponse, type llm_URI as URI, type llm_Usage as Usage, llm_clearRegistry as clearRegistry, llm_createLLM as createLLM, llm_isFallbackable as isFallbackable, llm_loadConfig as loadConfig, llm_parseURI as parseURI, llm_register as register, llm_resolve as resolve };
229
+ }
230
+
231
+ export { AuthError as A, CapabilityNotSupportedError as C, type Factory as F, LLMError as L, type Message as M, type Provider as P, RateLimitError as R, type Streamer as S, type Token as T, type URI as U, type Client as a, type ClientOptions as b, type Completer as c, FallbackExhaustedError as d, ModelError as e, type ProviderConfig as f, ProviderNotFoundError as g, type Request as h, type ResolvedConfig as i, type Response as j, type ToolCall as k, type ToolCaller as l, type ToolDef as m, type ToolResponse as n, type Usage as o, clearRegistry as p, createLLM as q, isFallbackable as r, llm as s, loadConfig as t, parseURI as u, register as v, resolve as w };
package/dist/llm.d.ts CHANGED
@@ -1,188 +1 @@
1
- /**
2
- * @packageDocumentation
3
- *
4
- * LLM client facade — mirrors Go `llm` package interfaces as TS types.
5
- *
6
- * Provides URI parsing, config loading, provider registry, Client facade
7
- * with fallback, and typed errors. Adapter implementations (OpenAI,
8
- * Anthropic, Ollama) are deferred; register them via {@link register}.
9
- *
10
- * @example
11
- * ```ts
12
- * import { createLLM, register } from '@hop-top/kit/llm';
13
- *
14
- * register('mock', (cfg) => ({ complete: async (r) => ({ content: 'hi', role: 'assistant' }), close() {} }));
15
- * const client = createLLM('mock://model-1');
16
- * const resp = await client.complete({ messages: [{ role: 'user', content: 'hello' }] });
17
- * ```
18
- */
19
- interface Message {
20
- role: string;
21
- content: string;
22
- }
23
- interface Request {
24
- messages: Message[];
25
- model?: string;
26
- temperature?: number;
27
- maxTokens?: number;
28
- stopSequences?: string[];
29
- extensions?: Record<string, unknown>;
30
- }
31
- interface Response {
32
- content: string;
33
- role: string;
34
- usage?: Usage;
35
- finishReason?: string;
36
- }
37
- interface Usage {
38
- promptTokens: number;
39
- completionTokens: number;
40
- totalTokens: number;
41
- }
42
- interface Token {
43
- content: string;
44
- done: boolean;
45
- }
46
- interface ToolDef {
47
- name: string;
48
- description: string;
49
- parameters: unknown;
50
- }
51
- interface ToolCall {
52
- id: string;
53
- name: string;
54
- arguments: unknown;
55
- }
56
- interface ToolResponse {
57
- content: string;
58
- toolCalls: ToolCall[];
59
- }
60
- interface Completer {
61
- complete(req: Request): Promise<Response>;
62
- }
63
- interface Streamer {
64
- stream(req: Request): AsyncIterable<Token>;
65
- }
66
- interface ToolCaller {
67
- callWithTools(req: Request, tools: ToolDef[]): Promise<ToolResponse>;
68
- }
69
- interface Provider extends Partial<Completer & Streamer & ToolCaller> {
70
- close(): void;
71
- }
72
- interface URI {
73
- scheme: string;
74
- model: string;
75
- host?: string;
76
- params?: Record<string, string>;
77
- }
78
- interface ProviderConfig {
79
- apiKey?: string;
80
- baseURL?: string;
81
- model: string;
82
- params?: Record<string, string>;
83
- extras?: Record<string, unknown>;
84
- }
85
- interface ResolvedConfig {
86
- uri: URI;
87
- provider: ProviderConfig;
88
- fallbacks: string[];
89
- }
90
- declare class LLMError extends Error {
91
- statusCode?: number;
92
- code?: string;
93
- constructor(message: string);
94
- }
95
- declare class ProviderNotFoundError extends LLMError {
96
- scheme: string;
97
- constructor(scheme: string);
98
- }
99
- declare class CapabilityNotSupportedError extends LLMError {
100
- capability: string;
101
- provider: string;
102
- constructor(capability: string, provider: string);
103
- }
104
- declare class AuthError extends LLMError {
105
- provider: string;
106
- constructor(provider: string);
107
- }
108
- declare class RateLimitError extends LLMError {
109
- provider: string;
110
- retryAfter?: number;
111
- constructor(provider: string, retryAfter?: number);
112
- }
113
- declare class ModelError extends LLMError {
114
- model: string;
115
- provider: string;
116
- constructor(model: string, provider: string);
117
- }
118
- declare class FallbackExhaustedError extends LLMError {
119
- errors: Error[];
120
- constructor(errors: Error[]);
121
- }
122
- /**
123
- * Returns true when `err` should trigger a fallback attempt.
124
- *
125
- * Fallbackable conditions:
126
- * - LLMError with statusCode >= 500
127
- * - RateLimitError (429)
128
- * - Connection/timeout errors (ECONNREFUSED, ETIMEDOUT, ECONNRESET)
129
- */
130
- declare function isFallbackable(err: Error): boolean;
131
- /**
132
- * Parses an LLM URI string into its components.
133
- *
134
- * Format: `scheme://[host[:port]/]model[?params]`
135
- *
136
- * When the path portion contains a host:port prefix (detected by the
137
- * presence of a numeric port), the first segment is treated as host.
138
- * Otherwise the entire path is the model name.
139
- */
140
- declare function parseURI(raw: string): URI;
141
- /**
142
- * Builds a {@link ResolvedConfig} from a URI string + env vars.
143
- *
144
- * When `uriStr` is empty/undefined, falls back to `LLM_PROVIDER`
145
- * env var as a full default URI. If neither is provided, throws.
146
- *
147
- * URI query params `api_key` and `base_url` populate provider
148
- * config. If `uri.host` is set, it derives a baseURL. Env vars
149
- * `LLM_API_KEY` and `LLM_BASE_URL` override last.
150
- *
151
- * Env vars:
152
- * - `LLM_PROVIDER` — full default URI when no arg provided
153
- * - `LLM_API_KEY` — overrides provider API key
154
- * - `LLM_BASE_URL` — overrides provider base URL
155
- * - `LLM_FALLBACK` — comma-separated fallback URIs
156
- */
157
- declare function loadConfig(uriStr?: string): ResolvedConfig;
158
- type Factory = (cfg: ResolvedConfig) => Provider;
159
- /** Register a provider factory for the given URI scheme. */
160
- declare function register(scheme: string, factory: Factory): void;
161
- /** Resolve a URI to a Provider instance via the registry. */
162
- declare function resolve(uriStr: string): Provider;
163
- /** Clear the registry (for tests). */
164
- declare function clearRegistry(): void;
165
- interface ClientOptions {
166
- fallback?: string[];
167
- onRequest?: (req: Request) => void;
168
- onResponse?: (resp: Response, durationMs: number) => void;
169
- onError?: (err: Error) => void;
170
- onFallback?: (from: number, to: number, err: Error) => void;
171
- }
172
- interface Client {
173
- complete(req: Request): Promise<Response>;
174
- stream(req: Request): AsyncIterable<Token>;
175
- callWithTools(req: Request, tools: ToolDef[]): Promise<ToolResponse>;
176
- capabilities(): string[];
177
- provider(): Provider;
178
- close(): void;
179
- }
180
- /**
181
- * Create an LLM client with fallback support and event hooks.
182
- *
183
- * The returned Client delegates to the provider resolved from `uri`.
184
- * On fallbackable errors, it tries each fallback URI in order.
185
- */
186
- declare function createLLM(uri: string, opts?: ClientOptions): Client;
187
-
188
- export { AuthError, CapabilityNotSupportedError, type Client, type ClientOptions, type Completer, type Factory, FallbackExhaustedError, LLMError, type Message, ModelError, type Provider, type ProviderConfig, ProviderNotFoundError, RateLimitError, type Request, type ResolvedConfig, type Response, type Streamer, type Token, type ToolCall, type ToolCaller, type ToolDef, type ToolResponse, type URI, type Usage, clearRegistry, createLLM, isFallbackable, loadConfig, parseURI, register, resolve };
1
+ export { A as AuthError, C as CapabilityNotSupportedError, a as Client, b as ClientOptions, c as Completer, F as Factory, d as FallbackExhaustedError, L as LLMError, M as Message, e as ModelError, P as Provider, f as ProviderConfig, g as ProviderNotFoundError, R as RateLimitError, h as Request, i as ResolvedConfig, j as Response, S as Streamer, T as Token, k as ToolCall, l as ToolCaller, m as ToolDef, n as ToolResponse, U as URI, o as Usage, p as clearRegistry, q as createLLM, r as isFallbackable, t as loadConfig, u as parseURI, v as register, w as resolve } from './llm-B5XUWH8T.js';
@@ -0,0 +1,2 @@
1
+ export { C as CommanderBridgeOptions, D as DEFAULT_MCP_PATH, a as DEFAULT_MCP_SERVER_NAME, b as DEFAULT_MCP_SERVER_VERSION, c as DestructiveBlockedError, E as ElicitationConfirmGate, F as FlagSchema, H as HEADER_MCP_METHOD, d as HEADER_MCP_NAME, e as HEADER_MCP_PROTOCOL_VERSION, I as Invocation, f as InvocationMeta, g as InvokeResult, J as JsonRpcErrorObject, h as JsonRpcRequest, L as Leaf, i as LegacyMcpHandler, M as MCP_CONFIRM_KEY, j as MCP_CONFIRM_STATE_TTL_SECONDS, k as MCP_CONFIRM_STATE_VERSION, l as MCP_ERR_HEADER_MISMATCH, m as MCP_ERR_INTERNAL, n as MCP_ERR_INVALID_PARAMS, o as MCP_ERR_INVALID_REQUEST, p as MCP_ERR_METHOD_NOT_FOUND, q as MCP_ERR_MISSING_CLIENT_CAPABILITY, r as MCP_ERR_PARSE, s as MCP_ERR_UNSUPPORTED_VERSION, t as MCP_SPEC_2024_11_05, u as MCP_SPEC_2026_07_28, v as META_KEY_CLIENT_CAPABILITIES, w as META_KEY_CLIENT_INFO, x as META_KEY_PROTOCOL_VERSION, y as META_KEY_SERVER_INFO, z as McpBridge, A as McpCacheScope, B as McpConfirmBinding, G as McpConfirmDecision, K as McpConfirmRejection, N as McpConfirmStateStatus, O as McpDispatcher, P as McpEra, Q as McpHandler, R as McpHttpRequest, S as McpHttpResponse, T as McpMountOptions, U as McpSpecVersion, V as ModernMcpHandler, W as ModernRequestMeta, X as Policy, Y as RESULT_TYPE_COMPLETE, Z as RESULT_TYPE_INPUT_REQUIRED, _ as RawJSON, $ as ResolvedMcpConfig, a0 as SURFACE_CLI, a1 as SURFACE_LIB, a2 as SURFACE_MCP, a3 as SafetyClass, a4 as Surface, a5 as SurfaceNotEnabledError, a6 as TASKS_EXTENSION, a7 as TASKS_SUPPORTED, a8 as TASK_METHODS, a9 as TaskMethod, aa as UnknownCommandError, ab as buildToolEnvelope, ac as canonicalJSONStringify, ad as clientSupportsFormElicitation, ae as commanderBridge, af as createMcpHandler, ag as decodeMcpSentinel, ah as defaultPolicy, ai as detectMcpEra, aj as discoverCapabilities, ak as encodeEnvelope, al as errorResultBlock, am as hasModernMetaMarker, an as headerConfirmationGate, ap as isTaskMethod, aq as mcpConfirmArgsDigest, ar as mcpConfirmPrincipal, as as mcpMountConfig, at as methodNotAllowedResponse, au as mintMcpConfirmState, av as modernInvocationExtra, aw as parseJsonRpcRequest, ax as parseMcpConfirmRetry, ay as parseModernMeta, az as pathFromToolName, aA as policyAllowed, aB as rawToolCallName, aC as renderCallResult, aD as resolveMcpConfig, aE as singleHeaderValue, aF as toolName, aG as validModernRequestId, aH as verifyMcpConfirmState } from '../index-MLrRDvEG.js';
2
+ import 'commander';