openpond 0.2.32 → 0.2.33

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 (116) hide show
  1. package/dist/app-server.d.ts +14 -0
  2. package/dist/app-server.js +1 -1
  3. package/dist/chunks/{app-layer-ZZHTHTJU.js → app-layer-HK2GTSRX.js} +1 -1
  4. package/dist/chunks/app-server-runtime-365GFLRG.js +2 -0
  5. package/dist/chunks/{apps-C2BMJ7DO.js → apps-YJRRLX2N.js} +1 -1
  6. package/dist/chunks/{chunk-MVAJMRCW.js → chunk-77BXXOHW.js} +4 -4
  7. package/dist/chunks/{chunk-2OQ6LFSG.js → chunk-BK4I7KE4.js} +1 -1
  8. package/dist/chunks/{chunk-T22TCCWW.js → chunk-BOQBDCVU.js} +1 -1
  9. package/dist/chunks/chunk-CWW2EK77.js +4 -0
  10. package/dist/chunks/{chunk-PZXZYP6Z.js → chunk-DYHB6VMK.js} +176 -176
  11. package/dist/chunks/{chunk-JFR34MIK.js → chunk-E4U7LXSW.js} +2 -2
  12. package/dist/chunks/{chunk-7FX5ABXG.js → chunk-EWB4XTWR.js} +1 -1
  13. package/dist/chunks/{chunk-QTEYV4TW.js → chunk-JFSDNQHW.js} +7 -7
  14. package/dist/chunks/chunk-PCAHFOCQ.js +2406 -0
  15. package/dist/chunks/{chunk-UU7RXSJS.js → chunk-PZ2ZILPN.js} +1 -1
  16. package/dist/chunks/{chunk-55UCBRIX.js → chunk-QWENRTVW.js} +4 -4
  17. package/dist/chunks/{chunk-JVIHGSOV.js → chunk-SRQVXHSM.js} +1 -1
  18. package/dist/chunks/chunk-TBX3Z7TX.js +2 -0
  19. package/dist/chunks/chunk-U3TN2FNR.js +15 -0
  20. package/dist/chunks/chunk-V23D3DDD.js +42 -0
  21. package/dist/chunks/cli-DKRMREVK.js +2 -0
  22. package/dist/chunks/{configuration-command-IHUB6BBM.js → configuration-command-CYUWO6CD.js} +1 -1
  23. package/dist/chunks/{core-commands-F2HIN7V4.js → core-commands-Z5C7S6OH.js} +1 -1
  24. package/dist/chunks/{desktop-test-BFFUGVRS.js → desktop-test-JBZCCTSN.js} +1 -1
  25. package/dist/chunks/{extension-D7IYZW7H.js → extension-RMJAXEKN.js} +1 -1
  26. package/dist/chunks/{help-5MKQV36D.js → help-QDMTLEIL.js} +1 -1
  27. package/dist/chunks/hosted-profile-compiler-KL7BXGRR.js +3 -0
  28. package/dist/chunks/{opchat-XO7EDHY7.js → opchat-MHH4C5YQ.js} +1 -1
  29. package/dist/chunks/{organizations-DIRGTVK5.js → organizations-5KM2JD32.js} +1 -1
  30. package/dist/chunks/{profile-EMVJ5DJQ.js → profile-KVDJTM4D.js} +1 -1
  31. package/dist/chunks/{project-agent-4QC7N3MB.js → project-agent-SXUMNJLZ.js} +1 -1
  32. package/dist/chunks/{sandbox-command-L263BBOL.js → sandbox-command-FQGX5MSS.js} +1 -1
  33. package/dist/chunks/{sandbox-template-RYKWTBW7.js → sandbox-template-Q6K5JXA3.js} +1 -1
  34. package/dist/chunks/{src-RINMQ7IQ.js → src-42VXY5DZ.js} +1 -1
  35. package/dist/chunks/{src-Q4W4NIPB.js → src-RZFP5QEE.js} +111 -111
  36. package/dist/chunks/{teams-bot-NIZB6DOY.js → teams-bot-7TPB34DR.js} +1 -1
  37. package/dist/chunks/{workspaces-PFLMSDBR.js → workspaces-DOTGXXEV.js} +1 -1
  38. package/dist/cli.js +2 -2
  39. package/dist/web/assets/App-BKY1b22z.js +226 -0
  40. package/dist/web/assets/{AppDialog-C1cvE0gH.js → AppDialog-C64bP66E.js} +1 -1
  41. package/dist/web/assets/{AppTerminalPanel-BFJNR2ik.js → AppTerminalPanel-fVkWSvWK.js} +2 -2
  42. package/dist/web/assets/{AppsView-CReOofAf.js → AppsView-DHnab11q.js} +1 -1
  43. package/dist/web/assets/{BrowserSidebar-CPxAck2O.js → BrowserSidebar-C7YeQ9KS.js} +1 -1
  44. package/dist/web/assets/{CartesianChart-SlZ8Qfkg.js → CartesianChart-CYX3IXBM.js} +1 -1
  45. package/dist/web/assets/{CollaborationTabs-DgFEunqQ.js → CollaborationTabs-j2oBkesr.js} +1 -1
  46. package/dist/web/assets/{CommandMenu-BiROlSdv.js → CommandMenu-BN1a4dTn.js} +1 -1
  47. package/dist/web/assets/{CommunityView-DVST_ZxO.js → CommunityView-CNoxP71Z.js} +1 -1
  48. package/dist/web/assets/{ComposerCreateImproveStrip-jRBhdiFB.js → ComposerCreateImproveStrip-IoK3lqK8.js} +1 -1
  49. package/dist/web/assets/{GetStartedView-Ck4EW1_s.js → GetStartedView-QPabIxZC.js} +1 -1
  50. package/dist/web/assets/HostedModelLearningReview-CNd3-FrC.js +1 -0
  51. package/dist/web/assets/{HostedModelLearningSettings-BD7quEFA.js → HostedModelLearningSettings-TkSSxw8x.js} +1 -1
  52. package/dist/web/assets/{LabModelVersionDetailPage-8-Gb5AAH.js → LabModelVersionDetailPage-CRFw6V7e.js} +1 -1
  53. package/dist/web/assets/{LabSkillSidebar-DO-kFl9Z.js → LabSkillSidebar-Dl8KWUe0.js} +1 -1
  54. package/dist/web/assets/{LabsRoute-Dc9RQKdA.js → LabsRoute-BzdL7mUM.js} +4 -4
  55. package/dist/web/assets/{MainChatThread-DZXcFgmJ.js → MainChatThread-C3IdxbN3.js} +2 -2
  56. package/dist/web/assets/{MainPane-BYrnuI30.js → MainPane-BdR1K59_.js} +4 -4
  57. package/dist/web/assets/{MarkdownText-ueZFkEyk.js → MarkdownText-CkLxqh2M.js} +1 -1
  58. package/dist/web/assets/{NativeSkillSidebar-DlAX2-dH.js → NativeSkillSidebar-VkWpZX6S.js} +1 -1
  59. package/dist/web/assets/{NewExperienceSwitcher-BHYLG0IZ.js → NewExperienceSwitcher-D_K16Ho-.js} +1 -1
  60. package/dist/web/assets/{NewProjectDialog-BwN6SnxR.js → NewProjectDialog-B6E1wWOM.js} +1 -1
  61. package/dist/web/assets/{OutputsPage-Q0kpdfq_.js → OutputsPage-27MuutGA.js} +1 -1
  62. package/dist/web/assets/{ProjectsPage-TnlBYfFy.js → ProjectsPage-CokpZHgx.js} +1 -1
  63. package/dist/web/assets/{RightChatPanelStack-D2qZ-1nK.js → RightChatPanelStack-B6JhJdlc.js} +1 -1
  64. package/dist/web/assets/{RightSidebarHomePanel-q6FF-DR9.js → RightSidebarHomePanel-nn0dqUF0.js} +1 -1
  65. package/dist/web/assets/{ScheduledWorkPage-BTX3Sjoa.js → ScheduledWorkPage-idJ8AO15.js} +1 -1
  66. package/dist/web/assets/{SettingsView-gAhNO4Rg.js → SettingsView-ZH2gDC6E.js} +3 -3
  67. package/dist/web/assets/{TeamChatView-DZtfZ12z.js → TeamChatView-B5cG9M6w.js} +1 -1
  68. package/dist/web/assets/{TerminalOverlay-MJqx0xg6.js → TerminalOverlay-9SPRce9W.js} +1 -1
  69. package/dist/web/assets/{TrainingCreationPanel-ORoKcc3m.js → TrainingCreationPanel-2dkxe7py.js} +1 -1
  70. package/dist/web/assets/{TrainingDraftPanel-oolNVDIx.js → TrainingDraftPanel-oYbOFapi.js} +1 -1
  71. package/dist/web/assets/{UsageSettingsSection-Lh_fLOcC.js → UsageSettingsSection-zWs4Z_9b.js} +1 -1
  72. package/dist/web/assets/{WorkSidebarPanel-BIqP9SXr.js → WorkSidebarPanel-CiBQztz6.js} +1 -1
  73. package/dist/web/assets/{WorkspaceDiffPanel-B0Zwyx9a.js → WorkspaceDiffPanel-BPt29A2a.js} +3 -3
  74. package/dist/web/assets/{WorkspaceEnvironmentMenu-BpgvG43X.js → WorkspaceEnvironmentMenu-pb6fs4-2.js} +1 -1
  75. package/dist/web/assets/{WorkspaceGitDialogs-Bw5ADFuc.js → WorkspaceGitDialogs-DHD-L4Vs.js} +1 -1
  76. package/dist/web/assets/{WorkspaceMonacoEditor-BpivuGzo.js → WorkspaceMonacoEditor-BxtCNaRo.js} +3 -3
  77. package/dist/web/assets/{arrow-up-right-BjC4ygxR.js → arrow-up-right-DcP3EZaY.js} +1 -1
  78. package/dist/web/assets/{clipboard-BOJ-sNJz.js → clipboard-BXulVWTJ.js} +1 -1
  79. package/dist/web/assets/{cloud-upload-D-_3UWhI.js → cloud-upload-B3hP6o0H.js} +1 -1
  80. package/dist/web/assets/{cssMode-CnHRib-_.js → cssMode-c85YG3Pd.js} +1 -1
  81. package/dist/web/assets/{folder-open-CO3Vz0rT.js → folder-open-CtOXE4jL.js} +1 -1
  82. package/dist/web/assets/{folder-plus-CL6B10XJ.js → folder-plus-KO96VZiR.js} +1 -1
  83. package/dist/web/assets/{git-commit-horizontal-C_SNHoOD.js → git-commit-horizontal-Bhtev2bN.js} +1 -1
  84. package/dist/web/assets/{htmlMode-DBpIV7Gx.js → htmlMode-BbCawv2y.js} +1 -1
  85. package/dist/web/assets/{index-Dx0lr1R3.js → index-Hynq87d2.js} +2 -2
  86. package/dist/web/assets/{info-C1C3X2vW.js → info-Dqf1UVHA.js} +1 -1
  87. package/dist/web/assets/{jsonMode-B9puI-La.js → jsonMode-CFycP8DE.js} +1 -1
  88. package/dist/web/assets/{lspLanguageFeatures-DwPRvLkn.js → lspLanguageFeatures-CYX4VXe2.js} +1 -1
  89. package/dist/web/assets/{minimize-2-Cr76Lc_J.js → minimize-2-BCmNskf_.js} +1 -1
  90. package/dist/web/assets/{monaco.contribution-DKa3PSXH.js → monaco.contribution-3ZJbmsu3.js} +2 -2
  91. package/dist/web/assets/{monaco.contribution-OemObo_b.js → monaco.contribution-CJYgsAyM.js} +2 -2
  92. package/dist/web/assets/{monaco.contribution-CnlZLXhW.js → monaco.contribution-CPkt_0fd.js} +2 -2
  93. package/dist/web/assets/{monaco.contribution-DQxsY08y.js → monaco.contribution-DR_TcZx7.js} +2 -2
  94. package/dist/web/assets/{monitor-CktBkAZk.js → monitor-DWlfguJj.js} +1 -1
  95. package/dist/web/assets/{python-CVC74_7Q.js → python-rAXzgbqp.js} +1 -1
  96. package/dist/web/assets/{refresh-cw-JaxiGpHD.js → refresh-cw-BUPgzu5R.js} +1 -1
  97. package/dist/web/assets/{save-DFm1K29k.js → save-Mb-ECgFZ.js} +1 -1
  98. package/dist/web/assets/{square-D5fFhDFt.js → square-CxNbsHso.js} +1 -1
  99. package/dist/web/assets/{toggleHighContrast-D_EkCruq.js → toggleHighContrast-DUvtEJ40.js} +1 -1
  100. package/dist/web/assets/{tsMode-BczIS4rA.js → tsMode-IPAavolh.js} +1 -1
  101. package/dist/web/assets/{upload-DvED7nbd.js → upload-Bn6_UQEa.js} +1 -1
  102. package/dist/web/assets/{useLocalAgentSchedules-DWd5OvYb.js → useLocalAgentSchedules-DAHspLJg.js} +1 -1
  103. package/dist/web/assets/{useSessionTurnCache-oMoxBcGj.js → useSessionTurnCache-CUiJuUjd.js} +1 -1
  104. package/dist/web/assets/{wifi-off-BZL-Op_B.js → wifi-off-Bsy0Wjm8.js} +1 -1
  105. package/dist/web/assets/{workers-DapCJCaQ.js → workers-35o3qFXU.js} +1 -1
  106. package/dist/web/assets/{yaml-DB9KLqu1.js → yaml-Ba5fmKgb.js} +1 -1
  107. package/dist/web/index.html +1 -1
  108. package/package.json +1 -1
  109. package/dist/chunks/app-server-runtime-C7YELTKS.js +0 -2
  110. package/dist/chunks/chunk-L54LZUGH.js +0 -2
  111. package/dist/chunks/chunk-PSZKG3E3.js +0 -4
  112. package/dist/chunks/chunk-YD2IWF3T.js +0 -2419
  113. package/dist/chunks/chunk-YW6HS6TZ.js +0 -42
  114. package/dist/chunks/cli-HGDLR5TC.js +0 -2
  115. package/dist/web/assets/App-BcbjzSeU.js +0 -226
  116. package/dist/web/assets/HostedModelLearningReview-DYFjp-96.js +0 -1
