@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.
Files changed (34) hide show
  1. package/README.md +68 -2
  2. package/dist/builtin/extensions/ask-user/index.js +3 -3
  3. package/dist/builtin/extensions/plan-mode/index.js +130 -21
  4. package/dist/builtin/extensions/subagent/index.js +4 -5
  5. package/dist/builtin/extensions/todo/index.js +3 -3
  6. package/dist/builtin/skills/computer-use-axi/SKILL.md +103 -0
  7. package/dist/builtin/skills/computer-use-axi/computer-use-axi-cli.js +37 -0
  8. package/dist/builtin/{extensions/computer-use/index.js → skills/computer-use-axi/computer-use-axi-runtime.js} +754 -642
  9. package/dist/builtin/skills/computer-use-axi/package.json +11 -0
  10. package/dist/chunks/{chunk-ZVM234WE.js → chunk-6RBSTII7.js} +669 -594
  11. package/dist/chunks/{chunk-MA4CHFN4.js → chunk-IPNAFMOJ.js} +172 -230
  12. package/dist/chunks/{chunk-7B4IIBVS.js → chunk-R5I2QLF2.js} +1269 -4
  13. package/dist/chunks/{chunk-PAC62XU4.js → chunk-TWILEFLD.js} +25 -3
  14. package/dist/chunks/{src-HPIBCE2I.js → src-E7NCXMU5.js} +2 -2
  15. package/dist/chunks/{test-stream-Y7WXELAJ.js → test-stream-BWBJTFNI.js} +1 -1
  16. package/dist/cli.js +1979 -384
  17. package/models.schema.json +52 -0
  18. package/package.json +3 -3
  19. package/dist/builtin/extensions/computer-use/package.json +0 -14
  20. package/dist/builtin/extensions/computer-use/scripts/build-native.mjs +0 -278
  21. package/dist/builtin/extensions/computer-use/scripts/test-native-retention.mjs +0 -204
  22. package/dist/chunks/chunk-5353DEEC.js +0 -130
  23. package/dist/chunks/webapi-MBCKO7ZV.js +0 -2481
  24. package/dist/code-intel-worker.cjs +0 -211227
  25. /package/dist/builtin/{extensions/computer-use → skills/computer-use-axi}/prebuilt/linux/arm64/linux-bridge +0 -0
  26. /package/dist/builtin/{extensions/computer-use → skills/computer-use-axi}/prebuilt/linux/x64/linux-bridge +0 -0
  27. /package/dist/builtin/{extensions/computer-use → skills/computer-use-axi}/prebuilt/macos/arm64/pie-computer-use +0 -0
  28. /package/dist/builtin/{extensions/computer-use → skills/computer-use-axi}/prebuilt/macos/universal/pie-computer-use.app/Contents/Info.plist +0 -0
  29. /package/dist/builtin/{extensions/computer-use → skills/computer-use-axi}/prebuilt/macos/universal/pie-computer-use.app/Contents/MacOS/pie-computer-use +0 -0
  30. /package/dist/builtin/{extensions/computer-use → skills/computer-use-axi}/prebuilt/macos/universal/pie-computer-use.app/Contents/_CodeSignature/CodeResources +0 -0
  31. /package/dist/builtin/{extensions/computer-use → skills/computer-use-axi}/prebuilt/macos/x64/pie-computer-use +0 -0
  32. /package/dist/builtin/{extensions/computer-use → skills/computer-use-axi}/prebuilt/windows/windows-bridge.exe +0 -0
  33. /package/dist/builtin/{extensions/computer-use → skills/computer-use-axi}/scripts/helper-path.mjs +0 -0
  34. /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-7B4IIBVS.js";
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
- return await response.result();
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.appendMessage(partial);
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-PAC62XU4.js";
10
- import "./chunk-7B4IIBVS.js";
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-7B4IIBVS.js";
4
+ } from "./chunk-R5I2QLF2.js";
5
5
  import "./chunk-XXGYUYXI.js";
6
6
  import "./chunk-LZQXQOPJ.js";
7
7