openpond 0.2.39 → 0.2.41

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 (99) hide show
  1. package/dist/app-server.d.ts +5 -1
  2. package/dist/app-server.js +1 -1
  3. package/dist/chunks/actions-command-JPJLAR44.js +2 -0
  4. package/dist/chunks/{app-layer-JZTMHORT.js → app-layer-ENO5MMPX.js} +1 -1
  5. package/dist/chunks/app-server-runtime-LACOVSKH.js +2 -0
  6. package/dist/chunks/apps-VFXTNQ25.js +2 -0
  7. package/dist/chunks/{chunk-GIPSOLAY.js → chunk-2Z6H32OC.js} +1 -1
  8. package/dist/chunks/chunk-3FXZW4G7.js +3 -0
  9. package/dist/chunks/{chunk-RJACNWYJ.js → chunk-452UKUIB.js} +202 -203
  10. package/dist/chunks/{chunk-3HQEEZPO.js → chunk-65BW2QXY.js} +1 -1
  11. package/dist/chunks/{chunk-XHJUP7M4.js → chunk-6C5XPL6E.js} +1 -1
  12. package/dist/chunks/{chunk-J4S7AVGF.js → chunk-6UGTLC7Z.js} +1 -1
  13. package/dist/chunks/chunk-ALZRXBEC.js +33 -0
  14. package/dist/chunks/chunk-AO753YWB.js +5 -0
  15. package/dist/chunks/chunk-AT6XYNQ5.js +2 -0
  16. package/dist/chunks/chunk-DLQW5X6F.js +2 -0
  17. package/dist/chunks/chunk-DXAZUJPA.js +2 -0
  18. package/dist/chunks/chunk-ERFHALGF.js +4 -0
  19. package/dist/chunks/chunk-FLWIBAHG.js +2 -0
  20. package/dist/chunks/{chunk-25OT6IYM.js → chunk-GKP2ZPKM.js} +1 -1
  21. package/dist/chunks/{chunk-6GLGOIMQ.js → chunk-H7JB25HO.js} +1 -1
  22. package/dist/chunks/{chunk-SBBXUZWL.js → chunk-HLNJKX3S.js} +2 -2
  23. package/dist/chunks/{chunk-7BGT6Q2D.js → chunk-JLZ2TEKK.js} +1 -1
  24. package/dist/chunks/chunk-JXD5PNF7.js +9 -0
  25. package/dist/chunks/{chunk-L6ELXODL.js → chunk-JXGLH7OR.js} +139 -139
  26. package/dist/chunks/chunk-KCENW4ME.js +2 -0
  27. package/dist/chunks/{chunk-T7Y5OYO2.js → chunk-KIGN4FI6.js} +1 -1
  28. package/dist/chunks/chunk-KRC36KV2.js +5 -0
  29. package/dist/chunks/{chunk-ZO7DTED5.js → chunk-KVJF3H4N.js} +2 -2
  30. package/dist/chunks/{chunk-FUFIZ37W.js → chunk-LRGLV6JX.js} +1 -1
  31. package/dist/chunks/chunk-MOMDY22U.js +2 -0
  32. package/dist/chunks/chunk-MTJNKRXL.js +22 -0
  33. package/dist/chunks/{chunk-WCZRDULE.js → chunk-NVPKY3KE.js} +1 -1
  34. package/dist/chunks/chunk-POWZXZJ2.js +2 -0
  35. package/dist/chunks/{chunk-ZPGTGQJT.js → chunk-PU2JM765.js} +1 -1
  36. package/dist/chunks/{chunk-SHCRE7B2.js → chunk-QJX7UASW.js} +1 -1
  37. package/dist/chunks/chunk-R6YJY7F2.js +3 -0
  38. package/dist/chunks/{chunk-MRGA6BKG.js → chunk-RT6YPMWF.js} +1 -1
  39. package/dist/chunks/{chunk-JUX77H6K.js → chunk-TPOW52DO.js} +3 -3
  40. package/dist/chunks/chunk-V62BHD5G.js +2 -0
  41. package/dist/chunks/chunk-VB2S5HV4.js +3 -0
  42. package/dist/chunks/{chunk-FKVP26MC.js → chunk-VKGVC26K.js} +1 -1
  43. package/dist/chunks/{chunk-ZCFX6HQO.js → chunk-VQG25QBJ.js} +1 -1
  44. package/dist/chunks/{chunk-DHP75QSG.js → chunk-XMXGITQE.js} +1 -1
  45. package/dist/chunks/chunk-Z2BYC6TP.js +2 -0
  46. package/dist/chunks/{chunk-562Q5UVS.js → chunk-ZG7QX66E.js} +1 -1
  47. package/dist/chunks/cli-QW2BELOE.js +2 -0
  48. package/dist/chunks/configuration-command-VXCGFVAP.js +2 -0
  49. package/dist/chunks/core-commands-XEPFY3PQ.js +2 -0
  50. package/dist/chunks/{datasets-V7E4I5N3.js → datasets-6PTDCZQ7.js} +1 -1
  51. package/dist/chunks/desktop-test-JGSH4T5Z.js +3 -0
  52. package/dist/chunks/dist-ELWB75PL.js +2 -0
  53. package/dist/chunks/experiments-WKRYHZDK.js +2 -0
  54. package/dist/chunks/{extension-OQ7CFD4Q.js → extension-S2UIZH46.js} +1 -1
  55. package/dist/chunks/{help-4BB2A5JC.js → help-ZVAGMF3C.js} +1 -1
  56. package/dist/chunks/hosted-harness-runtime-F4UPHTTT.js +2 -0
  57. package/dist/chunks/hosted-profile-compiler-4LKIBC75.js +2 -0
  58. package/dist/chunks/hosted-profile-evaluation-control-WPRPL4YW.js +2 -0
  59. package/dist/chunks/hosted-profile-evaluation-inspection-ULRRZDS2.js +3 -0
  60. package/dist/chunks/hosted-profile-evaluation-preparation-NWR4PRHS.js +3 -0
  61. package/dist/chunks/opchat-EOQ4PPE7.js +3 -0
  62. package/dist/chunks/organizations-4IGFWOYA.js +2 -0
  63. package/dist/chunks/{profile-LZYR4CMX.js → profile-KJS7WQ3F.js} +1 -1
  64. package/dist/chunks/project-agent-6WNHPBXA.js +2 -0
  65. package/dist/chunks/sandbox-command-NCRIL6NH.js +2 -0
  66. package/dist/chunks/{sandbox-template-6RLQYNTY.js → sandbox-template-AAOUNWTL.js} +1 -1
  67. package/dist/chunks/{src-PASASTIA.js → src-HLLPHEW4.js} +1 -1
  68. package/dist/chunks/{src-J7NT5WEH.js → src-PERIQ7VT.js} +112 -112
  69. package/dist/chunks/{teams-bot-UQB636V3.js → teams-bot-LKIOF3B5.js} +1 -1
  70. package/dist/chunks/{workspaces-RFQ4QB5A.js → workspaces-S3NXR6VJ.js} +1 -1
  71. package/dist/cli.js +3 -3
  72. package/dist/index.js +1 -1
  73. package/docs/command-reference.md +1 -1
  74. package/package.json +1 -1
  75. package/dist/chunks/actions-command-MHWHPQ66.js +0 -2
  76. package/dist/chunks/app-server-runtime-72NRJAB5.js +0 -2
  77. package/dist/chunks/apps-U5GIOD6W.js +0 -2
  78. package/dist/chunks/chunk-AOBTILU5.js +0 -2
  79. package/dist/chunks/chunk-DDHUSA3I.js +0 -2
  80. package/dist/chunks/chunk-FVALIUVY.js +0 -2
  81. package/dist/chunks/chunk-P5CFBE6Z.js +0 -3
  82. package/dist/chunks/chunk-Q3X5WOVH.js +0 -4
  83. package/dist/chunks/chunk-QK2GLRCY.js +0 -53
  84. package/dist/chunks/chunk-R6DWG5A4.js +0 -12
  85. package/dist/chunks/chunk-RELOOVWW.js +0 -2
  86. package/dist/chunks/chunk-SHCKK3SU.js +0 -2
  87. package/dist/chunks/chunk-TZNKOKQJ.js +0 -5
  88. package/dist/chunks/cli-ETZV6JZI.js +0 -2
  89. package/dist/chunks/configuration-command-RPNYWBKK.js +0 -2
  90. package/dist/chunks/core-commands-WFTASSGL.js +0 -2
  91. package/dist/chunks/desktop-test-NZAZVXLK.js +0 -3
  92. package/dist/chunks/dist-4OUZANXR.js +0 -2
  93. package/dist/chunks/experiments-7UBJCQAQ.js +0 -2
  94. package/dist/chunks/hosted-harness-runtime-2YI2FLU2.js +0 -2
  95. package/dist/chunks/hosted-profile-compiler-35BQPVJ6.js +0 -3
  96. package/dist/chunks/opchat-QVB4UIZR.js +0 -3
  97. package/dist/chunks/organizations-MUKXB6MX.js +0 -2
  98. package/dist/chunks/project-agent-FHNWIH2D.js +0 -2
  99. package/dist/chunks/sandbox-command-GJN3HSJQ.js +0 -2
