@caddis/cli 0.2.6 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (265) hide show
  1. package/bundles/antigravity-plugin/agents/claude-md-curator.md +1 -1
  2. package/bundles/antigravity-plugin/agents/knowledge-transfer.md +17 -32
  3. package/bundles/antigravity-plugin/caddis_statusline.py +825 -0
  4. package/bundles/antigravity-plugin/claude-md/folder-agents.md.tmpl +21 -0
  5. package/bundles/antigravity-plugin/guard_agy.py +60 -9
  6. package/bundles/antigravity-plugin/plugin.json +1 -1
  7. package/bundles/antigravity-plugin/scripts/caddis_gate.py +524 -0
  8. package/bundles/antigravity-plugin/scripts/caddis_inventory.py +439 -0
  9. package/bundles/antigravity-plugin/scripts/caddis_migrate_dir.py +270 -0
  10. package/bundles/antigravity-plugin/scripts/caddis_spawn.py +300 -0
  11. package/bundles/antigravity-plugin/scripts/caddis_statusline.py +825 -0
  12. package/bundles/antigravity-plugin/scripts/caddis_tidy.py +366 -0
  13. package/bundles/antigravity-plugin/scripts/check_doc_coverage.py +924 -0
  14. package/bundles/antigravity-plugin/scripts/claude-deepseek.ps1 +4 -0
  15. package/bundles/antigravity-plugin/scripts/claude-deepseek.sh +3 -0
  16. package/bundles/antigravity-plugin/scripts/claude-glm.ps1 +4 -0
  17. package/bundles/antigravity-plugin/scripts/claude-glm.sh +3 -0
  18. package/bundles/antigravity-plugin/scripts/claude-oss.ps1 +64 -0
  19. package/bundles/antigravity-plugin/scripts/claude-oss.sh +60 -0
  20. package/bundles/antigravity-plugin/scripts/claudster_config.py +121 -0
  21. package/bundles/antigravity-plugin/scripts/claudster_doctor.py +356 -0
  22. package/bundles/antigravity-plugin/scripts/claudster_init.py +400 -0
  23. package/bundles/antigravity-plugin/scripts/claudster_migrate_rules.py +300 -0
  24. package/bundles/antigravity-plugin/scripts/enforcement_inventory.py +261 -0
  25. package/bundles/antigravity-plugin/scripts/hook_log.py +156 -0
  26. package/bundles/antigravity-plugin/scripts/new-machine.ps1 +170 -0
  27. package/bundles/antigravity-plugin/scripts/oss_ask.py +98 -0
  28. package/bundles/antigravity-plugin/scripts/oss_model.py +174 -0
  29. package/bundles/antigravity-plugin/scripts/oss_review.py +718 -0
  30. package/bundles/antigravity-plugin/scripts/setup_project_ai.py +1432 -0
  31. package/bundles/antigravity-plugin/scripts/usage_review.py +1323 -0
  32. package/bundles/antigravity-plugin/session_end_agy.py +52 -8
  33. package/bundles/antigravity-plugin/skills/_registry.md +1 -0
  34. package/bundles/antigravity-plugin/skills/advisory-hub/SKILL.md +44 -0
  35. package/bundles/antigravity-plugin/skills/code-review/SKILL.md +11 -0
  36. package/bundles/antigravity-plugin/skills/fastapi-dev/SKILL.md +1 -1
  37. package/bundles/antigravity-plugin/skills/feature-plan/SKILL.md +21 -0
  38. package/bundles/antigravity-plugin/skills/gate-review/SKILL.md +11 -0
  39. package/bundles/antigravity-plugin/skills/implement/SKILL.md +36 -0
  40. package/bundles/antigravity-plugin/skills/security-review/SKILL.md +9 -0
  41. package/bundles/antigravity-plugin/skills/ship/SKILL.md +1 -1
  42. package/bundles/antigravity-plugin/skills/ship-merge/SKILL.md +1 -1
  43. package/bundles/antigravity-plugin/skills/ship-pr/SKILL.md +1 -1
  44. package/bundles/antigravity-plugin/skills/statusline/SKILL.md +105 -0
  45. package/bundles/antigravity-plugin/skills/use-model/SKILL.md +15 -3
  46. package/bundles/antigravity-plugin/skills/validate-phase/SKILL.md +31 -0
  47. package/bundles/antigravity-plugin/warm_start_agy.py +117 -11
  48. package/bundles/antigravity-plugin-extras/plugin.json +1 -1
  49. package/bundles/antigravity-plugin-extras/skills/architecture-design/SKILL.md +1 -1
  50. package/bundles/antigravity-plugin-extras/skills/caching-patterns/SKILL.md +1 -1
  51. package/bundles/antigravity-plugin-extras/skills/webapp-development/SKILL.md +1 -1
  52. package/bundles/codex/.codex/config.toml.example +36 -0
  53. package/bundles/codex/.codex/skills/coding/api-design/SKILL.md +249 -0
  54. package/bundles/codex/.codex/skills/coding/backend-development/SKILL.md +305 -0
  55. package/bundles/codex/.codex/skills/coding/code-review/SKILL.md +140 -0
  56. package/bundles/codex/.codex/skills/coding/codebase-audit/SKILL.md +204 -0
  57. package/bundles/codex/.codex/skills/coding/dashboard-perf-sweep/SKILL.md +132 -0
  58. package/bundles/codex/.codex/skills/coding/dashboard-perf-sweep/scripts/perf_sweep.py +249 -0
  59. package/bundles/codex/.codex/skills/coding/error-handling/SKILL.md +260 -0
  60. package/bundles/codex/.codex/skills/coding/fastapi-dev/SKILL.md +300 -0
  61. package/bundles/codex/.codex/skills/coding/javascript-typescript/SKILL.md +142 -0
  62. package/bundles/codex/.codex/skills/coding/python/SKILL.md +388 -0
  63. package/bundles/codex/.codex/skills/coding/refactoring/SKILL.md +486 -0
  64. package/bundles/codex/.codex/skills/coding/security-review/SKILL.md +205 -0
  65. package/bundles/codex/.codex/skills/coding/sql/SKILL.md +321 -0
  66. package/bundles/codex/.codex/skills/data/database-design/SKILL.md +177 -0
  67. package/bundles/codex/.codex/skills/data/db-diagram/SKILL.md +148 -0
  68. package/bundles/codex/.codex/skills/data/db-diagram/scripts/sql_to_graph.py +1212 -0
  69. package/bundles/codex/.codex/skills/devops/ci-cd-pipeline/SKILL.md +315 -0
  70. package/bundles/codex/.codex/skills/devops/gh-cli/SKILL.md +195 -0
  71. package/bundles/codex/.codex/skills/devops/git-commit/SKILL.md +285 -0
  72. package/bundles/codex/.codex/skills/devops/using-git-worktrees/SKILL.md +217 -0
  73. package/bundles/codex/.codex/skills/devops/windows-deployment/SKILL.md +880 -0
  74. package/bundles/codex/.codex/skills/docs/code-documentation/SKILL.md +271 -0
  75. package/bundles/codex/.codex/skills/docs/explainer-doc/SKILL.md +97 -0
  76. package/bundles/codex/.codex/skills/docs/technical-writing/SKILL.md +286 -0
  77. package/bundles/codex/.codex/skills/docs/writing-plans/SKILL.md +387 -0
  78. package/bundles/codex/.codex/skills/frontend/css-architecture/SKILL.md +305 -0
  79. package/bundles/codex/.codex/skills/frontend/css-architecture/references/RESPONSIVE-DESIGN.md +604 -0
  80. package/bundles/codex/.codex/skills/frontend/frontend-design/SKILL.md +193 -0
  81. package/bundles/codex/.codex/skills/frontend/frontend-design/references/my-tech-stack.md +127 -0
  82. package/bundles/codex/.codex/skills/frontend/mockup/SKILL.md +242 -0
  83. package/bundles/codex/.codex/skills/frontend/react-best-practices/SKILL.md +269 -0
  84. package/bundles/codex/.codex/skills/frontend/react-dev/README.md +404 -0
  85. package/bundles/codex/.codex/skills/frontend/react-dev/SKILL.md +459 -0
  86. package/bundles/codex/.codex/skills/frontend/react-dev/examples/generic-components.md +579 -0
  87. package/bundles/codex/.codex/skills/frontend/react-dev/examples/server-components.md +579 -0
  88. package/bundles/codex/.codex/skills/frontend/react-dev/references/event-handlers.md +574 -0
  89. package/bundles/codex/.codex/skills/frontend/react-dev/references/hooks.md +456 -0
  90. package/bundles/codex/.codex/skills/frontend/react-dev/references/react-19-patterns.md +638 -0
  91. package/bundles/codex/.codex/skills/frontend/react-dev/references/react-router.md +1002 -0
  92. package/bundles/codex/.codex/skills/frontend/react-dev/references/tanstack-router.md +587 -0
  93. package/bundles/codex/.codex/skills/frontend/ui-review/SKILL.md +176 -0
  94. package/bundles/codex/.codex/skills/frontend/ui-review/references/framework-fixes.md +471 -0
  95. package/bundles/codex/.codex/skills/frontend/ui-review/references/visual-checklist.md +236 -0
  96. package/bundles/codex/.codex/skills/frontend/warm-editorial-ui/DESIGN_TOKENS.md +487 -0
  97. package/bundles/codex/.codex/skills/frontend/warm-editorial-ui/IMPLEMENTATION_GUIDE.md +177 -0
  98. package/bundles/codex/.codex/skills/frontend/warm-editorial-ui/SKILL.md +732 -0
  99. package/bundles/codex/.codex/skills/media/draw-io/SKILL.md +162 -0
  100. package/bundles/codex/.codex/skills/media/draw-io/references/aws-icons.md +677 -0
  101. package/bundles/codex/.codex/skills/media/draw-io/references/layout-guidelines.md +142 -0
  102. package/bundles/codex/.codex/skills/media/draw-io/references/troubleshooting.md +118 -0
  103. package/bundles/codex/.codex/skills/media/draw-io/references/workflows.md +103 -0
  104. package/bundles/codex/.codex/skills/media/draw-io/scripts/convert-drawio-to-png.sh +25 -0
  105. package/bundles/codex/.codex/skills/media/draw-io/scripts/find_aws_icon.py +79 -0
  106. package/bundles/codex/.codex/skills/media/mermaid-diagrams/SKILL.md +292 -0
  107. package/bundles/codex/.codex/skills/media/mermaid-diagrams/references/ENHANCEMENTS.md +264 -0
  108. package/bundles/codex/.codex/skills/media/mermaid-diagrams/references/MERMAID-SUMMARY.md +137 -0
  109. package/bundles/codex/.codex/skills/media/mermaid-diagrams/references/advanced-features.md +556 -0
  110. package/bundles/codex/.codex/skills/media/mermaid-diagrams/references/architecture-diagrams.md +192 -0
  111. package/bundles/codex/.codex/skills/media/mermaid-diagrams/references/c4-diagrams.md +410 -0
  112. package/bundles/codex/.codex/skills/media/mermaid-diagrams/references/class-diagrams.md +361 -0
  113. package/bundles/codex/.codex/skills/media/mermaid-diagrams/references/erd-diagrams.md +510 -0
  114. package/bundles/codex/.codex/skills/media/mermaid-diagrams/references/flowcharts.md +450 -0
  115. package/bundles/codex/.codex/skills/media/mermaid-diagrams/references/sequence-diagrams.md +394 -0
  116. package/bundles/codex/.codex/skills/media/mermaid-diagrams/references/troubleshooting.md +335 -0
  117. package/bundles/codex/.codex/skills/media/mermaid-diagrams/references/workflows.md +418 -0
  118. package/bundles/codex/.codex/skills/media/particle-art/SKILL.md +243 -0
  119. package/bundles/codex/.codex/skills/media/particle-art/references/canvas-utils.ts +171 -0
  120. package/bundles/codex/.codex/skills/media/particle-art/references/dot-field.template.tsx +203 -0
  121. package/bundles/codex/.codex/skills/media/particle-art/references/flow-field.template.tsx +263 -0
  122. package/bundles/codex/.codex/skills/media/particle-art/references/node-shape.template.tsx +261 -0
  123. package/bundles/codex/.codex/skills/media/particle-art/references/shape-sampler.ts +281 -0
  124. package/bundles/codex/.codex/skills/media/particle-art/references/stipple-morph.template.tsx +167 -0
  125. package/bundles/codex/.codex/skills/media/particle-art/references/stipple.template.tsx +175 -0
  126. package/bundles/codex/.codex/skills/media/particle-art/references/trail-ghost.template.tsx +266 -0
  127. package/bundles/codex/.codex/skills/media/particle-art/references/usage-examples.md +320 -0
  128. package/bundles/codex/.codex/skills/testing/playwright/API_REFERENCE.md +653 -0
  129. package/bundles/codex/.codex/skills/testing/playwright/SKILL.md +454 -0
  130. package/bundles/codex/.codex/skills/testing/playwright/lib/helpers.js +441 -0
  131. package/bundles/codex/.codex/skills/testing/playwright/package.json +26 -0
  132. package/bundles/codex/.codex/skills/testing/playwright/run.js +228 -0
  133. package/bundles/codex/.codex/skills/testing/tdd-workflow/SKILL.md +188 -0
  134. package/bundles/codex/.codex/skills/testing/test-strategy/SKILL.md +155 -0
  135. package/bundles/codex/.codex/skills/testing/webapp-testing/LICENSE.txt +202 -0
  136. package/bundles/codex/.codex/skills/testing/webapp-testing/SKILL.md +97 -0
  137. package/bundles/codex/.codex/skills/testing/webapp-testing/examples/console_logging.py +35 -0
  138. package/bundles/codex/.codex/skills/testing/webapp-testing/examples/element_discovery.py +40 -0
  139. package/bundles/codex/.codex/skills/testing/webapp-testing/examples/static_html_automation.py +33 -0
  140. package/bundles/codex/.codex/skills/testing/webapp-testing/scripts/with_server.py +106 -0
  141. package/bundles/codex/.codex/skills/workflow/advisory-hub/SKILL.md +227 -0
  142. package/bundles/codex/.codex/skills/workflow/advisory-hub/reference/context-template.md +214 -0
  143. package/bundles/codex/.codex/skills/workflow/advisory-hub/reference/hub-handbook.md +233 -0
  144. package/bundles/codex/.codex/skills/workflow/advisory-hub/reference/report-contract.md +94 -0
  145. package/bundles/codex/.codex/skills/workflow/advisory-hub/reference/succession.md +118 -0
  146. package/bundles/codex/.codex/skills/workflow/best-practices/SKILL.md +500 -0
  147. package/bundles/codex/.codex/skills/workflow/best-practices/agents/best-practices-referencer.md +263 -0
  148. package/bundles/codex/.codex/skills/workflow/best-practices/agents/codebase-context-builder.md +326 -0
  149. package/bundles/codex/.codex/skills/workflow/best-practices/agents/task-intent-analyzer.md +245 -0
  150. package/bundles/codex/.codex/skills/workflow/best-practices/references/anti-patterns.md +571 -0
  151. package/bundles/codex/.codex/skills/workflow/best-practices/references/before-after-examples.md +1114 -0
  152. package/bundles/codex/.codex/skills/workflow/best-practices/references/best-practices-guide.md +513 -0
  153. package/bundles/codex/.codex/skills/workflow/best-practices/references/common-workflows.md +692 -0
  154. package/bundles/codex/.codex/skills/workflow/best-practices/references/prompt-patterns.md +547 -0
  155. package/bundles/codex/.codex/skills/workflow/brainstorming/SKILL.md +57 -0
  156. package/bundles/codex/.codex/skills/workflow/context-curator/SKILL.md +157 -0
  157. package/bundles/codex/.codex/skills/workflow/golden-plan/SKILL.md +586 -0
  158. package/bundles/codex/.codex/skills/workflow/preflight/SKILL.md +440 -0
  159. package/bundles/codex/.codex/skills/workflow/skill-creator/LICENSE.txt +202 -0
  160. package/bundles/codex/.codex/skills/workflow/skill-creator/SKILL.md +491 -0
  161. package/bundles/codex/.codex/skills/workflow/skill-creator/agents/analyzer.md +274 -0
  162. package/bundles/codex/.codex/skills/workflow/skill-creator/agents/comparator.md +202 -0
  163. package/bundles/codex/.codex/skills/workflow/skill-creator/agents/grader.md +223 -0
  164. package/bundles/codex/.codex/skills/workflow/skill-creator/assets/eval_review.html +146 -0
  165. package/bundles/codex/.codex/skills/workflow/skill-creator/eval-viewer/generate_review.py +471 -0
  166. package/bundles/codex/.codex/skills/workflow/skill-creator/eval-viewer/viewer.html +1325 -0
  167. package/bundles/codex/.codex/skills/workflow/skill-creator/references/schemas.md +430 -0
  168. package/bundles/codex/.codex/skills/workflow/skill-creator/scripts/__init__.py +0 -0
  169. package/bundles/codex/.codex/skills/workflow/skill-creator/scripts/aggregate_benchmark.py +401 -0
  170. package/bundles/codex/.codex/skills/workflow/skill-creator/scripts/generate_report.py +326 -0
  171. package/bundles/codex/.codex/skills/workflow/skill-creator/scripts/improve_description.py +247 -0
  172. package/bundles/codex/.codex/skills/workflow/skill-creator/scripts/package_skill.py +136 -0
  173. package/bundles/codex/.codex/skills/workflow/skill-creator/scripts/quick_validate.py +103 -0
  174. package/bundles/codex/.codex/skills/workflow/skill-creator/scripts/run_eval.py +310 -0
  175. package/bundles/codex/.codex/skills/workflow/skill-creator/scripts/run_loop.py +328 -0
  176. package/bundles/codex/.codex/skills/workflow/skill-creator/scripts/utils.py +47 -0
  177. package/bundles/codex/AGENTS.md +146 -0
  178. package/bundles/manifest.json +4 -3
  179. package/dist/claude-deepseek.js +544 -0
  180. package/dist/claude-glm.js +544 -0
  181. package/dist/claude-oss.js +544 -0
  182. package/dist/cli.js +542 -90
  183. package/package.json +5 -2
  184. package/bundles/antigravity-plugin/statusline-command-agy.sh +0 -91
  185. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/ArsenalSC-OFL.txt +0 -93
  186. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
  187. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BigShoulders-Bold.ttf +0 -0
  188. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BigShoulders-OFL.txt +0 -93
  189. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BigShoulders-Regular.ttf +0 -0
  190. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Boldonse-OFL.txt +0 -93
  191. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Boldonse-Regular.ttf +0 -0
  192. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
  193. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BricolageGrotesque-OFL.txt +0 -93
  194. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
  195. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
  196. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
  197. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/CrimsonPro-OFL.txt +0 -93
  198. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
  199. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/DMMono-OFL.txt +0 -93
  200. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/DMMono-Regular.ttf +0 -0
  201. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/EricaOne-OFL.txt +0 -94
  202. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/EricaOne-Regular.ttf +0 -0
  203. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/GeistMono-Bold.ttf +0 -0
  204. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/GeistMono-OFL.txt +0 -93
  205. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/GeistMono-Regular.ttf +0 -0
  206. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Gloock-OFL.txt +0 -93
  207. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Gloock-Regular.ttf +0 -0
  208. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
  209. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexMono-OFL.txt +0 -93
  210. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
  211. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
  212. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
  213. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
  214. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
  215. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
  216. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
  217. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
  218. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSans-OFL.txt +0 -93
  219. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
  220. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
  221. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
  222. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Italiana-OFL.txt +0 -93
  223. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Italiana-Regular.ttf +0 -0
  224. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
  225. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/JetBrainsMono-OFL.txt +0 -93
  226. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
  227. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Jura-Light.ttf +0 -0
  228. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Jura-Medium.ttf +0 -0
  229. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Jura-OFL.txt +0 -93
  230. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/LibreBaskerville-OFL.txt +0 -93
  231. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
  232. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Lora-Bold.ttf +0 -0
  233. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Lora-BoldItalic.ttf +0 -0
  234. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Lora-Italic.ttf +0 -0
  235. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Lora-OFL.txt +0 -93
  236. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Lora-Regular.ttf +0 -0
  237. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/NationalPark-Bold.ttf +0 -0
  238. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/NationalPark-OFL.txt +0 -93
  239. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/NationalPark-Regular.ttf +0 -0
  240. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/NothingYouCouldDo-OFL.txt +0 -93
  241. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
  242. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Outfit-Bold.ttf +0 -0
  243. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Outfit-OFL.txt +0 -93
  244. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Outfit-Regular.ttf +0 -0
  245. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/PixelifySans-Medium.ttf +0 -0
  246. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/PixelifySans-OFL.txt +0 -93
  247. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/PoiretOne-OFL.txt +0 -93
  248. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/PoiretOne-Regular.ttf +0 -0
  249. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/RedHatMono-Bold.ttf +0 -0
  250. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/RedHatMono-OFL.txt +0 -93
  251. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/RedHatMono-Regular.ttf +0 -0
  252. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Silkscreen-OFL.txt +0 -93
  253. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Silkscreen-Regular.ttf +0 -0
  254. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/SmoochSans-Medium.ttf +0 -0
  255. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/SmoochSans-OFL.txt +0 -93
  256. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Tektur-Medium.ttf +0 -0
  257. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Tektur-OFL.txt +0 -93
  258. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Tektur-Regular.ttf +0 -0
  259. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/WorkSans-Bold.ttf +0 -0
  260. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
  261. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/WorkSans-Italic.ttf +0 -0
  262. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/WorkSans-OFL.txt +0 -93
  263. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/WorkSans-Regular.ttf +0 -0
  264. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/YoungSerif-OFL.txt +0 -93
  265. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/YoungSerif-Regular.ttf +0 -0
