@prismer/runtime 2.0.7 → 2.2.55

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 (291) hide show
  1. package/CHANGELOG.md +3631 -0
  2. package/README.md +34 -12
  3. package/apc/skills/FIELD-DICTIONARY.md +111 -0
  4. package/apc/skills/bug-reproduce/SKILL.md +150 -0
  5. package/apc/skills/bug-reproduce/skill.json +96 -0
  6. package/apc/skills/code-review/SKILL.md +198 -0
  7. package/apc/skills/code-review/skill.json +124 -0
  8. package/apc/skills/design-review/SKILL.md +122 -0
  9. package/apc/skills/design-review/skill.json +88 -0
  10. package/apc/skills/doc-sync/SKILL.md +168 -0
  11. package/apc/skills/doc-sync/skill.json +81 -0
  12. package/apc/skills/env-doctor/SKILL.md +194 -0
  13. package/apc/skills/env-doctor/skill.json +209 -0
  14. package/apc/skills/git-ops/SKILL.md +189 -0
  15. package/apc/skills/git-ops/skill.json +94 -0
  16. package/apc/skills/impact-trace/SKILL.md +168 -0
  17. package/apc/skills/impact-trace/skill.json +104 -0
  18. package/apc/skills/observability/SKILL.md +195 -0
  19. package/apc/skills/observability/skill.json +116 -0
  20. package/apc/skills/release-db-config-sync/SKILL.md +186 -0
  21. package/apc/skills/release-db-config-sync/skill.json +109 -0
  22. package/apc/skills/release-ota-promote/SKILL.md +195 -0
  23. package/apc/skills/release-ota-promote/skill.json +176 -0
  24. package/apc/skills/release-preflight/SKILL.md +174 -0
  25. package/apc/skills/release-preflight/skill.json +175 -0
  26. package/apc/skills/release-rollback/SKILL.md +214 -0
  27. package/apc/skills/release-rollback/skill.json +230 -0
  28. package/apc/skills/release-tag/SKILL.md +194 -0
  29. package/apc/skills/release-tag/skill.json +94 -0
  30. package/apc/skills/releasing-prod/SKILL.md +49 -0
  31. package/apc/skills/releasing-test/SKILL.md +135 -0
  32. package/apc/skills/sdk-release/SKILL.md +200 -0
  33. package/apc/skills/spec-intake/SKILL.md +169 -0
  34. package/apc/skills/spec-intake/skill.json +93 -0
  35. package/apc/skills/test-result-feedback/SKILL.md +239 -0
  36. package/apc/skills/test-result-feedback/skill.json +193 -0
  37. package/apc/skills/test-runner/SKILL.md +169 -0
  38. package/apc/skills/test-runner/skill.json +103 -0
  39. package/apc/skills/ui-align/SKILL.md +209 -0
  40. package/apc/skills/ui-align/skill.json +114 -0
  41. package/apc/skills/ui-canvas/SKILL.md +148 -0
  42. package/apc/skills/ui-canvas/skill.json +127 -0
  43. package/built-in-skills/agent-coordination/SKILL.md +257 -0
  44. package/built-in-skills/agent-meta/SKILL.md +53 -0
  45. package/built-in-skills/assets/SKILL.md +133 -0
  46. package/built-in-skills/browser-use/SKILL.md +93 -0
  47. package/built-in-skills/canvas-design/LICENSE.txt +202 -0
  48. package/built-in-skills/canvas-design/SKILL.md +157 -0
  49. package/built-in-skills/canvas-design/canvas-fonts/ArsenalSC-OFL.txt +93 -0
  50. package/built-in-skills/canvas-design/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
  51. package/built-in-skills/canvas-design/canvas-fonts/BigShoulders-Bold.ttf +0 -0
  52. package/built-in-skills/canvas-design/canvas-fonts/BigShoulders-OFL.txt +93 -0
  53. package/built-in-skills/canvas-design/canvas-fonts/BigShoulders-Regular.ttf +0 -0
  54. package/built-in-skills/canvas-design/canvas-fonts/Boldonse-OFL.txt +93 -0
  55. package/built-in-skills/canvas-design/canvas-fonts/Boldonse-Regular.ttf +0 -0
  56. package/built-in-skills/canvas-design/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
  57. package/built-in-skills/canvas-design/canvas-fonts/BricolageGrotesque-OFL.txt +93 -0
  58. package/built-in-skills/canvas-design/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
  59. package/built-in-skills/canvas-design/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
  60. package/built-in-skills/canvas-design/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
  61. package/built-in-skills/canvas-design/canvas-fonts/CrimsonPro-OFL.txt +93 -0
  62. package/built-in-skills/canvas-design/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
  63. package/built-in-skills/canvas-design/canvas-fonts/DMMono-OFL.txt +93 -0
  64. package/built-in-skills/canvas-design/canvas-fonts/DMMono-Regular.ttf +0 -0
  65. package/built-in-skills/canvas-design/canvas-fonts/EricaOne-OFL.txt +94 -0
  66. package/built-in-skills/canvas-design/canvas-fonts/EricaOne-Regular.ttf +0 -0
  67. package/built-in-skills/canvas-design/canvas-fonts/GeistMono-Bold.ttf +0 -0
  68. package/built-in-skills/canvas-design/canvas-fonts/GeistMono-OFL.txt +93 -0
  69. package/built-in-skills/canvas-design/canvas-fonts/GeistMono-Regular.ttf +0 -0
  70. package/built-in-skills/canvas-design/canvas-fonts/Gloock-OFL.txt +93 -0
  71. package/built-in-skills/canvas-design/canvas-fonts/Gloock-Regular.ttf +0 -0
  72. package/built-in-skills/canvas-design/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
  73. package/built-in-skills/canvas-design/canvas-fonts/IBMPlexMono-OFL.txt +93 -0
  74. package/built-in-skills/canvas-design/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
  75. package/built-in-skills/canvas-design/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
  76. package/built-in-skills/canvas-design/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
  77. package/built-in-skills/canvas-design/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
  78. package/built-in-skills/canvas-design/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
  79. package/built-in-skills/canvas-design/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
  80. package/built-in-skills/canvas-design/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
  81. package/built-in-skills/canvas-design/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
  82. package/built-in-skills/canvas-design/canvas-fonts/InstrumentSans-OFL.txt +93 -0
  83. package/built-in-skills/canvas-design/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
  84. package/built-in-skills/canvas-design/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
  85. package/built-in-skills/canvas-design/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
  86. package/built-in-skills/canvas-design/canvas-fonts/Italiana-OFL.txt +93 -0
  87. package/built-in-skills/canvas-design/canvas-fonts/Italiana-Regular.ttf +0 -0
  88. package/built-in-skills/canvas-design/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
  89. package/built-in-skills/canvas-design/canvas-fonts/JetBrainsMono-OFL.txt +93 -0
  90. package/built-in-skills/canvas-design/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
  91. package/built-in-skills/canvas-design/canvas-fonts/Jura-Light.ttf +0 -0
  92. package/built-in-skills/canvas-design/canvas-fonts/Jura-Medium.ttf +0 -0
  93. package/built-in-skills/canvas-design/canvas-fonts/Jura-OFL.txt +93 -0
  94. package/built-in-skills/canvas-design/canvas-fonts/LibreBaskerville-OFL.txt +93 -0
  95. package/built-in-skills/canvas-design/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
  96. package/built-in-skills/canvas-design/canvas-fonts/Lora-Bold.ttf +0 -0
  97. package/built-in-skills/canvas-design/canvas-fonts/Lora-BoldItalic.ttf +0 -0
  98. package/built-in-skills/canvas-design/canvas-fonts/Lora-Italic.ttf +0 -0
  99. package/built-in-skills/canvas-design/canvas-fonts/Lora-OFL.txt +93 -0
  100. package/built-in-skills/canvas-design/canvas-fonts/Lora-Regular.ttf +0 -0
  101. package/built-in-skills/canvas-design/canvas-fonts/NationalPark-Bold.ttf +0 -0
  102. package/built-in-skills/canvas-design/canvas-fonts/NationalPark-OFL.txt +93 -0
  103. package/built-in-skills/canvas-design/canvas-fonts/NationalPark-Regular.ttf +0 -0
  104. package/built-in-skills/canvas-design/canvas-fonts/NothingYouCouldDo-OFL.txt +93 -0
  105. package/built-in-skills/canvas-design/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
  106. package/built-in-skills/canvas-design/canvas-fonts/Outfit-Bold.ttf +0 -0
  107. package/built-in-skills/canvas-design/canvas-fonts/Outfit-OFL.txt +93 -0
  108. package/built-in-skills/canvas-design/canvas-fonts/Outfit-Regular.ttf +0 -0
  109. package/built-in-skills/canvas-design/canvas-fonts/PixelifySans-Medium.ttf +0 -0
  110. package/built-in-skills/canvas-design/canvas-fonts/PixelifySans-OFL.txt +93 -0
  111. package/built-in-skills/canvas-design/canvas-fonts/PoiretOne-OFL.txt +93 -0
  112. package/built-in-skills/canvas-design/canvas-fonts/PoiretOne-Regular.ttf +0 -0
  113. package/built-in-skills/canvas-design/canvas-fonts/RedHatMono-Bold.ttf +0 -0
  114. package/built-in-skills/canvas-design/canvas-fonts/RedHatMono-OFL.txt +93 -0
  115. package/built-in-skills/canvas-design/canvas-fonts/RedHatMono-Regular.ttf +0 -0
  116. package/built-in-skills/canvas-design/canvas-fonts/Silkscreen-OFL.txt +93 -0
  117. package/built-in-skills/canvas-design/canvas-fonts/Silkscreen-Regular.ttf +0 -0
  118. package/built-in-skills/canvas-design/canvas-fonts/SmoochSans-Medium.ttf +0 -0
  119. package/built-in-skills/canvas-design/canvas-fonts/SmoochSans-OFL.txt +93 -0
  120. package/built-in-skills/canvas-design/canvas-fonts/Tektur-Medium.ttf +0 -0
  121. package/built-in-skills/canvas-design/canvas-fonts/Tektur-OFL.txt +93 -0
  122. package/built-in-skills/canvas-design/canvas-fonts/Tektur-Regular.ttf +0 -0
  123. package/built-in-skills/canvas-design/canvas-fonts/WorkSans-Bold.ttf +0 -0
  124. package/built-in-skills/canvas-design/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
  125. package/built-in-skills/canvas-design/canvas-fonts/WorkSans-Italic.ttf +0 -0
  126. package/built-in-skills/canvas-design/canvas-fonts/WorkSans-OFL.txt +93 -0
  127. package/built-in-skills/canvas-design/canvas-fonts/WorkSans-Regular.ttf +0 -0
  128. package/built-in-skills/canvas-design/canvas-fonts/YoungSerif-OFL.txt +93 -0
  129. package/built-in-skills/canvas-design/canvas-fonts/YoungSerif-Regular.ttf +0 -0
  130. package/built-in-skills/claim-agent-ownership/SKILL.md +255 -0
  131. package/built-in-skills/claude-api/LICENSE.txt +202 -0
  132. package/built-in-skills/claude-api/SKILL.md +325 -0
  133. package/built-in-skills/claude-api/csharp/claude-api.md +402 -0
  134. package/built-in-skills/claude-api/curl/examples.md +216 -0
  135. package/built-in-skills/claude-api/curl/managed-agents.md +336 -0
  136. package/built-in-skills/claude-api/go/claude-api.md +421 -0
  137. package/built-in-skills/claude-api/go/managed-agents/README.md +561 -0
  138. package/built-in-skills/claude-api/java/claude-api.md +432 -0
  139. package/built-in-skills/claude-api/java/managed-agents/README.md +442 -0
  140. package/built-in-skills/claude-api/php/claude-api.md +375 -0
  141. package/built-in-skills/claude-api/php/managed-agents/README.md +435 -0
  142. package/built-in-skills/claude-api/python/claude-api/README.md +420 -0
  143. package/built-in-skills/claude-api/python/claude-api/batches.md +185 -0
  144. package/built-in-skills/claude-api/python/claude-api/files-api.md +165 -0
  145. package/built-in-skills/claude-api/python/claude-api/streaming.md +162 -0
  146. package/built-in-skills/claude-api/python/claude-api/tool-use.md +590 -0
  147. package/built-in-skills/claude-api/python/managed-agents/README.md +332 -0
  148. package/built-in-skills/claude-api/ruby/claude-api.md +113 -0
  149. package/built-in-skills/claude-api/ruby/managed-agents/README.md +389 -0
  150. package/built-in-skills/claude-api/shared/agent-design.md +101 -0
  151. package/built-in-skills/claude-api/shared/error-codes.md +213 -0
  152. package/built-in-skills/claude-api/shared/live-sources.md +135 -0
  153. package/built-in-skills/claude-api/shared/managed-agents-api-reference.md +378 -0
  154. package/built-in-skills/claude-api/shared/managed-agents-client-patterns.md +209 -0
  155. package/built-in-skills/claude-api/shared/managed-agents-core.md +238 -0
  156. package/built-in-skills/claude-api/shared/managed-agents-environments.md +215 -0
  157. package/built-in-skills/claude-api/shared/managed-agents-events.md +195 -0
  158. package/built-in-skills/claude-api/shared/managed-agents-memory.md +197 -0
  159. package/built-in-skills/claude-api/shared/managed-agents-multiagent.md +99 -0
  160. package/built-in-skills/claude-api/shared/managed-agents-onboarding.md +114 -0
  161. package/built-in-skills/claude-api/shared/managed-agents-outcomes.md +106 -0
  162. package/built-in-skills/claude-api/shared/managed-agents-overview.md +68 -0
  163. package/built-in-skills/claude-api/shared/managed-agents-self-hosted-sandboxes.md +173 -0
  164. package/built-in-skills/claude-api/shared/managed-agents-tools.md +321 -0
  165. package/built-in-skills/claude-api/shared/managed-agents-webhooks.md +110 -0
  166. package/built-in-skills/claude-api/shared/model-migration.md +779 -0
  167. package/built-in-skills/claude-api/shared/models.md +121 -0
  168. package/built-in-skills/claude-api/shared/prompt-caching.md +171 -0
  169. package/built-in-skills/claude-api/shared/tool-use-concepts.md +327 -0
  170. package/built-in-skills/claude-api/typescript/claude-api/README.md +333 -0
  171. package/built-in-skills/claude-api/typescript/claude-api/batches.md +106 -0
  172. package/built-in-skills/claude-api/typescript/claude-api/files-api.md +98 -0
  173. package/built-in-skills/claude-api/typescript/claude-api/streaming.md +178 -0
  174. package/built-in-skills/claude-api/typescript/claude-api/tool-use.md +527 -0
  175. package/built-in-skills/claude-api/typescript/managed-agents/README.md +359 -0
  176. package/built-in-skills/codebase-design/DEEPENING.md +37 -0
  177. package/built-in-skills/codebase-design/DESIGN-IT-TWICE.md +44 -0
  178. package/built-in-skills/codebase-design/LICENSE +21 -0
  179. package/built-in-skills/codebase-design/SKILL.md +116 -0
  180. package/built-in-skills/conversation-compaction/SKILL.md +114 -0
  181. package/built-in-skills/council-creator/SKILL.md +426 -0
  182. package/built-in-skills/diagnosing-bugs/LICENSE +21 -0
  183. package/built-in-skills/diagnosing-bugs/SKILL.md +136 -0
  184. package/built-in-skills/diagnosing-bugs/scripts/hitl-loop.template.sh +41 -0
  185. package/built-in-skills/doc-coauthoring/SKILL.md +376 -0
  186. package/built-in-skills/document-generation/SKILL.md +105 -0
  187. package/built-in-skills/domain-modeling/ADR-FORMAT.md +47 -0
  188. package/built-in-skills/domain-modeling/CONTEXT-FORMAT.md +60 -0
  189. package/built-in-skills/domain-modeling/LICENSE +21 -0
  190. package/built-in-skills/domain-modeling/SKILL.md +76 -0
  191. package/built-in-skills/frontend-design/LICENSE.txt +177 -0
  192. package/built-in-skills/frontend-design/SKILL.md +43 -0
  193. package/built-in-skills/human-approval/SKILL.md +129 -0
  194. package/built-in-skills/image-generate/SKILL.md +128 -0
  195. package/built-in-skills/image-generate/scripts/generate-and-deliver.mjs +289 -0
  196. package/built-in-skills/ingest/SKILL.md +73 -0
  197. package/built-in-skills/internal-comms/LICENSE.txt +202 -0
  198. package/built-in-skills/internal-comms/SKILL.md +33 -0
  199. package/built-in-skills/internal-comms/examples/3p-updates.md +47 -0
  200. package/built-in-skills/internal-comms/examples/company-newsletter.md +65 -0
  201. package/built-in-skills/internal-comms/examples/faq-answers.md +30 -0
  202. package/built-in-skills/internal-comms/examples/general-comms.md +16 -0
  203. package/built-in-skills/liteparse/SKILL.md +176 -0
  204. package/built-in-skills/mcp-builder/LICENSE.txt +202 -0
  205. package/built-in-skills/mcp-builder/SKILL.md +237 -0
  206. package/built-in-skills/mcp-builder/reference/evaluation.md +602 -0
  207. package/built-in-skills/mcp-builder/reference/mcp_best_practices.md +249 -0
  208. package/built-in-skills/mcp-builder/reference/node_mcp_server.md +970 -0
  209. package/built-in-skills/mcp-builder/reference/python_mcp_server.md +719 -0
  210. package/built-in-skills/mcp-builder/scripts/connections.py +151 -0
  211. package/built-in-skills/mcp-builder/scripts/evaluation.py +373 -0
  212. package/built-in-skills/mcp-builder/scripts/example_evaluation.xml +22 -0
  213. package/built-in-skills/mcp-builder/scripts/requirements.txt +2 -0
  214. package/built-in-skills/memory/SKILL.md +471 -0
  215. package/built-in-skills/memory-dream/SKILL.md +339 -0
  216. package/built-in-skills/office-artifacts/SKILL.md +211 -0
  217. package/built-in-skills/okr/SKILL.md +154 -0
  218. package/built-in-skills/persona/SKILL.md +81 -0
  219. package/built-in-skills/persona-generator/SKILL.md +296 -0
  220. package/built-in-skills/pkf-svg/SKILL.md +253 -0
  221. package/built-in-skills/pkf-writing/SKILL.md +236 -0
  222. package/built-in-skills/prismer-im-collab/SKILL.md +168 -0
  223. package/built-in-skills/proactivity/SKILL.md +84 -0
  224. package/built-in-skills/remotion/SKILL.md +431 -0
  225. package/built-in-skills/role-builder/SKILL.md +203 -0
  226. package/built-in-skills/role-builder/scripts/author-role.mjs +334 -0
  227. package/built-in-skills/role-builder/scripts/ingest-role.mjs +223 -0
  228. package/built-in-skills/role-builder/scripts/instantiate-and-run.mjs +290 -0
  229. package/built-in-skills/role-builder/scripts/operation-harness.mjs +267 -0
  230. package/built-in-skills/skill-authoring/SKILL.md +134 -0
  231. package/built-in-skills/skill-authoring/skill.json +74 -0
  232. package/built-in-skills/skill-builder/SKILL.md +171 -0
  233. package/built-in-skills/skill-builder/scripts/ingest.mjs +265 -0
  234. package/built-in-skills/skill-creator/LICENSE.txt +202 -0
  235. package/built-in-skills/skill-creator/SKILL.md +227 -0
  236. package/built-in-skills/skill-creator/agents/analyzer.md +274 -0
  237. package/built-in-skills/skill-creator/agents/comparator.md +202 -0
  238. package/built-in-skills/skill-creator/agents/grader.md +223 -0
  239. package/built-in-skills/skill-creator/assets/eval_review.html +146 -0
  240. package/built-in-skills/skill-creator/eval-viewer/generate_review.py +471 -0
  241. package/built-in-skills/skill-creator/eval-viewer/viewer.html +1325 -0
  242. package/built-in-skills/skill-creator/references/external-library-import.md +110 -0
  243. package/built-in-skills/skill-creator/references/schemas.md +430 -0
  244. package/built-in-skills/skill-creator/scripts/__init__.py +0 -0
  245. package/built-in-skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
  246. package/built-in-skills/skill-creator/scripts/generate_report.py +326 -0
  247. package/built-in-skills/skill-creator/scripts/import-library.mjs +475 -0
  248. package/built-in-skills/skill-creator/scripts/improve_description.py +247 -0
  249. package/built-in-skills/skill-creator/scripts/package_skill.py +136 -0
  250. package/built-in-skills/skill-creator/scripts/quick_validate.py +103 -0
  251. package/built-in-skills/skill-creator/scripts/run_eval.py +310 -0
  252. package/built-in-skills/skill-creator/scripts/run_loop.py +328 -0
  253. package/built-in-skills/skill-creator/scripts/utils.py +47 -0
  254. package/built-in-skills/slack-gif-creator/LICENSE.txt +202 -0
  255. package/built-in-skills/slack-gif-creator/SKILL.md +291 -0
  256. package/built-in-skills/slack-gif-creator/core/easing.py +234 -0
  257. package/built-in-skills/slack-gif-creator/core/frame_composer.py +176 -0
  258. package/built-in-skills/slack-gif-creator/core/gif_builder.py +269 -0
  259. package/built-in-skills/slack-gif-creator/core/validators.py +136 -0
  260. package/built-in-skills/slack-gif-creator/requirements.txt +4 -0
  261. package/built-in-skills/tasks/SKILL.md +413 -0
  262. package/built-in-skills/tdd/LICENSE +21 -0
  263. package/built-in-skills/tdd/SKILL.md +110 -0
  264. package/built-in-skills/tdd/mocking.md +59 -0
  265. package/built-in-skills/tdd/refactoring.md +10 -0
  266. package/built-in-skills/tdd/tests.md +61 -0
  267. package/built-in-skills/team/SKILL.md +77 -0
  268. package/built-in-skills/web-artifacts-builder/LICENSE.txt +202 -0
  269. package/built-in-skills/web-artifacts-builder/SKILL.md +105 -0
  270. package/built-in-skills/web-artifacts-builder/scripts/bundle-artifact.sh +54 -0
  271. package/built-in-skills/web-artifacts-builder/scripts/init-artifact.sh +334 -0
  272. package/built-in-skills/web-artifacts-builder/scripts/shadcn-components.tar.gz +0 -0
  273. package/built-in-skills/webapp-testing/LICENSE.txt +202 -0
  274. package/built-in-skills/webapp-testing/SKILL.md +97 -0
  275. package/built-in-skills/webapp-testing/examples/console_logging.py +35 -0
  276. package/built-in-skills/webapp-testing/examples/element_discovery.py +40 -0
  277. package/built-in-skills/webapp-testing/examples/static_html_automation.py +33 -0
  278. package/built-in-skills/webapp-testing/scripts/with_server.py +106 -0
  279. package/built-in-skills/wechat-pay/SKILL.md +59 -0
  280. package/dist/cli.cjs +72577 -16101
  281. package/dist/cli.js +72752 -16232
  282. package/dist/index.cjs +72632 -16024
  283. package/dist/index.d.cts +4956 -640
  284. package/dist/index.d.ts +4956 -640
  285. package/dist/index.js +72564 -15963
  286. package/package.json +39 -6
  287. package/plugins/memory/prismer/__init__.py +1211 -0
  288. package/plugins/memory/prismer/plugin.yaml +8 -0
  289. package/plugins/memory/prismer/tool-schemas.generated.json +249 -0
  290. package/plugins/tools/prismer-recall/__init__.py +282 -0
  291. package/plugins/tools/prismer-recall/plugin.yaml +15 -0
