omk-ai 1.5.5 → 1.5.6

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/CHANGELOG.md CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [1.5.6] - 2026-10-22
6
+
7
+
5
8
  ## [1.5.5] - 2026-10-21
6
9
 
7
10
 
package/dist/cli.js CHANGED
File without changes
package/dist/index.d.ts CHANGED
@@ -7,6 +7,7 @@ export * from "./images.ts";
7
7
  export * from "./images-api-registry.ts";
8
8
  export * from "./models.ts";
9
9
  export * from "./pi-compat.ts";
10
+ export * from "./prompt-cache-capability.ts";
10
11
  export type { BedrockOptions, BedrockThinkingDisplay } from "./providers/amazon-bedrock.ts";
11
12
  export type { AnthropicEffort, AnthropicOptions, AnthropicThinkingDisplay } from "./providers/anthropic.ts";
12
13
  export type { AzureOpenAIResponsesOptions } from "./providers/azure-openai-responses.ts";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,0BAA0B,CAAC;AACzC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,YAAY,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAC5F,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAC5G,YAAY,EAAE,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AACzF,YAAY,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EACN,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,kBAAkB,EAClB,oBAAoB,GACpB,MAAM,0BAA0B,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,YAAY,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACxE,YAAY,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACxE,cAAc,yCAAyC,CAAC;AACxD,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,YAAY,EACX,2BAA2B,EAC3B,8BAA8B,GAC9B,MAAM,uCAAuC,CAAC;AAC/C,YAAY,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAClF,YAAY,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAC1E,cAAc,kCAAkC,CAAC;AACjD,OAAO,EACN,6BAA6B,EAC7B,0BAA0B,EAC1B,wBAAwB,GACxB,MAAM,+BAA+B,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,YAAY,EACX,aAAa,EACb,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,WAAW,EACX,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,GACjB,MAAM,wBAAwB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC","sourcesContent":["export type { Static, TSchema } from \"typebox\";\nexport { Type } from \"typebox\";\n\nexport * from \"./api-registry.ts\";\nexport * from \"./env-api-keys.ts\";\nexport * from \"./image-models.ts\";\nexport * from \"./images.ts\";\nexport * from \"./images-api-registry.ts\";\nexport * from \"./models.ts\";\nexport * from \"./pi-compat.ts\";\nexport type { BedrockOptions, BedrockThinkingDisplay } from \"./providers/amazon-bedrock.ts\";\nexport type { AnthropicEffort, AnthropicOptions, AnthropicThinkingDisplay } from \"./providers/anthropic.ts\";\nexport type { AzureOpenAIResponsesOptions } from \"./providers/azure-openai-responses.ts\";\nexport type { DevinOptions } from \"./providers/devin.ts\";\nexport {\n\ttype DevinFetch,\n\ttype DevinUserStatus,\n\tgetDevinUserStatus,\n\tparseDevinUserStatus,\n} from \"./providers/devin-api.ts\";\nexport * from \"./providers/faux.ts\";\nexport type { GoogleOptions } from \"./providers/google.ts\";\nexport type { GoogleThinkingLevel } from \"./providers/google-shared.ts\";\nexport type { GoogleVertexOptions } from \"./providers/google-vertex.ts\";\nexport * from \"./providers/images/register-builtins.ts\";\nexport type { MistralOptions } from \"./providers/mistral.ts\";\nexport type {\n\tOpenAICodexResponsesOptions,\n\tOpenAICodexWebSocketDebugStats,\n} from \"./providers/openai-codex-responses.ts\";\nexport type { OpenAICompletionsOptions } from \"./providers/openai-completions.ts\";\nexport type { OpenAIResponsesOptions } from \"./providers/openai-responses.ts\";\nexport { deriveContextPromptCacheKey } from \"./providers/prompt-cache.ts\";\nexport * from \"./providers/register-builtins.ts\";\nexport {\n\taddsThinkingBudgetToMaxTokens,\n\tadjustMaxTokensForThinking,\n\tDEFAULT_THINKING_BUDGETS,\n} from \"./providers/simple-options.ts\";\nexport * from \"./session-resources.ts\";\nexport * from \"./stream.ts\";\nexport * from \"./types.ts\";\nexport * from \"./usage-share.ts\";\nexport * from \"./utils/claude-code-identity.ts\";\nexport * from \"./utils/diagnostics.ts\";\nexport * from \"./utils/event-stream.ts\";\nexport * from \"./utils/json-parse.ts\";\nexport type {\n\tOAuthAuthInfo,\n\tOAuthCredentials,\n\tOAuthDeviceCodeInfo,\n\tOAuthLoginCallbacks,\n\tOAuthPrompt,\n\tOAuthProvider,\n\tOAuthProviderId,\n\tOAuthProviderInfo,\n\tOAuthProviderInterface,\n\tOAuthSelectOption,\n\tOAuthSelectPrompt,\n} from \"./utils/oauth/types.ts\";\nexport * from \"./utils/overflow.ts\";\nexport * from \"./utils/retry.ts\";\nexport * from \"./utils/typebox-helpers.ts\";\nexport * from \"./utils/validation.ts\";\n"]}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,0BAA0B,CAAC;AACzC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,8BAA8B,CAAC;AAC7C,YAAY,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAC5F,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAC5G,YAAY,EAAE,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AACzF,YAAY,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EACN,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,kBAAkB,EAClB,oBAAoB,GACpB,MAAM,0BAA0B,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,YAAY,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACxE,YAAY,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACxE,cAAc,yCAAyC,CAAC;AACxD,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,YAAY,EACX,2BAA2B,EAC3B,8BAA8B,GAC9B,MAAM,uCAAuC,CAAC;AAC/C,YAAY,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAClF,YAAY,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAC1E,cAAc,kCAAkC,CAAC;AACjD,OAAO,EACN,6BAA6B,EAC7B,0BAA0B,EAC1B,wBAAwB,GACxB,MAAM,+BAA+B,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,YAAY,EACX,aAAa,EACb,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,WAAW,EACX,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,GACjB,MAAM,wBAAwB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC","sourcesContent":["export type { Static, TSchema } from \"typebox\";\nexport { Type } from \"typebox\";\n\nexport * from \"./api-registry.ts\";\nexport * from \"./env-api-keys.ts\";\nexport * from \"./image-models.ts\";\nexport * from \"./images.ts\";\nexport * from \"./images-api-registry.ts\";\nexport * from \"./models.ts\";\nexport * from \"./pi-compat.ts\";\nexport * from \"./prompt-cache-capability.ts\";\nexport type { BedrockOptions, BedrockThinkingDisplay } from \"./providers/amazon-bedrock.ts\";\nexport type { AnthropicEffort, AnthropicOptions, AnthropicThinkingDisplay } from \"./providers/anthropic.ts\";\nexport type { AzureOpenAIResponsesOptions } from \"./providers/azure-openai-responses.ts\";\nexport type { DevinOptions } from \"./providers/devin.ts\";\nexport {\n\ttype DevinFetch,\n\ttype DevinUserStatus,\n\tgetDevinUserStatus,\n\tparseDevinUserStatus,\n} from \"./providers/devin-api.ts\";\nexport * from \"./providers/faux.ts\";\nexport type { GoogleOptions } from \"./providers/google.ts\";\nexport type { GoogleThinkingLevel } from \"./providers/google-shared.ts\";\nexport type { GoogleVertexOptions } from \"./providers/google-vertex.ts\";\nexport * from \"./providers/images/register-builtins.ts\";\nexport type { MistralOptions } from \"./providers/mistral.ts\";\nexport type {\n\tOpenAICodexResponsesOptions,\n\tOpenAICodexWebSocketDebugStats,\n} from \"./providers/openai-codex-responses.ts\";\nexport type { OpenAICompletionsOptions } from \"./providers/openai-completions.ts\";\nexport type { OpenAIResponsesOptions } from \"./providers/openai-responses.ts\";\nexport { deriveContextPromptCacheKey } from \"./providers/prompt-cache.ts\";\nexport * from \"./providers/register-builtins.ts\";\nexport {\n\taddsThinkingBudgetToMaxTokens,\n\tadjustMaxTokensForThinking,\n\tDEFAULT_THINKING_BUDGETS,\n} from \"./providers/simple-options.ts\";\nexport * from \"./session-resources.ts\";\nexport * from \"./stream.ts\";\nexport * from \"./types.ts\";\nexport * from \"./usage-share.ts\";\nexport * from \"./utils/claude-code-identity.ts\";\nexport * from \"./utils/diagnostics.ts\";\nexport * from \"./utils/event-stream.ts\";\nexport * from \"./utils/json-parse.ts\";\nexport type {\n\tOAuthAuthInfo,\n\tOAuthCredentials,\n\tOAuthDeviceCodeInfo,\n\tOAuthLoginCallbacks,\n\tOAuthPrompt,\n\tOAuthProvider,\n\tOAuthProviderId,\n\tOAuthProviderInfo,\n\tOAuthProviderInterface,\n\tOAuthSelectOption,\n\tOAuthSelectPrompt,\n} from \"./utils/oauth/types.ts\";\nexport * from \"./utils/overflow.ts\";\nexport * from \"./utils/retry.ts\";\nexport * from \"./utils/typebox-helpers.ts\";\nexport * from \"./utils/validation.ts\";\n"]}
