@maudecode/talaria-web 1.20.0 → 1.22.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 +319 -14
- package/dist/api/automation-router.js +21 -1
- package/dist/api/automation-router.js.map +1 -1
- package/dist/api/chat-router.d.ts +615 -69
- 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/groups-router.d.ts +764 -0
- package/dist/api/groups-router.js +79 -0
- package/dist/api/groups-router.js.map +1 -0
- package/dist/api/raw-routes.js +3 -1
- package/dist/api/raw-routes.js.map +1 -1
- package/dist/api/router.d.ts +1 -1
- package/dist/api/sessions-router.d.ts +1675 -167
- package/dist/api/sessions-router.js +67 -53
- package/dist/api/sessions-router.js.map +1 -1
- package/dist/api/settings-router.d.ts +911 -1
- package/dist/api/settings-router.js +53 -2
- package/dist/api/settings-router.js.map +1 -1
- package/dist/api/sse-routes.d.ts +1 -1
- package/dist/api/sse-routes.js +15 -5
- package/dist/api/sse-routes.js.map +1 -1
- package/dist/api/tools-raw.js +27 -136
- package/dist/api/tools-raw.js.map +1 -1
- package/dist/api/tools-router.d.ts +588 -51
- package/dist/api/tools-router.js +98 -16
- package/dist/api/tools-router.js.map +1 -1
- package/dist/app.js +5 -1
- package/dist/app.js.map +1 -1
- package/dist/auth/gate.js +5 -1
- package/dist/auth/gate.js.map +1 -1
- package/dist/config/agent-config.d.ts +6 -1
- package/dist/config/agent-config.js +75 -3
- package/dist/config/agent-config.js.map +1 -1
- package/dist/feedback.d.ts +18 -0
- package/dist/feedback.js +145 -0
- package/dist/feedback.js.map +1 -0
- package/dist/fs/stat.d.ts +2 -0
- package/dist/fs/stat.js +4 -0
- package/dist/fs/stat.js.map +1 -1
- package/dist/http/context.d.ts +9 -0
- package/dist/http/context.js +0 -6
- package/dist/http/context.js.map +1 -1
- package/dist/http/pinned.js +19 -8
- package/dist/http/pinned.js.map +1 -1
- package/dist/providers/catalog.d.ts +9 -1
- package/dist/providers/catalog.js +86 -6
- package/dist/providers/catalog.js.map +1 -1
- package/dist/redact.d.ts +2 -0
- package/dist/redact.js +26 -5
- package/dist/redact.js.map +1 -1
- package/dist/runtime.js +62 -11
- package/dist/runtime.js.map +1 -1
- package/dist/server.js +2 -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 +5 -2
- package/dist/sessions/anchor.js +14 -13
- 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/cli-sessions.js +11 -6
- package/dist/sessions/cli-sessions.js.map +1 -1
- package/dist/sessions/compress.d.ts +10 -9
- package/dist/sessions/compress.js +31 -20
- package/dist/sessions/compress.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 +61 -2
- package/dist/sessions/gateway-sessions.js +223 -35
- package/dist/sessions/gateway-sessions.js.map +1 -1
- package/dist/sessions/gateway-watcher.js +8 -4
- package/dist/sessions/gateway-watcher.js.map +1 -1
- package/dist/sessions/groups.d.ts +60 -0
- package/dist/sessions/groups.js +339 -0
- package/dist/sessions/groups.js.map +1 -0
- package/dist/sessions/list.d.ts +7 -2
- package/dist/sessions/list.js +13 -4
- package/dist/sessions/list.js.map +1 -1
- package/dist/sessions/merge.d.ts +15 -5
- package/dist/sessions/merge.js +49 -15
- package/dist/sessions/merge.js.map +1 -1
- package/dist/sessions/pending.d.ts +1 -1
- package/dist/sessions/pending.js +15 -6
- package/dist/sessions/pending.js.map +1 -1
- package/dist/sessions/prefix-index.d.ts +9 -14
- package/dist/sessions/prefix-index.js +14 -52
- 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/reasoning-display.d.ts +2 -0
- package/dist/sessions/reasoning-display.js +31 -0
- package/dist/sessions/reasoning-display.js.map +1 -0
- package/dist/sessions/relay.d.ts +16 -2
- package/dist/sessions/relay.js +119 -24
- package/dist/sessions/relay.js.map +1 -1
- package/dist/sessions/service.d.ts +33 -3
- package/dist/sessions/service.js +304 -70
- package/dist/sessions/service.js.map +1 -1
- package/dist/sessions/session.d.ts +6 -0
- package/dist/sessions/session.js +14 -0
- package/dist/sessions/session.js.map +1 -1
- package/dist/sessions/shares.d.ts +1 -1
- package/dist/sessions/shares.js +13 -4
- package/dist/sessions/shares.js.map +1 -1
- package/dist/sessions/state-db.d.ts +2 -1
- package/dist/sessions/state-db.js +7 -3
- package/dist/sessions/state-db.js.map +1 -1
- package/dist/sessions/storage/json-documents.js +3 -0
- package/dist/sessions/storage/json-documents.js.map +1 -1
- package/dist/sessions/store.d.ts +2 -0
- package/dist/sessions/store.js +11 -3
- package/dist/sessions/store.js.map +1 -1
- package/dist/sessions/streams.d.ts +4 -0
- package/dist/sessions/streams.js +12 -0
- package/dist/sessions/streams.js.map +1 -1
- package/dist/sessions/todo.js +10 -1
- package/dist/sessions/todo.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 +53 -22
- package/dist/sessions/turn.js.map +1 -1
- package/dist/settings.js +2 -1
- package/dist/settings.js.map +1 -1
- package/dist/spa.js +1 -1
- package/dist/spa.js.map +1 -1
- package/dist/test/group-fixture.d.ts +66 -0
- package/dist/test/group-fixture.js +89 -0
- package/dist/test/group-fixture.js.map +1 -0
- package/dist/test/harness.d.ts +3 -0
- package/dist/test/harness.js +3 -0
- package/dist/test/harness.js.map +1 -1
- package/dist/tools/connectors.d.ts +9 -1
- package/dist/tools/connectors.js +48 -0
- package/dist/tools/connectors.js.map +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/skills.d.ts +6 -0
- package/dist/tools/skills.js +17 -0
- package/dist/tools/skills.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 +38 -12
- package/dist/tools/updates.js +180 -44
- package/dist/tools/updates.js.map +1 -1
- package/dist/workspace/fs.d.ts +2 -0
- package/dist/workspace/fs.js +63 -1
- package/dist/workspace/fs.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/dist/workspace/upload.d.ts +1 -1
- package/dist/workspace/upload.js +52 -37
- package/dist/workspace/upload.js.map +1 -1
- package/dist/workspace/workspaces.d.ts +5 -1
- package/dist/workspace/workspaces.js +32 -6
- package/dist/workspace/workspaces.js.map +1 -1
- package/package.json +2 -2
- package/sidecar/agent_dependency.json +4 -4
- package/sidecar/agent_importer.json +8 -0
- package/sidecar/agent_support.json +20 -8
- package/sidecar/scripts/agent_importer_contract.py +19 -0
- package/sidecar/scripts/test.sh +3 -1
- 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/home.py +12 -5
- package/sidecar/talaria_sidecar/methods/__init__.py +2 -2
- package/sidecar/talaria_sidecar/methods/agent_imports.py +346 -0
- package/sidecar/talaria_sidecar/methods/chat.py +141 -58
- package/sidecar/talaria_sidecar/methods/commands.py +6 -4
- package/sidecar/talaria_sidecar/methods/config.py +8 -3
- package/sidecar/talaria_sidecar/methods/connectors.py +138 -4
- package/sidecar/talaria_sidecar/methods/dashboard_plugins.py +25 -4
- package/sidecar/talaria_sidecar/methods/delegation.py +126 -0
- package/sidecar/talaria_sidecar/methods/gateway.py +5 -0
- package/sidecar/talaria_sidecar/methods/gateway_sessions.py +142 -23
- package/sidecar/talaria_sidecar/methods/groups.py +120 -0
- 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/memory.py +27 -3
- package/sidecar/talaria_sidecar/methods/nous_account.py +130 -0
- package/sidecar/talaria_sidecar/methods/oauth.py +25 -4
- package/sidecar/talaria_sidecar/methods/outbound_drafts.py +147 -0
- package/sidecar/talaria_sidecar/methods/plugin_catalog.py +73 -2
- package/sidecar/talaria_sidecar/methods/providers.py +51 -1
- package/sidecar/talaria_sidecar/methods/skill_revisions.py +177 -0
- package/sidecar/talaria_sidecar/methods/skills.py +10 -0
- package/sidecar/talaria_sidecar/methods/tts.py +67 -0
- package/sidecar/talaria_sidecar/rpc.py +11 -2
- package/static/dist/FILES.txt +155 -144
- package/static/dist/THIRD_PARTY_LICENSES.md +1 -1
- package/static/dist/assets/AppShell-hvysbd9x.js +8 -0
- package/static/dist/assets/Button-dlsibkzq.js +1 -0
- package/static/dist/assets/ChatPage-jikwrwfd.js +2 -0
- package/static/dist/assets/Composer-mnke8ss2.js +5 -0
- package/static/dist/assets/ConnectTargets-ejplzo4q.js +1 -0
- package/static/dist/assets/Dialog-rksfyyq5.js +1 -0
- package/static/dist/assets/{ExtensionRoute-zrhjn0wm.js → ExtensionRoute-igk5h0rj.js} +1 -1
- package/static/dist/assets/HubRoute-eooassx4.js +2 -0
- package/static/dist/assets/Markdown-m5pzgvtx.js +2 -0
- package/static/dist/assets/{MarkdownRenderer-fbswsgld.js → MarkdownRenderer-74ysuomr.js} +18 -18
- package/static/dist/assets/OAuthSignIn-i4flsuq2.js +1 -0
- package/static/dist/assets/QueueCard-msz9wd1m.js +1 -0
- package/static/dist/assets/ResourceSwitch-b70zg4xd.js +1 -0
- package/static/dist/assets/RightPanel-f5v61m8j.js +1 -0
- package/static/dist/assets/Select-f3l897pt.js +1 -0
- package/static/dist/assets/SessionListPanel-brnzacw9.js +1 -0
- package/static/dist/assets/SettingsLayout-f4akmrt2.js +1 -0
- package/static/dist/assets/States-msohx3c0.js +1 -0
- package/static/dist/assets/TerminalPanel-bnu5xawo.js +16 -0
- package/static/dist/assets/Toaster-d6col3ch.js +1 -0
- package/static/dist/assets/_app-lrjgufcy.js +1 -0
- package/static/dist/assets/{_app.ext._extensionId-na62087t.js → _app.ext._extensionId-k3xitxr1.js} +1 -1
- package/static/dist/assets/_app.groups-bt4wdwnd.js +1 -0
- package/static/dist/assets/{_app.index-jypgdqoi.js → _app.index-n3otiki0.js} +1 -1
- package/static/dist/assets/{_app.insights-kabejdtm.js → _app.insights-b0mzlh6m.js} +1 -1
- package/static/dist/assets/{_app.kanban-m19kfcmx.js → _app.kanban-d923g7j5.js} +1 -1
- package/static/dist/assets/{_app.logs-iw4m96sz.js → _app.logs-donegue1.js} +1 -1
- package/static/dist/assets/{_app.memory-jq5frwcg.js → _app.memory-hdnled08.js} +1 -1
- package/static/dist/assets/{_app.profiles-kwa3m7rp.js → _app.profiles-fumot3jk.js} +1 -1
- package/static/dist/assets/{_app.session._sessionId-o5lyeipj.js → _app.session._sessionId-crmdl2ux.js} +1 -1
- package/static/dist/assets/{_app.settings-ckl8hdll.js → _app.settings-jui8iesz.js} +1 -1
- package/static/dist/assets/_app.settings._section-do84hsqw.js +3 -0
- package/static/dist/assets/{_app.skills-n016rihd.js → _app.skills-heqcn21m.js} +1 -1
- package/static/dist/assets/_app.tasks-jiudtutt.js +1 -0
- package/static/dist/assets/{_app.todos-btew5v2s.js → _app.todos-bl6kk2zq.js} +1 -1
- package/static/dist/assets/{_app.workspaces-lnfk95ch.js → _app.workspaces-frvh3o7w.js} +1 -1
- package/static/dist/assets/_delete-qnxuo87s.js +1 -0
- package/static/dist/assets/{abnfDiagram-VCTEODGH-dttheegb.js → abnfDiagram-VCTEODGH-dppg3yfx.js} +1 -1
- package/static/dist/assets/{architecture-7GRP2DOG-ic435919.js → architecture-7GRP2DOG-gbajejh3.js} +1 -1
- package/static/dist/assets/{architectureDiagram-5GKGNRK7-8r3glgiq.js → architectureDiagram-5GKGNRK7-bzrxyais.js} +1 -1
- package/static/dist/assets/archive-yhdyz231.js +1 -0
- package/static/dist/assets/autoReadClaim-nlyv8tu9.js +1 -0
- package/static/dist/assets/{blockDiagram-I7D4REHJ-jenyos6c.js → blockDiagram-I7D4REHJ-gmk9koab.js} +1 -1
- package/static/dist/assets/{c4Diagram-7LVT6UL2-nzlx7yc4.js → c4Diagram-7LVT6UL2-bfqiqqcz.js} +1 -1
- package/static/dist/assets/channel-grt3rob4.js +1 -0
- package/static/dist/assets/{chunk-4HAMMTFA-g0cru63b.js → chunk-4HAMMTFA-i9s6h4wv.js} +1 -1
- package/static/dist/assets/{chunk-75Z2AOVW-7rkswkjw.js → chunk-75Z2AOVW-gnt6pnso.js} +1 -1
- package/static/dist/assets/{chunk-DU6HZSFF-fn73jzdo.js → chunk-DU6HZSFF-gq439wot.js} +3 -3
- package/static/dist/assets/{chunk-F27PBJKO-oey8e72m.js → chunk-F27PBJKO-wvx90pbt.js} +1 -1
- package/static/dist/assets/{chunk-GMAD6QVW-l2a32wiy.js → chunk-GMAD6QVW-mc2gu30k.js} +1 -1
- package/static/dist/assets/{chunk-GVQU2GXP-o9dwzh8h.js → chunk-GVQU2GXP-f8fxa2ym.js} +1 -1
- package/static/dist/assets/{chunk-IMKFNOWR-eblwj20b.js → chunk-IMKFNOWR-lnsl31hj.js} +1 -1
- package/static/dist/assets/{chunk-L3NEJ4N5-o2mufspb.js → chunk-L3NEJ4N5-kbfdidwu.js} +1 -1
- package/static/dist/assets/{chunk-OSK3NFVY-ijp9pw29.js → chunk-OSK3NFVY-dvxsduj6.js} +1 -1
- package/static/dist/assets/{chunk-P2QGCYS3-hs9hqwl4.js → chunk-P2QGCYS3-ivo3i1wf.js} +1 -1
- package/static/dist/assets/{chunk-POPQ4Y6H-bp9rsqez.js → chunk-POPQ4Y6H-i0gfu0hx.js} +1 -1
- package/static/dist/assets/{chunk-PWAF6VOD-brkprov6.js → chunk-PWAF6VOD-jb0fdyb0.js} +1 -1
- package/static/dist/assets/{chunk-SHT3W25Y-gmpv0pxz.js → chunk-SHT3W25Y-b7ou2xsp.js} +1 -1
- package/static/dist/assets/{chunk-SVP7TREG-oldm08fu.js → chunk-SVP7TREG-e2v7me5v.js} +1 -1
- package/static/dist/assets/{chunk-TICWLB2K-ooqilfv7.js → chunk-TICWLB2K-e5zlai62.js} +1 -1
- package/static/dist/assets/classDiagram-ZZMXUADV-nnsp49jr.js +1 -0
- package/static/dist/assets/classDiagram-v2-VYDZK3BY-nnsp49jr.js +1 -0
- package/static/dist/assets/completionAudio-c5at041z.js +1 -0
- package/static/dist/assets/{copy-jo006coq.js → copy-jj3oiw13.js} +1 -1
- package/static/dist/assets/{cynefin-OW5HDTMX-d47op7qs.js → cynefin-OW5HDTMX-n5n1ck70.js} +1 -1
- package/static/dist/assets/{cynefinDiagram-5FMLGOSQ-doa7594y.js → cynefinDiagram-5FMLGOSQ-b33npu4f.js} +1 -1
- package/static/dist/assets/{dagre-GXQ25YYZ-os768dp4.js → dagre-GXQ25YYZ-miwvae07.js} +1 -1
- package/static/dist/assets/{diagram-S7CK7UJ4-fyi81nxd.js → diagram-S7CK7UJ4-j8fphsp4.js} +1 -1
- package/static/dist/assets/{diagram-UQ7AKVKN-j3exggaq.js → diagram-UQ7AKVKN-5cixo166.js} +1 -1
- package/static/dist/assets/{diagram-VSXAHHWV-omo1en2l.js → diagram-VSXAHHWV-ii3bf92m.js} +1 -1
- package/static/dist/assets/{diagram-VX7I27RA-oro2cyu0.js → diagram-VX7I27RA-b3cfgx81.js} +1 -1
- package/static/dist/assets/{diagram-Z3DM3KII-byt9vdb7.js → diagram-Z3DM3KII-bey9lqr8.js} +1 -1
- package/static/dist/assets/{dist-etpoyscq.js → dist-cb8um5dh.js} +4 -4
- package/static/dist/assets/{dist-crc46di9.js → dist-kpg5ccm9.js} +1 -1
- package/static/dist/assets/{ebnfDiagram-PWID7BFC-ee3haugh.js → ebnfDiagram-PWID7BFC-2m4wrnqc.js} +1 -1
- package/static/dist/assets/{erDiagram-RLTQ6QDP-d1e93yff.js → erDiagram-RLTQ6QDP-kak5te0n.js} +1 -1
- package/static/dist/assets/{eventmodeling-NTZA5JFV-i1ihb40c.js → eventmodeling-NTZA5JFV-ojcc486t.js} +1 -1
- package/static/dist/assets/flowDiagram-HODETNUW-kxr9sicu.js +1 -0
- package/static/dist/assets/folder-plus-fk6j7tlv.js +1 -0
- package/static/dist/assets/{ganttDiagram-EL5Y4UJY-m7g0jud4.js → ganttDiagram-EL5Y4UJY-k6nfmhrh.js} +1 -1
- package/static/dist/assets/getPseudoElementBounds-mwj3vqni.js +1 -0
- package/static/dist/assets/{gitGraph-4MIJSDKK-hzdj07yy.js → gitGraph-4MIJSDKK-bxq1lbhy.js} +1 -1
- package/static/dist/assets/{gitGraphDiagram-WWUBYQGX-dm9agbna.js → gitGraphDiagram-WWUBYQGX-ehvoankt.js} +1 -1
- package/static/dist/assets/group_discussions-fk5hry4l.js +1 -0
- package/static/dist/assets/{highlighted-body-KPVGNVTW-mmgz2czu.js → highlighted-body-KPVGNVTW-nr4nfdq7.js} +1 -1
- package/static/dist/assets/{host-fr6lni1p.js → host-dhgqiozp.js} +1 -1
- package/static/dist/assets/index-hx7z4wdj.js +13 -0
- package/static/dist/assets/index-o8ebuc5x.css +2 -0
- package/static/dist/assets/{info-A6RAGUB7-lll1dqmm.js → info-A6RAGUB7-dtsj0ybw.js} +1 -1
- package/static/dist/assets/{infoDiagram-27XIBGKW-k7esc639.js → infoDiagram-27XIBGKW-jena90ao.js} +1 -1
- package/static/dist/assets/{ishikawaDiagram-5VMMS53U-lgr6k9wo.js → ishikawaDiagram-5VMMS53U-kia6bn5u.js} +1 -1
- package/static/dist/assets/{journeyDiagram-3NMN7TZE-ndmbxuqk.js → journeyDiagram-3NMN7TZE-ipsa6icb.js} +1 -1
- package/static/dist/assets/{kanban-definition-UXKFOSKX-mjxym0jp.js → kanban-definition-UXKFOSKX-moxx59kp.js} +1 -1
- package/static/dist/assets/katex-ic33v820.js +257 -0
- package/static/dist/assets/katex-qcv7xo0t.css +1 -0
- package/static/dist/assets/{lazyRouteComponent-cwb6l7xh.js → lazyRouteComponent-i74ujrfk.js} +1 -1
- package/static/dist/assets/{line-mtr5k6il.js → line-lgrkg9no.js} +1 -1
- package/static/dist/assets/link-2-fp49mwl2.js +1 -0
- package/static/dist/assets/{link-iadw4ghw.js → link-es18mse1.js} +2 -2
- package/static/dist/assets/{locale-cs-n41hptse.js → locale-cs-brltdkcp.js} +1 -1
- package/static/dist/assets/{locale-de-k7ht47ew.js → locale-de-h6e9oq6v.js} +1 -1
- package/static/dist/assets/{locale-es-ih078lco.js → locale-es-oklmh80f.js} +1 -1
- package/static/dist/assets/{locale-fr-ojabnf41.js → locale-fr-b17ozoi2.js} +1 -1
- package/static/dist/assets/{locale-it-kb96jufy.js → locale-it-whe01eef.js} +1 -1
- package/static/dist/assets/{locale-ja-jpsp3xs1.js → locale-ja-g1s0rtpc.js} +1 -1
- package/static/dist/assets/{locale-pl-dbap4leu.js → locale-pl-d9p3lqcb.js} +1 -1
- package/static/dist/assets/{locale-pt-nci7w72x.js → locale-pt-l75on74f.js} +1 -1
- package/static/dist/assets/{locale-ru-soghe4cs.js → locale-ru-wl3mbsaw.js} +1 -1
- package/static/dist/assets/{locale-tr-ks00mu68.js → locale-tr-cz87itrq.js} +1 -1
- package/static/dist/assets/{locale-vi-ij7twfm6.js → locale-vi-elqj1y4k.js} +1 -1
- package/static/dist/assets/{locale-zh-Hant-feakwr7a.js → locale-zh-Hant-hf8gqm7d.js} +1 -1
- package/static/dist/assets/{locale-zh-ren0vjyv.js → locale-zh-cdckwb0u.js} +1 -1
- package/static/dist/assets/login-o6gfl4gy.js +1 -0
- package/static/dist/assets/mermaid-HWGCJPDP-n2kbzsao.js +1 -0
- package/static/dist/assets/{mermaid-parser.core-k91vdnvi.js → mermaid-parser.core-fflovwf2.js} +3 -3
- package/static/dist/assets/{mindmap-definition-YA3MSWOX-ehztfea4.js → mindmap-definition-YA3MSWOX-ic8l9whi.js} +1 -1
- package/static/dist/assets/onboarding-bxm7gdrr.js +1 -0
- package/static/dist/assets/{packet-AYTQ26CC-ok2xrblz.js → packet-AYTQ26CC-ntci3088.js} +1 -1
- package/static/dist/assets/{pegDiagram-XKGWAZYB-ec3rpj0m.js → pegDiagram-XKGWAZYB-e3btz04w.js} +1 -1
- package/static/dist/assets/{pie-WAS4IAKB-iwkir23u.js → pie-WAS4IAKB-o2dc7l36.js} +1 -1
- package/static/dist/assets/{pieDiagram-E7YTZNPT-fcpqpekh.js → pieDiagram-E7YTZNPT-gro55rrw.js} +1 -1
- package/static/dist/assets/presence-lq6m12ga.js +1 -0
- package/static/dist/assets/prompt_queue_cancelled-cebcuagu.js +1 -0
- package/static/dist/assets/{quadrantDiagram-AXDQQJYC-lqsync43.js → quadrantDiagram-AXDQQJYC-fxulmd7d.js} +1 -1
- package/static/dist/assets/queryKeys-cnvn6pea.js +9 -0
- package/static/dist/assets/{radar-RG4KPBEZ-hje4jbk6.js → radar-RG4KPBEZ-9pcospra.js} +1 -1
- package/static/dist/assets/{railroad-74A4TZTK-gll9n6qi.js → railroad-74A4TZTK-nzdga12j.js} +1 -1
- package/static/dist/assets/{railroad-abnf-HS5TGJTU-o6h6lpn4.js → railroad-abnf-HS5TGJTU-ep3ytel0.js} +1 -1
- package/static/dist/assets/{railroad-ebnf-LZEXJU2U-juaefj6o.js → railroad-ebnf-LZEXJU2U-iw7uc1wy.js} +1 -1
- package/static/dist/assets/{railroad-peg-WCYAUIDC-cgfhvpah.js → railroad-peg-WCYAUIDC-fo3b3gme.js} +1 -1
- package/static/dist/assets/{railroadDiagram-O6MQD6OU-lp3w7awf.js → railroadDiagram-O6MQD6OU-lxpxf8f0.js} +1 -1
- package/static/dist/assets/{refresh-cw-iccm7a4e.js → refresh-cw-d14h79x5.js} +1 -1
- package/static/dist/assets/rename-ccd52yws.js +1 -0
- package/static/dist/assets/{requirementDiagram-BXWQKSXE-ha8eibcf.js → requirementDiagram-BXWQKSXE-lrozucd2.js} +1 -1
- package/static/dist/assets/{sankeyDiagram-P5KCCOFB-oxf31pr9.js → sankeyDiagram-P5KCCOFB-iusxy9mq.js} +1 -1
- package/static/dist/assets/{sequenceDiagram-WJ2MYXX4-jiq8lhyo.js → sequenceDiagram-WJ2MYXX4-o987q8ti.js} +1 -1
- package/static/dist/assets/{share._token-o76ki0ly.js → share._token-bfw7f9m5.js} +1 -1
- package/static/dist/assets/sliders-horizontal-l65hoa3x.js +1 -0
- package/static/dist/assets/{stateDiagram-D77RDMKH-f3fslnon.js → stateDiagram-D77RDMKH-hh23v7y5.js} +1 -1
- package/static/dist/assets/stateDiagram-v2-MP3YSRHH-jukr0d8h.js +1 -0
- package/static/dist/assets/{swimlanes-42K2YHIH-k1hmk7jf.js → swimlanes-42K2YHIH-gj2t3rm8.js} +1 -1
- package/static/dist/assets/swimlanesDiagram-VR7AAH4N-ik9m9j2m.js +8 -0
- package/static/dist/assets/{timeline-definition-24CTP7MA-n3ncfy9r.js → timeline-definition-24CTP7MA-84s2w2sr.js} +1 -1
- package/static/dist/assets/toast-gqqcvxiy.js +56 -0
- package/static/dist/assets/{treeView-Q6P3EWNA-l3y2pejt.js → treeView-Q6P3EWNA-cmuj50l7.js} +1 -1
- package/static/dist/assets/{treemap-WGGIJYW6-jown9axh.js → treemap-WGGIJYW6-dpjlg0xc.js} +1 -1
- package/static/dist/assets/tts-jw84jlqy.js +1 -0
- package/static/dist/assets/{useForm-o4uu74mx.js → useForm-lxzhiqao.js} +1 -1
- package/static/dist/assets/{useParams-ftsveu84.js → useParams-dt6gkoq7.js} +1 -1
- package/static/dist/assets/{useSearch-crqueqga.js → useSearch-o8t49csk.js} +1 -1
- package/static/dist/assets/useTranscript-gx9umcc2.js +1 -0
- package/static/dist/assets/{vennDiagram-4TSXK5OY-dh59uq1c.js → vennDiagram-4TSXK5OY-g9g5o8vy.js} +1 -1
- package/static/dist/assets/{wardley-WFR3VGLG-e6d74b0j.js → wardley-WFR3VGLG-ij35obrl.js} +1 -1
- package/static/dist/assets/{wardleyDiagram-VM6X3IG4-hnofh78f.js → wardleyDiagram-VM6X3IG4-f9my7q7w.js} +1 -1
- package/static/dist/assets/{xychartDiagram-S5SC5T6Z-bpymjelb.js → xychartDiagram-S5SC5T6Z-olqx1s1p.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/Dialog-hta5utr3.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/ResourceSwitch-odi6dy2o.js +0 -1
- package/static/dist/assets/RightPanel-eu6enlo6.js +0 -1
- package/static/dist/assets/Select-kr07928w.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/States-icab19yg.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/archive-il7c6053.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-73649w7o.js +0 -10
- package/static/dist/assets/index-lhf1fsdf.css +0 -2
- package/static/dist/assets/katex-cbdd1ohw.css +0 -1
- package/static/dist/assets/katex-pbij2oo6.js +0 -257
- package/static/dist/assets/login-lkhtzfcl.js +0 -1
- 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/sliders-horizontal-ddcs88av.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
package/dist/tools/updates.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
*/
|
|
13
13
|
import { backupPersistedStores } from '../sessions/storage/json-installation.js';
|
|
14
14
|
export { backupPersistedStores, CHANNEL_SWITCH_BACKUPS } from '../sessions/storage/json-installation.js';
|
|
15
|
-
import { UpdatesSummarySchema } from '@maudecode/talaria-web-contracts';
|
|
15
|
+
import { UpdatesSummarySchema, WebUpdateChannelSchema } from '@maudecode/talaria-web-contracts';
|
|
16
16
|
import { z } from 'zod';
|
|
17
17
|
import { readCapped } from '../http/capped.js';
|
|
18
18
|
import { execFile } from 'node:child_process';
|
|
@@ -41,6 +41,13 @@ const WEB_NPM_PACKAGE = '@maudecode/talaria-web';
|
|
|
41
41
|
const GIT_LOCK_SIGNATURES = ["index.lock': file exists", ".lock': file exists", 'another git process seems to be running', 'unable to create .git/index.lock'];
|
|
42
42
|
const NETWORK_FAILURES = ['could not resolve host', 'failed to connect', 'network is unreachable', 'no route to host', 'connection timed out', 'timed out after', 'connection reset by peer', 'remote end hung up unexpectedly', 'tls connection was non-properly terminated', 'ssl certificate problem'];
|
|
43
43
|
export const normalizeChannel = (channel) => (channel === 'experimental' ? 'experimental' : 'stable');
|
|
44
|
+
export const WEB_UPDATE_CHANNELS = WebUpdateChannelSchema.options;
|
|
45
|
+
export const isWebChannel = (channel) => WebUpdateChannelSchema.safeParse(channel).success;
|
|
46
|
+
export const normalizeWebChannel = (channel) => (isWebChannel(channel) ? channel : 'stable');
|
|
47
|
+
/** TAL-1569: Nightly installs the same GHCR artifacts as Experimental, one daily `nightly` tag behind it. */
|
|
48
|
+
const webFamily = (channel) => (channel === 'stable' ? 'stable' : 'experimental');
|
|
49
|
+
/** A packaged `web-v` or `web-exp-v` version label of the channel's artifact family. */
|
|
50
|
+
const familyVersion = (channel, label) => new RegExp(`^${webFamily(channel) === 'experimental' ? 'web-exp-v' : 'web-v'}${VERSION}$`).exec(label);
|
|
44
51
|
export const ONLY_STABLE_VERSIONS = 'Choosing a version is available only on the Stable channel.';
|
|
45
52
|
/** TAL-946: the release an update installs: the listed `version` (a `ref`), else the newest listed release (none when nothing is listed). */
|
|
46
53
|
function selectVersion(versions, version, name) {
|
|
@@ -405,9 +412,9 @@ export function ghcrExperimental(fetchImpl) {
|
|
|
405
412
|
return body.token;
|
|
406
413
|
};
|
|
407
414
|
return {
|
|
408
|
-
release: async () => {
|
|
415
|
+
release: async (channel) => {
|
|
409
416
|
const auth = { Authorization: `Bearer ${await token()}` };
|
|
410
|
-
const m = await json(await send(`${GHCR}/v2/${EXPERIMENTAL_REPOSITORY}/manifests
|
|
417
|
+
const m = await json(await send(`${GHCR}/v2/${EXPERIMENTAL_REPOSITORY}/manifests/${channel}`, { headers: { ...auth, Accept: 'application/vnd.oci.image.manifest.v1+json' }, signal: AbortSignal.timeout(5000) }), 'manifest');
|
|
411
418
|
const layers = Array.isArray(m.layers) ? m.layers.map(dict) : [];
|
|
412
419
|
const layer = layers[0];
|
|
413
420
|
if (m.artifactType !== EXPERIMENTAL_ARTIFACT_TYPE || layers.length !== 1 || layer?.mediaType !== EXPERIMENTAL_LAYER_TYPE)
|
|
@@ -552,23 +559,51 @@ async function experimentalBuildsBehind(installed, latest, registry, getJson) {
|
|
|
552
559
|
// ponytail: 500 commits back; an older install reports the builds within that window.
|
|
553
560
|
return Math.max(1, count);
|
|
554
561
|
}
|
|
555
|
-
|
|
556
|
-
|
|
562
|
+
const CHANNEL_NAMES = { stable: 'Stable', nightly: 'Nightly', experimental: 'Experimental' };
|
|
563
|
+
const AHEAD_OF_NIGHTLY = 'This npm installation is ahead of the Nightly build; it updates once Nightly passes it.';
|
|
564
|
+
/**
|
|
565
|
+
* TAL-1569: whether a Nightly install (not a switch) holds a source newer than the `nightly` build. Nightly trails
|
|
566
|
+
* Experimental, so an install taken from Experimental is ahead of it and must not move back. Unorderable sources fail closed.
|
|
567
|
+
*/
|
|
568
|
+
async function aheadOfNightly(channel, switching, installed, nightly, getJson) {
|
|
569
|
+
if (channel !== 'nightly' || switching || !installed || installed === nightly)
|
|
570
|
+
return false;
|
|
571
|
+
let status;
|
|
572
|
+
try {
|
|
573
|
+
status = dict(await getJson(`/compare/${nightly}...${installed}`, { asset: false })).status;
|
|
574
|
+
}
|
|
575
|
+
catch {
|
|
576
|
+
status = null;
|
|
577
|
+
}
|
|
578
|
+
if (status === 'ahead')
|
|
579
|
+
return true;
|
|
580
|
+
if (status === 'behind' || status === 'diverged')
|
|
581
|
+
return false;
|
|
582
|
+
throw new ReleaseUnavailable('Cannot order this installation against the Nightly build', true);
|
|
583
|
+
}
|
|
584
|
+
/** An npm install on Experimental or Nightly: behind by its missed builds when its source differs from the channel's tag, or when switching from Stable. */
|
|
585
|
+
async function checkNpmExperimental(result, installed, id, registry, getJson, channel) {
|
|
586
|
+
const name = CHANNEL_NAMES[channel];
|
|
557
587
|
let release;
|
|
588
|
+
const disk = diskRelease(installed.packageRoot);
|
|
589
|
+
const current = str(disk?.sourceRevision ?? id.release().sourceRevision) || null;
|
|
590
|
+
const switching = npmInstallChannel(installed, id) === 'stable';
|
|
591
|
+
let ahead = false;
|
|
558
592
|
try {
|
|
559
|
-
release = await registry.release();
|
|
593
|
+
release = await registry.release(channel);
|
|
594
|
+
ahead = await aheadOfNightly(channel, switching, current, release.sourceRevision, getJson);
|
|
560
595
|
}
|
|
561
596
|
catch (error) {
|
|
562
|
-
const unavailable = error instanceof ReleaseUnavailable ? error : new ReleaseUnavailable(
|
|
597
|
+
const unavailable = error instanceof ReleaseUnavailable ? error : new ReleaseUnavailable(`The ${name} artifact is unavailable`);
|
|
563
598
|
return { ...result, install_kind: 'npm', manual_update: true, error: unavailable.message, ...(unavailable.transient ? { stale_check: true } : {}) };
|
|
564
599
|
}
|
|
565
|
-
Object.assign(result, { latest_version: release.tag, latest_sha: release.sourceRevision, branch:
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
if (
|
|
569
|
-
return { ...result, current_sha: current, behind:
|
|
600
|
+
Object.assign(result, { latest_version: release.tag, latest_sha: release.sourceRevision, branch: channel, release_based: true, no_git: true, install_kind: 'npm', manual_update: false });
|
|
601
|
+
if (switching)
|
|
602
|
+
return { ...result, current_sha: current, behind: await experimentalBuildsBehind(current, release.sourceRevision, registry, getJson), channel_switch: true, message: `Switching to ${name} installs ${release.version}.` };
|
|
603
|
+
if (ahead)
|
|
604
|
+
return { ...result, current_sha: current, behind: 0, manual_update: true, message: AHEAD_OF_NIGHTLY };
|
|
570
605
|
if (disk?.sourceRevision !== release.sourceRevision)
|
|
571
|
-
return { ...result, current_sha: current, behind: await experimentalBuildsBehind(current, release.sourceRevision, registry, getJson), message:
|
|
606
|
+
return { ...result, current_sha: current, behind: await experimentalBuildsBehind(current, release.sourceRevision, registry, getJson), message: `${name} update ${release.version} is available.` };
|
|
572
607
|
const metadataRepair = !same(id.release(), disk);
|
|
573
608
|
return { ...result, current_sha: release.sourceRevision, behind: 0, metadata_repair: metadataRepair, ...(metadataRepair ? { message: 'The npm package is current; finish the update to restart with that version.' } : {}) };
|
|
574
609
|
}
|
|
@@ -579,13 +614,13 @@ export async function checkWebUpdate(webRoot, currentVersion, channel, git, getJ
|
|
|
579
614
|
const result = { name: 'webui', channel, repo_url: REPOSITORY_URL, current_version: currentVersion, behind: null, no_git: root === null };
|
|
580
615
|
if (root !== null)
|
|
581
616
|
return { ...result, manual_update: true, message: CONTRIBUTOR_CHECKOUT_MESSAGE };
|
|
582
|
-
if (channel
|
|
583
|
-
return checkNpmExperimental(result, npmInstall, id, registry, getJson);
|
|
584
|
-
const packaged =
|
|
617
|
+
if (channel !== 'stable' && npmInstall && registry)
|
|
618
|
+
return checkNpmExperimental(result, npmInstall, id, registry, getJson, channel);
|
|
619
|
+
const packaged = familyVersion(channel, currentVersion)?.slice(1, 4).join('.');
|
|
585
620
|
const installed = npmInstall?.version ?? packaged;
|
|
586
621
|
let release;
|
|
587
622
|
try {
|
|
588
|
-
release = await publishedWebRelease(channel, getJson, undefined, installed && new RegExp(`^${VERSION}$`).test(installed) ? installed : undefined);
|
|
623
|
+
release = await publishedWebRelease(webFamily(channel), getJson, undefined, installed && new RegExp(`^${VERSION}$`).test(installed) ? installed : undefined);
|
|
589
624
|
}
|
|
590
625
|
catch (error) {
|
|
591
626
|
if (error instanceof ReleaseUnavailable)
|
|
@@ -611,7 +646,7 @@ export async function checkWebUpdate(webRoot, currentVersion, channel, git, getJ
|
|
|
611
646
|
return { ...result, current_sha: release.sourceRevision, behind: 0, no_git: true, install_kind: 'npm', npm: release.npm, manual_update: false, metadata_repair: metadataRepair, ...(metadataRepair ? { message: 'The npm package is current; finish the update to restart with that version.' } : {}) };
|
|
612
647
|
}
|
|
613
648
|
const current = id.release().sourceRevision ?? null;
|
|
614
|
-
const version =
|
|
649
|
+
const version = familyVersion(channel, currentVersion);
|
|
615
650
|
let behind = version && current === release.sourceRevision ? 0 : null;
|
|
616
651
|
if (behind === null && version) {
|
|
617
652
|
const installed = version.slice(1).map(Number);
|
|
@@ -628,7 +663,7 @@ async function applyNpmWebUpdate(webRoot, channel, getJson, id, npmRun, canApply
|
|
|
628
663
|
if (!installed)
|
|
629
664
|
return { ok: false, manual_update: true, message: 'Automatic npm updates require a direct global @maudecode/talaria-web installation.' };
|
|
630
665
|
// Switching channels installs the selected channel's newest artifact regardless of version order (TAL-343).
|
|
631
|
-
const switching = npmInstallChannel(installed, id) !== channel;
|
|
666
|
+
const switching = npmInstallChannel(installed, id) !== webFamily(channel);
|
|
632
667
|
if (version !== undefined && (channel !== 'stable' || switching))
|
|
633
668
|
return { ok: false, target: 'webui', channel, message: ONLY_STABLE_VERSIONS };
|
|
634
669
|
const onDisk = diskRelease(installed.packageRoot);
|
|
@@ -651,7 +686,7 @@ async function applyNpmWebUpdate(webRoot, channel, getJson, id, npmRun, canApply
|
|
|
651
686
|
}
|
|
652
687
|
if (!chosen.npm)
|
|
653
688
|
return { ok: false, manual_update: true, message: 'The completed Stable release does not include an npm package identity.' };
|
|
654
|
-
target = { version: chosen.version, sourceRevision: chosen.sourceRevision, label: `npm release ${chosen.version}`, matches: (r) => same(r, chosen.runtime), npm: chosen.npm };
|
|
689
|
+
target = { tag: chosen.tag, version: chosen.version, sourceRevision: chosen.sourceRevision, label: `npm release ${chosen.version}`, matches: (r) => same(r, chosen.runtime), npm: chosen.npm };
|
|
655
690
|
if (!switching) {
|
|
656
691
|
if (!canApply())
|
|
657
692
|
return { ok: false, message: 'Web update deferred because its settings or lifecycle changed.' };
|
|
@@ -663,18 +698,21 @@ async function applyNpmWebUpdate(webRoot, channel, getJson, id, npmRun, canApply
|
|
|
663
698
|
}
|
|
664
699
|
}
|
|
665
700
|
else {
|
|
701
|
+
const name = CHANNEL_NAMES[channel];
|
|
666
702
|
if (!packaged.registry)
|
|
667
|
-
return { ok: false, manual_update: true, message:
|
|
703
|
+
return { ok: false, manual_update: true, message: `Packaged ${name} updates are unavailable in this installation.` };
|
|
668
704
|
let release;
|
|
669
705
|
try {
|
|
670
|
-
release = await packaged.registry.release();
|
|
706
|
+
release = await packaged.registry.release(channel);
|
|
707
|
+
if (await aheadOfNightly(channel, switching, str(onDisk?.sourceRevision ?? id.release().sourceRevision) || null, release.sourceRevision, getJson))
|
|
708
|
+
return { ok: false, manual_update: true, target: 'webui', channel, message: AHEAD_OF_NIGHTLY };
|
|
671
709
|
}
|
|
672
710
|
catch (error) {
|
|
673
|
-
return { ok: false, message: error instanceof ReleaseUnavailable ? error.message :
|
|
711
|
+
return { ok: false, message: error instanceof ReleaseUnavailable ? error.message : `The ${name} artifact is unavailable.` };
|
|
674
712
|
}
|
|
675
713
|
const identity = { tag: release.tag, version: release.version, sourceRevision: release.sourceRevision, releaseSet: release.sourceRevision };
|
|
676
714
|
// validateReleaseInfo (in diskRelease) already applies Stable's contract and Agent-pin checks to the packaged files.
|
|
677
|
-
target = { version: release.version, sourceRevision: release.sourceRevision, label:
|
|
715
|
+
target = { tag: release.tag, version: release.version, sourceRevision: release.sourceRevision, label: `${name} ${release.version}`, matches: (r) => r !== null && same({ tag: r.tag, version: r.version, sourceRevision: r.sourceRevision, releaseSet: r.releaseSet }, identity), experimental: release };
|
|
678
716
|
}
|
|
679
717
|
const priorRollback = readUpdateRollback(packaged.stateDir);
|
|
680
718
|
if (packaged.skipFailedVersion && priorRollback?.failedVersion === target.version)
|
|
@@ -683,7 +721,7 @@ async function applyNpmWebUpdate(webRoot, channel, getJson, id, npmRun, canApply
|
|
|
683
721
|
if (current) {
|
|
684
722
|
if (same(id.release(), onDisk))
|
|
685
723
|
return { ok: true, up_to_date: true, target: 'webui', channel, message: channel === 'stable' ? 'Talaria Web already contains the selected npm release.' : `Talaria Web already contains ${target.label}.` };
|
|
686
|
-
return { ok: true, target: 'webui', channel, sourceRevision: target.sourceRevision, ...(target.npm ? { npm: target.npm } : {}), message: `Restarting Talaria Web with ${target.label}.` };
|
|
724
|
+
return { ok: true, target: 'webui', channel, tag: target.tag, sourceRevision: target.sourceRevision, ...(target.npm ? { npm: target.npm } : {}), message: `Restarting Talaria Web with ${target.label}.` };
|
|
687
725
|
}
|
|
688
726
|
if (!canApply())
|
|
689
727
|
return { ok: false, message: 'Web update deferred because its settings or lifecycle changed.' };
|
|
@@ -717,7 +755,7 @@ async function applyNpmWebUpdate(webRoot, channel, getJson, id, npmRun, canApply
|
|
|
717
755
|
const bins = dict(metadata.bin);
|
|
718
756
|
if (metadata.name !== WEB_NPM_PACKAGE || metadata.version !== target.version || !target.matches(diskRelease(candidate))
|
|
719
757
|
|| !['talaria-web', 'talaria-web-mcp'].every((name) => str(bins[name]).replace(/^\.\//, '') === `dist/bin/${name}.js` && existsSync(join(candidate, `dist/bin/${name}.js`)))) {
|
|
720
|
-
return { ok: false, verification_failed: true, target: 'webui', channel, message: `The downloaded npm package does not match ${channel === 'stable' ? 'the completed release' :
|
|
758
|
+
return { ok: false, verification_failed: true, target: 'webui', channel, message: `The downloaded npm package does not match ${channel === 'stable' ? 'the completed release' : `the ${CHANNEL_NAMES[channel]} artifact`}. The installed package was preserved.` };
|
|
721
759
|
}
|
|
722
760
|
// npm can leave a dependency as an empty directory; swapping that in crash-loops the server (TAL-1010).
|
|
723
761
|
const missing = Object.keys(dict(metadata.dependencies)).filter((name) => !existsSync(join(candidate, 'node_modules', name, 'package.json')));
|
|
@@ -771,7 +809,7 @@ async function applyNpmWebUpdate(webRoot, channel, getJson, id, npmRun, canApply
|
|
|
771
809
|
catch { /* a leftover staging directory must not prevent restart after a verified switch */ }
|
|
772
810
|
}
|
|
773
811
|
}
|
|
774
|
-
return { ok: true, target: 'webui', channel, sourceRevision: target.sourceRevision, ...(target.npm ? { npm: target.npm } : {}),
|
|
812
|
+
return { ok: true, target: 'webui', channel, tag: target.tag, sourceRevision: target.sourceRevision, ...(target.npm ? { npm: target.npm } : {}),
|
|
775
813
|
...(switching ? { channel_switch: true, backup_dir: stores } : {}), message: `Updated Talaria Web to ${target.label}.${stores ? ` Settings were backed up to ${stores}.` : ''}` };
|
|
776
814
|
}
|
|
777
815
|
/** Python `apply_web_update`: installs npm releases; a source checkout is never mutated (TAL-379). */
|
|
@@ -796,6 +834,47 @@ async function currentReleaseTag(path, git) {
|
|
|
796
834
|
const out = await git(['describe', '--tags', '--exact-match', '--match', AGENT_TAG_GLOB, 'HEAD'], path);
|
|
797
835
|
return out.ok && out.out ? out.out : null;
|
|
798
836
|
}
|
|
837
|
+
/** TAL-1525: the checkout's installed identity, retained local-edit recovery, and distance to an already-known target, from local Git only. */
|
|
838
|
+
async function installedAgentIdentity(path, latest, git) {
|
|
839
|
+
if (!path)
|
|
840
|
+
return null;
|
|
841
|
+
const head = await git(['rev-parse', 'HEAD'], path);
|
|
842
|
+
if (!head.ok || !SHA.test(head.out))
|
|
843
|
+
return null;
|
|
844
|
+
let pending;
|
|
845
|
+
try {
|
|
846
|
+
pending = await pendingAutostashes(path, git);
|
|
847
|
+
}
|
|
848
|
+
catch {
|
|
849
|
+
return null;
|
|
850
|
+
} // Uninspectable recovery keeps the cached answer.
|
|
851
|
+
const installed = { current_sha: head.out, current_version: await currentReleaseTag(path, git) ?? head.out.slice(0, 12), ...(pending.length ? RETAINED_LOCAL_EDITS : {}) };
|
|
852
|
+
if (typeof latest !== 'string' || !SHA.test(latest) || latest === head.out)
|
|
853
|
+
return installed;
|
|
854
|
+
const count = await git(['rev-list', '--count', `${head.out}..${latest}`], path);
|
|
855
|
+
return { ...installed, behind: count.ok && /^\d+$/.test(count.out) ? Number.parseInt(count.out, 10) : null };
|
|
856
|
+
}
|
|
857
|
+
/** TAL-1525: a cached target re-anchored on its installed identity; only cached releases newer than it stay offered. */
|
|
858
|
+
function reanchored(info, installed) {
|
|
859
|
+
const next = { ...info };
|
|
860
|
+
// The installed identity re-asserts whatever recovery it still owes.
|
|
861
|
+
delete next.message;
|
|
862
|
+
delete next.metadata_repair;
|
|
863
|
+
delete next.channel_switch;
|
|
864
|
+
Object.assign(next, installed);
|
|
865
|
+
const versions = Array.isArray(info.versions) ? info.versions.map(dict) : [];
|
|
866
|
+
const at = versions.findIndex((v) => v.version === installed.current_version || (typeof v.sha === 'string' && v.sha === installed.current_sha));
|
|
867
|
+
if (at >= 0)
|
|
868
|
+
next.versions = versions.slice(0, at);
|
|
869
|
+
if (installed.current_sha === info.latest_sha) {
|
|
870
|
+
next.behind = 0;
|
|
871
|
+
next.versions = [];
|
|
872
|
+
delete next.manual_update;
|
|
873
|
+
}
|
|
874
|
+
else if (installed.behind === undefined)
|
|
875
|
+
next.behind = at >= 0 ? at : null;
|
|
876
|
+
return next;
|
|
877
|
+
}
|
|
799
878
|
async function verifiedAgentIdentity(path, expectedRevision, git) {
|
|
800
879
|
const head = await git(['rev-parse', 'HEAD'], path);
|
|
801
880
|
if (!head.ok || head.out !== expectedRevision || !SHA.test(head.out))
|
|
@@ -907,6 +986,7 @@ async function isDirty(path, git) {
|
|
|
907
986
|
return !out.ok && (out.out === 'git exited with status 1' || !out.out || out.out.startsWith('git exited with status '));
|
|
908
987
|
}
|
|
909
988
|
/** Fetch and compare the independently selected Agent channel. */
|
|
989
|
+
const RETAINED_LOCAL_EDITS = { metadata_repair: true, message: 'Local Agent changes need recovery. Their saved recovery records are retained.' };
|
|
910
990
|
export async function checkAgentUpdate(path, git, channel = DEFAULT_CHANNEL, published) {
|
|
911
991
|
if (!path || !existsSync(join(path, '.git')))
|
|
912
992
|
return { name: 'agent', behind: null, no_git: true };
|
|
@@ -918,7 +998,7 @@ export async function checkAgentUpdate(path, git, channel = DEFAULT_CHANNEL, pub
|
|
|
918
998
|
try {
|
|
919
999
|
const pending = await pendingAutostashes(path, git);
|
|
920
1000
|
return { ...await agentTarget(path, git, channel, undefined, published), dirty: await isDirty(path, git),
|
|
921
|
-
...(pending.length ?
|
|
1001
|
+
...(pending.length ? RETAINED_LOCAL_EDITS : {}) };
|
|
922
1002
|
}
|
|
923
1003
|
catch (error) {
|
|
924
1004
|
return { name: 'agent', channel, behind: null, error: error.message };
|
|
@@ -1028,7 +1108,7 @@ async function withAgentMutation(path, info, git, policy, mutate, mode = 'source
|
|
|
1028
1108
|
if (preflight)
|
|
1029
1109
|
return preflight;
|
|
1030
1110
|
try {
|
|
1031
|
-
const result = await policy.withMutation(path, str(info.latest_sha), guarded);
|
|
1111
|
+
const result = await policy.withMutation(path, str(info.latest_sha), guarded, str(info.current_sha));
|
|
1032
1112
|
return result.refresh_confirmation ? { ...result, target: 'agent', confirmation_required: true, candidate_revision: info.latest_sha, agent_channel: info.channel } : result;
|
|
1033
1113
|
}
|
|
1034
1114
|
catch (error) {
|
|
@@ -1479,6 +1559,10 @@ export class UpdateService {
|
|
|
1479
1559
|
checkingKey = null;
|
|
1480
1560
|
lastGood = new Map();
|
|
1481
1561
|
applying = false;
|
|
1562
|
+
/** TAL-1525: a forced check owed once the current apply releases its lock. */
|
|
1563
|
+
refreshOwed = false;
|
|
1564
|
+
/** TAL-1525: the Web package installed for the pending restart; this process still runs the old one. */
|
|
1565
|
+
installedWeb = null;
|
|
1482
1566
|
autoTimer = null;
|
|
1483
1567
|
autoStarted = false;
|
|
1484
1568
|
lifecycle = 0;
|
|
@@ -1578,11 +1662,12 @@ export class UpdateService {
|
|
|
1578
1662
|
supportedRevision: str(supported.sourceRevision), supportedVersion: str(supported.version), ...(options.confirmedRevision ? { confirmedRevision: options.confirmedRevision } : {}),
|
|
1579
1663
|
...(this.deps.agentHomes ? { retainedStateHomes: this.deps.agentHomes } : {}),
|
|
1580
1664
|
repairPending: Boolean(marker && existsSync(marker)),
|
|
1581
|
-
...(this.deps.agentMutation ? { withMutation: async (path, revision, mutate) => {
|
|
1665
|
+
...(this.deps.agentMutation ? { withMutation: async (path, revision, mutate, baseline) => {
|
|
1666
|
+
await options.onTransaction?.(baseline, revision);
|
|
1582
1667
|
const result = await this.deps.agentMutation(path, revision, async (git, sync) => {
|
|
1583
1668
|
const applied = await mutate(git);
|
|
1584
1669
|
return applied.ok ? this.finishAgent(applied, path, sync, false) : applied;
|
|
1585
|
-
}, { refreshToken: options.refreshToken, onProgress: options.onProgress, mutationIntent: options.mutationIntent ? JSON.stringify([options.mutationIntent, force, options.agentChannel ?? this.agentChannel(), options.version ?? '', options.confirmedRevision ?? '']) : undefined });
|
|
1670
|
+
}, { operationId: options.operationId, baseline, refreshToken: options.refreshToken, onProgress: options.onProgress, mutationIntent: options.mutationIntent ? JSON.stringify([options.mutationIntent, force, options.agentChannel ?? this.agentChannel(), options.version ?? '', options.confirmedRevision ?? '']) : undefined });
|
|
1586
1671
|
if (result.ok && !retainRuntimeIntent) {
|
|
1587
1672
|
const intent = agentSyncMarker(path, this.deps.stateDir);
|
|
1588
1673
|
try {
|
|
@@ -1653,7 +1738,13 @@ export class UpdateService {
|
|
|
1653
1738
|
if (this.deps.refreshWebuiVersion)
|
|
1654
1739
|
webui.current_version = this.deps.refreshWebuiVersion();
|
|
1655
1740
|
const agentDir = this.deps.agentDir();
|
|
1656
|
-
|
|
1741
|
+
let agent = includeAgent ? this.keepLastGood('agent', agentChannel, await checkAgentUpdate(agentDir, this.git, agentChannel, this.publishedTag)) : ignoredAgent();
|
|
1742
|
+
// A fetch failure keeps the last good remote answer, never its outdated installed identity.
|
|
1743
|
+
if (agent.stale_check && agent.latest_sha) {
|
|
1744
|
+
const installed = await installedAgentIdentity(agentDir, agent.latest_sha, this.git);
|
|
1745
|
+
if (installed)
|
|
1746
|
+
agent = reanchored(agent, installed);
|
|
1747
|
+
}
|
|
1657
1748
|
const marker = agentSyncMarker(agentDir, this.deps.stateDir);
|
|
1658
1749
|
if (includeAgent && marker && existsSync(marker)) {
|
|
1659
1750
|
Object.assign(agent, { metadata_repair: true, message: this.recovery.phase === 'blocked' ? this.recovery.detail || 'Agent update recovery needs attention.' : 'Agent update recovery is incomplete. Recovery will retry automatically when it is safe.' });
|
|
@@ -1663,7 +1754,7 @@ export class UpdateService {
|
|
|
1663
1754
|
Object.assign(agent, agentWarning(agent, policy));
|
|
1664
1755
|
if (Array.isArray(agent.versions))
|
|
1665
1756
|
agent.versions = agent.versions.map((v) => ({ ...dict(v), ...supportOf(dict(v).sha, policy) }));
|
|
1666
|
-
Object.assign(this.cache, { webui, agent, checked_at: this.now(), include_agent: includeAgent, channel, agent_channel: agentChannel });
|
|
1757
|
+
Object.assign(this.cache, { webui: this.installedWeb ? reanchored(webui, this.installedWeb) : webui, agent, checked_at: this.now(), include_agent: includeAgent, channel, agent_channel: agentChannel });
|
|
1667
1758
|
this.preGenerateSummaries(this.cache);
|
|
1668
1759
|
return this.statusSnapshot();
|
|
1669
1760
|
}
|
|
@@ -1686,6 +1777,31 @@ export class UpdateService {
|
|
|
1686
1777
|
const prior = this.lastGood.get(key);
|
|
1687
1778
|
return prior && this.now() - prior.at < CACHE_TTL_S ? { ...prior.result, stale_check: true } : result;
|
|
1688
1779
|
}
|
|
1780
|
+
/**
|
|
1781
|
+
* TAL-1525: an apply or recovery settled, so the cached target is re-anchored on its installed identity
|
|
1782
|
+
* at once (local reads only) and one forced check follows in the background once no apply holds the lock.
|
|
1783
|
+
*/
|
|
1784
|
+
async invalidate(target, applied) {
|
|
1785
|
+
this.cache.checked_at = 0;
|
|
1786
|
+
if (target === 'webui' && applied)
|
|
1787
|
+
this.installedWeb = { current_sha: applied.sourceRevision ?? null, current_version: applied.tag };
|
|
1788
|
+
const installed = target === 'webui' ? this.installedWeb : await installedAgentIdentity(this.deps.agentDir(), dict(this.cache.agent).latest_sha, this.git);
|
|
1789
|
+
const cached = this.cache[target];
|
|
1790
|
+
if (installed && cached && cached.ignored !== true)
|
|
1791
|
+
this.cache[target] = reanchored(cached, installed);
|
|
1792
|
+
if (this.deps.checkEnabled?.() === false)
|
|
1793
|
+
return;
|
|
1794
|
+
this.refreshOwed = true;
|
|
1795
|
+
if (!this.applying)
|
|
1796
|
+
this.refreshOwedCheck();
|
|
1797
|
+
}
|
|
1798
|
+
/** Starts the owed check; a check already in flight for the same key answers it. */
|
|
1799
|
+
refreshOwedCheck() {
|
|
1800
|
+
if (!this.refreshOwed)
|
|
1801
|
+
return;
|
|
1802
|
+
this.refreshOwed = false;
|
|
1803
|
+
void this.check(true).catch((error) => { this.deps.log(`[updates] refresh after update failed: ${error.message}`); });
|
|
1804
|
+
}
|
|
1689
1805
|
startAutoApply(intervalMs = AUTO_UPDATE_INTERVAL_MS) {
|
|
1690
1806
|
if (this.autoStarted || this.autoRestartScheduled)
|
|
1691
1807
|
return;
|
|
@@ -1729,7 +1845,7 @@ export class UpdateService {
|
|
|
1729
1845
|
}
|
|
1730
1846
|
/** One sequence owns its timer and RPC; unchanged permanent debt cannot restart it. */
|
|
1731
1847
|
armRecovery() {
|
|
1732
|
-
if (!this.deps.recoverAgent || !this.deps.agentDir() || this.recoveryAbort || !this.autoStarted)
|
|
1848
|
+
if (!this.deps.recoverAgent || (!this.deps.agentDir() && !this.deps.hasPendingRecovery?.()) || this.recoveryAbort || !this.autoStarted)
|
|
1733
1849
|
return;
|
|
1734
1850
|
if (this.recoveryTimer) {
|
|
1735
1851
|
if (!this.recoveryProbe)
|
|
@@ -1745,6 +1861,9 @@ export class UpdateService {
|
|
|
1745
1861
|
this.recoveryTimer.unref();
|
|
1746
1862
|
}
|
|
1747
1863
|
async publishRecovery() {
|
|
1864
|
+
const operation = this.recovery.operation;
|
|
1865
|
+
if (operation?.attempt_error)
|
|
1866
|
+
this.recovery = { ...this.recovery, operation: { ...operation, attempt_error: sanitizeGitDiagnostic(operation.attempt_error, 2000) } };
|
|
1748
1867
|
try {
|
|
1749
1868
|
await this.deps.recoveryChanged?.(this.recovery);
|
|
1750
1869
|
}
|
|
@@ -1760,6 +1879,9 @@ export class UpdateService {
|
|
|
1760
1879
|
let retryDelay = 1000;
|
|
1761
1880
|
let probeOnly = false;
|
|
1762
1881
|
let ran = false;
|
|
1882
|
+
let publish = true;
|
|
1883
|
+
let operationId = this.deps.pendingRecoveryOperation?.();
|
|
1884
|
+
let operation;
|
|
1763
1885
|
const waitWithoutSpending = (detail, delay = 1000) => {
|
|
1764
1886
|
retry = true;
|
|
1765
1887
|
retryDelay = delay;
|
|
@@ -1768,11 +1890,14 @@ export class UpdateService {
|
|
|
1768
1890
|
try {
|
|
1769
1891
|
if (this.applying || this.deps.gatewayRestarting?.()) {
|
|
1770
1892
|
retry = true;
|
|
1893
|
+
publish = false;
|
|
1771
1894
|
return;
|
|
1772
1895
|
}
|
|
1773
1896
|
const probe = await this.deps.recoverAgent(true, abort.signal);
|
|
1774
1897
|
if (!current())
|
|
1775
1898
|
return;
|
|
1899
|
+
operation = !operationId || probe.operation?.operation_id === operationId ? probe.operation : undefined;
|
|
1900
|
+
operationId ??= operation?.operation_id;
|
|
1776
1901
|
if (probe.waiting_for_idle) {
|
|
1777
1902
|
waitWithoutSpending(probe.detail);
|
|
1778
1903
|
return;
|
|
@@ -1792,7 +1917,7 @@ export class UpdateService {
|
|
|
1792
1917
|
ran = true;
|
|
1793
1918
|
// A re-check of a still-draining gateway keeps its waiting notice rather than flapping to running.
|
|
1794
1919
|
if (!this.recoveryDraining) {
|
|
1795
|
-
this.recovery = { phase: 'running', attempt: this.recoveryAttempt, detail: '', retry_at: null };
|
|
1920
|
+
this.recovery = { phase: 'running', attempt: this.recoveryAttempt, detail: '', retry_at: null, ...(operationId ? { operation_id: operationId } : {}), ...(operation ? { operation } : {}) };
|
|
1796
1921
|
await this.publishRecovery();
|
|
1797
1922
|
if (!current())
|
|
1798
1923
|
return;
|
|
@@ -1822,8 +1947,8 @@ export class UpdateService {
|
|
|
1822
1947
|
}
|
|
1823
1948
|
if (!result.ok || result.owed)
|
|
1824
1949
|
throw new Error(result.detail || 'Agent recovery remains unverified.');
|
|
1825
|
-
this.
|
|
1826
|
-
this.recovery = { phase: 'complete', attempt: this.recoveryAttempt, detail: 'Agent service and runtime recovery is verified.
|
|
1950
|
+
await this.invalidate('agent');
|
|
1951
|
+
this.recovery = { phase: 'complete', attempt: this.recoveryAttempt, detail: 'Agent service and runtime recovery is verified.', retry_at: null, ...(result.operation ? { operation: result.operation } : {}), ...(result.revision ? { verified_revision: result.revision } : {}), ...(result.runtime_revision ? { runtime_revision: result.runtime_revision } : {}), ...(result.verified_version ? { verified_version: result.verified_version } : {}) };
|
|
1827
1952
|
}
|
|
1828
1953
|
catch (error) {
|
|
1829
1954
|
if (!current())
|
|
@@ -1841,7 +1966,8 @@ export class UpdateService {
|
|
|
1841
1966
|
this.recovery.retry_at = new Date(this.now() * 1000 + retryDelay).toISOString();
|
|
1842
1967
|
}
|
|
1843
1968
|
finally {
|
|
1844
|
-
if (current()) {
|
|
1969
|
+
if (current() && publish) {
|
|
1970
|
+
this.recovery = { ...this.recovery, ...(operationId ? { operation_id: operationId } : {}), ...(operation && !this.recovery.operation ? { operation } : {}) };
|
|
1845
1971
|
await this.publishRecovery();
|
|
1846
1972
|
}
|
|
1847
1973
|
if (this.recoveryAbort === abort)
|
|
@@ -1938,6 +2064,7 @@ export class UpdateService {
|
|
|
1938
2064
|
}
|
|
1939
2065
|
finally {
|
|
1940
2066
|
this.applying = false;
|
|
2067
|
+
this.refreshOwedCheck();
|
|
1941
2068
|
this.armRecovery();
|
|
1942
2069
|
}
|
|
1943
2070
|
}
|
|
@@ -1962,7 +2089,7 @@ export class UpdateService {
|
|
|
1962
2089
|
const result = await applyWebUpdate(this.deps.webRoot, channel, this.git, this.deps.getJson, this.deps.identity, this.deps.npm ?? runPackageNpm, canApply, { registry: this.deps.experimental, stateDir: this.deps.stateDir, skipFailedVersion: options.skipFailedVersion }, options.version);
|
|
1963
2090
|
// Settings can cancel before mutation, but a committed replacement must finish restarting unless shutting down.
|
|
1964
2091
|
if (result.ok && !result.up_to_date && lifecycle === this.lifecycle) {
|
|
1965
|
-
this.
|
|
2092
|
+
await this.invalidate('webui', result);
|
|
1966
2093
|
this.autoRestartScheduled = true;
|
|
1967
2094
|
this.stopAutoApply();
|
|
1968
2095
|
this.deps.scheduleRestart();
|
|
@@ -2002,24 +2129,34 @@ export class UpdateService {
|
|
|
2002
2129
|
return verified ? { ok: true, target: 'agent', up_to_date: false, message: 'Agent update recovery completed.', ...verified }
|
|
2003
2130
|
: { ok: false, message: 'Agent recovery could not verify the current source.' };
|
|
2004
2131
|
}, 'repair');
|
|
2132
|
+
// Repairing an older transaction cannot prove this request installed its selected release.
|
|
2133
|
+
if (options.operationId)
|
|
2134
|
+
result = { ...result, recovery_only: true };
|
|
2005
2135
|
}
|
|
2006
2136
|
else {
|
|
2007
2137
|
result = force
|
|
2008
2138
|
? await forceAgentUpdate(path, this.git, this.deps.log, options.agentChannel ?? this.agentChannel(), this.agentPolicy(options, force), options.version, this.publishedTag)
|
|
2009
2139
|
: await applyAgentUpdate(path, this.git, options.agentChannel ?? this.agentChannel(), this.agentPolicy(options, force), options.version, this.publishedTag);
|
|
2010
2140
|
}
|
|
2141
|
+
if (result.ok !== true && result.recovery_required !== false && !result.confirmation_required && await options.onFailure?.(result.message || result.error, typeof result.verified_revision === 'string' ? { revision: result.verified_revision, version: typeof result.verified_version === 'string' ? result.verified_version : null } : undefined))
|
|
2142
|
+
result.recovery_pending = true;
|
|
2011
2143
|
if (this.deps.agentMutation) {
|
|
2012
2144
|
if (result.ok && result.restart_scheduled) {
|
|
2013
2145
|
this.autoRestartScheduled = true;
|
|
2014
2146
|
this.stopAutoApply();
|
|
2015
2147
|
this.deps.scheduleRestart();
|
|
2016
2148
|
}
|
|
2017
|
-
return result;
|
|
2018
2149
|
}
|
|
2019
|
-
|
|
2150
|
+
else if (result.ok)
|
|
2151
|
+
result = await this.finishAgent(result, path);
|
|
2152
|
+
// A failure can still leave Git advanced (a failed dependency sync), so the next check refetches.
|
|
2153
|
+
if (result.ok)
|
|
2154
|
+
await this.invalidate('agent');
|
|
2155
|
+
else
|
|
2156
|
+
this.cache.checked_at = 0;
|
|
2157
|
+
return result;
|
|
2020
2158
|
}
|
|
2021
2159
|
async finishAgent(result, path, sync = this.deps.agentSync, restart = true) {
|
|
2022
|
-
this.cache.checked_at = 0;
|
|
2023
2160
|
const marker = agentSyncMarker(path, this.deps.stateDir);
|
|
2024
2161
|
if (result.up_to_date === true && (!marker || !existsSync(marker)))
|
|
2025
2162
|
return result;
|
|
@@ -2071,7 +2208,6 @@ export class UpdateService {
|
|
|
2071
2208
|
const inv = inventoryLocks(path);
|
|
2072
2209
|
const manual = `rm -f ${str(inv.well_known_lock_path)}`;
|
|
2073
2210
|
if (!inv.well_known_lock_present) {
|
|
2074
|
-
this.cache.checked_at = 0;
|
|
2075
2211
|
const retry = await this.applyInner(target, this.deps.channel(), () => true, options);
|
|
2076
2212
|
return { ...retry, lock_recovery: { action: 'no-lock-found', manual_command: manual, other_locks: inv.other_locks } };
|
|
2077
2213
|
}
|
|
@@ -2197,7 +2333,7 @@ export class UpdateService {
|
|
|
2197
2333
|
const latest = str(info.latest_sha);
|
|
2198
2334
|
if (!SHA.test(current) || !SHA.test(latest))
|
|
2199
2335
|
throw new Error('Update range is unavailable');
|
|
2200
|
-
const releaseNotes = info.release_based === true && (target === 'webui' ? info.channel
|
|
2336
|
+
const releaseNotes = info.release_based === true && (target === 'webui' ? info.channel === 'stable' && Array.isArray(info.release_notes) && info.release_notes.length > 0 : Boolean(this.deps.getPublicJson && githubRepo(str(info.repo_url))));
|
|
2201
2337
|
const rangeKey = this.summaryKey(target, info);
|
|
2202
2338
|
const identity = canon({ channel: info.channel, current_version: info.current_version, release_based: releaseNotes, repo: info.repo_url, path: target === 'agent' ? this.deps.agentDir() : this.deps.webRoot });
|
|
2203
2339
|
const stored = this.pendingSummaries.get(target);
|