@@ -16274,6 +16274,16 @@ declare const HostStorageRequestSchema: z.ZodDiscriminatedUnion<[
16274
16274
  limit: z.ZodNumber;
16275
16275
  }, z.core.$strict>;
16276
16276
  }, z.core.$strict>,
16277
+ z.ZodObject<{
16278
+ contractVersion: z.ZodLiteral<1>;
16279
+ requestId: z.ZodString;
16280
+ operation: z.ZodLiteral<"harness/memory/search">;
16281
+ params: z.ZodObject<{
16282
+ workspaceId: z.ZodString;
16283
+ query: z.ZodString;
16284
+ limit: z.ZodNumber;
16285
+ }, z.core.$strict>;
16286
+ }, z.core.$strict>,
16277
16287
  z.ZodObject<{
16278
16288
  contractVersion: z.ZodLiteral<1>;
16279
16289
  requestId: z.ZodString;
@@ -16921,6 +16931,7 @@ declare const HostStorageRequestSchema: z.ZodDiscriminatedUnion<[
16921
16931
  afterSequence: z.ZodNumber;
16922
16932
  beforeSequence: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
16923
16933
  limit: z.ZodNumber;
16934
+ excludeReasoningDeltas: z.ZodOptional<z.ZodBoolean>;
16924
16935
  }, z.core.$strict>;
16925
16936
  }, z.core.$strict>,
