openpond 0.2.16 → 0.2.18

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 (90) hide show
  1. package/dist/app-server.d.ts +2 -0
  2. package/dist/app-server.js +1 -1
  3. package/dist/chunks/{app-server-runtime-TAFUJGQS.js → app-server-runtime-HD5JPAPM.js} +1 -1
  4. package/dist/chunks/{chunk-UQ4OBVRS.js → chunk-4S5RDPKU.js} +1 -1
  5. package/dist/chunks/{chunk-3QVNGZFY.js → chunk-AH2O6IVI.js} +1 -1
  6. package/dist/chunks/chunk-FRWPAVCD.js +5 -0
  7. package/dist/chunks/{chunk-OTUTSGMI.js → chunk-JKE45L33.js} +1 -1
  8. package/dist/chunks/{chunk-RFPSEQO2.js → chunk-PGTNQ3XD.js} +305 -304
  9. package/dist/chunks/{cli-AUDD3IP5.js → cli-FKNLUIZM.js} +1 -1
  10. package/dist/chunks/src-W5JJF2NL.js +319 -0
  11. package/dist/chunks/{workspaces-EGHYKQZF.js → workspaces-O5VJG3TD.js} +1 -1
  12. package/dist/cli.js +1 -1
  13. package/dist/web/assets/{App-BGI70Zj6.js → App-CYWcs7S8.js} +3 -3
  14. package/dist/web/assets/{AppDialog-D4siaKMi.js → AppDialog-Ba0_0yq9.js} +1 -1
  15. package/dist/web/assets/{AppTerminalPanel-DSaxM9R8.js → AppTerminalPanel-Dkmrs9vr.js} +2 -2
  16. package/dist/web/assets/{AppsView-C14dtBI0.js → AppsView-DTw4bGn4.js} +1 -1
  17. package/dist/web/assets/{BrowserSidebar-BbB0tvuH.js → BrowserSidebar-BCDyYFbR.js} +1 -1
  18. package/dist/web/assets/{CartesianChart-GJVxLGBn.js → CartesianChart-RJq_kOU1.js} +1 -1
  19. package/dist/web/assets/{CollaborationTabs-wT2ymsi7.js → CollaborationTabs-DYzFEvn3.js} +1 -1
  20. package/dist/web/assets/{CommandMenu-DLe1d-iP.js → CommandMenu-Gzomv0-I.js} +1 -1
  21. package/dist/web/assets/{CommunityView-BoTn5n7e.js → CommunityView-Bbw9POsY.js} +1 -1
  22. package/dist/web/assets/{ComposerCreateImproveStrip-S2sXX8UJ.js → ComposerCreateImproveStrip-CxCSccrw.js} +1 -1
  23. package/dist/web/assets/{GetStartedView-DhpWR1nb.js → GetStartedView-D2H-GOva.js} +1 -1
  24. package/dist/web/assets/HostedModelLearningReview-DAxcFdXC.js +1 -0
  25. package/dist/web/assets/{HostedModelLearningSettings-BN4bvlGK.js → HostedModelLearningSettings-CrImZ5SD.js} +1 -1
  26. package/dist/web/assets/{LabModelVersionDetailPage-B0jRK9u9.js → LabModelVersionDetailPage-VLeQbYWF.js} +1 -1
  27. package/dist/web/assets/{LabSkillSidebar-CoHjFsXh.js → LabSkillSidebar-xFIOwcAU.js} +1 -1
  28. package/dist/web/assets/{LabsRoute-B5UTYHeh.js → LabsRoute--K78Pb_V.js} +4 -4
  29. package/dist/web/assets/{MainChatThread-CcH2yLdM.js → MainChatThread-D3G6QbR9.js} +2 -2
  30. package/dist/web/assets/{MainPane-BT58d6eG.js → MainPane-BB8WIemH.js} +4 -4
  31. package/dist/web/assets/{MarkdownText-D43uIpOy.js → MarkdownText-DQBTMcMm.js} +1 -1
  32. package/dist/web/assets/{Messages-DarNW0e1.js → Messages-B1G4vIqt.js} +1 -1
  33. package/dist/web/assets/{NativeSkillSidebar-3yNmqIFw.js → NativeSkillSidebar-DmcODSGl.js} +1 -1
  34. package/dist/web/assets/{NewExperienceSwitcher-Cle9jAk2.js → NewExperienceSwitcher-Dt0KJMMW.js} +1 -1
  35. package/dist/web/assets/{NewProjectDialog-DFAGQHU5.js → NewProjectDialog-BPGkYiMW.js} +1 -1
  36. package/dist/web/assets/{OutputsPage-BvoFsIeo.js → OutputsPage-CtK7mzhz.js} +1 -1
  37. package/dist/web/assets/{ProjectsPage-DLo3YoMa.js → ProjectsPage-0eahr0nB.js} +1 -1
  38. package/dist/web/assets/{RightChatPanelStack-B4v_t1S8.js → RightChatPanelStack-AOmhhZJT.js} +1 -1
  39. package/dist/web/assets/{RightSidebarHomePanel-jZW_Bepf.js → RightSidebarHomePanel-CsGIwtRW.js} +1 -1
  40. package/dist/web/assets/{ScheduledWorkPage-DLX-weE0.js → ScheduledWorkPage-CrPOFA5V.js} +1 -1
  41. package/dist/web/assets/{SettingsView-B9Tn0_zX.css → SettingsView-BaWWvIJW.css} +1 -1
  42. package/dist/web/assets/SettingsView-Y9Vz9_lU.js +9 -0
  43. package/dist/web/assets/{TeamChatView-BqhLy7OA.js → TeamChatView-eBh9hneg.js} +1 -1
  44. package/dist/web/assets/{TerminalOverlay-CJTUNqkk.js → TerminalOverlay-KwRmvkV1.js} +1 -1
  45. package/dist/web/assets/{TrainingCreationPanel-smGwEmo9.js → TrainingCreationPanel-A1koEF_3.js} +1 -1
  46. package/dist/web/assets/{TrainingDraftPanel-B2UKQHN3.js → TrainingDraftPanel-D4NJSj08.js} +1 -1
  47. package/dist/web/assets/{UsageSettingsSection-eyvYtzgi.js → UsageSettingsSection-CLjJKcpc.js} +1 -1
  48. package/dist/web/assets/{WorkSidebarPanel-DoruAoEt.js → WorkSidebarPanel-CvJn9X1R.js} +1 -1
  49. package/dist/web/assets/{WorkspaceDiffPanel-DeHSMDXy.js → WorkspaceDiffPanel-DSYhWDjl.js} +3 -3
  50. package/dist/web/assets/{WorkspaceEnvironmentMenu-sgYQj7uK.js → WorkspaceEnvironmentMenu-DrE4bKpT.js} +1 -1
  51. package/dist/web/assets/{WorkspaceGitDialogs-WpfoEpEk.js → WorkspaceGitDialogs-CrzqcjWN.js} +1 -1
  52. package/dist/web/assets/{WorkspaceMonacoEditor-jqG5AL7d.js → WorkspaceMonacoEditor-BVyxy7WJ.js} +3 -3
  53. package/dist/web/assets/{arrow-up-right-Dw1pcY62.js → arrow-up-right-BjYBprzW.js} +1 -1
  54. package/dist/web/assets/{chat-file-links-BYbiaIO1.js → chat-file-links-CY9VJ--b.js} +1 -1
  55. package/dist/web/assets/chevron-up-TrVwfRay.js +1 -0
  56. package/dist/web/assets/{clipboard-Dfk4RCIt.js → clipboard-Da8F6Qgl.js} +1 -1
  57. package/dist/web/assets/{cloud-upload-BCFuH4X6.js → cloud-upload-vaEzoz43.js} +1 -1
  58. package/dist/web/assets/{cssMode-D4TD1xov.js → cssMode-Dv3-w8Kc.js} +1 -1
  59. package/dist/web/assets/{folder-open-DvI8m5Sx.js → folder-open-C3Shiqpe.js} +1 -1
  60. package/dist/web/assets/{folder-plus-By8mYY0v.js → folder-plus-L8wD4iw3.js} +1 -1
  61. package/dist/web/assets/{git-commit-horizontal-BaO4kijC.js → git-commit-horizontal-CDk6sZyt.js} +1 -1
  62. package/dist/web/assets/{htmlMode-M02_qd4A.js → htmlMode-BZ5NH84R.js} +1 -1
  63. package/dist/web/assets/{index-BvXW3YXD.js → index-6TZT9oax.js} +2 -2
  64. package/dist/web/assets/{info-Dc_GhhOz.js → info-BzFeT6rZ.js} +1 -1
  65. package/dist/web/assets/{jsonMode-DiQI8vFK.js → jsonMode-DkpuUCXl.js} +1 -1
  66. package/dist/web/assets/{lspLanguageFeatures-tEe-JDHC.js → lspLanguageFeatures-BxsmW-WO.js} +1 -1
  67. package/dist/web/assets/{minimize-2-DGtAI2xp.js → minimize-2-DnM3eNEG.js} +1 -1
  68. package/dist/web/assets/{monaco.contribution-1SG8tKDo.js → monaco.contribution-CVC59ttJ.js} +2 -2
  69. package/dist/web/assets/{monaco.contribution-COeaSn0J.js → monaco.contribution-CbMHUsGo.js} +2 -2
  70. package/dist/web/assets/{monaco.contribution-BdUm7liL.js → monaco.contribution-DZPLEe65.js} +2 -2
  71. package/dist/web/assets/{monaco.contribution-4H5UNLKI.js → monaco.contribution-iPQTj3JR.js} +2 -2
  72. package/dist/web/assets/{play-Dm-ygxKN.js → play-DW0yNt2R.js} +1 -1
  73. package/dist/web/assets/{python-rqeHprul.js → python-DTpbj29X.js} +1 -1
  74. package/dist/web/assets/{refresh-cw-BIkrZ0pv.js → refresh-cw-BAHopOmY.js} +1 -1
  75. package/dist/web/assets/{save-EdH_bDsl.js → save-CFWKqkyZ.js} +1 -1
  76. package/dist/web/assets/{square-pCmN_gDj.js → square-AVaXWpWj.js} +1 -1
  77. package/dist/web/assets/{toggleHighContrast-BJSQSsib.js → toggleHighContrast-CZKHQ-c0.js} +1 -1
  78. package/dist/web/assets/{tsMode-3mUrkBEX.js → tsMode-BgOjIJPM.js} +1 -1
  79. package/dist/web/assets/{upload-BPPE0xhi.js → upload-nqv0d2Sb.js} +1 -1
  80. package/dist/web/assets/{useLocalAgentSchedules-CHOz2V-t.js → useLocalAgentSchedules-xIEcLU8F.js} +1 -1
  81. package/dist/web/assets/{wifi-off-217UMa2b.js → wifi-off-C6HLWTJm.js} +1 -1
  82. package/dist/web/assets/{workers-T9yMlI_c.js → workers-BNRLU1LU.js} +1 -1
  83. package/dist/web/assets/{yaml-DjGDwz3-.js → yaml-dAmUAqyv.js} +1 -1
  84. package/dist/web/index.html +1 -1
  85. package/package.json +1 -1
  86. package/dist/chunks/chunk-RB7BWSFJ.js +0 -5
  87. package/dist/chunks/src-VWAWQGVE.js +0 -319
  88. package/dist/web/assets/HostedModelLearningReview-BHboiGq4.js +0 -1
  89. package/dist/web/assets/SettingsView-Bjf1bZOw.js +0 -9
  90. package/dist/web/assets/chevron-up-DI8qm7Ek.js +0 -1
