clodds 1.5.1 → 1.5.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 (423) hide show
  1. package/dist/acp/identity.js +21 -13
  2. package/dist/acp/identity.js.map +1 -1
  3. package/dist/acp/persistence.js +9 -7
  4. package/dist/acp/persistence.js.map +1 -1
  5. package/dist/acp/registry.js +7 -3
  6. package/dist/acp/registry.js.map +1 -1
  7. package/dist/agents/handlers/agentbets.js.map +1 -1
  8. package/dist/agents/handlers/paper-trading.js +1 -1
  9. package/dist/agents/handlers/paper-trading.js.map +1 -1
  10. package/dist/agents/handlers/predictfun.js +4 -2
  11. package/dist/agents/handlers/predictfun.js.map +1 -1
  12. package/dist/agents/index.js +5 -1
  13. package/dist/agents/index.js.map +1 -1
  14. package/dist/alerts/index.js +5 -5
  15. package/dist/alerts/index.js.map +1 -1
  16. package/dist/alerts/realtime.js +8 -0
  17. package/dist/alerts/realtime.js.map +1 -1
  18. package/dist/api/apikeys.js +1 -1
  19. package/dist/api/compute/code.js +4 -1
  20. package/dist/api/compute/code.js.map +1 -1
  21. package/dist/api/compute/data.js +8 -2
  22. package/dist/api/compute/data.js.map +1 -1
  23. package/dist/api/compute/gateway.js +14 -9
  24. package/dist/api/compute/gateway.js.map +1 -1
  25. package/dist/api/compute/llm.js +14 -10
  26. package/dist/api/compute/llm.js.map +1 -1
  27. package/dist/api/compute/storage.js +6 -2
  28. package/dist/api/compute/storage.js.map +1 -1
  29. package/dist/api/compute/trade.js +6 -5
  30. package/dist/api/compute/trade.js.map +1 -1
  31. package/dist/api/compute/web.js +5 -0
  32. package/dist/api/compute/web.js.map +1 -1
  33. package/dist/api/fees.js +5 -1
  34. package/dist/api/fees.js.map +1 -1
  35. package/dist/api/gateway.js +35 -7
  36. package/dist/api/gateway.js.map +1 -1
  37. package/dist/api/jobs.js +15 -6
  38. package/dist/api/jobs.js.map +1 -1
  39. package/dist/api/middleware.js +12 -3
  40. package/dist/api/middleware.js.map +1 -1
  41. package/dist/api/sdk.js +1 -1
  42. package/dist/api/server.js +16 -7
  43. package/dist/api/server.js.map +1 -1
  44. package/dist/arbitrage/index.js +14 -4
  45. package/dist/arbitrage/index.js.map +1 -1
  46. package/dist/auth/copilot.js +3 -3
  47. package/dist/auth/copilot.js.map +1 -1
  48. package/dist/auth/google.js +6 -2
  49. package/dist/auth/google.js.map +1 -1
  50. package/dist/auth/oauth.js +18 -11
  51. package/dist/auth/oauth.js.map +1 -1
  52. package/dist/auth/qwen.js +4 -4
  53. package/dist/auth/qwen.js.map +1 -1
  54. package/dist/auto-reply/index.js +18 -4
  55. package/dist/auto-reply/index.js.map +1 -1
  56. package/dist/automation/cron.js +10 -3
  57. package/dist/automation/cron.js.map +1 -1
  58. package/dist/automation/webhooks.js +13 -2
  59. package/dist/automation/webhooks.js.map +1 -1
  60. package/dist/bankr/client.js +3 -3
  61. package/dist/base/provider.js +16 -2
  62. package/dist/base/provider.js.map +1 -1
  63. package/dist/bin/worker.js +4 -4
  64. package/dist/bin/worker.js.map +1 -1
  65. package/dist/bittensor/chutes.js +1 -1
  66. package/dist/bittensor/chutes.js.map +1 -1
  67. package/dist/bittensor/python-runner.js +5 -1
  68. package/dist/bittensor/python-runner.js.map +1 -1
  69. package/dist/bittensor/service.js +1 -1
  70. package/dist/bittensor/service.js.map +1 -1
  71. package/dist/browser/index.js +40 -16
  72. package/dist/browser/index.js.map +1 -1
  73. package/dist/cache/index.d.ts +2 -0
  74. package/dist/cache/index.js +30 -5
  75. package/dist/cache/index.js.map +1 -1
  76. package/dist/canvas/index.js +56 -27
  77. package/dist/canvas/index.js.map +1 -1
  78. package/dist/channels/googlechat/index.js +3 -0
  79. package/dist/channels/googlechat/index.js.map +1 -1
  80. package/dist/channels/imessage/index.js +6 -0
  81. package/dist/channels/imessage/index.js.map +1 -1
  82. package/dist/channels/index.js +7 -2
  83. package/dist/channels/index.js.map +1 -1
  84. package/dist/channels/line/index.d.ts +1 -1
  85. package/dist/channels/line/index.js +4 -2
  86. package/dist/channels/line/index.js.map +1 -1
  87. package/dist/channels/mattermost/index.js +5 -0
  88. package/dist/channels/mattermost/index.js.map +1 -1
  89. package/dist/channels/nostr/index.js +10 -2
  90. package/dist/channels/nostr/index.js.map +1 -1
  91. package/dist/channels/teams/index.js +20 -3
  92. package/dist/channels/teams/index.js.map +1 -1
  93. package/dist/channels/telegram/index.js +20 -3
  94. package/dist/channels/telegram/index.js.map +1 -1
  95. package/dist/channels/tlon/index.js +6 -1
  96. package/dist/channels/tlon/index.js.map +1 -1
  97. package/dist/channels/voice/index.js +16 -0
  98. package/dist/channels/voice/index.js.map +1 -1
  99. package/dist/channels/webchat/index.js +6 -1
  100. package/dist/channels/webchat/index.js.map +1 -1
  101. package/dist/channels/zalo/index.js +4 -2
  102. package/dist/channels/zalo/index.js.map +1 -1
  103. package/dist/cli/commands/doctor.js +2 -2
  104. package/dist/cli/commands/doctor.js.map +1 -1
  105. package/dist/cli/commands/index.js +54 -24
  106. package/dist/cli/commands/index.js.map +1 -1
  107. package/dist/cli/commands/onboard.js +12 -11
  108. package/dist/cli/commands/onboard.js.map +1 -1
  109. package/dist/cli/commands/skills.js +1 -1
  110. package/dist/cli/index.js +2 -2
  111. package/dist/cli/index.js.map +1 -1
  112. package/dist/cli/secure.js +11 -5
  113. package/dist/cli/secure.js.map +1 -1
  114. package/dist/commands/registry.js +17 -9
  115. package/dist/commands/registry.js.map +1 -1
  116. package/dist/config/index.js +42 -32
  117. package/dist/config/index.js.map +1 -1
  118. package/dist/credentials/index.js +7 -6
  119. package/dist/credentials/index.js.map +1 -1
  120. package/dist/cron/index.js +15 -1
  121. package/dist/cron/index.js.map +1 -1
  122. package/dist/db/index.d.ts +12 -4
  123. package/dist/db/index.js +8 -6
  124. package/dist/db/index.js.map +1 -1
  125. package/dist/docker/index.d.ts +0 -10
  126. package/dist/docker/index.js +52 -57
  127. package/dist/docker/index.js.map +1 -1
  128. package/dist/doctor/index.js +16 -7
  129. package/dist/doctor/index.js.map +1 -1
  130. package/dist/embeddings/index.js +42 -8
  131. package/dist/embeddings/index.js.map +1 -1
  132. package/dist/evm/contracts.js +8 -1
  133. package/dist/evm/contracts.js.map +1 -1
  134. package/dist/evm/odos.js +1 -1
  135. package/dist/evm/odos.js.map +1 -1
  136. package/dist/evm/oneinch.js +7 -4
  137. package/dist/evm/oneinch.js.map +1 -1
  138. package/dist/evm/pancakeswap.js +1 -1
  139. package/dist/evm/pancakeswap.js.map +1 -1
  140. package/dist/evm/transfers.js +10 -5
  141. package/dist/evm/transfers.js.map +1 -1
  142. package/dist/evm/uniswap.js +1 -1
  143. package/dist/evm/uniswap.js.map +1 -1
  144. package/dist/evm/virtuals.js +7 -2
  145. package/dist/evm/virtuals.js.map +1 -1
  146. package/dist/exchanges/binance-futures/index.js +24 -21
  147. package/dist/exchanges/binance-futures/index.js.map +1 -1
  148. package/dist/exchanges/bybit/index.js +17 -14
  149. package/dist/exchanges/bybit/index.js.map +1 -1
  150. package/dist/exchanges/hyperliquid/index.js +28 -20
  151. package/dist/exchanges/hyperliquid/index.js.map +1 -1
  152. package/dist/exchanges/lighter/index.js +4 -4
  153. package/dist/exchanges/mexc/index.js +15 -15
  154. package/dist/exchanges/mexc/index.js.map +1 -1
  155. package/dist/exchanges/opinion/index.js +7 -7
  156. package/dist/exchanges/opinion/index.js.map +1 -1
  157. package/dist/exchanges/predictfun/index.js +1 -1
  158. package/dist/execution/index.js +93 -87
  159. package/dist/execution/index.js.map +1 -1
  160. package/dist/extensions/copilot-proxy/index.js +13 -7
  161. package/dist/extensions/copilot-proxy/index.js.map +1 -1
  162. package/dist/extensions/diagnostics-otel/index.js +8 -0
  163. package/dist/extensions/diagnostics-otel/index.js.map +1 -1
  164. package/dist/extensions/google-auth/index.js +4 -1
  165. package/dist/extensions/google-auth/index.js.map +1 -1
  166. package/dist/extensions/llm-task/index.js +28 -10
  167. package/dist/extensions/llm-task/index.js.map +1 -1
  168. package/dist/extensions/lobster/index.js +27 -8
  169. package/dist/extensions/lobster/index.js.map +1 -1
  170. package/dist/extensions/memory-lancedb/index.js +16 -6
  171. package/dist/extensions/memory-lancedb/index.js.map +1 -1
  172. package/dist/extensions/open-prose/index.js +1 -1
  173. package/dist/extensions/task-runner/index.js +12 -5
  174. package/dist/extensions/task-runner/index.js.map +1 -1
  175. package/dist/farcaster/client.js +7 -7
  176. package/dist/feeds/agentbets/index.d.ts +1 -1
  177. package/dist/feeds/betfair/index.js +12 -6
  178. package/dist/feeds/betfair/index.js.map +1 -1
  179. package/dist/feeds/crypto/index.js +38 -30
  180. package/dist/feeds/crypto/index.js.map +1 -1
  181. package/dist/feeds/drift/trading.js +4 -4
  182. package/dist/feeds/external/index.js +3 -0
  183. package/dist/feeds/external/index.js.map +1 -1
  184. package/dist/feeds/fred/index.js.map +1 -1
  185. package/dist/feeds/hedgehog/index.js +10 -2
  186. package/dist/feeds/hedgehog/index.js.map +1 -1
  187. package/dist/feeds/manifold/index.js +1 -1
  188. package/dist/feeds/metaculus/index.js +2 -2
  189. package/dist/feeds/opinion/index.js +2 -2
  190. package/dist/feeds/polymarket/index.js +7 -1
  191. package/dist/feeds/polymarket/index.js.map +1 -1
  192. package/dist/feeds/polymarket/whale-tracker.js.map +1 -1
  193. package/dist/feeds/predictfun/index.js +2 -2
  194. package/dist/feeds/smarkets/index.js +12 -6
  195. package/dist/feeds/smarkets/index.js.map +1 -1
  196. package/dist/gateway/feeds-routes.d.ts +8 -7
  197. package/dist/gateway/feeds-routes.js.map +1 -1
  198. package/dist/gateway/index.js +28 -6
  199. package/dist/gateway/index.js.map +1 -1
  200. package/dist/history/index.js +8 -4
  201. package/dist/history/index.js.map +1 -1
  202. package/dist/hooks/index.js +14 -5
  203. package/dist/hooks/index.js.map +1 -1
  204. package/dist/i18n/index.js +2 -1
  205. package/dist/i18n/index.js.map +1 -1
  206. package/dist/identity/erc8004.js +13 -3
  207. package/dist/identity/erc8004.js.map +1 -1
  208. package/dist/index.js +3 -3
  209. package/dist/index.js.map +1 -1
  210. package/dist/infra/index.d.ts +1 -1
  211. package/dist/infra/index.js +39 -26
  212. package/dist/infra/index.js.map +1 -1
  213. package/dist/ledger/hooks.js +26 -18
  214. package/dist/ledger/hooks.js.map +1 -1
  215. package/dist/ledger/storage.js +23 -13
  216. package/dist/ledger/storage.js.map +1 -1
  217. package/dist/link-understanding/index.js +26 -2
  218. package/dist/link-understanding/index.js.map +1 -1
  219. package/dist/logging/index.js +31 -4
  220. package/dist/logging/index.js.map +1 -1
  221. package/dist/macos/index.d.ts +1 -1
  222. package/dist/macos/index.js +41 -36
  223. package/dist/macos/index.js.map +1 -1
  224. package/dist/markdown/index.js +25 -8
  225. package/dist/markdown/index.js.map +1 -1
  226. package/dist/market-index/index.js +8 -6
  227. package/dist/market-index/index.js.map +1 -1
  228. package/dist/mcp/index.js +67 -10
  229. package/dist/mcp/index.js.map +1 -1
  230. package/dist/mcp/server.js +21 -3
  231. package/dist/mcp/server.js.map +1 -1
  232. package/dist/media/index.js +17 -15
  233. package/dist/media/index.js.map +1 -1
  234. package/dist/memory/context.js +17 -9
  235. package/dist/memory/context.js.map +1 -1
  236. package/dist/memory/index.js +6 -5
  237. package/dist/memory/index.js.map +1 -1
  238. package/dist/ml-pipeline/collector.js +14 -3
  239. package/dist/ml-pipeline/collector.js.map +1 -1
  240. package/dist/ml-pipeline/trainer.js +1 -1
  241. package/dist/ml-pipeline/trainer.js.map +1 -1
  242. package/dist/monitoring/health.js +15 -3
  243. package/dist/monitoring/health.js.map +1 -1
  244. package/dist/monitoring/metrics.js +2 -2
  245. package/dist/nodes/index.js +40 -25
  246. package/dist/nodes/index.js.map +1 -1
  247. package/dist/opportunity/combinatorial.js +4 -1
  248. package/dist/opportunity/combinatorial.js.map +1 -1
  249. package/dist/opportunity/correlation.js +2 -2
  250. package/dist/opportunity/executor.js +14 -5
  251. package/dist/opportunity/executor.js.map +1 -1
  252. package/dist/opportunity/risk.js +3 -1
  253. package/dist/opportunity/risk.js.map +1 -1
  254. package/dist/opportunity/scoring.js +3 -1
  255. package/dist/opportunity/scoring.js.map +1 -1
  256. package/dist/pairing/index.js +8 -4
  257. package/dist/pairing/index.js.map +1 -1
  258. package/dist/payments/x402/evm.js +4 -4
  259. package/dist/payments/x402/index.js +26 -7
  260. package/dist/payments/x402/index.js.map +1 -1
  261. package/dist/payments/x402/solana.js +3 -3
  262. package/dist/percolator/feed.js +1 -1
  263. package/dist/percolator/feed.js.map +1 -1
  264. package/dist/permissions/index.d.ts +2 -0
  265. package/dist/permissions/index.js +22 -12
  266. package/dist/permissions/index.js.map +1 -1
  267. package/dist/plugins/index.d.ts +3 -1
  268. package/dist/plugins/index.js +18 -6
  269. package/dist/plugins/index.js.map +1 -1
  270. package/dist/portfolio/index.js +16 -15
  271. package/dist/portfolio/index.js.map +1 -1
  272. package/dist/presence/index.js +17 -5
  273. package/dist/presence/index.js.map +1 -1
  274. package/dist/process/index.js +40 -14
  275. package/dist/process/index.js.map +1 -1
  276. package/dist/providers/discovery.js +34 -28
  277. package/dist/providers/discovery.js.map +1 -1
  278. package/dist/providers/health.js +7 -4
  279. package/dist/providers/health.js.map +1 -1
  280. package/dist/providers/index.js +36 -33
  281. package/dist/providers/index.js.map +1 -1
  282. package/dist/queue/index.js +1 -1
  283. package/dist/remote/index.d.ts +0 -5
  284. package/dist/remote/index.js +41 -9
  285. package/dist/remote/index.js.map +1 -1
  286. package/dist/risk/circuit-breaker.js +13 -5
  287. package/dist/risk/circuit-breaker.js.map +1 -1
  288. package/dist/risk/engine.js +2 -2
  289. package/dist/risk/volatility.js +1 -1
  290. package/dist/risk/volatility.js.map +1 -1
  291. package/dist/routing/index.js +5 -2
  292. package/dist/routing/index.js.map +1 -1
  293. package/dist/search/index.js +7 -5
  294. package/dist/search/index.js.map +1 -1
  295. package/dist/security/address-checker.js +40 -19
  296. package/dist/security/address-checker.js.map +1 -1
  297. package/dist/security/code-scanner.js +7 -5
  298. package/dist/security/code-scanner.js.map +1 -1
  299. package/dist/security/index.d.ts +3 -0
  300. package/dist/security/index.js +19 -7
  301. package/dist/security/index.js.map +1 -1
  302. package/dist/security/tx-validator.js +2 -2
  303. package/dist/security/tx-validator.js.map +1 -1
  304. package/dist/services/feature-engineering/rolling-window.d.ts +7 -0
  305. package/dist/services/feature-engineering/rolling-window.js +23 -0
  306. package/dist/services/feature-engineering/rolling-window.js.map +1 -1
  307. package/dist/services/feature-engineering/thresholds.js +2 -2
  308. package/dist/services/feature-engineering/thresholds.js.map +1 -1
  309. package/dist/services/tick-recorder/index.js +13 -1
  310. package/dist/services/tick-recorder/index.js.map +1 -1
  311. package/dist/services/tick-recorder/queries.js +11 -7
  312. package/dist/services/tick-recorder/queries.js.map +1 -1
  313. package/dist/services/tick-streamer/index.js +6 -2
  314. package/dist/services/tick-streamer/index.js.map +1 -1
  315. package/dist/session/index.d.ts +1 -1
  316. package/dist/session/index.js +31 -6
  317. package/dist/session/index.js.map +1 -1
  318. package/dist/sessions/index.js +76 -52
  319. package/dist/sessions/index.js.map +1 -1
  320. package/dist/signal-router/router.js +8 -1
  321. package/dist/signal-router/router.js.map +1 -1
  322. package/dist/skills/bundled/agentbets/index.js.map +1 -1
  323. package/dist/skills/bundled/auto-reply/SKILL.md +19 -16
  324. package/dist/skills/bundled/automation/SKILL.md +33 -215
  325. package/dist/skills/bundled/backtest/SKILL.md +2 -1
  326. package/dist/skills/bundled/credentials/SKILL.md +2 -1
  327. package/dist/skills/bundled/edge/SKILL.md +6 -3
  328. package/dist/skills/bundled/sandbox/SKILL.md +29 -240
  329. package/dist/skills/bundled/trading-kalshi/SKILL.md +65 -586
  330. package/dist/skills/bundled/usage/SKILL.md +8 -18
  331. package/dist/skills/bundled/webhooks/SKILL.md +31 -279
  332. package/dist/skills/bundled/whale-tracking/SKILL.md +24 -22
  333. package/dist/solana/copytrade.js +5 -5
  334. package/dist/solana/drift.js +2 -2
  335. package/dist/solana/drift.js.map +1 -1
  336. package/dist/solana/meteora-dbc.d.ts +2 -2
  337. package/dist/solana/pumpapi.js +4 -0
  338. package/dist/solana/pumpapi.js.map +1 -1
  339. package/dist/solana/raydium.js +46 -10
  340. package/dist/solana/raydium.js.map +1 -1
  341. package/dist/solana/swarm-copytrade.js +2 -2
  342. package/dist/solana/wallet.js +12 -3
  343. package/dist/solana/wallet.js.map +1 -1
  344. package/dist/strategies/crypto-hft/index.js +2 -0
  345. package/dist/strategies/crypto-hft/index.js.map +1 -1
  346. package/dist/strategies/crypto-hft/positions.js +11 -3
  347. package/dist/strategies/crypto-hft/positions.js.map +1 -1
  348. package/dist/strategies/crypto-hft/presets.js +2 -1
  349. package/dist/strategies/crypto-hft/presets.js.map +1 -1
  350. package/dist/strategies/crypto-hft/strategies.js +4 -3
  351. package/dist/strategies/crypto-hft/strategies.js.map +1 -1
  352. package/dist/strategies/hft-divergence/detector.js +5 -1
  353. package/dist/strategies/hft-divergence/detector.js.map +1 -1
  354. package/dist/strategies/hft-divergence/position-manager.js +13 -1
  355. package/dist/strategies/hft-divergence/position-manager.js.map +1 -1
  356. package/dist/strategies/hft-divergence/strategy.js +3 -1
  357. package/dist/strategies/hft-divergence/strategy.js.map +1 -1
  358. package/dist/streaming/index.js +21 -5
  359. package/dist/streaming/index.js.map +1 -1
  360. package/dist/tailscale/index.d.ts +0 -4
  361. package/dist/tailscale/index.js +5 -8
  362. package/dist/tailscale/index.js.map +1 -1
  363. package/dist/telemetry/index.d.ts +1 -0
  364. package/dist/telemetry/index.js +49 -6
  365. package/dist/telemetry/index.js.map +1 -1
  366. package/dist/tools/canvas.js +32 -8
  367. package/dist/tools/canvas.js.map +1 -1
  368. package/dist/tools/exec.js +32 -2
  369. package/dist/tools/exec.js.map +1 -1
  370. package/dist/tools/image.js +19 -0
  371. package/dist/tools/image.js.map +1 -1
  372. package/dist/tools/sql.js +4 -1
  373. package/dist/tools/sql.js.map +1 -1
  374. package/dist/tools/transcription.js +13 -0
  375. package/dist/tools/transcription.js.map +1 -1
  376. package/dist/tools/web-fetch.js +14 -0
  377. package/dist/tools/web-fetch.js.map +1 -1
  378. package/dist/tools/web-search.js +14 -0
  379. package/dist/tools/web-search.js.map +1 -1
  380. package/dist/trading/backtest.js +3 -3
  381. package/dist/trading/backtest.js.map +1 -1
  382. package/dist/trading/bots/index.d.ts +9 -1
  383. package/dist/trading/bots/index.js +4 -0
  384. package/dist/trading/bots/index.js.map +1 -1
  385. package/dist/trading/devtools.js +1 -1
  386. package/dist/trading/devtools.js.map +1 -1
  387. package/dist/trading/futures/index.js +5 -5
  388. package/dist/trading/index.js +1 -1
  389. package/dist/trading/index.js.map +1 -1
  390. package/dist/trading/logger.js +27 -20
  391. package/dist/trading/logger.js.map +1 -1
  392. package/dist/trading/safety.d.ts +2 -0
  393. package/dist/trading/safety.js +12 -2
  394. package/dist/trading/safety.js.map +1 -1
  395. package/dist/trading/stream.js +1 -1
  396. package/dist/trading/stream.js.map +1 -1
  397. package/dist/trading/tracking.d.ts +1 -1
  398. package/dist/trading/tracking.js.map +1 -1
  399. package/dist/utils/config.js +4 -3
  400. package/dist/utils/config.js.map +1 -1
  401. package/dist/utils/http.js +15 -1
  402. package/dist/utils/http.js.map +1 -1
  403. package/dist/utils/kelly.js +14 -5
  404. package/dist/utils/kelly.js.map +1 -1
  405. package/dist/utils/rate-limiter.js +25 -10
  406. package/dist/utils/rate-limiter.js.map +1 -1
  407. package/dist/voice/index.d.ts +5 -1
  408. package/dist/voice/index.js +65 -25
  409. package/dist/voice/index.js.map +1 -1
  410. package/dist/weather/edge.js +4 -2
  411. package/dist/weather/edge.js.map +1 -1
  412. package/dist/weather/markets.d.ts +1 -0
  413. package/dist/weather/markets.js +17 -8
  414. package/dist/weather/markets.js.map +1 -1
  415. package/dist/weather/noaa.d.ts +2 -0
  416. package/dist/weather/noaa.js +22 -5
  417. package/dist/weather/noaa.js.map +1 -1
  418. package/dist/web/index.d.ts +3 -0
  419. package/dist/web/index.js +60 -12
  420. package/dist/web/index.js.map +1 -1
  421. package/dist/wizard/index.js +13 -14
  422. package/dist/wizard/index.js.map +1 -1
  423. package/package.json +1 -1