package/dist/index.js CHANGED
@@ -6,6 +6,7 @@ export * from "./images.js";
6
6
  export * from "./images-api-registry.js";
7
7
  export * from "./models.js";
8
8
  export * from "./pi-compat.js";
9
+ export * from "./prompt-cache-capability.js";
9
10
  export { getDevinUserStatus, parseDevinUserStatus, } from "./providers/devin-api.js";
10
11
  export * from "./providers/faux.js";
11
12
  export * from "./providers/images/register-builtins.js";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,0BAA0B,CAAC;AACzC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAK/B,OAAO,EAGN,kBAAkB,EAClB,oBAAoB,GACpB,MAAM,0BAA0B,CAAC;AAClC,cAAc,qBAAqB,CAAC;AAIpC,cAAc,yCAAyC,CAAC;AAQxD,OAAO,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAC1E,cAAc,kCAAkC,CAAC;AACjD,OAAO,EACN,6BAA6B,EAC7B,0BAA0B,EAC1B,wBAAwB,GACxB,MAAM,+BAA+B,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AActC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC","sourcesContent":["export type { Static, TSchema } from \"typebox\";\nexport { Type } from \"typebox\";\n\nexport * from \"./api-registry.ts\";\nexport * from \"./env-api-keys.ts\";\nexport * from \"./image-models.ts\";\nexport * from \"./images.ts\";\nexport * from \"./images-api-registry.ts\";\nexport * from \"./models.ts\";\nexport * from \"./pi-compat.ts\";\nexport type { BedrockOptions, BedrockThinkingDisplay } from \"./providers/amazon-bedrock.ts\";\nexport type { AnthropicEffort, AnthropicOptions, AnthropicThinkingDisplay } from \"./providers/anthropic.ts\";\nexport type { AzureOpenAIResponsesOptions } from \"./providers/azure-openai-responses.ts\";\nexport type { DevinOptions } from \"./providers/devin.ts\";\nexport {\n\ttype DevinFetch,\n\ttype DevinUserStatus,\n\tgetDevinUserStatus,\n\tparseDevinUserStatus,\n} from \"./providers/devin-api.ts\";\nexport * from \"./providers/faux.ts\";\nexport type { GoogleOptions } from \"./providers/google.ts\";\nexport type { GoogleThinkingLevel } from \"./providers/google-shared.ts\";\nexport type { GoogleVertexOptions } from \"./providers/google-vertex.ts\";\nexport * from \"./providers/images/register-builtins.ts\";\nexport type { MistralOptions } from \"./providers/mistral.ts\";\nexport type {\n\tOpenAICodexResponsesOptions,\n\tOpenAICodexWebSocketDebugStats,\n} from \"./providers/openai-codex-responses.ts\";\nexport type { OpenAICompletionsOptions } from \"./providers/openai-completions.ts\";\nexport type { OpenAIResponsesOptions } from \"./providers/openai-responses.ts\";\nexport { deriveContextPromptCacheKey } from \"./providers/prompt-cache.ts\";\nexport * from \"./providers/register-builtins.ts\";\nexport {\n\taddsThinkingBudgetToMaxTokens,\n\tadjustMaxTokensForThinking,\n\tDEFAULT_THINKING_BUDGETS,\n} from \"./providers/simple-options.ts\";\nexport * from \"./session-resources.ts\";\nexport * from \"./stream.ts\";\nexport * from \"./types.ts\";\nexport * from \"./usage-share.ts\";\nexport * from \"./utils/claude-code-identity.ts\";\nexport * from \"./utils/diagnostics.ts\";\nexport * from \"./utils/event-stream.ts\";\nexport * from \"./utils/json-parse.ts\";\nexport type {\n\tOAuthAuthInfo,\n\tOAuthCredentials,\n\tOAuthDeviceCodeInfo,\n\tOAuthLoginCallbacks,\n\tOAuthPrompt,\n\tOAuthProvider,\n\tOAuthProviderId,\n\tOAuthProviderInfo,\n\tOAuthProviderInterface,\n\tOAuthSelectOption,\n\tOAuthSelectPrompt,\n} from \"./utils/oauth/types.ts\";\nexport * from \"./utils/overflow.ts\";\nexport * from \"./utils/retry.ts\";\nexport * from \"./utils/typebox-helpers.ts\";\nexport * from \"./utils/validation.ts\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,0BAA0B,CAAC;AACzC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,8BAA8B,CAAC;AAK7C,OAAO,EAGN,kBAAkB,EAClB,oBAAoB,GACpB,MAAM,0BAA0B,CAAC;AAClC,cAAc,qBAAqB,CAAC;AAIpC,cAAc,yCAAyC,CAAC;AAQxD,OAAO,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAC1E,cAAc,kCAAkC,CAAC;AACjD,OAAO,EACN,6BAA6B,EAC7B,0BAA0B,EAC1B,wBAAwB,GACxB,MAAM,+BAA+B,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AActC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC","sourcesContent":["export type { Static, TSchema } from \"typebox\";\nexport { Type } from \"typebox\";\n\nexport * from \"./api-registry.ts\";\nexport * from \"./env-api-keys.ts\";\nexport * from \"./image-models.ts\";\nexport * from \"./images.ts\";\nexport * from \"./images-api-registry.ts\";\nexport * from \"./models.ts\";\nexport * from \"./pi-compat.ts\";\nexport * from \"./prompt-cache-capability.ts\";\nexport type { BedrockOptions, BedrockThinkingDisplay } from \"./providers/amazon-bedrock.ts\";\nexport type { AnthropicEffort, AnthropicOptions, AnthropicThinkingDisplay } from \"./providers/anthropic.ts\";\nexport type { AzureOpenAIResponsesOptions } from \"./providers/azure-openai-responses.ts\";\nexport type { DevinOptions } from \"./providers/devin.ts\";\nexport {\n\ttype DevinFetch,\n\ttype DevinUserStatus,\n\tgetDevinUserStatus,\n\tparseDevinUserStatus,\n} from \"./providers/devin-api.ts\";\nexport * from \"./providers/faux.ts\";\nexport type { GoogleOptions } from \"./providers/google.ts\";\nexport type { GoogleThinkingLevel } from \"./providers/google-shared.ts\";\nexport type { GoogleVertexOptions } from \"./providers/google-vertex.ts\";\nexport * from \"./providers/images/register-builtins.ts\";\nexport type { MistralOptions } from \"./providers/mistral.ts\";\nexport type {\n\tOpenAICodexResponsesOptions,\n\tOpenAICodexWebSocketDebugStats,\n} from \"./providers/openai-codex-responses.ts\";\nexport type { OpenAICompletionsOptions } from \"./providers/openai-completions.ts\";\nexport type { OpenAIResponsesOptions } from \"./providers/openai-responses.ts\";\nexport { deriveContextPromptCacheKey } from \"./providers/prompt-cache.ts\";\nexport * from \"./providers/register-builtins.ts\";\nexport {\n\taddsThinkingBudgetToMaxTokens,\n\tadjustMaxTokensForThinking,\n\tDEFAULT_THINKING_BUDGETS,\n} from \"./providers/simple-options.ts\";\nexport * from \"./session-resources.ts\";\nexport * from \"./stream.ts\";\nexport * from \"./types.ts\";\nexport * from \"./usage-share.ts\";\nexport * from \"./utils/claude-code-identity.ts\";\nexport * from \"./utils/diagnostics.ts\";\nexport * from \"./utils/event-stream.ts\";\nexport * from \"./utils/json-parse.ts\";\nexport type {\n\tOAuthAuthInfo,\n\tOAuthCredentials,\n\tOAuthDeviceCodeInfo,\n\tOAuthLoginCallbacks,\n\tOAuthPrompt,\n\tOAuthProvider,\n\tOAuthProviderId,\n\tOAuthProviderInfo,\n\tOAuthProviderInterface,\n\tOAuthSelectOption,\n\tOAuthSelectPrompt,\n} from \"./utils/oauth/types.ts\";\nexport * from \"./utils/overflow.ts\";\nexport * from \"./utils/retry.ts\";\nexport * from \"./utils/typebox-helpers.ts\";\nexport * from \"./utils/validation.ts\";\n"]}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Spec 103 §2.4: explicit prompt-cache capability and lifetime table.
