@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.cjs +34 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +56 -1
- package/dist/index.d.ts +56 -1
- package/dist/index.js +34 -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,19 @@ 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
|
+
)
|
|
1102
|
+
};
|
|
1103
|
+
case "plan_update":
|
|
1104
|
+
return {
|
|
1105
|
+
type: "plan_update",
|
|
1106
|
+
plan: data.plan ?? ""
|
|
1107
|
+
};
|
|
1108
|
+
case "note_update":
|
|
1109
|
+
return {
|
|
1110
|
+
type: "note_update",
|
|
1111
|
+
notes: data.notes ?? []
|
|
1086
1112
|
};
|
|
1087
1113
|
case "context_update":
|
|
1088
1114
|
return {
|
|
@@ -1265,7 +1291,8 @@ function translateWireEvent(wire) {
|
|
|
1265
1291
|
usage: {
|
|
1266
1292
|
inputTokens: wire.usage.input_tokens ?? 0,
|
|
1267
1293
|
outputTokens: wire.usage.output_tokens ?? 0,
|
|
1268
|
-
cachedTokens: wire.usage.cached_tokens ?? 0
|
|
1294
|
+
cachedTokens: wire.usage.cached_tokens ?? 0,
|
|
1295
|
+
cacheCreationTokens: wire.usage.cache_creation_tokens ?? 0
|
|
1269
1296
|
},
|
|
1270
1297
|
ttfbMs: wire.ttfb_ms,
|
|
1271
1298
|
totalMs: wire.total_ms,
|
|
@@ -1473,6 +1500,7 @@ var ChatSession = class {
|
|
|
1473
1500
|
agent_name: options?.agentName,
|
|
1474
1501
|
plan_mode: options?.planMode,
|
|
1475
1502
|
image_mode: options?.imageMode,
|
|
1503
|
+
video_mode: options?.videoMode,
|
|
1476
1504
|
goal: options?.goal,
|
|
1477
1505
|
// Per-request model choice (client-side model selection).
|
|
1478
1506
|
provider: options?.provider,
|
|
@@ -2075,6 +2103,8 @@ var ChatEventType = {
|
|
|
2075
2103
|
UserMessage: "user_message",
|
|
2076
2104
|
TitleGenerated: "title_generated",
|
|
2077
2105
|
TodoUpdate: "todo_update",
|
|
2106
|
+
PlanUpdate: "plan_update",
|
|
2107
|
+
NoteUpdate: "note_update",
|
|
2078
2108
|
ContextUpdate: "context_update",
|
|
2079
2109
|
SubagentStart: "subagent_start",
|
|
2080
2110
|
SubagentStop: "subagent_stop",
|
|
@@ -2178,6 +2208,7 @@ var StreamManager = class {
|
|
|
2178
2208
|
uploadIds: options?.uploadIds,
|
|
2179
2209
|
planMode: options?.planMode,
|
|
2180
2210
|
imageMode: options?.imageMode,
|
|
2211
|
+
videoMode: options?.videoMode,
|
|
2181
2212
|
goal: options?.goal,
|
|
2182
2213
|
provider: options?.provider,
|
|
2183
2214
|
model: options?.model,
|