@runweave/server-linux-x64 0.1.7 → 0.1.9

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 (352) hide show
  1. package/manifest.json +1487 -156
  2. package/native.tar.gz +0 -0
  3. package/package.json +1 -1
  4. package/payload/.agents/plugins/marketplace.json +20 -0
  5. package/payload/app-server/build-info.json +3 -3
  6. package/payload/app-server/index.cjs +1 -1
  7. package/payload/backend/build-info.json +4 -4
  8. package/payload/backend/index.cjs +2416 -1684
  9. package/payload/backend/ios-simulators/pool.py +3 -3
  10. package/payload/backend/scheduled-tasks-sqlite-worker.cjs +224 -171
  11. package/payload/frontend/dist/assets/{_baseUniq-i1Ki3twP.js → _baseUniq-qHFga5V8.js} +1 -1
  12. package/payload/frontend/dist/assets/{access-DK9V0f3W.js → access-DgHvmn15.js} +1 -1
  13. package/payload/frontend/dist/assets/{advanced-B13lWv1d.js → advanced-C1Fh14vw.js} +1 -1
  14. package/payload/frontend/dist/assets/{appearance-DumRYmkD.js → appearance-Bs7cSXqO.js} +1 -1
  15. package/payload/frontend/dist/assets/{arc-HKn3_xyV.js → arc-E3iYHQG_.js} +1 -1
  16. package/payload/frontend/dist/assets/{architectureDiagram-Q4EWVU46-C09x7b94.js → architectureDiagram-Q4EWVU46-DgpYpTb9.js} +1 -1
  17. package/payload/frontend/dist/assets/{blockDiagram-DXYQGD6D-CFLFTR6d.js → blockDiagram-DXYQGD6D-CfFOEKZ7.js} +1 -1
  18. package/payload/frontend/dist/assets/{c4Diagram-AHTNJAMY-8P8Q-xqC.js → c4Diagram-AHTNJAMY-BxlHBUj3.js} +1 -1
  19. package/payload/frontend/dist/assets/channel-amxyNKnk.js +1 -0
  20. package/payload/frontend/dist/assets/{chunk-4BX2VUAB-B1KEkTal.js → chunk-4BX2VUAB-xWocgDo8.js} +1 -1
  21. package/payload/frontend/dist/assets/{chunk-4TB4RGXK-Bu_Z47kJ.js → chunk-4TB4RGXK-Bl1cNICf.js} +1 -1
  22. package/payload/frontend/dist/assets/{chunk-55IACEB6-xzHVCHyi.js → chunk-55IACEB6-DVtE836u.js} +1 -1
  23. package/payload/frontend/dist/assets/{chunk-EDXVE4YY-h3HAW06h.js → chunk-EDXVE4YY-Dbd3tDCr.js} +1 -1
  24. package/payload/frontend/dist/assets/{chunk-FMBD7UC4-CQ4faPSh.js → chunk-FMBD7UC4-MPJaTsyN.js} +1 -1
  25. package/payload/frontend/dist/assets/{chunk-OYMX7WX6-CubmLoGT.js → chunk-OYMX7WX6-D3LuudlW.js} +1 -1
  26. package/payload/frontend/dist/assets/{chunk-QZHKN3VN-xk0zKNja.js → chunk-QZHKN3VN-Dn1aF6iQ.js} +1 -1
  27. package/payload/frontend/dist/assets/{chunk-YZCP3GAM-CHpTv8sd.js → chunk-YZCP3GAM-jZYbHnCw.js} +1 -1
  28. package/payload/frontend/dist/assets/classDiagram-6PBFFD2Q-B8cTijjT.js +1 -0
  29. package/payload/frontend/dist/assets/classDiagram-v2-HSJHXN6E-B8cTijjT.js +1 -0
  30. package/payload/frontend/dist/assets/clone-xzI2eGRI.js +1 -0
  31. package/payload/frontend/dist/assets/connection-V2iI-6rM.js +12 -0
  32. package/payload/frontend/dist/assets/{connections-A7InZw2T.js → connections-G_Q7342g.js} +1 -1
  33. package/payload/frontend/dist/assets/{cose-bilkent-S5V4N54A-CQn27vi_.js → cose-bilkent-S5V4N54A-75FLD3RS.js} +1 -1
  34. package/payload/frontend/dist/assets/{dagre-KV5264BT-CClOwB9v.js → dagre-KV5264BT-DEm-DpJL.js} +1 -1
  35. package/payload/frontend/dist/assets/{desktop-BgryfXXM.js → desktop-g5JC-CQd.js} +1 -1
  36. package/payload/frontend/dist/assets/{diagram-5BDNPKRD-DcUJOAmV.js → diagram-5BDNPKRD-BV6P2UTy.js} +1 -1
  37. package/payload/frontend/dist/assets/{diagram-G4DWMVQ6-DdabmTwk.js → diagram-G4DWMVQ6-DuCK-MM2.js} +1 -1
  38. package/payload/frontend/dist/assets/{diagram-MMDJMWI5-DmcxjBIk.js → diagram-MMDJMWI5-D5_GlPgO.js} +1 -1
  39. package/payload/frontend/dist/assets/{diagram-TYMM5635-BUSpXaiN.js → diagram-TYMM5635-QRbOYR1P.js} +1 -1
  40. package/payload/frontend/dist/assets/{erDiagram-SMLLAGMA-vkAXcv5_.js → erDiagram-SMLLAGMA-DefCheAw.js} +1 -1
  41. package/payload/frontend/dist/assets/{flowDiagram-DWJPFMVM-BHDU7BUJ.js → flowDiagram-DWJPFMVM-DVzyWIso.js} +1 -1
  42. package/payload/frontend/dist/assets/{ganttDiagram-T4ZO3ILL-C3lAG7_6.js → ganttDiagram-T4ZO3ILL-BJaClUEF.js} +1 -1
  43. package/payload/frontend/dist/assets/{gitGraphDiagram-UUTBAWPF-DHLyYJf7.js → gitGraphDiagram-UUTBAWPF-BLfbApNz.js} +1 -1
  44. package/payload/frontend/dist/assets/{graph-Bp5bIzXM.js → graph-C-YqFh68.js} +1 -1
  45. package/payload/frontend/dist/assets/{image-DkcKNLTV.js → image-CZo_2Awc.js} +1 -1
  46. package/payload/frontend/dist/assets/{index-BUS7FSlk.js → index-6q2aeqkt.js} +95 -105
  47. package/payload/frontend/dist/assets/{infoDiagram-42DDH7IO-CVp9zvmA.js → infoDiagram-42DDH7IO-BakVOutT.js} +1 -1
  48. package/payload/frontend/dist/assets/{ishikawaDiagram-UXIWVN3A-D07QPX3O.js → ishikawaDiagram-UXIWVN3A-D_1Oa5Dc.js} +1 -1
  49. package/payload/frontend/dist/assets/{journeyDiagram-VCZTEJTY-D-iZPDHM.js → journeyDiagram-VCZTEJTY-Y8TVFv6B.js} +1 -1
  50. package/payload/frontend/dist/assets/{kanban-definition-6JOO6SKY-BR4eWb08.js → kanban-definition-6JOO6SKY-DxeNhTIB.js} +1 -1
  51. package/payload/frontend/dist/assets/{layout-Cyv0DyJm.js → layout-5cMeOTAp.js} +1 -1
  52. package/payload/frontend/dist/assets/{linear-D5M7Pvj1.js → linear-Bnc3ev5g.js} +1 -1
  53. package/payload/frontend/dist/assets/main-3TPtEl66.js +706 -0
  54. package/payload/frontend/dist/assets/main-D4_uoZQa.css +33 -0
  55. package/payload/frontend/dist/assets/{min-BFlloFGg.js → min-BRXKkrS8.js} +1 -1
  56. package/payload/frontend/dist/assets/{mindmap-definition-QFDTVHPH-AKUF178o.js → mindmap-definition-QFDTVHPH-RYZO_BEr.js} +1 -1
  57. package/payload/frontend/dist/assets/{monitoring-B2okceCB.js → monitoring-Fv7kZ4s6.js} +1 -1
  58. package/payload/frontend/dist/assets/{notifications-0lql4_qJ.js → notifications-BzrYqyMH.js} +1 -1
  59. package/payload/frontend/dist/assets/{pieDiagram-DEJITSTG-CRiHmwn7.js → pieDiagram-DEJITSTG-Bzw0dhjz.js} +1 -1
  60. package/payload/frontend/dist/assets/{quadrantDiagram-34T5L4WZ-CzXrq7IJ.js → quadrantDiagram-34T5L4WZ-CQJY_msa.js} +1 -1
  61. package/payload/frontend/dist/assets/{record-content-DTCQKbEj.js → record-content-B7-6olQt.js} +1 -1
  62. package/payload/frontend/dist/assets/{requirementDiagram-MS252O5E-Bbn5ulLV.js → requirementDiagram-MS252O5E-DuP8hAV8.js} +1 -1
  63. package/payload/frontend/dist/assets/{sankeyDiagram-XADWPNL6-D9ZZ46pQ.js → sankeyDiagram-XADWPNL6-D-fQnCZZ.js} +1 -1
  64. package/payload/frontend/dist/assets/{sequenceDiagram-FGHM5R23-DxOP2gDa.js → sequenceDiagram-FGHM5R23-DaZNEccV.js} +1 -1
  65. package/payload/frontend/dist/assets/{stateDiagram-FHFEXIEX-NF_Qq5Cq.js → stateDiagram-FHFEXIEX-CkOLt5R1.js} +1 -1
  66. package/payload/frontend/dist/assets/stateDiagram-v2-QKLJ7IA2-atg1K4nB.js +1 -0
  67. package/payload/frontend/dist/assets/{status-2U71YpVe.js → status-CIIPajZp.js} +1 -1
  68. package/payload/frontend/dist/assets/suiji-C453W-Sg.js +1 -0
  69. package/payload/frontend/dist/assets/{svg-DpI3GSCw.js → svg-BUqAWGtg.js} +1 -1
  70. package/payload/frontend/dist/assets/{tabs-CYKuiiHg.js → tabs-Cwlp1Meu.js} +1 -1
  71. package/payload/frontend/dist/assets/{timeline-definition-GMOUNBTQ-ChEZSNF_.js → timeline-definition-GMOUNBTQ-BOKDMwHS.js} +1 -1
  72. package/payload/frontend/dist/assets/{vennDiagram-DHZGUBPP-Ch26SNbB.js → vennDiagram-DHZGUBPP-fSZjDS41.js} +1 -1
  73. package/payload/frontend/dist/assets/{wardley-RL74JXVD-D0ap5vv0.js → wardley-RL74JXVD-D1KIsvoD.js} +1 -1
  74. package/payload/frontend/dist/assets/{wardleyDiagram-NUSXRM2D-btdjsmHO.js → wardleyDiagram-NUSXRM2D-FMe67dwE.js} +1 -1
  75. package/payload/frontend/dist/assets/{xychartDiagram-5P7HB3ND-CklPtFGT.js → xychartDiagram-5P7HB3ND-B9AM9_9w.js} +1 -1
  76. package/payload/frontend/dist/build-info.json +4 -4
  77. package/payload/frontend/dist/companion.html +1 -1
  78. package/payload/frontend/dist/index.html +3 -3
  79. package/payload/packages/agent-bridge/src/install-pi.mjs +81 -0
  80. package/payload/plugins/pi/dist/SKILL.md +22 -0
  81. package/payload/plugins/pi/dist/bridge/app-server-client.cjs +82 -0
  82. package/payload/plugins/pi/dist/bridge/feishu_stop_notify.sh +169 -0
  83. package/payload/plugins/pi/dist/bridge/runweave-hook-bridge.cjs +583 -0
  84. package/payload/plugins/pi/dist/bridge/runweave-hook-completion.cjs +42 -0
  85. package/payload/plugins/pi/dist/bridge/runweave-hook-payload.cjs +578 -0
  86. package/payload/plugins/pi/dist/bridge/runweave-task-supervision.cjs +167 -0
  87. package/payload/plugins/pi/dist/runweave.js +316 -0
  88. package/payload/plugins/toolkit/.codex-plugin/plugin.json +31 -0
  89. package/payload/plugins/toolkit/README.md +185 -0
  90. package/payload/plugins/toolkit/hooks/AGENTS.md +6 -0
  91. package/payload/plugins/toolkit/hooks/app-server-client.cjs +82 -0
  92. package/payload/plugins/toolkit/hooks/feishu_stop_notify.sh +169 -0
  93. package/payload/plugins/toolkit/hooks/runweave-hook-bridge.cjs +583 -0
  94. package/payload/plugins/toolkit/hooks/runweave-hook-completion.cjs +42 -0
  95. package/payload/plugins/toolkit/hooks/runweave-hook-dispatch.cjs +123 -0
  96. package/payload/plugins/toolkit/hooks/runweave-hook-payload.cjs +578 -0
  97. package/payload/plugins/toolkit/hooks/runweave-task-supervision.cjs +167 -0
  98. package/payload/plugins/toolkit/hooks.json +108 -0
  99. package/payload/plugins/toolkit/skills/acceptance/SKILL.md +70 -0
  100. package/payload/plugins/toolkit/skills/acceptance/agents/openai.yaml +4 -0
  101. package/payload/plugins/toolkit/skills/acceptance/references/capture.md +38 -0
  102. package/payload/plugins/toolkit/skills/acceptance/references/delivery.md +54 -0
  103. package/payload/plugins/toolkit/skills/acceptance/references/gallery-contract.md +84 -0
  104. package/payload/plugins/toolkit/skills/acceptance/references/gallery-copy.md +34 -0
  105. package/payload/plugins/toolkit/skills/acceptance/references/video.md +52 -0
  106. package/payload/plugins/toolkit/skills/acceptance/scripts/capture.py +137 -0
  107. package/payload/plugins/toolkit/skills/acceptance/scripts/common.py +63 -0
  108. package/payload/plugins/toolkit/skills/acceptance/scripts/gallery.py +353 -0
  109. package/payload/plugins/toolkit/skills/acceptance/scripts/preview.py +109 -0
  110. package/payload/plugins/toolkit/skills/acceptance/scripts/video.py +283 -0
  111. package/payload/plugins/toolkit/skills/acceptance/templates/reader.css +576 -0
  112. package/payload/plugins/toolkit/skills/acceptance/templates/reader.html +63 -0
  113. package/payload/plugins/toolkit/skills/acceptance/templates/reader.js +326 -0
  114. package/payload/plugins/toolkit/skills/acceptance/templates/viewer.css +55 -0
  115. package/payload/plugins/toolkit/skills/acceptance-gallery/SKILL.md +8 -0
  116. package/payload/plugins/toolkit/skills/acceptance-gallery/agents/openai.yaml +6 -0
  117. package/payload/plugins/toolkit/skills/acceptance-gallery/references/capture-and-copy.md +3 -0
  118. package/payload/plugins/toolkit/skills/acceptance-gallery/references/content-contract.md +3 -0
  119. package/payload/plugins/toolkit/skills/acceptance-gallery/scripts/gallery.py +9 -0
  120. package/payload/plugins/toolkit/skills/acceptance-video/SKILL.md +8 -0
  121. package/payload/plugins/toolkit/skills/acceptance-video/agents/openai.yaml +6 -0
  122. package/payload/plugins/toolkit/skills/acceptance-video/references/input-and-capture.md +3 -0
  123. package/payload/plugins/toolkit/skills/acceptance-video/references/mobile-review.md +3 -0
  124. package/payload/plugins/toolkit/skills/acceptance-video/scripts/capture.py +9 -0
  125. package/payload/plugins/toolkit/skills/acceptance-video/scripts/video.py +9 -0
  126. package/payload/plugins/toolkit/skills/agent-device/SKILL.md +86 -0
  127. package/payload/plugins/toolkit/skills/agent-device/agents/openai.yaml +4 -0
  128. package/payload/plugins/toolkit/skills/agent-device/references/ios-setup.md +36 -0
  129. package/payload/plugins/toolkit/skills/agent-device/scripts/device.py +398 -0
  130. package/payload/plugins/toolkit/skills/agent-device/scripts/resources.py +248 -0
  131. package/payload/plugins/toolkit/skills/architecture-flow-prototyping/SKILL.md +128 -0
  132. package/payload/plugins/toolkit/skills/architecture-flow-prototyping/agents/openai.yaml +4 -0
  133. package/payload/plugins/toolkit/skills/architecture-flow-prototyping/references/architecture-flow-checklist.md +59 -0
  134. package/payload/plugins/toolkit/skills/architecture-flow-prototyping/references/architecture-flow-guide.md +135 -0
  135. package/payload/plugins/toolkit/skills/architecture-flow-prototyping/references/architecture-flow-handoff-template.md +57 -0
  136. package/payload/plugins/toolkit/skills/ask-first/SKILL.md +81 -0
  137. package/payload/plugins/toolkit/skills/brainstorming/SKILL.md +41 -0
  138. package/payload/plugins/toolkit/skills/browse-record/SKILL.md +35 -0
  139. package/payload/plugins/toolkit/skills/browse-record/references/app-usage.md +19 -0
  140. package/payload/plugins/toolkit/skills/browse-record/references/daily-reporting.md +115 -0
  141. package/payload/plugins/toolkit/skills/browse-record/references/zhihu.md +33 -0
  142. package/payload/plugins/toolkit/skills/browse-record/scripts/app_usage.py +110 -0
  143. package/payload/plugins/toolkit/skills/browse-record/scripts/browse_job.py +385 -0
  144. package/payload/plugins/toolkit/skills/browse-record/scripts/zhihu-read.js +126 -0
  145. package/payload/plugins/toolkit/skills/browse-record/scripts/zhihu_http.py +273 -0
  146. package/payload/plugins/toolkit/skills/clear-technical-explanations/LICENSE +21 -0
  147. package/payload/plugins/toolkit/skills/clear-technical-explanations/SKILL.md +103 -0
  148. package/payload/plugins/toolkit/skills/code-grounded-requirements/SKILL.md +54 -0
  149. package/payload/plugins/toolkit/skills/daily-doc-maintenance/SKILL.md +151 -0
  150. package/payload/plugins/toolkit/skills/daily-record/SKILL.md +63 -0
  151. package/payload/plugins/toolkit/skills/daily-record/agents/openai.yaml +4 -0
  152. package/payload/plugins/toolkit/skills/daily-record/references/browser-history.md +6 -0
  153. package/payload/plugins/toolkit/skills/daily-record/references/feishu.md +90 -0
  154. package/payload/plugins/toolkit/skills/daily-record/references/scheduled-reporting.md +144 -0
  155. package/payload/plugins/toolkit/skills/daily-record/references/scheduled-task.template.json +15 -0
  156. package/payload/plugins/toolkit/skills/daily-record/references/suiji-work-records.md +57 -0
  157. package/payload/plugins/toolkit/skills/daily-record/scripts/feishu.py +280 -0
  158. package/payload/plugins/toolkit/skills/daily-record/scripts/job.py +416 -0
  159. package/payload/plugins/toolkit/skills/daily-record/scripts/job_browser.py +77 -0
  160. package/payload/plugins/toolkit/skills/daily-record/scripts/job_facts.py +132 -0
  161. package/payload/plugins/toolkit/skills/daily-record/scripts/job_isolation.py +69 -0
  162. package/payload/plugins/toolkit/skills/daily-record/scripts/job_materials.py +154 -0
  163. package/payload/plugins/toolkit/skills/daily-record/scripts/job_screen.py +77 -0
  164. package/payload/plugins/toolkit/skills/daily-record/scripts/job_state.py +309 -0
  165. package/payload/plugins/toolkit/skills/daily-refactor/SKILL.md +101 -0
  166. package/payload/plugins/toolkit/skills/daily-refactor/scripts/compare-architecture-reports.mjs +168 -0
  167. package/payload/plugins/toolkit/skills/debugging-strategies/SKILL.md +38 -0
  168. package/payload/plugins/toolkit/skills/debugging-strategies/resources/implementation-playbook.md +520 -0
  169. package/payload/plugins/toolkit/skills/diagnostic-log-debugging/SKILL.md +79 -0
  170. package/payload/plugins/toolkit/skills/doc-coauthoring/SKILL.md +64 -0
  171. package/payload/plugins/toolkit/skills/eli5/LICENSE +21 -0
  172. package/payload/plugins/toolkit/skills/eli5/SKILL.md +18 -0
  173. package/payload/plugins/toolkit/skills/experience/SKILL.md +71 -0
  174. package/payload/plugins/toolkit/skills/experience/package.json +13 -0
  175. package/payload/plugins/toolkit/skills/git-advanced-workflows/SKILL.md +457 -0
  176. package/payload/plugins/toolkit/skills/github-pr/SKILL.md +109 -0
  177. package/payload/plugins/toolkit/skills/github-pr/scripts/github-access.mjs +292 -0
  178. package/payload/plugins/toolkit/skills/github-pr/scripts/preflight.mjs +191 -0
  179. package/payload/plugins/toolkit/skills/github-pr/scripts/source-worktree.mjs +354 -0
  180. package/payload/plugins/toolkit/skills/grill-with-docs/SKILL.md +66 -0
  181. package/payload/plugins/toolkit/skills/grill-with-docs/agents/openai.yaml +6 -0
  182. package/payload/plugins/toolkit/skills/grilling/SKILL.md +14 -0
  183. package/payload/plugins/toolkit/skills/handoff/SKILL.md +98 -0
  184. package/payload/plugins/toolkit/skills/karpathy-guidelines/SKILL.md +73 -0
  185. package/payload/plugins/toolkit/skills/playwright-cli/SKILL.md +562 -0
  186. package/payload/plugins/toolkit/skills/playwright-cli/references/element-attributes.md +23 -0
  187. package/payload/plugins/toolkit/skills/playwright-cli/references/playwright-tests.md +39 -0
  188. package/payload/plugins/toolkit/skills/playwright-cli/references/request-mocking.md +87 -0
  189. package/payload/plugins/toolkit/skills/playwright-cli/references/running-code.md +240 -0
  190. package/payload/plugins/toolkit/skills/playwright-cli/references/session-management.md +226 -0
  191. package/payload/plugins/toolkit/skills/playwright-cli/references/spec-driven-testing.md +312 -0
  192. package/payload/plugins/toolkit/skills/playwright-cli/references/storage-state.md +275 -0
  193. package/payload/plugins/toolkit/skills/playwright-cli/references/test-generation.md +138 -0
  194. package/payload/plugins/toolkit/skills/playwright-cli/references/tracing.md +142 -0
  195. package/payload/plugins/toolkit/skills/playwright-cli/references/video-recording.md +157 -0
  196. package/payload/plugins/toolkit/skills/playwright-cli/templates/standalone.config.json +7 -0
  197. package/payload/plugins/toolkit/skills/product-exploration/SKILL.md +64 -0
  198. package/payload/plugins/toolkit/skills/product-exploration/agents/openai.yaml +5 -0
  199. package/payload/plugins/toolkit/skills/prototype-first-development/SKILL.md +134 -0
  200. package/payload/plugins/toolkit/skills/prototype-first-development/references/html-prototype-template/README.md +88 -0
  201. package/payload/plugins/toolkit/skills/prototype-first-development/references/html-prototype-template/app.js +145 -0
  202. package/payload/plugins/toolkit/skills/prototype-first-development/references/html-prototype-template/index.html +229 -0
  203. package/payload/plugins/toolkit/skills/prototype-first-development/references/html-prototype-template/mock-state.json +60 -0
  204. package/payload/plugins/toolkit/skills/prototype-first-development/references/implementation-plan-handoff-template.md +61 -0
  205. package/payload/plugins/toolkit/skills/prototype-first-development/references/prototype-workflow-checklist.md +64 -0
  206. package/payload/plugins/toolkit/skills/publish-runweave-server/SKILL.md +64 -0
  207. package/payload/plugins/toolkit/skills/publish-runweave-server/agents/openai.yaml +4 -0
  208. package/payload/plugins/toolkit/skills/react-best-practices/AGENTS.md +3227 -0
  209. package/payload/plugins/toolkit/skills/react-best-practices/README.md +127 -0
  210. package/payload/plugins/toolkit/skills/react-best-practices/SKILL.md +143 -0
  211. package/payload/plugins/toolkit/skills/react-best-practices/metadata.json +15 -0
  212. package/payload/plugins/toolkit/skills/react-best-practices/rules/advanced/event-handler-refs.md +55 -0
  213. package/payload/plugins/toolkit/skills/react-best-practices/rules/advanced/init-once.md +42 -0
  214. package/payload/plugins/toolkit/skills/react-best-practices/rules/advanced/use-latest.md +39 -0
  215. package/payload/plugins/toolkit/skills/react-best-practices/rules/async/api-routes.md +38 -0
  216. package/payload/plugins/toolkit/skills/react-best-practices/rules/async/defer-await.md +80 -0
  217. package/payload/plugins/toolkit/skills/react-best-practices/rules/async/dependencies.md +52 -0
  218. package/payload/plugins/toolkit/skills/react-best-practices/rules/async/parallel.md +28 -0
  219. package/payload/plugins/toolkit/skills/react-best-practices/rules/async/suspense-boundaries.md +99 -0
  220. package/payload/plugins/toolkit/skills/react-best-practices/rules/bundle/barrel-imports.md +59 -0
  221. package/payload/plugins/toolkit/skills/react-best-practices/rules/bundle/conditional.md +37 -0
  222. package/payload/plugins/toolkit/skills/react-best-practices/rules/bundle/defer-third-party.md +49 -0
  223. package/payload/plugins/toolkit/skills/react-best-practices/rules/bundle/dynamic-imports.md +35 -0
  224. package/payload/plugins/toolkit/skills/react-best-practices/rules/bundle/preload.md +46 -0
  225. package/payload/plugins/toolkit/skills/react-best-practices/rules/client/event-listeners.md +78 -0
  226. package/payload/plugins/toolkit/skills/react-best-practices/rules/client/localstorage-schema.md +77 -0
  227. package/payload/plugins/toolkit/skills/react-best-practices/rules/client/passive-event-listeners.md +48 -0
  228. package/payload/plugins/toolkit/skills/react-best-practices/rules/client/swr-dedup.md +56 -0
  229. package/payload/plugins/toolkit/skills/react-best-practices/rules/js/batch-dom-css.md +110 -0
  230. package/payload/plugins/toolkit/skills/react-best-practices/rules/js/cache-function-results.md +80 -0
  231. package/payload/plugins/toolkit/skills/react-best-practices/rules/js/cache-property-access.md +28 -0
  232. package/payload/plugins/toolkit/skills/react-best-practices/rules/js/cache-storage.md +70 -0
  233. package/payload/plugins/toolkit/skills/react-best-practices/rules/js/combine-iterations.md +32 -0
  234. package/payload/plugins/toolkit/skills/react-best-practices/rules/js/early-exit.md +50 -0
  235. package/payload/plugins/toolkit/skills/react-best-practices/rules/js/flatmap-filter.md +55 -0
  236. package/payload/plugins/toolkit/skills/react-best-practices/rules/js/hoist-regexp.md +45 -0
  237. package/payload/plugins/toolkit/skills/react-best-practices/rules/js/index-maps.md +37 -0
  238. package/payload/plugins/toolkit/skills/react-best-practices/rules/js/length-check-first.md +50 -0
  239. package/payload/plugins/toolkit/skills/react-best-practices/rules/js/min-max-loop.md +82 -0
  240. package/payload/plugins/toolkit/skills/react-best-practices/rules/js/set-map-lookups.md +24 -0
  241. package/payload/plugins/toolkit/skills/react-best-practices/rules/js/tosorted-immutable.md +57 -0
  242. package/payload/plugins/toolkit/skills/react-best-practices/rules/meta/sections.md +46 -0
  243. package/payload/plugins/toolkit/skills/react-best-practices/rules/meta/template.md +28 -0
  244. package/payload/plugins/toolkit/skills/react-best-practices/rules/rendering/activity.md +26 -0
  245. package/payload/plugins/toolkit/skills/react-best-practices/rules/rendering/animate-svg-wrapper.md +38 -0
  246. package/payload/plugins/toolkit/skills/react-best-practices/rules/rendering/conditional-render.md +32 -0
  247. package/payload/plugins/toolkit/skills/react-best-practices/rules/rendering/content-visibility.md +38 -0
  248. package/payload/plugins/toolkit/skills/react-best-practices/rules/rendering/hoist-jsx.md +36 -0
  249. package/payload/plugins/toolkit/skills/react-best-practices/rules/rendering/hydration-no-flicker.md +72 -0
  250. package/payload/plugins/toolkit/skills/react-best-practices/rules/rendering/hydration-suppress-warning.md +26 -0
  251. package/payload/plugins/toolkit/skills/react-best-practices/rules/rendering/resource-hints.md +89 -0
  252. package/payload/plugins/toolkit/skills/react-best-practices/rules/rendering/script-defer-async.md +71 -0
  253. package/payload/plugins/toolkit/skills/react-best-practices/rules/rendering/svg-precision.md +28 -0
  254. package/payload/plugins/toolkit/skills/react-best-practices/rules/rendering/usetransition-loading.md +75 -0
  255. package/payload/plugins/toolkit/skills/react-best-practices/rules/rerender/defer-reads.md +39 -0
  256. package/payload/plugins/toolkit/skills/react-best-practices/rules/rerender/dependencies.md +45 -0
  257. package/payload/plugins/toolkit/skills/react-best-practices/rules/rerender/derived-state-no-effect.md +40 -0
  258. package/payload/plugins/toolkit/skills/react-best-practices/rules/rerender/derived-state.md +29 -0
  259. package/payload/plugins/toolkit/skills/react-best-practices/rules/rerender/functional-setstate.md +77 -0
  260. package/payload/plugins/toolkit/skills/react-best-practices/rules/rerender/lazy-state-init.md +58 -0
  261. package/payload/plugins/toolkit/skills/react-best-practices/rules/rerender/memo-with-default-value.md +36 -0
  262. package/payload/plugins/toolkit/skills/react-best-practices/rules/rerender/memo.md +44 -0
  263. package/payload/plugins/toolkit/skills/react-best-practices/rules/rerender/move-effect-to-event.md +45 -0
  264. package/payload/plugins/toolkit/skills/react-best-practices/rules/rerender/no-inline-components.md +83 -0
  265. package/payload/plugins/toolkit/skills/react-best-practices/rules/rerender/simple-expression-in-memo.md +35 -0
  266. package/payload/plugins/toolkit/skills/react-best-practices/rules/rerender/transitions.md +40 -0
  267. package/payload/plugins/toolkit/skills/react-best-practices/rules/rerender/use-ref-transient-values.md +73 -0
  268. package/payload/plugins/toolkit/skills/react-best-practices/rules/server/after-nonblocking.md +74 -0
  269. package/payload/plugins/toolkit/skills/react-best-practices/rules/server/auth-actions.md +96 -0
  270. package/payload/plugins/toolkit/skills/react-best-practices/rules/server/cache-lru.md +41 -0
  271. package/payload/plugins/toolkit/skills/react-best-practices/rules/server/cache-react.md +76 -0
  272. package/payload/plugins/toolkit/skills/react-best-practices/rules/server/dedup-props.md +65 -0
  273. package/payload/plugins/toolkit/skills/react-best-practices/rules/server/hoist-static-io.md +139 -0
  274. package/payload/plugins/toolkit/skills/react-best-practices/rules/server/parallel-fetching.md +83 -0
  275. package/payload/plugins/toolkit/skills/react-best-practices/rules/server/serialization.md +38 -0
  276. package/payload/plugins/toolkit/skills/recorded-browser-mcp-verification/SKILL.md +8 -0
  277. package/payload/plugins/toolkit/skills/recorded-browser-mcp-verification/agents/openai.yaml +6 -0
  278. package/payload/plugins/toolkit/skills/reproduce-before-fix/SKILL.md +93 -0
  279. package/payload/plugins/toolkit/skills/reproduce-before-fix/agents/openai.yaml +7 -0
  280. package/payload/plugins/toolkit/skills/review-only/SKILL.md +72 -0
  281. package/payload/plugins/toolkit/skills/review-with-runtime-evidence/SKILL.md +134 -0
  282. package/payload/plugins/toolkit/skills/review-with-runtime-evidence/agents/openai.yaml +7 -0
  283. package/payload/plugins/toolkit/skills/review-with-runtime-evidence/references/contracts.md +114 -0
  284. package/payload/plugins/toolkit/skills/review-with-runtime-evidence/scripts/classify-runtime-verdict.mjs +140 -0
  285. package/payload/plugins/toolkit/skills/review-with-runtime-evidence/scripts/run-static-review.mjs +389 -0
  286. package/payload/plugins/toolkit/skills/review-with-runtime-evidence/scripts/static-review-contract.mjs +243 -0
  287. package/payload/plugins/toolkit/skills/run-test-cases/SKILL.md +63 -0
  288. package/payload/plugins/toolkit/skills/runweave-change-validation/SKILL.md +196 -0
  289. package/payload/plugins/toolkit/skills/runweave-change-validation/agents/openai.yaml +7 -0
  290. package/payload/plugins/toolkit/skills/runweave-change-validation/scripts/assert-dev-session-status.mjs +181 -0
  291. package/payload/plugins/toolkit/skills/runweave-dev-session/SKILL.md +126 -0
  292. package/payload/plugins/toolkit/skills/runweave-dev-session/agents/openai.yaml +7 -0
  293. package/payload/plugins/toolkit/skills/runweave-management/SKILL.md +47 -0
  294. package/payload/plugins/toolkit/skills/scheduled-task/SKILL.md +35 -0
  295. package/payload/plugins/toolkit/skills/shadcn/SKILL.md +245 -0
  296. package/payload/plugins/toolkit/skills/shadcn/agents/openai.yml +5 -0
  297. package/payload/plugins/toolkit/skills/shadcn/assets/shadcn-small.png +0 -0
  298. package/payload/plugins/toolkit/skills/shadcn/assets/shadcn.png +0 -0
  299. package/payload/plugins/toolkit/skills/shadcn/cli.md +276 -0
  300. package/payload/plugins/toolkit/skills/shadcn/customization.md +209 -0
  301. package/payload/plugins/toolkit/skills/shadcn/evals/evals.json +47 -0
  302. package/payload/plugins/toolkit/skills/shadcn/mcp.md +94 -0
  303. package/payload/plugins/toolkit/skills/shadcn/rules/base-vs-radix.md +310 -0
  304. package/payload/plugins/toolkit/skills/shadcn/rules/composition.md +197 -0
  305. package/payload/plugins/toolkit/skills/shadcn/rules/forms.md +198 -0
  306. package/payload/plugins/toolkit/skills/shadcn/rules/icons.md +101 -0
  307. package/payload/plugins/toolkit/skills/shadcn/rules/styling.md +163 -0
  308. package/payload/plugins/toolkit/skills/suiji/SKILL.md +54 -0
  309. package/payload/plugins/toolkit/skills/suiji/references/api.md +72 -0
  310. package/payload/plugins/toolkit/skills/suiji/references/source-adapter.md +40 -0
  311. package/payload/plugins/toolkit/skills/suiji/references/work-records.md +36 -0
  312. package/payload/plugins/toolkit/skills/suiji/scripts/source_adapter.py +46 -0
  313. package/payload/plugins/toolkit/skills/suiji/scripts/suiji.py +358 -0
  314. package/payload/plugins/toolkit/skills/suiji/scripts/work_records.py +328 -0
  315. package/payload/plugins/toolkit/skills/suiji/scripts/work_reports.py +75 -0
  316. package/payload/plugins/toolkit/skills/sync-branch-hard-reset/SKILL.md +59 -0
  317. package/payload/plugins/toolkit/skills/update-runweave-backend/SKILL.md +90 -0
  318. package/payload/plugins/toolkit/skills/update-runweave-backend/agents/openai.yaml +4 -0
  319. package/payload/plugins/toolkit/skills/update-runweave-backend/references/npm-update.md +68 -0
  320. package/payload/plugins/toolkit/skills/update-runweave-backend/references/systemd.md +34 -0
  321. package/payload/plugins/toolkit/skills/update-runweave-desktop/SKILL.md +102 -0
  322. package/payload/plugins/toolkit/skills/update-runweave-ios/SKILL.md +16 -0
  323. package/payload/plugins/toolkit/skills/update-runweave-ios/references/ios-wireless-recovery.md +54 -0
  324. package/payload/plugins/toolkit/skills/using-rw/SKILL.md +265 -0
  325. package/payload/plugins/toolkit/skills/write-plan/SKILL.md +72 -0
  326. package/payload/plugins/toolkit/skills/write-test-cases/SKILL.md +100 -0
  327. package/payload/plugins/toolkit/skills/write-test-cases/assets/test-plan-template.yaml +15 -0
  328. package/payload/plugins/toolkit/skills/write-test-cases/references/coverage-checklist.md +75 -0
  329. package/payload/plugins/toolkit/skills/write-test-cases/references/design-techniques.md +91 -0
  330. package/payload/plugins/toolkit/skills/youtube-reading/SKILL.md +35 -0
  331. package/payload/plugins/toolkit/skills/youtube-reading/agents/openai.yaml +4 -0
  332. package/payload/plugins/toolkit/skills/youtube-reading/assets/runtime-lock.json +92 -0
  333. package/payload/plugins/toolkit/skills/youtube-reading/references/content-contract.md +52 -0
  334. package/payload/plugins/toolkit/skills/youtube-reading/references/setup.md +70 -0
  335. package/payload/plugins/toolkit/skills/youtube-reading/requirements.lock +9 -0
  336. package/payload/plugins/toolkit/skills/youtube-reading/scripts/artifacts.py +206 -0
  337. package/payload/plugins/toolkit/skills/youtube-reading/scripts/runtime.py +424 -0
  338. package/payload/plugins/toolkit/skills/youtube-reading/scripts/youtube_reading.py +314 -0
  339. package/payload/plugins/toolkit-release.json +1 -0
  340. package/payload/scripts/toolkit/codex-state.mjs +75 -0
  341. package/payload/scripts/toolkit/release.mjs +210 -0
  342. package/payload/scripts/toolkit/sync-runtime.mjs +108 -0
  343. package/payload/scripts/toolkit/sync.mjs +585 -0
  344. package/payload/frontend/dist/assets/channel-CuSisha8.js +0 -1
  345. package/payload/frontend/dist/assets/classDiagram-6PBFFD2Q-ClJkT7PY.js +0 -1
  346. package/payload/frontend/dist/assets/classDiagram-v2-HSJHXN6E-ClJkT7PY.js +0 -1
  347. package/payload/frontend/dist/assets/clone-CPcyXi9g.js +0 -1
  348. package/payload/frontend/dist/assets/connection-BhcgnOMb.js +0 -12
  349. package/payload/frontend/dist/assets/main-BDBhLSX2.js +0 -696
  350. package/payload/frontend/dist/assets/main-Cg6Oo1xK.css +0 -33
  351. package/payload/frontend/dist/assets/stateDiagram-v2-QKLJ7IA2-DhdOfEAv.js +0 -1
  352. package/payload/frontend/dist/assets/suiji-DXtfgwxj.js +0 -1
