openpond 0.0.37 → 0.0.39

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 (219) hide show
  1. package/README.md +3 -7
  2. package/dist/api/core.d.ts +6 -0
  3. package/dist/api/types.d.ts +0 -50
  4. package/dist/api/vercel-protection.d.ts +1 -0
  5. package/dist/api.d.ts +2 -8
  6. package/dist/chunks/{app-layer-LF2HK2B2.js → app-layer-LTBWNA2F.js} +32 -10
  7. package/dist/chunks/app-server-runtime-VYYJ2AWX.js +18 -0
  8. package/dist/chunks/{apps-ZMCMQZKX.js → apps-CZAJBGE3.js} +6 -124
  9. package/dist/chunks/{chunk-MHBQWGCL.js → chunk-2SF6HLT7.js} +5463 -5535
  10. package/dist/chunks/{chunk-VFL2JVBZ.js → chunk-3CDPPVLE.js} +111 -84
  11. package/dist/chunks/{chunk-N6E6YSTP.js → chunk-3HW6OSHP.js} +1 -3
  12. package/dist/chunks/{chunk-43YI36NA.js → chunk-3KLQ52B2.js} +228 -5
  13. package/dist/chunks/chunk-4HIWFIMN.js +37172 -0
  14. package/dist/chunks/{chunk-WTA33KQQ.js → chunk-4N6E3OVF.js} +4 -4
  15. package/dist/chunks/{chunk-35PPAOWD.js → chunk-6V7MJVRO.js} +56 -11
  16. package/dist/chunks/{chunk-ICLLW5QD.js → chunk-BQQZNGI6.js} +154 -194
  17. package/dist/chunks/chunk-DBHSOTYZ.js +1552 -0
  18. package/dist/chunks/{chunk-ZZ4ECDTP.js → chunk-FCVVOMIP.js} +145 -5
  19. package/dist/chunks/{chunk-A3CJUBA7.js → chunk-JIEUB6OS.js} +1 -1
  20. package/dist/chunks/{chunk-WL76II47.js → chunk-JJPAMKXZ.js} +1 -1
  21. package/dist/chunks/{chunk-2WMGA5FE.js → chunk-JRROTGQT.js} +1 -110
  22. package/dist/chunks/chunk-KHNHUA2H.js +1737 -0
  23. package/dist/chunks/{chunk-LNKYEHIJ.js → chunk-L6XH4ZGZ.js} +1 -1
  24. package/dist/chunks/chunk-M2NXTLH2.js +4054 -0
  25. package/dist/chunks/{chunk-IATK3CIP.js → chunk-MIZHCABO.js} +2 -195
  26. package/dist/chunks/chunk-SMNFI2FU.js +113 -0
  27. package/dist/chunks/chunk-VCVQLECH.js +675 -0
  28. package/dist/chunks/{chunk-KT2BB4AR.js → chunk-ZJBJQCQZ.js} +179 -52
  29. package/dist/chunks/{cli-5NFIDCRL.js → cli-JS76LCW2.js} +9 -5
  30. package/dist/chunks/{core-commands-7223BEQL.js → core-commands-4MRJQZJV.js} +7 -5
  31. package/dist/chunks/{harness-OMJXIGEW.js → desktop-test-RNMWLOVU.js} +15 -14
  32. package/dist/chunks/{chunk-ZPL4GZML.js → extension-GDRW22N3.js} +5866 -3601
  33. package/dist/chunks/{help-YPPROIS7.js → help-LWNREJ7U.js} +1 -1
  34. package/dist/chunks/{opchat-K7IYFPX6.js → opchat-2K2JIGK3.js} +9 -10
  35. package/dist/chunks/{organizations-W3FMAWQ4.js → organizations-Z5HVD2E7.js} +11 -9
  36. package/dist/chunks/{profile-N4B3F7M7.js → profile-QNECVVGN.js} +12 -38
  37. package/dist/chunks/{project-agent-NA6SGU25.js → project-agent-W3V75WBR.js} +9 -411
  38. package/dist/chunks/{sandbox-command-AKCFJKKN.js → sandbox-command-X3FO74NX.js} +7 -5
  39. package/dist/chunks/{sandbox-template-5NKTAXCL.js → sandbox-template-5B4T4BGU.js} +8 -6
  40. package/dist/chunks/{src-XAVSQTVR.js → src-ESAILPUH.js} +32 -30
  41. package/dist/chunks/src-IC5RX4L6.js +63517 -0
  42. package/dist/chunks/{teams-bot-557NZC73.js → teams-bot-NTQ6VFFL.js} +6 -4
  43. package/dist/chunks/training-BR5A7SPU.js +320 -0
  44. package/dist/chunks/{workspaces-S2H75XQB.js → workspaces-XC3QBD2Y.js} +2 -2
  45. package/dist/cli.js +24 -12
  46. package/dist/client-types.d.ts +1 -9
  47. package/dist/client.d.ts +3 -3
  48. package/dist/config.d.ts +9 -3
  49. package/dist/index.js +1300 -1091
  50. package/dist/profile/local-profile-types.d.ts +16 -0
  51. package/dist/profile/local-profile.d.ts +50 -4
  52. package/dist/sandbox/client-handles.d.ts +33 -46
  53. package/dist/sandbox/client.d.ts +4 -26
  54. package/dist/sandbox/sandbox-instance-client.d.ts +5 -5
  55. package/dist/sandbox/types/client.d.ts +1 -2
  56. package/dist/sandbox/types/core.d.ts +0 -1
  57. package/dist/sandbox/types/org-project-agent.d.ts +3 -89
  58. package/dist/sandbox/types/record.d.ts +1 -2
  59. package/dist/sandbox/types/runtime-profiles.d.ts +2 -2
  60. package/dist/sandbox-template/manifest.d.ts +1 -1
  61. package/dist/skills/openpond-agent-authoring/SKILL.md +40 -0
  62. package/dist/skills/openpond-agent-authoring/references/action-and-chat-design.md +13 -0
  63. package/dist/skills/openpond-agent-authoring/references/integrations-and-setup.md +13 -0
  64. package/dist/skills/openpond-agent-authoring/references/profile-layout.md +29 -0
  65. package/dist/skills/openpond-agent-authoring/references/validation-and-repair.md +14 -0
  66. package/dist/skills/openpond-desktop-harness/SKILL.md +1 -1
  67. package/dist/skills/openpond-skill-authoring/SKILL.md +44 -0
  68. package/dist/skills/openpond-skill-authoring/references/copying-and-adaptation.md +16 -0
  69. package/dist/skills/openpond-skill-authoring/references/skill-package-layout.md +38 -0
  70. package/dist/skills/openpond-skill-authoring/references/validation-and-repair.md +24 -0
  71. package/dist/skills/openpond-skill-authoring/scripts/validate-skill.mjs +102 -0
  72. package/dist/skills/openpond-taskset-authoring/SKILL.md +64 -22
  73. package/dist/skills/openpond-taskset-authoring/artifact.json +39 -0
  74. package/dist/skills/openpond-taskset-authoring/references/graders-and-rewards.md +3 -0
  75. package/dist/skills/openpond-taskset-authoring/references/method-selection.md +1 -1
  76. package/dist/skills/openpond-taskset-authoring/references/privacy-and-provenance.md +2 -0
  77. package/dist/skills/openpond-taskset-authoring/references/task-design.md +32 -0
  78. package/dist/web/assets/{AppDialog-y6krB0MJ.js → AppDialog-Bua3f-6v.js} +1 -1
  79. package/dist/web/assets/{AppsView-4F6oLktr.js → AppsView-DrJkHeSO.js} +1 -1
  80. package/dist/web/assets/BrowserSidebar-Bf-4Vozm.js +1 -0
  81. package/dist/web/assets/CommandMenu-DDZlGQiB.js +1 -0
  82. package/dist/web/assets/CommunityView-BtcCrba7.js +1 -0
  83. package/dist/web/assets/ComposerCreateImproveStrip-DOe5Otg6.js +1 -0
  84. package/dist/web/assets/GetStartedView-CG4z0Dtw.js +1 -0
  85. package/dist/web/assets/GetStartedView-yVmnGZPw.css +1 -0
  86. package/dist/web/assets/LabModelVersionDetailPage-BEkmSKuv.js +1 -0
  87. package/dist/web/assets/LabSkillSidebar-BIotN_RB.js +1 -0
  88. package/dist/web/assets/LabsRoute-CfOe0Zt5.js +3 -0
  89. package/dist/web/assets/LabsRoute-CoSPO4HR.css +1 -0
  90. package/dist/web/assets/MainChatThread-C0-l1mHt.js +2 -0
  91. package/dist/web/assets/MainPane-Bky_Rqcx.css +1 -0
  92. package/dist/web/assets/MainPane-aOVlVyRK.js +6 -0
  93. package/dist/web/assets/MarkdownText-D7DT1k1k.js +9 -0
  94. package/dist/web/assets/Messages-CBIXruA9.js +9 -0
  95. package/dist/web/assets/NativeSkillSidebar-C4t69Y7B.js +1 -0
  96. package/dist/web/assets/NewProjectDialog-Bat65tYD.js +1 -0
  97. package/dist/web/assets/OutputsPage-C58n39Db.js +1 -0
  98. package/dist/web/assets/RightChatPanelStack-Bp7nZxQ0.js +1 -0
  99. package/dist/web/assets/ScheduledWorkPage-BXP0j_c_.js +1 -0
  100. package/dist/web/assets/SettingsView-CtWK_aQ0.css +1 -0
  101. package/dist/web/assets/SettingsView-DOOfhO9a.js +6 -0
  102. package/dist/web/assets/TeamChatView-Cgxm-pKA.css +1 -0
  103. package/dist/web/assets/TeamChatView-De2wdqyY.js +3 -0
  104. package/dist/web/assets/{TerminalOverlay-B56XmI-k.js → TerminalOverlay-BsuCH3NX.js} +1 -1
  105. package/dist/web/assets/TrainingCreationPanel-D2OFWyQ-.js +1 -0
  106. package/dist/web/assets/TrainingDraftPanel-DBpulXTz.js +1 -0
  107. package/dist/web/assets/{UsageSettingsSection-r3CqRm6Q.js → UsageSettingsSection-DzMLUXAO.js} +37 -37
  108. package/dist/web/assets/WorkspaceDiffPanel-B7yIhjNF.js +14 -0
  109. package/dist/web/assets/WorkspaceEnvironmentMenu-B6jXM9xG.js +32 -0
  110. package/dist/web/assets/WorkspaceGitDialogs-CQ0fl9Qk.js +1 -0
  111. package/dist/web/assets/{WorkspaceMonacoEditor-CHd22UcG.js → WorkspaceMonacoEditor-C2ctzITz.js} +3 -3
  112. package/dist/web/assets/arrow-up-right-ecwcx3xt.js +1 -0
  113. package/dist/web/assets/chevron-up-DP8PPfWd.js +1 -0
  114. package/dist/web/assets/circle-alert-envg1D6O.js +1 -0
  115. package/dist/web/assets/cloud-upload-5MGPLnaA.js +1 -0
  116. package/dist/web/assets/{cssMode-KFDYjM8T.js → cssMode-CFifcEfw.js} +1 -1
  117. package/dist/web/assets/folder-open-Dq3ZjeEP.js +1 -0
  118. package/dist/web/assets/folder-plus-EiZ5wbv_.js +1 -0
  119. package/dist/web/assets/git-branch-w29jmQ-X.js +1 -0
  120. package/dist/web/assets/{git-commit-horizontal-C8UFKlXy.js → git-commit-horizontal-CGZM0PZo.js} +1 -1
  121. package/dist/web/assets/{htmlMode-NbLN3n6Q.js → htmlMode-Ct1P-_lf.js} +1 -1
  122. package/dist/web/assets/index-ByIQyiUl.js +178 -0
  123. package/dist/web/assets/index-D4uCeiep.js +1 -0
  124. package/dist/web/assets/index-D9jTe16Q.css +1 -0
  125. package/dist/web/assets/info-Cd2HkIeb.js +1 -0
  126. package/dist/web/assets/{jsonMode-Bl3r4LM_.js → jsonMode-BAUNCNAX.js} +1 -1
  127. package/dist/web/assets/{lspLanguageFeatures-DH22w5XD.js → lspLanguageFeatures-fucFYI1A.js} +1 -1
  128. package/dist/web/assets/monaco.contribution-Ce4v5kei.js +2 -0
  129. package/dist/web/assets/monaco.contribution-DLLMi4cB.js +2 -0
  130. package/dist/web/assets/monaco.contribution-g9QiIm1d.js +2 -0
  131. package/dist/web/assets/monaco.contribution-nG-5Cyjz.js +2 -0
  132. package/dist/web/assets/monitor-DgHCnCKl.js +1 -0
  133. package/dist/web/assets/{play-2NDQ4-7K.js → play-Be0XDHBu.js} +1 -1
  134. package/dist/web/assets/{python-CQ0TmUW9.js → python-CEhEiPo7.js} +1 -1
  135. package/dist/web/assets/{refresh-cw-CyermMsy.js → refresh-cw-DH0KLbdD.js} +1 -1
  136. package/dist/web/assets/reply-D1TK2yV8.js +1 -0
  137. package/dist/web/assets/{save-Bij3cc3Q.js → save-C1MSeBnQ.js} +1 -1
  138. package/dist/web/assets/square-CemI-0g5.js +1 -0
  139. package/dist/web/assets/square-pen-CqfsvR_n.js +1 -0
  140. package/dist/web/assets/{toggleHighContrast-CxALivAH.js → toggleHighContrast-DrdQN3Rl.js} +1 -1
  141. package/dist/web/assets/training-BQVNUTZA.css +1 -0
  142. package/dist/web/assets/training-model-data-B7-1Bxil.js +1 -0
  143. package/dist/web/assets/{tsMode-vH4lMS7h.js → tsMode-CKB5oOUU.js} +1 -1
  144. package/dist/web/assets/{upload-DbJfEI3G.js → upload-t751LLqP.js} +1 -1
  145. package/dist/web/assets/useLocalAgentSchedules-CzC3wfIP.js +1 -0
  146. package/dist/web/assets/{wifi-off-BnVFBG28.js → wifi-off-CxTHH3JU.js} +1 -1
  147. package/dist/web/assets/{workers-CBihj7z6.js → workers-CqYddzCd.js} +1 -1
  148. package/dist/web/assets/{yaml-Bhkoq1sy.js → yaml-e5wBkc-C.js} +1 -1
  149. package/dist/web/index.html +2 -2
  150. package/docs/command-reference.md +76 -41
  151. package/package.json +3 -1
  152. package/dist/chunks/chunk-3VURZQHA.js +0 -864
  153. package/dist/chunks/chunk-BWA3COR4.js +0 -3535
  154. package/dist/chunks/chunk-HLCTINEP.js +0 -224
  155. package/dist/chunks/chunk-PGET7EZF.js +0 -3896
  156. package/dist/chunks/chunk-T4QXKU5Y.js +0 -1
  157. package/dist/chunks/chunk-XEJ7XXUQ.js +0 -1301
  158. package/dist/chunks/cli-AS3DZ7XB.js +0 -23
  159. package/dist/chunks/extend-6N5S5KA5.js +0 -89
  160. package/dist/chunks/extension-FJSVCG2Q.js +0 -121
  161. package/dist/chunks/fileFromPath-DHCRY3BD.js +0 -2151
  162. package/dist/chunks/src-SCS4KKP4.js +0 -105881
  163. package/dist/web/assets/BrowserSidebar-C0MHQaaD.js +0 -1
  164. package/dist/web/assets/CloudWorkView-DNoPIlMj.css +0 -1
  165. package/dist/web/assets/CloudWorkView-DwFIZoXy.js +0 -1
  166. package/dist/web/assets/CommandMenu-CYGFrMZi.js +0 -1
  167. package/dist/web/assets/CommunityView-C6n89YXz.js +0 -1
  168. package/dist/web/assets/ComposerCreateImproveStrip-C3RwXC3_.js +0 -1
  169. package/dist/web/assets/GetStartedView-DBLdduwr.css +0 -1
  170. package/dist/web/assets/GetStartedView-fwD0ZXo9.js +0 -1
  171. package/dist/web/assets/LabSkillSidebar-BSuc-NJr.js +0 -1
  172. package/dist/web/assets/LabsRoute-BrJkBNig.css +0 -1
  173. package/dist/web/assets/LabsRoute-D2y8dSsT.js +0 -3
  174. package/dist/web/assets/MainChatThread-Dj_Ry6WQ.js +0 -2
  175. package/dist/web/assets/MakeAgentTutorialLearningPanel-Bz2VDaRe.js +0 -2
  176. package/dist/web/assets/MarkdownText-B6Nu_0Fz.js +0 -7
  177. package/dist/web/assets/Messages-CH2wfv2a.js +0 -10
  178. package/dist/web/assets/NativeSkillSidebar-4iUfgwqO.js +0 -1
  179. package/dist/web/assets/NewProjectDialog-8M5-6-h-.js +0 -1
  180. package/dist/web/assets/PostTrainingLearningPanel-CdG5KHZs.js +0 -2
  181. package/dist/web/assets/PostTrainingStatusPill-COZ4qISQ.js +0 -1
  182. package/dist/web/assets/ProfileSettingsSection-Bo7dybgW.js +0 -1
  183. package/dist/web/assets/ProfileSettingsSection-Cg4tKO-C.css +0 -1
  184. package/dist/web/assets/RightChatPanelStack-Di8zoHJI.js +0 -1
  185. package/dist/web/assets/SettingsView-BcYyY66X.css +0 -1
  186. package/dist/web/assets/SettingsView-CAaKdDHt.js +0 -6
  187. package/dist/web/assets/TeamChatView-Bx44q3WV.css +0 -1
  188. package/dist/web/assets/TeamChatView-CzQYFBap.js +0 -3
  189. package/dist/web/assets/TrainingCreationPanel-C_ntWAAP.js +0 -1
  190. package/dist/web/assets/TrainingDraftPanel-3hJIxLNn.js +0 -1
  191. package/dist/web/assets/WorkspaceDiffPanel-By8PWUuE.js +0 -14
  192. package/dist/web/assets/WorkspaceEnvironmentMenu-7wmC-spz.js +0 -32
  193. package/dist/web/assets/WorkspaceGitDialogs-Hn--lsRh.js +0 -1
  194. package/dist/web/assets/activity-Dp5V58om.js +0 -1
  195. package/dist/web/assets/boxes-DE7WJaEv.js +0 -1
  196. package/dist/web/assets/chevron-up-BWx8gGab.js +0 -1
  197. package/dist/web/assets/circle-x-DnmOfZIg.js +0 -1
  198. package/dist/web/assets/copy-BjWvaXLC.js +0 -1
  199. package/dist/web/assets/create-pipeline-request-C4V6-lWN.js +0 -4
  200. package/dist/web/assets/credit-card-Bjg0Zaw5.js +0 -1
  201. package/dist/web/assets/file-BrC1KjAS.js +0 -1
  202. package/dist/web/assets/git-branch-DTeeARsp.js +0 -1
  203. package/dist/web/assets/index-BcZetaeD.css +0 -1
  204. package/dist/web/assets/index-DQalqxbw.js +0 -177
  205. package/dist/web/assets/index-DYxF_d9i.js +0 -1
  206. package/dist/web/assets/info-BXBpMeVU.js +0 -1
  207. package/dist/web/assets/make-agent-tutorial-CAnTPFCK.js +0 -2
  208. package/dist/web/assets/monaco.contribution-C0BsxYAz.js +0 -2
  209. package/dist/web/assets/monaco.contribution-CzpXjm9j.js +0 -2
  210. package/dist/web/assets/monaco.contribution-DK-g-i00.js +0 -2
  211. package/dist/web/assets/monaco.contribution-iAurj7TQ.js +0 -2
  212. package/dist/web/assets/monitor-Ba2FFblh.js +0 -1
  213. package/dist/web/assets/reply-BSExNLHM.js +0 -1
  214. package/dist/web/assets/rotate-cw-DJ-zYG9E.js +0 -1
  215. package/dist/web/assets/training-BN8CALIc.css +0 -1
  216. package/dist/web/assets/training-model-data-BXUCzS0p.js +0 -1
  217. package/dist/web/tokens/eth.svg +0 -1
  218. package/dist/web/tokens/usdc.svg +0 -1
  219. package/docs/agent-edit-check-status-json.md +0 -132
