orc-ai 0.1.49 → 0.1.51
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/index.js +519 -485
- package/dist/skills/orc-platform/SKILL.md +3 -1
- package/dist/skills/orc-platform/references/execution.md +3 -0
- package/dist/skills/orc-platform/references/scratchpads.md +140 -0
- package/dist/skills/orc-platform/references/web.md +112 -0
- package/dist/skills/orc-sdlc/references/planning.md +2 -0
- package/dist/web/assets/{Agents-C8dJX8px.js → Agents-Cuq9hQL1.js} +1 -1
- package/dist/web/assets/Assistant-Bold-gm-uSS1B.woff2 +0 -0
- package/dist/web/assets/Assistant-Medium-DrcxCXg3.woff2 +0 -0
- package/dist/web/assets/Assistant-Regular-DVxZuzxb.woff2 +0 -0
- package/dist/web/assets/Assistant-SemiBold-SCI4bEL9.woff2 +0 -0
- package/dist/web/assets/{Attention-BHYo8Lwr.js → Attention-Blme1iNv.js} +1 -1
- package/dist/web/assets/{Audit-CS_DZkbJ.js → Audit-CcdL6u56.js} +1 -1
- package/dist/web/assets/{ConfirmDialog-CrSa87VF.js → ConfirmDialog-UlZrlBrT.js} +1 -1
- package/dist/web/assets/Dashboard-u3v-obdz.js +1 -0
- package/dist/web/assets/{DocumentWorkspace-CNyVQTjg.js → DocumentWorkspace-B5QQ9h1l.js} +1 -1
- package/dist/web/assets/{EmptyState-Ctm7L70B.js → EmptyState-CLMWpYxU.js} +1 -1
- package/dist/web/assets/{ErrorState-BPTepwiG.js → ErrorState-_BM228mQ.js} +1 -1
- package/dist/web/assets/{FileEditor-Dh29_xCL.js → FileEditor-CGTsskO5.js} +1 -1
- package/dist/web/assets/{JobWebhooks-TvAY8p1V.js → JobWebhooks-CeHYIwjS.js} +1 -1
- package/dist/web/assets/{Jobs-C5ggSs2T.js → Jobs-B_HefXhI.js} +3 -3
- package/dist/web/assets/Knowledge-DtqZHvq9.js +28 -0
- package/dist/web/assets/{PackageCatalog-B1U3vfhW.js → PackageCatalog-C4JkAh_e.js} +5 -5
- package/dist/web/assets/{Pager-ClYYU9et.js → Pager-C4QwTsW7.js} +1 -1
- package/dist/web/assets/{PriorityBadge-BW-A50LE.js → PriorityBadge-q0hZXCLg.js} +1 -1
- package/dist/web/assets/Projects-Bqohd0oU.js +3 -0
- package/dist/web/assets/ResumeActions-Bihtv9n8.js +1 -0
- package/dist/web/assets/{Rules-DGKsAbTf.js → Rules-DbI3E-1N.js} +1 -1
- package/dist/web/assets/Scratchpads-CvYHDI3j.js +20 -0
- package/dist/web/assets/Sessions-mS5ivBxN.js +5 -0
- package/dist/web/assets/{Settings-yW1S2q4F.js → Settings-BcP04VXz.js} +6 -6
- package/dist/web/assets/{Skills-BwdXE5nT.js → Skills-Cs1JTSlV.js} +3 -3
- package/dist/web/assets/{SourceEditor-ft02z20v.js → SourceEditor-B66_SPOa.js} +1 -1
- package/dist/web/assets/{StatusBadge-C5G1fdZh.js → StatusBadge-BxSWnu8L.js} +1 -1
- package/dist/web/assets/TagInput-B3BLlodf.js +1 -0
- package/dist/web/assets/{TaskDetailSheet-fUSHPFB-.js → TaskDetailSheet-BnMsuYO6.js} +2 -2
- package/dist/web/assets/{Tasks-uRqvmLz7.js → Tasks-CZnulyFF.js} +5 -5
- package/dist/web/assets/{Terminals-W5nszLI1.js → Terminals-J-qPx71R.js} +5 -5
- package/dist/web/assets/{ViewHeader-DXR0ZaMO.js → ViewHeader-CG7vOMnJ.js} +1 -1
- package/dist/web/assets/{Webhooks-lXLoKWdt.js → Webhooks-DPpjIwP_.js} +1 -1
- package/dist/web/assets/abnfDiagram-VCTEODGH-qnCZr3qh.js +1 -0
- package/dist/web/assets/ar-SA-G6X2FPQ2-BNl3syL3.js +10 -0
- package/dist/web/assets/arc-DuthDAsq.js +1 -0
- package/dist/web/assets/architectureDiagram-5GKGNRK7-CuzhWFIn.js +36 -0
- package/dist/web/assets/arrow-left-DNp3aOhW.js +6 -0
- package/dist/web/assets/az-AZ-76LH7QW2-CSlBN4kF.js +1 -0
- package/dist/web/assets/bg-BG-XCXSNQG7-Dcs1AElN.js +5 -0
- package/dist/web/assets/{blockDiagram-I7D4REHJ-DMrufypV.js → blockDiagram-I7D4REHJ-CCIO0eI-.js} +3 -3
- package/dist/web/assets/bn-BD-2XOGV67Q-D9poNjDl.js +5 -0
- package/dist/web/assets/{c4Diagram-7LVT6UL2-BUUxjwvU.js → c4Diagram-7LVT6UL2-EDh4_U6t.js} +2 -2
- package/dist/web/assets/ca-ES-6MX7JW3Y-pTbaXdVe.js +8 -0
- package/dist/web/assets/channel-D-jHqOEf.js +1 -0
- package/dist/web/assets/chunk-2Q5K7J3B-Ccr7lFKH.js +1 -0
- package/dist/web/assets/{chunk-5VM5RSS4-B6lAVcgQ.js → chunk-5VM5RSS4-rFn8SpPH.js} +1 -1
- package/dist/web/assets/chunk-F27PBJKO-CDJpfkoq.js +1 -0
- package/dist/web/assets/{chunk-IMKFNOWR-CwyogA-y.js → chunk-IMKFNOWR-B3_FhSA0.js} +1 -1
- package/dist/web/assets/chunk-JWPE2WC7-sBjgi4vj.js +1 -0
- package/dist/web/assets/chunk-POPQ4Y6H-Dsox2izf.js +1 -0
- package/dist/web/assets/{chunk-SVP7TREG-CmiQdvOH.js → chunk-SVP7TREG-CzwNtBeO.js} +4 -4
- package/dist/web/assets/{chunk-TICWLB2K-CieIpfOy.js → chunk-TICWLB2K-C2vbibcd.js} +1 -1
- package/dist/web/assets/chunk-XXDRQBXY-V09kgMMs.js +1 -0
- package/dist/web/assets/classDiagram-ZZMXUADV-yk_1OWub.js +1 -0
- package/dist/web/assets/classDiagram-v2-VYDZK3BY-yk_1OWub.js +1 -0
- package/dist/web/assets/copy-DG3MHKpv.js +6 -0
- package/dist/web/assets/cose-bilkent-JH36ORCC-CJbRd_jc.js +1 -0
- package/dist/web/assets/cs-CZ-2BRQDIVT-DCTwXFkX.js +11 -0
- package/dist/web/assets/{cynefin-OW5HDTMX-vMXgcpgg.js → cynefin-OW5HDTMX-DQAC3glv.js} +1 -1
- package/dist/web/assets/cynefinDiagram-5FMLGOSQ-BzboBb_e.js +62 -0
- package/dist/web/assets/da-DK-5WZEPLOC-BAYPDSds.js +5 -0
- package/dist/web/assets/{dagre-GXQ25YYZ-xmoviGlr.js → dagre-GXQ25YYZ-C_-0NO8H.js} +2 -2
- package/dist/web/assets/de-DE-XR44H4JA-WTQ3THgd.js +8 -0
- package/dist/web/assets/{diagram-S7CK7UJ4-CguQzzXs.js → diagram-S7CK7UJ4-Dvi9imfs.js} +5 -5
- package/dist/web/assets/diagram-UQ7AKVKN-BoEKhuYx.js +41 -0
- package/dist/web/assets/{diagram-VSXAHHWV-cuhv3Fvj.js → diagram-VSXAHHWV-AoIN6taJ.js} +3 -3
- package/dist/web/assets/diagram-VX7I27RA-BIAMQMgb.js +24 -0
- package/dist/web/assets/diagram-Z3DM3KII-MXPt1bWW.js +24 -0
- package/dist/web/assets/directory-open-01563666-DWU9wJ6I.js +1 -0
- package/dist/web/assets/directory-open-4ed118d0-CunoC1EB.js +1 -0
- package/dist/web/assets/{download-UgMvjBjR.js → download-PQ08tuAg.js} +1 -1
- package/dist/web/assets/ebnfDiagram-PWID7BFC-BPO0ZRsN.js +1 -0
- package/dist/web/assets/el-GR-BZB4AONW-C6V4uhoK.js +10 -0
- package/dist/web/assets/erDiagram-RLTQ6QDP-BR2u7bIU.js +99 -0
- package/dist/web/assets/es-ES-U4NZUMDT-D_kwVnQr.js +9 -0
- package/dist/web/assets/eu-ES-A7QVB2H4-Eeu5vgta.js +11 -0
- package/dist/web/assets/excalidraw/fonts/Assistant/Assistant-Bold.woff2 +0 -0
- package/dist/web/assets/excalidraw/fonts/Assistant/Assistant-Medium.woff2 +0 -0
- package/dist/web/assets/excalidraw/fonts/Assistant/Assistant-Regular.woff2 +0 -0
- package/dist/web/assets/excalidraw/fonts/Assistant/Assistant-SemiBold.woff2 +0 -0
- package/dist/web/assets/excalidraw/fonts/Cascadia/CascadiaCode-Regular.woff2 +0 -0
- package/dist/web/assets/excalidraw/fonts/ComicShanns/ComicShanns-Regular-279a7b317d12eb88de06167bd672b4b4.woff2 +0 -0
- package/dist/web/assets/excalidraw/fonts/ComicShanns/ComicShanns-Regular-6e066e8de2ac57ea9283adb9c24d7f0c.woff2 +0 -0
- package/dist/web/assets/excalidraw/fonts/ComicShanns/ComicShanns-Regular-dc6a8806fa96795d7b3be5026f989a17.woff2 +0 -0
- package/dist/web/assets/excalidraw/fonts/ComicShanns/ComicShanns-Regular-fcb0fc02dcbee4c9846b3e2508668039.woff2 +0 -0
- package/dist/web/assets/excalidraw/fonts/Excalifont/Excalifont-Regular-349fac6ca4700ffec595a7150a0d1e1d.woff2 +0 -0
- package/dist/web/assets/excalidraw/fonts/Excalifont/Excalifont-Regular-3f2c5db56cc93c5a6873b1361d730c16.woff2 +0 -0
- package/dist/web/assets/excalidraw/fonts/Excalifont/Excalifont-Regular-41b173a47b57366892116a575a43e2b6.woff2 +0 -0
- package/dist/web/assets/excalidraw/fonts/Excalifont/Excalifont-Regular-623ccf21b21ef6b3a0d87738f77eb071.woff2 +0 -0
- package/dist/web/assets/excalidraw/fonts/Excalifont/Excalifont-Regular-a88b72a24fb54c9f94e3b5fdaa7481c9.woff2 +0 -0
- package/dist/web/assets/excalidraw/fonts/Excalifont/Excalifont-Regular-b9dcf9d2e50a1eaf42fc664b50a3fd0d.woff2 +0 -0
- package/dist/web/assets/excalidraw/fonts/Excalifont/Excalifont-Regular-be310b9bcd4f1a43f571c46df7809174.woff2 +0 -0
- package/dist/web/assets/excalidraw/fonts/Liberation/LiberationSans-Regular.woff2 +0 -0
- package/dist/web/assets/excalidraw/fonts/Lilita/Lilita-Regular-i7dPIFZ9Zz-WBtRtedDbYE98RXi4EwSsbg.woff2 +0 -0
- package/dist/web/assets/excalidraw/fonts/Lilita/Lilita-Regular-i7dPIFZ9Zz-WBtRtedDbYEF8RXi4EwQ.woff2 +0 -0
- package/dist/web/assets/excalidraw/fonts/Nunito/Nunito-Regular-XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTA3j6zbXWjgevT5.woff2 +0 -0
- package/dist/web/assets/excalidraw/fonts/Nunito/Nunito-Regular-XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTQ3j6zbXWjgeg.woff2 +0 -0
- package/dist/web/assets/excalidraw/fonts/Nunito/Nunito-Regular-XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTk3j6zbXWjgevT5.woff2 +0 -0
- package/dist/web/assets/excalidraw/fonts/Nunito/Nunito-Regular-XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTo3j6zbXWjgevT5.woff2 +0 -0
- package/dist/web/assets/excalidraw/fonts/Nunito/Nunito-Regular-XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTs3j6zbXWjgevT5.woff2 +0 -0
- package/dist/web/assets/excalidraw/fonts/Virgil/Virgil-Regular.woff2 +0 -0
- package/dist/web/assets/fa-IR-HGAKTJCU-CKd62s_f.js +8 -0
- package/dist/web/assets/fi-FI-Z5N7JZ37-CXq3Xbio.js +6 -0
- package/dist/web/assets/file-open-002ab408-DIuFHtCF.js +1 -0
- package/dist/web/assets/file-open-7c801643-684qeFg4.js +1 -0
- package/dist/web/assets/file-save-3189631c-C1wFhQhH.js +1 -0
- package/dist/web/assets/file-save-745eba88-Bb9F9Kg7.js +1 -0
- package/dist/web/assets/{flowDiagram-HODETNUW-DueO0Ju6.js → flowDiagram-HODETNUW-DtCUIQgA.js} +5 -5
- package/dist/web/assets/folder-open-D0jNv68L.js +11 -0
- package/dist/web/assets/fr-FR-RHASNOE6-BUQsSuUv.js +9 -0
- package/dist/web/assets/ganttDiagram-EL5Y4UJY-DtAyQ0Yy.js +292 -0
- package/dist/web/assets/gitGraphDiagram-WWUBYQGX-CoXp0Ypy.js +106 -0
- package/dist/web/assets/gl-ES-HMX3MZ6V-DW4qfI2b.js +10 -0
- package/dist/web/assets/he-IL-6SHJWFNN-DaY9mSnj.js +10 -0
- package/dist/web/assets/hi-IN-IWLTKZ5I-D2lbPu3U.js +4 -0
- package/dist/web/assets/highlighted-body-KPVGNVTW-BmPHGwPQ.js +1 -0
- package/dist/web/assets/hu-HU-A5ZG7DT2-Bos6dFhw.js +7 -0
- package/dist/web/assets/id-ID-SAP4L64H-cWyYCXM5.js +10 -0
- package/dist/web/assets/image-blob-reduce.esm-D6s-rqMO.js +7 -0
- package/dist/web/assets/index-CY60J5zm.css +1 -0
- package/dist/web/assets/{index-C_jtMgr7.js → index-CYCjrqhG.js} +124 -114
- package/dist/web/assets/index-CcfSzlv5.js +19 -0
- package/dist/web/assets/infoDiagram-27XIBGKW-C2Ypr-zs.js +2 -0
- package/dist/web/assets/{ishikawaDiagram-5VMMS53U-ccIPCUs4.js → ishikawaDiagram-5VMMS53U-Bx7qtMkV.js} +5 -5
- package/dist/web/assets/it-IT-JPQ66NNP-CRGQFEpH.js +11 -0
- package/dist/web/assets/ja-JP-DBVTYXUO-BXcfLN6y.js +8 -0
- package/dist/web/assets/{journeyDiagram-3NMN7TZE-rRe3uTLu.js → journeyDiagram-3NMN7TZE-rsuiVeG_.js} +2 -2
- package/dist/web/assets/kaa-6HZHGXH3-Bk6N-pLt.js +1 -0
- package/dist/web/assets/kab-KAB-ZGHBKWFO-Ctb8wAYx.js +8 -0
- package/dist/web/assets/{kanban-definition-UXKFOSKX-tAKCWntJ.js → kanban-definition-UXKFOSKX-5ktYMmTY.js} +6 -6
- package/dist/web/assets/kk-KZ-P5N5QNE5-CzQX2BL1.js +1 -0
- package/dist/web/assets/km-KH-HSX4SM5Z-DnDRwAqY.js +11 -0
- package/dist/web/assets/ko-KR-MTYHY66A-C6HKdiKS.js +9 -0
- package/dist/web/assets/ku-TR-6OUDTVRD-evaKSJwY.js +9 -0
- package/dist/web/assets/layout-DSZI9hxI.js +1 -0
- package/dist/web/assets/linear-omhrmwGQ.js +1 -0
- package/dist/web/assets/{list-BL4eRkIg.js → list-UGkABbTC.js} +1 -1
- package/dist/web/assets/live-sessions-C19eXx17.js +6 -0
- package/dist/web/assets/lt-LT-XHIRWOB4-BS7h6VOT.js +3 -0
- package/dist/web/assets/lv-LV-5QDEKY6T-CvKj-LUX.js +7 -0
- package/dist/web/assets/mermaid-HWGCJPDP-B_H4rk_s.js +299 -0
- package/dist/web/assets/mermaid.core-Bs68JjJM.js +312 -0
- package/dist/web/assets/{mindmap-definition-YA3MSWOX-Cj5-j6a7.js → mindmap-definition-YA3MSWOX-DKG9LDwL.js} +4 -4
- package/dist/web/assets/mr-IN-CRQNXWMA-C_9ZWEOY.js +13 -0
- package/dist/web/assets/my-MM-5M5IBNSE-Bic5Rd4I.js +1 -0
- package/dist/web/assets/nb-NO-T6EIAALU-BN5D6e6X.js +10 -0
- package/dist/web/assets/nl-NL-IS3SIHDZ-CLmoJxpw.js +8 -0
- package/dist/web/assets/nn-NO-6E72VCQL-DH3pWtEG.js +8 -0
- package/dist/web/assets/oc-FR-POXYY2M6-DzJwOBaL.js +8 -0
- package/dist/web/assets/pa-IN-N4M65BXN-CxFRfqt4.js +4 -0
- package/dist/web/assets/pegDiagram-XKGWAZYB-D_-uCYBR.js +1 -0
- package/dist/web/assets/{pencil-gxvh59uO.js → pencil-_hID3D0m.js} +1 -1
- package/dist/web/assets/percentages-BXMCSKIN-DGBKIvAv.css +1 -0
- package/dist/web/assets/percentages-BXMCSKIN-DtfDKj6k.js +180 -0
- package/dist/web/assets/pica-sWD7KYN4.js +7 -0
- package/dist/web/assets/pieDiagram-E7YTZNPT-Cxcz8v2V.js +39 -0
- package/dist/web/assets/pl-PL-T2D74RX3-DFEd2a_2.js +9 -0
- package/dist/web/assets/pt-BR-5N22H2LF-d_zvXQ30.js +9 -0
- package/dist/web/assets/pt-PT-UZXXM6DQ-5FeuC95-.js +9 -0
- package/dist/web/assets/{quadrantDiagram-AXDQQJYC-DKTP6jS5.js → quadrantDiagram-AXDQQJYC-5W1D624h.js} +1 -1
- package/dist/web/assets/railroadDiagram-O6MQD6OU-BZhsOHVF.js +1 -0
- package/dist/web/assets/{requirementDiagram-BXWQKSXE-B9hH69zu.js → requirementDiagram-BXWQKSXE-BXlonflD.js} +2 -2
- package/dist/web/assets/ro-RO-JPDTUUEW-CAJt20_T.js +11 -0
- package/dist/web/assets/roundRect-0PYZxl1G.js +1 -0
- package/dist/web/assets/ru-RU-B4JR7IUQ-BL-2B7Np.js +9 -0
- package/dist/web/assets/sankeyDiagram-P5KCCOFB-BZVh-M1g.js +40 -0
- package/dist/web/assets/{save-CYoz3QKB.js → save-C0v-3p0L.js} +1 -1
- package/dist/web/assets/save-file-B_ZN6-id.js +1 -0
- package/dist/web/assets/scratchpad-routes-DvtErr_v.js +11 -0
- package/dist/web/assets/scroll-area-Bgn8q6dm.js +1 -0
- package/dist/web/assets/{sequenceDiagram-WJ2MYXX4-BF77J63J.js → sequenceDiagram-WJ2MYXX4-B2WHT4e0.js} +2 -2
- package/dist/web/assets/si-LK-N5RQ5JYF-BwL9NXm1.js +1 -0
- package/dist/web/assets/sizeCapture-INFHLROL-BI8hpcc0.js +1 -0
- package/dist/web/assets/sk-SK-C5VTKIMK-DEJmCOdH.js +6 -0
- package/dist/web/assets/sl-SI-NN7IZMDC-BNyfGsJr.js +6 -0
- package/dist/web/assets/stateDiagram-D77RDMKH-yCTyY4sx.js +1 -0
- package/dist/web/assets/stateDiagram-v2-MP3YSRHH-DMV9Hi6h.js +1 -0
- package/dist/web/assets/subset-shared.chunk-en_zPkcm.js +84 -0
- package/dist/web/assets/subset-worker.chunk-D4Jfgczh.js +1 -0
- package/dist/web/assets/sv-SE-XGPEYMSR-CcrID0kB.js +10 -0
- package/dist/web/assets/swimlanes-42K2YHIH-CsXemLHu.js +1 -0
- package/dist/web/assets/swimlanesDiagram-VR7AAH4N-wKC0jJ-D.js +8 -0
- package/dist/web/assets/ta-IN-2NMHFXQM-1Q6gAmCa.js +9 -0
- package/dist/web/assets/{table-D3N_5Wee.js → table-D-x54JQs.js} +1 -1
- package/dist/web/assets/tabs-Dwtb498J.js +1 -0
- package/dist/web/assets/th-TH-HPSO5L25-Osf6RMxs.js +2 -0
- package/dist/web/assets/{timeline-definition-24CTP7MA-owGoHn8z.js → timeline-definition-24CTP7MA-BcjYHSKM.js} +8 -8
- package/dist/web/assets/tr-TR-DEFEU3FU-olIwbQqc.js +7 -0
- package/dist/web/assets/{trash-2-D3Ey4I09.js → trash-2-C4wuE82r.js} +1 -1
- package/dist/web/assets/uk-UA-QMV73CPH-_0ICAhhw.js +6 -0
- package/dist/web/assets/{upload-DhVOCWST.js → upload-Cq-d5iVn.js} +1 -1
- package/dist/web/assets/{useDetailRoute-j9nlwack.js → useDetailRoute-DiC2IR0t.js} +1 -1
- package/dist/web/assets/{useJobs-Dcl-Vim3.js → useJobs-TDZx1N1l.js} +1 -1
- package/dist/web/assets/{useKnowledge-gIjk0_I1.js → useKnowledge-cE7nsoOf.js} +1 -1
- package/dist/web/assets/{useListSelection-CSQd_Hmx.js → useListSelection-tj_f-2Ad.js} +1 -1
- package/dist/web/assets/{useMemories-B8Zpz0Qz.js → useMemories-rjShoqd3.js} +1 -1
- package/dist/web/assets/useProjectScope-DaFHoG4_.js +1 -0
- package/dist/web/assets/{useSessions-BrdK-12R.js → useSessions-BNsSZXqv.js} +1 -1
- package/dist/web/assets/vennDiagram-4TSXK5OY-BIC5NL2Q.js +34 -0
- package/dist/web/assets/vi-VN-M7AON7JQ-CZHjInAz.js +5 -0
- package/dist/web/assets/{view-params-Bm1Qf6KC.js → view-params-Duc_5Bxj.js} +1 -1
- package/dist/web/assets/{wardleyDiagram-VM6X3IG4-D9GbTBKy.js → wardleyDiagram-VM6X3IG4-BJqqp-BL.js} +2 -2
- package/dist/web/assets/{xychartDiagram-S5SC5T6Z-BFqPF2Hl.js → xychartDiagram-S5SC5T6Z-CMANcsti.js} +4 -4
- package/dist/web/assets/zh-CN-LNUGB5OW-z21ZnHQB.js +10 -0
- package/dist/web/assets/zh-HK-E62DVLB3-C-RnadUL.js +1 -0
- package/dist/web/assets/zh-TW-RAJ6MFWO-Vua3CLAj.js +9 -0
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/dist/web/assets/Dashboard-V813oIhq.js +0 -1
- package/dist/web/assets/Knowledge-BpiN3iVE.js +0 -28
- package/dist/web/assets/Projects-DRao5Qpk.js +0 -3
- package/dist/web/assets/ResumeActions-DHTOr6GQ.js +0 -11
- package/dist/web/assets/Sessions-CWHU6sYy.js +0 -5
- package/dist/web/assets/abnfDiagram-VCTEODGH-K8P_VxLi.js +0 -1
- package/dist/web/assets/arc-BOl9BKfD.js +0 -1
- package/dist/web/assets/architectureDiagram-5GKGNRK7-DIZ15fO5.js +0 -36
- package/dist/web/assets/channel-CQFNQIhG.js +0 -1
- package/dist/web/assets/chunk-2Q5K7J3B-wRIxA2_q.js +0 -1
- package/dist/web/assets/chunk-F27PBJKO-DVuei-Pl.js +0 -1
- package/dist/web/assets/chunk-JWPE2WC7-zdsOarNZ.js +0 -1
- package/dist/web/assets/chunk-POPQ4Y6H-D3ieeKih.js +0 -1
- package/dist/web/assets/chunk-XXDRQBXY-BoTHwisB.js +0 -1
- package/dist/web/assets/classDiagram-ZZMXUADV-B5yD90Df.js +0 -1
- package/dist/web/assets/classDiagram-v2-VYDZK3BY-B5yD90Df.js +0 -1
- package/dist/web/assets/cose-bilkent-JH36ORCC-CtGsuuTW.js +0 -1
- package/dist/web/assets/cynefinDiagram-5FMLGOSQ-kMbm5D7e.js +0 -62
- package/dist/web/assets/diagram-UQ7AKVKN-CMX0u7Gf.js +0 -41
- package/dist/web/assets/diagram-VX7I27RA-Bp_JbX0e.js +0 -24
- package/dist/web/assets/diagram-Z3DM3KII-oZ6jRSCd.js +0 -24
- package/dist/web/assets/ebnfDiagram-PWID7BFC-DbxnEjb0.js +0 -1
- package/dist/web/assets/erDiagram-RLTQ6QDP-Cl5kXPho.js +0 -99
- package/dist/web/assets/folder-open-DojCP5NP.js +0 -16
- package/dist/web/assets/ganttDiagram-EL5Y4UJY-DNjT4iVH.js +0 -292
- package/dist/web/assets/gitGraphDiagram-WWUBYQGX-B4aUQ9gY.js +0 -106
- package/dist/web/assets/highlighted-body-KPVGNVTW-gt1u8RcC.js +0 -1
- package/dist/web/assets/index-CyjfnRiI.css +0 -1
- package/dist/web/assets/infoDiagram-27XIBGKW-CWcOvNAB.js +0 -2
- package/dist/web/assets/layout-7xCiQ5Mn.js +0 -1
- package/dist/web/assets/linear-WCNhc07o.js +0 -1
- package/dist/web/assets/mermaid-HWGCJPDP-C8QwWdo5.js +0 -609
- package/dist/web/assets/pegDiagram-XKGWAZYB-BYB3oVZ_.js +0 -1
- package/dist/web/assets/pieDiagram-E7YTZNPT-CSbpzXas.js +0 -39
- package/dist/web/assets/railroadDiagram-O6MQD6OU-Ct8aPeLX.js +0 -1
- package/dist/web/assets/refresh-cw-BQRdbjy6.js +0 -6
- package/dist/web/assets/sankeyDiagram-P5KCCOFB-CDqNONxU.js +0 -40
- package/dist/web/assets/scroll-area-CU4DGUBA.js +0 -1
- package/dist/web/assets/sizeCapture-INFHLROL-Dpubco_U.js +0 -1
- package/dist/web/assets/stateDiagram-D77RDMKH-CzslKEYw.js +0 -1
- package/dist/web/assets/stateDiagram-v2-MP3YSRHH-DKbNjyV-.js +0 -1
- package/dist/web/assets/swimlanes-42K2YHIH-bD_tUjo6.js +0 -1
- package/dist/web/assets/swimlanesDiagram-VR7AAH4N-0wAluWQF.js +0 -8
- package/dist/web/assets/tabs-CSlEXoxD.js +0 -1
- package/dist/web/assets/useProjectScope-Dk0mjyHf.js +0 -1
- package/dist/web/assets/vennDiagram-4TSXK5OY-D0_6bldW.js +0 -34
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: orc-platform
|
|
3
|
-
description: "
|
|
3
|
+
description: "Operate ORC: CLI/API/MCP, auth/settings, projects, tasks/flows, memory/KB/digests/embeddings, sessions/handoff, terminals/chat, jobs/gateway, agents/backends/packages, Git/GitHub/SSH, rules/hooks, tags/audit, scratchpads (plans, diagrams, HTML), dashboard links."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Operate ORC
|
|
@@ -34,8 +34,10 @@ verify the returned hash/size without loading the script body into context.
|
|
|
34
34
|
| Request | Reference |
|
|
35
35
|
| --- | --- |
|
|
36
36
|
| Install, connect an agent, CLI/API/MCP, configure auth, diagnose connectivity | [Setup and interfaces](references/setup.md) |
|
|
37
|
+
| Build dashboard links, open resources, choose session reading vs. chat/terminal continuation | [Web navigation and links](references/web.md) |
|
|
37
38
|
| Recall, create, correct or undo short facts | [Memory](references/memory.md) |
|
|
38
39
|
| KB intake/search/edit, parsers, embeddings, README/Markdown and living Learnings digests | [Knowledge and documentation](references/knowledge.md) |
|
|
40
|
+
| Scratchpads: plans/docs with mermaid, Excalidraw diagrams, interactive HTML pages with or without ORC access | [Scratchpads](references/scratchpads.md) |
|
|
39
41
|
| Projects, tasks/flows, jobs, gateway, status, tags and audit | [Work and operations](references/work.md) |
|
|
40
42
|
| Session continuity/handoff, terminals, chat, SSH execution, Git/GitHub | [Sessions and execution](references/execution.md) |
|
|
41
43
|
| Archive local coding sessions on remote ORC, incremental sync/deduplication, session retrieval design | [Session archive and search](references/session-archive.md) |
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Sources: [Live sessions](https://github.com/niradler/orc/blob/master/docs/live-sessions.md), [Handoff](https://github.com/niradler/orc/blob/master/docs/session-handoff.md).
|
|
4
4
|
|
|
5
|
+
For dashboard URLs, session ID distinctions, and reading versus resuming links,
|
|
6
|
+
see [Web navigation and links](web.md).
|
|
7
|
+
|
|
5
8
|
## Session continuity
|
|
6
9
|
|
|
7
10
|
For bulk/offline local history sync, use [session-archive.md](session-archive.md).
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
# Scratchpads
|
|
2
|
+
|
|
3
|
+
A scratchpad is a working file a human and agents keep and revisit: a plan, a design
|
|
4
|
+
note, a diagram, an interactive page. The human opens it at the deep link that
|
|
5
|
+
`pad_create` returns (`/scratchpad/<id>`, under Library) and can edit it there.
|
|
6
|
+
Use the KB for cited, durable knowledge; memory for short facts; tasks for tracked
|
|
7
|
+
work. A pad is for thinking, showing and iterating with the human.
|
|
8
|
+
|
|
9
|
+
## Collaborate through a pad
|
|
10
|
+
|
|
11
|
+
A pad is a shared surface: the human edits it in the dashboard while agents read and
|
|
12
|
+
write it through MCP/CLI, and every save is a new revision attributed to its author.
|
|
13
|
+
|
|
14
|
+
1. **Agent drafts, human shapes.** Draft the plan, design or diagram as a pad, send
|
|
15
|
+
the link and ask for edits in place instead of a long chat reply. The human
|
|
16
|
+
rewrites sections, ticks checklist items, drags diagram boxes or answers inline.
|
|
17
|
+
2. **Re-read before you continue.** When the human says they changed it (or before
|
|
18
|
+
acting on it later), `pad_get` it and treat their edits as the decision: removed
|
|
19
|
+
steps are out of scope, rewritten text is the new requirement. Say what you took
|
|
20
|
+
from their change.
|
|
21
|
+
3. **Write back without clobbering.** Update with `if_revision`; on a conflict, re-read
|
|
22
|
+
and merge. Keep the human's wording where they edited; change your own sections.
|
|
23
|
+
4. **Mark open questions in the pad.** Use a `## Open questions` list or `- [ ]`
|
|
24
|
+
items addressed to the human; when they answer in the pad, fold the answer into
|
|
25
|
+
the plan and remove the question.
|
|
26
|
+
5. **Hand over between agents and sessions.** Pads outlive the session. Link a
|
|
27
|
+
handoff, task or session event to the pad id; the next agent finds it with
|
|
28
|
+
`pad_list({session:"current"})`, `pad_list({project, q})` or the id, and continues
|
|
29
|
+
from the latest revision rather than a stale local copy.
|
|
30
|
+
6. **Show, then decide.** For choices that are easier to see than describe (UI
|
|
31
|
+
options, data shape, chart of results), make an `html` or `diagram` pad and ask
|
|
32
|
+
the human to pick. For live ORC data, ask them to "Render with ORC access" after
|
|
33
|
+
they have looked at the page.
|
|
34
|
+
|
|
35
|
+
Approval in a pad is the human's edit or explicit reply, not the absence of changes.
|
|
36
|
+
When a pad settles a durable decision, record it where it belongs (task, KB, memory)
|
|
37
|
+
and link back to the pad.
|
|
38
|
+
|
|
39
|
+
## Choose the kind
|
|
40
|
+
|
|
41
|
+
| Need | Kind | Content |
|
|
42
|
+
| --- | --- | --- |
|
|
43
|
+
| Plan, spec, RCA, review notes, checklist, flow/sequence diagram | `doc` | Markdown; ```` ```mermaid ```` blocks render as diagrams |
|
|
44
|
+
| Freeform architecture sketch, whiteboard the human will rearrange | `diagram` | `.excalidraw` JSON |
|
|
45
|
+
| Interactive page: chart, calculator, prototype, dashboard, board | `html` | One standalone HTML document |
|
|
46
|
+
|
|
47
|
+
Prefer `doc` with mermaid when the diagram follows from structure (flows, states,
|
|
48
|
+
sequences, ER). Use `diagram` when layout matters or the human will draw on it.
|
|
49
|
+
|
|
50
|
+
## Create, read, update
|
|
51
|
+
|
|
52
|
+
- MCP: `pad_create({kind, title, content?, project?, tags?})` → id, revision, link.
|
|
53
|
+
Give the human the link. Pads link to the current agent session by default
|
|
54
|
+
(`link_session:false` to skip); `project` is optional.
|
|
55
|
+
- `pad_list({project?, session:"current", kind?, q?})` finds pads; `pad_get({id})`
|
|
56
|
+
returns the header then the raw file.
|
|
57
|
+
- `pad_update({id, content, if_revision})` replaces the whole file. Always pass the
|
|
58
|
+
revision from your last `pad_get`: the human may have edited it. On a mismatch,
|
|
59
|
+
re-read, merge their change and retry; never drop their edit.
|
|
60
|
+
- Large content: create empty, then `pad_update({id, via:"url", if_revision})` and
|
|
61
|
+
`curl -T file <upload_url>`; read with `pad_get({id, via:"url"})`. The upload URL
|
|
62
|
+
only replaces content: change title, tags or project in a separate `pad_update`.
|
|
63
|
+
A stale `if_revision` is refused when minting, and an upload after someone else's
|
|
64
|
+
save is refused with 409.
|
|
65
|
+
- CLI: `orc pad ls|show|new <kind> <title> -f file|pull <id> [file]|push <id> <file> -r <rev>|rm`.
|
|
66
|
+
`pull` then `push -r` is the safe edit loop for a local file.
|
|
67
|
+
- Deleting is permanent; delete only pads you created or were told to remove.
|
|
68
|
+
|
|
69
|
+
## Plans and docs (`doc`)
|
|
70
|
+
|
|
71
|
+
Write normal Markdown: headings, task lists (`- [ ]`), tables, code. For a living
|
|
72
|
+
plan, keep a short "Status" section at the top and append a dated log rather than
|
|
73
|
+
rewriting history. Diagrams:
|
|
74
|
+
|
|
75
|
+
````markdown
|
|
76
|
+
```mermaid
|
|
77
|
+
flowchart LR
|
|
78
|
+
A[Request] --> B{Cached?}
|
|
79
|
+
B -- yes --> C[Return]
|
|
80
|
+
B -- no --> D[Fetch] --> C
|
|
81
|
+
```
|
|
82
|
+
````
|
|
83
|
+
|
|
84
|
+
Keep each mermaid block small and valid; one broken block shows an error in place.
|
|
85
|
+
|
|
86
|
+
## Diagrams (`diagram`)
|
|
87
|
+
|
|
88
|
+
Content is an Excalidraw file. Omit content for an empty canvas the human draws on.
|
|
89
|
+
A minimal file:
|
|
90
|
+
|
|
91
|
+
```json
|
|
92
|
+
{"type":"excalidraw","version":2,"elements":[
|
|
93
|
+
{"id":"api","type":"rectangle","x":0,"y":0,"width":160,"height":60},
|
|
94
|
+
{"id":"api-label","type":"text","x":20,"y":20,"text":"API","fontSize":20,
|
|
95
|
+
"containerId":"api"}
|
|
96
|
+
],"appState":{}}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Give elements stable ids so later updates can change them in place. Read the current
|
|
100
|
+
file before editing; the human may have moved things. Image export (PNG/SVG) is a
|
|
101
|
+
human action in the UI.
|
|
102
|
+
|
|
103
|
+
## Interactive pages (`html`)
|
|
104
|
+
|
|
105
|
+
The page is one HTML document. Inline your CSS/JS or load libraries from a CDN with a
|
|
106
|
+
pinned version and `integrity` + `crossorigin` attributes.
|
|
107
|
+
|
|
108
|
+
**Without ORC access (default).** The page runs in a sandboxed frame with an opaque
|
|
109
|
+
origin: scripts, forms, popups and alerts work, but it cannot read ORC's storage, use the
|
|
110
|
+
dashboard's credentials or navigate the dashboard. Embed the data it needs in the
|
|
111
|
+
page (a JSON `<script>` block or a JS constant). This is right for charts of data you
|
|
112
|
+
already have, prototypes and calculators.
|
|
113
|
+
|
|
114
|
+
**With ORC access.** Only the human can grant it, per view, with "Render with ORC
|
|
115
|
+
access". The page stays in the sandbox and gets `window.orc.fetch(path, init)`; the
|
|
116
|
+
dashboard makes each call as that human and does not hand the page the API secret
|
|
117
|
+
(`path` is an API path starting with `/`, e.g. `/tasks?limit=100`; paths that leave
|
|
118
|
+
the API are refused; `init` takes `method`,
|
|
119
|
+
`headers` and a string/Blob/ArrayBuffer `body`; it returns a fetch `Response`). Access
|
|
120
|
+
ends when they go back to the sandbox, leave, discard to another author's version,
|
|
121
|
+
or anyone else edits the pad. Links the page navigates to do not get access. Write the
|
|
122
|
+
page so it works both ways:
|
|
123
|
+
|
|
124
|
+
```html
|
|
125
|
+
<script>
|
|
126
|
+
const live = Boolean(window.orc);
|
|
127
|
+
async function loadTasks() {
|
|
128
|
+
if (!live) return SAMPLE_TASKS; // still useful in the sandbox
|
|
129
|
+
const res = await orc.fetch("/tasks?limit=100");
|
|
130
|
+
if (!res.ok) throw new Error(`ORC API ${res.status}`);
|
|
131
|
+
return (await res.json()).tasks;
|
|
132
|
+
}
|
|
133
|
+
</script>
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Show which mode the page is in and tell the human that live data needs "Render with
|
|
137
|
+
ORC access". Check routes and limits in the OpenAPI spec (`/openapi.json`) rather than
|
|
138
|
+
guessing. Writes (`POST`/`PATCH`) act as the human: make each one an explicit user
|
|
139
|
+
action in the page, never a side effect of loading. Never put secrets or tokens in a
|
|
140
|
+
pad, and never ask the human to grant access to a page they have not looked at.
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Web navigation and links
|
|
2
|
+
|
|
3
|
+
Use this when an answer should take the user to an ORC resource. Resolve the
|
|
4
|
+
resource with ORC tools first; prefer its returned link when available.
|
|
5
|
+
|
|
6
|
+
## Build a link
|
|
7
|
+
|
|
8
|
+
- In dashboard chat, root-relative Markdown links work: `[Open task](/tasks/<task-id>)`.
|
|
9
|
+
Outside the dashboard, use the selected installation's **browser-visible origin**
|
|
10
|
+
(for example `https://orc.example.com`) plus the path. Do not infer that origin
|
|
11
|
+
from an internal MCP address, SSH host, API override, or development port.
|
|
12
|
+
- Dashboard routes do **not** start with `/api`. API endpoints and MCP URLs are
|
|
13
|
+
interfaces for tools, not links to a resource's dashboard page.
|
|
14
|
+
- Encode each dynamic path segment with `encodeURIComponent`; build query strings
|
|
15
|
+
with `URLSearchParams`. Use actual returned IDs/names, never titles as IDs.
|
|
16
|
+
- `?project=<project-id>` scopes the view; use the returned project ID, although
|
|
17
|
+
MCP's `project` argument uses a readable name. `all` and `unassigned` are view
|
|
18
|
+
scopes. Include scope when omission could hide the resource under a saved filter.
|
|
19
|
+
- To keep a specific chat open while navigating elsewhere, add `chat=open` and
|
|
20
|
+
`chatThread=<thread-uuid>` to the destination's query. Carry relevant workspace
|
|
21
|
+
state, not unrelated list filters or credentials.
|
|
22
|
+
|
|
23
|
+
```js
|
|
24
|
+
const path = `/tasks/${encodeURIComponent(task.id)}`;
|
|
25
|
+
const query = new URLSearchParams({ project: task.project_id ?? "unassigned" });
|
|
26
|
+
const relative = `${path}?${query}`;
|
|
27
|
+
// For a link outside dashboard chat, browserOrigin must be the verified public UI origin.
|
|
28
|
+
const absolute = new URL(relative, browserOrigin).href;
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Resource routes
|
|
32
|
+
|
|
33
|
+
Angle-bracket values below are placeholders, encoded as individual components.
|
|
34
|
+
|
|
35
|
+
| Resource / intent | Dashboard path | Identifier / behavior |
|
|
36
|
+
| --- | --- | --- |
|
|
37
|
+
| Activity | `/activity` | Dashboard overview |
|
|
38
|
+
| Attention | `/attention` | Items needing human input |
|
|
39
|
+
| Tasks / task detail | `/tasks`, `/tasks/<task-id>` | ORC task ID; detail includes its flow |
|
|
40
|
+
| Jobs / job detail | `/jobs`, `/jobs/<job-id>` | ORC job ID |
|
|
41
|
+
| Webhooks | `/webhooks` | List; no per-source detail route |
|
|
42
|
+
| Projects / project detail | `/projects`, `/projects/<project-id>` | ORC project ID |
|
|
43
|
+
| Discovered sessions | `/sessions?session=<live-session-id>` | ORC discovered-session record ID; opens its detail/transcript |
|
|
44
|
+
| Recorded session logs | `/audit`, `/audit/<logged-session-id>` | ORC logged-session ID; summaries/events, not native transcript |
|
|
45
|
+
| Existing chat | `/activity?chat=open&chatThread=<thread-uuid>` | ORC chat thread UUID; opens it and follows a running turn |
|
|
46
|
+
| New chat panel | `/activity?chat=open` | Opens chat workspace; may restore the user's existing tabs |
|
|
47
|
+
| Terminals / one terminal | `/terminals`, `/terminals/<terminal-id>` | Terminal ID from the terminal API |
|
|
48
|
+
| A discovered session's terminal | `/terminals?session=<live-session-id>` | Finds its running terminal; otherwise offers a start action |
|
|
49
|
+
| Knowledge base | `/knowledge/base?kb=<kb-id>` | KB ID |
|
|
50
|
+
| Knowledge document | `/knowledge/base?kb=<kb-id>&document=<document-id>` | Include both IDs to select its KB and document |
|
|
51
|
+
| Memories / one memory | `/knowledge/memories`, `/knowledge/memories/<project-id>/<memory-name>` | Memory identity is project ID plus name |
|
|
52
|
+
| Skills / one skill | `/skills`, `/skills/<skill-name>` | Skill name, not a numeric ID; include project scope for overrides |
|
|
53
|
+
| Packages / one package | `/packages`, `/packages/item/<package-name>` | Package name |
|
|
54
|
+
| Agents / one agent | `/packages/agents`, `/packages/agents/<agent-id>` | ORC agent definition ID |
|
|
55
|
+
| Rules | `/rules` | List; no per-rule detail route |
|
|
56
|
+
| Scratchpads / one pad | `/scratchpad`, `/scratchpad/<pad-id>` | Pad ID; prefer the link returned by `pad_create` |
|
|
57
|
+
| Settings | `/settings` | Page; do not invent tab/subsection URL parameters |
|
|
58
|
+
|
|
59
|
+
Use the canonical routes above rather than legacy `/dashboard`, `/overview`,
|
|
60
|
+
`/knowledge`, or `/agents` redirects. There is no current `/flows` dashboard route;
|
|
61
|
+
link the task for its flow. Unknown paths redirect to Activity, so an HTTP 200 or
|
|
62
|
+
a loaded SPA shell does not establish that a detail link works.
|
|
63
|
+
|
|
64
|
+
Useful shareable filters (combine with `project` as needed):
|
|
65
|
+
|
|
66
|
+
| Page | Query parameters |
|
|
67
|
+
| --- | --- |
|
|
68
|
+
| Tasks | `q`, `status`, `priority`, `view=board\|table` |
|
|
69
|
+
| Sessions | `q` (search activates at two characters), `agent`, `ended=0` (hide ended), `order=asc\|desc` |
|
|
70
|
+
| Knowledge | `kb`, `document`, `q`, `label`, `searchAll=1` (search all KBs) |
|
|
71
|
+
| Memories | `memoryQuery`, `memorySort=reads\|recent\|priority` |
|
|
72
|
+
| Packages | `q`, `format` (use a value supported by the current catalog) |
|
|
73
|
+
|
|
74
|
+
## Read a session or continue it
|
|
75
|
+
|
|
76
|
+
These identifiers are different: the discovered-session record's `id`, its native
|
|
77
|
+
`session_id`, a logged-session ID, an archive ID, a chat thread UUID, and a terminal
|
|
78
|
+
ID. Match agent, host and cwd when mapping between them. Never substitute a native
|
|
79
|
+
CLI session ID into the `session=` web parameter.
|
|
80
|
+
|
|
81
|
+
- **Read:** link `/sessions?session=<record-id>` for a discovered conversation, or
|
|
82
|
+
`/audit/<id>` when the requested result is a recorded work log. Session searches
|
|
83
|
+
can also link `/sessions?q=<query>&project=<scope>`.
|
|
84
|
+
- **Open an existing chat:** use its thread UUID with `chat=open&chatThread=...`.
|
|
85
|
+
That URL loads the chat; it does not submit a new message or start another turn.
|
|
86
|
+
- **Continue a discovered session in chat:** follow [execution.md](execution.md).
|
|
87
|
+
For eligible ended Claude/Codex sessions, the UI's **Open in chat** action calls
|
|
88
|
+
authenticated `POST /api/chat/threads` with `{sourceSessionId: record.id}`. Use
|
|
89
|
+
the returned thread UUID for the chat link. There is no direct native-session
|
|
90
|
+
resume query parameter. If only offering continuation, link its session detail
|
|
91
|
+
and name the action; do not prepare/start it just to manufacture a link.
|
|
92
|
+
- **Continue in terminal:** prefer `/terminals?session=<record-id>` for sharing
|
|
93
|
+
an existing session's terminal; it survives replacement of that terminal's ID.
|
|
94
|
+
If no terminal runs, this page offers **Open in terminal**; visiting it does not
|
|
95
|
+
launch an agent. An authorized request to actually resume requires the launch
|
|
96
|
+
described in [execution.md](execution.md), then verification of the returned
|
|
97
|
+
terminal/host/cwd. Plain shell terminals use `/terminals/<terminal-id>`.
|
|
98
|
+
- **Archived session:** currently its transcript dialog is selected in local UI
|
|
99
|
+
state, with no archive-specific deep link. Link `/sessions?q=<encoded-query>`
|
|
100
|
+
with the right project and tell the user which archived result to open. Do not
|
|
101
|
+
invent `/sessions/<archive-id>` or `archive=`. For native continuation, use
|
|
102
|
+
[session-archive.md](session-archive.md) to prepare the archive before resuming.
|
|
103
|
+
|
|
104
|
+
## When routes change
|
|
105
|
+
|
|
106
|
+
This is a source-backed route guide, not a promise that every installed version
|
|
107
|
+
supports every route. Check the selected version when behavior differs. In a
|
|
108
|
+
checkout, the authoritative sources are `packages/web/src/App.tsx`, query consumers
|
|
109
|
+
in the views/components, `hooks/useChat.ts`, and the helpers
|
|
110
|
+
`lib/{terminal-links,memory-routes,scratchpad-routes,workspace-navigation}.ts`.
|
|
111
|
+
Update this reference alongside URL-contract changes. Validate the selected
|
|
112
|
+
resource and action in the page, not just that its URL returns HTML.
|
|
@@ -74,6 +74,8 @@ state owner and module responsibilities before implementation. Compare alternati
|
|
|
74
74
|
only when a consequential choice is unresolved. A focused prototype can settle an
|
|
75
75
|
empirical fork; several competing implementations are not mandatory. Keep sketches
|
|
76
76
|
in the existing plan/handoff; do not add empty production scaffolding by default.
|
|
77
|
+
When the human should review, comment on or reshape a plan, design or diagram, put it
|
|
78
|
+
in an ORC scratchpad and share its link (`orc-platform`, scratchpads reference).
|
|
77
79
|
|
|
78
80
|
Map each criterion to the relevant implementation step and verification evidence.
|
|
79
81
|
Trace affected public contracts, callers, stored state and version compatibility;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as b,j as e,m as J,n as X,o as Z,p as M,I,B as k,W as B,O as ee,a as te,u as Y,b as T,L as ae,
|
|
1
|
+
import{r as b,j as e,m as J,n as X,o as Z,p as M,I,B as k,W as B,O as ee,a as te,u as Y,b as T,L as ae,ai as ne,aj as se,ak as re,al as ie,am as oe,an as de,D as U,d as D}from"./index-CYCjrqhG.js";import{p as le,i as q}from"./public-api-BvD4z7ja.js";import{C as ce}from"./ConfirmDialog-UlZrlBrT.js";import{E as G}from"./ErrorState-_BM228mQ.js";import{V as ue}from"./ViewHeader-CG7vOMnJ.js";import{u as me}from"./useDetailRoute-DiC2IR0t.js";import{u as W}from"./view-params-Duc_5Bxj.js";const z={specialist:`---
|
|
2
2
|
name: Specialist
|
|
3
3
|
description: Describe when to use this specialist
|
|
4
4
|
---
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{G as y,j as t,r as v,a as N,b,d as f,B as c,T as k}from"./index-CYCjrqhG.js";import{V as S}from"./ViewHeader-CG7vOMnJ.js";function A({request:e}){var g;const[r,d]=v.useState(""),[i,l]=v.useState([]),u=N(),n=b({mutationFn:s=>f.humanRequests.respond(e.id,e.version,s),onSettled:()=>u.invalidateQueries({queryKey:["human-requests"]})}),p=b({mutationFn:()=>f.humanRequests.cancel(e.id,e.version),onSettled:()=>u.invalidateQueries({queryKey:["human-requests"]})}),o=e.status==="pending",a=(g=e.input.action)==null?void 0:g.input,m=a!=null&&a.item&&typeof a.item=="object"?a.item:void 0,h=typeof(a==null?void 0:a.threadId)=="string",x=h?{...Object.fromEntries(Object.entries(a??{}).filter(([s])=>!["threadId","turnId","itemId","startedAtMs","item","availableDecisions","proposedExecpolicyAmendment","commandActions","kind"].includes(s))),...m!=null&&m.changes?{changes:m.changes}:{}}:a;return t.jsxs("article",{"data-testid":`attention-request-${e.id}`,className:"rounded-lg border border-border bg-surface p-5 space-y-4",children:[t.jsxs("div",{className:"flex flex-wrap justify-between gap-2 text-xs text-outline",children:[t.jsxs("span",{children:[e.input.kind==="question"?"Question":"Approval"," ·"," ",e.input.origin.backend]}),t.jsx("span",{children:o?"Waiting for you":e.status==="unavailable"?"Agent unavailable":"Answered · waiting for agent delivery"})]}),t.jsx("h2",{className:"text-base font-medium whitespace-pre-wrap",children:e.input.prompt}),t.jsxs("p",{className:"text-xs text-outline break-all",children:["Session ",e.input.origin.session_id]}),e.input.action&&t.jsxs("div",{className:"space-y-2 text-sm",children:[t.jsxs("p",{children:["Host: ",t.jsx("strong",{children:e.input.action.host})," · Folder: ",e.input.action.cwd]}),t.jsxs("pre",{"data-testid":"attention-action",className:"whitespace-pre-wrap break-all rounded-md bg-background p-3 text-xs",children:[e.input.action.tool,`
|
|
2
2
|
`,JSON.stringify(x&&Object.keys(x).length?x:a,null,2)]}),h&&t.jsxs("details",{className:"text-xs text-outline",children:[t.jsx("summary",{className:"cursor-pointer",children:"Full request details"}),t.jsx("pre",{className:"whitespace-pre-wrap break-all mt-2",children:JSON.stringify(a,null,2)})]}),t.jsx("p",{className:"text-outline",children:"Your approval lets this agent continue with its existing permissions."})]}),o&&e.input.kind==="question"&&t.jsxs("form",{className:"space-y-3",onSubmit:s=>{s.preventDefault(),n.mutate({kind:"question",answer:r,...i.length?{selected_choices:i}:{}})},children:[t.jsx("div",{className:"flex flex-wrap gap-2",children:e.input.choices.map(s=>t.jsxs(c,{variant:(e.input.multi_select?i.includes(s):r===s)?"default":"outline",type:"button",className:"h-auto min-h-9 flex-col items-start whitespace-normal text-left",disabled:n.isPending,"data-testid":`attention-choice-${s}`,onClick:()=>{if(e.input.multi_select){const j=i.includes(s)?i.filter(w=>w!==s):[...i,s];l(j),d(j.join(", "))}else d(s)},children:[t.jsx("span",{children:s}),Object.keys(e.input.choice_descriptions).includes(s)&&e.input.choice_descriptions[s]&&t.jsx("span",{className:"text-xs font-normal opacity-75 max-w-sm",children:e.input.choice_descriptions[s]})]},s))}),t.jsxs("label",{htmlFor:`answer-${e.id}`,className:"block text-sm space-y-2",children:[t.jsx("span",{children:"Your answer"}),t.jsx(k,{id:`answer-${e.id}`,"data-testid":"attention-answer",value:r,onChange:s=>{d(s.target.value),l([])},maxLength:16e3,disabled:n.isPending})]}),t.jsx(c,{"data-testid":"attention-send",type:"submit",disabled:!r.trim()||n.isPending,children:n.isPending?"Sending…":"Send answer"})]}),o&&e.input.kind==="approval"&&t.jsxs("div",{className:"flex gap-3",children:[t.jsx(c,{"data-testid":"attention-approve",disabled:n.isPending,onClick:()=>n.mutate({kind:"approval",approved:!0}),children:"Approve"}),t.jsx(c,{"data-testid":"attention-deny",variant:"outline",disabled:n.isPending,onClick:()=>n.mutate({kind:"approval",approved:!1}),children:"Deny"})]}),e.response&&t.jsx("p",{"data-testid":"attention-response",className:"text-sm whitespace-pre-wrap",children:e.response.kind==="question"?e.response.answer:e.response.approved?"Approved":"Denied"}),e.delivery_error&&t.jsx("p",{role:"status",className:"text-sm text-error",children:e.delivery_error}),(o||e.status==="unavailable")&&t.jsx(c,{"data-testid":"attention-cancel",variant:"ghost",disabled:n.isPending||p.isPending,onClick:()=>p.mutate(),children:o?"Cancel request":"Dismiss"}),p.error&&t.jsx("p",{role:"alert",children:p.error.message}),n.error&&t.jsx("p",{role:"alert","data-testid":"attention-error",className:"text-sm text-destructive",children:n.error.message})]})}function P(){var r,d,i;const e=y();return t.jsxs("div",{"data-testid":"attention-view",className:"max-w-4xl",children:[t.jsx(S,{title:"Attention needed",meta:"Questions and approvals from your agents"}),e.isLoading&&t.jsx("p",{role:"status",children:"Loading requests…"}),e.error&&t.jsx("p",{role:"alert",children:e.error.message}),((r=e.data)==null?void 0:r.length)===0&&t.jsx("p",{"data-testid":"attention-empty",className:"text-outline",children:"Nothing needs your attention."}),((d=e.data)==null?void 0:d.length)===100&&t.jsx("p",{className:"text-sm text-outline mb-4",children:"Showing the first 100 requests, with pending requests first. Resolving or dismissing entries reveals more."}),t.jsx("div",{className:"space-y-4",children:(i=e.data)==null?void 0:i.map(l=>t.jsx(A,{request:l},l.id))})]})}export{P as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,
|
|
1
|
+
import{j as e,aj as T,ak as L,al as P,am as R,an as $,S,ap as O,y as h,r as w,ad as A,F as I,Y as V}from"./index-CYCjrqhG.js";import{E as H}from"./EmptyState-CLMWpYxU.js";import{E as k}from"./ErrorState-_BM228mQ.js";import{P as z}from"./Pager-C4QwTsW7.js";import{S as y}from"./scroll-area-Bgn8q6dm.js";import{a as B,b as U}from"./useSessions-BNsSZXqv.js";import{T as F,a as J,b as v,c,d as Y,e as x}from"./table-D-x54JQs.js";import{u as G}from"./useDetailRoute-DiC2IR0t.js";import{u as M}from"./view-params-Duc_5Bxj.js";import{V as Z}from"./ViewHeader-CG7vOMnJ.js";import{u as q}from"./useProjectScope-DaFHoG4_.js";const K={file:"text-outline",task:"text-outline",decision:"text-outline",error:"text-error",git:"text-outline",rule:"text-outline",plan:"text-outline"},Q="text-outline";function W(n){return K[n]??Q}function X({sessionId:n,open:a,onClose:r}){const{data:t,isLoading:u,error:p,refetch:j}=B(n??"");return e.jsx(T,{open:a,onOpenChange:o=>!o&&r(),children:e.jsxs(L,{side:"right",className:"w-[540px] max-w-[90vw]",children:[e.jsx(P,{children:e.jsx(R,{children:u?"Loading...":t?`${t.agent??"Session"} ${t.agent_version?`v${t.agent_version}`:""}`:"Session Detail"})}),e.jsxs($,{children:[e.jsx("p",{className:"mb-4 text-sm text-outline",children:"This audit record contains summaries and events. Open Sessions to read native agent conversations or resume them."}),p?e.jsx(k,{message:p.message,onRetry:()=>j()}):u?e.jsx("div",{className:"space-y-4",children:[...Array(4)].map((o,i)=>e.jsx(S,{className:"h-8 w-full bg-surface-highest"},i))}):t?e.jsxs("div",{className:"space-y-6",children:[t.summary&&e.jsx("div",{className:"font-body text-xs text-on-surface leading-relaxed",children:e.jsx(O,{children:t.summary})}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsx(h,{label:"ID",children:e.jsx("span",{className:"font-mono text-xs break-all",children:t.id})}),e.jsx(h,{label:"Project ID",children:t.project_id??"—"}),e.jsx(h,{label:"Job Run ID",children:t.job_run_id??"—"}),e.jsx(h,{label:"Tokens Used",children:t.tokens_used!=null?t.tokens_used.toLocaleString():"—"}),e.jsx(h,{label:"Created",children:new Date(t.created_at).toLocaleString()})]}),t.events.length>0&&e.jsxs("div",{children:[e.jsxs("div",{className:"font-label text-xs font-medium text-outline mb-3",children:["Events (",t.events.length,")"]}),e.jsx(y,{className:"h-[300px]",children:e.jsx("div",{className:"space-y-1",children:[...t.events].sort((o,i)=>new Date(o.created_at).getTime()-new Date(i.created_at).getTime()).map(o=>e.jsx(ee,{event:o},o.id))})})]}),t.snapshot&&e.jsxs("div",{children:[e.jsx("div",{className:"font-label text-xs font-medium text-outline mb-3",children:"Snapshot"}),e.jsx(y,{className:"h-[200px]",children:e.jsx("pre",{className:"font-mono text-xs text-on-surface-variant whitespace-pre-wrap break-words bg-background border-l border-border p-3",children:t.snapshot})})]})]}):e.jsx("div",{className:"font-body text-xs text-outline py-8 text-center",children:"Session not found"})]})]})})}function ee({event:n}){const[a,r]=w.useState(!1),t=n.data!=null;return e.jsxs("div",{className:"border-b border-border/65",children:[e.jsxs("button",{type:"button",className:"w-full flex items-center gap-2 px-3 py-2 text-left hover:bg-surface-high transition-colors",onClick:()=>t&&r(!a),"aria-expanded":t?a:void 0,children:[t?a?e.jsx(A,{size:10,className:"text-outline flex-shrink-0"}):e.jsx(I,{size:10,className:"text-outline flex-shrink-0"}):e.jsx("span",{className:"w-[10px] flex-shrink-0"}),e.jsx("span",{className:`inline-flex items-center px-1.5 py-0.5 text-[10px] font-label font-medium ${W(n.type)}`,children:n.type}),e.jsx("span",{className:"flex-1 font-body text-xs text-outline truncate",children:se(n.data)}),e.jsx("span",{className:"font-label text-[10px] text-outline flex-shrink-0",children:new Date(n.created_at).toLocaleTimeString()})]}),a&&t&&e.jsx("div",{className:"px-3 pb-2",children:e.jsx("pre",{className:"font-mono text-xs text-on-surface-variant whitespace-pre-wrap break-words bg-background border-l border-border/65 p-2 max-h-48 overflow-auto",children:JSON.stringify(n.data,null,2)})})]})}function se(n){if(n==null)return"";if(typeof n=="string")return n;if(typeof n=="object"){const a=n;if(typeof a.path=="string")return a.path;if(typeof a.content=="string")return a.content.length>80?`${a.content.slice(0,80)}...`:a.content;if(typeof a.message=="string")return a.message;if(typeof a.summary=="string")return a.summary;const r=Object.keys(a);return r.length<=3?r.join(", "):`${r.length} fields`}return String(n)}const b=25,m="font-label text-xs font-medium text-outline";function te({projectId:n}){const a=V("sm"),[r,t]=M("order","desc",["asc","desc"]),[u,p]=w.useState({order:r,page:0}),j=u.order===r?u.page:0,o=s=>p({order:r,page:s}),{selectedId:i,openDetail:f,closeDetail:_}=G("/audit","sessionId"),{data:l,isLoading:D,error:N,refetch:E}=U({...n==="all"?{}:{project_id:n},limit:b,offset:j*b,order:r});if(N)return e.jsx(k,{message:N.message,onRetry:()=>E()});const g=(l==null?void 0:l.sessions)??[],C=(l==null?void 0:l.total)??0;return e.jsxs("section",{"data-testid":"logged-sessions",children:[e.jsx("div",{className:"mb-4 flex justify-end",children:e.jsxs("select",{"aria-label":"Sort audit by date","data-testid":"audit-date-sort",value:r,onChange:s=>{o(0),t(s.target.value)},className:"min-h-11 rounded-md border border-control-border bg-background px-3 text-sm text-on-surface",children:[e.jsx("option",{value:"desc",children:"Created: newest first"}),e.jsx("option",{value:"asc",children:"Created: oldest first"})]})}),D?e.jsx("div",{className:"space-y-2",children:[...Array(5)].map((s,d)=>e.jsx(S,{className:"h-10 w-full bg-surface-highest"},d))}):g.length===0?e.jsx(H,{message:"No audit records"}):e.jsxs("div",{className:"min-w-0 overflow-hidden",children:[a?e.jsxs(F,{children:[e.jsx(J,{children:e.jsxs(v,{className:"border-b border-border hover:bg-transparent",children:[e.jsx(c,{className:m,children:"Agent"}),e.jsx(c,{className:`${m} w-24`,children:"Version"}),e.jsx(c,{className:m,children:"Summary"}),e.jsx(c,{className:`${m} w-24`,children:"Project"}),e.jsx(c,{className:`${m} w-28`,children:"Tokens Used"}),e.jsx(c,{className:`${m} w-36`,children:"Created"})]})}),e.jsx(Y,{children:g.map(s=>e.jsxs(v,{"data-testid":"session-row","data-session-id":s.id,className:"border-b border-border/65 hover:bg-surface-high cursor-pointer",onClick:()=>f(s.id),children:[e.jsx(x,{className:"font-label text-xs text-primary",children:e.jsx("button",{type:"button",className:"text-left font-medium hover:underline",onClick:d=>{d.stopPropagation(),f(s.id)},children:s.agent??"Session"})}),e.jsx(x,{className:"font-label text-xs text-outline",children:s.agent_version??"—"}),e.jsx(x,{className:"font-body text-xs text-on-surface-variant max-w-sm truncate",children:s.summary??"—"}),e.jsx(x,{className:"font-label text-xs text-outline",children:s.project_id?s.project_id.slice(-6):"—"}),e.jsx(x,{className:"font-label text-xs text-outline text-right",children:s.tokens_used!=null?s.tokens_used.toLocaleString():"—"}),e.jsx(x,{className:"font-label text-xs text-outline",children:new Date(s.created_at).toLocaleString()})]},s.id))})]}):e.jsx("div",{className:"divide-y divide-border",children:g.map(s=>{var d;return e.jsxs("article",{"data-testid":"session-row","data-session-id":s.id,className:"py-4 space-y-3",children:[e.jsx("button",{type:"button",className:"min-h-11 text-sm text-left font-medium text-primary break-words",onClick:()=>f(s.id),children:s.agent??"Session"}),e.jsx("p",{className:"text-sm leading-relaxed text-on-surface break-words",children:s.summary??"No summary recorded"}),e.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-2 text-xs text-outline",children:[e.jsxs("span",{children:["Version ",s.agent_version??"—"]}),e.jsxs("span",{children:[((d=s.tokens_used)==null?void 0:d.toLocaleString())??"—"," tokens"]}),e.jsx("span",{children:s.project_id?`Project ${s.project_id.slice(-6)}`:"Unassigned"}),e.jsx("span",{children:new Date(s.created_at).toLocaleString()})]})]},s.id)})}),e.jsx(z,{page:j,pageSize:b,total:C,onPage:o})]}),e.jsx(X,{sessionId:i,open:!!i,onClose:_})]})}function he({projectId:n}){const a=q(n);return e.jsxs("div",{children:[e.jsx(Z,{title:"Audit"}),e.jsx("p",{className:"mb-4 text-sm text-outline",children:"Recorded summaries and events. Open Sessions to read conversations or resume a coding agent."}),e.jsx(te,{projectId:a},a)]})}export{he as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,D as d,m,n as b,o as g,U as h,x as f,B as s}from"./index-
|
|
1
|
+
import{j as e,D as d,m,n as b,o as g,U as h,x as f,B as s}from"./index-CYCjrqhG.js";function j({open:a,onConfirm:o,onCancel:t,title:i,description:l,confirmLabel:n="Delete",variant:c="destructive",isPending:r}){return e.jsx(d,{open:a,onOpenChange:x=>!x&&t(),children:e.jsxs(m,{className:"bg-surface border-surface-highest max-w-sm",children:[e.jsxs(b,{children:[e.jsx(g,{className:"font-headline text-sm text-on-surface",children:i}),e.jsx(h,{className:"font-body text-xs text-outline mt-2",children:l})]}),e.jsxs(f,{className:"mt-4",children:[e.jsx(s,{"data-testid":"confirm-dialog-cancel",type:"button",variant:"ghost",size:"sm",onClick:t,className:"font-label text-xs text-outline",children:"Cancel"}),e.jsx(s,{"data-testid":"confirm-dialog-confirm",type:"button",size:"sm",onClick:o,disabled:r,className:c==="destructive"?"font-label text-xs bg-error/15 text-error border border-error/30 hover:bg-error/25":"font-label text-xs bg-tertiary/15 text-tertiary border border-tertiary/30 hover:bg-tertiary/25",children:r?"...":n})]})]})})}export{j as C};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{J as E,Y as J,Z as U,e as V,M as I,j as t,S as Q}from"./index-CYCjrqhG.js";import{E as q}from"./ErrorState-_BM228mQ.js";import{P as T}from"./PriorityBadge-q0hZXCLg.js";import{R as H}from"./ResumeActions-Bihtv9n8.js";import{S}from"./StatusBadge-BxSWnu8L.js";import{T as W,a as z,b as L,c as h,d as O,e as p}from"./table-D-x54JQs.js";import{u as Y}from"./useJobs-TDZx1N1l.js";import{u as Z}from"./useMemories-rjShoqd3.js";import{u as F}from"./useProjectScope-DaFHoG4_.js";import{u as G}from"./useSessions-BNsSZXqv.js";import{f as K,S as $}from"./live-sessions-C19eXx17.js";import"./copy-DG3MHKpv.js";function l(d,v){return d.isLoading?"…":d.error?"—":v}function us({projectId:d}){var f,_;const v=E(),a=F(d),D=J("sm"),i=s=>{const e=new URL(s,window.location.origin);e.searchParams.set("project",a),v({pathname:e.pathname,search:e.search,hash:e.hash})},o=a==="all"||a==="unassigned"?void 0:{project_id:a},c=U(o),{data:b,isLoading:P}=c,u=Y(o),{data:N}=u,m=Z({project_id:o==null?void 0:o.project_id,limit:1},{enabled:a!=="unassigned"}),R=a==="unassigned"?0:((f=m.data)==null?void 0:f.total)??0,{data:n}=V(),j=G(!0),g=(j.data??[]).filter(s=>a==="all"||(a==="unassigned"?s.project_id===null:s.project_id===a)),w=a==="unassigned"?(N??[]).filter(s=>s.project_id===null):N??[],k=a==="unassigned"?(b??[]).filter(s=>s.project_id===null):b??[],r=k.reduce((s,e)=>(s[e.status]=(s[e.status]??0)+1,s),{}),y=[...k].sort((s,e)=>new Date(e.updated_at).getTime()-new Date(s.updated_at).getTime()).slice(0,8),x=w.filter(s=>s.enabled),A=a==="all"?"All Projects":a==="unassigned"?"Unassigned":((_=n==null?void 0:n.find(s=>s.id===a))==null?void 0:_.name)??"",M=[{label:"Doing",value:l(c,r.doing??0),sub:"in progress",path:"/tasks?view=table&status=doing"},{label:"Review",value:l(c,r.review??0),sub:"awaiting review",path:"/tasks?view=table&status=review"},{label:"Blocked",value:l(c,r.blocked??0),sub:"needs attention",path:"/tasks?view=table&status=blocked"},{label:"Todo",value:l(c,(r.todo??0)+(r.queued??0)),sub:"pending",path:"/tasks?view=board"},{label:"Done",value:l(c,r.done??0),sub:"completed",path:"/tasks?view=table&status=done"}],B=[{label:"Active jobs",value:l(u,x.length),sub:`of ${w.length} total`,path:"/jobs"},{label:"Memories",value:l(m,R),sub:"in this scope",path:I},{label:"Projects",value:(n??[]).filter(s=>s.status==="active").length,sub:"active across workspace",path:"/projects"}];return t.jsxs("div",{"data-activity-preview":!0,"data-testid":"activity-preview",className:"activity-preview",children:[t.jsxs("div",{className:"activity-heading",children:[t.jsxs("div",{children:[t.jsx("h1",{"data-testid":"view-title",children:"Activity"}),t.jsx("p",{"data-testid":"view-meta",children:A||"All projects"})]}),t.jsx("button",{type:"button",className:"activity-primary",onClick:()=>i("/tasks"),children:"View tasks"})]}),[c,u,m,j].some(s=>s.isLoading)&&t.jsx("p",{role:"status",className:"activity-muted mb-4",children:"Loading activity…"}),[{name:"Tasks",query:c},{name:"Jobs",query:u},{name:"Memories",query:m},{name:"Sessions",query:j}].filter(({query:s})=>s.error).map(({name:s,query:e})=>{var C;return t.jsx(q,{message:`${s}: ${((C=e.error)==null?void 0:C.message)??"Could not load activity"}`,onRetry:()=>e.refetch()},s)}),t.jsx("section",{className:"activity-metrics","aria-label":"Task summary",children:M.map(s=>t.jsxs("button",{type:"button","data-testid":"stat-card","data-stat-label":s.label,className:"activity-metric",onClick:()=>i(s.path),children:[t.jsx("span",{className:"activity-metric-label",children:s.label}),t.jsx("span",{"data-testid":"stat-card-value",className:"activity-metric-value",children:s.value}),t.jsx("span",{className:"activity-metric-sub",children:s.sub})]},s.label))}),t.jsx("section",{className:"activity-resources","aria-label":"Workspace summary",children:B.map(s=>t.jsxs("button",{type:"button","data-testid":"stat-card","data-stat-label":s.label,onClick:()=>i(s.path),children:[t.jsx("span",{children:s.label}),t.jsx("span",{"data-testid":"stat-card-value",className:"activity-resource-value",children:s.value}),t.jsx("span",{className:"activity-resource-sub",children:s.sub})]},s.label))}),t.jsxs("section",{className:"activity-section",children:[t.jsxs("div",{className:"activity-section-heading",children:[t.jsx("h2",{children:"Recent tasks"}),t.jsx("button",{type:"button",className:"activity-text-action",onClick:()=>i("/tasks"),children:"View all"})]}),P?t.jsx("div",{className:"space-y-2",children:[0,1,2,3].map(s=>t.jsx(Q,{className:"h-10 w-full"},s))}):y.length===0?t.jsx("p",{className:"activity-empty",children:"No tasks"}):D?t.jsxs(W,{className:"activity-task-table",children:[t.jsx(z,{children:t.jsxs(L,{children:[t.jsx(h,{children:"Task"}),t.jsx(h,{className:"w-36",children:"Status"}),t.jsx(h,{className:"w-28",children:"Priority"}),t.jsx(h,{className:"w-28",children:"Updated"})]})}),t.jsx(O,{children:y.map(s=>t.jsxs(L,{onClick:()=>i(`/tasks/${s.id}`),children:[t.jsx(p,{children:t.jsx("button",{type:"button",className:"activity-task-title",onClick:e=>{e.stopPropagation(),i(`/tasks/${s.id}`)},children:s.title})}),t.jsx(p,{children:t.jsx("span",{className:"activity-status","data-status":s.status,children:t.jsx(S,{status:s.status})})}),t.jsx(p,{children:t.jsx("span",{className:"activity-priority",children:t.jsx(T,{priority:s.priority})})}),t.jsx(p,{className:"activity-muted",children:new Date(s.updated_at).toLocaleDateString()})]},s.id))})]}):t.jsx("div",{className:"activity-task-list",children:y.map(s=>t.jsxs("article",{className:"activity-task-mobile",children:[t.jsx("button",{type:"button",className:"activity-task-title",onClick:()=>i(`/tasks/${s.id}`),children:s.title}),t.jsxs("div",{className:"activity-task-meta",children:[t.jsx("span",{className:"activity-status","data-status":s.status,children:t.jsx(S,{status:s.status})}),t.jsx("span",{className:"activity-priority",children:t.jsx(T,{priority:s.priority})}),t.jsx("span",{children:new Date(s.updated_at).toLocaleDateString()})]})]},s.id))})]}),t.jsxs("div",{className:"activity-secondary",children:[x.length>0&&t.jsxs("section",{className:"activity-section",children:[t.jsxs("div",{className:"activity-section-heading",children:[t.jsx("h2",{children:"Active jobs"}),t.jsx("button",{type:"button",className:"activity-text-action",onClick:()=>i("/jobs"),children:"View all"})]}),t.jsx("div",{className:"activity-row-list",children:x.slice(0,5).map(s=>t.jsxs("button",{type:"button",className:"activity-row",onClick:()=>i(`/jobs/${s.id}`),children:[t.jsxs("span",{className:"activity-row-heading",children:[t.jsx("span",{children:s.name}),t.jsx("span",{className:"activity-muted",children:s.trigger_type})]}),s.last_run_at&&t.jsxs("span",{className:"activity-row-description",children:["Last run ",new Date(s.last_run_at).toLocaleString()]})]},s.id))})]}),g.length>0&&t.jsxs("section",{className:"activity-section",children:[t.jsxs("div",{className:"activity-section-heading",children:[t.jsx("h2",{children:"Agent sessions"}),t.jsx("button",{type:"button",className:"activity-text-action",onClick:()=>i("/sessions"),children:"View all"})]}),t.jsx("div",{className:"activity-row-list",children:g.slice(0,5).map(s=>t.jsxs("div",{className:"activity-row",children:[t.jsxs("button",{type:"button",className:"w-full text-left","data-testid":"activity-session-link","data-session-id":s.id,onClick:()=>i(`/sessions?session=${encodeURIComponent(s.id)}`),children:[t.jsxs("span",{className:"activity-row-heading",children:[t.jsx("span",{children:s.name??s.agent}),t.jsx("span",{className:"activity-muted",children:K(s.last_activity_at)})]}),t.jsxs("span",{className:"activity-row-description inline-flex items-center gap-2",children:[t.jsx("span",{className:`size-1.5 rounded-full ${$[s.status].dot}`}),s.agent," · ",$[s.status].label,s.task?` · ${s.task.title}`:""]})]}),t.jsx(H,{session:s})]},s.id))})]})]}),a==="all"&&(n??[]).length>0&&t.jsxs("section",{className:"activity-section",children:[t.jsxs("div",{className:"activity-section-heading",children:[t.jsx("h2",{children:"Projects"}),t.jsx("button",{type:"button",className:"activity-text-action",onClick:()=>i("/projects"),children:"View all"})]}),t.jsx("div",{className:"activity-projects",children:(n??[]).filter(s=>s.status==="active").slice(0,6).map(s=>t.jsxs("button",{type:"button",className:"activity-row",onClick:()=>i(`/projects/${s.id}`),children:[t.jsx("span",{className:"activity-row-heading",children:s.name}),s.description&&t.jsx("span",{className:"activity-row-description",children:s.description})]},s.id))})]})]})}export{us as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{H as T,J as V,r as o,j as e,K as Y,B as g}from"./index-CYCjrqhG.js";const i=new Map,D=new Set;typeof window<"u"&&window.addEventListener("beforeunload",t=>{i.size&&(t.preventDefault(),t.returnValue="")});function W(t){return D.has(t)?!1:i.has(t)?window.confirm("Discard unsaved changes to this document?")?(i.delete(t),!0):!1:!0}function G({documentId:t,content:s,path:M,onSave:d,testId:N,wikiLinks:C,navigation:k,expanded:R,onExpandedChange:E,layout:F,pageTitle:q,hideFrontmatter:H}){const[J]=T(),K=V(),v=J.get("editorMode"),x=v==="edit"||v==="split"?v:"read",p=o.useRef(i.get(t)??{original:s,content:s}),[w,f]=o.useState(p.current.content),[u,j]=o.useState(p.current.original),[r,z]=o.useState(!1),[y,b]=o.useState(null),S=o.useRef(!1),l=o.useRef(p.current.content),c=w!==u;o.useEffect(()=>{i.has(t)||(f(s),l.current=s,j(s))},[s,t]);function O(a){l.current=a,f(a),a===u?i.delete(t):i.set(t,{original:u,content:a})}async function h(){if(!d||!c||S.current)return;S.current=!0,D.add(t),z(!0),b(null);const a=l.current;try{const n=await d(a,u),m=typeof n=="string"?n:a;j(m),l.current===a?(i.delete(t),l.current=m,f(m)):i.set(t,{original:m,content:l.current})}catch(n){b(n instanceof Error?n.message:"Could not save document")}finally{S.current=!1,D.delete(t),z(!1)}}function P(a){const n=new URLSearchParams(window.location.search);n.set("editorMode",a),n.toString()!==new URLSearchParams(window.location.search).toString()&&K({search:n.toString(),hash:window.location.hash})}function U(){W(t)&&(f(s),j(s),l.current=s,b(null))}const B=d?r?"Saving…":c?"Unsaved changes":"Saved":"Read-only",L=e.jsxs(e.Fragment,{children:[y&&e.jsxs("p",{role:"alert",className:"text-sm text-destructive",children:[y," Your draft has been kept."]}),c&&s!==u&&e.jsx("p",{role:"status",className:"text-sm text-outline",children:"The document changed elsewhere. Your draft is preserved; saving will check for conflicts."})]});return F==="page"?e.jsx("div",{className:"min-w-0","data-testid":"document-workspace",children:e.jsx(Y,{path:M,value:w,onChange:O,onSave:()=>void h(),readOnly:!d||r,testId:N,wikiLinks:C,initialMode:"read",mode:x,onModeChange:P,expanded:R,onExpandedChange:E,layout:"page",pageTitle:q,hideFrontmatter:H,notice:y||c&&s!==u?L:void 0,actions:(x!=="read"||c||r)&&e.jsxs(e.Fragment,{children:[e.jsx("span",{"data-testid":"document-save-status",role:"status",className:"text-xs text-outline",children:B}),d&&(c||r)&&e.jsxs(e.Fragment,{children:[e.jsx(g,{type:"button",size:"sm",variant:"ghost","data-testid":"document-discard",disabled:r,onClick:U,children:"Discard"}),e.jsx(g,{type:"button",size:"sm","data-testid":"document-save",disabled:r,onClick:()=>void h(),children:"Save"})]})]})})}):e.jsx("div",{className:"min-w-0 space-y-3","data-testid":"document-workspace",children:e.jsx(Y,{path:M,value:w,onChange:O,onSave:()=>void h(),readOnly:!d||r,testId:N,wikiLinks:C,initialMode:"read",mode:x,onModeChange:P,expanded:R,onExpandedChange:E,layout:F,header:e.jsxs("div",{className:"space-y-2",children:[k&&e.jsx("div",{className:"mb-3 min-w-0",children:k}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("span",{"data-testid":"document-save-status",role:"status",className:"min-w-0 flex-1 text-sm text-outline",children:B}),d&&e.jsxs(e.Fragment,{children:[e.jsx(g,{type:"button",variant:"ghost","data-testid":"document-discard",disabled:!c||r,onClick:U,children:"Discard changes"}),e.jsx(g,{type:"button","data-testid":"document-save",disabled:!c||r,onClick:()=>void h(),children:"Save changes"})]})]}),L]})})})}export{G as D,W as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./index-
|
|
1
|
+
import{j as e}from"./index-CYCjrqhG.js";function a({message:t="No data"}){return e.jsx("div",{"data-testid":"empty-state",className:"flex items-center justify-center py-16 text-outline font-body text-sm",children:t})}export{a as E};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,B as s}from"./index-
|
|
1
|
+
import{j as e,B as s}from"./index-CYCjrqhG.js";function i({message:r,onRetry:t}){return e.jsxs("div",{"data-testid":"error-state",className:"flex flex-col items-center justify-center gap-3 px-4 py-16",children:[e.jsx("p",{role:"alert",className:"max-w-prose break-words text-center text-sm text-error",children:r}),t&&e.jsx(s,{"data-testid":"error-retry",variant:"outline",size:"sm",onClick:t,children:"Retry"})]})}export{i as E};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{H as U,r as t,a as V,j as n,V as K,K as $,W as A,d as P}from"./index-CYCjrqhG.js";import{S as H}from"./save-C0v-3p0L.js";const c=new Map;typeof window<"u"&&window.addEventListener("beforeunload",s=>{c.size!==0&&(s.preventDefault(),s.returnValue="")});function B({terminalId:s,path:i,content:u,readOnly:v,onDirty:w}){const[Q,z]=U(),p=Q.get("editorMode"),D=p==="read"||p==="split"?p:"edit",a=`${s}:${i}`,d=t.useRef(c.get(a)??{original:u,content:u}),o=t.useRef(d.current.original),l=t.useRef(d.current.content),[S,g]=t.useState(d.current.content!==d.current.original),[C,j]=t.useState(!1),[E,x]=t.useState(null),[R,b]=t.useState(d.current.content),k=V(),y=t.useRef(()=>{}),h=t.useRef(!1),m=t.useRef(!1),f=t.useRef(w);f.current=w;async function M(){if(h.current||v||l.current===o.current)return;h.current=!0,j(!0),x(null);const e=l.current;try{await P.git.saveFile(s,i,e,o.current),o.current=e;const r=l.current!==e;g(r),m.current&&f.current(r),r?c.set(a,{original:e,content:l.current}):c.delete(a),k.invalidateQueries({queryKey:["checkout-files",s,i]}),k.invalidateQueries({queryKey:["git",s]})}catch(r){x(r instanceof Error?r.message:"Could not save file")}finally{h.current=!1,j(!1)}}y.current=()=>void M(),t.useEffect(()=>(m.current=!0,f.current(d.current.content!==d.current.original),()=>{m.current=!1}),[]),t.useEffect(()=>{h.current||c.has(a)||u===o.current||(o.current=u,l.current=u,b(u),g(!1),m.current&&f.current(!1))},[u,a]);function N(e){l.current=e,b(e);const r=e!==o.current;g(r),f.current(r),r?c.set(a,{original:o.current,content:e}):c.delete(a)}function L(){window.confirm("Discard your edits and reload the file from disk?")&&P.git.files(s,i).then(e=>{if(e.content===null||e.binary||e.truncated)throw new Error("File is no longer editable");o.current=e.content,l.current=e.content,c.delete(a),b(e.content),g(!1),f.current(!1),x(null)}).catch(e=>x(e instanceof Error?e.message:"Could not reload file"))}const F=n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"flex shrink-0 items-center gap-1 border-b border-surface-highest px-2 py-1",children:[n.jsxs("button",{type:"button","data-testid":"file-save",disabled:!S||C||v,onClick:()=>void M(),className:"flex min-h-11 items-center gap-1 rounded px-2 py-1 text-sm text-primary hover:bg-surface-highest disabled:opacity-40",title:"Save (Ctrl/Cmd+S)",children:[n.jsx(H,{size:14}),C?"Saving…":"Save"]}),n.jsx("span",{"data-testid":"file-save-status",className:"min-w-0 flex-1 truncate text-sm text-on-surface-variant",children:v?"Read-only preview":S?"Unsaved changes":"Saved"})]}),E&&n.jsxs("div",{role:"alert",className:"shrink-0 border-b border-error/30 p-2 text-xs text-error",children:[E,n.jsx("button",{type:"button","data-testid":"file-reload",onClick:L,className:"ml-2 underline",children:"Reload from disk"})]})]});return n.jsxs("div",{className:"flex min-h-0 flex-1 flex-col","data-testid":"file-editor",children:[!K(i)&&F,n.jsx("div",{"data-testid":"file-preview",className:"min-h-0 flex-1 overflow-hidden",children:K(i)?n.jsx($,{path:i,value:R,onChange:N,onSave:()=>y.current(),readOnly:v,height:"100%",testId:"file-editor-input",header:F,mode:D,onModeChange:e=>z(r=>{const q=new URLSearchParams(r);return q.set("editorMode",e),q})}):n.jsx(A,{path:i,value:R,onChange:N,onSave:()=>y.current(),readOnly:v,height:"100%",testId:"file-editor-input"})})]})}export{B as FileEditor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as S,a as f,b as v,d as j,r as h,j as e,B as b,p as w,I as _,L as k,ad as F}from"./index-C_jtMgr7.js";import{E as R}from"./ErrorState-BPTepwiG.js";import{a as $}from"./useJobs-Dcl-Vim3.js";function L(t){return S({queryKey:["webhooks",t],queryFn:()=>j.webhooks.list(t),select:s=>s.webhooks})}function D(t){return S({queryKey:["webhook-deliveries",t],queryFn:()=>j.webhooks.deliveries(t),select:s=>s.deliveries,enabled:!!t,refetchInterval:3e3})}function U(){const t=f();return v({mutationFn:s=>j.webhooks.create(s),onSuccess:()=>t.invalidateQueries({queryKey:["webhooks"]})})}function E(){const t=f();return v({mutationFn:({id:s,...a})=>j.webhooks.update(s,a),onSuccess:()=>t.invalidateQueries({queryKey:["webhooks"]})})}function K(){const t=f();return v({mutationFn:s=>j.webhooks.delete(s),onSuccess:()=>t.invalidateQueries({queryKey:["webhooks"]})})}function I(){return v({mutationFn:t=>j.webhooks.rotate(t)})}function P(t){return[...new Set(t.split(",").map(s=>s.trim()).filter(Boolean))]}function q(t,s,a){return new URL(`/webhooks/${encodeURIComponent(t)}`,new URL(s,a)).href}function z(t){return["localhost","127.0.0.1","[::1]"].includes(new URL(t).hostname)}function N({id:t,testId:s,value:a,onChange:i,placeholder:d}){const[n,r]=h.useState(a.join(", "));return e.jsx(_,{id:t,"data-testid":s,value:n,placeholder:d,onChange:l=>{r(l.target.value),i(l.target.value)}})}function J({projectId:t,onCreated:s}){const a=U(),[i,d]=h.useState(""),[n,r]=h.useState("github"),[l,m]=h.useState(null),u=h.useId();return l?e.jsxs("div",{"data-testid":"webhook-created",className:"space-y-3",children:[e.jsx(W,{hook:l,secret:l.secret}),e.jsx(b,{type:"button",variant:"outline","data-testid":"webhook-setup-done",onClick:()=>{s==null||s(l),m(null),d("")},children:"I've copied the setup details"})]}):e.jsxs("div",{className:"space-y-3","data-testid":"webhook-create-form",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(w,{htmlFor:`${u}-name`,children:"Webhook name"}),e.jsx(_,{id:`${u}-name`,"data-testid":"webhook-name",value:i,onChange:c=>d(c.target.value),maxLength:100,placeholder:"GitHub repository events"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(w,{htmlFor:`${u}-provider`,children:"Provider"}),e.jsxs("select",{id:`${u}-provider`,"data-testid":"webhook-provider",className:"w-full min-h-11 rounded-md border border-control-border bg-background px-3 text-sm",value:n,onChange:c=>r(c.target.value),children:[e.jsx("option",{value:"github",children:"GitHub"}),e.jsx("option",{value:"generic",children:"Other service (HMAC)"})]})]}),e.jsx("p",{className:"text-xs text-outline",children:"Create the event source here. Connect jobs and choose their event filters in Jobs. No job is required to create a webhook."}),a.error&&e.jsx("p",{role:"alert",className:"text-sm text-error",children:a.error.message}),e.jsx(b,{type:"button","data-testid":"webhook-create",disabled:!i.trim()||a.isPending,onClick:()=>a.mutate({name:i.trim(),provider:n,project_id:t??null},{onSuccess:m}),children:a.isPending?"Creating...":"Create webhook"})]})}function A({value:t,onChange:s,projectId:a}){const{data:i,error:d,isLoading:n,refetch:r}=L(a),l=i==null?void 0:i.filter(o=>o.project_id===null||o.project_id===a),[m,u]=h.useState(!1);function c(o){t.some(p=>p.webhook_id===o)||s([...t,{webhook_id:o,events:[],actions:[]}])}function y(o,p,x){s(t.map(g=>g.webhook_id===o?{...g,[p]:P(x)}:g))}return e.jsxs("section",{className:"space-y-3 border-y border-border py-4","data-testid":"job-webhook-picker",children:[e.jsx("h3",{className:"text-sm font-medium",children:"Which webhook should trigger this job?"}),d?e.jsx(R,{message:d.message,onRetry:()=>r()}):e.jsxs(e.Fragment,{children:[e.jsx(w,{htmlFor:"job-webhook-source",children:"Configured webhooks"}),e.jsxs("select",{id:"job-webhook-source","data-testid":"job-webhook-select",className:"w-full min-h-11 rounded-md border border-control-border bg-background px-3 text-sm",value:"",disabled:n,onChange:o=>{o.target.value&&c(o.target.value)},children:[e.jsx("option",{value:"",children:n?"Loading webhooks...":"Select an existing webhook"}),(l??[]).filter(o=>!t.some(p=>p.webhook_id===o.id)).map(o=>e.jsxs("option",{value:o.id,children:[o.name,o.enabled?"":" (disabled)"]},o.id))]}),!n&&!(l!=null&&l.length)&&e.jsx("p",{className:"text-xs text-outline",children:"No webhooks configured for this project yet. Create one below or on the Webhooks page."})]}),t.map(o=>{var p;return e.jsxs("div",{className:"space-y-2 border-t border-border pt-3","data-testid":"job-webhook-binding","data-webhook-id":o.webhook_id,children:[e.jsxs("div",{className:"flex justify-between gap-2",children:[e.jsx("span",{className:"text-sm font-medium",children:((p=l==null?void 0:l.find(x=>x.id===o.webhook_id))==null?void 0:p.name)??o.webhook_id}),e.jsx(b,{type:"button",variant:"ghost",size:"sm","data-testid":"job-webhook-remove",onClick:()=>s(t.filter(x=>x.webhook_id!==o.webhook_id)),children:"Disconnect"})]}),e.jsx(w,{htmlFor:`events-${o.webhook_id}`,children:"Events for this job"}),e.jsx(N,{id:`events-${o.webhook_id}`,testId:"webhook-events",value:o.events,onChange:x=>y(o.webhook_id,"events",x),placeholder:"pull_request, push (blank accepts all)"}),e.jsx(w,{htmlFor:`actions-${o.webhook_id}`,children:"Actions for this job (optional)"}),e.jsx(N,{id:`actions-${o.webhook_id}`,testId:"webhook-actions",value:o.actions,onChange:x=>y(o.webhook_id,"actions",x),placeholder:"opened, synchronize (blank accepts all)"})]},o.webhook_id)}),e.jsx(b,{type:"button",size:"sm",variant:"outline","data-testid":"webhook-add",onClick:()=>u(!m),children:m?"Close new webhook":"Create a webhook"}),m&&e.jsx(J,{projectId:a,onCreated:o=>{c(o.id),u(!1)}})]})}function Q({job:t}){const s=$(),[a,i]=h.useState(t.webhooks??[]);return e.jsxs("section",{className:"space-y-3","data-testid":"job-webhooks",children:[!t.enabled&&e.jsx("p",{className:"text-sm text-outline",children:"Job disabled. Configure connections now and enable it from Jobs when ready."}),e.jsx(A,{value:a,onChange:i,projectId:t.project_id??void 0}),s.error&&e.jsx("p",{role:"alert",className:"text-sm text-error",children:s.error.message}),e.jsx(b,{type:"button",size:"sm","data-testid":"job-webhooks-save",disabled:s.isPending,onClick:()=>s.mutate({id:t.id,webhooks:a,trigger_type:"webhook"}),children:"Save connections"}),s.isSuccess&&e.jsx("p",{role:"status",className:"text-xs text-outline",children:"Connections saved."}),e.jsx(k,{className:"inline-block text-sm underline",to:`/webhooks?project=${encodeURIComponent(t.project_id??"all")}`,children:"Manage configured webhooks and deliveries"})]})}function C({label:t,value:s,secret:a=!1}){const[i,d]=h.useState(!1),[n,r]=h.useState(!1);return e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-xs text-outline",children:t}),e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx("code",{className:"min-w-0 flex-1 break-all text-xs","data-testid":a?"webhook-secret":"webhook-url",children:s}),e.jsx(b,{type:"button",size:"sm",variant:"outline","aria-label":`Copy ${t}`,onClick:async()=>{try{await navigator.clipboard.writeText(s),d(!0),r(!1)}catch{r(!0)}},children:i?"Copied":"Copy"})]}),n&&e.jsx("p",{role:"alert",className:"text-xs text-error",children:"Select and copy the value above; clipboard access is unavailable."})]})}function W({hook:t,secret:s}){const a=q(t.token,F(),window.location.origin);return e.jsxs("div",{className:"space-y-3","data-testid":"webhook-setup",children:[e.jsx(C,{label:"Payload URL",value:a}),z(a)&&e.jsx("p",{className:"text-sm text-warning",children:"This address is local. For external providers, use your publicly reachable ORC address with the same /webhooks/ path."}),s?e.jsxs(e.Fragment,{children:[e.jsx(C,{label:"Signing secret",value:s,secret:!0}),e.jsx("p",{className:"text-xs text-outline",children:"Copy the signing secret before leaving. It is shown once."})]}):e.jsx("p",{className:"text-xs text-outline",children:"The signing secret is hidden. Generate a replacement only if you need to reconnect the sender."}),t.provider==="github"?e.jsxs("ol",{className:"list-decimal space-y-1 pl-5 text-sm text-outline",children:[e.jsx("li",{children:"In your repository, open GitHub Settings - Webhooks - Add webhook."}),e.jsx("li",{children:"Paste the Payload URL, select application/json, and enter the signing secret."}),e.jsx("li",{children:"Select the events needed by your connected jobs. Each job has its own filters."}),e.jsx("li",{children:"Send an event and inspect Recent deliveries below."})]}):e.jsx("p",{className:"text-sm text-outline",children:"Send JSON, signed with HMAC-SHA256 of the raw body. Set X-Orc-Signature-256 to sha256=<hex signature>, X-Orc-Event to the event name and X-Orc-Delivery to a unique delivery ID."})]})}function M({hook:t}){var u;const s=E(),a=I(),[i,d]=h.useState(!1),[n,r]=h.useState(!1),[l,m]=h.useState();return e.jsxs("article",{className:"space-y-3 border-b border-border pb-5","data-testid":"webhook-endpoint","data-webhook-id":t.id,children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsx("h3",{className:"text-sm font-medium",children:t.name}),e.jsxs("span",{className:"text-xs text-outline",children:[t.provider," - ",t.enabled?"Enabled":"Disabled"]}),e.jsx(b,{type:"button",variant:"outline",size:"sm",disabled:s.isPending,onClick:()=>s.mutate({id:t.id,enabled:!t.enabled}),children:t.enabled?"Disable":"Enable"})]}),e.jsxs("div",{className:"space-y-1","data-testid":"webhook-connected-jobs",children:[e.jsxs("p",{className:"text-xs text-outline",children:["Connected jobs (",t.subscriptions.length,")"]}),t.subscriptions.length?t.subscriptions.map(c=>e.jsxs("div",{className:"text-sm",children:[e.jsx(k,{className:"underline","data-testid":"webhook-job-link",to:`/jobs/${c.job_id}?project=all`,children:c.name}),e.jsxs("span",{className:"text-xs text-outline",children:[" ","- ",c.enabled?"Enabled":"Disabled","; events:"," ",c.events.join(", ")||"all","; actions: ",c.actions.join(", ")||"all"]})]},c.job_id)):e.jsx("p",{className:"text-sm text-outline",children:"No connected jobs. Select this webhook when creating or editing a job."})]}),e.jsx(W,{hook:t,secret:l}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(b,{type:"button",variant:"outline",size:"sm","data-testid":"webhook-deliveries-toggle",onClick:()=>d(!i),children:i?"Hide deliveries":"Recent deliveries"}),e.jsx(b,{type:"button",variant:"ghost",size:"sm",onClick:()=>r(!n),children:"New signing secret"})]}),n&&e.jsxs("div",{className:"space-y-2 text-sm",children:[e.jsx("p",{children:"The sender's existing secret will stop working. Update it after generating the replacement."}),e.jsx(b,{type:"button",variant:"outline",size:"sm",disabled:a.isPending,onClick:()=>a.mutate(t.id,{onSuccess:c=>{m(c.secret),r(!1)}}),children:"Generate replacement secret"})]}),(s.error||a.error)&&e.jsx("p",{role:"alert",className:"text-sm text-error",children:(u=s.error??a.error)==null?void 0:u.message}),i&&e.jsx(H,{id:t.id})]})}function H({id:t}){const{data:s,isLoading:a,error:i,refetch:d}=D(t);return e.jsxs("section",{className:"space-y-2","data-testid":"webhook-deliveries",children:[e.jsx("h4",{className:"text-sm font-medium",children:"Recent deliveries"}),i?e.jsx(R,{message:i.message,onRetry:()=>d()}):a?e.jsx("p",{role:"status",children:"Loading deliveries..."}):s!=null&&s.length?s.map(n=>e.jsxs("div",{className:"space-y-1 border-t border-border py-2 text-xs","data-testid":"webhook-delivery",children:[e.jsxs("div",{className:"flex flex-wrap justify-between gap-2",children:[e.jsxs("span",{children:[n.event,n.action?` / ${n.action}`:""]}),e.jsx("span",{children:n.status})]}),e.jsxs("p",{className:"text-outline",children:[n.repository," ",new Date(n.created_at).toLocaleString()]}),n.status==="ignored"&&e.jsx("p",{className:"text-outline",children:"No enabled connected job matched this event."}),n.error&&e.jsx("p",{className:"text-error",children:n.error}),n.runs.map(r=>e.jsxs("div",{className:"flex flex-wrap gap-3",children:[e.jsxs(k,{className:"underline",to:`/jobs/${r.job_id}?project=all`,children:["Job run: ",r.status]}),r.task_id&&e.jsx(k,{className:"underline",to:`/tasks/${r.task_id}?project=all`,children:"Created task"}),r.session_id&&e.jsx(k,{className:"underline",to:`/audit/${r.session_id}?project=all`,children:"Agent session"})]},r.job_run_id))]},n.id)):e.jsx("p",{className:"text-sm text-outline",children:"No events received yet. Register the endpoint with your provider, then send an event."})]})}export{Q as J,J as W,K as a,M as b,A as c,L as u};
|
|
1
|
+
import{u as S,a as f,b as v,d as j,r as h,j as e,B as b,p as w,I as _,L as k,ao as F}from"./index-CYCjrqhG.js";import{E as R}from"./ErrorState-_BM228mQ.js";import{a as $}from"./useJobs-TDZx1N1l.js";function L(t){return S({queryKey:["webhooks",t],queryFn:()=>j.webhooks.list(t),select:s=>s.webhooks})}function D(t){return S({queryKey:["webhook-deliveries",t],queryFn:()=>j.webhooks.deliveries(t),select:s=>s.deliveries,enabled:!!t,refetchInterval:3e3})}function U(){const t=f();return v({mutationFn:s=>j.webhooks.create(s),onSuccess:()=>t.invalidateQueries({queryKey:["webhooks"]})})}function E(){const t=f();return v({mutationFn:({id:s,...a})=>j.webhooks.update(s,a),onSuccess:()=>t.invalidateQueries({queryKey:["webhooks"]})})}function K(){const t=f();return v({mutationFn:s=>j.webhooks.delete(s),onSuccess:()=>t.invalidateQueries({queryKey:["webhooks"]})})}function I(){return v({mutationFn:t=>j.webhooks.rotate(t)})}function P(t){return[...new Set(t.split(",").map(s=>s.trim()).filter(Boolean))]}function q(t,s,a){return new URL(`/webhooks/${encodeURIComponent(t)}`,new URL(s,a)).href}function z(t){return["localhost","127.0.0.1","[::1]"].includes(new URL(t).hostname)}function N({id:t,testId:s,value:a,onChange:i,placeholder:d}){const[n,r]=h.useState(a.join(", "));return e.jsx(_,{id:t,"data-testid":s,value:n,placeholder:d,onChange:l=>{r(l.target.value),i(l.target.value)}})}function J({projectId:t,onCreated:s}){const a=U(),[i,d]=h.useState(""),[n,r]=h.useState("github"),[l,m]=h.useState(null),u=h.useId();return l?e.jsxs("div",{"data-testid":"webhook-created",className:"space-y-3",children:[e.jsx(W,{hook:l,secret:l.secret}),e.jsx(b,{type:"button",variant:"outline","data-testid":"webhook-setup-done",onClick:()=>{s==null||s(l),m(null),d("")},children:"I've copied the setup details"})]}):e.jsxs("div",{className:"space-y-3","data-testid":"webhook-create-form",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(w,{htmlFor:`${u}-name`,children:"Webhook name"}),e.jsx(_,{id:`${u}-name`,"data-testid":"webhook-name",value:i,onChange:c=>d(c.target.value),maxLength:100,placeholder:"GitHub repository events"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(w,{htmlFor:`${u}-provider`,children:"Provider"}),e.jsxs("select",{id:`${u}-provider`,"data-testid":"webhook-provider",className:"w-full min-h-11 rounded-md border border-control-border bg-background px-3 text-sm",value:n,onChange:c=>r(c.target.value),children:[e.jsx("option",{value:"github",children:"GitHub"}),e.jsx("option",{value:"generic",children:"Other service (HMAC)"})]})]}),e.jsx("p",{className:"text-xs text-outline",children:"Create the event source here. Connect jobs and choose their event filters in Jobs. No job is required to create a webhook."}),a.error&&e.jsx("p",{role:"alert",className:"text-sm text-error",children:a.error.message}),e.jsx(b,{type:"button","data-testid":"webhook-create",disabled:!i.trim()||a.isPending,onClick:()=>a.mutate({name:i.trim(),provider:n,project_id:t??null},{onSuccess:m}),children:a.isPending?"Creating...":"Create webhook"})]})}function A({value:t,onChange:s,projectId:a}){const{data:i,error:d,isLoading:n,refetch:r}=L(a),l=i==null?void 0:i.filter(o=>o.project_id===null||o.project_id===a),[m,u]=h.useState(!1);function c(o){t.some(p=>p.webhook_id===o)||s([...t,{webhook_id:o,events:[],actions:[]}])}function y(o,p,x){s(t.map(g=>g.webhook_id===o?{...g,[p]:P(x)}:g))}return e.jsxs("section",{className:"space-y-3 border-y border-border py-4","data-testid":"job-webhook-picker",children:[e.jsx("h3",{className:"text-sm font-medium",children:"Which webhook should trigger this job?"}),d?e.jsx(R,{message:d.message,onRetry:()=>r()}):e.jsxs(e.Fragment,{children:[e.jsx(w,{htmlFor:"job-webhook-source",children:"Configured webhooks"}),e.jsxs("select",{id:"job-webhook-source","data-testid":"job-webhook-select",className:"w-full min-h-11 rounded-md border border-control-border bg-background px-3 text-sm",value:"",disabled:n,onChange:o=>{o.target.value&&c(o.target.value)},children:[e.jsx("option",{value:"",children:n?"Loading webhooks...":"Select an existing webhook"}),(l??[]).filter(o=>!t.some(p=>p.webhook_id===o.id)).map(o=>e.jsxs("option",{value:o.id,children:[o.name,o.enabled?"":" (disabled)"]},o.id))]}),!n&&!(l!=null&&l.length)&&e.jsx("p",{className:"text-xs text-outline",children:"No webhooks configured for this project yet. Create one below or on the Webhooks page."})]}),t.map(o=>{var p;return e.jsxs("div",{className:"space-y-2 border-t border-border pt-3","data-testid":"job-webhook-binding","data-webhook-id":o.webhook_id,children:[e.jsxs("div",{className:"flex justify-between gap-2",children:[e.jsx("span",{className:"text-sm font-medium",children:((p=l==null?void 0:l.find(x=>x.id===o.webhook_id))==null?void 0:p.name)??o.webhook_id}),e.jsx(b,{type:"button",variant:"ghost",size:"sm","data-testid":"job-webhook-remove",onClick:()=>s(t.filter(x=>x.webhook_id!==o.webhook_id)),children:"Disconnect"})]}),e.jsx(w,{htmlFor:`events-${o.webhook_id}`,children:"Events for this job"}),e.jsx(N,{id:`events-${o.webhook_id}`,testId:"webhook-events",value:o.events,onChange:x=>y(o.webhook_id,"events",x),placeholder:"pull_request, push (blank accepts all)"}),e.jsx(w,{htmlFor:`actions-${o.webhook_id}`,children:"Actions for this job (optional)"}),e.jsx(N,{id:`actions-${o.webhook_id}`,testId:"webhook-actions",value:o.actions,onChange:x=>y(o.webhook_id,"actions",x),placeholder:"opened, synchronize (blank accepts all)"})]},o.webhook_id)}),e.jsx(b,{type:"button",size:"sm",variant:"outline","data-testid":"webhook-add",onClick:()=>u(!m),children:m?"Close new webhook":"Create a webhook"}),m&&e.jsx(J,{projectId:a,onCreated:o=>{c(o.id),u(!1)}})]})}function Q({job:t}){const s=$(),[a,i]=h.useState(t.webhooks??[]);return e.jsxs("section",{className:"space-y-3","data-testid":"job-webhooks",children:[!t.enabled&&e.jsx("p",{className:"text-sm text-outline",children:"Job disabled. Configure connections now and enable it from Jobs when ready."}),e.jsx(A,{value:a,onChange:i,projectId:t.project_id??void 0}),s.error&&e.jsx("p",{role:"alert",className:"text-sm text-error",children:s.error.message}),e.jsx(b,{type:"button",size:"sm","data-testid":"job-webhooks-save",disabled:s.isPending,onClick:()=>s.mutate({id:t.id,webhooks:a,trigger_type:"webhook"}),children:"Save connections"}),s.isSuccess&&e.jsx("p",{role:"status",className:"text-xs text-outline",children:"Connections saved."}),e.jsx(k,{className:"inline-block text-sm underline",to:`/webhooks?project=${encodeURIComponent(t.project_id??"all")}`,children:"Manage configured webhooks and deliveries"})]})}function C({label:t,value:s,secret:a=!1}){const[i,d]=h.useState(!1),[n,r]=h.useState(!1);return e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-xs text-outline",children:t}),e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx("code",{className:"min-w-0 flex-1 break-all text-xs","data-testid":a?"webhook-secret":"webhook-url",children:s}),e.jsx(b,{type:"button",size:"sm",variant:"outline","aria-label":`Copy ${t}`,onClick:async()=>{try{await navigator.clipboard.writeText(s),d(!0),r(!1)}catch{r(!0)}},children:i?"Copied":"Copy"})]}),n&&e.jsx("p",{role:"alert",className:"text-xs text-error",children:"Select and copy the value above; clipboard access is unavailable."})]})}function W({hook:t,secret:s}){const a=q(t.token,F(),window.location.origin);return e.jsxs("div",{className:"space-y-3","data-testid":"webhook-setup",children:[e.jsx(C,{label:"Payload URL",value:a}),z(a)&&e.jsx("p",{className:"text-sm text-warning",children:"This address is local. For external providers, use your publicly reachable ORC address with the same /webhooks/ path."}),s?e.jsxs(e.Fragment,{children:[e.jsx(C,{label:"Signing secret",value:s,secret:!0}),e.jsx("p",{className:"text-xs text-outline",children:"Copy the signing secret before leaving. It is shown once."})]}):e.jsx("p",{className:"text-xs text-outline",children:"The signing secret is hidden. Generate a replacement only if you need to reconnect the sender."}),t.provider==="github"?e.jsxs("ol",{className:"list-decimal space-y-1 pl-5 text-sm text-outline",children:[e.jsx("li",{children:"In your repository, open GitHub Settings - Webhooks - Add webhook."}),e.jsx("li",{children:"Paste the Payload URL, select application/json, and enter the signing secret."}),e.jsx("li",{children:"Select the events needed by your connected jobs. Each job has its own filters."}),e.jsx("li",{children:"Send an event and inspect Recent deliveries below."})]}):e.jsx("p",{className:"text-sm text-outline",children:"Send JSON, signed with HMAC-SHA256 of the raw body. Set X-Orc-Signature-256 to sha256=<hex signature>, X-Orc-Event to the event name and X-Orc-Delivery to a unique delivery ID."})]})}function M({hook:t}){var u;const s=E(),a=I(),[i,d]=h.useState(!1),[n,r]=h.useState(!1),[l,m]=h.useState();return e.jsxs("article",{className:"space-y-3 border-b border-border pb-5","data-testid":"webhook-endpoint","data-webhook-id":t.id,children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsx("h3",{className:"text-sm font-medium",children:t.name}),e.jsxs("span",{className:"text-xs text-outline",children:[t.provider," - ",t.enabled?"Enabled":"Disabled"]}),e.jsx(b,{type:"button",variant:"outline",size:"sm",disabled:s.isPending,onClick:()=>s.mutate({id:t.id,enabled:!t.enabled}),children:t.enabled?"Disable":"Enable"})]}),e.jsxs("div",{className:"space-y-1","data-testid":"webhook-connected-jobs",children:[e.jsxs("p",{className:"text-xs text-outline",children:["Connected jobs (",t.subscriptions.length,")"]}),t.subscriptions.length?t.subscriptions.map(c=>e.jsxs("div",{className:"text-sm",children:[e.jsx(k,{className:"underline","data-testid":"webhook-job-link",to:`/jobs/${c.job_id}?project=all`,children:c.name}),e.jsxs("span",{className:"text-xs text-outline",children:[" ","- ",c.enabled?"Enabled":"Disabled","; events:"," ",c.events.join(", ")||"all","; actions: ",c.actions.join(", ")||"all"]})]},c.job_id)):e.jsx("p",{className:"text-sm text-outline",children:"No connected jobs. Select this webhook when creating or editing a job."})]}),e.jsx(W,{hook:t,secret:l}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(b,{type:"button",variant:"outline",size:"sm","data-testid":"webhook-deliveries-toggle",onClick:()=>d(!i),children:i?"Hide deliveries":"Recent deliveries"}),e.jsx(b,{type:"button",variant:"ghost",size:"sm",onClick:()=>r(!n),children:"New signing secret"})]}),n&&e.jsxs("div",{className:"space-y-2 text-sm",children:[e.jsx("p",{children:"The sender's existing secret will stop working. Update it after generating the replacement."}),e.jsx(b,{type:"button",variant:"outline",size:"sm",disabled:a.isPending,onClick:()=>a.mutate(t.id,{onSuccess:c=>{m(c.secret),r(!1)}}),children:"Generate replacement secret"})]}),(s.error||a.error)&&e.jsx("p",{role:"alert",className:"text-sm text-error",children:(u=s.error??a.error)==null?void 0:u.message}),i&&e.jsx(H,{id:t.id})]})}function H({id:t}){const{data:s,isLoading:a,error:i,refetch:d}=D(t);return e.jsxs("section",{className:"space-y-2","data-testid":"webhook-deliveries",children:[e.jsx("h4",{className:"text-sm font-medium",children:"Recent deliveries"}),i?e.jsx(R,{message:i.message,onRetry:()=>d()}):a?e.jsx("p",{role:"status",children:"Loading deliveries..."}):s!=null&&s.length?s.map(n=>e.jsxs("div",{className:"space-y-1 border-t border-border py-2 text-xs","data-testid":"webhook-delivery",children:[e.jsxs("div",{className:"flex flex-wrap justify-between gap-2",children:[e.jsxs("span",{children:[n.event,n.action?` / ${n.action}`:""]}),e.jsx("span",{children:n.status})]}),e.jsxs("p",{className:"text-outline",children:[n.repository," ",new Date(n.created_at).toLocaleString()]}),n.status==="ignored"&&e.jsx("p",{className:"text-outline",children:"No enabled connected job matched this event."}),n.error&&e.jsx("p",{className:"text-error",children:n.error}),n.runs.map(r=>e.jsxs("div",{className:"flex flex-wrap gap-3",children:[e.jsxs(k,{className:"underline",to:`/jobs/${r.job_id}?project=all`,children:["Job run: ",r.status]}),r.task_id&&e.jsx(k,{className:"underline",to:`/tasks/${r.task_id}?project=all`,children:"Created task"}),r.session_id&&e.jsx(k,{className:"underline",to:`/audit/${r.session_id}?project=all`,children:"Agent session"})]},r.job_run_id))]},n.id)):e.jsx("p",{className:"text-sm text-outline",children:"No events received yet. Register the endpoint with your provider, then send an event."})]})}export{Q as J,J as W,K as a,M as b,A as c,L as u};
|