@hop-top/kit 0.5.0-alpha.13 → 0.5.0-alpha.14

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 (39) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/{chunk-BXJ2J27B.js → chunk-IGKBRNEW.js} +10 -10
  3. package/dist/{chunk-VWGP4NVJ.js → chunk-MDVGMOZO.js} +45 -39
  4. package/dist/{chunk-4FMALWYB.js → chunk-MEF7W3MG.js} +45 -45
  5. package/dist/{chunk-VGOA5Y7S.js → chunk-Q547MHNB.js} +11 -11
  6. package/dist/{chunk-K7E34Q3A.js → chunk-TUU2BY5I.js} +136 -47
  7. package/dist/index.d.ts +4 -4
  8. package/dist/index.js +6 -6
  9. package/dist/{llm-DYuR7_uX.d.ts → llm-BazFKc_2.d.ts} +95 -9
  10. package/dist/{llm-anthropic-Cd_I2xXB.d.ts → llm-anthropic-BcAitoDV.d.ts} +1 -1
  11. package/dist/llm-anthropic.d.ts +2 -2
  12. package/dist/llm-anthropic.js +4 -4
  13. package/dist/{llm-openai-DyFrucmV.d.ts → llm-openai-CSDvuRH6.d.ts} +1 -1
  14. package/dist/llm-openai.d.ts +2 -2
  15. package/dist/llm-openai.js +4 -4
  16. package/dist/llm.d.ts +1 -1
  17. package/dist/llm.js +8 -2
  18. package/dist/{routellm-B0nv59mH.d.ts → routellm-B9UrONPr.d.ts} +1 -1
  19. package/dist/routellm.d.ts +2 -2
  20. package/dist/routellm.js +5 -5
  21. package/package.json +5 -5
  22. package/skills/hop-top-kit-ts/.claude-plugin/plugin.json +1 -1
  23. package/skills/hop-top-kit-ts/SKILL.md +2 -2
  24. package/skills/hop-top-kit-ts/references/other-ports.md +1 -1
  25. package/src/llm-anthropic.conformance.test.ts +7 -0
  26. package/src/llm-boundkey.test.ts +260 -0
  27. package/src/llm-choice-hermetic.test.ts +1 -1
  28. package/src/llm-config.test.ts +2 -4
  29. package/src/llm-config.ts +5 -1
  30. package/src/llm-endpoint.ts +25 -5
  31. package/src/llm-keys.ts +47 -15
  32. package/src/llm-openai.test.ts +10 -4
  33. package/src/llm-openai.ts +7 -1
  34. package/src/llm-spec.test.ts +347 -0
  35. package/src/llm-spec.ts +80 -0
  36. package/src/llm-uri.ts +96 -12
  37. package/src/llm.test.ts +2 -2
  38. package/src/llm.ts +10 -0
  39. package/test/llm/conformance-helpers.ts +3 -0
