@acosmi/sdk-ts 2.9.0 → 2.10.0
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 +14 -0
- package/README.md +22 -0
- package/dist/browser/index.mjs +9 -2
- package/dist/browser/index.mjs.map +1 -1
- package/dist/index.mjs +9 -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/{index-B5ixqnVB.d.cts → index-CsDRFZIj.d.cts} +40 -8
- package/dist/node/{index-B5ixqnVB.d.ts → index-CsDRFZIj.d.ts} +40 -8
- package/dist/node/index.cjs +9 -2
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.d.cts +14 -7
- package/dist/node/index.d.ts +14 -7
- package/dist/node/index.mjs +9 -2
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/{openai-Br-G1fCG.d.ts → openai-BdpEzATI.d.ts} +1 -1
- package/dist/node/{openai-C3gVV388.d.cts → openai-Z2NDbHhT.d.cts} +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 { M as ManagedModel, Q as QuotaSummary, m as ModelCapabilities, e as ChatRequest, P as ProviderAdapter, f as ChatResponse, I as ImageGenerationRequest, k as ImageGenerationResponse, V as VideoGenerationRequest,
|
|
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, O as OutputConfig,
|
|
1
|
+
import { a as AnthropicResponse } from './openai-Z2NDbHhT.cjs';
|
|
2
|
+
export { A as AnthropicContentBlock, b as AnthropicUsage, O as OpenAIAdapter, d as anthropicResponseTextContent, e as anthropicResponseThinkingContent, f as anthropicResponseToolUseBlocks } from './openai-Z2NDbHhT.cjs';
|
|
3
|
+
import { M as ManagedModel, Q as QuotaSummary, m as ModelCapabilities, e as ChatRequest, P as ProviderAdapter, f as ChatResponse, I as ImageGenerationRequest, k as ImageGenerationResponse, V as VideoGenerationRequest, F as VideoTaskResponse, i as EmbeddingRequest, j as EmbeddingResponse, q as RerankRequest, r as RerankResponse, v as StreamEvent, u as SourcesEvent, w as StreamSettlement, l as InputModality } from './index-CsDRFZIj.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, n as MultimodalContent, O as OutputConfig, o as ProviderFormat, R as RerankDocument, p as RerankQuery, s as RerankResult, S as ServerTool, t as ServerToolTypeWebSearch, T as ThinkingConfig, x as ThinkingHigh, y as ThinkingHighMinMaxTokens, z as ThinkingMax, A as ThinkingMaxFallbackMaxTokens, D as ThinkingOff, W as WebSearchConfig, H as WebSearchSource, J as bucketInfoIsCommercial, K as bucketRowIsCommercial, L as getAdapter, N as getAdapterForModel, U as newThinkingConfig, X as newWebSearchTool, Y as parseSettlement, Z as parseSourcesEvent } from './index-CsDRFZIj.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';
|
|
@@ -828,9 +828,16 @@ declare class Client {
|
|
|
828
828
|
fetchImpl: typeof fetch;
|
|
829
829
|
/** 互斥锁 (TS 用 Promise chain 替代 sync.Mutex) */
|
|
830
830
|
private mu;
|
|
831
|
-
/**
|
|
831
|
+
/**
|
|
832
|
+
* WebSocket 状态 (实际方法由 ws.ts mixin 维护)。
|
|
833
|
+
* @internal — 实现细节: 跨模块 (ws.ts mixin) 需可见故为 public, 但非消费者 API,
|
|
834
|
+
* 消费者用 connect/subscribe 等高层方法; 引用的 WSState 不进公开文档。
|
|
835
|
+
*/
|
|
832
836
|
ws: WSState | null;
|
|
833
|
-
/**
|
|
837
|
+
/**
|
|
838
|
+
* v0.15.1: token 就绪等待机制 — login 成功后 resolve, 等待方解除阻塞。
|
|
839
|
+
* @internal — 内部同步原语 (Deferred), 非消费者 API。
|
|
840
|
+
*/
|
|
834
841
|
tokenReady: Deferred<void>;
|
|
835
842
|
/** Login 进行中 — 等待方需等而非 fail-fast */
|
|
836
843
|
loginInFlight: boolean;
|
|
@@ -2741,7 +2748,7 @@ declare function complianceScopes(): ComplianceScope[];
|
|
|
2741
2748
|
/**
|
|
2742
2749
|
* Compliance envelope 稳定业务状态。
|
|
2743
2750
|
*
|
|
2744
|
-
* 字面量与 Java
|
|
2751
|
+
* 字面量与 Java `EnvelopeStatusEnum` 的 `name()` 一致(这是 enum,是 wire 上的实际
|
|
2745
2752
|
* 字符串);前端按这些字符串分支展示文案。
|
|
2746
2753
|
*/
|
|
2747
2754
|
type ComplianceEnvelopeStatus = 'DRAFT' | 'CONTRACT_READY' | 'APPROVED' | 'SIGN_PENDING' | 'PENDING_EVIDENCE' | 'PENDING_RECONCILIATION' | 'SUCCESS' | 'FAILED' | 'CANCELED';
|
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 { M as ManagedModel, Q as QuotaSummary, m as ModelCapabilities, e as ChatRequest, P as ProviderAdapter, f as ChatResponse, I as ImageGenerationRequest, k as ImageGenerationResponse, V as VideoGenerationRequest,
|
|
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, O as OutputConfig,
|
|
1
|
+
import { a as AnthropicResponse } from './openai-BdpEzATI.js';
|
|
2
|
+
export { A as AnthropicContentBlock, b as AnthropicUsage, O as OpenAIAdapter, d as anthropicResponseTextContent, e as anthropicResponseThinkingContent, f as anthropicResponseToolUseBlocks } from './openai-BdpEzATI.js';
|
|
3
|
+
import { M as ManagedModel, Q as QuotaSummary, m as ModelCapabilities, e as ChatRequest, P as ProviderAdapter, f as ChatResponse, I as ImageGenerationRequest, k as ImageGenerationResponse, V as VideoGenerationRequest, F as VideoTaskResponse, i as EmbeddingRequest, j as EmbeddingResponse, q as RerankRequest, r as RerankResponse, v as StreamEvent, u as SourcesEvent, w as StreamSettlement, l as InputModality } from './index-CsDRFZIj.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, n as MultimodalContent, O as OutputConfig, o as ProviderFormat, R as RerankDocument, p as RerankQuery, s as RerankResult, S as ServerTool, t as ServerToolTypeWebSearch, T as ThinkingConfig, x as ThinkingHigh, y as ThinkingHighMinMaxTokens, z as ThinkingMax, A as ThinkingMaxFallbackMaxTokens, D as ThinkingOff, W as WebSearchConfig, H as WebSearchSource, J as bucketInfoIsCommercial, K as bucketRowIsCommercial, L as getAdapter, N as getAdapterForModel, U as newThinkingConfig, X as newWebSearchTool, Y as parseSettlement, Z as parseSourcesEvent } from './index-CsDRFZIj.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';
|
|
@@ -828,9 +828,16 @@ declare class Client {
|
|
|
828
828
|
fetchImpl: typeof fetch;
|
|
829
829
|
/** 互斥锁 (TS 用 Promise chain 替代 sync.Mutex) */
|
|
830
830
|
private mu;
|
|
831
|
-
/**
|
|
831
|
+
/**
|
|
832
|
+
* WebSocket 状态 (实际方法由 ws.ts mixin 维护)。
|
|
833
|
+
* @internal — 实现细节: 跨模块 (ws.ts mixin) 需可见故为 public, 但非消费者 API,
|
|
834
|
+
* 消费者用 connect/subscribe 等高层方法; 引用的 WSState 不进公开文档。
|
|
835
|
+
*/
|
|
832
836
|
ws: WSState | null;
|
|
833
|
-
/**
|
|
837
|
+
/**
|
|
838
|
+
* v0.15.1: token 就绪等待机制 — login 成功后 resolve, 等待方解除阻塞。
|
|
839
|
+
* @internal — 内部同步原语 (Deferred), 非消费者 API。
|
|
840
|
+
*/
|
|
834
841
|
tokenReady: Deferred<void>;
|
|
835
842
|
/** Login 进行中 — 等待方需等而非 fail-fast */
|
|
836
843
|
loginInFlight: boolean;
|
|
@@ -2741,7 +2748,7 @@ declare function complianceScopes(): ComplianceScope[];
|
|
|
2741
2748
|
/**
|
|
2742
2749
|
* Compliance envelope 稳定业务状态。
|
|
2743
2750
|
*
|
|
2744
|
-
* 字面量与 Java
|
|
2751
|
+
* 字面量与 Java `EnvelopeStatusEnum` 的 `name()` 一致(这是 enum,是 wire 上的实际
|
|
2745
2752
|
* 字符串);前端按这些字符串分支展示文案。
|
|
2746
2753
|
*/
|
|
2747
2754
|
type ComplianceEnvelopeStatus = 'DRAFT' | 'CONTRACT_READY' | 'APPROVED' | 'SIGN_PENDING' | 'PENDING_EVIDENCE' | 'PENDING_RECONCILIATION' | 'SUCCESS' | 'FAILED' | 'CANCELED';
|
package/dist/node/index.mjs
CHANGED
|
@@ -2206,9 +2206,16 @@ var Client = class _Client {
|
|
|
2206
2206
|
fetchImpl;
|
|
2207
2207
|
/** 互斥锁 (TS 用 Promise chain 替代 sync.Mutex) */
|
|
2208
2208
|
mu = Promise.resolve();
|
|
2209
|
-
/**
|
|
2209
|
+
/**
|
|
2210
|
+
* WebSocket 状态 (实际方法由 ws.ts mixin 维护)。
|
|
2211
|
+
* @internal — 实现细节: 跨模块 (ws.ts mixin) 需可见故为 public, 但非消费者 API,
|
|
2212
|
+
* 消费者用 connect/subscribe 等高层方法; 引用的 WSState 不进公开文档。
|
|
2213
|
+
*/
|
|
2210
2214
|
ws = null;
|
|
2211
|
-
/**
|
|
2215
|
+
/**
|
|
2216
|
+
* v0.15.1: token 就绪等待机制 — login 成功后 resolve, 等待方解除阻塞。
|
|
2217
|
+
* @internal — 内部同步原语 (Deferred), 非消费者 API。
|
|
2218
|
+
*/
|
|
2212
2219
|
tokenReady = newDeferred();
|
|
2213
2220
|
/** Login 进行中 — 等待方需等而非 fail-fast */
|
|
2214
2221
|
loginInFlight = false;
|