@@ -1,242 +1,60 @@
1
1
  ---
2
2
  name: automation
3
- description: "Schedule cron jobs, manage webhooks, and automate recurring tasks"
4
- emoji: "⏰"
3
+ description: "Schedule cron jobs and automate recurring tasks"
4
+ commands:
5
+ - /auto
6
+ - /automation
5
7
  ---
6
8
 
7
- # Automation - Complete API Reference
9
+ # Automation - Cron Scheduler
8
10
 
9
- Schedule recurring tasks with cron expressions, manage incoming webhooks, and automate workflows.
11
+ Schedule recurring tasks using cron expressions with preset support.
10
12
 
11
- ---
12
-
13
- ## Chat Commands
14
-
15
- ### Cron Jobs
16
-
17
- ```
18
- /cron list # List all scheduled jobs
19
- /cron add "0 9 * * *" "scan for arbs" # Add daily 9am job
20
- /cron add "*/30 * * * *" "check prices" # Every 30 minutes
21
- /cron remove <job-id> # Remove job
22
- /cron enable <job-id> # Enable job
23
- /cron disable <job-id> # Disable job
24
- /cron run <job-id> # Run job now
25
- /cron history <job-id> # View run history
26
- ```
13
+ ## Commands
27
14
 
28
- ### Webhooks
29
-
30
- ```
31
- /webhook list # List webhooks
32
- /webhook add <name> <url> # Add webhook endpoint
33
- /webhook remove <name> # Remove webhook
34
- /webhook test <name> # Send test payload
35
- /webhook logs <name> # View webhook logs
36
- ```
37
-
38
- ### Heartbeat
39
-
40
- ```
41
- /heartbeat config --interval 60 # Set heartbeat interval
42
- /heartbeat status # View heartbeat status
43
- /heartbeat enable # Enable heartbeats
44
- /heartbeat disable # Disable heartbeats
45
15
  ```
