superacli 1.1.0 → 1.1.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 (261) hide show
  1. package/.beads/.br_history/issues.20260308_235202_180577215.jsonl +57 -0
  2. package/.beads/.br_history/issues.20260308_235202_387414163.jsonl +57 -0
  3. package/.beads/.br_history/issues.20260308_235202_564422794.jsonl +57 -0
  4. package/.beads/.br_history/issues.20260308_235202_742600597.jsonl +57 -0
  5. package/.beads/.br_history/issues.20260308_235208_133360069.jsonl +57 -0
  6. package/.beads/.br_history/issues.20260308_235505_473406307.jsonl +57 -0
  7. package/.beads/.br_history/issues.20260308_235505_662360489.jsonl +57 -0
  8. package/.beads/.br_history/issues.20260308_235505_843935624.jsonl +57 -0
  9. package/.beads/.br_history/issues.20260308_235506_044530221.jsonl +57 -0
  10. package/.beads/.br_history/issues.20260309_002618_115728731.jsonl +57 -0
  11. package/.beads/.br_history/issues.20260309_003748_878174586.jsonl +57 -0
  12. package/.beads/.br_history/issues.20260309_004057_868755623.jsonl +57 -0
  13. package/.beads/.br_history/issues.20260309_004058_512842163.jsonl +57 -0
  14. package/.beads/.br_history/issues.20260309_004058_994445226.jsonl +57 -0
  15. package/.beads/.br_history/issues.20260309_004059_475988596.jsonl +57 -0
  16. package/.beads/.br_history/issues.20260309_161902_566857851.jsonl +57 -0
  17. package/.beads/.br_history/issues.20260309_170512_277017739.jsonl +57 -0
  18. package/.beads/.br_history/issues.20260309_170512_477876921.jsonl +57 -0
  19. package/.beads/.br_history/issues.20260309_170512_664382701.jsonl +57 -0
  20. package/.beads/.br_history/issues.20260309_170512_859400333.jsonl +57 -0
  21. package/.beads/.br_history/issues.20260309_212326_082771164.jsonl +57 -0
  22. package/.beads/.br_history/issues.20260309_212326_245619716.jsonl +58 -0
  23. package/.beads/.br_history/issues.20260309_212326_403198317.jsonl +59 -0
  24. package/.beads/.br_history/issues.20260309_212332_539197678.jsonl +60 -0
  25. package/.beads/.br_history/issues.20260309_212332_731373599.jsonl +60 -0
  26. package/.beads/.br_history/issues.20260309_212332_928710953.jsonl +60 -0
  27. package/.beads/.br_history/issues.20260309_213021_341505240.jsonl +60 -0
  28. package/.beads/.br_history/issues.20260309_213022_023136934.jsonl +60 -0
  29. package/.beads/.br_history/issues.20260309_213022_400050719.jsonl +60 -0
  30. package/.beads/issues.jsonl +20 -17
  31. package/README.md +1 -1
  32. package/__tests__/adapter-schema.test.js +3 -0
  33. package/__tests__/aws-plugin.test.js +84 -0
  34. package/__tests__/az-plugin.test.js +84 -0
  35. package/__tests__/builtin-adapter.test.js +29 -0
  36. package/__tests__/cline-plugin.test.js +109 -0
  37. package/__tests__/cline-skill.test.js +49 -0
  38. package/__tests__/docker-plugin.test.js +3 -1
  39. package/__tests__/eza-plugin.test.js +81 -0
  40. package/__tests__/gcloud-plugin.test.js +86 -0
  41. package/__tests__/gh-plugin.test.js +86 -0
  42. package/__tests__/helm-plugin.test.js +81 -0
  43. package/__tests__/http-adapter.test.js +118 -0
  44. package/__tests__/just-plugin.test.js +82 -0
  45. package/__tests__/kubectl-plugin.test.js +83 -0
  46. package/__tests__/linear-plugin.test.js +81 -0
  47. package/__tests__/mcp-adapter.test.js +187 -0
  48. package/__tests__/nextest-plugin.test.js +82 -0
  49. package/__tests__/npm-plugin.test.js +81 -0
  50. package/__tests__/nullclaw-plugin.test.js +157 -0
  51. package/__tests__/openapi-adapter.test.js +199 -0
  52. package/__tests__/plugin-agency-agents.test.js +6 -6
  53. package/__tests__/plugin-nullclaw.test.js +78 -0
  54. package/__tests__/plugin-visual-explainer.test.js +62 -0
  55. package/__tests__/plugins-manager.test.js +59 -10
  56. package/__tests__/pnpm-plugin.test.js +81 -0
  57. package/__tests__/poetry-plugin.test.js +83 -0
  58. package/__tests__/process-adapter.test.js +124 -90
  59. package/__tests__/pulumi-plugin.test.js +81 -0
  60. package/__tests__/railway-plugin.test.js +84 -0
  61. package/__tests__/server-app.test.js +67 -0
  62. package/__tests__/server-config-service.test.js +79 -0
  63. package/__tests__/server-routes-ask.test.js +89 -0
  64. package/__tests__/server-routes-commands.test.js +55 -0
  65. package/__tests__/server-routes-config.test.js +87 -0
  66. package/__tests__/server-routes-jobs.test.js +53 -0
  67. package/__tests__/server-routes-misc.test.js +112 -0
  68. package/__tests__/server-storage-adapter.test.js +40 -0
  69. package/__tests__/server-storage-file.test.js +73 -0
  70. package/__tests__/server-storage-mongo.test.js +74 -0
  71. package/__tests__/shell-adapter.test.js +81 -22
  72. package/__tests__/stripe-plugin.test.js +3 -1
  73. package/__tests__/supabase-plugin.test.js +86 -0
  74. package/__tests__/terraform-plugin.test.js +83 -0
  75. package/__tests__/uv-plugin.test.js +81 -0
  76. package/__tests__/vercel-plugin.test.js +81 -0
  77. package/__tests__/watchexec-plugin.test.js +80 -0
  78. package/cli/adapter-schema.js +5 -0
  79. package/cli/adapters/process.js +53 -2
  80. package/cli/plugin-install-guidance.js +320 -0
  81. package/cli/plugins-manager.js +272 -212
  82. package/cli/skills.js +16 -5
  83. package/cli/supercli.js +26 -2
  84. package/docs/plugins.md +2 -0
  85. package/docs/skills/cline-non-interactive/SKILL.md +59 -0
  86. package/docs/skills-catalog.md +35 -0
  87. package/docs/visual-overview.md +21 -0
  88. package/jest.config.js +4 -1
  89. package/package.json +4 -3
  90. package/plugins/agency-agents/plugin.json +5 -0
  91. package/{cli/plugin-agency-agents.js → plugins/agency-agents/scripts/post-install.js} +13 -3
  92. package/plugins/aws/README.md +46 -0
  93. package/plugins/aws/plugin.json +42 -0
  94. package/plugins/az/README.md +46 -0
  95. package/plugins/az/plugin.json +42 -0
  96. package/plugins/clickup/plugin.json +38 -0
  97. package/plugins/clickup/scripts/post-install.js +107 -0
  98. package/plugins/clickup/scripts/post-uninstall.js +30 -0
  99. package/plugins/cline/README.md +48 -0
  100. package/plugins/cline/plugin.json +92 -0
  101. package/plugins/eza/README.md +40 -0
  102. package/plugins/eza/plugin.json +42 -0
  103. package/plugins/gcloud/README.md +46 -0
  104. package/plugins/gcloud/plugin.json +42 -0
  105. package/plugins/gh/README.md +46 -0
  106. package/plugins/gh/plugin.json +43 -0
  107. package/plugins/helm/README.md +42 -0
  108. package/plugins/helm/plugin.json +42 -0
  109. package/plugins/just/README.md +42 -0
  110. package/plugins/just/plugin.json +42 -0
  111. package/plugins/kubectl/README.md +46 -0
  112. package/plugins/kubectl/plugin.json +42 -0
  113. package/plugins/linear/README.md +60 -0
  114. package/plugins/linear/plugin.json +42 -0
  115. package/plugins/nextest/README.md +42 -0
  116. package/plugins/nextest/plugin.json +42 -0
  117. package/plugins/npm/README.md +46 -0
  118. package/plugins/npm/plugin.json +42 -0
  119. package/plugins/nullclaw/README.md +45 -0
  120. package/plugins/nullclaw/plugin.json +64 -0
  121. package/plugins/nullclaw/scripts/post-install.js +189 -0
  122. package/plugins/nullclaw/scripts/post-uninstall.js +25 -0
  123. package/plugins/openfang/plugin.json +37 -0
  124. package/plugins/openfang/scripts/post-install.js +163 -0
  125. package/plugins/openfang/scripts/post-uninstall.js +30 -0
  126. package/plugins/plugins.json +234 -0
  127. package/plugins/pnpm/README.md +46 -0
  128. package/plugins/pnpm/plugin.json +42 -0
  129. package/plugins/poetry/README.md +46 -0
  130. package/plugins/poetry/plugin.json +42 -0
  131. package/plugins/pulumi/README.md +46 -0
  132. package/plugins/pulumi/plugin.json +42 -0
  133. package/plugins/railway/README.md +58 -0
  134. package/plugins/railway/plugin.json +43 -0
  135. package/plugins/supabase/README.md +55 -0
  136. package/plugins/supabase/plugin.json +42 -0
  137. package/plugins/superpowers/plugin.json +22 -0
  138. package/plugins/superpowers/scripts/post-install.js +124 -0
  139. package/plugins/superpowers/scripts/post-uninstall.js +30 -0
  140. package/plugins/terraform/README.md +46 -0
  141. package/plugins/terraform/plugin.json +42 -0
  142. package/plugins/uv/README.md +46 -0
  143. package/plugins/uv/plugin.json +42 -0
  144. package/plugins/vercel/README.md +47 -0
  145. package/plugins/vercel/plugin.json +42 -0
  146. package/plugins/visual-explainer/plugin.json +15 -0
  147. package/plugins/visual-explainer/scripts/post-install.js +111 -0
  148. package/plugins/watchexec/README.md +40 -0
  149. package/plugins/watchexec/plugin.json +42 -0
  150. package/tests/test-aws-smoke.sh +56 -0
  151. package/tests/test-az-smoke.sh +56 -0
  152. package/tests/test-cline-smoke.sh +37 -0
  153. package/tests/test-eza-smoke.sh +33 -0
  154. package/tests/test-gcloud-smoke.sh +56 -0
  155. package/tests/test-gh-smoke.sh +56 -0
  156. package/tests/test-helm-smoke.sh +33 -0
  157. package/tests/test-just-smoke.sh +40 -0
  158. package/tests/test-kubectl-smoke.sh +37 -0
  159. package/tests/test-linear-smoke.sh +97 -0
  160. package/tests/test-nextest-smoke.sh +33 -0
  161. package/tests/test-npm-smoke.sh +32 -0
  162. package/tests/test-nullclaw-smoke.sh +51 -0
  163. package/tests/test-plugins-registry.js +110 -0
  164. package/tests/test-pnpm-smoke.sh +33 -0
  165. package/tests/test-poetry-smoke.sh +33 -0
  166. package/tests/test-pulumi-smoke.sh +33 -0
  167. package/tests/test-railway-smoke.sh +95 -0
  168. package/tests/test-supabase-smoke.sh +95 -0
  169. package/tests/test-terraform-smoke.sh +33 -0
  170. package/tests/test-uv-smoke.sh +33 -0
  171. package/tests/test-vercel-smoke.sh +55 -0
  172. package/tests/test-watchexec-smoke.sh +33 -0
  173. package/.beads/.br_history/issues.20260308_180927_477542428.jsonl +0 -12
  174. package/.beads/.br_history/issues.20260308_181032_020230108.jsonl +0 -12
  175. package/.beads/.br_history/issues.20260308_181032_180539413.jsonl +0 -12
  176. package/.beads/.br_history/issues.20260308_181032_372621506.jsonl +0 -12
  177. package/.beads/.br_history/issues.20260308_181032_565142225.jsonl +0 -12
  178. package/.beads/.br_history/issues.20260308_181311_336346464.jsonl +0 -12
  179. package/.beads/.br_history/issues.20260308_181444_039234498.jsonl +0 -13
  180. package/.beads/.br_history/issues.20260308_181503_794764403.jsonl +0 -13
  181. package/.beads/.br_history/issues.20260308_181503_950163105.jsonl +0 -13
  182. package/.beads/.br_history/issues.20260308_192031_852553505.jsonl +0 -13
  183. package/.beads/.br_history/issues.20260308_193552_846920518.jsonl +0 -14
  184. package/.beads/.br_history/issues.20260308_194054_394884833.jsonl +0 -14
  185. package/.beads/.br_history/issues.20260308_194209_440472460.jsonl +0 -15
  186. package/.beads/.br_history/issues.20260308_195319_099391899.jsonl +0 -15
  187. package/.beads/.br_history/issues.20260308_195324_176987204.jsonl +0 -16
  188. package/.beads/.br_history/issues.20260308_195436_929114019.jsonl +0 -16
  189. package/.beads/.br_history/issues.20260308_195437_055808298.jsonl +0 -17
  190. package/.beads/.br_history/issues.20260308_195437_304297399.jsonl +0 -18
  191. package/.beads/.br_history/issues.20260308_195437_556007332.jsonl +0 -19
  192. package/.beads/.br_history/issues.20260308_195444_987209695.jsonl +0 -20
  193. package/.beads/.br_history/issues.20260308_195445_133350193.jsonl +0 -20
  194. package/.beads/.br_history/issues.20260308_195445_400185615.jsonl +0 -20
  195. package/.beads/.br_history/issues.20260308_195445_689886334.jsonl +0 -20
  196. package/.beads/.br_history/issues.20260308_195445_949947727.jsonl +0 -20
  197. package/.beads/.br_history/issues.20260308_195745_580473297.jsonl +0 -20
  198. package/.beads/.br_history/issues.20260308_195745_725920532.jsonl +0 -20
  199. package/.beads/.br_history/issues.20260308_195745_968227911.jsonl +0 -20
  200. package/.beads/.br_history/issues.20260308_195746_224276322.jsonl +0 -20
  201. package/.beads/.br_history/issues.20260308_200018_386890807.jsonl +0 -20
  202. package/ref-btcbot/.env.example +0 -19
  203. package/ref-btcbot/README.md +0 -3
  204. package/ref-btcbot/docs/bot.md +0 -72
  205. package/ref-btcbot/docs/skills/btcbot.backtest/SKILL.md +0 -70
  206. package/ref-btcbot/docs/skills/btcbot.config/SKILL.md +0 -79
  207. package/ref-btcbot/docs/skills/btcbot.orders/SKILL.md +0 -60
  208. package/ref-btcbot/docs/skills/btcbot.positions/SKILL.md +0 -54
  209. package/ref-btcbot/docs/skills/btcbot.risk/SKILL.md +0 -69
  210. package/ref-btcbot/docs/skills/btcbot.run-loop/SKILL.md +0 -63
  211. package/ref-btcbot/docs/skills/btcbot.run-once/SKILL.md +0 -63
  212. package/ref-btcbot/docs/skills/btcbot.status/SKILL.md +0 -59
  213. package/ref-btcbot/examples/sample-candles.json +0 -52
  214. package/ref-btcbot/package.json +0 -18
  215. package/ref-btcbot/plugin/plugin.json +0 -146
  216. package/ref-btcbot/src/cli.js +0 -104
  217. package/ref-btcbot/src/config.js +0 -80
  218. package/ref-btcbot/src/core/bot-runner.js +0 -78
  219. package/ref-btcbot/src/core/exchange-factory.js +0 -19
  220. package/ref-btcbot/src/core/live-exchange.js +0 -12
  221. package/ref-btcbot/src/core/paper-exchange.js +0 -82
  222. package/ref-btcbot/src/core/risk-engine.js +0 -42
  223. package/ref-btcbot/src/core/state-repository.js +0 -47
  224. package/ref-btcbot/src/services/backtest-service.js +0 -44
  225. package/ref-btcbot/src/services/market-data.js +0 -32
  226. package/ref-btcbot/src/storage/json-store.js +0 -45
  227. package/ref-btcbot/src/strategy/hedge-strategy.js +0 -65
  228. package/ref-btcbot/src/strategy/indicators.js +0 -56
  229. package/ref-btcbot/src/web/api.js +0 -50
  230. package/ref-btcbot/src/web/app.js +0 -51
  231. package/ref-btcbot/src/web/index.html +0 -70
  232. package/ref-btcbot/src/web/server.js +0 -33
  233. /package/.beads/.br_history/{issues.20260308_180927_477542428.jsonl.meta.json → issues.20260308_235202_180577215.jsonl.meta.json} +0 -0
  234. /package/.beads/.br_history/{issues.20260308_181032_020230108.jsonl.meta.json → issues.20260308_235202_387414163.jsonl.meta.json} +0 -0
  235. /package/.beads/.br_history/{issues.20260308_181032_180539413.jsonl.meta.json → issues.20260308_235202_564422794.jsonl.meta.json} +0 -0
  236. /package/.beads/.br_history/{issues.20260308_181032_372621506.jsonl.meta.json → issues.20260308_235202_742600597.jsonl.meta.json} +0 -0
  237. /package/.beads/.br_history/{issues.20260308_181032_565142225.jsonl.meta.json → issues.20260308_235208_133360069.jsonl.meta.json} +0 -0
  238. /package/.beads/.br_history/{issues.20260308_181311_336346464.jsonl.meta.json → issues.20260308_235505_473406307.jsonl.meta.json} +0 -0
  239. /package/.beads/.br_history/{issues.20260308_181444_039234498.jsonl.meta.json → issues.20260308_235505_662360489.jsonl.meta.json} +0 -0
  240. /package/.beads/.br_history/{issues.20260308_181503_794764403.jsonl.meta.json → issues.20260308_235505_843935624.jsonl.meta.json} +0 -0
  241. /package/.beads/.br_history/{issues.20260308_181503_950163105.jsonl.meta.json → issues.20260308_235506_044530221.jsonl.meta.json} +0 -0
  242. /package/.beads/.br_history/{issues.20260308_192031_852553505.jsonl.meta.json → issues.20260309_002618_115728731.jsonl.meta.json} +0 -0
  243. /package/.beads/.br_history/{issues.20260308_193552_846920518.jsonl.meta.json → issues.20260309_003748_878174586.jsonl.meta.json} +0 -0
  244. /package/.beads/.br_history/{issues.20260308_194054_394884833.jsonl.meta.json → issues.20260309_004057_868755623.jsonl.meta.json} +0 -0
  245. /package/.beads/.br_history/{issues.20260308_194209_440472460.jsonl.meta.json → issues.20260309_004058_512842163.jsonl.meta.json} +0 -0
  246. /package/.beads/.br_history/{issues.20260308_195319_099391899.jsonl.meta.json → issues.20260309_004058_994445226.jsonl.meta.json} +0 -0
  247. /package/.beads/.br_history/{issues.20260308_195324_176987204.jsonl.meta.json → issues.20260309_004059_475988596.jsonl.meta.json} +0 -0
  248. /package/.beads/.br_history/{issues.20260308_195436_929114019.jsonl.meta.json → issues.20260309_161902_566857851.jsonl.meta.json} +0 -0
  249. /package/.beads/.br_history/{issues.20260308_195437_055808298.jsonl.meta.json → issues.20260309_170512_277017739.jsonl.meta.json} +0 -0
  250. /package/.beads/.br_history/{issues.20260308_195437_304297399.jsonl.meta.json → issues.20260309_170512_477876921.jsonl.meta.json} +0 -0
  251. /package/.beads/.br_history/{issues.20260308_195437_556007332.jsonl.meta.json → issues.20260309_170512_664382701.jsonl.meta.json} +0 -0
  252. /package/.beads/.br_history/{issues.20260308_195444_987209695.jsonl.meta.json → issues.20260309_170512_859400333.jsonl.meta.json} +0 -0
  253. /package/.beads/.br_history/{issues.20260308_195445_133350193.jsonl.meta.json → issues.20260309_212326_082771164.jsonl.meta.json} +0 -0
  254. /package/.beads/.br_history/{issues.20260308_195445_400185615.jsonl.meta.json → issues.20260309_212326_245619716.jsonl.meta.json} +0 -0
  255. /package/.beads/.br_history/{issues.20260308_195445_689886334.jsonl.meta.json → issues.20260309_212326_403198317.jsonl.meta.json} +0 -0
  256. /package/.beads/.br_history/{issues.20260308_195445_949947727.jsonl.meta.json → issues.20260309_212332_539197678.jsonl.meta.json} +0 -0
  257. /package/.beads/.br_history/{issues.20260308_195745_580473297.jsonl.meta.json → issues.20260309_212332_731373599.jsonl.meta.json} +0 -0
  258. /package/.beads/.br_history/{issues.20260308_195745_725920532.jsonl.meta.json → issues.20260309_212332_928710953.jsonl.meta.json} +0 -0
  259. /package/.beads/.br_history/{issues.20260308_195745_968227911.jsonl.meta.json → issues.20260309_213021_341505240.jsonl.meta.json} +0 -0
  260. /package/.beads/.br_history/{issues.20260308_195746_224276322.jsonl.meta.json → issues.20260309_213022_023136934.jsonl.meta.json} +0 -0
  261. /package/.beads/.br_history/{issues.20260308_200018_386890807.jsonl.meta.json → issues.20260309_213022_400050719.jsonl.meta.json} +0 -0