@@ -289,6 +289,22 @@ interface ProviderKey {
289
289
  interface Declaration {
290
290
  endpoints?: string[];
291
291
  key?: ProviderKey;
292
+ /** The scheme's default endpoint; see {@link keyBoundToDefault}. */
293
+ baseURL?: string;
294
+ /**
295
+ * Makes the scheme's ambient credentials (its provider variables and
296
+ * `LLM_API_KEY`) belong to {@link baseURL} alone. When the URI names
297
+ * another endpoint (a host or `base_url` param), or `LLM_BASE_URL` or
298
+ * the llm.yaml block's `base_url` does, none of them is lent: only a
299
+ * key the caller set for that endpoint resolves, namely the URI's
300
+ * `api_key`, llm.yaml `api_key`, or the variable llm.yaml
301
+ * `api_key_env` names. No key then is no error: a compatible server
302
+ * may take none. An endpoint sharing `baseURL`'s origin counts as the
303
+ * default; one that does not parse counts as custom. Needs
304
+ * `baseURL`; set it for adapters whose hosted key must not reach a
305
+ * self-hosted compatible server.
306
+ */
307
+ keyBoundToDefault?: boolean;
292
308
  }
293
309
  /** The declaration `scheme` registered with, if any. */
294
310
  declare function declarationOf(scheme: string): Declaration | undefined;
@@ -332,7 +348,11 @@ interface LoadOptions {
332
348
  * variables (`<SCHEME>_API_KEY` unless its adapter declares others);
333
349
  * `LLM_API_KEY` for a registered scheme that requires a key. Blank is
334
350
  * unset everywhere; a blank `api_key` param is dropped. Found
335
- * nowhere, it is left unset: the adapter reports it.
351
+ * nowhere, it is left unset: the adapter reports it. A scheme
352
+ * declaring `keyBoundToDefault` (the openai family) lends the last
353
+ * two only on its default endpoint: on any other, only the URI's
354
+ * `api_key`, llm.yaml `api_key` and `api_key_env` apply, and no key
355
+ * is no error.
336
356
  * - baseURL: the URI's `base_url`; its host (`http://host:port`);
337
357
  * `LLM_BASE_URL`; llm.yaml `base_url`.
338
358
  * - model: the URI's; llm.yaml `model`. extras: the block's other keys.
@@ -363,16 +383,72 @@ declare function loadConfig(uriStr?: string, opts?: LoadOptions): ResolvedConfig
363
383
  * `ollama://[::1]:11434/llama3`) when it splits as `host:port` with a
364
384
  * non-empty port; otherwise the whole path is the model
365
385
  * (`openrouter://openai/gpt-4.1-nano`). The query splits on `&`, each
366
- * pair on its first `=`, and is not percent-decoded; a param without
367
- * `=` is `""`, one with an empty name is dropped. `params` is absent
368
- * when none is left.
386
+ * pair on its first `=`; a param without `=` is `""`, one with an
387
+ * empty name is dropped. `params` is absent when none is left.
388
+ *
389
+ * The model and each param name and value are percent-decoded after
390
+ * the URI is split, so an escaped `?`, `&` or `#` is part of the text,
391
+ * never a separator: `x%3Fbase_url%3Dhttps%3A%2F%2Fevil` is a model of
392
+ * that literal text and sets no `base_url`. Only `%XX` is decoded; `+`
393
+ * stays `+`, so a key holding one survives. A malformed escape (or one
394
+ * that does not decode to UTF-8) is an error, as is a `base_url` or
395
+ * credential param (`api_key`, `token`, ...) named twice, whichever
396
+ * value would win; other params are last-wins. Build a URI from parts
397
+ * with {@link specURI}, never by concatenation: a raw `?` or `&` in a
398
+ * part still splits.
369
399
  *
370
400
  * Throws an {@link LLMError} (`empty URI`, `missing scheme in URI
371
- * "..."`, `empty scheme in URI "..."`) quoting `raw` with its
372
- * credentials masked by {@link redactURI}.
401
+ * "..."`, `empty scheme in URI "..."`, `malformed percent-escape in
402
+ * URI "..."`, `duplicate "name" param in URI "..."`) quoting `raw` with
403
+ * its credentials masked by {@link redactURI}.
373
404
  */
374
405
  declare function parseURI(raw: string): URI;
375
406
 
407
+ /**
408
+ * A provider named by its parts, not by a URI string: Go `llm.Spec`.
409
+ * Re-exported from `@hop-top/kit/llm`.
410
+ *
411
+ * @internal
412
+ */
413
+
414
+ /**
415
+ * A provider named by its parts. Building `"scheme://" + model +
416
+ * "?base_url=" + u` by hand lets a model name holding `?` or `&` add
417
+ * params of its own, among them a `base_url` that takes the API key to
418
+ * another host. A Spec keeps each part where it is: {@link specURI}
419
+ * escapes them, and `resolveSpec` and {@link loadConfigSpec} then run
420
+ * the same pipeline, with the same guards (key endpoint, hosted key
421
+ * bound to its default endpoint, base URL checks), as the URI they
422
+ * stand for.
423
+ */
424
+ interface Spec {
425
+ scheme: string;
426
+ /** The model; absent or empty for none. */
427
+ model?: string;
428
+ /** The `base_url` param; absent or empty for the provider's own. */
429
+ baseURL?: string;
430
+ /** The `api_key` param; absent or empty to resolve it as `applyAPIKey` does. */
431
+ apiKey?: string;
432
+ /**
433
+ * The other params. `base_url` and `api_key` belong in `baseURL` and
434
+ * `apiKey`: naming either here is an error.
435
+ */
436
+ params?: Record<string, string>;
437
+ }
438
+ /**
439
+ * Renders `s` as an escaped provider URI that `parseURI` reads back as
440
+ * the same parts. It holds the key when `apiKey` is set: never log it
441
+ * (see `redactURI`). Throws an {@link LLMError} for an empty or invalid
442
+ * scheme and for an empty, `base_url` or `api_key` param name; the
443
+ * error never carries the key.
444
+ */
445
+ declare function specURI(s: Spec): string;
446
+ /**
447
+ * {@link loadConfig} for a {@link Spec}. A Spec with no scheme is not
448
+ * the default provider: it is an error.
449
+ */
450
+ declare function loadConfigSpec(s: Spec, opts?: LoadOptions): ResolvedConfig;
451
+
376
452
  /**
377
453
  * Provider key resolution and the gate that keeps a key kit resolved
378
454
  * itself off an endpoint only the URI names. Mirrors Go `llm`
@@ -391,7 +467,8 @@ declare function parseURI(raw: string): URI;
391
467
  * names none. A required key found nowhere throws a
392
468
  * {@link MissingKeyError}. Go `ApplyAPIKey` without a secret store.
393
469
  *
394
- * The result holds the key: never log it. Errors never carry it.
470
+ * The key is added escaped, as {@link parseURI} decodes it. The result
471
+ * holds the key: never log it. Errors never carry it.
395
472
  */
396
473
  declare function applyAPIKey(uri: string): string;
397
474
 
@@ -925,6 +1002,11 @@ declare function register(scheme: string, factory: Factory, decl?: Declaration):
925
1002
  * ambient (see {@link LoadOptions}).
926
1003
  */
927
1004
  declare function resolve(uriStr: string, opts?: LoadOptions): Provider;
1005
+ /**
1006
+ * {@link resolve} for a {@link Spec}: the Spec's parts are escaped
1007
+ * into the URI, so no part can add a param of its own.
1008
+ */
1009
+ declare function resolveSpec(s: Spec, opts?: LoadOptions): Provider;
928
1010
  /** Clear the registry (for tests). */
929
1011
  declare function clearRegistry(): void;
930
1012
  interface ClientOptions extends LoadOptions {
@@ -1010,6 +1092,7 @@ type llm_Response = Response;
1010
1092
  type llm_ResponseReceivedPayload = ResponseReceivedPayload;
1011
1093
  type llm_ResponseTooLargeError = ResponseTooLargeError;
1012
1094
  declare const llm_ResponseTooLargeError: typeof ResponseTooLargeError;
1095
+ type llm_Spec = Spec;
1013
1096
  type llm_StreamOutcome = StreamOutcome;
1014
1097
  type llm_StreamTruncatedError = StreamTruncatedError;
1015
1098
  declare const llm_StreamTruncatedError: typeof StreamTruncatedError;
@@ -1052,18 +1135,21 @@ declare const llm_isFallbackable: typeof isFallbackable;
1052
1135
  declare const llm_isPublicAddress: typeof isPublicAddress;
1053
1136
  declare const llm_isValidToolName: typeof isValidToolName;
1054
1137
  declare const llm_loadConfig: typeof loadConfig;
1138
+ declare const llm_loadConfigSpec: typeof loadConfigSpec;
1055
1139
  declare const llm_parseURI: typeof parseURI;
1056
1140
  declare const llm_redactURI: typeof redactURI;
1057
1141
  declare const llm_register: typeof register;
1058
1142
  declare const llm_requestStartedPayload: typeof requestStartedPayload;
1059
1143
  declare const llm_resolve: typeof resolve;
1144
+ declare const llm_resolveSpec: typeof resolveSpec;
1060
1145
  declare const llm_responseReceivedPayload: typeof responseReceivedPayload;
1061
1146
  declare const llm_sanitizeToolName: typeof sanitizeToolName;
1147
+ declare const llm_specURI: typeof specURI;
1062
1148
  declare const llm_toolNameModeOf: typeof toolNameModeOf;
1063
1149
  declare const llm_urlSource: typeof urlSource;
1064
1150
  declare const llm_usageCost: typeof usageCost;
1065
1151
  declare namespace llm {
1066
- export { llm_ANTHROPIC_TOOL_NAMES as ANTHROPIC_TOOL_NAMES, llm_APIError as APIError, llm_AuthError as AuthError, type llm_CacheControl as CacheControl, type llm_CallOp as CallOp, llm_CapabilityNotSupportedError as CapabilityNotSupportedError, type llm_Client as Client, type llm_ClientOptions as ClientOptions, type llm_Completer as Completer, type llm_ContentPart as ContentPart, llm_DEFAULT_MAX_MEDIA_BYTES as DEFAULT_MAX_MEDIA_BYTES, type llm_Declaration as Declaration, type llm_Factory as Factory, llm_FallbackExhaustedError as FallbackExhaustedError, llm_GEMINI_TOOL_NAMES as GEMINI_TOOL_NAMES, llm_HTTPStatusError as HTTPStatusError, llm_KeyEndpointError as KeyEndpointError, llm_LLMError as LLMError, type llm_LoadOptions as LoadOptions, type llm_MediaSource as MediaSource, llm_MediaTooLargeError as MediaTooLargeError, llm_MediaURLRefusedError as MediaURLRefusedError, type llm_Message as Message, llm_MissingKeyError as MissingKeyError, llm_ModelError as ModelError, llm_OPENAI_TOOL_NAMES as OPENAI_TOOL_NAMES, type llm_PartType as PartType, llm_PermissionDeniedError as PermissionDeniedError, type llm_Price as Price, type llm_Provider as Provider, type llm_ProviderConfig as ProviderConfig, type llm_ProviderKey as ProviderKey, llm_ProviderNotFoundError as ProviderNotFoundError, llm_RateLimitError as RateLimitError, type llm_Request as Request, type llm_RequestStartedPayload as RequestStartedPayload, type llm_ResolvedConfig as ResolvedConfig, type llm_Response as Response, type llm_ResponseReceivedPayload as ResponseReceivedPayload, llm_ResponseTooLargeError as ResponseTooLargeError, type llm_StreamOutcome as StreamOutcome, llm_StreamTruncatedError as StreamTruncatedError, type llm_Streamer as Streamer, llm_TOOL_NAMES_PARAM as TOOL_NAMES_PARAM, type llm_ThinkingBlock as ThinkingBlock, type llm_ThinkingConfig as ThinkingConfig, type llm_Token as Token, type llm_ToolCall as ToolCall, type llm_ToolCallEvent as ToolCallEvent, type llm_ToolCallEventKind as ToolCallEventKind, type llm_ToolCaller as ToolCaller, type llm_ToolChoice as ToolChoice, type llm_ToolChoiceMode as ToolChoiceMode, type llm_ToolDef as ToolDef, llm_ToolNameError as ToolNameError, type llm_ToolNameMode as ToolNameMode, type llm_ToolNameReason as ToolNameReason, type llm_ToolNameRule as ToolNameRule, llm_ToolNames as ToolNames, type llm_ToolResponse as ToolResponse, type llm_ToolStream as ToolStream, type llm_ToolStreamer as ToolStreamer, type llm_URI as URI, type llm_URLSourceOptions as URLSourceOptions, type llm_Usage as Usage, llm_applyAPIKey as applyAPIKey, llm_checkKeyEndpoint as checkKeyEndpoint, llm_checkToolChoice as checkToolChoice, llm_checkToolLinkage as checkToolLinkage, llm_clearRegistry as clearRegistry, llm_createLLM as createLLM, llm_credentialsTrusted as credentialsTrusted, llm_declarationOf as declarationOf, llm_fileSource as fileSource, llm_inlineSource as inlineSource, llm_isFallbackable as isFallbackable, llm_isPublicAddress as isPublicAddress, llm_isValidToolName as isValidToolName, llm_loadConfig as loadConfig, llm_parseURI as parseURI, llm_redactURI as redactURI, llm_register as register, llm_requestStartedPayload as requestStartedPayload, llm_resolve as resolve, llm_responseReceivedPayload as responseReceivedPayload, llm_sanitizeToolName as sanitizeToolName, llm_toolNameModeOf as toolNameModeOf, llm_urlSource as urlSource, llm_usageCost as usageCost };
1152
+ export { llm_ANTHROPIC_TOOL_NAMES as ANTHROPIC_TOOL_NAMES, llm_APIError as APIError, llm_AuthError as AuthError, type llm_CacheControl as CacheControl, type llm_CallOp as CallOp, llm_CapabilityNotSupportedError as CapabilityNotSupportedError, type llm_Client as Client, type llm_ClientOptions as ClientOptions, type llm_Completer as Completer, type llm_ContentPart as ContentPart, llm_DEFAULT_MAX_MEDIA_BYTES as DEFAULT_MAX_MEDIA_BYTES, type llm_Declaration as Declaration, type llm_Factory as Factory, llm_FallbackExhaustedError as FallbackExhaustedError, llm_GEMINI_TOOL_NAMES as GEMINI_TOOL_NAMES, llm_HTTPStatusError as HTTPStatusError, llm_KeyEndpointError as KeyEndpointError, llm_LLMError as LLMError, type llm_LoadOptions as LoadOptions, type llm_MediaSource as MediaSource, llm_MediaTooLargeError as MediaTooLargeError, llm_MediaURLRefusedError as MediaURLRefusedError, type llm_Message as Message, llm_MissingKeyError as MissingKeyError, llm_ModelError as ModelError, llm_OPENAI_TOOL_NAMES as OPENAI_TOOL_NAMES, type llm_PartType as PartType, llm_PermissionDeniedError as PermissionDeniedError, type llm_Price as Price, type llm_Provider as Provider, type llm_ProviderConfig as ProviderConfig, type llm_ProviderKey as ProviderKey, llm_ProviderNotFoundError as ProviderNotFoundError, llm_RateLimitError as RateLimitError, type llm_Request as Request, type llm_RequestStartedPayload as RequestStartedPayload, type llm_ResolvedConfig as ResolvedConfig, type llm_Response as Response, type llm_ResponseReceivedPayload as ResponseReceivedPayload, llm_ResponseTooLargeError as ResponseTooLargeError, type llm_Spec as Spec, type llm_StreamOutcome as StreamOutcome, llm_StreamTruncatedError as StreamTruncatedError, type llm_Streamer as Streamer, llm_TOOL_NAMES_PARAM as TOOL_NAMES_PARAM, type llm_ThinkingBlock as ThinkingBlock, type llm_ThinkingConfig as ThinkingConfig, type llm_Token as Token, type llm_ToolCall as ToolCall, type llm_ToolCallEvent as ToolCallEvent, type llm_ToolCallEventKind as ToolCallEventKind, type llm_ToolCaller as ToolCaller, type llm_ToolChoice as ToolChoice, type llm_ToolChoiceMode as ToolChoiceMode, type llm_ToolDef as ToolDef, llm_ToolNameError as ToolNameError, type llm_ToolNameMode as ToolNameMode, type llm_ToolNameReason as ToolNameReason, type llm_ToolNameRule as ToolNameRule, llm_ToolNames as ToolNames, type llm_ToolResponse as ToolResponse, type llm_ToolStream as ToolStream, type llm_ToolStreamer as ToolStreamer, type llm_URI as URI, type llm_URLSourceOptions as URLSourceOptions, type llm_Usage as Usage, llm_applyAPIKey as applyAPIKey, llm_checkKeyEndpoint as checkKeyEndpoint, llm_checkToolChoice as checkToolChoice, llm_checkToolLinkage as checkToolLinkage, llm_clearRegistry as clearRegistry, llm_createLLM as createLLM, llm_credentialsTrusted as credentialsTrusted, llm_declarationOf as declarationOf, llm_fileSource as fileSource, llm_inlineSource as inlineSource, llm_isFallbackable as isFallbackable, llm_isPublicAddress as isPublicAddress, llm_isValidToolName as isValidToolName, llm_loadConfig as loadConfig, llm_loadConfigSpec as loadConfigSpec, llm_parseURI as parseURI, llm_redactURI as redactURI, llm_register as register, llm_requestStartedPayload as requestStartedPayload, llm_resolve as resolve, llm_resolveSpec as resolveSpec, llm_responseReceivedPayload as responseReceivedPayload, llm_sanitizeToolName as sanitizeToolName, llm_specURI as specURI, llm_toolNameModeOf as toolNameModeOf, llm_urlSource as urlSource, llm_usageCost as usageCost };
1067
1153
  }
1068
1154
 
1069
- export { type ToolCall as $, ANTHROPIC_TOOL_NAMES as A, type ProviderConfig as B, type Completer as C, DEFAULT_MAX_MEDIA_BYTES as D, type ProviderKey as E, type Factory as F, GEMINI_TOOL_NAMES as G, HTTPStatusError as H, ProviderNotFoundError as I, RateLimitError as J, KeyEndpointError as K, LLMError as L, type MediaSource as M, type RequestStartedPayload as N, OPENAI_TOOL_NAMES as O, type PartType as P, type ResponseReceivedPayload as Q, type ResolvedConfig as R, type Streamer as S, type ToolCaller as T, ResponseTooLargeError as U, type StreamOutcome as V, StreamTruncatedError as W, TOOL_NAMES_PARAM as X, type ThinkingBlock as Y, type ThinkingConfig as Z, type Token as _, type ToolStreamer as a, type ToolCallEvent as a0, type ToolCallEventKind as a1, type ToolChoice as a2, type ToolChoiceMode as a3, ToolNameError as a4, type ToolNameMode as a5, type ToolNameReason as a6, type ToolNameRule as a7, ToolNames as a8, type URI as a9, type URLSourceOptions as aa, type Usage as ab, applyAPIKey as ac, checkKeyEndpoint as ad, checkToolChoice as ae, checkToolLinkage as af, clearRegistry as ag, createLLM as ah, credentialsTrusted as ai, declarationOf as aj, fileSource as ak, inlineSource as al, isFallbackable as am, isPublicAddress as an, isValidToolName as ao, loadConfig as ap, parseURI as aq, redactURI as ar, register as as, requestStartedPayload as at, resolve as au, responseReceivedPayload as av, sanitizeToolName as aw, toolNameModeOf as ax, urlSource as ay, usageCost as az, type Request as b, type Response as c, type ToolDef as d, type ToolResponse as e, type ToolStream as f, APIError as g, AuthError as h, type CacheControl as i, type CallOp as j, CapabilityNotSupportedError as k, llm as l, type Client as m, type ClientOptions as n, type ContentPart as o, type Declaration as p, FallbackExhaustedError as q, type LoadOptions as r, MediaTooLargeError as s, MediaURLRefusedError as t, type Message as u, MissingKeyError as v, ModelError as w, PermissionDeniedError as x, type Price as y, type Provider as z };
1155
+ export { type Token as $, ANTHROPIC_TOOL_NAMES as A, type ProviderConfig as B, type Completer as C, DEFAULT_MAX_MEDIA_BYTES as D, type ProviderKey as E, type Factory as F, GEMINI_TOOL_NAMES as G, HTTPStatusError as H, ProviderNotFoundError as I, RateLimitError as J, KeyEndpointError as K, LLMError as L, type MediaSource as M, type RequestStartedPayload as N, OPENAI_TOOL_NAMES as O, type PartType as P, type ResponseReceivedPayload as Q, type ResolvedConfig as R, type Streamer as S, type ToolCaller as T, ResponseTooLargeError as U, type Spec as V, type StreamOutcome as W, StreamTruncatedError as X, TOOL_NAMES_PARAM as Y, type ThinkingBlock as Z, type ThinkingConfig as _, type ToolStreamer as a, type ToolCall as a0, type ToolCallEvent as a1, type ToolCallEventKind as a2, type ToolChoice as a3, type ToolChoiceMode as a4, ToolNameError as a5, type ToolNameMode as a6, type ToolNameReason as a7, type ToolNameRule as a8, ToolNames as a9, specURI as aA, toolNameModeOf as aB, urlSource as aC, usageCost as aD, type URI as aa, type URLSourceOptions as ab, type Usage as ac, applyAPIKey as ad, checkKeyEndpoint as ae, checkToolChoice as af, checkToolLinkage as ag, clearRegistry as ah, createLLM as ai, credentialsTrusted as aj, declarationOf as ak, fileSource as al, inlineSource as am, isFallbackable as an, isPublicAddress as ao, isValidToolName as ap, loadConfig as aq, loadConfigSpec as ar, parseURI as as, redactURI as at, register as au, requestStartedPayload as av, resolve as aw, resolveSpec as ax, responseReceivedPayload as ay, sanitizeToolName as az, type Request as b, type Response as c, type ToolDef as d, type ToolResponse as e, type ToolStream as f, APIError as g, AuthError as h, type CacheControl as i, type CallOp as j, CapabilityNotSupportedError as k, llm as l, type Client as m, type ClientOptions as n, type ContentPart as o, type Declaration as p, FallbackExhaustedError as q, type LoadOptions as r, MediaTooLargeError as s, MediaURLRefusedError as t, type Message as u, MissingKeyError as v, ModelError as w, PermissionDeniedError as x, type Price as y, type Provider as z };
@@ -1,4 +1,4 @@
1
- import { C as Completer, S as Streamer, T as ToolCaller, a as ToolStreamer, R as ResolvedConfig, b as Request, c as Response, d as ToolDef, e as ToolResponse, f as ToolStream } from './llm-DYuR7_uX.js';
1
+ import { C as Completer, S as Streamer, T as ToolCaller, a as ToolStreamer, R as ResolvedConfig, b as Request, c as Response, d as ToolDef, e as ToolResponse, f as ToolStream } from './llm-BazFKc_2.js';
2
2
 
3
3
  /**
4
4
  * @packageDocumentation
@@ -1,2 +1,2 @@
1
- import './llm-DYuR7_uX.js';
2
- export { A as ANTHROPIC_DEFAULT_BASE_URL, a as AnthropicAdapter } from './llm-anthropic-Cd_I2xXB.js';
1
+ import './llm-BazFKc_2.js';
2
+ export { A as ANTHROPIC_DEFAULT_BASE_URL, a as AnthropicAdapter } from './llm-anthropic-BcAitoDV.js';
@@ -1,13 +1,13 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunk4FMALWYBjs = require('./chunk-4FMALWYB.js');
5
- require('./chunk-BXJ2J27B.js');
6
- require('./chunk-K7E34Q3A.js');
4
+ var _chunkMEF7W3MGjs = require('./chunk-MEF7W3MG.js');
5
+ require('./chunk-IGKBRNEW.js');
6
+ require('./chunk-TUU2BY5I.js');
7
7
  require('./chunk-KVG7YCTS.js');
8
8
  require('./chunk-4UE5TCMQ.js');
9
9
  require('./chunk-R5U7XKVJ.js');
10
10
 
11
11
 
12
12
 
13
- exports.ANTHROPIC_DEFAULT_BASE_URL = _chunk4FMALWYBjs.ANTHROPIC_DEFAULT_BASE_URL; exports.AnthropicAdapter = _chunk4FMALWYBjs.AnthropicAdapter;
13
+ exports.ANTHROPIC_DEFAULT_BASE_URL = _chunkMEF7W3MGjs.ANTHROPIC_DEFAULT_BASE_URL; exports.AnthropicAdapter = _chunkMEF7W3MGjs.AnthropicAdapter;
@@ -1,4 +1,4 @@
1
- import { C as Completer, S as Streamer, T as ToolCaller, a as ToolStreamer, R as ResolvedConfig, b as Request, c as Response, d as ToolDef, e as ToolResponse, f as ToolStream } from './llm-DYuR7_uX.js';
1
+ import { C as Completer, S as Streamer, T as ToolCaller, a as ToolStreamer, R as ResolvedConfig, b as Request, c as Response, d as ToolDef, e as ToolResponse, f as ToolStream } from './llm-BazFKc_2.js';
2
2
 
3
3
  /**
4
4
  * @packageDocumentation
@@ -1,2 +1,2 @@
1
- import './llm-DYuR7_uX.js';
2
- export { O as OPENAI_BASE_URLS, a as OPENAI_DEFAULT_BASE_URL, b as OPENAI_SCHEMES, c as OpenAIAdapter, d as OpenAIAdapterOptions, e as apiRootV1 } from './llm-openai-DyFrucmV.js';
1
+ import './llm-BazFKc_2.js';
2
+ export { O as OPENAI_BASE_URLS, a as OPENAI_DEFAULT_BASE_URL, b as OPENAI_SCHEMES, c as OpenAIAdapter, d as OpenAIAdapterOptions, e as apiRootV1 } from './llm-openai-CSDvuRH6.js';
@@ -4,9 +4,9 @@
4
4
 
5
5
 
6
6
 
7
- var _chunkVWGP4NVJjs = require('./chunk-VWGP4NVJ.js');
8
- require('./chunk-BXJ2J27B.js');
9
- require('./chunk-K7E34Q3A.js');
7
+ var _chunkMDVGMOZOjs = require('./chunk-MDVGMOZO.js');
8
+ require('./chunk-IGKBRNEW.js');
9
+ require('./chunk-TUU2BY5I.js');
10
10
  require('./chunk-KVG7YCTS.js');
11
11
  require('./chunk-4UE5TCMQ.js');
12
12
  require('./chunk-R5U7XKVJ.js');
@@ -16,4 +16,4 @@ require('./chunk-R5U7XKVJ.js');
16
16
 
17
17
 
18
18
 
19
- exports.OPENAI_BASE_URLS = _chunkVWGP4NVJjs.OPENAI_BASE_URLS; exports.OPENAI_DEFAULT_BASE_URL = _chunkVWGP4NVJjs.OPENAI_DEFAULT_BASE_URL; exports.OPENAI_SCHEMES = _chunkVWGP4NVJjs.OPENAI_SCHEMES; exports.OpenAIAdapter = _chunkVWGP4NVJjs.OpenAIAdapter; exports.apiRootV1 = _chunkVWGP4NVJjs.apiRootV1;
19
+ exports.OPENAI_BASE_URLS = _chunkMDVGMOZOjs.OPENAI_BASE_URLS; exports.OPENAI_DEFAULT_BASE_URL = _chunkMDVGMOZOjs.OPENAI_DEFAULT_BASE_URL; exports.OPENAI_SCHEMES = _chunkMDVGMOZOjs.OPENAI_SCHEMES; exports.OpenAIAdapter = _chunkMDVGMOZOjs.OpenAIAdapter; exports.apiRootV1 = _chunkMDVGMOZOjs.apiRootV1;
package/dist/llm.d.ts CHANGED
@@ -1 +1 @@
1
- export { A as ANTHROPIC_TOOL_NAMES, g as APIError, h as AuthError, i as CacheControl, j as CallOp, k as CapabilityNotSupportedError, m as Client, n as ClientOptions, C as Completer, o as ContentPart, D as DEFAULT_MAX_MEDIA_BYTES, p as Declaration, F as Factory, q as FallbackExhaustedError, G as GEMINI_TOOL_NAMES, H as HTTPStatusError, K as KeyEndpointError, L as LLMError, r as LoadOptions, M as MediaSource, s as MediaTooLargeError, t as MediaURLRefusedError, u as Message, v as MissingKeyError, w as ModelError, O as OPENAI_TOOL_NAMES, P as PartType, x as PermissionDeniedError, y as Price, z as Provider, B as ProviderConfig, E as ProviderKey, I as ProviderNotFoundError, J as RateLimitError, b as Request, N as RequestStartedPayload, R as ResolvedConfig, c as Response, Q as ResponseReceivedPayload, U as ResponseTooLargeError, V as StreamOutcome, W as StreamTruncatedError, S as Streamer, X as TOOL_NAMES_PARAM, Y as ThinkingBlock, Z as ThinkingConfig, _ as Token, $ as ToolCall, a0 as ToolCallEvent, a1 as ToolCallEventKind, T as ToolCaller, a2 as ToolChoice, a3 as ToolChoiceMode, d as ToolDef, a4 as ToolNameError, a5 as ToolNameMode, a6 as ToolNameReason, a7 as ToolNameRule, a8 as ToolNames, e as ToolResponse, f as ToolStream, a as ToolStreamer, a9 as URI, aa as URLSourceOptions, ab as Usage, ac as applyAPIKey, ad as checkKeyEndpoint, ae as checkToolChoice, af as checkToolLinkage, ag as clearRegistry, ah as createLLM, ai as credentialsTrusted, aj as declarationOf, ak as fileSource, al as inlineSource, am as isFallbackable, an as isPublicAddress, ao as isValidToolName, ap as loadConfig, aq as parseURI, ar as redactURI, as as register, at as requestStartedPayload, au as resolve, av as responseReceivedPayload, aw as sanitizeToolName, ax as toolNameModeOf, ay as urlSource, az as usageCost } from './llm-DYuR7_uX.js';
1
+ export { A as ANTHROPIC_TOOL_NAMES, g as APIError, h as AuthError, i as CacheControl, j as CallOp, k as CapabilityNotSupportedError, m as Client, n as ClientOptions, C as Completer, o as ContentPart, D as DEFAULT_MAX_MEDIA_BYTES, p as Declaration, F as Factory, q as FallbackExhaustedError, G as GEMINI_TOOL_NAMES, H as HTTPStatusError, K as KeyEndpointError, L as LLMError, r as LoadOptions, M as MediaSource, s as MediaTooLargeError, t as MediaURLRefusedError, u as Message, v as MissingKeyError, w as ModelError, O as OPENAI_TOOL_NAMES, P as PartType, x as PermissionDeniedError, y as Price, z as Provider, B as ProviderConfig, E as ProviderKey, I as ProviderNotFoundError, J as RateLimitError, b as Request, N as RequestStartedPayload, R as ResolvedConfig, c as Response, Q as ResponseReceivedPayload, U as ResponseTooLargeError, V as Spec, W as StreamOutcome, X as StreamTruncatedError, S as Streamer, Y as TOOL_NAMES_PARAM, Z as ThinkingBlock, _ as ThinkingConfig, $ as Token, a0 as ToolCall, a1 as ToolCallEvent, a2 as ToolCallEventKind, T as ToolCaller, a3 as ToolChoice, a4 as ToolChoiceMode, d as ToolDef, a5 as ToolNameError, a6 as ToolNameMode, a7 as ToolNameReason, a8 as ToolNameRule, a9 as ToolNames, e as ToolResponse, f as ToolStream, a as ToolStreamer, aa as URI, ab as URLSourceOptions, ac as Usage, ad as applyAPIKey, ae as checkKeyEndpoint, af as checkToolChoice, ag as checkToolLinkage, ah as clearRegistry, ai as createLLM, aj as credentialsTrusted, ak as declarationOf, al as fileSource, am as inlineSource, an as isFallbackable, ao as isPublicAddress, ap as isValidToolName, aq as loadConfig, ar as loadConfigSpec, as as parseURI, at as redactURI, au as register, av as requestStartedPayload, aw as resolve, ax as resolveSpec, ay as responseReceivedPayload, az as sanitizeToolName, aA as specURI, aB as toolNameModeOf, aC as urlSource, aD as usageCost } from './llm-BazFKc_2.js';
package/dist/llm.js CHANGED
@@ -46,7 +46,10 @@
46
46
 
47
47
 
48
48
 
49
- var _chunkK7E34Q3Ajs = require('./chunk-K7E34Q3A.js');
49
+
50
+
51
+
52
+ var _chunkTUU2BY5Ijs = require('./chunk-TUU2BY5I.js');
50
53
  require('./chunk-KVG7YCTS.js');
51
54
  require('./chunk-4UE5TCMQ.js');
52
55
  require('./chunk-R5U7XKVJ.js');
@@ -98,4 +101,7 @@ require('./chunk-R5U7XKVJ.js');
98
101
 
99
102
 
100
103
 
101
- exports.ANTHROPIC_TOOL_NAMES = _chunkK7E34Q3Ajs.ANTHROPIC_TOOL_NAMES; exports.APIError = _chunkK7E34Q3Ajs.APIError; exports.AuthError = _chunkK7E34Q3Ajs.AuthError; exports.CapabilityNotSupportedError = _chunkK7E34Q3Ajs.CapabilityNotSupportedError; exports.DEFAULT_MAX_MEDIA_BYTES = _chunkK7E34Q3Ajs.DEFAULT_MAX_MEDIA_BYTES; exports.FallbackExhaustedError = _chunkK7E34Q3Ajs.FallbackExhaustedError; exports.GEMINI_TOOL_NAMES = _chunkK7E34Q3Ajs.GEMINI_TOOL_NAMES; exports.HTTPStatusError = _chunkK7E34Q3Ajs.HTTPStatusError; exports.KeyEndpointError = _chunkK7E34Q3Ajs.KeyEndpointError; exports.LLMError = _chunkK7E34Q3Ajs.LLMError; exports.MediaTooLargeError = _chunkK7E34Q3Ajs.MediaTooLargeError; exports.MediaURLRefusedError = _chunkK7E34Q3Ajs.MediaURLRefusedError; exports.MissingKeyError = _chunkK7E34Q3Ajs.MissingKeyError; exports.ModelError = _chunkK7E34Q3Ajs.ModelError; exports.OPENAI_TOOL_NAMES = _chunkK7E34Q3Ajs.OPENAI_TOOL_NAMES; exports.PermissionDeniedError = _chunkK7E34Q3Ajs.PermissionDeniedError; exports.ProviderNotFoundError = _chunkK7E34Q3Ajs.ProviderNotFoundError; exports.RateLimitError = _chunkK7E34Q3Ajs.RateLimitError; exports.ResponseTooLargeError = _chunkK7E34Q3Ajs.ResponseTooLargeError; exports.StreamTruncatedError = _chunkK7E34Q3Ajs.StreamTruncatedError; exports.TOOL_NAMES_PARAM = _chunkK7E34Q3Ajs.TOOL_NAMES_PARAM; exports.ToolNameError = _chunkK7E34Q3Ajs.ToolNameError; exports.ToolNames = _chunkK7E34Q3Ajs.ToolNames; exports.applyAPIKey = _chunkK7E34Q3Ajs.applyAPIKey; exports.checkKeyEndpoint = _chunkK7E34Q3Ajs.checkKeyEndpoint; exports.checkToolChoice = _chunkK7E34Q3Ajs.checkToolChoice; exports.checkToolLinkage = _chunkK7E34Q3Ajs.checkToolLinkage; exports.clearRegistry = _chunkK7E34Q3Ajs.clearRegistry; exports.createLLM = _chunkK7E34Q3Ajs.createLLM; exports.credentialsTrusted = _chunkK7E34Q3Ajs.credentialsTrusted; exports.declarationOf = _chunkK7E34Q3Ajs.declarationOf; exports.fileSource = _chunkK7E34Q3Ajs.fileSource; exports.inlineSource = _chunkK7E34Q3Ajs.inlineSource; exports.isFallbackable = _chunkK7E34Q3Ajs.isFallbackable; exports.isPublicAddress = _chunkK7E34Q3Ajs.isPublicAddress; exports.isValidToolName = _chunkK7E34Q3Ajs.isValidToolName; exports.loadConfig = _chunkK7E34Q3Ajs.loadConfig; exports.parseURI = _chunkK7E34Q3Ajs.parseURI; exports.redactURI = _chunkK7E34Q3Ajs.redactURI; exports.register = _chunkK7E34Q3Ajs.register; exports.requestStartedPayload = _chunkK7E34Q3Ajs.requestStartedPayload; exports.resolve = _chunkK7E34Q3Ajs.resolve; exports.responseReceivedPayload = _chunkK7E34Q3Ajs.responseReceivedPayload; exports.sanitizeToolName = _chunkK7E34Q3Ajs.sanitizeToolName; exports.toolNameModeOf = _chunkK7E34Q3Ajs.toolNameModeOf; exports.urlSource = _chunkK7E34Q3Ajs.urlSource; exports.usageCost = _chunkK7E34Q3Ajs.usageCost;
104
+
105
+
106
+
107
+ exports.ANTHROPIC_TOOL_NAMES = _chunkTUU2BY5Ijs.ANTHROPIC_TOOL_NAMES; exports.APIError = _chunkTUU2BY5Ijs.APIError; exports.AuthError = _chunkTUU2BY5Ijs.AuthError; exports.CapabilityNotSupportedError = _chunkTUU2BY5Ijs.CapabilityNotSupportedError; exports.DEFAULT_MAX_MEDIA_BYTES = _chunkTUU2BY5Ijs.DEFAULT_MAX_MEDIA_BYTES; exports.FallbackExhaustedError = _chunkTUU2BY5Ijs.FallbackExhaustedError; exports.GEMINI_TOOL_NAMES = _chunkTUU2BY5Ijs.GEMINI_TOOL_NAMES; exports.HTTPStatusError = _chunkTUU2BY5Ijs.HTTPStatusError; exports.KeyEndpointError = _chunkTUU2BY5Ijs.KeyEndpointError; exports.LLMError = _chunkTUU2BY5Ijs.LLMError; exports.MediaTooLargeError = _chunkTUU2BY5Ijs.MediaTooLargeError; exports.MediaURLRefusedError = _chunkTUU2BY5Ijs.MediaURLRefusedError; exports.MissingKeyError = _chunkTUU2BY5Ijs.MissingKeyError; exports.ModelError = _chunkTUU2BY5Ijs.ModelError; exports.OPENAI_TOOL_NAMES = _chunkTUU2BY5Ijs.OPENAI_TOOL_NAMES; exports.PermissionDeniedError = _chunkTUU2BY5Ijs.PermissionDeniedError; exports.ProviderNotFoundError = _chunkTUU2BY5Ijs.ProviderNotFoundError; exports.RateLimitError = _chunkTUU2BY5Ijs.RateLimitError; exports.ResponseTooLargeError = _chunkTUU2BY5Ijs.ResponseTooLargeError; exports.StreamTruncatedError = _chunkTUU2BY5Ijs.StreamTruncatedError; exports.TOOL_NAMES_PARAM = _chunkTUU2BY5Ijs.TOOL_NAMES_PARAM; exports.ToolNameError = _chunkTUU2BY5Ijs.ToolNameError; exports.ToolNames = _chunkTUU2BY5Ijs.ToolNames; exports.applyAPIKey = _chunkTUU2BY5Ijs.applyAPIKey; exports.checkKeyEndpoint = _chunkTUU2BY5Ijs.checkKeyEndpoint; exports.checkToolChoice = _chunkTUU2BY5Ijs.checkToolChoice; exports.checkToolLinkage = _chunkTUU2BY5Ijs.checkToolLinkage; exports.clearRegistry = _chunkTUU2BY5Ijs.clearRegistry; exports.createLLM = _chunkTUU2BY5Ijs.createLLM; exports.credentialsTrusted = _chunkTUU2BY5Ijs.credentialsTrusted; exports.declarationOf = _chunkTUU2BY5Ijs.declarationOf; exports.fileSource = _chunkTUU2BY5Ijs.fileSource; exports.inlineSource = _chunkTUU2BY5Ijs.inlineSource; exports.isFallbackable = _chunkTUU2BY5Ijs.isFallbackable; exports.isPublicAddress = _chunkTUU2BY5Ijs.isPublicAddress; exports.isValidToolName = _chunkTUU2BY5Ijs.isValidToolName; exports.loadConfig = _chunkTUU2BY5Ijs.loadConfig; exports.loadConfigSpec = _chunkTUU2BY5Ijs.loadConfigSpec; exports.parseURI = _chunkTUU2BY5Ijs.parseURI; exports.redactURI = _chunkTUU2BY5Ijs.redactURI; exports.register = _chunkTUU2BY5Ijs.register; exports.requestStartedPayload = _chunkTUU2BY5Ijs.requestStartedPayload; exports.resolve = _chunkTUU2BY5Ijs.resolve; exports.resolveSpec = _chunkTUU2BY5Ijs.resolveSpec; exports.responseReceivedPayload = _chunkTUU2BY5Ijs.responseReceivedPayload; exports.sanitizeToolName = _chunkTUU2BY5Ijs.sanitizeToolName; exports.specURI = _chunkTUU2BY5Ijs.specURI; exports.toolNameModeOf = _chunkTUU2BY5Ijs.toolNameModeOf; exports.urlSource = _chunkTUU2BY5Ijs.urlSource; exports.usageCost = _chunkTUU2BY5Ijs.usageCost;
@@ -1,4 +1,4 @@
1
- import { C as Completer, S as Streamer, T as ToolCaller, a as ToolStreamer, R as ResolvedConfig, b as Request, c as Response, f as ToolStream, d as ToolDef, e as ToolResponse } from './llm-DYuR7_uX.js';
1
+ import { C as Completer, S as Streamer, T as ToolCaller, a as ToolStreamer, R as ResolvedConfig, b as Request, c as Response, f as ToolStream, d as ToolDef, e as ToolResponse } from './llm-BazFKc_2.js';
2
2
 
3
3
  /**
4
4
  * @packageDocumentation
@@ -1,2 +1,2 @@
1
- import './llm-DYuR7_uX.js';
2
- export { E as EvaConfig, P as ParsedModel, R as RouteLLMAdapter, a as RouterConfig, p as parseModelField, b as parseRouterConfig } from './routellm-B0nv59mH.js';
1
+ import './llm-BazFKc_2.js';
2
+ export { E as EvaConfig, P as ParsedModel, R as RouteLLMAdapter, a as RouterConfig, p as parseModelField, b as parseRouterConfig } from './routellm-B9UrONPr.js';
package/dist/routellm.js CHANGED
@@ -2,10 +2,10 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkVGOA5Y7Sjs = require('./chunk-VGOA5Y7S.js');
6
- require('./chunk-VWGP4NVJ.js');
7
- require('./chunk-BXJ2J27B.js');
8
- require('./chunk-K7E34Q3A.js');
5
+ var _chunkQ547MHNBjs = require('./chunk-Q547MHNB.js');
6
+ require('./chunk-MDVGMOZO.js');
7
+ require('./chunk-IGKBRNEW.js');
8
+ require('./chunk-TUU2BY5I.js');
9
9
  require('./chunk-KVG7YCTS.js');
10
10
  require('./chunk-4UE5TCMQ.js');
11
11
  require('./chunk-R5U7XKVJ.js');
@@ -13,4 +13,4 @@ require('./chunk-R5U7XKVJ.js');
13
13
 
14
14
 
15
15
 
16
- exports.RouteLLMAdapter = _chunkVGOA5Y7Sjs.RouteLLMAdapter; exports.parseModelField = _chunkVGOA5Y7Sjs.parseModelField; exports.parseRouterConfig = _chunkVGOA5Y7Sjs.parseRouterConfig;
16
+ exports.RouteLLMAdapter = _chunkQ547MHNBjs.RouteLLMAdapter; exports.parseModelField = _chunkQ547MHNBjs.parseModelField; exports.parseRouterConfig = _chunkQ547MHNBjs.parseRouterConfig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hop-top/kit",
3
- "version": "0.5.0-alpha.13",
3
+ "version": "0.5.0-alpha.14",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/hop-top/poly-kit.git",
@@ -343,7 +343,7 @@
343
343
  },
344
344
  "dependencies": {
345
345
  "@bufbuild/protobuf": "^2.17.0",
346
- "@clack/prompts": "^1.8.1",
346
+ "@clack/prompts": "^1.9.0",
347
347
  "@connectrpc/connect": "^2.3.0",
348
348
  "@connectrpc/connect-web": "^2.3.0",
349
349
  "@hop-top/cite": "^0.1.2",
@@ -353,7 +353,7 @@
353
353
  "commander": "15.1.0",
354
354
  "csv-stringify": "^6.9.0",
355
355
  "eta": "^4.6.0",
356
- "hono": "^4.13.17",
356
+ "hono": "^4.13.18",
357
357
  "js-yaml": "^4.3.2",
358
358
  "picomatch": "^4.0.7",
359
359
  "pino": "^10.4.0",
@@ -374,8 +374,8 @@
374
374
  "tsup": "^8",
375
375
  "typeid-js": "^1.2.0",
376
376
  "typescript": "^5",
377
- "typescript-eslint": "^8.72.1",
378
- "vite": "^8.3.6",
377
+ "typescript-eslint": "^8.72.2",
378
+ "vite": "^8.3.8",
379
379
  "vitest": "^5.1.0"
380
380
  },
381
381
  "engines": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hop-top-kit-ts",
3
- "version": "0.5.0-alpha.13",
3
+ "version": "0.5.0-alpha.14",
4
4
  "description": "Build CLIs and services in TypeScript or JavaScript with the kit SDK `@hop-top/kit`, covering createCLI, output formats, layered config, MCP serving, safety guards, LLM adapters. Use when code imports `@hop-top/kit`, when adding kit to a Node project, or when a task needs a kit capability in TypeScript and you must check this port covers it. Not for choosing a language; the router skill does that.",
5
5
  "author": {
6
6
  "name": "hop-top",
@@ -3,7 +3,7 @@ name: hop-top-kit-ts
3
3
  description: Build CLIs and services in TypeScript or JavaScript with the kit SDK `@hop-top/kit`, covering createCLI, output formats, layered config, MCP serving, safety guards, LLM adapters. Use when code imports `@hop-top/kit`, when adding kit to a Node project, or when a task needs a kit capability in TypeScript and you must check this port covers it. Not for choosing a language; the router skill does that.
4
4
  license: MIT
5
5
  metadata:
6
- version: "0.5.0-alpha.13" # x-release-please-version
6
+ version: "0.5.0-alpha.14" # x-release-please-version
7
7
  min_version: "0.5.0-alpha.12"
8
8
  ---
9
9
 
@@ -88,7 +88,7 @@ port cannot scaffold, and the binary needs no Go toolchain when taken from a rel
88
88
  <!-- skills-sync:begin version -->
89
89
  ## Versions
90
90
 
91
- Written for 0.5.0-alpha.13 # x-release-please-version
91
+ Written for 0.5.0-alpha.14 # x-release-please-version
92
92
  Expects 0.5.0-alpha.12 or newer.
93
93
 
94
94
  Installed: `npm ls @hop-top/kit` or `pnpm ls @hop-top/kit`; `scripts/detect-port.sh` shows what the
@@ -10,7 +10,7 @@ This file is a snapshot taken at the `metadata.version` recorded in this skill's
10
10
  |---|---|---|---|---|---|---|
11
11
  | Go | [`hop-top-kit-go`](https://github.com/hop-top/kit/blob/main/skills/hop-top-kit-go/SKILL.md) | `hop.top/kit` | `go get hop.top/kit` | reference | Go 1.27 | 74 done |
12
12
  | TypeScript | [`hop-top-kit-ts`](https://github.com/hop-top/kit-ts/blob/main/skills/hop-top-kit-ts/SKILL.md) | `@hop-top/kit` | `pnpm add @hop-top/kit` | supported | Node 22.12+ | 11 done, 9 partial, 17 unverified, 36 none, 1 n/a |
13
- | Python | [`hop-top-kit-py`](https://github.com/hop-top/kit-py/blob/main/skills/hop-top-kit-py/SKILL.md) | `hop-top-kit` | `pip install hop-top-kit` | supported | Python 3.11+ | 9 done, 8 partial, 18 unverified, 38 none, 1 n/a |
13
+ | Python | [`hop-top-kit-py`](https://github.com/hop-top/kit-py/blob/main/skills/hop-top-kit-py/SKILL.md) | `hop-top-kit` | `pip install hop-top-kit` | supported | Python 3.11+ | 9 done, 9 partial, 19 unverified, 36 none, 1 n/a |
14
14
  | Rust | [`hop-top-kit-rs`](https://github.com/hop-top/kit-rs/blob/main/skills/hop-top-kit-rs/SKILL.md) | `hop-top-kit` | `cargo add hop-top-kit` | experimental | Rust 1.89+ | 13 done, 19 partial, 12 unverified, 29 none, 1 n/a |
15
15
  | PHP | [`hop-top-kit-php`](https://github.com/hop-top/kit-php/blob/main/skills/hop-top-kit-php/SKILL.md) | `hop-top/kit` | `composer require hop-top/kit` | experimental | PHP 8.4+ | 4 done, 7 partial, 5 unverified, 57 none, 1 n/a |
16
16
 
@@ -49,6 +49,8 @@ import {
49
49
  type Usage,
50
50
  } from "./llm";
51
51
  import { AnthropicAdapter } from "./llm-anthropic";
52
+ // Registers the openai-family schemes the key_endpoint vectors name.
53
+ import "./llm-openai";
52
54
  import {
53
55
  fakeServer,
54
56
  isolateEnv,
@@ -373,6 +375,11 @@ describe("llm-v1 conformance: key_endpoint", () => {
373
375
  it(v.name, () => {
374
376
  strictKeys(v, ["name", "op", "uri", "yaml", "env", "want_uri", "refused"], v.name);
375
377
  useLLMYaml(v.yaml);
378
+ // Whatever a vector sets is cleared first and restored after, so
379
+ // a variable outside the isolated list (api_key_env names) never
380
+ // leaks between vectors.
381
+ const restoreVec = isolateEnv(Object.keys(v.env));
382
+ cleanups.push(restoreVec);
376
383
  Object.assign(process.env, v.env);
377
384
  let got: string | undefined;
378
385
  let err: unknown;