46
-
47
- ---
48
-
49
- ## TypeScript API Reference
50
-
51
- ### Cron Scheduler
52
-
53
- ```typescript
54
- import { createCronScheduler } from 'clodds/automation';
55
-
56
- const cron = createCronScheduler({
57
- timezone: 'America/New_York',
58
- autoStart: true,
59
- });
60
-
61
- // Add a job
62
- const jobId = cron.addJob({
63
- name: 'daily-arb-scan',
64
- schedule: '0 9 * * *', // 9am daily
65
- task: async () => {
66
- console.log('Running arbitrage scan...');
67
- // Your logic here
68
- },
69
- enabled: true,
70
- });
71
-
72
- // List jobs
73
- const jobs = cron.listJobs();
74
- for (const job of jobs) {
75
- console.log(`${job.id}: ${job.name} (${job.schedule})`);
76
- console.log(` Next run: ${job.nextRun}`);
77
- console.log(` Enabled: ${job.enabled}`);
78
- }
79
-
80
- // Remove job
81
- cron.removeJob(jobId);
82
-
83
- // Enable/disable
84
- cron.enableJob(jobId);
85
- cron.disableJob(jobId);
86
-
87
- // Run immediately
88
- await cron.runJob(jobId);
89
-
90
- // Get history
91
- const history = cron.getHistory(jobId, { limit: 10 });
92
- for (const run of history) {
93
- console.log(`${run.timestamp}: ${run.status} (${run.duration}ms)`);
94
- }
16
+ /auto list - List all scheduled jobs
17
+ /auto cron <schedule> <command> - Create a cron job
18
+ /auto remove <id> - Remove a job
19
+ /auto enable <id> - Enable a job
20
+ /auto disable <id> - Disable a job
21
+ /auto trigger <id> - Manually run a job
22
+ /auto presets - Show available schedule presets
95
23
  ```