@@ -1,60 +0,0 @@
1
- ---
2
- skill_name: btcbot.orders
3
- description: List recent paper orders with realized PnL
4
- tags: btc, trading, hedging, paper, bot, orders, dcli
5
- category: analytical
6
- ---
7
-
8
- # View Orders
9
-
10
- **When to use:** To review recent paper trades, realized PnL, and the reasons behind each hedge action.
11
-
12
- **Command:**
13
- ```bash
14
- dcli btcbot orders list --json
15
- ```
16
-
17
- **Interpret output:**
18
- - `orders`: array of recent paper orders (newest first)
19
- - Each order includes:
20
- - `id`: unique order identifier
21
- - `ts`: execution timestamp
22
- - `mode`: always "paper" in v1
23
- - `side`: "buy" or "sell"
24
- - `qty`: absolute quantity traded
25
- - `price`: execution price
26
- - `realizedPnl`: realized PnL from any position reduction
27
- - `perpQtyAfter`: perp quantity after the order
28
- - `avgPerpEntryAfter`: new average entry price
29
- - `reasons`: list of signal rationales that triggered the order
30
-
31
- **Example snippet:**
32
- ```json
33
- {
34
- "data": {
35
- "orders": [
36
- {
37
- "id": "ord_1773011255993",
38
- "ts": "2026-03-08T23:07:35.993Z",
39
- "mode": "paper",
40
- "side": "sell",
41
- "qty": 0.062516,
42
- "price": 66294.25,
43
- "realizedPnl": 0,
44
- "perpQtyAfter": -0.062516,
45
- "avgPerpEntryAfter": 66294.25,
46
- "reasons": [
47
- "moderate_realized_vol",
48
- "mean_reversion_neutral",
49
- "downtrend_requires_more_hedge"
50
- ]
51
- }
52
- ]
53
- }
54
- }
55
- ```
56
-
57
- **Follow-up skills:**
58
- - `btcbot.positions` to see current position after these orders
59
- - `btcbot.status` for overall state
60
- - `btcbot.run-once` to generate new orders if needed
@@ -1,54 +0,0 @@
1
- ---
2
- skill_name: btcbot.positions
3
- description: List current spot and perp positions with mark-to-market
4
- tags: btc, trading, hedging, paper, bot, positions, dcli
5
- category: analytical
6
- ---
7
-
8
- # View Positions
9
-
10
- **When to use:** To inspect current spot inventory, perp hedge, and mark-to-market valuations.
11
-
12
- **Command:**
13
- ```bash
14
- dcli btcbot positions list --json
15
- ```
16
-
17
- **Interpret output:**
18
- - `position.spotQty`: configured spot BTC inventory (always positive)
19
- - `position.perpQty`: current perp position (negative = short hedge)
20
- - `position.avgPerpEntry`: average entry price of the perp position
21
- - `position.realizedPnl`: cumulative realized PnL from closed legs
22
- - `mark.spotValue`: spot inventory value in quote currency
23
- - `mark.perpUnrealized`: unrealized PnL of the perp position
24
- - `mark.netDeltaBtc`: net BTC exposure (spot + perp)
25
- - `mark.grossNotional`: gross notional exposure
26
- - `mark.equityEstimate`: total equity estimate
27
-
28
- **Example snippet:**
29
- ```json
30
- {
31
- "data": {
32
- "position": {
33
- "spotQty": 0.25,
34
- "perpQty": -0.0625,
35
- "avgPerpEntry": 66294.25,
36
- "realizedPnl": 0
37
- },
38
- "snapshot": {
39
- "mark": {
40
- "spotValue": 16573.56,
41
- "perpUnrealized": 0,
42
- "netDeltaBtc": 0.1875,
43
- "grossNotional": 20718.01,
44
- "equityEstimate": 116573.56
45
- }
46
- }
47
- }
48
- }
49
- ```
50
-
51
- **Follow-up skills:**
52
- - `btcbot.status` for broader state context
53
- - `btcbot.orders` to see how the position was built
54
- - `btcbot.run-once` to update valuations
@@ -1,69 +0,0 @@
1
- ---
2
- skill_name: btcbot.risk
3
- description: Show risk report including any cooldowns or violations
4
- tags: btc, trading, hedging, paper, bot, risk, dcli
5
- category: analytical
6
- ---
7
-
8
- # Risk Report
9
-
10
- **When to use:** To check if the bot is in a risk cooldown, has consecutive losses, or hit any notional limits.
11
-
12
- **Command:**
13
- ```bash
14
- dcli btcbot risk report --json
15
- ```
16
-
17
- **Interpret output:**
18
- - `risk`: latest risk evaluation from the most recent cycle
19
- - `ok`: true if no risk violations
20
- - `violations`: list of active risk blocks (empty if none)
21
- - `runtime`: bot runtime state
22
- - `cooldownUntil`: timestamp when trading will resume (null if not cooling down)
23
- - `consecutiveLosses`: count of consecutive losing trades
24
- - `lastError`: last error that triggered a cooldown (if any)
25
-
26
- **Common violations:**
27
- - `cooldown_active`: bot is in a risk cooldown period
28
- - `signal_not_ready`: insufficient market history
29
- - `order_notional_limit`: order size exceeds MAX_NOTIONAL_PER_ORDER
30
- - `gross_notional_limit`: gross exposure would exceed MAX_GROSS_NOTIONAL
31
-
32
- **Example snippet (no issues):**
33
- ```json
34
- {
35
- "data": {
36
- "risk": {
37
- "ok": true,
38
- "violations": []
39
- },
40
- "runtime": {
41
- "cooldownUntil": null,
42
- "consecutiveLosses": 0,
43
- "lastError": null
44
- }
45
- }
46
- }
47
- ```
48
-
49
- **Example snippet (in cooldown):**
50
- ```json
51
- {
52
- "data": {
53
- "risk": {
54
- "ok": false,
55
- "violations": ["cooldown_active"]
56
- },
57
- "runtime": {
58
- "cooldownUntil": "2026-03-09T00:15:00.000Z",
59
- "consecutiveLosses": 2,
60
- "lastError": "order_notional_limit"
61
- }
62
- }
63
- }
64
- ```
65
-
66
- **Follow-up skills:**
67
- - `btcbot.status` to see when the cooldown ends
68
- - `btcbot.config` to review risk limits
69
- - `btcbot.run-once` after cooldown expires
@@ -1,63 +0,0 @@
1
- ---
2
- skill_name: btcbot.run-loop
3
- description: Run a bounded loop with a small iteration count for testing
4
- tags: btc, trading, hedging, paper, bot, loop, dcli
5
- category: operational
6
- ---
7
-
8
- # Run Bounded Loop
9
-
10
- **When to use:** To simulate continuous operation over a few iterations while keeping execution time bounded. Default is 3 iterations.
11
-
12
- **Command:**
13
- ```bash
14
- dcli btcbot run loop 5 --json
15
- ```
16
-
17
- Replace `5` with your desired iteration count (1–10 recommended for testing).
18
-
19
- **Interpret output:**
20
- - `iterations`: number of cycles that ran
21
- - `last.signal`: signal from the final cycle
22
- - `last.order`: order from the final cycle (may be null if no rebalance)
23
- - `last.runtime.consecutiveLosses`: loss streak counter
24
- - `last.mark.equityEstimate`: equity after the final cycle
25
-
26
- **Example snippet:**
27
- ```json
28
- {
29
- "data": {
30
- "ok": true,
31
- "iterations": 3,
32
- "last": {
33
- "signal": {
34
- "ready": true,
35
- "price": 66242.4,
36
- "hedgeRatio": 0.25,
37
- "targetPerpBtc": -0.0625,
38
- "deltaBtc": 0.000028,
39
- "shouldRebalance": false,
40
- "reasons": [
41
- "moderate_realized_vol",
42
- "mean_reversion_neutral",
43
- "downtrend_requires_more_hedge"
44
- ]
45
- },
46
- "order": null,
47
- "runtime": {
48
- "consecutiveLosses": 0,
49
- "lastRunAt": "2026-03-08T23:12:25.477Z"
50
- },
51
- "mark": {
52
- "equityEstimate": 116563.84,
53
- "netDeltaBtc": 0.1875
54
- }
55
- }
56
- }
57
- }
58
- ```
59
-
60
- **Follow-up skills:**
61
- - `btcbot.status` for current state
62
- - `btcbot.orders` to see all orders from the loop
63
- - `btcbot.risk` if you expect cooldowns
@@ -1,63 +0,0 @@
1
- ---
2
- skill_name: btcbot.run-once
3
- description: Execute a single bot cycle and view the resulting signal/order
4
- tags: btc, trading, hedging, paper, bot, run, dcli
5
- category: operational
6
- ---
7
-
8
- # Run One Bot Cycle
9
-
10
- **When to use:** To fetch fresh market data, compute a hedge signal, and optionally execute a paper order in a single step.
11
-
12
- **Command:**
13
- ```bash
14
- dcli btcbot run once --json
15
- ```
16
-
17
- **Interpret output:**
18
- - `signal.ready`: true if enough market history is available
19
- - `signal.price`: latest BTC price from the 15m candle
20
- - `signal.hedgeRatio`: computed hedge ratio (0–1)
21
- - `signal.targetPerpBtc`: target perp position (negative = short hedge)
22
- - `signal.deltaBtc`: BTC quantity to trade to reach target
23
- - `signal.shouldRebalance`: true if delta exceeds rebalance threshold
24
- - `signal.reasons`: list of signal rationales
25
- - `order`: populated only if a trade was executed
26
- - `risk.violations`: empty if trade is allowed; otherwise lists blocked reasons
27
-
28
- **Example snippet:**
29
- ```json
30
- {
31
- "data": {
32
- "signal": {
33
- "ready": true,
34
- "price": 66294.25,
35
- "hedgeRatio": 0.25,
36
- "targetPerpBtc": -0.0625,
37
- "deltaBtc": -0.0625,
38
- "shouldRebalance": true,
39
- "reasons": [
40
- "moderate_realized_vol",
41
- "mean_reversion_neutral",
42
- "downtrend_requires_more_hedge"
43
- ]
44
- },
45
- "order": {
46
- "side": "sell",
47
- "qty": 0.0625,
48
- "price": 66294.25,
49
- "realizedPnl": 0,
50
- "perpQtyAfter": -0.0625
51
- },
52
- "risk": {
53
- "ok": true,
54
- "violations": []
55
- }
56
- }
57
- }
58
- ```
59
-
60
- **Follow-up skills:**
61
- - `btcbot.status` to see updated position
62
- - `btcbot.orders` to view the executed order
63
- - `btcbot.run-loop` to run multiple cycles
@@ -1,59 +0,0 @@
1
- ---
2
- skill_name: btcbot.status
3
- description: Show current bot state, position, last signal, and risk status
4
- tags: btc, trading, hedging, paper, bot, status, dcli
5
- category: operational
6
- ---
7
-
8
- # Bot Status Check
9
-
10
- **When to use:** Before any bot interaction to understand current state, position, and whether the bot is in cooldown.
11
-
12
- **Command:**
13
- ```bash
14
- dcli btcbot status show --json
15
- ```
16
-
17
- **Interpret output:**
18
- - `state.mode`: always "paper" in v1
19
- - `state.position.spotQty`: your configured spot BTC inventory
20
- - `state.position.perpQty`: current perp hedge (negative = short hedge)
21
- - `state.runtime.lastRunAt`: timestamp of last cycle
22
- - `state.runtime.cooldownUntil`: if set, bot will not trade until this time
23
- - `snapshot.mark.equityEstimate`: total equity including unrealized PnL
24
- - `snapshot.mark.netDeltaBtc`: net BTC exposure (spot + perp)
25
- - `snapshot.signal.hedgeRatio`: current hedge ratio (0–1)
26
-
27
- **Example snippet:**
28
- ```json
29
- {
30
- "data": {
31
- "state": {
32
- "mode": "paper",
33
- "position": {
34
- "spotQty": 0.25,
35
- "perpQty": -0.0625,
36
- "realizedPnl": 0
37
- },
38
- "runtime": {
39
- "lastRunAt": "2026-03-08T23:07:35.994Z",
40
- "cooldownUntil": null
41
- }
42
- },
43
- "snapshot": {
44
- "mark": {
45
- "equityEstimate": 116573.56,
46
- "netDeltaBtc": 0.1875
47
- },
48
- "signal": {
49
- "hedgeRatio": 0.25
50
- }
51
- }
52
- }
53
- }
54
- ```
55
-
56
- **Follow-up skills:**
57
- - `btcbot.run-once` if no recent run
58
- - `btcbot.risk` if cooldown is active
59
- - `btcbot.positions` for detailed position view
@@ -1,52 +0,0 @@
1
- [
2
- {"open":43000,"high":43110,"low":42940,"close":43080},
3
- {"open":43080,"high":43220,"low":43010,"close":43190},
4
- {"open":43190,"high":43310,"low":43110,"close":43280},
5
- {"open":43280,"high":43360,"low":43190,"close":43210},
6
- {"open":43210,"high":43300,"low":43150,"close":43260},
7
- {"open":43260,"high":43450,"low":43210,"close":43410},
8
- {"open":43410,"high":43520,"low":43320,"close":43470},
9
- {"open":43470,"high":43500,"low":43310,"close":43360},
10
- {"open":43360,"high":43420,"low":43240,"close":43300},
11
- {"open":43300,"high":43480,"low":43260,"close":43440},
12
- {"open":43440,"high":43540,"low":43380,"close":43490},
13
- {"open":43490,"high":43620,"low":43400,"close":43580},
14
- {"open":43580,"high":43710,"low":43520,"close":43690},
15
- {"open":43690,"high":43760,"low":43590,"close":43620},
16
- {"open":43620,"high":43740,"low":43580,"close":43680},
17
- {"open":43680,"high":43850,"low":43610,"close":43810},
18
- {"open":43810,"high":43920,"low":43710,"close":43890},
19
- {"open":43890,"high":44010,"low":43820,"close":43970},
20
- {"open":43970,"high":44030,"low":43880,"close":43920},
21
- {"open":43920,"high":44080,"low":43890,"close":44010},
22
- {"open":44010,"high":44210,"low":43980,"close":44180},
23
- {"open":44180,"high":44320,"low":44100,"close":44290},
24
- {"open":44290,"high":44410,"low":44220,"close":44380},
25
- {"open":44380,"high":44430,"low":44240,"close":44270},
26
- {"open":44270,"high":44320,"low":44160,"close":44210},
27
- {"open":44210,"high":44350,"low":44190,"close":44300},
28
- {"open":44300,"high":44470,"low":44220,"close":44410},
29
- {"open":44410,"high":44520,"low":44310,"close":44480},
30
- {"open":44480,"high":44610,"low":44420,"close":44570},
31
- {"open":44570,"high":44630,"low":44490,"close":44520},
32
- {"open":44520,"high":44600,"low":44410,"close":44460},
33
- {"open":44460,"high":44520,"low":44330,"close":44390},
34
- {"open":44390,"high":44460,"low":44280,"close":44310},
35
- {"open":44310,"high":44420,"low":44250,"close":44370},
36
- {"open":44370,"high":44510,"low":44310,"close":44490},
37
- {"open":44490,"high":44640,"low":44450,"close":44590},
38
- {"open":44590,"high":44710,"low":44520,"close":44680},
39
- {"open":44680,"high":44820,"low":44600,"close":44790},
40
- {"open":44790,"high":44910,"low":44720,"close":44880},
41
- {"open":44880,"high":45010,"low":44810,"close":44970},
42
- {"open":44970,"high":45120,"low":44910,"close":45080},
43
- {"open":45080,"high":45240,"low":45010,"close":45190},
44
- {"open":45190,"high":45310,"low":45120,"close":45280},
45
- {"open":45280,"high":45420,"low":45210,"close":45390},
46
- {"open":45390,"high":45510,"low":45320,"close":45470},
47
- {"open":45470,"high":45600,"low":45420,"close":45580},
48
- {"open":45580,"high":45650,"low":45460,"close":45510},
49
- {"open":45510,"high":45620,"low":45420,"close":45440},
50
- {"open":45440,"high":45510,"low":45360,"close":45490},
51
- {"open":45490,"high":45610,"low":45440,"close":45570}
52
- ]
@@ -1,18 +0,0 @@
1
- {
2
- "name": "ref-btcbot",
3
- "version": "0.1.0",
4
- "description": "Standalone 15m BTC hedging bot with dcli plugin integration",
5
- "main": "src/web/server.js",
6
- "type": "commonjs",
7
- "scripts": {
8
- "start": "node src/cli.js server",
9
- "bot:once": "node src/cli.js run once",
10
- "bot:loop": "node src/cli.js run loop",
11
- "backtest": "node src/cli.js backtest run",
12
- "validate": "node src/cli.js config validate"
13
- },
14
- "dependencies": {
15
- "dotenv": "^17.3.1",
16
- "express": "^4.18.2"
17
- }
18
- }
@@ -1,146 +0,0 @@
1
- {
2
- "name": "btcbot",
3
- "version": "0.1.0",
4
- "description": "Operate the ref-btcbot 15m BTC hedging bot through dcli",
5
- "source": "local://ref-btcbot",
6
- "tags": ["btc", "trading", "hedging", "paper", "bot"],
7
- "checks": [
8
- { "type": "binary", "name": "node" }
9
- ],
10
- "commands": [
11
- {
12
- "namespace": "btcbot",
13
- "resource": "status",
14
- "action": "show",
15
- "description": "Show bot status",
16
- "adapter": "process",
17
- "adapterConfig": {
18
- "command": "node",
19
- "cwd": "/home/jarancibia/ai/dcli/ref-btcbot",
20
- "baseArgs": ["src/cli.js", "status", "show"],
21
- "parseJson": true,
22
- "timeout_ms": 15000,
23
- "missingDependencyHelp": "Install Node.js and run node --version"
24
- },
25
- "args": []
26
- },
27
- {
28
- "namespace": "btcbot",
29
- "resource": "run",
30
- "action": "once",
31
- "description": "Run one bot cycle",
32
- "adapter": "process",
33
- "adapterConfig": {
34
- "command": "node",
35
- "cwd": "/home/jarancibia/ai/dcli/ref-btcbot",
36
- "baseArgs": ["src/cli.js", "run", "once"],
37
- "parseJson": true,
38
- "timeout_ms": 15000,
39
- "missingDependencyHelp": "Install Node.js and run node --version"
40
- },
41
- "args": []
42
- },
43
- {
44
- "namespace": "btcbot",
45
- "resource": "run",
46
- "action": "loop",
47
- "description": "Run a bounded bot loop",
48
- "adapter": "process",
49
- "adapterConfig": {
50
- "command": "node",
51
- "cwd": "/home/jarancibia/ai/dcli/ref-btcbot",
52
- "baseArgs": ["src/cli.js", "run", "loop"],
53
- "positionalArgs": ["iterations"],
54
- "parseJson": true,
55
- "timeout_ms": 15000,
56
- "missingDependencyHelp": "Install Node.js and run node --version"
57
- },
58
- "args": [
59
- { "name": "iterations", "type": "string", "required": false }
60
- ]
61
- },
62
- {
63
- "namespace": "btcbot",
64
- "resource": "backtest",
65
- "action": "run",
66
- "description": "Run a local backtest from a candle JSON file",
67
- "adapter": "process",
68
- "adapterConfig": {
69
- "command": "node",
70
- "cwd": "/home/jarancibia/ai/dcli/ref-btcbot",
71
- "baseArgs": ["src/cli.js", "backtest", "run"],
72
- "positionalArgs": ["file"],
73
- "parseJson": true,
74
- "timeout_ms": 15000,
75
- "missingDependencyHelp": "Install Node.js and run node --version"
76
- },
77
- "args": [
78
- { "name": "file", "type": "string", "required": true }
79
- ]
80
- },
81
- {
82
- "namespace": "btcbot",
83
- "resource": "positions",
84
- "action": "list",
85
- "description": "List current bot position",
86
- "adapter": "process",
87
- "adapterConfig": {
88
- "command": "node",
89
- "cwd": "/home/jarancibia/ai/dcli/ref-btcbot",
90
- "baseArgs": ["src/cli.js", "positions", "list"],
91
- "parseJson": true,
92
- "timeout_ms": 15000,
93
- "missingDependencyHelp": "Install Node.js and run node --version"
94
- },
95
- "args": []
96
- },
97
- {
98
- "namespace": "btcbot",
99
- "resource": "orders",
100
- "action": "list",
101
- "description": "List bot orders",
102
- "adapter": "process",
103
- "adapterConfig": {
104
- "command": "node",
105
- "cwd": "/home/jarancibia/ai/dcli/ref-btcbot",
106
- "baseArgs": ["src/cli.js", "orders", "list"],
107
- "parseJson": true,
108
- "timeout_ms": 15000,
109
- "missingDependencyHelp": "Install Node.js and run node --version"
110
- },
111
- "args": []
112
- },
113
- {
114
- "namespace": "btcbot",
115
- "resource": "risk",
116
- "action": "report",
117
- "description": "Show latest risk report",
118
- "adapter": "process",
119
- "adapterConfig": {
120
- "command": "node",
121
- "cwd": "/home/jarancibia/ai/dcli/ref-btcbot",
122
- "baseArgs": ["src/cli.js", "risk", "report"],
123
- "parseJson": true,
124
- "timeout_ms": 15000,
125
- "missingDependencyHelp": "Install Node.js and run node --version"
126
- },
127
- "args": []
128
- },
129
- {
130
- "namespace": "btcbot",
131
- "resource": "config",
132
- "action": "validate",
133
- "description": "Validate bot config",
134
- "adapter": "process",
135
- "adapterConfig": {
136
- "command": "node",
137
- "cwd": "/home/jarancibia/ai/dcli/ref-btcbot",
138
- "baseArgs": ["src/cli.js", "config", "validate"],
139
- "parseJson": true,
140
- "timeout_ms": 15000,
141
- "missingDependencyHelp": "Install Node.js and run node --version"
142
- },
143
- "args": []
144
- }
145
- ]
146
- }