@@ -0,0 +1,14 @@
1
+ # Validation and Repair
2
+
3
+ Use the first-class Agent tools rather than raw SDK shell commands:
4
+
5
+ 1. `agent_inspect` to confirm discovery, actions, source, and diagnostics.
6
+ 2. `agent_build` to refresh generated artifacts.
7
+ 3. `agent_validate` to enforce SDK contracts.
8
+ 4. `agent_eval` to run deterministic declared evals.
9
+ 5. `agent_run` and `agent_traces` when behavioral proof or failure diagnosis requires them.
10
+ 6. `agent_check` as the mandatory final composite receipt.
11
+
12
+ `agent_check` runs inspect, build, validate, and eval in order and stops at the first failure. Repair the source, not the checker. Rerun until every step passes.
13
+
14
+ After a pass, inspect changed files and the refreshed Profile action catalog. Confirm that the requested Agent ID is enabled and that unrelated Agents and dirty files are unchanged.
@@ -109,5 +109,5 @@ openpond harness desktop run tests/desktop-scenarios/chat-two-turns.ts --package
109
109
  - Running state: delayed child execution, parent activity running row, sidebar running indicator, final completion.
110
110
  - Handoff: child `openpond_subagent_send_message`, parent wake metadata, one child start, no duplicate child run.
111
111
  - Blocker/approval: blocked runtime event and visible blocked UI, no accidental completion, no unexpected pending approval.
112
- - Goal-scoped subagents: active Goal strip, right-sidebar Goal details, subagent counts, child `parentGoalId`.
112
+ - Parent-scoped subagents: right-sidebar subagent details, child sessions, and parent-task handoffs.
113
113
  - Context compaction: manual compaction status divider, summary event metadata, usage record, and post-compaction follow-up turn.