96
24
 
97
- ### Cron Expressions
25
+ ## Cron Expressions
98
26
 
99
27
  | Expression | Description |
100
28
  |------------|-------------|
101
29
  | `* * * * *` | Every minute |
102
30
  | `0 * * * *` | Every hour |
103
31
  | `0 9 * * *` | Daily at 9am |
104
- | `0 9 * * 1-5` | Weekdays at 9am |
105
32
  | `*/15 * * * *` | Every 15 minutes |
106
33
  | `0 0 1 * *` | First of month |
107
34
 
108
- ### Webhook Manager
35
+ ## Presets
109
36
 
110
- ```typescript
111
- import { createWebhookManager } from 'clodds/automation';
37
+ Instead of a cron expression, you can use a named preset:
112
38
 
113
- const webhooks = createWebhookManager({
114
- secret: process.env.WEBHOOK_SECRET,
115
- validateSignatures: true,
116
- });
117
-
118
- // Register webhook endpoint
119
- webhooks.register({
120
- name: 'trade-alerts',
121
- handler: async (payload) => {
122
- console.log('Received:', payload);
123
- // Process webhook
124
- return { status: 'ok' };
125
- },
126
- validatePayload: (payload) => {
127
- return payload.type && payload.data;
128
- },
129
- });
130
-
131
- // Get webhook URL
132
- const url = webhooks.getUrl('trade-alerts');
133
- console.log(`Webhook URL: ${url}`);
134
-
135
- // Send test
136
- await webhooks.test('trade-alerts', {
137
- type: 'test',
138
- data: { message: 'Hello' },
139
- });
140
-
141
- // View logs
142
- const logs = webhooks.getLogs('trade-alerts', { limit: 10 });
143
- for (const log of logs) {
144
- console.log(`${log.timestamp}: ${log.status}`);
145
- console.log(` Payload: ${JSON.stringify(log.payload)}`);
146
- }
147
-
148
- // Remove webhook
149
- webhooks.remove('trade-alerts');
150
39
  ```