16926
16937
  z.ZodObject<{
@@ -18161,11 +18172,13 @@ type TurnRepository = TaskInboxRepository & {
18161
18172
  afterSequence?: number | null;
18162
18173
  names?: readonly RuntimeEvent["name"][];
18163
18174
  limit?: number | null;
18175
+ excludeReasoningDeltas?: boolean;
18164
18176
  }): Promise<RuntimeEvent[]>;
18165
18177
  persistedRuntimeEventsForSession?(sessionId: string, query?: {
18166
18178
  afterSequence?: number | null;
18167
18179
  names?: readonly RuntimeEvent["name"][];
18168
18180
  limit?: number | null;
18181
+ excludeReasoningDeltas?: boolean;
18169
18182
  }): Promise<RuntimeEvent[]>;
18170
18183
  latestAssistantTextForSession(sessionId: string): Promise<string | null>;
18171
18184
  latestTurnForSession(sessionId: string, status?: Turn["status"]): Promise<Turn | null>;
@@ -29852,6 +29865,7 @@ declare class SqliteStore extends SqliteTaskInboxStore implements RuntimeHistory
29852
29865
  afterSequence?: number | null;
29853
29866
  names?: readonly RuntimeEvent["name"][];
29854
29867
  limit?: number | null;
29868
+ excludeReasoningDeltas?: boolean;
29855
29869
  }): Promise<RuntimeEvent[]>;