@@ -1,3 +1,3 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{m as f}from"./chunk-FUFIZ37W.js";import"./chunk-3HQEEZPO.js";import"./chunk-BSHAIAXY.js";import"./chunk-FKVP26MC.js";import"./chunk-P5CFBE6Z.js";import"./chunk-XWPC3AN4.js";import{a as g,c as a,d}from"./chunk-3M53YXEI.js";import"./chunk-OGPHXXCD.js";import"./chunk-TZNKOKQJ.js";import"./chunk-SHCKK3SU.js";import"./chunk-AOBTILU5.js";import"./chunk-GLUWATL5.js";import"./chunk-RELOOVWW.js";import"./chunk-GIPSOLAY.js";import"./chunk-MJC26GOX.js";import"./chunk-JUX77H6K.js";import"./chunk-QUNRWDVO.js";import"./chunk-QK2GLRCY.js";import"./chunk-HZP5U2AA.js";import"./chunk-ES2ISFJC.js";import"./chunk-H7IWJN7L.js";import{a as s}from"./chunk-FTQLQJQV.js";function c(){return["usage: teams-bot <overview|bind|rebind|diagnostics|diagnostic-run>"," teams-bot overview --team-id <id>"," teams-bot bind --team-id <id> --token <token> [--project-id <id>] [--agent-id <id>] [--microsoft-connection-id <id>]"," teams-bot rebind <bindingId> --team-id <id> [--project-id <id>] [--agent-id <id>] [--microsoft-connection-id <id>]"," teams-bot diagnostics <bindingId> --team-id <id>"," teams-bot diagnostic-run <bindingId> --team-id <id> --prompt <text> [--attachments-json <json-array>] [--action-input-json <json-object>]"].join(`
2
+ import{m as f}from"./chunk-LRGLV6JX.js";import"./chunk-65BW2QXY.js";import"./chunk-BSHAIAXY.js";import"./chunk-VKGVC26K.js";import"./chunk-VB2S5HV4.js";import"./chunk-XWPC3AN4.js";import{a as g,c as a,d}from"./chunk-3M53YXEI.js";import"./chunk-OGPHXXCD.js";import"./chunk-KRC36KV2.js";import"./chunk-Z2BYC6TP.js";import"./chunk-DXAZUJPA.js";import"./chunk-GLUWATL5.js";import"./chunk-KCENW4ME.js";import"./chunk-2Z6H32OC.js";import"./chunk-MJC26GOX.js";import"./chunk-TPOW52DO.js";import"./chunk-QUNRWDVO.js";import"./chunk-ALZRXBEC.js";import"./chunk-MTJNKRXL.js";import"./chunk-HZP5U2AA.js";import"./chunk-ES2ISFJC.js";import"./chunk-H7IWJN7L.js";import{a as s}from"./chunk-FTQLQJQV.js";function c(){return["usage: teams-bot <overview|bind|rebind|diagnostics|diagnostic-run>"," teams-bot overview --team-id <id>"," teams-bot bind --team-id <id> --token <token> [--project-id <id>] [--agent-id <id>] [--microsoft-connection-id <id>]"," teams-bot rebind <bindingId> --team-id <id> [--project-id <id>] [--agent-id <id>] [--microsoft-connection-id <id>]"," teams-bot diagnostics <bindingId> --team-id <id>"," teams-bot diagnostic-run <bindingId> --team-id <id> --prompt <text> [--attachments-json <json-array>] [--action-input-json <json-object>]"].join(`
3
3
  `)}s(c,"usage");function u(n,o){if(!(o in n))return;let t=a(n,o);return!t||t==="null"||t==="none"?null:t}s(u,"nullableOption");function b(n){let o=d(n,"usage: teams-bot rebind <bindingId>"),t=u(n,"sandboxId"),r=u(n,"projectId"),i=u(n,"agentId"),e=u(n,"microsoftConnectionId");return{teamId:o,...t!==void 0?{sandboxId:t}:{},...r!==void 0?{projectId:r}:{},...i!==void 0?{agentId:i}:{},...e!==void 0?{microsoftConnectionId:e}:{}}}s(b,"bindingTargetInput");function l(n){let o=a(n,"attachmentsJson");if(!o)return;let t=g(o,"attachments-json");if(!Array.isArray(t))throw new Error("attachments-json must be a JSON array");for(let r of t)if(!r||typeof r!="object"||Array.isArray(r))throw new Error("attachments-json entries must be JSON objects");return t}s(l,"attachmentsInput");function w(n){let o=a(n,"actionInputJson");if(!o)return;let t=g(o,"action-input-json");if(!t||typeof t!="object"||Array.isArray(t))throw new Error("action-input-json must be a JSON object");return t}s(w,"actionInput");async function j(n,o){let t=o[0]||"overview",r=await f(n);if(t==="overview"){let i=d(n,"usage: teams-bot overview");console.log(JSON.stringify(await r.getMicrosoftTeamsBotOverview({teamId:i}),null,2));return}if(t==="bind"){let i=a(n,"token");if(!i)throw new Error(c());let e=await r.bindMicrosoftTeamsBotConversation({...b(n),token:i});console.log(JSON.stringify(e,null,2));return}if(t==="rebind"){let i=o[1]?.trim();if(!i)throw new Error(c());let e=await r.rebindMicrosoftTeamsBotConversation(i,b(n));console.log(JSON.stringify(e,null,2));return}if(t==="diagnostics"){let i=o[1]?.trim(),e=d(n,"usage: teams-bot diagnostics <bindingId>");if(!i)throw new Error(c());console.log(JSON.stringify(await r.sendMicrosoftTeamsBotDiagnostic({teamId:e,bindingId:i}),null,2));return}if(t==="diagnostic-run"){let i=o[1]?.trim(),e=d(n,"usage: teams-bot diagnostic-run <bindingId>"),m=a(n,"prompt");if(!i||!m)throw new Error(c());console.log(JSON.stringify(await r.sendMicrosoftTeamsBotDiagnosticRun({teamId:e,bindingId:i,prompt:m,attachments:l(n),actionInput:w(n)}),null,2));return}throw new Error(c())}s(j,"runTeamsBotCommand");export{j as runTeamsBotCommand};
@@ -1,2 +1,2 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-DHP75QSG.js";import"./chunk-6GLGOIMQ.js";import"./chunk-FTQLQJQV.js";export{a as MACOS_GIT_MISSING_DEVELOPER_TOOLS_ERROR,C as appWorkspacePaths,B as assertSafeBranchName,d as checkWorkspaceGitAvailability,J as checkoutBranch,K as checkoutBranchAtPath,M as clearWorkspaceDiffCacheForTests,D as cloneWorkspace,H as createAndCheckoutBranch,I as createAndCheckoutBranchAtPath,A as expectedRemoteUrl,t as isGeneratedWorkspacePath,i as isGitRepo,c as isMacOSGitDeveloperToolsMissing,u as isVisibleGitWorkspaceFile,r as isWorkspaceDirectory,E as lastFetchAt,z as listPlainWorkspaceFiles,P as loadGitCommitDiffAtPath,N as loadWorkspaceDiff,O as loadWorkspaceDiffAtPath,Q as loadWorkspaceFile,T as loadWorkspaceFileAtPath,R as loadWorkspaceImageFile,S as loadWorkspaceImageFileAtPath,F as loadWorkspaceState,G as loadWorkspaceStateAtPath,n as localVideoContentType,L as mapWorkspaceDiffEntriesWithConcurrency,s as normalizeWorkspaceFilePath,w as parseBranchStatusLine,x as parseNumstat,v as parseStatusLine,h as pathExists,p as readLocalImageFile,q as readLocalVideoFile,l as readWorkspaceDocumentPreview,k as readWorkspaceFile,o as readWorkspaceImageFile,g as redactRemoteUrl,b as runWorkspaceCommand,f as sourceFromRemote,e as startMacOSCommandLineToolsInstall,j as truncatePatch,y as uniqueSortedPaths,m as workspaceImageContentType};
2
+ import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-XMXGITQE.js";import"./chunk-H7JB25HO.js";import"./chunk-FTQLQJQV.js";export{a as MACOS_GIT_MISSING_DEVELOPER_TOOLS_ERROR,C as appWorkspacePaths,B as assertSafeBranchName,d as checkWorkspaceGitAvailability,J as checkoutBranch,K as checkoutBranchAtPath,M as clearWorkspaceDiffCacheForTests,D as cloneWorkspace,H as createAndCheckoutBranch,I as createAndCheckoutBranchAtPath,A as expectedRemoteUrl,t as isGeneratedWorkspacePath,i as isGitRepo,c as isMacOSGitDeveloperToolsMissing,u as isVisibleGitWorkspaceFile,r as isWorkspaceDirectory,E as lastFetchAt,z as listPlainWorkspaceFiles,P as loadGitCommitDiffAtPath,N as loadWorkspaceDiff,O as loadWorkspaceDiffAtPath,Q as loadWorkspaceFile,T as loadWorkspaceFileAtPath,R as loadWorkspaceImageFile,S as loadWorkspaceImageFileAtPath,F as loadWorkspaceState,G as loadWorkspaceStateAtPath,n as localVideoContentType,L as mapWorkspaceDiffEntriesWithConcurrency,s as normalizeWorkspaceFilePath,w as parseBranchStatusLine,x as parseNumstat,v as parseStatusLine,h as pathExists,p as readLocalImageFile,q as readLocalVideoFile,l as readWorkspaceDocumentPreview,k as readWorkspaceFile,o as readWorkspaceImageFile,g as redactRemoteUrl,b as runWorkspaceCommand,f as sourceFromRemote,e as startMacOSCommandLineToolsInstall,j as truncatePatch,y as uniqueSortedPaths,m as workspaceImageContentType};
package/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
3
- import{a as m,b as l}from"./chunks/chunk-BSHAIAXY.js";import{b as u}from"./chunks/chunk-FKVP26MC.js";import{a as c,j as d}from"./chunks/chunk-P5CFBE6Z.js";import"./chunks/chunk-XWPC3AN4.js";import{f as s}from"./chunks/chunk-3M53YXEI.js";import"./chunks/chunk-GLUWATL5.js";import{a as t}from"./chunks/chunk-FTQLQJQV.js";function f(e){return!e.command&&s(e.options.version)?"version":s(e.options.checkUpdate)?"check-update":!e.command&&s(e.options.help)?"help":!e.command&&s(e.options.tui)?"tui":e.command?"command":"ui"}t(f,"resolveCliTopLevelAction");async function C(e=process.argv.slice(2)){if(await v(e))return;let{command:r,options:o,rest:i}=u(e);typeof o.home=="string"&&(process.env.OPENPOND_HOME=(await import("./chunks/dist-4OUZANXR.js")).resolveOpenPondHome({home:o.home}));let n=f({command:r,options:o});if(n==="version"){console.log(c());return}if(n==="check-update"){await(await import("./chunks/core-commands-WFTASSGL.js")).runCheckUpdate();return}if(n==="help"){(await import("./chunks/help-4BB2A5JC.js")).printHelp();return}let a=m(o),p=l(o);if(a&&(process.env.OPENPOND_ACCOUNT=a),p&&(process.env.OPENPOND_BASE_URL=p),n==="tui"){await(await import("./chunks/app-layer-JZTMHORT.js")).runOpenPondTerminalCommand(o,i);return}if(n==="ui"){await(await import("./chunks/app-layer-JZTMHORT.js")).runOpenPondServerCommand("web",o,i);return}await d({command:r,options:o,rest:i})||((await import("./chunks/help-4BB2A5JC.js")).printHelp(),process.exit(1))}t(C,"runOpenPondCli");async function v(e){if(e[0]==="__compile-hosted-profile")return await(await import("./chunks/hosted-profile-compiler-35BQPVJ6.js")).runHostedProfileCompilerCli(e.slice(1)),!0;if(e[0]==="__app-server"){process.argv=[process.execPath,"openpond-app-server",...e.slice(1)];let[{createOpenPondAppServer:r},{runOpenPondAppServerCli:o}]=await Promise.all([import("./chunks/app-server-runtime-72NRJAB5.js"),import("./chunks/cli-ETZV6JZI.js")]);return await o(r),!0}if(e[0]==="__server"){process.argv=[process.execPath,"openpond-server",...e.slice(1)];let[{createOpenPondServer:r},{runOpenPondServerCli:o}]=await Promise.all([import("./chunks/src-J7NT5WEH.js"),import("./chunks/cli-ETZV6JZI.js")]),{createOpenPondAppServer:i}=await import("./chunks/app-server-runtime-72NRJAB5.js");return await o({createOpenPondServer:r,createOpenPondAppServer:i}),!0}return e[0]==="__terminal"?(await(await import("./chunks/src-PASASTIA.js")).runOpenPondTerminalCli(e.slice(1)),!0):!1}t(v,"runEmbeddedCompanion");C().catch(e=>{let r=e instanceof Error?e.message:String(e),o=e.issue;if(process.argv.includes("--json")&&!(e instanceof Error&&e.name==="OpenPondChildProcessExitError"))console.log(JSON.stringify({error:o??{code:"CLI_ERROR",message:r}}));else if(o&&typeof o=="object"){let n=o;console.error(`${n.code}: ${n.message}
4
- ${n.path}
5
- ${n.action}`)}else console.error(r);let i=typeof e.exitCode=="number"?e.exitCode:1;process.exit(i)});export{C as runOpenPondCli};
3
+ import{a as m,b as l}from"./chunks/chunk-BSHAIAXY.js";import{b as u}from"./chunks/chunk-VKGVC26K.js";import{a as c,j as d}from"./chunks/chunk-VB2S5HV4.js";import"./chunks/chunk-XWPC3AN4.js";import{f as s}from"./chunks/chunk-3M53YXEI.js";import"./chunks/chunk-GLUWATL5.js";import{a as n}from"./chunks/chunk-FTQLQJQV.js";function f(e){return!e.command&&s(e.options.version)?"version":s(e.options.checkUpdate)?"check-update":!e.command&&s(e.options.help)?"help":!e.command&&s(e.options.tui)?"tui":e.command?"command":"ui"}n(f,"resolveCliTopLevelAction");async function C(e=process.argv.slice(2)){if(await w(e))return;let{command:t,options:o,rest:r}=u(e);typeof o.home=="string"&&(process.env.OPENPOND_HOME=(await import("./chunks/dist-ELWB75PL.js")).resolveOpenPondHome({home:o.home}));let i=f({command:t,options:o});if(i==="version"){console.log(c());return}if(i==="check-update"){await(await import("./chunks/core-commands-XEPFY3PQ.js")).runCheckUpdate();return}if(i==="help"){(await import("./chunks/help-ZVAGMF3C.js")).printHelp();return}let a=m(o),p=l(o);if(a&&(process.env.OPENPOND_ACCOUNT=a),p&&(process.env.OPENPOND_BASE_URL=p),i==="tui"){await(await import("./chunks/app-layer-ENO5MMPX.js")).runOpenPondTerminalCommand(o,r);return}if(i==="ui"){await(await import("./chunks/app-layer-ENO5MMPX.js")).runOpenPondServerCommand("web",o,r);return}await d({command:t,options:o,rest:r})||((await import("./chunks/help-ZVAGMF3C.js")).printHelp(),process.exit(1))}n(C,"runOpenPondCli");async function w(e){if(e[0]==="__inspect-hosted-profile-evaluation")return await(await import("./chunks/hosted-profile-compiler-4LKIBC75.js")).runHostedProfileInspectionCli(e.slice(1)),!0;if(e[0]==="__prepare-hosted-profile-evaluation")return await(await import("./chunks/hosted-profile-compiler-4LKIBC75.js")).runHostedProfileEvaluationCli(e.slice(1)),!0;if(e[0]==="__compile-hosted-profile")return await(await import("./chunks/hosted-profile-compiler-4LKIBC75.js")).runHostedProfileCompilerCli(e.slice(1)),!0;if(e[0]==="__app-server"){process.argv=[process.execPath,"openpond-app-server",...e.slice(1)];let[{createOpenPondAppServer:t},{runOpenPondAppServerCli:o}]=await Promise.all([import("./chunks/app-server-runtime-LACOVSKH.js"),import("./chunks/cli-QW2BELOE.js")]);return await o(t),!0}if(e[0]==="__server"){process.argv=[process.execPath,"openpond-server",...e.slice(1)];let[{createOpenPondServer:t},{runOpenPondServerCli:o}]=await Promise.all([import("./chunks/src-PERIQ7VT.js"),import("./chunks/cli-QW2BELOE.js")]),{createOpenPondAppServer:r}=await import("./chunks/app-server-runtime-LACOVSKH.js");return await o({createOpenPondServer:t,createOpenPondAppServer:r}),!0}return e[0]==="__terminal"?(await(await import("./chunks/src-HLLPHEW4.js")).runOpenPondTerminalCli(e.slice(1)),!0):!1}n(w,"runEmbeddedCompanion");C().catch(e=>{let t=e instanceof Error?e.message:String(e),o=e.issue;if(process.argv.includes("--json")&&!(e instanceof Error&&e.name==="OpenPondChildProcessExitError"))console.log(JSON.stringify({error:o??{code:"CLI_ERROR",message:t}}));else if(o&&typeof o=="object"){let i=o;console.error(`${i.code}: ${i.message}
4
+ ${i.path}
5
+ ${i.action}`)}else console.error(t);let r=typeof e.exitCode=="number"?e.exitCode:1;process.exit(r)});export{C as runOpenPondCli};
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import"./chunks/chunk-X37KMV27.js";import"./chunks/chunk-OGPHXXCD.js";import"./chunks/chunk-TZNKOKQJ.js";import{a as Er,b as Fr,c as Gr,d as Hr,e as Ir,f as Jr,g as Kr,h as Lr,i as Mr,j as Nr,k as Or,l as Pr}from"./chunks/chunk-T7Y5OYO2.js";import{a as qr,b as sr,c as ur,d as vr,e as wr,f as yr,g as zr,h as Ar,i as Br,j as Cr,k as Dr}from"./chunks/chunk-JEVA7YQL.js";import{a as kr,b as lr,c as nr}from"./chunks/chunk-22UARBPW.js";import{A as Mo,B as No,C as Oo,D as Po,E as Qo,F as Ro,G as So,H as To,I as Uo,J as Vo,K as Wo,b as ho,c as io,d as jo,e as ko,f as lo,g as no,h as qo,i as so,j as uo,k as vo,l as wo,m as yo,n as zo,o as Ao,p as Bo,q as Co,r as Do,s as Eo,t as Fo,u as Go,v as Ho,w as Io,x as Jo,y as Ko,z as Lo}from"./chunks/chunk-562Q5UVS.js";import"./chunks/chunk-DDHUSA3I.js";import{$ as go,A as M,B as N,C as O,D as P,E as Q,F as R,G as S,H as T,I as U,J as V,K as W,L as X,M as Y,N as Z,O as _,P as $,Q as oo,U as ro,V as eo,W as fo,X as mo,Y as po,Z as to,_ as xo,a as h,b as i,c as j,d as k,e as l,f as n,g as q,h as s,i as u,j as v,k as w,l as y,n as z,o as A,p as B,q as C,r as D,s as E,t as F,u as G,v as H,w as I,x as J,y as K,z as L}from"./chunks/chunk-SHCKK3SU.js";import{a as o,b as r,c as e,d as f,e as m,f as p,g as t,h as x,i as a}from"./chunks/chunk-AOBTILU5.js";import{a as b,b as c,c as d,d as g}from"./chunks/chunk-GLUWATL5.js";import"./chunks/chunk-RELOOVWW.js";import"./chunks/chunk-GIPSOLAY.js";import{f as ao,g as bo,h as co}from"./chunks/chunk-MJC26GOX.js";import"./chunks/chunk-JUX77H6K.js";import"./chunks/chunk-QUNRWDVO.js";import"./chunks/chunk-3A7HZJNE.js";import{a as Xo,b as Yo,c as Zo,d as _o,e as $o,f as or,g as rr,h as er,i as fr,j as mr,k as pr,l as tr,m as xr,n as ar,o as br,p as cr,q as dr,r as gr,s as hr,t as ir,u as jr}from"./chunks/chunk-EAPFMACH.js";import"./chunks/chunk-6FA3GG5B.js";import"./chunks/chunk-QK2GLRCY.js";import"./chunks/chunk-HZP5U2AA.js";import"./chunks/chunk-ES2ISFJC.js";import"./chunks/chunk-H7IWJN7L.js";import"./chunks/chunk-FTQLQJQV.js";export{fo as DEFAULT_CACHE_TTL_MS,yo as DEFAULT_LOCAL_PROFILE,c as DEFAULT_OPENPOND_API_BASE_URL,g as DEFAULT_OPENPOND_CHAT_API_BASE_URL,d as DEFAULT_OPENPOND_OPCHAT_API_BASE_URL,b as DEFAULT_OPENPOND_WEB_BASE_URL,zo as DEFAULT_PROFILE_AGENT,Zo as OPENPOND_MANIFEST_FILE_NAME,ho as OpenPondProfileSetupRequiredError,bo as OpenPondSandboxClient,wo as PROFILE_MANIFEST,vo as PROFILE_REPO_MANIFEST,go as SANDBOX_RUNTIME_PROFILE_IDS,_o as SANDBOX_TEMPLATE_BUILD_PLAN_FILE_NAME,$o as SANDBOX_TEMPLATE_BUILD_PLAN_KIND,Yo as SANDBOX_TEMPLATE_PREVIEW_PORT_MAX,Xo as SANDBOX_TEMPLATE_PREVIEW_PORT_MIN,or as SandboxTemplateManifestSchema,rr as SandboxTemplateValidationDiagnosticSchema,h as apiFetch,jo as assertOpenPondProfileActionReady,io as buildOpenPondProfileSetupGate,Z as checkOpenPondApiHealth,lo as collectProfileSourceUploadEntries,Uo as commitActiveProfileChanges,i as commitFiles,Nr as computeAtr,Lr as computeBollinger,Ir as computeEma,Hr as computeEmaSeries,Kr as computeMaCross,Jr as computeMacd,Mr as computePriceChange,Er as computeRsi,Gr as computeSma,Fr as computeSmaSeries,Or as consumeAgentCreateStream,lr as consumeStream,V as createAgentFromPrompt,Pr as createClient,z as createHeadlessApps,w as createLocalProject,co as createOpenPondSandboxClient,y as createRepo,Co as defaultLocalProfileRepoPath,tr as defineSandboxTemplate,Q as deleteOrArchiveSchedule,j as deployApp,C as deployLatestTemplate,Do as emptyProfileState,eo as executeHostedTool,oo as executeUserTool,F as fetchToolManifest,ko as formatOpenPondProfileSetupRequirement,pr as formatSandboxTemplateDiagnostics,nr as formatStreamItem,E as getAppEnvironment,U as getAppExecutionTimeline,X as getAppRuntimeSummary,mo as getCachedApps,to as getCachedTools,o as getConfigPath,u as getDeploymentDetail,n as getDeploymentLogs,q as getDeploymentStatus,s as getLatestDeploymentForApp,vr as getOpChatModel,zr as getOpChatProvider,Y as getOpenPondAccount,K as getOpenToolRecipe,L as getOpenToolRules,T as getScheduleExecutionLog,A as getTemplateStatus,W as getUserPerformance,qo as hostedPublishStatusFromPayload,uo as hostedRunStatusFromRunSummary,so as hostedRunSummaryFromPayload,no as hostedSourceCheckStatusFromPayload,Eo as initLocalProfileRepo,Io as installAgentPackageIntoActiveProfile,H as listAppSchedules,v as listApps,m as listConfiguredProfiles,S as listDeploymentScheduleExecutionLogs,wr as listHostedModels,Ar as listHostedProviders,ur as listOpChatModels,yr as listOpChatProviders,I as listOpenToolRecipes,R as listScheduleExecutionLogs,B as listTemplateBranches,G as listUserTools,f as loadConfig,e as loadGlobalConfig,Fo as loadLocalProfileRepo,Lo as loadOpenPondProfileLibrary,Jo as loadOpenPondProfileState,Mo as loadOpenPondProfileStateForRef,Po as loadOpenPondProfileStateFromSource,Bo as mergeActiveLocalProfileConfig,Ao as mergeProfileRepoManifestEntry,kr as normalizeDataFrames,ao as normalizeSandboxApiUrl,Ko as openPondProfileRef,mr as parseSandboxTemplateYaml,$ as postAgentDigest,Wo as prepareAgentSdkRuntimePackage,k as promotePreviewToProduction,Go as registerLocalProfileRepo,Oo as removeOpenPondProfile,Ho as renameActiveProfileAgent,Qo as requireActiveLocalProfile,sr as resolveHostedChatApiBaseUrl,qr as resolveOpChatApiBaseUrl,ro as resolveWorkerBaseUrl,So as runAgentSdkProjectCommand,_ as runAssistantMode,Dr as runOpChatSmoke,To as runProfileCheck,Ro as runProfileSdkCommand,P as runScheduleNow,gr as sandboxTemplateBuildMetadata,hr as sandboxTemplateBuildPlan,ar as sandboxTemplateDurableVolume,dr as sandboxTemplateExecutableEntries,cr as sandboxTemplateFileInput,jr as sandboxTemplateJsonSchema,br as sandboxTemplatePreviewPort,xr as sandboxTemplateResources,ir as sandboxTemplateScaffoldFiles,x as saveConfig,a as saveGlobalConfig,t as saveProfileApiKey,Vo as saveProfilePushStatus,J as searchOpenToolRecipes,No as selectOpenPondProfile,Br as sendHostedChatTurn,p as setActiveProfile,po as setCachedApps,xo as setCachedTools,l as startAppLifecycle,M as startAppSchedules,N as stopAppSchedules,O as stopCurrentAppSchedules,Cr as streamHostedChatTurn,D as updateAppEnvironment,r as updateGlobalConfig,fr as validateSandboxTemplateManifest,er as validateSandboxTemplateYaml};
2
+ import"./chunks/chunk-X37KMV27.js";import"./chunks/chunk-OGPHXXCD.js";import"./chunks/chunk-KRC36KV2.js";import{a as Er,b as Fr,c as Gr,d as Hr,e as Ir,f as Jr,g as Kr,h as Lr,i as Mr,j as Nr,k as Or,l as Pr}from"./chunks/chunk-KIGN4FI6.js";import{a as qr,b as sr,c as ur,d as vr,e as wr,f as yr,g as zr,h as Ar,i as Br,j as Cr,k as Dr}from"./chunks/chunk-JEVA7YQL.js";import{a as kr,b as lr,c as nr}from"./chunks/chunk-22UARBPW.js";import{A as Mo,B as No,C as Oo,D as Po,E as Qo,F as Ro,G as So,H as To,I as Uo,J as Vo,K as Wo,b as ho,c as io,d as jo,e as ko,f as lo,g as no,h as qo,i as so,j as uo,k as vo,l as wo,m as yo,n as zo,o as Ao,p as Bo,q as Co,r as Do,s as Eo,t as Fo,u as Go,v as Ho,w as Io,x as Jo,y as Ko,z as Lo}from"./chunks/chunk-ZG7QX66E.js";import"./chunks/chunk-V62BHD5G.js";import{$ as go,A as M,B as N,C as O,D as P,E as Q,F as R,G as S,H as T,I as U,J as V,K as W,L as X,M as Y,N as Z,O as _,P as $,Q as oo,U as ro,V as eo,W as fo,X as mo,Y as po,Z as to,_ as xo,a as h,b as i,c as j,d as k,e as l,f as n,g as q,h as s,i as u,j as v,k as w,l as y,n as z,o as A,p as B,q as C,r as D,s as E,t as F,u as G,v as H,w as I,x as J,y as K,z as L}from"./chunks/chunk-Z2BYC6TP.js";import{a as o,b as r,c as e,d as f,e as m,f as p,g as t,h as x,i as a}from"./chunks/chunk-DXAZUJPA.js";import{a as b,b as c,c as d,d as g}from"./chunks/chunk-GLUWATL5.js";import"./chunks/chunk-KCENW4ME.js";import"./chunks/chunk-2Z6H32OC.js";import{f as ao,g as bo,h as co}from"./chunks/chunk-MJC26GOX.js";import"./chunks/chunk-TPOW52DO.js";import"./chunks/chunk-QUNRWDVO.js";import"./chunks/chunk-3A7HZJNE.js";import{a as Xo,b as Yo,c as Zo,d as _o,e as $o,f as or,g as rr,h as er,i as fr,j as mr,k as pr,l as tr,m as xr,n as ar,o as br,p as cr,q as dr,r as gr,s as hr,t as ir,u as jr}from"./chunks/chunk-EAPFMACH.js";import"./chunks/chunk-6FA3GG5B.js";import"./chunks/chunk-ALZRXBEC.js";import"./chunks/chunk-MTJNKRXL.js";import"./chunks/chunk-HZP5U2AA.js";import"./chunks/chunk-ES2ISFJC.js";import"./chunks/chunk-H7IWJN7L.js";import"./chunks/chunk-FTQLQJQV.js";export{fo as DEFAULT_CACHE_TTL_MS,yo as DEFAULT_LOCAL_PROFILE,c as DEFAULT_OPENPOND_API_BASE_URL,g as DEFAULT_OPENPOND_CHAT_API_BASE_URL,d as DEFAULT_OPENPOND_OPCHAT_API_BASE_URL,b as DEFAULT_OPENPOND_WEB_BASE_URL,zo as DEFAULT_PROFILE_AGENT,Zo as OPENPOND_MANIFEST_FILE_NAME,ho as OpenPondProfileSetupRequiredError,bo as OpenPondSandboxClient,wo as PROFILE_MANIFEST,vo as PROFILE_REPO_MANIFEST,go as SANDBOX_RUNTIME_PROFILE_IDS,_o as SANDBOX_TEMPLATE_BUILD_PLAN_FILE_NAME,$o as SANDBOX_TEMPLATE_BUILD_PLAN_KIND,Yo as SANDBOX_TEMPLATE_PREVIEW_PORT_MAX,Xo as SANDBOX_TEMPLATE_PREVIEW_PORT_MIN,or as SandboxTemplateManifestSchema,rr as SandboxTemplateValidationDiagnosticSchema,h as apiFetch,jo as assertOpenPondProfileActionReady,io as buildOpenPondProfileSetupGate,Z as checkOpenPondApiHealth,lo as collectProfileSourceUploadEntries,Uo as commitActiveProfileChanges,i as commitFiles,Nr as computeAtr,Lr as computeBollinger,Ir as computeEma,Hr as computeEmaSeries,Kr as computeMaCross,Jr as computeMacd,Mr as computePriceChange,Er as computeRsi,Gr as computeSma,Fr as computeSmaSeries,Or as consumeAgentCreateStream,lr as consumeStream,V as createAgentFromPrompt,Pr as createClient,z as createHeadlessApps,w as createLocalProject,co as createOpenPondSandboxClient,y as createRepo,Co as defaultLocalProfileRepoPath,tr as defineSandboxTemplate,Q as deleteOrArchiveSchedule,j as deployApp,C as deployLatestTemplate,Do as emptyProfileState,eo as executeHostedTool,oo as executeUserTool,F as fetchToolManifest,ko as formatOpenPondProfileSetupRequirement,pr as formatSandboxTemplateDiagnostics,nr as formatStreamItem,E as getAppEnvironment,U as getAppExecutionTimeline,X as getAppRuntimeSummary,mo as getCachedApps,to as getCachedTools,o as getConfigPath,u as getDeploymentDetail,n as getDeploymentLogs,q as getDeploymentStatus,s as getLatestDeploymentForApp,vr as getOpChatModel,zr as getOpChatProvider,Y as getOpenPondAccount,K as getOpenToolRecipe,L as getOpenToolRules,T as getScheduleExecutionLog,A as getTemplateStatus,W as getUserPerformance,qo as hostedPublishStatusFromPayload,uo as hostedRunStatusFromRunSummary,so as hostedRunSummaryFromPayload,no as hostedSourceCheckStatusFromPayload,Eo as initLocalProfileRepo,Io as installAgentPackageIntoActiveProfile,H as listAppSchedules,v as listApps,m as listConfiguredProfiles,S as listDeploymentScheduleExecutionLogs,wr as listHostedModels,Ar as listHostedProviders,ur as listOpChatModels,yr as listOpChatProviders,I as listOpenToolRecipes,R as listScheduleExecutionLogs,B as listTemplateBranches,G as listUserTools,f as loadConfig,e as loadGlobalConfig,Fo as loadLocalProfileRepo,Lo as loadOpenPondProfileLibrary,Jo as loadOpenPondProfileState,Mo as loadOpenPondProfileStateForRef,Po as loadOpenPondProfileStateFromSource,Bo as mergeActiveLocalProfileConfig,Ao as mergeProfileRepoManifestEntry,kr as normalizeDataFrames,ao as normalizeSandboxApiUrl,Ko as openPondProfileRef,mr as parseSandboxTemplateYaml,$ as postAgentDigest,Wo as prepareAgentSdkRuntimePackage,k as promotePreviewToProduction,Go as registerLocalProfileRepo,Oo as removeOpenPondProfile,Ho as renameActiveProfileAgent,Qo as requireActiveLocalProfile,sr as resolveHostedChatApiBaseUrl,qr as resolveOpChatApiBaseUrl,ro as resolveWorkerBaseUrl,So as runAgentSdkProjectCommand,_ as runAssistantMode,Dr as runOpChatSmoke,To as runProfileCheck,Ro as runProfileSdkCommand,P as runScheduleNow,gr as sandboxTemplateBuildMetadata,hr as sandboxTemplateBuildPlan,ar as sandboxTemplateDurableVolume,dr as sandboxTemplateExecutableEntries,cr as sandboxTemplateFileInput,jr as sandboxTemplateJsonSchema,br as sandboxTemplatePreviewPort,xr as sandboxTemplateResources,ir as sandboxTemplateScaffoldFiles,x as saveConfig,a as saveGlobalConfig,t as saveProfileApiKey,Vo as saveProfilePushStatus,J as searchOpenToolRecipes,No as selectOpenPondProfile,Br as sendHostedChatTurn,p as setActiveProfile,po as setCachedApps,xo as setCachedTools,l as startAppLifecycle,M as startAppSchedules,N as stopAppSchedules,O as stopCurrentAppSchedules,Cr as streamHostedChatTurn,D as updateAppEnvironment,r as updateGlobalConfig,fr as validateSandboxTemplateManifest,er as validateSandboxTemplateYaml};
@@ -26,7 +26,7 @@ Options:
26
26
 
27
27
  ```text
28
28
  Usage:
29
- openpond experiments <save|read|list|executions|start|status|cancel|retry|score|passes|pass|cancel-pass|pass-result|result|compare> [id] [candidate-id] --team <id> [--input-file <path>] [--operation-id <id>] [--json]
29
+ openpond experiments <prepare-harness|save|read|list|executions|start|status|cancel|retry|score|passes|pass|cancel-pass|pass-result|result|compare> [id] [candidate-id] --team <id> [--input-file <path>] [--operation-id <id>] [--json]
30
30
 
31
31
  Options:
32
32
  --after-id <string>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openpond",
3
- "version": "0.2.39",
3
+ "version": "0.2.41",
4
4
  "openpondReleaseVersioned": true,
5
5
  "license": "MIT",
6
6
  "description": "OpenPond CLI and local harness",
@@ -1,2 +0,0 @@
1
- import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{a as v}from"./chunk-3HQEEZPO.js";import"./chunk-XWPC3AN4.js";import{f as b}from"./chunk-3M53YXEI.js";import{b as R,c as p,d as m}from"./chunk-XEOEKFG6.js";import{k as O}from"./chunk-TZNKOKQJ.js";import{d as P}from"./chunk-AOBTILU5.js";import"./chunk-GLUWATL5.js";import"./chunk-RELOOVWW.js";import"./chunk-GIPSOLAY.js";import"./chunk-MJC26GOX.js";import"./chunk-JUX77H6K.js";import"./chunk-QUNRWDVO.js";import"./chunk-QK2GLRCY.js";import"./chunk-HZP5U2AA.js";import"./chunk-ES2ISFJC.js";import"./chunk-H7IWJN7L.js";import{a as c}from"./chunk-FTQLQJQV.js";import{promises as $,watch as C}from"node:fs";import y from"node:path";import{execFile as J}from"node:child_process";import{promisify as k}from"node:util";var K=k(J);async function G(t,n){let e=n[0]??"check",o=y.resolve(i(t,"cwd")??process.cwd()),l=i(t,"sourceDirectory"),u=i(t,"outputDirectory"),d=b(t.json);if(e==="check"||e==="build"){let r=await p({projectRoot:o,sourceDirectory:l,outputDirectory:u});if(d){console.log(JSON.stringify({status:"passed",actionCount:r.registry.actions.length,registry:r.registry,manifest:r.manifest,outputDirectory:r.outputDirectory},null,2));return}console.log(`${e==="check"?"Validated":"Built"} ${r.registry.actions.length} Project Action${r.registry.actions.length===1?"":"s"}.`),console.log(`Registry: ${r.registryPath}`),console.log(`Bundle: ${r.bundlePath}`);return}if(e==="run"){let r=n[1];if(!r)throw new Error("usage: openpond actions run <action-id> [--input JSON|--input-file PATH]");let a=await m({projectRoot:o,sourceDirectory:l,outputDirectory:u,build:"always"}).run({actionId:r,input:await I(t,o),timeoutMs:A(t,"timeoutMs")});console.log(JSON.stringify(a,null,2));return}if(e==="dev"){let r=n[1]??null;await _({projectRoot:o,sourceDirectory:l,outputDirectory:u,actionId:r,options:t,json:d});return}if(e==="publish"){let r=j(t,"projectId"),s=j(t,"teamId"),a=i(t,"apiKey"),w=process.env.OPENPOND_API_KEY?.trim()||null,g=a||w?null:await P({account:i(t,"account")}),h=a??w??(g?v(g):null);if(!h)throw new Error("OpenPond API key is required. Select a saved OpenPond account, set OPENPOND_API_KEY, or pass --api-key.");let N=await p({projectRoot:o,sourceDirectory:l,outputDirectory:u}),E=i(t,"sourceCommitSha")??await D(o,["rev-parse","HEAD"]),S=i(t,"sourceRef")??await D(o,["rev-parse","--abbrev-ref","HEAD"]),f=await O({apiKey:h,baseUrl:i(t,"baseUrl")??(process.env.OPENPOND_API_URL?.trim()||g?.apiBaseUrl)}).actions.publish({projectId:r,teamId:s,sourceRef:S,sourceCommitSha:E,build:N});console.log(d?JSON.stringify({release:f},null,2):`Published Project Actions release ${f.id} from ${f.sourceCommitSha}.`);return}throw new Error("usage: openpond actions <check|build|run|dev|publish> [action-id]")}c(G,"runProjectActionsCommand");async function _(t){let n=!1,e=!1,o=c(async()=>{if(n){e=!0;return}n=!0;try{let r=m({projectRoot:t.projectRoot,sourceDirectory:t.sourceDirectory,outputDirectory:t.outputDirectory,build:"always"});if(t.actionId){let s=await r.run({actionId:t.actionId,input:await I(t.options,t.projectRoot),timeoutMs:A(t.options,"timeoutMs")});console.log(JSON.stringify(s,null,2))}else{let s=await r.build(),a={status:"ready",actionCount:s.registry.actions.length,bundleHash:s.manifest.bundleHash};console.log(t.json?JSON.stringify(a):`Ready with ${a.actionCount} Project Action${a.actionCount===1?"":"s"}.`)}}catch(r){console.error(r instanceof Error?r.message:String(r))}finally{n=!1,e&&(e=!1,await o())}},"execute");await o();let l=await R(t.projectRoot),u=y.resolve(t.projectRoot,t.sourceDirectory??l.sourceDirectory??"openpond/actions");console.log(`Watching ${u}`);let d=C(u,{recursive:!0},()=>{setTimeout(()=>{o()},50)});await new Promise(r=>{let s=c(()=>{d.close(),r()},"stop");process.once("SIGINT",s),process.once("SIGTERM",s)})}c(_,"runDev");async function I(t,n){let e=i(t,"input"),o=i(t,"inputFile");if(e&&o)throw new Error("Use either --input or --input-file, not both.");return e?JSON.parse(e):o?JSON.parse(await $.readFile(y.resolve(n,o),"utf8")):{}}c(I,"actionInput");function i(t,n){let e=t[n];return typeof e=="string"&&e.trim()?e.trim():void 0}c(i,"stringOption");function j(t,n){let e=i(t,n);if(!e)throw new Error(`--${n.replace(/[A-Z]/g,o=>`-${o.toLowerCase()}`)} is required.`);return e}c(j,"requiredOption");async function D(t,n){let{stdout:e}=await K("git",n,{cwd:t}),o=e.trim();if(!o)throw new Error(`git ${n.join(" ")} returned no value.`);return o}c(D,"gitValue");function A(t,n){let e=i(t,n);if(e===void 0)return;let o=Number(e);if(!Number.isInteger(o)||o<=0)throw new Error(`--${n} must be a positive integer.`);return o}c(A,"integerOption");export{G as runProjectActionsCommand};
@@ -1,2 +0,0 @@
1
- import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{Lc as c,Mc as d}from"./chunk-RJACNWYJ.js";import{e as b}from"./chunk-FVALIUVY.js";import"./chunk-25OT6IYM.js";import"./chunk-R6DWG5A4.js";import"./chunk-L6ELXODL.js";import{i as a}from"./chunk-PKBU37CH.js";import"./chunk-DHP75QSG.js";import"./chunk-6GLGOIMQ.js";import"./chunk-XHJUP7M4.js";import"./chunk-7BGT6Q2D.js";import"./chunk-SBBXUZWL.js";import"./chunk-L3KS6MOV.js";import"./chunk-SHCRE7B2.js";import"./chunk-XEOEKFG6.js";import"./chunk-MRGA6BKG.js";import"./chunk-6MI4KKWF.js";import"./chunk-WCZRDULE.js";import"./chunk-RELOOVWW.js";import"./chunk-GIPSOLAY.js";import"./chunk-MJC26GOX.js";import"./chunk-JUX77H6K.js";import"./chunk-QUNRWDVO.js";import"./chunk-6FA3GG5B.js";import"./chunk-SDO4FC4Q.js";import"./chunk-IR3YJWPW.js";import"./chunk-QK2GLRCY.js";import"./chunk-HZP5U2AA.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 +0,0 @@
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-FUFIZ37W.js";import{c as g}from"./chunk-3HQEEZPO.js";import{f as m,h as y}from"./chunk-BSHAIAXY.js";import"./chunk-FKVP26MC.js";import"./chunk-P5CFBE6Z.js";import"./chunk-XWPC3AN4.js";import{a as S,f as w,j as T,k as j}from"./chunk-3M53YXEI.js";import"./chunk-OGPHXXCD.js";import"./chunk-TZNKOKQJ.js";import{b as H,c as Q}from"./chunk-22UARBPW.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-SHCKK3SU.js";import{d as f}from"./chunk-AOBTILU5.js";import"./chunk-GLUWATL5.js";import"./chunk-RELOOVWW.js";import"./chunk-GIPSOLAY.js";import"./chunk-MJC26GOX.js";import"./chunk-JUX77H6K.js";import"./chunk-QUNRWDVO.js";import"./chunk-QK2GLRCY.js";import"./chunk-HZP5U2AA.js";import"./chunk-ES2ISFJC.js";import"./chunk-H7IWJN7L.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};
@@ -1,2 +0,0 @@
1
- import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{Ja as H,Ka as L,Ua as S}from"./chunk-QK2GLRCY.js";import{f as A,h as O}from"./chunk-H7IWJN7L.js";import{a as l}from"./chunk-FTQLQJQV.js";import Q from"node:path";var U="default",z=["apiKey","baseUrl","apiBaseUrl","chatApiBaseUrl","token","appId","conversationId"];function re(){return V()}l(re,"getConfigPath");function V(){return O(A()).config}l(V,"getGlobalConfigPath");function m(n,e){return Object.prototype.hasOwnProperty.call(n,e)}l(m,"hasOwn");function h(n){if(typeof n!="string")return null;let e=n.trim();return e.length>0?e:null}l(h,"normalizeHandle");function d(n){if(typeof n!="string")return null;let e=n.trim();return e?e.replace(/\/$/,""):null}l(d,"normalizeBaseUrl");function q(n){let e=h(n);if(!e)throw new Error("profile handle must be non-empty");return e}l(q,"requireHandle");function W(n){if(typeof n!="string")throw new Error("apiKey must be a non-empty string");let e=n.trim();if(!e)throw new Error("apiKey must be a non-empty string");return e}l(W,"requireApiKey");function b(n,e){let t=h(n),s=h(e);return!!(t&&s&&t.toLowerCase()===s.toLowerCase())}l(b,"handleEquals");function v(n,e,t){let s=d(t);return n.findIndex(i=>b(i.handle,e)?s?d(i.baseUrl)===s:!0:!1)}l(v,"findAccountIndex");function P(n){let e=h(n.handle)??U,t=d(n.baseUrl);return t?{handle:e,baseUrl:t}:{handle:e}}l(P,"selectorFromAccount");function y(n){if(!n||typeof n!="object"||Array.isArray(n))return null;let e=n,t=h(typeof e.handle=="string"?e.handle:void 0);if(!t)return null;let s=d(typeof e.baseUrl=="string"?e.baseUrl:void 0);return s?{handle:t,baseUrl:s}:{handle:t}}l(y,"sanitizeActiveProfile");function B(n){if(!n||typeof n!="object"||Array.isArray(n))return;let e=n,t=typeof e.repoPath=="string"?e.repoPath.trim():"",s=typeof e.profile=="string"&&e.profile.trim()?e.profile.trim():"default";if(!t)return;let i={repoPath:t,profile:s,mode:"local"};if(e.lastCheck&&typeof e.lastCheck=="object"&&!Array.isArray(e.lastCheck)){let o=e.lastCheck,a=o.command,u=o.status,c=o.checkedAt;(a==="inspect"||a==="build"||a==="validate"||a==="eval"||a==="run")&&(u==="passed"||u==="failed")&&typeof c=="string"&&(i.lastCheck={command:a,status:u,checkedAt:c,...typeof o.exitCode=="number"||o.exitCode===null?{exitCode:o.exitCode}:{},...typeof o.sourceHead=="string"||o.sourceHead===null?{sourceHead:o.sourceHead}:{}})}if(e.lastPush&&typeof e.lastPush=="object"&&!Array.isArray(e.lastPush)){let o=e.lastPush,a=o.status,u=o.pushedAt;(a==="pushed"||a==="failed")&&typeof u=="string"&&(i.lastPush={status:a,pushedAt:u,...typeof o.teamId=="string"||o.teamId===null?{teamId:o.teamId}:{},...typeof o.projectId=="string"||o.projectId===null?{projectId:o.projectId}:{},...typeof o.localHead=="string"||o.localHead===null?{localHead:o.localHead}:{},...typeof o.hostedHead=="string"||o.hostedHead===null?{hostedHead:o.hostedHead}:{},...typeof o.sourceRef=="string"||o.sourceRef===null?{sourceRef:o.sourceRef}:{},...o.promotionStatus==="uploaded"||o.promotionStatus==="hosted_source_materialized"||o.promotionStatus==="hosted_source_materialize_failed"||o.promotionStatus==="hosted_source_check_pending"||o.promotionStatus==="hosted_source_check_failed"||o.promotionStatus==="hosted_source_published"||o.promotionStatus==="hosted_source_publish_failed"||o.promotionStatus==="hosted_run_pending"||o.promotionStatus==="hosted_run_passed"||o.promotionStatus==="hosted_run_failed"||o.promotionStatus===null?{promotionStatus:o.promotionStatus}:{},...o.hostedRunStatus==="not_started"||o.hostedRunStatus==="running"||o.hostedRunStatus==="passed"||o.hostedRunStatus==="failed"||o.hostedRunStatus===null?{hostedRunStatus:o.hostedRunStatus}:{},...typeof o.hostedRunAgentId=="string"||o.hostedRunAgentId===null?{hostedRunAgentId:o.hostedRunAgentId}:{},...typeof o.hostedRunId=="string"||o.hostedRunId===null?{hostedRunId:o.hostedRunId}:{},...typeof o.hostedRunAt=="string"||o.hostedRunAt===null?{hostedRunAt:o.hostedRunAt}:{},...w(o.hostedSourceMaterialization)?{hostedSourceMaterialization:w(o.hostedSourceMaterialization)}:{},...E(o.hostedSourceCheck)?{hostedSourceCheck:E(o.hostedSourceCheck)}:{},...K(o.hostedPublish)?{hostedPublish:K(o.hostedPublish)}:{},...M(o.hostedRun)?{hostedRun:M(o.hostedRun)}:{},...typeof o.error=="string"||o.error===null?{error:o.error}:{}})}if(Array.isArray(e.profiles)){let o=e.profiles.flatMap(a=>{let u=B(a);if(!u)return[];let c=a,p=c.source==="github"||c.source==="openpond_git"?c.source:"local",C=typeof c.repositoryId=="string"&&c.repositoryId.trim()?c.repositoryId.trim():Q.resolve(u.repoPath);return[{source:p,repositoryId:C,repoPath:u.repoPath,profile:u.profile,...u.lastCheck?{lastCheck:u.lastCheck}:{},...u.lastPush?{lastPush:u.lastPush}:{}}]});o.length>0&&(i.profiles=o)}return i}l(B,"sanitizeLocalOpenPondProfile");function w(n){if(!n||typeof n!="object"||Array.isArray(n))return null;let e=n,t=R(e.status);return t?{status:t,...r(e,"agentId"),...r(e,"runtimeAgentId"),...r(e,"projectId"),...r(e,"sourceRoot"),...r(e,"sourceRef"),...r(e,"sourceCommitSha"),...r(e,"manifestHash"),...r(e,"manifestPath"),...r(e,"manifestSyncedAt"),...T(e,"fileCount"),...T(e,"totalBytes"),...r(e,"generatedManifestPath"),...k(e,"synthesizedOpenPondYaml"),...r(e,"uploadMetadataPath"),...f(e,"setupCommands"),...f(e,"validationCommands"),...r(e,"materializedAt"),...r(e,"error")}:null}l(w,"sanitizeHostedMaterializationStatus");function E(n){if(!n||typeof n!="object"||Array.isArray(n))return null;let e=n,t=R(e.status);return t?{status:t,...r(e,"agentId"),...r(e,"deployPlanStatus"),...k(e,"canRun"),...k(e,"canDeploy"),...r(e,"sourceRef"),...r(e,"sourceCommitSha"),...r(e,"manifestHash"),...r(e,"manifestPath"),...f(e,"setupCommands"),...f(e,"validationCommands"),...f(e,"requiredChecks"),...f(e,"evalNames"),...f(e,"blockedReasons"),...f(e,"staleReasons"),...r(e,"runtimeId"),...r(e,"sandboxId"),...f(e,"traceArtifactRefs"),...f(e,"evalResultArtifactRefs"),...f(e,"validatorArtifactRefs"),...r(e,"checkedAt"),...r(e,"error")}:null}l(E,"sanitizeHostedSourceCheckStatus");function K(n){if(!n||typeof n!="object"||Array.isArray(n))return null;let e=n,t=R(e.status);return t?{status:t,...r(e,"agentId"),...r(e,"snapshotId"),...r(e,"sourceRef"),...r(e,"sourceCommitSha"),...r(e,"manifestHash"),...r(e,"manifestPath"),...r(e,"buildStatus"),...r(e,"validationStatus"),...r(e,"evalStatus"),...r(e,"publishedAt"),...r(e,"error")}:null}l(K,"sanitizeHostedPublishStatus");function M(n){if(!n||typeof n!="object"||Array.isArray(n))return null;let e=n,t=R(e.status);return t?{status:t,...r(e,"agentId"),...r(e,"runId"),...r(e,"runtimeId"),...r(e,"sandboxId"),...r(e,"sourceRef"),...r(e,"sourceCommitSha"),...r(e,"manifestHash"),...r(e,"setupGateStatus"),...f(e,"setupRequirementRefs"),...f(e,"artifactRefs"),...f(e,"traceArtifactRefs"),...f(e,"evalArtifactRefs"),...r(e,"startedAt"),...r(e,"completedAt"),...r(e,"error")}:null}l(M,"sanitizeHostedRunSummary");function r(n,e){let t=n[e];return typeof t=="string"||t===null?{[e]:t}:{}}l(r,"nullableStringProp");function k(n,e){let t=n[e];return typeof t=="boolean"||t===null?{[e]:t}:{}}l(k,"nullableBooleanProp");function T(n,e){let t=n[e];return typeof t=="number"||t===null?{[e]:t}:{}}l(T,"nullableNumberProp");function f(n,e){let t=n[e];if(!Array.isArray(t))return{};let s=t.filter(i=>typeof i=="string");return{[e]:s}}l(f,"stringArrayProp");function R(n){return typeof n=="string"&&n.trim()?n.trim():null}l(R,"stringField");function D(n,e){if(!b(n.handle,e.handle))return!1;let t=d(e.baseUrl);return t?d(n.baseUrl)===t:!d(n.baseUrl)}l(D,"accountMatchesSelector");function I(n,e,t={}){let s=d(e.baseUrl);if(s)return v(n,e.handle,s);let i=n.findIndex(a=>D(a,e));if(i!==-1)return i;let o=n.map((a,u)=>({account:a,index:u})).filter(({account:a})=>b(a.handle,e.handle));if(o.length>1&&t.requireUnambiguous)throw new Error(`multiple profiles found for ${e.handle}; pass --base-url to select one`);return o[0]?.index??-1}l(I,"findAccountIndexForSelector");function X(n){if(!n||typeof n!="object"||Array.isArray(n))return;let e=n,t={};return typeof e.token=="string"&&(t.token=e.token),(typeof e.appId=="string"||e.appId===null)&&(t.appId=e.appId),(typeof e.conversationId=="string"||e.conversationId===null)&&(t.conversationId=e.conversationId),Object.keys(t).length>0?t:void 0}l(X,"sanitizeSession");function Z(n){if(!n||typeof n!="object"||Array.isArray(n))return null;let e=n,t=h(typeof e.handle=="string"?e.handle:void 0);if(!t)return null;let s={handle:t};typeof e.apiKey=="string"&&(s.apiKey=e.apiKey),typeof e.baseUrl=="string"&&(s.baseUrl=e.baseUrl),typeof e.apiBaseUrl=="string"&&(s.apiBaseUrl=e.apiBaseUrl),typeof e.chatApiBaseUrl=="string"&&(s.chatApiBaseUrl=e.chatApiBaseUrl),typeof e.environment=="string"&&(s.environment=e.environment);let i=X(e.session);return i&&(s.session=i),s}l(Z,"sanitizeAccount");function ee(n){let e={};return typeof n.token=="string"&&(e.token=n.token),(typeof n.appId=="string"||n.appId===null)&&(e.appId=n.appId),(typeof n.conversationId=="string"||n.conversationId===null)&&(e.conversationId=n.conversationId),Object.keys(e).length>0?e:void 0}l(ee,"extractLegacySession");function ne(n,e){let t={handle:e};typeof n.apiKey=="string"&&(t.apiKey=n.apiKey),typeof n.baseUrl=="string"&&(t.baseUrl=n.baseUrl),typeof n.apiBaseUrl=="string"&&(t.apiBaseUrl=n.apiBaseUrl),typeof n.chatApiBaseUrl=="string"&&(t.chatApiBaseUrl=n.chatApiBaseUrl);let s=ee(n);return s&&(t.session=s),t}l(ne,"extractLegacyAccount");function x(n){let e={};typeof n.lspEnabled=="boolean"&&(e.lspEnabled=n.lspEnabled),(n.executionMode==="local"||n.executionMode==="hosted")&&(e.executionMode=n.executionMode),(n.mode==="general"||n.mode==="builder")&&(e.mode=n.mode);let t=B(n.openpondProfile);t&&(e.openpondProfile=t);let s=[],i=Array.isArray(n.accounts)?n.accounts:[];for(let c of i){let p=Z(c);p&&v(s,p.handle,p.baseUrl)===-1&&s.push(p)}if(s.length===0){let c=y(n.activeProfile)?.handle||U;s.push(ne(n,c))}let o=y(n.activeProfile),a=o?I(s,o):-1,u=s[a===-1?0:a];return e.accounts=s,e.activeProfile=P(u),e}l(x,"normalizeGlobalConfig");function N(n,e,t){let s=n.accounts??[],i=d(t??process.env.OPENPOND_BASE_URL),o=h(e);if(o)return i?{handle:o,baseUrl:i}:{handle:o};let a=h(process.env.OPENPOND_ACCOUNT);if(a)return i?{handle:a,baseUrl:i}:{handle:a};let u=y(n.activeProfile);return u?i?{handle:u.handle,baseUrl:i}:u:s[0]?P(s[0]):{handle:U}}l(N,"resolveRequestedProfile");function G(n,e,t){let s=d(t);if(s){let o=v(n,e,s);if(o!==-1)return n[o]}else{let o=n.filter(a=>b(a.handle,e));if(o.length>1)throw new Error(`multiple profiles found for ${e}; pass --base-url to select one`);if(o.length===1)return o[0]}let i={handle:e};return s&&(i.baseUrl=s),n.push(i),i}l(G,"ensureAccount");function j(n){n.session&&Object.keys(n.session).length===0&&delete n.session}l(j,"cleanupAccount");function te(n,e,t,s){let i=t===null||t===void 0&&s.undefinedDeletes;switch(e){case"apiKey":{if(i){delete n.apiKey;return}typeof t=="string"&&(n.apiKey=t);return}case"baseUrl":{if(i){delete n.baseUrl;return}typeof t=="string"&&(n.baseUrl=t);return}case"apiBaseUrl":{if(i){delete n.apiBaseUrl;return}typeof t=="string"&&(n.apiBaseUrl=t);return}case"chatApiBaseUrl":{if(i){delete n.chatApiBaseUrl;return}typeof t=="string"&&(n.chatApiBaseUrl=t);return}case"token":case"appId":case"conversationId":{if(n.session||(n.session={}),i){delete n.session[e],j(n);return}(typeof t=="string"||t===null)&&(n.session[e]=t),j(n);return}}}l(te,"applyScopedKey");function $(n,e,t){if(!z.some(c=>m(e,c)))return!1;let i=n.accounts??[],o=y(e.activeProfile)??N(n),a=d(m(e,"baseUrl")?e.baseUrl??null:o.baseUrl??process.env.OPENPOND_BASE_URL),u=G(i,o.handle,a);for(let c of z)m(e,c)&&te(u,c,e[c],t);return n.accounts=i,n.activeProfile=P(u),!0}l($,"applyAccountPatch");function F(n,e){if(m(e,"lspEnabled")&&(typeof e.lspEnabled=="boolean"?n.lspEnabled=e.lspEnabled:e.lspEnabled===null&&delete n.lspEnabled),m(e,"executionMode")&&(e.executionMode==="local"||e.executionMode==="hosted"?n.executionMode=e.executionMode:e.executionMode===null&&delete n.executionMode),m(e,"mode")&&(e.mode==="general"||e.mode==="builder"?n.mode=e.mode:e.mode===null&&delete n.mode),m(e,"activeProfile")){let t=y(e.activeProfile);if(t){let s=I(n.accounts??[],t);n.activeProfile=s===-1?t:P((n.accounts??[])[s])}else e.activeProfile===null&&delete n.activeProfile}if(m(e,"openpondProfile")){let t=B(e.openpondProfile);t?n.openpondProfile=t:e.openpondProfile===null&&delete n.openpondProfile}}l(F,"applyTopLevelPatch");async function oe(n){let e=A();await S(e),await L(e,()=>n)}l(oe,"writeGlobalConfig");async function _(n){let e=A();return await S(e),await L(e,t=>{let s=x(t);return n(s),s})}l(_,"updateGlobalConfig");async function Y(){let n=A();return await S(n),x(await H(n))}l(Y,"loadGlobalConfig");async function le(n={}){let e=await Y(),t=e.accounts??[],s=N(e,n.account,n.baseUrl),i=I(t,s,{requireUnambiguous:!0}),o=i===-1?null:t[i],a=o?.session;return{...e,activeProfile:o?P(o):s,apiKey:o?.apiKey,baseUrl:o?.baseUrl,apiBaseUrl:o?.apiBaseUrl,chatApiBaseUrl:o?.chatApiBaseUrl,token:a?.token,appId:a?.appId,conversationId:a?.conversationId}}l(le,"loadConfig");async function J(){let n=await Y(),e=y(n.activeProfile);return(n.accounts??[]).map(t=>{let s=h(t.handle)??U;return{handle:s,baseUrl:d(t.baseUrl),apiBaseUrl:d(t.apiBaseUrl),chatApiBaseUrl:d(t.chatApiBaseUrl),environment:t.environment?.trim()||null,isActive:!!(e&&D({...t,handle:s},e)),hasApiKey:!!t.apiKey?.trim(),hasSessionToken:!!t.session?.token?.trim(),sessionAppId:t.session?.appId??null,sessionConversationId:t.session?.conversationId??null}})}l(J,"listConfiguredProfiles");async function ae(n,e={}){let t=q(n),s=d(e.baseUrl),i=-1;await _(a=>{let u=a.accounts??[];if(i=I(u,s?{handle:t,baseUrl:s}:{handle:t},{requireUnambiguous:!0}),i===-1)throw new Error(`profile not found: ${t}`);a.activeProfile=P(u[i])});let o=await J();return o.find(a=>a.isActive)??o[i]}l(ae,"setActiveProfile");async function ue(n){let e=q(n.handle),t=W(n.apiKey),s=d(n.baseUrl),i=d(n.apiBaseUrl),o=d(n.chatApiBaseUrl),a={handle:e};await _(p=>{let C=p.accounts??[],g=G(C,e,s);g.apiKey=t,s&&(g.baseUrl=s),i?g.apiBaseUrl=i:n.apiBaseUrl===null&&delete g.apiBaseUrl,o?g.chatApiBaseUrl=o:n.chatApiBaseUrl===null&&delete g.chatApiBaseUrl,n.environment===null?delete g.environment:typeof n.environment=="string"&&n.environment.trim()&&(g.environment=n.environment.trim()),p.accounts=C,a=P(g),n.setActive!==!1&&(p.activeProfile=a)});let c=(await J()).find(p=>b(p.handle,a.handle)?s?d(p.baseUrl)===s:!0:!1);if(!c)throw new Error(`failed to save profile: ${e}`);return c}l(ue,"saveProfileApiKey");async function ce(n){let e=x(n);F(e,n),$(e,n,{undefinedDeletes:!0}),await oe(e)}l(ce,"saveConfig");async function de(n){await _(e=>{F(e,n),$(e,n,{undefinedDeletes:!1})})}l(de,"saveGlobalConfig");export{re as a,_ as b,Y as c,le as d,J as e,ae as f,ue as g,ce as h,de as i};
@@ -1,2 +0,0 @@
1
- import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{ya as u,za as h}from"./chunk-QK2GLRCY.js";import{f as c}from"./chunk-H7IWJN7L.js";import{a as s}from"./chunk-FTQLQJQV.js";import{createHash as i}from"node:crypto";import{readFile as m}from"node:fs/promises";import y from"node:path";var U=".openpond/source-upload-cache.json",d="openpond.source-upload-cache.v1";async function E(e){try{let a=(await u(c(),"source-upload.v1",l(e)))?.payload;if(!a)return new Map;if(a.schema!==d||!a.entries)return new Map;let t=new Map;for(let[o,n]of Object.entries(a.entries))!f(n)||o!==p(n)||t.set(o,n);return t}catch{return new Map}}s(E,"readSourceUploadCache");async function b(e,r){let a=await m(e.absolutePath),t=i("sha256").update(a).digest("hex"),o=p({...e,sha256:t}),n=r.get(o);return n&&n.sha256===t&&i("sha256").update(Buffer.from(n.contentsBase64,"base64")).digest("hex")===t?{file:e,entry:{path:e.path,type:"file",contentsBase64:n.contentsBase64},sha256:n.sha256}:{file:e,entry:{path:e.path,type:"file",contentsBase64:a.toString("base64")},sha256:t}}s(b,"materializeSourceUploadFile");async function A(e,r){let a={};for(let t of r){let o={path:t.file.path,size:t.file.size,mtimeMs:t.file.mtimeMs,ctimeMs:t.file.ctimeMs,sha256:t.sha256,contentsBase64:t.entry.contentsBase64};a[p(o)]=o}await h(c(),"source-upload.v1",l(e),{schema:d,generatedAt:new Date().toISOString(),entries:a})}s(A,"writeSourceUploadCache");function p(e){return`${e.path}\0${e.sha256}`}s(p,"cacheKeyForFile");function f(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;let r=e;return typeof r.path=="string"&&typeof r.size=="number"&&typeof r.mtimeMs=="number"&&typeof r.ctimeMs=="number"&&typeof r.sha256=="string"&&typeof r.contentsBase64=="string"}s(f,"isCacheEntry");function l(e){return i("sha256").update(y.resolve(e)).digest("hex")}s(l,"sourceScope");export{U as a,E as b,b as c,A as d};
@@ -1,2 +0,0 @@
1
- import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{j as y}from"./chunk-R6DWG5A4.js";import{E as u,J as j,K as E}from"./chunk-PKBU37CH.js";import{O as v,R as I,S as b,Y as f}from"./chunk-SBBXUZWL.js";import{Ba as S}from"./chunk-QUNRWDVO.js";import{$ as k,Y as H,_ as w,aa as U,ca as M,kb as O}from"./chunk-QK2GLRCY.js";import{b as i}from"./chunk-ES2ISFJC.js";import{a as h,c as R,f as x,h as l}from"./chunk-H7IWJN7L.js";import{a as n}from"./chunk-FTQLQJQV.js";import m from"node:path";import{AsyncLocalStorage as J}from"node:async_hooks";import{promises as C}from"node:fs";var T=new J;function Z(r,e=!1){let t=T.getStore();t&&(e&&(t.length=0),t.push(r))}n(Z,"onStartupFailure");async function ee(r,e){await O(r);let t;try{t=await U(m.join(l(r).runtime,"server-owner"),100)}catch(s){if(s instanceof R&&s.issue.code==="STORAGE_BUSY"){let a=await M(m.join(l(r).runtime,"endpoint.json"),()=>null);throw new R({code:"RUNTIME_ALREADY_RUNNING",path:r,message:"An OpenPond runtime already owns this home.",action:a?.url?`Connect to the existing runtime at ${a.url}, or stop it before starting another.`:"Stop the existing runtime before starting another with this home."})}throw s}let o=[];try{let s=await h(r,()=>T.run(o,e)),a=s.close.bind(s);o.length=0;let d;return{...s,close:n(()=>d??=(async()=>{try{await h(r,a)}finally{await C.rm(m.join(l(r).runtime,"endpoint.json"),{force:!0}),await t()}})(),"close")}}catch(s){try{for(let a of o.reverse())await Promise.resolve().then(()=>h(r,a)).catch(()=>{});await C.rm(m.join(l(r).runtime,"endpoint.json"),{force:!0})}finally{await t()}throw s}}n(ee,"ownHomeRuntime");async function te(r,e,t){await w(m.join(l(r).runtime,"endpoint.json"),JSON.stringify({schemaVersion:"openpond.runtimeEndpoint.v1",pid:process.pid,url:e,serverId:t}))}n(te,"publishRuntimeEndpoint");function ne(r){return W({runtime:E(r.ports),close:r.close})}n(ne,"createAppServer");function W(r){let e=!1;return{runtime:r.runtime,close:n(async()=>{e||(e=!0,await r.close?.())},"close")}}n(W,"attachAppServer");async function ie(r){let e=typeof r.appServer=="function"?null:r.appServer;try{await j({host:e?.runtime??(async()=>(e=await r.appServer(),e.runtime)),readable:r.readable,writable:r.writable,hostStorageClient:r.hostStorageClient})}finally{await e?.close()}}n(ie,"runAppServerJsonl");import{randomBytes as z}from"node:crypto";function pe(){return x()}n(pe,"appDataDir");function ue(r){return l(r).config}n(ue,"providersConfigPath");function me(r){return l(r).credentials}n(me,"providerSecretsConfigPath");function ge(r){return l(r).key}n(ge,"providerSecretsKeyPath");async function fe(r){let e=l(r).token;return k(e,async()=>{let t=(await H(e))?.trim(),o=process.env.OPENPOND_APP_TOKEN||t||z(32).toString("base64url");return o!==t&&await w(e,o),{token:o,tokenFile:e}})}n(fe,"ensureCapabilityToken");import p from"node:path";import{readFile as _}from"node:fs/promises";var F=i.object({profileId:i.string().min(1),sourceRevision:i.string().min(1),repositoryId:i.string().min(1),harnessRelease:i.object({id:i.string().min(1),contentHash:i.string().regex(/^[a-f0-9]{64}$/)}).strict(),workspaceId:i.string().min(1),assetsPath:i.string().min(1).refine(p.isAbsolute)}).strict();async function Ie(r,e){let t=F.parse(e),o=await y(r,t.harnessRelease);if(!o||p.resolve(o.release.bundlePath)!==p.resolve(t.assetsPath))throw new Error("Hosted Profile release changed after admission.");let s=o.release.harnessRelease.metadata.profile;if(!s||typeof s!="object"||s.id!==t.profileId||s.sourceRevision!==t.sourceRevision||s.repositoryId!==void 0&&s.repositoryId!==t.repositoryId)throw new Error("Hosted Profile provenance differs from admitted release.");return{profile:b(),profileLibrary:I()}}n(Ie,"loadHostedProfileStateAndLibrary");async function be(r,e){let t=F.parse(e),o=await y(r,t.harnessRelease);if(!o||p.resolve(o.release.bundlePath)!==p.resolve(t.assetsPath))throw new Error("Hosted Profile workflow release is unavailable.");let s=o.release.harnessRelease.metadata.profile;if(s?.id!==t.profileId||s.sourceRevision!==t.sourceRevision||s.repositoryId!==void 0&&s.repositoryId!==t.repositoryId)throw new Error("Hosted Profile workflow provenance changed.");let a=t.harnessRelease,d={source:"openpond_git",repositoryId:t.repositoryId,profileId:t.profileId};if(!o.release.harnessRelease.files.some(g=>g.path==="workflows/catalog.json"))return{profileRef:d,sourceRevision:t.sourceRevision,harnessRelease:a,workflows:[]};let c=p.join(o.release.bundlePath,"source","workflows"),A=S({agentSnapshot:o.release.agentSnapshot,harnessRelease:o.release.harnessRelease,catalogBytes:await _(p.join(c,"catalog.json")),actionBytes:await _(p.join(c,"actions.json"))});return{profileRef:d,sourceRevision:t.sourceRevision,harnessRelease:a,workflows:A.catalog.workflows.map(g=>({workflow:g,binding:{schemaVersion:"openpond.profileWorkflowBinding.v1",profileId:t.profileId,sourceRevision:t.sourceRevision,harnessRelease:a,catalogHash:A.catalogHash,workflowId:g.id}}))}}n(be,"listHostedProfileWorkflows");import{createHash as G,randomUUID as P}from"node:crypto";var N=i.object({approval:v,revision:i.number().int().positive()}).strict(),B=i.object({record:f}).strict(),$=i.object({startedAt:i.string().min(1),requestOrdinal:i.number().int().nonnegative(),id:i.string().min(1)}).strict(),q=i.object({records:i.array(f).max(200),nextBefore:$.nullable()}).strict(),V=1e4,L=class{constructor(e){this.client=e}client;static{n(this,"HostedApprovalStorage")}async readApproval(e){let t=await this.client.request({contractVersion:u,requestId:P(),operation:"approval/get",params:{approvalId:e}});return t===null?null:N.parse(t)}async getApproval(e){return(await this.readApproval(e))?.approval??null}async putApproval(e){let t=v.parse(e.approval);if(!e.requestId.trim())throw new Error("Approval mutation requires a stable request ID.");return N.parse(await this.client.request({contractVersion:u,requestId:e.requestId,operation:"approval/upsert",params:{approval:t,expectedRevision:e.expectedRevision}}))}},D=class{constructor(e){this.client=e}client;static{n(this,"HostedModelUsageStorage")}async upsertModelUsageRecord(e){let t=f.parse(e),o=G("sha256").update(JSON.stringify(t)).digest("hex"),s=await this.client.request({contractVersion:u,requestId:`usage:${o}`,operation:"usage/upsert",params:{record:t}}),a=B.parse(s).record;if(a.requestId!==t.requestId)throw new Error("Host usage upsert changed request identity.");return a}async getModelUsageRecordByRequestId(e){let t=await this.client.request({contractVersion:u,requestId:P(),operation:"usage/getByRequestId",params:{requestId:e}});return t===null?null:B.parse(t).record}async listModelUsageRecords(e={}){let t=e.limit===void 0||e.limit>=V,o=e.limit===void 0?V:Math.max(1,Math.min(1e4,Math.trunc(e.limit))),s={...e.sessionId?{sessionId:e.sessionId}:{},...e.turnId?{turnId:e.turnId}:{},...e.provider?{provider:e.provider}:{},...e.model?{model:e.model}:{},...e.startedAtFrom?{startedAtFrom:e.startedAtFrom}:{},...e.startedAtTo?{startedAtTo:e.startedAtTo}:{},...e.visibility&&e.visibility!=="all"?{visibility:e.visibility}:{},...e.status&&e.status!=="all"?{status:e.status}:{}},a=[],d=null;for(;a.length<o+(t?1:0);){let c=q.parse(await this.client.request({contractVersion:u,requestId:P(),operation:"usage/page",params:{query:s,before:d,limit:Math.min(200,o+(t?1:0)-a.length)}}));if(a.push(...c.records),a.length>o)throw new Error(`Hosted usage query exceeds ${o} rows; narrow its filters or use a streamed aggregation.`);if(c.nextBefore===null)break;if(c.records.length===0||JSON.stringify(c.nextBefore)===JSON.stringify(d))throw new Error("Host usage cursor did not advance.");d=c.nextBefore}return a}async listModelUsageRecordsComplete(e={}){return this.listModelUsageRecords(e)}};export{Z as a,ee as b,te as c,ne as d,ie as e,pe as f,ue as g,me as h,ge as i,fe as j,L as k,D as l,F as m,Ie as n,be as o};
@@ -1,3 +0,0 @@
1
- import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{f as S}from"./chunk-3M53YXEI.js";import{a as o}from"./chunk-FTQLQJQV.js";import{readFileSync as j}from"node:fs";import k from"node:path";function x(){let t=["../../../package.json","../../package.json","../package.json","./package.json","../../../../package.json"];for(let n of t)try{let s=new URL(n,import.meta.url),i=j(s,"utf-8"),r=JSON.parse(i);if(typeof r.version=="string")return r.version}catch{}try{let n=j(k.join(k.dirname(process.execPath),"package.json"),"utf-8"),s=JSON.parse(n);if(typeof s.version=="string")return s.version}catch{}return"unknown"}o(x,"getInstalledCliVersion");function I(t){let n=/^v?(\d+)\.(\d+)\.(\d+)(?:[-+].*)?$/.exec(t.trim());if(!n)return null;let s=Number.parseInt(n[1],10),i=Number.parseInt(n[2],10),r=Number.parseInt(n[3],10);return!Number.isFinite(s)||!Number.isFinite(i)||!Number.isFinite(r)?null:[s,i,r]}o(I,"parseSemver");function X(t,n){let s=I(t),i=I(n);if(!s||!i)return null;for(let r=0;r<3;r+=1){if(s[r]<i[r])return-1;if(s[r]>i[r])return 1}return 0}o(X,"compareSemver");async function Y(t){let n=new AbortController,s=setTimeout(()=>n.abort(),7e3);try{let i=await fetch(`https://registry.npmjs.org/${encodeURIComponent(t)}/latest`,{signal:n.signal});if(!i.ok){let d=await i.text().catch(()=>"");throw new Error(`npm registry request failed: ${i.status} ${d}`.trim())}let r=await i.json().catch(()=>({}));if(typeof r.version!="string"||r.version.trim().length===0)throw new Error("npm registry payload missing version");return r.version.trim()}finally{clearTimeout(s)}}o(Y,"fetchLatestNpmVersion");var a="boolean",m="integer",l="json",g="number",e="string",P={agent:e,approvalPolicy:e,cwd:e,json:a,maxOutputBytes:m,message:e,messageFile:e,model:e,noServerStart:a,nonInteractive:a,project:e,provider:e,resume:e,sandbox:e,server:e,stdin:a,timeoutSec:m,yes:a},O={access:e,agentId:e,all:a,artifactPaths:e,async:a,authHeader:e,authHeaderValue:e,authToken:e,autoStart:a,baseRef:e,branch:e,budget:g,budgetUsd:g,cleanup:a,cols:m,command:e,content:e,contentBase64:e,contents:e,contentsBase64:e,cpu:g,create:a,description:e,diskGb:g,dockerBuildArgs:l,dockerRegistrySecretRefs:e,dockerfile:e,dockerfileContext:e,dockerfileTarget:e,domain:e,env:e,environment:e,envLiteral:e,envName:e,envRef:e,expectedMppMode:e,expectedVersion:m,failOnUnpreservedChanges:a,ffOnly:a,forceWithLease:a,fork:a,fromPath:e,idempotencyKey:e,idleTimeoutSeconds:m,image:e,imageDigest:e,input:e,inputBase64:e,integrationCapabilities:e,integrationConnection:e,integrationScopes:e,intervalMs:m,json:a,keep:a,label:e,leaseId:e,lifecycleHint:l,manifestPath:e,maxDurationSeconds:m,maxEntries:g,maxResults:g,memoryGb:g,message:e,name:e,noPreview:a,overwrite:a,params:l,path:e,paths:e,payload:l,port:m,preview:a,projectId:e,publish:a,q:e,query:e,rebase:a,recursive:a,registrySecretRef:e,remote:e,replayState:e,repo:e,respondAsync:a,rows:m,runtimeAgentId:e,runtimeBaseBranch:e,runtimeBaseSha:e,runtimeId:e,runtimeProfileId:e,runtimeProjectId:e,runtimePromotionPolicy:e,runtimeWorkspaceRoot:e,sandboxId:e,scope:e,since:m,snapshot:a,snapshotId:e,sourceProjectId:e,sourceRepoUrl:e,sourceSandboxId:e,startPoint:e,status:e,stdin:a,summary:a,tag:e,tags:e,targetId:e,targetType:e,teamId:e,templateName:e,templateVersion:e,templateVisibility:e,timeoutSeconds:m,toPath:e,type:e,useCase:e,validationCommand:e,value:e,version:e,volumeDeleteOnSandboxDelete:a,volumeMountPath:e,volumeName:e,volumeStorageGb:g,workflowMode:e},A={action:e,agentId:e,budget:g,budgetUsd:g,build:e,branch:e,commit:a,commitMessage:e,description:e,dir:e,disableSchedule:e,disableSchedules:e,enableSchedule:e,enableSchedules:e,entrypoint:e,env:l,envRef:e,file:e,force:a,idleTimeoutSeconds:m,inherit:a,input:l,inputFile:e,inputFiles:e,inputJson:l,inputs:l,json:a,keepTokenRemote:a,manifest:e,maxDurationSeconds:m,name:e,noPush:a,noWrite:a,out:e,outDir:e,output:e,outputDir:e,params:l,path:e,plan:e,projectId:e,repo:e,runtimeAgentId:e,runtimeBaseBranch:e,runtimeBaseSha:e,runtimeId:e,runtimeProjectId:e,runtimePromotionPolicy:e,scheduleMode:e,scheduleOverride:l,scheduleOverrides:l,schedules:e,service:e,setRemoteToken:a,setupTimeoutSeconds:m,target:e,teamId:e,timeoutSeconds:m,token:e,workflowMode:e,yes:a},T={branch:e,commitMessage:e,defaultBranch:e,description:e,gitOwner:e,gitRepo:e,internalRepoPath:e,json:a,name:e,path:e,projectId:e,repo:e,sourceCheckDispatch:e,sourceType:e,teamId:e,templateRepoUrl:e},E={agentId:e,agentEdit:l,allowLatestSource:a,allowedActions:e,attachmentsJson:l,baseSha:e,chatMode:e,checkKind:e,conversationId:e,cwd:e,dispatch:e,entrypointName:e,entrypointScope:e,expectedManifestHash:e,evalStatus:e,expectedSourceCommitSha:e,idempotencyKey:e,input:l,inputFile:e,json:a,limit:m,message:e,metadata:l,name:e,path:e,payload:l,projectId:e,prompt:e,provider:e,publishedSnapshotId:e,ref:e,requirePublishedSnapshot:a,requiredEnv:e,requiredIntegrations:e,runtimePromotionPolicy:e,runtimeSourceMode:e,sourceCheckDispatch:e,sourceMode:e,sourceRef:e,status:e,targetProjectId:e,teamId:e,triggerType:e,workflowMode:e};var b={account:"string",apiBaseUrl:"string",apiBaseurl:"string",baseUrl:"string",baseurl:"string",chatApiBaseUrl:"string",chatApiBaseurl:"string",checkUpdate:"boolean",cwd:"string",help:"boolean",home:"string",json:"boolean",profile:"string",sandboxApiUrl:"string",sandboxApiurl:"string",tui:"boolean",version:"boolean"},ae={C:"cwd",f:"force",h:"help",j:"json",v:"version",y:"yes"},B={cwd:"string",input:"json",inputFile:"string",json:"boolean",path:"string"},C=[{name:"datasets",usage:"openpond datasets <upload|read|list|validate|publish> [folder|id] --team <id> --api-base-url <origin> [--operation-id <id>] [--expected-revision <n>] [--publish] [--project <id>] [--dataset-id <id>]",optionSchema:{team:"string",operationId:"string",expectedRevision:"integer",publish:"boolean",project:"string",datasetId:"string",cursor:"string",workspaceHash:"string",packageHash:"string",json:"boolean"},handler:o(async({options:t,rest:n})=>(await import("./datasets-V7E4I5N3.js")).runDatasetsCommand(t,n),"handler")},{name:"experiments",usage:"openpond experiments <save|read|list|executions|start|status|cancel|retry|score|passes|pass|cancel-pass|pass-result|result|compare> [id] [candidate-id] --team <id> [--input-file <path>] [--operation-id <id>] [--json]",optionSchema:{team:"string",inputFile:"string",operationId:"string",project:"string",datasetHash:"string",search:"string",afterId:"string",limit:"integer",json:"boolean"},handler:o(async({options:t,rest:n})=>(await import("./experiments-7UBJCQAQ.js")).runExperimentsCommand(t,n),"handler")},{name:"home",usage:"openpond home [--home <directory>]",optionSchema:{},handler:o(async()=>console.log((await import("./dist-4OUZANXR.js")).resolveOpenPondHome()),"handler")},{name:"config",usage:"openpond config <get|set|unset|path|validate|schema|doctor|migrate|recover|restart-migration|revisions|replace|effective|trust|untrust|export|backup|restore|collect-orphans|clear-cache> [key] [value] [--home <directory>] [--json]",optionSchema:{keyPath:"json",value:"string",file:"string",project:"boolean",revision:"string",expectedRevision:"string",sourceAppHome:"string",sourceConfig:"string",sourceBrowserState:"string",dryRun:"boolean"},handler:o(async({options:t,rest:n})=>(await import("./configuration-command-RPNYWBKK.js")).runConfigurationCommand(t,n),"handler")},{name:"help",usage:"openpond help",optionSchema:{},handler:o(async()=>(await import("./help-4BB2A5JC.js")).printHelp(),"handler")},{name:"version",usage:"openpond version",optionSchema:{},handler:o(()=>console.log(x()),"handler")},{name:"check-update",usage:"openpond check-update",optionSchema:{},handler:o(async()=>(await import("./core-commands-WFTASSGL.js")).runCheckUpdate(),"handler")},{name:"login",usage:"openpond login [--base-url <url>]",optionSchema:b,handler:o(async({options:t})=>(await import("./core-commands-WFTASSGL.js")).runLogin(t),"handler")},{name:"init",usage:"openpond init [--path <dir>] [--profile <name>] [--template <name>] [--force] [--json]",optionSchema:{...b,force:"boolean",path:"string",template:"string"},handler:o(async({options:t})=>(await import("./profile-LZYR4CMX.js")).runOpenPondInitCommand(t),"handler")},{name:"profile",usage:"openpond profile <current|init|load|check|push|commit|diff|catalog>",optionSchema:{checkKind:"string",conversationId:"string",ensureHosted:"boolean",expectedManifestHash:"string",force:"boolean",hostedCheckKind:"string",hostedRunAgentId:"string",hostedRunConversationId:"string",hostedRunIdempotencyKey:"string",hostedRunInput:"json",hostedRunRetry:"boolean",hostedRunTargetProjectId:"string",hostedSourceDispatch:"string",hostedSourceAgentId:"string",hostedSourceChecks:"boolean",hostedSourceProjectId:"string",json:"boolean",kind:"string",path:"string",publishHostedSource:"boolean",teamId:"string"},handler:o(async({options:t,rest:n})=>(await import("./profile-LZYR4CMX.js")).runOpenPondProfileCommand(t,n),"handler")},{name:"agents",usage:"openpond agents [--json]",optionSchema:{json:"boolean"},handler:o(async({options:t,rest:n})=>(await import("./profile-LZYR4CMX.js")).runOpenPondAgentsCommand(t,n),"handler")},{name:"actions",usage:"openpond actions <check|build|run|dev|publish> [action-id] [--cwd DIR] [--input JSON|--input-file PATH]",optionSchema:{apiKey:"string",baseUrl:"string",cwd:"string",input:"string",inputFile:"string",json:"boolean",outputDirectory:"string",sourceDirectory:"string",sourceCommitSha:"string",sourceRef:"string",projectId:"string",teamId:"string",timeoutMs:"integer"},handler:o(async({options:t,rest:n})=>(await import("./actions-command-MHWHPQ66.js")).runProjectActionsCommand(t,n),"handler")},...K(),{name:"extension",usage:"openpond extension <add|preview|list|inspect|update|remove> [owner/repo]",usages:["openpond extension add <owner/repo> [--ref <branch|tag|sha>] [--json]","openpond extension update <owner/repo> [--ref <branch|tag|sha>] [--json]","openpond extension update --all [--json]","openpond extension remove <owner/repo> [--json]"],optionSchema:{all:"boolean",json:"boolean",ref:"string"},handler:o(async({options:t,rest:n})=>(await import("./extension-OQ7CFD4Q.js")).runOpenPondExtensionCommand(t,n),"handler")},{name:"profiles",usage:"openpond profiles [args]",optionSchema:{json:"boolean"},handler:o(async({options:t,rest:n})=>(await import("./core-commands-WFTASSGL.js")).runProfiles(t,n),"handler")},{name:"account",usage:"openpond account",optionSchema:{json:"boolean"},handler:o(async()=>(await import("./core-commands-WFTASSGL.js")).runAccount(),"handler")},{name:"health",usage:"openpond health",optionSchema:{json:"boolean"},handler:o(async({options:t})=>(await import("./core-commands-WFTASSGL.js")).runHealth(t),"handler")},{name:"app-server",usage:"openpond app-server [--home DIR]",optionSchema:{home:"string"},handler:o(async({options:t,rest:n})=>(await import("./app-layer-JZTMHORT.js")).runOpenPondServerCommand("app-server",t,n),"handler")},{name:"serve",usage:"openpond serve [args]",optionSchema:{host:"string",hostname:"string",listen:"string",port:"integer"},handler:o(async({options:t,rest:n})=>(await import("./app-layer-JZTMHORT.js")).runOpenPondServerCommand("serve",t,n),"handler")},{name:"ui",usage:"openpond ui [--no-open] [--hostname HOST] [--port PORT]",optionSchema:{host:"string",hostname:"string",listen:"string",noOpen:"boolean",port:"integer",webRoot:"string"},handler:o(async({options:t,rest:n})=>(await import("./app-layer-JZTMHORT.js")).runOpenPondServerCommand("web",t,n),"handler")},{name:"tui",aliases:["interactive"],usage:"openpond tui [--provider <id>] [--model <id>] [--project <id>]",optionSchema:{cwd:"string",model:"string",noServerStart:"boolean",project:"string",provider:"string",server:"string"},handler:o(async({options:t,rest:n})=>(await import("./app-layer-JZTMHORT.js")).runOpenPondTerminalCommand(t,n),"handler")},{name:"chat",usage:"openpond chat (--message-file <path>|--message <text>|--stdin) --non-interactive [--provider <id>] [--model <id>] [--agent <id>] [--project <id>] [--resume <session-id>] [--yes] [--approval-policy <policy>] [--json] [--timeout-sec <n>] [--max-output-bytes <n>] [--sandbox <mode>]",optionSchema:P,handler:o(async({options:t,rest:n})=>(await import("./app-layer-JZTMHORT.js")).runOpenPondTerminalCommand(t,n),"handler")},{name:"tool",usage:"openpond tool <list|run> <handle>/<repo> [args]",optionSchema:{body:"json",json:"boolean"},handler:F},{name:"backtest",usage:"openpond backtest <run|events|get> <handle>/<repo> [args]",optionSchema:{body:"json",branch:"string",deploymentId:"string",limit:"integer",runId:"string"},handler:$},{name:"deploy",usage:"openpond deploy watch <handle>/<repo> [--branch <branch>]",optionSchema:{branch:"string"},handler:G},{name:"template",usage:"openpond template <status|branches|update> <handle>/<repo> [--env preview|production]",optionSchema:{env:"string"},handler:J},{name:"sandbox-template",usage:"openpond sandbox-template <command> [args]",optionSchema:A,handler:o(async({options:t,rest:n})=>(await import("./sandbox-template-6RLQYNTY.js")).runSandboxTemplateCommand(t,n),"handler")},{name:"repo",usage:"openpond repo <create|push> [--name <name>] [--path <dir>] [--branch <branch>]",optionSchema:{branch:"string",name:"string",path:"string"},handler:V},{name:"organizations",aliases:["organization"],usage:"openpond organizations <login|list|use|logout|whoami> [args]",optionSchema:{accessToken:"string",arguments:"json",callbackPort:"integer",clientId:"string",customDomain:"string",displayName:"string",email:"string",env:"string",environment:"string",json:"boolean",name:"string",open:"boolean",origin:"string",primaryContactEmail:"string",printToken:"boolean",resourceUrl:"string",role:"string",scope:"string",scopes:"string",slug:"string",status:"string",timeout:"integer",timeoutSeconds:"integer",tool:"string",toolName:"string",toolset:"string",url:"string"},handler:o(async({options:t,rest:n})=>(await import("./organizations-MUKXB6MX.js")).runOrganizationsCommand(t,n),"handler")},{name:"project",usage:"openpond project <list|create|upsert|get|update|sync|source-upload|archive> [args]",optionSchema:T,handler:o(async({options:t,rest:n})=>(await import("./project-agent-FHNWIH2D.js")).runProjectCommand(t,n),"handler")},{name:"agent",usage:"openpond agent <inspect|build|validate|eval|traces|list|create|upsert|get|update|run|run-test|bind-source|source|archive> [args]",usages:["openpond agent run <action> [--cwd <project>] [--input <json>]","openpond agent run <agentId> --team-id <id> [--conversation-id <id>] [--target-project-id <projectId>] [--input <json>]","openpond agent source checks <agentId> --team-id <id> [--check-kind <kind>]","openpond agent source publish <agentId> --team-id <id> [--expected-manifest-hash <hash>]"],optionSchema:E,handler:o(async({options:t,rest:n})=>(await import("./project-agent-FHNWIH2D.js")).runAgentCommand(t,n),"handler")},{name:"desktop-test",usage:"openpond desktop-test <run|attach> <scenario...> [--isolated|--attach|--packaged|--none] [--app <path>] [--artifacts-dir <path>] [--json <path>]",optionSchema:{artifactsDir:"string",attach:"boolean",cwd:"string",devtoolsPort:"integer",grep:"string",isolated:"boolean",json:"string",jsonPath:"string",keepHome:"boolean",none:"boolean",server:"string",timeoutMs:"integer",token:"string",tokenFile:"string"},handler:o(async({options:t,rest:n})=>(await import("./desktop-test-NZAZVXLK.js")).runDesktopTestCommand(t,n),"handler")},{name:"sandbox",usage:"openpond sandbox <command> [args]",optionSchema:O,handler:o(async({options:t,rest:n})=>(await import("./sandbox-command-GJN3HSJQ.js")).runSandboxCommand(t,n),"handler")},{name:"continual",usage:"openpond continual <init|validate|run|report> [manifest-or-series-id]",usages:["openpond continual init --from <tasks.jsonl> [--output <continual-support.yaml>] [--non-interactive]","openpond continual validate <continual-support.yaml> [--json]","openpond continual run <continual-support.yaml> [--api-base-url <url>] [--json]","openpond continual report <comparison-series-id> [--output <report.json>] [--json]"],optionSchema:{apiBaseUrl:"string",commit:"string",correctionCasesPerFamily:"integer",correctionSelection:"string",description:"string",from:"string",grader:"string",id:"string",json:"boolean",license:"string",name:"string",nonInteractive:"boolean",output:"string",repository:"string",seed:"string",semanticSimilarityThreshold:"number"},handler:o(async({options:t,rest:n})=>(await import("./continual-MHMPLLUZ.js")).runContinualCommand(t,n),"handler")},{name:"training",usage:"openpond training <create-project|start|status|watch|logs|cancel|resume|artifacts|benchmark> <taskset-id|model-run-id|run-id|model-id>",usages:["openpond training create-project <taskset-id> --recipe <path> [--project-id <id>] [--profile <id>] [--name <name>] [--objective <text>] [--destination <id>] [--rollout-placement <local|remote>] [--gpu-placement-objective <fast|balanced|economical>] [--run-preset <preset>] [--max-spend <usd>] [--retention-days <days>] [--json]","openpond training start <model-project-id> [--comparison-series-entry <entry-id>] [--manifest <path>] [--yes] [--export-approved] [--max-spend <usd>] [--retention-days <days>] [--detach] [--json]","openpond training status <run-id> [--json]","openpond training watch <run-id> [--interval-ms <ms>] [--json]","openpond training logs <run-id> [--json]","openpond training cancel <run-id> [--json]","openpond training resume <model-run-id> [--json]","openpond training artifacts <run-id> [--json]","openpond training benchmark <model-id> [--provider <id>] [--model <id>] [--reasoning-effort <level>] [--max-spend <usd>] [--json]"],optionSchema:{apiBaseUrl:"string",comparisonSeriesEntry:"string",detach:"boolean",destination:"string",exportApproved:"boolean",gpuPlacementObjective:"string",intervalMs:"integer",json:"boolean",manifest:"string",maxSpend:"number",model:"string",name:"string",objective:"string",profile:"string",projectId:"string",provider:"string",recipe:"string",reasoningEffort:"string",retentionDays:"integer",rolloutPlacement:"string",runPreset:"string",yes:"boolean"},handler:o(async({options:t,rest:n})=>(await import("./training-7PST5HZU.js")).runTrainingCommand(t,n),"handler")},{name:"taskset",usage:"openpond taskset <import|publish|readiness|delete-draft> <package-path|draft-id|taskset-id> [--profile <id>] [--model <id>] [--json]",usages:["openpond taskset import <package-directory|taskset.json> [--profile <id>] [--json]","openpond taskset publish <draft-id> [--model <id>] [--json]","openpond taskset readiness <taskset-id> [--json]","openpond taskset delete-draft <draft-id> [--json]"],optionSchema:{apiBaseUrl:"string",json:"boolean",model:"string",profile:"string"},handler:o(async({options:t,rest:n})=>(await import("./taskset-BZYQT65N.js")).runTasksetCommand(t,n),"handler")},{name:"opchat",usage:"openpond opchat <command> [args]",optionSchema:{compatModel:"string",compatibilityModel:"string",env:"string",environment:"string",effort:"string",json:"boolean",message:"string",model:"string",opchatApiBaseUrl:"string",opchatApiUrl:"string",prompt:"string",skipStream:"boolean",skipTool:"boolean",stream:"boolean"},handler:o(async({options:t,rest:n})=>(await import("./opchat-QVB4UIZR.js")).runOpChatCommand(t,n),"handler")},{name:"teams-bot",usage:"openpond teams-bot <command> [args]",optionSchema:{json:"boolean",teamId:"string"},handler:o(async({options:t,rest:n})=>(await import("./teams-bot-UQB636V3.js")).runTeamsBotCommand(t,n),"handler")},{name:"apps",usage:"openpond apps <list|code-visibility|tools|deploy|env get|env set|performance|summary|assistant|agent create> [args]",optionSchema:{appId:"string",body:"json",env:"json",json:"boolean",limit:"integer",refresh:"boolean",teamId:"string",watch:"boolean"},handler:q},{name:"opentool",usage:"openpond opentool <init|validate|build> [args]",optionSchema:{},handler:o(async({rest:t})=>(await import("./core-commands-WFTASSGL.js")).runOpentool(t),"handler")}],y=new Map;for(let t of C){y.set(t.name,t);for(let n of t.aliases??[])y.set(n,t)}function re(){return C}o(re,"listCliCommandDefinitions");function w(t){return y.get(t)??null}o(w,"getCliCommandDefinition");function ie(t,n){return w(t||"ui")?.optionSchema[n]??b[n]}o(ie,"getCliOptionKind");function se(t){let n=b[t];if(n)return n;for(let s of C){let i=s.optionSchema[t];if(i)return i}}o(se,"getAnyCliOptionKind");async function pe(t){let n=w(t.command);return n?S(t.options.help)?(L(n),!0):(await n.handler(t),!0):!1}o(pe,"runCliCommand");function H(t){let n=["Usage:",` ${t.usage}`,...(t.usages??[]).map(i=>` ${i}`)];t.aliases?.length&&n.push("","Aliases:",` ${t.aliases.join(", ")}`);let s=Object.entries(t.optionSchema).sort(([i],[r])=>i.localeCompare(r));if(s.length>0){n.push("","Options:");for(let[i,r]of s){let d=U(i);n.push(r==="boolean"?` --${d}`:` --${d} <${r}>`)}}return n.join(`
3
- `)}o(H,"formatCliCommandUsage");function L(t){console.log(H(t))}o(L,"printCliCommandUsage");function U(t){return t.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`)}o(U,"cliOptionName");function K(){return["inspect","build","validate","eval","run"].map(n=>({name:n,usage:`openpond ${n} [args]`,optionSchema:B,handler:o(async({options:s,rest:i})=>(await import("./profile-LZYR4CMX.js")).runOpenPondProfileSdkAlias(n,s,i),"handler")}))}o(K,"profileSdkAliasDefinitions");async function F({options:t,rest:n}){let{runToolList:s,runToolRun:i}=await import("./core-commands-WFTASSGL.js"),r=n[0];if(r==="list"){let d=n[1];if(!d)throw new Error("usage: tool list <handle>/<repo>");await s(t,d);return}if(r==="run"){let d=n[1],c=n[2];if(!d||!c)throw new Error("usage: tool run <handle>/<repo> <tool> [--body <json>]");await i(t,d,c);return}throw new Error("usage: tool <list|run> <handle>/<repo> [args]")}o(F,"runToolCommand");async function $({options:t,rest:n}){let{runBacktestRun:s}=await import("./core-commands-WFTASSGL.js"),{runBacktestEvents:i,runBacktestGet:r}=await import("./apps-U5GIOD6W.js"),d=n[0]||"run";if(d==="run"){let c=n[1],f=n[2];if(!c||!f)throw new Error("usage: backtest run <handle>/<repo> <tool> [--body <json>] [--branch <branch>] [--deployment-id <id>]");await s(t,c,f);return}if(d==="events"){let c=n[1];if(!c)throw new Error("usage: backtest events <handle>/<repo> [--run-id <id>] [--limit <n>]");await i(t,c);return}if(d==="get"){let c=n[1];if(!c)throw new Error("usage: backtest get <handle>/<repo> --run-id <id>");await r(t,c);return}throw new Error("usage: backtest <run|events|get> <handle>/<repo> [args]")}o($,"runBacktestCommand");async function G({options:t,rest:n}){let{runDeployWatch:s}=await import("./core-commands-WFTASSGL.js");if((n[0]||"watch")!=="watch")throw new Error("usage: deploy watch <handle>/<repo> [--branch <branch>]");let r=n[1];if(!r)throw new Error("usage: deploy watch <handle>/<repo> [--branch <branch>]");await s(t,r)}o(G,"runDeployCommand");async function J({options:t,rest:n}){let{runTemplateBranches:s,runTemplateStatus:i,runTemplateUpdate:r}=await import("./core-commands-WFTASSGL.js"),d=n[0]||"status",c=n[1];if(!c)throw new Error("usage: template <status|branches|update> <handle>/<repo> [--env preview|production]");if(d==="status"){await i(t,c);return}if(d==="branches"){await s(t,c);return}if(d==="update"){await r(t,c);return}throw new Error("usage: template <status|branches|update> <handle>/<repo> [--env preview|production]")}o(J,"runTemplateCommand");async function V({options:t,rest:n}){let{runRepoCreate:s,runRepoPush:i}=await import("./core-commands-WFTASSGL.js"),r=n[0]||"create";if(r==="create"){await s(t,n.slice(1));return}if(r==="push"){await i(t);return}throw new Error("usage: repo <create|push> [--name <name>] [--path <dir>] [--branch <branch>]")}o(V,"runRepoCommand");async function q({options:t,rest:n}){let{runAppsAgentCreate:s,runAppsAssistant:i,runAppsCodeVisibility:r,runAppsDeploy:d,runAppsEnvGet:c,runAppsEnvSet:f,runAppsList:R,runAppsPerformance:N,runAppsSummary:M,runAppsTools:_,runAppsToolsExecute:D}=await import("./apps-U5GIOD6W.js"),u=n[0];if(u==="list"){await R(t);return}if(u==="code-visibility"){let p=n[1];if(!p)throw new Error("usage: apps code-visibility <handle>/<repo> --visibility public|private");await r(t,p);return}if(u==="tools"){if(n[1]==="execute"){let p=n[2],h=n[3],v=n[4];if(!p||!h||!v)throw new Error("usage: apps tools execute <appId> <deploymentId> <tool> [--body <json>]");await D(t,p,h,v);return}await _();return}if(u==="deploy"){let p=n[1];if(!p)throw new Error("usage: apps deploy <handle>/<repo> [--env preview|production] [--watch]");await d(t,p);return}if(u==="env"&&n[1]==="get"){let p=n[2];if(!p)throw new Error("usage: apps env get <handle>/<repo>");await c(t,p);return}if(u==="env"&&n[1]==="set"){let p=n[2];if(!p)throw new Error("usage: apps env set <handle>/<repo> --env <json>");await f(t,p);return}if(u==="performance"){await N(t);return}if(u==="summary"){let p=n[1];if(!p)throw new Error("usage: apps summary <handle>/<repo>");await M(t,p);return}if(u==="assistant"){let p=n[1],h=n[2];if(p!=="plan"&&p!=="performance"||!h)throw new Error("usage: apps assistant <plan|performance> <handle>/<repo> --prompt <text>");await i(t,p,h,n.slice(3));return}if(u==="agent"&&n[1]==="create"){await s(t,n.slice(2));return}throw new Error("usage: apps <list|code-visibility|tools|deploy|env get|env set|performance|summary|assistant|agent create> [args]")}o(q,"runAppsCommand");export{x as a,X as b,Y as c,b as d,ae as e,re as f,w as g,ie as h,se as i,pe as j,H as k};