151
-
152
- ### Heartbeat Service
153
-
154
- ```typescript
155
- import { createHeartbeatService } from 'clodds/automation';
156
-
157
- const heartbeat = createHeartbeatService({
158
- intervalMs: 60000, // 1 minute
159
- endpoint: 'https://healthcheck.example.com/ping',
160
- onFailure: (error) => {
161
- console.error('Heartbeat failed:', error);
162
- },
163
- });
164
-
165
- // Start
166
- heartbeat.start();
167
-
168
- // Get status
169
- const status = heartbeat.getStatus();
170
- console.log(`Last ping: ${status.lastPing}`);
171
- console.log(`Failures: ${status.failures}`);
172
- console.log(`Uptime: ${status.uptime}%`);
173
-
174
- // Stop
175
- heartbeat.stop();
40
+ /auto cron EVERY_MINUTE check-prices
41
+ /auto cron EVERY_5_MINUTES portfolio-sync
42
+ /auto cron EVERY_15_MINUTES scan-arbs
43
+ /auto cron HOURLY report
44
+ /auto cron DAILY_MIDNIGHT snapshot
45
+ /auto cron DAILY_9AM morning-scan
46
+ /auto cron WEEKLY_MONDAY_9AM weekly-report
47
+ /auto cron MONTHLY monthly-summary
176
48
  ```
