@astralform/js 4.7.0 → 4.9.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
@@ -19,6 +19,16 @@ interface TodoItem {
19
19
  interface TodoUpdatePayload {
20
20
  todos: TodoItem[];
21
21
  }
22
+ /** The conversation's plan, as markdown, after the agent wrote or revised it.
23
+ * Full body rather than a diff — `write_plan` replaces the document wholesale. */
24
+ interface PlanUpdatePayload {
25
+ plan: string;
26
+ }
27
+ /** Names of the conversation's notes, after one was written or deleted.
28
+ * Names only; bodies are unbounded and read on demand. */
29
+ interface NoteUpdatePayload {
30
+ notes: string[];
31
+ }
22
32
  interface TitleGeneratedPayload {
23
33
  title: string;
24
34
  }
@@ -188,6 +198,8 @@ declare const ChatEventType: {
188
198
  readonly UserMessage: "user_message";
189
199
  readonly TitleGenerated: "title_generated";
190
200
  readonly TodoUpdate: "todo_update";
201
+ readonly PlanUpdate: "plan_update";
202
+ readonly NoteUpdate: "note_update";
191
203
  readonly ContextUpdate: "context_update";
192
204
  readonly SubagentStart: "subagent_start";
193
205
  readonly SubagentStop: "subagent_stop";
@@ -285,6 +297,7 @@ interface WireMessageStop extends WireEnvelope {
285
297
  input_tokens?: number;
286
298
  output_tokens?: number;
287
299
  cached_tokens?: number;
300
+ cache_creation_tokens?: number;
288
301
  };
289
302
  ttfb_ms?: number | null;
290
303
  total_ms: number;
@@ -332,6 +345,8 @@ interface TurnUsage {
332
345
  inputTokens: number;
333
346
  outputTokens: number;
334
347
  cachedTokens: number;
348
+ /** Tokens written to the model's prompt cache (wire: `cache_creation_tokens`). */
349
+ cacheCreationTokens: number;
335
350
  }
336
351
  type BlockDeltaPayload = {
337
352
  channel: "text";
@@ -432,6 +447,20 @@ type ChatEvent = {
432
447
  } | {
433
448
  type: "todo_update";
434
449
  todos: TodoItem[];
450
+ }
451
+ /** The conversation's plan, as markdown, after the agent wrote or revised it.
452
+ * Carries the FULL body rather than a diff: the backend replaces the plan
453
+ * wholesale (`write_plan` — "Replaces any existing plan"), so a consumer that
454
+ * merged deltas would drift from the stored document. */
455
+ | {
456
+ type: "plan_update";
457
+ plan: string;
458
+ }
459
+ /** Names of the conversation's notes, after one was written or deleted. Names
460
+ * only — bodies are unbounded and read on demand. */
461
+ | {
462
+ type: "note_update";
463
+ notes: string[];
435
464
  } | {
436
465
  type: "context_update";
437
466
  context: Record<string, unknown>;
@@ -603,6 +632,8 @@ interface TeamAgentSummary {
603
632
  teamId: string;
604
633
  createdAt: string;
605
634
  updatedAt: string;
635
+ /** Agent avatar URL, when the team has set one (wire: `avatar_url`). */
636
+ avatarUrl?: string | null;
606
637
  }
607
638
  interface SkillInfo {
608
639
  name: string;
@@ -674,6 +705,7 @@ interface ChatStreamRequest {
674
705
  agent_name?: string;
675
706
  plan_mode?: boolean;
676
707
  image_mode?: boolean;
708
+ video_mode?: boolean;
677
709
  /**
678
710
  * Start a durable long-horizon goal for this run (goal mode). The backend mints
679
711
  * an agent_goal from this text and drives the run under a budget until the
@@ -779,6 +811,22 @@ interface SendOptions$1 extends ModelChoiceOptions {
779
811
  * The `image_mode` field itself is accepted from Astralform ≥ 0.59.0.
780
812
  */
781
813
  imageMode?: boolean;
814
+ /**
815
+ * Put this turn in video mode, attaching the video-generation tool.
816
+ *
817
+ * Off by default and per-message, for a sharper reason than images: a clip
818
+ * occupies one shared GPU for minutes, during which image generation on the
819
+ * same host cannot run at all. The tool is not attached unless this is set.
820
+ *
821
+ * Mutually exclusive with `imageMode` at the composer level — which is why a
822
+ * video turn also gets the image tool server-side: the user cannot select
823
+ * both, so the agent must be able to produce its own first frame.
824
+ *
825
+ * `generate_video` animates an EXISTING image; it cannot start from text, and
826
+ * the clip is silent. Gate the affordance on `AgentStatus.capabilities`
827
+ * (`video`), the same way image mode does.
828
+ */
829
+ videoMode?: boolean;
782
830
  /**
783
831
  * Start a durable long-horizon goal for this run (goal mode). The text becomes
784
832
  * the goal's objective; the backend keeps the agent working under a budget until
@@ -1308,6 +1356,13 @@ interface SendOptions extends ModelChoiceOptions {
1308
1356
  * provider. Gate the affordance on `AgentStatus.capabilities`.
1309
1357
  */
1310
1358
  imageMode?: boolean;
1359
+ /**
1360
+ * Attach the video-generation tool to this turn. Mutually exclusive with
1361
+ * `imageMode` at the composer level. See `SendOptions.videoMode` in types.ts
1362
+ * for the full rule — a clip animates an existing image, is silent, and holds
1363
+ * one shared GPU for minutes, so it is per-message and off by default.
1364
+ */
1365
+ videoMode?: boolean;
1311
1366
  /**
1312
1367
  * Start a durable long-horizon goal for this run (goal mode) — the text is the
1313
1368
  * goal objective the backend drives to completion. Omit for a normal turn.
@@ -1470,4 +1525,4 @@ declare function isEmbeddedResource(value: unknown): value is {
1470
1525
  */
1471
1526
  declare function parseEmbeddedResource(value: unknown): EmbeddedResource | null;
1472
1527
 
1473
- export { type ActiveJob, type AgentCapability, type AgentIdentity, type AgentInfo, type AgentStatus, type AssetCreatedPayload, type AstralformApiKeyConfig, AstralformClient, type AstralformConfig, AstralformError, type AstralformUserTokenConfig, type AttachmentStagedPayload, AuthenticationError, type BlockDeltaPayload, CONVERSATION_PAGE_SIZE, type ChatEvent, ChatEventType, type ChatEventTypeValue, ChatSession, type ChatStorage, type ChatStreamEvent, type ChatStreamRequest, ConnectionError, type ContextUpdatePayload, type ContextWarningPayload, type Conversation, type ConversationAsset, type ConversationEvent, type DesktopStreamPayload, type EmbeddedResource, type FeedbackRequest, type FeedbackResponse, InMemoryStorage, type JobCreateResponse, type JobStatus, type JobSummary, LLMNotConfiguredError, type MemoryRecallPayload, type MemoryRecord, type MemoryUpdatePayload, type Message, type ModelChoiceOptions, type ModelOption, type MyToolGrantsPage, type PromptSuggestionPayload, type ProtocolAdapter, ProtocolRegistry, RateLimitError, type RateLimitErrorDetails, type RawSseEvent, type ReasoningEffort, type SendOptions, ServerError, type SkillInfo, StreamAbortedError, type StreamJobSSEOptions, StreamManager, type StreamManagerEvent, type StreamState, type SubagentStartPayload, type SubagentStopPayload, type TaskStatus, type TeamAgentSummary, type TeamSummary, type TitleGeneratedPayload, type TodoItem, type TodoUpdatePayload, type ToolApprovalDecision, type ToolApprovalGrantedPayload, type ToolApprovalRequest, type ToolApprovalRequestedPayload, type ToolApprovalScope, type ToolCallRequest, type ToolDefinition, type ToolGrant, type ToolHandler, type ToolHarnessWarningPayload, type ToolPermissionDeniedPayload, ToolRegistry, type ToolResult, type ToolResultRequest, type TurnUsage, type UIComponentsConfig, type UserUnavailablePayload, type WireBlockDelta, type WireBlockDeltaPayload, type WireBlockKind, type WireBlockStart, type WireBlockStatus, type WireBlockStop, type WireCustomEvent, type WireErrorEvent, type WireEvent, type WireInputArgDelta, type WireInputDelta, type WireKeepalive, type WireMessageStart, type WireMessageStop, type WireOutputDelta, type WireRetryEvent, type WireSignatureDelta, type WireStallWarning, type WireStatusDelta, type WireStopReason, type WireTextDelta, type WireThinkingDelta, type WorkspaceReadyPayload, generateId, isEmbeddedResource, mapSseToChat, parseEmbeddedResource, replayEvents, streamJobSSE, translateDelta };
1528
+ export { type ActiveJob, type AgentCapability, type AgentIdentity, type AgentInfo, type AgentStatus, type AssetCreatedPayload, type AstralformApiKeyConfig, AstralformClient, type AstralformConfig, AstralformError, type AstralformUserTokenConfig, type AttachmentStagedPayload, AuthenticationError, type BlockDeltaPayload, CONVERSATION_PAGE_SIZE, type ChatEvent, ChatEventType, type ChatEventTypeValue, ChatSession, type ChatStorage, type ChatStreamEvent, type ChatStreamRequest, ConnectionError, type ContextUpdatePayload, type ContextWarningPayload, type Conversation, type ConversationAsset, type ConversationEvent, type DesktopStreamPayload, type EmbeddedResource, type FeedbackRequest, type FeedbackResponse, InMemoryStorage, type JobCreateResponse, type JobStatus, type JobSummary, LLMNotConfiguredError, type MemoryRecallPayload, type MemoryRecord, type MemoryUpdatePayload, type Message, type ModelChoiceOptions, type ModelOption, type MyToolGrantsPage, type NoteUpdatePayload, type PlanUpdatePayload, type PromptSuggestionPayload, type ProtocolAdapter, ProtocolRegistry, RateLimitError, type RateLimitErrorDetails, type RawSseEvent, type ReasoningEffort, type SendOptions, ServerError, type SkillInfo, StreamAbortedError, type StreamJobSSEOptions, StreamManager, type StreamManagerEvent, type StreamState, type SubagentStartPayload, type SubagentStopPayload, type TaskStatus, type TeamAgentSummary, type TeamSummary, type TitleGeneratedPayload, type TodoItem, type TodoUpdatePayload, type ToolApprovalDecision, type ToolApprovalGrantedPayload, type ToolApprovalRequest, type ToolApprovalRequestedPayload, type ToolApprovalScope, type ToolCallRequest, type ToolDefinition, type ToolGrant, type ToolHandler, type ToolHarnessWarningPayload, type ToolPermissionDeniedPayload, ToolRegistry, type ToolResult, type ToolResultRequest, type TurnUsage, type UIComponentsConfig, type UserUnavailablePayload, type WireBlockDelta, type WireBlockDeltaPayload, type WireBlockKind, type WireBlockStart, type WireBlockStatus, type WireBlockStop, type WireCustomEvent, type WireErrorEvent, type WireEvent, type WireInputArgDelta, type WireInputDelta, type WireKeepalive, type WireMessageStart, type WireMessageStop, type WireOutputDelta, type WireRetryEvent, type WireSignatureDelta, type WireStallWarning, type WireStatusDelta, type WireStopReason, type WireTextDelta, type WireThinkingDelta, type WorkspaceReadyPayload, generateId, isEmbeddedResource, mapSseToChat, parseEmbeddedResource, replayEvents, streamJobSSE, translateDelta };
package/dist/index.d.ts CHANGED
@@ -19,6 +19,16 @@ interface TodoItem {
19
19
  interface TodoUpdatePayload {
20
20
  todos: TodoItem[];
21
21
  }
22
+ /** The conversation's plan, as markdown, after the agent wrote or revised it.
23
+ * Full body rather than a diff — `write_plan` replaces the document wholesale. */
24
+ interface PlanUpdatePayload {
25
+ plan: string;
26
+ }
27
+ /** Names of the conversation's notes, after one was written or deleted.
28
+ * Names only; bodies are unbounded and read on demand. */
29
+ interface NoteUpdatePayload {
30
+ notes: string[];
31
+ }
22
32
  interface TitleGeneratedPayload {
23
33
  title: string;
24
34
  }
@@ -188,6 +198,8 @@ declare const ChatEventType: {
188
198
  readonly UserMessage: "user_message";
189
199
  readonly TitleGenerated: "title_generated";
190
200
  readonly TodoUpdate: "todo_update";
201
+ readonly PlanUpdate: "plan_update";
202
+ readonly NoteUpdate: "note_update";
191
203
  readonly ContextUpdate: "context_update";
192
204
  readonly SubagentStart: "subagent_start";
193
205
  readonly SubagentStop: "subagent_stop";
@@ -285,6 +297,7 @@ interface WireMessageStop extends WireEnvelope {
285
297
  input_tokens?: number;
286
298
  output_tokens?: number;
287
299
  cached_tokens?: number;
300
+ cache_creation_tokens?: number;
288
301
  };
289
302
  ttfb_ms?: number | null;
290
303
  total_ms: number;
@@ -332,6 +345,8 @@ interface TurnUsage {
332
345
  inputTokens: number;
333
346
  outputTokens: number;
334
347
  cachedTokens: number;
348
+ /** Tokens written to the model's prompt cache (wire: `cache_creation_tokens`). */
349
+ cacheCreationTokens: number;
335
350
  }
336
351
  type BlockDeltaPayload = {
337
352
  channel: "text";
@@ -432,6 +447,20 @@ type ChatEvent = {
432
447
  } | {
433
448
  type: "todo_update";
434
449
  todos: TodoItem[];
450
+ }
451
+ /** The conversation's plan, as markdown, after the agent wrote or revised it.
452
+ * Carries the FULL body rather than a diff: the backend replaces the plan
453
+ * wholesale (`write_plan` — "Replaces any existing plan"), so a consumer that
454
+ * merged deltas would drift from the stored document. */
455
+ | {
456
+ type: "plan_update";
457
+ plan: string;
458
+ }
459
+ /** Names of the conversation's notes, after one was written or deleted. Names
460
+ * only — bodies are unbounded and read on demand. */
461
+ | {
462
+ type: "note_update";
463
+ notes: string[];
435
464
  } | {
436
465
  type: "context_update";
437
466
  context: Record<string, unknown>;
@@ -603,6 +632,8 @@ interface TeamAgentSummary {
603
632
  teamId: string;
604
633
  createdAt: string;
605
634
  updatedAt: string;
635
+ /** Agent avatar URL, when the team has set one (wire: `avatar_url`). */
636
+ avatarUrl?: string | null;
606
637
  }
607
638
  interface SkillInfo {
608
639
  name: string;
@@ -674,6 +705,7 @@ interface ChatStreamRequest {
674
705
  agent_name?: string;
675
706
  plan_mode?: boolean;
676
707
  image_mode?: boolean;
708
+ video_mode?: boolean;
677
709
  /**
678
710
  * Start a durable long-horizon goal for this run (goal mode). The backend mints
679
711
  * an agent_goal from this text and drives the run under a budget until the
@@ -779,6 +811,22 @@ interface SendOptions$1 extends ModelChoiceOptions {
779
811
  * The `image_mode` field itself is accepted from Astralform ≥ 0.59.0.
780
812
  */
781
813
  imageMode?: boolean;
814
+ /**
815
+ * Put this turn in video mode, attaching the video-generation tool.
816
+ *
817
+ * Off by default and per-message, for a sharper reason than images: a clip
818
+ * occupies one shared GPU for minutes, during which image generation on the
819
+ * same host cannot run at all. The tool is not attached unless this is set.
820
+ *
821
+ * Mutually exclusive with `imageMode` at the composer level — which is why a
822
+ * video turn also gets the image tool server-side: the user cannot select
823
+ * both, so the agent must be able to produce its own first frame.
824
+ *
825
+ * `generate_video` animates an EXISTING image; it cannot start from text, and
826
+ * the clip is silent. Gate the affordance on `AgentStatus.capabilities`
827
+ * (`video`), the same way image mode does.
828
+ */
829
+ videoMode?: boolean;
782
830
  /**
783
831
  * Start a durable long-horizon goal for this run (goal mode). The text becomes
784
832
  * the goal's objective; the backend keeps the agent working under a budget until
@@ -1308,6 +1356,13 @@ interface SendOptions extends ModelChoiceOptions {
1308
1356
  * provider. Gate the affordance on `AgentStatus.capabilities`.
1309
1357
  */
1310
1358
  imageMode?: boolean;
1359
+ /**
1360
+ * Attach the video-generation tool to this turn. Mutually exclusive with
1361
+ * `imageMode` at the composer level. See `SendOptions.videoMode` in types.ts
1362
+ * for the full rule — a clip animates an existing image, is silent, and holds
1363
+ * one shared GPU for minutes, so it is per-message and off by default.
1364
+ */
1365
+ videoMode?: boolean;
1311
1366
  /**
1312
1367
  * Start a durable long-horizon goal for this run (goal mode) — the text is the
1313
1368
  * goal objective the backend drives to completion. Omit for a normal turn.
@@ -1470,4 +1525,4 @@ declare function isEmbeddedResource(value: unknown): value is {
1470
1525
  */
1471
1526
  declare function parseEmbeddedResource(value: unknown): EmbeddedResource | null;
1472
1527
 
1473
- export { type ActiveJob, type AgentCapability, type AgentIdentity, type AgentInfo, type AgentStatus, type AssetCreatedPayload, type AstralformApiKeyConfig, AstralformClient, type AstralformConfig, AstralformError, type AstralformUserTokenConfig, type AttachmentStagedPayload, AuthenticationError, type BlockDeltaPayload, CONVERSATION_PAGE_SIZE, type ChatEvent, ChatEventType, type ChatEventTypeValue, ChatSession, type ChatStorage, type ChatStreamEvent, type ChatStreamRequest, ConnectionError, type ContextUpdatePayload, type ContextWarningPayload, type Conversation, type ConversationAsset, type ConversationEvent, type DesktopStreamPayload, type EmbeddedResource, type FeedbackRequest, type FeedbackResponse, InMemoryStorage, type JobCreateResponse, type JobStatus, type JobSummary, LLMNotConfiguredError, type MemoryRecallPayload, type MemoryRecord, type MemoryUpdatePayload, type Message, type ModelChoiceOptions, type ModelOption, type MyToolGrantsPage, type PromptSuggestionPayload, type ProtocolAdapter, ProtocolRegistry, RateLimitError, type RateLimitErrorDetails, type RawSseEvent, type ReasoningEffort, type SendOptions, ServerError, type SkillInfo, StreamAbortedError, type StreamJobSSEOptions, StreamManager, type StreamManagerEvent, type StreamState, type SubagentStartPayload, type SubagentStopPayload, type TaskStatus, type TeamAgentSummary, type TeamSummary, type TitleGeneratedPayload, type TodoItem, type TodoUpdatePayload, type ToolApprovalDecision, type ToolApprovalGrantedPayload, type ToolApprovalRequest, type ToolApprovalRequestedPayload, type ToolApprovalScope, type ToolCallRequest, type ToolDefinition, type ToolGrant, type ToolHandler, type ToolHarnessWarningPayload, type ToolPermissionDeniedPayload, ToolRegistry, type ToolResult, type ToolResultRequest, type TurnUsage, type UIComponentsConfig, type UserUnavailablePayload, type WireBlockDelta, type WireBlockDeltaPayload, type WireBlockKind, type WireBlockStart, type WireBlockStatus, type WireBlockStop, type WireCustomEvent, type WireErrorEvent, type WireEvent, type WireInputArgDelta, type WireInputDelta, type WireKeepalive, type WireMessageStart, type WireMessageStop, type WireOutputDelta, type WireRetryEvent, type WireSignatureDelta, type WireStallWarning, type WireStatusDelta, type WireStopReason, type WireTextDelta, type WireThinkingDelta, type WorkspaceReadyPayload, generateId, isEmbeddedResource, mapSseToChat, parseEmbeddedResource, replayEvents, streamJobSSE, translateDelta };
1528
+ export { type ActiveJob, type AgentCapability, type AgentIdentity, type AgentInfo, type AgentStatus, type AssetCreatedPayload, type AstralformApiKeyConfig, AstralformClient, type AstralformConfig, AstralformError, type AstralformUserTokenConfig, type AttachmentStagedPayload, AuthenticationError, type BlockDeltaPayload, CONVERSATION_PAGE_SIZE, type ChatEvent, ChatEventType, type ChatEventTypeValue, ChatSession, type ChatStorage, type ChatStreamEvent, type ChatStreamRequest, ConnectionError, type ContextUpdatePayload, type ContextWarningPayload, type Conversation, type ConversationAsset, type ConversationEvent, type DesktopStreamPayload, type EmbeddedResource, type FeedbackRequest, type FeedbackResponse, InMemoryStorage, type JobCreateResponse, type JobStatus, type JobSummary, LLMNotConfiguredError, type MemoryRecallPayload, type MemoryRecord, type MemoryUpdatePayload, type Message, type ModelChoiceOptions, type ModelOption, type MyToolGrantsPage, type NoteUpdatePayload, type PlanUpdatePayload, type PromptSuggestionPayload, type ProtocolAdapter, ProtocolRegistry, RateLimitError, type RateLimitErrorDetails, type RawSseEvent, type ReasoningEffort, type SendOptions, ServerError, type SkillInfo, StreamAbortedError, type StreamJobSSEOptions, StreamManager, type StreamManagerEvent, type StreamState, type SubagentStartPayload, type SubagentStopPayload, type TaskStatus, type TeamAgentSummary, type TeamSummary, type TitleGeneratedPayload, type TodoItem, type TodoUpdatePayload, type ToolApprovalDecision, type ToolApprovalGrantedPayload, type ToolApprovalRequest, type ToolApprovalRequestedPayload, type ToolApprovalScope, type ToolCallRequest, type ToolDefinition, type ToolGrant, type ToolHandler, type ToolHarnessWarningPayload, type ToolPermissionDeniedPayload, ToolRegistry, type ToolResult, type ToolResultRequest, type TurnUsage, type UIComponentsConfig, type UserUnavailablePayload, type WireBlockDelta, type WireBlockDeltaPayload, type WireBlockKind, type WireBlockStart, type WireBlockStatus, type WireBlockStop, type WireCustomEvent, type WireErrorEvent, type WireEvent, type WireInputArgDelta, type WireInputDelta, type WireKeepalive, type WireMessageStart, type WireMessageStop, type WireOutputDelta, type WireRetryEvent, type WireSignatureDelta, type WireStallWarning, type WireStatusDelta, type WireStopReason, type WireTextDelta, type WireThinkingDelta, type WorkspaceReadyPayload, generateId, isEmbeddedResource, mapSseToChat, parseEmbeddedResource, replayEvents, streamJobSSE, translateDelta };
package/dist/index.js CHANGED
@@ -737,7 +737,8 @@ var AstralformClient = class {
737
737
  name: a.name,
738
738
  teamId: a.team_id,
739
739
  createdAt: a.created_at,
740
- updatedAt: a.updated_at
740
+ updatedAt: a.updated_at,
741
+ avatarUrl: a.avatar_url ?? null
741
742
  }));
742
743
  }
743
744
  // --- Jobs API ---
@@ -1019,6 +1020,19 @@ function translateAgentIdentity(raw) {
1019
1020
  description: raw.description ?? null
1020
1021
  };
1021
1022
  }
1023
+ function translateTodoItem(raw) {
1024
+ return {
1025
+ id: raw.id ?? 0,
1026
+ subject: raw.subject ?? "",
1027
+ status: raw.status ?? "pending",
1028
+ description: raw.description ?? null,
1029
+ activeForm: raw.active_form ?? null,
1030
+ owner: raw.owner ?? null,
1031
+ blockedBy: raw.blocked_by ?? null,
1032
+ blocks: raw.blocks ?? null,
1033
+ priority: raw.priority ?? null
1034
+ };
1035
+ }
1022
1036
  function translateCustomEvent(name, data) {
1023
1037
  switch (name) {
1024
1038
  case "user_message":
@@ -1035,7 +1049,19 @@ function translateCustomEvent(name, data) {
1035
1049
  case "todo_update":
1036
1050
  return {
1037
1051
  type: "todo_update",
1038
- todos: data.todos ?? []
1052
+ todos: (data.todos ?? []).map(
1053
+ (t) => translateTodoItem(t)
1054
+ )
1055
+ };
1056
+ case "plan_update":
1057
+ return {
1058
+ type: "plan_update",
1059
+ plan: data.plan ?? ""
1060
+ };
1061
+ case "note_update":
1062
+ return {
1063
+ type: "note_update",
1064
+ notes: data.notes ?? []
1039
1065
  };
1040
1066
  case "context_update":
1041
1067
  return {
@@ -1218,7 +1244,8 @@ function translateWireEvent(wire) {
1218
1244
  usage: {
1219
1245
  inputTokens: wire.usage.input_tokens ?? 0,
1220
1246
  outputTokens: wire.usage.output_tokens ?? 0,
1221
- cachedTokens: wire.usage.cached_tokens ?? 0
1247
+ cachedTokens: wire.usage.cached_tokens ?? 0,
1248
+ cacheCreationTokens: wire.usage.cache_creation_tokens ?? 0
1222
1249
  },
1223
1250
  ttfbMs: wire.ttfb_ms,
1224
1251
  totalMs: wire.total_ms,
@@ -1426,6 +1453,7 @@ var ChatSession = class {
1426
1453
  agent_name: options?.agentName,
1427
1454
  plan_mode: options?.planMode,
1428
1455
  image_mode: options?.imageMode,
1456
+ video_mode: options?.videoMode,
1429
1457
  goal: options?.goal,
1430
1458
  // Per-request model choice (client-side model selection).
1431
1459
  provider: options?.provider,
@@ -2028,6 +2056,8 @@ var ChatEventType = {
2028
2056
  UserMessage: "user_message",
2029
2057
  TitleGenerated: "title_generated",
2030
2058
  TodoUpdate: "todo_update",
2059
+ PlanUpdate: "plan_update",
2060
+ NoteUpdate: "note_update",
2031
2061
  ContextUpdate: "context_update",
2032
2062
  SubagentStart: "subagent_start",
2033
2063
  SubagentStop: "subagent_stop",
@@ -2131,6 +2161,7 @@ var StreamManager = class {
2131
2161
  uploadIds: options?.uploadIds,
2132
2162
  planMode: options?.planMode,
2133
2163
  imageMode: options?.imageMode,
2164
+ videoMode: options?.videoMode,
2134
2165
  goal: options?.goal,
2135
2166
  provider: options?.provider,
2136
2167
  model: options?.model,