@canarycoders/ai 0.4.0 → 0.5.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/dist/index.d.cts CHANGED
@@ -57,7 +57,7 @@ interface Citation {
57
57
  startIndex?: number;
58
58
  endIndex?: number;
59
59
  }
60
- /** The standard CanaryLLM success envelope: `{ success: true, data: T }`. */
60
+ /** The standard CanaryCoders AI success envelope: `{ success: true, data: T }`. */
61
61
  interface ApiEnvelope<T> {
62
62
  success: boolean;
63
63
  data: T;
@@ -124,6 +124,12 @@ interface CreateConversationSessionParams {
124
124
  interface ConversationSession {
125
125
  session: ConversationSessionRecord;
126
126
  signedUrl: string;
127
+ /**
128
+ * Pass verbatim into the ElevenLabs client's `Conversation.startSession({ dynamicVariables })`
129
+ * so the post-call webhook correlates this session deterministically. Contains
130
+ * `canary_session_id` (this session's id).
131
+ */
132
+ dynamicVariables: Record<string, string>;
127
133
  /** seconds until the signed URL expires (≈900) */
128
134
  expiresIn: number;
129
135
  textOnly: boolean;
@@ -971,7 +977,7 @@ declare class VisionResource extends BaseResource {
971
977
  }>;
972
978
  }
973
979
 
974
- interface CanaryLLMOptions {
980
+ interface CanaryCodersAIOptions {
975
981
  /** API key. Defaults to `process.env.CANARY_AI_API_KEY` (legacy `CANARYLLM_API_KEY` still read). */
976
982
  apiKey?: string;
977
983
  /** Base URL. Defaults to `https://api.ai.canarycoders.es`. */
@@ -990,7 +996,7 @@ interface CanaryLLMOptions {
990
996
  /** Default polling behavior for queued operations. */
991
997
  poll?: PollOptions;
992
998
  }
993
- declare class CanaryLLM {
999
+ declare class CanaryCodersAI {
994
1000
  readonly chat: ChatResource;
995
1001
  readonly queue: QueueResource;
996
1002
  readonly images: ImagesResource;
@@ -1009,7 +1015,7 @@ declare class CanaryLLM {
1009
1015
  private readonly transport;
1010
1016
  private readonly baseURL;
1011
1017
  private readonly apiKey?;
1012
- constructor(options?: CanaryLLMOptions);
1018
+ constructor(options?: CanaryCodersAIOptions);
1013
1019
  /** Targets to plug into the official `openai` / `@anthropic-ai/sdk` clients. */
1014
1020
  get compat(): {
1015
1021
  openai: () => CompatTarget;
@@ -1081,5 +1087,5 @@ interface StreamAdapterOptions extends SSEOptions {
1081
1087
  }
1082
1088
 
1083
1089
  // @ts-ignore
1084
- export = CanaryLLM;
1085
- export { APIConnectionError, APIConnectionTimeoutError, APIError, type ApiEnvelope, type AudioOutputFormat, AuthenticationError, type AutoLabelParams, type AutoLabelResult, type AutoTrainParams, BadRequestError, type BoundingBox, BrokeredCredential, CanaryLLM, type CanaryLLMOptions, type ChatProvider, type ChatStreamEvent, type ChatStreamOptions, type Citation, CompatTarget, type CompleteParams, type CompletionResult, ConflictError, type ContentPart, type ConversationQuestion, type ConversationSession, type ConversationSessionRecord, type ConversationTemplate, type ConversationTemplateParams, type ConversationTemplateType, type ConversationTemplateUpdate, type ConversationTool, type ConversationVoiceSettings, type CreateConversationSessionParams, CreateRealtimeSessionParams, type DetectParams, type Detection, type DialogueInput, type DialogueParams, type DialogueResult, type DocumentContent, type EmbeddingParams, type EmbeddingResult, type FaceDetectParams, type FaceDetectionResult, FinalizeRealtimeParams, type GeneratedImage, type GeneratedVideo, type ImageContent, type ImageGenerateParams, type ImageGenerationResult, type ImageRecognitionResult, InternalServerError, Job, type JobSnapshot, type JobStatus, type JobStreamOptions, type KeyInfo, type KeyValidation, type Message, type MessageContent, type MessageRole, type ModelCapability, type ModelInfo, type MusicParams, type MusicResult, NotFoundError, PermissionError, type PollOptions, type PortalPeriod, type ProviderType, RateLimitError, RealtimeSession, RealtimeSessionRecord, type ResponseFormat, type STTResult, type SignedUrlParams, type SignedUrlResult, type SoundEffectParams, type SoundEffectResult, type SpeechParams, type StreamAdapterOptions, type StreamChunk, type StreamProtocol, type TTSResult, type TaskKind, type TextContent, type ThinkingMode, type TokenUsage, type ToolCall, type ToolCallDelta, type ToolChoice, type ToolDefinition, type TrainParams, type TrainingJob, type TranscribeParams, type TranscriptWord, UnprocessableEntityError, type UsageSummary, type VideoContent, type VideoGenerateParams, type VideoGenerationResult, type VideoUploadOptions, type VideoUploadResult, type VisionModel, type VoiceInfo, type VoiceSettings, type WebDetectParams, type WebDetectionResult, type WebEntity, type WebSearchOptions, type ZeroShotDetectParams, toBrokeredCredential };
1090
+ export = CanaryCodersAI;
1091
+ export { APIConnectionError, APIConnectionTimeoutError, APIError, type ApiEnvelope, type AudioOutputFormat, AuthenticationError, type AutoLabelParams, type AutoLabelResult, type AutoTrainParams, BadRequestError, type BoundingBox, BrokeredCredential, CanaryCodersAI, type CanaryCodersAIOptions, CanaryCodersAI as CanaryLLM, type CanaryCodersAIOptions as CanaryLLMOptions, type ChatProvider, type ChatStreamEvent, type ChatStreamOptions, type Citation, CompatTarget, type CompleteParams, type CompletionResult, ConflictError, type ContentPart, type ConversationQuestion, type ConversationSession, type ConversationSessionRecord, type ConversationTemplate, type ConversationTemplateParams, type ConversationTemplateType, type ConversationTemplateUpdate, type ConversationTool, type ConversationVoiceSettings, type CreateConversationSessionParams, CreateRealtimeSessionParams, type DetectParams, type Detection, type DialogueInput, type DialogueParams, type DialogueResult, type DocumentContent, type EmbeddingParams, type EmbeddingResult, type FaceDetectParams, type FaceDetectionResult, FinalizeRealtimeParams, type GeneratedImage, type GeneratedVideo, type ImageContent, type ImageGenerateParams, type ImageGenerationResult, type ImageRecognitionResult, InternalServerError, Job, type JobSnapshot, type JobStatus, type JobStreamOptions, type KeyInfo, type KeyValidation, type Message, type MessageContent, type MessageRole, type ModelCapability, type ModelInfo, type MusicParams, type MusicResult, NotFoundError, PermissionError, type PollOptions, type PortalPeriod, type ProviderType, RateLimitError, RealtimeSession, RealtimeSessionRecord, type ResponseFormat, type STTResult, type SignedUrlParams, type SignedUrlResult, type SoundEffectParams, type SoundEffectResult, type SpeechParams, type StreamAdapterOptions, type StreamChunk, type StreamProtocol, type TTSResult, type TaskKind, type TextContent, type ThinkingMode, type TokenUsage, type ToolCall, type ToolCallDelta, type ToolChoice, type ToolDefinition, type TrainParams, type TrainingJob, type TranscribeParams, type TranscriptWord, UnprocessableEntityError, type UsageSummary, type VideoContent, type VideoGenerateParams, type VideoGenerationResult, type VideoUploadOptions, type VideoUploadResult, type VisionModel, type VoiceInfo, type VoiceSettings, type WebDetectParams, type WebDetectionResult, type WebEntity, type WebSearchOptions, type ZeroShotDetectParams, toBrokeredCredential };
package/dist/index.d.ts CHANGED
@@ -57,7 +57,7 @@ interface Citation {
57
57
  startIndex?: number;
58
58
  endIndex?: number;
59
59
  }
60
- /** The standard CanaryLLM success envelope: `{ success: true, data: T }`. */
60
+ /** The standard CanaryCoders AI success envelope: `{ success: true, data: T }`. */
61
61
  interface ApiEnvelope<T> {
62
62
  success: boolean;
63
63
  data: T;
@@ -124,6 +124,12 @@ interface CreateConversationSessionParams {
124
124
  interface ConversationSession {
125
125
  session: ConversationSessionRecord;
126
126
  signedUrl: string;
127
+ /**
128
+ * Pass verbatim into the ElevenLabs client's `Conversation.startSession({ dynamicVariables })`
129
+ * so the post-call webhook correlates this session deterministically. Contains
130
+ * `canary_session_id` (this session's id).
131
+ */
132
+ dynamicVariables: Record<string, string>;
127
133
  /** seconds until the signed URL expires (≈900) */
128
134
  expiresIn: number;
129
135
  textOnly: boolean;
@@ -971,7 +977,7 @@ declare class VisionResource extends BaseResource {
971
977
  }>;
972
978
  }
973
979
 
974
- interface CanaryLLMOptions {
980
+ interface CanaryCodersAIOptions {
975
981
  /** API key. Defaults to `process.env.CANARY_AI_API_KEY` (legacy `CANARYLLM_API_KEY` still read). */
976
982
  apiKey?: string;
977
983
  /** Base URL. Defaults to `https://api.ai.canarycoders.es`. */
@@ -990,7 +996,7 @@ interface CanaryLLMOptions {
990
996
  /** Default polling behavior for queued operations. */
991
997
  poll?: PollOptions;
992
998
  }
993
- declare class CanaryLLM {
999
+ declare class CanaryCodersAI {
994
1000
  readonly chat: ChatResource;
995
1001
  readonly queue: QueueResource;
996
1002
  readonly images: ImagesResource;
@@ -1009,7 +1015,7 @@ declare class CanaryLLM {
1009
1015
  private readonly transport;
1010
1016
  private readonly baseURL;
1011
1017
  private readonly apiKey?;
1012
- constructor(options?: CanaryLLMOptions);
1018
+ constructor(options?: CanaryCodersAIOptions);
1013
1019
  /** Targets to plug into the official `openai` / `@anthropic-ai/sdk` clients. */
1014
1020
  get compat(): {
1015
1021
  openai: () => CompatTarget;
@@ -1080,4 +1086,4 @@ interface StreamAdapterOptions extends SSEOptions {
1080
1086
  includeRaw?: boolean;
1081
1087
  }
1082
1088
 
1083
- export { APIConnectionError, APIConnectionTimeoutError, APIError, type ApiEnvelope, type AudioOutputFormat, AuthenticationError, type AutoLabelParams, type AutoLabelResult, type AutoTrainParams, BadRequestError, type BoundingBox, BrokeredCredential, CanaryLLM, type CanaryLLMOptions, type ChatProvider, type ChatStreamEvent, type ChatStreamOptions, type Citation, CompatTarget, type CompleteParams, type CompletionResult, ConflictError, type ContentPart, type ConversationQuestion, type ConversationSession, type ConversationSessionRecord, type ConversationTemplate, type ConversationTemplateParams, type ConversationTemplateType, type ConversationTemplateUpdate, type ConversationTool, type ConversationVoiceSettings, type CreateConversationSessionParams, CreateRealtimeSessionParams, type DetectParams, type Detection, type DialogueInput, type DialogueParams, type DialogueResult, type DocumentContent, type EmbeddingParams, type EmbeddingResult, type FaceDetectParams, type FaceDetectionResult, FinalizeRealtimeParams, type GeneratedImage, type GeneratedVideo, type ImageContent, type ImageGenerateParams, type ImageGenerationResult, type ImageRecognitionResult, InternalServerError, Job, type JobSnapshot, type JobStatus, type JobStreamOptions, type KeyInfo, type KeyValidation, type Message, type MessageContent, type MessageRole, type ModelCapability, type ModelInfo, type MusicParams, type MusicResult, NotFoundError, PermissionError, type PollOptions, type PortalPeriod, type ProviderType, RateLimitError, RealtimeSession, RealtimeSessionRecord, type ResponseFormat, type STTResult, type SignedUrlParams, type SignedUrlResult, type SoundEffectParams, type SoundEffectResult, type SpeechParams, type StreamAdapterOptions, type StreamChunk, type StreamProtocol, type TTSResult, type TaskKind, type TextContent, type ThinkingMode, type TokenUsage, type ToolCall, type ToolCallDelta, type ToolChoice, type ToolDefinition, type TrainParams, type TrainingJob, type TranscribeParams, type TranscriptWord, UnprocessableEntityError, type UsageSummary, type VideoContent, type VideoGenerateParams, type VideoGenerationResult, type VideoUploadOptions, type VideoUploadResult, type VisionModel, type VoiceInfo, type VoiceSettings, type WebDetectParams, type WebDetectionResult, type WebEntity, type WebSearchOptions, type ZeroShotDetectParams, CanaryLLM as default, toBrokeredCredential };
1089
+ export { APIConnectionError, APIConnectionTimeoutError, APIError, type ApiEnvelope, type AudioOutputFormat, AuthenticationError, type AutoLabelParams, type AutoLabelResult, type AutoTrainParams, BadRequestError, type BoundingBox, BrokeredCredential, CanaryCodersAI, type CanaryCodersAIOptions, CanaryCodersAI as CanaryLLM, type CanaryCodersAIOptions as CanaryLLMOptions, type ChatProvider, type ChatStreamEvent, type ChatStreamOptions, type Citation, CompatTarget, type CompleteParams, type CompletionResult, ConflictError, type ContentPart, type ConversationQuestion, type ConversationSession, type ConversationSessionRecord, type ConversationTemplate, type ConversationTemplateParams, type ConversationTemplateType, type ConversationTemplateUpdate, type ConversationTool, type ConversationVoiceSettings, type CreateConversationSessionParams, CreateRealtimeSessionParams, type DetectParams, type Detection, type DialogueInput, type DialogueParams, type DialogueResult, type DocumentContent, type EmbeddingParams, type EmbeddingResult, type FaceDetectParams, type FaceDetectionResult, FinalizeRealtimeParams, type GeneratedImage, type GeneratedVideo, type ImageContent, type ImageGenerateParams, type ImageGenerationResult, type ImageRecognitionResult, InternalServerError, Job, type JobSnapshot, type JobStatus, type JobStreamOptions, type KeyInfo, type KeyValidation, type Message, type MessageContent, type MessageRole, type ModelCapability, type ModelInfo, type MusicParams, type MusicResult, NotFoundError, PermissionError, type PollOptions, type PortalPeriod, type ProviderType, RateLimitError, RealtimeSession, RealtimeSessionRecord, type ResponseFormat, type STTResult, type SignedUrlParams, type SignedUrlResult, type SoundEffectParams, type SoundEffectResult, type SpeechParams, type StreamAdapterOptions, type StreamChunk, type StreamProtocol, type TTSResult, type TaskKind, type TextContent, type ThinkingMode, type TokenUsage, type ToolCall, type ToolCallDelta, type ToolChoice, type ToolDefinition, type TrainParams, type TrainingJob, type TranscribeParams, type TranscriptWord, UnprocessableEntityError, type UsageSummary, type VideoContent, type VideoGenerateParams, type VideoGenerationResult, type VideoUploadOptions, type VideoUploadResult, type VisionModel, type VoiceInfo, type VoiceSettings, type WebDetectParams, type WebDetectionResult, type WebEntity, type WebSearchOptions, type ZeroShotDetectParams, CanaryCodersAI as default, toBrokeredCredential };
package/dist/index.js CHANGED
@@ -1590,7 +1590,7 @@ function readEnv(key) {
1590
1590
  if (typeof process !== "undefined" && process.env) return process.env[key];
1591
1591
  return void 0;
1592
1592
  }
1593
- var CanaryLLM = class {
1593
+ var CanaryCodersAI = class {
1594
1594
  chat;
1595
1595
  queue;
1596
1596
  images;
@@ -1649,8 +1649,8 @@ var CanaryLLM = class {
1649
1649
  };
1650
1650
 
1651
1651
  // src/index.ts
1652
- var src_default = CanaryLLM;
1652
+ var src_default = CanaryCodersAI;
1653
1653
 
1654
- export { APIConnectionError, APIConnectionTimeoutError, APIError, AuthenticationError, BadRequestError, CanaryLLM, ConflictError, InternalServerError, Job, NotFoundError, PermissionError, RateLimitError, UnprocessableEntityError, anthropicTarget, src_default as default, openaiTarget, toBrokeredCredential };
1654
+ export { APIConnectionError, APIConnectionTimeoutError, APIError, AuthenticationError, BadRequestError, CanaryCodersAI, CanaryCodersAI as CanaryLLM, ConflictError, InternalServerError, Job, NotFoundError, PermissionError, RateLimitError, UnprocessableEntityError, anthropicTarget, src_default as default, openaiTarget, toBrokeredCredential };
1655
1655
  //# sourceMappingURL=index.js.map
1656
1656
  //# sourceMappingURL=index.js.map