177
49
 
178
- ---
50
+ ## Examples
179
51
 
180
- ## Example Automations
181
-
182
- ### Daily Arbitrage Scan
183
-
184
- ```typescript
185
- cron.addJob({
186
- name: 'daily-arb',
187
- schedule: '0 9,12,15,18 * * *', // 9am, 12pm, 3pm, 6pm
188
- task: async () => {
189
- const opportunities = await opportunityFinder.scan();
190
- if (opportunities.length > 0) {
191
- await notify(`Found ${opportunities.length} arbitrage opportunities`);
192
- }
193
- },
194
- });
195
52
  ```
196
-
197
- ### Portfolio Snapshot
198
-
199
- ```typescript
200
- cron.addJob({
201
- name: 'portfolio-snapshot',
202
- schedule: '0 0 * * *', // Midnight daily
203
- task: async () => {
204
- const portfolio = await trading.getPortfolio();
205
- await database.saveSnapshot({
206
- timestamp: Date.now(),
207
- value: portfolio.totalValue,
208
- positions: portfolio.positions.length,
209
- });
210
- },
211
- });
53
+ /auto cron "*/5 * * * *" portfolio-sync
54
+ /auto cron HOURLY check-positions
55
+ /auto list
56
+ /auto trigger job-1234567890
57
+ /auto disable job-1234567890
58
+ /auto remove job-1234567890
59
+ /auto presets
212
60
  ```
