zilmate 1.9.9 → 1.10.2

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 (287) hide show
  1. package/.agents/skills/ad-creative/SKILL.md +362 -0
  2. package/.agents/skills/ad-creative/evals/evals.json +90 -0
  3. package/.agents/skills/ad-creative/references/generative-tools.md +637 -0
  4. package/.agents/skills/ad-creative/references/platform-specs.md +213 -0
  5. package/.agents/skills/ai-seo/SKILL.md +489 -0
  6. package/.agents/skills/ai-seo/evals/evals.json +90 -0
  7. package/.agents/skills/ai-seo/references/content-patterns.md +285 -0
  8. package/.agents/skills/ai-seo/references/content-types.md +71 -0
  9. package/.agents/skills/ai-seo/references/okf.md +104 -0
  10. package/.agents/skills/ai-seo/references/platform-ranking-factors.md +154 -0
  11. package/.agents/skills/clerk-backend-api/SKILL.md +426 -0
  12. package/.agents/skills/clerk-backend-api/evals/evals.json +87 -0
  13. package/.agents/skills/clerk-backend-api/scripts/api-specs-context.sh +30 -0
  14. package/.agents/skills/clerk-backend-api/scripts/execute-request.sh +88 -0
  15. package/.agents/skills/clerk-backend-api/scripts/extract-endpoint-detail.sh +165 -0
  16. package/.agents/skills/clerk-backend-api/scripts/extract-tag-endpoints.sh +208 -0
  17. package/.agents/skills/clerk-backend-api/scripts/extract-tags.js +14 -0
  18. package/.agents/skills/copy-editing/SKILL.md +457 -0
  19. package/.agents/skills/copy-editing/evals/evals.json +89 -0
  20. package/.agents/skills/copy-editing/references/checklist.md +66 -0
  21. package/.agents/skills/copy-editing/references/content-refresh.md +38 -0
  22. package/.agents/skills/copy-editing/references/plain-english-alternatives.md +394 -0
  23. package/.agents/skills/hyperframes/SKILL.md +163 -0
  24. package/.agents/skills/hyperframes-cli/SKILL.md +109 -0
  25. package/.agents/skills/hyperframes-cli/references/doctor-browser.md +45 -0
  26. package/.agents/skills/hyperframes-cli/references/init-and-scaffold.md +51 -0
  27. package/.agents/skills/hyperframes-cli/references/lambda.md +132 -0
  28. package/.agents/skills/hyperframes-cli/references/lint-validate-inspect.md +121 -0
  29. package/.agents/skills/hyperframes-cli/references/preview-render.md +109 -0
  30. package/.agents/skills/hyperframes-cli/references/upgrade-info-misc.md +75 -0
  31. package/.agents/skills/hyperframes-media/SKILL.md +97 -0
  32. package/.agents/skills/hyperframes-media/assets/sfx/CREDITS.md +35 -0
  33. package/.agents/skills/hyperframes-media/assets/sfx/manifest.json +97 -0
  34. package/.agents/skills/hyperframes-media/references/bgm.md +72 -0
  35. package/.agents/skills/hyperframes-media/references/captions/authoring.md +159 -0
  36. package/.agents/skills/hyperframes-media/references/captions/motion.md +87 -0
  37. package/.agents/skills/hyperframes-media/references/captions/transcript-handling.md +97 -0
  38. package/.agents/skills/hyperframes-media/references/remove-background.md +143 -0
  39. package/.agents/skills/hyperframes-media/references/requirements.md +29 -0
  40. package/.agents/skills/hyperframes-media/references/sfx.md +42 -0
  41. package/.agents/skills/hyperframes-media/references/transcribe.md +52 -0
  42. package/.agents/skills/hyperframes-media/references/tts-to-captions.md +24 -0
  43. package/.agents/skills/hyperframes-media/references/tts.md +135 -0
  44. package/.agents/skills/hyperframes-media/scripts/audio.mjs +282 -0
  45. package/.agents/skills/hyperframes-media/scripts/heygen-tts.mjs +121 -0
  46. package/.agents/skills/hyperframes-media/scripts/lib/bgm.mjs +235 -0
  47. package/.agents/skills/hyperframes-media/scripts/lib/heygen.mjs +131 -0
  48. package/.agents/skills/hyperframes-media/scripts/lib/sfx.mjs +128 -0
  49. package/.agents/skills/hyperframes-media/scripts/lib/tts.mjs +220 -0
  50. package/.agents/skills/hyperframes-media/scripts/lyria-recipe.py +128 -0
  51. package/.agents/skills/hyperframes-media/scripts/wait-bgm.mjs +167 -0
  52. package/.agents/skills/hyperframes-registry/SKILL.md +101 -0
  53. package/.agents/skills/hyperframes-registry/examples/add-block.md +51 -0
  54. package/.agents/skills/hyperframes-registry/examples/add-component.md +73 -0
  55. package/.agents/skills/hyperframes-registry/references/contributing.md +166 -0
  56. package/.agents/skills/hyperframes-registry/references/demo-html-pattern.md +54 -0
  57. package/.agents/skills/hyperframes-registry/references/discovery.md +215 -0
  58. package/.agents/skills/hyperframes-registry/references/install-locations.md +45 -0
  59. package/.agents/skills/hyperframes-registry/references/templates.md +417 -0
  60. package/.agents/skills/hyperframes-registry/references/wiring-blocks.md +61 -0
  61. package/.agents/skills/hyperframes-registry/references/wiring-components.md +39 -0
  62. package/.agents/skills/marketing-psychology/SKILL.md +455 -0
  63. package/.agents/skills/marketing-psychology/evals/evals.json +88 -0
  64. package/.agents/skills/mintlify/SKILL.md +328 -0
  65. package/.agents/skills/product-launch-video/SKILL.md +206 -0
  66. package/.agents/skills/product-launch-video/references/cut-catalog.md +220 -0
  67. package/.agents/skills/product-launch-video/references/motion-language.md +156 -0
  68. package/.agents/skills/product-launch-video/references/story-design.md +373 -0
  69. package/.agents/skills/product-launch-video/references/visual-design.md +126 -0
  70. package/.agents/skills/product-launch-video/scripts/assemble-index.mjs +570 -0
  71. package/.agents/skills/product-launch-video/scripts/audio.mjs +253 -0
  72. package/.agents/skills/product-launch-video/scripts/build-frame.mjs +536 -0
  73. package/.agents/skills/product-launch-video/scripts/captions.mjs +508 -0
  74. package/.agents/skills/product-launch-video/scripts/lib/assets.mjs +55 -0
  75. package/.agents/skills/product-launch-video/scripts/lib/dimensions.mjs +45 -0
  76. package/.agents/skills/product-launch-video/scripts/lib/storyboard.mjs +249 -0
  77. package/.agents/skills/product-launch-video/scripts/lib/tokens.mjs +204 -0
  78. package/.agents/skills/product-launch-video/scripts/lib/transition-registry.mjs +38 -0
  79. package/.agents/skills/product-launch-video/scripts/lib/transitions.json +71 -0
  80. package/.agents/skills/product-launch-video/scripts/stage-assets.mjs +39 -0
  81. package/.agents/skills/product-launch-video/scripts/transitions.mjs +320 -0
  82. package/.agents/skills/product-launch-video/sub-agents/frame-worker.md +74 -0
  83. package/.agents/skills/prompt-engineering-patterns/SKILL.md +144 -0
  84. package/.agents/skills/prompt-engineering-patterns/assets/few-shot-examples.json +106 -0
  85. package/.agents/skills/prompt-engineering-patterns/assets/prompt-template-library.md +264 -0
  86. package/.agents/skills/prompt-engineering-patterns/references/chain-of-thought.md +412 -0
  87. package/.agents/skills/prompt-engineering-patterns/references/details.md +338 -0
  88. package/.agents/skills/prompt-engineering-patterns/references/few-shot-learning.md +386 -0
  89. package/.agents/skills/prompt-engineering-patterns/references/prompt-optimization.md +428 -0
  90. package/.agents/skills/prompt-engineering-patterns/references/prompt-templates.md +484 -0
  91. package/.agents/skills/prompt-engineering-patterns/references/system-prompts.md +195 -0
  92. package/.agents/skills/prompt-engineering-patterns/scripts/optimize-prompt.py +279 -0
  93. package/.agents/skills/remotion-to-hyperframes/SKILL.md +127 -0
  94. package/.agents/skills/remotion-to-hyperframes/assets/.gitkeep +0 -0
  95. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/run.sh +249 -0
  96. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/README.md +41 -0
  97. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/expected.json +26 -0
  98. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/hf-src/index.html +61 -0
  99. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/remotion-src/package.json +14 -0
  100. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/remotion-src/remotion.config.ts +13 -0
  101. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/remotion-src/src/Root.tsx +13 -0
  102. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/remotion-src/src/TitleCard.tsx +34 -0
  103. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/remotion-src/src/index.ts +4 -0
  104. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/remotion-src/tsconfig.json +15 -0
  105. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/README.md +54 -0
  106. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/expected.json +29 -0
  107. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/hf-src/index.html +118 -0
  108. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/remotion-src/package.json +14 -0
  109. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/remotion-src/remotion.config.ts +13 -0
  110. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/remotion-src/src/MultiScene.tsx +105 -0
  111. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/remotion-src/src/Root.tsx +13 -0
  112. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/remotion-src/src/index.ts +4 -0
  113. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/remotion-src/tsconfig.json +15 -0
  114. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/setup.sh +34 -0
  115. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/README.md +85 -0
  116. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/expected.json +41 -0
  117. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/hf-src/index.html +269 -0
  118. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/package.json +15 -0
  119. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/remotion.config.ts +13 -0
  120. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/src/Root.tsx +27 -0
  121. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/src/Stargazed.tsx +37 -0
  122. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/src/components/AnimatedNumber.tsx +23 -0
  123. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/src/components/StatCard.tsx +59 -0
  124. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/src/components/UnderlinedText.tsx +47 -0
  125. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/src/index.ts +4 -0
  126. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/src/scenes/OutroScene.tsx +18 -0
  127. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/src/scenes/StatsScene.tsx +34 -0
  128. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/src/scenes/TitleScene.tsx +55 -0
  129. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/tsconfig.json +15 -0
  130. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/README.md +51 -0
  131. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/01-use-state.tsx +29 -0
  132. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/02-use-effect-deps.tsx +29 -0
  133. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/03-async-metadata.tsx +39 -0
  134. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/04-third-party-react.tsx +30 -0
  135. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/05-lambda-config.tsx +38 -0
  136. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/06-warnings-only.tsx +36 -0
  137. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/07-custom-hook.tsx +28 -0
  138. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/08-mixed.tsx +41 -0
  139. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/expected.json +85 -0
  140. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/validate.sh +110 -0
  141. package/.agents/skills/remotion-to-hyperframes/references/api-map.md +142 -0
  142. package/.agents/skills/remotion-to-hyperframes/references/escape-hatch.md +115 -0
  143. package/.agents/skills/remotion-to-hyperframes/references/eval.md +140 -0
  144. package/.agents/skills/remotion-to-hyperframes/references/fonts.md +112 -0
  145. package/.agents/skills/remotion-to-hyperframes/references/limitations.md +136 -0
  146. package/.agents/skills/remotion-to-hyperframes/references/lottie.md +121 -0
  147. package/.agents/skills/remotion-to-hyperframes/references/media.md +149 -0
  148. package/.agents/skills/remotion-to-hyperframes/references/parameters.md +167 -0
  149. package/.agents/skills/remotion-to-hyperframes/references/sequencing.md +195 -0
  150. package/.agents/skills/remotion-to-hyperframes/references/timing.md +165 -0
  151. package/.agents/skills/remotion-to-hyperframes/references/transitions.md +114 -0
  152. package/.agents/skills/remotion-to-hyperframes/scripts/.gitkeep +0 -0
  153. package/.agents/skills/remotion-to-hyperframes/scripts/frame_strip.sh +107 -0
  154. package/.agents/skills/remotion-to-hyperframes/scripts/lint_source.py +358 -0
  155. package/.agents/skills/remotion-to-hyperframes/scripts/render_diff.sh +103 -0
  156. package/.agents/skills/remotion-to-hyperframes/scripts/tests/fixtures/blocker.tsx +50 -0
  157. package/.agents/skills/remotion-to-hyperframes/scripts/tests/fixtures/clean.tsx +46 -0
  158. package/.agents/skills/remotion-to-hyperframes/scripts/tests/smoke.sh +90 -0
  159. package/.agents/skills/seo-audit/SKILL.md +497 -0
  160. package/.agents/skills/seo-audit/evals/evals.json +136 -0
  161. package/.agents/skills/seo-audit/references/ai-writing-detection.md +200 -0
  162. package/.agents/skills/seo-audit/references/international-seo.md +230 -0
  163. package/README.md +4 -2
  164. package/SDK.md +64 -1
  165. package/dist/agents/coding.agent.d.ts +558 -0
  166. package/dist/agents/coding.agent.d.ts.map +1 -1
  167. package/dist/agents/coding.agent.js +8 -0
  168. package/dist/agents/coding.agent.js.map +1 -1
  169. package/dist/agents/developer-helper.agent.d.ts +712 -0
  170. package/dist/agents/developer-helper.agent.d.ts.map +1 -1
  171. package/dist/agents/developer-helper.agent.js +6 -0
  172. package/dist/agents/developer-helper.agent.js.map +1 -1
  173. package/dist/agents/docs-research.agent.d.ts +8 -0
  174. package/dist/agents/docs-research.agent.d.ts.map +1 -1
  175. package/dist/agents/finance.agent.d.ts +8 -0
  176. package/dist/agents/finance.agent.d.ts.map +1 -1
  177. package/dist/agents/manager.d.ts +837 -2
  178. package/dist/agents/manager.d.ts.map +1 -1
  179. package/dist/agents/manager.js +28 -0
  180. package/dist/agents/manager.js.map +1 -1
  181. package/dist/agents/security.agent.d.ts +165 -3
  182. package/dist/agents/security.agent.d.ts.map +1 -1
  183. package/dist/agents/security.agent.js +3 -0
  184. package/dist/agents/security.agent.js.map +1 -1
  185. package/dist/agents/swarm/main.js +1 -1
  186. package/dist/agents/swarm/main.js.map +1 -1
  187. package/dist/agents/swarm/registry.d.ts.map +1 -1
  188. package/dist/agents/swarm/registry.js +232 -26
  189. package/dist/agents/swarm/registry.js.map +1 -1
  190. package/dist/cli/doctor.d.ts +14 -0
  191. package/dist/cli/doctor.d.ts.map +1 -1
  192. package/dist/cli/doctor.js +91 -0
  193. package/dist/cli/doctor.js.map +1 -1
  194. package/dist/cli/menu.d.ts.map +1 -1
  195. package/dist/cli/menu.js +102 -0
  196. package/dist/cli/menu.js.map +1 -1
  197. package/dist/cli/setup.d.ts +10 -0
  198. package/dist/cli/setup.d.ts.map +1 -1
  199. package/dist/cli/setup.js +178 -0
  200. package/dist/cli/setup.js.map +1 -1
  201. package/dist/cli/swarm.d.ts +1 -0
  202. package/dist/cli/swarm.d.ts.map +1 -1
  203. package/dist/cli/swarm.js +47 -8
  204. package/dist/cli/swarm.js.map +1 -1
  205. package/dist/cli/theme.d.ts +0 -24
  206. package/dist/cli/theme.d.ts.map +1 -1
  207. package/dist/cli/theme.js +6 -2
  208. package/dist/cli/theme.js.map +1 -1
  209. package/dist/config/env.d.ts +10 -0
  210. package/dist/config/env.d.ts.map +1 -1
  211. package/dist/config/env.js +38 -17
  212. package/dist/config/env.js.map +1 -1
  213. package/dist/index.js +96 -5
  214. package/dist/index.js.map +1 -1
  215. package/dist/jobs/trigger-orchestrator.d.ts +5 -1
  216. package/dist/jobs/trigger-orchestrator.d.ts.map +1 -1
  217. package/dist/jobs/trigger-orchestrator.js +29 -9
  218. package/dist/jobs/trigger-orchestrator.js.map +1 -1
  219. package/dist/jobs/trigger-router.d.ts.map +1 -1
  220. package/dist/jobs/trigger-router.js +3 -2
  221. package/dist/jobs/trigger-router.js.map +1 -1
  222. package/dist/memory/corporate-wiki.d.ts +15 -0
  223. package/dist/memory/corporate-wiki.d.ts.map +1 -0
  224. package/dist/memory/corporate-wiki.js +152 -0
  225. package/dist/memory/corporate-wiki.js.map +1 -0
  226. package/dist/memory/scratchpad.d.ts +2 -0
  227. package/dist/memory/scratchpad.d.ts.map +1 -1
  228. package/dist/memory/scratchpad.js +27 -0
  229. package/dist/memory/scratchpad.js.map +1 -1
  230. package/dist/observability/doctor.d.ts.map +1 -1
  231. package/dist/observability/doctor.js +12 -4
  232. package/dist/observability/doctor.js.map +1 -1
  233. package/dist/observability/traces.d.ts +72 -0
  234. package/dist/observability/traces.d.ts.map +1 -0
  235. package/dist/observability/traces.js +1134 -0
  236. package/dist/observability/traces.js.map +1 -0
  237. package/dist/runtime/swarm.d.ts +1 -1
  238. package/dist/runtime/swarm.d.ts.map +1 -1
  239. package/dist/runtime/swarm.js +54 -25
  240. package/dist/runtime/swarm.js.map +1 -1
  241. package/dist/safety/approvals.d.ts +2 -2
  242. package/dist/safety/approvals.d.ts.map +1 -1
  243. package/dist/safety/approvals.js +47 -1
  244. package/dist/safety/approvals.js.map +1 -1
  245. package/dist/safety/redaction.d.ts.map +1 -1
  246. package/dist/safety/redaction.js +10 -0
  247. package/dist/safety/redaction.js.map +1 -1
  248. package/dist/tools/cloud.tool.d.ts +394 -0
  249. package/dist/tools/cloud.tool.d.ts.map +1 -0
  250. package/dist/tools/cloud.tool.js +784 -0
  251. package/dist/tools/cloud.tool.js.map +1 -0
  252. package/dist/tools/computer-use.tool.d.ts +2 -2
  253. package/dist/tools/corporate-wiki.tool.d.ts +22 -0
  254. package/dist/tools/corporate-wiki.tool.d.ts.map +1 -0
  255. package/dist/tools/corporate-wiki.tool.js +43 -0
  256. package/dist/tools/corporate-wiki.tool.js.map +1 -0
  257. package/dist/tools/devops.tool.d.ts +162 -0
  258. package/dist/tools/devops.tool.d.ts.map +1 -0
  259. package/dist/tools/devops.tool.js +377 -0
  260. package/dist/tools/devops.tool.js.map +1 -0
  261. package/dist/tools/multimedia.tool.d.ts +126 -0
  262. package/dist/tools/multimedia.tool.d.ts.map +1 -0
  263. package/dist/tools/multimedia.tool.js +533 -0
  264. package/dist/tools/multimedia.tool.js.map +1 -0
  265. package/dist/tools/osint.tool.d.ts +6 -6
  266. package/dist/tools/sandbox-dev.tool.d.ts +15 -0
  267. package/dist/tools/sandbox-dev.tool.d.ts.map +1 -0
  268. package/dist/tools/sandbox-dev.tool.js +146 -0
  269. package/dist/tools/sandbox-dev.tool.js.map +1 -0
  270. package/dist/tools/scratchpad.tool.d.ts +8 -0
  271. package/dist/tools/scratchpad.tool.d.ts.map +1 -1
  272. package/dist/tools/scratchpad.tool.js +40 -1
  273. package/dist/tools/scratchpad.tool.js.map +1 -1
  274. package/dist/tools/setup-assistant.tool.d.ts +1 -1
  275. package/dist/tools/swarm-ops.tool.d.ts +14 -0
  276. package/dist/tools/swarm-ops.tool.d.ts.map +1 -1
  277. package/dist/tools/swarm-ops.tool.js +47 -0
  278. package/dist/tools/swarm-ops.tool.js.map +1 -1
  279. package/dist/tools/sysops.tool.d.ts +157 -0
  280. package/dist/tools/sysops.tool.d.ts.map +1 -0
  281. package/dist/tools/sysops.tool.js +643 -0
  282. package/dist/tools/sysops.tool.js.map +1 -0
  283. package/dist/voice/deepgram.d.ts.map +1 -1
  284. package/dist/voice/deepgram.js +30 -2
  285. package/dist/voice/deepgram.js.map +1 -1
  286. package/package.json +8 -1
  287. package/scripts/release-github.mjs +23 -16
