@ampcode/plugin 0.0.0-20261030001330-g694fa8a → 0.0.0-20261031001138-gc59f010
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/index.d.ts +31 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -696,6 +696,7 @@ declare module '@ampcode/plugin' {
|
|
|
696
696
|
| 'meta'
|
|
697
697
|
| 'minimax'
|
|
698
698
|
| 'moonshotai'
|
|
699
|
+
| 'nvidia'
|
|
699
700
|
| 'ollama-cloud'
|
|
700
701
|
| 'openai'
|
|
701
702
|
| 'thinkingmachines'
|
|
@@ -1272,6 +1273,18 @@ declare module '@ampcode/plugin' {
|
|
|
1272
1273
|
status: 'done' | 'error' | 'cancelled' | 'running' | 'pending'
|
|
1273
1274
|
}
|
|
1274
1275
|
|
|
1276
|
+
/**
|
|
1277
|
+
* Token usage of the inference that produced an assistant message.
|
|
1278
|
+
*/
|
|
1279
|
+
export interface ThreadMessageUsage {
|
|
1280
|
+
/** The model that produced the message, as the inference provider names it. */
|
|
1281
|
+
model?: string
|
|
1282
|
+
inputTokens: number
|
|
1283
|
+
outputTokens: number
|
|
1284
|
+
cacheCreationInputTokens: number | null
|
|
1285
|
+
cacheReadInputTokens: number | null
|
|
1286
|
+
}
|
|
1287
|
+
|
|
1275
1288
|
/**
|
|
1276
1289
|
* A user message in the thread.
|
|
1277
1290
|
*/
|
|
@@ -1281,6 +1294,9 @@ declare module '@ampcode/plugin' {
|
|
|
1281
1294
|
/** The message ID, which is unique in the thread. */
|
|
1282
1295
|
id: ThreadMessageID
|
|
1283
1296
|
|
|
1297
|
+
/** When the message was created, as an ISO 8601 timestamp. */
|
|
1298
|
+
createdAt?: string
|
|
1299
|
+
|
|
1284
1300
|
content: (ThreadTextBlock | ThreadToolResultBlock)[]
|
|
1285
1301
|
}
|
|
1286
1302
|
|
|
@@ -1293,6 +1309,18 @@ declare module '@ampcode/plugin' {
|
|
|
1293
1309
|
/** The message ID, which is unique in the thread. */
|
|
1294
1310
|
id: ThreadMessageID
|
|
1295
1311
|
|
|
1312
|
+
/** When the message was created, as an ISO 8601 timestamp. */
|
|
1313
|
+
createdAt?: string
|
|
1314
|
+
|
|
1315
|
+
/**
|
|
1316
|
+
* Why the message ended: `tool_use` when it calls tools, `end_turn` when the agent
|
|
1317
|
+
* finished, `cancelled` when the turn was cancelled.
|
|
1318
|
+
*/
|
|
1319
|
+
stopReason?: 'end_turn' | 'tool_use' | 'cancelled'
|
|
1320
|
+
|
|
1321
|
+
/** Token usage of the inference that produced the message, when recorded. */
|
|
1322
|
+
usage?: ThreadMessageUsage
|
|
1323
|
+
|
|
1296
1324
|
content: (ThreadTextBlock | ThreadThinkingBlock | ThreadToolUseBlock)[]
|
|
1297
1325
|
}
|
|
1298
1326
|
|
|
@@ -1305,6 +1333,9 @@ declare module '@ampcode/plugin' {
|
|
|
1305
1333
|
/** The message ID, which is unique in the thread. */
|
|
1306
1334
|
id: ThreadMessageID
|
|
1307
1335
|
|
|
1336
|
+
/** When the message was created, as an ISO 8601 timestamp. */
|
|
1337
|
+
createdAt?: string
|
|
1338
|
+
|
|
1308
1339
|
content: ThreadTextBlock[]
|
|
1309
1340
|
}
|
|
1310
1341
|
|
package/package.json
CHANGED