213
-
214
- ### Webhook for External Signals
215
-
216
- ```typescript
217
- webhooks.register({
218
- name: 'external-signals',
219
- handler: async (payload) => {
220
- if (payload.signal === 'buy') {
221
- await executor.marketBuy({
222
- platform: 'polymarket',
223
- marketId: payload.marketId,
224
- side: 'YES',
225
- size: 100,
226
- });
227
- }
228
- return { executed: true };
229
- },
230
- });
231
- ```
232
-
233
- ---
234
-
235
- ## Best Practices
236
-
237
- 1. **Use meaningful job names** - Easy to identify later
238
- 2. **Set appropriate intervals** - Don't spam APIs
239
- 3. **Handle failures gracefully** - Add retry logic
240
- 4. **Monitor job history** - Check for failures
241
- 5. **Validate webhook payloads** - Prevent bad data
242
- 6. **Use heartbeats** - Know when system is down
@@ -32,8 +32,9 @@ Validate trading strategies using historical data, walk-forward analysis, and Mo
32
32
 
33
33
  ```
34
34
  /backtest results Show recent results
35
+ /backtest stats Alias for results
35
36
  /backtest results <id> --detailed Detailed breakdown
36
- /backtest export <id> Export to CSV
37
+ /backtest export Export last results as CSV
37
38
  ```
38
39
 
39
40
  ---
@@ -25,8 +25,9 @@ Securely store and manage API credentials for trading platforms with AES-256-GCM
25
25
 
26
26
  ```
27
27
  /creds list List configured platforms
28
- /creds status Check credential health
28
+ /creds status Encryption system status
29
29
  /creds test polymarket Test API connection
30
+ /creds check polymarket Verify credentials work
30
31
  ```
31
32
 
32
33
  ### Remove Credentials
@@ -19,13 +19,16 @@ Compare prediction market prices to external models, polls, and data sources to
19
19
 
20
20
  ### Compare Specific Market
21
21
  ```
22
- /compare "Trump 2028" 538 betting-odds
22
+ /edge compare "Trump 2028" 538 betting-odds
23
+ /edge compare "BTC above 100k" polymarket kalshi
23
24
  ```
24
25
 
25
26
  ### Kelly Calculator
26
27
  ```
27
- /kelly 0.45 0.55 1000
28
- # market price, your estimate, bankroll
28
+ /edge kelly 0.6 2.0 1000
29
+ # probability, decimal odds, bankroll
30
+ /edge kelly 55 2.5
31
+ # 55% prob, 2.5 odds, $100 default bankroll
29
32
  ```
30
33
 
31
34
  ## Data Sources
@@ -1,257 +1,46 @@
1
1
  ---
2
2
  name: sandbox
3
- description: "Safe code execution in Docker containers with resource limits"
4
- emoji: "📦"
5
- gates:
6
- envs:
7
- anyOf:
8
- - DOCKER_HOST
3
+ description: "Visual HTML canvas sandbox for agent-driven UI and live previews"
4
+ commands:
5
+ - /sandbox
6
+ - /canvas
9
7
  ---
10
8
 
11
- # Sandbox - Complete API Reference
9
+ # Sandbox - Visual Canvas
12
10
 
13
- Execute code safely in isolated Docker containers with resource limits and timeout protection.
11
+ Push HTML content to a live-updating canvas server for visual previews, dashboards, and agent-driven UI.
14
12
 
15
- ---
16
-
17
- ## Chat Commands
18
-
19
- ### Run Code
13
+ ## Commands
20
14
 
21
15
  ```
22
- /run python "print('Hello')" Run Python code
23
- /run node "console.log('Hi')" Run JavaScript
24
- /run bash "ls -la" Run shell command
25
- /run ruby "puts 'Hello'" Run Ruby code
16
+ /sandbox start - Start the canvas server (returns URL)
17
+ /sandbox push <html> - Push HTML content to the canvas
18
+ /sandbox reset - Reset canvas to blank state
19
+ /sandbox screenshot - Take a screenshot of the current canvas
20
+ /sandbox status - Show canvas server status and settings
26
21
  ```
27
22
 
28
- ### With Options
23
+ ## Environment Variables
29
24
 
30
- ```
31
- /run python "code" --timeout 30 Set timeout (seconds)
32
- /run node "code" --memory 512 Memory limit (MB)
33
- /run python "code" --file script.py From file
34
- ```
25
+ | Variable | Description |
26
+ |----------|-------------|
27
+ | `CANVAS_ALLOW_JS_EVAL` | Enable JavaScript evaluation in canvas (default: `false`) |
28
+ | `ALLOW_UNSAFE_SANDBOX` | Enable unsafe sandbox mode (default: `false`) |
35
29
 
36
- ### Sandbox Management
30
+ ## Examples
37
31
 