@@ -0,0 +1,44 @@
1
+ ---
2
+ name: openpond-skill-authoring
3
+ description: Create, copy, adapt, review, or update OpenPond Profile skill packages. Use for /skill create or edit and for ordinary requests to make or improve a reusable SKILL.md workflow with optional references, scripts, assets, and metadata.
4
+ ---
5
+
6
+ # OpenPond Skill Authoring
7
+
8
+ Create durable Profile skills through a normal model turn. The skill package is the source of truth; do not create a Goal, invoke an authoring executor, or substitute a generic template for source that the user asked to copy or adapt.
9
+
10
+ ## Workflow
11
+
12
+ 1. Call `get_profile` before reading or writing Profile source. Use only its selected, editable Profile root.
13
+ 2. Determine whether the request is create, edit, copy, or adapt. Treat an explicit skill name or source path as target authority.
14
+ 3. Inspect nearby Profile skills for local conventions.
15
+ 4. When an existing source package is named, inventory and read its complete relevant package: `SKILL.md`, referenced files, scripts, assets, and metadata. Do not infer its behavior from the directory name.
16
+ 5. Ask one focused `ask_user` question only if a missing answer would materially change the reusable behavior or package boundary. Otherwise proceed.
17
+ 6. Create or edit `<profile source>/skills/<skill-name>` directly with ordinary scoped file tools.
18
+ 7. Run the packaged validator:
19
+
20
+ `node <this bundled skill package>/scripts/validate-skill.mjs <target skill package>`
21
+
22
+ 8. Repair every validation failure in scope and rerun until it passes.
23
+ 9. Report the target package, files created or changed, preserved source resources, validation receipt, and any genuine blocker.
24
+
25
+ ## Package Rules
26
+
27
+ - Every package has `SKILL.md` with YAML frontmatter containing only `name` and `description`.
28
+ - Use lowercase kebab-case for the package directory and frontmatter `name`; they must match.
29
+ - Put triggering conditions in `description`, not in a separate discovery section.
30
+ - Keep `SKILL.md` concise. Move detailed knowledge to focused files under `references/`.
31
+ - Put deterministic utilities under `scripts/` and output templates or reusable media under `assets/`.
32
+ - Use relative Markdown links for files the model must load. Resolve every link before completion.
33
+ - Preserve useful source structure and behavior during copy/adapt requests. Change names, paths, or Profile-specific instructions only where required.
34
+ - Do not add a script when clear instructions suffice, and do not add a tool dependency for work ordinary file or command capabilities can perform.
35
+
36
+ Read [package layout and discovery](references/skill-package-layout.md) when creating a package. Read [copying and adaptation](references/copying-and-adaptation.md) whenever the request names existing source. Read [validation and repair](references/validation-and-repair.md) before declaring completion.
37
+
38
+ ## Safety and Completion
39
+
40
+ - Preserve unrelated dirty files and never reset, clean, commit, push, or sync automatically.
41
+ - Never write outside the selected Profile unless the user explicitly supplied a read-only source package to copy from.
42
+ - Never create Goal state, `thread_goal` events, a plan/candidate lifecycle, or an Apply step.
43
+ - The validator inspects only. It must never generate or rewrite the target.
44
+ - Do not report success until the target was actually inspected after writing and validation passed.
@@ -0,0 +1,16 @@
1
+ # Copying and Adaptation
2
+
3
+ A request to copy or adapt an existing Skill is an evidence task before it is a writing task.
4
+
5
+ 1. Resolve the explicit source exactly; do not search for a similarly named substitute.
6
+ 2. Inventory the source package recursively without following symlinks outside it.
7
+ 3. Read `SKILL.md`, invocation metadata, every file linked from the main instructions, and every script or asset whose role affects behavior.
8
+ 4. Record the source package structure before writing the target.
9
+ 5. Decide which content is invariant and which content must change for the selected Profile.
10
+ 6. Copy or rewrite the complete relevant package. Preserve relative link topology.
11
+ 7. Search the target for stale source names, paths, environment assumptions, and broken references.
12
+ 8. Compare source and target inventories and explain deliberate omissions.
13
+
14
+ Do not reduce a multi-file source package to a generic `SKILL.md`. Do not silently omit references, scripts, assets, or metadata because they were not visible in the first file read.
15
+
16
+ When a source file is unsafe, secret-bearing, generated, or irrelevant, omit it deliberately and state why. Never copy credentials, caches, build output, or version-control internals.
@@ -0,0 +1,38 @@
1
+ # Skill Package Layout and Discovery
2
+
3
+ Use the smallest package that fully captures the reusable procedure.
4
+
5
+ ```text
6
+ skills/<skill-name>/
7
+ SKILL.md
8
+ references/
9
+ scripts/
10
+ assets/
11
+ ```
12
+
13
+ Only `SKILL.md` is required. Add other directories only when they carry real behavior.
14
+
15
+ ## Frontmatter
16
+
17
+ `SKILL.md` starts with:
18
+
19
+ ```yaml
20
+ ---
21
+ name: lowercase-kebab-case
22
+ description: What the skill does and the concrete requests that should load it.
23
+ ---
24
+ ```
25
+
26
+ Use only `name` and `description`. The description is the discovery contract: include actions, artifact types, and recognizable user intent without becoming a long workflow.
27
+
28
+ ## Main Body
29
+
30
+ Write imperative instructions for the model. Put the default workflow and completion bar in `SKILL.md`. Keep stable technical detail, variants, or large examples in references and link them from the exact decision point where they are needed.
31
+
32
+ ## Optional Resources
33
+
34
+ - `references/`: detailed instructions intended for model context.
35
+ - `scripts/`: deterministic utilities. Scripts should validate, transform, or inspect bounded inputs; they should not hide the whole reasoning workflow.
36
+ - `assets/`: templates or files intended to be copied into outputs rather than read as instructions.
37
+
38
+ All relative links must stay inside the package and resolve to files. Avoid duplicate guidance across the main file and references.
@@ -0,0 +1,24 @@
1
+ # Validation and Repair
2
+
3
+ Run `scripts/validate-skill.mjs` from the bundled `openpond-skill-authoring` package with the target package as its only positional argument.
4
+
5
+ The validator checks:
6
+
7
+ - target and `SKILL.md` existence;
8
+ - package-boundary and symlink safety;
9
+ - YAML frontmatter delimiters and allowed keys;
10
+ - matching lowercase kebab-case directory and `name`;
11
+ - a meaningful `description`;
12
+ - file-size bounds; and
13
+ - local Markdown references.
14
+
15
+ Treat a nonzero exit as unfinished work. Read every diagnostic, repair the package rather than weakening the validator, and rerun it.
16
+
17
+ Validation does not prove the workflow is useful. Also review:
18
+
19
+ - whether the discovery description matches realistic user requests;
20
+ - whether the main file contains a complete default workflow;
21
+ - whether references are loaded only where relevant;
22
+ - whether scripts are deterministic and bounded;
23
+ - whether copy/adapt work preserved the source behavior; and
24
+ - whether the final report names exact changed files and validation evidence.
@@ -0,0 +1,102 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { lstat, readFile, realpath } from "node:fs/promises";
4
+ import path from "node:path";
5
+
6
+ const targetArg = process.argv[2]?.trim();
7
+ if (!targetArg) {
8
+ console.error("Usage: validate-skill.mjs <skill-package>");
9
+ process.exitCode = 2;
10
+ } else {
11
+ const diagnostics = await validateSkill(targetArg);
12
+ if (diagnostics.length > 0) {
13
+ for (const diagnostic of diagnostics) console.error(`ERROR: ${diagnostic}`);
14
+ process.exitCode = 1;
15
+ } else {
16
+ console.log(`PASS: ${path.resolve(targetArg)}`);
17
+ }
18
+ }
19
+
20
+ async function validateSkill(target) {
21
+ const diagnostics = [];
22
+ const packagePath = path.resolve(target);
23
+ const packageStat = await lstat(packagePath).catch(() => null);
24
+ if (!packageStat?.isDirectory()) return [`Skill package directory does not exist: ${packagePath}`];
25
+ if (packageStat.isSymbolicLink()) return [`Skill package must not be a symlink: ${packagePath}`];
26
+
27
+ const canonicalPackage = await realpath(packagePath);
28
+ const skillPath = path.join(canonicalPackage, "SKILL.md");
29
+ const skillStat = await lstat(skillPath).catch(() => null);
30
+ if (!skillStat?.isFile()) return [`SKILL.md does not exist: ${skillPath}`];
31
+ if (skillStat.isSymbolicLink()) return [`SKILL.md must not be a symlink: ${skillPath}`];
32
+ if (skillStat.size > 100_000) diagnostics.push("SKILL.md exceeds 100,000 bytes.");
33
+
34
+ const body = await readFile(skillPath, "utf8");
35
+ const frontmatter = /^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/.exec(body);
36
+ if (!frontmatter) return [...diagnostics, "SKILL.md must start with delimited YAML frontmatter."];
37
+
38
+ const fields = new Map();
39
+ for (const rawLine of frontmatter[1].split(/\r?\n/)) {
40
+ const line = rawLine.trim();
41
+ if (!line || line.startsWith("#")) continue;
42
+ const match = /^([A-Za-z0-9_-]+):\s*(.*)$/.exec(line);
43
+ if (!match) {
44
+ diagnostics.push(`Unsupported frontmatter line: ${rawLine}`);
45
+ continue;
46
+ }
47
+ fields.set(match[1], unquote(match[2].trim()));
48
+ }
49
+
50
+ for (const key of fields.keys()) {
51
+ if (key !== "name" && key !== "description") diagnostics.push(`Unsupported frontmatter key: ${key}`);
52
+ }
53
+ const name = fields.get("name") ?? "";
54
+ const description = fields.get("description") ?? "";
55
+ const directoryName = path.basename(canonicalPackage);
56
+ if (!/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(name)) {
57
+ diagnostics.push("Frontmatter name must be lowercase kebab-case.");
58
+ }
59
+ if (name !== directoryName) {
60
+ diagnostics.push(`Frontmatter name "${name}" must match package directory "${directoryName}".`);
61
+ }
62
+ if (description.length < 24) diagnostics.push("Frontmatter description must be at least 24 characters.");
63
+ if (description.length > 1_024) diagnostics.push("Frontmatter description must not exceed 1,024 characters.");
64
+
65
+ const linkPattern = /!?\[[^\]]*]\(([^)]+)\)/g;
66
+ for (const match of body.matchAll(linkPattern)) {
67
+ const rawTarget = match[1].trim().split(/\s+["']/)[0] ?? "";
68
+ if (!rawTarget || /^(?:https?:|mailto:|#)/i.test(rawTarget)) continue;
69
+ const decoded = decodeURIComponent(rawTarget.split("#")[0]);
70
+ const resolved = path.resolve(canonicalPackage, decoded);
71
+ if (!isWithin(canonicalPackage, resolved)) {
72
+ diagnostics.push(`Reference escapes the skill package: ${rawTarget}`);
73
+ continue;
74
+ }
75
+ const referenceStat = await lstat(resolved).catch(() => null);
76
+ if (!referenceStat?.isFile()) {
77
+ diagnostics.push(`Referenced file does not exist: ${rawTarget}`);
78
+ continue;
79
+ }
80
+ const canonicalReference = await realpath(resolved);
81
+ if (!isWithin(canonicalPackage, canonicalReference)) {
82
+ diagnostics.push(`Referenced file resolves outside the skill package: ${rawTarget}`);
83
+ }
84
+ }
85
+ return [...new Set(diagnostics)];
86
+ }
87
+
88
+ function unquote(value) {
89
+ if (
90
+ value.length >= 2 &&
91
+ ((value.startsWith('"') && value.endsWith('"')) ||
92
+ (value.startsWith("'") && value.endsWith("'")))
93
+ ) {
94
+ return value.slice(1, -1);
95
+ }
96
+ return value;
97
+ }
98
+
99
+ function isWithin(root, candidate) {
100
+ const relative = path.relative(root, candidate);
101
+ return relative === "" || (!relative.startsWith("..") && !path.isAbsolute(relative));
102
+ }
@@ -1,38 +1,80 @@
1
1
  ---
2
2
  name: openpond-taskset-authoring
3
- description: Turn consented OpenPond conversations and traces into provider-neutral Tasksets, executable graders, baseline plans, readiness reports, and inspectable SFT handoffs.
4
- metadata:
5
- short-description: Author training Tasksets
3
+ description: Create, improve, inspect, test, or prepare an OpenPond Taskset from a capability, Profile Agent, consented conversations, imported datasets, examples, and traces. Use when the user asks for training or evaluation tasks, graders, GRPO/RFT environments, baseline evaluation, Taskset readiness, or help deciding what a model should practice.
6
4
  ---
7
5
 
8
6
  # OpenPond Taskset Authoring
9
7
 
10
- Use this skill when `/train`, the Training page, a selected conversation, or a Task Miner suggestion asks you to define a learnable capability.
8
+ Turn a normal chat request into a tested, reusable Taskset. The user should only
9
+ need a short sentence, for example:
11
10
 
12
- ## Required workflow
11
+ > Build a Taskset that teaches a support triage agent to make consistent routing decisions.
13
12
 
14
- 1. Inspect only the explicitly selected evidence. Cite source IDs; never copy unrelated conversation history.
15
- 2. Separate policy-visible input from privileged outcome and grader state.
16
- 3. Inventory existing demonstrations, corrections, preferences, labels, feedback, and verifiable rewards. Historical assistant messages are candidate outcomes, not automatically approved demonstrations. Do not fabricate expert approval.
17
- 4. Diagnose the stable behavior separately from changing knowledge, required runtime context, and tool use. Recommend `no_training`, prompting, or retrieval when weights are not the right intervention.
18
- 5. Draft one provider-neutral `TaskDesignProposal` with a bounded objective and a typed capability diagnosis. Only training-eligible proposals include task instances, split-cluster keys, graders, calibration fixtures, and assumptions. Keep the user-facing name and objective natural: describe the repeated job and desired outcome in one or two short sentences.
19
- 6. Ask a question only for a blocking ambiguity: objective, consent, success signal, privacy/licensing boundary, or mutually exclusive interpretations.
20
- 7. Prefer deterministic graders. A model judge must be declared, pinned, calibrated, versioned, and recorded; it is not deterministic.
21
- 8. Run validation, positive/negative/boundary/adversarial grader fixtures, baselines, leakage checks, and reward-hacking checks.
22
- 9. Materialize only after approval, then show the generated diff and readiness blockers.
23
- 10. Training requires a separate approval for destination, method, model, data export, retention, and budget.
13
+ Do not ask the user to provide internal names, IDs, schema fields, split-family
14
+ IDs, action names, approval booleans, or orchestration instructions. Infer
15
+ reversible defaults from the selected Profile, Agent, evidence, and current
16
+ conversation.
24
17
 
25
- Never put source IDs, hashes, cluster keys, split-placement rules, consent boilerplate, privileged expected values, encodings, or grader implementation details in the proposal name or objective. Keep those details in source references, policy boundaries, grader configuration, assumptions, warnings, and generated code.
18
+ When a missing choice would materially change the tasks or their grading, ask
19
+ one plain-language question at a time. Ask only about:
26
20
 
27
- Treat synthetic smoke fixtures as diagnostics, not representative business tasks. When the only evidence is a trivial fixed response or exact string, recommend `no_training`, explain that application logic or prompting is sufficient, and still use a short human description if a diagnostic Taskset is explicitly requested.
21
+ - the repeated behavior the model should learn;
22
+ - the starting evidence or state it may see;
23
+ - the tools or actions it may use;
24
+ - what observable result should count as success;
25
+ - privacy, licensing, or data boundaries;
26
+ - task variety or run budget when the default is unsuitable.
28
27
 
29
- Label every proposed example as `extracted`, `corrected`, `synthetic`, or `expert_authored`. Extracted examples must exactly match their cited source turn. Corrected and synthetic examples must remain visibly transformed and may not be represented as expert-approved merely because an authoring model produced them.
28
+ ## What a Taskset contains
30
29
 
31
- Use `Create with defaults` when evidence is sufficient. Record reversible assumptions and proceed to the single materialization approval. Use `Customize` for a conversational design pass.
30
+ A Taskset is a versioned, executable training and evaluation package:
31
+
32
+ - task instances and their source/data references;
33
+ - isolated training, validation, and frozen-evaluation splits;
34
+ - the Profile, Agent, Harness, tools, reset, and termination contract;
35
+ - graders, reward components, fixtures, and aggregate metrics;
36
+ - resource, network, private-verifier, and artifact boundaries;
37
+ - provenance plus an immutable, content-addressed release.
38
+
39
+ The dataset is the task collection or source data inside that package. It is
40
+ not the whole Taskset. A Model is also separate: submitting the first rollout or
41
+ training run should resolve a Model project, record base-policy version 0, and
42
+ attach the run to it. Taskset creation alone does not imply trained weights.
43
+
44
+ ## Authoring workflow
45
+
46
+ 1. Infer the capability and claim from the user's sentence.
47
+ 2. Inspect only the selected Profile, Agent, tools, and consented evidence.
48
+ 3. Separate stable behavior from changing knowledge. Recommend prompting,
49
+ retrieval, or `no_training` when weights are not the right intervention.
50
+ 4. Ask one focused question only when a material decision cannot be inferred.
51
+ 5. Draft a compact proposal in product language, keeping policy-visible input
52
+ separate from expected outcomes and private grader state.
53
+ 6. Author varied tasks with semantic families isolated by split. Label examples
54
+ `extracted`, `corrected`, `synthetic`, or `expert_authored`.
55
+ 7. Prefer deterministic graders. Pin, calibrate, and version any model judge.
56
+ 8. Use ordinary conversational confirmation before materializing the proposed
57
+ Taskset. Do not expose the underlying action payload.
58
+ 9. Validate schema and lifecycle, grader fixtures, leakage, reward hacking,
59
+ optional reference-solution solvability, and a bounded base-model baseline.
60
+ 10. Return a compact readiness summary and keep training as the next, separate
61
+ action.
62
+
63
+ Use the installed Dataset Builder actions for design, materialization, and
64
+ testing, following their schemas internally. Do not recite those schemas in the
65
+ chat.
66
+
67
+ Treat fixed synthetic smoke fixtures as diagnostics rather than evidence of a
68
+ general capability. Historical assistant messages are candidate outcomes, not
69
+ automatically approved demonstrations. Frozen evaluation tasks never become
70
+ prompt examples, repair context, demonstrations, or grader calibration data.
32
71
 
33
72
  Read only the reference needed for the current decision:
34
73
 
35
- - Task reconstruction and split isolation: `references/task-design.md`
36
- - Graders, reward eligibility, and calibration: `references/graders-and-rewards.md`
74
+ - Task contracts, task reconstruction, and split isolation:
75
+ `references/task-design.md`
76
+ - Graders, reward eligibility, and calibration:
77
+ `references/graders-and-rewards.md`
37
78
  - Method selection and readiness: `references/method-selection.md`
38
- - Privacy, consent, and provenance: `references/privacy-and-provenance.md`
79
+ - Privacy, consent, and provenance:
80
+ `references/privacy-and-provenance.md`
@@ -0,0 +1,39 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "artifactVersion": "openpond.taskset-authoring.2026-08-04.1",
4
+ "skillName": "openpond-taskset-authoring",
5
+ "source": {
6
+ "repository": "openpond/openpond",
7
+ "commit": "193e5e4d6c3a6b9b80af9becec0f0ebaaee875e9",
8
+ "path": "apps/cli/skills/openpond-taskset-authoring"
9
+ },
10
+ "files": [
11
+ {
12
+ "path": "SKILL.md",
13
+ "sha256": "9e1e8a071103b485f8ce7975081bbbc2f11e3510a1fb653b3754406dd7180cd6",
14
+ "contents": "---\nname: openpond-taskset-authoring\ndescription: Create, improve, inspect, test, or prepare an OpenPond Taskset from a capability, Profile Agent, consented conversations, imported datasets, examples, and traces. Use when the user asks for training or evaluation tasks, graders, GRPO/RFT environments, baseline evaluation, Taskset readiness, or help deciding what a model should practice.\n---\n\n# OpenPond Taskset Authoring\n\nTurn a normal chat request into a tested, reusable Taskset. The user should only\nneed a short sentence, for example:\n\n> Build a Taskset that teaches a support triage agent to make consistent routing decisions.\n\nDo not ask the user to provide internal names, IDs, schema fields, split-family\nIDs, action names, approval booleans, or orchestration instructions. Infer\nreversible defaults from the selected Profile, Agent, evidence, and current\nconversation.\n\nWhen a missing choice would materially change the tasks or their grading, ask\none plain-language question at a time. Ask only about:\n\n- the repeated behavior the model should learn;\n- the starting evidence or state it may see;\n- the tools or actions it may use;\n- what observable result should count as success;\n- privacy, licensing, or data boundaries;\n- task variety or run budget when the default is unsuitable.\n\n## What a Taskset contains\n\nA Taskset is a versioned, executable training and evaluation package:\n\n- task instances and their source/data references;\n- isolated training, validation, and frozen-evaluation splits;\n- the Profile, Agent, Harness, tools, reset, and termination contract;\n- graders, reward components, fixtures, and aggregate metrics;\n- resource, network, private-verifier, and artifact boundaries;\n- provenance plus an immutable, content-addressed release.\n\nThe dataset is the task collection or source data inside that package. It is\nnot the whole Taskset. A Model is also separate: submitting the first rollout or\ntraining run should resolve a Model project, record base-policy version 0, and\nattach the run to it. Taskset creation alone does not imply trained weights.\n\n## Authoring workflow\n\n1. Infer the capability and claim from the user's sentence.\n2. Inspect only the selected Profile, Agent, tools, and consented evidence.\n3. Separate stable behavior from changing knowledge. Recommend prompting,\n retrieval, or `no_training` when weights are not the right intervention.\n4. Ask one focused question only when a material decision cannot be inferred.\n5. Draft a compact proposal in product language, keeping policy-visible input\n separate from expected outcomes and private grader state.\n6. Author varied tasks with semantic families isolated by split. Label examples\n `extracted`, `corrected`, `synthetic`, or `expert_authored`.\n7. Prefer deterministic graders. Pin, calibrate, and version any model judge.\n8. Use ordinary conversational confirmation before materializing the proposed\n Taskset. Do not expose the underlying action payload.\n9. Validate schema and lifecycle, grader fixtures, leakage, reward hacking,\n optional reference-solution solvability, and a bounded base-model baseline.\n10. Return a compact readiness summary and keep training as the next, separate\n action.\n\nUse the installed Dataset Builder actions for design, materialization, and\ntesting, following their schemas internally. Do not recite those schemas in the\nchat.\n\nTreat fixed synthetic smoke fixtures as diagnostics rather than evidence of a\ngeneral capability. Historical assistant messages are candidate outcomes, not\nautomatically approved demonstrations. Frozen evaluation tasks never become\nprompt examples, repair context, demonstrations, or grader calibration data.\n\nRead only the reference needed for the current decision:\n\n- Task contracts, task reconstruction, and split isolation:\n `references/task-design.md`\n- Graders, reward eligibility, and calibration:\n `references/graders-and-rewards.md`\n- Method selection and readiness: `references/method-selection.md`\n- Privacy, consent, and provenance:\n `references/privacy-and-provenance.md`\n"
15
+ },
16
+ {
17
+ "path": "references/task-design.md",
18
+ "sha256": "e64cd195f170e21e7ec7edf6439d3f50e27d26dcb5aebde567afdf7385ad2143",
19
+ "contents": "# Task design\n\n- Use these terms precisely:\n - a **task** is one executable episode with an instruction, starting state,\n runtime, and success check;\n - a **dataset** is a reusable collection of task records or source data;\n - a **Taskset** is the versioned package that selects those tasks and binds\n their split, verifier, runtime contract, metrics, and provenance;\n - a **run** applies a model to a released Taskset;\n - a **Model** owns the base policy and any trained versions produced by runs.\n- Treat the Taskset as a module and release boundary, not as a code-authoring\n burden for the user. Emit a content-addressed bundle that native OpenPond,\n OpenPond Managed workers or a later adapter can load without changing task\n semantics.\n- Treat a task as an executable contract, not just a row. Specify the\n policy-facing instruction, initial state, Harness/tools, verifier, task-owned\n evidence, lifecycle, resource limits, network policy, and optional reference\n solution.\n- Keep task configuration nested by responsibility: task metadata, policy\n runtime, verifier runtime, environment resources, and artifacts. Do not leak\n infrastructure configuration into the natural-language instruction.\n- Declare whether the verifier shares the policy environment or runs in a\n separate private environment. Prefer separate verification when grader code,\n secrets, clean state, or tamper-resistant evidence must remain unavailable to\n the policy.\n- Declare the exact artifacts or state transitions the verifier may inspect.\n Treat agent-controlled logs as untrusted unless a private Harness or isolated\n service records them.\n- Use a reference solution or oracle when it can sanity-check solvability, but\n never expose it to the student or treat it as mandatory for tasks verified by\n state, tests, or reward.\n- Use sequential steps only when later instructions or verification genuinely\n depend on earlier state. Give every step its own instruction, termination,\n verifier evidence, and failure boundary.\n- Define the work from the starting state available to the policy, not from the original chat's hidden future.\n- Preserve a source-cluster key for semantically related examples. One cluster may appear in exactly one split.\n- Frozen evaluation examples may never be used as demonstrations, prompt exemplars, repair context, or judge calibration data.\n- Store transformed task inputs and content-addressed source references. Do not place raw unrelated chats in a Taskset.\n- Treat source conversations as evidence. Select only successful, context-complete outcomes; reject stale or contradictory answers and label every repaired or synthetic example.\n- Separate stable behavior from changing facts before selecting a training method. A repeated subject is not automatically a repeated learnable job.\n- Stateful tasks declare create/reset/step/grade/cleanup, timeouts, deterministic seeds when possible, tool scopes, and network policy.\n- A Taskset can target chat, one agent, multiple agents, or a custom harness. Do not force it into an Agent SDK project.\n- Write names and objectives for the person reviewing the Taskset. Describe the capability and outcome, not its storage or evaluation machinery.\n- Keep source IDs, hashes, cluster keys, split rules, privileged targets, encodings, and grader mechanics out of user-facing names and objectives.\n- Mark synthetic fixed-output smoke cases as diagnostics and prefer `no_training`; do not present them as discovered organizational workflows.\n"
20
+ },
21
+ {
22
+ "path": "references/graders-and-rewards.md",
23
+ "sha256": "4f566f8e44ea54b1a27419d0c7b0ae4daa39f8ac9a20d88013d85204bb18ec07",
24
+ "contents": "# Graders and rewards\n\n- Prefer exact, schema, file, diff, test, runtime-event, and final-state graders.\n- Compose graders with explicit weights and hard gates. Infrastructure failures receive no reward.\n- Generated verifier code runs without network or broad credentials and has a strict timeout.\n- Run private or tamper-sensitive verifier logic outside the policy-controlled\n environment. Transfer only declared task artifacts or signed Harness\n receipts into that verifier boundary.\n- A generated verifier exports one function that receives `{ task, attempt }`. Read policy input from `task.input`, the privileged expected outcome from `task.expectedOutput`, the candidate from `attempt.output`, and infrastructure state from `attempt.infrastructureError`. Flat `input`, `expectedOutput`, `output`, and `infrastructureError` aliases are also available, but new verifier code should use the nested form.\n- Return `{ passed, score, feedback, evidenceRefs? }`. `reason` is accepted as a feedback alias, but new verifier code should return `feedback`.\n- Test positive, negative, boundary, adversarial, prompt-injection, leakage, and infrastructure-failure fixtures.\n- A model judge records provider/model, configuration, rubric version, evidence, structured score, rationale, and calibration status.\n- Only frozen graders that pass calibration and hacking tests may be marked reward-eligible.\n- SFT uses graders for baselines and frozen evaluation, not as optimizer reward.\n"
25
+ },
26
+ {
27
+ "path": "references/method-selection.md",
28
+ "sha256": "13d6862ef01101ecb08435927a54eb6078eaa1f995ec097c75d075230e4f7623",
29
+ "contents": "# Method selection\n\n- Changing facts and internal documents: retrieval/context.\n- Approved input-output demonstrations: SFT.\n- Corrections or chosen/rejected pairs: SFT and/or preference tuning.\n- Stable exact labels: classification/SFT; consider RL only after baseline evidence.\n- Reliable scalar reward with non-trivial baseline variance: GRPO/RFT.\n- Runtime, test, or reviewer feedback on policy attempts: SDPO when a proven backend supports it.\n- Teacher-only demonstrations: SDFT/OPSD when the teacher surface exposes the required signal.\n- Long processes with tools and state: agentic RL environment.\n\nChoose the method only after the Taskset and baseline expose the available signal. A first small smoke run may use GRPO when rewards are executable, bounded, and show non-trivial baseline variance. SFT remains the simplest path for approved demonstrations, and DPO is appropriate only when trustworthy preference pairs exist. Do not stack SFT, DPO, GRPO, and PPO by default; each method needs a specific signal and reason. A real destination must still prove the chosen execution contract before training starts.\n"
30
+ },
31
+ {
32
+ "path": "references/privacy-and-provenance.md",
33
+ "sha256": "9d84220cf93037984ac871a5e7a7382368d6071f6a5a1d9d6fe529052891aafd",
34
+ "contents": "# Privacy and provenance\n\n- Require source consent before authoring and separate disclosure approval before a hosted model reads source content.\n- Show the analysis provider/model, exact source scope, and whether raw or transformed evidence leaves the machine.\n- Block unresolved secrets, licensing violations, hidden grader leakage, and unapproved connected-app data.\n- Record source hashes, model/config, skill hash, prompt/template version, SDK version, source commit, assumptions, and repair history.\n- Keep the authoring transcript separate from the typed proposal and approved materialized Taskset.\n- Training export is a later approval and contains only approved transformed assets.\n- A revoked source remains identifiable in an existing receipt but must not be\n re-read or resent to a model in a later review.\n"
35
+ }
36
+ ],
37
+ "bundle": "---\nname: openpond-taskset-authoring\ndescription: Create, improve, inspect, test, or prepare an OpenPond Taskset from a capability, Profile Agent, consented conversations, imported datasets, examples, and traces. Use when the user asks for training or evaluation tasks, graders, GRPO/RFT environments, baseline evaluation, Taskset readiness, or help deciding what a model should practice.\n---\n\n# OpenPond Taskset Authoring\n\nTurn a normal chat request into a tested, reusable Taskset. The user should only\nneed a short sentence, for example:\n\n> Build a Taskset that teaches a support triage agent to make consistent routing decisions.\n\nDo not ask the user to provide internal names, IDs, schema fields, split-family\nIDs, action names, approval booleans, or orchestration instructions. Infer\nreversible defaults from the selected Profile, Agent, evidence, and current\nconversation.\n\nWhen a missing choice would materially change the tasks or their grading, ask\none plain-language question at a time. Ask only about:\n\n- the repeated behavior the model should learn;\n- the starting evidence or state it may see;\n- the tools or actions it may use;\n- what observable result should count as success;\n- privacy, licensing, or data boundaries;\n- task variety or run budget when the default is unsuitable.\n\n## What a Taskset contains\n\nA Taskset is a versioned, executable training and evaluation package:\n\n- task instances and their source/data references;\n- isolated training, validation, and frozen-evaluation splits;\n- the Profile, Agent, Harness, tools, reset, and termination contract;\n- graders, reward components, fixtures, and aggregate metrics;\n- resource, network, private-verifier, and artifact boundaries;\n- provenance plus an immutable, content-addressed release.\n\nThe dataset is the task collection or source data inside that package. It is\nnot the whole Taskset. A Model is also separate: submitting the first rollout or\ntraining run should resolve a Model project, record base-policy version 0, and\nattach the run to it. Taskset creation alone does not imply trained weights.\n\n## Authoring workflow\n\n1. Infer the capability and claim from the user's sentence.\n2. Inspect only the selected Profile, Agent, tools, and consented evidence.\n3. Separate stable behavior from changing knowledge. Recommend prompting,\n retrieval, or `no_training` when weights are not the right intervention.\n4. Ask one focused question only when a material decision cannot be inferred.\n5. Draft a compact proposal in product language, keeping policy-visible input\n separate from expected outcomes and private grader state.\n6. Author varied tasks with semantic families isolated by split. Label examples\n `extracted`, `corrected`, `synthetic`, or `expert_authored`.\n7. Prefer deterministic graders. Pin, calibrate, and version any model judge.\n8. Use ordinary conversational confirmation before materializing the proposed\n Taskset. Do not expose the underlying action payload.\n9. Validate schema and lifecycle, grader fixtures, leakage, reward hacking,\n optional reference-solution solvability, and a bounded base-model baseline.\n10. Return a compact readiness summary and keep training as the next, separate\n action.\n\nUse the installed Dataset Builder actions for design, materialization, and\ntesting, following their schemas internally. Do not recite those schemas in the\nchat.\n\nTreat fixed synthetic smoke fixtures as diagnostics rather than evidence of a\ngeneral capability. Historical assistant messages are candidate outcomes, not\nautomatically approved demonstrations. Frozen evaluation tasks never become\nprompt examples, repair context, demonstrations, or grader calibration data.\n\nRead only the reference needed for the current decision:\n\n- Task contracts, task reconstruction, and split isolation:\n `references/task-design.md`\n- Graders, reward eligibility, and calibration:\n `references/graders-and-rewards.md`\n- Method selection and readiness: `references/method-selection.md`\n- Privacy, consent, and provenance:\n `references/privacy-and-provenance.md`\n\n## Bundled reference: task-design.md\n\n# Task design\n\n- Use these terms precisely:\n - a **task** is one executable episode with an instruction, starting state,\n runtime, and success check;\n - a **dataset** is a reusable collection of task records or source data;\n - a **Taskset** is the versioned package that selects those tasks and binds\n their split, verifier, runtime contract, metrics, and provenance;\n - a **run** applies a model to a released Taskset;\n - a **Model** owns the base policy and any trained versions produced by runs.\n- Treat the Taskset as a module and release boundary, not as a code-authoring\n burden for the user. Emit a content-addressed bundle that native OpenPond,\n OpenPond Managed workers or a later adapter can load without changing task\n semantics.\n- Treat a task as an executable contract, not just a row. Specify the\n policy-facing instruction, initial state, Harness/tools, verifier, task-owned\n evidence, lifecycle, resource limits, network policy, and optional reference\n solution.\n- Keep task configuration nested by responsibility: task metadata, policy\n runtime, verifier runtime, environment resources, and artifacts. Do not leak\n infrastructure configuration into the natural-language instruction.\n- Declare whether the verifier shares the policy environment or runs in a\n separate private environment. Prefer separate verification when grader code,\n secrets, clean state, or tamper-resistant evidence must remain unavailable to\n the policy.\n- Declare the exact artifacts or state transitions the verifier may inspect.\n Treat agent-controlled logs as untrusted unless a private Harness or isolated\n service records them.\n- Use a reference solution or oracle when it can sanity-check solvability, but\n never expose it to the student or treat it as mandatory for tasks verified by\n state, tests, or reward.\n- Use sequential steps only when later instructions or verification genuinely\n depend on earlier state. Give every step its own instruction, termination,\n verifier evidence, and failure boundary.\n- Define the work from the starting state available to the policy, not from the original chat's hidden future.\n- Preserve a source-cluster key for semantically related examples. One cluster may appear in exactly one split.\n- Frozen evaluation examples may never be used as demonstrations, prompt exemplars, repair context, or judge calibration data.\n- Store transformed task inputs and content-addressed source references. Do not place raw unrelated chats in a Taskset.\n- Treat source conversations as evidence. Select only successful, context-complete outcomes; reject stale or contradictory answers and label every repaired or synthetic example.\n- Separate stable behavior from changing facts before selecting a training method. A repeated subject is not automatically a repeated learnable job.\n- Stateful tasks declare create/reset/step/grade/cleanup, timeouts, deterministic seeds when possible, tool scopes, and network policy.\n- A Taskset can target chat, one agent, multiple agents, or a custom harness. Do not force it into an Agent SDK project.\n- Write names and objectives for the person reviewing the Taskset. Describe the capability and outcome, not its storage or evaluation machinery.\n- Keep source IDs, hashes, cluster keys, split rules, privileged targets, encodings, and grader mechanics out of user-facing names and objectives.\n- Mark synthetic fixed-output smoke cases as diagnostics and prefer `no_training`; do not present them as discovered organizational workflows.\n\n## Bundled reference: graders-and-rewards.md\n\n# Graders and rewards\n\n- Prefer exact, schema, file, diff, test, runtime-event, and final-state graders.\n- Compose graders with explicit weights and hard gates. Infrastructure failures receive no reward.\n- Generated verifier code runs without network or broad credentials and has a strict timeout.\n- Run private or tamper-sensitive verifier logic outside the policy-controlled\n environment. Transfer only declared task artifacts or signed Harness\n receipts into that verifier boundary.\n- A generated verifier exports one function that receives `{ task, attempt }`. Read policy input from `task.input`, the privileged expected outcome from `task.expectedOutput`, the candidate from `attempt.output`, and infrastructure state from `attempt.infrastructureError`. Flat `input`, `expectedOutput`, `output`, and `infrastructureError` aliases are also available, but new verifier code should use the nested form.\n- Return `{ passed, score, feedback, evidenceRefs? }`. `reason` is accepted as a feedback alias, but new verifier code should return `feedback`.\n- Test positive, negative, boundary, adversarial, prompt-injection, leakage, and infrastructure-failure fixtures.\n- A model judge records provider/model, configuration, rubric version, evidence, structured score, rationale, and calibration status.\n- Only frozen graders that pass calibration and hacking tests may be marked reward-eligible.\n- SFT uses graders for baselines and frozen evaluation, not as optimizer reward.\n\n## Bundled reference: method-selection.md\n\n# Method selection\n\n- Changing facts and internal documents: retrieval/context.\n- Approved input-output demonstrations: SFT.\n- Corrections or chosen/rejected pairs: SFT and/or preference tuning.\n- Stable exact labels: classification/SFT; consider RL only after baseline evidence.\n- Reliable scalar reward with non-trivial baseline variance: GRPO/RFT.\n- Runtime, test, or reviewer feedback on policy attempts: SDPO when a proven backend supports it.\n- Teacher-only demonstrations: SDFT/OPSD when the teacher surface exposes the required signal.\n- Long processes with tools and state: agentic RL environment.\n\nChoose the method only after the Taskset and baseline expose the available signal. A first small smoke run may use GRPO when rewards are executable, bounded, and show non-trivial baseline variance. SFT remains the simplest path for approved demonstrations, and DPO is appropriate only when trustworthy preference pairs exist. Do not stack SFT, DPO, GRPO, and PPO by default; each method needs a specific signal and reason. A real destination must still prove the chosen execution contract before training starts.\n\n## Bundled reference: privacy-and-provenance.md\n\n# Privacy and provenance\n\n- Require source consent before authoring and separate disclosure approval before a hosted model reads source content.\n- Show the analysis provider/model, exact source scope, and whether raw or transformed evidence leaves the machine.\n- Block unresolved secrets, licensing violations, hidden grader leakage, and unapproved connected-app data.\n- Record source hashes, model/config, skill hash, prompt/template version, SDK version, source commit, assumptions, and repair history.\n- Keep the authoring transcript separate from the typed proposal and approved materialized Taskset.\n- Training export is a later approval and contains only approved transformed assets.\n- A revoked source remains identifiable in an existing receipt but must not be\n re-read or resent to a model in a later review.",
38
+ "contentHash": "af794760bbb52573c325d5f5e79eace6f9c1e68e3bcdd6e88da232148eac96f9"
39
+ }
@@ -3,6 +3,9 @@
3
3
  - Prefer exact, schema, file, diff, test, runtime-event, and final-state graders.
4
4
  - Compose graders with explicit weights and hard gates. Infrastructure failures receive no reward.
5
5
  - Generated verifier code runs without network or broad credentials and has a strict timeout.
6
+ - Run private or tamper-sensitive verifier logic outside the policy-controlled
7
+ environment. Transfer only declared task artifacts or signed Harness
8
+ receipts into that verifier boundary.
6
9
  - A generated verifier exports one function that receives `{ task, attempt }`. Read policy input from `task.input`, the privileged expected outcome from `task.expectedOutput`, the candidate from `attempt.output`, and infrastructure state from `attempt.infrastructureError`. Flat `input`, `expectedOutput`, `output`, and `infrastructureError` aliases are also available, but new verifier code should use the nested form.
7
10
  - Return `{ passed, score, feedback, evidenceRefs? }`. `reason` is accepted as a feedback alias, but new verifier code should return `feedback`.
8
11
  - Test positive, negative, boundary, adversarial, prompt-injection, leakage, and infrastructure-failure fixtures.
@@ -9,4 +9,4 @@
9
9
  - Teacher-only demonstrations: SDFT/OPSD when the teacher surface exposes the required signal.
10
10
  - Long processes with tools and state: agentic RL environment.
11
11
 
12
- The initially executable OpenPond recipe is LoRA SFT. Other methods remain recommendations until a real destination proves their execution contract.
12
+ Choose the method only after the Taskset and baseline expose the available signal. A first small smoke run may use GRPO when rewards are executable, bounded, and show non-trivial baseline variance. SFT remains the simplest path for approved demonstrations, and DPO is appropriate only when trustworthy preference pairs exist. Do not stack SFT, DPO, GRPO, and PPO by default; each method needs a specific signal and reason. A real destination must still prove the chosen execution contract before training starts.
@@ -6,3 +6,5 @@
6
6
  - Record source hashes, model/config, skill hash, prompt/template version, SDK version, source commit, assumptions, and repair history.
7
7
  - Keep the authoring transcript separate from the typed proposal and approved materialized Taskset.
8
8
  - Training export is a later approval and contains only approved transformed assets.
9
+ - A revoked source remains identifiable in an existing receipt but must not be
10
+ re-read or resent to a model in a later review.
@@ -1,5 +1,37 @@
1
1
  # Task design
2
2
 
3
+ - Use these terms precisely:
4
+ - a **task** is one executable episode with an instruction, starting state,
5
+ runtime, and success check;
6
+ - a **dataset** is a reusable collection of task records or source data;
7
+ - a **Taskset** is the versioned package that selects those tasks and binds
8
+ their split, verifier, runtime contract, metrics, and provenance;
9
+ - a **run** applies a model to a released Taskset;
10
+ - a **Model** owns the base policy and any trained versions produced by runs.
11
+ - Treat the Taskset as a module and release boundary, not as a code-authoring
12
+ burden for the user. Emit a content-addressed bundle that native OpenPond,
13
+ OpenPond Managed workers or a later adapter can load without changing task
14
+ semantics.
15
+ - Treat a task as an executable contract, not just a row. Specify the
16
+ policy-facing instruction, initial state, Harness/tools, verifier, task-owned
17
+ evidence, lifecycle, resource limits, network policy, and optional reference
18
+ solution.
19
+ - Keep task configuration nested by responsibility: task metadata, policy
20
+ runtime, verifier runtime, environment resources, and artifacts. Do not leak
21
+ infrastructure configuration into the natural-language instruction.
22
+ - Declare whether the verifier shares the policy environment or runs in a
23
+ separate private environment. Prefer separate verification when grader code,
24
+ secrets, clean state, or tamper-resistant evidence must remain unavailable to
25
+ the policy.
26
+ - Declare the exact artifacts or state transitions the verifier may inspect.
27
+ Treat agent-controlled logs as untrusted unless a private Harness or isolated
28
+ service records them.
29
+ - Use a reference solution or oracle when it can sanity-check solvability, but
30
+ never expose it to the student or treat it as mandatory for tasks verified by
31
+ state, tests, or reward.
32
+ - Use sequential steps only when later instructions or verification genuinely
33
+ depend on earlier state. Give every step its own instruction, termination,
34
+ verifier evidence, and failure boundary.
3
35
  - Define the work from the starting state available to the policy, not from the original chat's hidden future.
4
36
  - Preserve a source-cluster key for semantically related examples. One cluster may appear in exactly one split.
5
37
  - Frozen evaluation examples may never be used as demonstrations, prompt exemplars, repair context, or judge calibration data.
@@ -1 +1 @@
1
- import{r as s,j as w}from"./index-DQalqxbw.js";const d=[],v=["button:not([disabled])","[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","[tabindex]:not([tabindex='-1'])","[contenteditable='true']"].join(",");function T({ariaLabel:r,backdropClassName:o="training-dialog-backdrop",children:a,className:i,contained:t=!1,dismissDisabled:e=!1,initialFocusKey:u,inertExclusionSelector:p,onClose:m}){const f=s.useRef(null),A=s.useRef(Symbol("app-dialog")),b=s.useRef(null),h=s.useRef(e),g=s.useRef(m);h.current=e,g.current=m,s.useEffect(()=>{const n=A.current;b.current=document.activeElement instanceof HTMLElement?document.activeElement:null,d.push(n);const l=t?f.current?.closest(".main-pane")??null:null,E=I(f.current,l,p);function y(c){if(d.at(-1)===n){if(c.key==="Escape"){c.preventDefault(),c.stopPropagation(),h.current||g.current();return}c.key!=="Tab"||t||F(c,f.current)}}return document.addEventListener("keydown",y,!0),()=>{document.removeEventListener("keydown",y,!0);const c=d.lastIndexOf(n);c>=0&&d.splice(c,1),E();const x=b.current;x?.isConnected&&x.focus()}},[t,p]),s.useEffect(()=>{const n=window.requestAnimationFrame(()=>{const l=f.current;(l?.querySelector("[data-autofocus]")??l)?.focus()});return()=>window.cancelAnimationFrame(n)},[u]);function R(n){n.target===n.currentTarget&&!e&&m()}function k(n){n.key==="Escape"&&n.stopPropagation()}return w.jsx("div",{className:o,role:"presentation",onMouseDown:R,children:w.jsx("section",{ref:f,"aria-busy":e||void 0,"aria-label":r,"aria-modal":t?void 0:"true",className:i,role:"dialog",tabIndex:-1,onKeyDown:k,onMouseDown:n=>n.stopPropagation(),children:a})})}function D(r){return r?Array.from(r.querySelectorAll(v)).filter(o=>!o.hidden&&o.getAttribute("aria-hidden")!=="true"):[]}function F(r,o){if(!o)return;const a=D(o);if(a.length===0){r.preventDefault(),o.focus();return}const i=a.indexOf(document.activeElement),t=r.shiftKey?i<=0?a.length-1:i-1:i<0||i===a.length-1?0:i+1;r.preventDefault(),a[t]?.focus()}function I(r,o=null,a){if(!r)return()=>{};const i=[];let t=r.parentElement??r;for(;t.parentElement&&t!==document.body;){const e=t.parentElement;for(const u of Array.from(e.children))u===t||!(u instanceof HTMLElement)||a&&u.matches(a)||(i.push({element:u,ariaHidden:u.getAttribute("aria-hidden"),inert:u.inert}),u.inert=!0,u.setAttribute("aria-hidden","true"));if(t=e,o&&t===o)break}return()=>{for(const e of i.reverse())e.element.inert=e.inert,e.ariaHidden===null?e.element.removeAttribute("aria-hidden"):e.element.setAttribute("aria-hidden",e.ariaHidden)}}export{T as A};
1
+ import{r as s,j as w}from"./index-ByIQyiUl.js";const d=[],v=["button:not([disabled])","[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","[tabindex]:not([tabindex='-1'])","[contenteditable='true']"].join(",");function T({ariaLabel:r,backdropClassName:o="training-dialog-backdrop",children:a,className:i,contained:t=!1,dismissDisabled:e=!1,initialFocusKey:u,inertExclusionSelector:p,onClose:m}){const f=s.useRef(null),A=s.useRef(Symbol("app-dialog")),b=s.useRef(null),h=s.useRef(e),g=s.useRef(m);h.current=e,g.current=m,s.useEffect(()=>{const n=A.current;b.current=document.activeElement instanceof HTMLElement?document.activeElement:null,d.push(n);const l=t?f.current?.closest(".main-pane")??null:null,E=I(f.current,l,p);function y(c){if(d.at(-1)===n){if(c.key==="Escape"){c.preventDefault(),c.stopPropagation(),h.current||g.current();return}c.key!=="Tab"||t||F(c,f.current)}}return document.addEventListener("keydown",y,!0),()=>{document.removeEventListener("keydown",y,!0);const c=d.lastIndexOf(n);c>=0&&d.splice(c,1),E();const x=b.current;x?.isConnected&&x.focus()}},[t,p]),s.useEffect(()=>{const n=window.requestAnimationFrame(()=>{const l=f.current;(l?.querySelector("[data-autofocus]")??l)?.focus()});return()=>window.cancelAnimationFrame(n)},[u]);function R(n){n.target===n.currentTarget&&!e&&m()}function k(n){n.key==="Escape"&&n.stopPropagation()}return w.jsx("div",{className:o,role:"presentation",onMouseDown:R,children:w.jsx("section",{ref:f,"aria-busy":e||void 0,"aria-label":r,"aria-modal":t?void 0:"true",className:i,role:"dialog",tabIndex:-1,onKeyDown:k,onMouseDown:n=>n.stopPropagation(),children:a})})}function D(r){return r?Array.from(r.querySelectorAll(v)).filter(o=>!o.hidden&&o.getAttribute("aria-hidden")!=="true"):[]}function F(r,o){if(!o)return;const a=D(o);if(a.length===0){r.preventDefault(),o.focus();return}const i=a.indexOf(document.activeElement),t=r.shiftKey?i<=0?a.length-1:i-1:i<0||i===a.length-1?0:i+1;r.preventDefault(),a[t]?.focus()}function I(r,o=null,a){if(!r)return()=>{};const i=[];let t=r.parentElement??r;for(;t.parentElement&&t!==document.body;){const e=t.parentElement;for(const u of Array.from(e.children))u===t||!(u instanceof HTMLElement)||a&&u.matches(a)||(i.push({element:u,ariaHidden:u.getAttribute("aria-hidden"),inert:u.inert}),u.inert=!0,u.setAttribute("aria-hidden","true"));if(t=e,o&&t===o)break}return()=>{for(const e of i.reverse())e.element.inert=e.inert,e.ariaHidden===null?e.element.removeAttribute("aria-hidden"):e.element.setAttribute("aria-hidden",e.ariaHidden)}}export{T as A};
@@ -1 +1 @@
1
- import{r,b0 as b,n as L,j as e,S as I,a2 as k,X as P,b1 as E,T as F,E as U,b2 as T,b3 as R}from"./index-DQalqxbw.js";const D=["For agents","Featured","Productivity","Developer tools"],M=new Set(["slack","google","github","mcp"]);function J({account:s,connection:n,defaultTeamId:a,onToast:o}){const[c,f]=r.useState(null),[p,v]=r.useState(""),[i,y]=r.useState("For agents"),[u,h]=r.useState(()=>b()),[g,d]=r.useState("idle"),[w,x]=r.useState(null),S=s?.baseUrl??s?.activeProfile?.baseUrl??null,C=O(a,w),N=r.useMemo(()=>u.filter(t=>z(t,i)).filter(t=>q(t,p)),[i,p,u]);r.useEffect(()=>{let t=!0;return n?(d("loading"),L.connectedAppStatus(n,{status:"all"}).then(l=>{t&&(h(l.apps),x(l.teamId?.trim()||null),d("ready"))}).catch(l=>{t&&(console.warn("Unable to load connected app status.",l),h(b()),x(null),d("error"))}),()=>{t=!1}):(h(b()),d("idle"),x(null),()=>{t=!1})},[n]);function A(t){const l=T({appId:t.id,baseUrl:S,teamId:C});V(l).catch(j=>{o?.(j instanceof Error?j.message:String(j),"error")})}return e.jsxs("section",{className:"connected-apps-view","aria-label":"Apps",children:[e.jsxs("div",{className:"connected-apps-header",children:[e.jsxs("div",{children:[e.jsx("h1",{children:"Apps"}),e.jsx("p",{children:"Connect apps that agents can use for chat, knowledge, files, and workflow actions."})]}),e.jsxs("label",{className:"connected-apps-search",children:[e.jsx(I,{size:15}),e.jsx("input",{"aria-label":"Search apps",onChange:t=>v(t.target.value),placeholder:"Search apps",type:"search",value:p})]})]}),e.jsxs("div",{className:`connected-apps-status-strip ${g}`,children:[e.jsx("span",{children:W(g)}),e.jsxs("span",{children:[X(u)," connected"]})]}),e.jsxs("section",{className:"connected-apps-hero","aria-label":"App context",children:[e.jsxs("div",{className:"connected-apps-hero-copy",children:[e.jsx("span",{className:"connected-apps-hero-icon",children:e.jsx(m,{appId:"github"})}),e.jsx("h2",{children:"Work with your apps"}),e.jsx("p",{children:"Bring repositories, documents, chat, calendars, and custom MCP tools into OpenPond."})]}),e.jsxs("div",{className:"connected-apps-context-card","aria-hidden":"true",children:[e.jsx("strong",{children:"Agent context"}),e.jsxs("div",{children:[e.jsx("span",{className:"files",children:"Files"}),e.jsx("span",{className:"chat",children:"Chat"}),e.jsx("span",{className:"oauth",children:"OAuth"}),e.jsx("span",{className:"mcp",children:"MCP"})]})]})]}),e.jsx("div",{className:"connected-apps-filters",role:"tablist","aria-label":"App categories",children:D.map(t=>e.jsx("button",{"aria-selected":i===t,className:i===t?"active":"",onClick:()=>y(t),role:"tab",type:"button",children:t},t))}),e.jsxs("div",{className:"connected-apps-list",children:[N.map(t=>e.jsx(_,{app:t,onSelect:()=>f(t)},t.id)),N.length===0?e.jsx("div",{className:"connected-apps-empty",children:"No apps match the current search."}):null]}),c?e.jsx($,{app:c,onClose:()=>f(null),onInstall:()=>A(c)}):null]})}function O(s,n){const a=s?.trim();return a||n?.trim()||null}function _({app:s,onSelect:n}){return e.jsxs("button",{className:"connected-app-row",onClick:n,type:"button",children:[e.jsxs("span",{className:"connected-app-row-main",children:[e.jsx(m,{appId:s.id}),e.jsxs("span",{className:"connected-app-copy",children:[e.jsxs("span",{className:"connected-app-title",children:[e.jsx("strong",{children:s.label}),e.jsxs("span",{children:[s.shortLabel!==s.label?s.shortLabel:s.category," / ",s.setupSurfaceLabel]})]}),e.jsx("span",{children:s.description}),e.jsxs("span",{className:"connected-app-capability-row",children:[s.capabilityLabels.slice(0,2).map(a=>e.jsx("span",{children:a},a)),s.capabilityLabels.length>2?e.jsxs("span",{children:["+",s.capabilityLabels.length-2]}):null]})]})]}),e.jsx("span",{className:`connected-app-status-pill ${s.status}`,children:s.statusLabel}),e.jsx(k,{size:16})]})}function $({app:s,onClose:n,onInstall:a}){const o=s.connections.filter(c=>c.status==="active");return e.jsx("div",{className:"connected-app-dialog-backdrop",role:"presentation",onMouseDown:c=>{c.target===c.currentTarget&&n()},children:e.jsxs("section",{className:"connected-app-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"connected-app-dialog-title",children:[e.jsx("button",{className:"connected-app-dialog-close",type:"button","aria-label":"Close app details",onClick:n,children:e.jsx(P,{size:17})}),e.jsxs("div",{className:"connected-app-dialog-identity",children:[e.jsx("span",{className:"openpond-mark",children:e.jsx("img",{alt:"",src:E})}),e.jsxs("span",{className:"connection-dots","aria-hidden":"true",children:[e.jsx("span",{}),e.jsx("span",{}),e.jsx("span",{})]}),e.jsx(m,{appId:s.id})]}),e.jsxs("h2",{id:"connected-app-dialog-title",children:["Connect ",s.label]}),e.jsxs("div",{className:"connected-app-approval",children:[e.jsx(F,{size:16}),e.jsx("span",{children:s.statusLabel})]}),e.jsxs("div",{className:"connected-app-dialog-body",children:[e.jsxs("section",{children:[e.jsx("h3",{children:s.setupSurfaceLabel}),e.jsx("p",{children:"The web flow shows the provider account, workspace, and requested access before anything is connected."})]}),e.jsxs("section",{children:[e.jsx("h3",{children:"Connected account"}),e.jsx("p",{children:G(o)})]}),e.jsxs("section",{children:[e.jsx("h3",{children:"Available capabilities"}),e.jsx("div",{className:"connected-app-dialog-capabilities",children:s.capabilities.map(c=>e.jsx("span",{children:c.label},c.id))})]}),e.jsxs("section",{children:[e.jsx("h3",{children:"Sandbox lease policy"}),e.jsx("p",{children:s.leasePolicy.leaseable?`Leaseable for ${s.leasePolicy.defaultTtlSeconds??0} seconds with scoped proxy access.`:"Managed as setup or tool discovery; no OAuth lease is required."})]})]}),e.jsxs("button",{className:"connected-app-dialog-primary",type:"button",onClick:a,children:[e.jsx("span",{children:s.installLabel}),e.jsx(U,{size:15})]})]})})}function m({appId:s}){return e.jsx("span",{className:`connected-app-icon app-${s}`,children:e.jsx("img",{alt:"",src:B(s)})})}function z(s,n){return n==="For agents"?!0:n==="Featured"?M.has(s.id):n==="Productivity"?s.category==="Productivity"||s.category==="Chat":s.category==="Developer tools"||s.id==="mcp"}function q(s,n){const a=n.trim().toLowerCase();return a?[s.id,s.label,s.shortLabel,s.category,s.description,s.providerFamily,s.setupSurface].some(o=>o.toLowerCase().includes(a)):!0}function B(s){return R(s)}async function V(s){const n=window.openpond?.browser;if(n){const a=await n.openExternal({conversationId:"connected-apps",url:s});if(!a.ok)throw new Error(a.error??"Unable to open app setup.");return}window.open(s,"_blank","noopener,noreferrer")}function W(s){return s==="loading"?"Checking connections":s==="ready"?"Connection status current":s==="error"?"Connection status unavailable":"Connection status pending"}function X(s){return s.filter(n=>n.connected).length}function G(s){return s.length===0?"No active OAuth connection for this setup surface.":s.map(n=>{const a=n.accountLabel??"Connected account";return n.workspaceLabel?`${a} / ${n.workspaceLabel}`:a}).join(", ")}export{J as AppsView,_ as ConnectedAppRow,O as connectedAppSetupTeamId};
1
+ import{r,bx as b,n as L,j as e,a6 as I,a as k,X as P,O as E,a3 as F,b3 as U,by as T,g as R}from"./index-ByIQyiUl.js";const O=["For agents","Featured","Productivity","Developer tools"],D=new Set(["slack","google","github","mcp"]);function J({account:s,connection:n,defaultTeamId:a,onToast:o}){const[c,f]=r.useState(null),[p,v]=r.useState(""),[i,y]=r.useState("For agents"),[u,h]=r.useState(()=>b()),[g,d]=r.useState("idle"),[w,x]=r.useState(null),S=s?.baseUrl??s?.activeProfile?.baseUrl??null,C=M(a,w),N=r.useMemo(()=>u.filter(t=>z(t,i)).filter(t=>q(t,p)),[i,p,u]);r.useEffect(()=>{let t=!0;return n?(d("loading"),L.connectedAppStatus(n,{status:"all"}).then(l=>{t&&(h(l.apps),x(l.teamId?.trim()||null),d("ready"))}).catch(l=>{t&&(console.warn("Unable to load connected app status.",l),h(b()),x(null),d("error"))}),()=>{t=!1}):(h(b()),d("idle"),x(null),()=>{t=!1})},[n]);function A(t){const l=T({appId:t.id,baseUrl:S,teamId:C});V(l).catch(j=>{o?.(j instanceof Error?j.message:String(j),"error")})}return e.jsxs("section",{className:"connected-apps-view","aria-label":"Apps",children:[e.jsxs("div",{className:"connected-apps-header",children:[e.jsxs("div",{children:[e.jsx("h1",{children:"Apps"}),e.jsx("p",{children:"Connect apps that agents can use for chat, knowledge, files, and workflow actions."})]}),e.jsxs("label",{className:"connected-apps-search",children:[e.jsx(I,{size:15}),e.jsx("input",{"aria-label":"Search apps",onChange:t=>v(t.target.value),placeholder:"Search apps",type:"search",value:p})]})]}),e.jsxs("div",{className:`connected-apps-status-strip ${g}`,children:[e.jsx("span",{children:W(g)}),e.jsxs("span",{children:[X(u)," connected"]})]}),e.jsxs("section",{className:"connected-apps-hero","aria-label":"App context",children:[e.jsxs("div",{className:"connected-apps-hero-copy",children:[e.jsx("span",{className:"connected-apps-hero-icon",children:e.jsx(m,{appId:"github"})}),e.jsx("h2",{children:"Work with your apps"}),e.jsx("p",{children:"Bring repositories, documents, chat, calendars, and custom MCP tools into OpenPond."})]}),e.jsxs("div",{className:"connected-apps-context-card","aria-hidden":"true",children:[e.jsx("strong",{children:"Agent context"}),e.jsxs("div",{children:[e.jsx("span",{className:"files",children:"Files"}),e.jsx("span",{className:"chat",children:"Chat"}),e.jsx("span",{className:"oauth",children:"OAuth"}),e.jsx("span",{className:"mcp",children:"MCP"})]})]})]}),e.jsx("div",{className:"connected-apps-filters",role:"tablist","aria-label":"App categories",children:O.map(t=>e.jsx("button",{"aria-selected":i===t,className:i===t?"active":"",onClick:()=>y(t),role:"tab",type:"button",children:t},t))}),e.jsxs("div",{className:"connected-apps-list",children:[N.map(t=>e.jsx(_,{app:t,onSelect:()=>f(t)},t.id)),N.length===0?e.jsx("div",{className:"connected-apps-empty",children:"No apps match the current search."}):null]}),c?e.jsx($,{app:c,onClose:()=>f(null),onInstall:()=>A(c)}):null]})}function M(s,n){const a=s?.trim();return a||n?.trim()||null}function _({app:s,onSelect:n}){return e.jsxs("button",{className:"connected-app-row",onClick:n,type:"button",children:[e.jsxs("span",{className:"connected-app-row-main",children:[e.jsx(m,{appId:s.id}),e.jsxs("span",{className:"connected-app-copy",children:[e.jsxs("span",{className:"connected-app-title",children:[e.jsx("strong",{children:s.label}),e.jsxs("span",{children:[s.shortLabel!==s.label?s.shortLabel:s.category," / ",s.setupSurfaceLabel]})]}),e.jsx("span",{children:s.description}),e.jsxs("span",{className:"connected-app-capability-row",children:[s.capabilityLabels.slice(0,2).map(a=>e.jsx("span",{children:a},a)),s.capabilityLabels.length>2?e.jsxs("span",{children:["+",s.capabilityLabels.length-2]}):null]})]})]}),e.jsx("span",{className:`connected-app-status-pill ${s.status}`,children:s.statusLabel}),e.jsx(k,{size:16})]})}function $({app:s,onClose:n,onInstall:a}){const o=s.connections.filter(c=>c.status==="active");return e.jsx("div",{className:"connected-app-dialog-backdrop",role:"presentation",onMouseDown:c=>{c.target===c.currentTarget&&n()},children:e.jsxs("section",{className:"connected-app-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"connected-app-dialog-title",children:[e.jsx("button",{className:"connected-app-dialog-close",type:"button","aria-label":"Close app details",onClick:n,children:e.jsx(P,{size:17})}),e.jsxs("div",{className:"connected-app-dialog-identity",children:[e.jsx("span",{className:"openpond-mark",children:e.jsx("img",{alt:"",src:E})}),e.jsxs("span",{className:"connection-dots","aria-hidden":"true",children:[e.jsx("span",{}),e.jsx("span",{}),e.jsx("span",{})]}),e.jsx(m,{appId:s.id})]}),e.jsxs("h2",{id:"connected-app-dialog-title",children:["Connect ",s.label]}),e.jsxs("div",{className:"connected-app-approval",children:[e.jsx(F,{size:16}),e.jsx("span",{children:s.statusLabel})]}),e.jsxs("div",{className:"connected-app-dialog-body",children:[e.jsxs("section",{children:[e.jsx("h3",{children:s.setupSurfaceLabel}),e.jsx("p",{children:"The web flow shows the provider account, workspace, and requested access before anything is connected."})]}),e.jsxs("section",{children:[e.jsx("h3",{children:"Connected account"}),e.jsx("p",{children:G(o)})]}),e.jsxs("section",{children:[e.jsx("h3",{children:"Available capabilities"}),e.jsx("div",{className:"connected-app-dialog-capabilities",children:s.capabilities.map(c=>e.jsx("span",{children:c.label},c.id))})]}),e.jsxs("section",{children:[e.jsx("h3",{children:"Sandbox lease policy"}),e.jsx("p",{children:s.leasePolicy.leaseable?`Leaseable for ${s.leasePolicy.defaultTtlSeconds??0} seconds with scoped proxy access.`:"Managed as setup or tool discovery; no OAuth lease is required."})]})]}),e.jsxs("button",{className:"connected-app-dialog-primary",type:"button",onClick:a,children:[e.jsx("span",{children:s.installLabel}),e.jsx(U,{size:15})]})]})})}function m({appId:s}){return e.jsx("span",{className:`connected-app-icon app-${s}`,children:e.jsx("img",{alt:"",src:B(s)})})}function z(s,n){return n==="For agents"?!0:n==="Featured"?D.has(s.id):n==="Productivity"?s.category==="Productivity"||s.category==="Chat":s.category==="Developer tools"||s.id==="mcp"}function q(s,n){const a=n.trim().toLowerCase();return a?[s.id,s.label,s.shortLabel,s.category,s.description,s.providerFamily,s.setupSurface].some(o=>o.toLowerCase().includes(a)):!0}function B(s){return R(s)}async function V(s){const n=window.openpond?.browser;if(n){const a=await n.openExternal({conversationId:"connected-apps",url:s});if(!a.ok)throw new Error(a.error??"Unable to open app setup.");return}window.open(s,"_blank","noopener,noreferrer")}function W(s){return s==="loading"?"Checking connections":s==="ready"?"Connection status current":s==="error"?"Connection status unavailable":"Connection status pending"}function X(s){return s.filter(n=>n.connected).length}function G(s){return s.length===0?"No active OAuth connection for this setup surface.":s.map(n=>{const a=n.accountLabel??"Connected account";return n.workspaceLabel?`${a} / ${n.workspaceLabel}`:a}).join(", ")}export{J as AppsView,_ as ConnectedAppRow,M as connectedAppSetupTeamId};
@@ -0,0 +1 @@
1
+ import{r as c,bV as v,j as a,a0 as f,X as k,P as j,A as C,b3 as g,E as B}from"./index-ByIQyiUl.js";import{A as y}from"./MarkdownText-D7DT1k1k.js";import{R as N}from"./refresh-cw-DH0KLbdD.js";import{S as T}from"./square-CemI-0g5.js";const x=[];function P(r){const e=window.openpond?.browser,[b,l]=c.useState(()=>({conversationId:r,activeTabId:null,tabs:x}));c.useEffect(()=>{if(l({conversationId:r,activeTabId:null,tabs:x}),!e)return;let s=!1;e.getState({conversationId:r}).then(o=>{s||l(o)});const i=e.onState(o=>{o.conversationId===r&&l(o)});return()=>{s=!0,i()}},[e,r]);const u=c.useMemo(()=>b.tabs.find(s=>s.id===b.activeTabId)??null,[b.activeTabId,b.tabs]),t=c.useCallback(async(s,i={})=>{if(!e)return!1;const o=v(s,{explicitFile:i.explicitFile});return o?(i.newTab?await e.newTab({conversationId:r,url:o,explicitFile:i.explicitFile}):await e.open({conversationId:r,url:o,explicitFile:i.explicitFile}),!0):!1},[e,r]),n=u?{conversationId:r,tabId:u.id}:null;return{activeTab:u,available:!!e,bridge:e,state:b,back:()=>e&&n?e.back(n):Promise.resolve({ok:!1}),clearData:()=>e?e.clearData({conversationId:r}):Promise.resolve({ok:!1}),closeTab:s=>e?e.closeTab({conversationId:r,tabId:s}):Promise.resolve({ok:!1}),forward:()=>e&&n?e.forward(n):Promise.resolve({ok:!1}),newTab:s=>e?e.newTab({conversationId:r,url:s}):Promise.resolve({ok:!1}),open:t,openExternal:()=>e&&n?e.openExternal(n):Promise.resolve({ok:!1}),reload:()=>e&&n?e.reload(n):Promise.resolve({ok:!1}),snapshot:(s={})=>e?e.snapshot({conversationId:r,...s}):Promise.resolve({ok:!1,output:"Desktop browser bridge unavailable."}),moveCursor:s=>e?e.moveCursor({conversationId:r,...s}):Promise.resolve({ok:!1,output:"Desktop browser bridge unavailable."}),click:s=>e?e.click({conversationId:r,...s}):Promise.resolve({ok:!1,output:"Desktop browser bridge unavailable."}),typeText:s=>e?e.typeText({conversationId:r,...s}):Promise.resolve({ok:!1,output:"Desktop browser bridge unavailable."}),key:s=>e?e.key({conversationId:r,...s}):Promise.resolve({ok:!1,output:"Desktop browser bridge unavailable."}),scroll:s=>e?e.scroll({conversationId:r,...s}):Promise.resolve({ok:!1,output:"Desktop browser bridge unavailable."}),selectTab:s=>e?e.selectTab({conversationId:r,tabId:s}):Promise.resolve({ok:!1}),setBounds:s=>e?e.setBounds({conversationId:r,bounds:s}):Promise.resolve({ok:!1}),stop:()=>e&&n?e.stop(n):Promise.resolve({ok:!1})}}function E({activeTabId:r,tabs:e,onCloseTab:b,onNewTab:l,onSelectTab:u}){return a.jsxs("div",{className:"browser-tabs",role:"tablist","aria-label":"Browser tabs",children:[e.map(t=>a.jsxs("div",{className:`browser-tab ${t.id===r?"active":""}`,children:[a.jsx("span",{className:"browser-tab-favicon","aria-hidden":"true",children:t.faviconUrl?a.jsx("img",{alt:"",referrerPolicy:"no-referrer",src:t.faviconUrl}):a.jsx(f,{size:13})}),a.jsx("button",{type:"button",className:"browser-tab-main",role:"tab","aria-selected":t.id===r,title:t.url,onClick:()=>u(t.id),children:R(t)}),a.jsx("button",{type:"button",className:"browser-tab-close",title:"Close tab","aria-label":"Close tab",onClick:()=>b(t.id),children:a.jsx(k,{size:12})})]},t.id)),a.jsx("button",{type:"button",className:"browser-tab-add",title:"New tab","aria-label":"New tab",onClick:l,children:a.jsx(j,{size:14})})]})}function R(r){if(r.title?.trim())return r.title.trim();try{return new URL(r.url).host||r.url}catch{return r.url||"New tab"}}function z({activeTab:r,available:e,onBack:b,onClearData:l,onForward:u,onNavigate:t,onOpenExternal:n,onReload:s,onStop:i}){const[o,d]=c.useState(""),[p,m]=c.useState(!1);c.useEffect(()=>{d(r?.url??"")},[r?.url]);function h(w){w.preventDefault(),t(o)}return a.jsxs("div",{className:"browser-toolbar",children:[a.jsxs("div",{className:"browser-nav-actions",children:[a.jsx("button",{type:"button",title:"Back","aria-label":"Back",disabled:!r?.canGoBack,onClick:b,children:a.jsx(C,{size:15})}),a.jsx("button",{type:"button",title:"Forward","aria-label":"Forward",disabled:!r?.canGoForward,onClick:u,children:a.jsx(y,{size:15})}),a.jsx("button",{type:"button",title:r?.loading?"Stop":"Reload","aria-label":r?.loading?"Stop":"Reload",disabled:!r,onClick:r?.loading?i:s,children:r?.loading?a.jsx(T,{size:13}):a.jsx(N,{size:14})})]}),a.jsx("form",{className:"browser-address-form",onSubmit:h,children:a.jsx("input",{"aria-label":"Browser address",disabled:!e,placeholder:e?"Search or enter address":"Desktop browser unavailable",spellCheck:!1,value:o,onChange:w=>d(w.target.value)})}),a.jsxs("div",{className:"browser-panel-actions",children:[a.jsx("button",{type:"button",title:"Open external","aria-label":"Open external",disabled:!r,onClick:n,children:a.jsx(g,{size:14})}),a.jsxs("div",{className:"browser-menu-anchor",children:[a.jsx("button",{type:"button",title:"Browser actions","aria-label":"Browser actions",onClick:()=>m(w=>!w),children:a.jsx(B,{size:15})}),p&&a.jsx("div",{className:"browser-options-menu",role:"menu",children:a.jsx("button",{type:"button",role:"menuitem",onClick:()=>{m(!1),l()},children:"Clear Browser Data..."})})]})]})]})}function D({active:r,onBounds:e}){const b=c.useRef(null),l=c.useRef(null),u=c.useRef(null),t=c.useCallback(i=>{const o=i?`${i.x}:${i.y}:${i.width}:${i.height}`:"null";l.current!==o&&(l.current=o,e(i))},[e]),n=c.useCallback(()=>{const i=b.current;if(!r||!i){t(null);return}const o=i.getBoundingClientRect(),d=Math.max(0,Math.round(o.width)),p=Math.max(0,Math.round(o.height));if(d===0||p===0){t(null);return}t({x:Math.round(o.left),y:Math.round(o.top),width:d,height:p})},[r,t]),s=c.useCallback(()=>{u.current===null&&(u.current=window.requestAnimationFrame(()=>{u.current=null,n()}))},[n]);return c.useLayoutEffect(()=>{l.current=null,n();const i=b.current;if(!r||!i)return t(null),()=>t(null);const o=new ResizeObserver(s);return o.observe(i),window.addEventListener("resize",s),window.addEventListener("scroll",s,!0),()=>{u.current!==null&&(window.cancelAnimationFrame(u.current),u.current=null),o.disconnect(),window.removeEventListener("resize",s),window.removeEventListener("scroll",s,!0),t(null)}},[r,t,n,s]),a.jsx("div",{className:"browser-viewport",ref:b})}function A({conversationId:r,expanded:e,onResizeStart:b}){const l=P(r),u=c.useCallback(s=>{window.openpond?.browser?.setBounds({conversationId:r,bounds:s})},[r]),t=c.useCallback(s=>{l.open(s,{explicitFile:!0})},[l]),n=c.useCallback(()=>{window.confirm("Clear browser data for this conversation? Tabs, cookies, cache, and local storage for this conversation will be removed.")&&l.clearData()},[l]);return a.jsxs("aside",{className:`workspace-diff-panel browser-sidebar-panel ${e?"expanded":""}`,"aria-label":"Browser",children:[!e&&a.jsx("div",{className:"workspace-diff-resize-handle",role:"separator","aria-orientation":"vertical","aria-label":"Resize browser panel",onPointerDown:b}),a.jsx(E,{activeTabId:l.state.activeTabId,tabs:l.state.tabs,onCloseTab:s=>{l.closeTab(s)},onNewTab:()=>{l.newTab()},onSelectTab:s=>{l.selectTab(s)}}),a.jsx(z,{activeTab:l.activeTab,available:l.available,onBack:()=>{l.back()},onClearData:n,onForward:()=>{l.forward()},onNavigate:t,onOpenExternal:()=>{l.openExternal()},onReload:()=>{l.reload()},onStop:()=>{l.stop()}}),a.jsxs("div",{className:"browser-content",children:[l.available?l.state.tabs.length===0?a.jsxs("div",{className:"browser-empty-state",children:[a.jsx(f,{size:18}),a.jsx("span",{children:"Enter a URL to open a browser tab for this conversation."})]}):null:a.jsxs("div",{className:"browser-empty-state",children:[a.jsx(f,{size:18}),a.jsx("span",{children:"Desktop browser bridge unavailable."})]}),a.jsx(D,{active:l.available&&l.state.tabs.length>0,onBounds:u})]})]})}export{A as BrowserSidebar};
@@ -0,0 +1 @@
1
+ import{r as j,j as e,a6 as g,ap as f,d as b,aq as k,ar as C,a1 as v,as as P,at as M}from"./index-ByIQyiUl.js";import{S,F as w}from"./square-pen-CqfsvR_n.js";function y({open:s,query:r,projects:n,sessions:o,onQueryChange:t,onClose:d,onNewChat:x,onOpenProject:u,onOpenSession:m}){const c=r.trim().toLowerCase(),l=j.useMemo(()=>L(o,c,10),[c,o]),i=j.useMemo(()=>z(n,c,8),[c,n]);if(!s)return null;const N=()=>{const a=i[0];if(a){u(a);return}const p=l[0];p&&m(p)};return e.jsx("div",{className:"command-overlay",role:"presentation",onMouseDown:d,children:e.jsxs("section",{className:"command-menu",role:"dialog","aria-modal":"true","aria-label":"Search chats and projects",onMouseDown:a=>a.stopPropagation(),children:[e.jsxs("div",{className:"command-input-row",children:[e.jsx(g,{size:17}),e.jsx("input",{autoFocus:!0,value:r,onChange:a=>t(a.target.value),onKeyDown:a=>{a.key==="Enter"&&(a.preventDefault(),N()),a.key==="Escape"&&(a.preventDefault(),d())},placeholder:"Search chats and projects"}),e.jsx("kbd",{children:"Esc"})]}),e.jsxs("div",{className:"command-results",children:[e.jsxs("button",{className:"command-result command-create",onClick:x,children:[e.jsx(S,{size:15}),e.jsx("span",{children:"New local task"}),e.jsx("small",{children:"General"})]}),e.jsxs(h,{label:"Projects",children:[i.map(a=>e.jsxs("button",{className:"command-result",onClick:()=>u(a),children:[f(a)?e.jsx(b,{size:15}):e.jsx(w,{size:15}),e.jsx("span",{children:a.project.name}),e.jsx("small",{children:D(a)})]},a.project.id)),i.length===0&&e.jsx("div",{className:"command-empty",children:"No projects found"})]}),e.jsxs(h,{label:"Chats",children:[l.map(a=>e.jsxs("button",{className:"command-result",onClick:()=>m(a),children:[a.pinned?e.jsx(k,{size:15}):a.savedForLater?e.jsx(C,{size:15}):e.jsx(v,{size:15}),e.jsx("span",{children:a.title}),e.jsx("small",{children:a.appName??P(a.updatedAt)})]},a.id)),l.length===0&&e.jsx("div",{className:"command-empty",children:"No chats found"})]})]})]})})}function L(s,r,n){const o=[];for(const t of s)if((!r||`${t.title} ${t.appName??""}`.toLowerCase().includes(r))&&(o.push(t),o.length>=n))break;return o}function z(s,r,n){const o=[];for(const t of s)if((!r||$(t).toLowerCase().includes(r))&&(o.push(t),o.length>=n))break;return o}function $(s){return M(s)?`${s.project.name} ${s.project.path} ${s.project.workspacePath}`:`${s.project.name} ${s.project.sourceLabel??""} ${s.project.organizationName??""}`}function D(s){return f(s)?s.project.organizationName??"Cloud Project":s.project.linkedOpenPondApp?"OpenPond project":s.project.source==="git"?"Local Git":"Local folder"}function h({label:s,children:r}){return e.jsxs("div",{className:"command-group",children:[e.jsx("div",{className:"command-group-label",children:s}),r]})}export{y as CommandMenu};