29856
29870
  runtimeEventsForTurn(turnId: string, query?: {
29857
29871
  names?: readonly RuntimeEvent["name"][];
@@ -1,2 +1,2 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{Hc as r}from"./chunks/chunk-PZXZYP6Z.js";import"./chunks/chunk-2OQ6LFSG.js";import{Sa as p,x as e}from"./chunks/chunk-YD2IWF3T.js";import"./chunks/chunk-7FX5ABXG.js";import"./chunks/chunk-JVIHGSOV.js";import"./chunks/chunk-MVAJMRCW.js";import"./chunks/chunk-L54LZUGH.js";import"./chunks/chunk-L3KS6MOV.js";import"./chunks/chunk-XEOEKFG6.js";import"./chunks/chunk-55UCBRIX.js";import"./chunks/chunk-6MI4KKWF.js";import"./chunks/chunk-QTEYV4TW.js";import"./chunks/chunk-SDO4FC4Q.js";import"./chunks/chunk-IR3YJWPW.js";import"./chunks/chunk-B5LKUQGM.js";import"./chunks/chunk-MJC26GOX.js";import"./chunks/chunk-5BFWDFPX.js";import"./chunks/chunk-6FA3GG5B.js";import"./chunks/chunk-IFP6W4OW.js";import"./chunks/chunk-ES2ISFJC.js";import"./chunks/chunk-H7IWJN7L.js";import"./chunks/chunk-FTQLQJQV.js";export{e as AGENT_PROTOCOL_VERSION,r as createOpenPondAppServer,p as runAppServerJsonl};
2
+ import{Hc as r}from"./chunks/chunk-DYHB6VMK.js";import"./chunks/chunk-BK4I7KE4.js";import{I as p,j as e}from"./chunks/chunk-U3TN2FNR.js";import"./chunks/chunk-PCAHFOCQ.js";import"./chunks/chunk-EWB4XTWR.js";import"./chunks/chunk-SRQVXHSM.js";import"./chunks/chunk-77BXXOHW.js";import"./chunks/chunk-TBX3Z7TX.js";import"./chunks/chunk-L3KS6MOV.js";import"./chunks/chunk-XEOEKFG6.js";import"./chunks/chunk-QWENRTVW.js";import"./chunks/chunk-6MI4KKWF.js";import"./chunks/chunk-JFSDNQHW.js";import"./chunks/chunk-SDO4FC4Q.js";import"./chunks/chunk-IR3YJWPW.js";import"./chunks/chunk-B5LKUQGM.js";import"./chunks/chunk-MJC26GOX.js";import"./chunks/chunk-5BFWDFPX.js";import"./chunks/chunk-6FA3GG5B.js";import"./chunks/chunk-IFP6W4OW.js";import"./chunks/chunk-ES2ISFJC.js";import"./chunks/chunk-H7IWJN7L.js";import"./chunks/chunk-FTQLQJQV.js";export{e as AGENT_PROTOCOL_VERSION,r as createOpenPondAppServer,p as runAppServerJsonl};
@@ -1,3 +1,3 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{u as m}from"./chunk-MXLB6MEW.js";import"./chunk-XCTFXXVY.js";import"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import"./chunk-OGPHXXCD.js";import"./chunk-BAKCGJ5D.js";import"./chunk-Z6F6PYF4.js";import"./chunk-QPZNN5Q3.js";import"./chunk-GLUWATL5.js";import"./chunk-B5LKUQGM.js";import"./chunk-MJC26GOX.js";import"./chunk-5BFWDFPX.js";import{a as l}from"./chunk-UU7RXSJS.js";import"./chunk-IFP6W4OW.js";import"./chunk-ES2ISFJC.js";import"./chunk-H7IWJN7L.js";import"./chunk-JFR34MIK.js";import"./chunk-3M53YXEI.js";import{a as i}from"./chunk-FTQLQJQV.js";import{existsSync as c}from"node:fs";import{createRequire as v}from"node:module";import s from"node:path";import{fileURLToPath as E}from"node:url";var p="24.18.0";function N(e=process.versions.node){let r=/^(\d+)\.(\d+)\.(\d+)/.exec(e),n=r?Number(r[1]):Number.NaN,o=r?Number(r[2]):Number.NaN;return n===24&&o>=18?null:[`OpenPond TUI requires Node.js ${p} or newer in the Node 24 release line; detected Node.js ${e}.`,`Switch Node versions and retry (with nvm: \`nvm install ${p} && nvm use ${p}\`).`].join(`
2
+ import{u as m}from"./chunk-MXLB6MEW.js";import"./chunk-XCTFXXVY.js";import"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import"./chunk-OGPHXXCD.js";import"./chunk-BAKCGJ5D.js";import"./chunk-Z6F6PYF4.js";import"./chunk-QPZNN5Q3.js";import"./chunk-GLUWATL5.js";import"./chunk-B5LKUQGM.js";import"./chunk-MJC26GOX.js";import"./chunk-5BFWDFPX.js";import{a as l}from"./chunk-PZ2ZILPN.js";import"./chunk-IFP6W4OW.js";import"./chunk-ES2ISFJC.js";import"./chunk-H7IWJN7L.js";import"./chunk-E4U7LXSW.js";import"./chunk-3M53YXEI.js";import{a as i}from"./chunk-FTQLQJQV.js";import{existsSync as c}from"node:fs";import{createRequire as v}from"node:module";import s from"node:path";import{fileURLToPath as E}from"node:url";var p="24.18.0";function N(e=process.versions.node){let r=/^(\d+)\.(\d+)\.(\d+)/.exec(e),n=r?Number(r[1]):Number.NaN,o=r?Number(r[2]):Number.NaN;return n===24&&o>=18?null:[`OpenPond TUI requires Node.js ${p} or newer in the Node 24 release line; detected Node.js ${e}.`,`Switch Node versions and retry (with nvm: \`nvm install ${p} && nvm use ${p}\`).`].join(`
3
3
  `)}i(N,"openPondTuiNodeRuntimeMessage");var u=s.dirname(E(import.meta.url)),O=class extends Error{constructor(n,o){super(n);this.exitCode=o;this.name="OpenPondChildProcessExitError"}exitCode;static{i(this,"OpenPondChildProcessExitError")}};async function F(e,r,n){let o=f(e==="app-server"?"app-server":"server"),t=[...o.args,e,...P(r),...n];e==="web"&&t.push(r.noOpen===!0||r.noOpen==="true"?"--print-access-url":"--open-browser");let a=e==="web"&&typeof r.webRoot!="string"?C():null;a&&t.push("--web-root",a),await w(o.runner,t,e==="app-server"?process.cwd():o.cwd)}i(F,"runOpenPondServerCommand");async function q(e,r){b(e);let n=N();if(n)throw new l(n);let o=f("terminal"),t=f("server"),a=[...o.args,"chat",...P(R(e)),...r];await w(o.runner,a,process.cwd(),{OPENPOND_SERVER_RUNNER:t.runner,OPENPOND_SERVER_ARGS:JSON.stringify(t.args),OPENPOND_SERVER_CWD:t.cwd})}i(q,"runOpenPondTerminalCommand");function h(){if(process.env.OPENPOND_FORCE_EMBEDDED_COMPANIONS==="1")return null;let e=[s.resolve(u,"../../../.."),s.resolve(u,"../../.."),process.cwd()];for(let r of e)if(c(s.join(r,"apps","server"))&&c(s.join(r,"apps","terminal")))return r;return null}i(h,"findWorkspaceRoot");function f(e){let r=h();if(r){let t=e==="app-server"?s.join(r,"apps","server","src","app-server-entry.ts"):s.join(r,"apps",e,"src","index.ts");if(c(t)){let d=v(s.join(r,"package.json"));return{runner:process.execPath,args:[d.resolve("tsx/cli"),t],cwd:r}}let a=e==="app-server"?s.join(r,"apps","server","dist","app-server-entry.js"):s.join(r,"apps",e,"dist","index.js");if(c(a))return{runner:process.execPath,args:[a],cwd:r}}let n=_(),o=e==="app-server"?"__app-server":e==="server"?"__server":"__terminal";if(n)return{runner:process.execPath,args:[n,o],cwd:s.dirname(s.dirname(n))};if(D())return{runner:process.execPath,args:[o],cwd:process.cwd()};throw new Error(`Could not find the installed OpenPond ${e} companion.`)}i(f,"resolveAppEntrypoint");function _(){for(let e of[s.resolve(u,"../cli.js"),s.resolve(u,"../../dist/cli.js")])if(c(e))return e;return null}i(_,"installedCliEntrypoint");function C(){if(!1){let n=s.join(s.dirname(process.execPath),"web");return c(s.join(n,"index.html"))?n:null}let e=_();if(!e)return null;let r=s.join(s.dirname(e),"web");return c(s.join(r,"index.html"))?r:null}i(C,"packagedWebRoot");function D(){if(!1)return!0;let e=process.argv[1];return!!(e&&s.resolve(e)===s.resolve(process.execPath))}i(D,"isCompiledExecutable");function P(e){let r=new Set(["account","handle","baseUrl","noOpen","tui","home"]),n=[];for(let[o,t]of Object.entries(e)){if(r.has(o))continue;let a=`--${o.replace(/[A-Z]/g,d=>`-${d.toLowerCase()}`)}`;if(t===!0||t==="true")n.push(a);else{if(t===!1||t==="false")continue;n.push(a,t)}}return n}i(P,"forwardedOptions");function R(e){let r=process.cwd(),n={...e};return typeof e.cwd=="string"&&e.cwd.trim().length>0&&(n.cwd=s.resolve(r,e.cwd)),typeof e.messageFile=="string"&&e.messageFile.trim().length>0&&(n.messageFile=s.resolve(r,e.messageFile)),n}i(R,"normalizeTerminalPaths");function b(e){if(typeof e.approvalPolicy=="string"&&!["on-request","never","on-failure","untrusted"].includes(e.approvalPolicy))throw new l("approval-policy must be on-request, never, on-failure, or untrusted");if(typeof e.sandbox=="string"&&!["read-only","workspace-write","danger-full-access"].includes(e.sandbox))throw new l("sandbox must be read-only, workspace-write, or danger-full-access")}i(b,"validateTerminalForwardingOptions");async function w(e,r,n,o){let t=await m(e,r,{cwd:n,detached:!1,env:o,inherit:!0,timeoutMs:0});if(t.code!==0||t.signal){let a=t.signal?`signal ${t.signal}`:`code ${t.code??"unknown"}`;throw new O(`${s.basename(e)} exited with ${a}`,t.code??1)}}i(w,"runChild");export{O as OpenPondChildProcessExitError,F as runOpenPondServerCommand,q as runOpenPondTerminalCommand};
@@ -0,0 +1,2 @@
1
+ import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
+ import{Gc as c,Hc as d}from"./chunk-DYHB6VMK.js";import"./chunk-BK4I7KE4.js";import{I as b,j as a}from"./chunk-U3TN2FNR.js";import"./chunk-PCAHFOCQ.js";import"./chunk-EWB4XTWR.js";import"./chunk-SRQVXHSM.js";import"./chunk-77BXXOHW.js";import"./chunk-TBX3Z7TX.js";import"./chunk-L3KS6MOV.js";import"./chunk-XEOEKFG6.js";import"./chunk-QWENRTVW.js";import"./chunk-6MI4KKWF.js";import"./chunk-JFSDNQHW.js";import"./chunk-SDO4FC4Q.js";import"./chunk-IR3YJWPW.js";import"./chunk-B5LKUQGM.js";import"./chunk-MJC26GOX.js";import"./chunk-5BFWDFPX.js";import"./chunk-6FA3GG5B.js";import"./chunk-IFP6W4OW.js";import"./chunk-ES2ISFJC.js";import"./chunk-H7IWJN7L.js";import"./chunk-FTQLQJQV.js";export{a as AGENT_PROTOCOL_VERSION,c as APP_SERVER_COMPOSITION,d as createOpenPondAppServer,b as runAppServerJsonl};
@@ -1,2 +1,2 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{f as $,g as J,h as L,i as v,j as q}from"./chunk-MXLB6MEW.js";import{c as g}from"./chunk-XCTFXXVY.js";import{f as m,h as y}from"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import{b as H,c as Q}from"./chunk-22UARBPW.js";import"./chunk-OGPHXXCD.js";import"./chunk-BAKCGJ5D.js";import{J as C,K as G,L as k,O as W,Q as M,S as z,T as F,c as D,m as K,r as V,s as _}from"./chunk-Z6F6PYF4.js";import{d as f}from"./chunk-QPZNN5Q3.js";import"./chunk-GLUWATL5.js";import"./chunk-B5LKUQGM.js";import"./chunk-MJC26GOX.js";import"./chunk-5BFWDFPX.js";import"./chunk-UU7RXSJS.js";import"./chunk-IFP6W4OW.js";import"./chunk-ES2ISFJC.js";import"./chunk-H7IWJN7L.js";import"./chunk-JFR34MIK.js";import{a as S,f as w,j as T,k as j}from"./chunk-3M53YXEI.js";import{a as p}from"./chunk-FTQLQJQV.js";async function ie(){let e=await f(),s=m(e),t=await g(e,s),n=y(e),r=await L({apiBase:n,apiKey:t});console.log(JSON.stringify(r,null,2))}p(ie,"runAppsTools");async function se(e){let s=await f(),t=m(s),n=y(s),r=await g(s,t),i=typeof e.handle=="string"?String(e.handle):void 0,o=i?$(i):null,c=e.refresh!==void 0?w(e.refresh):void 0,l=await J({apiBase:n,apiKey:r,forceRefresh:c}),u=o?l.filter(a=>$(a.handle||a.gitOwner)===o):l;if(u.length===0){console.log("no apps found");return}if(w(e.json)){console.log(JSON.stringify({apps:u},null,2));return}for(let a of u){let d=a.handle||a.gitOwner||"unknown",h=a.repo||a.gitRepo||a.id,B=a.latestDeployment?.status||"no-deploy",R=a.latestDeployment?.gitBranch||a.defaultBranch||"-",I=a.codeVisibility||"unknown",E=a.sandbox?"yes":"no";console.log(`${d}/${h} ${B} ${R} code=${I} sandbox=${E} ${a.id}`)}}p(se,"runAppsList");async function oe(e,s){let t=typeof e.visibility=="string"?e.visibility.trim():typeof e.codeVisibility=="string"?e.codeVisibility.trim():"";if(t!=="public"&&t!=="private")throw new Error("usage: apps code-visibility <handle>/<repo> --visibility public|private");let n=await f(),r=m(n),i=y(n),o=await g(n,r),{app:c,handle:l,repo:u}=await v(i,o,s),a=await K(i,o,c.id,t);console.log(`${l}/${u} code_visibility=${a.app?.codeVisibility??t} app_id=${c.id}`)}p(oe,"runAppsCodeVisibility");async function ae(e){let s=await f(),t=m(s),n=await g(s,t),r=y(s),i=typeof e.appId=="string"?String(e.appId):void 0,o=await G(r,n,{appId:i});console.log(JSON.stringify(o,null,2))}p(ae,"runAppsPerformance");async function ce(e,s){let t=await f(),n=m(t),r=y(t),i=await g(t,n),{app:o}=await v(r,i,s),c=await k(r,i,o.id);console.log(JSON.stringify(c,null,2))}p(ce,"runAppsSummary");async function le(e,s,t,n){let r=(typeof e.prompt=="string"?e.prompt:null)||n.join(" ");if(!r.trim())throw new Error("usage: apps assistant <plan|performance> <handle>/<repo> --prompt <text>");let i=await f(),o=m(i),c=y(i),l=await g(i,o),{app:u}=await v(c,l,t),a=await W(c,l,{appId:u.id,mode:s,prompt:r.trim()});console.log(JSON.stringify(a,null,2))}p(le,"runAppsAssistant");async function de(e,s){let t=await f(),n=m(t),r=await g(t,n),i=y(t),o=(typeof e.prompt=="string"?e.prompt:null)||s.join(" ");if(!o.trim())throw new Error("usage: apps agent create --prompt <text> [--team-id <id>]");let c=typeof e.templateRepoUrl=="string"?e.templateRepoUrl:void 0,l=typeof e.templateBranch=="string"?e.templateBranch:void 0,u=typeof e.templateLocalPath=="string"?e.templateLocalPath:void 0,a=typeof e.teamId=="string"&&e.teamId.trim()?e.teamId.trim():void 0;if(u&&String(u).trim().length>0)throw new Error("templateLocalPath is not supported; use templateRepoUrl");let d=typeof e.env=="string"?S(e.env,"env"):void 0;if(d){if(typeof d!="object"||Array.isArray(d))throw new Error("env must be a JSON object");for(let[b,A]of Object.entries(d))if(typeof A!="string")throw new Error(`env value for ${b} must be a string`)}let h=c||l||d?{templateRepoUrl:c,templateBranch:l,envVars:d}:void 0,B=typeof e.deployEnvironment=="string"?e.deployEnvironment==="preview"?"preview":"production":void 0,R=e.deployDisabled!==void 0?w(e.deployDisabled):void 0,I=e.streamDeployLogs!==void 0?w(e.streamDeployLogs):!0,E=await C(i,r,{prompt:o.trim(),...a?{teamId:a}:{},...h?{template:h}:{},...B?{deployEnvironment:B}:{},...R!==void 0?{deployDisabled:R}:{},streamDeployLogs:I});if(!E.ok){let b=await E.text().catch(()=>"");throw new Error(`agent create failed: ${E.status} ${b}`)}let N=null,O=null,P=null;await H(E,{onConversationId:p(b=>{N=b},"onConversationId"),onItems:p(b=>{for(let A of b){let U=Q(A);U&&console.log(U);let x=A;!O&&typeof x.appId=="string"&&(O=x.appId),!P&&typeof x.deploymentId=="string"&&(P=x.deploymentId)}},"onItems")}),N&&console.log(`conversation_id: ${N}`),O&&console.log(`app_id: ${O}`),P&&console.log(`deployment_id: ${P}`);try{await J({apiBase:i,apiKey:r,forceRefresh:!0}),await L({apiBase:i,apiKey:r,forceRefresh:!0})}catch(b){console.warn("cache refresh failed",b)}}p(de,"runAppsAgentCreate");async function pe(e,s,t,n){let r=await f(),i=m(r),o=await g(r,i),c=y(r),l=typeof e.method=="string"?String(e.method).toUpperCase():void 0,u=l&&["GET","POST","PUT","DELETE"].includes(l)?l:void 0;if(l&&!u)throw new Error("method must be GET, POST, PUT, or DELETE");let a=typeof e.body=="string"?S(String(e.body),"body"):void 0,d=typeof e.headers=="string"?S(String(e.headers),"headers"):void 0,h=typeof e.scheduleId=="string"?String(e.scheduleId):void 0,B=w(e.notifyEmail),R=w(e.summary)||w(e.withSummary),I=await M(c,o,{appId:s,deploymentId:t,toolName:n,scheduleId:h,method:u,body:a,headers:d,notifyEmail:B||void 0});if(console.log(JSON.stringify(I,null,2)),R&&I.ok){let E=await k(c,o,s);console.log(JSON.stringify({summary:E},null,2))}}p(pe,"runAppsToolsExecute");async function ue(e,s){let t=typeof e.env=="string"?e.env:typeof e.vars=="string"?e.vars:typeof e.envVars=="string"?e.envVars:null;if(!t)throw new Error("usage: apps env set <handle>/<repo> --env <json>");let n=S(t,"env");if(!n||typeof n!="object"||Array.isArray(n))throw new Error("env must be a JSON object");let r={};for(let[d,h]of Object.entries(n)){if(typeof h!="string")throw new Error(`env value for ${d} must be a string`);if(!d.startsWith("OPENTOOL_PUBLIC_"))throw new Error("only OPENTOOL_PUBLIC_ env vars can be set");r[d]=h}let i=await f(),o=m(i),c=y(i),l=await g(i,o),{app:u}=await v(c,l,s),a=await V(c,l,u.id,{envVars:r});console.log(JSON.stringify(a,null,2))}p(ue,"runAppsEnvSet");async function fe(e,s){let t=await f(),n=m(t),r=y(t),i=await g(t,n),{app:o}=await v(r,i,s),c=await _(r,i,o.id);console.log(JSON.stringify(c,null,2))}p(fe,"runAppsEnvGet");async function ge(e,s){let t=await f(),n=m(t),r=y(t),i=await g(t,n),{app:o,handle:c,repo:l}=await v(r,i,s),u=typeof e.env=="string"?e.env:typeof e.environment=="string"?e.environment:void 0,a=j(u),d=await D(r,i,o.id,{environment:a});console.log(JSON.stringify(d,null,2)),(w(e.watch)||w(e.wait)||w(e.follow))&&await q({baseUrl:r,apiKey:i,deploymentId:d.deploymentId,prefix:`[${c}/${l}] `,intervalMs:e.interval?Number(e.interval):void 0,timeoutMs:e.timeout?Number(e.timeout):void 0})}p(ge,"runAppsDeploy");function X(e){let s={};if(typeof e.params=="string"){let n=S(String(e.params),"params");if(!n||typeof n!="object"||Array.isArray(n))throw new Error("params must be a JSON object");for(let[r,i]of Object.entries(n))i!==void 0&&(s[r]=typeof i=="string"?i:JSON.stringify(i))}let t=p((n,r)=>{r===void 0||r===""||(s[n]=r)},"addParam");if(t("source",typeof e.source=="string"?e.source.trim():void 0),t("symbol",typeof e.symbol=="string"?e.symbol.trim():void 0),t("cursor",typeof e.cursor=="string"?e.cursor.trim():void 0),t("status",typeof e.status=="string"?e.status.trim():void 0),t("backtestRunId",typeof e.runId=="string"?e.runId.trim():typeof e.backtestRunId=="string"?e.backtestRunId.trim():void 0),t("since",T(e.since,"since")),t("until",T(e.until,"until")),typeof e.limit=="string"&&e.limit.trim().length>0){let n=Number.parseInt(e.limit,10);if(!Number.isFinite(n))throw new Error("limit must be a number");t("limit",String(n))}return Object.keys(s).length?s:void 0}p(X,"resolveBacktestEventsParams");async function me(e,s){let t=await f(),n=m(t),r=await g(t,n),i=y(t),{app:o}=await v(i,r,s),c={...X(e)??{},appId:o.id},l=await z(i,r,{method:"GET",query:c});console.log(JSON.stringify(l,null,2))}p(me,"runBacktestEvents");async function ye(e,s){let t=typeof e.runId=="string"?e.runId.trim():typeof e.backtestRunId=="string"?e.backtestRunId.trim():"";if(!t)throw new Error("usage: backtest get <handle>/<repo> --run-id <id>");let n=await f(),r=m(n),i=await g(n,r),o=y(n),{app:c}=await v(o,i,s),l=await F(o,i,{appId:c.id,runId:t});console.log(JSON.stringify(l,null,2))}p(ye,"runBacktestGet");export{X as resolveBacktestEventsParams,de as runAppsAgentCreate,le as runAppsAssistant,oe as runAppsCodeVisibility,ge as runAppsDeploy,fe as runAppsEnvGet,ue as runAppsEnvSet,se as runAppsList,ae as runAppsPerformance,ce as runAppsSummary,ie as runAppsTools,pe as runAppsToolsExecute,me as runBacktestEvents,ye as runBacktestGet};
2
+ import{f as $,g as J,h as L,i as v,j as q}from"./chunk-MXLB6MEW.js";import{c as g}from"./chunk-XCTFXXVY.js";import{f as m,h as y}from"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import{b as H,c as Q}from"./chunk-22UARBPW.js";import"./chunk-OGPHXXCD.js";import"./chunk-BAKCGJ5D.js";import{J as C,K as G,L as k,O as W,Q as M,S as z,T as F,c as D,m as K,r as V,s as _}from"./chunk-Z6F6PYF4.js";import{d as f}from"./chunk-QPZNN5Q3.js";import"./chunk-GLUWATL5.js";import"./chunk-B5LKUQGM.js";import"./chunk-MJC26GOX.js";import"./chunk-5BFWDFPX.js";import"./chunk-PZ2ZILPN.js";import"./chunk-IFP6W4OW.js";import"./chunk-ES2ISFJC.js";import"./chunk-H7IWJN7L.js";import"./chunk-E4U7LXSW.js";import{a as S,f as w,j as T,k as j}from"./chunk-3M53YXEI.js";import{a as p}from"./chunk-FTQLQJQV.js";async function ie(){let e=await f(),s=m(e),t=await g(e,s),n=y(e),r=await L({apiBase:n,apiKey:t});console.log(JSON.stringify(r,null,2))}p(ie,"runAppsTools");async function se(e){let s=await f(),t=m(s),n=y(s),r=await g(s,t),i=typeof e.handle=="string"?String(e.handle):void 0,o=i?$(i):null,c=e.refresh!==void 0?w(e.refresh):void 0,l=await J({apiBase:n,apiKey:r,forceRefresh:c}),u=o?l.filter(a=>$(a.handle||a.gitOwner)===o):l;if(u.length===0){console.log("no apps found");return}if(w(e.json)){console.log(JSON.stringify({apps:u},null,2));return}for(let a of u){let d=a.handle||a.gitOwner||"unknown",h=a.repo||a.gitRepo||a.id,B=a.latestDeployment?.status||"no-deploy",R=a.latestDeployment?.gitBranch||a.defaultBranch||"-",I=a.codeVisibility||"unknown",E=a.sandbox?"yes":"no";console.log(`${d}/${h} ${B} ${R} code=${I} sandbox=${E} ${a.id}`)}}p(se,"runAppsList");async function oe(e,s){let t=typeof e.visibility=="string"?e.visibility.trim():typeof e.codeVisibility=="string"?e.codeVisibility.trim():"";if(t!=="public"&&t!=="private")throw new Error("usage: apps code-visibility <handle>/<repo> --visibility public|private");let n=await f(),r=m(n),i=y(n),o=await g(n,r),{app:c,handle:l,repo:u}=await v(i,o,s),a=await K(i,o,c.id,t);console.log(`${l}/${u} code_visibility=${a.app?.codeVisibility??t} app_id=${c.id}`)}p(oe,"runAppsCodeVisibility");async function ae(e){let s=await f(),t=m(s),n=await g(s,t),r=y(s),i=typeof e.appId=="string"?String(e.appId):void 0,o=await G(r,n,{appId:i});console.log(JSON.stringify(o,null,2))}p(ae,"runAppsPerformance");async function ce(e,s){let t=await f(),n=m(t),r=y(t),i=await g(t,n),{app:o}=await v(r,i,s),c=await k(r,i,o.id);console.log(JSON.stringify(c,null,2))}p(ce,"runAppsSummary");async function le(e,s,t,n){let r=(typeof e.prompt=="string"?e.prompt:null)||n.join(" ");if(!r.trim())throw new Error("usage: apps assistant <plan|performance> <handle>/<repo> --prompt <text>");let i=await f(),o=m(i),c=y(i),l=await g(i,o),{app:u}=await v(c,l,t),a=await W(c,l,{appId:u.id,mode:s,prompt:r.trim()});console.log(JSON.stringify(a,null,2))}p(le,"runAppsAssistant");async function de(e,s){let t=await f(),n=m(t),r=await g(t,n),i=y(t),o=(typeof e.prompt=="string"?e.prompt:null)||s.join(" ");if(!o.trim())throw new Error("usage: apps agent create --prompt <text> [--team-id <id>]");let c=typeof e.templateRepoUrl=="string"?e.templateRepoUrl:void 0,l=typeof e.templateBranch=="string"?e.templateBranch:void 0,u=typeof e.templateLocalPath=="string"?e.templateLocalPath:void 0,a=typeof e.teamId=="string"&&e.teamId.trim()?e.teamId.trim():void 0;if(u&&String(u).trim().length>0)throw new Error("templateLocalPath is not supported; use templateRepoUrl");let d=typeof e.env=="string"?S(e.env,"env"):void 0;if(d){if(typeof d!="object"||Array.isArray(d))throw new Error("env must be a JSON object");for(let[b,A]of Object.entries(d))if(typeof A!="string")throw new Error(`env value for ${b} must be a string`)}let h=c||l||d?{templateRepoUrl:c,templateBranch:l,envVars:d}:void 0,B=typeof e.deployEnvironment=="string"?e.deployEnvironment==="preview"?"preview":"production":void 0,R=e.deployDisabled!==void 0?w(e.deployDisabled):void 0,I=e.streamDeployLogs!==void 0?w(e.streamDeployLogs):!0,E=await C(i,r,{prompt:o.trim(),...a?{teamId:a}:{},...h?{template:h}:{},...B?{deployEnvironment:B}:{},...R!==void 0?{deployDisabled:R}:{},streamDeployLogs:I});if(!E.ok){let b=await E.text().catch(()=>"");throw new Error(`agent create failed: ${E.status} ${b}`)}let N=null,O=null,P=null;await H(E,{onConversationId:p(b=>{N=b},"onConversationId"),onItems:p(b=>{for(let A of b){let U=Q(A);U&&console.log(U);let x=A;!O&&typeof x.appId=="string"&&(O=x.appId),!P&&typeof x.deploymentId=="string"&&(P=x.deploymentId)}},"onItems")}),N&&console.log(`conversation_id: ${N}`),O&&console.log(`app_id: ${O}`),P&&console.log(`deployment_id: ${P}`);try{await J({apiBase:i,apiKey:r,forceRefresh:!0}),await L({apiBase:i,apiKey:r,forceRefresh:!0})}catch(b){console.warn("cache refresh failed",b)}}p(de,"runAppsAgentCreate");async function pe(e,s,t,n){let r=await f(),i=m(r),o=await g(r,i),c=y(r),l=typeof e.method=="string"?String(e.method).toUpperCase():void 0,u=l&&["GET","POST","PUT","DELETE"].includes(l)?l:void 0;if(l&&!u)throw new Error("method must be GET, POST, PUT, or DELETE");let a=typeof e.body=="string"?S(String(e.body),"body"):void 0,d=typeof e.headers=="string"?S(String(e.headers),"headers"):void 0,h=typeof e.scheduleId=="string"?String(e.scheduleId):void 0,B=w(e.notifyEmail),R=w(e.summary)||w(e.withSummary),I=await M(c,o,{appId:s,deploymentId:t,toolName:n,scheduleId:h,method:u,body:a,headers:d,notifyEmail:B||void 0});if(console.log(JSON.stringify(I,null,2)),R&&I.ok){let E=await k(c,o,s);console.log(JSON.stringify({summary:E},null,2))}}p(pe,"runAppsToolsExecute");async function ue(e,s){let t=typeof e.env=="string"?e.env:typeof e.vars=="string"?e.vars:typeof e.envVars=="string"?e.envVars:null;if(!t)throw new Error("usage: apps env set <handle>/<repo> --env <json>");let n=S(t,"env");if(!n||typeof n!="object"||Array.isArray(n))throw new Error("env must be a JSON object");let r={};for(let[d,h]of Object.entries(n)){if(typeof h!="string")throw new Error(`env value for ${d} must be a string`);if(!d.startsWith("OPENTOOL_PUBLIC_"))throw new Error("only OPENTOOL_PUBLIC_ env vars can be set");r[d]=h}let i=await f(),o=m(i),c=y(i),l=await g(i,o),{app:u}=await v(c,l,s),a=await V(c,l,u.id,{envVars:r});console.log(JSON.stringify(a,null,2))}p(ue,"runAppsEnvSet");async function fe(e,s){let t=await f(),n=m(t),r=y(t),i=await g(t,n),{app:o}=await v(r,i,s),c=await _(r,i,o.id);console.log(JSON.stringify(c,null,2))}p(fe,"runAppsEnvGet");async function ge(e,s){let t=await f(),n=m(t),r=y(t),i=await g(t,n),{app:o,handle:c,repo:l}=await v(r,i,s),u=typeof e.env=="string"?e.env:typeof e.environment=="string"?e.environment:void 0,a=j(u),d=await D(r,i,o.id,{environment:a});console.log(JSON.stringify(d,null,2)),(w(e.watch)||w(e.wait)||w(e.follow))&&await q({baseUrl:r,apiKey:i,deploymentId:d.deploymentId,prefix:`[${c}/${l}] `,intervalMs:e.interval?Number(e.interval):void 0,timeoutMs:e.timeout?Number(e.timeout):void 0})}p(ge,"runAppsDeploy");function X(e){let s={};if(typeof e.params=="string"){let n=S(String(e.params),"params");if(!n||typeof n!="object"||Array.isArray(n))throw new Error("params must be a JSON object");for(let[r,i]of Object.entries(n))i!==void 0&&(s[r]=typeof i=="string"?i:JSON.stringify(i))}let t=p((n,r)=>{r===void 0||r===""||(s[n]=r)},"addParam");if(t("source",typeof e.source=="string"?e.source.trim():void 0),t("symbol",typeof e.symbol=="string"?e.symbol.trim():void 0),t("cursor",typeof e.cursor=="string"?e.cursor.trim():void 0),t("status",typeof e.status=="string"?e.status.trim():void 0),t("backtestRunId",typeof e.runId=="string"?e.runId.trim():typeof e.backtestRunId=="string"?e.backtestRunId.trim():void 0),t("since",T(e.since,"since")),t("until",T(e.until,"until")),typeof e.limit=="string"&&e.limit.trim().length>0){let n=Number.parseInt(e.limit,10);if(!Number.isFinite(n))throw new Error("limit must be a number");t("limit",String(n))}return Object.keys(s).length?s:void 0}p(X,"resolveBacktestEventsParams");async function me(e,s){let t=await f(),n=m(t),r=await g(t,n),i=y(t),{app:o}=await v(i,r,s),c={...X(e)??{},appId:o.id},l=await z(i,r,{method:"GET",query:c});console.log(JSON.stringify(l,null,2))}p(me,"runBacktestEvents");async function ye(e,s){let t=typeof e.runId=="string"?e.runId.trim():typeof e.backtestRunId=="string"?e.backtestRunId.trim():"";if(!t)throw new Error("usage: backtest get <handle>/<repo> --run-id <id>");let n=await f(),r=m(n),i=await g(n,r),o=y(n),{app:c}=await v(o,i,s),l=await F(o,i,{appId:c.id,runId:t});console.log(JSON.stringify(l,null,2))}p(ye,"runBacktestGet");export{X as resolveBacktestEventsParams,de as runAppsAgentCreate,le as runAppsAssistant,oe as runAppsCodeVisibility,ge as runAppsDeploy,fe as runAppsEnvGet,ue as runAppsEnvSet,se as runAppsList,ae as runAppsPerformance,ce as runAppsSummary,ie as runAppsTools,pe as runAppsToolsExecute,me as runBacktestEvents,ye as runBacktestGet};