@arcships/aimux 0.5.0 → 0.6.1
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/README.md +92 -0
- package/dist/error.d.ts +28 -137
- package/dist/error.js +71 -100
- package/dist/generated/ops.d.ts +75 -0
- package/dist/generated/ops.js +80 -0
- package/dist/generated/types.d.ts +5613 -0
- package/dist/{types/CallOptions.js → generated/types.js} +1 -0
- package/dist/index.d.ts +144 -211
- package/dist/index.js +314 -344
- package/dist/native.d.ts +29 -1
- package/dist/native.js +99 -29
- package/dist/types.d.ts +1 -144
- package/dist/types.js +0 -3
- package/index.d.ts +21 -545
- package/index.js +57 -112
- package/package.json +16 -13
- package/dist/types/AiMuxError.d.ts +0 -66
- package/dist/types/AiMuxError.js +0 -2
- package/dist/types/ApiCallError.d.ts +0 -75
- package/dist/types/ApiCallError.js +0 -2
- package/dist/types/AspectRatio.d.ts +0 -11
- package/dist/types/AspectRatio.js +0 -3
- package/dist/types/AudioChunk.d.ts +0 -8
- package/dist/types/AudioChunk.js +0 -3
- package/dist/types/AudioData.d.ts +0 -11
- package/dist/types/AudioData.js +0 -3
- package/dist/types/AudioInput.d.ts +0 -8
- package/dist/types/AudioInput.js +0 -3
- package/dist/types/BreakKind.d.ts +0 -1
- package/dist/types/BreakKind.js +0 -3
- package/dist/types/CallOptions.d.ts +0 -117
- package/dist/types/CatalogueSource.d.ts +0 -4
- package/dist/types/CatalogueSource.js +0 -3
- package/dist/types/ChatCompletion.d.ts +0 -16
- package/dist/types/ChatCompletion.js +0 -2
- package/dist/types/ChatCompletionChoice.d.ts +0 -8
- package/dist/types/ChatCompletionChoice.js +0 -2
- package/dist/types/ChatCompletionChunk.d.ts +0 -15
- package/dist/types/ChatCompletionChunk.js +0 -2
- package/dist/types/ChatCompletionChunkChoice.d.ts +0 -8
- package/dist/types/ChatCompletionChunkChoice.js +0 -2
- package/dist/types/ChatCompletionChunkFunction.d.ts +0 -4
- package/dist/types/ChatCompletionChunkFunction.js +0 -3
- package/dist/types/ChatCompletionChunkToolCall.d.ts +0 -7
- package/dist/types/ChatCompletionChunkToolCall.js +0 -2
- package/dist/types/ChatCompletionDelta.d.ts +0 -7
- package/dist/types/ChatCompletionDelta.js +0 -2
- package/dist/types/ChatCompletionFunction.d.ts +0 -4
- package/dist/types/ChatCompletionFunction.js +0 -3
- package/dist/types/ChatCompletionMessage.d.ts +0 -9
- package/dist/types/ChatCompletionMessage.js +0 -2
- package/dist/types/ChatCompletionToolCall.d.ts +0 -6
- package/dist/types/ChatCompletionToolCall.js +0 -2
- package/dist/types/ChatCompletionUsage.d.ts +0 -9
- package/dist/types/ChatCompletionUsage.js +0 -2
- package/dist/types/CompletionTokensDetails.d.ts +0 -3
- package/dist/types/CompletionTokensDetails.js +0 -3
- package/dist/types/ContentPart.d.ts +0 -112
- package/dist/types/ContentPart.js +0 -2
- package/dist/types/EmbeddingCallOptions.d.ts +0 -33
- package/dist/types/EmbeddingCallOptions.js +0 -2
- package/dist/types/EmbeddingResponse.d.ts +0 -16
- package/dist/types/EmbeddingResponse.js +0 -2
- package/dist/types/EmbeddingResult.d.ts +0 -33
- package/dist/types/EmbeddingResult.js +0 -2
- package/dist/types/EmbeddingUsage.d.ts +0 -9
- package/dist/types/EmbeddingUsage.js +0 -3
- package/dist/types/FileBytes.d.ts +0 -12
- package/dist/types/FileBytes.js +0 -3
- package/dist/types/FileData.d.ts +0 -25
- package/dist/types/FileData.js +0 -2
- package/dist/types/FilePart.d.ts +0 -8
- package/dist/types/FilePart.js +0 -2
- package/dist/types/Fingerprint.d.ts +0 -21
- package/dist/types/Fingerprint.js +0 -3
- package/dist/types/FinishReason.d.ts +0 -14
- package/dist/types/FinishReason.js +0 -2
- package/dist/types/FinishReasonUnified.d.ts +0 -4
- package/dist/types/FinishReasonUnified.js +0 -3
- package/dist/types/FunctionTool.d.ts +0 -35
- package/dist/types/FunctionTool.js +0 -2
- package/dist/types/GenerateContent.d.ts +0 -88
- package/dist/types/GenerateContent.js +0 -2
- package/dist/types/GenerateObjectResult.d.ts +0 -48
- package/dist/types/GenerateObjectResult.js +0 -2
- package/dist/types/GenerateResult.d.ts +0 -45
- package/dist/types/GenerateResult.js +0 -2
- package/dist/types/GenerateTextOptions.d.ts +0 -62
- package/dist/types/GenerateTextOptions.js +0 -2
- package/dist/types/GenerateTextResult.d.ts +0 -81
- package/dist/types/GenerateTextResult.js +0 -2
- package/dist/types/HttpExchange.d.ts +0 -34
- package/dist/types/HttpExchange.js +0 -2
- package/dist/types/HttpRecord.d.ts +0 -12
- package/dist/types/HttpRecord.js +0 -3
- package/dist/types/ImageCallOptions.d.ts +0 -63
- package/dist/types/ImageCallOptions.js +0 -2
- package/dist/types/ImageFile.d.ts +0 -25
- package/dist/types/ImageFile.js +0 -2
- package/dist/types/ImageFileData.d.ts +0 -8
- package/dist/types/ImageFileData.js +0 -3
- package/dist/types/ImageOutputs.d.ts +0 -14
- package/dist/types/ImageOutputs.js +0 -3
- package/dist/types/ImageResponse.d.ts +0 -19
- package/dist/types/ImageResponse.js +0 -3
- package/dist/types/ImageResult.d.ts +0 -34
- package/dist/types/ImageResult.js +0 -2
- package/dist/types/ImageUsage.d.ts +0 -19
- package/dist/types/ImageUsage.js +0 -3
- package/dist/types/InputAudioFormat.d.ts +0 -13
- package/dist/types/InputAudioFormat.js +0 -3
- package/dist/types/InputRecord.d.ts +0 -16
- package/dist/types/InputRecord.js +0 -2
- package/dist/types/LanguageModelPromptMessage.d.ts +0 -20
- package/dist/types/LanguageModelPromptMessage.js +0 -2
- package/dist/types/MessageContent.d.ts +0 -5
- package/dist/types/MessageContent.js +0 -2
- package/dist/types/Modality.d.ts +0 -4
- package/dist/types/Modality.js +0 -3
- package/dist/types/ModelCapabilities.d.ts +0 -21
- package/dist/types/ModelCapabilities.js +0 -3
- package/dist/types/ModelCost.d.ts +0 -10
- package/dist/types/ModelCost.js +0 -3
- package/dist/types/ModelId.d.ts +0 -7
- package/dist/types/ModelId.js +0 -3
- package/dist/types/ModelLimits.d.ts +0 -17
- package/dist/types/ModelLimits.js +0 -3
- package/dist/types/ModelMessage.d.ts +0 -9
- package/dist/types/ModelMessage.js +0 -2
- package/dist/types/ModelModalities.d.ts +0 -8
- package/dist/types/ModelModalities.js +0 -2
- package/dist/types/ModelPrompt.d.ts +0 -7
- package/dist/types/ModelPrompt.js +0 -2
- package/dist/types/ModelSpec.d.ts +0 -33
- package/dist/types/ModelSpec.js +0 -2
- package/dist/types/ModelType.d.ts +0 -4
- package/dist/types/ModelType.js +0 -3
- package/dist/types/OutcomeRecord.d.ts +0 -19
- package/dist/types/OutcomeRecord.js +0 -2
- package/dist/types/OutcomeStatus.d.ts +0 -4
- package/dist/types/OutcomeStatus.js +0 -3
- package/dist/types/PrefixBreak.d.ts +0 -11
- package/dist/types/PrefixBreak.js +0 -2
- package/dist/types/PromptTokensDetails.d.ts +0 -4
- package/dist/types/PromptTokensDetails.js +0 -3
- package/dist/types/ProviderAuditSpec.d.ts +0 -33
- package/dist/types/ProviderAuditSpec.js +0 -2
- package/dist/types/ProviderFamily.d.ts +0 -5
- package/dist/types/ProviderFamily.js +0 -3
- package/dist/types/ProviderName.d.ts +0 -258
- package/dist/types/ProviderName.js +0 -262
- package/dist/types/ProviderRecord.d.ts +0 -30
- package/dist/types/ProviderRecord.js +0 -2
- package/dist/types/ProviderTool.d.ts +0 -24
- package/dist/types/ProviderTool.js +0 -2
- package/dist/types/RawToolCall.d.ts +0 -16
- package/dist/types/RawToolCall.js +0 -2
- package/dist/types/ReasoningEffort.d.ts +0 -7
- package/dist/types/ReasoningEffort.js +0 -3
- package/dist/types/ReasoningMode.d.ts +0 -4
- package/dist/types/ReasoningMode.js +0 -3
- package/dist/types/ReasoningPart.d.ts +0 -9
- package/dist/types/ReasoningPart.js +0 -3
- package/dist/types/ReasoningSpec.d.ts +0 -39
- package/dist/types/ReasoningSpec.js +0 -2
- package/dist/types/ReasoningVisibility.d.ts +0 -4
- package/dist/types/ReasoningVisibility.js +0 -3
- package/dist/types/Recording.d.ts +0 -56
- package/dist/types/Recording.js +0 -2
- package/dist/types/RequestCacheHints.d.ts +0 -9
- package/dist/types/RequestCacheHints.js +0 -3
- package/dist/types/RequestInfo.d.ts +0 -12
- package/dist/types/RequestInfo.js +0 -2
- package/dist/types/RerankingCallOptions.d.ts +0 -42
- package/dist/types/RerankingCallOptions.js +0 -2
- package/dist/types/RerankingDocuments.d.ts +0 -15
- package/dist/types/RerankingDocuments.js +0 -2
- package/dist/types/RerankingRank.d.ts +0 -13
- package/dist/types/RerankingRank.js +0 -3
- package/dist/types/RerankingResponse.d.ts +0 -28
- package/dist/types/RerankingResponse.js +0 -2
- package/dist/types/RerankingResult.d.ts +0 -31
- package/dist/types/RerankingResult.js +0 -2
- package/dist/types/ResponseFormat.d.ts +0 -11
- package/dist/types/ResponseFormat.js +0 -2
- package/dist/types/ResponseInfo.d.ts +0 -30
- package/dist/types/ResponseInfo.js +0 -2
- package/dist/types/ResponseMetadata.d.ts +0 -8
- package/dist/types/ResponseMetadata.js +0 -3
- package/dist/types/ResponseRecord.d.ts +0 -13
- package/dist/types/ResponseRecord.js +0 -3
- package/dist/types/RetryError.d.ts +0 -9
- package/dist/types/RetryError.js +0 -2
- package/dist/types/RetryErrorReason.d.ts +0 -4
- package/dist/types/RetryErrorReason.js +0 -3
- package/dist/types/Role.d.ts +0 -4
- package/dist/types/Role.js +0 -3
- package/dist/types/RuntimeModel.d.ts +0 -22
- package/dist/types/RuntimeModel.js +0 -3
- package/dist/types/SearchCallOptions.d.ts +0 -55
- package/dist/types/SearchCallOptions.js +0 -2
- package/dist/types/SearchResponse.d.ts +0 -16
- package/dist/types/SearchResponse.js +0 -2
- package/dist/types/SearchResult.d.ts +0 -32
- package/dist/types/SearchResult.js +0 -2
- package/dist/types/SearchResultItem.d.ts +0 -33
- package/dist/types/SearchResultItem.js +0 -2
- package/dist/types/SessionCall.d.ts +0 -20
- package/dist/types/SessionCall.js +0 -3
- package/dist/types/SessionChainView.d.ts +0 -10
- package/dist/types/SessionChainView.js +0 -2
- package/dist/types/SessionSource.d.ts +0 -4
- package/dist/types/SessionSource.js +0 -3
- package/dist/types/SessionStepStat.d.ts +0 -27
- package/dist/types/SessionStepStat.js +0 -2
- package/dist/types/SessionView.d.ts +0 -16
- package/dist/types/SessionView.js +0 -2
- package/dist/types/Size.d.ts +0 -11
- package/dist/types/Size.js +0 -3
- package/dist/types/SourcePart.d.ts +0 -9
- package/dist/types/SourcePart.js +0 -3
- package/dist/types/SpeechCallOptions.d.ts +0 -56
- package/dist/types/SpeechCallOptions.js +0 -2
- package/dist/types/SpeechRequest.d.ts +0 -10
- package/dist/types/SpeechRequest.js +0 -2
- package/dist/types/SpeechResponse.d.ts +0 -24
- package/dist/types/SpeechResponse.js +0 -2
- package/dist/types/SpeechResult.d.ts +0 -34
- package/dist/types/SpeechResult.js +0 -2
- package/dist/types/StreamPart.d.ts +0 -173
- package/dist/types/StreamPart.js +0 -2
- package/dist/types/StreamTextResultAggregated.d.ts +0 -74
- package/dist/types/StreamTextResultAggregated.js +0 -2
- package/dist/types/TimeoutConfiguration.d.ts +0 -32
- package/dist/types/TimeoutConfiguration.js +0 -3
- package/dist/types/TimingRecord.d.ts +0 -7
- package/dist/types/TimingRecord.js +0 -3
- package/dist/types/TokenUsage.d.ts +0 -29
- package/dist/types/TokenUsage.js +0 -3
- package/dist/types/Tool.d.ts +0 -12
- package/dist/types/Tool.js +0 -2
- package/dist/types/ToolCall.d.ts +0 -48
- package/dist/types/ToolCall.js +0 -2
- package/dist/types/ToolCallRepairReply.d.ts +0 -19
- package/dist/types/ToolCallRepairReply.js +0 -2
- package/dist/types/ToolChoice.d.ts +0 -12
- package/dist/types/ToolChoice.js +0 -3
- package/dist/types/ToolResult.d.ts +0 -22
- package/dist/types/ToolResult.js +0 -2
- package/dist/types/TraceFilter.d.ts +0 -9
- package/dist/types/TraceFilter.js +0 -3
- package/dist/types/TraceRecord.d.ts +0 -54
- package/dist/types/TraceRecord.js +0 -2
- package/dist/types/TraceStats.d.ts +0 -20
- package/dist/types/TraceStats.js +0 -3
- package/dist/types/TranscriptionCallOptions.d.ts +0 -38
- package/dist/types/TranscriptionCallOptions.js +0 -2
- package/dist/types/TranscriptionRequest.d.ts +0 -9
- package/dist/types/TranscriptionRequest.js +0 -3
- package/dist/types/TranscriptionResponse.d.ts +0 -24
- package/dist/types/TranscriptionResponse.js +0 -2
- package/dist/types/TranscriptionResult.d.ts +0 -46
- package/dist/types/TranscriptionResult.js +0 -2
- package/dist/types/TranscriptionSegment.d.ts +0 -17
- package/dist/types/TranscriptionSegment.js +0 -3
- package/dist/types/TranscriptionStreamPart.d.ts +0 -70
- package/dist/types/TranscriptionStreamPart.js +0 -2
- package/dist/types/UploadFileCallOptions.d.ts +0 -27
- package/dist/types/UploadFileCallOptions.js +0 -2
- package/dist/types/UploadFileData.d.ts +0 -17
- package/dist/types/UploadFileData.js +0 -2
- package/dist/types/UploadFileResult.d.ts +0 -35
- package/dist/types/UploadFileResult.js +0 -2
- package/dist/types/Usage.d.ts +0 -13
- package/dist/types/Usage.js +0 -2
- package/dist/types/UsageSnapshot.d.ts +0 -18
- package/dist/types/UsageSnapshot.js +0 -2
- package/dist/types/Verdict.d.ts +0 -23
- package/dist/types/Verdict.js +0 -2
- package/dist/types/VerdictConfidence.d.ts +0 -4
- package/dist/types/VerdictConfidence.js +0 -3
- package/dist/types/VerdictKind.d.ts +0 -4
- package/dist/types/VerdictKind.js +0 -3
- package/dist/types/VideoCallOptions.d.ts +0 -84
- package/dist/types/VideoCallOptions.js +0 -2
- package/dist/types/VideoData.d.ts +0 -22
- package/dist/types/VideoData.js +0 -3
- package/dist/types/VideoFile.d.ts +0 -29
- package/dist/types/VideoFile.js +0 -2
- package/dist/types/VideoFileData.d.ts +0 -8
- package/dist/types/VideoFileData.js +0 -3
- package/dist/types/VideoFrameImage.d.ts +0 -17
- package/dist/types/VideoFrameImage.js +0 -2
- package/dist/types/VideoFrameType.d.ts +0 -6
- package/dist/types/VideoFrameType.js +0 -3
- package/dist/types/VideoPollOptions.d.ts +0 -13
- package/dist/types/VideoPollOptions.js +0 -3
- package/dist/types/VideoResponse.d.ts +0 -19
- package/dist/types/VideoResponse.js +0 -3
- package/dist/types/VideoResult.d.ts +0 -29
- package/dist/types/VideoResult.js +0 -2
- package/dist/types/Warning.d.ts +0 -23
- package/dist/types/Warning.js +0 -3
- package/dist/types/serde_json/JsonValue.d.ts +0 -3
- package/dist/types/serde_json/JsonValue.js +0 -3
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { RerankingRank } from "./RerankingRank";
|
|
2
|
-
import type { RerankingResponse } from "./RerankingResponse";
|
|
3
|
-
import type { Warning } from "./Warning";
|
|
4
|
-
import type { JsonValue } from "./serde_json/JsonValue";
|
|
5
|
-
/**
|
|
6
|
-
* The result of [`RerankingModel::do_rerank`].
|
|
7
|
-
*
|
|
8
|
-
* Aligned with V4 `RerankingModelV4Result`.
|
|
9
|
-
*/
|
|
10
|
-
export type RerankingResult = {
|
|
11
|
-
/**
|
|
12
|
-
* Ordered list of reranked documents, sorted by descending relevance
|
|
13
|
-
* score. Each entry's `index` refers to the position in the original
|
|
14
|
-
* `documents` list.
|
|
15
|
-
*/
|
|
16
|
-
ranking: Array<RerankingRank>;
|
|
17
|
-
/**
|
|
18
|
-
* Additional provider-specific metadata, keyed by provider name.
|
|
19
|
-
*/
|
|
20
|
-
provider_metadata: {
|
|
21
|
-
[key in string]: JsonValue;
|
|
22
|
-
} | null;
|
|
23
|
-
/**
|
|
24
|
-
* Warnings for the call, e.g. unsupported settings.
|
|
25
|
-
*/
|
|
26
|
-
warnings: Array<Warning> | null;
|
|
27
|
-
/**
|
|
28
|
-
* Optional response information for debugging.
|
|
29
|
-
*/
|
|
30
|
-
response: RerankingResponse | null;
|
|
31
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { JsonValue } from "./serde_json/JsonValue";
|
|
2
|
-
/**
|
|
3
|
-
* How the model should format its response.
|
|
4
|
-
*/
|
|
5
|
-
export type ResponseFormat = "Text" | {
|
|
6
|
-
"Json": {
|
|
7
|
-
schema: JsonValue | null;
|
|
8
|
-
name: string | null;
|
|
9
|
-
description: string | null;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { JsonValue } from "./serde_json/JsonValue";
|
|
2
|
-
/**
|
|
3
|
-
* Response information for telemetry and debugging.
|
|
4
|
-
*
|
|
5
|
-
* Aligned with the `response` object that appears on most V4 model results.
|
|
6
|
-
* All fields are optional because different providers populate different
|
|
7
|
-
* subsets; traits whose TS spec marks `response` as required use
|
|
8
|
-
* `ResponseInfo` directly, while those that mark it optional use
|
|
9
|
-
* `Option<ResponseInfo>`.
|
|
10
|
-
*/
|
|
11
|
-
export type ResponseInfo = {
|
|
12
|
-
/**
|
|
13
|
-
* Timestamp for the start of the generated response (ISO 8601 string).
|
|
14
|
-
*/
|
|
15
|
-
timestamp: string | null;
|
|
16
|
-
/**
|
|
17
|
-
* The ID of the model that was used to generate the response.
|
|
18
|
-
*/
|
|
19
|
-
model_id: string | null;
|
|
20
|
-
/**
|
|
21
|
-
* Response headers.
|
|
22
|
-
*/
|
|
23
|
-
headers: {
|
|
24
|
-
[key in string]: string;
|
|
25
|
-
} | null;
|
|
26
|
-
/**
|
|
27
|
-
* The response body (opaque JSON).
|
|
28
|
-
*/
|
|
29
|
-
body: JsonValue | null;
|
|
30
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { AiMuxError } from "./AiMuxError";
|
|
2
|
-
import type { RetryErrorReason } from "./RetryErrorReason";
|
|
3
|
-
/**
|
|
4
|
-
* Complete error history for a retried model operation.
|
|
5
|
-
*/
|
|
6
|
-
export type RetryError = {
|
|
7
|
-
reason: RetryErrorReason;
|
|
8
|
-
errors: Array<AiMuxError>;
|
|
9
|
-
};
|
package/dist/types/RetryError.js
DELETED
package/dist/types/Role.d.ts
DELETED
package/dist/types/Role.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A model entry returned by a provider's `/models` endpoint (the sparse,
|
|
3
|
-
* account-level truth of "what this key can call").
|
|
4
|
-
*
|
|
5
|
-
* Carries only what the provider returns — typically just `id`. Configuration
|
|
6
|
-
* comes from [`ModelSpec`] (community knowledge); the host merges the two as
|
|
7
|
-
* needed (RFC-0027). aimux itself does not combine them.
|
|
8
|
-
*/
|
|
9
|
-
export type RuntimeModel = {
|
|
10
|
-
/**
|
|
11
|
-
* Model identifier, e.g. `"gpt-4o"`.
|
|
12
|
-
*/
|
|
13
|
-
id: string;
|
|
14
|
-
/**
|
|
15
|
-
* `owned_by` field from OpenAI-compatible `/models` responses.
|
|
16
|
-
*/
|
|
17
|
-
owned_by?: string | null;
|
|
18
|
-
/**
|
|
19
|
-
* `created` unix timestamp from OpenAI-compatible `/models` responses.
|
|
20
|
-
*/
|
|
21
|
-
created?: number | null;
|
|
22
|
-
};
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import type { TimeoutConfiguration } from "./TimeoutConfiguration";
|
|
2
|
-
import type { JsonValue } from "./serde_json/JsonValue";
|
|
3
|
-
/**
|
|
4
|
-
* Options passed to [`SearchModel::do_search`].
|
|
5
|
-
*/
|
|
6
|
-
export type SearchCallOptions = {
|
|
7
|
-
/**
|
|
8
|
-
* The search query string.
|
|
9
|
-
*/
|
|
10
|
-
query: string;
|
|
11
|
-
/**
|
|
12
|
-
* Maximum number of results to return.
|
|
13
|
-
*/
|
|
14
|
-
max_results: number | null;
|
|
15
|
-
/**
|
|
16
|
-
* Whether to include raw page content in results.
|
|
17
|
-
*
|
|
18
|
-
* Provider support varies; providers that cannot honor this should
|
|
19
|
-
* issue a warning rather than erroring.
|
|
20
|
-
*/
|
|
21
|
-
include_raw_content: boolean | null;
|
|
22
|
-
/**
|
|
23
|
-
* Optional time range filter (e.g. `"day"`, `"week"`, `"month"`,
|
|
24
|
-
* `"year"`). Provider support varies.
|
|
25
|
-
*/
|
|
26
|
-
time_range: string | null;
|
|
27
|
-
/**
|
|
28
|
-
* Optional list of domains to include in results.
|
|
29
|
-
*/
|
|
30
|
-
include_domains: Array<string> | null;
|
|
31
|
-
/**
|
|
32
|
-
* Optional list of domains to exclude from results.
|
|
33
|
-
*/
|
|
34
|
-
exclude_domains: Array<string> | null;
|
|
35
|
-
/**
|
|
36
|
-
* Per-call retry override. `None` uses the model default.
|
|
37
|
-
*/
|
|
38
|
-
max_retries: number | null;
|
|
39
|
-
/**
|
|
40
|
-
* Per-call operation timeout.
|
|
41
|
-
*/
|
|
42
|
-
timeout: TimeoutConfiguration | null;
|
|
43
|
-
/**
|
|
44
|
-
* Additional provider-specific options, keyed by provider name.
|
|
45
|
-
*/
|
|
46
|
-
provider_options: {
|
|
47
|
-
[key in string]: JsonValue;
|
|
48
|
-
} | null;
|
|
49
|
-
/**
|
|
50
|
-
* Additional HTTP headers to send with the request.
|
|
51
|
-
*/
|
|
52
|
-
headers: {
|
|
53
|
-
[key in string]: string;
|
|
54
|
-
} | null;
|
|
55
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { JsonValue } from "./serde_json/JsonValue";
|
|
2
|
-
/**
|
|
3
|
-
* Optional response information for a search call.
|
|
4
|
-
*/
|
|
5
|
-
export type SearchResponse = {
|
|
6
|
-
/**
|
|
7
|
-
* Response headers.
|
|
8
|
-
*/
|
|
9
|
-
headers: {
|
|
10
|
-
[key in string]: string;
|
|
11
|
-
} | null;
|
|
12
|
-
/**
|
|
13
|
-
* The response body (opaque JSON).
|
|
14
|
-
*/
|
|
15
|
-
body: JsonValue | null;
|
|
16
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { SearchResponse } from "./SearchResponse";
|
|
2
|
-
import type { SearchResultItem } from "./SearchResultItem";
|
|
3
|
-
import type { Warning } from "./Warning";
|
|
4
|
-
import type { JsonValue } from "./serde_json/JsonValue";
|
|
5
|
-
/**
|
|
6
|
-
* The result of [`SearchModel::do_search`].
|
|
7
|
-
*/
|
|
8
|
-
export type SearchResult = {
|
|
9
|
-
/**
|
|
10
|
-
* Ordered list of search results.
|
|
11
|
-
*/
|
|
12
|
-
results: Array<SearchResultItem>;
|
|
13
|
-
/**
|
|
14
|
-
* An optional direct answer / summary (some providers return
|
|
15
|
-
* an AI-generated answer alongside results).
|
|
16
|
-
*/
|
|
17
|
-
answer: string | null;
|
|
18
|
-
/**
|
|
19
|
-
* Additional provider-specific metadata.
|
|
20
|
-
*/
|
|
21
|
-
provider_metadata: {
|
|
22
|
-
[key in string]: JsonValue;
|
|
23
|
-
} | null;
|
|
24
|
-
/**
|
|
25
|
-
* Warnings for the call.
|
|
26
|
-
*/
|
|
27
|
-
warnings: Array<Warning>;
|
|
28
|
-
/**
|
|
29
|
-
* Optional response information for debugging.
|
|
30
|
-
*/
|
|
31
|
-
response: SearchResponse | null;
|
|
32
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { JsonValue } from "./serde_json/JsonValue";
|
|
2
|
-
/**
|
|
3
|
-
* A single search result item.
|
|
4
|
-
*/
|
|
5
|
-
export type SearchResultItem = {
|
|
6
|
-
/**
|
|
7
|
-
* The title of the result (e.g. page title).
|
|
8
|
-
*/
|
|
9
|
-
title: string | null;
|
|
10
|
-
/**
|
|
11
|
-
* The URL of the result.
|
|
12
|
-
*/
|
|
13
|
-
url: string | null;
|
|
14
|
-
/**
|
|
15
|
-
* A snippet/summary of the result content.
|
|
16
|
-
*/
|
|
17
|
-
content: string | null;
|
|
18
|
-
/**
|
|
19
|
-
* Raw page content (when `include_raw_content` is requested and
|
|
20
|
-
* supported by the provider).
|
|
21
|
-
*/
|
|
22
|
-
raw_content: string | null;
|
|
23
|
-
/**
|
|
24
|
-
* A relevance score (0.0–1.0) if the provider returns one.
|
|
25
|
-
*/
|
|
26
|
-
score: number | null;
|
|
27
|
-
/**
|
|
28
|
-
* Provider-specific metadata for this result.
|
|
29
|
-
*/
|
|
30
|
-
provider_metadata: {
|
|
31
|
-
[key in string]: JsonValue;
|
|
32
|
-
} | null;
|
|
33
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A single call within a session (an index entry only — call content lives
|
|
3
|
-
* in Recording (RFC-0023) / TraceRecord (RFC-0015)).
|
|
4
|
-
*/
|
|
5
|
-
export type SessionCall = {
|
|
6
|
-
/**
|
|
7
|
-
* Call-level unique id. This is the association key for the future
|
|
8
|
-
* Recording / TraceRecord `call_id` (RFC-0015/0023): once those land,
|
|
9
|
-
* this field carries their value.
|
|
10
|
-
*/
|
|
11
|
-
call_id: string;
|
|
12
|
-
/**
|
|
13
|
-
* Step within the session (0-based).
|
|
14
|
-
*/
|
|
15
|
-
step: number;
|
|
16
|
-
/**
|
|
17
|
-
* When the call was recorded (RFC 3339 UTC, millisecond precision).
|
|
18
|
-
*/
|
|
19
|
-
recorded_at: string;
|
|
20
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { PrefixBreak } from "./PrefixBreak";
|
|
2
|
-
/**
|
|
3
|
-
* Session chain view (append-only order + prefix stability, RFC-0015 §5.3).
|
|
4
|
-
*/
|
|
5
|
-
export type SessionChainView = {
|
|
6
|
-
session_id: string;
|
|
7
|
-
record_ids: Array<string>;
|
|
8
|
-
prefix_stability: number;
|
|
9
|
-
breaks: Array<PrefixBreak>;
|
|
10
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { Verdict } from "./Verdict";
|
|
2
|
-
/**
|
|
3
|
-
* One step of a session's cache-hit trajectory (RFC-0024 §4.3).
|
|
4
|
-
*/
|
|
5
|
-
export type SessionStepStat = {
|
|
6
|
-
/**
|
|
7
|
-
* Step within the session (0-based, session order).
|
|
8
|
-
*/
|
|
9
|
-
step: number;
|
|
10
|
-
/**
|
|
11
|
-
* The call's id (association key into Recording / replay, RFC-0023).
|
|
12
|
-
*/
|
|
13
|
-
call_id: string;
|
|
14
|
-
/**
|
|
15
|
-
* Reported hit rate for this step (`cache_read / input_total`); `None`
|
|
16
|
-
* when the call carried no input/cache-read usage.
|
|
17
|
-
*/
|
|
18
|
-
hit_rate?: number | null;
|
|
19
|
-
/**
|
|
20
|
-
* Audit verdict (present only when an auditor is attached).
|
|
21
|
-
*/
|
|
22
|
-
verdict?: Verdict | null;
|
|
23
|
-
/**
|
|
24
|
-
* Error string for failed calls (failures are part of the session).
|
|
25
|
-
*/
|
|
26
|
-
error?: string | null;
|
|
27
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { SessionCall } from "./SessionCall";
|
|
2
|
-
import type { SessionSource } from "./SessionSource";
|
|
3
|
-
/**
|
|
4
|
-
* Aggregated view of one session (session_id → ordered calls).
|
|
5
|
-
*/
|
|
6
|
-
export type SessionView = {
|
|
7
|
-
session_id: string;
|
|
8
|
-
/**
|
|
9
|
-
* Where the session id came from (first call's source).
|
|
10
|
-
*/
|
|
11
|
-
source: SessionSource;
|
|
12
|
-
/**
|
|
13
|
-
* Ordered calls (by step).
|
|
14
|
-
*/
|
|
15
|
-
calls: Array<SessionCall>;
|
|
16
|
-
};
|
package/dist/types/Size.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Image/video size in `{width}x{height}` format (e.g. `"1024x1024"`).
|
|
3
|
-
*
|
|
4
|
-
* Newtype that enforces the `WxH` format used by V4 image `size` and video
|
|
5
|
-
* `resolution` options. Aligned with the TS template-literal type
|
|
6
|
-
* `` `${number}x${number}` ``.
|
|
7
|
-
*/
|
|
8
|
-
export type Size = {
|
|
9
|
-
width: number;
|
|
10
|
-
height: number;
|
|
11
|
-
};
|
package/dist/types/Size.js
DELETED
package/dist/types/SourcePart.js
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import type { TimeoutConfiguration } from "./TimeoutConfiguration";
|
|
2
|
-
import type { JsonValue } from "./serde_json/JsonValue";
|
|
3
|
-
/**
|
|
4
|
-
* Options passed to [`SpeechModel::do_generate`].
|
|
5
|
-
*
|
|
6
|
-
* Aligned with V4 `SpeechModelV4CallOptions`.
|
|
7
|
-
*/
|
|
8
|
-
export type SpeechCallOptions = {
|
|
9
|
-
/**
|
|
10
|
-
* Text to convert to speech.
|
|
11
|
-
*/
|
|
12
|
-
text: string;
|
|
13
|
-
/**
|
|
14
|
-
* The voice to use (provider-specific voice ID, name, or other
|
|
15
|
-
* identifier).
|
|
16
|
-
*/
|
|
17
|
-
voice: string | null;
|
|
18
|
-
/**
|
|
19
|
-
* The desired output format for the audio, e.g. `"mp3"`, `"wav"`.
|
|
20
|
-
*/
|
|
21
|
-
output_format: string | null;
|
|
22
|
-
/**
|
|
23
|
-
* Instructions for the speech generation, e.g.
|
|
24
|
-
* `"Speak in a slow and steady tone"`.
|
|
25
|
-
*/
|
|
26
|
-
instructions: string | null;
|
|
27
|
-
/**
|
|
28
|
-
* The speed of the speech generation.
|
|
29
|
-
*/
|
|
30
|
-
speed: number | null;
|
|
31
|
-
/**
|
|
32
|
-
* The language for speech generation (ISO 639-1 code, e.g. `"en"`, or
|
|
33
|
-
* `"auto"` for automatic detection). Provider support varies.
|
|
34
|
-
*/
|
|
35
|
-
language: string | null;
|
|
36
|
-
/**
|
|
37
|
-
* Additional provider-specific options, keyed by provider name.
|
|
38
|
-
*/
|
|
39
|
-
provider_options: {
|
|
40
|
-
[key in string]: JsonValue;
|
|
41
|
-
} | null;
|
|
42
|
-
/**
|
|
43
|
-
* Per-call retry override. `None` uses the model default.
|
|
44
|
-
*/
|
|
45
|
-
max_retries: number | null;
|
|
46
|
-
/**
|
|
47
|
-
* Per-call operation timeout.
|
|
48
|
-
*/
|
|
49
|
-
timeout: TimeoutConfiguration | null;
|
|
50
|
-
/**
|
|
51
|
-
* Additional HTTP headers to send with the request.
|
|
52
|
-
*/
|
|
53
|
-
headers: {
|
|
54
|
-
[key in string]: string;
|
|
55
|
-
} | null;
|
|
56
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { JsonValue } from "./serde_json/JsonValue";
|
|
2
|
-
/**
|
|
3
|
-
* Response information for a speech call.
|
|
4
|
-
*/
|
|
5
|
-
export type SpeechResponse = {
|
|
6
|
-
/**
|
|
7
|
-
* Timestamp for the start of the generated response (ISO 8601 string).
|
|
8
|
-
*/
|
|
9
|
-
timestamp: string | null;
|
|
10
|
-
/**
|
|
11
|
-
* The ID of the model that was used to generate the response.
|
|
12
|
-
*/
|
|
13
|
-
model_id: string | null;
|
|
14
|
-
/**
|
|
15
|
-
* Response headers.
|
|
16
|
-
*/
|
|
17
|
-
headers: {
|
|
18
|
-
[key in string]: string;
|
|
19
|
-
} | null;
|
|
20
|
-
/**
|
|
21
|
-
* Response body (opaque JSON).
|
|
22
|
-
*/
|
|
23
|
-
body: JsonValue | null;
|
|
24
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { AudioData } from "./AudioData";
|
|
2
|
-
import type { SpeechRequest } from "./SpeechRequest";
|
|
3
|
-
import type { SpeechResponse } from "./SpeechResponse";
|
|
4
|
-
import type { Warning } from "./Warning";
|
|
5
|
-
import type { JsonValue } from "./serde_json/JsonValue";
|
|
6
|
-
/**
|
|
7
|
-
* The result of [`SpeechModel::do_generate`].
|
|
8
|
-
*
|
|
9
|
-
* Aligned with V4 `SpeechModelV4Result`.
|
|
10
|
-
*/
|
|
11
|
-
export type SpeechResult = {
|
|
12
|
-
/**
|
|
13
|
-
* Generated audio (base64 string or binary data).
|
|
14
|
-
*/
|
|
15
|
-
audio: AudioData;
|
|
16
|
-
/**
|
|
17
|
-
* Warnings for the call, e.g. unsupported settings.
|
|
18
|
-
*/
|
|
19
|
-
warnings: Array<Warning>;
|
|
20
|
-
/**
|
|
21
|
-
* Optional request information for telemetry and debugging.
|
|
22
|
-
*/
|
|
23
|
-
request: SpeechRequest | null;
|
|
24
|
-
/**
|
|
25
|
-
* Response information for telemetry and debugging.
|
|
26
|
-
*/
|
|
27
|
-
response: SpeechResponse;
|
|
28
|
-
/**
|
|
29
|
-
* Additional provider-specific metadata, keyed by provider name.
|
|
30
|
-
*/
|
|
31
|
-
provider_metadata: {
|
|
32
|
-
[key in string]: JsonValue;
|
|
33
|
-
} | null;
|
|
34
|
-
};
|