@acosmi/sdk-ts 2.19.5 → 2.19.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 +6 -0
- package/README.md +7 -2
- package/dist/browser/index.mjs +10 -2
- package/dist/browser/index.mjs.map +1 -1
- package/dist/index.mjs +10 -2
- package/dist/index.mjs.map +1 -1
- package/dist/node/adapters/anthropic.cjs.map +1 -1
- package/dist/node/adapters/anthropic.d.cts +1 -1
- package/dist/node/adapters/anthropic.d.ts +1 -1
- package/dist/node/adapters/anthropic.mjs.map +1 -1
- package/dist/node/adapters/openai.cjs.map +1 -1
- package/dist/node/adapters/openai.d.cts +2 -2
- package/dist/node/adapters/openai.d.ts +2 -2
- package/dist/node/adapters/openai.mjs.map +1 -1
- package/dist/node/{format-DWA12pVT.d.cts → format-CKpXSSqY.d.cts} +22 -0
- package/dist/node/{format-DWA12pVT.d.ts → format-CKpXSSqY.d.ts} +22 -0
- package/dist/node/index.cjs +10 -2
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.d.cts +4 -4
- package/dist/node/index.d.ts +4 -4
- package/dist/node/index.mjs +10 -2
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/{openai-Cuu_DPxM.d.cts → openai-ByUO-cSR.d.cts} +1 -1
- package/dist/node/{openai-DsbJUOOW.d.ts → openai-CH0wnJXv.d.ts} +1 -1
- package/package.json +1 -1
package/dist/node/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as AnthropicResponse } from './openai-
|
|
2
|
-
export { A as AnthropicContentBlock, b as AnthropicUsage, O as OpenAIAdapter, d as anthropicResponseTextContent, e as anthropicResponseThinkingContent, f as anthropicResponseToolUseBlocks } from './openai-
|
|
3
|
-
import { P as ProviderAdapter, M as ManagedModel, Q as QuotaSummary, Y as WindowResetSummary, n as ModelCapabilities, e as ChatRequest, f as ChatResponse, I as ImageGenerationRequest, k as ImageGenerationResponse, V as VideoGenerationRequest, N as VideoTaskResponse, i as EmbeddingRequest, j as EmbeddingResponse, s as RerankRequest, t as RerankResponse, z as StreamEvent, w as SourcesEvent, A as StreamSettlement, l as InputModality } from './format-
|
|
4
|
-
export { B as BucketClassCommercial, a as BucketClassGeneric, b as BucketInfo, c as BucketRow, C as ChatContentBlock, d as ChatMessage, g as ChatUsage, E as EffortConfig, h as EmbeddingData, G as GeoLoc, m as InputModalityTag, o as MultimodalContent, O as OutputConfig, p as ProviderFormat, q as QuotaSummarySubscriptionPool, R as RerankDocument, r as RerankQuery, u as RerankResult, S as ServerTool, v as ServerToolTypeWebSearch, x as SourcesEventIssueCode, y as SourcesEventParseResult, T as ThinkingConfig, D as ThinkingHigh, F as ThinkingHighMinMaxTokens, H as ThinkingLow, J as ThinkingMax, K as ThinkingMaxFallbackMaxTokens, L as ThinkingOff, W as WebSearchConfig, U as WebSearchSource, X as WindowLimitStatus, Z as bucketInfoIsCommercial, _ as bucketRowIsCommercial, $ as classifySourcesEvent, a0 as newThinkingConfig, a1 as newWebSearchTool, a2 as parseSettlement, a3 as parseSourcesEvent } from './format-
|
|
1
|
+
import { a as AnthropicResponse } from './openai-ByUO-cSR.cjs';
|
|
2
|
+
export { A as AnthropicContentBlock, b as AnthropicUsage, O as OpenAIAdapter, d as anthropicResponseTextContent, e as anthropicResponseThinkingContent, f as anthropicResponseToolUseBlocks } from './openai-ByUO-cSR.cjs';
|
|
3
|
+
import { P as ProviderAdapter, M as ManagedModel, Q as QuotaSummary, Y as WindowResetSummary, n as ModelCapabilities, e as ChatRequest, f as ChatResponse, I as ImageGenerationRequest, k as ImageGenerationResponse, V as VideoGenerationRequest, N as VideoTaskResponse, i as EmbeddingRequest, j as EmbeddingResponse, s as RerankRequest, t as RerankResponse, z as StreamEvent, w as SourcesEvent, A as StreamSettlement, l as InputModality } from './format-CKpXSSqY.cjs';
|
|
4
|
+
export { B as BucketClassCommercial, a as BucketClassGeneric, b as BucketInfo, c as BucketRow, C as ChatContentBlock, d as ChatMessage, g as ChatUsage, E as EffortConfig, h as EmbeddingData, G as GeoLoc, m as InputModalityTag, o as MultimodalContent, O as OutputConfig, p as ProviderFormat, q as QuotaSummarySubscriptionPool, R as RerankDocument, r as RerankQuery, u as RerankResult, S as ServerTool, v as ServerToolTypeWebSearch, x as SourcesEventIssueCode, y as SourcesEventParseResult, T as ThinkingConfig, D as ThinkingHigh, F as ThinkingHighMinMaxTokens, H as ThinkingLow, J as ThinkingMax, K as ThinkingMaxFallbackMaxTokens, L as ThinkingOff, W as WebSearchConfig, U as WebSearchSource, X as WindowLimitStatus, Z as bucketInfoIsCommercial, _ as bucketRowIsCommercial, $ as classifySourcesEvent, a0 as newThinkingConfig, a1 as newWebSearchTool, a2 as parseSettlement, a3 as parseSourcesEvent } from './format-CKpXSSqY.cjs';
|
|
5
5
|
import { M as MinimalSanitizeConfig } from './index-Bah9A83R.cjs';
|
|
6
6
|
export { A as sanitize } from './index-Bah9A83R.cjs';
|
|
7
7
|
export { AnthropicAdapter } from './adapters/anthropic.cjs';
|
package/dist/node/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as AnthropicResponse } from './openai-
|
|
2
|
-
export { A as AnthropicContentBlock, b as AnthropicUsage, O as OpenAIAdapter, d as anthropicResponseTextContent, e as anthropicResponseThinkingContent, f as anthropicResponseToolUseBlocks } from './openai-
|
|
3
|
-
import { P as ProviderAdapter, M as ManagedModel, Q as QuotaSummary, Y as WindowResetSummary, n as ModelCapabilities, e as ChatRequest, f as ChatResponse, I as ImageGenerationRequest, k as ImageGenerationResponse, V as VideoGenerationRequest, N as VideoTaskResponse, i as EmbeddingRequest, j as EmbeddingResponse, s as RerankRequest, t as RerankResponse, z as StreamEvent, w as SourcesEvent, A as StreamSettlement, l as InputModality } from './format-
|
|
4
|
-
export { B as BucketClassCommercial, a as BucketClassGeneric, b as BucketInfo, c as BucketRow, C as ChatContentBlock, d as ChatMessage, g as ChatUsage, E as EffortConfig, h as EmbeddingData, G as GeoLoc, m as InputModalityTag, o as MultimodalContent, O as OutputConfig, p as ProviderFormat, q as QuotaSummarySubscriptionPool, R as RerankDocument, r as RerankQuery, u as RerankResult, S as ServerTool, v as ServerToolTypeWebSearch, x as SourcesEventIssueCode, y as SourcesEventParseResult, T as ThinkingConfig, D as ThinkingHigh, F as ThinkingHighMinMaxTokens, H as ThinkingLow, J as ThinkingMax, K as ThinkingMaxFallbackMaxTokens, L as ThinkingOff, W as WebSearchConfig, U as WebSearchSource, X as WindowLimitStatus, Z as bucketInfoIsCommercial, _ as bucketRowIsCommercial, $ as classifySourcesEvent, a0 as newThinkingConfig, a1 as newWebSearchTool, a2 as parseSettlement, a3 as parseSourcesEvent } from './format-
|
|
1
|
+
import { a as AnthropicResponse } from './openai-CH0wnJXv.js';
|
|
2
|
+
export { A as AnthropicContentBlock, b as AnthropicUsage, O as OpenAIAdapter, d as anthropicResponseTextContent, e as anthropicResponseThinkingContent, f as anthropicResponseToolUseBlocks } from './openai-CH0wnJXv.js';
|
|
3
|
+
import { P as ProviderAdapter, M as ManagedModel, Q as QuotaSummary, Y as WindowResetSummary, n as ModelCapabilities, e as ChatRequest, f as ChatResponse, I as ImageGenerationRequest, k as ImageGenerationResponse, V as VideoGenerationRequest, N as VideoTaskResponse, i as EmbeddingRequest, j as EmbeddingResponse, s as RerankRequest, t as RerankResponse, z as StreamEvent, w as SourcesEvent, A as StreamSettlement, l as InputModality } from './format-CKpXSSqY.js';
|
|
4
|
+
export { B as BucketClassCommercial, a as BucketClassGeneric, b as BucketInfo, c as BucketRow, C as ChatContentBlock, d as ChatMessage, g as ChatUsage, E as EffortConfig, h as EmbeddingData, G as GeoLoc, m as InputModalityTag, o as MultimodalContent, O as OutputConfig, p as ProviderFormat, q as QuotaSummarySubscriptionPool, R as RerankDocument, r as RerankQuery, u as RerankResult, S as ServerTool, v as ServerToolTypeWebSearch, x as SourcesEventIssueCode, y as SourcesEventParseResult, T as ThinkingConfig, D as ThinkingHigh, F as ThinkingHighMinMaxTokens, H as ThinkingLow, J as ThinkingMax, K as ThinkingMaxFallbackMaxTokens, L as ThinkingOff, W as WebSearchConfig, U as WebSearchSource, X as WindowLimitStatus, Z as bucketInfoIsCommercial, _ as bucketRowIsCommercial, $ as classifySourcesEvent, a0 as newThinkingConfig, a1 as newWebSearchTool, a2 as parseSettlement, a3 as parseSourcesEvent } from './format-CKpXSSqY.js';
|
|
5
5
|
import { M as MinimalSanitizeConfig } from './index-Bah9A83R.js';
|
|
6
6
|
export { A as sanitize } from './index-Bah9A83R.js';
|
|
7
7
|
export { AnthropicAdapter } from './adapters/anthropic.js';
|
package/dist/node/index.mjs
CHANGED
|
@@ -2252,7 +2252,8 @@ ${Date.now()}
|
|
|
2252
2252
|
release = async () => {
|
|
2253
2253
|
try {
|
|
2254
2254
|
await fs.unlink(lockPath);
|
|
2255
|
-
} catch {
|
|
2255
|
+
} catch (e) {
|
|
2256
|
+
warnLockCleanupFailed("release", lockPath, e);
|
|
2256
2257
|
}
|
|
2257
2258
|
};
|
|
2258
2259
|
break;
|
|
@@ -2269,7 +2270,8 @@ ${Date.now()}
|
|
|
2269
2270
|
if (stale) {
|
|
2270
2271
|
try {
|
|
2271
2272
|
await fs.unlink(lockPath);
|
|
2272
|
-
} catch {
|
|
2273
|
+
} catch (e2) {
|
|
2274
|
+
warnLockCleanupFailed("stale-break", lockPath, e2);
|
|
2273
2275
|
}
|
|
2274
2276
|
continue;
|
|
2275
2277
|
}
|
|
@@ -2372,6 +2374,12 @@ ${Date.now()}
|
|
|
2372
2374
|
});
|
|
2373
2375
|
}
|
|
2374
2376
|
};
|
|
2377
|
+
function warnLockCleanupFailed(stage, lockPath, e) {
|
|
2378
|
+
if (isNotExistError(e)) return;
|
|
2379
|
+
console.warn(
|
|
2380
|
+
`[acosmi-sdk] warning: unlink token file lock (${stage}) failed: ${lockPath}: ${e instanceof Error ? e.message : String(e)}`
|
|
2381
|
+
);
|
|
2382
|
+
}
|
|
2375
2383
|
function isNotExistError(e) {
|
|
2376
2384
|
if (typeof e === "object" && e !== null && "code" in e) {
|
|
2377
2385
|
return e.code === "ENOENT";
|