@acryldev/blends 0.0.0-stage → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +73 -0
- package/README.md +424 -2
- package/bin/acrylblends.js +12 -0
- package/dist/index.d.ts +231 -0
- package/dist/index.js +4503 -0
- package/dist/index.js.map +1 -0
- package/docs/framework/LICENSE +23 -0
- package/docs/framework/README.md +70 -0
- package/docs/framework/agents/index.md +59 -0
- package/docs/framework/api/acryl.md +247 -0
- package/docs/framework/api/context.md +478 -0
- package/docs/framework/api/exception.md +80 -0
- package/docs/framework/api/index.md +12 -0
- package/docs/framework/api/presets.md +62 -0
- package/docs/framework/api/request.md +396 -0
- package/docs/framework/api/routing.md +303 -0
- package/docs/framework/api/summary.md +143 -0
- package/docs/framework/concepts/benchmarks.md +26 -0
- package/docs/framework/concepts/developer-experience.md +5 -0
- package/docs/framework/concepts/middleware.md +21 -0
- package/docs/framework/concepts/motivation.md +14 -0
- package/docs/framework/concepts/routers.md +63 -0
- package/docs/framework/concepts/stacks.md +235 -0
- package/docs/framework/concepts/web-standard.md +27 -0
- package/docs/framework/cordis/acryl-in-a-cordis-app.md +160 -0
- package/docs/framework/cordis/concepts.md +105 -0
- package/docs/framework/cordis/middleware.md +8 -0
- package/docs/framework/cordis/migration-from-0-3.md +111 -0
- package/docs/framework/cordis/migration-from-0-4.md +14 -0
- package/docs/framework/cordis/migration-from-dsh-webserver.md +109 -0
- package/docs/framework/cordis/migration-to-1-0.md +46 -0
- package/docs/framework/cordis/mounting.md +85 -0
- package/docs/framework/cordis/node-server.md +100 -0
- package/docs/framework/cordis/plugin-lifecycle.md +111 -0
- package/docs/framework/cordis/surfaces.md +71 -0
- package/docs/framework/cordis/transport-and-cancellation.md +57 -0
- package/docs/framework/cordis/validation.md +135 -0
- package/docs/framework/getting-started/basic.md +201 -0
- package/docs/framework/getting-started/bun.md +219 -0
- package/docs/framework/getting-started/deploy.md +133 -0
- package/docs/framework/getting-started/desktop.md +80 -0
- package/docs/framework/getting-started/nodejs.md +365 -0
- package/docs/framework/getting-started/other-runtimes.md +30 -0
- package/docs/framework/guides/best-practices.md +231 -0
- package/docs/framework/guides/bring-your-own-tool.md +218 -0
- package/docs/framework/guides/client-modules.md +210 -0
- package/docs/framework/guides/create-acrylblends.md +143 -0
- package/docs/framework/guides/data.md +314 -0
- package/docs/framework/guides/examples.md +3 -0
- package/docs/framework/guides/faq.md +19 -0
- package/docs/framework/guides/forms-and-sessions.md +235 -0
- package/docs/framework/guides/helpers.md +33 -0
- package/docs/framework/guides/jsx-dom.md +301 -0
- package/docs/framework/guides/jsx.md +487 -0
- package/docs/framework/guides/middleware.md +253 -0
- package/docs/framework/guides/production.md +80 -0
- package/docs/framework/guides/rpc.md +878 -0
- package/docs/framework/guides/testing.md +133 -0
- package/docs/framework/guides/validation.md +470 -0
- package/docs/framework/helpers/accepts.md +60 -0
- package/docs/framework/helpers/adapter.md +57 -0
- package/docs/framework/helpers/conninfo.md +77 -0
- package/docs/framework/helpers/cookie.md +232 -0
- package/docs/framework/helpers/css.md +282 -0
- package/docs/framework/helpers/dev.md +64 -0
- package/docs/framework/helpers/factory.md +180 -0
- package/docs/framework/helpers/html.md +123 -0
- package/docs/framework/helpers/jwt.md +184 -0
- package/docs/framework/helpers/proxy.md +115 -0
- package/docs/framework/helpers/route.md +143 -0
- package/docs/framework/helpers/ssg.md +390 -0
- package/docs/framework/helpers/streaming.md +224 -0
- package/docs/framework/helpers/testing.md +118 -0
- package/docs/framework/helpers/websocket.md +208 -0
- package/docs/framework/middleware/builtin/basic-auth.md +165 -0
- package/docs/framework/middleware/builtin/bearer-auth.md +138 -0
- package/docs/framework/middleware/builtin/body-limit.md +71 -0
- package/docs/framework/middleware/builtin/cache.md +99 -0
- package/docs/framework/middleware/builtin/combine.md +94 -0
- package/docs/framework/middleware/builtin/compress.md +59 -0
- package/docs/framework/middleware/builtin/context-storage.md +74 -0
- package/docs/framework/middleware/builtin/cors.md +134 -0
- package/docs/framework/middleware/builtin/csrf.md +105 -0
- package/docs/framework/middleware/builtin/etag.md +54 -0
- package/docs/framework/middleware/builtin/ip-restriction.md +69 -0
- package/docs/framework/middleware/builtin/jsx-renderer.md +283 -0
- package/docs/framework/middleware/builtin/jwk.md +192 -0
- package/docs/framework/middleware/builtin/jwt.md +145 -0
- package/docs/framework/middleware/builtin/language.md +232 -0
- package/docs/framework/middleware/builtin/logger.md +74 -0
- package/docs/framework/middleware/builtin/loopback-only.md +31 -0
- package/docs/framework/middleware/builtin/method-not-allowed.md +48 -0
- package/docs/framework/middleware/builtin/method-override.md +80 -0
- package/docs/framework/middleware/builtin/mount.md +103 -0
- package/docs/framework/middleware/builtin/pretty-json.md +53 -0
- package/docs/framework/middleware/builtin/request-id.md +87 -0
- package/docs/framework/middleware/builtin/secure-headers.md +247 -0
- package/docs/framework/middleware/builtin/timeout.md +98 -0
- package/docs/framework/middleware/builtin/timing.md +100 -0
- package/docs/framework/middleware/builtin/trailing-slash.md +74 -0
- package/docs/framework/middleware/third-party.md +4 -0
- package/docs/framework/workshop/README.md +294 -0
- package/docs/framework/workshop/facilitator.md +101 -0
- package/lib/accept-B13wFRkc.js +193 -0
- package/lib/accepts-BN4uue4T.js +52 -0
- package/lib/accepts.d.ts +33 -0
- package/lib/accepts.js +2 -0
- package/lib/acryl-base.d.ts +2 -0
- package/lib/acryl-base.js +2 -0
- package/lib/adapter-Wt9Ntyhx.js +37 -0
- package/lib/adapter.d.ts +12 -0
- package/lib/adapter.js +2 -0
- package/lib/app-CM-rDcw6.js +26 -0
- package/lib/app-DGqSNBSd.d.ts +21 -0
- package/lib/app-base-BwplqlWX.js +332 -0
- package/lib/audit-B2H3sUfg.d.ts +136 -0
- package/lib/base-N-QVQhMZ.d.ts +783 -0
- package/lib/base-kl8P-za0.js +722 -0
- package/lib/basic-auth-ByZGvWGz.js +95 -0
- package/lib/basic-auth-CzulvSad.js +20 -0
- package/lib/basic-auth.d.ts +72 -0
- package/lib/basic-auth.js +2 -0
- package/lib/bearer-auth-CfR6YNqy.js +94 -0
- package/lib/bearer-auth.d.ts +89 -0
- package/lib/bearer-auth.js +2 -0
- package/lib/body-BQ-J23GI.js +94 -0
- package/lib/body-limit-DyO82Wes.js +66 -0
- package/lib/body-limit.d.ts +42 -0
- package/lib/body-limit.js +2 -0
- package/lib/browser/client.js +307 -0
- package/lib/browser/jsx-dom.js +1432 -0
- package/lib/browser/read-sse.js +84 -0
- package/lib/buffer-CWpxJrvI.js +51 -0
- package/lib/bun.d.ts +75 -0
- package/lib/bun.js +134 -0
- package/lib/cache-DllEV7kz.js +169 -0
- package/lib/cache.d.ts +43 -0
- package/lib/cache.js +2 -0
- package/lib/cell-wEBQA3d0.d.ts +32 -0
- package/lib/client-BMFCUlHG.js +143 -0
- package/lib/client-modules-ChLgW0l9.js +267 -0
- package/lib/client.d.ts +3 -0
- package/lib/client.js +3 -0
- package/lib/color-C26GR4OI.js +37 -0
- package/lib/combine-rXRCRMJx.js +137 -0
- package/lib/combine.d.ts +85 -0
- package/lib/combine.js +2 -0
- package/lib/common-CaqP5LIh.d.ts +46 -0
- package/lib/components-BZ8vBk_7.js +268 -0
- package/lib/components-Cq4hcRbo.js +24 -0
- package/lib/compose-DbuvN1rE.js +50 -0
- package/lib/compress-C7QjZM5f.js +11 -0
- package/lib/compress-CdDuP9-S.d.ts +11 -0
- package/lib/compress-T36YxGla.js +79 -0
- package/lib/compress.d.ts +38 -0
- package/lib/compress.js +3 -0
- package/lib/concurrent-B7z-2cwF.js +30 -0
- package/lib/connection-CzRPq1RP.d.ts +25 -0
- package/lib/connection-DLPx5pxD.js +24 -0
- package/lib/conninfo-BbxlV2HK.d.ts +11 -0
- package/lib/conninfo-CNYXEtnA.js +19 -0
- package/lib/conninfo.d.ts +3 -0
- package/lib/conninfo.js +2 -0
- package/lib/constants-D914mQY7.js +7 -0
- package/lib/constants-nJj4XhwC.js +4 -0
- package/lib/constants-vv1oZD_p.js +9 -0
- package/lib/context-BVI2RzT7.js +365 -0
- package/lib/context-Ca3uX_bh.d.ts +1234 -0
- package/lib/context-Dre4P1UW.d.ts +250 -0
- package/lib/context-storage-ClUlVtCZ.js +52 -0
- package/lib/context-storage.d.ts +38 -0
- package/lib/context-storage.js +2 -0
- package/lib/cookie-BqeGZ43j.d.ts +40 -0
- package/lib/cookie-DktnJ0tJ.js +82 -0
- package/lib/cookie-uMH6wAF3.js +125 -0
- package/lib/cookie.d.ts +24 -0
- package/lib/cookie.js +2 -0
- package/lib/cordis/db-sqlite.d.ts +56 -0
- package/lib/cordis/db-sqlite.js +66 -0
- package/lib/cordis/db.d.ts +8 -0
- package/lib/cordis/db.js +1 -0
- package/lib/cordis/door.d.ts +404 -0
- package/lib/cordis/door.js +1812 -0
- package/lib/cordis/inspect.d.ts +77 -0
- package/lib/cordis/inspect.js +149 -0
- package/lib/cordis/kv-db.d.ts +16 -0
- package/lib/cordis/kv-db.js +18 -0
- package/lib/cordis/kv-json.d.ts +16 -0
- package/lib/cordis/kv-json.js +52 -0
- package/lib/cordis/kv.d.ts +8 -0
- package/lib/cordis/kv.js +1 -0
- package/lib/cordis/node-server.d.ts +155 -0
- package/lib/cordis/node-server.js +4 -0
- package/lib/cordis/router-http.d.ts +85 -0
- package/lib/cordis/router-http.js +206 -0
- package/lib/cordis/router.d.ts +7 -0
- package/lib/cordis/router.js +6 -0
- package/lib/cordis/state/react.d.ts +6 -0
- package/lib/cordis/state/react.js +11 -0
- package/lib/cordis/state.d.ts +34 -0
- package/lib/cordis/state.js +527 -0
- package/lib/core-4oDBzv4Q.js +19 -0
- package/lib/cors-C0qqZ-O-.js +106 -0
- package/lib/cors.d.ts +52 -0
- package/lib/cors.js +2 -0
- package/lib/crypto-ciSjk9n3.js +34 -0
- package/lib/csrf-rMr2nM2c.js +101 -0
- package/lib/csrf.d.ts +75 -0
- package/lib/csrf.js +2 -0
- package/lib/css-Bd6tj88A.js +320 -0
- package/lib/css-CLgKjBuO.js +134 -0
- package/lib/css.d.ts +82 -0
- package/lib/css.js +3 -0
- package/lib/database-CyKvumAn.d.ts +44 -0
- package/lib/db/conformance.d.ts +15 -0
- package/lib/db/conformance.js +279 -0
- package/lib/db/sqlite.d.ts +3 -0
- package/lib/db/sqlite.js +2 -0
- package/lib/db.d.ts +3 -0
- package/lib/db.js +2 -0
- package/lib/dev-h25puJmg.js +50 -0
- package/lib/dev.d.ts +19 -0
- package/lib/dev.js +2 -0
- package/lib/dom-MsnhZjjn.js +74 -0
- package/lib/door/host.d.ts +24 -0
- package/lib/door/host.js +2 -0
- package/lib/door/page.d.ts +160 -0
- package/lib/door/page.js +1257 -0
- package/lib/door/protocol.d.ts +2 -0
- package/lib/door/protocol.js +2 -0
- package/lib/drivers.d.ts +77 -0
- package/lib/drivers.js +16 -0
- package/lib/encode-BbgU91Gc.js +33 -0
- package/lib/etag-DevxEjyU.js +135 -0
- package/lib/etag.d.ts +40 -0
- package/lib/etag.js +2 -0
- package/lib/factory-d6WBwm2j.js +30 -0
- package/lib/factory.d.ts +35 -0
- package/lib/factory.js +2 -0
- package/lib/handler-DXCHa3NV.js +12 -0
- package/lib/headers-DbujLUIi.d.ts +11 -0
- package/lib/helpers-qmReU164.js +5 -0
- package/lib/hooks-Bs7lFRjW.js +762 -0
- package/lib/html-1jTa7KN1.js +103 -0
- package/lib/html-CNr9FLdV.d.ts +46 -0
- package/lib/html-CoWdxS1u.js +31 -0
- package/lib/html.d.ts +3 -0
- package/lib/html.js +3 -0
- package/lib/http-exception-BKMYq4x6.js +54 -0
- package/lib/http-exception-Cm8QD9Fl.d.ts +57 -0
- package/lib/http-exception.d.ts +2 -0
- package/lib/http-exception.js +2 -0
- package/lib/http-status-uBFmbzzM.d.ts +35 -0
- package/lib/index-B_g6ECnm.d.ts +57 -0
- package/lib/index-BaOiJMWK.d.ts +31 -0
- package/lib/index-C5RhEyXO.d.ts +45 -0
- package/lib/index-C8xOqNUW.d.ts +71 -0
- package/lib/index-D1HlwHSL.d.ts +129 -0
- package/lib/index-DUYLk7OD.d.ts +44 -0
- package/lib/index-DYBSr8yW.d.ts +156 -0
- package/lib/index-Dv4qFsro.d.ts +94 -0
- package/lib/index-jdWVs88B.d.ts +6 -0
- package/lib/index.d.ts +4 -0
- package/lib/index.js +4 -0
- package/lib/ip-restriction-C4TZKPKl.js +166 -0
- package/lib/ip-restriction.d.ts +68 -0
- package/lib/ip-restriction.js +2 -0
- package/lib/ipaddr-CTeN6kNw.js +238 -0
- package/lib/jsx/dom/client.d.ts +30 -0
- package/lib/jsx/dom/client.js +49 -0
- package/lib/jsx/dom/css.d.ts +84 -0
- package/lib/jsx/dom/css.js +2 -0
- package/lib/jsx/dom/jsx-dev-runtime.d.ts +3 -0
- package/lib/jsx/dom/jsx-dev-runtime.js +2 -0
- package/lib/jsx/dom/jsx-runtime.d.ts +3 -0
- package/lib/jsx/dom/jsx-runtime.js +3 -0
- package/lib/jsx/dom/server.d.ts +105 -0
- package/lib/jsx/dom/server.js +37 -0
- package/lib/jsx/dom.d.ts +5 -0
- package/lib/jsx/dom.js +6 -0
- package/lib/jsx/jsx-dev-runtime.d.ts +3 -0
- package/lib/jsx/jsx-dev-runtime.js +3 -0
- package/lib/jsx/jsx-runtime.d.ts +10 -0
- package/lib/jsx/jsx-runtime.js +30 -0
- package/lib/jsx/streaming.d.ts +2 -0
- package/lib/jsx/streaming.js +2 -0
- package/lib/jsx-C5-YJG0l.js +47 -0
- package/lib/jsx-dev-runtime-CPsrmbgy.d.ts +7 -0
- package/lib/jsx-dev-runtime-Cs-uV30u.js +14 -0
- package/lib/jsx-dev-runtime-DK4z4RD3.js +354 -0
- package/lib/jsx-dev-runtime-DSQ8vSCY.d.ts +6 -0
- package/lib/jsx-renderer-B2wHa9Y8.js +99 -0
- package/lib/jsx-renderer.d.ts +75 -0
- package/lib/jsx-renderer.js +2 -0
- package/lib/jsx-runtime-BVVgDSdq.d.ts +1 -0
- package/lib/jsx-runtime-brX0UliB.js +2 -0
- package/lib/jsx.d.ts +3 -0
- package/lib/jsx.js +6 -0
- package/lib/jwk-BbiXIYhg.js +117 -0
- package/lib/jwk.d.ts +52 -0
- package/lib/jwk.js +2 -0
- package/lib/jwt-BCS5hH1O.d.ts +51 -0
- package/lib/jwt-Culfq-8m.js +403 -0
- package/lib/jwt-DaOoWaF3.js +115 -0
- package/lib/jwt.d.ts +72 -0
- package/lib/jwt.js +3 -0
- package/lib/kv/conformance.d.ts +17 -0
- package/lib/kv/conformance.js +313 -0
- package/lib/kv/db.d.ts +3 -0
- package/lib/kv/db.js +2 -0
- package/lib/kv/json.d.ts +3 -0
- package/lib/kv/json.js +2 -0
- package/lib/kv-Kv6J9zqu.d.ts +39 -0
- package/lib/kv.d.ts +3 -0
- package/lib/kv.js +2 -0
- package/lib/language-anRiLd9a.js +198 -0
- package/lib/language.d.ts +88 -0
- package/lib/language.js +2 -0
- package/lib/linear-router-BUrYQxcv.js +96 -0
- package/lib/logger-CLvaB463.js +54 -0
- package/lib/logger.d.ts +22 -0
- package/lib/logger.js +2 -0
- package/lib/loopback-only-0nTL30Zt.js +131 -0
- package/lib/loopback-only.d.ts +73 -0
- package/lib/loopback-only.js +2 -0
- package/lib/method-not-allowed-B3nMAp1f.js +82 -0
- package/lib/method-not-allowed.d.ts +47 -0
- package/lib/method-not-allowed.js +2 -0
- package/lib/method-override-Dhd_EJD9.js +103 -0
- package/lib/method-override.d.ts +46 -0
- package/lib/method-override.js +2 -0
- package/lib/middleware-B8gJUDgl.js +12 -0
- package/lib/mime-B9GbsqnN.d.ts +72 -0
- package/lib/mime-C-r9WxjH.js +77 -0
- package/lib/mount-RGiNYj2l.js +67 -0
- package/lib/mount.d.ts +44 -0
- package/lib/mount.js +2 -0
- package/lib/node-server/conninfo.d.ts +2 -0
- package/lib/node-server/conninfo.js +2 -0
- package/lib/node-server/register.d.ts +1 -0
- package/lib/node-server/register.js +59 -0
- package/lib/node-server/serve-static.d.ts +2 -0
- package/lib/node-server/serve-static.js +2 -0
- package/lib/node-server.d.ts +134 -0
- package/lib/node-server.js +5 -0
- package/lib/open-BC_BGIQt.d.ts +12 -0
- package/lib/open-BpnCtiKf.js +224 -0
- package/lib/open-CEE2hyrs.d.ts +11 -0
- package/lib/open-CwA_ZiPl.js +57 -0
- package/lib/open-DFt0lT26.js +197 -0
- package/lib/open-DXxlFxS0.d.ts +27 -0
- package/lib/pattern-router-DlkDNR9e.js +41 -0
- package/lib/powered-by-B9ufDvKH.js +24 -0
- package/lib/powered-by.d.ts +28 -0
- package/lib/powered-by.js +2 -0
- package/lib/pretty-json-B_5MzYgk.js +39 -0
- package/lib/pretty-json.d.ts +40 -0
- package/lib/pretty-json.js +2 -0
- package/lib/protocol-8HjYa5OX.js +217 -0
- package/lib/protocol-DdQgl224.d.ts +160 -0
- package/lib/proxy-C02n8qaX.js +121 -0
- package/lib/proxy.d.ts +72 -0
- package/lib/proxy.js +2 -0
- package/lib/quick.d.ts +8 -0
- package/lib/quick.js +17 -0
- package/lib/read-sse.d.ts +33 -0
- package/lib/read-sse.js +84 -0
- package/lib/reg-exp-router-DT_H6W_j.js +363 -0
- package/lib/request-PoZjfrb4.js +323 -0
- package/lib/request-id-CWyCgzyD.js +34 -0
- package/lib/request-id.d.ts +45 -0
- package/lib/request-id.js +2 -0
- package/lib/request.d.ts +2 -0
- package/lib/request.js +2 -0
- package/lib/route-D1WQ4cOh.js +126 -0
- package/lib/route.d.ts +78 -0
- package/lib/route.js +2 -0
- package/lib/router/linear-router.d.ts +11 -0
- package/lib/router/linear-router.js +2 -0
- package/lib/router/pattern-router.d.ts +11 -0
- package/lib/router/pattern-router.js +2 -0
- package/lib/router/reg-exp-router.d.ts +35 -0
- package/lib/router/reg-exp-router.js +2 -0
- package/lib/router/smart-router.d.ts +15 -0
- package/lib/router/smart-router.js +2 -0
- package/lib/router/trie-router.d.ts +11 -0
- package/lib/router/trie-router.js +2 -0
- package/lib/router-0TlTAMdt.d.ts +99 -0
- package/lib/router-wWGf3FlK.js +35 -0
- package/lib/router.d.ts +2 -0
- package/lib/router.js +2 -0
- package/lib/schema-validator-DGAFbTcN.js +22 -0
- package/lib/schema-validator.d.ts +54 -0
- package/lib/schema-validator.js +2 -0
- package/lib/secure-headers-eLrZcjSr.js +163 -0
- package/lib/secure-headers.d.ts +125 -0
- package/lib/secure-headers.js +2 -0
- package/lib/serve-static-D97E4ERX.d.ts +18 -0
- package/lib/serve-static-YoUetEZ8.js +212 -0
- package/lib/serve-static-cnLZvaYu.js +77 -0
- package/lib/serve-static.d.ts +2 -0
- package/lib/serve-static.js +2 -0
- package/lib/smart-router-BF56Yf23.js +49 -0
- package/lib/snapshot-text-Cyl69OKv.js +597 -0
- package/lib/src-6T1gCSq3.js +427 -0
- package/lib/src-BycZ1HUQ.js +407 -0
- package/lib/src-CZ1JoBaO.js +90 -0
- package/lib/src-C_00jcuj.js +85 -0
- package/lib/ssg-D_StqyTO.js +389 -0
- package/lib/ssg.d.ts +2 -0
- package/lib/ssg.js +2 -0
- package/lib/stream-CJ_0BMG2.js +88 -0
- package/lib/stream-Oxo9JHC6.d.ts +34 -0
- package/lib/streaming-CL2i3hX_.js +96 -0
- package/lib/streaming.d.ts +23 -0
- package/lib/streaming.js +2 -0
- package/lib/testing-DnLmBGle.js +17 -0
- package/lib/testing.d.ts +10 -0
- package/lib/testing.js +2 -0
- package/lib/timeout-Bib1sxFc.js +42 -0
- package/lib/timeout.d.ts +30 -0
- package/lib/timeout.js +2 -0
- package/lib/timing-CkkBmV23.js +183 -0
- package/lib/timing.d.ts +130 -0
- package/lib/timing.js +2 -0
- package/lib/tiny.d.ts +8 -0
- package/lib/tiny.js +15 -0
- package/lib/trailing-slash-qJLAJrAH.js +85 -0
- package/lib/trailing-slash.d.ts +91 -0
- package/lib/trailing-slash.js +2 -0
- package/lib/transpile-Bc6rZPK-.js +105 -0
- package/lib/trie-router-DhF3wn5_.js +146 -0
- package/lib/types-Zy1OzMX7.d.ts +29 -0
- package/lib/types-akvg9vbH.d.ts +40 -0
- package/lib/types-cu7acft5.d.ts +195 -0
- package/lib/types-nO2Jov17.d.ts +114 -0
- package/lib/types.d.ts +2 -0
- package/lib/types.js +4 -0
- package/lib/upgrade-hub-7og-sHcQ.d.ts +138 -0
- package/lib/upgrade-hub-B4hca91Y.js +1554 -0
- package/lib/url-Cyyh7Fiw.js +197 -0
- package/lib/utils/accept.d.ts +9 -0
- package/lib/utils/accept.js +2 -0
- package/lib/utils/basic-auth.d.ts +8 -0
- package/lib/utils/basic-auth.js +2 -0
- package/lib/utils/body.d.ts +2 -0
- package/lib/utils/body.js +2 -0
- package/lib/utils/buffer.d.ts +19 -0
- package/lib/utils/buffer.js +2 -0
- package/lib/utils/color.d.ts +24 -0
- package/lib/utils/color.js +2 -0
- package/lib/utils/compress.d.ts +2 -0
- package/lib/utils/compress.js +2 -0
- package/lib/utils/concurrent.d.ts +17 -0
- package/lib/utils/concurrent.js +2 -0
- package/lib/utils/constants.d.ts +7 -0
- package/lib/utils/constants.js +2 -0
- package/lib/utils/cookie.d.ts +2 -0
- package/lib/utils/cookie.js +2 -0
- package/lib/utils/crypto.d.ts +14 -0
- package/lib/utils/crypto.js +2 -0
- package/lib/utils/encode.d.ts +11 -0
- package/lib/utils/encode.js +2 -0
- package/lib/utils/filepath.d.ts +14 -0
- package/lib/utils/filepath.js +25 -0
- package/lib/utils/handler.d.ts +9 -0
- package/lib/utils/handler.js +2 -0
- package/lib/utils/headers.d.ts +2 -0
- package/lib/utils/headers.js +1 -0
- package/lib/utils/html.d.ts +2 -0
- package/lib/utils/html.js +2 -0
- package/lib/utils/http-status.d.ts +2 -0
- package/lib/utils/http-status.js +1 -0
- package/lib/utils/ipaddr.d.ts +56 -0
- package/lib/utils/ipaddr.js +2 -0
- package/lib/utils/jwt.d.ts +24 -0
- package/lib/utils/jwt.js +2 -0
- package/lib/utils/mime.d.ts +2 -0
- package/lib/utils/mime.js +2 -0
- package/lib/utils/stream.d.ts +2 -0
- package/lib/utils/stream.js +2 -0
- package/lib/utils/types.d.ts +2 -0
- package/lib/utils/types.js +1 -0
- package/lib/utils/url.d.ts +46 -0
- package/lib/utils/url.js +2 -0
- package/lib/utils-CYdUlhw1.js +125 -0
- package/lib/utils-CnUrxRO-.js +4 -0
- package/lib/validator-DkpCsiJC.js +65 -0
- package/lib/validator.d.ts +42 -0
- package/lib/validator.js +2 -0
- package/lib/vitest-binding-CctNu3jT.d.ts +15 -0
- package/lib/vitest-binding-CrH7rKg2.js +17 -0
- package/lib/websocket-Cy4jtqHv.js +56 -0
- package/lib/ws.d.ts +2 -0
- package/lib/ws.js +2 -0
- package/package.json +463 -3
- package/plugins/agent/LICENSE +21 -0
- package/plugins/agent/agent.ts +229 -0
- package/plugins/agent/index.ts +20 -0
- package/plugins/agent/memory.ts +24 -0
- package/plugins/agent/model.ts +94 -0
- package/plugins/agent/package.json +41 -0
- package/plugins/agent/plugin.json +13 -0
- package/plugins/agent/tools.ts +67 -0
- package/plugins/agent-panel/LICENSE +21 -0
- package/plugins/agent-panel/client/describe.ts +101 -0
- package/plugins/agent-panel/client/driver-pick.ts +22 -0
- package/plugins/agent-panel/client/frame.ts +51 -0
- package/plugins/agent-panel/client/main.ts +707 -0
- package/plugins/agent-panel/client/markdown.ts +219 -0
- package/plugins/agent-panel/headless.ts +220 -0
- package/plugins/agent-panel/index.ts +523 -0
- package/plugins/agent-panel/launch.ts +67 -0
- package/plugins/agent-panel/mount.ts +27 -0
- package/plugins/agent-panel/package.json +69 -0
- package/plugins/agent-panel/plugin.json +28 -0
- package/plugins/agent-panel/registry.ts +17 -0
- package/plugins/agent-panel/visitors.ts +231 -0
- package/plugins/app-settings/LICENSE +21 -0
- package/plugins/app-settings/index.ts +270 -0
- package/plugins/app-settings/merge.ts +79 -0
- package/plugins/app-settings/package.json +45 -0
- package/plugins/app-settings/plugin.json +16 -0
- package/plugins/builder/LICENSE +21 -0
- package/plugins/builder/index.ts +171 -0
- package/plugins/builder/package.json +52 -0
- package/plugins/builder/plugin.json +17 -0
- package/plugins/builder/script.ts +158 -0
- package/plugins/db/LICENSE +47 -0
- package/plugins/db/package.json +67 -0
- package/plugins/db/plugin.json +25 -0
- package/plugins/db/src/conformance.ts +224 -0
- package/plugins/db/src/cordis.ts +13 -0
- package/plugins/db/src/facade/database.ts +41 -0
- package/plugins/db/src/facade/migrations.ts +50 -0
- package/plugins/db/src/facade/schema.ts +9 -0
- package/plugins/db/src/index.ts +19 -0
- package/plugins/db/src/migration-files.ts +31 -0
- package/plugins/db-sqlite/LICENSE +47 -0
- package/plugins/db-sqlite/package.json +89 -0
- package/plugins/db-sqlite/plugin.json +29 -0
- package/plugins/db-sqlite/src/facade/node.ts +199 -0
- package/plugins/db-sqlite/src/index.ts +95 -0
- package/plugins/db-sqlite/src/open.ts +61 -0
- package/plugins/desktop-shell/LICENSE +21 -0
- package/plugins/desktop-shell/app-page.ts +151 -0
- package/plugins/desktop-shell/app-root.ts +19 -0
- package/plugins/desktop-shell/assets/acrylblends-logo.png +0 -0
- package/plugins/desktop-shell/attach.ts +72 -0
- package/plugins/desktop-shell/bin.ts +5 -0
- package/plugins/desktop-shell/brand.ts +166 -0
- package/plugins/desktop-shell/door-shell.ts +385 -0
- package/plugins/desktop-shell/frame.ts +317 -0
- package/plugins/desktop-shell/git.ts +44 -0
- package/plugins/desktop-shell/host-supervisor.ts +63 -0
- package/plugins/desktop-shell/launch.ts +106 -0
- package/plugins/desktop-shell/main.ts +545 -0
- package/plugins/desktop-shell/menu.ts +60 -0
- package/plugins/desktop-shell/package.json +58 -0
- package/plugins/desktop-shell/plugin.json +20 -0
- package/plugins/desktop-shell/preload.cjs +8 -0
- package/plugins/desktop-shell/product.ts +164 -0
- package/plugins/desktop-shell/shutdown.ts +177 -0
- package/plugins/desktop-shell/update-menu.ts +126 -0
- package/plugins/desktop-shell/updater.ts +228 -0
- package/plugins/desktop-shell/user-data.ts +38 -0
- package/plugins/desktop-shell/watch-host.d.mts +10 -0
- package/plugins/desktop-shell/watch-host.mjs +130 -0
- package/plugins/desktop-shell/window.ts +119 -0
- package/plugins/desktop-web/LICENSE +21 -0
- package/plugins/desktop-web/app-root.ts +12 -0
- package/plugins/desktop-web/launch.ts +54 -0
- package/plugins/desktop-web/main.ts +108 -0
- package/plugins/desktop-web/package.json +49 -0
- package/plugins/desktop-web/plugin.json +21 -0
- package/plugins/desktop-web/shutdown.ts +177 -0
- package/plugins/desktop-web/user-data.ts +38 -0
- package/plugins/desktop-web/window.ts +29 -0
- package/plugins/door/LICENSE +47 -0
- package/plugins/door/package.json +116 -0
- package/plugins/door/plugin.json +39 -0
- package/plugins/door/src/cli/acryl.ts +335 -0
- package/plugins/door/src/host/api.ts +9 -0
- package/plugins/door/src/host/audit.ts +64 -0
- package/plugins/door/src/host/channel.ts +407 -0
- package/plugins/door/src/host/chat-tools.ts +76 -0
- package/plugins/door/src/host/door-file.ts +99 -0
- package/plugins/door/src/host/door.ts +492 -0
- package/plugins/door/src/host/http.ts +80 -0
- package/plugins/door/src/host/mcp-routes.ts +83 -0
- package/plugins/door/src/host/operator-routes.ts +58 -0
- package/plugins/door/src/host/page-routes.ts +69 -0
- package/plugins/door/src/host/page-socket.ts +88 -0
- package/plugins/door/src/host/shell.ts +147 -0
- package/plugins/door/src/host/shim.ts +125 -0
- package/plugins/door/src/host/verbs.ts +160 -0
- package/plugins/door/src/index.ts +337 -0
- package/plugins/door/src/page/api.ts +9 -0
- package/plugins/door/src/page/base.ts +32 -0
- package/plugins/door/src/page/channel.ts +209 -0
- package/plugins/door/src/page/driver/accessibility.ts +177 -0
- package/plugins/door/src/page/driver/actions.ts +207 -0
- package/plugins/door/src/page/driver/driver.ts +216 -0
- package/plugins/door/src/page/driver/ref-table.ts +78 -0
- package/plugins/door/src/page/driver/sensitivity.ts +85 -0
- package/plugins/door/src/page/driver/snapshot.ts +135 -0
- package/plugins/door/src/page/index.ts +100 -0
- package/plugins/door/src/page/indicator.ts +80 -0
- package/plugins/door/src/page/main.ts +7 -0
- package/plugins/door/src/page/outline.ts +56 -0
- package/plugins/door/src/page/protocol.ts +233 -0
- package/plugins/door/src/page/snapshot-text.ts +19 -0
- package/plugins/door/src/page/socket-source.ts +75 -0
- package/plugins/door/src/page/user-input.ts +24 -0
- package/plugins/door/src/shell/protocol.ts +133 -0
- package/plugins/driver-acp/LICENSE +21 -0
- package/plugins/driver-acp/README.md +53 -0
- package/plugins/driver-acp/chat.ts +258 -0
- package/plugins/driver-acp/connection.ts +239 -0
- package/plugins/driver-acp/index.ts +67 -0
- package/plugins/driver-acp/package.json +52 -0
- package/plugins/driver-acp/plugin.json +15 -0
- package/plugins/driver-acp/provenance.json +20 -0
- package/plugins/driver-pty/LICENSE +21 -0
- package/plugins/driver-pty/client/terminal.ts +191 -0
- package/plugins/driver-pty/client/vendor/LICENSE +21 -0
- package/plugins/driver-pty/client/vendor/LICENSE-addon-fit +19 -0
- package/plugins/driver-pty/client/vendor/VERSION +4 -0
- package/plugins/driver-pty/client/vendor/addon-fit.d.mts +6 -0
- package/plugins/driver-pty/client/vendor/addon-fit.mjs +18 -0
- package/plugins/driver-pty/client/vendor/xterm-css.d.mts +2 -0
- package/plugins/driver-pty/client/vendor/xterm-css.mjs +2 -0
- package/plugins/driver-pty/client/vendor/xterm.d.mts +17 -0
- package/plugins/driver-pty/client/vendor/xterm.mjs +53 -0
- package/plugins/driver-pty/index.ts +280 -0
- package/plugins/driver-pty/package.json +55 -0
- package/plugins/driver-pty/plugin.json +16 -0
- package/plugins/driver-pty/spawn.ts +74 -0
- package/plugins/driver-pty/terminal.ts +86 -0
- package/plugins/drivers/LICENSE +21 -0
- package/plugins/drivers/index.ts +75 -0
- package/plugins/drivers/package.json +37 -0
- package/plugins/drivers/plugin.json +11 -0
- package/plugins/extensions/LICENSE +21 -0
- package/plugins/extensions/browser.ts +100 -0
- package/plugins/extensions/index.ts +991 -0
- package/plugins/extensions/ledger.ts +39 -0
- package/plugins/extensions/package.json +48 -0
- package/plugins/extensions/plugin-store.ts +27 -0
- package/plugins/extensions/plugin.json +15 -0
- package/plugins/extensions/resolve.ts +169 -0
- package/plugins/extensions/routes.ts +92 -0
- package/plugins/extensions/stage.ts +82 -0
- package/plugins/feedback/LICENSE +21 -0
- package/plugins/feedback/client.d.ts +22 -0
- package/plugins/feedback/client.js +471 -0
- package/plugins/feedback/index.ts +143 -0
- package/plugins/feedback/package.json +44 -0
- package/plugins/feedback/plugin.json +14 -0
- package/plugins/feedback/store.ts +307 -0
- package/plugins/home/LICENSE +21 -0
- package/plugins/home/index.ts +124 -0
- package/plugins/home/package.json +41 -0
- package/plugins/home/plugin.json +14 -0
- package/plugins/inspect/LICENSE +21 -0
- package/plugins/inspect/package.json +84 -0
- package/plugins/inspect/plugin.json +24 -0
- package/plugins/inspect/src/index.ts +3 -0
- package/plugins/inspect/src/report.ts +131 -0
- package/plugins/inspect/src/service.ts +68 -0
- package/plugins/instance/LICENSE +21 -0
- package/plugins/instance/archive.ts +395 -0
- package/plugins/instance/bundle-overlay.ts +10 -0
- package/plugins/instance/bundle.ts +230 -0
- package/plugins/instance/home.ts +395 -0
- package/plugins/instance/index.ts +284 -0
- package/plugins/instance/package.json +61 -0
- package/plugins/instance/plugin.json +16 -0
- package/plugins/instance/storage.ts +463 -0
- package/plugins/kv/LICENSE +47 -0
- package/plugins/kv/package.json +67 -0
- package/plugins/kv/plugin.json +26 -0
- package/plugins/kv/src/check.ts +58 -0
- package/plugins/kv/src/conformance.ts +226 -0
- package/plugins/kv/src/copy.ts +39 -0
- package/plugins/kv/src/cordis.ts +13 -0
- package/plugins/kv/src/index.ts +14 -0
- package/plugins/kv/src/kv.ts +37 -0
- package/plugins/kv-db/LICENSE +47 -0
- package/plugins/kv-db/package.json +91 -0
- package/plugins/kv-db/plugin.json +31 -0
- package/plugins/kv-db/src/index.ts +37 -0
- package/plugins/kv-db/src/open.ts +80 -0
- package/plugins/kv-json/LICENSE +47 -0
- package/plugins/kv-json/package.json +89 -0
- package/plugins/kv-json/plugin.json +29 -0
- package/plugins/kv-json/src/index.ts +78 -0
- package/plugins/kv-json/src/open.ts +249 -0
- package/plugins/manifest/LICENSE +21 -0
- package/plugins/manifest/app-plugins.ts +86 -0
- package/plugins/manifest/index.ts +645 -0
- package/plugins/manifest/lock.ts +115 -0
- package/plugins/manifest/package.json +57 -0
- package/plugins/manifest/plugin.json +19 -0
- package/plugins/manifest/snapshot.ts +275 -0
- package/plugins/manifest/upgrade-cli.ts +70 -0
- package/plugins/manifest/upgrade.ts +97 -0
- package/plugins/node-server/LICENSE +47 -0
- package/plugins/node-server/package.json +94 -0
- package/plugins/node-server/plugin.json +32 -0
- package/plugins/node-server/src/adapter/conninfo.ts +23 -0
- package/plugins/node-server/src/adapter/early-hints.ts +55 -0
- package/plugins/node-server/src/adapter/error.ts +11 -0
- package/plugins/node-server/src/adapter/headers.ts +249 -0
- package/plugins/node-server/src/adapter/index.ts +6 -0
- package/plugins/node-server/src/adapter/listener.ts +549 -0
- package/plugins/node-server/src/adapter/raw.ts +18 -0
- package/plugins/node-server/src/adapter/request.ts +798 -0
- package/plugins/node-server/src/adapter/response.ts +186 -0
- package/plugins/node-server/src/adapter/serve-static.ts +238 -0
- package/plugins/node-server/src/adapter/server.ts +59 -0
- package/plugins/node-server/src/adapter/types.ts +94 -0
- package/plugins/node-server/src/adapter/url.ts +42 -0
- package/plugins/node-server/src/adapter/utils/response/constants.ts +1 -0
- package/plugins/node-server/src/adapter/utils/response.ts +4 -0
- package/plugins/node-server/src/adapter/utils/stream.ts +88 -0
- package/plugins/node-server/src/adapter/utils.ts +96 -0
- package/plugins/node-server/src/adapter/websocket-types.ts +49 -0
- package/plugins/node-server/src/adapter/websocket.ts +409 -0
- package/plugins/node-server/src/client-modules.ts +300 -0
- package/plugins/node-server/src/index.ts +440 -0
- package/plugins/node-server/src/register.ts +65 -0
- package/plugins/node-server/src/test-websocket.ts +110 -0
- package/plugins/node-server/src/transpile.ts +139 -0
- package/plugins/node-server/src/upgrade-hub.ts +152 -0
- package/plugins/openai/LICENSE +21 -0
- package/plugins/openai/index.ts +218 -0
- package/plugins/openai/package.json +43 -0
- package/plugins/openai/plugin.json +14 -0
- package/plugins/openai/prompt.ts +60 -0
- package/plugins/page/package.json +51 -0
- package/plugins/page/plugin.json +16 -0
- package/plugins/page/src/favicon.ts +19 -0
- package/plugins/page/src/index.ts +168 -0
- package/plugins/plugin-share/LICENSE +21 -0
- package/plugins/plugin-share/README.md +86 -0
- package/plugins/plugin-share/index.ts +791 -0
- package/plugins/plugin-share/native.ts +290 -0
- package/plugins/plugin-share/package.json +54 -0
- package/plugins/plugin-share/package.ts +186 -0
- package/plugins/plugin-share/plugin.json +19 -0
- package/plugins/plugin-share/publish.ts +79 -0
- package/plugins/plugin-share/pull-check.ts +142 -0
- package/plugins/plugin-share/pull-list.ts +71 -0
- package/plugins/plugin-share/pulled-records.ts +70 -0
- package/plugins/router/LICENSE +47 -0
- package/plugins/router/package.json +118 -0
- package/plugins/router/plugin.json +31 -0
- package/plugins/router/src/browser/client.ts +3 -0
- package/plugins/router/src/browser/jsx-dom.ts +9 -0
- package/plugins/router/src/browser/read-sse.ts +3 -0
- package/plugins/router/src/client.ts +2 -0
- package/plugins/router/src/connection.ts +42 -0
- package/plugins/router/src/core/adapter/aws-lambda/conninfo.ts +73 -0
- package/plugins/router/src/core/adapter/aws-lambda/handler.ts +682 -0
- package/plugins/router/src/core/adapter/aws-lambda/index.ts +14 -0
- package/plugins/router/src/core/adapter/aws-lambda/types.ts +173 -0
- package/plugins/router/src/core/adapter/bun/conninfo.ts +43 -0
- package/plugins/router/src/core/adapter/bun/index.ts +11 -0
- package/plugins/router/src/core/adapter/bun/serve-static.ts +32 -0
- package/plugins/router/src/core/adapter/bun/server.ts +14 -0
- package/plugins/router/src/core/adapter/bun/ssg.ts +26 -0
- package/plugins/router/src/core/adapter/bun/websocket.ts +113 -0
- package/plugins/router/src/core/adapter/cloudflare-pages/conninfo.ts +26 -0
- package/plugins/router/src/core/adapter/cloudflare-pages/handler.ts +122 -0
- package/plugins/router/src/core/adapter/cloudflare-pages/index.ts +11 -0
- package/plugins/router/src/core/adapter/cloudflare-workers/conninfo.ts +7 -0
- package/plugins/router/src/core/adapter/cloudflare-workers/index.ts +8 -0
- package/plugins/router/src/core/adapter/cloudflare-workers/serve-static-module.ts +12 -0
- package/plugins/router/src/core/adapter/cloudflare-workers/serve-static.ts +41 -0
- package/plugins/router/src/core/adapter/cloudflare-workers/utils.ts +50 -0
- package/plugins/router/src/core/adapter/cloudflare-workers/websocket.ts +52 -0
- package/plugins/router/src/core/adapter/lambda-edge/conninfo.ts +15 -0
- package/plugins/router/src/core/adapter/lambda-edge/handler.ts +239 -0
- package/plugins/router/src/core/adapter/lambda-edge/index.ts +14 -0
- package/plugins/router/src/core/adapter/netlify/conninfo.ts +57 -0
- package/plugins/router/src/core/adapter/netlify/handler.ts +10 -0
- package/plugins/router/src/core/adapter/netlify/index.ts +6 -0
- package/plugins/router/src/core/adapter/netlify/mod.ts +2 -0
- package/plugins/router/src/core/adapter/service-worker/handler.ts +37 -0
- package/plugins/router/src/core/adapter/service-worker/index.ts +36 -0
- package/plugins/router/src/core/adapter/service-worker/types.ts +14 -0
- package/plugins/router/src/core/adapter/vercel/conninfo.ts +8 -0
- package/plugins/router/src/core/adapter/vercel/handler.ts +8 -0
- package/plugins/router/src/core/adapter/vercel/index.ts +7 -0
- package/plugins/router/src/core/app-base.ts +544 -0
- package/plugins/router/src/core/app.ts +34 -0
- package/plugins/router/src/core/client/client.ts +249 -0
- package/plugins/router/src/core/client/fetch-result-please.ts +95 -0
- package/plugins/router/src/core/client/index.ts +17 -0
- package/plugins/router/src/core/client/types.ts +393 -0
- package/plugins/router/src/core/client/utils.ts +117 -0
- package/plugins/router/src/core/compose.ts +73 -0
- package/plugins/router/src/core/context.ts +781 -0
- package/plugins/router/src/core/helper/accepts/accepts.ts +96 -0
- package/plugins/router/src/core/helper/accepts/index.ts +6 -0
- package/plugins/router/src/core/helper/adapter/index.ts +90 -0
- package/plugins/router/src/core/helper/conninfo/index.ts +6 -0
- package/plugins/router/src/core/helper/conninfo/types.ts +45 -0
- package/plugins/router/src/core/helper/cookie/index.ts +146 -0
- package/plugins/router/src/core/helper/css/common.ts +337 -0
- package/plugins/router/src/core/helper/css/index.ts +262 -0
- package/plugins/router/src/core/helper/dev/index.ts +79 -0
- package/plugins/router/src/core/helper/factory/index.ts +375 -0
- package/plugins/router/src/core/helper/html/index.ts +57 -0
- package/plugins/router/src/core/helper/proxy/index.ts +203 -0
- package/plugins/router/src/core/helper/route/index.ts +144 -0
- package/plugins/router/src/core/helper/ssg/index.ts +14 -0
- package/plugins/router/src/core/helper/ssg/middleware.ts +83 -0
- package/plugins/router/src/core/helper/ssg/plugins.ts +72 -0
- package/plugins/router/src/core/helper/ssg/ssg.ts +471 -0
- package/plugins/router/src/core/helper/ssg/utils.ts +118 -0
- package/plugins/router/src/core/helper/streaming/index.ts +9 -0
- package/plugins/router/src/core/helper/streaming/sse.ts +101 -0
- package/plugins/router/src/core/helper/streaming/stream.ts +45 -0
- package/plugins/router/src/core/helper/streaming/text.ts +15 -0
- package/plugins/router/src/core/helper/streaming/utils.ts +11 -0
- package/plugins/router/src/core/helper/testing/index.ts +28 -0
- package/plugins/router/src/core/helper/websocket/index.ts +146 -0
- package/plugins/router/src/core/http-exception.ts +77 -0
- package/plugins/router/src/core/index.ts +53 -0
- package/plugins/router/src/core/jsx/base.ts +490 -0
- package/plugins/router/src/core/jsx/children.ts +20 -0
- package/plugins/router/src/core/jsx/components.ts +257 -0
- package/plugins/router/src/core/jsx/constants.ts +6 -0
- package/plugins/router/src/core/jsx/context.ts +266 -0
- package/plugins/router/src/core/jsx/dom/client.ts +89 -0
- package/plugins/router/src/core/jsx/dom/components.ts +39 -0
- package/plugins/router/src/core/jsx/dom/context.ts +52 -0
- package/plugins/router/src/core/jsx/dom/css.ts +263 -0
- package/plugins/router/src/core/jsx/dom/hooks/index.ts +91 -0
- package/plugins/router/src/core/jsx/dom/index.ts +170 -0
- package/plugins/router/src/core/jsx/dom/intrinsic-element/components.ts +438 -0
- package/plugins/router/src/core/jsx/dom/jsx-dev-runtime.ts +23 -0
- package/plugins/router/src/core/jsx/dom/jsx-runtime.ts +8 -0
- package/plugins/router/src/core/jsx/dom/render.ts +879 -0
- package/plugins/router/src/core/jsx/dom/server.ts +76 -0
- package/plugins/router/src/core/jsx/dom/utils.ts +7 -0
- package/plugins/router/src/core/jsx/hooks/index.ts +437 -0
- package/plugins/router/src/core/jsx/index.ts +115 -0
- package/plugins/router/src/core/jsx/intrinsic-element/common.ts +23 -0
- package/plugins/router/src/core/jsx/intrinsic-element/components.ts +210 -0
- package/plugins/router/src/core/jsx/intrinsic-elements.ts +938 -0
- package/plugins/router/src/core/jsx/jsx-dev-runtime.ts +26 -0
- package/plugins/router/src/core/jsx/jsx-runtime.ts +51 -0
- package/plugins/router/src/core/jsx/streaming.ts +231 -0
- package/plugins/router/src/core/jsx/types.ts +41 -0
- package/plugins/router/src/core/jsx/utils.ts +202 -0
- package/plugins/router/src/core/middleware/basic-auth/index.ts +152 -0
- package/plugins/router/src/core/middleware/bearer-auth/index.ts +220 -0
- package/plugins/router/src/core/middleware/body-limit/index.ts +110 -0
- package/plugins/router/src/core/middleware/cache/index.ts +323 -0
- package/plugins/router/src/core/middleware/combine/index.ts +171 -0
- package/plugins/router/src/core/middleware/compress/index.ts +142 -0
- package/plugins/router/src/core/middleware/context-storage/index.ts +58 -0
- package/plugins/router/src/core/middleware/cors/index.ts +163 -0
- package/plugins/router/src/core/middleware/csrf/index.ts +150 -0
- package/plugins/router/src/core/middleware/etag/digest.ts +95 -0
- package/plugins/router/src/core/middleware/etag/index.ts +135 -0
- package/plugins/router/src/core/middleware/ip-restriction/index.ts +278 -0
- package/plugins/router/src/core/middleware/jsx-renderer/index.ts +162 -0
- package/plugins/router/src/core/middleware/jwk/index.ts +1 -0
- package/plugins/router/src/core/middleware/jwk/jwk.ts +196 -0
- package/plugins/router/src/core/middleware/jwt/index.ts +9 -0
- package/plugins/router/src/core/middleware/jwt/jwt.ts +190 -0
- package/plugins/router/src/core/middleware/language/index.ts +12 -0
- package/plugins/router/src/core/middleware/language/language.ts +314 -0
- package/plugins/router/src/core/middleware/logger/index.ts +95 -0
- package/plugins/router/src/core/middleware/method-not-allowed/index.ts +141 -0
- package/plugins/router/src/core/middleware/method-override/index.ts +147 -0
- package/plugins/router/src/core/middleware/mount/index.ts +108 -0
- package/plugins/router/src/core/middleware/powered-by/index.ts +35 -0
- package/plugins/router/src/core/middleware/pretty-json/index.ts +67 -0
- package/plugins/router/src/core/middleware/request-id/index.ts +7 -0
- package/plugins/router/src/core/middleware/request-id/request-id.ts +59 -0
- package/plugins/router/src/core/middleware/secure-headers/index.ts +8 -0
- package/plugins/router/src/core/middleware/secure-headers/permissions-policy.ts +101 -0
- package/plugins/router/src/core/middleware/secure-headers/secure-headers.ts +340 -0
- package/plugins/router/src/core/middleware/serve-static/index.ts +135 -0
- package/plugins/router/src/core/middleware/serve-static/path.ts +25 -0
- package/plugins/router/src/core/middleware/timeout/index.ts +58 -0
- package/plugins/router/src/core/middleware/timing/index.ts +8 -0
- package/plugins/router/src/core/middleware/timing/timing.ts +256 -0
- package/plugins/router/src/core/middleware/trailing-slash/index.ts +156 -0
- package/plugins/router/src/core/preset/quick.ts +24 -0
- package/plugins/router/src/core/preset/tiny.ts +20 -0
- package/plugins/router/src/core/request/constants.ts +1 -0
- package/plugins/router/src/core/request.ts +502 -0
- package/plugins/router/src/core/router/linear-router/index.ts +6 -0
- package/plugins/router/src/core/router/linear-router/router.ts +152 -0
- package/plugins/router/src/core/router/pattern-router/index.ts +6 -0
- package/plugins/router/src/core/router/pattern-router/router.ts +54 -0
- package/plugins/router/src/core/router/reg-exp-router/index.ts +7 -0
- package/plugins/router/src/core/router/reg-exp-router/matcher.ts +33 -0
- package/plugins/router/src/core/router/reg-exp-router/node.ts +170 -0
- package/plugins/router/src/core/router/reg-exp-router/prepared-router.ts +165 -0
- package/plugins/router/src/core/router/reg-exp-router/router.ts +174 -0
- package/plugins/router/src/core/router/reg-exp-router/trie.ts +84 -0
- package/plugins/router/src/core/router/smart-router/index.ts +6 -0
- package/plugins/router/src/core/router/smart-router/router.ts +70 -0
- package/plugins/router/src/core/router/trie-router/index.ts +6 -0
- package/plugins/router/src/core/router/trie-router/node.ts +221 -0
- package/plugins/router/src/core/router/trie-router/router.ts +18 -0
- package/plugins/router/src/core/router/utils.ts +1 -0
- package/plugins/router/src/core/router.ts +103 -0
- package/plugins/router/src/core/types.ts +2782 -0
- package/plugins/router/src/core/utils/accept.ts +268 -0
- package/plugins/router/src/core/utils/basic-auth.ts +26 -0
- package/plugins/router/src/core/utils/body.ts +263 -0
- package/plugins/router/src/core/utils/buffer.ts +117 -0
- package/plugins/router/src/core/utils/color.ts +56 -0
- package/plugins/router/src/core/utils/compress.ts +10 -0
- package/plugins/router/src/core/utils/concurrent.ts +55 -0
- package/plugins/router/src/core/utils/constants.ts +4 -0
- package/plugins/router/src/core/utils/cookie.ts +281 -0
- package/plugins/router/src/core/utils/crypto.ts +58 -0
- package/plugins/router/src/core/utils/encode.ts +34 -0
- package/plugins/router/src/core/utils/filepath.ts +60 -0
- package/plugins/router/src/core/utils/handler.ts +15 -0
- package/plugins/router/src/core/utils/headers.ts +355 -0
- package/plugins/router/src/core/utils/html.ts +182 -0
- package/plugins/router/src/core/utils/http-status.ts +72 -0
- package/plugins/router/src/core/utils/ipaddr.ts +374 -0
- package/plugins/router/src/core/utils/jwt/index.ts +7 -0
- package/plugins/router/src/core/utils/jwt/jwa.ts +38 -0
- package/plugins/router/src/core/utils/jwt/jws.ts +235 -0
- package/plugins/router/src/core/utils/jwt/jwt.ts +292 -0
- package/plugins/router/src/core/utils/jwt/types.ts +157 -0
- package/plugins/router/src/core/utils/jwt/utf8.ts +7 -0
- package/plugins/router/src/core/utils/mime.ts +94 -0
- package/plugins/router/src/core/utils/stream.ts +107 -0
- package/plugins/router/src/core/utils/types.ts +174 -0
- package/plugins/router/src/core/utils/url.ts +337 -0
- package/plugins/router/src/core/validator/index.ts +8 -0
- package/plugins/router/src/core/validator/utils.ts +69 -0
- package/plugins/router/src/core/validator/validator.ts +185 -0
- package/plugins/router/src/helpers/index.ts +17 -0
- package/plugins/router/src/helpers/read-sse.ts +111 -0
- package/plugins/router/src/helpers/schema-validator.ts +62 -0
- package/plugins/router/src/index.ts +6 -0
- package/plugins/router/src/middleware/index.ts +28 -0
- package/plugins/router/src/middleware/loopback-only.ts +183 -0
- package/plugins/router/src/service.ts +477 -0
- package/plugins/router-http/LICENSE +21 -0
- package/plugins/router-http/package.json +87 -0
- package/plugins/router-http/plugin.json +23 -0
- package/plugins/router-http/src/bridge.ts +54 -0
- package/plugins/router-http/src/index.ts +141 -0
- package/plugins/router-http/src/serve.ts +55 -0
- package/plugins/sandbox/LICENSE +21 -0
- package/plugins/sandbox/index.ts +150 -0
- package/plugins/sandbox/package.json +41 -0
- package/plugins/sandbox/plugin.json +13 -0
- package/plugins/sandbox/runner.mjs +18 -0
- package/plugins/save/LICENSE +21 -0
- package/plugins/save/cli.ts +19 -0
- package/plugins/save/index.ts +55 -0
- package/plugins/save/package.json +43 -0
- package/plugins/save/plugin.json +15 -0
- package/plugins/save/share-cli.ts +95 -0
- package/plugins/save/share.ts +193 -0
- package/plugins/showcase/LICENSE +21 -0
- package/plugins/showcase/cards.ts +162 -0
- package/plugins/showcase/index.ts +117 -0
- package/plugins/showcase/package.json +49 -0
- package/plugins/showcase/plugin.json +14 -0
- package/plugins/state/LICENSE +21 -0
- package/plugins/state/package.json +104 -0
- package/plugins/state/plugin.json +27 -0
- package/plugins/state/src/cell.ts +67 -0
- package/plugins/state/src/client-source.ts +244 -0
- package/plugins/state/src/index.ts +3 -0
- package/plugins/state/src/service.ts +146 -0
- package/plugins/state/src/socket.ts +96 -0
- package/plugins/tasks/LICENSE +21 -0
- package/plugins/tasks/index.ts +246 -0
- package/plugins/tasks/package.json +45 -0
- package/plugins/tasks/plugin.json +14 -0
- package/plugins/tasks/store.ts +86 -0
- package/plugins/web-server/package.json +52 -0
- package/plugins/web-server/plugin.json +20 -0
- package/plugins/web-server/src/index.ts +164 -0
- package/shared/AGENTS.core.md +84 -0
- package/shared/DEFAULTS.md +49 -0
- package/shared/library-history-versions.json +48 -0
- package/shared/library-history.json +786 -0
- package/shared/skills/acryl-add-ui/SKILL.md +19 -0
- package/shared/skills/acryl-app/SKILL.md +13 -0
- package/shared/skills/acryl-build-plugin/SKILL.md +22 -0
- package/shared/skills/acryl-change-plugin/SKILL.md +14 -0
- package/shared/skills/acryl-diagnose-plugin/SKILL.md +13 -0
- package/shared/skills/acryl-fix-plugin/SKILL.md +13 -0
- package/shared/skills/acryl-remove-plugin/SKILL.md +12 -0
- package/shared/skills/acryl-share-plugin/SKILL.md +16 -0
- package/shared/skills/cordis-plugin/SKILL.md +26 -0
- package/templates/agent/.gitattributes +2 -0
- package/templates/agent/AGENTS.md +20 -0
- package/templates/agent/Dockerfile +15 -0
- package/templates/agent/README.md +52 -0
- package/templates/agent/blend.yaml +71 -0
- package/templates/agent/dockerignore +3 -0
- package/templates/agent/gitignore +6 -0
- package/templates/agent/package.json +31 -0
- package/templates/agent/src/app.ts +293 -0
- package/templates/agent/src/frame.ts +17 -0
- package/templates/agent/src/main.ts +27 -0
- package/templates/agent/src/routes.ts +163 -0
- package/templates/agent/template.json +22 -0
- package/templates/agent/test/agent.test.ts +51 -0
- package/templates/agent/test/app.test.ts +270 -0
- package/templates/agent/test/builder.test.ts +210 -0
- package/templates/agent/test/model.test.ts +94 -0
- package/templates/agent/tsconfig.json +68 -0
- package/templates/blank/.gitattributes +2 -0
- package/templates/blank/AGENTS.md +6 -0
- package/templates/blank/README.md +26 -0
- package/templates/blank/blend.yaml +37 -0
- package/templates/blank/gitignore +6 -0
- package/templates/blank/package.json +31 -0
- package/templates/blank/src/about.tsx +14 -0
- package/templates/blank/src/app.ts +160 -0
- package/templates/blank/src/door.ts +7 -0
- package/templates/blank/src/first-page.ts +5 -0
- package/templates/blank/src/frame.ts +17 -0
- package/templates/blank/src/main.ts +20 -0
- package/templates/blank/src/routes.ts +79 -0
- package/templates/blank/template.json +15 -0
- package/templates/blank/test/app.test.ts +177 -0
- package/templates/blank/tsconfig.json +19 -0
- package/templates/chat/.gitattributes +2 -0
- package/templates/chat/AGENTS.md +16 -0
- package/templates/chat/blend.yaml +36 -0
- package/templates/chat/gitignore +9 -0
- package/templates/chat/migrations/001-chat.sql +12 -0
- package/templates/chat/package.json +35 -0
- package/templates/chat/src/access.ts +110 -0
- package/templates/chat/src/app.ts +165 -0
- package/templates/chat/src/chat-app.ts +120 -0
- package/templates/chat/src/client/chat.tsx +117 -0
- package/templates/chat/src/client/tsconfig.json +26 -0
- package/templates/chat/src/db.ts +43 -0
- package/templates/chat/src/door.ts +7 -0
- package/templates/chat/src/frame.ts +17 -0
- package/templates/chat/src/llm.ts +48 -0
- package/templates/chat/src/main.ts +23 -0
- package/templates/chat/src/page.tsx +42 -0
- package/templates/chat/src/routes.ts +29 -0
- package/templates/chat/src/runtime.ts +23 -0
- package/templates/chat/template.json +15 -0
- package/templates/chat/test/chat.test.ts +322 -0
- package/templates/chat/test/server.test.ts +92 -0
- package/templates/chat/tsconfig.json +20 -0
- package/templates/nodejs/.gitattributes +2 -0
- package/templates/nodejs/AGENTS.md +9 -0
- package/templates/nodejs/blend.yaml +33 -0
- package/templates/nodejs/gitignore +6 -0
- package/templates/nodejs/package.json +32 -0
- package/templates/nodejs/src/app.ts +158 -0
- package/templates/nodejs/src/client/counter.tsx +12 -0
- package/templates/nodejs/src/client/tsconfig.json +26 -0
- package/templates/nodejs/src/door.ts +7 -0
- package/templates/nodejs/src/frame.ts +17 -0
- package/templates/nodejs/src/main.ts +20 -0
- package/templates/nodejs/src/page.tsx +29 -0
- package/templates/nodejs/src/routes.ts +59 -0
- package/templates/nodejs/template.json +14 -0
- package/templates/nodejs/test/app.test.ts +112 -0
- package/templates/nodejs/test/server.test.ts +97 -0
- package/templates/nodejs/tsconfig.json +20 -0
- package/templates/notes/.gitattributes +2 -0
- package/templates/notes/AGENTS.md +26 -0
- package/templates/notes/blend.yaml +36 -0
- package/templates/notes/gitignore +9 -0
- package/templates/notes/migrations/001-notes.sql +18 -0
- package/templates/notes/package.json +35 -0
- package/templates/notes/src/app.ts +165 -0
- package/templates/notes/src/auth.ts +57 -0
- package/templates/notes/src/client/counter.tsx +21 -0
- package/templates/notes/src/client/tsconfig.json +26 -0
- package/templates/notes/src/db.ts +50 -0
- package/templates/notes/src/door.ts +7 -0
- package/templates/notes/src/frame.ts +17 -0
- package/templates/notes/src/main.ts +23 -0
- package/templates/notes/src/notes-app.ts +212 -0
- package/templates/notes/src/routes.ts +21 -0
- package/templates/notes/src/runtime.ts +23 -0
- package/templates/notes/src/schema.ts +38 -0
- package/templates/notes/src/views.tsx +145 -0
- package/templates/notes/template.json +15 -0
- package/templates/notes/test/notes.test.ts +318 -0
- package/templates/notes/test/server.test.ts +92 -0
- package/templates/notes/tsconfig.json +20 -0
- package/templates/todo/.gitattributes +2 -0
- package/templates/todo/AGENTS.md +5 -0
- package/templates/todo/README.md +27 -0
- package/templates/todo/blend.yaml +28 -0
- package/templates/todo/gitignore +6 -0
- package/templates/todo/package.json +31 -0
- package/templates/todo/src/app.ts +145 -0
- package/templates/todo/src/door.ts +7 -0
- package/templates/todo/src/frame.ts +17 -0
- package/templates/todo/src/main.ts +21 -0
- package/templates/todo/src/page.ts +35 -0
- package/templates/todo/src/todo.ts +137 -0
- package/templates/todo/template.json +14 -0
- package/templates/todo/test/todo.test.ts +228 -0
- package/templates/todo/tsconfig.json +19 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@acryldev/page",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "The page of a framework-hosted app: the ACRYL frame's own minimal document, its index taps applied per request, and the built client assets the client runtime boots from, served by @acryldev/web-server",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "lib/index.js",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./lib/types/index.d.ts",
|
|
10
|
+
"default": "./lib/index.js"
|
|
11
|
+
},
|
|
12
|
+
"./package.json": "./package.json"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"lib",
|
|
16
|
+
"README.md",
|
|
17
|
+
"plugin.json"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "node scripts/clean.mjs && tsdown && tsc -p tsconfig.json --emitDeclarationOnly",
|
|
21
|
+
"typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.tests.json --noEmit",
|
|
22
|
+
"test": "vitest run",
|
|
23
|
+
"check": "pnpm run build && pnpm run typecheck && pnpm run test",
|
|
24
|
+
"prepack": "pnpm run check"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"@acryldev/web-server": "workspace:*"
|
|
28
|
+
},
|
|
29
|
+
"peerDependencies": {
|
|
30
|
+
"@deepseek-ai/cordis": "^4.0.2"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@deepseek-ai/cordis": "4.0.4",
|
|
34
|
+
"@deepseek-ai/dsh-web-frontend": "0.2.0-rc.2",
|
|
35
|
+
"@types/node": "^22.20.0",
|
|
36
|
+
"@acryldev/node-server": "workspace:*",
|
|
37
|
+
"@acryldev/router": "workspace:*",
|
|
38
|
+
"tsdown": "0.22.2",
|
|
39
|
+
"typescript": "6.0.3",
|
|
40
|
+
"vitest": "4.1.11"
|
|
41
|
+
},
|
|
42
|
+
"repository": {
|
|
43
|
+
"type": "git",
|
|
44
|
+
"url": "git+https://github.com/acryldev/acryl.git",
|
|
45
|
+
"directory": "plugins/page"
|
|
46
|
+
},
|
|
47
|
+
"homepage": "https://github.com/acryldev/acryl/tree/main/plugins/page#readme",
|
|
48
|
+
"bugs": {
|
|
49
|
+
"url": "https://github.com/acryldev/acryl/issues"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "page",
|
|
3
|
+
"description": "The page of a framework-hosted app: our own minimal index (the ACRYL frame's document, not DSH's), its index taps applied per request, and the built client assets the client runtime boots from. Ours, served by @acryldev/web-server on the framework's node server.",
|
|
4
|
+
"requires": [
|
|
5
|
+
"web-server"
|
|
6
|
+
],
|
|
7
|
+
"inject": [
|
|
8
|
+
"webServer"
|
|
9
|
+
],
|
|
10
|
+
"provides": [],
|
|
11
|
+
"dependencies": {},
|
|
12
|
+
"mount": "mount it after @acryldev/web-server and the client rows: it serves '/' and '/assets/*' and applies the webServer index taps (the client modules' __DSH_BOOT__ and registration scripts) to its own document",
|
|
13
|
+
"entries": {
|
|
14
|
+
"": "src/index.ts"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The page's own icon: the ACRYL Blends logo (plugins/desktop-shell/assets/acrylblends-logo.png at 64 px) inside an SVG, which is what a browser tab reads at 16 px. The wordmark is
|
|
3
|
+
* unreadable that small. The frontend package the page borrows its scripts from ships DeepSeek's whale as favicon.svg, so the page answers every icon request itself and
|
|
4
|
+
* never serves that file.
|
|
5
|
+
*/
|
|
6
|
+
export const ACRYL_FAVICON_SVG =
|
|
7
|
+
"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"0 0 64 64\" role=\"img\" aria-label=\"ACRYL Blends\"><image width=\"64\" height=\"64\" xlink:href=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAABlGlDQ1BJQ0MgUHJvZmlsZQAAKJF9kc8rRFEUxz8GESMLFhYWb4HVkJAsGQupUdOg/Fp48+aXmnlub0ZSlsp2ihIbvxa2Vlha2Cql/Cj5A2RFbKTn3Hk0gziv0/30vfece973gu/EVCpd0Q8ZO+dEhoLGxOSUUfVArXx1tNNnWlk1EA6HkPhav8frFWV6vWzXvX7v/xt1sXjWgjJDuN9STk54Vji8mFOaD4U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OaRjUhmWqkKGNQgSpWXPoFNWXYRyCd0wRGAfrXjP7Aeq+FaHD4eoev6gcGuevK8K750ynL56rBYEehoijQ2Nho7TpRa2L8EpOFJvkhGp7Y0FHuEH673t60KN7LaqDGTSxey/BSNZ4o67gQd4riAxMTgFMFcChOEEMeCOiUGMCB21HbKJ8XPvflwjxtIGwKZEAlUwfXuYPAc0PBVApAcA2u8PsPPZ+Zee6Pul0y+08egVnzFg13erM24hnnv/32EH7MPG5pOjn/SSqPltECwJLphz9EeAx1fRYKtUz9eOfOdrvH2GuLH+MEaRlKbglP6imDQuGR7+suZHse8EQzMaDKQrOhQjPufsTtBj0vE4w8/KSefxSasqPwoSBCgBoEBdIF4BUGAy2ORS+aU4jzbkUPcrL9sJaQvIX2qk7klMOb9WAgGHbt3bsX2vxt1q5b9/MO+S2huwyPWKAUWGkzRMtNaoeRJf1u944dLfbwYyYU12IAdQn5GGrfJwiMDF52xJgTXKoLnLIH9CgHfjSi36PWhUUeYj43aDkIaE4zMFlHwZfdDAM8CAAMg08io6DZvBSnyMKPMOzE6urqU4bPTnkEbp01/4aGY81TyCdsskBikS1ZLeEtKVFn4x7BForkpAVrrSryzQ+/+LTH5PC0+ne37yeVhB43hfVlDMfjV+M4K7aMKLZRJl6GDML3EYCYB2hFguOGBi2mDkEMrUMfHwrOg5ndBHzOMXDn+CHfFYPB4hAY7h4KgzKGQIbYD0eKK7coimv8fv/7mZmZbWTurumUALQFAvsCkeBVuDiUm3TtIHIWCglDdX1OaKLxPSOmHUPh99jVBw8epKU+53yMJOAq/H6Q8DZed3U8+6ZKIaVmIirF6HoId1SGdkMzdd4JJEImMJTBxpoNMdKKdFiN5UczjT5CjplpZkIG/tGaCVE1igFFJEi4+OPHj5/07mGvJ52nEUgjkEYgjUAagTQCaQTSCKQRSCPwy0Pg/1ndilReBEDZAAAAAElFTkSuQmCC\"/></svg>"
|
|
8
|
+
|
|
9
|
+
/** The web manifest of an app page: its title and the icon above, not the frontend package's own. */
|
|
10
|
+
export function pageManifest(title: string): string {
|
|
11
|
+
return JSON.stringify({
|
|
12
|
+
name: title,
|
|
13
|
+
short_name: title,
|
|
14
|
+
start_url: './',
|
|
15
|
+
scope: './',
|
|
16
|
+
display: 'standalone',
|
|
17
|
+
icons: [{ src: 'favicon.svg', sizes: 'any', type: 'image/svg+xml', purpose: 'any' }],
|
|
18
|
+
})
|
|
19
|
+
}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The page of a framework-hosted app. The document is ours: a minimal index (doctype, title, the root div) with the index taps applied per request,
|
|
3
|
+
* which is where the client-module row inserts `window.__DSH_BOOT__` and its registration scripts. DSH's built frontend is used only as the client
|
|
4
|
+
* runtime library the frame's client plugins load through: its own index is read for the entry script and stylesheet tags it genuinely needs, and its
|
|
5
|
+
* `dist/assets/` files are served beside our document. No DSH web server, web runtime or web-startup row is involved.
|
|
6
|
+
*/
|
|
7
|
+
import { readFile } from 'node:fs/promises'
|
|
8
|
+
import { createRequire } from 'node:module'
|
|
9
|
+
import { dirname, extname, join, normalize, sep } from 'node:path'
|
|
10
|
+
import type { IncomingMessage, ServerResponse } from 'node:http'
|
|
11
|
+
import type { Context } from '@deepseek-ai/cordis'
|
|
12
|
+
import type {} from '@acryldev/web-server'
|
|
13
|
+
import { ACRYL_FAVICON_SVG, pageManifest } from './favicon.ts'
|
|
14
|
+
|
|
15
|
+
/** Stable Cordis plugin name, equal to the package name and the Loader row id. */
|
|
16
|
+
export const name = 'acryl-page'
|
|
17
|
+
|
|
18
|
+
/** The page is served through the host's webServer port. */
|
|
19
|
+
export const inject = ['webServer']
|
|
20
|
+
|
|
21
|
+
export interface Config {
|
|
22
|
+
/** The document's title. */
|
|
23
|
+
title: string
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const CONTENT_TYPES: Readonly<Record<string, string>> = {
|
|
27
|
+
'.js': 'text/javascript; charset=utf-8',
|
|
28
|
+
'.mjs': 'text/javascript; charset=utf-8',
|
|
29
|
+
'.css': 'text/css; charset=utf-8',
|
|
30
|
+
'.map': 'application/json; charset=utf-8',
|
|
31
|
+
'.json': 'application/json; charset=utf-8',
|
|
32
|
+
'.webmanifest': 'application/manifest+json; charset=utf-8',
|
|
33
|
+
'.svg': 'image/svg+xml',
|
|
34
|
+
'.png': 'image/png',
|
|
35
|
+
'.jpg': 'image/jpeg',
|
|
36
|
+
'.jpeg': 'image/jpeg',
|
|
37
|
+
'.webp': 'image/webp',
|
|
38
|
+
'.ico': 'image/x-icon',
|
|
39
|
+
'.woff': 'font/woff',
|
|
40
|
+
'.woff2': 'font/woff2',
|
|
41
|
+
'.ttf': 'font/ttf',
|
|
42
|
+
'.wasm': 'application/wasm',
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** The frontend package's `dist` directory: anchored on its manifest, as DSH itself does. */
|
|
46
|
+
export function frontendDist(): string {
|
|
47
|
+
const require = createRequire(import.meta.url)
|
|
48
|
+
return join(dirname(require.resolve('@deepseek-ai/dsh-web-frontend/package.json')), 'dist')
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/** The tags the built client runtime genuinely needs from the frontend's own index: the entry script, its preloads and its stylesheets. */
|
|
52
|
+
export function clientAssetTags(indexHtml: string): string {
|
|
53
|
+
const tags = [...indexHtml.matchAll(/<(?:script|link)\b[^>]*>/gu)]
|
|
54
|
+
.map((match) => match[0])
|
|
55
|
+
.filter(
|
|
56
|
+
(tag) =>
|
|
57
|
+
/^<script\b[^>]*\bsrc=/u.test(tag) ||
|
|
58
|
+
/^<link\b[^>]*\brel="(?:stylesheet|modulepreload)"/u.test(tag),
|
|
59
|
+
)
|
|
60
|
+
// A copied `<script src>` without its closing tag turns every tag after it (the stylesheet links) into its text: DSH's component stylesheet then never
|
|
61
|
+
// loads, and the frame draws its dialogs, buttons and inputs with browser defaults instead of the product's. The frontend's own script tags are empty,
|
|
62
|
+
// so the closing tag is this side's to add.
|
|
63
|
+
return tags.map((tag) => (tag.startsWith('<script') ? `${tag}</script>` : tag)).join('\n ')
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/** Our document: minimal on purpose; the frame renders into `#root`, and the taps add the boot wire before `</head>`. */
|
|
67
|
+
export function pageDocument(tags: string, title: string, taps: (html: string) => string): string {
|
|
68
|
+
// The title is an app's name, typed by a person: markup in it is text, never the page's.
|
|
69
|
+
const text = title.replace(/[&<>"']/gu, (character) => `&#${String(character.charCodeAt(0))};`)
|
|
70
|
+
const document = `<!doctype html>
|
|
71
|
+
<html lang="en">
|
|
72
|
+
<head>
|
|
73
|
+
<meta charset="utf-8" />
|
|
74
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
75
|
+
<title>${text}</title>
|
|
76
|
+
<meta name="application-name" content="${text}" />
|
|
77
|
+
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
78
|
+
<link rel="manifest" href="/manifest.webmanifest" />
|
|
79
|
+
${tags}
|
|
80
|
+
</head>
|
|
81
|
+
<body>
|
|
82
|
+
<div id="root"></div>
|
|
83
|
+
</body>
|
|
84
|
+
</html>
|
|
85
|
+
`
|
|
86
|
+
return taps(document)
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/** The slice of the chat driver's connection the page needs: the process-token exchange that sets the browser's session cookie. */
|
|
90
|
+
interface ConnectionPort {
|
|
91
|
+
/** True when the caller may serve the index; false when it already answered (a token redirect or 401). */
|
|
92
|
+
authorizeIndex(req: IncomingMessage, res: ServerResponse): boolean
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/** Answer with a file under `root`, or 404: a path that escapes `root` and a missing file both 404. */
|
|
96
|
+
async function serveFile(root: string, target: string, response: ServerResponse, method: string): Promise<void> {
|
|
97
|
+
const path = normalize(join(root, target))
|
|
98
|
+
if (path !== root && !path.startsWith(root + sep)) {
|
|
99
|
+
response.writeHead(404).end('not found')
|
|
100
|
+
return
|
|
101
|
+
}
|
|
102
|
+
try {
|
|
103
|
+
const bytes = await readFile(path)
|
|
104
|
+
response.writeHead(200, {
|
|
105
|
+
'content-type': CONTENT_TYPES[extname(path).toLowerCase()] ?? 'application/octet-stream',
|
|
106
|
+
'content-length': String(bytes.byteLength),
|
|
107
|
+
'cache-control': 'no-cache',
|
|
108
|
+
})
|
|
109
|
+
response.end(method === 'HEAD' ? undefined : bytes)
|
|
110
|
+
} catch {
|
|
111
|
+
response.writeHead(404).end('not found')
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/** Serve `/` (our document), `/index.html`, the built assets and the root files the index names. */
|
|
116
|
+
export function apply(ctx: Context, config: Partial<Config> = {}): void {
|
|
117
|
+
const title = config.title ?? 'ACRYL'
|
|
118
|
+
const dist = frontendDist()
|
|
119
|
+
const assets = join(dist, 'assets')
|
|
120
|
+
ctx.webServer.register({
|
|
121
|
+
kind: 'exact',
|
|
122
|
+
path: '/',
|
|
123
|
+
handler: async (req, res) => {
|
|
124
|
+
// The chat's remote RPC is authenticated by the connection's process token: the page's root request is where the token is exchanged
|
|
125
|
+
// for the session cookie. A composition without the driver has no connection and serves the page directly.
|
|
126
|
+
const connection = (ctx as unknown as { get(name: string): unknown }).get('connection') as ConnectionPort | undefined
|
|
127
|
+
if (connection !== undefined && !connection.authorizeIndex(req, res)) return
|
|
128
|
+
const index = await readFile(join(dist, 'index.html'), 'utf8')
|
|
129
|
+
const document = pageDocument(clientAssetTags(index), title, (html) => ctx.webServer.index(html))
|
|
130
|
+
res.writeHead(200, { 'content-type': 'text/html; charset=utf-8', 'cache-control': 'no-store' })
|
|
131
|
+
res.end(req.method === 'HEAD' ? undefined : document)
|
|
132
|
+
},
|
|
133
|
+
})
|
|
134
|
+
ctx.webServer.register({
|
|
135
|
+
kind: 'exact',
|
|
136
|
+
path: '/index.html',
|
|
137
|
+
handler: async (req, res) => {
|
|
138
|
+
const index = await readFile(join(dist, 'index.html'), 'utf8')
|
|
139
|
+
const document = pageDocument(clientAssetTags(index), title, (html) => ctx.webServer.index(html))
|
|
140
|
+
res.writeHead(200, { 'content-type': 'text/html; charset=utf-8', 'cache-control': 'no-store' })
|
|
141
|
+
res.end(req.method === 'HEAD' ? undefined : document)
|
|
142
|
+
},
|
|
143
|
+
})
|
|
144
|
+
ctx.webServer.register({
|
|
145
|
+
kind: 'prefix',
|
|
146
|
+
path: '/assets',
|
|
147
|
+
handler: async (req: IncomingMessage, res: ServerResponse) => {
|
|
148
|
+
const pathname = new URL(req.url ?? '/', 'http://page.invalid').pathname
|
|
149
|
+
await serveFile(assets, pathname.slice('/assets'.length), res, req.method ?? 'GET')
|
|
150
|
+
},
|
|
151
|
+
})
|
|
152
|
+
// Browsers ask for /favicon.ico unconditionally. The icon is ours (the ACRYL mark), never the frontend package's DeepSeek whale.
|
|
153
|
+
const sendIcon = async (req: IncomingMessage, res: ServerResponse): Promise<void> => {
|
|
154
|
+
res.writeHead(200, { 'content-type': 'image/svg+xml', 'content-length': String(Buffer.byteLength(ACRYL_FAVICON_SVG)), 'cache-control': 'no-cache' })
|
|
155
|
+
res.end(req.method === 'HEAD' ? undefined : ACRYL_FAVICON_SVG)
|
|
156
|
+
}
|
|
157
|
+
for (const path of ['/favicon.ico', '/favicon.svg', '/favicon-dark.svg'])
|
|
158
|
+
ctx.webServer.register({ kind: 'exact', path, handler: sendIcon })
|
|
159
|
+
ctx.webServer.register({
|
|
160
|
+
kind: 'exact',
|
|
161
|
+
path: '/manifest.webmanifest',
|
|
162
|
+
handler: async (req: IncomingMessage, res: ServerResponse) => {
|
|
163
|
+
const manifest = pageManifest(title)
|
|
164
|
+
res.writeHead(200, { 'content-type': 'application/manifest+json', 'content-length': String(Buffer.byteLength(manifest)) })
|
|
165
|
+
res.end(req.method === 'HEAD' ? undefined : manifest)
|
|
166
|
+
},
|
|
167
|
+
})
|
|
168
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 acrylblends
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# plugin-share
|
|
2
|
+
|
|
3
|
+
Share plugins between people. Pull a plugin someone released into your running app, and publish your own as a plan a person confirms.
|
|
4
|
+
|
|
5
|
+
## Pull
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
npm run acryl -- plugin pull github:<owner>/<repo>@<version>
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
The line someone gives you after publishing also carries `@sha256:<digest>`. Then a release with different bytes is refused, with exit 1, and nothing changes.
|
|
12
|
+
|
|
13
|
+
The app must be running (`npm run dev`), because the pull installs into it live. A stopped app never installs offline: the line exits 3 and asks you to start the app and run the same line again.
|
|
14
|
+
|
|
15
|
+
The app remembers where each pulled plugin came from, in the `plugin-share` row of `blend.yaml`. A copy of the app fetches the same bytes at its next start.
|
|
16
|
+
|
|
17
|
+
A plugin whose route or home widget another plugin already has is refused, and the message names that plugin. A different copy of a plugin with the same name is refused too, and the message says where the copy in the app came from.
|
|
18
|
+
|
|
19
|
+
### Native packages
|
|
20
|
+
|
|
21
|
+
A pull installs no `dependencies`. A plugin that needs a large, per-OS npm package (an engine, a native library) declares it instead,
|
|
22
|
+
one entry per OS and CPU, each pinned by npm's sha512 of the tarball (`npm view <package>@<version> dist.integrity dist.unpackedSize`):
|
|
23
|
+
|
|
24
|
+
```json
|
|
25
|
+
"acrylblends": {
|
|
26
|
+
"native": [
|
|
27
|
+
{ "package": "@deepseek-ai/libreoffice-kit-darwin-arm64", "version": "0.1.5", "os": "darwin", "cpu": "arm64",
|
|
28
|
+
"integrity": "sha512-...", "size": 153171456 }
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Leave `cpu` out for a build that runs on any CPU of that OS (a WebAssembly one). The pull downloads only this computer's entry, from the
|
|
34
|
+
npm registry, checks its sha512, unpacks it into the app's home (`native/`) and links `node_modules/<package>` to it before the plugin
|
|
35
|
+
starts. It replaces only a missing package or the frame's empty placeholder (`@acryldev/absent`); a copy npm installed stays. Removing
|
|
36
|
+
the plugin removes the link and the download. An `npm install` puts the placeholder back; the app's next start links the download again.
|
|
37
|
+
A plugin's entries may unpack to 1 GB at most. The code is `native.ts`.
|
|
38
|
+
|
|
39
|
+
## List and remove
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
npm run acryl -- plugin list
|
|
43
|
+
npm run acryl -- plugin remove <name>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
The list names each plugin installed while the app runs, its version and state. A pulled one also shows the source it came from and its author, the GitHub account that released it.
|
|
47
|
+
|
|
48
|
+
Remove takes the plugin out of the running app and forgets its record. Its folder goes too when it still holds the release exactly as pulled; the pull line brings it back. A folder with someone's work in it stays, and the answer says so: the app's own plugin, or a pulled one changed since. The app then starts it again at its next start unless you delete the folder.
|
|
49
|
+
|
|
50
|
+
Both work in the frame as well.
|
|
51
|
+
|
|
52
|
+
## Publish
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
npm run acryl -- plugin publish <name> [--owner <account>] [--license <id>]
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
It prints the plan: account, repository, version, visibility and license. Only a person's yes at the terminal publishes. Declining sends nothing. An agent gets the plan and cannot say yes. The output ends with the pull line to give to others.
|
|
59
|
+
|
|
60
|
+
## An app made by an older version
|
|
61
|
+
|
|
62
|
+
Every new app has this plugin, except one made from the todo template, which installs nothing live. `upgrade` does not add it to an older app, so add it and mount it by hand:
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
npx acrylblends add plugin-share
|
|
66
|
+
npm install
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
In `src/app.ts`, import it, add it to the registry and give it the plugins folder:
|
|
70
|
+
|
|
71
|
+
```ts
|
|
72
|
+
import { pluginShare } from '../plugins/plugin-share/index.ts'
|
|
73
|
+
// in the registry
|
|
74
|
+
'plugin-share': pluginShare,
|
|
75
|
+
// in the configuration passed to compose
|
|
76
|
+
'plugin-share': { dir: extensionsDir },
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
In `blend.yaml`, add the row after `builder`:
|
|
80
|
+
|
|
81
|
+
```yaml
|
|
82
|
+
- id: plugin-share
|
|
83
|
+
name: plugin-share
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Then restart the app.
|