poe-code 3.0.154 → 3.0.156

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 (53) hide show
  1. package/dist/cli/commands/auth.js +7 -2
  2. package/dist/cli/commands/auth.js.map +1 -1
  3. package/dist/cli/commands/configure.js +3 -2
  4. package/dist/cli/commands/configure.js.map +1 -1
  5. package/dist/cli/commands/experiment.js +2 -1
  6. package/dist/cli/commands/experiment.js.map +1 -1
  7. package/dist/cli/commands/generate.js +3 -3
  8. package/dist/cli/commands/generate.js.map +1 -1
  9. package/dist/cli/commands/install.js +3 -4
  10. package/dist/cli/commands/install.js.map +1 -1
  11. package/dist/cli/commands/launch.js +15 -7
  12. package/dist/cli/commands/launch.js.map +1 -1
  13. package/dist/cli/commands/logout.js +1 -1
  14. package/dist/cli/commands/logout.js.map +1 -1
  15. package/dist/cli/commands/mcp.js +11 -11
  16. package/dist/cli/commands/mcp.js.map +1 -1
  17. package/dist/cli/commands/pipeline.js +3 -2
  18. package/dist/cli/commands/pipeline.js.map +1 -1
  19. package/dist/cli/commands/plan.d.ts +3 -0
  20. package/dist/cli/commands/plan.js +285 -0
  21. package/dist/cli/commands/plan.js.map +1 -0
  22. package/dist/cli/commands/ralph.js +2 -1
  23. package/dist/cli/commands/ralph.js.map +1 -1
  24. package/dist/cli/commands/shared.d.ts +4 -0
  25. package/dist/cli/commands/shared.js +19 -3
  26. package/dist/cli/commands/shared.js.map +1 -1
  27. package/dist/cli/commands/skill.js +10 -18
  28. package/dist/cli/commands/skill.js.map +1 -1
  29. package/dist/cli/commands/spawn.js +24 -7
  30. package/dist/cli/commands/spawn.js.map +1 -1
  31. package/dist/cli/commands/test.js +3 -4
  32. package/dist/cli/commands/test.js.map +1 -1
  33. package/dist/cli/commands/unconfigure.js +2 -2
  34. package/dist/cli/commands/unconfigure.js.map +1 -1
  35. package/dist/cli/commands/usage.js +1 -1
  36. package/dist/cli/commands/usage.js.map +1 -1
  37. package/dist/cli/commands/utils.js +2 -1
  38. package/dist/cli/commands/utils.js.map +1 -1
  39. package/dist/cli/program.js +139 -188
  40. package/dist/cli/program.js.map +1 -1
  41. package/dist/index.js +1324 -443
  42. package/dist/index.js.map +4 -4
  43. package/dist/providers/claude-code.js +1 -1
  44. package/dist/providers/claude-code.js.map +2 -2
  45. package/dist/providers/codex.js +1 -1
  46. package/dist/providers/codex.js.map +2 -2
  47. package/dist/providers/kimi.js +1 -1
  48. package/dist/providers/kimi.js.map +2 -2
  49. package/dist/providers/opencode.js +1 -1
  50. package/dist/providers/opencode.js.map +2 -2
  51. package/dist/providers/poe-agent.js +18 -9
  52. package/dist/providers/poe-agent.js.map +2 -2
  53. package/package.json +3 -2
@@ -526,6 +526,10 @@ var init_acp_transport = __esm({
526
526
  this.child.stderr.on("data", (chunk) => {
527
527
  this.stderrChunks.push(String(chunk));
528
528
  });
529
+ this.child.stdin.on("error", (error) => {
530
+ const reason = error instanceof Error ? error : new Error(String(error));
531
+ this.close(reason, this.child.exitCode ?? null, this.child.signalCode ?? null);
532
+ });
529
533
  this.layer = new JsonRpcMessageLayer({
530
534
  input: this.child.stdout,
531
535
  output: this.child.stdin,
@@ -764,19 +768,24 @@ var init_acp_client = __esm({
764
768
  this.permissionHandler = options.handlers?.permission ?? options.permissionHandler;
765
769
  this.fsHandler = options.handlers?.fs ?? options.fsHandler;
766
770
  this.terminalHandler = options.handlers?.terminal ?? options.terminalHandler;
771
+ const autoApprove = options.autoApprove === true && !this.permissionHandler;
767
772
  this.transport.onRequest(
768
773
  "session/request_permission",
769
774
  async (params) => {
770
- if (!this.permissionHandler) {
771
- return {
772
- outcome: { outcome: "cancelled" }
773
- };
775
+ if (this.permissionHandler) {
776
+ const outcome = await this.permissionHandler({
777
+ toolCall: params.toolCall,
778
+ options: params.options
779
+ });
780
+ return { outcome };
774
781
  }
775
- const outcome = await this.permissionHandler({
776
- toolCall: params.toolCall,
777
- options: params.options
778
- });
779
- return { outcome };
782
+ if (autoApprove) {
783
+ const allow = params.options.find((o) => o.kind === "allow_always") ?? params.options.find((o) => o.kind === "allow_once");
784
+ if (allow) {
785
+ return { outcome: { outcome: "selected", optionId: allow.optionId } };
786
+ }
787
+ }
788
+ return { outcome: { outcome: "cancelled" } };
780
789
  }
781
790
  );
782
791
  this.registerCapabilityHandlers(this.clientCapabilities);