@cargo-ai/cli 1.0.102 → 1.0.103
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../src/commands/ai/message.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAoCxC,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,
|
|
1
|
+
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../src/commands/ai/message.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAoCxC,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CAqUN"}
|
|
@@ -142,9 +142,22 @@ MCP client shape: { "name": string, "url": string }`)
|
|
|
142
142
|
parts: parseJson(opts.parts, "--parts"),
|
|
143
143
|
...params,
|
|
144
144
|
}));
|
|
145
|
+
// A local, not `result.assistantMessage`: narrowing a property does
|
|
146
|
+
// not hold inside the polling closure below.
|
|
147
|
+
const { assistantMessage } = result;
|
|
148
|
+
// The chat was mid-turn, so the message was queued and the turn that
|
|
149
|
+
// answers it does not exist yet — there is nothing to poll. Say so
|
|
150
|
+
// rather than waiting on an answer that has no message to arrive on.
|
|
151
|
+
if (assistantMessage === undefined) {
|
|
152
|
+
if (opts.waitUntilFinished === true) {
|
|
153
|
+
info("Queued behind the turn already running on this chat; it is answered once that finishes. Nothing to wait on yet.");
|
|
154
|
+
}
|
|
155
|
+
outputJson(result);
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
145
158
|
if (opts.waitUntilFinished === true) {
|
|
146
159
|
const intervalMs = parseInt(opts.pollingInterval, 10);
|
|
147
|
-
const finalResult = await pollUntilFinished(() => api.ai.message.get(
|
|
160
|
+
const finalResult = await pollUntilFinished(() => api.ai.message.get(assistantMessage.uuid), (r) => r.message.finishedAt, intervalMs);
|
|
148
161
|
outputJson(finalResult);
|
|
149
162
|
return;
|
|
150
163
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cargo-ai/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.103",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"homepage": "https://getcargo.ai",
|
|
@@ -67,11 +67,11 @@
|
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"@ai-sdk/harness": "^1.0.95",
|
|
69
69
|
"@ai-sdk/harness-claude-code": "^1.0.99",
|
|
70
|
-
"@cargo-ai/api": "^1.0.
|
|
70
|
+
"@cargo-ai/api": "^1.0.87",
|
|
71
71
|
"@cargo-ai/app-sdk": "^1.0.11",
|
|
72
|
-
"@cargo-ai/cdk": "^1.0.
|
|
73
|
-
"@cargo-ai/types": "^1.0.
|
|
74
|
-
"@cargo-ai/utils": "^1.0.
|
|
72
|
+
"@cargo-ai/cdk": "^1.0.99",
|
|
73
|
+
"@cargo-ai/types": "^1.0.88",
|
|
74
|
+
"@cargo-ai/utils": "^1.0.32",
|
|
75
75
|
"@cargo-ai/worker-sdk": "^1.0.20",
|
|
76
76
|
"@modelcontextprotocol/sdk": "1.29.0",
|
|
77
77
|
"ai": "^7.0.84",
|