@@ -0,0 +1,338 @@
1
+ # prompt-engineering-patterns — detailed patterns and worked examples
2
+
3
+ ## Key Patterns
4
+
5
+ ### Pattern 1: Structured Output with Pydantic
6
+
7
+ ```python
8
+ from anthropic import Anthropic
9
+ from pydantic import BaseModel, Field
10
+ from typing import Literal
11
+ import json
12
+
13
+ class SentimentAnalysis(BaseModel):
14
+ sentiment: Literal["positive", "negative", "neutral"]
15
+ confidence: float = Field(ge=0, le=1)
16
+ key_phrases: list[str]
17
+ reasoning: str
18
+
19
+ async def analyze_sentiment(text: str) -> SentimentAnalysis:
20
+ """Analyze sentiment with structured output."""
21
+ client = Anthropic()
22
+
23
+ message = client.messages.create(
24
+ model="claude-sonnet-4-6",
25
+ max_tokens=500,
26
+ messages=[{
27
+ "role": "user",
28
+ "content": f"""Analyze the sentiment of this text.
29
+
30
+ Text: {text}
31
+
32
+ Respond with JSON matching this schema:
33
+ {{
34
+ "sentiment": "positive" | "negative" | "neutral",
35
+ "confidence": 0.0-1.0,
36
+ "key_phrases": ["phrase1", "phrase2"],
37
+ "reasoning": "brief explanation"
38
+ }}"""
39
+ }]
40
+ )
41
+
42
+ return SentimentAnalysis(**json.loads(message.content[0].text))
43
+ ```
44
+
45
+ ### Pattern 2: Chain-of-Thought with Self-Verification
46
+
47
+ ```python
48
+ from langchain_core.prompts import ChatPromptTemplate
49
+
50
+ cot_prompt = ChatPromptTemplate.from_template("""
51
+ Solve this problem step by step.
52
+
53
+ Problem: {problem}
54
+
55
+ Instructions:
56
+ 1. Break down the problem into clear steps
57
+ 2. Work through each step showing your reasoning
58
+ 3. State your final answer
59
+ 4. Verify your answer by checking it against the original problem
60
+
61
+ Format your response as:
62
+ ## Steps
63
+ [Your step-by-step reasoning]
64
+
65
+ ## Answer
66
+ [Your final answer]
67
+
68
+ ## Verification
69
+ [Check that your answer is correct]
70
+ """)
71
+ ```
72
+
73
+ ### Pattern 3: Few-Shot with Dynamic Example Selection
74
+
75
+ ```python
76
+ from langchain_voyageai import VoyageAIEmbeddings
77
+ from langchain_core.example_selectors import SemanticSimilarityExampleSelector
78
+ from langchain_chroma import Chroma
79
+
80
+ # Create example selector with semantic similarity
81
+ example_selector = SemanticSimilarityExampleSelector.from_examples(
82
+ examples=[
83
+ {"input": "How do I reset my password?", "output": "Go to Settings > Security > Reset Password"},
84
+ {"input": "Where can I see my order history?", "output": "Navigate to Account > Orders"},
85
+ {"input": "How do I contact support?", "output": "Click Help > Contact Us or email support@example.com"},
86
+ ],
87
+ embeddings=VoyageAIEmbeddings(model="voyage-3-large"),
88
+ vectorstore_cls=Chroma,
89
+ k=2 # Select 2 most similar examples
90
+ )
91
+
92
+ async def get_few_shot_prompt(query: str) -> str:
93
+ """Build prompt with dynamically selected examples."""
94
+ examples = await example_selector.aselect_examples({"input": query})
95
+
96
+ examples_text = "\n".join(
97
+ f"User: {ex['input']}\nAssistant: {ex['output']}"
98
+ for ex in examples
99
+ )
100
+
101
+ return f"""You are a helpful customer support assistant.
102
+
103
+ Here are some example interactions:
104
+ {examples_text}
105
+
106
+ Now respond to this query:
107
+ User: {query}
108
+ Assistant:"""
109
+ ```
110
+
111
+ ### Pattern 4: Progressive Disclosure
112
+
113
+ Start with simple prompts, add complexity only when needed:
114
+
115
+ ```python
116
+ PROMPT_LEVELS = {
117
+ # Level 1: Direct instruction
118
+ "simple": "Summarize this article: {text}",
119
+
120
+ # Level 2: Add constraints
121
+ "constrained": """Summarize this article in 3 bullet points, focusing on:
122
+ - Key findings
123
+ - Main conclusions
124
+ - Practical implications
125
+
126
+ Article: {text}""",
127
+
128
+ # Level 3: Add reasoning
129
+ "reasoning": """Read this article carefully.
130
+ 1. First, identify the main topic and thesis
131
+ 2. Then, extract the key supporting points
132
+ 3. Finally, summarize in 3 bullet points
133
+
134
+ Article: {text}
135
+
136
+ Summary:""",
137
+
138
+ # Level 4: Add examples
139
+ "few_shot": """Read articles and provide concise summaries.
140
+
141
+ Example:
142
+ Article: "New research shows that regular exercise can reduce anxiety by up to 40%..."
143
+ Summary:
144
+ • Regular exercise reduces anxiety by up to 40%
145
+ • 30 minutes of moderate activity 3x/week is sufficient
146
+ • Benefits appear within 2 weeks of starting
147
+
148
+ Now summarize this article:
149
+ Article: {text}
150
+
151
+ Summary:"""
152
+ }
153
+ ```
154
+
155
+ ### Pattern 5: Error Recovery and Fallback
156
+
157
+ ```python
158
+ from pydantic import BaseModel, ValidationError
159
+ import json
160
+
161
+ class ResponseWithConfidence(BaseModel):
162
+ answer: str
163
+ confidence: float
164
+ sources: list[str]
165
+ alternative_interpretations: list[str] = []
166
+
167
+ ERROR_RECOVERY_PROMPT = """
168
+ Answer the question based on the context provided.
169
+
170
+ Context: {context}
171
+ Question: {question}
172
+
173
+ Instructions:
174
+ 1. If you can answer confidently (>0.8), provide a direct answer
175
+ 2. If you're somewhat confident (0.5-0.8), provide your best answer with caveats
176
+ 3. If you're uncertain (<0.5), explain what information is missing
177
+ 4. Always provide alternative interpretations if the question is ambiguous
178
+
179
+ Respond in JSON:
180
+ {{
181
+ "answer": "your answer or 'I cannot determine this from the context'",
182
+ "confidence": 0.0-1.0,
183
+ "sources": ["relevant context excerpts"],
184
+ "alternative_interpretations": ["if question is ambiguous"]
185
+ }}
186
+ """
187
+
188
+ async def answer_with_fallback(
189
+ context: str,
190
+ question: str,
191
+ llm
192
+ ) -> ResponseWithConfidence:
193
+ """Answer with error recovery and fallback."""
194
+ prompt = ERROR_RECOVERY_PROMPT.format(context=context, question=question)
195
+
196
+ try:
197
+ response = await llm.ainvoke(prompt)
198
+ return ResponseWithConfidence(**json.loads(response.content))
199
+ except (json.JSONDecodeError, ValidationError) as e:
200
+ # Fallback: try to extract answer without structure
201
+ simple_prompt = f"Based on: {context}\n\nAnswer: {question}"
202
+ simple_response = await llm.ainvoke(simple_prompt)
203
+ return ResponseWithConfidence(
204
+ answer=simple_response.content,
205
+ confidence=0.5,
206
+ sources=["fallback extraction"],
207
+ alternative_interpretations=[]
208
+ )
209
+ ```
210
+
211
+ ### Pattern 6: Role-Based System Prompts
212
+
213
+ ```python
214
+ SYSTEM_PROMPTS = {
215
+ "analyst": """You are a senior data analyst with expertise in SQL, Python, and business intelligence.
216
+
217
+ Your responsibilities:
218
+ - Write efficient, well-documented queries
219
+ - Explain your analysis methodology
220
+ - Highlight key insights and recommendations
221
+ - Flag any data quality concerns
222
+
223
+ Communication style:
224
+ - Be precise and technical when discussing methodology
225
+ - Translate technical findings into business impact
226
+ - Use clear visualizations when helpful""",
227
+
228
+ "assistant": """You are a helpful AI assistant focused on accuracy and clarity.
229
+
230
+ Core principles:
231
+ - Always cite sources when making factual claims
232
+ - Acknowledge uncertainty rather than guessing
233
+ - Ask clarifying questions when the request is ambiguous
234
+ - Provide step-by-step explanations for complex topics
235
+
236
+ Constraints:
237
+ - Do not provide medical, legal, or financial advice
238
+ - Redirect harmful requests appropriately
239
+ - Protect user privacy""",
240
+
241
+ "code_reviewer": """You are a senior software engineer conducting code reviews.
242
+
243
+ Review criteria:
244
+ - Correctness: Does the code work as intended?
245
+ - Security: Are there any vulnerabilities?
246
+ - Performance: Are there efficiency concerns?
247
+ - Maintainability: Is the code readable and well-structured?
248
+ - Best practices: Does it follow language idioms?
249
+
250
+ Output format:
251
+ 1. Summary assessment (approve/request changes)
252
+ 2. Critical issues (must fix)
253
+ 3. Suggestions (nice to have)
254
+ 4. Positive feedback (what's done well)"""
255
+ }
256
+ ```
257
+
258
+ ## Integration Patterns
259
+
260
+ ### With RAG Systems
261
+
262
+ ```python
263
+ RAG_PROMPT = """You are a knowledgeable assistant that answers questions based on provided context.
264
+
265
+ Context (retrieved from knowledge base):
266
+ {context}
267
+
268
+ Instructions:
269
+ 1. Answer ONLY based on the provided context
270
+ 2. If the context doesn't contain the answer, say "I don't have information about that in my knowledge base"
271
+ 3. Cite specific passages using [1], [2] notation
272
+ 4. If the question is ambiguous, ask for clarification
273
+
274
+ Question: {question}
275
+
276
+ Answer:"""
277
+ ```
278
+
279
+ ### With Validation and Verification
280
+
281
+ ```python
282
+ VALIDATED_PROMPT = """Complete the following task:
283
+
284
+ Task: {task}
285
+
286
+ After generating your response, verify it meets ALL these criteria:
287
+ ✓ Directly addresses the original request
288
+ ✓ Contains no factual errors
289
+ ✓ Is appropriately detailed (not too brief, not too verbose)
290
+ ✓ Uses proper formatting
291
+ ✓ Is safe and appropriate
292
+
293
+ If verification fails on any criterion, revise before responding.
294
+
295
+ Response:"""
296
+ ```
297
+
298
+ ## Performance Optimization
299
+
300
+ ### Token Efficiency
301
+
302
+ ```python
303
+ # Before: Verbose prompt (150+ tokens)
304
+ verbose_prompt = """
305
+ I would like you to please take the following text and provide me with a comprehensive
306
+ summary of the main points. The summary should capture the key ideas and important details
307
+ while being concise and easy to understand.
308
+ """
309
+
310
+ # After: Concise prompt (30 tokens)
311
+ concise_prompt = """Summarize the key points concisely:
312
+
313
+ {text}
314
+
315
+ Summary:"""
316
+ ```
317
+
318
+ ### Caching Common Prefixes
319
+
320
+ ```python
321
+ from anthropic import Anthropic
322
+
323
+ client = Anthropic()
324
+
325
+ # Use prompt caching for repeated system prompts
326
+ response = client.messages.create(
327
+ model="claude-sonnet-4-6",
328
+ max_tokens=1000,
329
+ system=[
330
+ {
331
+ "type": "text",
332
+ "text": LONG_SYSTEM_PROMPT,
333
+ "cache_control": {"type": "ephemeral"}
334
+ }
335
+ ],
336
+ messages=[{"role": "user", "content": user_query}]
337
+ )
338
+ ```