@damn-dev/cli 0.9.2-rc.1
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.
- package/README.md +77 -0
- package/bin/damn-dev.js +4 -0
- package/lib/cli.js +47 -0
- package/lib/commands/start.js +109 -0
- package/lib/commands/stop.js +49 -0
- package/lib/commands/version.js +4 -0
- package/lib/paths.js +34 -0
- package/lib/setup.js +69 -0
- package/package.json +57 -0
- package/runtime/backend/prisma/schema.prisma +720 -0
- package/runtime/backend/resources/skills/obsidian-builtin/SKILL.md +33 -0
- package/runtime/backend/server.cjs +29409 -0
- package/runtime/frontend/dist/assets/abap-BdImnpbu.js +1 -0
- package/runtime/frontend/dist/assets/actionscript-3-CoDkCxhg.js +1 -0
- package/runtime/frontend/dist/assets/ada-bCR0ucgS.js +1 -0
- package/runtime/frontend/dist/assets/andromeeda-C4gqWexZ.js +1 -0
- package/runtime/frontend/dist/assets/angular-html-DA-rfuFy.js +1 -0
- package/runtime/frontend/dist/assets/angular-ts-BrjP3tb8.js +1 -0
- package/runtime/frontend/dist/assets/apache-Pmp26Uib.js +1 -0
- package/runtime/frontend/dist/assets/apex-D8_7TLub.js +1 -0
- package/runtime/frontend/dist/assets/apl-CORt7UWP.js +1 -0
- package/runtime/frontend/dist/assets/applescript-Co6uUVPk.js +1 -0
- package/runtime/frontend/dist/assets/ara-BRHolxvo.js +1 -0
- package/runtime/frontend/dist/assets/asciidoc-Ve4PFQV2.js +1 -0
- package/runtime/frontend/dist/assets/asm-D_Q5rh1f.js +1 -0
- package/runtime/frontend/dist/assets/astro-HNnZUWAn.js +1 -0
- package/runtime/frontend/dist/assets/aurora-x-D-2ljcwZ.js +1 -0
- package/runtime/frontend/dist/assets/awk-DMzUqQB5.js +1 -0
- package/runtime/frontend/dist/assets/ayu-dark-DYE7WIF3.js +1 -0
- package/runtime/frontend/dist/assets/ayu-light-BA47KaF1.js +1 -0
- package/runtime/frontend/dist/assets/ayu-mirage-32ctXXKs.js +1 -0
- package/runtime/frontend/dist/assets/ballerina-BFfxhgS-.js +1 -0
- package/runtime/frontend/dist/assets/bat-BkioyH1T.js +1 -0
- package/runtime/frontend/dist/assets/beancount-k_qm7-4y.js +1 -0
- package/runtime/frontend/dist/assets/berry-uYugtg8r.js +1 -0
- package/runtime/frontend/dist/assets/bibtex-CHM0blh-.js +1 -0
- package/runtime/frontend/dist/assets/bicep-Bmn6On1c.js +1 -0
- package/runtime/frontend/dist/assets/bird2-BIv1doCn.js +1 -0
- package/runtime/frontend/dist/assets/blade-BjGOyj-B.js +1 -0
- package/runtime/frontend/dist/assets/bsl-BO_Y6i37.js +1 -0
- package/runtime/frontend/dist/assets/c-BIGW1oBm.js +1 -0
- package/runtime/frontend/dist/assets/c3-eo99z4R2.js +1 -0
- package/runtime/frontend/dist/assets/cadence-Bv_4Rxtq.js +1 -0
- package/runtime/frontend/dist/assets/cairo-KRGpt6FW.js +1 -0
- package/runtime/frontend/dist/assets/catppuccin-frappe-DFWUc33u.js +1 -0
- package/runtime/frontend/dist/assets/catppuccin-latte-C9dUb6Cb.js +1 -0
- package/runtime/frontend/dist/assets/catppuccin-macchiato-DQyhUUbL.js +1 -0
- package/runtime/frontend/dist/assets/catppuccin-mocha-D87Tk5Gz.js +1 -0
- package/runtime/frontend/dist/assets/clarity-D53aC0YG.js +1 -0
- package/runtime/frontend/dist/assets/clojure-P80f7IUj.js +1 -0
- package/runtime/frontend/dist/assets/cmake-D1j8_8rp.js +1 -0
- package/runtime/frontend/dist/assets/cobol-nBiQ_Alo.js +1 -0
- package/runtime/frontend/dist/assets/codeowners-Bp6g37R7.js +1 -0
- package/runtime/frontend/dist/assets/codeql-DsOJ9woJ.js +1 -0
- package/runtime/frontend/dist/assets/coffee-Ch7k5sss.js +1 -0
- package/runtime/frontend/dist/assets/common-lisp-Cg-RD9OK.js +1 -0
- package/runtime/frontend/dist/assets/coq-DkFqJrB1.js +1 -0
- package/runtime/frontend/dist/assets/core-Bjnh3KEM.js +1 -0
- package/runtime/frontend/dist/assets/cpp-CofmeUqb.js +1 -0
- package/runtime/frontend/dist/assets/crystal-DNxU26gB.js +1 -0
- package/runtime/frontend/dist/assets/csharp-COcwbKMJ.js +1 -0
- package/runtime/frontend/dist/assets/css-CLj8gQPS.js +1 -0
- package/runtime/frontend/dist/assets/csv-fuZLfV_i.js +1 -0
- package/runtime/frontend/dist/assets/cue-D82EKSYY.js +1 -0
- package/runtime/frontend/dist/assets/cypher-COkxafJQ.js +1 -0
- package/runtime/frontend/dist/assets/d-85-TOEBH.js +1 -0
- package/runtime/frontend/dist/assets/dark-plus-C3mMm8J8.js +1 -0
- package/runtime/frontend/dist/assets/dart-bE4Kk8sk.js +1 -0
- package/runtime/frontend/dist/assets/dax-CEL-wOlO.js +1 -0
- package/runtime/frontend/dist/assets/desktop-BmXAJ9_W.js +1 -0
- package/runtime/frontend/dist/assets/diff-D97Zzqfu.js +1 -0
- package/runtime/frontend/dist/assets/docker-BcOcwvcX.js +1 -0
- package/runtime/frontend/dist/assets/dotenv-Da5cRb03.js +1 -0
- package/runtime/frontend/dist/assets/dracula-BzJJZx-M.js +1 -0
- package/runtime/frontend/dist/assets/dracula-soft-BXkSAIEj.js +1 -0
- package/runtime/frontend/dist/assets/dream-maker-BtqSS_iP.js +1 -0
- package/runtime/frontend/dist/assets/edge-FbVlp4U3.js +1 -0
- package/runtime/frontend/dist/assets/elixir-CkH2-t6x.js +1 -0
- package/runtime/frontend/dist/assets/elm-DbKCFpqz.js +1 -0
- package/runtime/frontend/dist/assets/emacs-lisp-CXvaQtF9.js +1 -0
- package/runtime/frontend/dist/assets/erb-BYCe7drp.js +1 -0
- package/runtime/frontend/dist/assets/erlang-DsQrWhSR.js +1 -0
- package/runtime/frontend/dist/assets/everforest-dark-BgDCqdQA.js +1 -0
- package/runtime/frontend/dist/assets/everforest-light-C8M2exoo.js +1 -0
- package/runtime/frontend/dist/assets/fennel-BYunw83y.js +1 -0
- package/runtime/frontend/dist/assets/fish-BvzEVeQv.js +1 -0
- package/runtime/frontend/dist/assets/fluent-C4IJs8-o.js +1 -0
- package/runtime/frontend/dist/assets/fortran-fixed-form-CkoXwp7k.js +1 -0
- package/runtime/frontend/dist/assets/fortran-free-form-BxgE0vQu.js +1 -0
- package/runtime/frontend/dist/assets/fsharp-CXgrBDvD.js +1 -0
- package/runtime/frontend/dist/assets/gdresource-BOOCDP_w.js +1 -0
- package/runtime/frontend/dist/assets/gdscript-C5YyOfLZ.js +1 -0
- package/runtime/frontend/dist/assets/gdshader-DkwncUOv.js +1 -0
- package/runtime/frontend/dist/assets/genie-D0YGMca9.js +1 -0
- package/runtime/frontend/dist/assets/gherkin-DyxjwDmM.js +1 -0
- package/runtime/frontend/dist/assets/git-commit-F4YmCXRG.js +1 -0
- package/runtime/frontend/dist/assets/git-rebase-r7XF79zn.js +1 -0
- package/runtime/frontend/dist/assets/github-dark-DHJKELXO.js +1 -0
- package/runtime/frontend/dist/assets/github-dark-default-Cuk6v7N8.js +1 -0
- package/runtime/frontend/dist/assets/github-dark-dimmed-DH5Ifo-i.js +1 -0
- package/runtime/frontend/dist/assets/github-dark-high-contrast-E3gJ1_iC.js +1 -0
- package/runtime/frontend/dist/assets/github-light-DAi9KRSo.js +1 -0
- package/runtime/frontend/dist/assets/github-light-default-D7oLnXFd.js +1 -0
- package/runtime/frontend/dist/assets/github-light-high-contrast-BfjtVDDH.js +1 -0
- package/runtime/frontend/dist/assets/gleam-BspZqrRM.js +1 -0
- package/runtime/frontend/dist/assets/glimmer-js-ByusRIyA.js +1 -0
- package/runtime/frontend/dist/assets/glimmer-ts-BfAWNZQY.js +1 -0
- package/runtime/frontend/dist/assets/glsl-DplSGwfg.js +1 -0
- package/runtime/frontend/dist/assets/gn-n2N0HUVH.js +1 -0
- package/runtime/frontend/dist/assets/gnuplot-DdkO51Og.js +1 -0
- package/runtime/frontend/dist/assets/go-C27-OAKa.js +1 -0
- package/runtime/frontend/dist/assets/graphql-ChdNCCLP.js +1 -0
- package/runtime/frontend/dist/assets/groovy-gcz8RCvz.js +1 -0
- package/runtime/frontend/dist/assets/gruvbox-dark-hard-CFHQjOhq.js +1 -0
- package/runtime/frontend/dist/assets/gruvbox-dark-medium-GsRaNv29.js +1 -0
- package/runtime/frontend/dist/assets/gruvbox-dark-soft-CVdnzihN.js +1 -0
- package/runtime/frontend/dist/assets/gruvbox-light-hard-CH1njM8p.js +1 -0
- package/runtime/frontend/dist/assets/gruvbox-light-medium-DRw_LuNl.js +1 -0
- package/runtime/frontend/dist/assets/gruvbox-light-soft-hJgmCMqR.js +1 -0
- package/runtime/frontend/dist/assets/hack-i7_Ulhet.js +1 -0
- package/runtime/frontend/dist/assets/haml-D5jkg6IW.js +1 -0
- package/runtime/frontend/dist/assets/handlebars-BpdQsYii.js +1 -0
- package/runtime/frontend/dist/assets/haskell-Df6bDoY_.js +1 -0
- package/runtime/frontend/dist/assets/haxe-CzTSHFRz.js +1 -0
- package/runtime/frontend/dist/assets/hcl-BWvSN4gD.js +1 -0
- package/runtime/frontend/dist/assets/hjson-D5-asLiD.js +1 -0
- package/runtime/frontend/dist/assets/hlsl-D3lLCCz7.js +1 -0
- package/runtime/frontend/dist/assets/horizon-BUw7H-hv.js +1 -0
- package/runtime/frontend/dist/assets/horizon-bright-CUuTKBJd.js +1 -0
- package/runtime/frontend/dist/assets/houston-DnULxvSX.js +1 -0
- package/runtime/frontend/dist/assets/html-derivative-DlHx6ybY.js +1 -0
- package/runtime/frontend/dist/assets/html-pp8916En.js +1 -0
- package/runtime/frontend/dist/assets/http-jrhK8wxY.js +1 -0
- package/runtime/frontend/dist/assets/hurl-irOxFIW8.js +1 -0
- package/runtime/frontend/dist/assets/hxml-Bvhsp5Yf.js +1 -0
- package/runtime/frontend/dist/assets/hy-DFXneXwc.js +1 -0
- package/runtime/frontend/dist/assets/imba-DGztddWO.js +1 -0
- package/runtime/frontend/dist/assets/index-BTJegBz4.css +1 -0
- package/runtime/frontend/dist/assets/index-CO34o7br.js +1 -0
- package/runtime/frontend/dist/assets/index-CdilBaXC.js +1 -0
- package/runtime/frontend/dist/assets/index-Cpew6ait.js +1 -0
- package/runtime/frontend/dist/assets/index-Cwlc3FMt.js +435 -0
- package/runtime/frontend/dist/assets/index-E-6oA41F.js +1 -0
- package/runtime/frontend/dist/assets/ini-BEwlwnbL.js +1 -0
- package/runtime/frontend/dist/assets/java-CylS5w8V.js +1 -0
- package/runtime/frontend/dist/assets/javascript-wDzz0qaB.js +1 -0
- package/runtime/frontend/dist/assets/jinja-f2NsQr07.js +1 -0
- package/runtime/frontend/dist/assets/jison-wvAkD_A8.js +1 -0
- package/runtime/frontend/dist/assets/json-Cp-IABpG.js +1 -0
- package/runtime/frontend/dist/assets/json5-C9tS-k6U.js +1 -0
- package/runtime/frontend/dist/assets/jsonc-Des-eS-w.js +1 -0
- package/runtime/frontend/dist/assets/jsonl-DcaNXYhu.js +1 -0
- package/runtime/frontend/dist/assets/jsonnet-DFQXde-d.js +1 -0
- package/runtime/frontend/dist/assets/jssm-C2t-YnRu.js +1 -0
- package/runtime/frontend/dist/assets/jsx-g9-lgVsj.js +1 -0
- package/runtime/frontend/dist/assets/julia-CxzCAyBv.js +1 -0
- package/runtime/frontend/dist/assets/just-VxiPbLrw.js +1 -0
- package/runtime/frontend/dist/assets/kanagawa-dragon-CkXjmgJE.js +1 -0
- package/runtime/frontend/dist/assets/kanagawa-lotus-CfQXZHmo.js +1 -0
- package/runtime/frontend/dist/assets/kanagawa-wave-DWedfzmr.js +1 -0
- package/runtime/frontend/dist/assets/kdl-DV7GczEv.js +1 -0
- package/runtime/frontend/dist/assets/kotlin-BdnUsdx6.js +1 -0
- package/runtime/frontend/dist/assets/kusto-wEQ09or8.js +1 -0
- package/runtime/frontend/dist/assets/laserwave-DUszq2jm.js +1 -0
- package/runtime/frontend/dist/assets/latex-CWtU0Tv5.js +1 -0
- package/runtime/frontend/dist/assets/lean-BZvkOJ9d.js +1 -0
- package/runtime/frontend/dist/assets/less-B1dDrJ26.js +1 -0
- package/runtime/frontend/dist/assets/light-plus-B7mTdjB0.js +1 -0
- package/runtime/frontend/dist/assets/liquid-C0sCDyMI.js +1 -0
- package/runtime/frontend/dist/assets/llvm-DjAJT7YJ.js +1 -0
- package/runtime/frontend/dist/assets/log-2UxHyX5q.js +1 -0
- package/runtime/frontend/dist/assets/logo-BtOb2qkB.js +1 -0
- package/runtime/frontend/dist/assets/lua-BaeVxFsk.js +1 -0
- package/runtime/frontend/dist/assets/luau-C-HG3fhB.js +1 -0
- package/runtime/frontend/dist/assets/make-CHLpvVh8.js +1 -0
- package/runtime/frontend/dist/assets/markdown-Cvjx9yec.js +1 -0
- package/runtime/frontend/dist/assets/marko-DjSrsDqO.js +1 -0
- package/runtime/frontend/dist/assets/material-theme-D5KoaKCx.js +1 -0
- package/runtime/frontend/dist/assets/material-theme-darker-BfHTSMKl.js +1 -0
- package/runtime/frontend/dist/assets/material-theme-lighter-B0m2ddpp.js +1 -0
- package/runtime/frontend/dist/assets/material-theme-ocean-CyktbL80.js +1 -0
- package/runtime/frontend/dist/assets/material-theme-palenight-Csfq5Kiy.js +1 -0
- package/runtime/frontend/dist/assets/matlab-D7o27uSR.js +1 -0
- package/runtime/frontend/dist/assets/mdc-DTYItulj.js +1 -0
- package/runtime/frontend/dist/assets/mdx-Cmh6b_Ma.js +1 -0
- package/runtime/frontend/dist/assets/mermaid-mWjccvbQ.js +1 -0
- package/runtime/frontend/dist/assets/min-dark-CafNBF8u.js +1 -0
- package/runtime/frontend/dist/assets/min-light-CTRr51gU.js +1 -0
- package/runtime/frontend/dist/assets/mipsasm-CKIfxQSi.js +1 -0
- package/runtime/frontend/dist/assets/mojo-rZm6bMo-.js +1 -0
- package/runtime/frontend/dist/assets/monokai-D4h5O-jR.js +1 -0
- package/runtime/frontend/dist/assets/moonbit-_H4v1dQx.js +1 -0
- package/runtime/frontend/dist/assets/move-IF9eRakj.js +1 -0
- package/runtime/frontend/dist/assets/narrat-DRg8JJMk.js +1 -0
- package/runtime/frontend/dist/assets/nextflow-C-mBbutL.js +1 -0
- package/runtime/frontend/dist/assets/nextflow-groovy-vE_lwT2v.js +1 -0
- package/runtime/frontend/dist/assets/nginx-BpAMiNFr.js +1 -0
- package/runtime/frontend/dist/assets/night-owl-C39BiMTA.js +1 -0
- package/runtime/frontend/dist/assets/night-owl-light-CMTm3GFP.js +1 -0
- package/runtime/frontend/dist/assets/nim-BIad80T-.js +1 -0
- package/runtime/frontend/dist/assets/nix-CwoSXNpI.js +1 -0
- package/runtime/frontend/dist/assets/nord-Ddv68eIx.js +1 -0
- package/runtime/frontend/dist/assets/nushell-Cz2AlsmD.js +1 -0
- package/runtime/frontend/dist/assets/objective-c-DXmwc3jG.js +1 -0
- package/runtime/frontend/dist/assets/objective-cpp-CLxacb5B.js +1 -0
- package/runtime/frontend/dist/assets/ocaml-C0hk2d4L.js +1 -0
- package/runtime/frontend/dist/assets/odin-BBf5iR-q.js +1 -0
- package/runtime/frontend/dist/assets/one-dark-pro-DVMEJ2y_.js +1 -0
- package/runtime/frontend/dist/assets/one-light-C3Wv6jpd.js +1 -0
- package/runtime/frontend/dist/assets/openscad-C4EeE6gA.js +1 -0
- package/runtime/frontend/dist/assets/pascal-D93ZcfNL.js +1 -0
- package/runtime/frontend/dist/assets/perl-NvoQZIq0.js +1 -0
- package/runtime/frontend/dist/assets/php-R6g_5hLQ.js +1 -0
- package/runtime/frontend/dist/assets/pkl-u5AG7uiY.js +1 -0
- package/runtime/frontend/dist/assets/plastic-3e1v2bzS.js +1 -0
- package/runtime/frontend/dist/assets/plsql-ChMvpjG-.js +1 -0
- package/runtime/frontend/dist/assets/po-BTJTHyun.js +1 -0
- package/runtime/frontend/dist/assets/poimandres-CS3Unz2-.js +1 -0
- package/runtime/frontend/dist/assets/polar-C0HS_06l.js +1 -0
- package/runtime/frontend/dist/assets/postcss-CXtECtnM.js +1 -0
- package/runtime/frontend/dist/assets/powerquery-CEu0bR-o.js +1 -0
- package/runtime/frontend/dist/assets/powershell-Dpen1YoG.js +1 -0
- package/runtime/frontend/dist/assets/prisma-Dd19v3D-.js +1 -0
- package/runtime/frontend/dist/assets/prolog-CbFg5uaA.js +1 -0
- package/runtime/frontend/dist/assets/proto-C7zT0LnQ.js +1 -0
- package/runtime/frontend/dist/assets/pug-DKIMFp6K.js +1 -0
- package/runtime/frontend/dist/assets/puppet-BMWR74SV.js +1 -0
- package/runtime/frontend/dist/assets/purescript-CklMAg4u.js +1 -0
- package/runtime/frontend/dist/assets/python-B6aJPvgy.js +1 -0
- package/runtime/frontend/dist/assets/qml-3beO22l8.js +1 -0
- package/runtime/frontend/dist/assets/qmldir-C8lEn-DE.js +1 -0
- package/runtime/frontend/dist/assets/qss-IeuSbFQv.js +1 -0
- package/runtime/frontend/dist/assets/r-Dspwwk_N.js +1 -0
- package/runtime/frontend/dist/assets/racket-BqYA7rlc.js +1 -0
- package/runtime/frontend/dist/assets/raku-DXvB9xmW.js +1 -0
- package/runtime/frontend/dist/assets/razor-BDqjjVU7.js +1 -0
- package/runtime/frontend/dist/assets/red-bN70gL4F.js +1 -0
- package/runtime/frontend/dist/assets/reg-C-SQnVFl.js +1 -0
- package/runtime/frontend/dist/assets/regexp-CDVJQ6XC.js +1 -0
- package/runtime/frontend/dist/assets/rel-C3B-1QV4.js +1 -0
- package/runtime/frontend/dist/assets/riscv-BM1_JUlF.js +1 -0
- package/runtime/frontend/dist/assets/ron-D8l8udqQ.js +1 -0
- package/runtime/frontend/dist/assets/rose-pine-dawn-DHQR4-dF.js +1 -0
- package/runtime/frontend/dist/assets/rose-pine-moon-D4_iv3hh.js +1 -0
- package/runtime/frontend/dist/assets/rose-pine-qdsjHGoJ.js +1 -0
- package/runtime/frontend/dist/assets/rosmsg-BJDFO7_C.js +1 -0
- package/runtime/frontend/dist/assets/rst-CRjBmOyv.js +1 -0
- package/runtime/frontend/dist/assets/ruby-Wjq7vjNf.js +1 -0
- package/runtime/frontend/dist/assets/rust-B1yitclQ.js +1 -0
- package/runtime/frontend/dist/assets/sas-cz2c8ADy.js +1 -0
- package/runtime/frontend/dist/assets/sass-Cj5Yp3dK.js +1 -0
- package/runtime/frontend/dist/assets/scala-C151Ov-r.js +1 -0
- package/runtime/frontend/dist/assets/scheme-C98Dy4si.js +1 -0
- package/runtime/frontend/dist/assets/scss-D5BDwBP9.js +1 -0
- package/runtime/frontend/dist/assets/sdbl-DVxCFoDh.js +1 -0
- package/runtime/frontend/dist/assets/shaderlab-Dg9Lc6iA.js +1 -0
- package/runtime/frontend/dist/assets/shellscript-Yzrsuije.js +1 -0
- package/runtime/frontend/dist/assets/shellsession-BADoaaVG.js +1 -0
- package/runtime/frontend/dist/assets/slack-dark-BthQWCQV.js +1 -0
- package/runtime/frontend/dist/assets/slack-ochin-DqwNpetd.js +1 -0
- package/runtime/frontend/dist/assets/smalltalk-BERRCDM3.js +1 -0
- package/runtime/frontend/dist/assets/snazzy-light-Bw305WKR.js +1 -0
- package/runtime/frontend/dist/assets/solarized-dark-DXbdFlpD.js +1 -0
- package/runtime/frontend/dist/assets/solarized-light-L9t79GZl.js +1 -0
- package/runtime/frontend/dist/assets/solidity-rGO070M0.js +1 -0
- package/runtime/frontend/dist/assets/soy-8wufbnw4.js +1 -0
- package/runtime/frontend/dist/assets/sparql-rVzFXLq3.js +1 -0
- package/runtime/frontend/dist/assets/splunk-BtCnVYZw.js +1 -0
- package/runtime/frontend/dist/assets/sql-BLtJtn59.js +1 -0
- package/runtime/frontend/dist/assets/ssh-config-_ykCGR6B.js +1 -0
- package/runtime/frontend/dist/assets/stata-BH5u7GGu.js +1 -0
- package/runtime/frontend/dist/assets/stylus-BEDo0Tqx.js +1 -0
- package/runtime/frontend/dist/assets/surrealql-Bq5Q-fJD.js +1 -0
- package/runtime/frontend/dist/assets/svelte-Cy7k_4gC.js +1 -0
- package/runtime/frontend/dist/assets/swift-D82vCrfD.js +1 -0
- package/runtime/frontend/dist/assets/synthwave-84-CbfX1IO0.js +1 -0
- package/runtime/frontend/dist/assets/system-verilog-CnnmHF94.js +1 -0
- package/runtime/frontend/dist/assets/systemd-4A_iFExJ.js +1 -0
- package/runtime/frontend/dist/assets/talonscript-CkByrt1z.js +1 -0
- package/runtime/frontend/dist/assets/tasl-QIJgUcNo.js +1 -0
- package/runtime/frontend/dist/assets/tauriTerminal-4k8awVqp.js +1 -0
- package/runtime/frontend/dist/assets/tcl-dwOrl1Do.js +1 -0
- package/runtime/frontend/dist/assets/templ-DhtptRzy.js +1 -0
- package/runtime/frontend/dist/assets/terraform-BETggiCN.js +1 -0
- package/runtime/frontend/dist/assets/tex-idrVyKtj.js +1 -0
- package/runtime/frontend/dist/assets/tokyo-night-hegEt444.js +1 -0
- package/runtime/frontend/dist/assets/toml-vGWfd6FD.js +1 -0
- package/runtime/frontend/dist/assets/ts-tags-DQrlYJgV.js +1 -0
- package/runtime/frontend/dist/assets/tsv-B_m7g4N7.js +1 -0
- package/runtime/frontend/dist/assets/tsx-COt5Ahok.js +1 -0
- package/runtime/frontend/dist/assets/turtle-BsS91CYL.js +1 -0
- package/runtime/frontend/dist/assets/twig-xg9kU7Mw.js +1 -0
- package/runtime/frontend/dist/assets/typescript-BPQ3VLAy.js +1 -0
- package/runtime/frontend/dist/assets/typespec-CAFt9gP4.js +1 -0
- package/runtime/frontend/dist/assets/typst-DHCkPAjA.js +1 -0
- package/runtime/frontend/dist/assets/v-BcVCzyr7.js +1 -0
- package/runtime/frontend/dist/assets/vala-CsfeWuGM.js +1 -0
- package/runtime/frontend/dist/assets/vb-D17OF-Vu.js +1 -0
- package/runtime/frontend/dist/assets/verilog-BQ8w6xss.js +1 -0
- package/runtime/frontend/dist/assets/vesper-DU1UobuO.js +1 -0
- package/runtime/frontend/dist/assets/vhdl-CeAyd5Ju.js +1 -0
- package/runtime/frontend/dist/assets/viml-CJc9bBzg.js +1 -0
- package/runtime/frontend/dist/assets/vitesse-black-Bkuqu6BP.js +1 -0
- package/runtime/frontend/dist/assets/vitesse-dark-D0r3Knsf.js +1 -0
- package/runtime/frontend/dist/assets/vitesse-light-CVO1_9PV.js +1 -0
- package/runtime/frontend/dist/assets/vue-D2xRrEX4.js +1 -0
- package/runtime/frontend/dist/assets/vue-html-AaS7Mt5G.js +1 -0
- package/runtime/frontend/dist/assets/vue-vine-BoDAl6tE.js +1 -0
- package/runtime/frontend/dist/assets/vyper-CDx5xZoG.js +1 -0
- package/runtime/frontend/dist/assets/wasm-CG6Dc4jp.js +1 -0
- package/runtime/frontend/dist/assets/wasm-MzD3tlZU.js +1 -0
- package/runtime/frontend/dist/assets/wenyan-BV7otONQ.js +1 -0
- package/runtime/frontend/dist/assets/wgsl-Dx-B1_4e.js +1 -0
- package/runtime/frontend/dist/assets/wikitext-BhOHFoWU.js +1 -0
- package/runtime/frontend/dist/assets/wit-5i3qLPDT.js +1 -0
- package/runtime/frontend/dist/assets/wolfram-lXgVvXCa.js +1 -0
- package/runtime/frontend/dist/assets/xml-sdJ4AIDG.js +1 -0
- package/runtime/frontend/dist/assets/xsl-CtQFsRM5.js +1 -0
- package/runtime/frontend/dist/assets/yaml-Buea-lGh.js +1 -0
- package/runtime/frontend/dist/assets/zenscript-DVFEvuxE.js +1 -0
- package/runtime/frontend/dist/assets/zig-VOosw3JB.js +1 -0
- package/runtime/frontend/dist/favicon.ico +0 -0
- package/runtime/frontend/dist/icon-192.png +0 -0
- package/runtime/frontend/dist/icon-512.png +0 -0
- package/runtime/frontend/dist/icon-maskable-512.png +0 -0
- package/runtime/frontend/dist/icon-maskable.svg +8 -0
- package/runtime/frontend/dist/icon.svg +7 -0
- package/runtime/frontend/dist/index.html +21 -0
- package/runtime/frontend/dist/manifest.webmanifest +1 -0
- package/runtime/frontend/dist/offline.html +54 -0
- package/runtime/frontend/dist/registerSW.js +1 -0
- package/runtime/frontend/dist/sw.js +2 -0
- package/runtime/plugins/damndev/index.js +331 -0
- package/runtime/plugins/damndev/openclaw.plugin.json +24 -0
- package/runtime/plugins/damndev/package.json +6 -0
- package/scripts/postinstall.js +51 -0
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
import crypto from "node:crypto";
|
|
2
|
+
|
|
3
|
+
function readCfg(api) {
|
|
4
|
+
return api.pluginConfig ?? {};
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
function signHmacSha256(rawBody, secret) {
|
|
8
|
+
return `sha256=${crypto.createHmac("sha256", secret).update(rawBody).digest("hex")}`;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function verifyHmacSha256(rawBody, secret, headerValue) {
|
|
12
|
+
if (!secret || !headerValue) return false;
|
|
13
|
+
const expected = crypto.createHmac("sha256", secret).update(rawBody).digest("hex");
|
|
14
|
+
const normalized = headerValue.startsWith("sha256=") ? headerValue.slice(7) : headerValue;
|
|
15
|
+
try {
|
|
16
|
+
const aBuf = Buffer.from(expected, "hex");
|
|
17
|
+
const bBuf = Buffer.from(normalized, "hex");
|
|
18
|
+
return aBuf.length === bBuf.length && crypto.timingSafeEqual(aBuf, bBuf);
|
|
19
|
+
} catch {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function safeJsonParse(raw) {
|
|
25
|
+
try { return raw ? JSON.parse(raw) : {}; } catch { return null; }
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
async function readRawBody(req, maxBytes = 1024 * 1024) {
|
|
29
|
+
let total = 0;
|
|
30
|
+
let raw = "";
|
|
31
|
+
for await (const chunk of req) {
|
|
32
|
+
total += chunk.length;
|
|
33
|
+
if (total > maxBytes) throw new Error("Body too large");
|
|
34
|
+
raw += chunk;
|
|
35
|
+
}
|
|
36
|
+
return raw;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function deriveAgentId(to) {
|
|
40
|
+
if (!to || typeof to !== "string") return null;
|
|
41
|
+
if (to.startsWith("chan_")) return to.slice(5);
|
|
42
|
+
return to;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function buildHookPayload(pcfg, body) {
|
|
46
|
+
const source = body?.source ?? "damndev";
|
|
47
|
+
const userId = body?.userId ?? body?.to ?? "default";
|
|
48
|
+
const text = body?.text ?? body?.message ?? "";
|
|
49
|
+
const agentId = body?.agentId ?? pcfg.defaultAgentId ?? "main";
|
|
50
|
+
const name = body?.name ?? pcfg.defaultName ?? "Damn.dev";
|
|
51
|
+
const sessionPrefix = pcfg.defaultSessionPrefix ?? "damndev:";
|
|
52
|
+
const sessionKey = body?.sessionKey ?? `${sessionPrefix}${source}:${String(userId).replace(/[^a-zA-Z0-9:_-]/g, "_")}`;
|
|
53
|
+
if (!text || typeof text !== "string") throw new Error("Inbound payload must include text or message");
|
|
54
|
+
return {
|
|
55
|
+
message: text, name, agentId, sessionKey,
|
|
56
|
+
wakeMode: body?.wakeMode ?? "now",
|
|
57
|
+
deliver: body?.deliver ?? false,
|
|
58
|
+
channel: body?.channel ?? "damndev",
|
|
59
|
+
to: body?.to ?? userId,
|
|
60
|
+
model: body?.model,
|
|
61
|
+
thinking: body?.thinking,
|
|
62
|
+
timeoutSeconds: body?.timeoutSeconds,
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const PLUGIN_CONFIG_SCHEMA = {
|
|
67
|
+
safeParse(value) {
|
|
68
|
+
if (value === undefined) return { success: true, data: undefined };
|
|
69
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
70
|
+
return { success: false, error: { issues: [{ path: [], message: "expected config object" }] } };
|
|
71
|
+
}
|
|
72
|
+
return { success: true, data: value };
|
|
73
|
+
},
|
|
74
|
+
jsonSchema: {
|
|
75
|
+
type: "object",
|
|
76
|
+
additionalProperties: true,
|
|
77
|
+
properties: {
|
|
78
|
+
webhookUrl: { type: "string" },
|
|
79
|
+
authToken: { type: "string" },
|
|
80
|
+
defaultTo: { type: "string" },
|
|
81
|
+
inboundPath: { type: "string" },
|
|
82
|
+
inboundSharedSecret: { type: "string" },
|
|
83
|
+
hookForwardUrl: { type: "string" },
|
|
84
|
+
hookToken: { type: "string" },
|
|
85
|
+
defaultAgentId: { type: "string" },
|
|
86
|
+
defaultSessionPrefix: { type: "string" },
|
|
87
|
+
defaultName: { type: "string" },
|
|
88
|
+
forwardTimeoutMs: { type: "number" },
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export default {
|
|
94
|
+
id: "damndev",
|
|
95
|
+
name: "Damn.dev Channel",
|
|
96
|
+
description: "Damn.dev workspace messaging channel via HTTP webhooks.",
|
|
97
|
+
version: "0.1.0",
|
|
98
|
+
configSchema: PLUGIN_CONFIG_SCHEMA,
|
|
99
|
+
|
|
100
|
+
register(api) {
|
|
101
|
+
const pcfg = readCfg(api);
|
|
102
|
+
|
|
103
|
+
const channelPlugin = {
|
|
104
|
+
id: "damndev",
|
|
105
|
+
meta: {
|
|
106
|
+
id: "damndev",
|
|
107
|
+
label: "Damn.dev",
|
|
108
|
+
selectionLabel: "Damn.dev App",
|
|
109
|
+
docsPath: "/channels/damndev",
|
|
110
|
+
blurb: "Damn.dev workspace messaging channel.",
|
|
111
|
+
aliases: ["damn", "myapp"],
|
|
112
|
+
},
|
|
113
|
+
capabilities: { chatTypes: ["direct"] },
|
|
114
|
+
status: { skipStaleSocketHealthCheck: true },
|
|
115
|
+
config: {
|
|
116
|
+
listAccountIds: () => ["default"],
|
|
117
|
+
resolveAccount: (_cfg, accountId) => ({
|
|
118
|
+
accountId: accountId ?? "default",
|
|
119
|
+
webhookUrl: pcfg.webhookUrl,
|
|
120
|
+
authToken: pcfg.authToken,
|
|
121
|
+
defaultTo: pcfg.defaultTo,
|
|
122
|
+
}),
|
|
123
|
+
resolveDefaultTo: (_cfg, _accountId) => pcfg.defaultTo ?? "default",
|
|
124
|
+
describeAccount: (account) => {
|
|
125
|
+
if (!account) return null;
|
|
126
|
+
return {
|
|
127
|
+
accountId: account.accountId ?? "default",
|
|
128
|
+
enabled: true,
|
|
129
|
+
mode: "webhook",
|
|
130
|
+
webhookUrl: account.webhookUrl ? "[configured]" : "[missing]",
|
|
131
|
+
authToken: account.authToken ? "[configured]" : "[missing]",
|
|
132
|
+
defaultTo: account.defaultTo ?? null,
|
|
133
|
+
};
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
outbound: {
|
|
137
|
+
deliveryMode: "direct",
|
|
138
|
+
sendText: async ({ cfg, to, text, ...rest }) => {
|
|
139
|
+
const resolvedText = text ?? rest.content ?? rest.message ?? "";
|
|
140
|
+
const webhookUrl = pcfg.webhookUrl;
|
|
141
|
+
const authToken = pcfg.authToken;
|
|
142
|
+
const resolvedTo = to ?? pcfg.defaultTo ?? "default";
|
|
143
|
+
if (!webhookUrl) return { ok: false, error: "damndev webhookUrl not configured" };
|
|
144
|
+
|
|
145
|
+
const agentId = deriveAgentId(resolvedTo);
|
|
146
|
+
const payload = JSON.stringify({
|
|
147
|
+
agent_id: agentId ?? resolvedTo,
|
|
148
|
+
output: resolvedText,
|
|
149
|
+
channel_id: agentId ? `chan_${agentId}` : undefined,
|
|
150
|
+
});
|
|
151
|
+
const headers = { "content-type": "application/json" };
|
|
152
|
+
if (authToken) {
|
|
153
|
+
headers.authorization = `Bearer ${authToken}`;
|
|
154
|
+
headers["x-damndev-signature"] = signHmacSha256(payload, authToken);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
const res = await fetch(webhookUrl, { method: "POST", headers, body: payload });
|
|
158
|
+
if (!res.ok) {
|
|
159
|
+
const body = await res.text().catch(() => "");
|
|
160
|
+
return { ok: false, error: `damndev outbound ${res.status} ${body}`.trim() };
|
|
161
|
+
}
|
|
162
|
+
return { ok: true };
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
api.registerChannel({ plugin: channelPlugin });
|
|
168
|
+
|
|
169
|
+
const backendUrl = pcfg.webhookUrl
|
|
170
|
+
? pcfg.webhookUrl.replace(/\/webhooks\/openclaw$/, '')
|
|
171
|
+
: 'http://host.docker.internal:3001';
|
|
172
|
+
const inboundSecret = pcfg.inboundSharedSecret ?? '';
|
|
173
|
+
|
|
174
|
+
api.registerTool(
|
|
175
|
+
(ctx) => ({
|
|
176
|
+
name: 'skill_exec',
|
|
177
|
+
description: 'Invoke a damn.dev skill by slug. Use this to call any skill (lifelog-today, lifelog-search, lifelog-week, etc.). Returns the skill output as text.',
|
|
178
|
+
parameters: {
|
|
179
|
+
type: 'object',
|
|
180
|
+
properties: {
|
|
181
|
+
slug: { type: 'string', description: 'Skill slug (e.g. lifelog-today, lifelog-search)' },
|
|
182
|
+
args: { type: 'object', description: 'Skill arguments (e.g. { "query": "exercise" })', additionalProperties: true },
|
|
183
|
+
},
|
|
184
|
+
required: ['slug'],
|
|
185
|
+
},
|
|
186
|
+
async execute(_callId, params) {
|
|
187
|
+
const body = JSON.stringify({ slug: params.slug, args: params.args ?? {}, agent_id: ctx.agentId ?? 'unknown' });
|
|
188
|
+
const sig = signHmacSha256(body, inboundSecret);
|
|
189
|
+
try {
|
|
190
|
+
const res = await fetch(`${backendUrl}/skills/exec`, {
|
|
191
|
+
method: 'POST',
|
|
192
|
+
headers: { 'content-type': 'application/json', 'x-damndev-signature': sig },
|
|
193
|
+
body,
|
|
194
|
+
});
|
|
195
|
+
const data = await res.json();
|
|
196
|
+
if (!res.ok) {
|
|
197
|
+
return { content: [{ type: 'text', text: `Error ${res.status}: ${data.error ?? JSON.stringify(data)}` }] };
|
|
198
|
+
}
|
|
199
|
+
return { content: [{ type: 'text', text: data.output ?? '(no output)' }] };
|
|
200
|
+
} catch (err) {
|
|
201
|
+
return { content: [{ type: 'text', text: `skill_exec failed: ${err instanceof Error ? err.message : String(err)}` }] };
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
}),
|
|
205
|
+
{ optional: true },
|
|
206
|
+
);
|
|
207
|
+
|
|
208
|
+
api.registerTool(
|
|
209
|
+
(ctx) => ({
|
|
210
|
+
name: 'shell_exec_guarded',
|
|
211
|
+
description: 'Execute a shell command on the local machine through the damn.dev backend policy engine. Safe commands run immediately. Risky commands are queued for human approval. Always use this tool for shell execution — never use exec, bash, or process directly.',
|
|
212
|
+
parameters: {
|
|
213
|
+
type: 'object',
|
|
214
|
+
properties: {
|
|
215
|
+
command: { type: 'string', description: 'The shell command to run' },
|
|
216
|
+
working_dir: { type: 'string', description: 'Absolute working directory path (optional)' },
|
|
217
|
+
reason: { type: 'string', description: 'Why this command is needed' },
|
|
218
|
+
session_key: { type: 'string', description: 'Current session key for approval routing (optional)' },
|
|
219
|
+
},
|
|
220
|
+
required: ['command'],
|
|
221
|
+
},
|
|
222
|
+
async execute(_callId, params) {
|
|
223
|
+
// ctx.sessionKey is the full OpenClaw session identifier
|
|
224
|
+
// (agent:<id>:openresponses-user:<channelId>). Backend strips the prefix
|
|
225
|
+
// via resolveChannelFromSessionKey() to route approvals to the correct tab.
|
|
226
|
+
// Available in OpenClaw 2026.3.2+ embedded plugin tool contexts.
|
|
227
|
+
const resolvedSessionKey = ctx.sessionKey ?? params.session_key ?? undefined;
|
|
228
|
+
const body = JSON.stringify({
|
|
229
|
+
...params,
|
|
230
|
+
session_key: resolvedSessionKey,
|
|
231
|
+
agent_id: ctx.agentId ?? 'unknown',
|
|
232
|
+
});
|
|
233
|
+
const sig = signHmacSha256(body, inboundSecret);
|
|
234
|
+
try {
|
|
235
|
+
const res = await fetch(`${backendUrl}/skills/plugin-exec`, {
|
|
236
|
+
method: 'POST',
|
|
237
|
+
headers: { 'content-type': 'application/json', 'x-damndev-signature': sig },
|
|
238
|
+
body,
|
|
239
|
+
});
|
|
240
|
+
const data = await res.json();
|
|
241
|
+
if (!res.ok) {
|
|
242
|
+
return { content: [{ type: 'text', text: `Error ${res.status}: ${data.error ?? JSON.stringify(data)}` }] };
|
|
243
|
+
}
|
|
244
|
+
if (data.status === 'pending_approval') {
|
|
245
|
+
return { content: [{ type: 'text', text: data.output }] };
|
|
246
|
+
}
|
|
247
|
+
const out = data.output ?? '(no output)';
|
|
248
|
+
const exitBadge = (data.exitCode ?? 0) === 0 ? 'exit 0' : `exit ${data.exitCode}`;
|
|
249
|
+
return { content: [{ type: 'text', text: `${out}\n\n[${exitBadge} · ${data.durationMs ?? 0}ms]` }] };
|
|
250
|
+
} catch (err) {
|
|
251
|
+
return { content: [{ type: 'text', text: `shell_exec_guarded failed: ${err instanceof Error ? err.message : String(err)}` }] };
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
}),
|
|
255
|
+
{ optional: true },
|
|
256
|
+
);
|
|
257
|
+
|
|
258
|
+
const inboundPath = pcfg.inboundPath ?? "/damndev/webhook";
|
|
259
|
+
api.registerHttpRoute({
|
|
260
|
+
path: inboundPath,
|
|
261
|
+
auth: "plugin",
|
|
262
|
+
handler: async (req, res) => {
|
|
263
|
+
if (req.method !== "POST") {
|
|
264
|
+
res.statusCode = 405;
|
|
265
|
+
res.setHeader("content-type", "application/json");
|
|
266
|
+
res.end(JSON.stringify({ ok: false, error: "Method Not Allowed" }));
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
try {
|
|
271
|
+
const raw = await readRawBody(req);
|
|
272
|
+
const body = safeJsonParse(raw);
|
|
273
|
+
if (!body) {
|
|
274
|
+
res.statusCode = 400;
|
|
275
|
+
res.setHeader("content-type", "application/json");
|
|
276
|
+
res.end(JSON.stringify({ ok: false, error: "Invalid JSON body" }));
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
const providedSig = req.headers["x-damndev-signature"] || req.headers["x-signature"] || "";
|
|
281
|
+
const secret = pcfg.inboundSharedSecret;
|
|
282
|
+
const sig = Array.isArray(providedSig) ? providedSig[0] : providedSig;
|
|
283
|
+
if (!verifyHmacSha256(raw, secret, sig)) {
|
|
284
|
+
res.statusCode = 401;
|
|
285
|
+
res.setHeader("content-type", "application/json");
|
|
286
|
+
res.end(JSON.stringify({ ok: false, error: "Invalid signature" }));
|
|
287
|
+
return;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
const hookForwardUrl = pcfg.hookForwardUrl;
|
|
291
|
+
const hookToken = pcfg.hookToken;
|
|
292
|
+
if (!hookForwardUrl || !hookToken) {
|
|
293
|
+
res.statusCode = 500;
|
|
294
|
+
res.setHeader("content-type", "application/json");
|
|
295
|
+
res.end(JSON.stringify({ ok: false, error: "hookForwardUrl / hookToken not configured" }));
|
|
296
|
+
return;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
const hookPayload = buildHookPayload(pcfg, body);
|
|
300
|
+
const controller = new AbortController();
|
|
301
|
+
const timeout = setTimeout(() => controller.abort(), pcfg.forwardTimeoutMs ?? 30000);
|
|
302
|
+
let hookRes;
|
|
303
|
+
try {
|
|
304
|
+
hookRes = await fetch(hookForwardUrl, {
|
|
305
|
+
method: "POST",
|
|
306
|
+
headers: { "content-type": "application/json", authorization: `Bearer ${hookToken}` },
|
|
307
|
+
body: JSON.stringify(hookPayload),
|
|
308
|
+
signal: controller.signal,
|
|
309
|
+
});
|
|
310
|
+
} finally { clearTimeout(timeout); }
|
|
311
|
+
|
|
312
|
+
const hookText = await hookRes.text().catch(() => "");
|
|
313
|
+
if (!hookRes.ok) {
|
|
314
|
+
res.statusCode = 502;
|
|
315
|
+
res.setHeader("content-type", "application/json");
|
|
316
|
+
res.end(JSON.stringify({ ok: false, error: `hook forward failed: ${hookRes.status}`, upstream: hookText }));
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
res.statusCode = 200;
|
|
321
|
+
res.setHeader("content-type", "application/json");
|
|
322
|
+
res.end(JSON.stringify({ ok: true, forwarded: true }));
|
|
323
|
+
} catch (err) {
|
|
324
|
+
res.statusCode = 500;
|
|
325
|
+
res.setHeader("content-type", "application/json");
|
|
326
|
+
res.end(JSON.stringify({ ok: false, error: err instanceof Error ? err.message : String(err) }));
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
});
|
|
330
|
+
},
|
|
331
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "damndev",
|
|
3
|
+
"name": "Damn.dev Channel",
|
|
4
|
+
"description": "Damn.dev workspace messaging channel via HTTP webhooks.",
|
|
5
|
+
"version": "0.1.0",
|
|
6
|
+
"channels": ["damndev"],
|
|
7
|
+
"configSchema": {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"additionalProperties": true,
|
|
10
|
+
"properties": {
|
|
11
|
+
"webhookUrl": { "type": "string" },
|
|
12
|
+
"authToken": { "type": "string" },
|
|
13
|
+
"defaultTo": { "type": "string" },
|
|
14
|
+
"inboundPath": { "type": "string" },
|
|
15
|
+
"inboundSharedSecret": { "type": "string" },
|
|
16
|
+
"hookForwardUrl": { "type": "string" },
|
|
17
|
+
"hookToken": { "type": "string" },
|
|
18
|
+
"defaultAgentId": { "type": "string" },
|
|
19
|
+
"defaultSessionPrefix": { "type": "string" },
|
|
20
|
+
"defaultName": { "type": "string" },
|
|
21
|
+
"forwardTimeoutMs": { "type": "number" }
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Runs after `npm install -g @damn-dev/cli`. Generates the Prisma client
|
|
3
|
+
// against the bundled schema so the backend can require @prisma/client
|
|
4
|
+
// at runtime without a manual `prisma generate` step.
|
|
5
|
+
//
|
|
6
|
+
// Best-effort: if generation fails (rare — usually missing C++ toolchain
|
|
7
|
+
// for the Prisma engine), we print a clear remediation hint and exit 0 so
|
|
8
|
+
// the overall npm install doesn't fail. The CLI itself will surface the
|
|
9
|
+
// same error at `damn-dev start` if the client is missing, with a pointer
|
|
10
|
+
// to re-run `npm install -g @damn-dev/cli --foreground-scripts`.
|
|
11
|
+
'use strict'
|
|
12
|
+
|
|
13
|
+
const path = require('node:path')
|
|
14
|
+
const fs = require('node:fs')
|
|
15
|
+
const { spawnSync } = require('node:child_process')
|
|
16
|
+
|
|
17
|
+
// When installed as a dependency, __dirname is packages-cli/scripts.
|
|
18
|
+
// When installed globally, __dirname is under the user's npm prefix.
|
|
19
|
+
const SCHEMA_PATH = path.resolve(__dirname, '..', 'runtime', 'backend', 'prisma', 'schema.prisma')
|
|
20
|
+
|
|
21
|
+
if (!fs.existsSync(SCHEMA_PATH)) {
|
|
22
|
+
console.error(`[@damn-dev/cli postinstall] schema.prisma missing at ${SCHEMA_PATH} — skipping prisma generate.`)
|
|
23
|
+
process.exit(0)
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// Skip generate when running inside the monorepo dev install — there the
|
|
27
|
+
// workspace's own prisma client is already generated and we don't want to
|
|
28
|
+
// stomp on it. Heuristic: if a sibling pnpm-workspace.yaml exists two levels
|
|
29
|
+
// up, we're probably in the source repo, not a global install.
|
|
30
|
+
const monorepoMarker = path.resolve(__dirname, '..', '..', '..', 'pnpm-workspace.yaml')
|
|
31
|
+
if (fs.existsSync(monorepoMarker)) {
|
|
32
|
+
console.log('[@damn-dev/cli postinstall] detected monorepo source install — skipping prisma generate.')
|
|
33
|
+
process.exit(0)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
try {
|
|
37
|
+
const prismaBin = require.resolve('prisma/build/index.js')
|
|
38
|
+
console.log('[@damn-dev/cli postinstall] Generating Prisma client...')
|
|
39
|
+
const result = spawnSync(process.execPath, [prismaBin, 'generate', `--schema=${SCHEMA_PATH}`], {
|
|
40
|
+
stdio: 'inherit',
|
|
41
|
+
env: { ...process.env },
|
|
42
|
+
})
|
|
43
|
+
if (result.status !== 0) {
|
|
44
|
+
console.warn('[@damn-dev/cli postinstall] prisma generate exited with code', result.status)
|
|
45
|
+
console.warn('[@damn-dev/cli postinstall] You can re-run manually: npx prisma generate --schema=' + SCHEMA_PATH)
|
|
46
|
+
}
|
|
47
|
+
} catch (err) {
|
|
48
|
+
console.warn('[@damn-dev/cli postinstall] prisma generate failed:', err.message || err)
|
|
49
|
+
console.warn('[@damn-dev/cli postinstall] This usually means the Prisma engine binary could not be downloaded.')
|
|
50
|
+
console.warn('[@damn-dev/cli postinstall] If `damn-dev start` fails, re-run install with --foreground-scripts to see details.')
|
|
51
|
+
}
|