@@ -0,0 +1,544 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __caddisCreateRequire } from 'node:module';
3
+ const require = __caddisCreateRequire(import.meta.url);
4
+ var __create = Object.create;
5
+ var __defProp = Object.defineProperty;
6
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
+ var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getProtoOf = Object.getPrototypeOf;
9
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
11
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
12
+ }) : x)(function(x) {
13
+ if (typeof require !== "undefined") return require.apply(this, arguments);
14
+ throw Error('Dynamic require of "' + x + '" is not supported');
15
+ });
16
+ var __commonJS = (cb, mod) => function __require2() {
17
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
18
+ };
19
+ var __copyProps = (to, from, except, desc) => {
20
+ if (from && typeof from === "object" || typeof from === "function") {
21
+ for (let key of __getOwnPropNames(from))
22
+ if (!__hasOwnProp.call(to, key) && key !== except)
23
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
24
+ }
25
+ return to;
26
+ };
27
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
28
+ // If the importer is in node compatibility mode or this is not an ESM
29
+ // file that has been converted to a CommonJS file using a Babel-
30
+ // compatible transform (i.e. "__esModule" has not been set), then set
31
+ // "default" to the CommonJS "module.exports" for node compatibility.
32
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
33
+ mod
34
+ ));
35
+
36
+ // node_modules/picocolors/picocolors.js
37
+ var require_picocolors = __commonJS({
38
+ "node_modules/picocolors/picocolors.js"(exports, module) {
39
+ "use strict";
40
+ var p = process || {};
41
+ var argv = p.argv || [];
42
+ var env = p.env || {};
43
+ var isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
44
+ var formatter = (open, close, replace = open) => (input) => {
45
+ let string = "" + input, index = string.indexOf(close, open.length);
46
+ return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
47
+ };
48
+ var replaceClose = (string, close, replace, index) => {
49
+ let result = "", cursor = 0;
50
+ do {
51
+ result += string.substring(cursor, index) + replace;
52
+ cursor = index + close.length;
53
+ index = string.indexOf(close, cursor);
54
+ } while (~index);
55
+ return result + string.substring(cursor);
56
+ };
57
+ var createColors = (enabled = isColorSupported) => {
58
+ let f = enabled ? formatter : () => String;
59
+ return {
60
+ isColorSupported: enabled,
61
+ reset: f("\x1B[0m", "\x1B[0m"),
62
+ bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
63
+ dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
64
+ italic: f("\x1B[3m", "\x1B[23m"),
65
+ underline: f("\x1B[4m", "\x1B[24m"),
66
+ inverse: f("\x1B[7m", "\x1B[27m"),
67
+ hidden: f("\x1B[8m", "\x1B[28m"),
68
+ strikethrough: f("\x1B[9m", "\x1B[29m"),
69
+ black: f("\x1B[30m", "\x1B[39m"),
70
+ red: f("\x1B[31m", "\x1B[39m"),
71
+ green: f("\x1B[32m", "\x1B[39m"),
72
+ yellow: f("\x1B[33m", "\x1B[39m"),
73
+ blue: f("\x1B[34m", "\x1B[39m"),
74
+ magenta: f("\x1B[35m", "\x1B[39m"),
75
+ cyan: f("\x1B[36m", "\x1B[39m"),
76
+ white: f("\x1B[37m", "\x1B[39m"),
77
+ gray: f("\x1B[90m", "\x1B[39m"),
78
+ bgBlack: f("\x1B[40m", "\x1B[49m"),
79
+ bgRed: f("\x1B[41m", "\x1B[49m"),
80
+ bgGreen: f("\x1B[42m", "\x1B[49m"),
81
+ bgYellow: f("\x1B[43m", "\x1B[49m"),
82
+ bgBlue: f("\x1B[44m", "\x1B[49m"),
83
+ bgMagenta: f("\x1B[45m", "\x1B[49m"),
84
+ bgCyan: f("\x1B[46m", "\x1B[49m"),
85
+ bgWhite: f("\x1B[47m", "\x1B[49m"),
86
+ blackBright: f("\x1B[90m", "\x1B[39m"),
87
+ redBright: f("\x1B[91m", "\x1B[39m"),
88
+ greenBright: f("\x1B[92m", "\x1B[39m"),
89
+ yellowBright: f("\x1B[93m", "\x1B[39m"),
90
+ blueBright: f("\x1B[94m", "\x1B[39m"),
91
+ magentaBright: f("\x1B[95m", "\x1B[39m"),
92
+ cyanBright: f("\x1B[96m", "\x1B[39m"),
93
+ whiteBright: f("\x1B[97m", "\x1B[39m"),
94
+ bgBlackBright: f("\x1B[100m", "\x1B[49m"),
95
+ bgRedBright: f("\x1B[101m", "\x1B[49m"),
96
+ bgGreenBright: f("\x1B[102m", "\x1B[49m"),
97
+ bgYellowBright: f("\x1B[103m", "\x1B[49m"),
98
+ bgBlueBright: f("\x1B[104m", "\x1B[49m"),
99
+ bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
100
+ bgCyanBright: f("\x1B[106m", "\x1B[49m"),
101
+ bgWhiteBright: f("\x1B[107m", "\x1B[49m")
102
+ };
103
+ };
104
+ module.exports = createColors();
105
+ module.exports.createColors = createColors;
106
+ }
107
+ });
108
+
109
+ // node_modules/isexe/dist/commonjs/index.min.js
110
+ var require_index_min = __commonJS({
111
+ "node_modules/isexe/dist/commonjs/index.min.js"(exports) {
112
+ "use strict";
113
+ var a = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports);
114
+ var _ = a((i) => {
115
+ "use strict";
116
+ Object.defineProperty(i, "__esModule", { value: true });
117
+ i.sync = i.isexe = void 0;
118
+ var M = __require("fs"), x = __require("fs/promises"), q = async (t, e = {}) => {
119
+ let { ignoreErrors: r = false } = e;
120
+ try {
121
+ return d(await (0, x.stat)(t), e);
122
+ } catch (s) {
123
+ let n = s;
124
+ if (r || n.code === "EACCES") return false;
125
+ throw n;
126
+ }
127
+ };
128
+ i.isexe = q;
129
+ var m = (t, e = {}) => {
130
+ let { ignoreErrors: r = false } = e;
131
+ try {
132
+ return d((0, M.statSync)(t), e);
133
+ } catch (s) {
134
+ let n = s;
135
+ if (r || n.code === "EACCES") return false;
136
+ throw n;
137
+ }
138
+ };
139
+ i.sync = m;
140
+ var d = (t, e) => t.isFile() && A(t, e), A = (t, e) => {
141
+ let r = e.uid ?? process.getuid?.(), s = e.groups ?? process.getgroups?.() ?? [], n = e.gid ?? process.getgid?.() ?? s[0];
142
+ if (r === void 0 || n === void 0) throw new Error("cannot get uid or gid");
143
+ let u = /* @__PURE__ */ new Set([n, ...s]), c = t.mode, S = t.uid, P = t.gid, f = parseInt("100", 8), l = parseInt("010", 8), j = parseInt("001", 8), C = f | l;
144
+ return !!(c & j || c & l && u.has(P) || c & f && S === r || c & C && r === 0);
145
+ };
146
+ });
147
+ var g = a((o) => {
148
+ "use strict";
149
+ Object.defineProperty(o, "__esModule", { value: true });
150
+ o.sync = o.isexe = void 0;
151
+ var T = __require("fs"), I = __require("fs/promises"), D = __require("path"), F = async (t, e = {}) => {
152
+ let { ignoreErrors: r = false } = e;
153
+ try {
154
+ return y(await (0, I.stat)(t), t, e);
155
+ } catch (s) {
156
+ let n = s;
157
+ if (r || n.code === "EACCES") return false;
158
+ throw n;
159
+ }
160
+ };
161
+ o.isexe = F;
162
+ var L = (t, e = {}) => {
163
+ let { ignoreErrors: r = false } = e;
164
+ try {
165
+ return y((0, T.statSync)(t), t, e);
166
+ } catch (s) {
167
+ let n = s;
168
+ if (r || n.code === "EACCES") return false;
169
+ throw n;
170
+ }
171
+ };
172
+ o.sync = L;
173
+ var B = (t, e) => {
174
+ let { pathExt: r = process.env.PATHEXT || "" } = e, s = r.split(D.delimiter);
175
+ if (s.indexOf("") !== -1) return true;
176
+ for (let n of s) {
177
+ let u = n.toLowerCase(), c = t.substring(t.length - u.length).toLowerCase();
178
+ if (u && c === u) return true;
179
+ }
180
+ return false;
181
+ }, y = (t, e, r) => t.isFile() && B(e, r);
182
+ });
183
+ var p = a((h) => {
184
+ "use strict";
185
+ Object.defineProperty(h, "__esModule", { value: true });
186
+ });
187
+ var v = exports && exports.__createBinding || (Object.create ? (function(t, e, r, s) {
188
+ s === void 0 && (s = r);
189
+ var n = Object.getOwnPropertyDescriptor(e, r);
190
+ (!n || ("get" in n ? !e.__esModule : n.writable || n.configurable)) && (n = { enumerable: true, get: function() {
191
+ return e[r];
192
+ } }), Object.defineProperty(t, s, n);
193
+ }) : (function(t, e, r, s) {
194
+ s === void 0 && (s = r), t[s] = e[r];
195
+ }));
196
+ var G = exports && exports.__setModuleDefault || (Object.create ? (function(t, e) {
197
+ Object.defineProperty(t, "default", { enumerable: true, value: e });
198
+ }) : function(t, e) {
199
+ t.default = e;
200
+ });
201
+ var w = exports && exports.__importStar || /* @__PURE__ */ (function() {
202
+ var t = function(e) {
203
+ return t = Object.getOwnPropertyNames || function(r) {
204
+ var s = [];
205
+ for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && (s[s.length] = n);
206
+ return s;
207
+ }, t(e);
208
+ };
209
+ return function(e) {
210
+ if (e && e.__esModule) return e;
211
+ var r = {};
212
+ if (e != null) for (var s = t(e), n = 0; n < s.length; n++) s[n] !== "default" && v(r, e, s[n]);
213
+ return G(r, e), r;
214
+ };
215
+ })();
216
+ var X = exports && exports.__exportStar || function(t, e) {
217
+ for (var r in t) r !== "default" && !Object.prototype.hasOwnProperty.call(e, r) && v(e, t, r);
218
+ };
219
+ Object.defineProperty(exports, "__esModule", { value: true });
220
+ exports.sync = exports.isexe = exports.posix = exports.win32 = void 0;
221
+ var E = w(_());
222
+ exports.posix = E;
223
+ var O = w(g());
224
+ exports.win32 = O;
225
+ X(p(), exports);
226
+ var H = process.env._ISEXE_TEST_PLATFORM_ || process.platform;
227
+ var b = H === "win32" ? O : E;
228
+ exports.isexe = b.isexe;
229
+ exports.sync = b.sync;
230
+ }
231
+ });
232
+
233
+ // node_modules/which/lib/index.js
234
+ var require_lib = __commonJS({
235
+ "node_modules/which/lib/index.js"(exports, module) {
236
+ "use strict";
237
+ var { isexe, sync: isexeSync } = require_index_min();
238
+ var { join: join2, delimiter, sep, posix } = __require("path");
239
+ var isWindows = process.platform === "win32";
240
+ var rSlash = new RegExp(`[${posix.sep}${sep === posix.sep ? "" : sep}]`.replace(/(\\)/g, "\\$1"));
241
+ var rRel = new RegExp(`^\\.${rSlash.source}`);
242
+ var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
243
+ var getPathInfo = (cmd, {
244
+ path: optPath = process.env.PATH,
245
+ pathExt: optPathExt = process.env.PATHEXT,
246
+ delimiter: optDelimiter = delimiter
247
+ }) => {
248
+ const pathEnv = cmd.match(rSlash) ? [""] : [
249
+ // windows always checks the cwd first
250
+ ...isWindows ? [process.cwd()] : [],
251
+ ...(optPath || /* istanbul ignore next: very unusual */
252
+ "").split(optDelimiter)
253
+ ];
254
+ if (isWindows) {
255
+ const pathExtExe = optPathExt || [".EXE", ".CMD", ".BAT", ".COM"].join(optDelimiter);
256
+ const pathExt = pathExtExe.split(optDelimiter).flatMap((item) => [item, item.toLowerCase()]);
257
+ if (cmd.includes(".") && pathExt[0] !== "") {
258
+ pathExt.unshift("");
259
+ }
260
+ return { pathEnv, pathExt, pathExtExe };
261
+ }
262
+ return { pathEnv, pathExt: [""] };
263
+ };
264
+ var getPathPart = (raw, cmd) => {
265
+ const pathPart = /^".*"$/.test(raw) ? raw.slice(1, -1) : raw;
266
+ const prefix = !pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : "";
267
+ return prefix + join2(pathPart, cmd);
268
+ };
269
+ var which = async (cmd, opt = {}) => {
270
+ const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
271
+ const found = [];
272
+ for (const envPart of pathEnv) {
273
+ const p = getPathPart(envPart, cmd);
274
+ for (const ext of pathExt) {
275
+ const withExt = p + ext;
276
+ const is = await isexe(withExt, { pathExt: pathExtExe, ignoreErrors: true });
277
+ if (is) {
278
+ if (!opt.all) {
279
+ return withExt;
280
+ }
281
+ found.push(withExt);
282
+ }
283
+ }
284
+ }
285
+ if (opt.all && found.length) {
286
+ return found;
287
+ }
288
+ if (opt.nothrow) {
289
+ return null;
290
+ }
291
+ throw getNotFoundError(cmd);
292
+ };
293
+ var whichSync = (cmd, opt = {}) => {
294
+ const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
295
+ const found = [];
296
+ for (const pathEnvPart of pathEnv) {
297
+ const p = getPathPart(pathEnvPart, cmd);
298
+ for (const ext of pathExt) {
299
+ const withExt = p + ext;
300
+ const is = isexeSync(withExt, { pathExt: pathExtExe, ignoreErrors: true });
301
+ if (is) {
302
+ if (!opt.all) {
303
+ return withExt;
304
+ }
305
+ found.push(withExt);
306
+ }
307
+ }
308
+ }
309
+ if (opt.all && found.length) {
310
+ return found;
311
+ }
312
+ if (opt.nothrow) {
313
+ return null;
314
+ }
315
+ throw getNotFoundError(cmd);
316
+ };
317
+ module.exports = which;
318
+ which.sync = whichSync;
319
+ }
320
+ });
321
+
322
+ // src/providers/resolve.ts
323
+ import { readFileSync } from "fs";
324
+ import { homedir } from "os";
325
+ import { isAbsolute, join } from "path";
326
+ var PROVIDERS = {
327
+ deepseek: {
328
+ baseUrl: "https://api.deepseek.com/anthropic",
329
+ model: "deepseek-v4-flash[1m]",
330
+ keyEnv: "DEEPSEEK_API_KEY"
331
+ },
332
+ glm: {
333
+ baseUrl: "https://api.z.ai/api/anthropic",
334
+ model: "glm-5.3[1m]",
335
+ keyEnv: "GLM_API_KEY"
336
+ },
337
+ // OpenRouter has no Anthropic-protocol endpoint. It works only through an
338
+ // Anthropic-compatible gateway (e.g. LiteLLM — see claude-harness/LOCAL-MODELS.md)
339
+ // whose URL you supply via OSS_BASE_URL.
340
+ openrouter: {
341
+ baseUrl: "",
342
+ model: "deepseek/deepseek-v4-flash",
343
+ keyEnv: "OPENROUTER_API_KEY"
344
+ }
345
+ };
346
+ var DEFAULT_PROVIDER = "deepseek";
347
+ var DEFAULT_KEYS_FILE = "~/.caddis/keys.env";
348
+ var KEYS_FILE_ENV = "CADDIS_KEYS_FILE";
349
+ var ConfigError = class extends Error {
350
+ };
351
+ function expandHome(p) {
352
+ if (p === "~") return homedir();
353
+ if (p.startsWith("~/") || p.startsWith("~\\")) return join(homedir(), p.slice(2));
354
+ return p;
355
+ }
356
+ function keysFilePath(env) {
357
+ const configured = (env[KEYS_FILE_ENV] || "").trim() || DEFAULT_KEYS_FILE;
358
+ const expanded = expandHome(configured);
359
+ return isAbsolute(expanded) ? expanded : expanded;
360
+ }
361
+ function parseKeysFile(path) {
362
+ let text;
363
+ try {
364
+ text = readFileSync(path, "utf8");
365
+ } catch {
366
+ return {};
367
+ }
368
+ const out = {};
369
+ for (const raw of text.split(/\r?\n/)) {
370
+ const line = raw.trim();
371
+ if (!line || line.startsWith("#") || !line.includes("=")) continue;
372
+ const idx = line.indexOf("=");
373
+ const key = line.slice(0, idx).trim();
374
+ let val = line.slice(idx + 1).trim();
375
+ if (val.length >= 2 && (val.startsWith('"') && val.endsWith('"') || val.startsWith("'") && val.endsWith("'"))) {
376
+ val = val.slice(1, -1);
377
+ }
378
+ out[key] = val;
379
+ }
380
+ return out;
381
+ }
382
+ function configuredProviders(env) {
383
+ const fileKeys = parseKeysFile(keysFilePath(env));
384
+ const generic = (env.OSS_API_KEY || fileKeys.OSS_API_KEY || "").trim();
385
+ const out = [];
386
+ for (const name of Object.keys(PROVIDERS).sort()) {
387
+ const keyEnv = PROVIDERS[name].keyEnv;
388
+ if (generic || (env[keyEnv] || "").trim() || (fileKeys[keyEnv] || "").trim()) out.push(name);
389
+ }
390
+ return out;
391
+ }
392
+ function resolveKey(provider, keyEnv, env) {
393
+ for (const name of [keyEnv, "OSS_API_KEY"]) {
394
+ const val = (env[name] || "").trim();
395
+ if (val) return val;
396
+ }
397
+ const keysPath = keysFilePath(env);
398
+ const fileKeys = parseKeysFile(keysPath);
399
+ for (const name of [keyEnv, "OSS_API_KEY"]) {
400
+ const val = (fileKeys[name] || "").trim();
401
+ if (val) return val;
402
+ }
403
+ const others = configuredProviders(env).filter((p) => p !== provider);
404
+ const have = others.length ? `
405
+ Providers that DO have a key here: ${others.join(", ")}. To use one now: claude-${others[0]}.` : "\nRun `caddis keys` to add one.";
406
+ throw new ConfigError(
407
+ `no API key for provider '${provider}'. Set $${keyEnv} (or $OSS_API_KEY), or add
408
+ ${keyEnv}=<your-key>
409
+ to your keys file (${keysPath}). Override the file path with $${KEYS_FILE_ENV}.` + have
410
+ );
411
+ }
412
+ function resolve(provider, env) {
413
+ const name = (provider || env.OSS_PROVIDER || DEFAULT_PROVIDER).trim().toLowerCase();
414
+ const preset = PROVIDERS[name];
415
+ const baseUrl = (env.OSS_BASE_URL || "").trim() || preset?.baseUrl || "";
416
+ const model = (env.OSS_MODEL || "").trim() || preset?.model || "";
417
+ if (!preset && (!baseUrl || !model)) {
418
+ throw new ConfigError(
419
+ `unknown provider '${name}'. Known: ${Object.keys(PROVIDERS).sort().join(", ")}.
420
+ For anything else, supply both $OSS_BASE_URL and $OSS_MODEL (an Anthropic-protocol
421
+ endpoint \u2014 see claude-harness/LOCAL-MODELS.md for the gateway setup).`
422
+ );
423
+ }
424
+ if (!baseUrl || !model) {
425
+ throw new ConfigError(
426
+ `provider '${name}' has no ${!baseUrl ? "base_url" : "model"}. Supply $OSS_BASE_URL and $OSS_MODEL, or pick another provider.`
427
+ );
428
+ }
429
+ const keyEnv = preset?.keyEnv || `${name.toUpperCase().replace(/[^A-Z0-9]/g, "_")}_API_KEY`;
430
+ return { provider: name, baseUrl, model, apiKey: resolveKey(name, keyEnv, env) };
431
+ }
432
+ function maskKey(key) {
433
+ if (!key) return "(none)";
434
+ return key.length <= 4 ? "*".repeat(key.length) : `${"*".repeat(8)}${key.slice(-4)}`;
435
+ }
436
+
437
+ // src/util/log.ts
438
+ var import_picocolors = __toESM(require_picocolors(), 1);
439
+ var OK = import_picocolors.default.green("OK");
440
+ var WARN = import_picocolors.default.yellow("!!");
441
+ var FAIL = import_picocolors.default.red("XX");
442
+ var SKIP = import_picocolors.default.dim("--");
443
+ var MARKS = {
444
+ ok: import_picocolors.default.green("\u2713"),
445
+ warn: import_picocolors.default.yellow("\u25B2"),
446
+ fail: import_picocolors.default.red("\u2717"),
447
+ skip: import_picocolors.default.dim("\xB7"),
448
+ info: import_picocolors.default.cyan("\u2022")
449
+ };
450
+ function errorLine(text) {
451
+ process.stderr.write(`${import_picocolors.default.red("error")} ${text}
452
+ `);
453
+ }
454
+
455
+ // src/util/which.ts
456
+ var import_which = __toESM(require_lib(), 1);
457
+ async function findBin(name) {
458
+ try {
459
+ const found = await (0, import_which.default)(name, { nothrow: true });
460
+ return found ?? null;
461
+ } catch {
462
+ return null;
463
+ }
464
+ }
465
+
466
+ // src/lanes/launch.ts
467
+ function isHeadless(args) {
468
+ return args.some((a) => a === "-p" || a === "--print");
469
+ }
470
+ async function launch(options) {
471
+ const env = options.env ?? process.env;
472
+ const args = options.args;
473
+ const printConfig = args.includes("--print-config");
474
+ const forwarded = args.filter((a) => a !== "--print-config");
475
+ let resolved;
476
+ try {
477
+ resolved = resolve(options.provider, env);
478
+ } catch (error) {
479
+ if (error instanceof ConfigError) {
480
+ errorLine(error.message);
481
+ return 3;
482
+ }
483
+ throw error;
484
+ }
485
+ if (printConfig) {
486
+ process.stdout.write(
487
+ `provider ${resolved.provider}
488
+ base_url ${resolved.baseUrl}
489
+ model ${resolved.model}
490
+ api_key ${maskKey(resolved.apiKey)}
491
+ `
492
+ );
493
+ return 0;
494
+ }
495
+ const claude = await findBin("claude");
496
+ if (!claude) {
497
+ errorLine(
498
+ "claude is not on PATH. The lanes drive Claude Code itself \u2014 install it first:\n npm i -g @anthropic-ai/claude-code"
499
+ );
500
+ return 127;
501
+ }
502
+ const childEnv = {
503
+ ...env,
504
+ ANTHROPIC_BASE_URL: resolved.baseUrl,
505
+ ANTHROPIC_MODEL: resolved.model,
506
+ ANTHROPIC_AUTH_TOKEN: resolved.apiKey
507
+ };
508
+ if (isHeadless(forwarded)) childEnv.CADDIS_HEADLESS = "1";
509
+ const { execa } = await import("execa");
510
+ try {
511
+ const result = await execa(claude, forwarded, {
512
+ env: childEnv,
513
+ extendEnv: false,
514
+ stdio: "inherit",
515
+ reject: false,
516
+ windowsHide: true
517
+ // No timeout: this is an interactive session, however long the user wants it.
518
+ });
519
+ if (typeof result.exitCode === "number") return result.exitCode;
520
+ return result.failed ? 1 : 0;
521
+ } catch (error) {
522
+ errorLine(`could not start claude: ${error instanceof Error ? error.message : String(error)}`);
523
+ return 127;
524
+ }
525
+ }
526
+ async function laneMain(fixedProvider, argv) {
527
+ let provider = fixedProvider;
528
+ let args = argv;
529
+ if (!fixedProvider) {
530
+ const first = argv[0];
531
+ if (!first || first.startsWith("-")) {
532
+ errorLine(
533
+ "usage: claude-oss <provider> [claude args...]\n providers: deepseek, glm, openrouter\n or use the direct lanes: claude-glm, claude-deepseek"
534
+ );
535
+ return 2;
536
+ }
537
+ provider = first;
538
+ args = argv.slice(1);
539
+ }
540
+ return await launch({ provider, args });
541
+ }
542
+
543
+ // src/lanes/claude-deepseek.ts
544
+ process.exitCode = await laneMain("deepseek", process.argv.slice(2));