@@ -25,6 +25,7 @@ declare const AGENT_RPC_METHODS: readonly [
25
25
  "profile/evaluations/executeCase",
26
26
  "profile/evaluations/executeRun",
27
27
  "profile/evaluations/compare",
28
+ "profile/evaluations/report",
28
29
  "harness/inspect",
29
30
  "harness/proposalReview",
30
31
  "harness/review",
@@ -76,6 +77,7 @@ type AgentRuntimeHost = {
76
77
  profileEvaluationExecuteCase(params: unknown): Promise<unknown>;
77
78
  profileEvaluationExecuteRun(params: unknown): Promise<unknown>;
78
79
  profileEvaluationCompare(params: unknown): Promise<unknown>;
80
+ profileEvaluationReport(params: unknown): Promise<unknown>;
79
81
  harnessInspect(params: unknown): Promise<unknown>;
80
82
  harnessProposalReview(params: unknown): Promise<unknown>;
81
83
  harnessReview(params: unknown): Promise<unknown>;
@@ -1,2 +1,2 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{bd as r}from"./chunks/chunk-RFPSEQO2.js";import"./chunks/chunk-UQ4OBVRS.js";import{j as e,t as p}from"./chunks/chunk-RB7BWSFJ.js";import"./chunks/chunk-3QVNGZFY.js";import"./chunks/chunk-N3KS3AJK.js";import"./chunks/chunk-PRA6LX2G.js";import"./chunks/chunk-XEOEKFG6.js";import"./chunks/chunk-Q7QAKAGF.js";import"./chunks/chunk-6MI4KKWF.js";import"./chunks/chunk-SDO4FC4Q.js";import"./chunks/chunk-IR3YJWPW.js";import"./chunks/chunk-UN3A7GEU.js";import"./chunks/chunk-J2S7BOZU.js";import"./chunks/chunk-A2PIGBPD.js";import"./chunks/chunk-6FA3GG5B.js";import"./chunks/chunk-NNLI4OWY.js";import"./chunks/chunk-HZP5U2AA.js";import"./chunks/chunk-ES2ISFJC.js";import"./chunks/chunk-H7IWJN7L.js";import"./chunks/chunk-FTQLQJQV.js";export{e as AGENT_PROTOCOL_VERSION,r as createOpenPondAppServer,p as runAppServerJsonl};
2
+ import{dd as r}from"./chunks/chunk-PGTNQ3XD.js";import"./chunks/chunk-4S5RDPKU.js";import{j as e,t as p}from"./chunks/chunk-FRWPAVCD.js";import"./chunks/chunk-AH2O6IVI.js";import"./chunks/chunk-N3KS3AJK.js";import"./chunks/chunk-PRA6LX2G.js";import"./chunks/chunk-XEOEKFG6.js";import"./chunks/chunk-Q7QAKAGF.js";import"./chunks/chunk-6MI4KKWF.js";import"./chunks/chunk-SDO4FC4Q.js";import"./chunks/chunk-IR3YJWPW.js";import"./chunks/chunk-UN3A7GEU.js";import"./chunks/chunk-J2S7BOZU.js";import"./chunks/chunk-A2PIGBPD.js";import"./chunks/chunk-6FA3GG5B.js";import"./chunks/chunk-NNLI4OWY.js";import"./chunks/chunk-HZP5U2AA.js";import"./chunks/chunk-ES2ISFJC.js";import"./chunks/chunk-H7IWJN7L.js";import"./chunks/chunk-FTQLQJQV.js";export{e as AGENT_PROTOCOL_VERSION,r as createOpenPondAppServer,p as runAppServerJsonl};
@@ -1,2 +1,2 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{ad as c,bd as d}from"./chunk-RFPSEQO2.js";import"./chunk-UQ4OBVRS.js";import{j as a,t as b}from"./chunk-RB7BWSFJ.js";import"./chunk-3QVNGZFY.js";import"./chunk-N3KS3AJK.js";import"./chunk-PRA6LX2G.js";import"./chunk-XEOEKFG6.js";import"./chunk-Q7QAKAGF.js";import"./chunk-6MI4KKWF.js";import"./chunk-SDO4FC4Q.js";import"./chunk-IR3YJWPW.js";import"./chunk-UN3A7GEU.js";import"./chunk-J2S7BOZU.js";import"./chunk-A2PIGBPD.js";import"./chunk-6FA3GG5B.js";import"./chunk-NNLI4OWY.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};
2
+ import{cd as c,dd as d}from"./chunk-PGTNQ3XD.js";import"./chunk-4S5RDPKU.js";import{j as a,t as b}from"./chunk-FRWPAVCD.js";import"./chunk-AH2O6IVI.js";import"./chunk-N3KS3AJK.js";import"./chunk-PRA6LX2G.js";import"./chunk-XEOEKFG6.js";import"./chunk-Q7QAKAGF.js";import"./chunk-6MI4KKWF.js";import"./chunk-SDO4FC4Q.js";import"./chunk-IR3YJWPW.js";import"./chunk-UN3A7GEU.js";import"./chunk-J2S7BOZU.js";import"./chunk-A2PIGBPD.js";import"./chunk-6FA3GG5B.js";import"./chunk-NNLI4OWY.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,5 +1,5 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{d as F}from"./chunk-3QVNGZFY.js";import{a as o}from"./chunk-FTQLQJQV.js";import{spawn as nt,spawnSync as At}from"node:child_process";import{accessSync as vt,constants as Rt,existsSync as _t,promises as Bt}from"node:fs";import et from"node:path";var rt="Git is required for OpenPond app workspaces, but macOS reports Apple Command Line Tools are not installed. OpenPond skipped /usr/bin/git to avoid opening the Xcode installer prompt. Install Command Line Tools with `xcode-select --install`, install Git from Homebrew, or put a non-Apple git binary earlier on PATH.",T;function Lt(e){try{return _t(e)?(vt(e,Rt.X_OK),!0):!1}catch{return!1}}o(Lt,"isExecutable");function Ot(){let e=(process.env.PATH??"").split(et.delimiter).map(t=>t.trim()).filter(Boolean);for(let t of e){let n=et.join(t,"git");if(!(n==="/usr/bin/git"||n==="/bin/git")&&Lt(n))return n}return null}o(Ot,"firstNonAppleGitOnPath");function it(){let e=At("/usr/bin/xcode-select",["-p"],{encoding:"utf8",stdio:["ignore","pipe","pipe"]});return e.status===0&&!!e.stdout.trim()}o(it,"appleDeveloperToolsAvailable");function Dt(e){if(e!=="git"||process.platform!=="darwin")return{command:e};if(T!==void 0)return{command:T};let t=Ot();return t?(T=t,{command:t}):it()?(T="git",{command:"git"}):{error:rt}}o(Dt,"resolveWorkspaceCommand");function u(e,t,n,r={},i){return new Promise(s=>{let a=Dt(e);if("error"in a){s({code:1,stdout:"",stderr:a.error});return}let c=nt(a.command,t,{cwd:n,env:{...process.env,...r,GIT_TERMINAL_PROMPT:"0"},stdio:[i===void 0?"ignore":"pipe","pipe","pipe"]}),d=[],p=[];i!==void 0&&c.stdin?.end(i),c.stdout?.on("data",h=>d.push(h)),c.stderr?.on("data",h=>p.push(h)),c.on("error",h=>{s({code:1,stdout:"",stderr:h.message})}),c.on("close",h=>{s({code:h??1,stdout:Buffer.concat(d).toString("utf8"),stderr:Buffer.concat(p).toString("utf8")})})})}o(u,"runCommand");function Gt(e){return!!(e&&e.includes(rt.slice(0,80)))}o(Gt,"isMacOSGitDeveloperToolsMissing");async function Se(e){await Bt.mkdir(e,{recursive:!0});let t=await u("git",["--version"],e);if(t.code===0)return{ok:!0,command:T??"git",version:(t.stdout||t.stderr).trim()};let n=t.stderr.trim()||t.stdout.trim()||"Git is required for OpenPond app workspaces.";return{ok:!1,error:n,installAction:process.platform==="darwin"&&Gt(n)?"macos_command_line_tools":"manual_git_install"}}o(Se,"checkWorkspaceGitAvailability");function ye(){if(process.platform!=="darwin")return{ok:!1,error:"Apple Command Line Tools installation is only available on macOS."};if(it())return{ok:!0,message:"Apple Command Line Tools already appear to be installed."};try{return nt("/usr/bin/xcode-select",["--install"],{detached:!0,stdio:"ignore"}).unref(),{ok:!0,message:"Opened the Apple Command Line Tools installer."}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}o(ye,"startMacOSCommandLineToolsInstall");import{promises as k}from"node:fs";import m from"node:path";var st=24e3,ot=8e4,It=512*1024,ct=15*1024*1024,Tt=20*1024*1024,Mt=new Set([".cache",".eggs",".git",".ipynb_checkpoints",".mypy_cache",".next",".nox",".nuxt",".openpond",".output",".parcel-cache",".pytest_cache",".pyre",".ruff_cache",".svelte-kit",".tox",".turbo",".venv","__pycache__","artifacts","build","coverage","dist","env","node_modules","out","site-packages","target","venv","volumes"]),zt=new Set([".7z",".avif",".db",".doc",".docx",".gif",".gz",".ico",".jpeg",".jpg",".mov",".mp4",".pdf",".png",".sqlite",".tar",".webp",".xls",".xlsm",".xlsx",".zip"]),$t=new Map([[".avif","image/avif"],[".gif","image/gif"],[".jpeg","image/jpeg"],[".jpg","image/jpeg"],[".png","image/png"],[".webp","image/webp"]]),Nt=new Map([[".m4v","video/x-m4v"],[".mov","video/quicktime"],[".mp4","video/mp4"],[".webm","video/webm"]]),Ht=new Set([".doc",".docx",".pdf"]);function Ut(e){return e.replace(/[^a-zA-Z0-9._-]/g,"-").slice(0,120)||"app"}o(Ut,"safeAppSegment");function N(e){if(!e)return"unknown";try{let t=new URL(e).hostname.toLowerCase();if(t==="github.com"||t.endsWith(".github.com"))return"github";if(t==="openpond.ai"||t.endsWith(".openpond.ai"))return"openpond"}catch{return"unknown"}return"local_git"}o(N,"sourceFromRemote");function $(e){return e.replace(/x-access-token:[^@]+@/g,"x-access-token:***@").replace(/Authorization:\s*Basic\s+[A-Za-z0-9+/=]+/gi,"Authorization: Basic ***")}o($,"redactRemoteUrl");async function G(e){try{return await k.access(e),!0}catch{return!1}}o(G,"pathExists");async function O(e){return await G(e)?(await u("git",["rev-parse","--git-dir"],e)).code===0:!1}o(O,"isGitRepo");function X(e){return e.length<=st?e:`${e.slice(0,st)}
2
+ import{d as F}from"./chunk-AH2O6IVI.js";import{a as o}from"./chunk-FTQLQJQV.js";import{spawn as nt,spawnSync as At}from"node:child_process";import{accessSync as vt,constants as Rt,existsSync as _t,promises as Bt}from"node:fs";import et from"node:path";var rt="Git is required for OpenPond app workspaces, but macOS reports Apple Command Line Tools are not installed. OpenPond skipped /usr/bin/git to avoid opening the Xcode installer prompt. Install Command Line Tools with `xcode-select --install`, install Git from Homebrew, or put a non-Apple git binary earlier on PATH.",T;function Lt(e){try{return _t(e)?(vt(e,Rt.X_OK),!0):!1}catch{return!1}}o(Lt,"isExecutable");function Ot(){let e=(process.env.PATH??"").split(et.delimiter).map(t=>t.trim()).filter(Boolean);for(let t of e){let n=et.join(t,"git");if(!(n==="/usr/bin/git"||n==="/bin/git")&&Lt(n))return n}return null}o(Ot,"firstNonAppleGitOnPath");function it(){let e=At("/usr/bin/xcode-select",["-p"],{encoding:"utf8",stdio:["ignore","pipe","pipe"]});return e.status===0&&!!e.stdout.trim()}o(it,"appleDeveloperToolsAvailable");function Dt(e){if(e!=="git"||process.platform!=="darwin")return{command:e};if(T!==void 0)return{command:T};let t=Ot();return t?(T=t,{command:t}):it()?(T="git",{command:"git"}):{error:rt}}o(Dt,"resolveWorkspaceCommand");function u(e,t,n,r={},i){return new Promise(s=>{let a=Dt(e);if("error"in a){s({code:1,stdout:"",stderr:a.error});return}let c=nt(a.command,t,{cwd:n,env:{...process.env,...r,GIT_TERMINAL_PROMPT:"0"},stdio:[i===void 0?"ignore":"pipe","pipe","pipe"]}),d=[],p=[];i!==void 0&&c.stdin?.end(i),c.stdout?.on("data",h=>d.push(h)),c.stderr?.on("data",h=>p.push(h)),c.on("error",h=>{s({code:1,stdout:"",stderr:h.message})}),c.on("close",h=>{s({code:h??1,stdout:Buffer.concat(d).toString("utf8"),stderr:Buffer.concat(p).toString("utf8")})})})}o(u,"runCommand");function Gt(e){return!!(e&&e.includes(rt.slice(0,80)))}o(Gt,"isMacOSGitDeveloperToolsMissing");async function Se(e){await Bt.mkdir(e,{recursive:!0});let t=await u("git",["--version"],e);if(t.code===0)return{ok:!0,command:T??"git",version:(t.stdout||t.stderr).trim()};let n=t.stderr.trim()||t.stdout.trim()||"Git is required for OpenPond app workspaces.";return{ok:!1,error:n,installAction:process.platform==="darwin"&&Gt(n)?"macos_command_line_tools":"manual_git_install"}}o(Se,"checkWorkspaceGitAvailability");function ye(){if(process.platform!=="darwin")return{ok:!1,error:"Apple Command Line Tools installation is only available on macOS."};if(it())return{ok:!0,message:"Apple Command Line Tools already appear to be installed."};try{return nt("/usr/bin/xcode-select",["--install"],{detached:!0,stdio:"ignore"}).unref(),{ok:!0,message:"Opened the Apple Command Line Tools installer."}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}o(ye,"startMacOSCommandLineToolsInstall");import{promises as k}from"node:fs";import m from"node:path";var st=24e3,ot=8e4,It=512*1024,ct=15*1024*1024,Tt=20*1024*1024,Mt=new Set([".cache",".eggs",".git",".ipynb_checkpoints",".mypy_cache",".next",".nox",".nuxt",".openpond",".output",".parcel-cache",".pytest_cache",".pyre",".ruff_cache",".svelte-kit",".tox",".turbo",".venv","__pycache__","artifacts","build","coverage","dist","env","node_modules","out","site-packages","target","venv","volumes"]),zt=new Set([".7z",".avif",".db",".doc",".docx",".gif",".gz",".ico",".jpeg",".jpg",".mov",".mp4",".pdf",".png",".sqlite",".tar",".webp",".xls",".xlsm",".xlsx",".zip"]),$t=new Map([[".avif","image/avif"],[".gif","image/gif"],[".jpeg","image/jpeg"],[".jpg","image/jpeg"],[".png","image/png"],[".webp","image/webp"]]),Nt=new Map([[".m4v","video/x-m4v"],[".mov","video/quicktime"],[".mp4","video/mp4"],[".webm","video/webm"]]),Ht=new Set([".doc",".docx",".pdf"]);function Ut(e){return e.replace(/[^a-zA-Z0-9._-]/g,"-").slice(0,120)||"app"}o(Ut,"safeAppSegment");function N(e){if(!e)return"unknown";try{let t=new URL(e).hostname.toLowerCase();if(t==="github.com"||t.endsWith(".github.com"))return"github";if(t==="openpond.ai"||t.endsWith(".openpond.ai"))return"openpond"}catch{return"unknown"}return"local_git"}o(N,"sourceFromRemote");function $(e){return e.replace(/x-access-token:[^@]+@/g,"x-access-token:***@").replace(/Authorization:\s*Basic\s+[A-Za-z0-9+/=]+/gi,"Authorization: Basic ***")}o($,"redactRemoteUrl");async function G(e){try{return await k.access(e),!0}catch{return!1}}o(G,"pathExists");async function O(e){return await G(e)?(await u("git",["rev-parse","--git-dir"],e)).code===0:!1}o(O,"isGitRepo");function X(e){return e.length<=st?e:`${e.slice(0,st)}
3
3
 
4
4
  [diff truncated]`}o(X,"truncatePatch");function jt(e){return e.length<=ot?e:`${e.slice(0,ot)}
5
5
 
@@ -1,2 +1,2 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{a as n}from"./chunk-FTQLQJQV.js";var s="127.0.0.1";var f="0.2.16",m="You are OpenPond Chat. Respond in the user's language. If the user's latest message is language-neutral, ambiguous, or only a short test, respond in English. Be concise and directly answer the latest request. Do not use emojis. Use Markdown when it improves scanability. If you emit reasoning or thinking content, keep it sparse and user-readable: at most one short sentence for major progress, decisions, or blockers. Omit reasoning for routine searches, reads, tool calls, and obvious next steps. Do not restate the user request, narrate every action, or include code blocks, code excerpts, diffs, raw tool payloads, or markdown examples in reasoning. Put necessary code or exact snippets only in the final assistant answer. When the user asks to show or preview an image that is available as a workspace path or signed image URL, use Markdown image syntax like ![description](path-or-url) instead of a bare path or raw HTML. For workspace-backed answers, use a Codex-style shape: brief outcome first, then Changed Files if files changed, then Verification if checks ran. End with a concise final answer that summarizes the result and verification when relevant. Do not mention raw tool JSON, internal repo paths, or origin/remote URLs unless the user explicitly asks for them or they are necessary to explain a git/deploy failure.";import{randomUUID as p}from"node:crypto";import i from"node:path";import{fileURLToPath as c}from"node:url";function u(){return new Date().toISOString()}n(u,"now");function l(e){if(typeof e=="string")return e;if(e instanceof Error)return e.message||e.name;if(e==null)return"";try{return JSON.stringify(e)}catch{return String(e)}}n(l,"textFromUnknown");function w(e){if(!e||typeof e!="object")return"";let t=e;for(let r of["delta","text","output","chunk","message"])if(typeof t[r]=="string")return t[r];return t.delta&&typeof t.delta=="object"?l(t.delta):""}n(w,"extractDelta");function x(e){return{id:p(),timestamp:u(),...e}}n(x,"event");function k(e){let t=e.replace(/^https?:\/\//,""),[r,o]=t.split(":");return{host:r||s,port:o?Number.parseInt(o,10):17874}}n(k,"parseListen");function b(e){return(process.argv[1]?i.resolve(process.argv[1]):"")===i.resolve(c(e))}n(b,"isCliEntrypoint");export{s as a,f as b,m as c,u as d,l as e,w as f,x as g,k as h,b as i};
2
+ import{a as n}from"./chunk-FTQLQJQV.js";var s="127.0.0.1";var f="0.2.18",m="You are OpenPond Chat. Respond in the user's language. If the user's latest message is language-neutral, ambiguous, or only a short test, respond in English. Be concise and directly answer the latest request. Do not use emojis. Use Markdown when it improves scanability. If you emit reasoning or thinking content, keep it sparse and user-readable: at most one short sentence for major progress, decisions, or blockers. Omit reasoning for routine searches, reads, tool calls, and obvious next steps. Do not restate the user request, narrate every action, or include code blocks, code excerpts, diffs, raw tool payloads, or markdown examples in reasoning. Put necessary code or exact snippets only in the final assistant answer. When the user asks to show or preview an image that is available as a workspace path or signed image URL, use Markdown image syntax like ![description](path-or-url) instead of a bare path or raw HTML. For workspace-backed answers, use a Codex-style shape: brief outcome first, then Changed Files if files changed, then Verification if checks ran. End with a concise final answer that summarizes the result and verification when relevant. Do not mention raw tool JSON, internal repo paths, or origin/remote URLs unless the user explicitly asks for them or they are necessary to explain a git/deploy failure.";import{randomUUID as p}from"node:crypto";import i from"node:path";import{fileURLToPath as c}from"node:url";function u(){return new Date().toISOString()}n(u,"now");function l(e){if(typeof e=="string")return e;if(e instanceof Error)return e.message||e.name;if(e==null)return"";try{return JSON.stringify(e)}catch{return String(e)}}n(l,"textFromUnknown");function w(e){if(!e||typeof e!="object")return"";let t=e;for(let r of["delta","text","output","chunk","message"])if(typeof t[r]=="string")return t[r];return t.delta&&typeof t.delta=="object"?l(t.delta):""}n(w,"extractDelta");function x(e){return{id:p(),timestamp:u(),...e}}n(x,"event");function k(e){let t=e.replace(/^https?:\/\//,""),[r,o]=t.split(":");return{host:r||s,port:o?Number.parseInt(o,10):17874}}n(k,"parseListen");function b(e){return(process.argv[1]?i.resolve(process.argv[1]):"")===i.resolve(c(e))}n(b,"isCliEntrypoint");export{s as a,f as b,m as c,u as d,l as e,w as f,x as g,k as h,b as i};
@@ -0,0 +1,5 @@
1
+ import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
+ import{c as j,e as E,f as z,g as H,i as N,kb as O}from"./chunk-NNLI4OWY.js";import{b as a}from"./chunk-ES2ISFJC.js";import{a as k,c as P,f as A,h as d}from"./chunk-H7IWJN7L.js";import{a as i}from"./chunk-FTQLQJQV.js";import b from"node:path";import{AsyncLocalStorage as V}from"node:async_hooks";import{promises as M}from"node:fs";var B=new V;function pe(e,t=!1){let n=B.getStore();n&&(t&&(n.length=0),n.push(e))}i(pe,"onStartupFailure");async function fe(e,t){await O(e);let n;try{n=await H(b.join(d(e).runtime,"server-owner"),100)}catch(s){if(s instanceof P&&s.issue.code==="STORAGE_BUSY"){let o=await N(b.join(d(e).runtime,"endpoint.json"),()=>null);throw new P({code:"RUNTIME_ALREADY_RUNNING",path:e,message:"An OpenPond runtime already owns this home.",action:o?.url?`Connect to the existing runtime at ${o.url}, or stop it before starting another.`:"Stop the existing runtime before starting another with this home."})}throw s}let r=[];try{let s=await k(e,()=>B.run(r,t)),o=s.close.bind(s);r.length=0;let l;return{...s,close:i(()=>l??=(async()=>{try{await k(e,o)}finally{await M.rm(b.join(d(e).runtime,"endpoint.json"),{force:!0}),await n()}})(),"close")}}catch(s){try{for(let o of r.reverse())await Promise.resolve().then(()=>k(e,o)).catch(()=>{});await M.rm(b.join(d(e).runtime,"endpoint.json"),{force:!0})}finally{await n()}throw s}}i(fe,"ownHomeRuntime");async function me(e,t,n){await E(b.join(d(e).runtime,"endpoint.json"),JSON.stringify({schemaVersion:"openpond.runtimeEndpoint.v1",pid:process.pid,url:t,serverId:n}))}i(me,"publishRuntimeEndpoint");function ge(e){if(!e.maxContextTokens||!e.usableContextTokens)return{shouldCompact:!1,projectedTokens:e.projectedTokens,thresholdTokens:Number.MAX_SAFE_INTEGER,usableContextTokens:0,maxContextTokens:0,tokenSource:"heuristic"};let t=Math.max(.01,Math.min(1,(e.triggerPercent??85)/100)),n=Math.max(1,Math.floor(e.usableContextTokens*t));return{shouldCompact:e.projectedTokens>=n,projectedTokens:e.projectedTokens,thresholdTokens:n,usableContextTokens:e.usableContextTokens,maxContextTokens:e.maxContextTokens,tokenSource:"heuristic"}}i(ge,"agentCompactionDecision");async function be(e){await e.started();try{return await e.compact()}catch(t){throw await e.failed(t),t}}i(be,"runAgentCompaction");async function xe(e){let t=e.host.projectEvents(e.events),n=e.host.selectEvents(t,e.maxContextTokens),{summaryEvents:r,preservedEvents:s,preservedEventIds:o}=n;if(r.length===0)throw new Error("There is not enough prior context to compact.");let l=e.host.normalizeRecords(r),c=e.host.normalizeRecords(s),h=e.host.buildFileLedger(e.host.normalizeRecords(t)),u=e.host.serializeRecords(l,e.host.inputCharBudget(e.maxContextTokens));if(!u.text.trim())throw new Error("There is not enough prior context to compact.");let p=e.host.buildSummaryMessages({serializedHistory:u.text,fileLedger:h}),v=Date.now(),w=(await e.host.streamSummary({model:e.model,messages:p,signal:e.signal})).trim(),R=Date.now()-v;if(!w)throw new Error("Compaction summary was empty.");let I=e.host.estimateProjection({events:t,preservedEvents:s,summary:w}),_=e.host.createMetrics({sourceEvents:t.length,summarizedEvents:r.length,preservedEvents:s.length,sourceRecords:u.sourceRecordCount,includedRecords:u.includedRecordCount,omittedRecords:u.omittedRecordCount,preservedRecords:c.length,truncatedRecords:u.truncatedRecordCount,summaryInputTruncated:u.inputTruncated,sourceSelectionStrategy:u.selectionStrategy,summaryInputChars:u.inputChars,retainedTailTokens:n.retainedTailTokens,retainedTailBudgetTokens:n.retainedTailBudgetTokens,finalProviderContextTokens:I.inputTokensAfter,durationMs:R,fileLedgerEntries:h.length,splitTurnId:n.splitTurnId});return{summary:w,model:e.model,compactedThroughEventId:t[t.length-1]?.id??null,compactedThroughTurnId:e.host.lastTurnId(t),preservedFromEventId:s[0]?.id??null,preservedEventIds:o,preservedResourceRefs:e.host.durableResourceRefs(e.events),sourceEventCount:r.length,preservedEventCount:s.length,fileLedger:h,inputTokensBefore:I.inputTokensBefore,inputTokensAfter:I.inputTokensAfter,maxContextTokens:e.maxContextTokens,tokenSource:"heuristic",metrics:_}}i(xe,"runAgentCompactionProgram");var y="2026-09-20",ye=["initialize","initialized","runtime/capabilities","thread/start","thread/resume","thread/read","turn/start","turn/steer","task/inbox","task/queue","task/inputUpdate","turn/interrupt","approval/resolve","userInput/resolve","profile/workflows","profile/evaluations","profile/evaluations/prepare","profile/evaluations/run","profile/evaluations/runSuite","profile/evaluations/executeCase","profile/evaluations/executeRun","profile/evaluations/compare","profile/evaluations/report","harness/inspect","harness/proposalReview","harness/review","harness/acceptEvaluationReview","harness/materializeEvaluationTaskset","harness/runEvaluationBaseline","harness/validate","harness/backgroundReview","harness/diff","harness/rollback","refiner/inspect","refiner/update","refiner/activate","refiner/rollback"],U=a.object({jsonrpc:a.literal("2.0"),id:a.union([a.string(),a.number()]),method:a.string().trim().min(1),params:a.unknown().optional()}).strict(),$=a.object({jsonrpc:a.literal("2.0"),method:a.string().trim().min(1),params:a.unknown().optional()}).strict(),G=a.object({jsonrpc:a.literal("2.0"),id:a.union([a.string(),a.number()]),result:a.unknown()}).strict(),W=a.object({jsonrpc:a.literal("2.0"),id:a.union([a.string(),a.number(),a.null()]),error:a.object({code:a.number().int(),message:a.string(),data:a.unknown().optional()}).strict()}).strict(),Se=a.union([U,$,G,W]),K=a.object({protocolVersion:a.string().trim().min(1),client:a.object({name:a.string().trim().min(1),version:a.string().trim().min(1)}).strict(),capabilities:a.record(a.string(),a.unknown()).default({})}).strict(),S=class{static{i(this,"AgentJsonRpcDispatcher")}#e;#r=null;#t=!1;constructor(t){this.#e=t}get initialized(){return this.#t}async handle(t){let n=$.safeParse(t);if(n.success&&!("id"in t)){if(n.data.method==="initialized"){if(!this.#r)throw new f(-32002,"initialize must be called first");this.#t=!0}return null}let r=U.safeParse(t);if(!r.success)return q(null,-32600,"Invalid Request",r.error.flatten());let s=r.data;try{let o=await this.#n(s.method,s.params);return{jsonrpc:"2.0",id:s.id,result:o}}catch(o){let l=o instanceof f?o:new f(-32603,o instanceof Error?o.message:String(o));return q(s.id,l.code,l.message,l.data)}}async#n(t,n){if(t==="initialize"){let r=K.parse(n);if(r.protocolVersion!==y)throw new f(-32001,"Incompatible agent protocol version",{requested:r.protocolVersion,supported:y});return this.#r=r,{protocolVersion:y,server:{name:"openpond-app-server",version:"1"},capabilities:await this.#e.capabilities()}}if(!this.#t)throw new f(-32002,"initialized notification is required");switch(t){case"runtime/capabilities":return this.#e.capabilities(n);case"thread/start":return this.#e.threadStart(n);case"thread/resume":return this.#e.threadResume(n);case"thread/read":return this.#e.threadRead(n);case"turn/start":return this.#e.turnStart(n);case"turn/steer":return this.#e.turnSteer(n);case"task/inbox":return this.#e.taskInbox(n);case"task/queue":return this.#e.taskQueue(n);case"task/inputUpdate":return this.#e.taskInputUpdate(n);case"turn/interrupt":return this.#e.turnInterrupt(n);case"approval/resolve":return this.#e.approvalResolve(n);case"userInput/resolve":return this.#e.userInputResolve(n);case"profile/workflows":return this.#e.profileWorkflows(n);case"profile/evaluations":return this.#e.profileEvaluations(n);case"profile/evaluations/prepare":return this.#e.profileEvaluationPrepare(n);case"profile/evaluations/run":return this.#e.profileEvaluationRun(n);case"profile/evaluations/runSuite":return this.#e.profileEvaluationRunSuite(n);case"profile/evaluations/executeCase":return this.#e.profileEvaluationExecuteCase(n);case"profile/evaluations/executeRun":return this.#e.profileEvaluationExecuteRun(n);case"profile/evaluations/compare":return this.#e.profileEvaluationCompare(n);case"profile/evaluations/report":return this.#e.profileEvaluationReport(n);case"harness/inspect":return this.#e.harnessInspect(n);case"harness/proposalReview":return this.#e.harnessProposalReview(n);case"harness/review":return this.#e.harnessReview(n);case"harness/acceptEvaluationReview":return this.#e.harnessAcceptEvaluationReview(n);case"harness/materializeEvaluationTaskset":return this.#e.harnessMaterializeEvaluationTaskset(n);case"harness/runEvaluationBaseline":return this.#e.harnessRunEvaluationBaseline(n);case"harness/validate":return this.#e.harnessValidate(n);case"harness/backgroundReview":return this.#e.harnessBackgroundReview(n);case"harness/diff":return this.#e.harnessDiff(n);case"harness/rollback":return this.#e.harnessRollback(n);case"refiner/inspect":return this.#e.refinerInspect(n);case"refiner/update":return this.#e.refinerUpdate(n);case"refiner/activate":return this.#e.refinerActivate(n);case"refiner/rollback":return this.#e.refinerRollback(n);default:throw new f(-32601,`Method not found: ${t}`)}}},f=class extends Error{static{i(this,"JsonRpcDispatchError")}code;data;constructor(t,n,r){super(n),this.code=t,this.data=r}};function q(e,t,n,r){return{jsonrpc:"2.0",id:e,error:{code:t,message:n,...r===void 0?{}:{data:r}}}}i(q,"jsonRpcError");import{createHash as Q}from"node:crypto";function C(e){if(e===null||typeof e=="boolean"||typeof e=="string")return e;if(typeof e=="number"){if(!Number.isFinite(e))throw new Error("Canonical JSON cannot encode a non-finite number.");return e}if(Array.isArray(e))return e.map(C);if(typeof e=="object"){let t={};for(let n of Object.keys(e).sort()){let r=e[n];r!==void 0&&(t[n]=C(r))}return t}throw new Error(`Canonical JSON cannot encode ${typeof e}.`)}i(C,"canonicalJson");function g(e){return Q("sha256").update(JSON.stringify(C(e)),"utf8").digest("hex")}i(g,"canonicalHash");var Y=a.enum(["thread.started","thread.resumed","turn.started","turn.steered","turn.interrupted","turn.completed","turn.failed","item.started","item.delta","item.completed","assistant.reasoning.delta","assistant.delta","tool.started","tool.completed","approval.requested","approval.resolved","user_input.requested","user_input.resolved","compaction.started","compaction.completed","harness.admitted","harness.refiner.queued","harness.refiner.started","harness.refiner.completed","harness.refiner.failed","diagnostic"]),X=a.object({sequence:a.number().int().nonnegative(),name:Y,source:a.enum(["runtime","provider","tool","host","refiner"]),status:a.string().trim().min(1).nullable().default(null),threadId:a.string().trim().min(1),turnId:a.string().trim().min(1).nullable().default(null),callId:a.string().trim().min(1).nullable().default(null),output:a.string().nullable().default(null),error:a.string().nullable().default(null),data:a.record(a.string(),a.unknown()).default({})}).strict();function He(e){return g(X.parse(e))}i(He,"canonicalEventHash");import{once as Z}from"node:events";import{createInterface as ee}from"node:readline";async function D(e){let t=new S(e.host),n=Promise.resolve(),r=[],s=i(u=>(n=n.then(async()=>{e.writable.write(`${JSON.stringify(u)}
3
+ `)||await Z(e.writable,"drain")}),n),"write"),o=i(()=>{if(!(!t.initialized||r.length===0))for(let u of r.splice(0))s(u)},"flushPendingNotifications"),l=e.host.subscribe?.(u=>{if(!t.initialized){r.push(u);return}s(u)}),c=new Set,h=ee({input:e.readable,crlfDelay:1/0});try{for await(let u of h){if(!u.trim())continue;let p;try{p=JSON.parse(u)}catch{await s({jsonrpc:"2.0",id:null,error:{code:-32700,message:"Parse error"}});continue}let v=(async()=>{let R=await t.handle(p);R&&await s(R),o()})(),w=p&&typeof p=="object"&&"method"in p?p.method:null;if(w==="initialize"||w==="initialized"){await v;continue}c.add(v),v.finally(()=>c.delete(v))}await Promise.all(c),await n}finally{l?.()}}i(D,"runAgentJsonlServer");var T=a.object({threadId:a.string().trim().min(1)}).passthrough(),te=a.object({session:a.unknown()}).strict(),x=T.extend({input:a.unknown()}),re=x.extend({idempotencyKey:a.string().trim().min(1).max(200)}),ne=x.extend({inputId:a.string().trim().min(1)}),ae=T.extend({reason:a.string().trim().min(1).optional()}),ie=a.object({approvalId:a.string().trim().min(1),input:a.unknown()}).strict();function L(e){let t=i(async(r,s,o)=>{let l=performance.now();e.telemetry?.({method:r,phase:"started",threadId:s,durationMs:null,errorClass:null});try{let c=await o();return e.telemetry?.({method:r,phase:"completed",threadId:s,durationMs:performance.now()-l,errorClass:null}),c}catch(c){throw e.telemetry?.({method:r,phase:"failed",threadId:s,durationMs:performance.now()-l,errorClass:c instanceof Error?c.name:"UnknownError"}),c}},"run"),n=i(async(r,s="thread/read")=>{let{threadId:o}=T.parse(r);return t(s,o,async()=>{let[l,c,h]=await Promise.all([e.readThread(o),e.listTurns(o),e.listEvents(o)]);return{thread:l,turns:c,events:h}})},"threadRead");return{capabilities:i(r=>t("runtime/capabilities",null,()=>e.capabilities(r)),"capabilities"),threadStart:i(async r=>t("thread/start",null,async()=>({thread:await e.createThread(te.parse(r).session)})),"threadStart"),threadResume:i(r=>n(r,"thread/resume"),"threadResume"),threadRead:n,turnStart:i(async r=>{let s=x.parse(r);return t("turn/start",s.threadId,async()=>({turn:await e.startTurn(s.threadId,s.input)}))},"turnStart"),turnSteer:i(async r=>{let s=x.parse(r);return t("turn/steer",s.threadId,async()=>({receipt:await e.steerTurn(s.threadId,s.input)}))},"turnSteer"),taskInbox:i(async r=>{let{threadId:s}=T.parse(r);return t("task/inbox",s,()=>e.readTaskInbox(s))},"taskInbox"),taskQueue:i(async r=>{let s=re.parse(r);return t("task/queue",s.threadId,()=>e.queueTaskInput(s.threadId,s.input,s.idempotencyKey))},"taskQueue"),taskInputUpdate:i(async r=>{let s=ne.parse(r);return t("task/inputUpdate",s.threadId,()=>e.updateTaskInput(s.threadId,s.inputId,s.input))},"taskInputUpdate"),turnInterrupt:i(async r=>{let s=ae.parse(r);return t("turn/interrupt",s.threadId,async()=>({turn:await e.interruptTurn(s.threadId,s.reason)}))},"turnInterrupt"),approvalResolve:i(async r=>{let s=ie.parse(r);return t("approval/resolve",null,async()=>({approval:await e.resolveApproval(s.approvalId,s.input)}))},"approvalResolve"),userInputResolve:i(async r=>{let s=x.parse(r);return t("userInput/resolve",s.threadId,async()=>(e.isTurnActive(s.threadId)&&await e.waitForTurnSettlement(s.threadId),{turn:await e.startTurn(s.threadId,s.input)}))},"userInputResolve"),profileWorkflows:i(()=>t("profile/workflows",null,()=>e.listProfileWorkflows()),"profileWorkflows"),profileEvaluations:i(()=>t("profile/evaluations",null,()=>e.listProfileEvaluations()),"profileEvaluations"),profileEvaluationPrepare:i(r=>t("profile/evaluations/prepare",null,()=>e.prepareProfileEvaluationRun(r)),"profileEvaluationPrepare"),profileEvaluationRun:i(r=>t("profile/evaluations/run",null,()=>e.runPreparedProfileEvaluation(r)),"profileEvaluationRun"),profileEvaluationRunSuite:i(r=>t("profile/evaluations/runSuite",null,()=>e.runProfileEvaluationSuite(r)),"profileEvaluationRunSuite"),profileEvaluationExecuteCase:i(r=>t("profile/evaluations/executeCase",null,()=>e.executeProfileEvaluationCase(r)),"profileEvaluationExecuteCase"),profileEvaluationExecuteRun:i(r=>t("profile/evaluations/executeRun",null,()=>e.executeProfileEvaluationRun(r)),"profileEvaluationExecuteRun"),profileEvaluationCompare:i(r=>t("profile/evaluations/compare",null,()=>e.compareProfileEvaluationRuns(r)),"profileEvaluationCompare"),profileEvaluationReport:i(r=>t("profile/evaluations/report",null,()=>e.buildProfileEvaluationReport(r)),"profileEvaluationReport"),harnessInspect:i(()=>t("harness/inspect",null,()=>e.inspectHarness()),"harnessInspect"),harnessProposalReview:i(r=>t("harness/proposalReview",null,()=>e.reviewHarnessProposal(r)),"harnessProposalReview"),harnessReview:i(r=>t("harness/review",null,()=>e.reviewHarness(r)),"harnessReview"),harnessAcceptEvaluationReview:i(r=>t("harness/acceptEvaluationReview",null,()=>e.acceptHarnessEvaluationReview(r)),"harnessAcceptEvaluationReview"),harnessMaterializeEvaluationTaskset:i(r=>t("harness/materializeEvaluationTaskset",null,()=>e.materializeHarnessEvaluationTaskset(r)),"harnessMaterializeEvaluationTaskset"),harnessRunEvaluationBaseline:i(r=>t("harness/runEvaluationBaseline",null,()=>e.runHarnessEvaluationBaseline(r)),"harnessRunEvaluationBaseline"),harnessValidate:i(()=>t("harness/validate",null,()=>e.validateHarness()),"harnessValidate"),harnessBackgroundReview:i(r=>t("harness/backgroundReview",null,()=>e.updateHarnessBackgroundReview(r)),"harnessBackgroundReview"),harnessDiff:i(r=>t("harness/diff",null,()=>e.diffHarness(r)),"harnessDiff"),harnessRollback:i(r=>t("harness/rollback",null,()=>e.rollbackHarness(r)),"harnessRollback"),refinerInspect:i(()=>t("refiner/inspect",null,()=>e.inspectRefiner()),"refinerInspect"),refinerUpdate:i(r=>t("refiner/update",null,()=>e.updateRefiner(r)),"refinerUpdate"),refinerActivate:i(r=>t("refiner/activate",null,()=>e.activateRefiner(r)),"refinerActivate"),refinerRollback:i(r=>t("refiner/rollback",null,()=>e.rollbackRefiner(r)),"refinerRollback"),subscribe:e.subscribeEvents&&e.eventNotification?r=>e.subscribeEvents(s=>r(e.eventNotification(s))):void 0}}i(L,"createAgentRuntimeService");var m=a.string().regex(/^[a-f0-9]{64}$/),et=a.object({harnessReleaseHash:m,instructionsHash:m,skillHashes:a.record(a.string(),m),agentAssetHashes:a.record(a.string(),m),toolCatalogHash:m,memoryRevision:a.number().int().nonnegative().nullable()}).strict(),se=a.object({protocolVersion:a.string().trim().min(1),threadId:a.string().trim().min(1),turnId:a.string().trim().min(1),harnessReleaseHash:m,toolCatalogHash:m,context:a.record(a.string(),a.unknown()),pendingInteraction:a.record(a.string(),a.unknown()).nullable(),usage:a.record(a.string(),a.unknown())}).strict();function tt(e){return g(se.parse(e))}i(tt,"checkpointHash");function rt(e){return[e.system,...e.harnessInstructions,...e.skillInstructions,...e.hostInstructions??[]].map(t=>t.trim()).filter(Boolean).join(`
4
+
5
+ `)}i(rt,"materializeAgentPrompt");function st(e){let t=new Set,n=[...e].map(o=>{let l=o.name.trim();if(!l)throw new Error("Agent tool names cannot be empty.");if(t.has(l))throw new Error(`Duplicate agent tool: ${l}.`);if(t.add(l),!o.unavailableReason&&!o.executorAvailable)throw new Error(`Agent tool ${l} is declared as available without an executor.`);return{...o,name:l}}).sort((o,l)=>o.name.localeCompare(l.name)),r=n.filter(o=>!o.unavailableReason).map(o=>({name:o.name,description:o.description,inputSchema:o.inputSchema})),s=n.map(o=>({name:o.name,displayLabel:o.displayLabel??o.name,placement:o.placement,available:!o.unavailableReason,unavailableReason:o.unavailableReason??null}));return{byName:new Map(n.map(o=>[o.name,o])),tools:n,modelTools:r,capabilities:s,hash:g({modelTools:r,capabilities:s})}}i(st,"createAgentToolCatalogProjection");async function ot(e,t){let n=e.byName.get(t.name);if(!n)throw new Error(`Unknown agent tool: ${t.name}.`);if(n.unavailableReason)throw new Error(`Agent tool ${t.name} is unavailable: ${n.unavailableReason}`);if(!n.execute)throw new Error(`Agent tool ${t.name} has no executor.`);let r=n.validateArguments?n.validateArguments(t.arguments):t.arguments;return n.execute(r,t.context)}i(ot,"executeProjectedAgentTool");var F=class{static{i(this,"TaskSignals")}#e=new Map;notify(t){for(let n of[...this.#e.get(t)??[]])n()}subscribe(t,n){let r=this.#e.get(t);return r||this.#e.set(t,r=new Set),r.add(n),()=>{r.delete(n),r.size===0&&this.#e.delete(t)}}async wait(t){let n=i(()=>{},"wake"),r=0,s=i(()=>{r+=1,n()},"changed"),o=[...new Set(t.taskIds)].map(c=>this.subscribe(c,s)),l=setTimeout(s,Math.max(0,t.deadline-Date.now()));t.signal.addEventListener("abort",s);try{for(;;){t.signal.throwIfAborted();let c=r,h=await t.read();if(h!==null)return h;if(Date.now()>=t.deadline)return null;r===c&&await new Promise(u=>{n=u,(r!==c||t.signal.aborted)&&u()})}}finally{clearTimeout(l),t.signal.removeEventListener("abort",s);for(let c of o)c()}}},J=class{static{i(this,"TaskSerialExecutor")}#e=new Map;async run(t,n){let s=(this.#e.get(t)??Promise.resolve()).then(n),o=s.then(()=>{},()=>{});this.#e.set(t,o);try{return await s}finally{this.#e.get(t)===o&&this.#e.delete(t)}}};function St(e){return oe({runtime:L(e.ports),close:e.close})}i(St,"createAppServer");function oe(e){let t=!1;return{runtime:e.runtime,close:i(async()=>{t||(t=!0,await e.close?.())},"close")}}i(oe,"attachAppServer");async function Tt(e){try{await D({host:e.appServer.runtime,readable:e.readable,writable:e.writable})}finally{await e.appServer.close()}}i(Tt,"runAppServerJsonl");import{randomBytes as le}from"node:crypto";function jt(){return A()}i(jt,"appDataDir");function zt(e){return d(e).config}i(zt,"providersConfigPath");function Ht(e){return d(e).credentials}i(Ht,"providerSecretsConfigPath");function Nt(e){return d(e).key}i(Nt,"providerSecretsKeyPath");async function Ot(e){let t=d(e).token;return z(t,async()=>{let n=(await j(t))?.trim(),r=process.env.OPENPOND_APP_TOKEN||n||le(32).toString("base64url");return r!==n&&await E(t,r),{token:r,tokenFile:t}})}i(Ot,"ensureCapabilityToken");export{pe as a,fe as b,me as c,g as d,ge as e,be as f,xe as g,X as h,He as i,y as j,ye as k,se as l,tt as m,rt as n,st as o,ot as p,F as q,J as r,St as s,Tt as t,jt as u,zt as v,Ht as w,Nt as x,Ot as y};
@@ -1,5 +1,5 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{b as Q,c as Z,t as ee,y as oe}from"./chunk-RB7BWSFJ.js";import{a as T,b as X,h as K}from"./chunk-3QVNGZFY.js";import{n as te,p as re}from"./chunk-N3KS3AJK.js";import{$a as E,Ra as V,Sa as J,Ua as I,Xa as F,_a as W,b as L,c as B,db as z,fb as q,gb as Y,ja as D,la as H,ma as M,na as $,oa as j,qa as G}from"./chunk-NNLI4OWY.js";import{b as i}from"./chunk-ES2ISFJC.js";import{c as N,d as C,f as k,h as R}from"./chunk-H7IWJN7L.js";import{a as s}from"./chunk-FTQLQJQV.js";import{promises as U}from"node:fs";import Ee from"node:os";import Ae from"node:path";import{createServer as Ie}from"node:http";import{randomBytes as Te}from"node:crypto";var be=i.discriminatedUnion("op",[i.strictObject({op:i.literal("set"),path:i.array(i.string().min(1)).min(1),value:i.unknown()}),i.strictObject({op:i.literal("unset"),path:i.array(i.string().min(1)).min(1)})]),Oe=i.discriminatedUnion("action",[i.strictObject({action:i.literal("patch"),expectedRevision:i.string(),operations:i.array(be).max(100)}),i.strictObject({action:i.literal("replace"),expectedRevision:i.string(),text:i.string().max(1048576)}),i.strictObject({action:i.literal("validate"),text:i.string().max(1048576)}),i.strictObject({action:i.literal("restore"),expectedRevision:i.string(),revision:i.string()}),i.strictObject({action:i.literal("trust"),root:i.string(),accountId:i.string(),trusted:i.boolean()}),i.strictObject({action:i.literal("client-state"),owner:i.string(),patch:z,importOnly:i.boolean().optional()})]);function ne(e){let t=null;async function r(l,n){let g=R(e).config,w=null,p=null,d=null;try{w=await B(g),d=await E(e,{projectRoot:l,accountId:n}),l||(t=d)}catch(v){p=C(v,g)}let y=d??(l?null:t);return{path:g,text:w,rawRevision:L(w),issue:p,effective:y,usingLastValid:!d&&!!y,applies:"next_turn",recoverableRevisions:await H(e),clientState:p?null:await q(e)}}s(r,"status");async function o(l){let n=Oe.parse(l);return n.action==="validate"?{valid:!0,document:D(n.text,R(e).config)}:(n.action==="patch"&&await G(e,n.expectedRevision,n.operations),n.action==="replace"&&await M(e,n.expectedRevision,n.text),n.action==="restore"&&await $(e,n.revision,n.expectedRevision),n.action==="trust"&&await W(e,n.root,n.accountId,n.trusted),n.action==="client-state"?Y(e,n.owner,n.patch,n.importOnly):r())}return s(o,"mutate"),{status:r,mutate:o,schema:j}}s(ne,"createConfigurationPayloads");import{Buffer as ie}from"node:buffer";var A={"Access-Control-Allow-Headers":"authorization, content-type, x-openpond-team-id","Access-Control-Allow-Methods":"GET, POST, PUT, PATCH, DELETE, OPTIONS"},Se=25*1024*1024,x=class extends Error{constructor(r,o,l){super(l);this.status=r;this.code=o;this.name="HttpBodyError"}status;code;static{s(this,"HttpBodyError")}};function ae(e,t,r={}){for(let[l,n]of Object.entries(A))t.setHeader(l,n);let o=ce(e.headers.origin);return o?(t.setHeader("Vary",xe(t.getHeader("Vary"))),Re(o,r)?(t.setHeader("Access-Control-Allow-Origin",o),{allowed:!0,origin:o}):{allowed:!1,origin:o}):{allowed:!0,origin:null}}s(ae,"applyCorsHeaders");function Re(e,t={}){if(e==="null")return!0;let r=se(e);return r?Ce(r)?!0:new Set((t.allowedOrigins??[]).map(l=>l?se(l):null).filter(l=>!!l)).has(r):!1}s(Re,"isAllowedCorsOrigin");function h(e,t,r){e.writeHead(t,{"Content-Type":"application/json",...A}),e.end(JSON.stringify(r))}s(h,"sendJson");function Je(e,t,r){e.writeHead(t,{"Content-Type":"text/plain; charset=utf-8",...A}),e.end(r)}s(Je,"sendText");function Fe(e,t,r,o){e.writeHead(t,{"Content-Type":o,"Content-Length":String(r.byteLength),"Cache-Control":"no-store","X-Content-Type-Options":"nosniff",...A}),e.end(r)}s(Fe,"sendBinary");async function _(e,t={}){let r=t.maxBytes??Se,o=ce(e.headers["content-type"]),l=[],n=0;for await(let w of e){let p=ie.from(w);if(n+=p.byteLength,n>r)throw new x(413,"request_body_too_large",`JSON request body exceeds ${r} bytes.`);l.push(p)}let g=ie.concat(l).toString("utf8").trim();if(!g)return{};if(!Pe(o))throw new x(415,"unsupported_media_type","JSON request body requires Content-Type: application/json.");try{return JSON.parse(g)}catch{throw new x(400,"invalid_json","Request body is not valid JSON.")}}s(_,"readJson");function le(e,t,r){let o=e.headers.authorization;return(typeof o=="string"&&o.startsWith("Bearer ")?o.slice(7):null)===r}s(le,"hasAuth");function ce(e){return Array.isArray(e)?e[0]??null:e??null}s(ce,"headerValue");function Pe(e){if(!e)return!1;let t=e.split(";")[0]?.trim().toLowerCase();return t==="application/json"||!!t?.endsWith("+json")}s(Pe,"isJsonContentType");function se(e){try{let t=new URL(e);return t.protocol!=="http:"&&t.protocol!=="https:"?null:t.origin}catch{return null}}s(se,"normalizeOrigin");function Ce(e){let t=new URL(e);return t.hostname==="localhost"||t.hostname==="127.0.0.1"||t.hostname==="::1"||t.hostname==="[::1]"}s(Ce,"isLoopbackOrigin");function xe(e){let r=(Array.isArray(e)?e.join(", "):e?String(e):"").split(",").map(o=>o.trim()).filter(Boolean);return r.some(o=>o.toLowerCase()==="origin")||r.push("Origin"),r.join(", ")}s(xe,"appendVaryOrigin");function pe(e){return`<!doctype html><html lang="en"><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>OpenPond recovery</title>
2
+ import{b as Q,c as Z,t as ee,y as oe}from"./chunk-FRWPAVCD.js";import{a as T,b as X,h as K}from"./chunk-AH2O6IVI.js";import{n as te,p as re}from"./chunk-N3KS3AJK.js";import{$a as E,Ra as V,Sa as J,Ua as I,Xa as F,_a as W,b as L,c as B,db as z,fb as q,gb as Y,ja as D,la as H,ma as M,na as $,oa as j,qa as G}from"./chunk-NNLI4OWY.js";import{b as i}from"./chunk-ES2ISFJC.js";import{c as N,d as C,f as k,h as R}from"./chunk-H7IWJN7L.js";import{a as s}from"./chunk-FTQLQJQV.js";import{promises as U}from"node:fs";import Ee from"node:os";import Ae from"node:path";import{createServer as Ie}from"node:http";import{randomBytes as Te}from"node:crypto";var be=i.discriminatedUnion("op",[i.strictObject({op:i.literal("set"),path:i.array(i.string().min(1)).min(1),value:i.unknown()}),i.strictObject({op:i.literal("unset"),path:i.array(i.string().min(1)).min(1)})]),Oe=i.discriminatedUnion("action",[i.strictObject({action:i.literal("patch"),expectedRevision:i.string(),operations:i.array(be).max(100)}),i.strictObject({action:i.literal("replace"),expectedRevision:i.string(),text:i.string().max(1048576)}),i.strictObject({action:i.literal("validate"),text:i.string().max(1048576)}),i.strictObject({action:i.literal("restore"),expectedRevision:i.string(),revision:i.string()}),i.strictObject({action:i.literal("trust"),root:i.string(),accountId:i.string(),trusted:i.boolean()}),i.strictObject({action:i.literal("client-state"),owner:i.string(),patch:z,importOnly:i.boolean().optional()})]);function ne(e){let t=null;async function r(l,n){let g=R(e).config,w=null,p=null,d=null;try{w=await B(g),d=await E(e,{projectRoot:l,accountId:n}),l||(t=d)}catch(v){p=C(v,g)}let y=d??(l?null:t);return{path:g,text:w,rawRevision:L(w),issue:p,effective:y,usingLastValid:!d&&!!y,applies:"next_turn",recoverableRevisions:await H(e),clientState:p?null:await q(e)}}s(r,"status");async function o(l){let n=Oe.parse(l);return n.action==="validate"?{valid:!0,document:D(n.text,R(e).config)}:(n.action==="patch"&&await G(e,n.expectedRevision,n.operations),n.action==="replace"&&await M(e,n.expectedRevision,n.text),n.action==="restore"&&await $(e,n.revision,n.expectedRevision),n.action==="trust"&&await W(e,n.root,n.accountId,n.trusted),n.action==="client-state"?Y(e,n.owner,n.patch,n.importOnly):r())}return s(o,"mutate"),{status:r,mutate:o,schema:j}}s(ne,"createConfigurationPayloads");import{Buffer as ie}from"node:buffer";var A={"Access-Control-Allow-Headers":"authorization, content-type, x-openpond-team-id","Access-Control-Allow-Methods":"GET, POST, PUT, PATCH, DELETE, OPTIONS"},Se=25*1024*1024,x=class extends Error{constructor(r,o,l){super(l);this.status=r;this.code=o;this.name="HttpBodyError"}status;code;static{s(this,"HttpBodyError")}};function ae(e,t,r={}){for(let[l,n]of Object.entries(A))t.setHeader(l,n);let o=ce(e.headers.origin);return o?(t.setHeader("Vary",xe(t.getHeader("Vary"))),Re(o,r)?(t.setHeader("Access-Control-Allow-Origin",o),{allowed:!0,origin:o}):{allowed:!1,origin:o}):{allowed:!0,origin:null}}s(ae,"applyCorsHeaders");function Re(e,t={}){if(e==="null")return!0;let r=se(e);return r?Ce(r)?!0:new Set((t.allowedOrigins??[]).map(l=>l?se(l):null).filter(l=>!!l)).has(r):!1}s(Re,"isAllowedCorsOrigin");function h(e,t,r){e.writeHead(t,{"Content-Type":"application/json",...A}),e.end(JSON.stringify(r))}s(h,"sendJson");function Je(e,t,r){e.writeHead(t,{"Content-Type":"text/plain; charset=utf-8",...A}),e.end(r)}s(Je,"sendText");function Fe(e,t,r,o){e.writeHead(t,{"Content-Type":o,"Content-Length":String(r.byteLength),"Cache-Control":"no-store","X-Content-Type-Options":"nosniff",...A}),e.end(r)}s(Fe,"sendBinary");async function _(e,t={}){let r=t.maxBytes??Se,o=ce(e.headers["content-type"]),l=[],n=0;for await(let w of e){let p=ie.from(w);if(n+=p.byteLength,n>r)throw new x(413,"request_body_too_large",`JSON request body exceeds ${r} bytes.`);l.push(p)}let g=ie.concat(l).toString("utf8").trim();if(!g)return{};if(!Pe(o))throw new x(415,"unsupported_media_type","JSON request body requires Content-Type: application/json.");try{return JSON.parse(g)}catch{throw new x(400,"invalid_json","Request body is not valid JSON.")}}s(_,"readJson");function le(e,t,r){let o=e.headers.authorization;return(typeof o=="string"&&o.startsWith("Bearer ")?o.slice(7):null)===r}s(le,"hasAuth");function ce(e){return Array.isArray(e)?e[0]??null:e??null}s(ce,"headerValue");function Pe(e){if(!e)return!1;let t=e.split(";")[0]?.trim().toLowerCase();return t==="application/json"||!!t?.endsWith("+json")}s(Pe,"isJsonContentType");function se(e){try{let t=new URL(e);return t.protocol!=="http:"&&t.protocol!=="https:"?null:t.origin}catch{return null}}s(se,"normalizeOrigin");function Ce(e){let t=new URL(e);return t.hostname==="localhost"||t.hostname==="127.0.0.1"||t.hostname==="::1"||t.hostname==="[::1]"}s(Ce,"isLoopbackOrigin");function xe(e){let r=(Array.isArray(e)?e.join(", "):e?String(e):"").split(",").map(o=>o.trim()).filter(Boolean);return r.some(o=>o.toLowerCase()==="origin")||r.push("Origin"),r.join(", ")}s(xe,"appendVaryOrigin");function pe(e){return`<!doctype html><html lang="en"><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>OpenPond recovery</title>
3
3
  <style nonce="${e}">body{font:16px system-ui;background:#171819;color:#eee;max-width:850px;margin:6vh auto;padding:24px}textarea{box-sizing:border-box;width:100%;min-height:280px;background:#222;color:#eee;padding:14px;border:1px solid #777;border-radius:8px;font:14px monospace}button,input,select{font:inherit;margin:6px;padding:8px}pre{white-space:pre-wrap}code{overflow-wrap:anywhere}button{cursor:pointer}p{line-height:1.5}</style>
4
4
  <h1>OpenPond needs a storage repair</h1><p id="issue" role="alert">Loading recovery details\u2026</p><p><code id="file"></code></p>
5
5
  <p id="action"></p><p>Migration backups and the source installation remain available. Execution services are stopped while recovery is open.</p>