openpond 0.0.69 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. package/dist/chunks/{app-layer-EXXOWJ5H.js → app-layer-XEYHFJHI.js} +2 -2
  2. package/dist/chunks/{app-server-runtime-7FBQBE3C.js → app-server-runtime-Y6MW4XCG.js} +7 -6
  3. package/dist/chunks/{apps-RZSDOFAG.js → apps-GSXUDK6V.js} +2 -2
  4. package/dist/chunks/{chunk-SFMNGWNO.js → chunk-2JABRRNR.js} +1 -1
  5. package/dist/chunks/{chunk-MMRJNSWY.js → chunk-6G6MDZLM.js} +1096 -120
  6. package/dist/chunks/{chunk-NPNIL6SQ.js → chunk-AN2EYCN3.js} +1 -1
  7. package/dist/chunks/{chunk-F36ZVO6U.js → chunk-CNTM26OW.js} +1 -1
  8. package/dist/chunks/{chunk-FEOLMLYU.js → chunk-EFET7LB7.js} +21 -2
  9. package/dist/chunks/{training-5CPTZRVC.js → chunk-J7PYGDRY.js} +251 -16
  10. package/dist/chunks/{chunk-Y57RTLVV.js → chunk-N3TGCM7J.js} +93 -35
  11. package/dist/chunks/{chunk-BLFIIAWZ.js → chunk-NTK22KJD.js} +68 -21
  12. package/dist/chunks/{chunk-QTN6HXOR.js → chunk-P6JLLWMI.js} +2 -2
  13. package/dist/chunks/chunk-R3C3MNSI.js +140 -0
  14. package/dist/chunks/{chunk-7C4OIFOC.js → chunk-TGM5IPYO.js} +31 -3
  15. package/dist/chunks/{chunk-OOM2PHBE.js → chunk-TZWAUV2L.js} +1130 -226
  16. package/dist/chunks/{cli-HIXVXM72.js → cli-L5VPOV6I.js} +6 -5
  17. package/dist/chunks/continual-FYDKLCO7.js +803 -0
  18. package/dist/chunks/{core-commands-34SVH6ZQ.js → core-commands-MAN3CSJQ.js} +3 -3
  19. package/dist/chunks/{desktop-test-66DPBNJX.js → desktop-test-OE5SST2W.js} +2 -2
  20. package/dist/chunks/{extension-ZMRHCDO3.js → extension-J3CIEDP4.js} +968 -19
  21. package/dist/chunks/{help-COHCZEP2.js → help-JNGJJFU5.js} +1 -1
  22. package/dist/chunks/{opchat-2PGW2GNN.js → opchat-6HEQJFLL.js} +2 -2
  23. package/dist/chunks/{organizations-NZ4OY56V.js → organizations-MWAPNOCK.js} +5 -4
  24. package/dist/chunks/{profile-GEMTRPUG.js → profile-P7HMONTZ.js} +2 -2
  25. package/dist/chunks/{project-agent-NX6YBGWC.js → project-agent-2RAK7GAZ.js} +2 -2
  26. package/dist/chunks/{sandbox-command-UEY53OJO.js → sandbox-command-G22CPFNK.js} +2 -2
  27. package/dist/chunks/{sandbox-template-YKYRB645.js → sandbox-template-S4WRUWJ6.js} +3 -3
  28. package/dist/chunks/{src-IXYDKOBI.js → src-A6O6ZGIL.js} +15899 -8010
  29. package/dist/chunks/{src-LKJBD5AM.js → src-BKBZ7WLO.js} +4 -3
  30. package/dist/chunks/taskset-BMI7KOWP.js +66 -0
  31. package/dist/chunks/{teams-bot-K6KZHZJV.js → teams-bot-5VBYEN7M.js} +2 -2
  32. package/dist/chunks/training-UPVSGDTB.js +17 -0
  33. package/dist/chunks/{workspaces-WXM72UZF.js → workspaces-XM5BY3MO.js} +4 -2
  34. package/dist/cli.js +13 -13
  35. package/dist/web/assets/App-DfiCmBv6.js +173 -0
  36. package/dist/web/assets/{AppDialog-DX-xs3KA.js → AppDialog-CSXu5wRu.js} +1 -1
  37. package/dist/web/assets/{AppTerminalPanel-CYVj_ITT.js → AppTerminalPanel-y2bVL2RV.js} +2 -2
  38. package/dist/web/assets/{AppsView-ByjyGog7.js → AppsView-Bs9pwD2H.js} +1 -1
  39. package/dist/web/assets/{BrowserSidebar-BDwtMAZl.js → BrowserSidebar-CUgT5V1m.js} +1 -1
  40. package/dist/web/assets/{CartesianChart-Dv6jJfPR.js → CartesianChart-DA85hfrP.js} +1 -1
  41. package/dist/web/assets/{CollaborationTabs-CC5AIhMh.js → CollaborationTabs-B8mlPhM3.js} +1 -1
  42. package/dist/web/assets/{CommandMenu-Ct0Sx7yP.js → CommandMenu-EwUGCeC_.js} +1 -1
  43. package/dist/web/assets/{CommunityView-C_zVE0jg.js → CommunityView-IHNq-YJz.js} +1 -1
  44. package/dist/web/assets/{ComposerCreateImproveStrip-CNn4OywM.js → ComposerCreateImproveStrip-qOL2zA26.js} +1 -1
  45. package/dist/web/assets/{GetStartedView-DRFpHDLd.js → GetStartedView-C2ypO0v7.js} +1 -1
  46. package/dist/web/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  47. package/dist/web/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  48. package/dist/web/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  49. package/dist/web/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  50. package/dist/web/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  51. package/dist/web/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  52. package/dist/web/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  53. package/dist/web/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  54. package/dist/web/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  55. package/dist/web/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  56. package/dist/web/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  57. package/dist/web/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  58. package/dist/web/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  59. package/dist/web/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  60. package/dist/web/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  61. package/dist/web/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  62. package/dist/web/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  63. package/dist/web/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  64. package/dist/web/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  65. package/dist/web/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  66. package/dist/web/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  67. package/dist/web/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  68. package/dist/web/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  69. package/dist/web/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  70. package/dist/web/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  71. package/dist/web/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  72. package/dist/web/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  73. package/dist/web/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  74. package/dist/web/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  75. package/dist/web/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  76. package/dist/web/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  77. package/dist/web/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  78. package/dist/web/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  79. package/dist/web/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  80. package/dist/web/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  81. package/dist/web/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  82. package/dist/web/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  83. package/dist/web/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  84. package/dist/web/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  85. package/dist/web/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  86. package/dist/web/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  87. package/dist/web/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  88. package/dist/web/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  89. package/dist/web/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  90. package/dist/web/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  91. package/dist/web/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  92. package/dist/web/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  93. package/dist/web/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  94. package/dist/web/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  95. package/dist/web/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  96. package/dist/web/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  97. package/dist/web/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  98. package/dist/web/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  99. package/dist/web/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  100. package/dist/web/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  101. package/dist/web/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  102. package/dist/web/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  103. package/dist/web/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  104. package/dist/web/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  105. package/dist/web/assets/LabModelVersionDetailPage-BK0eoUlW.js +1 -0
  106. package/dist/web/assets/{LabSkillSidebar-B9jY4AgE.js → LabSkillSidebar-CRPb4qBn.js} +1 -1
  107. package/dist/web/assets/LabsRoute-Bw-HD6QC.js +2 -0
  108. package/dist/web/assets/LabsRoute-CGFgymTX.css +1 -0
  109. package/dist/web/assets/MainChatThread-Cu6_UnNE.js +2 -0
  110. package/dist/web/assets/MainPane-k1iII9e9.js +8 -0
  111. package/dist/web/assets/MarkdownText-N60tvLug.js +268 -0
  112. package/dist/web/assets/Messages-CYQFLElK.js +10 -0
  113. package/dist/web/assets/{NativeSkillSidebar-DjebFRoi.js → NativeSkillSidebar-zbx7WmOk.js} +1 -1
  114. package/dist/web/assets/{NewExperienceSwitcher-C-bJxHxY.js → NewExperienceSwitcher-B0zev5Sx.js} +1 -1
  115. package/dist/web/assets/{NewProjectDialog-Cx8QcZm7.js → NewProjectDialog-lZlzrp-R.js} +1 -1
  116. package/dist/web/assets/{OutputsPage-Y9HM-SHX.js → OutputsPage-B4zYYUT5.js} +1 -1
  117. package/dist/web/assets/{ProjectsPage-BBr58yKT.js → ProjectsPage-97wgc84s.js} +1 -1
  118. package/dist/web/assets/RightChatPanelStack-I2znDCc7.js +1 -0
  119. package/dist/web/assets/{RightSidebarHomePanel-Dx-1elSI.js → RightSidebarHomePanel-BUcWVJi-.js} +1 -1
  120. package/dist/web/assets/ScheduledWorkPage-Bp-t0eVj.js +1 -0
  121. package/dist/web/assets/SettingsView-C1xyn1Y4.js +6 -0
  122. package/dist/web/assets/{TeamChatView-Bkyhu40R.js → TeamChatView-Fj5_yjVE.js} +2 -2
  123. package/dist/web/assets/{TerminalOverlay-CaCkZDzO.js → TerminalOverlay-D2WBeJvp.js} +1 -1
  124. package/dist/web/assets/{TrainingCreationPanel-Vvi41WNT.js → TrainingCreationPanel-dYW_dh3M.js} +1 -1
  125. package/dist/web/assets/{TrainingDraftPanel-C2C3hffI.js → TrainingDraftPanel-zeJWmmW6.js} +1 -1
  126. package/dist/web/assets/{UsageSettingsSection-DpPBd-ra.js → UsageSettingsSection-B6SBqYuB.js} +2 -2
  127. package/dist/web/assets/WorkSidebarPanel-BwbWKpOZ.js +1 -0
  128. package/dist/web/assets/{WorkspaceDiffPanel-D_zKOW4K.js → WorkspaceDiffPanel-D9Kp0vFw.js} +6 -6
  129. package/dist/web/assets/WorkspaceEnvironmentMenu-D-3YGp06.js +32 -0
  130. package/dist/web/assets/WorkspaceGitDialogs-BUbzUN4m.js +1 -0
  131. package/dist/web/assets/{WorkspaceMonacoEditor--GOVrHFp.js → WorkspaceMonacoEditor-CXPY7bBI.js} +3 -3
  132. package/dist/web/assets/{arrow-up-right-BRZWXpqJ.js → arrow-up-right-C7VWgGQP.js} +1 -1
  133. package/dist/web/assets/{chat-file-links-CgFHK89C.js → chat-file-links-CqfMdhHQ.js} +1 -1
  134. package/dist/web/assets/chevron-up-DD9Tei-Q.js +1 -0
  135. package/dist/web/assets/{clipboard-dPd_3lpG.js → clipboard-B-8k7mlT.js} +1 -1
  136. package/dist/web/assets/{cloud-upload-DOwvN4hp.js → cloud-upload-CUVFzURz.js} +1 -1
  137. package/dist/web/assets/{cssMode-BM4j9M0D.js → cssMode-DYvfmqoL.js} +1 -1
  138. package/dist/web/assets/{folder-open-DavjPCw4.js → folder-open-CnbcQIy8.js} +1 -1
  139. package/dist/web/assets/{folder-plus-Dyqast6G.js → folder-plus-BOaLAKy4.js} +1 -1
  140. package/dist/web/assets/{git-commit-horizontal-s3X0cQlz.js → git-commit-horizontal-DQeHsooT.js} +1 -1
  141. package/dist/web/assets/{htmlMode-Nlx7ckXa.js → htmlMode-BXEI-BVY.js} +1 -1
  142. package/dist/web/assets/index-CGMb_VXm.css +1 -0
  143. package/dist/web/assets/{index-5-B6FIuE.js → index-D-VK8mST.js} +1 -1
  144. package/dist/web/assets/index-D-WCyNdJ.js +1 -0
  145. package/dist/web/assets/{info-CVvrNOHr.js → info-DtzDuGLn.js} +1 -1
  146. package/dist/web/assets/{jsonMode-B7monA6g.js → jsonMode-Dosjh_hK.js} +1 -1
  147. package/dist/web/assets/{lspLanguageFeatures-CcJ9GDtK.js → lspLanguageFeatures-BNe-6FJA.js} +1 -1
  148. package/dist/web/assets/{minimize-2-O1DnznGK.js → minimize-2-DnxKN5oK.js} +1 -1
  149. package/dist/web/assets/{monaco.contribution-QOOCizYq.js → monaco.contribution-CfF-ajhi.js} +2 -2
  150. package/dist/web/assets/{monaco.contribution-2PozfA9g.js → monaco.contribution-CnkROzNv.js} +2 -2
  151. package/dist/web/assets/{monaco.contribution-BSJ2jQTi.js → monaco.contribution-Dyns81H2.js} +2 -2
  152. package/dist/web/assets/{monaco.contribution-BMAF2bmO.js → monaco.contribution-ytyanGyj.js} +2 -2
  153. package/dist/web/assets/{play-BpCc5ZbR.js → play-B3o6IAQd.js} +1 -1
  154. package/dist/web/assets/{python-BK41iew-.js → python-B7zZ_9Z_.js} +1 -1
  155. package/dist/web/assets/{refresh-cw-Csoy1ev1.js → refresh-cw-DSJZXa8S.js} +1 -1
  156. package/dist/web/assets/{save-Dbztj0W7.js → save-iC-AXHN6.js} +1 -1
  157. package/dist/web/assets/square-B2roZTxf.js +1 -0
  158. package/dist/web/assets/{toggleHighContrast-DrmwDpyz.js → toggleHighContrast-CjlV4YHK.js} +1 -1
  159. package/dist/web/assets/{training-daZlCtKV.css → training-eg6uFi3M.css} +1 -1
  160. package/dist/web/assets/{tsMode-CFgCMr7d.js → tsMode-XmKmSq0B.js} +1 -1
  161. package/dist/web/assets/{upload-C5nhiSMq.js → upload-BgHXNjfJ.js} +1 -1
  162. package/dist/web/assets/{useLocalAgentSchedules-LAsobERb.js → useLocalAgentSchedules-CVJz0AMr.js} +1 -1
  163. package/dist/web/assets/{wifi-off-BHxh2UbA.js → wifi-off-CneL8bDZ.js} +1 -1
  164. package/dist/web/assets/{workers-FKb-NyBI.js → workers-CT7VYBR5.js} +1 -1
  165. package/dist/web/assets/{yaml-C5DbF9S6.js → yaml-CF8jchCz.js} +1 -1
  166. package/dist/web/index.html +2 -2
  167. package/docs/command-reference.md +58 -2
  168. package/package.json +3 -1
  169. package/dist/web/assets/App-BF9L0JUv.js +0 -171
  170. package/dist/web/assets/LabModelVersionDetailPage-BzF-IVXQ.js +0 -1
  171. package/dist/web/assets/LabsRoute-CS_orT9s.css +0 -1
  172. package/dist/web/assets/LabsRoute-Di1Zs4gZ.js +0 -2
  173. package/dist/web/assets/MainChatThread-8VzlD8Hi.js +0 -2
  174. package/dist/web/assets/MainPane-StAOFINE.js +0 -6
  175. package/dist/web/assets/MarkdownText-B8D_ftSJ.js +0 -9
  176. package/dist/web/assets/Messages-TY62tiDp.js +0 -10
  177. package/dist/web/assets/RightChatPanelStack-DzUbDKwp.js +0 -1
  178. package/dist/web/assets/ScheduledWorkPage-BuXw_W8b.js +0 -1
  179. package/dist/web/assets/SettingsView-DB_zPHYY.js +0 -6
  180. package/dist/web/assets/WorkSidebarPanel-CeWGboTh.js +0 -1
  181. package/dist/web/assets/WorkspaceEnvironmentMenu-BTz9FISP.js +0 -32
  182. package/dist/web/assets/WorkspaceGitDialogs-BnBRUYpS.js +0 -1
  183. package/dist/web/assets/activity-DA5DNQwD.js +0 -1
  184. package/dist/web/assets/chevron-up-DSv2auz_.js +0 -1
  185. package/dist/web/assets/git-branch-zKnZdQiX.js +0 -1
  186. package/dist/web/assets/index-CQ3CPVHZ.css +0 -1
  187. package/dist/web/assets/index-CuoGlf-W.js +0 -1
  188. package/dist/web/assets/square-ju7fWa0W.js +0 -1
