@maudecode/talaria-web 1.20.0 → 1.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_release.json +8 -8
- package/dist/api/automation-router.d.ts +313 -8
- package/dist/api/automation-router.js +21 -1
- package/dist/api/automation-router.js.map +1 -1
- package/dist/api/chat-router.d.ts +412 -15
- package/dist/api/chat-router.js +22 -170
- package/dist/api/chat-router.js.map +1 -1
- package/dist/api/git-router.d.ts +50 -0
- package/dist/api/git-router.js +17 -4
- package/dist/api/git-router.js.map +1 -1
- package/dist/api/router.d.ts +1 -1
- package/dist/api/sessions-router.d.ts +1138 -29
- package/dist/api/sessions-router.js +58 -41
- package/dist/api/sessions-router.js.map +1 -1
- package/dist/api/sse-routes.js +4 -2
- package/dist/api/sse-routes.js.map +1 -1
- package/dist/api/tools-router.d.ts +481 -29
- package/dist/api/tools-router.js +34 -9
- package/dist/api/tools-router.js.map +1 -1
- package/dist/http/context.d.ts +2 -0
- package/dist/http/context.js.map +1 -1
- package/dist/redact.d.ts +2 -0
- package/dist/redact.js +17 -2
- package/dist/redact.js.map +1 -1
- package/dist/runtime.js +36 -8
- package/dist/runtime.js.map +1 -1
- package/dist/server.js +1 -0
- package/dist/server.js.map +1 -1
- package/dist/sessions/admission.d.ts +21 -0
- package/dist/sessions/admission.js +176 -0
- package/dist/sessions/admission.js.map +1 -0
- package/dist/sessions/anchor.d.ts +2 -0
- package/dist/sessions/anchor.js +4 -4
- package/dist/sessions/anchor.js.map +1 -1
- package/dist/sessions/background-tasks.d.ts +19 -1
- package/dist/sessions/background-tasks.js +36 -6
- package/dist/sessions/background-tasks.js.map +1 -1
- package/dist/sessions/events.d.ts +3 -0
- package/dist/sessions/events.js +4 -0
- package/dist/sessions/events.js.map +1 -1
- package/dist/sessions/gateway-sessions.d.ts +50 -2
- package/dist/sessions/gateway-sessions.js +144 -11
- package/dist/sessions/gateway-sessions.js.map +1 -1
- package/dist/sessions/merge.d.ts +1 -0
- package/dist/sessions/merge.js +7 -2
- package/dist/sessions/merge.js.map +1 -1
- package/dist/sessions/prefix-index.d.ts +8 -0
- package/dist/sessions/prefix-index.js +14 -3
- package/dist/sessions/prefix-index.js.map +1 -1
- package/dist/sessions/prompt-queues.d.ts +36 -0
- package/dist/sessions/prompt-queues.js +318 -0
- package/dist/sessions/prompt-queues.js.map +1 -0
- package/dist/sessions/relay.d.ts +12 -1
- package/dist/sessions/relay.js +75 -17
- package/dist/sessions/relay.js.map +1 -1
- package/dist/sessions/service.d.ts +26 -1
- package/dist/sessions/service.js +200 -6
- package/dist/sessions/service.js.map +1 -1
- package/dist/sessions/session.js +1 -0
- package/dist/sessions/session.js.map +1 -1
- package/dist/sessions/storage/json-documents.js +1 -0
- package/dist/sessions/storage/json-documents.js.map +1 -1
- package/dist/sessions/store.d.ts +1 -0
- package/dist/sessions/store.js +1 -0
- package/dist/sessions/store.js.map +1 -1
- package/dist/sessions/streams.d.ts +2 -0
- package/dist/sessions/streams.js.map +1 -1
- package/dist/sessions/tool-display.d.ts +8 -1
- package/dist/sessions/tool-display.js +39 -4
- package/dist/sessions/tool-display.js.map +1 -1
- package/dist/sessions/turn.d.ts +4 -1
- package/dist/sessions/turn.js +20 -13
- package/dist/sessions/turn.js.map +1 -1
- package/dist/tools/gateway-restart.d.ts +1 -1
- package/dist/tools/kanban.d.ts +10 -1
- package/dist/tools/kanban.js +73 -1
- package/dist/tools/kanban.js.map +1 -1
- package/dist/tools/mcp.d.ts +3 -1
- package/dist/tools/mcp.js +73 -0
- package/dist/tools/mcp.js.map +1 -1
- package/dist/tools/memory.d.ts +28 -0
- package/dist/tools/memory.js +120 -14
- package/dist/tools/memory.js.map +1 -1
- package/dist/tools/update-notifications.d.ts +12 -10
- package/dist/tools/update-notifications.js +124 -14
- package/dist/tools/update-notifications.js.map +1 -1
- package/dist/tools/updates.d.ts +22 -3
- package/dist/tools/updates.js +118 -20
- package/dist/tools/updates.js.map +1 -1
- package/dist/workspace/managed-buffers.d.ts +58 -0
- package/dist/workspace/managed-buffers.js +76 -0
- package/dist/workspace/managed-buffers.js.map +1 -0
- package/dist/workspace/rollback.js +1 -1
- package/dist/workspace/rollback.js.map +1 -1
- package/package.json +2 -2
- package/sidecar/agent_dependency.json +4 -4
- package/sidecar/agent_support.json +20 -8
- package/sidecar/talaria_sidecar/__init__.py +1 -1
- package/sidecar/talaria_sidecar/agent_mutation.py +87 -9
- package/sidecar/talaria_sidecar/agent_services.py +83 -23
- package/sidecar/talaria_sidecar/methods/__init__.py +2 -2
- package/sidecar/talaria_sidecar/methods/dashboard_plugins.py +4 -4
- package/sidecar/talaria_sidecar/methods/gateway_sessions.py +109 -19
- package/sidecar/talaria_sidecar/methods/kanban.py +48 -0
- package/sidecar/talaria_sidecar/methods/managed_buffers.py +110 -0
- package/sidecar/talaria_sidecar/methods/mcp.py +55 -0
- package/sidecar/talaria_sidecar/methods/outbound_drafts.py +165 -0
- package/static/dist/FILES.txt +127 -128
- package/static/dist/assets/AppShell-c5989995.js +8 -0
- package/static/dist/assets/Button-nuaikybd.js +1 -0
- package/static/dist/assets/ChatPage-bfg4khph.js +6 -0
- package/static/dist/assets/ConnectTargets-k5wo9yo8.js +1 -0
- package/static/dist/assets/{Dialog-hta5utr3.js → Dialog-o8vo2aws.js} +1 -1
- package/static/dist/assets/{ExtensionRoute-zrhjn0wm.js → ExtensionRoute-l1yjrso4.js} +1 -1
- package/static/dist/assets/Field-j7o8cfps.js +1 -0
- package/static/dist/assets/HubRoute-efnwe4xz.js +2 -0
- package/static/dist/assets/Markdown-clqf5m22.js +2 -0
- package/static/dist/assets/{MarkdownRenderer-fbswsgld.js → MarkdownRenderer-ccgqrza3.js} +18 -18
- package/static/dist/assets/OAuthSignIn-h7bjaqp6.js +1 -0
- package/static/dist/assets/{ResourceSwitch-odi6dy2o.js → ResourceSwitch-oai2zqaj.js} +1 -1
- package/static/dist/assets/RightPanel-ho161a45.js +1 -0
- package/static/dist/assets/{Select-kr07928w.js → Select-d1g5a8bm.js} +1 -1
- package/static/dist/assets/SessionListPanel-i7kaokhi.js +1 -0
- package/static/dist/assets/SettingsLayout-lnecm87w.js +1 -0
- package/static/dist/assets/{States-icab19yg.js → States-easntmry.js} +1 -1
- package/static/dist/assets/TerminalPanel-lxhwd4jl.js +16 -0
- package/static/dist/assets/Toaster-l4sciy8t.js +1 -0
- package/static/dist/assets/_app-mqexqbg8.js +1 -0
- package/static/dist/assets/{_app.ext._extensionId-na62087t.js → _app.ext._extensionId-n797jp72.js} +1 -1
- package/static/dist/assets/{_app.index-jypgdqoi.js → _app.index-ne43mdw2.js} +1 -1
- package/static/dist/assets/{_app.insights-kabejdtm.js → _app.insights-fqonovb4.js} +1 -1
- package/static/dist/assets/{_app.kanban-m19kfcmx.js → _app.kanban-kysliv19.js} +1 -1
- package/static/dist/assets/{_app.logs-iw4m96sz.js → _app.logs-febut82r.js} +1 -1
- package/static/dist/assets/{_app.memory-jq5frwcg.js → _app.memory-ha86oj1c.js} +1 -1
- package/static/dist/assets/{_app.profiles-kwa3m7rp.js → _app.profiles-cnu3gxxq.js} +1 -1
- package/static/dist/assets/{_app.session._sessionId-o5lyeipj.js → _app.session._sessionId-ifzjpcgn.js} +1 -1
- package/static/dist/assets/{_app.settings-ckl8hdll.js → _app.settings-nmakdiaf.js} +1 -1
- package/static/dist/assets/_app.settings._section-djglnjmi.js +3 -0
- package/static/dist/assets/{_app.skills-n016rihd.js → _app.skills-f3wad8yo.js} +1 -1
- package/static/dist/assets/_app.tasks-l10py1c0.js +1 -0
- package/static/dist/assets/{_app.todos-btew5v2s.js → _app.todos-bml1m3r1.js} +1 -1
- package/static/dist/assets/{_app.workspaces-lnfk95ch.js → _app.workspaces-f3d066lx.js} +1 -1
- package/static/dist/assets/{abnfDiagram-VCTEODGH-dttheegb.js → abnfDiagram-VCTEODGH-i53jc4yp.js} +1 -1
- package/static/dist/assets/{architecture-7GRP2DOG-ic435919.js → architecture-7GRP2DOG-e3bv5m6f.js} +1 -1
- package/static/dist/assets/{architectureDiagram-5GKGNRK7-8r3glgiq.js → architectureDiagram-5GKGNRK7-pakekxu2.js} +1 -1
- package/static/dist/assets/{archive-il7c6053.js → archive-ihqi7z2x.js} +1 -1
- package/static/dist/assets/{blockDiagram-I7D4REHJ-jenyos6c.js → blockDiagram-I7D4REHJ-bc6bo1n6.js} +1 -1
- package/static/dist/assets/{c4Diagram-7LVT6UL2-nzlx7yc4.js → c4Diagram-7LVT6UL2-btvwk2qx.js} +1 -1
- package/static/dist/assets/channel-jn4f8443.js +1 -0
- package/static/dist/assets/{chunk-4HAMMTFA-g0cru63b.js → chunk-4HAMMTFA-dlwab11c.js} +1 -1
- package/static/dist/assets/{chunk-75Z2AOVW-7rkswkjw.js → chunk-75Z2AOVW-dp5gh7i8.js} +1 -1
- package/static/dist/assets/{chunk-DU6HZSFF-fn73jzdo.js → chunk-DU6HZSFF-bi06zl1c.js} +1 -1
- package/static/dist/assets/{chunk-F27PBJKO-oey8e72m.js → chunk-F27PBJKO-kvv1rnlh.js} +1 -1
- package/static/dist/assets/{chunk-GMAD6QVW-l2a32wiy.js → chunk-GMAD6QVW-ji0rx9by.js} +1 -1
- package/static/dist/assets/{chunk-GVQU2GXP-o9dwzh8h.js → chunk-GVQU2GXP-nmz0j82p.js} +1 -1
- package/static/dist/assets/{chunk-IMKFNOWR-eblwj20b.js → chunk-IMKFNOWR-kmi1qx88.js} +1 -1
- package/static/dist/assets/{chunk-L3NEJ4N5-o2mufspb.js → chunk-L3NEJ4N5-xhb7mebj.js} +1 -1
- package/static/dist/assets/{chunk-OSK3NFVY-ijp9pw29.js → chunk-OSK3NFVY-5a9sgscq.js} +1 -1
- package/static/dist/assets/{chunk-P2QGCYS3-hs9hqwl4.js → chunk-P2QGCYS3-dfezp4vu.js} +1 -1
- package/static/dist/assets/{chunk-POPQ4Y6H-bp9rsqez.js → chunk-POPQ4Y6H-gd2vq3c0.js} +1 -1
- package/static/dist/assets/{chunk-PWAF6VOD-brkprov6.js → chunk-PWAF6VOD-wvw2nksf.js} +1 -1
- package/static/dist/assets/{chunk-SHT3W25Y-gmpv0pxz.js → chunk-SHT3W25Y-f58q97px.js} +1 -1
- package/static/dist/assets/{chunk-SVP7TREG-oldm08fu.js → chunk-SVP7TREG-abgwpyz9.js} +1 -1
- package/static/dist/assets/{chunk-TICWLB2K-ooqilfv7.js → chunk-TICWLB2K-h4sbs8ds.js} +1 -1
- package/static/dist/assets/classDiagram-ZZMXUADV-dzrw66se.js +1 -0
- package/static/dist/assets/classDiagram-v2-VYDZK3BY-dzrw66se.js +1 -0
- package/static/dist/assets/completionAudio-ce86msbu.js +1 -0
- package/static/dist/assets/{copy-jo006coq.js → copy-m9h56qa8.js} +1 -1
- package/static/dist/assets/{cynefin-OW5HDTMX-d47op7qs.js → cynefin-OW5HDTMX-g081vffs.js} +1 -1
- package/static/dist/assets/{cynefinDiagram-5FMLGOSQ-doa7594y.js → cynefinDiagram-5FMLGOSQ-odxvjesk.js} +1 -1
- package/static/dist/assets/{dagre-GXQ25YYZ-os768dp4.js → dagre-GXQ25YYZ-cpdwzjs4.js} +1 -1
- package/static/dist/assets/{diagram-S7CK7UJ4-fyi81nxd.js → diagram-S7CK7UJ4-clv5mxvu.js} +1 -1
- package/static/dist/assets/{diagram-UQ7AKVKN-j3exggaq.js → diagram-UQ7AKVKN-m2ia1mbf.js} +1 -1
- package/static/dist/assets/{diagram-VSXAHHWV-omo1en2l.js → diagram-VSXAHHWV-ea6zv636.js} +1 -1
- package/static/dist/assets/{diagram-VX7I27RA-oro2cyu0.js → diagram-VX7I27RA-oqlef685.js} +1 -1
- package/static/dist/assets/{diagram-Z3DM3KII-byt9vdb7.js → diagram-Z3DM3KII-kjubcbwu.js} +1 -1
- package/static/dist/assets/{dist-etpoyscq.js → dist-carq1azj.js} +4 -4
- package/static/dist/assets/{ebnfDiagram-PWID7BFC-ee3haugh.js → ebnfDiagram-PWID7BFC-fg0zri3e.js} +1 -1
- package/static/dist/assets/{erDiagram-RLTQ6QDP-d1e93yff.js → erDiagram-RLTQ6QDP-eb7pmk3x.js} +1 -1
- package/static/dist/assets/{eventmodeling-NTZA5JFV-i1ihb40c.js → eventmodeling-NTZA5JFV-gvi1fxhn.js} +1 -1
- package/static/dist/assets/flowDiagram-HODETNUW-abekab15.js +1 -0
- package/static/dist/assets/folder-plus-ksaons88.js +1 -0
- package/static/dist/assets/{ganttDiagram-EL5Y4UJY-m7g0jud4.js → ganttDiagram-EL5Y4UJY-jmisowrc.js} +1 -1
- package/static/dist/assets/{gitGraph-4MIJSDKK-hzdj07yy.js → gitGraph-4MIJSDKK-m7kt3u6e.js} +1 -1
- package/static/dist/assets/{gitGraphDiagram-WWUBYQGX-dm9agbna.js → gitGraphDiagram-WWUBYQGX-nq7vfzh2.js} +1 -1
- package/static/dist/assets/{highlighted-body-KPVGNVTW-mmgz2czu.js → highlighted-body-KPVGNVTW-gcu017ay.js} +1 -1
- package/static/dist/assets/{host-fr6lni1p.js → host-ipp4e84c.js} +1 -1
- package/static/dist/assets/{index-73649w7o.js → index-d6vbxlra.js} +7 -4
- package/static/dist/assets/index-ey6qo0zx.css +2 -0
- package/static/dist/assets/{info-A6RAGUB7-lll1dqmm.js → info-A6RAGUB7-idazwfqe.js} +1 -1
- package/static/dist/assets/{infoDiagram-27XIBGKW-k7esc639.js → infoDiagram-27XIBGKW-bb9jh8gl.js} +1 -1
- package/static/dist/assets/{ishikawaDiagram-5VMMS53U-lgr6k9wo.js → ishikawaDiagram-5VMMS53U-nqc132rv.js} +1 -1
- package/static/dist/assets/{journeyDiagram-3NMN7TZE-ndmbxuqk.js → journeyDiagram-3NMN7TZE-fpvnhy44.js} +1 -1
- package/static/dist/assets/{kanban-definition-UXKFOSKX-mjxym0jp.js → kanban-definition-UXKFOSKX-ndzqm6fu.js} +1 -1
- package/static/dist/assets/{lazyRouteComponent-cwb6l7xh.js → lazyRouteComponent-javud235.js} +1 -1
- package/static/dist/assets/{line-mtr5k6il.js → line-g625e7cj.js} +1 -1
- package/static/dist/assets/{link-iadw4ghw.js → link-gfdaho08.js} +1 -1
- package/static/dist/assets/{login-lkhtzfcl.js → login-iv6yq4xf.js} +1 -1
- package/static/dist/assets/mermaid-HWGCJPDP-cwj5cl6k.js +1 -0
- package/static/dist/assets/{mermaid-parser.core-k91vdnvi.js → mermaid-parser.core-plzkuzov.js} +3 -3
- package/static/dist/assets/{mindmap-definition-YA3MSWOX-ehztfea4.js → mindmap-definition-YA3MSWOX-ojrgs569.js} +1 -1
- package/static/dist/assets/onboarding-ff4emacu.js +1 -0
- package/static/dist/assets/{packet-AYTQ26CC-ok2xrblz.js → packet-AYTQ26CC-gyaf9s8h.js} +1 -1
- package/static/dist/assets/{pegDiagram-XKGWAZYB-ec3rpj0m.js → pegDiagram-XKGWAZYB-bf6xj8mq.js} +1 -1
- package/static/dist/assets/{pie-WAS4IAKB-iwkir23u.js → pie-WAS4IAKB-f5ymzelo.js} +1 -1
- package/static/dist/assets/{pieDiagram-E7YTZNPT-fcpqpekh.js → pieDiagram-E7YTZNPT-d0qjl3zi.js} +1 -1
- package/static/dist/assets/{quadrantDiagram-AXDQQJYC-lqsync43.js → quadrantDiagram-AXDQQJYC-oqy1mras.js} +1 -1
- package/static/dist/assets/queryKeys-x8fjxhut.js +9 -0
- package/static/dist/assets/{radar-RG4KPBEZ-hje4jbk6.js → radar-RG4KPBEZ-b6jcjvda.js} +1 -1
- package/static/dist/assets/{railroad-74A4TZTK-gll9n6qi.js → railroad-74A4TZTK-e3a6lk5k.js} +1 -1
- package/static/dist/assets/{railroad-abnf-HS5TGJTU-o6h6lpn4.js → railroad-abnf-HS5TGJTU-ff5hocrx.js} +1 -1
- package/static/dist/assets/{railroad-ebnf-LZEXJU2U-juaefj6o.js → railroad-ebnf-LZEXJU2U-exkhyw4n.js} +1 -1
- package/static/dist/assets/{railroad-peg-WCYAUIDC-cgfhvpah.js → railroad-peg-WCYAUIDC-jefk9b7c.js} +1 -1
- package/static/dist/assets/{railroadDiagram-O6MQD6OU-lp3w7awf.js → railroadDiagram-O6MQD6OU-e4amks1i.js} +1 -1
- package/static/dist/assets/{refresh-cw-iccm7a4e.js → refresh-cw-lfp4u1oh.js} +1 -1
- package/static/dist/assets/{requirementDiagram-BXWQKSXE-ha8eibcf.js → requirementDiagram-BXWQKSXE-c77k1e2y.js} +1 -1
- package/static/dist/assets/{sankeyDiagram-P5KCCOFB-oxf31pr9.js → sankeyDiagram-P5KCCOFB-oa1cc52s.js} +1 -1
- package/static/dist/assets/{sequenceDiagram-WJ2MYXX4-jiq8lhyo.js → sequenceDiagram-WJ2MYXX4-j20gqt22.js} +1 -1
- package/static/dist/assets/{share._token-o76ki0ly.js → share._token-kmfoflw6.js} +2 -2
- package/static/dist/assets/{sliders-horizontal-ddcs88av.js → sliders-horizontal-g5jkzd9k.js} +1 -1
- package/static/dist/assets/{stateDiagram-D77RDMKH-f3fslnon.js → stateDiagram-D77RDMKH-co2ghkdp.js} +1 -1
- package/static/dist/assets/stateDiagram-v2-MP3YSRHH-faw1opgh.js +1 -0
- package/static/dist/assets/{swimlanes-42K2YHIH-k1hmk7jf.js → swimlanes-42K2YHIH-m30cktqe.js} +1 -1
- package/static/dist/assets/swimlanesDiagram-VR7AAH4N-hfil433g.js +8 -0
- package/static/dist/assets/{timeline-definition-24CTP7MA-n3ncfy9r.js → timeline-definition-24CTP7MA-liuep6fl.js} +1 -1
- package/static/dist/assets/toast-zmb35u3r.js +56 -0
- package/static/dist/assets/{treeView-Q6P3EWNA-l3y2pejt.js → treeView-Q6P3EWNA-np5d2jv2.js} +1 -1
- package/static/dist/assets/{treemap-WGGIJYW6-jown9axh.js → treemap-WGGIJYW6-cmpltxh1.js} +1 -1
- package/static/dist/assets/{useForm-o4uu74mx.js → useForm-f1udzsjf.js} +1 -1
- package/static/dist/assets/{useParams-ftsveu84.js → useParams-ierevvts.js} +1 -1
- package/static/dist/assets/{useSearch-crqueqga.js → useSearch-i7nr9ypl.js} +1 -1
- package/static/dist/assets/{vennDiagram-4TSXK5OY-dh59uq1c.js → vennDiagram-4TSXK5OY-b2g42qrg.js} +1 -1
- package/static/dist/assets/{wardley-WFR3VGLG-e6d74b0j.js → wardley-WFR3VGLG-lb0eqbff.js} +1 -1
- package/static/dist/assets/{wardleyDiagram-VM6X3IG4-hnofh78f.js → wardleyDiagram-VM6X3IG4-ermwaqha.js} +1 -1
- package/static/dist/assets/{xychartDiagram-S5SC5T6Z-bpymjelb.js → xychartDiagram-S5SC5T6Z-dll0jldk.js} +1 -1
- package/static/dist/index.html +1 -1
- package/static/dist/sw.js +1 -1
- package/static/dist/assets/AppShell-3isgvoro.js +0 -8
- package/static/dist/assets/Button-f4n6dapf.js +0 -1
- package/static/dist/assets/ChatPage-k7b6xfax.js +0 -4
- package/static/dist/assets/ConnectTargets-juqvt5lm.js +0 -1
- package/static/dist/assets/Field-b6ez48oz.js +0 -1
- package/static/dist/assets/HubRoute-iwvso2tz.js +0 -2
- package/static/dist/assets/Markdown-jdeth7zq.js +0 -2
- package/static/dist/assets/OAuthSignIn-bpd8hom3.js +0 -1
- package/static/dist/assets/RightPanel-eu6enlo6.js +0 -1
- package/static/dist/assets/SessionListPanel-etb2i54l.js +0 -1
- package/static/dist/assets/SettingsLayout-eu3xxp23.js +0 -1
- package/static/dist/assets/TerminalPanel-hngmsr8b.js +0 -16
- package/static/dist/assets/Toaster-nb2uzjw1.js +0 -1
- package/static/dist/assets/_app-ga1moszl.js +0 -1
- package/static/dist/assets/_app.settings._section-dtdjk98a.js +0 -3
- package/static/dist/assets/_app.tasks-n8zuqsqe.js +0 -1
- package/static/dist/assets/cancel-bsnfo36u.js +0 -1
- package/static/dist/assets/channel-dsbtk01y.js +0 -1
- package/static/dist/assets/classDiagram-ZZMXUADV-fvgcv24g.js +0 -1
- package/static/dist/assets/classDiagram-v2-VYDZK3BY-fvgcv24g.js +0 -1
- package/static/dist/assets/flowDiagram-HODETNUW-jahfpiod.js +0 -1
- package/static/dist/assets/folder-plus-ivoglq98.js +0 -1
- package/static/dist/assets/index-lhf1fsdf.css +0 -2
- package/static/dist/assets/mermaid-HWGCJPDP-jx0q5dm2.js +0 -1
- package/static/dist/assets/onboarding-f67z0a2r.js +0 -1
- package/static/dist/assets/queryKeys-ed4n2egc.js +0 -9
- package/static/dist/assets/refresh-i9ya9dvl.js +0 -1
- package/static/dist/assets/stateDiagram-v2-MP3YSRHH-hlt6yphw.js +0 -1
- package/static/dist/assets/swimlanesDiagram-VR7AAH4N-hd5t9tnt.js +0 -8
- package/static/dist/assets/toast-liparz2j.js +0 -56
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"""Fixed devkit REST adapter through the existing admitted Agent plugin host."""
|
|
2
|
+
import base64
|
|
3
|
+
import json
|
|
4
|
+
import re
|
|
5
|
+
|
|
6
|
+
from .. import home as homes
|
|
7
|
+
from ..errors import InvalidParams, RpcError
|
|
8
|
+
from . import dashboard_plugins as host
|
|
9
|
+
|
|
10
|
+
MAX_BYTES = 256 * 1024
|
|
11
|
+
_NAME = re.compile(r'[A-Za-z0-9][A-Za-z0-9._-]{0,127}')
|
|
12
|
+
_DIR = re.compile(r'[A-Za-z0-9_-]{1,96}')
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def _text_size(value):
|
|
16
|
+
try:
|
|
17
|
+
return len(value.encode('utf-8')) if isinstance(value, str) else -1
|
|
18
|
+
except UnicodeError:
|
|
19
|
+
return -1
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def _bad():
|
|
23
|
+
raise RpcError('Managed buffer response is invalid or too large', condition='buffer_invalid')
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def _json(ctx, plugin, home, method, path, content=None):
|
|
27
|
+
# Recheck admission for each native call, including the PUT after inventory.
|
|
28
|
+
current = host._named(home, 'devkit', require_panel=False)
|
|
29
|
+
if current is None or current['_dir'] != plugin['_dir'] or current.get('_api_file') != plugin.get('_api_file'):
|
|
30
|
+
raise RpcError('Managed buffer backend changed or was disabled', condition='buffer_unavailable')
|
|
31
|
+
body = b'' if content is None else json.dumps({'content': content}, ensure_ascii=False).encode()
|
|
32
|
+
result = host._request(ctx, plugin, dict(profile_home=str(home), authenticated=True, method=method, path=path, query='',
|
|
33
|
+
headers={'content-type': 'application/json'}, body=base64.b64encode(body).decode()), require_panel=False)
|
|
34
|
+
if result['status'] != 200:
|
|
35
|
+
# A PUT may have committed before an error or malformed acknowledgement. Never replay it here.
|
|
36
|
+
raise RpcError('Managed buffer unavailable' if method == 'GET' else 'Save outcome is unknown; reload before retrying',
|
|
37
|
+
condition='buffer_unavailable' if method == 'GET' else 'buffer_save_unconfirmed')
|
|
38
|
+
try:
|
|
39
|
+
value = json.loads(base64.b64decode(result['body']))
|
|
40
|
+
except (ValueError, UnicodeDecodeError):
|
|
41
|
+
_bad()
|
|
42
|
+
if not isinstance(value, dict):
|
|
43
|
+
_bad()
|
|
44
|
+
return value
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def run(ctx, params):
|
|
48
|
+
action, sid = params.get('action'), params.get('session_id')
|
|
49
|
+
if action not in ('list', 'read', 'save') or not isinstance(sid, str) or not 0 < len(sid) <= 200:
|
|
50
|
+
raise InvalidParams('Invalid managed buffer request')
|
|
51
|
+
name = params.get('name')
|
|
52
|
+
if action != 'list' and (not isinstance(name, str) or not _NAME.fullmatch(name)):
|
|
53
|
+
raise InvalidParams('Invalid managed buffer name')
|
|
54
|
+
content = params.get('content')
|
|
55
|
+
if action == 'save' and (not 0 <= _text_size(content) <= MAX_BYTES):
|
|
56
|
+
raise InvalidParams('Managed buffer content is too large or is not text')
|
|
57
|
+
home = homes.profile_home_param(params)
|
|
58
|
+
with homes.scoped_home(home, load_plugins=False):
|
|
59
|
+
plugin = host._named(home, 'devkit', require_panel=False) if host._supported() else None
|
|
60
|
+
result = {'supported': plugin is not None, 'buffers': [], 'write_semantics': 'unconditional'}
|
|
61
|
+
if plugin is None:
|
|
62
|
+
if action != 'list':
|
|
63
|
+
raise RpcError('Enable and approve the devkit backend in Plugins', condition='buffer_unavailable')
|
|
64
|
+
return result
|
|
65
|
+
rows = _json(ctx, plugin, home, 'GET', '/sessions').get('sessions')
|
|
66
|
+
if not isinstance(rows, list) or len(rows) > 2000 or any(not isinstance(r, dict) for r in rows):
|
|
67
|
+
_bad()
|
|
68
|
+
matches = [r for r in rows if r.get('session_id') == sid]
|
|
69
|
+
if len(matches) > 1:
|
|
70
|
+
_bad()
|
|
71
|
+
row = matches[0] if matches else None
|
|
72
|
+
if row is None:
|
|
73
|
+
if action != 'list':
|
|
74
|
+
raise RpcError('Managed buffer no longer exists', condition='buffer_unavailable')
|
|
75
|
+
return result
|
|
76
|
+
directory, buffers = row.get('dir'), row.get('buffers')
|
|
77
|
+
if not isinstance(directory, str) or not _DIR.fullmatch(directory) or not isinstance(buffers, list) or len(buffers) > 200:
|
|
78
|
+
_bad()
|
|
79
|
+
seen = set()
|
|
80
|
+
for buf in buffers:
|
|
81
|
+
if not isinstance(buf, dict):
|
|
82
|
+
_bad()
|
|
83
|
+
key, size = buf.get('name'), buf.get('bytes')
|
|
84
|
+
if not isinstance(key, str) or not _NAME.fullmatch(key) or key in seen or type(size) is not int or not 0 <= size <= MAX_BYTES:
|
|
85
|
+
_bad()
|
|
86
|
+
seen.add(key)
|
|
87
|
+
result['buffers'].append({'name': key, 'size': size, 'read_only': row.get('exists') is not True})
|
|
88
|
+
if action == 'list':
|
|
89
|
+
return result
|
|
90
|
+
selected = next((b for b in result['buffers'] if b['name'] == name), None)
|
|
91
|
+
if selected is None:
|
|
92
|
+
raise RpcError('Managed buffer no longer exists', condition='buffer_unavailable')
|
|
93
|
+
if action == 'save' and selected['read_only']:
|
|
94
|
+
raise RpcError('Managed session is deleted or cannot be verified', condition='buffer_read_only')
|
|
95
|
+
value = _json(ctx, plugin, home, 'PUT' if action == 'save' else 'GET', f'/sessions/{directory}/buffers/{name}', content if action == 'save' else None)
|
|
96
|
+
if action == 'read':
|
|
97
|
+
text = value.get('content')
|
|
98
|
+
if value.get('session_id') != sid or value.get('name') != name or not 0 <= _text_size(text) <= MAX_BYTES:
|
|
99
|
+
_bad()
|
|
100
|
+
result.update(content=text, size=_text_size(text), read_only=selected['read_only'])
|
|
101
|
+
else:
|
|
102
|
+
# Native PUT acknowledgements may omit session_id, but an explicit identity must match.
|
|
103
|
+
if value.get('session_id', sid) != sid or value.get('name') != name or type(value.get('bytes')) is not int or not 0 <= value['bytes'] <= MAX_BYTES:
|
|
104
|
+
raise RpcError('Save outcome is unknown; reload before retrying', condition='buffer_save_unconfirmed')
|
|
105
|
+
result.update(size=value['bytes'], read_only=False)
|
|
106
|
+
return result
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
def register(registry):
|
|
110
|
+
registry.method('plugins.buffers')(run)
|
|
@@ -6,6 +6,8 @@ Config edits and health probes live in the server; this namespace only reads
|
|
|
6
6
|
|
|
7
7
|
from __future__ import annotations
|
|
8
8
|
|
|
9
|
+
import hashlib
|
|
10
|
+
import json
|
|
9
11
|
import logging
|
|
10
12
|
|
|
11
13
|
from ..home import profile_home_param, scoped_home
|
|
@@ -48,7 +50,60 @@ def registry_tools() -> list[dict]:
|
|
|
48
50
|
return out
|
|
49
51
|
|
|
50
52
|
|
|
53
|
+
def cost_policies(servers: dict) -> dict:
|
|
54
|
+
"""Read declarations using the native parser; inspect cached packages without discovering or connecting."""
|
|
55
|
+
try:
|
|
56
|
+
from tools.mcp_tool_costs import CONFIG_KEYS, _parse_cost, config_cost_policy
|
|
57
|
+
from hermes_cli.plugins import get_plugin_manager
|
|
58
|
+
|
|
59
|
+
portable = get_plugin_manager().get_portable_mcp_servers()
|
|
60
|
+
except (ImportError, AttributeError):
|
|
61
|
+
return {"supported": False, "policies": []}
|
|
62
|
+
rows = []
|
|
63
|
+
for name in sorted(servers.keys() | portable.keys()):
|
|
64
|
+
native, package = servers.get(name), portable.get(name, {})
|
|
65
|
+
if not isinstance(package, dict):
|
|
66
|
+
package = {}
|
|
67
|
+
editable = isinstance(native, dict) and ("command" in native or "url" in native)
|
|
68
|
+
own = {k: native[k] for k in CONFIG_KEYS if isinstance(native, dict) and k in native}
|
|
69
|
+
# The native loader rejects a malformed package before it can donate inherited keys.
|
|
70
|
+
if native is not None:
|
|
71
|
+
try:
|
|
72
|
+
config_cost_policy(name, package)
|
|
73
|
+
except (ValueError, TypeError):
|
|
74
|
+
package = {}
|
|
75
|
+
inherited = {k: package[k] for k in CONFIG_KEYS if k in package}
|
|
76
|
+
effective = {**inherited, **own}
|
|
77
|
+
sources = {k: "native" if k in own else "package" if k in inherited else "default" for k in CONFIG_KEYS}
|
|
78
|
+
row = {"name": name, "source": "native_override" if native is not None and package else "native" if native is not None else "package",
|
|
79
|
+
"valid": True, "can_edit": editable, "error": None,
|
|
80
|
+
"package_revision": hashlib.sha256(json.dumps(inherited, sort_keys=True, default=str).encode()).hexdigest(),
|
|
81
|
+
"overrides": {"tool_costs": None, "spend_limit": None, "cost_unit": None},
|
|
82
|
+
"tool_costs": [], "spend_limit": 0, "cost_unit": "credits", "budget_enabled": False, "field_sources": sources}
|
|
83
|
+
try:
|
|
84
|
+
# Validate the native entry separately as the Agent does before package inheritance.
|
|
85
|
+
config_cost_policy(name, own)
|
|
86
|
+
policy = config_cost_policy(name, effective)
|
|
87
|
+
costs = effective.get("tool_costs") or {}
|
|
88
|
+
row["tool_costs"] = [{"name": tool, "low": cost.low, "high": cost.high, "note": cost.note}
|
|
89
|
+
for tool, value in costs.items() for cost in [_parse_cost(value, "declared cost")]]
|
|
90
|
+
row["spend_limit"] = effective.get("spend_limit") or 0
|
|
91
|
+
row["cost_unit"] = (effective.get("cost_unit") or "credits").strip()
|
|
92
|
+
row["budget_enabled"] = policy is not None and policy.limit > 0
|
|
93
|
+
row["overrides"] = {k: own.get(k) for k in CONFIG_KEYS}
|
|
94
|
+
except (ValueError, TypeError):
|
|
95
|
+
# Native errors may quote arbitrary config values, including mistakenly pasted credentials.
|
|
96
|
+
row.update(valid=False, error="Invalid declared cost policy. Check tool estimates, limit and unit.")
|
|
97
|
+
rows.append(row)
|
|
98
|
+
return {"supported": True, "policies": rows}
|
|
99
|
+
|
|
100
|
+
|
|
51
101
|
def register(registry_) -> None:
|
|
102
|
+
@registry_.method("mcp.cost_policies")
|
|
103
|
+
def policies(ctx: CallContext, params: dict) -> dict:
|
|
104
|
+
with scoped_home(profile_home_param(params), load_plugins=False):
|
|
105
|
+
return cost_policies(params.get("servers") or {})
|
|
106
|
+
|
|
52
107
|
@registry_.method("mcp.status")
|
|
53
108
|
def status_(ctx: CallContext, params: dict) -> dict:
|
|
54
109
|
with scoped_home(profile_home_param(params)):
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
"""Typed adapter for the reviewed Draft Cards store. Never imports producer code or sends."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
import hashlib
|
|
5
|
+
import hmac
|
|
6
|
+
import secrets
|
|
7
|
+
import json
|
|
8
|
+
from pathlib import Path
|
|
9
|
+
import re
|
|
10
|
+
import sqlite3
|
|
11
|
+
import time
|
|
12
|
+
from contextlib import closing
|
|
13
|
+
|
|
14
|
+
from .. import home as homes
|
|
15
|
+
from ..errors import InvalidParams, RpcError
|
|
16
|
+
from . import dashboard_plugins
|
|
17
|
+
|
|
18
|
+
_KEY = secrets.token_bytes(32)
|
|
19
|
+
_PIN = '6e6ca659ece59b0ce1c28b3b188393491ee5a415'
|
|
20
|
+
_SOURCES = {'__init__.py': '73388811ddc4f7cfc336c2a278dad9c0c032b0b15e4183ce8a157e61ce13695b',
|
|
21
|
+
'plugin.yaml': 'e2a8a92847f4519f1636ec542ae2b1599050d9552fb9a61d9c6d6afaca83d6eb',
|
|
22
|
+
'dashboard/manifest.json': '14e906a0e492669f0950e091f42d98ad607486dbea524b2a8e8691faa2139941',
|
|
23
|
+
'dashboard/plugin_api.py': '98e38f618c23ec266f1e171a958ffcf048339ea3c7876d1faa2d0b8910839336',
|
|
24
|
+
'store.py': '5815d4b106082b7f51d1b7e9d239fc655fa247a5e61ff7465e8c1865476eaaf6',
|
|
25
|
+
'tools.py': '29271409488efc39206a048dc2852effc156d9ca5d91721632e1219840f14db1'}
|
|
26
|
+
_STATES = {'draft', 'approved', 'sent', 'saved', 'failed', 'discarded'}
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def _producer(home):
|
|
30
|
+
"""Native registration, explicit profile consent and reviewed source, without loading a plugin."""
|
|
31
|
+
try:
|
|
32
|
+
from hermes_cli import plugins_cmd as pc
|
|
33
|
+
metadata = pc._read_install_metadata()
|
|
34
|
+
for plugin in dashboard_plugins._plugins(home):
|
|
35
|
+
if plugin['name'] != 'draft-cards' or not plugin['enabled'] or plugin.get('source') != 'user':
|
|
36
|
+
continue
|
|
37
|
+
root, anchor = Path(plugin['_dir']).parent, Path(plugin['_asset_anchor'])
|
|
38
|
+
record = metadata.get(root.name, {})
|
|
39
|
+
catalog = record.get('catalog', {})
|
|
40
|
+
if catalog.get('name') != 'draft-cards' or catalog.get('sha') != _PIN or record.get('revision') != _PIN:
|
|
41
|
+
continue
|
|
42
|
+
if not all((body := dashboard_plugins._read(root, name, anchor=anchor)) is not None
|
|
43
|
+
and hashlib.sha256(body).hexdigest() == digest for name, digest in _SOURCES.items()):
|
|
44
|
+
continue
|
|
45
|
+
return _PIN
|
|
46
|
+
except (ImportError, AttributeError, OSError, ValueError, TypeError):
|
|
47
|
+
pass
|
|
48
|
+
return None
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def _database(home):
|
|
52
|
+
"""Only the producer's existing profile-local database; never creates storage on a read."""
|
|
53
|
+
path = Path(home) / 'plugin-data' / 'draft-cards' / 'drafts.db'
|
|
54
|
+
# No caller supplies a filesystem path, and no symlink may redirect native state.
|
|
55
|
+
for parent in [path, *path.parents]:
|
|
56
|
+
if parent.is_symlink():
|
|
57
|
+
raise OSError('Symlink in draft storage')
|
|
58
|
+
if not path.is_file():
|
|
59
|
+
raise OSError('Draft storage unavailable')
|
|
60
|
+
connection = sqlite3.connect(path.as_uri() + '?mode=rw', uri=True, timeout=5)
|
|
61
|
+
connection.row_factory = sqlite3.Row
|
|
62
|
+
return connection
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def _fields(value):
|
|
66
|
+
if not isinstance(value, dict) or set(value) != {'from', 'to', 'cc', 'bcc', 'subject', 'body'}:
|
|
67
|
+
raise InvalidParams('Invalid draft fields')
|
|
68
|
+
for key, limit in [('from', 320), ('subject', 300), ('body', 20_000)]:
|
|
69
|
+
if not isinstance(value[key], str) or len(value[key]) > limit or '\x00' in value[key]:
|
|
70
|
+
raise InvalidParams('Invalid draft fields')
|
|
71
|
+
for key in ('to', 'cc', 'bcc'):
|
|
72
|
+
if not isinstance(value[key], list) or len(value[key]) > 50 or any(
|
|
73
|
+
not isinstance(item, str) or len(item) > 320 or re.search(r'[\r\n\x00]', item) for item in value[key]):
|
|
74
|
+
raise InvalidParams('Invalid draft recipients')
|
|
75
|
+
if not value['body'].strip():
|
|
76
|
+
raise InvalidParams('A draft body is required')
|
|
77
|
+
return value
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
def _snapshot(conn, home, params, producer):
|
|
81
|
+
row = conn.execute('SELECT * FROM drafts WHERE id = ?', (params['draft_id'],)).fetchone()
|
|
82
|
+
if row is None or not row['session_id'] or row['session_id'] != params['session_id']:
|
|
83
|
+
return None
|
|
84
|
+
versions = conn.execute('SELECT * FROM versions WHERE draft_id = ? ORDER BY v LIMIT 61', (params['draft_id'],)).fetchall()
|
|
85
|
+
if not versions or len(versions) > 60 or row['kind'] not in ('email', 'message') or row['status'] not in _STATES:
|
|
86
|
+
return None
|
|
87
|
+
matches = [v for v in versions if v['card'] == params['card']]
|
|
88
|
+
if not matches:
|
|
89
|
+
return None
|
|
90
|
+
selected, latest = matches[-1], versions[-1]
|
|
91
|
+
fields = _fields(json.loads(selected['fields']))
|
|
92
|
+
state = row['status'] if selected['v'] == latest['v'] else 'superseded'
|
|
93
|
+
if state == 'approved' and row['approved_version'] != latest['v']:
|
|
94
|
+
state = 'unavailable'
|
|
95
|
+
consumed = False
|
|
96
|
+
if conn.execute("SELECT 1 FROM sqlite_master WHERE type='table' AND name='talaria_outbound_approvals'").fetchone():
|
|
97
|
+
consumed = conn.execute('SELECT 1 FROM talaria_outbound_approvals WHERE draft_id = ? AND version = ?',
|
|
98
|
+
(row['id'], selected['v'])).fetchone() is not None
|
|
99
|
+
revision = hmac.new(_KEY, json.dumps([str(home), producer, dict(row), [dict(v) for v in versions], consumed],
|
|
100
|
+
sort_keys=True, separators=(',', ':')).encode(), hashlib.sha256).hexdigest()
|
|
101
|
+
editable = state in ('draft', 'failed', 'approved')
|
|
102
|
+
return {'producer': 'draft-cards', 'producer_revision': producer, 'draft_id': row['id'], 'card': selected['card'],
|
|
103
|
+
'kind': row['kind'], 'platform': str(row['platform'])[:40], 'version': selected['v'], 'revision': revision,
|
|
104
|
+
'fields': fields, 'state': state, 'can_edit': editable, 'can_approve': state in ('draft', 'failed') and not consumed,
|
|
105
|
+
'masked': False}
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
def _conflict():
|
|
109
|
+
raise RpcError('The draft changed or this version was already approved. Review it again.', condition='outbound_draft_conflict')
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
def review(ctx, params):
|
|
113
|
+
ctx.check_cancelled()
|
|
114
|
+
action = params.get('action')
|
|
115
|
+
if (action not in ('read', 'edit', 'approve') or not isinstance(params.get('draft_id'), str)
|
|
116
|
+
or not re.fullmatch(r'd_[0-9a-f]{8}', params['draft_id']) or type(params.get('card')) is not int
|
|
117
|
+
or params['card'] < 1 or not isinstance(params.get('session_id'), str) or not params['session_id']):
|
|
118
|
+
raise InvalidParams('Invalid outbound draft reference')
|
|
119
|
+
home = homes.profile_home_param(params)
|
|
120
|
+
with homes.scoped_home(home, load_plugins=False):
|
|
121
|
+
producer = _producer(home)
|
|
122
|
+
if producer is None:
|
|
123
|
+
if action != 'read':
|
|
124
|
+
_conflict()
|
|
125
|
+
return {'draft': None}
|
|
126
|
+
try:
|
|
127
|
+
with closing(_database(home)) as conn, conn:
|
|
128
|
+
# The native tool writers share this database lock. Check and mutation have one snapshot.
|
|
129
|
+
conn.execute('BEGIN IMMEDIATE' if action != 'read' else 'BEGIN')
|
|
130
|
+
draft = _snapshot(conn, home, params, producer)
|
|
131
|
+
if action == 'read':
|
|
132
|
+
ctx.check_cancelled()
|
|
133
|
+
return {'draft': draft if _producer(home) == producer else None}
|
|
134
|
+
if (draft is None or params.get('version') != draft['version'] or params.get('revision') != draft['revision']
|
|
135
|
+
or not draft['can_' + action] or _producer(home) != producer):
|
|
136
|
+
_conflict()
|
|
137
|
+
now = time.time()
|
|
138
|
+
if action == 'edit':
|
|
139
|
+
fields = _fields(params.get('fields'))
|
|
140
|
+
if fields == draft['fields']:
|
|
141
|
+
return {'draft': draft}
|
|
142
|
+
if conn.execute('SELECT count(*) FROM versions WHERE draft_id = ?', (draft['draft_id'],)).fetchone()[0] >= 60:
|
|
143
|
+
_conflict()
|
|
144
|
+
conn.execute("INSERT INTO versions (draft_id,v,card,author,note,fields,created_at) VALUES (?,?,?,'user','Edited in Talaria',?,?)",
|
|
145
|
+
(draft['draft_id'], draft['version'] + 1, draft['card'], json.dumps(fields, ensure_ascii=False), now))
|
|
146
|
+
conn.execute("UPDATE drafts SET status='draft', approved_version=NULL, status_detail='', status_at=?, updated_at=? WHERE id=?",
|
|
147
|
+
(now, now, draft['draft_id']))
|
|
148
|
+
else:
|
|
149
|
+
# Additive native-store state: Stable producer readers ignore this per-version receipt.
|
|
150
|
+
conn.execute('CREATE TABLE IF NOT EXISTS talaria_outbound_approvals (draft_id TEXT NOT NULL, version INTEGER NOT NULL, revision TEXT NOT NULL, PRIMARY KEY(draft_id,version))')
|
|
151
|
+
conn.execute('INSERT INTO talaria_outbound_approvals VALUES (?,?,?)', (draft['draft_id'], draft['version'], draft['revision']))
|
|
152
|
+
conn.execute("UPDATE drafts SET status='approved', approved_version=?, status_detail='', status_at=?, updated_at=? WHERE id=?",
|
|
153
|
+
(draft['version'], now, now, draft['draft_id']))
|
|
154
|
+
ctx.check_cancelled()
|
|
155
|
+
if _producer(home) != producer:
|
|
156
|
+
_conflict()
|
|
157
|
+
return {'draft': _snapshot(conn, home, params, producer)}
|
|
158
|
+
except (OSError, sqlite3.Error, ValueError, KeyError, TypeError, InvalidParams) as exc:
|
|
159
|
+
if action != 'read':
|
|
160
|
+
raise RpcError('Draft outcome unconfirmed; read its state before trying again.', condition='outbound_draft_unconfirmed') from exc
|
|
161
|
+
return {'draft': None}
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
def register(registry):
|
|
165
|
+
registry.method('drafts.review')(review)
|