@prismshadow/penguin-server 0.2.13 → 0.2.16
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/dist/api/types.d.ts +2762 -153
- package/dist/api/types.js +3 -1
- package/dist/auth-token.d.ts +22 -1
- package/dist/auth-token.js +3 -3
- package/dist/auth-token.js.map +1 -1
- package/dist/{chunk-A3QANMU5.js → chunk-3SFJKLQU.js} +315 -10
- package/dist/chunk-3SFJKLQU.js.map +1 -0
- package/dist/{chunk-3I2XOPJB.js → chunk-D3JNA6ZI.js} +126 -46
- package/dist/chunk-D3JNA6ZI.js.map +1 -0
- package/dist/{chunk-TOOTEEM4.js → chunk-G7GY7PJU.js} +1 -1
- package/dist/chunk-G7GY7PJU.js.map +1 -0
- package/dist/chunk-HX3WBUYX.js +18 -0
- package/dist/chunk-HX3WBUYX.js.map +1 -0
- package/dist/chunk-QFV3ERQO.js +20 -0
- package/dist/chunk-QFV3ERQO.js.map +1 -0
- package/dist/chunk-W7JNIJ25.js +19 -0
- package/dist/chunk-W7JNIJ25.js.map +1 -0
- package/dist/index.js +73676 -39990
- package/dist/index.js.map +1 -1
- package/dist/install.ps1 +16 -6
- package/dist/install.sh +24 -10
- package/dist/machine-status.js +1 -1
- package/dist/plugin/index.d.ts +1073 -276
- package/dist/reset-admin-password.js +3 -3
- package/dist/secret-file.js +3 -14
- package/dist/secret-file.js.map +1 -1
- package/dist/version-report.d.ts +3 -0
- package/dist/version-report.js +1 -1
- package/package.json +8 -6
- package/web-dist/assets/KaTeX_Size3-Regular-gV2CO0n9.woff2 +0 -0
- package/web-dist/assets/abnfDiagram-VCTEODGH-0AKFiyig.js +1 -0
- package/web-dist/assets/{addon-clipboard-DrZY90Ks.js → addon-clipboard-BovFnNVg.js} +1 -1
- package/web-dist/assets/{addon-fit-CtEAdAax.js → addon-fit-B1npgxQk.js} +1 -1
- package/web-dist/assets/{addon-web-links-DJL13cYY.js → addon-web-links-D88QHj7A.js} +1 -1
- package/web-dist/assets/arc-Beox1Cgf.js +1 -0
- package/web-dist/assets/architectureDiagram-5GKGNRK7-CC1sLMY1.js +36 -0
- package/web-dist/assets/blockDiagram-I7D4REHJ-B8BY1PkZ.js +129 -0
- package/web-dist/assets/c4Diagram-7LVT6UL2-yjY0BkxQ.js +38 -0
- package/web-dist/assets/channel-mfsAVJLE.js +1 -0
- package/web-dist/assets/chunk-2Q5K7J3B-DdgIvETg.js +1 -0
- package/web-dist/assets/chunk-5VM5RSS4-BE38k1Rs.js +15 -0
- package/web-dist/assets/chunk-F27PBJKO-D4YXmaqQ.js +1 -0
- package/web-dist/assets/chunk-IMKFNOWR-CyJFdThc.js +231 -0
- package/web-dist/assets/chunk-JWPE2WC7-BAM_oEUU.js +1 -0
- package/web-dist/assets/chunk-POPQ4Y6H-BP3D0FVi.js +1 -0
- package/web-dist/assets/chunk-SVP7TREG-Clk8PdKZ.js +88 -0
- package/web-dist/assets/chunk-TICWLB2K-EvWPnEGg.js +206 -0
- package/web-dist/assets/chunk-XXDRQBXY-6p5D0UB1.js +1 -0
- package/web-dist/assets/classDiagram-ZZMXUADV-BPVO1m8i.js +1 -0
- package/web-dist/assets/classDiagram-v2-VYDZK3BY-BPVO1m8i.js +1 -0
- package/web-dist/assets/cose-bilkent-JH36ORCC-bpkI-tLJ.js +1 -0
- package/web-dist/assets/cynefin-OW5HDTMX-srLaqJ4e.js +166 -0
- package/web-dist/assets/cynefinDiagram-5FMLGOSQ-BPfpHSPc.js +62 -0
- package/web-dist/assets/cytoscape.esm-BB4DxJjf.js +321 -0
- package/web-dist/assets/dagre-GXQ25YYZ-C4fF5-j7.js +4 -0
- package/web-dist/assets/defaultLocale-DX6XiGOO.js +1 -0
- package/web-dist/assets/diagram-S7CK7UJ4-BzBLb_9-.js +30 -0
- package/web-dist/assets/diagram-UQ7AKVKN-BJuJ1o_T.js +41 -0
- package/web-dist/assets/diagram-VSXAHHWV-DFelN9i9.js +3 -0
- package/web-dist/assets/diagram-VX7I27RA-BgrEoPyp.js +24 -0
- package/web-dist/assets/diagram-Z3DM3KII-C71KiMiX.js +24 -0
- package/web-dist/assets/ebnfDiagram-PWID7BFC-EYteyp1b.js +1 -0
- package/web-dist/assets/erDiagram-RLTQ6QDP-B6n6-sz6.js +99 -0
- package/web-dist/assets/flowDiagram-HODETNUW-BtoMTdyT.js +168 -0
- package/web-dist/assets/ganttDiagram-EL5Y4UJY-CbOAa3vS.js +292 -0
- package/web-dist/assets/gitGraphDiagram-WWUBYQGX-B7-8sszH.js +106 -0
- package/web-dist/assets/highlighter-Bj5l2XH_.js +2 -0
- package/web-dist/assets/{highlighter-core-CrBdruEx.js → highlighter-core-CMXoD8ze.js} +7 -7
- package/web-dist/assets/{highlighter.worker-CL6f9Fzw.js → highlighter.worker-D6D9fPma.js} +9 -9
- package/web-dist/assets/ibm-plex-sans-condensed-latin-600-normal-CRd5VyFf.woff2 +0 -0
- package/web-dist/assets/ibm-plex-sans-condensed-latin-ext-600-normal-CBdNZ9Ci.woff2 +0 -0
- package/web-dist/assets/ibm-plex-sans-latin-ext-wght-normal-CIII54If.woff2 +0 -0
- package/web-dist/assets/ibm-plex-sans-latin-wght-normal-IvpUvPa2.woff2 +0 -0
- package/web-dist/assets/index-BOCqRT4e.css +1 -0
- package/web-dist/assets/index-BrMpjp2s.js +1286 -0
- package/web-dist/assets/infoDiagram-27XIBGKW-BBjf6pkP.js +2 -0
- package/web-dist/assets/init-Gi6I4Gst.js +1 -0
- package/web-dist/assets/ishikawaDiagram-5VMMS53U-BBSvCv45.js +70 -0
- package/web-dist/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
- package/web-dist/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
- package/web-dist/assets/journeyDiagram-3NMN7TZE-CuHHl5zk.js +139 -0
- package/web-dist/assets/kanban-definition-UXKFOSKX-DJyP4Myw.js +89 -0
- package/web-dist/assets/layout-Bqqhdwtt.js +1 -0
- package/web-dist/assets/linear-BZfUSIf8.js +1 -0
- package/web-dist/assets/mermaid.core-BlUspEsI.js +310 -0
- package/web-dist/assets/mindmap-definition-YA3MSWOX-BtyMD4wz.js +96 -0
- package/web-dist/assets/misans-400-100-DHkMCix2.woff2 +0 -0
- package/web-dist/assets/misans-400-101-CwgSLsmc.woff2 +0 -0
- package/web-dist/assets/misans-400-102-BQgefHPQ.woff2 +0 -0
- package/web-dist/assets/misans-400-103-CP58Mc_T.woff2 +0 -0
- package/web-dist/assets/misans-400-104-Ta_Xu1gd.woff2 +0 -0
- package/web-dist/assets/misans-400-105-CDop11AR.woff2 +0 -0
- package/web-dist/assets/misans-400-106-Dv8y0ubk.woff2 +0 -0
- package/web-dist/assets/misans-400-107-CjnHtp9E.woff2 +0 -0
- package/web-dist/assets/misans-400-108-BA8nQUBw.woff2 +0 -0
- package/web-dist/assets/misans-400-109-B6uEN0pG.woff2 +0 -0
- package/web-dist/assets/misans-400-110-BQqnShrY.woff2 +0 -0
- package/web-dist/assets/misans-400-111-CHB-Jj5X.woff2 +0 -0
- package/web-dist/assets/misans-400-112-D1dh4Cjx.woff2 +0 -0
- package/web-dist/assets/misans-400-113-Bw_wNCFp.woff2 +0 -0
- package/web-dist/assets/misans-400-114-CUb-5IzE.woff2 +0 -0
- package/web-dist/assets/misans-400-115-BICOatsO.woff2 +0 -0
- package/web-dist/assets/misans-400-116-B3_gmYW6.woff2 +0 -0
- package/web-dist/assets/misans-400-117-B8k_y3cv.woff2 +0 -0
- package/web-dist/assets/misans-400-118-C-2Cf5C6.woff2 +0 -0
- package/web-dist/assets/misans-400-119-CmLP7xnX.woff2 +0 -0
- package/web-dist/assets/misans-400-21-DsSSD_Zj.woff2 +0 -0
- package/web-dist/assets/misans-400-22-rtkxWOv4.woff2 +0 -0
- package/web-dist/assets/misans-400-23-CDDB4M1H.woff2 +0 -0
- package/web-dist/assets/misans-400-24-Dqf_XeOL.woff2 +0 -0
- package/web-dist/assets/misans-400-25-C4U1tJ5J.woff2 +0 -0
- package/web-dist/assets/misans-400-26-CEXOK-nT.woff2 +0 -0
- package/web-dist/assets/misans-400-27-BrNOAScF.woff2 +0 -0
- package/web-dist/assets/misans-400-28-CPpEnCkG.woff2 +0 -0
- package/web-dist/assets/misans-400-29-C9JMVw8g.woff2 +0 -0
- package/web-dist/assets/misans-400-30-CD-QimXa.woff2 +0 -0
- package/web-dist/assets/misans-400-31-S4k06NbS.woff2 +0 -0
- package/web-dist/assets/misans-400-32-zRMBDkz6.woff2 +0 -0
- package/web-dist/assets/misans-400-33-sQ_tNZSM.woff2 +0 -0
- package/web-dist/assets/misans-400-34-8LEGljja.woff2 +0 -0
- package/web-dist/assets/misans-400-35-CxSPyuiU.woff2 +0 -0
- package/web-dist/assets/misans-400-36-BY1i4WtO.woff2 +0 -0
- package/web-dist/assets/misans-400-37-C0oF42pu.woff2 +0 -0
- package/web-dist/assets/misans-400-38-y7xcB90w.woff2 +0 -0
- package/web-dist/assets/misans-400-39-C307YgZx.woff2 +0 -0
- package/web-dist/assets/misans-400-40-ByZr736f.woff2 +0 -0
- package/web-dist/assets/misans-400-41-ChKEw5zV.woff2 +0 -0
- package/web-dist/assets/misans-400-42-CD__zJu5.woff2 +0 -0
- package/web-dist/assets/misans-400-43-CqNV6_TG.woff2 +0 -0
- package/web-dist/assets/misans-400-44-zE-akmW8.woff2 +0 -0
- package/web-dist/assets/misans-400-45-Du98otwc.woff2 +0 -0
- package/web-dist/assets/misans-400-46-B6JXbEy2.woff2 +0 -0
- package/web-dist/assets/misans-400-47-DpqW0kSq.woff2 +0 -0
- package/web-dist/assets/misans-400-48-BprON5Q_.woff2 +0 -0
- package/web-dist/assets/misans-400-49-N-ct3sN6.woff2 +0 -0
- package/web-dist/assets/misans-400-5-ton_4jCN.woff2 +0 -0
- package/web-dist/assets/misans-400-50-JgU49P0U.woff2 +0 -0
- package/web-dist/assets/misans-400-51-DSS3Moge.woff2 +0 -0
- package/web-dist/assets/misans-400-52-BMoXFmwE.woff2 +0 -0
- package/web-dist/assets/misans-400-53-BaLMGl4z.woff2 +0 -0
- package/web-dist/assets/misans-400-54-CaeSn3OR.woff2 +0 -0
- package/web-dist/assets/misans-400-55-BBqrtLxN.woff2 +0 -0
- package/web-dist/assets/misans-400-56-DAZ5BnbO.woff2 +0 -0
- package/web-dist/assets/misans-400-57-F-n3b0gI.woff2 +0 -0
- package/web-dist/assets/misans-400-58-DEUuPQAq.woff2 +0 -0
- package/web-dist/assets/misans-400-59-DXP5rhCL.woff2 +0 -0
- package/web-dist/assets/misans-400-6-DWCCUO_c.woff2 +0 -0
- package/web-dist/assets/misans-400-60-BE6IO6zJ.woff2 +0 -0
- package/web-dist/assets/misans-400-61-5Qb1gaxK.woff2 +0 -0
- package/web-dist/assets/misans-400-62-D_tJKNAj.woff2 +0 -0
- package/web-dist/assets/misans-400-63-hwmne8yB.woff2 +0 -0
- package/web-dist/assets/misans-400-64-BGedxReM.woff2 +0 -0
- package/web-dist/assets/misans-400-65-BaKPsugb.woff2 +0 -0
- package/web-dist/assets/misans-400-66-IdaOMzCz.woff2 +0 -0
- package/web-dist/assets/misans-400-67-BdWyS83H.woff2 +0 -0
- package/web-dist/assets/misans-400-68-DrZ_1swq.woff2 +0 -0
- package/web-dist/assets/misans-400-69-B3jsSD92.woff2 +0 -0
- package/web-dist/assets/misans-400-70-D6UZI2Ua.woff2 +0 -0
- package/web-dist/assets/misans-400-71-HFxyMCYg.woff2 +0 -0
- package/web-dist/assets/misans-400-72-CP5A-yQP.woff2 +0 -0
- package/web-dist/assets/misans-400-73-BoD_bu6s.woff2 +0 -0
- package/web-dist/assets/misans-400-74-CbJlhZlZ.woff2 +0 -0
- package/web-dist/assets/misans-400-75-BsbWuELX.woff2 +0 -0
- package/web-dist/assets/misans-400-76-DkwiQhof.woff2 +0 -0
- package/web-dist/assets/misans-400-77-6pVHXHnF.woff2 +0 -0
- package/web-dist/assets/misans-400-78-CfUF6pih.woff2 +0 -0
- package/web-dist/assets/misans-400-79-BCS3Dx4e.woff2 +0 -0
- package/web-dist/assets/misans-400-80-BEYSdQ_N.woff2 +0 -0
- package/web-dist/assets/misans-400-81-BzL-Gncx.woff2 +0 -0
- package/web-dist/assets/misans-400-82-CaENmdUU.woff2 +0 -0
- package/web-dist/assets/misans-400-83-Bvq1eBcA.woff2 +0 -0
- package/web-dist/assets/misans-400-84-Ctd90hiP.woff2 +0 -0
- package/web-dist/assets/misans-400-85-DWuOxfL1.woff2 +0 -0
- package/web-dist/assets/misans-400-86-D5niZS5c.woff2 +0 -0
- package/web-dist/assets/misans-400-87-DkOIADQJ.woff2 +0 -0
- package/web-dist/assets/misans-400-88-CGY4WTcC.woff2 +0 -0
- package/web-dist/assets/misans-400-89-CA3eoMTt.woff2 +0 -0
- package/web-dist/assets/misans-400-90-CzxR9MYb.woff2 +0 -0
- package/web-dist/assets/misans-400-91-Dyr85txc.woff2 +0 -0
- package/web-dist/assets/misans-400-97-qEZrCUNe.woff2 +0 -0
- package/web-dist/assets/misans-400-cyrillic--hFcG0Xp.woff2 +0 -0
- package/web-dist/assets/misans-400-extra-ZRI9n2Hu.woff2 +0 -0
- package/web-dist/assets/misans-400-latin-BRDR1WaL.woff2 +0 -0
- package/web-dist/assets/misans-400-latin-ext-6xS-MvHW.woff2 +0 -0
- package/web-dist/assets/misans-400-vietnamese-D7xD7kBB.woff2 +0 -0
- package/web-dist/assets/misans-500-100-BHuGA96E.woff2 +0 -0
- package/web-dist/assets/misans-500-101-CDMYUz0c.woff2 +0 -0
- package/web-dist/assets/misans-500-102-CWcqYYCV.woff2 +0 -0
- package/web-dist/assets/misans-500-103-BE1QSEzY.woff2 +0 -0
- package/web-dist/assets/misans-500-104-CDp743BV.woff2 +0 -0
- package/web-dist/assets/misans-500-105-y7dY6Foi.woff2 +0 -0
- package/web-dist/assets/misans-500-106-CP-kGZ6j.woff2 +0 -0
- package/web-dist/assets/misans-500-107-CUc8Hvle.woff2 +0 -0
- package/web-dist/assets/misans-500-108-ItN_x8jX.woff2 +0 -0
- package/web-dist/assets/misans-500-109-CEtf3R4D.woff2 +0 -0
- package/web-dist/assets/misans-500-110-BSZSHYRL.woff2 +0 -0
- package/web-dist/assets/misans-500-111-DfdArrjn.woff2 +0 -0
- package/web-dist/assets/misans-500-112-DRtNyrQw.woff2 +0 -0
- package/web-dist/assets/misans-500-113-CDT7tKuB.woff2 +0 -0
- package/web-dist/assets/misans-500-114-CCh4jwL8.woff2 +0 -0
- package/web-dist/assets/misans-500-115-DplUgPp0.woff2 +0 -0
- package/web-dist/assets/misans-500-116-C7eCklyK.woff2 +0 -0
- package/web-dist/assets/misans-500-117-BA0KabyT.woff2 +0 -0
- package/web-dist/assets/misans-500-118-V_M0eu2q.woff2 +0 -0
- package/web-dist/assets/misans-500-119-Cgf3Hszt.woff2 +0 -0
- package/web-dist/assets/misans-500-21-Di6DyR6O.woff2 +0 -0
- package/web-dist/assets/misans-500-22-CSnXvtL-.woff2 +0 -0
- package/web-dist/assets/misans-500-23-A06Hm9a6.woff2 +0 -0
- package/web-dist/assets/misans-500-24-Df97RCik.woff2 +0 -0
- package/web-dist/assets/misans-500-25-bOSJ6YXH.woff2 +0 -0
- package/web-dist/assets/misans-500-26-C65icgBb.woff2 +0 -0
- package/web-dist/assets/misans-500-27-C_GRm0va.woff2 +0 -0
- package/web-dist/assets/misans-500-28-CzZkqO0l.woff2 +0 -0
- package/web-dist/assets/misans-500-29-BReyeRyX.woff2 +0 -0
- package/web-dist/assets/misans-500-30-DzfjlROz.woff2 +0 -0
- package/web-dist/assets/misans-500-31-B2nLpgdU.woff2 +0 -0
- package/web-dist/assets/misans-500-32-Bz3rHm8X.woff2 +0 -0
- package/web-dist/assets/misans-500-33-AU3lZ1vY.woff2 +0 -0
- package/web-dist/assets/misans-500-34-CBAWkH-I.woff2 +0 -0
- package/web-dist/assets/misans-500-35-VgnGd14P.woff2 +0 -0
- package/web-dist/assets/misans-500-36-B2kfXv6A.woff2 +0 -0
- package/web-dist/assets/misans-500-37-DhKo8ykb.woff2 +0 -0
- package/web-dist/assets/misans-500-38-D8tTxFuc.woff2 +0 -0
- package/web-dist/assets/misans-500-39-DTm3aqJQ.woff2 +0 -0
- package/web-dist/assets/misans-500-40-C_akwj8_.woff2 +0 -0
- package/web-dist/assets/misans-500-41-RVM1JHQW.woff2 +0 -0
- package/web-dist/assets/misans-500-42-MVWIN_il.woff2 +0 -0
- package/web-dist/assets/misans-500-43-BtLZYNyD.woff2 +0 -0
- package/web-dist/assets/misans-500-44-D0QHMl6G.woff2 +0 -0
- package/web-dist/assets/misans-500-45-DRlclX7-.woff2 +0 -0
- package/web-dist/assets/misans-500-46-BEWswL4N.woff2 +0 -0
- package/web-dist/assets/misans-500-47-COSoxWaW.woff2 +0 -0
- package/web-dist/assets/misans-500-48-DZAISq3n.woff2 +0 -0
- package/web-dist/assets/misans-500-49-KSfi7MW0.woff2 +0 -0
- package/web-dist/assets/misans-500-5-h1SBcwuW.woff2 +0 -0
- package/web-dist/assets/misans-500-50-CIVMfG11.woff2 +0 -0
- package/web-dist/assets/misans-500-51-BdeNBhBL.woff2 +0 -0
- package/web-dist/assets/misans-500-52-CEW4e7ex.woff2 +0 -0
- package/web-dist/assets/misans-500-53-lmPCsEnt.woff2 +0 -0
- package/web-dist/assets/misans-500-54-B_7AqKQW.woff2 +0 -0
- package/web-dist/assets/misans-500-55-B-3RtUnH.woff2 +0 -0
- package/web-dist/assets/misans-500-56-g6D0e0cW.woff2 +0 -0
- package/web-dist/assets/misans-500-57-D5hp5Yqr.woff2 +0 -0
- package/web-dist/assets/misans-500-58-ilnDgEKt.woff2 +0 -0
- package/web-dist/assets/misans-500-59-DJYXz8tr.woff2 +0 -0
- package/web-dist/assets/misans-500-6-uCdpdDQy.woff2 +0 -0
- package/web-dist/assets/misans-500-60-B3Iaqx0p.woff2 +0 -0
- package/web-dist/assets/misans-500-61-CMxqg5hc.woff2 +0 -0
- package/web-dist/assets/misans-500-62-7FY8O2NQ.woff2 +0 -0
- package/web-dist/assets/misans-500-63-JP6vEuJf.woff2 +0 -0
- package/web-dist/assets/misans-500-64-Cdub62jh.woff2 +0 -0
- package/web-dist/assets/misans-500-65-DVHk_mlC.woff2 +0 -0
- package/web-dist/assets/misans-500-66-BX39wRtF.woff2 +0 -0
- package/web-dist/assets/misans-500-67-BcsepI3X.woff2 +0 -0
- package/web-dist/assets/misans-500-68-etUIUjrh.woff2 +0 -0
- package/web-dist/assets/misans-500-69-DfhVmnuA.woff2 +0 -0
- package/web-dist/assets/misans-500-70-D6dgy6-B.woff2 +0 -0
- package/web-dist/assets/misans-500-71-PkeKjcVn.woff2 +0 -0
- package/web-dist/assets/misans-500-72-D66Fnb30.woff2 +0 -0
- package/web-dist/assets/misans-500-73-jr9z9870.woff2 +0 -0
- package/web-dist/assets/misans-500-74-DsCkPKwe.woff2 +0 -0
- package/web-dist/assets/misans-500-75-Dkooq6KM.woff2 +0 -0
- package/web-dist/assets/misans-500-76-B0sfieHl.woff2 +0 -0
- package/web-dist/assets/misans-500-77-8tflq1ji.woff2 +0 -0
- package/web-dist/assets/misans-500-78-COKdMbdp.woff2 +0 -0
- package/web-dist/assets/misans-500-79-Bm0rBjSF.woff2 +0 -0
- package/web-dist/assets/misans-500-80-B9OoAnyy.woff2 +0 -0
- package/web-dist/assets/misans-500-81-DsQ9tpfX.woff2 +0 -0
- package/web-dist/assets/misans-500-82-VKsL2Tk2.woff2 +0 -0
- package/web-dist/assets/misans-500-83-Ce6mfHYD.woff2 +0 -0
- package/web-dist/assets/misans-500-84-D7kPSZLm.woff2 +0 -0
- package/web-dist/assets/misans-500-85-W5L0cEfd.woff2 +0 -0
- package/web-dist/assets/misans-500-86-DukGOEET.woff2 +0 -0
- package/web-dist/assets/misans-500-87-BJ_Lok6j.woff2 +0 -0
- package/web-dist/assets/misans-500-88-DbJ11zcA.woff2 +0 -0
- package/web-dist/assets/misans-500-89-LNKcEq6M.woff2 +0 -0
- package/web-dist/assets/misans-500-90-DNDDgSCd.woff2 +0 -0
- package/web-dist/assets/misans-500-91-rT8Q0evu.woff2 +0 -0
- package/web-dist/assets/misans-500-97-c8zW_WRq.woff2 +0 -0
- package/web-dist/assets/misans-500-cyrillic-CLHOGwgx.woff2 +0 -0
- package/web-dist/assets/misans-500-extra-CTAMEQ59.woff2 +0 -0
- package/web-dist/assets/misans-500-latin-Be606ott.woff2 +0 -0
- package/web-dist/assets/misans-500-latin-ext-BzDyL4sU.woff2 +0 -0
- package/web-dist/assets/misans-500-vietnamese-DBOLOqZH.woff2 +0 -0
- package/web-dist/assets/mona-sans-latin-ext-wght-normal-BqSk0Z3x.woff2 +0 -0
- package/web-dist/assets/mona-sans-latin-wght-normal-Pz49MTQZ.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-100-wght-normal-DrqXJETY.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-101-wght-normal-c94LAl5p.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-102-wght-normal-C1RtbCZr.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-103-wght-normal-DGHo20nu.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-104-wght-normal-CJT2ioDJ.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-105-wght-normal-BFoiJwz2.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-106-wght-normal-D6uUHw3w.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-107-wght-normal-kFQzJDLH.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-108-wght-normal-7aXvqIa2.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-109-wght-normal-CnjNbNmw.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-110-wght-normal-D2JBr045.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-111-wght-normal-ClFr5QXM.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-112-wght-normal-CiZxJMyY.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-113-wght-normal-OgQXOX6x.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-114-wght-normal-CRH9SDZu.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-115-wght-normal-BN__2iBG.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-116-wght-normal-vdFVzbO2.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-117-wght-normal-Dsz3vkzU.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-118-wght-normal-BPEb0gM9.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-119-wght-normal-BfzSEbFz.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-21-wght-normal-DIu_1ZBI.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-22-wght-normal-VXjdYcT-.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-23-wght-normal-4HrHKhpL.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-24-wght-normal-B58DWgHS.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-25-wght-normal-C3Jm6l7O.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-26-wght-normal-YNOygvr_.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-27-wght-normal-BP2pEGQH.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-28-wght-normal-BWPKDbtH.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-29-wght-normal-45aVmHn_.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-30-wght-normal-B8_s30jZ.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-31-wght-normal-DW0t445S.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-32-wght-normal-ShbWPcei.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-33-wght-normal-BOTZYTjM.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-34-wght-normal-BF1rqDSt.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-35-wght-normal-Bosspiyr.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-36-wght-normal-CtU9CyKw.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-37-wght-normal-ghDiyiuv.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-38-wght-normal-4Nz8k_dt.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-39-wght-normal-Ddtm1XVC.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-4-wght-normal-BRbPMj-C.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-40-wght-normal-BVn4-kgX.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-41-wght-normal-CZqajZnl.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-42-wght-normal-CQ4lY28u.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-43-wght-normal-psppu0d8.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-44-wght-normal-cbKJlTUe.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-45-wght-normal-MKIEVRIC.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-46-wght-normal-CErGc6Mt.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-47-wght-normal-C5Kgg1_m.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-48-wght-normal-DFMjDDY6.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-49-wght-normal-B7l_3BZr.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-5-wght-normal-DI846rD9.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-50-wght-normal-C5KfAmFp.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-51-wght-normal-C2bq6hC8.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-52-wght-normal-P18e_Y0j.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-53-wght-normal-Bgkuo2tF.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-54-wght-normal-DL5lmlUd.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-55-wght-normal-BV_Oy6IF.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-56-wght-normal-B4L7Hj8f.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-57-wght-normal-DU8YBsDj.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-58-wght-normal-CE0BKS9u.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-59-wght-normal-Azv2Ku9_.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-6-wght-normal-ozUCEY9O.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-60-wght-normal-C1lngC61.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-61-wght-normal-BxWkGF5M.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-62-wght-normal-CXXMAq-5.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-63-wght-normal-4La5uKvS.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-64-wght-normal-CbIuD2Eg.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-65-wght-normal-BGqvKda2.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-66-wght-normal-BvNozWOY.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-67-wght-normal-CC-WRBV-.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-68-wght-normal-c0FjfUaj.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-69-wght-normal-D596Jjl2.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-70-wght-normal-ColEcmtJ.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-71-wght-normal-ChZfXpdg.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-72-wght-normal-D1VyfEG3.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-73-wght-normal-DwSJRYPJ.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-74-wght-normal-Cte7o1QG.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-75-wght-normal-B0qL41rF.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-76-wght-normal-BPLMO_2x.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-77-wght-normal-Dkbi3pye.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-78-wght-normal-BFUXeSw6.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-79-wght-normal-DoJG4UTB.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-80-wght-normal-BEFypWOO.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-81-wght-normal-ed_TZlfo.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-82-wght-normal-DcxfR5OJ.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-83-wght-normal-C9UjAcMM.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-84-wght-normal-C7NxT478.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-85-wght-normal-DBcDBu1n.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-86-wght-normal-CLJIoPpl.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-87-wght-normal-DYfJ-vGE.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-88-wght-normal-ClNDOCGW.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-89-wght-normal-IQU_KQA8.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-90-wght-normal-BWcrRNoG.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-91-wght-normal-CGekvDdH.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-97-wght-normal-BsBHkXi3.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-98-wght-normal-BZqSA1r_.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-99-wght-normal-Q_IptJM5.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-cyrillic-wght-normal-CRA5_Pf1.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-latin-ext-wght-normal-CqPqLCfe.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-latin-wght-normal-DYAKOyvl.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-vietnamese-wght-normal-y5SU35Rl.woff2 +0 -0
- package/web-dist/assets/ordinal-Cboi1Yqb.js +1 -0
- package/web-dist/assets/pegDiagram-XKGWAZYB-BUF_GJ0B.js +1 -0
- package/web-dist/assets/pieDiagram-E7YTZNPT-nweubbsU.js +39 -0
- package/web-dist/assets/quadrantDiagram-AXDQQJYC-B_r4Wkxy.js +7 -0
- package/web-dist/assets/railroadDiagram-O6MQD6OU-Dn7nm0MX.js +1 -0
- package/web-dist/assets/requirementDiagram-BXWQKSXE-DaagYJ49.js +84 -0
- package/web-dist/assets/sankeyDiagram-P5KCCOFB-CqEX6H-B.js +40 -0
- package/web-dist/assets/sequenceDiagram-WJ2MYXX4-BzLfQO55.js +162 -0
- package/web-dist/assets/sizeCapture-INFHLROL-BcUuVH2L.js +1 -0
- package/web-dist/assets/stateDiagram-D77RDMKH-BO3LWLvT.js +1 -0
- package/web-dist/assets/stateDiagram-v2-MP3YSRHH-B-EuucjM.js +1 -0
- package/web-dist/assets/swimlanes-42K2YHIH-etP_hkIB.js +1 -0
- package/web-dist/assets/swimlanesDiagram-VR7AAH4N-0JbFdDbQ.js +8 -0
- package/web-dist/assets/timeline-definition-24CTP7MA-CTLt2XCT.js +120 -0
- package/web-dist/assets/vennDiagram-4TSXK5OY-DPO6ZSvH.js +34 -0
- package/web-dist/assets/wardleyDiagram-VM6X3IG4-DFofGg8b.js +78 -0
- package/web-dist/assets/{xterm-B2oS8Mg8.js → xterm-RdyTuaAH.js} +1 -1
- package/web-dist/assets/xychartDiagram-S5SC5T6Z-Bgtb34Gu.js +7 -0
- package/web-dist/fonts-licenses/ibm-plex-sans-condensed.txt +93 -0
- package/web-dist/fonts-licenses/ibm-plex-sans.txt +93 -0
- package/web-dist/fonts-licenses/jetbrains-mono.txt +93 -0
- package/web-dist/fonts-licenses/misans.txt +119 -0
- package/web-dist/fonts-licenses/mona-sans.txt +93 -0
- package/web-dist/fonts-licenses/noto-sans-sc.txt +93 -0
- package/web-dist/index.html +24 -5
- package/web-dist/workbench-ui.css +266 -0
- package/dist/chunk-3I2XOPJB.js.map +0 -1
- package/dist/chunk-A3QANMU5.js.map +0 -1
- package/dist/chunk-L2H3K4DT.js +0 -7
- package/dist/chunk-L2H3K4DT.js.map +0 -1
- package/dist/chunk-S3BI6R7I.js +0 -14
- package/dist/chunk-S3BI6R7I.js.map +0 -1
- package/dist/chunk-TOOTEEM4.js.map +0 -1
- package/web-dist/assets/highlighter-CUb4XKtQ.js +0 -2
- package/web-dist/assets/index-CmfumtXy.js +0 -570
- package/web-dist/assets/index-Ywc2uM5u.css +0 -1
package/dist/api/types.js
CHANGED
package/dist/auth-token.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/** How a session was established, as stored. NULL on rows formed before the column existed. */
|
|
2
|
+
type SessionViaValue = "password" | "desktop" | "setup" | "cli" | "remote";
|
|
3
|
+
|
|
1
4
|
/** An hour: long enough for a controller to finish, short enough to forget. */
|
|
2
5
|
declare const CLI_TOKEN_TTL_MS: number;
|
|
3
6
|
/**
|
|
@@ -5,6 +8,22 @@ declare const CLI_TOKEN_TTL_MS: number;
|
|
|
5
8
|
* a token that lives in a file must not outlive an ordinary browser session.
|
|
6
9
|
*/
|
|
7
10
|
declare const CLI_TOKEN_MAX_TTL_MS: number;
|
|
11
|
+
/**
|
|
12
|
+
* What a minted row records about how its session was established.
|
|
13
|
+
*
|
|
14
|
+
* `cli` is the default and what `penguin auth token` writes: a session that behaves like a
|
|
15
|
+
* password one in every way. `desktop` is for the desktop shell signing its own window in
|
|
16
|
+
* against a server it did not spawn, and says the same thing its one-shot claim token says —
|
|
17
|
+
* with as much backing, since only an account that can write this file can mint at all.
|
|
18
|
+
*
|
|
19
|
+
* The distinction is not cosmetic: a desktop session may set a password without supplying the
|
|
20
|
+
* current one, because the account the shell created has a password that was generated,
|
|
21
|
+
* hashed and discarded unseen — there is nothing to supply, and whoever can write to this
|
|
22
|
+
* data root can already reset that password offline (`penguin server reset-admin-password`).
|
|
23
|
+
* That allowance is granted by a server running in desktop mode; against any other server the
|
|
24
|
+
* value records what the session is without widening what it may do (routes/me.ts).
|
|
25
|
+
*/
|
|
26
|
+
type MintedVia = Extract<SessionViaValue, "cli" | "desktop">;
|
|
8
27
|
type MintTokenResult = {
|
|
9
28
|
outcome: "minted";
|
|
10
29
|
token: string;
|
|
@@ -24,6 +43,8 @@ declare function mintApiToken(root: string, opts?: {
|
|
|
24
43
|
ttlMs?: number;
|
|
25
44
|
dbPath?: string;
|
|
26
45
|
now?: Date;
|
|
46
|
+
/** How the session records its own establishment; `cli` unless told otherwise. */
|
|
47
|
+
via?: MintedVia;
|
|
27
48
|
}): MintTokenResult;
|
|
28
49
|
|
|
29
|
-
export { CLI_TOKEN_MAX_TTL_MS, CLI_TOKEN_TTL_MS, type MintTokenResult, mintApiToken };
|
|
50
|
+
export { CLI_TOKEN_MAX_TTL_MS, CLI_TOKEN_TTL_MS, type MintTokenResult, type MintedVia, mintApiToken };
|
package/dist/auth-token.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AuthSessionsRepo,
|
|
3
3
|
UsersRepo
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-G7GY7PJU.js";
|
|
5
5
|
import {
|
|
6
6
|
openExistingDatabase
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-3SFJKLQU.js";
|
|
8
8
|
import "./chunk-B5IP37ZQ.js";
|
|
9
9
|
|
|
10
10
|
// src/auth-token.ts
|
|
@@ -35,7 +35,7 @@ function mintApiToken(root, opts = {}) {
|
|
|
35
35
|
}
|
|
36
36
|
const { token, expiresAt } = wire(AuthSessionsRepo, { db }).issue({
|
|
37
37
|
userId,
|
|
38
|
-
via: "cli",
|
|
38
|
+
via: opts.via ?? "cli",
|
|
39
39
|
now: opts.now ?? /* @__PURE__ */ new Date(),
|
|
40
40
|
ttlMs: opts.ttlMs ?? CLI_TOKEN_TTL_MS,
|
|
41
41
|
maxTtlMs: CLI_TOKEN_MAX_TTL_MS
|
package/dist/auth-token.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/auth-token.ts"],"sourcesContent":["/**\n * Mints an API session by inserting a row into the root's `web.db` — no running server needed.\n * Authorized by being able to read and write that root, which already holds every credential\n * the token could reach. On a multi-user box that means the OS account running the server;\n * everyone else signs in with `penguin auth login --server <url>`.\n */\nimport path from \"node:path\";\nimport fs from \"node:fs\";\nimport { openExistingDatabase } from \"./db/database.js\";\nimport { AuthSessionsRepo } from \"./db/repos/auth-sessions.js\";\nimport { UsersRepo } from \"./db/repos/users.js\";\nimport { wire } from \"@prismshadow/penguin-core/kernel\";\n\n/** An hour: long enough for a controller to finish, short enough to forget. */\nexport const CLI_TOKEN_TTL_MS = 60 * 60_000;\n\n/**\n * Ceiling on a caller-supplied `--ttl-seconds`, matching the default session TTL (config.ts):\n * a token that lives in a file must not outlive an ordinary browser session.\n */\nexport const CLI_TOKEN_MAX_TTL_MS = 30 * 24 * 60 * 60_000;\n\nexport type MintTokenResult =\n | { outcome: \"minted\"; token: string; userId: string; expiresAt: string }\n /** No web.db on this root — the server has never run here, so there is no account to mint for. */\n | { outcome: \"no_server\" }\n | { outcome: \"failed\"; detail: string };\n\n/**\n * Turns a failure into something the person at the terminal can act on. Both cases are\n * ordinary situations, not crashes: a database owned by another OS account, and one written\n * by an older release (minting deliberately does not migrate — see openExistingDatabase).\n */\nfunction explain(err: unknown, dbPath: string): string {\n const message = err instanceof Error ? err.message : String(err);\n if (message.includes(\"no column named via\")) {\n return `${dbPath} predates this release — start the server once (\\`penguin web\\`) to upgrade it`;\n }\n if (message.includes(\"unable to open database\")) {\n return (\n `cannot open ${dbPath} — minting needs the data root's own OS account; ` +\n \"otherwise sign in with `penguin auth login --server <url>`\"\n );\n }\n return message;\n}\n\n/** Issues an API session token for the data root at `root`. */\nexport function mintApiToken(\n root: string,\n opts: {
|
|
1
|
+
{"version":3,"sources":["../src/auth-token.ts"],"sourcesContent":["/**\n * Mints an API session by inserting a row into the root's `web.db` — no running server needed.\n * Authorized by being able to read and write that root, which already holds every credential\n * the token could reach. On a multi-user box that means the OS account running the server;\n * everyone else signs in with `penguin auth login --server <url>`.\n */\nimport path from \"node:path\";\nimport fs from \"node:fs\";\nimport { openExistingDatabase } from \"./db/database.js\";\nimport { AuthSessionsRepo } from \"./db/repos/auth-sessions.js\";\nimport type { SessionViaValue } from \"./db/repos/auth-sessions.js\";\nimport { UsersRepo } from \"./db/repos/users.js\";\nimport { wire } from \"@prismshadow/penguin-core/kernel\";\n\n/** An hour: long enough for a controller to finish, short enough to forget. */\nexport const CLI_TOKEN_TTL_MS = 60 * 60_000;\n\n/**\n * Ceiling on a caller-supplied `--ttl-seconds`, matching the default session TTL (config.ts):\n * a token that lives in a file must not outlive an ordinary browser session.\n */\nexport const CLI_TOKEN_MAX_TTL_MS = 30 * 24 * 60 * 60_000;\n\n/**\n * What a minted row records about how its session was established.\n *\n * `cli` is the default and what `penguin auth token` writes: a session that behaves like a\n * password one in every way. `desktop` is for the desktop shell signing its own window in\n * against a server it did not spawn, and says the same thing its one-shot claim token says —\n * with as much backing, since only an account that can write this file can mint at all.\n *\n * The distinction is not cosmetic: a desktop session may set a password without supplying the\n * current one, because the account the shell created has a password that was generated,\n * hashed and discarded unseen — there is nothing to supply, and whoever can write to this\n * data root can already reset that password offline (`penguin server reset-admin-password`).\n * That allowance is granted by a server running in desktop mode; against any other server the\n * value records what the session is without widening what it may do (routes/me.ts).\n */\nexport type MintedVia = Extract<SessionViaValue, \"cli\" | \"desktop\">;\n\nexport type MintTokenResult =\n | { outcome: \"minted\"; token: string; userId: string; expiresAt: string }\n /** No web.db on this root — the server has never run here, so there is no account to mint for. */\n | { outcome: \"no_server\" }\n | { outcome: \"failed\"; detail: string };\n\n/**\n * Turns a failure into something the person at the terminal can act on. Both cases are\n * ordinary situations, not crashes: a database owned by another OS account, and one written\n * by an older release (minting deliberately does not migrate — see openExistingDatabase).\n */\nfunction explain(err: unknown, dbPath: string): string {\n const message = err instanceof Error ? err.message : String(err);\n if (message.includes(\"no column named via\")) {\n return `${dbPath} predates this release — start the server once (\\`penguin web\\`) to upgrade it`;\n }\n if (message.includes(\"unable to open database\")) {\n return (\n `cannot open ${dbPath} — minting needs the data root's own OS account; ` +\n \"otherwise sign in with `penguin auth login --server <url>`\"\n );\n }\n return message;\n}\n\n/** Issues an API session token for the data root at `root`. */\nexport function mintApiToken(\n root: string,\n opts: {\n userId?: string;\n ttlMs?: number;\n dbPath?: string;\n now?: Date;\n /** How the session records its own establishment; `cli` unless told otherwise. */\n via?: MintedVia;\n } = {},\n): MintTokenResult {\n const userId = opts.userId ?? \"admin\";\n const dbPath = opts.dbPath ?? path.join(root, \"web.db\");\n // Existence check first: openExistingDatabase would otherwise create an empty file, and a\n // root with no web.db has no account to mint for.\n if (!fs.existsSync(dbPath)) return { outcome: \"no_server\" };\n\n let db: ReturnType<typeof openExistingDatabase> | null = null;\n try {\n db = openExistingDatabase(dbPath);\n if (wire(UsersRepo, { db: db }).findById(userId) === null) {\n return { outcome: \"failed\", detail: `no such account: ${userId}` };\n }\n // The repo is the single minting point (token shape, hash, TTL ceiling), so a CLI-minted\n // row cannot drift from one the server issues itself.\n const { token, expiresAt } = wire(AuthSessionsRepo, { db: db }).issue({\n userId,\n via: opts.via ?? \"cli\",\n now: opts.now ?? new Date(),\n ttlMs: opts.ttlMs ?? CLI_TOKEN_TTL_MS,\n maxTtlMs: CLI_TOKEN_MAX_TTL_MS,\n });\n return { outcome: \"minted\", token, userId, expiresAt };\n } catch (err) {\n return { outcome: \"failed\", detail: explain(err, dbPath) };\n } finally {\n db?.close();\n }\n}\n"],"mappings":";;;;;;;;;;AAMA,OAAO,UAAU;AACjB,OAAO,QAAQ;AAKf,SAAS,YAAY;AAGd,IAAM,mBAAmB,KAAK;AAM9B,IAAM,uBAAuB,KAAK,KAAK,KAAK;AA8BnD,SAAS,QAAQ,KAAc,QAAwB;AACrD,QAAM,UAAU,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG;AAC/D,MAAI,QAAQ,SAAS,qBAAqB,GAAG;AAC3C,WAAO,GAAG,MAAM;AAAA,EAClB;AACA,MAAI,QAAQ,SAAS,yBAAyB,GAAG;AAC/C,WACE,eAAe,MAAM;AAAA,EAGzB;AACA,SAAO;AACT;AAGO,SAAS,aACd,MACA,OAOI,CAAC,GACY;AACjB,QAAM,SAAS,KAAK,UAAU;AAC9B,QAAM,SAAS,KAAK,UAAU,KAAK,KAAK,MAAM,QAAQ;AAGtD,MAAI,CAAC,GAAG,WAAW,MAAM,EAAG,QAAO,EAAE,SAAS,YAAY;AAE1D,MAAI,KAAqD;AACzD,MAAI;AACF,SAAK,qBAAqB,MAAM;AAChC,QAAI,KAAK,WAAW,EAAE,GAAO,CAAC,EAAE,SAAS,MAAM,MAAM,MAAM;AACzD,aAAO,EAAE,SAAS,UAAU,QAAQ,oBAAoB,MAAM,GAAG;AAAA,IACnE;AAGA,UAAM,EAAE,OAAO,UAAU,IAAI,KAAK,kBAAkB,EAAE,GAAO,CAAC,EAAE,MAAM;AAAA,MACpE;AAAA,MACA,KAAK,KAAK,OAAO;AAAA,MACjB,KAAK,KAAK,OAAO,oBAAI,KAAK;AAAA,MAC1B,OAAO,KAAK,SAAS;AAAA,MACrB,UAAU;AAAA,IACZ,CAAC;AACD,WAAO,EAAE,SAAS,UAAU,OAAO,QAAQ,UAAU;AAAA,EACvD,SAAS,KAAK;AACZ,WAAO,EAAE,SAAS,UAAU,QAAQ,QAAQ,KAAK,MAAM,EAAE;AAAA,EAC3D,UAAE;AACA,QAAI,MAAM;AAAA,EACZ;AACF;","names":[]}
|
|
@@ -345,6 +345,243 @@ var MIGRATIONS = [
|
|
|
345
345
|
DROP TABLE IF EXISTS org_desk_notices;
|
|
346
346
|
`);
|
|
347
347
|
}
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
version: 9,
|
|
351
|
+
name: "model-promotions",
|
|
352
|
+
// Additive: one new table, nothing existing touched. A predecessor build never reads it
|
|
353
|
+
// and prices every row at the number in its Project file, so a rollback survives it.
|
|
354
|
+
swapSafe: true,
|
|
355
|
+
up(db) {
|
|
356
|
+
db.exec(`
|
|
357
|
+
CREATE TABLE IF NOT EXISTS model_promotions ( -- NOT a cache rebuildable from files: the only record of a Project row's running promotion (.project_config.toml keeps the list price), written by preset seeding at Project creation, "sync presets" and Penguin Go authorization / sync, and read by cost; lost rows price usage at list until the next sync writes them back
|
|
358
|
+
project_id TEXT NOT NULL REFERENCES projects(project_id) ON DELETE CASCADE,
|
|
359
|
+
provider TEXT NOT NULL,
|
|
360
|
+
model_id TEXT NOT NULL,
|
|
361
|
+
discount REAL NOT NULL CHECK (discount > 0 AND discount < 1),
|
|
362
|
+
updated_at TEXT NOT NULL,
|
|
363
|
+
PRIMARY KEY (project_id, provider, model_id)
|
|
364
|
+
);
|
|
365
|
+
`);
|
|
366
|
+
},
|
|
367
|
+
// LOSES every stored promotion: no file holds a copy of the fractions, so usage is priced
|
|
368
|
+
// at the Project files' list prices until the next "sync presets" or Penguin Go sync
|
|
369
|
+
// writes them back.
|
|
370
|
+
down(db) {
|
|
371
|
+
db.exec("DROP TABLE IF EXISTS model_promotions");
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
version: 10,
|
|
376
|
+
name: "model-provider-auth-tokens",
|
|
377
|
+
// Additive: one new table, nothing existing touched. A predecessor build never reads it;
|
|
378
|
+
// the access token already written into .project_config.toml keeps working until it
|
|
379
|
+
// expires, so rollback only loses silent refresh state.
|
|
380
|
+
// KEEP until every supported upgrade starts from schema 10 or newer. The release that
|
|
381
|
+
// raises the minimum database baseline past 9 owns removing this migration block and its
|
|
382
|
+
// version-9 fixture; the table itself remains while provider token refresh uses it.
|
|
383
|
+
swapSafe: true,
|
|
384
|
+
up(db) {
|
|
385
|
+
db.exec(`
|
|
386
|
+
CREATE TABLE IF NOT EXISTS model_provider_auth_tokens ( -- Server-side OAuth refresh metadata for provider groups. The current request token remains in .project_config.toml as api_key; this table holds only the refresh material that must never be returned to the frontend or written into Project files.
|
|
387
|
+
project_id TEXT NOT NULL REFERENCES projects(project_id) ON DELETE CASCADE,
|
|
388
|
+
provider TEXT NOT NULL,
|
|
389
|
+
refresh_token TEXT NOT NULL,
|
|
390
|
+
access_token_expires_at TEXT,
|
|
391
|
+
updated_at TEXT NOT NULL,
|
|
392
|
+
PRIMARY KEY (project_id, provider)
|
|
393
|
+
);
|
|
394
|
+
`);
|
|
395
|
+
},
|
|
396
|
+
// LOSES every stored refresh token and access-token expiry. Existing access tokens in
|
|
397
|
+
// Project files remain until they expire; users re-authorize to restore silent refresh.
|
|
398
|
+
down(db) {
|
|
399
|
+
db.exec("DROP TABLE IF EXISTS model_provider_auth_tokens");
|
|
400
|
+
}
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
version: 11,
|
|
404
|
+
name: "sessions-sandbox",
|
|
405
|
+
// The Session's own sandbox policy (JSON), snapshotted from the server's settings when
|
|
406
|
+
// the Session is created, so a later settings change leaves running Sessions alone.
|
|
407
|
+
// NULL = a row from before this column: it takes the settings in force at its next
|
|
408
|
+
// command and keeps them from then on. Swap-safe: a pushed platform boots against the
|
|
409
|
+
// runtime's already-open database, so the column has to arrive by a migration.
|
|
410
|
+
swapSafe: true,
|
|
411
|
+
up(db) {
|
|
412
|
+
ensureColumn(db, "sessions", "sandbox", "TEXT");
|
|
413
|
+
},
|
|
414
|
+
// Not a DROP: schema.ts declares the column, and dropping it would put every Session
|
|
415
|
+
// back under whatever the settings say.
|
|
416
|
+
down() {
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
version: 12,
|
|
421
|
+
name: "machines-columns",
|
|
422
|
+
// A machines table can predate migration 4 — a data root that ran the machines line
|
|
423
|
+
// before it was released kept forwards, not sessions — and that migration's IF NOT
|
|
424
|
+
// EXISTS adopted it whatever its columns were, so the first connect failed on the row's
|
|
425
|
+
// insert. Adds what is missing, nullable; a platform rolled back to 4 declared these
|
|
426
|
+
// columns itself, so there is nothing for it to mind.
|
|
427
|
+
swapSafe: true,
|
|
428
|
+
up(db) {
|
|
429
|
+
ensureColumn(db, "machines", "session_pid", "INTEGER");
|
|
430
|
+
ensureColumn(db, "machines", "platform", "TEXT");
|
|
431
|
+
},
|
|
432
|
+
// Nothing to undo: what this added, 4 already declares, and a column it found in place
|
|
433
|
+
// was never this migration's to take away.
|
|
434
|
+
down() {
|
|
435
|
+
}
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
version: 13,
|
|
439
|
+
name: "browser-extensions",
|
|
440
|
+
// Additive: one new table and its index. The Chrome backend's pairings — one row per
|
|
441
|
+
// PenguinHarness Browser extension a user paired, its token stored hashed. A predecessor
|
|
442
|
+
// build never reads the table, so a rollback survives it; the paired extensions then simply
|
|
443
|
+
// fail to connect until a build that knows them is back.
|
|
444
|
+
swapSafe: true,
|
|
445
|
+
up(db) {
|
|
446
|
+
db.exec(`
|
|
447
|
+
CREATE TABLE IF NOT EXISTS browser_extensions ( -- one row per Chrome paired to a user (builtin-browser/extension-pairing.ts): the PenguinHarness Browser extension's long-lived credential, stored only hashed; NOT rebuildable \u2014 a lost row means pairing that Chrome again
|
|
448
|
+
extension_id TEXT PRIMARY KEY,
|
|
449
|
+
user_id TEXT NOT NULL REFERENCES users(user_id) ON DELETE CASCADE,
|
|
450
|
+
token_hash TEXT NOT NULL UNIQUE,
|
|
451
|
+
name TEXT NOT NULL,
|
|
452
|
+
version TEXT NOT NULL,
|
|
453
|
+
created_at TEXT NOT NULL,
|
|
454
|
+
last_seen_at TEXT,
|
|
455
|
+
revoked_at TEXT
|
|
456
|
+
);
|
|
457
|
+
CREATE INDEX IF NOT EXISTS idx_browser_extensions_user ON browser_extensions(user_id);
|
|
458
|
+
`);
|
|
459
|
+
},
|
|
460
|
+
// LOSES every pairing: each user's Chrome has to be paired again (a new code from the
|
|
461
|
+
// Browser panel) before agents can drive it.
|
|
462
|
+
down(db) {
|
|
463
|
+
db.exec(`
|
|
464
|
+
DROP INDEX IF EXISTS idx_browser_extensions_user;
|
|
465
|
+
DROP TABLE IF EXISTS browser_extensions;
|
|
466
|
+
`);
|
|
467
|
+
}
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
version: 14,
|
|
471
|
+
name: "agent-api",
|
|
472
|
+
// Additive: two new tables and an index. The Agent API's per-Agent settings (the switch,
|
|
473
|
+
// keyless access, the approval mode API Sessions are created with) and its keys, stored
|
|
474
|
+
// hashed. A predecessor build never reads them and serves no /api/amsp route, so a
|
|
475
|
+
// rollback survives it: callers get 404 until a build that knows the tables is back.
|
|
476
|
+
swapSafe: true,
|
|
477
|
+
up(db) {
|
|
478
|
+
db.exec(`
|
|
479
|
+
CREATE TABLE IF NOT EXISTS agent_api ( -- per-Agent public API settings (amsp/routes.ts); NOT rebuildable from files
|
|
480
|
+
project_id TEXT NOT NULL,
|
|
481
|
+
agent_id TEXT NOT NULL,
|
|
482
|
+
enabled INTEGER NOT NULL DEFAULT 0,
|
|
483
|
+
open INTEGER NOT NULL DEFAULT 0,
|
|
484
|
+
approval_mode TEXT NOT NULL DEFAULT 'allow-all',
|
|
485
|
+
updated_at TEXT NOT NULL,
|
|
486
|
+
PRIMARY KEY (project_id, agent_id)
|
|
487
|
+
);
|
|
488
|
+
CREATE TABLE IF NOT EXISTS agent_api_keys ( -- one row per key the API tab or the CLI minted; the caller alone holds the key
|
|
489
|
+
key_id TEXT PRIMARY KEY,
|
|
490
|
+
project_id TEXT NOT NULL,
|
|
491
|
+
agent_id TEXT NOT NULL,
|
|
492
|
+
token_hash TEXT NOT NULL UNIQUE,
|
|
493
|
+
prefix TEXT NOT NULL,
|
|
494
|
+
name TEXT NOT NULL,
|
|
495
|
+
created_by TEXT NOT NULL REFERENCES users(user_id),
|
|
496
|
+
created_at TEXT NOT NULL,
|
|
497
|
+
last_used_at TEXT
|
|
498
|
+
);
|
|
499
|
+
CREATE INDEX IF NOT EXISTS idx_agent_api_keys_agent ON agent_api_keys(project_id, agent_id);
|
|
500
|
+
`);
|
|
501
|
+
},
|
|
502
|
+
// LOSES every Agent's API settings and every key: each exposed Agent reads as disabled
|
|
503
|
+
// again (404 to its callers), and every caller needs a newly created key once it is back
|
|
504
|
+
// on — no file holds a copy of either.
|
|
505
|
+
down(db) {
|
|
506
|
+
db.exec(`
|
|
507
|
+
DROP INDEX IF EXISTS idx_agent_api_keys_agent;
|
|
508
|
+
DROP TABLE IF EXISTS agent_api_keys;
|
|
509
|
+
DROP TABLE IF EXISTS agent_api;
|
|
510
|
+
`);
|
|
511
|
+
}
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
version: 15,
|
|
515
|
+
name: "messaging-conversations",
|
|
516
|
+
// Additive: one new table. The WeChat connector's per-(bot, user) delivery state — the
|
|
517
|
+
// context token every send must echo, how many sends it has funded, and replies held for
|
|
518
|
+
// the user's next message. A predecessor build never reads it and keeps its tokens in
|
|
519
|
+
// memory as it always did, so a rollback survives it.
|
|
520
|
+
swapSafe: true,
|
|
521
|
+
up(db) {
|
|
522
|
+
db.exec(`
|
|
523
|
+
CREATE TABLE IF NOT EXISTS messaging_conversations ( -- per-(bot, chat) delivery state a connector must keep across reconnects and restarts (WeChat: the context token, its send count, held replies); deleted once no messaging_bindings row references (channel, account_id) \u2014 see MessagingBindingsRepo
|
|
524
|
+
channel TEXT NOT NULL,
|
|
525
|
+
account_id TEXT NOT NULL,
|
|
526
|
+
chat_id TEXT NOT NULL,
|
|
527
|
+
state_json TEXT NOT NULL,
|
|
528
|
+
updated_at TEXT NOT NULL,
|
|
529
|
+
PRIMARY KEY (channel, account_id, chat_id)
|
|
530
|
+
);
|
|
531
|
+
`);
|
|
532
|
+
},
|
|
533
|
+
// LOSES every stored context token and every held reply: replies sent before each user's
|
|
534
|
+
// next message are refused again, and what was held never arrives.
|
|
535
|
+
down(db) {
|
|
536
|
+
db.exec("DROP TABLE IF EXISTS messaging_conversations");
|
|
537
|
+
}
|
|
538
|
+
},
|
|
539
|
+
{
|
|
540
|
+
version: 16,
|
|
541
|
+
name: "sessions-kept-at",
|
|
542
|
+
// The "keep in sidebar" mark: written when the user unarchives a Session, cleared when they
|
|
543
|
+
// archive it. The listing rule files a background Session (api / schedule / cli) away unless
|
|
544
|
+
// it carries the mark, so existing rows are listed by the rule as they stand and nothing is
|
|
545
|
+
// rewritten. Swap-safe: a pushed platform boots against the runtime's already-open database,
|
|
546
|
+
// so the column has to arrive by a migration.
|
|
547
|
+
swapSafe: true,
|
|
548
|
+
up(db) {
|
|
549
|
+
ensureColumn(db, "sessions", "kept_at", "TEXT");
|
|
550
|
+
},
|
|
551
|
+
// Not a DROP: schema.ts declares the column, and dropping it would file every kept
|
|
552
|
+
// background Session away again.
|
|
553
|
+
down() {
|
|
554
|
+
}
|
|
555
|
+
},
|
|
556
|
+
{
|
|
557
|
+
version: 17,
|
|
558
|
+
name: "agent-api-session-settings",
|
|
559
|
+
// Retain until the minimum supported database version exceeds 16; the maintainer raising
|
|
560
|
+
// that baseline removes this upgrade after all supported data roots have these columns.
|
|
561
|
+
// Nullable additions preserve existing keys, exposure, approvals and new-Session defaults.
|
|
562
|
+
swapSafe: true,
|
|
563
|
+
up(db) {
|
|
564
|
+
ensureColumn(db, "agent_api", "provider", "TEXT");
|
|
565
|
+
ensureColumn(db, "agent_api", "model_id", "TEXT");
|
|
566
|
+
ensureColumn(db, "agent_api", "thinking_level", "TEXT");
|
|
567
|
+
ensureColumn(db, "agent_api", "workspace", "TEXT");
|
|
568
|
+
},
|
|
569
|
+
// Keep the saved defaults on rollback; older builds ignore the additional columns.
|
|
570
|
+
down() {
|
|
571
|
+
}
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
version: 18,
|
|
575
|
+
name: "agent-api-concurrency",
|
|
576
|
+
// Retain until the minimum supported database version exceeds 17. The maintainer raising
|
|
577
|
+
// that baseline removes this upgrade once every supported data root has the column.
|
|
578
|
+
swapSafe: true,
|
|
579
|
+
up(db) {
|
|
580
|
+
ensureColumn(db, "agent_api", "max_concurrent_runs", "INTEGER NOT NULL DEFAULT 4");
|
|
581
|
+
},
|
|
582
|
+
// Keep the configured limit on rollback; older builds ignore this column.
|
|
583
|
+
down() {
|
|
584
|
+
}
|
|
348
585
|
}
|
|
349
586
|
];
|
|
350
587
|
var LATEST_VERSION = MIGRATIONS.reduce((n, m) => Math.max(n, m.version), 0);
|
|
@@ -386,6 +623,24 @@ function migrate(db, { swapPath = false } = {}) {
|
|
|
386
623
|
}
|
|
387
624
|
|
|
388
625
|
// src/db/schema.ts
|
|
626
|
+
var MODEL_PROMOTIONS_SQL = `
|
|
627
|
+
CREATE TABLE IF NOT EXISTS model_promotions ( -- NOT a cache rebuildable from files: the only record of a Project row's running promotion (.project_config.toml keeps the list price), written by preset seeding at Project creation, "sync presets" and Penguin Go authorization / sync, and read by cost; lost rows price usage at list until the next sync writes them back
|
|
628
|
+
project_id TEXT NOT NULL REFERENCES projects(project_id) ON DELETE CASCADE,
|
|
629
|
+
provider TEXT NOT NULL,
|
|
630
|
+
model_id TEXT NOT NULL,
|
|
631
|
+
discount REAL NOT NULL CHECK (discount > 0 AND discount < 1), -- fraction off the row's list price: billed = list \xD7 (1 \u2212 discount)
|
|
632
|
+
updated_at TEXT NOT NULL,
|
|
633
|
+
PRIMARY KEY (project_id, provider, model_id)
|
|
634
|
+
);`;
|
|
635
|
+
var MODEL_PROVIDER_AUTH_TOKENS_SQL = `
|
|
636
|
+
CREATE TABLE IF NOT EXISTS model_provider_auth_tokens ( -- Server-side OAuth refresh metadata for provider groups. The current request token remains in .project_config.toml as api_key; this table holds only the refresh material that must never be returned to the frontend or written into Project files.
|
|
637
|
+
project_id TEXT NOT NULL REFERENCES projects(project_id) ON DELETE CASCADE,
|
|
638
|
+
provider TEXT NOT NULL,
|
|
639
|
+
refresh_token TEXT NOT NULL,
|
|
640
|
+
access_token_expires_at TEXT,
|
|
641
|
+
updated_at TEXT NOT NULL,
|
|
642
|
+
PRIMARY KEY (project_id, provider)
|
|
643
|
+
);`;
|
|
389
644
|
var SCHEMA_SQL = `
|
|
390
645
|
CREATE TABLE IF NOT EXISTS users (
|
|
391
646
|
user_id TEXT PRIMARY KEY, -- semantic id doubles as login name: ^[a-z][a-z0-9_-]{1,31}$
|
|
@@ -404,7 +659,7 @@ CREATE TABLE IF NOT EXISTS auth_sessions (
|
|
|
404
659
|
user_id TEXT NOT NULL REFERENCES users(user_id) ON DELETE CASCADE,
|
|
405
660
|
created_at TEXT NOT NULL,
|
|
406
661
|
expires_at TEXT NOT NULL, -- 30-day sliding renewal, topped up in place when <29 days remain
|
|
407
|
-
via TEXT -- 'password'|'desktop'|'setup'|'cli'; NULL = legacy (password)
|
|
662
|
+
via TEXT -- 'password'|'desktop'|'setup'|'cli'|'remote'; NULL = legacy (password)
|
|
408
663
|
);
|
|
409
664
|
-- deleteExpired runs on every login and mint, deleteByUser on every admin reset; without
|
|
410
665
|
-- these both scan the whole table.
|
|
@@ -422,6 +677,8 @@ CREATE TABLE IF NOT EXISTS project_members ( -- member grants only; owners are
|
|
|
422
677
|
created_at TEXT NOT NULL,
|
|
423
678
|
PRIMARY KEY (project_id, user_id)
|
|
424
679
|
);
|
|
680
|
+
${MODEL_PROMOTIONS_SQL}
|
|
681
|
+
${MODEL_PROVIDER_AUTH_TOKENS_SQL}
|
|
425
682
|
CREATE TABLE IF NOT EXISTS agents ( -- index only; name/description live in system_config.yaml
|
|
426
683
|
project_id TEXT NOT NULL,
|
|
427
684
|
agent_id TEXT NOT NULL,
|
|
@@ -432,19 +689,21 @@ CREATE TABLE IF NOT EXISTS sessions (
|
|
|
432
689
|
session_id TEXT PRIMARY KEY,
|
|
433
690
|
project_id TEXT NOT NULL,
|
|
434
691
|
agent_id TEXT NOT NULL,
|
|
435
|
-
provider TEXT NOT NULL, -- provider group of the session model (paired with model_id as a model reference)
|
|
436
|
-
model_id TEXT NOT NULL, -- upstream model id (sent to
|
|
692
|
+
provider TEXT NOT NULL, -- provider group of the session's CURRENT model (paired with model_id as a model reference; moves with each in-session switch)
|
|
693
|
+
model_id TEXT NOT NULL, -- upstream model id of the current model (sent to MMSP as-is; never concatenate <provider>/<id>)
|
|
437
694
|
workspace TEXT NOT NULL,
|
|
438
695
|
approval_mode TEXT NOT NULL DEFAULT 'allow-all', -- allow-all|deny-all|read-only|always-ask
|
|
439
696
|
thinking_level TEXT, -- level pinned for THIS session (none|low|medium|high|xhigh|max); NULL=not pinned, runs follow the Agent config
|
|
440
697
|
title TEXT, -- auto-generated by the model after the first exchange; NULL=not yet (frontend shows "New chat")
|
|
441
|
-
archived_at TEXT, --
|
|
442
|
-
|
|
698
|
+
archived_at TEXT, -- the user archived it (ISO time); NULL = not archived by hand (the listing rule may still file it away)
|
|
699
|
+
kept_at TEXT, -- "keep in sidebar": set when the user unarchives, cleared when they archive; NULL = the listing rule decides (a background source is archived, a user Session is active). Never written by a run.
|
|
700
|
+
client TEXT, -- creating client: 'web' (created via the Web App) | 'cli' (adopted from a CLI Trace) | 'org' (company mode) | 'api' (an Agent API run); NULL = legacy row, treated as web
|
|
443
701
|
has_trace INTEGER NOT NULL DEFAULT 0, -- cache: a Trace record exists (set at task start / adoption / subagent registration; lazily backfilled by list hydration)
|
|
444
702
|
fork_count INTEGER NOT NULL DEFAULT 0, -- monotonically allocated child-fork number for this source Session; never decremented when a fork is deleted
|
|
703
|
+
sandbox TEXT, -- the Session's sandbox policy snapshot (JSON SandboxSettings); NULL = legacy row, snapshotted at its next command
|
|
445
704
|
last_active_at TEXT, -- last activity this server drove for the session (ISO; stamped once when a run starts and once when it ends, initialized to created_at); monotonic, never moves backwards; NULL only before openDatabase's one-time backfill
|
|
446
705
|
created_at TEXT NOT NULL
|
|
447
|
-
); -- the
|
|
706
|
+
); -- the Session's SOURCE (user/api/schedule/subagent/cli/company) is NOT stored: session_meta in the Trace is the single source of truth (see runtime/session-sources.ts); "client" is a different, DB-only axis (who created the row), read for the source only where the Trace records none ('org' \u2192 company)
|
|
448
707
|
CREATE INDEX IF NOT EXISTS idx_sessions_agent_created ON sessions(project_id, agent_id, created_at DESC);
|
|
449
708
|
CREATE TABLE IF NOT EXISTS usage_records (
|
|
450
709
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
@@ -471,7 +730,7 @@ CREATE TABLE IF NOT EXISTS error_records ( -- server-side error capture (the
|
|
|
471
730
|
project_id TEXT, -- nullable: sign-in/registration and process-level errors have no Project context
|
|
472
731
|
agent_id TEXT,
|
|
473
732
|
session_id TEXT,
|
|
474
|
-
source TEXT NOT NULL, -- http | session | usage | title | subagent | process | llm | environment | compaction | schedule | messaging
|
|
733
|
+
source TEXT NOT NULL, -- http | session | usage | title | subagent | process | llm | environment | compaction | schedule | messaging | organization | id_suggest | plugin
|
|
475
734
|
kind TEXT NOT NULL, -- expected (HttpError, business 4xx) | unexpected (500/runtime)
|
|
476
735
|
code TEXT NOT NULL, -- HttpError.code / internal / session_run_failed / ...
|
|
477
736
|
status INTEGER, -- HTTP status code; NULL for non-HTTP sources
|
|
@@ -509,10 +768,55 @@ CREATE TABLE IF NOT EXISTS messaging_bindings ( -- Session \u2194 messaging-chan
|
|
|
509
768
|
PRIMARY KEY (session_id, channel)
|
|
510
769
|
);
|
|
511
770
|
CREATE INDEX IF NOT EXISTS idx_messaging_by_account ON messaging_bindings(channel, account_id); -- serves the enable guard's by-account lookup; deliberately NOT unique, unlike its predecessor idx_messaging_account (dropped on open) which made an account exclusive to one Session forever
|
|
771
|
+
CREATE TABLE IF NOT EXISTS messaging_conversations ( -- per-(bot, chat) delivery state a connector must keep across reconnects and restarts (WeChat: the context token, its send count, held replies); deleted once no messaging_bindings row references (channel, account_id) \u2014 see MessagingBindingsRepo
|
|
772
|
+
channel TEXT NOT NULL, -- messaging channel discriminator (only 'wechat' writes rows today)
|
|
773
|
+
account_id TEXT NOT NULL, -- the bot, as messaging_bindings.account_id names it
|
|
774
|
+
chat_id TEXT NOT NULL, -- the connector's own chat id (wechat: the user's ilink_user_id)
|
|
775
|
+
state_json TEXT NOT NULL, -- connector-owned JSON (wechat: {contextToken, tokenAt, spent, held, heldSince}); the token is a conversation handle at rest, same trade-off as config_json's credentials
|
|
776
|
+
updated_at TEXT NOT NULL,
|
|
777
|
+
PRIMARY KEY (channel, account_id, chat_id)
|
|
778
|
+
);
|
|
512
779
|
CREATE TABLE IF NOT EXISTS ui_prefs (
|
|
513
780
|
user_id TEXT PRIMARY KEY REFERENCES users(user_id) ON DELETE CASCADE,
|
|
514
781
|
prefs_json TEXT NOT NULL -- {theme?, lastProjectId?, ...} free-form JSON
|
|
515
782
|
);
|
|
783
|
+
CREATE TABLE IF NOT EXISTS browser_extensions ( -- one row per Chrome paired to a user (builtin-browser/extension-pairing.ts): the PenguinHarness Browser extension's long-lived credential, stored only hashed; NOT rebuildable \u2014 a lost row means pairing that Chrome again
|
|
784
|
+
extension_id TEXT PRIMARY KEY, -- random id shown in the Web App's list
|
|
785
|
+
user_id TEXT NOT NULL REFERENCES users(user_id) ON DELETE CASCADE,
|
|
786
|
+
token_hash TEXT NOT NULL UNIQUE, -- sha256(token) hex; the extension alone holds the token
|
|
787
|
+
name TEXT NOT NULL, -- how the extension names this Chrome ("Chrome 130 on macOS")
|
|
788
|
+
version TEXT NOT NULL, -- the extension's version, as of its last hello
|
|
789
|
+
created_at TEXT NOT NULL,
|
|
790
|
+
last_seen_at TEXT, -- last connect or disconnect; NULL = never connected
|
|
791
|
+
revoked_at TEXT -- set by Revoke; a revoked token's socket is closed 4003
|
|
792
|
+
);
|
|
793
|
+
CREATE INDEX IF NOT EXISTS idx_browser_extensions_user ON browser_extensions(user_id);
|
|
794
|
+
CREATE TABLE IF NOT EXISTS agent_api ( -- per-Agent public API settings (amsp/routes.ts); NOT rebuildable from files
|
|
795
|
+
project_id TEXT NOT NULL,
|
|
796
|
+
agent_id TEXT NOT NULL,
|
|
797
|
+
enabled INTEGER NOT NULL DEFAULT 0, -- the API tab's switch; off = every /api/amsp request for it is 404 agent_not_found
|
|
798
|
+
open INTEGER NOT NULL DEFAULT 0, -- keyless access: a request without Authorization is accepted; off = 401 unauthorized
|
|
799
|
+
approval_mode TEXT NOT NULL DEFAULT 'allow-all', -- copied onto each new API Session
|
|
800
|
+
provider TEXT, -- NULL pair follows the Project default model
|
|
801
|
+
model_id TEXT,
|
|
802
|
+
thinking_level TEXT, -- NULL follows Agent/Project configuration
|
|
803
|
+
workspace TEXT, -- NULL creates a temporary Workspace
|
|
804
|
+
max_concurrent_runs INTEGER NOT NULL DEFAULT 4,
|
|
805
|
+
updated_at TEXT NOT NULL,
|
|
806
|
+
PRIMARY KEY (project_id, agent_id)
|
|
807
|
+
);
|
|
808
|
+
CREATE TABLE IF NOT EXISTS agent_api_keys ( -- one row per key the API tab or the CLI minted; the caller alone holds the key
|
|
809
|
+
key_id TEXT PRIMARY KEY, -- 16 base64url chars, shown in the list
|
|
810
|
+
project_id TEXT NOT NULL,
|
|
811
|
+
agent_id TEXT NOT NULL,
|
|
812
|
+
token_hash TEXT NOT NULL UNIQUE, -- sha256(key) hex
|
|
813
|
+
prefix TEXT NOT NULL, -- the key's first 16 characters ("penguin_" + 8), shown in the list
|
|
814
|
+
name TEXT NOT NULL, -- 1-64 characters
|
|
815
|
+
created_by TEXT NOT NULL REFERENCES users(user_id),
|
|
816
|
+
created_at TEXT NOT NULL,
|
|
817
|
+
last_used_at TEXT -- stamped once per run request that authenticated with it; NULL = never
|
|
818
|
+
);
|
|
819
|
+
CREATE INDEX IF NOT EXISTS idx_agent_api_keys_agent ON agent_api_keys(project_id, agent_id);
|
|
516
820
|
CREATE TABLE IF NOT EXISTS server_settings ( -- admin-level server-global settings (GET/PUT /api/admin/settings)
|
|
517
821
|
key TEXT PRIMARY KEY, -- setting name, e.g. 'proxy_for_app'
|
|
518
822
|
value TEXT NOT NULL -- JSON-encoded value; an absent row means the setting's built-in default
|
|
@@ -550,10 +854,10 @@ CREATE TABLE IF NOT EXISTS trace_sessions ( -- per-session facts read ONCE at
|
|
|
550
854
|
session_id TEXT PRIMARY KEY,
|
|
551
855
|
project_id TEXT NOT NULL,
|
|
552
856
|
agent_id TEXT NOT NULL,
|
|
553
|
-
source TEXT, -- session_meta
|
|
857
|
+
source TEXT, -- session_meta source as the head carried it: 'user' | 'api' | 'schedule' | 'subagent' | 'cli' | 'company'; NULL = the head records none (written before the source was required: read as 'company' for an 'org' row, else 'user' \u2014 readRecordedSource); 'benchmark' from older rows reads as 'cli' (normalizeSessionSource; meaningless while meta_read = 0)
|
|
554
858
|
workspace TEXT NOT NULL DEFAULT '',
|
|
555
859
|
title TEXT, -- first-prompt fallback title (sessions.title always wins when present)
|
|
556
|
-
provider TEXT, -- model reference from session_meta (CLI adoption reads it from here; NULL = meta unreadable / legacy without provider)
|
|
860
|
+
provider TEXT, -- model reference from session_meta: the model the Session was created on (CLI adoption reads it from here, and the runtime's own answer corrects the row at load; NULL = meta unreadable / legacy without provider)
|
|
557
861
|
model_id TEXT,
|
|
558
862
|
first_ts TEXT, -- first record's timestamp (adoption's createdAt fallback when the id embeds no time)
|
|
559
863
|
meta_read INTEGER NOT NULL DEFAULT 0 -- 1 once the head parsed; 0 = facts unknown, retried by the next reconcile that touches the session
|
|
@@ -666,6 +970,7 @@ function openDatabase(dbPath) {
|
|
|
666
970
|
ensureColumn(db, "sessions", "has_trace", "INTEGER NOT NULL DEFAULT 0");
|
|
667
971
|
ensureColumn(db, "sessions", "fork_count", "INTEGER NOT NULL DEFAULT 0");
|
|
668
972
|
ensureColumn(db, "sessions", "thinking_level", "TEXT");
|
|
973
|
+
ensureColumn(db, "sessions", "sandbox", "TEXT");
|
|
669
974
|
ensureColumn(db, "auth_sessions", "via", "TEXT");
|
|
670
975
|
ensureColumn(db, "trace_files", "page_stats", "TEXT");
|
|
671
976
|
ensureColumn(db, "messaging_bindings", "line_per_message", "INTEGER NOT NULL DEFAULT 0");
|
|
@@ -708,4 +1013,4 @@ export {
|
|
|
708
1013
|
openDatabaseReadOnly,
|
|
709
1014
|
openDatabase
|
|
710
1015
|
};
|
|
711
|
-
//# sourceMappingURL=chunk-
|
|
1016
|
+
//# sourceMappingURL=chunk-3SFJKLQU.js.map
|