3
+ *
4
+ * Replaces "cache supported because cacheRead price > 0" for the next-task
5
+ * suggestion skip heuristic. Values are documented *lower bounds* of how long
6
+ * a cached prefix stays warm for the retention omk actually sends; they are a
7
+ * skip heuristic, not a billing guarantee. Anything not verified against the
8
+ * provider's own docs is `unknown` (fail closed). No pricing feed, no deps.
9
+ *
10
+ * Sources (fetched 2026-10-21 KST):
11
+ * - https://platform.openai.com/docs/guides/prompt-caching
12
+ * - https://docs.claude.com/en/docs/build-with-claude/prompt-caching
13
+ */
14
+ import type { CacheRetention } from "./types.ts";
15
+ export type PromptCacheCapability = {
16
+ readonly kind: "supported";
17
+ readonly coldAfterMs: number;
18
+ readonly source: string;
19
+ } | {
20
+ readonly kind: "none";
21
+ } | {
22
+ readonly kind: "unknown";
23
+ };
24
+ export interface PromptCacheModelRef {
25
+ readonly api: string;
26
+ readonly provider: string;
27
+ readonly id: string;
28
+ readonly compat?: {
29
+ readonly supportsLongCacheRetention?: boolean;
30
+ } | object;
31
+ }
32
+ /**
33
+ * Capability for `(api/provider, model family, retention sent)`. An unset
34
+ * retention is read as `short`, the shortest documented lifetime, because the
35
+ * provider default can depend on environment or org settings (ZDR).
36
+ */
37
+ export declare function promptCacheCapability(model: PromptCacheModelRef, retention: CacheRetention | undefined): PromptCacheCapability;
38
+ //# sourceMappingURL=prompt-cache-capability.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt-cache-capability.d.ts","sourceRoot":"","sources":["../src/prompt-cache-capability.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,MAAM,MAAM,qBAAqB,GAC9B;IAAE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACrF;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACzB;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;CAAE,CAAC;AAEhC,MAAM,WAAW,mBAAmB;IACnC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,MAAM,CAAC,EAAE;QAAE,QAAQ,CAAC,0BAA0B,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,MAAM,CAAC;CAC7E;AAyBD;;;;GAIG;AACH,wBAAgB,qBAAqB,CACpC,KAAK,EAAE,mBAAmB,EAC1B,SAAS,EAAE,cAAc,GAAG,SAAS,GACnC,qBAAqB,CAYvB","sourcesContent":["/**\n * Spec 103 §2.4: explicit prompt-cache capability and lifetime table.\n *\n * Replaces \"cache supported because cacheRead price > 0\" for the next-task\n * suggestion skip heuristic. Values are documented *lower bounds* of how long\n * a cached prefix stays warm for the retention omk actually sends; they are a\n * skip heuristic, not a billing guarantee. Anything not verified against the\n * provider's own docs is `unknown` (fail closed). No pricing feed, no deps.\n *\n * Sources (fetched 2026-10-21 KST):\n * - https://platform.openai.com/docs/guides/prompt-caching\n * - https://docs.claude.com/en/docs/build-with-claude/prompt-caching\n */\nimport type { CacheRetention } from \"./types.ts\";\n\nexport type PromptCacheCapability =\n\t| { readonly kind: \"supported\"; readonly coldAfterMs: number; readonly source: string }\n\t| { readonly kind: \"none\" }\n\t| { readonly kind: \"unknown\" };\n\nexport interface PromptCacheModelRef {\n\treadonly api: string;\n\treadonly provider: string;\n\treadonly id: string;\n\treadonly compat?: { readonly supportsLongCacheRetention?: boolean } | object;\n}\n\nconst MINUTE = 60_000;\nconst OPENAI_DOC = \"openai:prompt-caching\";\nconst ANTHROPIC_DOC = \"anthropic:prompt-caching\";\n\nfunction longRetentionSupported(model: PromptCacheModelRef): boolean {\n\tconst compat = model.compat as { supportsLongCacheRetention?: boolean } | undefined;\n\treturn compat?.supportsLongCacheRetention ?? true;\n}\n\n/** `gpt-5.<minor>` family minor version, or undefined for any other id. */\nfunction gpt5Minor(id: string): number | undefined {\n\tconst match = /^gpt-5\\.(\\d+)(?:\\D|$)/u.exec(id);\n\treturn match ? Number(match[1]) : undefined;\n}\n\nfunction openAiLifetimeMs(model: PromptCacheModelRef, retention: \"short\" | \"long\"): number {\n\tconst minor = gpt5Minor(model.id);\n\t// GPT-5.6+: default ttl \"30m\" (minimum). GPT-5.5 / 5.5 Pro: \"typically around 30 minutes\".\n\tif (minor !== undefined && minor >= 5) return 30 * MINUTE;\n\t// Earlier models: `24h` \"typically keeps entries around 30 minutes\"; in_memory \"5 to 10 minutes\" (lower bound).\n\treturn retention === \"long\" && longRetentionSupported(model) ? 30 * MINUTE : 5 * MINUTE;\n}\n\n/**\n * Capability for `(api/provider, model family, retention sent)`. An unset\n * retention is read as `short`, the shortest documented lifetime, because the\n * provider default can depend on environment or org settings (ZDR).\n */\nexport function promptCacheCapability(\n\tmodel: PromptCacheModelRef,\n\tretention: CacheRetention | undefined,\n): PromptCacheCapability {\n\tif (retention === \"none\") return { kind: \"none\" };\n\tconst sent = retention === \"long\" ? \"long\" : \"short\";\n\tif (model.api === \"openai-responses\" && model.provider === \"openai\") {\n\t\treturn { kind: \"supported\", coldAfterMs: openAiLifetimeMs(model, sent), source: OPENAI_DOC };\n\t}\n\tif (model.api === \"anthropic-messages\" && model.provider === \"anthropic\") {\n\t\tconst coldAfterMs = sent === \"long\" && longRetentionSupported(model) ? 60 * MINUTE : 5 * MINUTE;\n\t\treturn { kind: \"supported\", coldAfterMs, source: ANTHROPIC_DOC };\n\t}\n\t// xAI, Google, compat endpoints and everything else: not verified.\n\treturn { kind: \"unknown\" };\n}\n"]}
@@ -0,0 +1,40 @@
1
+ const MINUTE = 60_000;
2
+ const OPENAI_DOC = "openai:prompt-caching";
3
+ const ANTHROPIC_DOC = "anthropic:prompt-caching";
4
+ function longRetentionSupported(model) {
5
+ const compat = model.compat;
6
+ return compat?.supportsLongCacheRetention ?? true;
7
+ }
8
+ /** `gpt-5.<minor>` family minor version, or undefined for any other id. */
9
+ function gpt5Minor(id) {
10
+ const match = /^gpt-5\.(\d+)(?:\D|$)/u.exec(id);
11
+ return match ? Number(match[1]) : undefined;
12
+ }
13
+ function openAiLifetimeMs(model, retention) {
14
+ const minor = gpt5Minor(model.id);
15
+ // GPT-5.6+: default ttl "30m" (minimum). GPT-5.5 / 5.5 Pro: "typically around 30 minutes".
16
+ if (minor !== undefined && minor >= 5)
17
+ return 30 * MINUTE;
18
+ // Earlier models: `24h` "typically keeps entries around 30 minutes"; in_memory "5 to 10 minutes" (lower bound).
19
+ return retention === "long" && longRetentionSupported(model) ? 30 * MINUTE : 5 * MINUTE;
20
+ }
21
+ /**
22
+ * Capability for `(api/provider, model family, retention sent)`. An unset
23
+ * retention is read as `short`, the shortest documented lifetime, because the
24
+ * provider default can depend on environment or org settings (ZDR).
25
+ */
26
+ export function promptCacheCapability(model, retention) {
27
+ if (retention === "none")
28
+ return { kind: "none" };
29
+ const sent = retention === "long" ? "long" : "short";
30
+ if (model.api === "openai-responses" && model.provider === "openai") {
31
+ return { kind: "supported", coldAfterMs: openAiLifetimeMs(model, sent), source: OPENAI_DOC };
32
+ }
33
+ if (model.api === "anthropic-messages" && model.provider === "anthropic") {
34
+ const coldAfterMs = sent === "long" && longRetentionSupported(model) ? 60 * MINUTE : 5 * MINUTE;
35
+ return { kind: "supported", coldAfterMs, source: ANTHROPIC_DOC };
36
+ }
37
+ // xAI, Google, compat endpoints and everything else: not verified.
38
+ return { kind: "unknown" };
39
+ }
40
+ //# sourceMappingURL=prompt-cache-capability.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt-cache-capability.js","sourceRoot":"","sources":["../src/prompt-cache-capability.ts"],"names":[],"mappings":"AA2BA,MAAM,MAAM,GAAG,MAAM,CAAC;AACtB,MAAM,UAAU,GAAG,uBAAuB,CAAC;AAC3C,MAAM,aAAa,GAAG,0BAA0B,CAAC;AAEjD,SAAS,sBAAsB,CAAC,KAA0B,EAAW;IACpE,MAAM,MAAM,GAAG,KAAK,CAAC,MAA8D,CAAC;IACpF,OAAO,MAAM,EAAE,0BAA0B,IAAI,IAAI,CAAC;AAAA,CAClD;AAED,2EAA2E;AAC3E,SAAS,SAAS,CAAC,EAAU,EAAsB;IAClD,MAAM,KAAK,GAAG,wBAAwB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAChD,OAAO,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAAA,CAC5C;AAED,SAAS,gBAAgB,CAAC,KAA0B,EAAE,SAA2B,EAAU;IAC1F,MAAM,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAClC,2FAA2F;IAC3F,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,IAAI,CAAC;QAAE,OAAO,EAAE,GAAG,MAAM,CAAC;IAC1D,gHAAgH;IAChH,OAAO,SAAS,KAAK,MAAM,IAAI,sBAAsB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC;AAAA,CACxF;AAED;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CACpC,KAA0B,EAC1B,SAAqC,EACb;IACxB,IAAI,SAAS,KAAK,MAAM;QAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAClD,MAAM,IAAI,GAAG,SAAS,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;IACrD,IAAI,KAAK,CAAC,GAAG,KAAK,kBAAkB,IAAI,KAAK,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;QACrE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,gBAAgB,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC;IAC9F,CAAC;IACD,IAAI,KAAK,CAAC,GAAG,KAAK,oBAAoB,IAAI,KAAK,CAAC,QAAQ,KAAK,WAAW,EAAE,CAAC;QAC1E,MAAM,WAAW,GAAG,IAAI,KAAK,MAAM,IAAI,sBAAsB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC;QAChG,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,CAAC;IAClE,CAAC;IACD,mEAAmE;IACnE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;AAAA,CAC3B","sourcesContent":["/**\n * Spec 103 §2.4: explicit prompt-cache capability and lifetime table.\n *\n * Replaces \"cache supported because cacheRead price > 0\" for the next-task\n * suggestion skip heuristic. Values are documented *lower bounds* of how long\n * a cached prefix stays warm for the retention omk actually sends; they are a\n * skip heuristic, not a billing guarantee. Anything not verified against the\n * provider's own docs is `unknown` (fail closed). No pricing feed, no deps.\n *\n * Sources (fetched 2026-10-21 KST):\n * - https://platform.openai.com/docs/guides/prompt-caching\n * - https://docs.claude.com/en/docs/build-with-claude/prompt-caching\n */\nimport type { CacheRetention } from \"./types.ts\";\n\nexport type PromptCacheCapability =\n\t| { readonly kind: \"supported\"; readonly coldAfterMs: number; readonly source: string }\n\t| { readonly kind: \"none\" }\n\t| { readonly kind: \"unknown\" };\n\nexport interface PromptCacheModelRef {\n\treadonly api: string;\n\treadonly provider: string;\n\treadonly id: string;\n\treadonly compat?: { readonly supportsLongCacheRetention?: boolean } | object;\n}\n\nconst MINUTE = 60_000;\nconst OPENAI_DOC = \"openai:prompt-caching\";\nconst ANTHROPIC_DOC = \"anthropic:prompt-caching\";\n\nfunction longRetentionSupported(model: PromptCacheModelRef): boolean {\n\tconst compat = model.compat as { supportsLongCacheRetention?: boolean } | undefined;\n\treturn compat?.supportsLongCacheRetention ?? true;\n}\n\n/** `gpt-5.<minor>` family minor version, or undefined for any other id. */\nfunction gpt5Minor(id: string): number | undefined {\n\tconst match = /^gpt-5\\.(\\d+)(?:\\D|$)/u.exec(id);\n\treturn match ? Number(match[1]) : undefined;\n}\n\nfunction openAiLifetimeMs(model: PromptCacheModelRef, retention: \"short\" | \"long\"): number {\n\tconst minor = gpt5Minor(model.id);\n\t// GPT-5.6+: default ttl \"30m\" (minimum). GPT-5.5 / 5.5 Pro: \"typically around 30 minutes\".\n\tif (minor !== undefined && minor >= 5) return 30 * MINUTE;\n\t// Earlier models: `24h` \"typically keeps entries around 30 minutes\"; in_memory \"5 to 10 minutes\" (lower bound).\n\treturn retention === \"long\" && longRetentionSupported(model) ? 30 * MINUTE : 5 * MINUTE;\n}\n\n/**\n * Capability for `(api/provider, model family, retention sent)`. An unset\n * retention is read as `short`, the shortest documented lifetime, because the\n * provider default can depend on environment or org settings (ZDR).\n */\nexport function promptCacheCapability(\n\tmodel: PromptCacheModelRef,\n\tretention: CacheRetention | undefined,\n): PromptCacheCapability {\n\tif (retention === \"none\") return { kind: \"none\" };\n\tconst sent = retention === \"long\" ? \"long\" : \"short\";\n\tif (model.api === \"openai-responses\" && model.provider === \"openai\") {\n\t\treturn { kind: \"supported\", coldAfterMs: openAiLifetimeMs(model, sent), source: OPENAI_DOC };\n\t}\n\tif (model.api === \"anthropic-messages\" && model.provider === \"anthropic\") {\n\t\tconst coldAfterMs = sent === \"long\" && longRetentionSupported(model) ? 60 * MINUTE : 5 * MINUTE;\n\t\treturn { kind: \"supported\", coldAfterMs, source: ANTHROPIC_DOC };\n\t}\n\t// xAI, Google, compat endpoints and everything else: not verified.\n\treturn { kind: \"unknown\" };\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omk-ai",
3
- "version": "1.5.5",
3
+ "version": "1.5.6",
4
4
  "description": "Unified LLM API with automatic model discovery and provider configuration",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",