@astralform/js 4.8.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.cjs +22 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +29 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.js +22 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -784,7 +784,8 @@ var AstralformClient = class {
|
|
|
784
784
|
name: a.name,
|
|
785
785
|
teamId: a.team_id,
|
|
786
786
|
createdAt: a.created_at,
|
|
787
|
-
updatedAt: a.updated_at
|
|
787
|
+
updatedAt: a.updated_at,
|
|
788
|
+
avatarUrl: a.avatar_url ?? null
|
|
788
789
|
}));
|
|
789
790
|
}
|
|
790
791
|
// --- Jobs API ---
|
|
@@ -1066,6 +1067,19 @@ function translateAgentIdentity(raw) {
|
|
|
1066
1067
|
description: raw.description ?? null
|
|
1067
1068
|
};
|
|
1068
1069
|
}
|
|
1070
|
+
function translateTodoItem(raw) {
|
|
1071
|
+
return {
|
|
1072
|
+
id: raw.id ?? 0,
|
|
1073
|
+
subject: raw.subject ?? "",
|
|
1074
|
+
status: raw.status ?? "pending",
|
|
1075
|
+
description: raw.description ?? null,
|
|
1076
|
+
activeForm: raw.active_form ?? null,
|
|
1077
|
+
owner: raw.owner ?? null,
|
|
1078
|
+
blockedBy: raw.blocked_by ?? null,
|
|
1079
|
+
blocks: raw.blocks ?? null,
|
|
1080
|
+
priority: raw.priority ?? null
|
|
1081
|
+
};
|
|
1082
|
+
}
|
|
1069
1083
|
function translateCustomEvent(name, data) {
|
|
1070
1084
|
switch (name) {
|
|
1071
1085
|
case "user_message":
|
|
@@ -1082,7 +1096,9 @@ function translateCustomEvent(name, data) {
|
|
|
1082
1096
|
case "todo_update":
|
|
1083
1097
|
return {
|
|
1084
1098
|
type: "todo_update",
|
|
1085
|
-
todos: data.todos ?? []
|
|
1099
|
+
todos: (data.todos ?? []).map(
|
|
1100
|
+
(t) => translateTodoItem(t)
|
|
1101
|
+
)
|
|
1086
1102
|
};
|
|
1087
1103
|
case "plan_update":
|
|
1088
1104
|
return {
|
|
@@ -1275,7 +1291,8 @@ function translateWireEvent(wire) {
|
|
|
1275
1291
|
usage: {
|
|
1276
1292
|
inputTokens: wire.usage.input_tokens ?? 0,
|
|
1277
1293
|
outputTokens: wire.usage.output_tokens ?? 0,
|
|
1278
|
-
cachedTokens: wire.usage.cached_tokens ?? 0
|
|
1294
|
+
cachedTokens: wire.usage.cached_tokens ?? 0,
|
|
1295
|
+
cacheCreationTokens: wire.usage.cache_creation_tokens ?? 0
|
|
1279
1296
|
},
|
|
1280
1297
|
ttfbMs: wire.ttfb_ms,
|
|
1281
1298
|
totalMs: wire.total_ms,
|
|
@@ -1483,6 +1500,7 @@ var ChatSession = class {
|
|
|
1483
1500
|
agent_name: options?.agentName,
|
|
1484
1501
|
plan_mode: options?.planMode,
|
|
1485
1502
|
image_mode: options?.imageMode,
|
|
1503
|
+
video_mode: options?.videoMode,
|
|
1486
1504
|
goal: options?.goal,
|
|
1487
1505
|
// Per-request model choice (client-side model selection).
|
|
1488
1506
|
provider: options?.provider,
|
|
@@ -2190,6 +2208,7 @@ var StreamManager = class {
|
|
|
2190
2208
|
uploadIds: options?.uploadIds,
|
|
2191
2209
|
planMode: options?.planMode,
|
|
2192
2210
|
imageMode: options?.imageMode,
|
|
2211
|
+
videoMode: options?.videoMode,
|
|
2193
2212
|
goal: options?.goal,
|
|
2194
2213
|
provider: options?.provider,
|
|
2195
2214
|
model: options?.model,
|