@cydm/pie 2.6.11 → 2.7.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/README.md +68 -2
- package/dist/builtin/extensions/ask-user/index.js +3 -3
- package/dist/builtin/extensions/plan-mode/index.js +130 -21
- package/dist/builtin/extensions/subagent/index.js +4 -5
- package/dist/builtin/extensions/todo/index.js +3 -3
- package/dist/builtin/skills/computer-use-axi/SKILL.md +103 -0
- package/dist/builtin/skills/computer-use-axi/computer-use-axi-cli.js +37 -0
- package/dist/builtin/{extensions/computer-use/index.js → skills/computer-use-axi/computer-use-axi-runtime.js} +754 -642
- package/dist/builtin/skills/computer-use-axi/package.json +11 -0
- package/dist/chunks/{chunk-ZVM234WE.js → chunk-6RBSTII7.js} +669 -594
- package/dist/chunks/{chunk-MA4CHFN4.js → chunk-IPNAFMOJ.js} +172 -230
- package/dist/chunks/{chunk-7B4IIBVS.js → chunk-R5I2QLF2.js} +1269 -4
- package/dist/chunks/{chunk-PAC62XU4.js → chunk-TWILEFLD.js} +25 -3
- package/dist/chunks/{src-HPIBCE2I.js → src-E7NCXMU5.js} +2 -2
- package/dist/chunks/{test-stream-Y7WXELAJ.js → test-stream-BWBJTFNI.js} +1 -1
- package/dist/cli.js +1979 -384
- package/models.schema.json +52 -0
- package/package.json +3 -3
- package/dist/builtin/extensions/computer-use/package.json +0 -14
- package/dist/builtin/extensions/computer-use/scripts/build-native.mjs +0 -278
- package/dist/builtin/extensions/computer-use/scripts/test-native-retention.mjs +0 -204
- package/dist/chunks/chunk-5353DEEC.js +0 -130
- package/dist/chunks/webapi-MBCKO7ZV.js +0 -2481
- package/dist/code-intel-worker.cjs +0 -211227
- /package/dist/builtin/{extensions/computer-use → skills/computer-use-axi}/prebuilt/linux/arm64/linux-bridge +0 -0
- /package/dist/builtin/{extensions/computer-use → skills/computer-use-axi}/prebuilt/linux/x64/linux-bridge +0 -0
- /package/dist/builtin/{extensions/computer-use → skills/computer-use-axi}/prebuilt/macos/arm64/pie-computer-use +0 -0
- /package/dist/builtin/{extensions/computer-use → skills/computer-use-axi}/prebuilt/macos/universal/pie-computer-use.app/Contents/Info.plist +0 -0
- /package/dist/builtin/{extensions/computer-use → skills/computer-use-axi}/prebuilt/macos/universal/pie-computer-use.app/Contents/MacOS/pie-computer-use +0 -0
- /package/dist/builtin/{extensions/computer-use → skills/computer-use-axi}/prebuilt/macos/universal/pie-computer-use.app/Contents/_CodeSignature/CodeResources +0 -0
- /package/dist/builtin/{extensions/computer-use → skills/computer-use-axi}/prebuilt/macos/x64/pie-computer-use +0 -0
- /package/dist/builtin/{extensions/computer-use → skills/computer-use-axi}/prebuilt/windows/windows-bridge.exe +0 -0
- /package/dist/builtin/{extensions/computer-use → skills/computer-use-axi}/scripts/helper-path.mjs +0 -0
- /package/dist/builtin/{extensions/computer-use → skills/computer-use-axi}/scripts/setup-helper.mjs +0 -0
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
EventStream,
|
|
4
|
+
disposeModelTransports,
|
|
4
5
|
streamSimple,
|
|
5
6
|
validateToolArguments
|
|
6
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-R5I2QLF2.js";
|
|
7
8
|
|
|
8
9
|
// ../../packages/agent-core/src/agent-loop.ts
|
|
9
10
|
function createLoopErrorMessage(error, config, signal) {
|
|
@@ -261,7 +262,15 @@ async function streamAssistantResponse(context, config, signal, stream, streamFn
|
|
|
261
262
|
}
|
|
262
263
|
}
|
|
263
264
|
}
|
|
264
|
-
|
|
265
|
+
const finalResult = await response.result();
|
|
266
|
+
if (signal?.aborted && finalResult.stopReason === "stop") {
|
|
267
|
+
const adjusted = { ...finalResult, stopReason: "aborted" };
|
|
268
|
+
if (addedPartial && context.messages.length > 0) {
|
|
269
|
+
context.messages[context.messages.length - 1] = adjusted;
|
|
270
|
+
}
|
|
271
|
+
return adjusted;
|
|
272
|
+
}
|
|
273
|
+
return finalResult;
|
|
265
274
|
}
|
|
266
275
|
async function executeToolCalls(tools, assistantMessage, signal, stream, getSteeringMessages, hooks) {
|
|
267
276
|
const toolCalls = assistantMessage.content.filter((c) => c.type === "toolCall");
|
|
@@ -449,6 +458,7 @@ var Agent = class {
|
|
|
449
458
|
followUpMode;
|
|
450
459
|
streamFn;
|
|
451
460
|
_sessionId;
|
|
461
|
+
transportOwner = {};
|
|
452
462
|
_apiKey;
|
|
453
463
|
getApiKey;
|
|
454
464
|
runningPrompt;
|
|
@@ -496,12 +506,14 @@ var Agent = class {
|
|
|
496
506
|
return this._sessionId;
|
|
497
507
|
}
|
|
498
508
|
set sessionId(value) {
|
|
509
|
+
if (this._sessionId !== value) this.releaseTransport();
|
|
499
510
|
this._sessionId = value;
|
|
500
511
|
}
|
|
501
512
|
get apiKey() {
|
|
502
513
|
return this._apiKey;
|
|
503
514
|
}
|
|
504
515
|
set apiKey(value) {
|
|
516
|
+
if (this._apiKey !== value) this.releaseTransport();
|
|
505
517
|
this._apiKey = value;
|
|
506
518
|
}
|
|
507
519
|
get thinkingBudgets() {
|
|
@@ -534,6 +546,7 @@ var Agent = class {
|
|
|
534
546
|
this._state.systemPrompt = v;
|
|
535
547
|
}
|
|
536
548
|
setModel(m) {
|
|
549
|
+
this.releaseTransport();
|
|
537
550
|
this._state.model = m;
|
|
538
551
|
}
|
|
539
552
|
setThinkingLevel(l) {
|
|
@@ -546,12 +559,14 @@ var Agent = class {
|
|
|
546
559
|
this.hooks = hooks;
|
|
547
560
|
}
|
|
548
561
|
replaceMessages(ms) {
|
|
562
|
+
this.releaseTransport();
|
|
549
563
|
this._state.messages = ms.slice();
|
|
550
564
|
}
|
|
551
565
|
appendMessage(m) {
|
|
552
566
|
this._state.messages = [...this._state.messages, m];
|
|
553
567
|
}
|
|
554
568
|
clearMessages() {
|
|
569
|
+
this.releaseTransport();
|
|
555
570
|
this._state.messages = [];
|
|
556
571
|
}
|
|
557
572
|
steer(m) {
|
|
@@ -611,13 +626,18 @@ var Agent = class {
|
|
|
611
626
|
this.followUpQueue = [];
|
|
612
627
|
return followUp;
|
|
613
628
|
}
|
|
629
|
+
releaseTransport() {
|
|
630
|
+
disposeModelTransports(this.transportOwner);
|
|
631
|
+
}
|
|
614
632
|
abort() {
|
|
633
|
+
this.releaseTransport();
|
|
615
634
|
this.abortController?.abort();
|
|
616
635
|
}
|
|
617
636
|
waitForIdle() {
|
|
618
637
|
return this.runningPrompt ?? Promise.resolve();
|
|
619
638
|
}
|
|
620
639
|
reset() {
|
|
640
|
+
this.releaseTransport();
|
|
621
641
|
this._state.messages = [];
|
|
622
642
|
this._state.isStreaming = false;
|
|
623
643
|
this._state.streamMessage = null;
|
|
@@ -763,6 +783,7 @@ var Agent = class {
|
|
|
763
783
|
reasoning,
|
|
764
784
|
apiKey: this._apiKey,
|
|
765
785
|
sessionId: this._sessionId,
|
|
786
|
+
transportOwner: this.transportOwner,
|
|
766
787
|
thinkingBudgets: this._thinkingBudgets,
|
|
767
788
|
maxRetryDelayMs: this._maxRetryDelayMs,
|
|
768
789
|
convertToLlm: this.convertToLlm,
|
|
@@ -833,7 +854,8 @@ var Agent = class {
|
|
|
833
854
|
(c) => c.type === "thinking" && c.thinking?.trim().length > 0 || c.type === "text" && c.text?.trim().length > 0 || c.type === "toolCall" && c.name?.trim().length > 0
|
|
834
855
|
);
|
|
835
856
|
if (!onlyEmpty) {
|
|
836
|
-
this.
|
|
857
|
+
const effective = this.abortController?.signal.aborted && partial.stopReason === "stop" ? { ...partial, stopReason: "aborted" } : partial;
|
|
858
|
+
this.appendMessage(effective);
|
|
837
859
|
}
|
|
838
860
|
}
|
|
839
861
|
} catch (err) {
|
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
bindToolCallerIdentity,
|
|
7
7
|
createToolCallerIdentity,
|
|
8
8
|
getToolCallerIdentity
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-TWILEFLD.js";
|
|
10
|
+
import "./chunk-R5I2QLF2.js";
|
|
11
11
|
import "./chunk-XXGYUYXI.js";
|
|
12
12
|
import "./chunk-LZQXQOPJ.js";
|
|
13
13
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
EventStream
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-R5I2QLF2.js";
|
|
5
5
|
import "./chunk-XXGYUYXI.js";
|
|
6
6
|
import "./chunk-LZQXQOPJ.js";
|
|
7
7
|
|