@@ -0,0 +1,803 @@
1
+ import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
+ import {
3
+ DEFAULT_LOCAL_TRAINING_API_URL,
4
+ createLocalAuthenticatedRequest
5
+ } from "./chunk-J7PYGDRY.js";
6
+ import {
7
+ ContinualBenchPanelRoleSchema
8
+ } from "./chunk-R3C3MNSI.js";
9
+ import {
10
+ yaml
11
+ } from "./chunk-X7ZG4TSW.js";
12
+ import {
13
+ resolveApiBaseUrlOption
14
+ } from "./chunk-SMNFI2FU.js";
15
+ import "./chunk-KSRWKXRB.js";
16
+ import {
17
+ external_exports
18
+ } from "./chunk-FQS2QL5F.js";
19
+ import {
20
+ optionString,
21
+ parseBooleanOption,
22
+ parseIntegerOption,
23
+ parseNumberOption
24
+ } from "./chunk-MUMPWI4O.js";
25
+ import "./chunk-UACZUFIA.js";
26
+
27
+ // src/cli/continual.ts
28
+ import { readFile, writeFile } from "node:fs/promises";
29
+ import path from "node:path";
30
+ import { createInterface } from "node:readline/promises";
31
+
32
+ // ../../packages/continual-support/dist/adapter.js
33
+ var CONTINUAL_SUPPORT_COMMANDS = Object.freeze({
34
+ init: "openpond continual init --from ./tasks.jsonl",
35
+ validate: "openpond continual validate ./continual-support.yaml",
36
+ run: "openpond continual run ./continual-support.yaml",
37
+ report: "openpond continual report <comparison-series-id>"
38
+ });
39
+
40
+ // ../../packages/continual-support/dist/hash.js
41
+ import { createHash } from "node:crypto";
42
+ function canonicalJson(value) {
43
+ return `${JSON.stringify(normalize(value), null, 2)}
44
+ `;
45
+ }
46
+ function contentHash(value) {
47
+ return createHash("sha256").update(canonicalJson(value)).digest("hex");
48
+ }
49
+ function normalize(value) {
50
+ if (Array.isArray(value))
51
+ return value.map(normalize);
52
+ if (value && typeof value === "object") {
53
+ return Object.fromEntries(Object.entries(value).sort(([left], [right]) => left.localeCompare(right)).map(([key, child]) => [key, normalize(child)]));
54
+ }
55
+ return value;
56
+ }
57
+
58
+ // ../../packages/continual-support/dist/leakage.js
59
+ function auditContinualBenchLeakage(input) {
60
+ const threshold = input.semanticSimilarityThreshold ?? 0.8;
61
+ if (!(threshold > 0 && threshold <= 1))
62
+ throw new Error("semanticSimilarityThreshold must be in (0, 1].");
63
+ const allowed = new Set((input.allowSharedFamiliesBetween ?? []).flatMap(([left, right]) => [`${left}\0${right}`, `${right}\0${left}`]));
64
+ const findings = [];
65
+ for (let leftIndex = 0; leftIndex < input.panels.length; leftIndex += 1) {
66
+ const leftPanel = input.panels[leftIndex];
67
+ for (let rightIndex = leftIndex + 1; rightIndex < input.panels.length; rightIndex += 1) {
68
+ const rightPanel = input.panels[rightIndex];
69
+ for (const left of leftPanel.tasks)
70
+ for (const right of rightPanel.tasks) {
71
+ const base = { leftPanel: leftPanel.id, rightPanel: rightPanel.id, leftTaskId: left.id, rightTaskId: right.id };
72
+ if (left.id === right.id)
73
+ findings.push({ ...base, kind: "duplicate_id", similarity: 1 });
74
+ else if (left.contentHash === right.contentHash)
75
+ findings.push({ ...base, kind: "duplicate_content", similarity: 1 });
76
+ if (left.familyId === right.familyId && !allowed.has(`${leftPanel.id}\0${rightPanel.id}`))
77
+ findings.push({ ...base, kind: "family_overlap", similarity: null });
78
+ if (left.prompt && right.prompt) {
79
+ const similarity = jaccard(left.prompt, right.prompt);
80
+ if (similarity >= threshold)
81
+ findings.push({ ...base, kind: "prompt_overlap", similarity });
82
+ }
83
+ }
84
+ }
85
+ }
86
+ const release = {
87
+ schemaVersion: "openpond.continualBenchLeakageAudit.v1",
88
+ threshold,
89
+ findings: findings.sort((left, right) => JSON.stringify(left).localeCompare(JSON.stringify(right)))
90
+ };
91
+ return { ...release, contentHash: contentHash(release) };
92
+ }
93
+ function jaccard(left, right) {
94
+ const tokens = (value) => new Set(value.toLowerCase().match(/[a-z0-9]+/g) ?? []);
95
+ const leftTokens = tokens(left);
96
+ const rightTokens = tokens(right);
97
+ const union = /* @__PURE__ */ new Set([...leftTokens, ...rightTokens]);
98
+ if (!union.size)
99
+ return 1;
100
+ let intersection = 0;
101
+ for (const token of leftTokens)
102
+ if (rightTokens.has(token))
103
+ intersection += 1;
104
+ return intersection / union.size;
105
+ }
106
+
107
+ // ../../packages/continual-support/dist/manifest.js
108
+ var Id = external_exports.string().trim().min(1).max(240);
109
+ var Hash = external_exports.string().regex(/^[a-f0-9]{64}$/);
110
+ var TaskRef = external_exports.object({ id: Id, contentHash: Hash }).strict();
111
+ var ContinualBenchPortableTaskSchema = external_exports.object({
112
+ id: Id,
113
+ familyId: Id,
114
+ contentHash: Hash,
115
+ prompt: external_exports.string().max(1e6).optional(),
116
+ payload: external_exports.record(external_exports.string(), external_exports.unknown()).optional()
117
+ }).strict();
118
+ var ContinualBenchPortablePanelSchema = external_exports.object({
119
+ id: Id,
120
+ role: ContinualBenchPanelRoleSchema,
121
+ passLabel: Id.nullable(),
122
+ taskIds: external_exports.array(Id).min(1).max(1e6),
123
+ disclosurePhase: external_exports.enum(["review", "evaluation", "final"]),
124
+ optimizerEligible: external_exports.boolean()
125
+ }).strict().superRefine((panel, context) => {
126
+ const shouldOptimize = panel.role === "correction" || panel.role === "training_eligible";
127
+ if (panel.optimizerEligible !== shouldOptimize) {
128
+ context.addIssue({
129
+ code: "custom",
130
+ path: ["optimizerEligible"],
131
+ message: "Only correction and training-eligible panels may be optimizer eligible."
132
+ });
133
+ }
134
+ if (panel.role === "frozen_final" && panel.disclosurePhase !== "final") {
135
+ context.addIssue({
136
+ code: "custom",
137
+ path: ["disclosurePhase"],
138
+ message: "The frozen-final panel may only be disclosed in the final phase."
139
+ });
140
+ }
141
+ if (new Set(panel.taskIds).size !== panel.taskIds.length) {
142
+ context.addIssue({ code: "custom", path: ["taskIds"], message: "Panel task ids must be unique." });
143
+ }
144
+ });
145
+ var ContinualBenchPortablePassSchema = external_exports.object({
146
+ label: Id,
147
+ familyIds: external_exports.array(Id).min(1).max(1e5)
148
+ }).strict();
149
+ var ContinualBenchOpenPondExecutionSchema = external_exports.object({
150
+ adapter: external_exports.literal("openpond"),
151
+ apiBaseUrl: external_exports.string().url().optional(),
152
+ series: external_exports.record(external_exports.string(), external_exports.unknown())
153
+ }).strict();
154
+ var ContinualBenchPortableManifestSchema = external_exports.object({
155
+ schemaVersion: external_exports.literal("openpond.continualBenchManifest.v1"),
156
+ id: Id,
157
+ revision: external_exports.number().int().positive(),
158
+ name: external_exports.string().trim().min(1).max(500),
159
+ description: external_exports.string().trim().min(1).max(2e4),
160
+ license: external_exports.string().trim().min(1).max(100),
161
+ source: external_exports.object({
162
+ repository: external_exports.string().trim().min(1).max(2e3).nullable(),
163
+ commit: external_exports.string().trim().min(1).max(500).nullable(),
164
+ generatedBy: external_exports.string().trim().min(1).max(2e3)
165
+ }).strict(),
166
+ split: external_exports.object({
167
+ seed: Id,
168
+ correctionCasesPerFamily: external_exports.number().int().positive().max(100),
169
+ correctionSelection: external_exports.enum(["stable_hash", "minimize_prompt_similarity"]),
170
+ semanticSimilarityThreshold: external_exports.number().gt(0).lte(1)
171
+ }).strict(),
172
+ passes: external_exports.array(ContinualBenchPortablePassSchema).min(1).max(1e3),
173
+ tasks: external_exports.array(ContinualBenchPortableTaskSchema).min(1).max(1e6),
174
+ panels: external_exports.array(ContinualBenchPortablePanelSchema).min(1).max(1e5),
175
+ grader: external_exports.object({
176
+ id: Id,
177
+ contentHash: Hash,
178
+ outcomeScale: external_exports.object({ minimum: external_exports.number().finite(), maximum: external_exports.number().finite() }).strict()
179
+ }).strict(),
180
+ evaluation: external_exports.object({
181
+ seeds: external_exports.array(external_exports.number().int()).min(1).max(100),
182
+ repetitions: external_exports.number().int().positive().max(100),
183
+ confidenceLevel: external_exports.number().gt(0).lt(1),
184
+ pairedBootstrapSamples: external_exports.number().int().min(1e3).max(1e6)
185
+ }).strict(),
186
+ execution: ContinualBenchOpenPondExecutionSchema.optional(),
187
+ contentHash: Hash
188
+ }).strict().superRefine((manifest, context) => {
189
+ const taskIds = manifest.tasks.map((task) => task.id);
190
+ if (new Set(taskIds).size !== taskIds.length) {
191
+ context.addIssue({ code: "custom", path: ["tasks"], message: "Manifest task ids must be unique." });
192
+ }
193
+ const knownTasks = new Set(taskIds);
194
+ for (const [index, panel] of manifest.panels.entries()) {
195
+ if (panel.taskIds.some((id) => !knownTasks.has(id))) {
196
+ context.addIssue({ code: "custom", path: ["panels", index, "taskIds"], message: "Every panel task must exist in the manifest inventory." });
197
+ }
198
+ }
199
+ const passLabels = manifest.passes.map((pass) => pass.label);
200
+ if (new Set(passLabels).size !== passLabels.length) {
201
+ context.addIssue({ code: "custom", path: ["passes"], message: "Pass labels must be unique." });
202
+ }
203
+ const families = new Set(manifest.tasks.map((task) => task.familyId));
204
+ const assigned = manifest.passes.flatMap((pass) => pass.familyIds);
205
+ if (new Set(assigned).size !== assigned.length) {
206
+ context.addIssue({ code: "custom", path: ["passes"], message: "An issue family may belong to only one pass." });
207
+ }
208
+ if (assigned.some((familyId) => !families.has(familyId))) {
209
+ context.addIssue({ code: "custom", path: ["passes"], message: "Every assigned family must exist in the task inventory." });
210
+ }
211
+ });
212
+ function sealPortableManifest(input) {
213
+ return ContinualBenchPortableManifestSchema.parse({ ...input, contentHash: contentHash(input) });
214
+ }
215
+ function verifyPortableManifest(manifest) {
216
+ const parsed = ContinualBenchPortableManifestSchema.parse(manifest);
217
+ const { contentHash: declared, ...unsealed } = parsed;
218
+ return declared === contentHash(unsealed);
219
+ }
220
+
221
+ // ../../packages/continual-support/dist/metrics.js
222
+ var Id2 = external_exports.string().trim().min(1).max(240);
223
+ var Hash2 = external_exports.string().regex(/^[a-f0-9]{64}$/);
224
+ var NullableMetric = external_exports.number().finite().nullable();
225
+ var ContinualBenchAttemptMetricSchema = external_exports.object({
226
+ attemptId: Id2,
227
+ seed: external_exports.number().int(),
228
+ repetition: external_exports.number().int().nonnegative(),
229
+ score: NullableMetric,
230
+ passed: external_exports.boolean().nullable(),
231
+ latencyMs: external_exports.number().nonnegative().nullable(),
232
+ costUsd: external_exports.number().nonnegative().nullable(),
233
+ transcript: external_exports.object({ path: external_exports.string().min(1), contentHash: Hash2 }).strict().nullable(),
234
+ trace: external_exports.object({ path: external_exports.string().min(1), contentHash: Hash2 }).strict().nullable(),
235
+ graderOutputHash: Hash2.nullable(),
236
+ status: external_exports.enum(["completed", "failed", "cancelled"])
237
+ }).strict();
238
+ var ContinualBenchTaskMetricSchema = external_exports.object({
239
+ targetId: Id2,
240
+ panelId: Id2,
241
+ panelRole: ContinualBenchPanelRoleSchema,
242
+ taskId: Id2,
243
+ familyId: Id2,
244
+ attempts: external_exports.array(ContinualBenchAttemptMetricSchema).min(1).max(1e4),
245
+ meanScore: NullableMetric,
246
+ passRate: NullableMetric,
247
+ confidenceInterval: external_exports.tuple([external_exports.number().finite(), external_exports.number().finite()]).nullable()
248
+ }).strict();
249
+ var ContinualBenchEfficiencyMetricSchema = external_exports.object({
250
+ targetId: Id2,
251
+ trainingGpuSeconds: external_exports.number().nonnegative().nullable(),
252
+ evaluationGpuSeconds: external_exports.number().nonnegative().nullable(),
253
+ providerSpendUsd: external_exports.number().nonnegative().nullable(),
254
+ totalSpendUsd: external_exports.number().nonnegative().nullable(),
255
+ durationSeconds: external_exports.number().nonnegative().nullable(),
256
+ optimizerGroups: external_exports.number().int().nonnegative().nullable(),
257
+ trajectories: external_exports.number().int().nonnegative().nullable()
258
+ }).strict();
259
+ var ContinualBenchOutcomeSchema = external_exports.enum([
260
+ "systems_complete",
261
+ "correction_absorbed",
262
+ "issue_generalized",
263
+ "continually_current",
264
+ "frontier_pareto_result",
265
+ "inconclusive",
266
+ "loss"
267
+ ]);
268
+
269
+ // ../../packages/continual-support/dist/releases.js
270
+ function createContinualBenchPanelAllocations(split) {
271
+ const panels = [];
272
+ const orderedFamilies = [...split.families].sort((left, right) => left.passLabel.localeCompare(right.passLabel));
273
+ for (const family of orderedFamilies) {
274
+ panels.push(sealPanel({ id: `${family.passLabel.toLowerCase()}-correction`, role: "correction", passLabel: family.passLabel, taskIds: family.correctionTaskIds, familyIds: [family.familyId], optimizerEligible: true }));
275
+ panels.push(sealPanel({ id: `${family.passLabel.toLowerCase()}-siblings`, role: "sibling_verification", passLabel: family.passLabel, taskIds: family.siblingTaskIds, familyIds: [family.familyId], optimizerEligible: false }));
276
+ }
277
+ for (let index = 0; index < orderedFamilies.length; index += 1) {
278
+ const through = orderedFamilies.slice(0, index + 1);
279
+ panels.push(sealPanel({
280
+ id: `known-${through[index].passLabel.toLowerCase()}`,
281
+ role: "cumulative_known",
282
+ passLabel: through[index].passLabel,
283
+ taskIds: through.flatMap((family) => [...family.correctionTaskIds, ...family.siblingTaskIds]),
284
+ familyIds: through.map((family) => family.familyId),
285
+ optimizerEligible: false
286
+ }));
287
+ }
288
+ panels.push(sealPanel({
289
+ id: "training-eligible",
290
+ role: "training_eligible",
291
+ passLabel: null,
292
+ taskIds: orderedFamilies.flatMap((family) => family.correctionTaskIds),
293
+ familyIds: orderedFamilies.map((family) => family.familyId),
294
+ optimizerEligible: true
295
+ }));
296
+ return panels;
297
+ }
298
+ function assertOptimizerIsolation(manifest) {
299
+ const hiddenRoles = /* @__PURE__ */ new Set(["sibling_verification", "development", "retained", "frozen_final"]);
300
+ const forbidden = new Set(manifest.panels.filter((panel) => hiddenRoles.has(panel.role)).flatMap((panel) => panel.taskIds));
301
+ const optimizer = manifest.panels.filter((panel) => panel.optimizerEligible).flatMap((panel) => panel.taskIds);
302
+ const overlaps = optimizer.filter((id) => forbidden.has(id));
303
+ if (overlaps.length)
304
+ throw new Error(`Hidden evaluation tasks are optimizer eligible: ${[...new Set(overlaps)].sort().join(", ")}`);
305
+ }
306
+ function sealPanel(input) {
307
+ const normalized = { ...input, taskIds: [...input.taskIds].sort(), familyIds: [...input.familyIds].sort() };
308
+ return { ...normalized, contentHash: contentHash(normalized) };
309
+ }
310
+
311
+ // ../../packages/continual-support/dist/validation.js
312
+ function validateContinualBenchManifest(value) {
313
+ const parsed = ContinualBenchPortableManifestSchema.safeParse(value);
314
+ if (!parsed.success) {
315
+ return {
316
+ valid: false,
317
+ manifestHash: null,
318
+ leakageHash: null,
319
+ issues: parsed.error.issues.map((issue) => ({
320
+ severity: "error",
321
+ code: "schema",
322
+ message: issue.message,
323
+ path: issue.path.join(".")
324
+ }))
325
+ };
326
+ }
327
+ const manifest = parsed.data;
328
+ const issues = [];
329
+ if (!verifyPortableManifest(manifest))
330
+ issues.push({ severity: "error", code: "content_hash", message: "Manifest contentHash does not match its canonical payload.", path: "contentHash" });
331
+ const taskById = new Map(manifest.tasks.map((task) => [task.id, task]));
332
+ const correctionSiblingPairs = [];
333
+ for (const pass of manifest.passes) {
334
+ const correction = manifest.panels.find((panel) => panel.role === "correction" && panel.passLabel === pass.label);
335
+ const sibling = manifest.panels.find((panel) => panel.role === "sibling_verification" && panel.passLabel === pass.label);
336
+ if (!correction || !sibling) {
337
+ issues.push({ severity: "error", code: "missing_holdout", message: `Pass ${pass.label} requires both correction and sibling-verification panels.`, path: "panels" });
338
+ continue;
339
+ }
340
+ correctionSiblingPairs.push([correction.id, sibling.id]);
341
+ const correctionFamilies = new Set(correction.taskIds.map((id) => taskById.get(id)?.familyId));
342
+ const siblingFamilies = new Set(sibling.taskIds.map((id) => taskById.get(id)?.familyId));
343
+ for (const familyId of pass.familyIds) {
344
+ if (!correctionFamilies.has(familyId) || !siblingFamilies.has(familyId)) {
345
+ issues.push({ severity: "error", code: "insufficient_family", message: `Pass ${pass.label} family ${familyId} lacks a correction or sibling case; the holdout was not weakened.`, path: "passes" });
346
+ }
347
+ }
348
+ }
349
+ const leakage = auditContinualBenchLeakage({
350
+ panels: manifest.panels.filter((panel) => panel.role !== "cumulative_known" && panel.role !== "training_eligible").map((panel) => ({
351
+ id: panel.id,
352
+ tasks: panel.taskIds.map((id) => {
353
+ const task = taskById.get(id);
354
+ return { id: task.id, familyId: task.familyId, contentHash: task.contentHash, prompt: task.prompt };
355
+ })
356
+ })),
357
+ allowSharedFamiliesBetween: correctionSiblingPairs,
358
+ semanticSimilarityThreshold: manifest.split.semanticSimilarityThreshold
359
+ });
360
+ for (const finding of leakage.findings) {
361
+ issues.push({
362
+ severity: "error",
363
+ code: `leakage_${finding.kind}`,
364
+ message: `${finding.leftTaskId} in ${finding.leftPanel} overlaps ${finding.rightTaskId} in ${finding.rightPanel}.`,
365
+ path: "panels"
366
+ });
367
+ }
368
+ return { valid: !issues.some((issue) => issue.severity === "error"), manifestHash: manifest.contentHash, issues, leakageHash: leakage.contentHash };
369
+ }
370
+ function requireValidContinualBenchManifest(value) {
371
+ const report = validateContinualBenchManifest(value);
372
+ if (!report.valid)
373
+ throw new Error(report.issues.map((issue) => `${issue.code}: ${issue.message}`).join("\n"));
374
+ return ContinualBenchPortableManifestSchema.parse(value);
375
+ }
376
+
377
+ // ../../packages/continual-support/dist/report.js
378
+ var Id3 = external_exports.string().trim().min(1).max(240);
379
+ var Hash3 = external_exports.string().regex(/^[a-f0-9]{64}$/);
380
+ var ContinualBenchReportPointSchema = external_exports.object({
381
+ id: Id3,
382
+ label: external_exports.string().trim().min(1).max(500),
383
+ kind: external_exports.enum(["candidate", "accepted_head", "base", "master", "external_reference"]),
384
+ ordinal: external_exports.number().int().nonnegative().nullable(),
385
+ meanScore: external_exports.number().finite().nullable(),
386
+ confidenceInterval: external_exports.tuple([external_exports.number().finite(), external_exports.number().finite()]).nullable(),
387
+ taskMetrics: external_exports.array(ContinualBenchTaskMetricSchema).max(1e6),
388
+ efficiency: ContinualBenchEfficiencyMetricSchema.nullable(),
389
+ evidenceUrl: external_exports.string().url().nullable()
390
+ }).strict();
391
+ var ContinualBenchPortableReportSchema = external_exports.object({
392
+ schemaVersion: external_exports.literal("openpond.continualBenchReport.v1"),
393
+ seriesId: Id3,
394
+ protocol: external_exports.object({ id: Id3, revision: external_exports.number().int().positive(), contentHash: Hash3 }).strict(),
395
+ generatedAt: external_exports.string().datetime({ offset: true }),
396
+ status: external_exports.enum(["partial", "terminal"]),
397
+ points: external_exports.array(ContinualBenchReportPointSchema).min(1).max(1e4),
398
+ outcomes: external_exports.array(ContinualBenchOutcomeSchema).max(7),
399
+ audit: external_exports.array(external_exports.object({ requirement: Id3, status: external_exports.enum(["passed", "failed", "unavailable"]), evidenceRefs: external_exports.array(Id3).max(1e5) }).strict()).max(1e4),
400
+ chart: external_exports.object({
401
+ x: external_exports.literal("ordinal"),
402
+ y: external_exports.literal("meanScore"),
403
+ series: external_exports.array(external_exports.object({ pointId: Id3, label: external_exports.string(), ordinal: external_exports.number().nullable(), value: external_exports.number().nullable(), lower: external_exports.number().nullable(), upper: external_exports.number().nullable(), kind: external_exports.string() }).strict())
404
+ }).strict(),
405
+ contentHash: Hash3
406
+ }).strict();
407
+ function createContinualBenchReport(input) {
408
+ const chart = {
409
+ x: "ordinal",
410
+ y: "meanScore",
411
+ series: input.points.map((point) => ({
412
+ pointId: point.id,
413
+ label: point.label,
414
+ ordinal: point.ordinal,
415
+ value: point.meanScore,
416
+ lower: point.confidenceInterval?.[0] ?? null,
417
+ upper: point.confidenceInterval?.[1] ?? null,
418
+ kind: point.kind
419
+ }))
420
+ };
421
+ const unsealed = { ...input, chart };
422
+ return ContinualBenchPortableReportSchema.parse({ ...unsealed, contentHash: contentHash(unsealed) });
423
+ }
424
+ function exportContinualBenchReport(report) {
425
+ const parsed = ContinualBenchPortableReportSchema.parse(report);
426
+ const { contentHash: declared, ...unsealed } = parsed;
427
+ if (declared !== contentHash(unsealed))
428
+ throw new Error("Continual Support report content hash does not match its payload.");
429
+ return canonicalJson(parsed);
430
+ }
431
+
432
+ // ../../packages/continual-support/dist/split.js
433
+ function createContinualBenchSplit(input) {
434
+ const correctionCount = input.correctionCasesPerFamily ?? 1;
435
+ if (!Number.isInteger(correctionCount) || correctionCount < 1)
436
+ throw new Error("correctionCasesPerFamily must be a positive integer.");
437
+ const byId = /* @__PURE__ */ new Map();
438
+ const byFamily = /* @__PURE__ */ new Map();
439
+ for (const task of input.tasks) {
440
+ if (byId.has(task.id))
441
+ throw new Error(`Duplicate task id: ${task.id}`);
442
+ byId.set(task.id, task);
443
+ const family = byFamily.get(task.familyId) ?? [];
444
+ family.push(task);
445
+ byFamily.set(task.familyId, family);
446
+ }
447
+ const passByFamily = /* @__PURE__ */ new Map();
448
+ for (const pass of input.passes) {
449
+ if (!pass.label.trim())
450
+ throw new Error("Pass labels cannot be empty.");
451
+ for (const familyId of pass.familyIds) {
452
+ if (passByFamily.has(familyId))
453
+ throw new Error(`Family ${familyId} is assigned to more than one pass.`);
454
+ passByFamily.set(familyId, pass.label);
455
+ }
456
+ }
457
+ const allocations = [];
458
+ const families = [];
459
+ const advisories = [];
460
+ for (const [familyId, tasks] of [...byFamily].sort(([left], [right]) => left.localeCompare(right))) {
461
+ const passLabel = passByFamily.get(familyId);
462
+ if (!passLabel) {
463
+ advisories.push({ code: "unassigned_family", familyId, taskCount: tasks.length });
464
+ continue;
465
+ }
466
+ let ordered = [...tasks].sort((left, right) => {
467
+ const leftKey = contentHash([input.seed, familyId, left.id, left.contentHash]);
468
+ const rightKey = contentHash([input.seed, familyId, right.id, right.contentHash]);
469
+ return leftKey.localeCompare(rightKey) || left.id.localeCompare(right.id);
470
+ });
471
+ if (ordered.length <= correctionCount) {
472
+ advisories.push({ code: "insufficient_siblings", familyId, taskCount: ordered.length });
473
+ continue;
474
+ }
475
+ if (input.correctionSelection === "minimize_prompt_similarity" && correctionCount === 1 && ordered.every((task) => task.prompt)) {
476
+ ordered = [...ordered].sort((left, right) => {
477
+ const leftMaximum = maximumSiblingSimilarity(left, ordered);
478
+ const rightMaximum = maximumSiblingSimilarity(right, ordered);
479
+ return leftMaximum - rightMaximum || left.id.localeCompare(right.id);
480
+ });
481
+ }
482
+ const correction = ordered.slice(0, correctionCount);
483
+ const siblings = ordered.slice(correctionCount);
484
+ allocations.push(...correction.map((task) => ({ ...task, passLabel, panelRole: "correction", optimizerEligible: true })), ...siblings.map((task) => ({ ...task, passLabel, panelRole: "sibling_verification", optimizerEligible: false })));
485
+ families.push({ familyId, passLabel, correctionTaskIds: correction.map((task) => task.id), siblingTaskIds: siblings.map((task) => task.id) });
486
+ }
487
+ for (const familyId of passByFamily.keys()) {
488
+ if (!byFamily.has(familyId))
489
+ throw new Error(`Assigned family ${familyId} has no source tasks.`);
490
+ }
491
+ const release = {
492
+ schemaVersion: "openpond.continualBenchSplit.v1",
493
+ seed: input.seed,
494
+ allocations: allocations.sort((left, right) => left.passLabel.localeCompare(right.passLabel) || left.familyId.localeCompare(right.familyId) || left.id.localeCompare(right.id)),
495
+ families: families.sort((left, right) => left.passLabel.localeCompare(right.passLabel) || left.familyId.localeCompare(right.familyId)),
496
+ advisories: advisories.sort((left, right) => left.familyId.localeCompare(right.familyId) || left.code.localeCompare(right.code))
497
+ };
498
+ return { ...release, contentHash: contentHash(release) };
499
+ }
500
+ function maximumSiblingSimilarity(task, family) {
501
+ return Math.max(...family.filter((candidate) => candidate.id !== task.id).map((candidate) => jaccard2(task.prompt, candidate.prompt)));
502
+ }
503
+ function jaccard2(left, right) {
504
+ const tokenize = (value) => new Set(value.toLowerCase().match(/[a-z0-9]+/g) ?? []);
505
+ const leftTokens = tokenize(left);
506
+ const rightTokens = tokenize(right);
507
+ const union = /* @__PURE__ */ new Set([...leftTokens, ...rightTokens]);
508
+ if (!union.size)
509
+ return 1;
510
+ let intersection = 0;
511
+ for (const token of leftTokens)
512
+ if (rightTokens.has(token))
513
+ intersection += 1;
514
+ return intersection / union.size;
515
+ }
516
+
517
+ // src/cli/continual.ts
518
+ async function runContinualCommand(options, rest, dependencies = {}) {
519
+ const subcommand = rest[0];
520
+ if (!subcommand || !["init", "validate", "run", "report"].includes(subcommand)) {
521
+ throw new Error("usage: openpond continual <init|validate|run|report> [manifest-or-series-id]");
522
+ }
523
+ const log = dependencies.log ?? console.log;
524
+ if (subcommand === "init") {
525
+ await initializeManifest(options, rest.slice(1), dependencies, log);
526
+ return;
527
+ }
528
+ if (subcommand === "report") {
529
+ await exportReport(options, rest.slice(1), dependencies, log);
530
+ return;
531
+ }
532
+ const manifestPath = rest[1];
533
+ if (!manifestPath || rest.length !== 2) throw new Error(`usage: openpond continual ${subcommand} <manifest-path>`);
534
+ const manifestValue = await loadStructuredFile(path.resolve(manifestPath), dependencies.readFile ?? readFile);
535
+ const validation = validateContinualBenchManifest(manifestValue);
536
+ if (subcommand === "validate") {
537
+ if (parseBooleanOption(options.json)) log(JSON.stringify(validation, null, 2));
538
+ else {
539
+ log(validation.valid ? `Valid Continual Support manifest ${validation.manifestHash}.` : "Continual Support manifest is invalid.");
540
+ log(`Leakage audit ${validation.leakageHash ?? "unavailable"}; ${validation.issues.length} finding(s).`);
541
+ for (const issue of validation.issues) log(`${issue.severity}: ${issue.code} at ${issue.path}: ${issue.message}`);
542
+ }
543
+ if (!validation.valid) throw withExitCode("Continual Support validation failed.", 2);
544
+ return;
545
+ }
546
+ const manifest = requireValidContinualBenchManifest(manifestValue);
547
+ assertOptimizerIsolation(manifest);
548
+ await submitManifest(manifest, options, dependencies, log);
549
+ }
550
+ async function initializeManifest(options, rest, dependencies, log) {
551
+ if (rest.length) throw new Error("continual init accepts --from and --output options, not positional arguments.");
552
+ const sourcePath = optionString(options, "from");
553
+ if (!sourcePath) throw new Error("continual init requires --from <tasks.json|tasks.jsonl>.");
554
+ const outputPath = path.resolve(optionString(options, "output") || "continual-support.yaml");
555
+ const rows = await readSourceRows(path.resolve(sourcePath), dependencies.readFile ?? readFile);
556
+ const nonInteractive = parseBooleanOption(options.nonInteractive) || !process.stdin.isTTY;
557
+ const prompt = dependencies.prompt ?? defaultPrompt;
558
+ const normalized = await completeLabels(rows, nonInteractive, prompt);
559
+ const splitRows = normalized.filter((row) => row.panelRole === null || row.panelRole === "correction" || row.panelRole === "sibling_verification");
560
+ const passes = [...new Map(splitRows.map((row) => [row.passLabel, row])).keys()].sort().map((label) => ({
561
+ label,
562
+ familyIds: [...new Set(splitRows.filter((row) => row.passLabel === label).map((row) => row.familyId))].sort()
563
+ }));
564
+ const tasks = normalized.map((row) => ({
565
+ id: row.id,
566
+ familyId: row.familyId,
567
+ contentHash: contentHash(row.payload),
568
+ ...row.prompt ? { prompt: row.prompt } : {},
569
+ payload: row.payload
570
+ }));
571
+ const split = createContinualBenchSplit({
572
+ tasks: splitRows.map((row) => ({ id: row.id, familyId: row.familyId, contentHash: contentHash(row.payload), prompt: row.prompt })),
573
+ passes,
574
+ seed: optionString(options, "seed") || "continual-support-v1",
575
+ correctionCasesPerFamily: parseIntegerOption(options.correctionCasesPerFamily, "correction-cases-per-family") ?? 1,
576
+ correctionSelection: optionString(options, "correctionSelection") === "stable_hash" ? "stable_hash" : "minimize_prompt_similarity"
577
+ });
578
+ if (split.advisories.length) {
579
+ throw new Error(`The proposed split is incomplete and was not weakened: ${split.advisories.map((item) => `${item.code}:${item.familyId}`).join(", ")}`);
580
+ }
581
+ const generatedPanels = createContinualBenchPanelAllocations(split).map((panel) => ({
582
+ id: panel.id,
583
+ role: panel.role,
584
+ passLabel: panel.passLabel,
585
+ taskIds: panel.taskIds,
586
+ disclosurePhase: panel.role === "sibling_verification" ? "evaluation" : "review",
587
+ optimizerEligible: panel.optimizerEligible
588
+ }));
589
+ const stableRoles = ["development", "retained", "frozen_final"];
590
+ for (const role of stableRoles) {
591
+ const taskIds = normalized.filter((row) => row.panelRole === role).map((row) => row.id).sort();
592
+ if (taskIds.length) generatedPanels.push({
593
+ id: role.replace("_", "-"),
594
+ role,
595
+ passLabel: null,
596
+ taskIds,
597
+ disclosurePhase: role === "frozen_final" ? "final" : "evaluation",
598
+ optimizerEligible: false
599
+ });
600
+ }
601
+ const id = optionString(options, "id") || slug(optionString(options, "name") || path.basename(sourcePath, path.extname(sourcePath)));
602
+ const graderId = optionString(options, "grader") || "user-supplied-grader-v1";
603
+ const unsealed = {
604
+ schemaVersion: "openpond.continualBenchManifest.v1",
605
+ id,
606
+ revision: 1,
607
+ name: optionString(options, "name") || id,
608
+ description: optionString(options, "description") || "A sealed continual-support workflow converted from an ordinary task set.",
609
+ license: optionString(options, "license") || "UNSPECIFIED",
610
+ source: { repository: optionString(options, "repository") || null, commit: optionString(options, "commit") || null, generatedBy: `openpond continual init --from ${sourcePath}` },
611
+ split: {
612
+ seed: split.seed,
613
+ correctionCasesPerFamily: parseIntegerOption(options.correctionCasesPerFamily, "correction-cases-per-family") ?? 1,
614
+ correctionSelection: optionString(options, "correctionSelection") === "stable_hash" ? "stable_hash" : "minimize_prompt_similarity",
615
+ semanticSimilarityThreshold: parseNumberOption(options.semanticSimilarityThreshold, "semantic-similarity-threshold") ?? 0.8
616
+ },
617
+ passes,
618
+ tasks,
619
+ panels: generatedPanels,
620
+ grader: { id: graderId, contentHash: contentHash({ id: graderId }), outcomeScale: { minimum: 0, maximum: 1 } },
621
+ evaluation: { seeds: [1701, 1709, 1721], repetitions: 3, confidenceLevel: 0.95, pairedBootstrapSamples: 1e4 }
622
+ };
623
+ const manifest = sealPortableManifest(unsealed);
624
+ const serialized = outputPath.endsWith(".json") ? `${JSON.stringify(manifest, null, 2)}
625
+ ` : yaml.dump(manifest, { noRefs: true, lineWidth: 120, sortKeys: false });
626
+ await (dependencies.writeFile ?? writeFile)(outputPath, serialized, "utf8");
627
+ log(`Created ${outputPath}.`);
628
+ log(`Manifest ${manifest.contentHash}; split ${split.contentHash}.`);
629
+ }
630
+ async function submitManifest(manifest, options, dependencies, log) {
631
+ if (!manifest.execution) throw new Error("This manifest validates locally but needs an execution.openpond series binding before `continual run`.");
632
+ const series = { ...manifest.execution.series };
633
+ const benchmarkProtocol = series.benchmarkProtocol;
634
+ const issueFamilyLedger = object(benchmarkProtocol?.issueFamilyLedger);
635
+ if (!benchmarkProtocol || issueFamilyLedger.contentHash !== manifest.contentHash) {
636
+ throw new Error("execution.series.benchmarkProtocol.issueFamilyLedger must bind the exact sealed portable manifest hash.");
637
+ }
638
+ const baseUrl = resolveApiBaseUrlOption(options) ?? manifest.execution.apiBaseUrl ?? process.env.OPENPOND_LOCAL_API_URL?.replace(/\/$/, "") ?? DEFAULT_LOCAL_TRAINING_API_URL;
639
+ const request = dependencies.request ?? await createLocalAuthenticatedRequest(baseUrl);
640
+ const saved = object(await requestJson(request, `${baseUrl}/v1/training/comparison-series`, "POST", { series }));
641
+ const seriesId = string(saved.id) || string(series.id);
642
+ const revision = number(saved.revision);
643
+ if (!seriesId || !revision) throw new Error("OpenPond did not return a Comparison Series identity and revision.");
644
+ await requestJson(request, `${baseUrl}/v1/training/comparison-series/${encodeURIComponent(seriesId)}/seal`, "POST", { expectedRevision: revision });
645
+ const canonicalUrl = `/models/comparisons/${encodeURIComponent(seriesId)}`;
646
+ const result = { comparisonSeriesId: seriesId, canonicalUrl, protocolHash: manifest.contentHash };
647
+ log(parseBooleanOption(options.json) ? JSON.stringify(result, null, 2) : `Created and sealed Comparison Series ${seriesId}.
648
+ ${canonicalUrl}
649
+ No release was queued or started.`);
650
+ }
651
+ async function exportReport(options, rest, dependencies, log) {
652
+ const seriesId = rest[0];
653
+ if (!seriesId || rest.length !== 1) throw new Error("usage: openpond continual report <comparison-series-id> [--output <path>]");
654
+ const baseUrl = resolveApiBaseUrlOption(options) ?? process.env.OPENPOND_LOCAL_API_URL?.replace(/\/$/, "") ?? DEFAULT_LOCAL_TRAINING_API_URL;
655
+ const request = dependencies.request ?? await createLocalAuthenticatedRequest(baseUrl);
656
+ const state = object(await requestJson(request, `${baseUrl}/v1/training`, "GET"));
657
+ const series = array(state.comparisonSeries).map(object).find((item) => item.id === seriesId);
658
+ if (!series) throw new Error(`Comparison Series ${seriesId} was not found.`);
659
+ const protocol = object(series.benchmarkProtocol);
660
+ const entries = array(state.comparisonSeriesEntries).map(object).filter((item) => item.seriesId === seriesId);
661
+ const snapshots = array(state.modelCurrencySnapshots).map(object).filter((item) => item.seriesId === seriesId);
662
+ const snapshotByEntry = new Map(snapshots.map((item) => [string(item.entryId), item]));
663
+ const points = entries.filter((entry) => string(entry.modelVersionId)).map((entry) => {
664
+ const snapshot = snapshotByEntry.get(string(entry.id));
665
+ const panels = array(snapshot?.panels).map(object);
666
+ const available = panels.map((panel) => numberOrNull(panel.strictSuccess)).filter((value) => value !== null);
667
+ const strict = available.length ? available.reduce((sum, value) => sum + value, 0) / available.length : null;
668
+ const efficiency = objectOrNull(snapshot?.efficiency);
669
+ return {
670
+ id: string(entry.id),
671
+ label: string(entry.label),
672
+ kind: "candidate",
673
+ ordinal: numberOrNull(entry.ordinal),
674
+ meanScore: strict,
675
+ confidenceInterval: null,
676
+ taskMetrics: [],
677
+ efficiency: efficiency ? {
678
+ targetId: string(entry.modelVersionId),
679
+ trainingGpuSeconds: numberOrNull(efficiency.gpuSeconds),
680
+ evaluationGpuSeconds: null,
681
+ providerSpendUsd: null,
682
+ totalSpendUsd: numberOrNull(efficiency.costUsd),
683
+ durationSeconds: numberOrNull(efficiency.latencyMs) === null ? null : numberOrNull(efficiency.latencyMs) / 1e3,
684
+ optimizerGroups: null,
685
+ trajectories: null
686
+ } : null,
687
+ evidenceUrl: `${baseUrl}/models/comparisons/${encodeURIComponent(seriesId)}`
688
+ };
689
+ });
690
+ if (!points.length) throw new Error(`Comparison Series ${seriesId} has no receipt-derived candidate points to report.`);
691
+ const terminal = entries.every((entry) => ["candidate", "accepted", "rejected", "no_signal", "failed", "cancelled"].includes(string(entry.status) || ""));
692
+ const report = createContinualBenchReport({
693
+ schemaVersion: "openpond.continualBenchReport.v1",
694
+ seriesId,
695
+ protocol: { id: string(protocol.id), revision: number(protocol.revision), contentHash: string(protocol.contentHash) },
696
+ generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
697
+ status: terminal ? "terminal" : "partial",
698
+ points,
699
+ outcomes: [],
700
+ audit: [{ requirement: "receipt-derived-points", status: "passed", evidenceRefs: points.map((point) => point.id) }]
701
+ });
702
+ const serialized = exportContinualBenchReport(report);
703
+ const output = optionString(options, "output");
704
+ if (output) {
705
+ await (dependencies.writeFile ?? writeFile)(path.resolve(output), serialized, "utf8");
706
+ log(`Wrote ${path.resolve(output)} (${report.contentHash}).`);
707
+ } else log(serialized.trimEnd());
708
+ }
709
+ async function loadStructuredFile(filePath, reader) {
710
+ const source = await reader(filePath, "utf8");
711
+ return filePath.endsWith(".json") ? JSON.parse(source) : yaml.load(source);
712
+ }
713
+ async function readSourceRows(filePath, reader) {
714
+ const source = await reader(filePath, "utf8");
715
+ const values = filePath.endsWith(".jsonl") ? source.split(/\r?\n/).filter((line) => line.trim()).map((line, index) => {
716
+ try {
717
+ return JSON.parse(line);
718
+ } catch {
719
+ throw new Error(`Invalid JSONL at line ${index + 1}.`);
720
+ }
721
+ }) : JSON.parse(source);
722
+ if (!Array.isArray(values) || !values.length) throw new Error("The source must contain a non-empty JSON array or JSONL sequence.");
723
+ return values.map((value, index) => normalizeSourceRow(value, index));
724
+ }
725
+ function normalizeSourceRow(value, index) {
726
+ const row = object(value);
727
+ const id = string(row.id) || string(row.taskId) || string(row.task_id);
728
+ if (!id) throw new Error(`Source row ${index + 1} is missing id/taskId.`);
729
+ const familyId = string(row.familyId) || string(row.family_id) || string(row.clusterKey);
730
+ const passLabel = string(row.passLabel) || string(row.pass_label);
731
+ const rawRole = string(row.panelRole) || string(row.panel_role);
732
+ const roles = /* @__PURE__ */ new Set(["correction", "sibling_verification", "cumulative_known", "development", "retained", "frozen_final", "training_eligible"]);
733
+ if (rawRole && !roles.has(rawRole)) throw new Error(`Source row ${id} has unsupported panel role ${rawRole}.`);
734
+ return { id, familyId, passLabel, panelRole: rawRole, prompt: string(row.prompt) || string(objectOrNull(row.input)?.prompt) || void 0, payload: row };
735
+ }
736
+ async function completeLabels(rows, nonInteractive, prompt) {
737
+ const output = [];
738
+ const familyPass = /* @__PURE__ */ new Map();
739
+ for (const row of rows) {
740
+ let familyId = row.familyId;
741
+ if (!familyId) {
742
+ if (nonInteractive) throw new Error(`Task ${row.id} lacks familyId; non-interactive init never fabricates issue families.`);
743
+ familyId = (await prompt(`Issue family for ${row.id}: `)).trim();
744
+ if (!familyId) throw new Error(`Task ${row.id} requires an issue family.`);
745
+ }
746
+ let passLabel = row.passLabel;
747
+ if (!row.panelRole || row.panelRole === "correction" || row.panelRole === "sibling_verification") {
748
+ passLabel = passLabel || familyPass.get(familyId) || null;
749
+ if (!passLabel) {
750
+ if (nonInteractive) throw new Error(`Task family ${familyId} lacks passLabel; provide labels for CI.`);
751
+ passLabel = (await prompt(`Pass label for family ${familyId}: `)).trim();
752
+ }
753
+ if (!passLabel) throw new Error(`Family ${familyId} requires a pass label.`);
754
+ const existing = familyPass.get(familyId);
755
+ if (existing && existing !== passLabel) throw new Error(`Family ${familyId} appears in both ${existing} and ${passLabel}.`);
756
+ familyPass.set(familyId, passLabel);
757
+ }
758
+ output.push({ ...row, familyId, passLabel });
759
+ }
760
+ return output;
761
+ }
762
+ async function defaultPrompt(question) {
763
+ const input = createInterface({ input: process.stdin, output: process.stdout });
764
+ try {
765
+ return await input.question(question);
766
+ } finally {
767
+ input.close();
768
+ }
769
+ }
770
+ async function requestJson(request, url, method, body) {
771
+ const response = await request(url, { method, headers: body === void 0 ? { Accept: "application/json" } : { Accept: "application/json", "Content-Type": "application/json" }, body: body === void 0 ? void 0 : JSON.stringify(body) });
772
+ const text = await response.text();
773
+ const payload = text ? JSON.parse(text) : null;
774
+ if (!response.ok) throw new Error(`OpenPond request failed (${response.status}): ${string(objectOrNull(payload)?.error) || response.statusText}`);
775
+ return payload;
776
+ }
777
+ function object(value) {
778
+ return value && typeof value === "object" && !Array.isArray(value) ? value : {};
779
+ }
780
+ function objectOrNull(value) {
781
+ return value && typeof value === "object" && !Array.isArray(value) ? value : null;
782
+ }
783
+ function array(value) {
784
+ return Array.isArray(value) ? value : [];
785
+ }
786
+ function string(value) {
787
+ return typeof value === "string" && value.trim() ? value.trim() : null;
788
+ }
789
+ function number(value) {
790
+ return typeof value === "number" && Number.isFinite(value) ? value : null;
791
+ }
792
+ function numberOrNull(value) {
793
+ return number(value);
794
+ }
795
+ function slug(value) {
796
+ return value.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "") || "continual-support";
797
+ }
798
+ function withExitCode(message, exitCode) {
799
+ return Object.assign(new Error(message), { exitCode });
800
+ }
801
+ export {
802
+ runContinualCommand
803
+ };