@@ -0,0 +1,108 @@
1
+ import { accessSync, constants, existsSync, readFileSync } from "node:fs";
2
+ import { spawnSync } from "node:child_process";
3
+ import { fileURLToPath } from "node:url";
4
+ import path from "node:path";
5
+
6
+ export function commandExists(command) {
7
+ return commandPath(command) !== null;
8
+ }
9
+
10
+ function commandPath(command) {
11
+ const suffixes = process.platform === "win32" ? [".exe", ".cmd", ".bat", ""] : [""];
12
+ for (const directory of (process.env.PATH || "").split(path.delimiter)) {
13
+ for (const suffix of suffixes) {
14
+ const file = path.join(directory, command + suffix);
15
+ try {
16
+ accessSync(file, constants.X_OK);
17
+ return file;
18
+ } catch { /* next PATH entry */ }
19
+ }
20
+ }
21
+ return null;
22
+ }
23
+
24
+ export function run(command, commandArgs, options = {}) {
25
+ log(`$ ${[command, ...commandArgs].map(shellQuote).join(" ")}`);
26
+ const result = runResult(command, commandArgs, {
27
+ ...options,
28
+ stdio: "inherit",
29
+ });
30
+ if (result.status !== 0) {
31
+ throw new Error(`${command} exited with status ${result.status}`);
32
+ }
33
+ }
34
+
35
+ export function runOptional(command, commandArgs, options = {}) {
36
+ log(`$ ${[command, ...commandArgs].map(shellQuote).join(" ")} || true`);
37
+ const result = runResult(command, commandArgs, options);
38
+ if (result.status !== 0) {
39
+ const output = `${result.stdout || ""}${result.stderr || ""}`.trim();
40
+ if (output) {
41
+ log(output);
42
+ }
43
+ }
44
+ }
45
+
46
+ export function runResult(command, commandArgs, options = {}) {
47
+ const resolved = process.platform === "win32" ? commandPath(command) : null;
48
+ if (resolved && /\.(cmd|bat)$/i.test(resolved)) {
49
+ // cmd expands percent variables even inside quotes. Refuse unrepresentable argv.
50
+ const values = [resolved, ...commandArgs];
51
+ if (values.some(value => /["%\r\n]/.test(value)))
52
+ throw new Error("Cannot pass quotes, percent signs or line breaks to a Windows Agent command shim");
53
+ return spawnSync("cmd.exe", ["/d", "/v:off", "/s", "/c",
54
+ `"${values.map(value => `"${value}"`).join(" ")}"`], {
55
+ cwd: options.cwd || repoRoot,
56
+ env: options.env || process.env,
57
+ encoding: "utf8",
58
+ stdio: options.stdio || "pipe",
59
+ windowsVerbatimArguments: true,
60
+ });
61
+ }
62
+ return spawnSync(command, commandArgs, {
63
+ cwd: options.cwd || repoRoot,
64
+ env: options.env || process.env,
65
+ encoding: "utf8",
66
+ stdio: options.stdio || "pipe",
67
+ });
68
+ }
69
+
70
+ export function runCapture(command, commandArgs, options = {}) {
71
+ const result = runResult(command, commandArgs, {
72
+ cwd: process.cwd(),
73
+ env: options.env || process.env,
74
+ encoding: "utf8",
75
+ stdio: "pipe",
76
+ });
77
+ if (result.status !== 0) {
78
+ if (!options.quiet) {
79
+ process.stderr.write(result.stderr || "");
80
+ process.stdout.write(result.stdout || "");
81
+ }
82
+ throw new Error(`${command} exited with status ${result.status}`);
83
+ }
84
+ return result.stdout;
85
+ }
86
+
87
+ export function readJson(filePath) {
88
+ return JSON.parse(readFileSync(filePath, "utf8"));
89
+ }
90
+
91
+ export function assertFile(filePath) {
92
+ if (!existsSync(filePath)) {
93
+ throw new Error(`Required file does not exist: ${filePath}`);
94
+ }
95
+ }
96
+
97
+ export function shellQuote(value) {
98
+ if (/^[A-Za-z0-9_./:@=+-]+$/.test(value)) {
99
+ return value;
100
+ }
101
+ return `'${value.replace(/'/g, "'\\''")}'`;
102
+ }
103
+
104
+ export function log(message) {
105
+ console.log(`[toolkit-sync] ${message}`);
106
+ }
107
+
108
+ export const repoRoot = path.resolve(fileURLToPath(new URL("../../", import.meta.url)));
@@ -0,0 +1,585 @@
1
+ #!/usr/bin/env node
2
+
3
+ import {
4
+ cpSync,
5
+ existsSync,
6
+ lstatSync,
7
+ mkdirSync,
8
+ readdirSync,
9
+ rmSync,
10
+ symlinkSync,
11
+ } from "node:fs";
12
+ import {
13
+ bridgeAssets,
14
+ installPi,
15
+ } from "../../packages/agent-bridge/src/install-pi.mjs";
16
+ import { homedir } from "node:os";
17
+ import path from "node:path";
18
+ import {
19
+ assertFile,
20
+ commandExists,
21
+ log,
22
+ readJson,
23
+ repoRoot,
24
+ run,
25
+ runCapture,
26
+ runOptional,
27
+ runResult,
28
+ } from "./sync-runtime.mjs";
29
+ import { codexReleaseInstalled, collectSessionReferencedCodexVersions } from "./codex-state.mjs";
30
+ import {
31
+ lockToolkitSync,
32
+ packageMatches,
33
+ publishToolkitRelease,
34
+ toolkitRelease,
35
+ } from "./release.mjs";
36
+
37
+ const args = new Set(process.argv.slice(2));
38
+ const packaged = args.has("--packaged");
39
+ const ifStaged = args.has("--if-staged");
40
+ const shouldStageAssets = ifStaged || args.has("--stage-cachebuster");
41
+
42
+ const pluginRelativePath = "plugins/toolkit";
43
+ const marketplaceRelativePath = ".agents/plugins/marketplace.json";
44
+ const pluginDir = path.join(repoRoot, pluginRelativePath);
45
+ const manifestPath = path.join(pluginDir, ".codex-plugin", "plugin.json");
46
+ const hooksConfigPath = path.join(pluginDir, "hooks.json");
47
+ const marketplacePath = path.join(repoRoot, marketplaceRelativePath);
48
+ const codexHome = process.env.CODEX_HOME || path.join(homedir(), ".codex");
49
+ const traeHome = path.join(homedir(), ".trae");
50
+ const publishRoot = path.join(codexHome, "plugins", "sources", "runweave");
51
+ let publishedPluginDir;
52
+ const syncDisabled = process.env.RUNWEAVE_SKIP_TOOLKIT_PLUGIN_SYNC === "1";
53
+
54
+ if (syncDisabled) {
55
+ log("RUNWEAVE_SKIP_TOOLKIT_PLUGIN_SYNC=1; skipping Toolkit plugin sync.");
56
+ process.exit(0);
57
+ }
58
+
59
+ if (ifStaged && !hasStagedToolkitChanges()) {
60
+ log("No staged Toolkit plugin changes detected; skipping sync.");
61
+ process.exit(0);
62
+ }
63
+
64
+ assertFile(manifestPath);
65
+ assertFile(hooksConfigPath);
66
+ assertFile(marketplacePath);
67
+
68
+ const marketplace = readJson(marketplacePath);
69
+ const manifest = readJson(manifestPath);
70
+ const marketplaceName = marketplace.name;
71
+ const pluginName = manifest.name;
72
+
73
+ if (!marketplaceName || !pluginName) {
74
+ throw new Error("Toolkit marketplace or plugin manifest is missing name.");
75
+ }
76
+
77
+ log(`Syncing ${pluginName}@${marketplaceName} from ${pluginRelativePath}.`);
78
+
79
+ const primaryWorktree = packaged ? repoRoot : runCapture(
80
+ "git",
81
+ ["worktree", "list", "--porcelain", "-z"],
82
+ { quiet: true },
83
+ )
84
+ .split("\0")[0]
85
+ .slice("worktree ".length);
86
+ if (ifStaged && repoRoot !== primaryWorktree) {
87
+ // A linked branch may contain an older Toolkit. A commit must not downgrade the user's global install.
88
+ await buildAgentAssets();
89
+ stageGeneratedAssets();
90
+ log(
91
+ "Linked-worktree commit: generated local assets only. Use pnpm toolkit:sync to explicitly publish this branch.",
92
+ );
93
+ process.exit(0);
94
+ }
95
+
96
+ const releaseLock = await lockToolkitSync(codexHome, log);
97
+ process.once("exit", releaseLock);
98
+
99
+ if (!packaged) await buildAgentAssets();
100
+ const piInstallation = await installPi({
101
+ agentDir:
102
+ process.env.PI_CODING_AGENT_DIR || path.join(homedir(), ".pi", "agent"),
103
+ assetsDir: path.join(repoRoot, "plugins", "pi", "dist"),
104
+ });
105
+ log(`Pi integration ${piInstallation.status}.`);
106
+ const release = toolkitRelease(repoRoot, { packaged });
107
+ publishedPluginDir = publishToolkitRelease(publishRoot, marketplace, release);
108
+ log(`Toolkit content release ${release.version}.`);
109
+
110
+ if (codexReleaseInstalled(release, { marketplaceName, pluginName, publishRoot, cacheRoot: getCodexPluginCacheRoot(pluginName, marketplaceName) })) {
111
+ log(
112
+ "Codex already has this exact Toolkit content; leaving its installation and hook approval unchanged.",
113
+ );
114
+ } else {
115
+ const codexCompatibilityVersions = collectCodexCompatibilityVersions(
116
+ pluginName,
117
+ marketplaceName,
118
+ );
119
+ const codexCacheSnapshot = snapshotCodexCompatibilityCache(
120
+ pluginName,
121
+ marketplaceName,
122
+ codexCompatibilityVersions,
123
+ );
124
+
125
+ installForCodex(pluginName, marketplaceName);
126
+ preserveCodexCompatibilityCache(
127
+ pluginName,
128
+ marketplaceName,
129
+ codexCompatibilityVersions,
130
+ codexCacheSnapshot,
131
+ );
132
+ cleanupCompatibilitySnapshot(codexCacheSnapshot);
133
+ }
134
+
135
+ if (
136
+ packageMatches(
137
+ path.join(getTraePluginCacheRoot(pluginName), release.version),
138
+ release.files,
139
+ )
140
+ ) {
141
+ log(
142
+ "Trae already has this exact Toolkit content; leaving its installation unchanged.",
143
+ );
144
+ } else {
145
+ const traeCacheSnapshot = snapshotTraeCompatibilityCache(pluginName);
146
+ try {
147
+ installForTrae(pluginName);
148
+ } finally {
149
+ preserveTraeCompatibilityCache(pluginName, traeCacheSnapshot);
150
+ cleanupCompatibilitySnapshot(traeCacheSnapshot);
151
+ }
152
+ }
153
+
154
+ stageGeneratedAssets();
155
+
156
+ function stageGeneratedAssets() {
157
+ if (shouldStageAssets) {
158
+ run("git", [
159
+ "add",
160
+ path.relative(repoRoot, hooksConfigPath),
161
+ ...bridgeAssets.flatMap((asset) => [
162
+ `plugins/toolkit/hooks/${asset}`,
163
+ `electron/resources/hooks/${asset}`,
164
+ ]),
165
+ "electron/resources/hooks/runweave-hook-dispatch.cjs",
166
+ "electron/resources/hooks/pi",
167
+ ]);
168
+ }
169
+ }
170
+
171
+ log(
172
+ "Toolkit plugin sync complete. New Codex/Trae sessions are required to load updated skills.",
173
+ );
174
+
175
+ function hasStagedToolkitChanges() {
176
+ const output = runCapture(
177
+ "git",
178
+ [
179
+ "diff",
180
+ "--cached",
181
+ "--name-only",
182
+ "--",
183
+ pluginRelativePath,
184
+ "packages/agent-bridge",
185
+ "scripts/agents",
186
+ "scripts/toolkit",
187
+ marketplaceRelativePath,
188
+ ],
189
+ { quiet: true },
190
+ )
191
+ .split("\n")
192
+ .map((line) => line.trim())
193
+ .filter(Boolean);
194
+
195
+ return output.length > 0;
196
+ }
197
+
198
+ async function buildAgentAssets() {
199
+ const { buildAgentAssets: build } = await import("../agents/build.mjs");
200
+ await build();
201
+ }
202
+
203
+
204
+ function installForCodex(pluginName, marketplaceName) {
205
+ if (!commandExists("codex")) {
206
+ log("codex not found; skipping Codex plugin install.");
207
+ return;
208
+ }
209
+
210
+ ensureCodexMarketplace(pluginName, marketplaceName);
211
+ run("codex", ["plugin", "add", `${pluginName}@${marketplaceName}`]);
212
+ const listing = runCapture("codex", ["plugin", "list", "--json"], {
213
+ quiet: true,
214
+ });
215
+ if (!listing.includes(`${pluginName}@${marketplaceName}`)) {
216
+ throw new Error(
217
+ `Codex plugin list does not include ${pluginName}@${marketplaceName}.`,
218
+ );
219
+ }
220
+ }
221
+
222
+ function collectCodexCompatibilityVersions(pluginName, marketplaceName) {
223
+ const versions = new Set();
224
+ addVersion(versions, manifest.version);
225
+
226
+ const cacheRoot = getCodexPluginCacheRoot(pluginName, marketplaceName);
227
+ for (const entry of listDirectoryNames(cacheRoot)) {
228
+ addVersion(versions, entry);
229
+ }
230
+ for (const version of collectSessionReferencedCodexVersions(
231
+ pluginName,
232
+ marketplaceName,
233
+ codexHome,
234
+ )) {
235
+ addVersion(versions, version);
236
+ }
237
+
238
+ const manifestRevisions = packaged ? [] : runCapture(
239
+ "git",
240
+ ["log", "--format=%H", "--", path.relative(repoRoot, manifestPath)],
241
+ { quiet: true },
242
+ )
243
+ .split("\n")
244
+ .map((line) => line.trim())
245
+ .filter(Boolean)
246
+ .slice(0, 20);
247
+ for (const revision of manifestRevisions) {
248
+ const content = runCapture(
249
+ "git",
250
+ ["show", `${revision}:${path.relative(repoRoot, manifestPath)}`],
251
+ { quiet: true },
252
+ );
253
+ addVersion(versions, parseJsonVersion(content));
254
+ }
255
+
256
+ return versions;
257
+ }
258
+
259
+
260
+ function preserveCodexCompatibilityCache(
261
+ pluginName,
262
+ marketplaceName,
263
+ compatibilityVersions,
264
+ cacheSnapshot,
265
+ ) {
266
+ const currentVersion = readJson(
267
+ path.join(publishedPluginDir, ".codex-plugin/plugin.json"),
268
+ ).version;
269
+ if (!currentVersion) {
270
+ throw new Error("Toolkit plugin manifest is missing version.");
271
+ }
272
+
273
+ const cacheRoot = getCodexPluginCacheRoot(pluginName, marketplaceName);
274
+ const currentCachePath = path.join(cacheRoot, currentVersion);
275
+ if (!existsSync(currentCachePath)) {
276
+ log(
277
+ `Codex plugin cache ${currentCachePath} does not exist; skipping compatibility cache aliases.`,
278
+ );
279
+ return;
280
+ }
281
+
282
+ updateCodexLatestCacheAlias(cacheRoot, currentCachePath);
283
+
284
+ for (const version of compatibilityVersions) {
285
+ if (version === currentVersion) {
286
+ continue;
287
+ }
288
+
289
+ const versionPath = path.join(cacheRoot, version);
290
+ if (
291
+ !restoreCodexCompatibilityCacheVersion(
292
+ versionPath,
293
+ cacheSnapshot?.snapshots?.get(version),
294
+ currentCachePath,
295
+ version,
296
+ )
297
+ ) {
298
+ continue;
299
+ }
300
+ }
301
+ }
302
+
303
+ function snapshotCodexCompatibilityCache(
304
+ pluginName,
305
+ marketplaceName,
306
+ compatibilityVersions,
307
+ ) {
308
+ const cacheRoot = getCodexPluginCacheRoot(pluginName, marketplaceName);
309
+ const snapshotRoot = path.join(
310
+ codexHome,
311
+ ".tmp",
312
+ `toolkit-cache-snapshot-${Date.now()}-${process.pid}`,
313
+ );
314
+ const snapshots = new Map();
315
+
316
+ for (const version of compatibilityVersions) {
317
+ const sourcePath = path.join(cacheRoot, version);
318
+ const sourceState = getPathState(sourcePath);
319
+ if (sourceState !== "directory" && sourceState !== "symlink") {
320
+ continue;
321
+ }
322
+
323
+ mkdirSync(snapshotRoot, { recursive: true });
324
+ const snapshotPath = path.join(snapshotRoot, version);
325
+ try {
326
+ cpSync(sourcePath, snapshotPath, {
327
+ recursive: true,
328
+ dereference: true,
329
+ force: true,
330
+ });
331
+ snapshots.set(version, snapshotPath);
332
+ log(`Snapshotted Codex plugin cache ${version}.`);
333
+ } catch (error) {
334
+ log(`Failed to snapshot Codex plugin cache ${version}: ${error.message}`);
335
+ }
336
+ }
337
+
338
+ if (snapshots.size === 0) {
339
+ rmSync(snapshotRoot, { recursive: true, force: true });
340
+ return { root: null, snapshots };
341
+ }
342
+
343
+ return { root: snapshotRoot, snapshots };
344
+ }
345
+
346
+ function restoreCodexCompatibilityCacheVersion(
347
+ versionPath,
348
+ snapshotPath,
349
+ currentCachePath,
350
+ version,
351
+ ) {
352
+ const versionState = getPathState(versionPath);
353
+ if (versionState === "directory") {
354
+ log(`Keeping existing Codex compatibility cache ${version}.`);
355
+ return true;
356
+ }
357
+ if (versionState === "symlink") {
358
+ rmSync(versionPath, { force: true });
359
+ } else if (versionState === "other") {
360
+ log(`Skipping compatibility cache over non-directory ${versionPath}.`);
361
+ return false;
362
+ }
363
+
364
+ const sourcePath =
365
+ typeof snapshotPath === "string" && existsSync(snapshotPath)
366
+ ? snapshotPath
367
+ : currentCachePath;
368
+ cpSync(sourcePath, versionPath, {
369
+ recursive: true,
370
+ dereference: true,
371
+ force: true,
372
+ });
373
+
374
+ if (sourcePath === currentCachePath) {
375
+ log(`Backfilled Codex compatibility cache ${version} from current cache.`);
376
+ } else {
377
+ log(`Restored historical Codex compatibility cache ${version}.`);
378
+ }
379
+ return true;
380
+ }
381
+
382
+ function updateCodexLatestCacheAlias(cacheRoot, currentCachePath) {
383
+ const latestPath = path.join(cacheRoot, "latest");
384
+ const latestState = getPathState(latestPath);
385
+ if (latestState !== "missing") {
386
+ rmSync(latestPath, { recursive: true, force: true });
387
+ }
388
+ symlinkSync(currentCachePath, latestPath, process.platform === "win32" ? "junction" : "dir");
389
+ }
390
+
391
+ function cleanupCompatibilitySnapshot(cacheSnapshot) {
392
+ if (!cacheSnapshot?.root) {
393
+ return;
394
+ }
395
+ rmSync(cacheSnapshot.root, { recursive: true, force: true });
396
+ }
397
+
398
+ function getCodexPluginCacheRoot(pluginName, marketplaceName) {
399
+ return path.join(codexHome, "plugins", "cache", marketplaceName, pluginName);
400
+ }
401
+
402
+ function snapshotTraeCompatibilityCache(pluginName) {
403
+ const cacheRoot = getTraePluginCacheRoot(pluginName);
404
+ const snapshotRoot = path.join(
405
+ traeHome,
406
+ ".tmp",
407
+ `toolkit-cache-snapshot-${Date.now()}-${process.pid}`,
408
+ );
409
+ const versions = new Set();
410
+ const snapshots = new Map();
411
+
412
+ for (const entry of listDirectoryNames(cacheRoot)) {
413
+ addVersion(versions, entry);
414
+ }
415
+ for (const version of versions) {
416
+ const sourcePath = path.join(cacheRoot, version);
417
+ const sourceState = getPathState(sourcePath);
418
+ if (sourceState !== "directory" && sourceState !== "symlink") {
419
+ continue;
420
+ }
421
+
422
+ mkdirSync(snapshotRoot, { recursive: true });
423
+ const snapshotPath = path.join(snapshotRoot, version);
424
+ try {
425
+ cpSync(sourcePath, snapshotPath, {
426
+ recursive: true,
427
+ dereference: true,
428
+ force: true,
429
+ });
430
+ snapshots.set(version, snapshotPath);
431
+ log(`Snapshotted Trae plugin cache ${version}.`);
432
+ } catch (error) {
433
+ rmSync(snapshotRoot, { recursive: true, force: true });
434
+ throw new Error(
435
+ `Failed to snapshot Trae plugin cache ${version}: ${error.message}`,
436
+ );
437
+ }
438
+ }
439
+
440
+ if (snapshots.size === 0) {
441
+ rmSync(snapshotRoot, { recursive: true, force: true });
442
+ return { root: null, snapshots };
443
+ }
444
+ return { root: snapshotRoot, snapshots };
445
+ }
446
+
447
+ function preserveTraeCompatibilityCache(pluginName, cacheSnapshot) {
448
+ const currentVersion = readJson(
449
+ path.join(publishedPluginDir, ".codex-plugin/plugin.json"),
450
+ ).version;
451
+ if (!currentVersion) {
452
+ throw new Error("Toolkit plugin manifest is missing version.");
453
+ }
454
+
455
+ const cacheRoot = getTraePluginCacheRoot(pluginName);
456
+ for (const [version, snapshotPath] of cacheSnapshot.snapshots) {
457
+ if (version === currentVersion) {
458
+ continue;
459
+ }
460
+
461
+ const versionPath = path.join(cacheRoot, version);
462
+ const versionState = getPathState(versionPath);
463
+ if (versionState === "directory") {
464
+ log(`Keeping existing Trae compatibility cache ${version}.`);
465
+ continue;
466
+ }
467
+ if (versionState === "symlink") {
468
+ rmSync(versionPath, { force: true });
469
+ } else if (versionState === "other") {
470
+ log(`Skipping compatibility cache over non-directory ${versionPath}.`);
471
+ continue;
472
+ }
473
+
474
+ mkdirSync(cacheRoot, { recursive: true });
475
+ cpSync(snapshotPath, versionPath, {
476
+ recursive: true,
477
+ dereference: true,
478
+ force: true,
479
+ });
480
+ log(`Restored historical Trae compatibility cache ${version}.`);
481
+ }
482
+ }
483
+
484
+ function getTraePluginCacheRoot(pluginName) {
485
+ return path.join(traeHome, "plugins", "cache", "local", pluginName);
486
+ }
487
+
488
+ function listDirectoryNames(directoryPath) {
489
+ if (!existsSync(directoryPath)) {
490
+ return [];
491
+ }
492
+ return readdirSync(directoryPath);
493
+ }
494
+
495
+ function addVersion(versions, version) {
496
+ if (
497
+ typeof version === "string" &&
498
+ /^[0-9]+\.[0-9]+\.[0-9]+\+codex\.(?:[0-9]+|[a-f0-9]{64})$/.test(version)
499
+ ) {
500
+ versions.add(version);
501
+ }
502
+ }
503
+
504
+ function parseJsonVersion(content) {
505
+ try {
506
+ return JSON.parse(content).version;
507
+ } catch {
508
+ return null;
509
+ }
510
+ }
511
+
512
+ function getPathState(targetPath) {
513
+ try {
514
+ const stats = lstatSync(targetPath);
515
+ if (stats.isSymbolicLink()) {
516
+ return "symlink";
517
+ }
518
+ if (stats.isDirectory()) {
519
+ return "directory";
520
+ }
521
+ return "other";
522
+ } catch {
523
+ return "missing";
524
+ }
525
+ }
526
+
527
+ function ensureCodexMarketplace(pluginName, marketplaceName) {
528
+ const addResult = runResult("codex", [
529
+ "plugin",
530
+ "marketplace",
531
+ "add",
532
+ publishRoot,
533
+ ]);
534
+ if (addResult.status === 0) {
535
+ return;
536
+ }
537
+
538
+ const output = `${addResult.stdout}\n${addResult.stderr}`;
539
+ if (!output.includes("is already added from a different source")) {
540
+ process.stdout.write(addResult.stdout || "");
541
+ process.stderr.write(addResult.stderr || "");
542
+ throw new Error(`codex exited with status ${addResult.status}`);
543
+ }
544
+
545
+ log(
546
+ `Moving Codex marketplace ${marketplaceName} to its shared, worktree-independent release source.`,
547
+ );
548
+ runOptional("codex", [
549
+ "plugin",
550
+ "remove",
551
+ `${pluginName}@${marketplaceName}`,
552
+ ]);
553
+ runOptional("codex", ["plugin", "marketplace", "remove", marketplaceName]);
554
+ run("codex", ["plugin", "marketplace", "add", publishRoot]);
555
+ }
556
+
557
+ function installForTrae(pluginName) {
558
+ const traeCommand = commandExists("traecli")
559
+ ? "traecli"
560
+ : commandExists("traex")
561
+ ? "traex"
562
+ : null;
563
+
564
+ if (!traeCommand) {
565
+ log("traecli/traex not found; skipping Trae plugin install.");
566
+ return;
567
+ }
568
+
569
+ run(traeCommand, [
570
+ "plugin",
571
+ "install",
572
+ "--type",
573
+ "local",
574
+ "--name",
575
+ pluginName,
576
+ "--marketplace-name",
577
+ "local",
578
+ "--yes",
579
+ publishedPluginDir,
580
+ ]);
581
+ const listing = runCapture(traeCommand, ["plugin", "list"], { quiet: true });
582
+ if (!listing.includes(`${pluginName}@local`)) {
583
+ throw new Error(`Trae plugin list does not include ${pluginName}@local.`);
584
+ }
585
+ }
@@ -1 +0,0 @@
1
- import{U as a,M as n}from"./index-BUS7FSlk.js";const t=(r,o)=>a.lang.round(n.parse(r)[o]);export{t as c};
@@ -1 +0,0 @@
1
- import{s as a,c as s,a as e,C as t}from"./chunk-4TB4RGXK-Bu_Z47kJ.js";import{_ as i}from"./index-BUS7FSlk.js";import"./chunk-FMBD7UC4-CQ4faPSh.js";import"./chunk-YZCP3GAM-CHpTv8sd.js";import"./chunk-55IACEB6-xzHVCHyi.js";import"./chunk-EDXVE4YY-h3HAW06h.js";import"./main-BDBhLSX2.js";import"./index-D9-cSGu-.js";import"./record-content-DTCQKbEj.js";var b={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{b as diagram};
@@ -1 +0,0 @@
1
- import{s as a,c as s,a as e,C as t}from"./chunk-4TB4RGXK-Bu_Z47kJ.js";import{_ as i}from"./index-BUS7FSlk.js";import"./chunk-FMBD7UC4-CQ4faPSh.js";import"./chunk-YZCP3GAM-CHpTv8sd.js";import"./chunk-55IACEB6-xzHVCHyi.js";import"./chunk-EDXVE4YY-h3HAW06h.js";import"./main-BDBhLSX2.js";import"./index-D9-cSGu-.js";import"./record-content-DTCQKbEj.js";var b={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{b as diagram};
@@ -1 +0,0 @@
1
- import{b as r}from"./graph-Bp5bIzXM.js";var e=4;function a(o){return r(o,e)}export{a as c};