38
32
  ```
39
- /sandbox status Container status
40
- /sandbox images Available images
41
- /sandbox cleanup Remove old containers
42
- ```
43
-
44
- ---
45
-
46
- ## TypeScript API Reference
47
-
48
- ### Create Sandbox
49
-
50
- ```typescript
51
- import { createSandbox } from 'clodds/sandbox';
52
-
53
- const sandbox = createSandbox({
54
- // Docker settings
55
- dockerHost: process.env.DOCKER_HOST,
56
-
57
- // Default limits
58
- defaultTimeoutMs: 30000,
59
- defaultMemoryMB: 256,
60
- defaultCpuShares: 512,
61
-
62
- // Cleanup
63
- autoCleanup: true,
64
- maxContainerAgeMs: 3600000,
65
- });
66
- ```
67
-
68
- ### Run Code
69
-
70
- ```typescript
71
- // Run Python
72
- const result = await sandbox.run({
73
- language: 'python',
74
- code: `
75
- import math
76
- print(f"Pi is {math.pi}")
77
- `,
78
- });
79
-
80
- console.log(`Output: ${result.stdout}`);
81
- console.log(`Exit code: ${result.exitCode}`);
82
- console.log(`Duration: ${result.durationMs}ms`);
83
-
84
- // Run with limits
85
- const result = await sandbox.run({
86
- language: 'node',
87
- code: `console.log('Hello from Node.js')`,
88
- timeout: 10000,
89
- memoryMB: 128,
90
- });
91
- ```
92
-
93
- ### Supported Languages
94
-
95
- ```typescript
96
- // Python
97
- await sandbox.run({ language: 'python', code: 'print("Hello")' });
98
-
99
- // JavaScript (Node.js)
100
- await sandbox.run({ language: 'node', code: 'console.log("Hello")' });
101
-
102
- // Bash
103
- await sandbox.run({ language: 'bash', code: 'echo "Hello"' });
104
-
105
- // Ruby
106
- await sandbox.run({ language: 'ruby', code: 'puts "Hello"' });
107
-
108
- // Go
109
- await sandbox.run({ language: 'go', code: 'package main\nimport "fmt"\nfunc main() { fmt.Println("Hello") }' });
110
- ```
111
-
112
- ### Run From File
113
-
114
- ```typescript
115
- const result = await sandbox.runFile({
116
- language: 'python',
117
- filePath: '/path/to/script.py',
118
- args: ['--input', 'data.csv'],
119
- });
120
- ```
121
-
122
- ### Install Packages
123
-
124
- ```typescript
125
- // Python packages
126
- const result = await sandbox.run({
127
- language: 'python',
128
- code: `
129
- import pandas as pd
130
- print(pd.__version__)
131
- `,
132
- packages: ['pandas', 'numpy'],
133
- });
134
-
135
- // Node packages
136
- const result = await sandbox.run({
137
- language: 'node',
138
- code: `
139
- const _ = require('lodash');
140
- console.log(_.VERSION);
141
- `,
142
- packages: ['lodash'],
143
- });
33
+ /sandbox start
34
+ /sandbox push <h1>Hello World</h1><p>Live preview</p>
35
+ /sandbox screenshot
36
+ /sandbox status
37
+ /sandbox reset
144
38
  ```
145
39
 
146
- ### Resource Limits
147
-
148
- ```typescript
149
- const result = await sandbox.run({
150
- language: 'python',
151
- code: 'import time; time.sleep(100)',
152
-
153
- // Limits
154
- timeout: 5000, // 5 second timeout
155
- memoryMB: 256, // 256 MB RAM
156
- cpuShares: 512, // CPU shares (default 1024)
157
- networkDisabled: true, // No network access
158
- });
159
- ```
160
-
161
- ### Container Management
162
-
163
- ```typescript
164
- // Get status
165
- const status = await sandbox.getStatus();
166
- console.log(`Running containers: ${status.running}`);
167
- console.log(`Total containers: ${status.total}`);
168
-
169
- // List available images
170
- const images = await sandbox.listImages();
171
- for (const img of images) {
172
- console.log(`${img.language}: ${img.image}`);
173
- }
174
-
175
- // Cleanup old containers
176
- await sandbox.cleanup({
177
- olderThan: '1h',
178
- status: 'exited',
179
- });
180
- ```
181
-
182
- ---
183
-
184
- ## Language Images
185
-
186
- | Language | Image | Version |
187
- |----------|-------|---------|
188
- | **python** | python:3.11-slim | 3.11 |
189
- | **node** | node:20-slim | 20.x |
190
- | **bash** | alpine:latest | Alpine |
191
- | **ruby** | ruby:3.2-slim | 3.2 |
192
- | **go** | golang:1.21-alpine | 1.21 |
193
-
194
- ---
195
-
196
- ## Resource Limits
197
-
198
- | Resource | Default | Max |
199
- |----------|---------|-----|
200
- | **Timeout** | 30s | 300s |
201
- | **Memory** | 256 MB | 2048 MB |
202
- | **CPU** | 512 shares | 2048 shares |
203
- | **Disk** | 100 MB | 1 GB |
204
-
205
- ---
206
-
207
- ## Security
208
-
209
- | Feature | Description |
210
- |---------|-------------|
211
- | **Isolation** | Each run in separate container |
212
- | **No network** | Network disabled by default |
213
- | **No volumes** | No host filesystem access |
214
- | **Read-only** | Filesystem is read-only |
215
- | **Resource caps** | Memory and CPU limits |
216
- | **Timeout** | Force kill after timeout |
217
-
218
- ---
219
-
220
- ## Use Cases
221
-
222
- ### Run Backtest
223
-
224
- ```typescript
225
- const result = await sandbox.run({
226
- language: 'python',
227
- code: backtestCode,
228
- packages: ['pandas', 'numpy', 'ta'],
229
- timeout: 60000,
230
- memoryMB: 512,
231
- });
232
- ```
233
-
234
- ### Data Processing
235
-
236
- ```typescript
237
- const result = await sandbox.run({
238
- language: 'python',
239
- code: `
240
- import json
241
- data = ${JSON.stringify(inputData)}
242
- result = process(data)
243
- print(json.dumps(result))
244
- `,
245
- });
246
- const output = JSON.parse(result.stdout);
247
- ```
248
-
249
- ---
250
-
251
- ## Best Practices
40
+ ## How It Works
252
41
 
253
- 1. **Set timeouts** Prevent runaway code
254
- 2. **Limit memory** Avoid OOM
255
- 3. **Disable network** Unless needed
256
- 4. **Use slim images** Faster startup
257
- 5. **Cleanup regularly** Remove old containers
42
+ 1. `/sandbox start` launches a local HTTP server that serves the canvas page
43
+ 2. `/sandbox push <html>` sends HTML to the canvas, rendered in real time
44
+ 3. `/sandbox screenshot` captures the current canvas state as an image
45
+ 4. `/sandbox reset` clears all HTML, CSS, and JS from the canvas
46
+ 5. `/sandbox status` shows whether the server is running, the URL, and content sizes