@@ -0,0 +1,257 @@
1
+ ---
2
+ name: agent-coordination
3
+ scope: common
4
+ description: Find other agents, list participants in a conversation, send routed messages, attach files, and recover earlier conversation context (history / resolve a fuzzy reference / read a quoted message / read compressed summaries). Use whenever you need to delegate to another agent, address a peer in a multi-agent conversation, send a message that carries a file, or pull context that scrolled out of your prompt window. Executes via `cloud discover`, `cloud im conversations`, `cloud send`, `cloud file send`, `cloud conversation history|resolve-identifier|summary`, and `cloud quote read` CLIs.
5
+ ---
6
+
7
+ # Agent Coordination
8
+
9
+ Multi-agent workspaces route messages between named agents. This skill bundles the four-step flow: **discover → list-in-conversation → send → (optional) attach file**. The platform enforces that messages are routed to **agents who are participants in the conversation**, so you can't shortcut steps 1–2 even when you "know" the username from chat text.
10
+
11
+ ## ⛔ Inline subagents are NOT delegation
12
+
13
+ If you have an inline `Task` / `Subagent` / `ParallelAgents` / fan-out tool available (Anthropic Claude Code, Cursor, Cline, etc.), **never use it to fulfil a "delegate to <peer-agent>" request**. Inline subagents:
14
+
15
+ - run in your own process, with your own context and credentials
16
+ - never appear on the workspace Kanban
17
+ - never @-mention the supposed assignee in the conversation
18
+ - finish in seconds, which to the user looks like you did the work yourself (because you did)
19
+
20
+ For peer-agent delegation, the canonical paths are **`cloud task create --assignee-name <peer>`** (tracked deliverable; see the `tasks` skill) and **`cloud send <peer-username> "<message>" --by-username --workspace-id "$PRISMER_WORKSPACE_ID"`** (ad-hoc message; see below). Anything else — including inline subagents — is the wrong tool, and the user will notice (the supposed assignee was never @-mentioned in chat, and your response came back too fast).
21
+
22
+ ### `cloud task create` vs `cloud send` — 选哪条 + 结果回流
23
+
24
+ | 你想要的 | 用 | 结果怎么回来 |
25
+ | --- | --- | --- |
26
+ | **可追踪委派**(要交付物、要进度、要落看板) | `cloud task create --assignee-name <peer>` | **不自动回流**:peer 在独立 context 跑,产物落 task 卡;你须 `cloud task get <taskId>` 主动拉(`status=completed` 才算成)。详见 `tasks` skill 的「结果回流」段。 |
27
+ | **即兴消息**(问一句、转一份、打个招呼) | `cloud send <peer-username> "<message>" --by-username --workspace-id "$PRISMER_WORKSPACE_ID"` | peer 若在**同一会话**,回复直接出现在这条会话里;不落看板、不可追踪。 |
28
+
29
+ 口诀:**要结果 / 要看板 → `cloud task create` 然后 `cloud task get` 取**;只是说句话 → `cloud send`。两者都不是 inline subagent。
30
+
31
+ ## When to use
32
+
33
+ - The user asks to **delegate** something to another agent ("ask Bob to review this") — `cloud task create` for tracked work, `cloud send` for ad-hoc routing. **Never an inline subagent.**
34
+ - You're in a multi-agent conversation and want to **address** a specific peer.
35
+ - You need to **find an agent** with a specific capability (`code-review`, `data-analysis`, `repair`).
36
+ - You need to **send a message** that carries an attached file (report, log, image).
37
+
38
+ ## CLI Reference
39
+
40
+ ### Discover (workspace-wide directory)
41
+
42
+ ```bash
43
+ cloud discover --workspace-id "$PRISMER_WORKSPACE_ID" # all agents in this workspace
44
+ cloud discover --workspace-id "$PRISMER_WORKSPACE_ID" --capability code-review # filter by capability
45
+ cloud discover --workspace-id "$PRISMER_WORKSPACE_ID" --online-only # only online agents
46
+ cloud im contacts # your contact list
47
+ ```
48
+
49
+ `cloud discover` is a workspace-scoped Agent Registry contract: every result
50
+ is backed by an AgentCard in the requested workspace and carries its routing
51
+ `userId`. Human accounts and agents from other workspaces are contract
52
+ violations. When the target is already in the current conversation, prefer the
53
+ conversation members listing below instead of searching the wider workspace.
54
+
55
+ ### List participants in a conversation (scoped)
56
+
57
+ ```bash
58
+ cloud im conversations # all your conversations
59
+ cloud im conversations --unread # unread only
60
+ cloud im conversations <conversationId> --members --json # exact agent + human participant fields
61
+ ```
62
+
63
+ ### Send a message
64
+
65
+ ```bash
66
+ # Direct message to an agent
67
+ cloud send <to-username> "Please review the PR" --by-username --workspace-id "$PRISMER_WORKSPACE_ID"
68
+ cloud send <to-username> "## Report" -t markdown --by-username --workspace-id "$PRISMER_WORKSPACE_ID"
69
+ cloud send <to-username> "Acknowledged" --reply-to <messageId> --by-username --workspace-id "$PRISMER_WORKSPACE_ID"
70
+
71
+ # Conversation-scoped (multi-agent group)
72
+ cloud im groups send <groupId> "Team update: feature shipped"
73
+
74
+ # With routing metadata
75
+ cloud send <to-username> "Need approval" --conversation-id <convId> --by-username --workspace-id "$PRISMER_WORKSPACE_ID"
76
+ ```
77
+
78
+ ### Send with attached file
79
+
80
+ > **决定怎么交付文件 — 先读这条:**
81
+ >
82
+ > - **用户明确要求随当前回复交付的文件** → 写入
83
+ > `${PRISMER_ARTIFACTS_DIR}`(当前 dispatch 的 `artifacts/` 目录),然后显式运行
84
+ > `cloud deliver <abs-path>`。auto-scan 默认 OFF;只写文件不算交付。
85
+ > - **看板 task 的文件产物** → 显式运行 `cloud task attach <abs-path>`,并以
86
+ > 命令返回的 assetId 为准。
87
+ > - **`cloud file send` 会另起一条独立消息**(先于/晚于你的回复单独落),
88
+ > 只适合「对话进行中临时丢个文件给对方看」这种 ad-hoc 分享,**不要**用它
89
+ > 交付任务最终产物 —— 否则用户会看到「一条只有文件的消息」+「一条只有
90
+ > 文字的消息」分裂开(release201/30 §4 + §7)。
91
+
92
+ ```bash
93
+ # 当前回复的文件交付:写入 artifacts/ 后显式 deliver
94
+ cp ./report.pdf "${PRISMER_ARTIFACTS_DIR}/"
95
+ cloud deliver "${PRISMER_ARTIFACTS_DIR}/report.pdf"
96
+
97
+ # 看板 task 文件产物:显式 attach
98
+ cloud task attach "${PRISMER_ARTIFACTS_DIR}/report.pdf"
99
+
100
+ # ad-hoc 临时分享(会另起独立消息 — 不要拿来交付最终产物)
101
+ # 文字说明用 -c/--content(不是 --message —— 后者不存在,commander 会报
102
+ # unknown option,逼 agent 试错)。`cloud file send <conversationId> <path>`
103
+ # 之外仅 [-c|--content <text>] [--mime <type>] [--json] 三个旗标。
104
+ cloud file send <conversationId> ./report.pdf
105
+ cloud file send <conversationId> ./report.pdf --content "Latest numbers, please review"
106
+ cloud file send <conversationId> ./image.png --mime image/png
107
+
108
+ # 常态(含 hermes):直接 `cloud file send <conversationId> <path>` 即可——daemon
109
+ # (release203/15c) 按 agent 身份自动关联你当前的 dispatch。仅当你要对另一个
110
+ # (非当前) dispatch 交付、或 daemon 报 409 歧义时,才从 <execution_context> 抄
111
+ # --run-id "<run_id>" 传入。Spawn 适配器 (claude-code / codex) env 已注入。
112
+ cloud file send <conversationId> ./report.pdf --run-id "<run_id>" # 仅跨-dispatch / 409 时
113
+
114
+ # Or upload first, then send by asset id
115
+ cloud file upload ./report.pdf # → returns assetId / uploadId
116
+ cloud send <to-username> "See attached" --asset-id <assetId> --by-username --workspace-id "$PRISMER_WORKSPACE_ID"
117
+ ```
118
+
119
+ ### Attach a file to a message you ALREADY sent (`cloud attach`)
120
+
121
+ > **「我已经回了,现在想给那条消息补一个产物」** —— `cloud send` / `cloud
122
+ > file send` 返回的 `messageId` 就是给这个用的。先发消息拿到 `messageId`,之后
123
+ > 产出文件时用 `cloud attach <messageId> <abs-path>` 把它**补挂到那条已发出的
124
+ > 消息上**(不会另起一条)。这跟 `cloud deliver`(随你**这一**回复一起发,回复
125
+ > 还没落)是互补的两件事:`deliver` 管「这条回复带文件」,`attach` 管「补挂到
126
+ > 已有消息」。
127
+
128
+ ```bash
129
+ cloud attach <messageId> ./addendum.pdf
130
+
131
+ # 常态(含 hermes):直接 `cloud attach <messageId> <path>` 即可——daemon
132
+ # (release203/15c) 按 agent 身份自动关联你当前的 dispatch(含 conversation)。
133
+ # 仅当你要对另一个 (非当前) dispatch 操作、或 daemon 报 409 歧义时,才从
134
+ # <execution_context> 抄 --run-id / --conversation-id 传入。
135
+ cloud attach <messageId> ./addendum.pdf --run-id "<run_id>" --conversation-id "<conversation_id>" # 仅跨-dispatch / 409 时
136
+ ```
137
+
138
+ ### Read earlier conversation context (on demand)
139
+
140
+ ```bash
141
+ cloud conversation history <conversationId> # recent messages (oldest→newest)
142
+ cloud conversation history <conversationId> --limit 100 # pull more turns
143
+ cloud conversation history <conversationId> --before <messageId> # page further back
144
+ ```
145
+
146
+ When you need context from **earlier in the conversation** than what you were handed — the user references "the layout we discussed", "that file from before", an earlier decision, or anything that isn't in the prompt you received — run `cloud conversation history <conversationId>` to fetch the prior turns yourself. Each message comes back as `{ id, role, sender, content, createdAt }`. Don't guess at what was said earlier; pull it. Don't assume the full history was pre-loaded into your prompt — it deliberately isn't (only a recent window is). Page backwards with `--before <messageId>` if you need still-older turns.
147
+
148
+ ## Memory & quoting
149
+
150
+ A conversation is an unbounded sequence; only a recent window is in your prompt. Four CLIs let you recover anything that scrolled out — **pull it, never invent it**. None of this goes through MCP; it's all `cloud` CLI.
151
+
152
+ ```bash
153
+ # 1. Earlier raw turns (verbatim messages, oldest→newest)
154
+ cloud conversation history <conversationId> [--limit N] [--before <messageId>]
155
+
156
+ # 2. Resolve a fuzzy reference ("上次那个 layout", "the auth doc") to a canonical id
157
+ cloud conversation resolve-identifier <conversationId> "<alias>"
158
+
159
+ # 3. Read the full text of a specific quoted/referenced message
160
+ cloud quote read <conversationId> <messageId>
161
+
162
+ # 4. Read compressed summaries of older segments (cheap recall of the whole arc)
163
+ cloud conversation summary <conversationId>
164
+ ```
165
+
166
+ **When to reach for which:**
167
+
168
+ - **`history`** — you need the exact wording of recent-but-out-of-window turns, or to page back through a stretch of the conversation. Returns `{ id, role, sender, content, createdAt }` per message.
169
+ - **`resolve-identifier`** — the user refers to something by an alias or vague phrase ("the layout we picked", "that PR", "the doc from yesterday") and you need the canonical id before acting on it. Output is `{ ambiguous, resolved, candidates[], note }`.
170
+ - **`quote read`** — a message quotes/replies to an earlier one and you need that earlier message's full content (not just the snippet). Survives source deletion — if the original was deleted you get `deleted: true` + `sourceDeletedAt`, but still the snapshot content.
171
+ - **`summary`** — you want the gist of the *whole* conversation arc without paging through every turn. Returns compressed-segment summaries (`{ segmentSeq, summary, coversFrom/To…, messageCount, tokenCount }`) for the current range. Use it to orient, then `history` / `quote read` to drill into the exact wording.
172
+
173
+ ### ⛔ Disambiguation rule (mandatory)
174
+
175
+ `resolve-identifier` returns `ambiguous: true` (with `resolved: null` and **multiple `candidates`**) when the alias matched more than one identifier. When this happens you **MUST** present the candidates to the user and ask which one they meant. **Never guess a `canonicalId`, never silently pick the first/highest-scoring candidate, never proceed on a tie.** Picking wrong here corrupts every downstream action. The `note` field in the output restates this — honour it.
176
+
177
+ When `resolved` is non-null (`ambiguous: false`), exactly one identifier matched and you may proceed. When `candidates` is empty, nothing matched — ask the user to clarify what they're referring to rather than inventing an id.
178
+
179
+ ### Run checkpoints (daemon-local)
180
+
181
+ Long runs persist **phase-level** checkpoints on the daemon (one per phase transition, not per tool step). They drive automatic crash-resume; you normally never touch them. For manual save/restore of a run's checkpoint state (ops / before a risky reset), use the daemon-local `session` CLI — also `cloud`-family, never MCP:
182
+
183
+ ```bash
184
+ prismer session checkpoint list <runId> # show this run's live phase checkpoints
185
+ prismer session checkpoint save <runId> # snapshot them to a sidecar JSON
186
+ prismer session checkpoint restore <runId> # re-apply a saved snapshot
187
+ ```
188
+
189
+ `<runId>` is the task/run id. These operate on local SQLite, so they work even when the daemon process is down.
190
+
191
+ ## Workflow (delegating to another agent)
192
+
193
+ 1. **List conversation participants first.** `cloud im conversations <convId> --members --json` returns a `participants` array. Each item has `{ id, role, user: { id, username, displayName, role, agentType } }`; it does not contain AgentCard capabilities or status. Don't `discover` if the intended target is already identifiable in this conversation.
194
+ 2. **Pick the target.** For an existing participant, select an agent by `user.role === "agent"` and use its exact `user.id` or `user.username`; exclude yourself. If the request instead requires capability/status-based selection, use the workspace-scoped Agent Registry with `cloud discover --workspace-id "$PRISMER_WORKSPACE_ID"`.
195
+ 3. **Compose a routed message** with: requested action, context, constraints, expected output. Don't bury the ask in pleasantries.
196
+ 4. **Send with the exact `username`** the listing returned via `cloud send <username> "<message>" --by-username --workspace-id "$PRISMER_WORKSPACE_ID"`. Don't transform "@Alice" → "alice" by yourself — use the exact string the service returned. Alternatively, pass the discovered `userId` directly and omit `--by-username`.
197
+ 5. **Check the return value.** `cloud send` may return `{ ok: false, error: 'agent_not_found' }` even when you got the username from listing (the agent may have left between calls). If `ok: false`, surface the error; don't pretend dispatch succeeded.
198
+
199
+ ## Workflow (file attachment)
200
+
201
+ 1. Confirm the file exists locally and is the artifact the user should receive.
202
+ 2. Follow the Runtime carrier directive first. An inline PKF is not a file attachment and must not create a parallel file.
203
+ 3. For an explicitly requested file, write new output under `PRISMER_ARTIFACTS_DIR`, then run `cloud deliver <abs-path>` for the current reply or `cloud task attach <abs-path>` for a task. Auto-scan is OFF.
204
+ 4. Use `cloud file send` for **ad-hoc conversation sharing**, or `cloud attach` to add a file to an existing message.
205
+ 5. Record the asset ID returned by the service and mention the attachment only after the command succeeded.
206
+
207
+ ## Operating Rules
208
+
209
+ ### Discover
210
+
211
+ - Choose capability filters based on the **actual task**, not broad role guesses. "Code review" not "developer".
212
+ - Use `--online-only` only when immediate response is required — otherwise async agents can pick up the task.
213
+ - Compare `userId`, `username`, `name`, descriptions, capabilities, and status before picking. Identical names exist.
214
+ - Use the returned `userId` directly, or resolve the returned `username` with `--by-username --workspace-id "$PRISMER_WORKSPACE_ID"` — never invent or guess identifiers from chat text.
215
+
216
+ ### List participants
217
+
218
+ - This is **scoped to one conversation**, not a global directory. Don't use it to find agents you want to invite.
219
+ - **Humans are not callable** through `send`/`im groups send` to a user-username; they participate as conversation members but aren't routed to. Use the conversation channel itself for human-facing messages.
220
+ - If the list call fails, surface the error. Don't pretend a message can be routed when you don't know who's in the conversation.
221
+
222
+ ### Send
223
+
224
+ - **Always use the skill** instead of just writing `@username` in plain prose when routing is intended. Plain text `@username` may or may not trigger routing depending on the channel — the CLI guarantees it.
225
+ - **Never send to yourself.**
226
+ - **Don't send to agents outside the conversation** unless this is a direct message (`cloud send <user-id>`).
227
+ - Don't include secrets or **unrelated private context** in the routed message. The agent on the other end gets the full text.
228
+ - For username routing, pass the exact username as the first argument with `--by-username --workspace-id "$PRISMER_WORKSPACE_ID"`; do not hand-write an `@username` mention in the message body.
229
+
230
+ ### File attach
231
+
232
+ - Don't attach unrelated files or files containing secrets. The recipient gets full access to the asset.
233
+ - Don't rely on **direct upload alone** to make a file visible — verify the response confirms attachment to the conversation/message.
234
+ - Use `--mime` override only when auto-detection would be wrong (rare; usually unset).
235
+ - If upload fails, report the failure and keep the local path available for retry.
236
+
237
+ ### Memory & quoting
238
+
239
+ - **Pull, don't guess.** If the answer depends on something earlier in the conversation, fetch it (`history` / `quote read` / `summary`) instead of reconstructing it from memory or the user's paraphrase.
240
+ - **`resolve-identifier` ambiguity is a hard stop.** `ambiguous: true` → ask the user; never auto-pick. No match → ask the user; never invent an id. See the disambiguation rule above.
241
+ - **Quote content is authoritative over your recollection.** When a user quotes a message, `quote read` returns the exact text — defer to it even if it differs from what you remember.
242
+ - **Use `summary` to orient, `history`/`quote read` to drill in.** Summaries are lossy by design; never quote a user back a "summary" as if it were their exact words.
243
+ - These reads are membership-scoped — if you get a 403, you're not a participant in that conversation; don't retry against a different conversation id you weren't given.
244
+
245
+ ## Output reporting
246
+
247
+ After discover: the default table exposes `User ID`, `Username`, `Name`, `Capabilities`, `Status`, and `Description`. Capability names may originate from either legacy strings or structured capability objects, but the table normalizes both to names.
248
+
249
+ After listing participants: report `<user.id> · <user.username> · <user.displayName> · role=<user.role> · agentType=<user.agentType>`; participant rows do not contain AgentCard capabilities or status.
250
+
251
+ After send: echo the returned `messageId` and `conversationId`. If the service returned a redacted version (signed/encrypted), surface that.
252
+
253
+ After file send: echo the `messageId` + the asset's stable identifier (assetId or uploadId).
254
+
255
+ ## Backing capabilities (D22 mapping)
256
+
257
+ Replaces these v1.x built-in skills: `agent-discover`, `conversation-list-agents`, `agent-send`, `message-send-file`.
@@ -0,0 +1,53 @@
1
+ ---
2
+ name: agent-meta
3
+ scope: common
4
+ description: Inspect, snapshot, publish, and fork Prismer long-running agents through the cloud agent lifecycle API.
5
+ allowed-tools: cloud.agent.spec cloud.agent.snapshot cloud.agent.snapshots cloud.agent.restore cloud.agent.publish cloud.agent.packs cloud.agent.fork prismer.agent.snapshot prismer.agent.publish prismer.agent.fork
6
+ metadata:
7
+ prismer:
8
+ category: workflow-core
9
+ version: "1.0.0"
10
+ ---
11
+
12
+ # Agent Meta
13
+
14
+ Use this skill when the user asks you to inspect, save, restore, publish, or fork a Prismer long-running agent.
15
+
16
+ ## Commands
17
+
18
+ - Inspect your 4-tuple spec:
19
+ `cloud agent spec <agent-id>`
20
+
21
+ - Save a private owner snapshot:
22
+ `cloud agent snapshot <agent-id> --label "<label>"`
23
+
24
+ - Save a snapshot with memory reference:
25
+ `cloud agent snapshot <agent-id> --include-memory --label "<label>"`
26
+
27
+ - List snapshots:
28
+ `cloud agent snapshots <agent-id>`
29
+
30
+ - Restore from a snapshot:
31
+ `cloud agent restore <agent-id> <snapshot-id>`
32
+
33
+ - Publish an agent pack without memory:
34
+ `cloud agent publish <agent-id> --slug <pack-slug> --version 1.0.0 --license proprietary`
35
+
36
+ - List public agent packs:
37
+ `cloud agent packs`
38
+
39
+ - Fork a pack into a workspace:
40
+ `cloud agent fork <pack-id-or-slug> --workspace-id <workspace-id> --display-name "<name>"`
41
+
42
+ The runtime CLI has the same operational verbs for daemon environments:
43
+
44
+ - `prismer agent snapshot <agent-id>`
45
+ - `prismer agent publish <agent-id> --slug <pack-slug>`
46
+ - `prismer agent fork <pack-id-or-slug> --workspace-id <workspace-id>`
47
+
48
+ ## Rules
49
+
50
+ - Do not publish memory. The publish path strips memory by default; keep it that way unless a platform policy explicitly changes.
51
+ - Use snapshots for owner backup and restore. Use publish only when the user asks to share or reuse the agent as an Agent Pack.
52
+ - Fork creates a new identity and a clean memory partition in the target workspace.
53
+ - If the user asks to "save your config", create a snapshot rather than publishing.
@@ -0,0 +1,133 @@
1
+ ---
2
+ name: assets
3
+ scope: common
4
+ description: Locate, inspect, and read content-addressed workspace assets — search by filename/metadata, describe before reading bytes, then read bounded ranges. Use whenever the user references an uploaded file, when you need to cite file evidence, or when a task input/output is an asset URI. Executes via the `cloud asset` CLI and tools.
5
+ ---
6
+
7
+ # Assets
8
+
9
+ Workspace assets are **content-addressed** (SHA-256). Each asset has a stable URI, MIME type, size, and metadata. Treat assets as **opaque bytes you must search → describe → read** in that order. Don't claim you read a file unless a CLI call actually returned its content.
10
+
11
+ ## When to use
12
+
13
+ - The user references a file by name, path, or `prismer://...` URI and you need its content.
14
+ - A task description includes asset attachments — find them, inspect them, decide if you need to read bytes.
15
+ - You're answering a question that requires citing file evidence (extract text, quote a paragraph, summarize a doc).
16
+ - You need to find a file by hash, filename, or content keyword.
17
+
18
+ ## CLI Reference
19
+
20
+ ### Search
21
+
22
+ ```bash
23
+ cloud asset list # everything in current workspace
24
+ cloud asset list --limit 20 --kind file
25
+ cloud asset list --filename "design-doc*" # filename glob
26
+ cloud asset list --mime "application/pdf" # by MIME
27
+ cloud asset list --updated-after "2026-05-01" # recency
28
+ cloud asset by-hash <sha256> # exact content lookup
29
+ ```
30
+
31
+ ### Describe (metadata only, no bytes)
32
+
33
+ ```bash
34
+ cloud asset get <assetId> # full metadata, no content
35
+ # OR for in-process MCP tools (when daemon exposes them):
36
+ # prismer.asset.describe { uri | assetId | contentHash }
37
+ ```
38
+
39
+ ### Read (bounded ranges only)
40
+
41
+ ```bash
42
+ cloud asset download <assetId> --out ./local-copy # whole file to disk
43
+ cloud asset download <assetId> --offset 0 --length 4096 # first 4 KB
44
+ # For LLM-friendly text extraction:
45
+ cloud asset read <assetId> --offset 0 --length 4096 # text range read
46
+ cloud asset read <assetId> --as-text # full text (for small text-like assets)
47
+ ```
48
+
49
+ ### Upload / Sync
50
+
51
+ ```bash
52
+ cloud asset upload ./report.pdf # → asset record + content hash
53
+ cloud asset upload ./report.pdf --conversation-id <id> # pin to conversation
54
+ cloud asset sync # refresh local cache index
55
+ ```
56
+
57
+ ## Workflow
58
+
59
+ 1. **Search first** — use `cloud asset list` with filename / MIME / hash filters unless the user gave you an exact ID or URI.
60
+ 2. **Describe before reading bytes** — `cloud asset get <id>` to confirm MIME, size, and that this is the right file.
61
+ 3. **Read bounded ranges** — `--offset` + `--length`. Start with a small range (4 KB) to identify encoding/structure, then expand only if needed.
62
+ 4. **Preserve the locator** — record the asset ID, content hash, and URI in your reply so the user can follow up.
63
+
64
+ ## Operating Rules
65
+
66
+ ### Search
67
+
68
+ - Don't guess asset identifiers when `asset list` can locate them. Filename + size + workspace = usually unique.
69
+ - Prefer **exact** filters (hash, full filename, MIME) over broad terms.
70
+ - Content search is **best-effort for text-like assets only**. PDFs, images, binaries won't match content queries — search by metadata.
71
+ - Use a small `--limit` for targeted lookups; expand only when the first batch misses.
72
+
73
+ ### Describe
74
+
75
+ - **Always describe before reading.** Metadata tells you whether reading is safe (text vs binary, size, encoding).
76
+ - Don't treat metadata as proof of file contents — title and MIME can lie. The content hash is the only authoritative identity.
77
+ - If multiple locators disagree (e.g. filename matches two assets with different hashes), **stop and re-search** rather than reading the wrong file.
78
+ - Avoid reading binary or image-heavy assets directly. For images, use `cloud parse` (OCR) or a vision-capable downstream tool; for PDFs, use `cloud parse`.
79
+
80
+ ### Read
81
+
82
+ - **Never load an entire large file** — `--length` caps reads. Start at 4 KB, expand only when the answer requires it.
83
+ - Byte offsets don't align to line or character boundaries in multibyte text — handle the partial-token edge at the read boundary.
84
+ - Watch the `truncated` flag in the response. If set, plan additional reads or tell the user the answer is based on a partial read.
85
+ - Report partial reads explicitly when drawing conclusions from excerpts ("based on the first 8 KB of `<filename>`...").
86
+
87
+ ### Cite
88
+
89
+ - When citing file evidence, **include the asset ID/URI and the locator** (offset + length, page number, or hash). The user needs to be able to follow up.
90
+ - Never claim you read an asset unless a CLI/tool call **succeeded** with content in the response. Hallucinated reads are the #1 trust failure.
91
+
92
+ ## Output reporting
93
+
94
+ After search: list matches with `<assetId> <filename> <mime> <sizeBytes>`. If 0 matches, say so and suggest broader filters.
95
+
96
+ After describe: surface MIME, size, and any structured metadata fields relevant to the user's question (page count for PDFs, dimensions for images, etc.).
97
+
98
+ After read: include the asset locator + range + content. If `truncated: true`, say "(partial — read X of Y bytes)".
99
+
100
+ ## ContentBlock output (v2.0 §4.6 / Gap E-⑤)
101
+
102
+ When this skill resolves an **image** asset for downstream rendering, emit a
103
+ ContentBlock pointing at the asset id rather than inlining bytes or a
104
+ pre-signed URL into prose:
105
+
106
+ ```json
107
+ { "kind": "image", "assetId": "<assetId>", "mediaType": "image/png", "alt": "<one-line desc>" }
108
+ ```
109
+
110
+ When it resolves an existing **file** asset (PDF, CSV, archive), do not copy it
111
+ into `$PRISMER_ARTIFACTS_DIR` or create a duplicate upload. Return the existing
112
+ asset through the structured ContentBlock attachment using its authoritative
113
+ `assetId`:
114
+
115
+ ```json
116
+ { "kind": "file", "assetId": "<assetId>", "mediaType": "application/pdf", "filename": "<original>" }
117
+ ```
118
+
119
+ Do NOT paste raw bytes or `data:` URIs into the reply body — they bypass the
120
+ content-addressed store, defeat caching, and make follow-up retrieval
121
+ impossible. The chat renderer reads ContentBlock attachments and surfaces
122
+ them as previews. If the user explicitly requests a newly generated local
123
+ file, that is a separate file carrier: write it under `artifacts/` and run
124
+ `cloud deliver <abs-path>` or `cloud task attach <abs-path>` explicitly.
125
+
126
+ ## Backing capabilities (D22 mapping)
127
+
128
+ Replaces these v1.x built-in skills: `asset-search`, `asset-describe`, `asset-read`.
129
+
130
+ Implements Gap E-⑤ (built-in skill multimodal output) for the asset family —
131
+ `assets.describe` / `assets.read` outputs flow through dispatch reply
132
+ attachments (`AgentDispatchReplyPayload.attachments` typed as `{kind, assetId}`
133
+ which maps to ContentBlock at chat-render time).
@@ -0,0 +1,93 @@
1
+ ---
2
+ name: browser-use
3
+ scope: common
4
+ description: LLM-driven browser automation via the pre-installed browser-use library (chromium already in the image). Use whenever the task needs to interact with web pages beyond a single fetch — multi-step navigation, form filling, clicking, scrolling, structured data extraction, screenshots, or tasks the plain web tools can't complete. Runs as a Python script against the built-in chromium; LLM goes through the Prismer gateway (no external LLM key needed).
5
+ ---
6
+
7
+ # Browser-Use (Web Automation)
8
+
9
+ The sandbox image ships `browser-use` (installed in `/home/user/.venv`) and a full
10
+ chromium build (playwright). This skill drives them: write a short Python script
11
+ with `Agent(task=..., llm=..., browser=...)`, run it, report the result.
12
+
13
+ ## When to use
14
+
15
+ - Multi-step web tasks: search → open → extract → compare → download
16
+ - Form filling / login flows / clicking through pages
17
+ - Structured extraction (tables, listings, prices) that a single fetch can't parse
18
+ - Screenshots / visual confirmation of a page state
19
+ - Anything needing JS-rendered content (SPA pages the fetch tools miss)
20
+
21
+ For a single plain fetch, prefer the existing web tools (lighter). Reach for
22
+ browser-use when they come back empty or the task is interactive.
23
+
24
+ ## How to run
25
+
26
+ ```bash
27
+ # chromium executable (version dir may change — resolve dynamically):
28
+ CHROME="$(find /home/user/.cache/ms-playwright -name chrome -type f | head -1)"
29
+
30
+ # LLM = our gateway (OpenAI-compatible). PRISMER_BASE_URL / PRISMER_API_KEY
31
+ # are already in the environment; never hardcode them in the script.
32
+ cat > /tmp/bu_task.py <<'PY'
33
+ import os, asyncio
34
+ from browser_use import Agent, ChatOpenAI, Browser
35
+
36
+ async def main():
37
+ llm = ChatOpenAI(
38
+ base_url=f"{os.environ['PRISMER_BASE_URL']}/api/v1",
39
+ api_key=os.environ['PRISMER_API_KEY'],
40
+ model=os.environ.get('PRISMER_MODEL', 'deepseek-v4-flash'),
41
+ temperature=0.0,
42
+ # REQUIRED for the Prismer gateway: browser-use defaults to forcing
43
+ # JSON-schema structured output (response_format=json_schema) which
44
+ # our upstream models reject with 400 "response_format type
45
+ # unavailable" (verified 2026-08-07). Disable it; the agent still
46
+ # extracts via its normal flow.
47
+ dont_force_structured_output=True,
48
+ )
49
+ browser = Browser(
50
+ headless=True,
51
+ executable_path=os.environ['CHROME'],
52
+ )
53
+ agent = Agent(
54
+ task="<TASK>", # be specific: steps, URLs, what to extract, output format
55
+ llm=llm,
56
+ browser=browser,
57
+ )
58
+ history = await agent.run(max_steps=30)
59
+ print("RESULT:", history.final_result())
60
+ print("URLS:", history.urls())
61
+ print("ERRORS:", history.errors())
62
+ await browser.close()
63
+
64
+ asyncio.run(main())
65
+ PY
66
+ CHROME="$CHROME" /home/user/.venv/bin/python /tmp/bu_task.py
67
+ rm -f /tmp/bu_task.py
68
+ ```
69
+
70
+ ## Task-writing rules (from browser-use docs)
71
+
72
+ - **Be specific**: `"Go to https://…, use extract with query 'first 3 quotes and their authors', save to quotes.csv via write_file"` — open-ended tasks fail.
73
+ - **Name actions**: "use search action for …", "use click to open first result in a new tab", "use send_keys with 'Tab Tab Enter'" — the agent maps these to its built-in tools.
74
+ - **Error recovery**: if navigation is blocked, fall back to a search engine; if a click fails, use keyboard navigation (`send_keys`).
75
+ - **max_steps**: default 100; keep 30 for focused tasks, raise for long flows.
76
+ - **Anti-bot**: if a page blocks automation, try `use_cloud=True` — NOT available here (no Browser-Use Cloud key). Fall back to search/cache.
77
+
78
+ ## Environment facts
79
+
80
+ | Item | Value |
81
+ | --- | --- |
82
+ | Python | `/home/user/.venv/bin/python` (browser-use installed here) |
83
+ | Chromium | `$(find /home/user/.cache/ms-playwright -name chrome -type f \| head -1)` |
84
+ | LLM | Prismer gateway (`PRISMER_BASE_URL` + `PRISMER_API_KEY`, OpenAI-compatible) |
85
+ | Model | `PRISMER_MODEL` env (default `deepseek-v4-flash`) — adjust for the task |
86
+ | Telemetry | browser-use collects anonymous telemetry by default — set `ANONYMIZED_TELEMETRY=false` |
87
+
88
+ ## Output contract
89
+
90
+ Report to the user: `history.final_result()` (the extracted answer), the URLs
91
+ visited, and any errors. If `history.is_successful()` is False, say so plainly
92
+ with `history.errors()` — do not invent a completion. Attach screenshots
93
+ (`history.screenshot_paths()`) as task assets when they matter.