@maudecode/talaria-web 1.19.0 → 1.20.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-raw.js +61 -6
- package/dist/api/automation-raw.js.map +1 -1
- package/dist/api/automation-router.d.ts +8 -6
- package/dist/api/automation-router.js +7 -1
- package/dist/api/automation-router.js.map +1 -1
- package/dist/api/chat-router.d.ts +258 -33
- package/dist/api/chat-router.js +60 -25
- package/dist/api/chat-router.js.map +1 -1
- package/dist/api/git-router.d.ts +4 -0
- package/dist/api/git-router.js +1 -1
- package/dist/api/git-router.js.map +1 -1
- package/dist/api/raw-routes.js +13 -1
- package/dist/api/raw-routes.js.map +1 -1
- package/dist/api/router.d.ts +2 -2
- package/dist/api/session-visibility.js +2 -2
- package/dist/api/session-visibility.js.map +1 -1
- package/dist/api/sessions-router.d.ts +787 -107
- package/dist/api/sessions-router.js +16 -4
- package/dist/api/sessions-router.js.map +1 -1
- package/dist/api/settings-router.d.ts +34 -13
- package/dist/api/settings-router.js +54 -17
- package/dist/api/settings-router.js.map +1 -1
- package/dist/api/sse-routes.js +41 -19
- package/dist/api/sse-routes.js.map +1 -1
- package/dist/api/tools-router.d.ts +314 -32
- package/dist/api/tools-router.js +135 -38
- package/dist/api/tools-router.js.map +1 -1
- package/dist/app.js +15 -11
- package/dist/app.js.map +1 -1
- package/dist/auth/crypto.d.ts +3 -0
- package/dist/auth/crypto.js +18 -0
- package/dist/auth/crypto.js.map +1 -1
- package/dist/auth/gate.js +5 -1
- package/dist/auth/gate.js.map +1 -1
- package/dist/cli/ctl.js +6 -1
- package/dist/cli/ctl.js.map +1 -1
- package/dist/cli/main.js +23 -18
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/supervise.d.ts +22 -0
- package/dist/cli/supervise.js +80 -2
- package/dist/cli/supervise.js.map +1 -1
- package/dist/config/agent-config.d.ts +3 -0
- package/dist/config/agent-config.js +36 -9
- package/dist/config/agent-config.js.map +1 -1
- package/dist/fs/atomic.d.ts +3 -0
- package/dist/fs/atomic.js +19 -5
- package/dist/fs/atomic.js.map +1 -1
- package/dist/fs/stat.d.ts +6 -0
- package/dist/fs/stat.js +18 -2
- package/dist/fs/stat.js.map +1 -1
- package/dist/http/context.d.ts +14 -0
- package/dist/http/context.js +48 -5
- package/dist/http/context.js.map +1 -1
- package/dist/profiles/profiles.d.ts +2 -0
- package/dist/profiles/profiles.js +1 -0
- package/dist/profiles/profiles.js.map +1 -1
- package/dist/providers/catalog.d.ts +11 -6
- package/dist/providers/catalog.js +76 -24
- package/dist/providers/catalog.js.map +1 -1
- package/dist/redact.js +38 -14
- package/dist/redact.js.map +1 -1
- package/dist/release.js +5 -3
- package/dist/release.js.map +1 -1
- package/dist/runtime.js +85 -21
- package/dist/runtime.js.map +1 -1
- package/dist/server.js +24 -21
- package/dist/server.js.map +1 -1
- package/dist/sessions/anchor.d.ts +2 -1
- package/dist/sessions/anchor.js +5 -1
- package/dist/sessions/anchor.js.map +1 -1
- package/dist/sessions/background-tasks.d.ts +23 -3
- package/dist/sessions/background-tasks.js +74 -4
- package/dist/sessions/background-tasks.js.map +1 -1
- package/dist/sessions/cli-sessions.d.ts +9 -2
- package/dist/sessions/cli-sessions.js +38 -57
- package/dist/sessions/cli-sessions.js.map +1 -1
- package/dist/sessions/completions.d.ts +8 -0
- package/dist/sessions/completions.js +55 -25
- package/dist/sessions/completions.js.map +1 -1
- package/dist/sessions/export.d.ts +2 -0
- package/dist/sessions/export.js +6 -2
- package/dist/sessions/export.js.map +1 -1
- package/dist/sessions/gateway-sessions.d.ts +44 -4
- package/dist/sessions/gateway-sessions.js +626 -90
- package/dist/sessions/gateway-sessions.js.map +1 -1
- package/dist/sessions/gateway-watcher.d.ts +10 -11
- package/dist/sessions/gateway-watcher.js +25 -21
- package/dist/sessions/gateway-watcher.js.map +1 -1
- package/dist/sessions/list.d.ts +9 -2
- package/dist/sessions/list.js +38 -26
- package/dist/sessions/list.js.map +1 -1
- package/dist/sessions/merge.d.ts +11 -5
- package/dist/sessions/merge.js +59 -17
- package/dist/sessions/merge.js.map +1 -1
- package/dist/sessions/prefix-index.d.ts +7 -4
- package/dist/sessions/prefix-index.js +21 -10
- package/dist/sessions/prefix-index.js.map +1 -1
- package/dist/sessions/recovery.d.ts +1 -1
- package/dist/sessions/recovery.js +4 -3
- package/dist/sessions/recovery.js.map +1 -1
- package/dist/sessions/service.d.ts +107 -37
- package/dist/sessions/service.js +490 -156
- package/dist/sessions/service.js.map +1 -1
- package/dist/sessions/session.d.ts +2 -0
- package/dist/sessions/session.js +4 -0
- package/dist/sessions/session.js.map +1 -1
- package/dist/sessions/state-db-worker.js +22 -5
- package/dist/sessions/state-db-worker.js.map +1 -1
- package/dist/sessions/state-db.d.ts +106 -15
- package/dist/sessions/state-db.js +651 -236
- package/dist/sessions/state-db.js.map +1 -1
- package/dist/sessions/state-saved.d.ts +1 -1
- package/dist/sessions/state-saved.js +35 -11
- package/dist/sessions/state-saved.js.map +1 -1
- package/dist/sessions/storage/backend.d.ts +10 -1
- package/dist/sessions/storage/backend.js.map +1 -1
- package/dist/sessions/storage/conformance.js +1 -1
- package/dist/sessions/storage/conformance.js.map +1 -1
- package/dist/sessions/storage/json-documents.d.ts +2 -0
- package/dist/sessions/storage/json-documents.js +70 -26
- package/dist/sessions/storage/json-documents.js.map +1 -1
- package/dist/sessions/storage/json-files.d.ts +13 -2
- package/dist/sessions/storage/json-files.js +126 -6
- package/dist/sessions/storage/json-files.js.map +1 -1
- package/dist/sessions/storage/json-journal.d.ts +6 -7
- package/dist/sessions/storage/json-journal.js +143 -73
- package/dist/sessions/storage/json-journal.js.map +1 -1
- package/dist/sessions/storage/json.d.ts +15 -1
- package/dist/sessions/storage/json.js +125 -33
- package/dist/sessions/storage/json.js.map +1 -1
- package/dist/sessions/store.d.ts +5 -1
- package/dist/sessions/store.js +67 -27
- package/dist/sessions/store.js.map +1 -1
- package/dist/sessions/streams.d.ts +8 -7
- package/dist/sessions/streams.js +49 -14
- package/dist/sessions/streams.js.map +1 -1
- package/dist/sessions/tool-display.d.ts +3 -1
- package/dist/sessions/tool-display.js +6 -0
- package/dist/sessions/tool-display.js.map +1 -1
- package/dist/sessions/turn-context.js +6 -2
- package/dist/sessions/turn-context.js.map +1 -1
- package/dist/sessions/turn.d.ts +23 -5
- package/dist/sessions/turn.js +168 -78
- package/dist/sessions/turn.js.map +1 -1
- package/dist/sidecar/client.d.ts +24 -1
- package/dist/sidecar/client.js +118 -38
- package/dist/sidecar/client.js.map +1 -1
- package/dist/sidecar/fake.d.ts +6 -2
- package/dist/sidecar/fake.js +15 -2
- package/dist/sidecar/fake.js.map +1 -1
- package/dist/spa.d.ts +9 -4
- package/dist/spa.js +36 -12
- package/dist/spa.js.map +1 -1
- package/dist/startup-timing.d.ts +66 -0
- package/dist/startup-timing.js +129 -0
- package/dist/startup-timing.js.map +1 -0
- package/dist/test/fs-handles.d.ts +11 -0
- package/dist/test/fs-handles.js +31 -0
- package/dist/test/fs-handles.js.map +1 -0
- package/dist/tools/connectors.d.ts +1 -1
- package/dist/tools/connectors.js +2 -2
- package/dist/tools/connectors.js.map +1 -1
- package/dist/tools/crons.d.ts +8 -4
- package/dist/tools/crons.js +25 -18
- package/dist/tools/crons.js.map +1 -1
- package/dist/tools/dashboard-plugins.d.ts +29 -0
- package/dist/tools/dashboard-plugins.js +132 -0
- package/dist/tools/dashboard-plugins.js.map +1 -1
- package/dist/tools/gateway-restart.d.ts +25 -5
- package/dist/tools/gateway-restart.js +103 -23
- package/dist/tools/gateway-restart.js.map +1 -1
- package/dist/tools/health.d.ts +13 -1
- package/dist/tools/health.js +80 -22
- package/dist/tools/health.js.map +1 -1
- package/dist/tools/insights.d.ts +1 -1
- package/dist/tools/insights.js +2 -2
- package/dist/tools/insights.js.map +1 -1
- package/dist/tools/mcp-health.js +74 -24
- package/dist/tools/mcp-health.js.map +1 -1
- package/dist/tools/mcp.js +19 -1
- package/dist/tools/mcp.js.map +1 -1
- package/dist/tools/plugin-oauth.d.ts +14 -0
- package/dist/tools/plugin-oauth.js +53 -0
- package/dist/tools/plugin-oauth.js.map +1 -0
- package/dist/tools/prune-advice.d.ts +50 -0
- package/dist/tools/prune-advice.js +114 -0
- package/dist/tools/prune-advice.js.map +1 -0
- package/dist/tools/skills.d.ts +5 -2
- package/dist/tools/skills.js +9 -6
- package/dist/tools/skills.js.map +1 -1
- package/dist/tools/update-notifications.d.ts +73 -7
- package/dist/tools/update-notifications.js +277 -43
- package/dist/tools/update-notifications.js.map +1 -1
- package/dist/tools/updates.d.ts +8 -1
- package/dist/tools/updates.js +51 -17
- package/dist/tools/updates.js.map +1 -1
- package/dist/workspace/media.js +69 -20
- package/dist/workspace/media.js.map +1 -1
- package/dist/workspace/preview.js +4 -14
- package/dist/workspace/preview.js.map +1 -1
- package/dist/workspace/rollback.d.ts +6 -2
- package/dist/workspace/rollback.js +17 -7
- package/dist/workspace/rollback.js.map +1 -1
- package/package.json +3 -3
- package/sidecar/agent_dependency.json +4 -4
- package/sidecar/agent_support.json +17 -14
- package/sidecar/scripts/suite_runner.py +183 -27
- package/sidecar/scripts/test.sh +5 -7
- package/sidecar/talaria_sidecar/__init__.py +1 -1
- package/sidecar/talaria_sidecar/__main__.py +10 -3
- package/sidecar/talaria_sidecar/agent_mutation.py +159 -23
- package/sidecar/talaria_sidecar/agent_services.py +74 -11
- package/sidecar/talaria_sidecar/context_detail.py +59 -0
- package/sidecar/talaria_sidecar/home.py +97 -20
- package/sidecar/talaria_sidecar/methods/__init__.py +2 -2
- package/sidecar/talaria_sidecar/methods/aux.py +80 -18
- package/sidecar/talaria_sidecar/methods/chat.py +571 -106
- package/sidecar/talaria_sidecar/methods/checkpoints.py +29 -4
- package/sidecar/talaria_sidecar/methods/commands.py +277 -16
- package/sidecar/talaria_sidecar/methods/config.py +73 -3
- package/sidecar/talaria_sidecar/methods/connectors.py +45 -13
- package/sidecar/talaria_sidecar/methods/cron.py +8 -2
- package/sidecar/talaria_sidecar/methods/dashboard_plugins.py +301 -0
- package/sidecar/talaria_sidecar/methods/gateway.py +24 -4
- package/sidecar/talaria_sidecar/methods/gateway_sessions.py +211 -27
- package/sidecar/talaria_sidecar/methods/kanban.py +2 -3
- package/sidecar/talaria_sidecar/methods/oauth.py +139 -11
- package/sidecar/talaria_sidecar/methods/plugin_catalog.py +198 -0
- package/sidecar/talaria_sidecar/methods/plugin_oauth.py +234 -0
- package/sidecar/talaria_sidecar/methods/process.py +70 -6
- package/sidecar/talaria_sidecar/methods/profiles.py +4 -3
- package/sidecar/talaria_sidecar/methods/runtime.py +2 -0
- package/sidecar/talaria_sidecar/methods/skills.py +22 -7
- package/sidecar/talaria_sidecar/methods/state_db.py +128 -42
- package/sidecar/talaria_sidecar/methods/toolsets.py +4 -2
- package/sidecar/talaria_sidecar/methods/worktree.py +121 -2
- package/sidecar/talaria_sidecar/rpc.py +25 -3
- package/sidecar/talaria_sidecar/runtime.py +42 -3
- package/sidecar/talaria_sidecar/speed.py +13 -1
- package/sidecar/talaria_sidecar/startup_timing.py +119 -0
- package/static/dist/FILES.txt +241 -213
- package/static/dist/THIRD_PARTY_LICENSES.md +6 -22
- package/static/dist/assets/AppShell-3isgvoro.js +8 -0
- package/static/dist/assets/Button-f4n6dapf.js +1 -0
- package/static/dist/assets/ChatPage-k7b6xfax.js +4 -0
- package/static/dist/assets/ConnectTargets-juqvt5lm.js +1 -0
- package/static/dist/assets/Dialog-hta5utr3.js +1 -0
- package/static/dist/assets/ExtensionRoute-zrhjn0wm.js +1 -0
- package/static/dist/assets/Field-b6ez48oz.js +1 -0
- package/static/dist/assets/HubRoute-iwvso2tz.js +2 -0
- package/static/dist/assets/LinkCheckContext-ix6zqqkk.js +1 -0
- package/static/dist/assets/Markdown-jdeth7zq.js +2 -0
- package/static/dist/assets/MarkdownRenderer-fbswsgld.js +302 -0
- package/static/dist/assets/MarkdownRenderer-i9o6nr38.css +1 -0
- package/static/dist/assets/OAuthSignIn-bpd8hom3.js +1 -0
- package/static/dist/assets/ResourceSwitch-odi6dy2o.js +1 -0
- package/static/dist/assets/RightPanel-eu6enlo6.js +1 -0
- package/static/dist/assets/Select-kr07928w.js +1 -0
- package/static/dist/assets/SessionListPanel-etb2i54l.js +1 -0
- package/static/dist/assets/SettingsLayout-eu3xxp23.js +1 -0
- package/static/dist/assets/States-icab19yg.js +1 -0
- package/static/dist/assets/TerminalPanel-hngmsr8b.js +16 -0
- package/static/dist/assets/Toaster-nb2uzjw1.js +1 -0
- package/static/dist/assets/_app-ga1moszl.js +1 -0
- package/static/dist/assets/_app.ext._extensionId-na62087t.js +1 -0
- package/static/dist/assets/_app.index-jypgdqoi.js +1 -0
- package/static/dist/assets/_app.insights-kabejdtm.js +1 -0
- package/static/dist/assets/_app.kanban-m19kfcmx.js +1 -0
- package/static/dist/assets/_app.logs-iw4m96sz.js +1 -0
- package/static/dist/assets/_app.memory-jq5frwcg.js +1 -0
- package/static/dist/assets/_app.profiles-kwa3m7rp.js +1 -0
- package/static/dist/assets/_app.session._sessionId-o5lyeipj.js +1 -0
- package/static/dist/assets/_app.settings-ckl8hdll.js +1 -0
- package/static/dist/assets/_app.settings._section-dtdjk98a.js +3 -0
- package/static/dist/assets/_app.skills-n016rihd.js +1 -0
- package/static/dist/assets/_app.tasks-n8zuqsqe.js +1 -0
- package/static/dist/assets/_app.todos-btew5v2s.js +1 -0
- package/static/dist/assets/_app.workspaces-lnfk95ch.js +1 -0
- package/static/dist/assets/abnfDiagram-VCTEODGH-dttheegb.js +1 -0
- package/static/dist/assets/{angular-html-nu6l31w3.js → angular-html-l28bd5fo.js} +1 -1
- package/static/dist/assets/{angular-ts-fbx4f8mm.js → angular-ts-ffzx1vj0.js} +1 -1
- package/static/dist/assets/{apl-bx2xr7dh.js → apl-b7h7mmy4.js} +1 -1
- package/static/dist/assets/{arc-7popfhbk.js → arc-fk1b21lm.js} +1 -1
- package/static/dist/assets/architecture-7GRP2DOG-ic435919.js +1 -0
- package/static/dist/assets/architectureDiagram-5GKGNRK7-8r3glgiq.js +36 -0
- package/static/dist/assets/archive-il7c6053.js +1 -0
- package/static/dist/assets/{astro-g77i97cb.js → astro-k117fy0t.js} +1 -1
- package/static/dist/assets/back-gu3nu279.js +1 -0
- package/static/dist/assets/{blade-boo0u92y.js → blade-npefsmn8.js} +1 -1
- package/static/dist/assets/{blockDiagram-I7D4REHJ-joedghi3.js → blockDiagram-I7D4REHJ-jenyos6c.js} +4 -4
- package/static/dist/assets/{c-cat0w3sc.js → c-2umg6kbn.js} +1 -1
- package/static/dist/assets/{c4Diagram-7LVT6UL2-hyrjrohe.js → c4Diagram-7LVT6UL2-nzlx7yc4.js} +1 -1
- package/static/dist/assets/cancel-bsnfo36u.js +1 -0
- package/static/dist/assets/channel-dsbtk01y.js +1 -0
- package/static/dist/assets/{chunk-4HAMMTFA-koouqbut.js → chunk-4HAMMTFA-g0cru63b.js} +20 -20
- package/static/dist/assets/{chunk-75Z2AOVW-bl4bhdnt.js → chunk-75Z2AOVW-7rkswkjw.js} +1 -1
- package/static/dist/assets/chunk-DU6HZSFF-fn73jzdo.js +128 -0
- package/static/dist/assets/{chunk-F27PBJKO-d8xxi0zi.js → chunk-F27PBJKO-oey8e72m.js} +1 -1
- package/static/dist/assets/{chunk-FOHPRMQF-opuflp73.js → chunk-FOHPRMQF-ipewusgj.js} +8 -8
- package/static/dist/assets/{chunk-GMAD6QVW-jro0hl73.js → chunk-GMAD6QVW-l2a32wiy.js} +6 -6
- package/static/dist/assets/{chunk-GVQU2GXP-djn6gbyu.js → chunk-GVQU2GXP-o9dwzh8h.js} +1 -1
- package/static/dist/assets/{chunk-IMKFNOWR-vw4p5p7o.js → chunk-IMKFNOWR-eblwj20b.js} +5 -5
- package/static/dist/assets/{chunk-L3NEJ4N5-n1hj77q8.js → chunk-L3NEJ4N5-o2mufspb.js} +1 -1
- package/static/dist/assets/chunk-OSK3NFVY-ijp9pw29.js +10 -0
- package/static/dist/assets/{chunk-P2QGCYS3-onf1hz6c.js → chunk-P2QGCYS3-hs9hqwl4.js} +1 -1
- package/static/dist/assets/{chunk-POPQ4Y6H-m8sqn7cs.js → chunk-POPQ4Y6H-bp9rsqez.js} +1 -1
- package/static/dist/assets/{chunk-PWAF6VOD-ek4smc8x.js → chunk-PWAF6VOD-brkprov6.js} +1 -1
- package/static/dist/assets/{chunk-SHT3W25Y-g9gfvefo.js → chunk-SHT3W25Y-gmpv0pxz.js} +13 -13
- package/static/dist/assets/{chunk-SVP7TREG-f9nfv2cu.js → chunk-SVP7TREG-oldm08fu.js} +4 -4
- package/static/dist/assets/{chunk-TICWLB2K-bnk3m1mq.js → chunk-TICWLB2K-ooqilfv7.js} +6 -6
- package/static/dist/assets/{chunk-XXDRQBXY-n40pf9vy.js → chunk-XXDRQBXY-jkmnqu65.js} +1 -1
- package/static/dist/assets/classDiagram-ZZMXUADV-fvgcv24g.js +1 -0
- package/static/dist/assets/classDiagram-v2-VYDZK3BY-fvgcv24g.js +1 -0
- package/static/dist/assets/{cobol-go622aep.js → cobol-ssf9hkh7.js} +1 -1
- package/static/dist/assets/{coffee-jwo1xjhq.js → coffee-lsi9fwae.js} +1 -1
- package/static/dist/assets/copied-bz3gkazh.js +1 -0
- package/static/dist/assets/copy-jo006coq.js +1 -0
- package/static/dist/assets/cose-bilkent-JH36ORCC-layy2r27.js +1 -0
- package/static/dist/assets/{cpp-nre7j0kq.js → cpp-lfrh4y55.js} +1 -1
- package/static/dist/assets/{crystal-lviso2je.js → crystal-efh4pte7.js} +1 -1
- package/static/dist/assets/{css-ywz9j4hb.js → css-i82qdo89.js} +1 -1
- package/static/dist/assets/cynefin-OW5HDTMX-d47op7qs.js +1 -0
- package/static/dist/assets/cynefinDiagram-5FMLGOSQ-doa7594y.js +62 -0
- package/static/dist/assets/cytoscape.esm-fjn2algp.js +321 -0
- package/static/dist/assets/dagre-GXQ25YYZ-os768dp4.js +4 -0
- package/static/dist/assets/dagre-o5jmjz46.js +1 -0
- package/static/dist/assets/{diagram-S7CK7UJ4-m6aeoe7c.js → diagram-S7CK7UJ4-fyi81nxd.js} +4 -4
- package/static/dist/assets/diagram-UQ7AKVKN-j3exggaq.js +41 -0
- package/static/dist/assets/{diagram-VSXAHHWV-hbawi7hn.js → diagram-VSXAHHWV-omo1en2l.js} +1 -1
- package/static/dist/assets/diagram-VX7I27RA-oro2cyu0.js +24 -0
- package/static/dist/assets/diagram-Z3DM3KII-byt9vdb7.js +24 -0
- package/static/dist/assets/dist-crc46di9.js +7 -0
- package/static/dist/assets/dist-etpoyscq.js +44 -0
- package/static/dist/assets/{dist-c4c2m3kv.js → dist-nb670eu6.js} +1 -1
- package/static/dist/assets/ebnfDiagram-PWID7BFC-ee3haugh.js +1 -0
- package/static/dist/assets/{edge-dvv35byi.js → edge-lrob635n.js} +1 -1
- package/static/dist/assets/{elixir-i2f1ki1g.js → elixir-kdpxeq93.js} +1 -1
- package/static/dist/assets/{elm-cpepyjm4.js → elm-c8irj9uh.js} +1 -1
- package/static/dist/assets/erDiagram-RLTQ6QDP-d1e93yff.js +99 -0
- package/static/dist/assets/{erb-idlyfheg.js → erb-flwsv146.js} +1 -1
- package/static/dist/assets/eventmodeling-NTZA5JFV-i1ihb40c.js +1 -0
- package/static/dist/assets/flowDiagram-HODETNUW-jahfpiod.js +1 -0
- package/static/dist/assets/folder-plus-ivoglq98.js +1 -0
- package/static/dist/assets/{ganttDiagram-EL5Y4UJY-ma6jxj5i.js → ganttDiagram-EL5Y4UJY-m7g0jud4.js} +1 -1
- package/static/dist/assets/{git-rebase-d9lpfpbn.js → git-rebase-bli19aoq.js} +1 -1
- package/static/dist/assets/gitGraph-4MIJSDKK-hzdj07yy.js +1 -0
- package/static/dist/assets/{gitGraphDiagram-WWUBYQGX-hzltvsod.js → gitGraphDiagram-WWUBYQGX-dm9agbna.js} +1 -1
- package/static/dist/assets/{glimmer-js-39i0urfb.js → glimmer-js-d4icg38p.js} +1 -1
- package/static/dist/assets/{glimmer-ts-gdtd6n73.js → glimmer-ts-bk75772u.js} +1 -1
- package/static/dist/assets/{glsl-o1djm5pp.js → glsl-lqormp2b.js} +1 -1
- package/static/dist/assets/{graphql-kj6rz55t.js → graphql-hw6s5qzd.js} +1 -1
- package/static/dist/assets/{hack-pe1qqr2i.js → hack-ozrv6l4d.js} +1 -1
- package/static/dist/assets/{haml-cknnbcqs.js → haml-gytfosdt.js} +1 -1
- package/static/dist/assets/{handlebars-hwq64orh.js → handlebars-b6g7jffd.js} +1 -1
- package/static/dist/assets/highlighted-body-KPVGNVTW-mmgz2czu.js +1 -0
- package/static/dist/assets/host-fr6lni1p.js +1 -0
- package/static/dist/assets/{html-derivative-h2i2pyjc.js → html-derivative-f1tqcroo.js} +1 -1
- package/static/dist/assets/{html-ha05xtvt.js → html-on6oj6yj.js} +1 -1
- package/static/dist/assets/{http-cf94zu27.js → http-odhufsl7.js} +1 -1
- package/static/dist/assets/{hurl-lslax568.js → hurl-mu680336.js} +1 -1
- package/static/dist/assets/index-73649w7o.js +10 -0
- package/static/dist/assets/index-lhf1fsdf.css +2 -0
- package/static/dist/assets/info-A6RAGUB7-lll1dqmm.js +1 -0
- package/static/dist/assets/infoDiagram-27XIBGKW-k7esc639.js +2 -0
- package/static/dist/assets/{ishikawaDiagram-5VMMS53U-e7bnwq7h.js → ishikawaDiagram-5VMMS53U-lgr6k9wo.js} +6 -6
- package/static/dist/assets/{java-ndjf2o89.js → java-nxbe8uju.js} +1 -1
- package/static/dist/assets/{javascript-coftlwy3.js → javascript-lz3kxcyz.js} +1 -1
- package/static/dist/assets/{jinja-etei9wy7.js → jinja-l5pk84gt.js} +1 -1
- package/static/dist/assets/{jison-hyekgft1.js → jison-jdutdwyy.js} +1 -1
- package/static/dist/assets/{journeyDiagram-3NMN7TZE-etd1bi6p.js → journeyDiagram-3NMN7TZE-ndmbxuqk.js} +1 -1
- package/static/dist/assets/{json-lok0yaho.js → json-dnge4ssf.js} +1 -1
- package/static/dist/assets/{jsx-b64w0nbx.js → jsx-c3lwhkep.js} +1 -1
- package/static/dist/assets/{jsx-runtime-eu92a5pu.js → jsx-runtime-o40ukmjl.js} +1 -1
- package/static/dist/assets/{julia-jxxzz2yn.js → julia-hwd4rrcb.js} +1 -1
- package/static/dist/assets/{just-mc29iw9t.js → just-nka3oxdx.js} +1 -1
- package/static/dist/assets/{kanban-definition-UXKFOSKX-emb1g9dz.js → kanban-definition-UXKFOSKX-mjxym0jp.js} +28 -28
- package/static/dist/assets/katex-cbdd1ohw.css +1 -0
- package/static/dist/assets/katex-pbij2oo6.js +257 -0
- package/static/dist/assets/{latex-pafa03ft.js → latex-iqmr7e40.js} +1 -1
- package/static/dist/assets/lazyRouteComponent-cwb6l7xh.js +1 -0
- package/static/dist/assets/{line-h0ojzsvs.js → line-mtr5k6il.js} +1 -1
- package/static/dist/assets/linear-jlwrvvy6.js +1 -0
- package/static/dist/assets/link-iadw4ghw.js +2 -0
- package/static/dist/assets/{liquid-hz5c2pov.js → liquid-okmk9tbp.js} +1 -1
- package/static/dist/assets/locale-cs-n41hptse.js +5 -0
- package/static/dist/assets/locale-de-k7ht47ew.js +5 -0
- package/static/dist/assets/locale-es-ih078lco.js +5 -0
- package/static/dist/assets/locale-fr-ojabnf41.js +5 -0
- package/static/dist/assets/locale-it-kb96jufy.js +5 -0
- package/static/dist/assets/locale-ja-jpsp3xs1.js +7 -0
- package/static/dist/assets/locale-ko-cpzuy0n7.js +5 -0
- package/static/dist/assets/locale-pl-dbap4leu.js +5 -0
- package/static/dist/assets/locale-pt-nci7w72x.js +5 -0
- package/static/dist/assets/locale-ru-soghe4cs.js +7 -0
- package/static/dist/assets/locale-tr-ks00mu68.js +5 -0
- package/static/dist/assets/locale-vi-ij7twfm6.js +5 -0
- package/static/dist/assets/locale-zh-Hant-feakwr7a.js +5 -0
- package/static/dist/assets/locale-zh-ren0vjyv.js +7 -0
- package/static/dist/assets/login-lkhtzfcl.js +1 -0
- package/static/dist/assets/{lua-leyf8mlb.js → lua-krx4xj5h.js} +1 -1
- package/static/dist/assets/{marko-cn1fzpdv.js → marko-gbvpfehz.js} +1 -1
- package/static/dist/assets/{mdc-huhy88df.js → mdc-c21zlyi5.js} +1 -1
- package/static/dist/assets/mermaid-HWGCJPDP-jx0q5dm2.js +1 -0
- package/static/dist/assets/mermaid-parser.core-k91vdnvi.js +7 -0
- package/static/dist/assets/micromark-factory-space-fnmnpi6s.js +1 -0
- package/static/dist/assets/{mindmap-definition-YA3MSWOX-o1vathns.js → mindmap-definition-YA3MSWOX-ehztfea4.js} +28 -28
- package/static/dist/assets/{nginx-e7lvhsmn.js → nginx-f3d68ed4.js} +1 -1
- package/static/dist/assets/{nim-dun5d8mk.js → nim-dw0jcy70.js} +1 -1
- package/static/dist/assets/onboarding-f67z0a2r.js +1 -0
- package/static/dist/assets/packet-AYTQ26CC-ok2xrblz.js +1 -0
- package/static/dist/assets/pegDiagram-XKGWAZYB-ec3rpj0m.js +1 -0
- package/static/dist/assets/{perl-bj3oqtet.js → perl-3c0r45c8.js} +1 -1
- package/static/dist/assets/{php-buzp12r0.js → php-rznhidvp.js} +1 -1
- package/static/dist/assets/pie-WAS4IAKB-iwkir23u.js +1 -0
- package/static/dist/assets/pieDiagram-E7YTZNPT-fcpqpekh.js +39 -0
- package/static/dist/assets/{pug-mjad7he9.js → pug-f2le4f3y.js} +1 -1
- package/static/dist/assets/{qml-d1gdp10s.js → qml-e2wbq9cr.js} +1 -1
- package/static/dist/assets/{quadrantDiagram-AXDQQJYC-owqc4uqn.js → quadrantDiagram-AXDQQJYC-lqsync43.js} +1 -1
- package/static/dist/assets/queryKeys-ed4n2egc.js +9 -0
- package/static/dist/assets/{r-o3r9c7ao.js → r-epfzuw6q.js} +1 -1
- package/static/dist/assets/radar-RG4KPBEZ-hje4jbk6.js +1 -0
- package/static/dist/assets/railroad-74A4TZTK-gll9n6qi.js +1 -0
- package/static/dist/assets/railroad-abnf-HS5TGJTU-o6h6lpn4.js +1 -0
- package/static/dist/assets/railroad-ebnf-LZEXJU2U-juaefj6o.js +1 -0
- package/static/dist/assets/railroad-peg-WCYAUIDC-cgfhvpah.js +1 -0
- package/static/dist/assets/railroadDiagram-O6MQD6OU-lp3w7awf.js +1 -0
- package/static/dist/assets/{razor-ilc585yr.js → razor-pea1u1d0.js} +1 -1
- package/static/dist/assets/refresh-cw-iccm7a4e.js +1 -0
- package/static/dist/assets/refresh-i9ya9dvl.js +1 -0
- package/static/dist/assets/{regexp-mpjtcvwm.js → regexp-hzte0a5x.js} +1 -1
- package/static/dist/assets/registry-g7w3353u.js +1 -0
- package/static/dist/assets/requirementDiagram-BXWQKSXE-ha8eibcf.js +84 -0
- package/static/dist/assets/rolldown-runtime-bnnw9q4a.js +1 -0
- package/static/dist/assets/{rst-jrkwjdyi.js → rst-m6tugj5o.js} +1 -1
- package/static/dist/assets/{ruby-n4tjcbpz.js → ruby-l19vq3w1.js} +1 -1
- package/static/dist/assets/runtime-nlxpnegr.js +1 -0
- package/static/dist/assets/{sankeyDiagram-P5KCCOFB-iqc02emv.js → sankeyDiagram-P5KCCOFB-oxf31pr9.js} +1 -1
- package/static/dist/assets/{sas-hjo6y93k.js → sas-ktdxo397.js} +1 -1
- package/static/dist/assets/{scss-ncidjv48.js → scss-kn3oxfwf.js} +1 -1
- package/static/dist/assets/{sequenceDiagram-WJ2MYXX4-i0v116q0.js → sequenceDiagram-WJ2MYXX4-jiq8lhyo.js} +11 -11
- package/static/dist/assets/settings_section_extensions_title-fadc7o65.js +1 -0
- package/static/dist/assets/share._token-o76ki0ly.js +2 -0
- package/static/dist/assets/{shellscript-m8whjpqd.js → shellscript-l100jtrg.js} +1 -1
- package/static/dist/assets/{shellsession-i5bj6syz.js → shellsession-m5qukwow.js} +1 -1
- package/static/dist/assets/sizeCapture-INFHLROL-dk1io13w.js +1 -0
- package/static/dist/assets/sliders-horizontal-ddcs88av.js +1 -0
- package/static/dist/assets/{soy-hhh36ysq.js → soy-mexlscur.js} +1 -1
- package/static/dist/assets/{sql-j21bzcl6.js → sql-o0ho5suh.js} +1 -1
- package/static/dist/assets/src-h89s0hs4.js +1 -0
- package/static/dist/assets/{stata-bbu2onh1.js → stata-be9ck1q3.js} +1 -1
- package/static/dist/assets/stateDiagram-D77RDMKH-f3fslnon.js +1 -0
- package/static/dist/assets/stateDiagram-v2-MP3YSRHH-hlt6yphw.js +1 -0
- package/static/dist/assets/{surrealql-l5vczuco.js → surrealql-gk1xkkyy.js} +1 -1
- package/static/dist/assets/{svelte-idn422g6.js → svelte-k6ecjilf.js} +1 -1
- package/static/dist/assets/swimlanes-42K2YHIH-k1hmk7jf.js +1 -0
- package/static/dist/assets/swimlanesDiagram-VR7AAH4N-hd5t9tnt.js +8 -0
- package/static/dist/assets/{templ-e22qou3c.js → templ-gf3bftk6.js} +1 -1
- package/static/dist/assets/{tex-deqpc5ee.js → tex-d21fqv1z.js} +1 -1
- package/static/dist/assets/{timeline-definition-24CTP7MA-ol2hnvma.js → timeline-definition-24CTP7MA-n3ncfy9r.js} +8 -8
- package/static/dist/assets/toast-liparz2j.js +56 -0
- package/static/dist/assets/treeView-Q6P3EWNA-l3y2pejt.js +1 -0
- package/static/dist/assets/treemap-WGGIJYW6-jown9axh.js +1 -0
- package/static/dist/assets/{ts-tags-ctnibc27.js → ts-tags-n0g61gr6.js} +1 -1
- package/static/dist/assets/{tsx-i163n32g.js → tsx-cvv7wv6q.js} +1 -1
- package/static/dist/assets/{twig-x0fi7wm8.js → twig-n1f67204.js} +1 -1
- package/static/dist/assets/{typescript-g18c34xz.js → typescript-og7o55cx.js} +1 -1
- package/static/dist/assets/untitled-mj86r4gz.js +1 -0
- package/static/dist/assets/useDebounced-g8r0ggve.js +1 -0
- package/static/dist/assets/useForm-o4uu74mx.js +1 -0
- package/static/dist/assets/{useParams-gjc70qru.js → useParams-ftsveu84.js} +1 -1
- package/static/dist/assets/{useSearch-e6ae539u.js → useSearch-crqueqga.js} +1 -1
- package/static/dist/assets/vennDiagram-4TSXK5OY-dh59uq1c.js +34 -0
- package/static/dist/assets/{vue-mwu5l1bb.js → vue-ej4xpwqw.js} +1 -1
- package/static/dist/assets/{vue-html-nskj3du0.js → vue-html-d48xsjuo.js} +1 -1
- package/static/dist/assets/{vue-vine-cqe77smq.js → vue-vine-pev88ip6.js} +1 -1
- package/static/dist/assets/wardley-WFR3VGLG-e6d74b0j.js +1 -0
- package/static/dist/assets/wardleyDiagram-VM6X3IG4-hnofh78f.js +78 -0
- package/static/dist/assets/with-selector-nu1b5z0v.js +1 -0
- package/static/dist/assets/{xml-gau7gvrv.js → xml-ifxp6gqb.js} +1 -1
- package/static/dist/assets/{xsl-ew09zq8b.js → xsl-fug2cckc.js} +1 -1
- package/static/dist/assets/{xychartDiagram-S5SC5T6Z-aqbgvujg.js → xychartDiagram-S5SC5T6Z-bpymjelb.js} +6 -6
- package/static/dist/assets/{yaml-ofnrxtvf.js → yaml-fjmafnlo.js} +1 -1
- package/static/dist/extension-sdk.js +1 -1
- package/static/dist/index.html +1 -1
- package/static/dist/sw.js +180 -136
- package/static/dist/assets/AppShell-cey33v9s.js +0 -8
- package/static/dist/assets/ChatPage-i8wnugr7.js +0 -18
- package/static/dist/assets/ConnectTargets-hg19553x.js +0 -1
- package/static/dist/assets/ExtensionRoute-cly4apm5.js +0 -1
- package/static/dist/assets/Field-j8uqoigz.js +0 -9
- package/static/dist/assets/HubRoute-e4bgz41j.js +0 -2
- package/static/dist/assets/Markdown-lahuichm.js +0 -598
- package/static/dist/assets/Markdown-lwviulmg.css +0 -1
- package/static/dist/assets/RightPanel-lbo4i0fn.js +0 -1
- package/static/dist/assets/Select-gqatm2e0.js +0 -1
- package/static/dist/assets/SessionListPanel-mfqayfjh.js +0 -1
- package/static/dist/assets/SettingsLayout-b8980u7k.js +0 -1
- package/static/dist/assets/States-e7dkgtxf.js +0 -1
- package/static/dist/assets/Toaster-bfqqy786.js +0 -1
- package/static/dist/assets/_app-n1n6pfx1.js +0 -1
- package/static/dist/assets/_app.ext._extensionId-buxjxav3.js +0 -1
- package/static/dist/assets/_app.index-jt8zwiu2.js +0 -1
- package/static/dist/assets/_app.insights-cv76ml71.js +0 -1
- package/static/dist/assets/_app.kanban-h6ts53j7.js +0 -1
- package/static/dist/assets/_app.logs-dm873z90.js +0 -1
- package/static/dist/assets/_app.memory-glk5y6m8.js +0 -1
- package/static/dist/assets/_app.profiles-ka6zpstq.js +0 -1
- package/static/dist/assets/_app.session._sessionId-g2vzghvc.js +0 -1
- package/static/dist/assets/_app.settings-hgjdhzcd.js +0 -1
- package/static/dist/assets/_app.settings._section-jf2kmhae.js +0 -3
- package/static/dist/assets/_app.skills-cii852yq.js +0 -1
- package/static/dist/assets/_app.tasks-fp9q7atm.js +0 -1
- package/static/dist/assets/_app.todos-dw94qzue.js +0 -1
- package/static/dist/assets/_app.workspaces-inyygzze.js +0 -1
- package/static/dist/assets/abnfDiagram-VCTEODGH-gjayq3ra.js +0 -1
- package/static/dist/assets/architecture-7GRP2DOG-lp56972r.js +0 -1
- package/static/dist/assets/architectureDiagram-5GKGNRK7-nwb3xovn.js +0 -36
- package/static/dist/assets/archive-b1j004vn.js +0 -1
- package/static/dist/assets/back-g74gkozu.js +0 -1
- package/static/dist/assets/channel-es95o4y8.js +0 -1
- package/static/dist/assets/chunk-DU6HZSFF-gpedttsp.js +0 -128
- package/static/dist/assets/chunk-OSK3NFVY-oy0gwn2n.js +0 -10
- package/static/dist/assets/classDiagram-ZZMXUADV-kmihoqxh.js +0 -1
- package/static/dist/assets/classDiagram-v2-VYDZK3BY-kmihoqxh.js +0 -1
- package/static/dist/assets/copied-bli9tbcx.js +0 -1
- package/static/dist/assets/copy-jamtd1pf.js +0 -1
- package/static/dist/assets/cose-bilkent-JH36ORCC-eclcy6ja.js +0 -1
- package/static/dist/assets/cynefin-OW5HDTMX-f8xfdd3f.js +0 -1
- package/static/dist/assets/cynefinDiagram-5FMLGOSQ-n9lb99h9.js +0 -62
- package/static/dist/assets/cytoscape.esm-bqu53u12.js +0 -321
- package/static/dist/assets/dagre-GXQ25YYZ-dgailddi.js +0 -4
- package/static/dist/assets/dagre-lkoknbjn.js +0 -1
- package/static/dist/assets/diagram-UQ7AKVKN-jall3j0x.js +0 -41
- package/static/dist/assets/diagram-VX7I27RA-hendl2tt.js +0 -24
- package/static/dist/assets/diagram-Z3DM3KII-igwc35p3.js +0 -24
- package/static/dist/assets/ebnfDiagram-PWID7BFC-c64knz08.js +0 -1
- package/static/dist/assets/erDiagram-RLTQ6QDP-brdu9lcm.js +0 -99
- package/static/dist/assets/eventmodeling-NTZA5JFV-njk1j8wl.js +0 -1
- package/static/dist/assets/flowDiagram-HODETNUW-nma6f0ga.js +0 -1
- package/static/dist/assets/folder-plus-lvt9kudb.js +0 -1
- package/static/dist/assets/gitGraph-4MIJSDKK-naa9w6xa.js +0 -1
- package/static/dist/assets/highlighted-body-KPVGNVTW-ghoavj8d.js +0 -1
- package/static/dist/assets/host-hzm8n85n.js +0 -1
- package/static/dist/assets/index-drdcaqeq.css +0 -2
- package/static/dist/assets/index-jzm844he.js +0 -11
- package/static/dist/assets/info-A6RAGUB7-mn2ut5ko.js +0 -1
- package/static/dist/assets/infoDiagram-27XIBGKW-h6kuqvsb.js +0 -2
- package/static/dist/assets/lazyRouteComponent-o816ytzl.js +0 -1
- package/static/dist/assets/linear-becwlnhk.js +0 -1
- package/static/dist/assets/link-k01ryaf9.js +0 -1
- package/static/dist/assets/login-bsae49ew.js +0 -1
- package/static/dist/assets/mermaid-HWGCJPDP-ihl34s74.js +0 -1
- package/static/dist/assets/mermaid-parser.core-bnre27u8.js +0 -7
- package/static/dist/assets/not-found-ccnnac39.js +0 -1
- package/static/dist/assets/onboarding-c65tysya.js +0 -1
- package/static/dist/assets/onboarding_model_label-gpn28uix.js +0 -1
- package/static/dist/assets/packet-AYTQ26CC-hatq7m2e.js +0 -1
- package/static/dist/assets/pegDiagram-XKGWAZYB-gwisz8jv.js +0 -1
- package/static/dist/assets/pie-WAS4IAKB-fpftf0mk.js +0 -1
- package/static/dist/assets/pieDiagram-E7YTZNPT-khm1o9a6.js +0 -39
- package/static/dist/assets/radar-RG4KPBEZ-cntfwjpq.js +0 -1
- package/static/dist/assets/railroad-74A4TZTK-a7t5eibp.js +0 -1
- package/static/dist/assets/railroad-abnf-HS5TGJTU-ol8cdktf.js +0 -1
- package/static/dist/assets/railroad-ebnf-LZEXJU2U-i8vzd429.js +0 -1
- package/static/dist/assets/railroad-peg-WCYAUIDC-nw3ulewz.js +0 -1
- package/static/dist/assets/railroadDiagram-O6MQD6OU-etuh0qa0.js +0 -1
- package/static/dist/assets/refresh-cw-mqbkv2a3.js +0 -1
- package/static/dist/assets/refresh-l29ljp76.js +0 -1
- package/static/dist/assets/requirementDiagram-BXWQKSXE-oq2ulk22.js +0 -84
- package/static/dist/assets/rolldown-runtime-b9miacsj.js +0 -1
- package/static/dist/assets/root-mbklpuv4.js +0 -1
- package/static/dist/assets/saved-ndd4t2xb.js +0 -1
- package/static/dist/assets/settings_section_extensions_title-jhfo6o8z.js +0 -1
- package/static/dist/assets/share._token-c1ri0hy1.js +0 -2
- package/static/dist/assets/sizeCapture-INFHLROL-g612l48j.js +0 -1
- package/static/dist/assets/sliders-horizontal-j3jjt9tv.js +0 -1
- package/static/dist/assets/src-hjyib4mu.js +0 -1
- package/static/dist/assets/stateDiagram-D77RDMKH-dnpt1ato.js +0 -1
- package/static/dist/assets/stateDiagram-v2-MP3YSRHH-bxjacpk6.js +0 -1
- package/static/dist/assets/swimlanes-42K2YHIH-loqbdazb.js +0 -1
- package/static/dist/assets/swimlanesDiagram-VR7AAH4N-id62p9hz.js +0 -8
- package/static/dist/assets/toast-i3h34v6o.js +0 -64
- package/static/dist/assets/treeView-Q6P3EWNA-idrj6iox.js +0 -1
- package/static/dist/assets/treemap-WGGIJYW6-lzr49vv5.js +0 -1
- package/static/dist/assets/untitled-oaoya4qj.js +0 -1
- package/static/dist/assets/useForm-nfaxgmsk.js +0 -1
- package/static/dist/assets/vennDiagram-4TSXK5OY-bvwr9o2z.js +0 -34
- package/static/dist/assets/wardley-WFR3VGLG-31ui8tma.js +0 -1
- package/static/dist/assets/wardleyDiagram-VM6X3IG4-k5wqtx4b.js +0 -78
- /package/static/dist/assets/{ChatPage-gmu5c7lf.css → TerminalPanel-gmu5c7lf.css} +0 -0
package/dist/sessions/turn.js
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* (Python `api/routes.py::_start_chat_stream_for_session`,
|
|
6
6
|
* `api/streaming.py::_run_agent_streaming`, `cancel_stream`).
|
|
7
7
|
*/
|
|
8
|
+
import { StartupTiming, timingOutcome } from '../startup-timing.js';
|
|
8
9
|
import { randomUUID } from 'node:crypto';
|
|
9
10
|
import { closeSync, fstatSync, readFileSync } from 'node:fs';
|
|
10
11
|
import { openAnchoredFd } from '../workspace/fs.js';
|
|
@@ -12,33 +13,33 @@ import { isWithin, resolvePathLikePython } from '../workspace/paths.js';
|
|
|
12
13
|
import { runtimeFailureDetails, SidecarError } from '../sidecar/client.js';
|
|
13
14
|
import { HttpFailure, markSessionTitleGenerated } from './service.js';
|
|
14
15
|
import { StreamRegistry, SessionChannels } from './streams.js';
|
|
15
|
-
import { ChatUsageSchema, ConnectorOperationSnapshotSchema } from '@maudecode/talaria-web-contracts';
|
|
16
|
+
import { TRANSCRIPT_WINDOW, ChatUsageSchema, ConnectorOperationSnapshotSchema } from '@maudecode/talaria-web-contracts';
|
|
17
|
+
import { toolProgress } from './tool-display.js';
|
|
16
18
|
import { catalogNames, connectorOperation } from '../tools/connectors.js';
|
|
17
19
|
import { PendingPrompts, clarifyReply, isVaultPrompt, vaultReply } from './pending.js';
|
|
18
20
|
import { COMPRESSION_RECOVERY_ACTION_START_FOCUSED, COMPRESSION_RECOVERY_TERMINAL_STATE, CONTEXT_USAGE_FIELDS, Session, contextUsage, forgetContextFigures, titleFrom } from './session.js';
|
|
19
|
-
import { anchorMessageKey,
|
|
20
|
-
import { buildActiveTurnToken, completedToolIndex, publicToolFrame, redactNestedMessageContainers,
|
|
21
|
+
import { anchorMessageKey, markerSummary, visibleMessagesForAnchor } from './compress.js';
|
|
22
|
+
import { buildActiveTurnToken, completedToolIndex, publicToolFrame, redactNestedMessageContainers, redactString, withToolId } from '../redact.js';
|
|
21
23
|
import { dict, findPersonality } from '../config/agent-config.js';
|
|
22
24
|
import { ReasoningTitleTracker, reasoningEventPayload } from './reasoning-titles.js';
|
|
23
|
-
import {
|
|
24
|
-
import { UNSETTLED_TODO_KEY, attachTodoState, parseTodoToolResult } from './todo.js';
|
|
25
|
+
import { UNSETTLED_TODO_KEY, parseTodoToolResult } from './todo.js';
|
|
25
26
|
import { SessionNotices } from './notices.js';
|
|
26
27
|
import { SessionGoals } from './goals.js';
|
|
27
|
-
import {
|
|
28
|
+
import { turnTerminalState } from './anchor.js';
|
|
28
29
|
import { persistentStateChanges, persistentStateSnapshot } from './state-saved.js';
|
|
29
30
|
import { agentBuildParams, webuiEphemeralSystemPrompt, workspaceSystemMessage } from './turn-context.js';
|
|
30
|
-
import { agentSteerText, assistantReplyAddedAfterCurrentTurn, attachedFilesPrompt, buildPartialMessage, dedupeContext, checkpointTurnStart, extractToolCallsFromMessages, hasNativeImages, injectMaxIterationSummaryFallback, isDict, mergeDisplayMessagesAfterAgentResult, messageIdentity, messageText, pendingUserRow, sanitizeMessagesForApi, sessionLacksFinalAssistantAnswer, splitDisplayText, stateDbSeenId, joinReasoning, reasoningFieldsText, toolOutcome,
|
|
31
|
+
import { agentSteerText, assistantReplyAddedAfterCurrentTurn, attachedFilesPrompt, buildPartialMessage, dedupeContext, checkpointTurnStart, extractToolCallsFromMessages, hasNativeImages, injectMaxIterationSummaryFallback, isDict, mergeDisplayMessagesAfterAgentResult, messageIdentity, messageText, pendingUserRow, sanitizeMessagesForApi, withDataUseRequirements, sessionLacksFinalAssistantAnswer, splitDisplayText, stateDbSeenId, joinReasoning, reasoningFieldsText, toolOutcome, withoutMaxIterationSummaryRequest, withNativeImagesRestored, withoutNativeImages, withoutToolImages } from './merge.js';
|
|
31
32
|
import { mayBecomeSilentReply, turnOrigin, recordBackgroundReview, recordBackgroundUpdate } from './background-updates.js';
|
|
32
33
|
import { countExchanges, fallbackTitleFromExchange, firstExchangeSnippets, isGenericFallbackTitle, latestExchangeSnippets, looksInvalidGeneratedTitle, looksLikeDefaultCliTitle, sanitizeGeneratedTitle, titleLanguageMismatch, titlePrompts } from './titles.js';
|
|
33
34
|
import { WORKSPACE_BUSY_MESSAGE } from '../workspace/git.js';
|
|
34
35
|
import { CHECKPOINT_STORE_BUSY_MESSAGE } from '../workspace/rollback.js';
|
|
35
36
|
import { str } from '../util.js';
|
|
36
37
|
import { toolEditDiff } from './tool-display.js';
|
|
38
|
+
import { startsBackgroundWork } from './background-tasks.js';
|
|
37
39
|
import { recordWakeupPause } from './wakeup-pause.js';
|
|
38
40
|
import { displayName } from '../providers/catalog.js';
|
|
39
41
|
export const CHAT_LOCK_WAIT_SECONDS = 2;
|
|
40
42
|
const IMAGE_MODE_TIMEOUT_MS = 15_000;
|
|
41
|
-
const TERMINAL_SSE_VISIBLE_MESSAGE_LIMIT = 80;
|
|
42
43
|
/** TAL-397: streamed text reports the live meter at most this often (seconds); a counter change reports at once. */
|
|
43
44
|
const METERING_INTERVAL_S = 1;
|
|
44
45
|
/** The Agent's content frames, which end a rate-limit wait (TAL-821) and a compression span (TAL-1006). A terminal frame ends the run, its wait, and its span. */
|
|
@@ -227,6 +228,7 @@ export class TurnRunner {
|
|
|
227
228
|
/**
|
|
228
229
|
* TAL-364: what a Stop needs to write the turn's model context: its starting context, the prompt the Agent got, and
|
|
229
230
|
* whether a settlement already used a canonical checkpoint (which marks the stop boundary; later work never replaces it).
|
|
231
|
+
* TAL-1162: `startReadPending` while the turn's starting state.db read is still in flight.
|
|
230
232
|
*/
|
|
231
233
|
/** TAL-364: a Stop's in-flight `chat.interrupt` reply (null when it failed), so a worker that settles first can use its checkpoint. */
|
|
232
234
|
interrupts = new Map();
|
|
@@ -344,6 +346,25 @@ export class TurnRunner {
|
|
|
344
346
|
}
|
|
345
347
|
/** Python `_start_chat_stream_for_session`: persist pending state, register the channel, launch the worker. */
|
|
346
348
|
async admit(session, opts, releaseStopHold = false) {
|
|
349
|
+
const timing = opts.timing ?? new StartupTiming(this.deps.log);
|
|
350
|
+
timing.identify(session.session_id);
|
|
351
|
+
timing.begin('admission');
|
|
352
|
+
try {
|
|
353
|
+
const response = await this.admitTimed(session, { ...opts, timing }, releaseStopHold);
|
|
354
|
+
if (response._status !== undefined)
|
|
355
|
+
timing.finish('refused');
|
|
356
|
+
else if (!response.stream_id || !this.workers.has(response.stream_id))
|
|
357
|
+
timing.finish('noop');
|
|
358
|
+
return response;
|
|
359
|
+
}
|
|
360
|
+
catch (error) {
|
|
361
|
+
timing.finish(timingOutcome(error));
|
|
362
|
+
throw error;
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
async admitTimed(session, opts, releaseStopHold) {
|
|
366
|
+
const timing = opts.timing;
|
|
367
|
+
const closeChecks = timing.begin('admission_checks');
|
|
347
368
|
const s = session;
|
|
348
369
|
const readOnly = (await this.deps.service().readOnlyReason(s));
|
|
349
370
|
if (readOnly)
|
|
@@ -371,9 +392,13 @@ export class TurnRunner {
|
|
|
371
392
|
}
|
|
372
393
|
const accepted = isDict(s.extra.completion_acceptances) ? s.extra.completion_acceptances : {};
|
|
373
394
|
if (opts.completionKeys?.length && opts.completionKeys.every((key) => typeof accepted[key] === 'string' && accepted[key])) {
|
|
395
|
+
timing.identify(s.session_id, str(accepted[opts.completionKeys[0]]));
|
|
396
|
+
timing.finish('noop');
|
|
374
397
|
return { stream_id: str(accepted[opts.completionKeys[0]]), session_id: s.session_id };
|
|
375
398
|
}
|
|
399
|
+
closeChecks();
|
|
376
400
|
const streamId = randomUUID().replace(/-/g, '');
|
|
401
|
+
timing.identify(s.session_id, streamId);
|
|
377
402
|
const wasHiddenEmpty = !s.messages.length && !s.context_messages.length && !s.hasPendingPrompt;
|
|
378
403
|
const attachments = opts.attachments ?? [];
|
|
379
404
|
// A background wakeup stays one in a forked session too (TAL-460).
|
|
@@ -384,6 +409,9 @@ export class TurnRunner {
|
|
|
384
409
|
const compactionDue = !opts.ephemeral && sameRuntime && this.deps.service().compactionDue(s);
|
|
385
410
|
if (!sameRuntime)
|
|
386
411
|
forgetContextFigures(s);
|
|
412
|
+
const notificationOwner = this.deps.notificationOwner();
|
|
413
|
+
if (notificationOwner)
|
|
414
|
+
s.extra.notification_owner = notificationOwner;
|
|
387
415
|
s.workspace = opts.workspace;
|
|
388
416
|
s.model = opts.model;
|
|
389
417
|
s.model_provider = opts.modelProvider;
|
|
@@ -418,7 +446,7 @@ export class TurnRunner {
|
|
|
418
446
|
const admission = { stream_id: streamId, session_id: s.session_id, started_at: this.deps.now(), phase: 'starting', workspace: opts.workspace, model: opts.model, provider: opts.modelProvider, ephemeral: Boolean(opts.ephemeral), origin: turnOrigin(source), admitting: true };
|
|
419
447
|
this.registry.registerActiveRun(admission);
|
|
420
448
|
try {
|
|
421
|
-
|
|
449
|
+
await timing.measure('admission_persistence', () => this.deps.store.save(s));
|
|
422
450
|
}
|
|
423
451
|
catch (error) {
|
|
424
452
|
this.registry.activeRuns.delete(streamId);
|
|
@@ -431,16 +459,22 @@ export class TurnRunner {
|
|
|
431
459
|
// A new chat appears in the list; every turn tells open clients a run started (TAL-434).
|
|
432
460
|
this.deps.events.publish(wasHiddenEmpty ? 'session_new' : 'turn_started', { profile: s.profile, sessionId: s.session_id });
|
|
433
461
|
try {
|
|
434
|
-
|
|
462
|
+
this.deps.onTurnStart?.(s.session_id);
|
|
463
|
+
}
|
|
464
|
+
catch { /* best effort */ }
|
|
465
|
+
try {
|
|
466
|
+
await timing.measure('workspace_persistence', () => this.deps.workspaces.setLastWorkspace(opts.workspace, s.profile));
|
|
435
467
|
}
|
|
436
468
|
catch { /* best effort */ }
|
|
437
469
|
const channel = this.registry.create(streamId, s.session_id);
|
|
438
470
|
admission.admitting = false;
|
|
439
471
|
if (opts.goalRelated)
|
|
440
472
|
this.registry.goalRelated.add(streamId);
|
|
473
|
+
timing.end('admission');
|
|
441
474
|
const worker = this.run(s.session_id, streamId, channel, opts, compactionDue).catch((error) => {
|
|
475
|
+
timing.finish(timingOutcome(error));
|
|
442
476
|
this.deps.log(`[webui] ERROR turn ${streamId} crashed\n${error instanceof Error ? (error.stack ?? error.message) : String(error)}`);
|
|
443
|
-
}).finally(() => { this.workers.delete(streamId); });
|
|
477
|
+
}).finally(() => { timing.finish(this.registry.cancelled.has(streamId) ? 'cancelled' : undefined); this.workers.delete(streamId); });
|
|
444
478
|
this.workers.set(streamId, worker);
|
|
445
479
|
const response = { stream_id: streamId, session_id: s.session_id, pending_started_at: s.pending_started_at, turn_id: streamId, title: s.title };
|
|
446
480
|
if (opts.normalizedModel && opts.model)
|
|
@@ -463,6 +497,8 @@ export class TurnRunner {
|
|
|
463
497
|
// ── worker ───────────────────────────────────────────────────────────────
|
|
464
498
|
async run(sessionId, streamId, channel, opts, compactionDue) {
|
|
465
499
|
const { deps } = this;
|
|
500
|
+
const timing = opts.timing;
|
|
501
|
+
const closePreparation = timing?.begin('worker_preparation');
|
|
466
502
|
let writer = null;
|
|
467
503
|
try {
|
|
468
504
|
writer = (await deps.journal.writer(sessionId, streamId));
|
|
@@ -485,8 +521,11 @@ export class TurnRunner {
|
|
|
485
521
|
if (this.registry.cancelled.has(streamId) && !['cancel', 'apperror', 'steer_consumed', 'steer_withdrawn', 'run_status'].includes(event))
|
|
486
522
|
return;
|
|
487
523
|
const terminal = ['done', 'cancel', 'apperror', 'error', 'stream_end'].includes(event);
|
|
488
|
-
if (terminal)
|
|
524
|
+
if (terminal) {
|
|
489
525
|
statusEnded = true;
|
|
526
|
+
for (const call of this.registry.liveToolCalls.get(streamId) ?? [])
|
|
527
|
+
delete call.progress;
|
|
528
|
+
}
|
|
490
529
|
if (CONTENT_EVENTS.has(event) || terminal)
|
|
491
530
|
providerPhase = null;
|
|
492
531
|
if (event === 'rate_limit_wait')
|
|
@@ -527,6 +566,7 @@ export class TurnRunner {
|
|
|
527
566
|
return;
|
|
528
567
|
// `cancel()` already wrote the terminal row and closed the stream: the worker's unwind adds no second one.
|
|
529
568
|
if (event === 'cancel' && !this.registry.streams.has(streamId)) {
|
|
569
|
+
timing?.frame(event, data);
|
|
530
570
|
try {
|
|
531
571
|
deps.onTerminal?.(streamId, 'cancelled');
|
|
532
572
|
}
|
|
@@ -534,7 +574,7 @@ export class TurnRunner {
|
|
|
534
574
|
return;
|
|
535
575
|
}
|
|
536
576
|
let eventId = null;
|
|
537
|
-
if (writer) {
|
|
577
|
+
if (writer && event !== 'tool_progress') {
|
|
538
578
|
try {
|
|
539
579
|
eventId = (await writer.appendSseEvent(event, data, meta)).event_id;
|
|
540
580
|
}
|
|
@@ -544,6 +584,7 @@ export class TurnRunner {
|
|
|
544
584
|
}
|
|
545
585
|
}
|
|
546
586
|
channel.put([event, data, eventId, meta.redacted]);
|
|
587
|
+
timing?.frame(event, data);
|
|
547
588
|
if (event === 'done' || event === 'cancel' || event === 'apperror' || event === 'error') {
|
|
548
589
|
// Relay's phase follows the turn outcome, so a background Live Activity ends as the app would end it.
|
|
549
590
|
const state = str(data.terminal_state);
|
|
@@ -565,24 +606,27 @@ export class TurnRunner {
|
|
|
565
606
|
await this.teardown(sessionId, streamId);
|
|
566
607
|
return;
|
|
567
608
|
}
|
|
609
|
+
const notificationScope = { owner: str(s.extra.notification_owner) || 'local-owner', profile: s.profile ?? 'default' };
|
|
568
610
|
const msgText = opts.msg;
|
|
569
|
-
const history = () => {
|
|
611
|
+
const history = async () => {
|
|
570
612
|
// TAL-493: one state.db read builds the history and marks where this turn's own rows begin.
|
|
571
|
-
const
|
|
613
|
+
const reading = deps.service().beginStateDbTurn(s);
|
|
614
|
+
// TAL-1162: the read runs on the state.db worker. Until it lands, a Stop settles from the local history with no
|
|
615
|
+
// starting id, as a turn whose starting read failed does.
|
|
616
|
+
const local = this.turnHistory(s, streamId, []);
|
|
617
|
+
this.stopContexts.set(streamId, { previousContext: local.previousContext, historyLength: local.apiHistory.length, prompt: msgText, msgText, checkpointed: false, stateDbStartId: null, stateDbStartGeneration: null, startReadPending: true });
|
|
618
|
+
const startRead = await reading;
|
|
572
619
|
const previousMessages = structuredClone(s.messages);
|
|
573
|
-
|
|
574
|
-
//
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
// the Agent gets back the exact bytes it sent (TAL-541).
|
|
578
|
-
const apiHistory = sanitizeMessagesForApi(previousContext, { preserveApiContent: true, issuedReasoningSince: s.reasoning_replay_from });
|
|
579
|
-
this.stopContexts.set(streamId, { previousContext, historyLength: apiHistory.length, prompt: msgText, msgText, checkpointed: false, stateDbStartId: startRead.ok ? stateDbSeenId(startRead.rows) ?? 0 : null, stateDbStartGeneration: startRead.generation });
|
|
620
|
+
const { previousContext, apiHistory } = this.turnHistory(s, streamId, startRead.rows);
|
|
621
|
+
// A Stop that landed during the read already took the local entry.
|
|
622
|
+
if (!this.registry.cancelled.has(streamId))
|
|
623
|
+
this.stopContexts.set(streamId, { previousContext, historyLength: apiHistory.length, prompt: msgText, msgText, checkpointed: false, stateDbStartId: startRead.ok ? stateDbSeenId(startRead.rows) ?? 0 : null, stateDbStartGeneration: startRead.generation, startReadPending: false });
|
|
580
624
|
return { previousMessages, previousContext, apiHistory };
|
|
581
625
|
};
|
|
582
626
|
// Before the first await: a Stop can land at any point after admission.
|
|
583
|
-
let { previousMessages, previousContext, apiHistory } = history();
|
|
584
627
|
const controller = new AbortController();
|
|
585
628
|
this.abortControllers.set(streamId, controller);
|
|
629
|
+
let { previousMessages, previousContext, apiHistory } = await history();
|
|
586
630
|
// TAL-1005: an over-threshold session compacts in its joinable compression job before the turn reads its history, so
|
|
587
631
|
// a Stop ends only this wait and a resend joins the same job. The turn then reads the compacted session afresh.
|
|
588
632
|
const compacted = await deps.service().ensureCompacted(sessionId, { turn: streamId, signal: controller.signal, due: compactionDue, onWait: async () => { (await put('compressing', { session_id: sessionId, message: 'Compressing context' })); } });
|
|
@@ -592,7 +636,7 @@ export class TurnRunner {
|
|
|
592
636
|
}
|
|
593
637
|
catch { /* the cancel or error path below reports a deleted session */ }
|
|
594
638
|
;
|
|
595
|
-
({ previousMessages, previousContext, apiHistory } = history());
|
|
639
|
+
({ previousMessages, previousContext, apiHistory } = await history());
|
|
596
640
|
await put('compressed', this.compressedFrame(s));
|
|
597
641
|
}
|
|
598
642
|
const activeTurnToken = buildActiveTurnToken(streamId, s.pending_started_at);
|
|
@@ -684,10 +728,13 @@ export class TurnRunner {
|
|
|
684
728
|
};
|
|
685
729
|
// Python `_public_prefill_context_status`: the session-recall prefill hook was dropped with TAL-245, so the
|
|
686
730
|
// context frame always reports the not-configured shape.
|
|
687
|
-
const
|
|
731
|
+
const persistentHome = deps.profileHome(s.profile);
|
|
732
|
+
const persistentBefore = await persistentStateSnapshot(persistentHome);
|
|
688
733
|
await put('context_status', { session_id: sessionId, prefill: { status: 'not_configured', source: 'none', label: '', message_count: 0 } });
|
|
689
|
-
// Setup awaits can outlive a gateway adoption
|
|
690
|
-
deps.service().assertWritable(s);
|
|
734
|
+
// Setup awaits can outlive a gateway adoption, so the owner is rechecked right before dispatch.
|
|
735
|
+
await deps.service().assertWritable(s);
|
|
736
|
+
closePreparation?.();
|
|
737
|
+
timing?.emit('dispatch');
|
|
691
738
|
agentDispatched = true;
|
|
692
739
|
const result = await sidecar.call('chat.start', {
|
|
693
740
|
profile_home: deps.profileHome(s.profile), session_id: sessionId, stream_id: streamId, ...this.agentWorkspace(s, opts.workspace), model: opts.model ?? '', model_provider: opts.modelProvider,
|
|
@@ -696,14 +743,26 @@ export class TurnRunner {
|
|
|
696
743
|
...(opts.connectCard ? { connect_card: true } : {}),
|
|
697
744
|
...(opts.skillSecret ? { skill_secret: true } : {}),
|
|
698
745
|
}, {
|
|
746
|
+
timing,
|
|
699
747
|
signal: controller.signal,
|
|
700
748
|
timeoutMs: 0,
|
|
701
749
|
onStream: (frame) => {
|
|
750
|
+
timing?.observe('first_sidecar_output');
|
|
702
751
|
const receivedAt = deps.now();
|
|
703
752
|
streamWrites = streamWrites.then(async () => {
|
|
704
753
|
const publish = put;
|
|
705
754
|
const emitFrame = (event, data, meta = {}) => publish(event, data, { ...meta, createdAt: receivedAt });
|
|
706
755
|
const data = isDict(frame.data) ? frame.data : {};
|
|
756
|
+
if ((frame.event === 'notice' || frame.event === 'notice_clear') && str(data.key).startsWith('startup-warning.')) {
|
|
757
|
+
try {
|
|
758
|
+
await deps.notifications.agentWarning(notificationScope, str(data.key), frame.event === 'notice' ? { text: str(data.text), level: data.level } : null);
|
|
759
|
+
}
|
|
760
|
+
catch (error) {
|
|
761
|
+
// Notification storage must not turn a successful Agent result into a failed chat.
|
|
762
|
+
deps.log(`[webui] startup warning persistence failed for ${sessionId}: ${String(error)}`);
|
|
763
|
+
}
|
|
764
|
+
return;
|
|
765
|
+
}
|
|
707
766
|
switch (frame.event) {
|
|
708
767
|
case 'token': {
|
|
709
768
|
tokenSent = true;
|
|
@@ -761,11 +820,23 @@ export class TurnRunner {
|
|
|
761
820
|
await emitFrame('tool', publicToolFrame(withToolId(data, toolIds.get(call)), redacted), { redacted });
|
|
762
821
|
return;
|
|
763
822
|
}
|
|
823
|
+
case 'tool_progress': {
|
|
824
|
+
if (statusEnded || this.registry.cancelled.has(streamId))
|
|
825
|
+
return;
|
|
826
|
+
const tc = liveToolCalls.findLast((call) => !call.done && call.tid === data.tool_call_id && Boolean(data.tool_call_id));
|
|
827
|
+
if (!tc)
|
|
828
|
+
return;
|
|
829
|
+
const redacted = deps.redactEnabled();
|
|
830
|
+
tc.progress = toolProgress({ ...data, message: typeof data.message === 'string' ? redactString(data.message, redacted) : null });
|
|
831
|
+
await emitFrame('tool_progress', { id: toolIds.get(tc), progress: tc.progress }, { redacted });
|
|
832
|
+
return;
|
|
833
|
+
}
|
|
764
834
|
case 'tool_complete': {
|
|
765
835
|
// TAL-313: the server decides failure from the sidecar's raw result, which never leaves the server; TAL-315: so
|
|
766
836
|
// are its display sections, which keep the stderr and exit code the flat preview drops.
|
|
767
837
|
const { raw_result: rawResult, todo_result: todoResult, result_diff: resultDiff, display_metadata: displayMetadata, ...complete } = data;
|
|
768
|
-
const outcome = toolOutcome(rawResult);
|
|
838
|
+
const outcome = toolOutcome(rawResult, data.name);
|
|
839
|
+
complete.progress = null;
|
|
769
840
|
complete.is_error = outcome.is_error;
|
|
770
841
|
if (rawResult !== undefined)
|
|
771
842
|
complete.result_view = outcome.result_view;
|
|
@@ -780,8 +851,10 @@ export class TurnRunner {
|
|
|
780
851
|
if (startedAt !== undefined)
|
|
781
852
|
complete.duration = Math.round(Math.max(0, receivedAt - startedAt) * 1000) / 1000;
|
|
782
853
|
// TAL-315: the decided view too, so a failed or cancelled turn's snapshot keeps the sections shown live.
|
|
783
|
-
Object.assign(tc, { done: true, snippet: data.preview, is_error: complete.is_error, duration: complete.duration ?? null, ...(complete.result_view ? { result_view: complete.result_view } : {}), ...(editDiff ? { edit_diff: editDiff } : {}) });
|
|
854
|
+
Object.assign(tc, { done: true, progress: null, snippet: data.preview, is_error: complete.is_error, duration: complete.duration ?? null, ...(complete.result_view ? { result_view: complete.result_view } : {}), ...(editDiff ? { edit_diff: editDiff } : {}) });
|
|
784
855
|
}
|
|
856
|
+
if (startsBackgroundWork(data.name, rawResult))
|
|
857
|
+
deps.onBackgroundWork?.(sessionId, s.profile ?? null);
|
|
785
858
|
const id = (tc && toolIds.get(tc)) || str(data.tid) || mintToolId();
|
|
786
859
|
this.lastCompletedTool.set(streamId, id);
|
|
787
860
|
const redacted = deps.redactEnabled();
|
|
@@ -899,6 +972,19 @@ export class TurnRunner {
|
|
|
899
972
|
result.messages = withImages(result.messages);
|
|
900
973
|
if (result.context_messages)
|
|
901
974
|
result.context_messages = withImages(result.context_messages);
|
|
975
|
+
// Snapshot IO must finish before the cancellation/ownership gates and final transcript writeback.
|
|
976
|
+
let persistentChanges = null;
|
|
977
|
+
if (!opts.ephemeral && result.status === 'completed' && !this.registry.cancelled.has(streamId)) {
|
|
978
|
+
try {
|
|
979
|
+
persistentChanges = persistentStateChanges(persistentBefore, await persistentStateSnapshot(persistentHome));
|
|
980
|
+
}
|
|
981
|
+
catch (error) {
|
|
982
|
+
deps.log(`[webui] persistent state change detection failed for ${sessionId}: ${error.message}`);
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
// TAL-1162: the settlement's one state.db read runs on the worker before the gates below decide, so a Stop that
|
|
986
|
+
// lands during it takes the cancel path instead of racing this writeback.
|
|
987
|
+
const settlement = await deps.service().settlementRead(s);
|
|
902
988
|
if (this.registry.cancelled.has(streamId) || result.status === 'cancelled') {
|
|
903
989
|
// The Stop's pre-interrupt snapshot is the boundary, even when its reply lands after this result (the sidecar
|
|
904
990
|
// answers each request on its own thread); without one, the Agent's interrupted result is its canonical transcript.
|
|
@@ -948,7 +1034,7 @@ export class TurnRunner {
|
|
|
948
1034
|
await this.steerRewrites.get(streamId);
|
|
949
1035
|
const { events: steerEvents, leftovers } = this.finalizeSteers(streamId, str(result.pending_steer), 'followup');
|
|
950
1036
|
followUp = leftovers;
|
|
951
|
-
await this.persistError(s, streamId, classification.label, payload, activeTurnToken, resultMessages, result.provider);
|
|
1037
|
+
await this.persistError(s, settlement, streamId, classification.label, payload, activeTurnToken, resultMessages, result.provider);
|
|
952
1038
|
// TAL-512: a btw error carries no session: its journaled frame must not keep a copy of the parent conversation.
|
|
953
1039
|
if (!opts.ephemeral)
|
|
954
1040
|
payload.session = (await this.publicTerminalSession(s));
|
|
@@ -1087,7 +1173,7 @@ export class TurnRunner {
|
|
|
1087
1173
|
this.persistConsumedSteers(s, streamId, previousStartedAt(s, activeRun), now);
|
|
1088
1174
|
// TAL-493: the rows this turn's Agent wrote to state.db are now in the transcript, so the merge must not replay them
|
|
1089
1175
|
// (all of them, the dropped summary request too).
|
|
1090
|
-
this.settleStateDb(s, streamId, agentRows, { previousContext });
|
|
1176
|
+
this.settleStateDb(s, streamId, agentRows, { previousContext, read: settlement });
|
|
1091
1177
|
recordBackgroundReview(s, streamId);
|
|
1092
1178
|
await deps.store.save(s);
|
|
1093
1179
|
deps.pending.clearApprovals(sessionId);
|
|
@@ -1095,10 +1181,9 @@ export class TurnRunner {
|
|
|
1095
1181
|
deps.events.publish('session_done', { profile: s.profile, sessionId: s.session_id });
|
|
1096
1182
|
// Python `_persistent_state_changes`: toast memory/skill files the agent wrote during the turn.
|
|
1097
1183
|
try {
|
|
1098
|
-
|
|
1099
|
-
if (changes.memory_saved)
|
|
1184
|
+
if (persistentChanges?.memory_saved)
|
|
1100
1185
|
(await put('state_saved', { session_id: sessionId, kind: 'memory', action: 'saved' }));
|
|
1101
|
-
for (const change of
|
|
1186
|
+
for (const change of persistentChanges?.skills ?? [])
|
|
1102
1187
|
(await put('state_saved', { session_id: sessionId, kind: 'skill', action: change.action, name: change.name }));
|
|
1103
1188
|
}
|
|
1104
1189
|
catch (error) {
|
|
@@ -1159,9 +1244,11 @@ export class TurnRunner {
|
|
|
1159
1244
|
await opts.onDone?.(lastAnswer(s.messages));
|
|
1160
1245
|
}
|
|
1161
1246
|
catch (error) {
|
|
1247
|
+
timing?.fail(error);
|
|
1162
1248
|
await streamWrites;
|
|
1163
1249
|
const readOnly = !agentDispatched ? (await deps.service().readOnlyReason(s)) : null;
|
|
1164
1250
|
if (readOnly) {
|
|
1251
|
+
timing?.fail({ status: 403 });
|
|
1165
1252
|
ownershipRefused = true;
|
|
1166
1253
|
if (this.registry.writebackOwners.get(sessionId) === streamId && s.active_stream_id === streamId) {
|
|
1167
1254
|
// Cancellation persists the prompt and a Stop row; an unstarted, refused turn must add neither.
|
|
@@ -1177,6 +1264,8 @@ export class TurnRunner {
|
|
|
1177
1264
|
if (settledAt.value && !(error instanceof SidecarError)) {
|
|
1178
1265
|
deps.log(`[webui] ERROR settling turn ${streamId}\n${error instanceof Error ? (error.stack ?? error.message) : String(error)}`);
|
|
1179
1266
|
}
|
|
1267
|
+
// TAL-1162: the error's settlement read runs on the worker before the gates below decide.
|
|
1268
|
+
const settlement = await deps.service().settlementRead(s);
|
|
1180
1269
|
if (this.registry.cancelled.has(streamId)) {
|
|
1181
1270
|
await this.finalizeCancelled(s, streamId, opts.ephemeral);
|
|
1182
1271
|
await put('cancel', (await this.cancelFrame(sessionId)));
|
|
@@ -1201,7 +1290,7 @@ export class TurnRunner {
|
|
|
1201
1290
|
if (current.active_stream_id === streamId) {
|
|
1202
1291
|
for (const [event, data] of this.takeSteerEventsBefore(streamId, 'apperror'))
|
|
1203
1292
|
(await put(event, data));
|
|
1204
|
-
await this.persistError(current, streamId, classification.label, payload, activeTurnToken);
|
|
1293
|
+
await this.persistError(current, settlement, streamId, classification.label, payload, activeTurnToken);
|
|
1205
1294
|
if (!opts.ephemeral)
|
|
1206
1295
|
payload.session = (await this.publicTerminalSession(current));
|
|
1207
1296
|
}
|
|
@@ -1306,29 +1395,7 @@ export class TurnRunner {
|
|
|
1306
1395
|
}
|
|
1307
1396
|
/** The settled session as a terminal frame carries it: the display window, redacted. */
|
|
1308
1397
|
async publicTerminalSession(s) {
|
|
1309
|
-
return
|
|
1310
|
-
}
|
|
1311
|
-
/**
|
|
1312
|
-
* Python `_session_payload_with_terminal_window`: the same visible-message window contract as `GET /api/session?
|
|
1313
|
-
* msg_limit=` (renderable rows, limited payload shape, windowed tool calls, todo state) with the full count.
|
|
1314
|
-
*/
|
|
1315
|
-
async terminalSessionPayload(s) {
|
|
1316
|
-
const payload = (await this.deps.service().wireRow(s));
|
|
1317
|
-
payload.automatic_turns_held = (await this.automaticTurnsHeld(s.session_id));
|
|
1318
|
-
payload.notices = this.sessionNotices(s.session_id);
|
|
1319
|
-
payload.goal = this.sessionGoal(s.session_id);
|
|
1320
|
-
const service = this.deps.service();
|
|
1321
|
-
const scened = (await service.backgroundLinked(s, hydrateAnchorActivityScenes(withToolCallOutcomes((await service.backgroundUpdates(s, withMarkerKinds(withTurnIds(withAttachmentObjects(s.messages)), s))), s.tool_calls, s.active_stream_id), s.anchor_activity_scenes, { activeTurnId: s.active_stream_id, clipToolResults: true })));
|
|
1322
|
-
const [window, offset] = messageWindowForDisplay(scened, TERMINAL_SSE_VISIBLE_MESSAGE_LIMIT, null);
|
|
1323
|
-
const limited = messagesForLimitedPayload(withBodyExcerpts(withDisplayMedia(window, (await service.mediaProjector(s))), s.active_stream_id, newestSettledReply(scened, s.active_stream_id), offset));
|
|
1324
|
-
payload.messages = limited;
|
|
1325
|
-
payload.message_count = s.messages.length;
|
|
1326
|
-
payload._messages_offset = offset;
|
|
1327
|
-
payload._messages_truncated = offset > 0;
|
|
1328
|
-
attachTodoState(payload, s.messages, s.extra[UNSETTLED_TODO_KEY]);
|
|
1329
|
-
payload.tool_calls = toolCallsForMessageWindow(s.tool_calls, offset, limited.length);
|
|
1330
|
-
payload.compression_reference = compressionReference(s, scened);
|
|
1331
|
-
return payload;
|
|
1398
|
+
return this.deps.service().windowedDetail(s, TRANSCRIPT_WINDOW);
|
|
1332
1399
|
}
|
|
1333
1400
|
/** TAL-540, Python `_live_usage_snapshot`: a finished compression's frame, with the counters and the ring's post-compression figures, so clients update before `done`. */
|
|
1334
1401
|
compressedFrame(s) {
|
|
@@ -1349,7 +1416,8 @@ export class TurnRunner {
|
|
|
1349
1416
|
}
|
|
1350
1417
|
/** Python `_materialize_pending_user_turn_before_error` + error message append + save. */
|
|
1351
1418
|
/** `runtimeProvider`: the provider the Agent resolved for the turn, when it reported one. */
|
|
1352
|
-
|
|
1419
|
+
/** `read`: the settlement's one state.db read, taken before the caller's gates decided (TAL-1162). */
|
|
1420
|
+
async persistError(s, read, streamId, label, payload, activeTurnToken, agentRows = [], runtimeProvider = '') {
|
|
1353
1421
|
const startedAt = s.pending_started_at;
|
|
1354
1422
|
// TAL-576: an automatic wakeup with no usable credentials pauses the next ones instead of failing each.
|
|
1355
1423
|
if (s.pending_user_source === 'process_wakeup' && payload.type === 'credential_pool_empty') {
|
|
@@ -1392,7 +1460,6 @@ export class TurnRunner {
|
|
|
1392
1460
|
this.persistConsumedSteers(s, streamId, startedAt, this.deps.now());
|
|
1393
1461
|
// TAL-921: the next prompt remembers the turn's work; an exhausted compression's work would only overflow again. One
|
|
1394
1462
|
// read builds the context and settles, so a row committed in between is never covered without reaching either.
|
|
1395
|
-
const read = this.deps.service().stateDbRead(s);
|
|
1396
1463
|
const context = payload.type === 'compression_exhausted' ? null : this.unsettledContext(streamId, agentRows, read);
|
|
1397
1464
|
if (context)
|
|
1398
1465
|
s.context_messages = context;
|
|
@@ -1409,11 +1476,19 @@ export class TurnRunner {
|
|
|
1409
1476
|
this.deps.pending.clearClarifies(s.session_id);
|
|
1410
1477
|
this.deps.events.publish('session_error', { profile: s.profile, sessionId: s.session_id });
|
|
1411
1478
|
}
|
|
1479
|
+
/** The model history a turn starts from: the session's context merged with `stateRows`, without the turn's own rows. */
|
|
1480
|
+
turnHistory(s, streamId, stateRows) {
|
|
1481
|
+
// TAL-578: an eager save already put this turn's prompt in the transcript; `user_message` carries it, so the history
|
|
1482
|
+
// leaves it out.
|
|
1483
|
+
const previousContext = structuredClone(this.deps.service().modelContext(s, stateRows)).filter((m) => m._turn_id !== streamId);
|
|
1484
|
+
// Python `_sanitize_messages_for_agent`: the model never sees display-only rows or a replayed cancelled prompt, and
|
|
1485
|
+
// the Agent gets back the exact bytes it sent (TAL-541).
|
|
1486
|
+
return { previousContext, apiHistory: sanitizeMessagesForApi(previousContext, { preserveApiContent: true, issuedReasoningSince: s.reasoning_replay_from }) };
|
|
1487
|
+
}
|
|
1412
1488
|
/** Every terminal path carries the same starting read's id and generation into settlement. */
|
|
1413
|
-
settleStateDb(s, streamId, agentRows, opts
|
|
1489
|
+
settleStateDb(s, streamId, agentRows, opts) {
|
|
1414
1490
|
const stop = this.stopContexts.get(streamId);
|
|
1415
|
-
|
|
1416
|
-
service.settleStateDb(s, { turnId: streamId, previousContext: stop?.previousContext ?? opts.previousContext ?? [], agentRows, startId: stop?.stateDbStartId ?? null, startGeneration: stop?.stateDbStartGeneration ?? null, read: opts.read ?? service.stateDbRead(s) });
|
|
1491
|
+
this.deps.service().settleStateDb(s, { turnId: streamId, previousContext: stop?.previousContext ?? opts.previousContext ?? [], agentRows, startId: stop?.stateDbStartId ?? null, startGeneration: stop?.stateDbStartGeneration ?? null, read: opts.read });
|
|
1417
1492
|
}
|
|
1418
1493
|
/**
|
|
1419
1494
|
* TAL-921: the model context a turn that ends without its settled result leaves: the work its Agent reported, else the
|
|
@@ -1498,8 +1573,20 @@ export class TurnRunner {
|
|
|
1498
1573
|
catch {
|
|
1499
1574
|
return false;
|
|
1500
1575
|
}
|
|
1576
|
+
// TAL-921: one state.db read builds the context and settles the turn. TAL-1162: it runs on the state.db worker, before
|
|
1577
|
+
// any gate below decides.
|
|
1578
|
+
const read = await this.deps.service().settlementRead(current);
|
|
1579
|
+
if (this.registry.writebackOwners.get(s.session_id) !== streamId)
|
|
1580
|
+
return false;
|
|
1501
1581
|
if (current.active_stream_id !== null && current.active_stream_id !== streamId)
|
|
1502
1582
|
return false;
|
|
1583
|
+
const stop = this.stopContexts.get(streamId);
|
|
1584
|
+
if (stop?.startReadPending) {
|
|
1585
|
+
// TAL-1162: the Stop landed before the turn's starting read did, so the Agent never ran: every row this later read
|
|
1586
|
+
// holds predates the turn, and the context the turn would have started from keeps them. No row is its own work.
|
|
1587
|
+
const { previousContext, apiHistory } = this.turnHistory(current, streamId, read.rows);
|
|
1588
|
+
Object.assign(stop, { previousContext, historyLength: apiHistory.length, startReadPending: false });
|
|
1589
|
+
}
|
|
1503
1590
|
if (ephemeral) {
|
|
1504
1591
|
try {
|
|
1505
1592
|
await this.deps.store.delete(current.session_id, { tombstone: false });
|
|
@@ -1514,7 +1601,7 @@ export class TurnRunner {
|
|
|
1514
1601
|
if (quiet && current.active_stream_id === null) {
|
|
1515
1602
|
// TAL-493: rows its worker committed while unwinding are covered by what it reports; others are kept.
|
|
1516
1603
|
if (checkpoint) {
|
|
1517
|
-
this.settleStateDb(current, streamId, checkpoint);
|
|
1604
|
+
this.settleStateDb(current, streamId, checkpoint, { read });
|
|
1518
1605
|
try {
|
|
1519
1606
|
(await this.deps.store.save(current));
|
|
1520
1607
|
}
|
|
@@ -1524,10 +1611,8 @@ export class TurnRunner {
|
|
|
1524
1611
|
}
|
|
1525
1612
|
return true;
|
|
1526
1613
|
}
|
|
1527
|
-
const stop = this.stopContexts.get(streamId);
|
|
1528
1614
|
const canonical = stop !== undefined && checkpoint !== null && checkpointTurnStart(checkpoint, stop.msgText, stop.historyLength) !== null;
|
|
1529
|
-
|
|
1530
|
-
const settle = (read) => {
|
|
1615
|
+
const settle = () => {
|
|
1531
1616
|
if (!stop)
|
|
1532
1617
|
return null;
|
|
1533
1618
|
if (canonical)
|
|
@@ -1541,8 +1626,7 @@ export class TurnRunner {
|
|
|
1541
1626
|
const ownStop = current.messages.some((m) => isCancelMarker(m) && m._turn_id === streamId);
|
|
1542
1627
|
// TAL-493: the worker's rows committed after the first settlement are covered by what it reports; others are kept.
|
|
1543
1628
|
if (ownStop && checkpoint) {
|
|
1544
|
-
const
|
|
1545
|
-
const late = canonical && !stop.checkpointed ? settle(read) : null;
|
|
1629
|
+
const late = canonical && !stop.checkpointed ? settle() : null;
|
|
1546
1630
|
if (late)
|
|
1547
1631
|
current.context_messages = dedupeContext(late);
|
|
1548
1632
|
this.settleStateDb(current, streamId, checkpoint, { read });
|
|
@@ -1557,8 +1641,7 @@ export class TurnRunner {
|
|
|
1557
1641
|
}
|
|
1558
1642
|
const startedAt = current.pending_started_at;
|
|
1559
1643
|
this.materializePendingUserTurn(current, buildActiveTurnToken(streamId, current.pending_started_at), streamId);
|
|
1560
|
-
const
|
|
1561
|
-
const context = settle(read);
|
|
1644
|
+
const context = settle();
|
|
1562
1645
|
if (context)
|
|
1563
1646
|
current.context_messages = dedupeContext(context);
|
|
1564
1647
|
this.clearPendingTurn(current);
|
|
@@ -1641,6 +1724,7 @@ export class TurnRunner {
|
|
|
1641
1724
|
await service.deps.warmSessionModelRepair?.(s.profile);
|
|
1642
1725
|
const [model, provider] = service.turnModel(s);
|
|
1643
1726
|
const [qa, prompts] = titlePrompts(userText, assistantText);
|
|
1727
|
+
const source = [...s.messages, ...s.context_messages, ...await service.stateDbRows(s)];
|
|
1644
1728
|
let status = 'llm_error_aux';
|
|
1645
1729
|
for (const [idx, prompt] of prompts.entries()) {
|
|
1646
1730
|
if ((await this.deps.service().isReadOnly(s)))
|
|
@@ -1649,7 +1733,7 @@ export class TurnRunner {
|
|
|
1649
1733
|
try {
|
|
1650
1734
|
const result = await sidecar.call('aux.complete', {
|
|
1651
1735
|
profile_home: this.deps.profileHome(s.profile), task: 'title_generation',
|
|
1652
|
-
messages: [{ role: 'system', content: prompt }, { role: 'user', content: qa }], max_tokens: 64,
|
|
1736
|
+
messages: withDataUseRequirements([{ role: 'system', content: prompt }, { role: 'user', content: qa }], source), max_tokens: 64,
|
|
1653
1737
|
main_runtime: { model: model ?? '', provider }, main_fallback: true,
|
|
1654
1738
|
});
|
|
1655
1739
|
raw = str(result.text);
|
|
@@ -1680,9 +1764,10 @@ export class TurnRunner {
|
|
|
1680
1764
|
async refine(s, focus) {
|
|
1681
1765
|
if (!s)
|
|
1682
1766
|
return 'Nothing to refine yet — send a message first.';
|
|
1767
|
+
const context = await this.deps.service().readModelContext(s);
|
|
1683
1768
|
if (s.active_stream_id)
|
|
1684
1769
|
return 'Agent is running — wait for the turn to finish, then /refine.';
|
|
1685
|
-
const messages = sanitizeMessagesForApi(
|
|
1770
|
+
const messages = sanitizeMessagesForApi(context, { preserveApiContent: true, issuedReasoningSince: s.reasoning_replay_from });
|
|
1686
1771
|
if (!messages.length)
|
|
1687
1772
|
return 'Nothing to refine yet — the conversation is empty.';
|
|
1688
1773
|
// Like a turn: no agent is built in a profile whose home is going away.
|
|
@@ -1693,7 +1778,7 @@ export class TurnRunner {
|
|
|
1693
1778
|
throw new SidecarError('The Agent sidecar is not running; /refine is unavailable until it starts.', { condition: 'sidecar_unavailable' });
|
|
1694
1779
|
const [model, provider] = this.deps.service().turnModel(s);
|
|
1695
1780
|
const cfg = (await this.deps.profileConfig?.(s.profile ?? null)) ?? {};
|
|
1696
|
-
this.deps.service().assertWritable(s);
|
|
1781
|
+
await this.deps.service().assertWritable(s);
|
|
1697
1782
|
return (await sidecar.call('chat.refine', {
|
|
1698
1783
|
profile_home: this.deps.profileHome(s.profile), session_id: s.session_id, messages, focus, model: model ?? '', model_provider: provider,
|
|
1699
1784
|
enabled_toolsets: this.deps.toolsetsFor(s), ...agentBuildParams(cfg, 'webui', provider, this.deps.env ?? {}),
|
|
@@ -1721,7 +1806,7 @@ export class TurnRunner {
|
|
|
1721
1806
|
let rawPreview = '';
|
|
1722
1807
|
if (assistantText)
|
|
1723
1808
|
({ title: next, status: llmStatus, rawPreview } = await this.llmTitle(s, userText, assistantText));
|
|
1724
|
-
this.deps.service().assertWritable(s);
|
|
1809
|
+
await this.deps.service().assertWritable(s);
|
|
1725
1810
|
if (next)
|
|
1726
1811
|
return { title: next, status: llmStatus, rawPreview };
|
|
1727
1812
|
const fallback = fallbackTitleFromExchange(userText, assistantText);
|
|
@@ -2243,7 +2328,7 @@ export class TurnRunner {
|
|
|
2243
2328
|
let decision;
|
|
2244
2329
|
try {
|
|
2245
2330
|
// The workspace the turn ran in, unrecovered: the Agent pauses the goal rather than run its gates anywhere else.
|
|
2246
|
-
this.deps.service().assertWritable(s);
|
|
2331
|
+
await this.deps.service().assertWritable(s);
|
|
2247
2332
|
decision = await sidecar.call('goals.evaluate', { session_id: sessionId, profile_home: this.deps.profileHome(s.profile), last_response: lastResponse, user_initiated: true, workspace: str(s.workspace) || undefined });
|
|
2248
2333
|
}
|
|
2249
2334
|
catch (error) {
|
|
@@ -2300,6 +2385,11 @@ export class TurnRunner {
|
|
|
2300
2385
|
const open = r.state === 'pending';
|
|
2301
2386
|
return { steer_id: r.steer_id, text: r.display_text, submitted_at: r.created_at, state: r.state, actions: { edit: open, cancel: open, send_now: open && r.can_redirect } };
|
|
2302
2387
|
}
|
|
2388
|
+
liveToolProgress(streamId) {
|
|
2389
|
+
if (this.registry.cancelled.has(streamId))
|
|
2390
|
+
return [];
|
|
2391
|
+
return (this.registry.liveToolCalls.get(streamId) ?? []).filter((call) => !call.done && call.progress).map((call) => ({ ...call, id: str(call.tid) }));
|
|
2392
|
+
}
|
|
2303
2393
|
runStatus(streamId) {
|
|
2304
2394
|
return this.runStatuses.get(streamId) ?? null;
|
|
2305
2395
|
}
|
|
@@ -2422,7 +2512,7 @@ export class TurnRunner {
|
|
|
2422
2512
|
}
|
|
2423
2513
|
// ── approvals / clarify ──────────────────────────────────────────────────
|
|
2424
2514
|
async respondApproval(sessionId, choice, approvalId, enableYolo) {
|
|
2425
|
-
if (this.deps.service().owner?.isOwned(sessionId)) {
|
|
2515
|
+
if (await this.deps.service().owner?.isOwned(sessionId)) {
|
|
2426
2516
|
if (enableYolo)
|
|
2427
2517
|
throw new HttpFailure(403, 'Change approval policy through the owning Agent');
|
|
2428
2518
|
await this.deps.service().owner.respond(sessionId, 'approval', approvalId, choice);
|
|
@@ -2551,7 +2641,7 @@ export class TurnRunner {
|
|
|
2551
2641
|
* did not acknowledge (prompt retained).
|
|
2552
2642
|
*/
|
|
2553
2643
|
async respondClarify(sessionId, clarifyId, reply) {
|
|
2554
|
-
if (this.deps.service().owner?.isOwned(sessionId)) {
|
|
2644
|
+
if (await this.deps.service().owner?.isOwned(sessionId)) {
|
|
2555
2645
|
await this.deps.service().owner.respond(sessionId, 'clarify', clarifyId, reply);
|
|
2556
2646
|
return { ok: true };
|
|
2557
2647
|
}
|