@maudecode/talaria-web 1.18.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/auth-raw.js +16 -16
- package/dist/api/auth-raw.js.map +1 -1
- package/dist/api/automation-raw.d.ts +2 -2
- package/dist/api/automation-raw.js +93 -38
- package/dist/api/automation-raw.js.map +1 -1
- package/dist/api/automation-router.d.ts +99 -17
- package/dist/api/automation-router.js +22 -14
- package/dist/api/automation-router.js.map +1 -1
- package/dist/api/chat-router.d.ts +1433 -37
- package/dist/api/chat-router.js +205 -90
- package/dist/api/chat-router.js.map +1 -1
- package/dist/api/git-router.d.ts +6 -2
- package/dist/api/git-router.js +30 -30
- package/dist/api/git-router.js.map +1 -1
- package/dist/api/raw-routes.d.ts +3 -3
- package/dist/api/raw-routes.js +76 -62
- package/dist/api/raw-routes.js.map +1 -1
- package/dist/api/router.d.ts +5 -5
- package/dist/api/router.js +22 -22
- package/dist/api/router.js.map +1 -1
- package/dist/api/session-visibility.d.ts +4 -4
- package/dist/api/session-visibility.js +26 -16
- package/dist/api/session-visibility.js.map +1 -1
- package/dist/api/sessions-router.d.ts +2635 -151
- package/dist/api/sessions-router.js +193 -177
- package/dist/api/sessions-router.js.map +1 -1
- package/dist/api/settings-router.d.ts +450 -11
- package/dist/api/settings-router.js +102 -49
- package/dist/api/settings-router.js.map +1 -1
- package/dist/api/sse-routes.d.ts +2 -2
- package/dist/api/sse-routes.js +102 -80
- package/dist/api/sse-routes.js.map +1 -1
- package/dist/api/tools-raw.d.ts +5 -0
- package/dist/api/tools-raw.js +58 -33
- package/dist/api/tools-raw.js.map +1 -1
- package/dist/api/tools-router.d.ts +963 -109
- package/dist/api/tools-router.js +426 -72
- package/dist/api/tools-router.js.map +1 -1
- package/dist/api/transcribe-stream.d.ts +16 -0
- package/dist/api/transcribe-stream.js +172 -0
- package/dist/api/transcribe-stream.js.map +1 -0
- package/dist/app.d.ts +4 -1
- package/dist/app.js +80 -57
- 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 +14 -9
- package/dist/auth/gate.js.map +1 -1
- package/dist/auth/passkeys.d.ts +15 -14
- package/dist/auth/passkeys.js +89 -91
- package/dist/auth/passkeys.js.map +1 -1
- package/dist/auth/store.d.ts +17 -7
- package/dist/auth/store.js +93 -52
- package/dist/auth/store.js.map +1 -1
- package/dist/bin/talaria-web.js +12 -81
- package/dist/bin/talaria-web.js.map +1 -1
- package/dist/cli/ctl.js +8 -2
- package/dist/cli/ctl.js.map +1 -1
- package/dist/cli/dotenv.d.ts +5 -0
- package/dist/cli/dotenv.js +14 -2
- package/dist/cli/dotenv.js.map +1 -1
- package/dist/cli/launcher.js +5 -5
- package/dist/cli/launcher.js.map +1 -1
- package/dist/cli/main.d.ts +1 -0
- package/dist/cli/main.js +90 -0
- package/dist/cli/main.js.map +1 -0
- package/dist/cli/supervise.d.ts +24 -0
- package/dist/cli/supervise.js +147 -6
- package/dist/cli/supervise.js.map +1 -1
- package/dist/config/agent-config.d.ts +37 -11
- package/dist/config/agent-config.js +146 -64
- package/dist/config/agent-config.js.map +1 -1
- package/dist/config.d.ts +2 -0
- package/dist/config.js +14 -5
- package/dist/config.js.map +1 -1
- package/dist/fs/atomic.d.ts +4 -0
- package/dist/fs/atomic.js +19 -2
- package/dist/fs/atomic.js.map +1 -1
- package/dist/fs/stat.d.ts +7 -0
- package/dist/fs/stat.js +27 -0
- package/dist/fs/stat.js.map +1 -0
- package/dist/http/context.d.ts +28 -9
- package/dist/http/context.js +77 -25
- package/dist/http/context.js.map +1 -1
- package/dist/onboarding.d.ts +2 -2
- package/dist/onboarding.js +10 -8
- package/dist/onboarding.js.map +1 -1
- package/dist/profiles/profiles.d.ts +12 -4
- package/dist/profiles/profiles.js +78 -30
- package/dist/profiles/profiles.js.map +1 -1
- package/dist/projects.d.ts +15 -6
- package/dist/projects.js +55 -47
- package/dist/projects.js.map +1 -1
- package/dist/providers/catalog.d.ts +85 -14
- package/dist/providers/catalog.js +502 -146
- package/dist/providers/catalog.js.map +1 -1
- package/dist/providers/env-file.d.ts +10 -3
- package/dist/providers/env-file.js +24 -75
- package/dist/providers/env-file.js.map +1 -1
- package/dist/providers/runtime-env.d.ts +4 -2
- package/dist/providers/runtime-env.js +9 -6
- package/dist/providers/runtime-env.js.map +1 -1
- package/dist/providers/tables.d.ts +3 -1
- package/dist/providers/tables.js +4 -2
- package/dist/providers/tables.js.map +1 -1
- package/dist/redact.js +56 -23
- package/dist/redact.js.map +1 -1
- package/dist/release.d.ts +7 -0
- package/dist/release.js +19 -3
- package/dist/release.js.map +1 -1
- package/dist/runtime.d.ts +5 -1
- package/dist/runtime.js +303 -96
- package/dist/runtime.js.map +1 -1
- package/dist/server.js +31 -18
- package/dist/server.js.map +1 -1
- package/dist/sessions/anchor.d.ts +11 -4
- package/dist/sessions/anchor.js +33 -37
- package/dist/sessions/anchor.js.map +1 -1
- package/dist/sessions/background-events.d.ts +2 -0
- package/dist/sessions/background-events.js +10 -0
- package/dist/sessions/background-events.js.map +1 -0
- package/dist/sessions/background-tasks.d.ts +49 -23
- package/dist/sessions/background-tasks.js +161 -89
- package/dist/sessions/background-tasks.js.map +1 -1
- package/dist/sessions/background-updates.d.ts +15 -8
- package/dist/sessions/background-updates.js +101 -25
- package/dist/sessions/background-updates.js.map +1 -1
- package/dist/sessions/cli-sessions.d.ts +23 -6
- package/dist/sessions/cli-sessions.js +84 -84
- package/dist/sessions/cli-sessions.js.map +1 -1
- package/dist/sessions/completions.d.ts +38 -2
- package/dist/sessions/completions.js +348 -77
- package/dist/sessions/completions.js.map +1 -1
- package/dist/sessions/compress.d.ts +8 -0
- package/dist/sessions/compress.js +2 -2
- package/dist/sessions/compress.js.map +1 -1
- package/dist/sessions/drafts.d.ts +14 -10
- package/dist/sessions/drafts.js +38 -43
- package/dist/sessions/drafts.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 +86 -0
- package/dist/sessions/gateway-sessions.js +914 -0
- package/dist/sessions/gateway-sessions.js.map +1 -0
- 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/goals.d.ts +31 -0
- package/dist/sessions/goals.js +75 -0
- package/dist/sessions/goals.js.map +1 -0
- package/dist/sessions/journal.d.ts +5 -79
- package/dist/sessions/journal.js +15 -606
- package/dist/sessions/journal.js.map +1 -1
- package/dist/sessions/list.d.ts +34 -18
- package/dist/sessions/list.js +161 -147
- package/dist/sessions/list.js.map +1 -1
- package/dist/sessions/merge.d.ts +77 -13
- package/dist/sessions/merge.js +315 -65
- package/dist/sessions/merge.js.map +1 -1
- package/dist/sessions/notices.d.ts +22 -0
- package/dist/sessions/notices.js +72 -0
- package/dist/sessions/notices.js.map +1 -0
- package/dist/sessions/pending.d.ts +10 -4
- package/dist/sessions/pending.js +83 -7
- package/dist/sessions/pending.js.map +1 -1
- package/dist/sessions/prefix-index.d.ts +85 -0
- package/dist/sessions/prefix-index.js +243 -0
- package/dist/sessions/prefix-index.js.map +1 -0
- package/dist/sessions/recovery.d.ts +4 -7
- package/dist/sessions/recovery.js +100 -283
- package/dist/sessions/recovery.js.map +1 -1
- package/dist/sessions/relay.d.ts +20 -20
- package/dist/sessions/relay.js +205 -127
- package/dist/sessions/relay.js.map +1 -1
- package/dist/sessions/service.d.ts +251 -78
- package/dist/sessions/service.js +1510 -564
- package/dist/sessions/service.js.map +1 -1
- package/dist/sessions/session.d.ts +20 -2
- package/dist/sessions/session.js +33 -5
- package/dist/sessions/session.js.map +1 -1
- package/dist/sessions/shares.d.ts +7 -6
- package/dist/sessions/shares.js +22 -45
- package/dist/sessions/shares.js.map +1 -1
- package/dist/sessions/source-kind.js +1 -0
- package/dist/sessions/source-kind.js.map +1 -1
- package/dist/sessions/state-db-identity.d.ts +18 -0
- package/dist/sessions/state-db-identity.js +67 -0
- package/dist/sessions/state-db-identity.js.map +1 -0
- package/dist/sessions/state-db-worker.js +24 -5
- package/dist/sessions/state-db-worker.js.map +1 -1
- package/dist/sessions/state-db.d.ts +157 -21
- package/dist/sessions/state-db.js +1145 -204
- 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 +171 -0
- package/dist/sessions/storage/backend.js +19 -0
- package/dist/sessions/storage/backend.js.map +1 -0
- package/dist/sessions/storage/conformance.d.ts +20 -0
- package/dist/sessions/storage/conformance.js +237 -0
- package/dist/sessions/storage/conformance.js.map +1 -0
- package/dist/sessions/storage/document.d.ts +16 -0
- package/dist/sessions/storage/document.js +44 -0
- package/dist/sessions/storage/document.js.map +1 -0
- package/dist/sessions/storage/json-documents.d.ts +25 -0
- package/dist/sessions/storage/json-documents.js +277 -0
- package/dist/sessions/storage/json-documents.js.map +1 -0
- package/dist/sessions/storage/json-files.d.ts +23 -0
- package/dist/sessions/storage/json-files.js +244 -0
- package/dist/sessions/storage/json-files.js.map +1 -0
- package/dist/sessions/storage/json-installation.d.ts +3 -0
- package/dist/sessions/storage/json-installation.js +31 -0
- package/dist/sessions/storage/json-installation.js.map +1 -0
- package/dist/sessions/storage/json-journal.d.ts +113 -0
- package/dist/sessions/storage/json-journal.js +756 -0
- package/dist/sessions/storage/json-journal.js.map +1 -0
- package/dist/sessions/storage/json-recovery.d.ts +4 -0
- package/dist/sessions/storage/json-recovery.js +195 -0
- package/dist/sessions/storage/json-recovery.js.map +1 -0
- package/dist/sessions/storage/json.d.ts +82 -0
- package/dist/sessions/storage/json.js +350 -0
- package/dist/sessions/storage/json.js.map +1 -0
- package/dist/sessions/storage/row.d.ts +6 -0
- package/dist/sessions/storage/row.js +49 -0
- package/dist/sessions/storage/row.js.map +1 -0
- package/dist/sessions/storage/search-text.d.ts +4 -0
- package/dist/sessions/storage/search-text.js +16 -0
- package/dist/sessions/storage/search-text.js.map +1 -0
- package/dist/sessions/store.d.ts +67 -73
- package/dist/sessions/store.js +341 -607
- package/dist/sessions/store.js.map +1 -1
- package/dist/sessions/streams.d.ts +12 -7
- package/dist/sessions/streams.js +58 -15
- package/dist/sessions/streams.js.map +1 -1
- package/dist/sessions/titles.js +1 -1
- package/dist/sessions/titles.js.map +1 -1
- package/dist/sessions/todo.d.ts +5 -0
- package/dist/sessions/todo.js +28 -21
- package/dist/sessions/todo.js.map +1 -1
- package/dist/sessions/tool-display.d.ts +8 -5
- package/dist/sessions/tool-display.js +28 -16
- package/dist/sessions/tool-display.js.map +1 -1
- package/dist/sessions/turn-context.d.ts +10 -1
- package/dist/sessions/turn-context.js +13 -6
- package/dist/sessions/turn-context.js.map +1 -1
- package/dist/sessions/turn.d.ts +110 -22
- package/dist/sessions/turn.js +918 -380
- package/dist/sessions/turn.js.map +1 -1
- package/dist/sessions/wakeup-pause.d.ts +8 -13
- package/dist/sessions/wakeup-pause.js +31 -49
- package/dist/sessions/wakeup-pause.js.map +1 -1
- package/dist/sessions/window.js +13 -12
- package/dist/sessions/window.js.map +1 -1
- package/dist/settings.d.ts +19 -7
- package/dist/settings.js +179 -183
- package/dist/settings.js.map +1 -1
- package/dist/sidecar/client.d.ts +41 -4
- package/dist/sidecar/client.js +192 -42
- package/dist/sidecar/client.js.map +1 -1
- package/dist/sidecar/discover.d.ts +2 -1
- package/dist/sidecar/discover.js +93 -10
- package/dist/sidecar/discover.js.map +1 -1
- package/dist/sidecar/env.d.ts +4 -0
- package/dist/sidecar/env.js +3 -0
- package/dist/sidecar/env.js.map +1 -0
- package/dist/sidecar/fake.d.ts +6 -2
- package/dist/sidecar/fake.js +34 -4
- 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/env-file.d.ts +5 -0
- package/dist/test/env-file.js +88 -0
- package/dist/test/env-file.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/test/harness.d.ts +1 -0
- package/dist/test/harness.js +1 -1
- package/dist/test/harness.js.map +1 -1
- package/dist/test/passkeys.d.ts +22 -0
- package/dist/test/passkeys.js +62 -0
- package/dist/test/passkeys.js.map +1 -0
- package/dist/test/storage.d.ts +15 -0
- package/dist/test/storage.js +26 -0
- package/dist/test/storage.js.map +1 -0
- package/dist/tools/commands.d.ts +6 -1
- package/dist/tools/commands.js +8 -2
- package/dist/tools/commands.js.map +1 -1
- package/dist/tools/connectors.d.ts +33 -0
- package/dist/tools/connectors.js +121 -0
- package/dist/tools/connectors.js.map +1 -0
- package/dist/tools/crons.d.ts +46 -5
- package/dist/tools/crons.js +100 -26
- package/dist/tools/crons.js.map +1 -1
- package/dist/tools/dashboard-plugins.d.ts +34 -5
- package/dist/tools/dashboard-plugins.js +146 -14
- package/dist/tools/dashboard-plugins.js.map +1 -1
- package/dist/tools/extensions.d.ts +5 -4
- package/dist/tools/extensions.js +213 -207
- package/dist/tools/extensions.js.map +1 -1
- package/dist/tools/gateway-restart.d.ts +82 -0
- package/dist/tools/gateway-restart.js +222 -0
- package/dist/tools/gateway-restart.js.map +1 -0
- package/dist/tools/health.d.ts +28 -4
- package/dist/tools/health.js +171 -50
- package/dist/tools/health.js.map +1 -1
- package/dist/tools/hygiene.d.ts +4 -3
- package/dist/tools/hygiene.js +23 -9
- package/dist/tools/hygiene.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/kanban.d.ts +4 -2
- package/dist/tools/kanban.js +28 -19
- package/dist/tools/kanban.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/memory-masks.d.ts +5 -0
- package/dist/tools/memory-masks.js +256 -0
- package/dist/tools/memory-masks.js.map +1 -0
- package/dist/tools/memory.d.ts +29 -3
- package/dist/tools/memory.js +69 -27
- package/dist/tools/memory.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/plugin-settings.d.ts +15 -0
- package/dist/tools/plugin-settings.js +90 -0
- package/dist/tools/plugin-settings.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 +13 -5
- package/dist/tools/skills.js +53 -19
- package/dist/tools/skills.js.map +1 -1
- package/dist/tools/update-notifications.d.ts +102 -17
- package/dist/tools/update-notifications.js +400 -82
- package/dist/tools/update-notifications.js.map +1 -1
- package/dist/tools/update-rollback.d.ts +11 -0
- package/dist/tools/update-rollback.js +28 -0
- package/dist/tools/update-rollback.js.map +1 -0
- package/dist/tools/updates.d.ts +100 -33
- package/dist/tools/updates.js +1085 -345
- package/dist/tools/updates.js.map +1 -1
- package/dist/util.d.ts +2 -0
- package/dist/util.js +5 -0
- package/dist/util.js.map +1 -1
- package/dist/workspace/git.d.ts +16 -1
- package/dist/workspace/git.js +291 -11
- package/dist/workspace/git.js.map +1 -1
- package/dist/workspace/media.d.ts +12 -9
- package/dist/workspace/media.js +98 -38
- 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 +8 -4
- package/dist/workspace/rollback.js +22 -12
- package/dist/workspace/rollback.js.map +1 -1
- package/dist/workspace/workspaces.d.ts +15 -19
- package/dist/workspace/workspaces.js +55 -127
- package/dist/workspace/workspaces.js.map +1 -1
- package/dist/workspace/worktrees.js +170 -32
- package/dist/workspace/worktrees.js.map +1 -1
- package/package.json +6 -4
- package/sidecar/agent_dependency.json +4 -4
- package/sidecar/agent_support.json +29 -0
- package/sidecar/scripts/record-fixtures.py +12 -3
- package/sidecar/scripts/replay_sidecar.py +8 -0
- package/sidecar/scripts/suite_runner.py +458 -0
- package/sidecar/scripts/test.sh +11 -5
- package/sidecar/talaria_sidecar/__init__.py +6 -1
- package/sidecar/talaria_sidecar/__main__.py +13 -4
- package/sidecar/talaria_sidecar/agent_mutation.py +1111 -0
- package/sidecar/talaria_sidecar/agent_services.py +1116 -0
- package/sidecar/talaria_sidecar/context_detail.py +59 -0
- package/sidecar/talaria_sidecar/dependency_sync.py +85 -0
- package/sidecar/talaria_sidecar/home.py +133 -14
- package/sidecar/talaria_sidecar/methods/__init__.py +2 -2
- package/sidecar/talaria_sidecar/methods/aux.py +211 -41
- package/sidecar/talaria_sidecar/methods/chat.py +1378 -200
- package/sidecar/talaria_sidecar/methods/checkpoints.py +29 -4
- package/sidecar/talaria_sidecar/methods/commands.py +483 -13
- package/sidecar/talaria_sidecar/methods/config.py +195 -6
- package/sidecar/talaria_sidecar/methods/connectors.py +375 -0
- package/sidecar/talaria_sidecar/methods/cron.py +374 -36
- package/sidecar/talaria_sidecar/methods/cron_execution.py +284 -0
- package/sidecar/talaria_sidecar/methods/dashboard_plugins.py +301 -0
- package/sidecar/talaria_sidecar/methods/gateway.py +215 -55
- package/sidecar/talaria_sidecar/methods/gateway_sessions.py +418 -0
- package/sidecar/talaria_sidecar/methods/goals.py +81 -41
- package/sidecar/talaria_sidecar/methods/kanban.py +82 -30
- package/sidecar/talaria_sidecar/methods/memory.py +84 -0
- package/sidecar/talaria_sidecar/methods/oauth.py +144 -13
- 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 +229 -16
- package/sidecar/talaria_sidecar/methods/profiles.py +48 -9
- package/sidecar/talaria_sidecar/methods/providers.py +196 -26
- package/sidecar/talaria_sidecar/methods/runtime.py +71 -1
- package/sidecar/talaria_sidecar/methods/skills.py +83 -5
- package/sidecar/talaria_sidecar/methods/state_db.py +405 -112
- package/sidecar/talaria_sidecar/methods/stt.py +159 -78
- package/sidecar/talaria_sidecar/methods/text.py +14 -1
- package/sidecar/talaria_sidecar/methods/toolsets.py +51 -0
- package/sidecar/talaria_sidecar/methods/usage.py +113 -14
- package/sidecar/talaria_sidecar/methods/worktree.py +145 -19
- package/sidecar/talaria_sidecar/methods/write_approval.py +181 -0
- package/sidecar/talaria_sidecar/rpc.py +70 -7
- package/sidecar/talaria_sidecar/runtime.py +122 -14
- package/sidecar/talaria_sidecar/speed.py +47 -0
- package/sidecar/talaria_sidecar/startup_timing.py +119 -0
- package/static/dist/FILES.txt +242 -215
- 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-jzthp1wa.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-mwr67mt8.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-gpq1y228.js → chunk-4HAMMTFA-g0cru63b.js} +20 -20
- package/static/dist/assets/{chunk-75Z2AOVW-ktje58c4.js → chunk-75Z2AOVW-7rkswkjw.js} +1 -1
- package/static/dist/assets/chunk-DU6HZSFF-fn73jzdo.js +128 -0
- package/static/dist/assets/{chunk-F27PBJKO-cmev85ti.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-htjgt22y.js → chunk-GMAD6QVW-l2a32wiy.js} +6 -6
- package/static/dist/assets/{chunk-GVQU2GXP-qndvoxl7.js → chunk-GVQU2GXP-o9dwzh8h.js} +1 -1
- package/static/dist/assets/{chunk-IMKFNOWR-e5bkd5q6.js → chunk-IMKFNOWR-eblwj20b.js} +5 -5
- package/static/dist/assets/{chunk-L3NEJ4N5-mj1155r6.js → chunk-L3NEJ4N5-o2mufspb.js} +1 -1
- package/static/dist/assets/chunk-OSK3NFVY-ijp9pw29.js +10 -0
- package/static/dist/assets/{chunk-P2QGCYS3-f7t54xfm.js → chunk-P2QGCYS3-hs9hqwl4.js} +1 -1
- package/static/dist/assets/{chunk-POPQ4Y6H-i927v9oa.js → chunk-POPQ4Y6H-bp9rsqez.js} +1 -1
- package/static/dist/assets/{chunk-PWAF6VOD-m84lmnyt.js → chunk-PWAF6VOD-brkprov6.js} +1 -1
- package/static/dist/assets/{chunk-SHT3W25Y-mi0tlcu9.js → chunk-SHT3W25Y-gmpv0pxz.js} +13 -13
- package/static/dist/assets/{chunk-SVP7TREG-dnau702j.js → chunk-SVP7TREG-oldm08fu.js} +4 -4
- package/static/dist/assets/{chunk-TICWLB2K-edem1gkg.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-l8abxaes.js → diagram-S7CK7UJ4-fyi81nxd.js} +4 -4
- package/static/dist/assets/diagram-UQ7AKVKN-j3exggaq.js +41 -0
- package/static/dist/assets/{diagram-VSXAHHWV-fnky6lvc.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-ngbsyp37.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-eravdti4.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-i6ypq351.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-lduf1z95.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-e18bu4pg.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-meizqsvn.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-27b26eok.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/pcmTap.worklet-74EKjWAZ.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-hhue7d8o.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-fqb8xcjf.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-dlcz6qjz.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-b1vl2zil.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-b4dq6n4q.js → useParams-ftsveu84.js} +1 -1
- package/static/dist/assets/{useSearch-ipfmv3he.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-e49523ab.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-g3bkgnvt.js +0 -1
- package/static/dist/assets/ChatPage-oo7bdan6.js +0 -25
- package/static/dist/assets/Dialog-g355qxhp.js +0 -1
- package/static/dist/assets/ExtensionRoute-i2y9fvjm.js +0 -1
- package/static/dist/assets/HubRoute-lmkrbw47.js +0 -2
- package/static/dist/assets/Markdown-j4kut4j2.js +0 -598
- package/static/dist/assets/Markdown-lwviulmg.css +0 -1
- package/static/dist/assets/RightPanel-ohlsdzfl.js +0 -1
- package/static/dist/assets/Select-kddq75qc.js +0 -1
- package/static/dist/assets/SessionListPanel-lu3oy0hw.js +0 -1
- package/static/dist/assets/SettingsLayout-o9bv4mgb.js +0 -1
- package/static/dist/assets/States-eq6fe29m.js +0 -1
- package/static/dist/assets/Toaster-pc247u9f.js +0 -1
- package/static/dist/assets/_app-f8n1i0m1.js +0 -1
- package/static/dist/assets/_app.ext._extensionId-gfbzpoou.js +0 -1
- package/static/dist/assets/_app.index-bzzv80hk.js +0 -1
- package/static/dist/assets/_app.insights-dzixbryi.js +0 -1
- package/static/dist/assets/_app.kanban-c6hep2us.js +0 -1
- package/static/dist/assets/_app.logs-i69qds98.js +0 -1
- package/static/dist/assets/_app.memory-kl4vf0gd.js +0 -1
- package/static/dist/assets/_app.profiles-b8zinmyp.js +0 -1
- package/static/dist/assets/_app.session._sessionId-fn1bhde6.js +0 -1
- package/static/dist/assets/_app.settings-cg8plwmf.js +0 -1
- package/static/dist/assets/_app.settings._section-bkwbi9zn.js +0 -3
- package/static/dist/assets/_app.skills-cs47sbvs.js +0 -1
- package/static/dist/assets/_app.tasks-dwvk64tc.js +0 -1
- package/static/dist/assets/_app.todos-c8xjm8p3.js +0 -1
- package/static/dist/assets/_app.workspaces-ehvd1gds.js +0 -1
- package/static/dist/assets/abnfDiagram-VCTEODGH-c8kdixke.js +0 -1
- package/static/dist/assets/architecture-7GRP2DOG-6crvnylg.js +0 -1
- package/static/dist/assets/architectureDiagram-5GKGNRK7-cku06x1p.js +0 -36
- package/static/dist/assets/back-h7aun7ew.js +0 -1
- package/static/dist/assets/cancel-fhi0vcnu.js +0 -1
- package/static/dist/assets/channel-b2zo73z1.js +0 -1
- package/static/dist/assets/chunk-DU6HZSFF-ofajdixh.js +0 -128
- package/static/dist/assets/chunk-OSK3NFVY-e7gkikcw.js +0 -10
- package/static/dist/assets/classDiagram-ZZMXUADV-oe99st8x.js +0 -1
- package/static/dist/assets/classDiagram-v2-VYDZK3BY-oe99st8x.js +0 -1
- package/static/dist/assets/copied-hcplv46p.js +0 -1
- package/static/dist/assets/copy-magtofyp.js +0 -1
- package/static/dist/assets/cose-bilkent-JH36ORCC-eclcy6ja.js +0 -1
- package/static/dist/assets/cynefin-OW5HDTMX-siqlulkl.js +0 -1
- package/static/dist/assets/cynefinDiagram-5FMLGOSQ-i648tah9.js +0 -62
- package/static/dist/assets/cytoscape.esm-bqu53u12.js +0 -321
- package/static/dist/assets/dagre-GXQ25YYZ-mwn6uc17.js +0 -4
- package/static/dist/assets/dagre-lkoknbjn.js +0 -1
- package/static/dist/assets/diagram-UQ7AKVKN-mekq7zgq.js +0 -41
- package/static/dist/assets/diagram-VX7I27RA-xe6r5qfw.js +0 -24
- package/static/dist/assets/diagram-Z3DM3KII-nq07dg7k.js +0 -24
- package/static/dist/assets/ebnfDiagram-PWID7BFC-c62ipm3g.js +0 -1
- package/static/dist/assets/endpoints-klbxod4t.js +0 -64
- package/static/dist/assets/erDiagram-RLTQ6QDP-h39kmnzy.js +0 -99
- package/static/dist/assets/eventmodeling-NTZA5JFV-obfede4u.js +0 -1
- package/static/dist/assets/flowDiagram-HODETNUW-kdpsp1je.js +0 -1
- package/static/dist/assets/gitGraph-4MIJSDKK-fr2i7caa.js +0 -1
- package/static/dist/assets/highlighted-body-KPVGNVTW-jwpop9p8.js +0 -1
- package/static/dist/assets/host-i828xuo7.js +0 -1
- package/static/dist/assets/index-eh8zilnv.css +0 -2
- package/static/dist/assets/index-r648f4o1.js +0 -11
- package/static/dist/assets/info-A6RAGUB7-h11x0dxo.js +0 -1
- package/static/dist/assets/infoDiagram-27XIBGKW-dfh47dw9.js +0 -2
- package/static/dist/assets/lazyRouteComponent-e1y4t2i9.js +0 -1
- package/static/dist/assets/linear-becwlnhk.js +0 -1
- package/static/dist/assets/link-oot2yn73.js +0 -1
- package/static/dist/assets/login-gu28l9ou.js +0 -1
- package/static/dist/assets/mermaid-HWGCJPDP-mtwrj8fn.js +0 -1
- package/static/dist/assets/mermaid-parser.core-ntne45i9.js +0 -7
- package/static/dist/assets/not-found-ccnnac39.js +0 -1
- package/static/dist/assets/onboarding-lkphzu1s.js +0 -1
- package/static/dist/assets/onboarding_model_label-ftpjdwqk.js +0 -1
- package/static/dist/assets/packet-AYTQ26CC-l6jdka8p.js +0 -1
- package/static/dist/assets/pegDiagram-XKGWAZYB-g1er3bxj.js +0 -1
- package/static/dist/assets/pie-WAS4IAKB-i0ylcrt9.js +0 -1
- package/static/dist/assets/pieDiagram-E7YTZNPT-fbz1e55z.js +0 -39
- package/static/dist/assets/radar-RG4KPBEZ-f9b70aa4.js +0 -1
- package/static/dist/assets/railroad-74A4TZTK-lgsuoeda.js +0 -1
- package/static/dist/assets/railroad-abnf-HS5TGJTU-nf9d6pdx.js +0 -1
- package/static/dist/assets/railroad-ebnf-LZEXJU2U-f7ummkt5.js +0 -1
- package/static/dist/assets/railroad-peg-WCYAUIDC-oczq5tqs.js +0 -1
- package/static/dist/assets/railroadDiagram-O6MQD6OU-eqpy9fnz.js +0 -1
- package/static/dist/assets/refresh-abtu93ke.js +0 -1
- package/static/dist/assets/refresh-cw-hlwb02qv.js +0 -1
- package/static/dist/assets/requirementDiagram-BXWQKSXE-ogf6puhi.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-girnabkf.js +0 -1
- package/static/dist/assets/settings_section_extensions_title-h14cwk6f.js +0 -1
- package/static/dist/assets/share._token-kl0r7ido.js +0 -2
- package/static/dist/assets/sizeCapture-INFHLROL-g612l48j.js +0 -1
- package/static/dist/assets/sliders-horizontal-n1zm34qq.js +0 -1
- package/static/dist/assets/src-hjyib4mu.js +0 -1
- package/static/dist/assets/sse-iwku0sjo.js +0 -1
- package/static/dist/assets/stateDiagram-D77RDMKH-fyoznpcs.js +0 -1
- package/static/dist/assets/stateDiagram-v2-MP3YSRHH-ixhx8r46.js +0 -1
- package/static/dist/assets/swimlanes-42K2YHIH-oefldhfy.js +0 -1
- package/static/dist/assets/swimlanesDiagram-VR7AAH4N-h9ersk2e.js +0 -8
- package/static/dist/assets/todoStore-jjr5yr78.js +0 -1
- package/static/dist/assets/treeView-Q6P3EWNA-f7hcci5o.js +0 -1
- package/static/dist/assets/treemap-WGGIJYW6-nl85071a.js +0 -1
- package/static/dist/assets/units-kgxzxfhi.js +0 -1
- package/static/dist/assets/untitled-cikfjntn.js +0 -1
- package/static/dist/assets/useForm-kqoqg0k9.js +0 -1
- package/static/dist/assets/useLocale-o59tbiea.js +0 -1
- package/static/dist/assets/vennDiagram-4TSXK5OY-h5hzbk0n.js +0 -34
- package/static/dist/assets/wardley-WFR3VGLG-jftvpm3e.js +0 -1
- package/static/dist/assets/wardleyDiagram-VM6X3IG4-hedh85ge.js +0 -78
- /package/static/dist/assets/{ChatPage-gmu5c7lf.css → TerminalPanel-gmu5c7lf.css} +0 -0
package/dist/sessions/merge.js
CHANGED
|
@@ -4,11 +4,13 @@
|
|
|
4
4
|
* `_extract_tool_calls_from_messages`, `_build_partial_message`).
|
|
5
5
|
*/
|
|
6
6
|
import { buildActiveTurnToken, completedToolIndex } from '../redact.js';
|
|
7
|
-
import {
|
|
7
|
+
import { selectAuthoritativeTerminalEvent } from './journal.js';
|
|
8
8
|
import { str } from '../util.js';
|
|
9
|
+
import { stateDbMessageKey, stateDbMessageFingerprint, stateDbRowId, stateDbIdentityKeys, stateDbMessageRepresented } from './state-db-identity.js';
|
|
9
10
|
import { stripAttachedFilesMarker, stripWorkspacePrefix } from './session.js';
|
|
10
11
|
export { WORKSPACE_PREFIX_RE, stripWorkspacePrefix } from './session.js';
|
|
11
12
|
import { decidedEditDiff, toolEditDiff, toolName } from './tool-display.js';
|
|
13
|
+
import { sourceKind } from './source-kind.js';
|
|
12
14
|
const TOOL_RESULT_SNIPPET_MAX = 4000;
|
|
13
15
|
// Python `_TOOL_ARG_CONTENT_KEYS`: file bodies, commands, and patch text keep up to the content cap; incidental args cut at 120.
|
|
14
16
|
export const TOOL_ARG_CONTENT_KEYS = new Set(['command', 'cmd', 'script', 'code', 'patch', 'diff', 'old_string', 'new_string', 'content', 'path', 'file_path']);
|
|
@@ -46,11 +48,33 @@ export function messageText(content) {
|
|
|
46
48
|
}
|
|
47
49
|
return str(content);
|
|
48
50
|
}
|
|
51
|
+
/** Agent-injected memory is model context, never typed user text. Match the Agent's fence, including an unclosed tail. */
|
|
52
|
+
function withoutMemoryContext(text) {
|
|
53
|
+
const stripped = text.replace(/(?:\r?\n)?<memory-context>[\s\S]*?(?:<\/memory-context>|$)/gi, '');
|
|
54
|
+
// Remove the fence's line separator, not the prompt's indentation or trailing whitespace.
|
|
55
|
+
return stripped !== text && !stripped.trim() ? '' : stripped;
|
|
56
|
+
}
|
|
57
|
+
/** Display-only user projection shared by transcript hydration and turn identity; model history stays untouched. */
|
|
58
|
+
export function normalizeUserDisplay(message) {
|
|
59
|
+
if (!isDict(message) || message.role !== 'user')
|
|
60
|
+
return message;
|
|
61
|
+
const content = message.content;
|
|
62
|
+
if (typeof content === 'string')
|
|
63
|
+
return { ...message, content: withoutMemoryContext(content) };
|
|
64
|
+
if (!Array.isArray(content))
|
|
65
|
+
return message;
|
|
66
|
+
return { ...message, content: content.flatMap((part) => {
|
|
67
|
+
if (!isDict(part) || part.type !== 'text' || typeof part.text !== 'string')
|
|
68
|
+
return [part];
|
|
69
|
+
const text = withoutMemoryContext(part.text);
|
|
70
|
+
return text === part.text ? [part] : text ? [{ ...part, text }] : [];
|
|
71
|
+
}) };
|
|
72
|
+
}
|
|
49
73
|
export function messageIdentity(msg, textLimit = 500) {
|
|
50
74
|
if (!isDict(msg))
|
|
51
75
|
return null;
|
|
52
76
|
const role = str(msg.role);
|
|
53
|
-
let text = messageText(msg.content);
|
|
77
|
+
let text = messageText(normalizeUserDisplay(msg).content);
|
|
54
78
|
if (role === 'user') {
|
|
55
79
|
const typed = userPromptText(text);
|
|
56
80
|
// An attachment-only prompt has no typed text; its whole attached-files line (never truncated) tells one such turn
|
|
@@ -110,15 +134,78 @@ export function markerKind(msg) {
|
|
|
110
134
|
export function isContextCompressionMarker(msg) {
|
|
111
135
|
return markerKind(msg) === 'context_compaction';
|
|
112
136
|
}
|
|
137
|
+
// The Agent's failed-turn boundary copy (`agent/turn_failure_copy.py`): an older row carries it without its kind.
|
|
138
|
+
const FAILED_TURN_NOTICES = new Set([
|
|
139
|
+
'Your request was not processed. Send it again if you still want me to carry it out.',
|
|
140
|
+
'This turn did not complete. Some actions may already have run; verify their effects before resending.',
|
|
141
|
+
]);
|
|
142
|
+
/**
|
|
143
|
+
* TAL-815: rows the Agent writes outside the conversation, by its `display_kind` and its own read-side rules.
|
|
144
|
+
* `failed_turn`: the assistant boundary closing a turn that failed, never the model's reply. `hidden`: a row the Agent
|
|
145
|
+
* never renders, such as the empty interrupt placeholder or an untyped `[System:` scaffold notice in a user row, or the
|
|
146
|
+
* late language-server `[System note:` (TAL-1261, `agent/turn_stop_gates.py`).
|
|
147
|
+
*/
|
|
148
|
+
export function agentRowKind(msg) {
|
|
149
|
+
if (!isDict(msg))
|
|
150
|
+
return null;
|
|
151
|
+
if (msg.display_kind === 'hidden')
|
|
152
|
+
return 'hidden';
|
|
153
|
+
if (msg.role === 'assistant' && (msg.display_kind === 'failed_turn' || (!msg.display_kind && typeof msg.content === 'string' && FAILED_TURN_NOTICES.has(msg.content.trim()))))
|
|
154
|
+
return 'failed_turn';
|
|
155
|
+
return msg.role === 'user' && !msg.display_kind && typeof msg.content === 'string' && /^\[System( note)?:/.test(msg.content.trimStart()) ? 'hidden' : null;
|
|
156
|
+
}
|
|
157
|
+
const DELIVERY_PREFIXES = [['webhook', '[Webhook delivery: '], ['cron', '[Cron delivery: ']];
|
|
158
|
+
/**
|
|
159
|
+
* TAL-816: the user row the Agent's gateway mirrors into a chat's transcript after a webhook or cron delivery
|
|
160
|
+
* (`gateway/mirror.py` callers): exactly `[Webhook delivery: <route>]` or `[Cron delivery: <job>]`, a newline, then the
|
|
161
|
+
* delivered text. Only meaningful in a messaging session; anyone can type the same prefix elsewhere.
|
|
162
|
+
*/
|
|
163
|
+
export function deliveryNotice(msg) {
|
|
164
|
+
if (!isDict(msg) || msg.role !== 'user' || typeof msg.content !== 'string')
|
|
165
|
+
return null;
|
|
166
|
+
const newline = msg.content.indexOf('\n');
|
|
167
|
+
const label = newline < 0 ? '' : msg.content.slice(0, newline);
|
|
168
|
+
const match = DELIVERY_PREFIXES.find(([, prefix]) => label.startsWith(prefix));
|
|
169
|
+
if (!match || !label.endsWith(']') || label.length <= match[1].length + 1)
|
|
170
|
+
return null;
|
|
171
|
+
return { kind: match[0], name: label.slice(match[1].length, -1), body: msg.content.slice(newline + 1) };
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* TAL-816: `session`'s rows for a copy that is no longer a messaging session (duplicate, branch), each mirrored delivery
|
|
175
|
+
* marked with the Agent's own mirror metadata (`mirror_source`, which it drops at the SQLite boundary) so the copy still
|
|
176
|
+
* shows it as a delivery. Returns copies; stored rows are untouched.
|
|
177
|
+
*/
|
|
178
|
+
export function withMirrorSources(messages, session) {
|
|
179
|
+
if (sourceKind(session) !== 'messaging')
|
|
180
|
+
return messages;
|
|
181
|
+
return messages.map((m) => {
|
|
182
|
+
const delivery = deliveryNotice(m);
|
|
183
|
+
return delivery ? { ...m, mirror_source: delivery.kind } : m;
|
|
184
|
+
});
|
|
185
|
+
}
|
|
113
186
|
/**
|
|
114
187
|
* TAL-305: stamps `_marker_kind` on marker rows, and `_marker_body` (the list without its marker line) on a preserved
|
|
115
|
-
* task list, so clients render a marker card instead of a message.
|
|
188
|
+
* task list, so clients render a marker card instead of a message. TAL-815: a failed turn's boundary gets
|
|
189
|
+
* `_notice_kind`, unless the turn (`_turn_id`) already carries Web's own error row; that copy and every other row the
|
|
190
|
+
* Agent hides leave as `display_kind: 'hidden'`. TAL-816: a mirrored delivery in a messaging `session`, or one a copy
|
|
191
|
+
* marked with its `mirror_source`, gets `_delivery`. Returns copies; stored rows are untouched.
|
|
116
192
|
*/
|
|
117
|
-
export function withMarkerKinds(messages) {
|
|
193
|
+
export function withMarkerKinds(messages, session) {
|
|
194
|
+
const erroredTurns = new Set(messages.flatMap((m) => (isDict(m) && m._error ? [str(m._turn_id)] : [])));
|
|
195
|
+
const messaging = sourceKind(session) === 'messaging';
|
|
118
196
|
return messages.map((m) => {
|
|
119
|
-
|
|
120
|
-
if (!kind || !isDict(m))
|
|
197
|
+
if (!isDict(m))
|
|
121
198
|
return m;
|
|
199
|
+
const delivery = deliveryNotice(m);
|
|
200
|
+
if (delivery && (messaging || m.mirror_source === delivery.kind))
|
|
201
|
+
return { ...m, _delivery: delivery };
|
|
202
|
+
const kind = markerKind(m);
|
|
203
|
+
if (!kind) {
|
|
204
|
+
const agentKind = agentRowKind(m);
|
|
205
|
+
if (!agentKind)
|
|
206
|
+
return m;
|
|
207
|
+
return agentKind === 'failed_turn' && !erroredTurns.has(str(m._turn_id)) ? { ...m, _notice_kind: agentKind } : { ...m, display_kind: 'hidden' };
|
|
208
|
+
}
|
|
122
209
|
if (kind === 'context_compaction')
|
|
123
210
|
return { ...m, _marker_kind: kind };
|
|
124
211
|
const body = messageText(m.content).trim().slice(PRESERVED_TASK_LIST_PREFIX.length).trim();
|
|
@@ -132,7 +219,7 @@ export function looksLikeCurrentUserTurn(msg, msgText) {
|
|
|
132
219
|
// A persisted steer is display-only: it is never the prompt that opened a turn.
|
|
133
220
|
if (!isDict(msg) || str(msg.role) !== 'user' || isDict(msg._steer))
|
|
134
221
|
return false;
|
|
135
|
-
const candidate = normalizeUserText(messageText(msg.content));
|
|
222
|
+
const candidate = normalizeUserText(messageText(normalizeUserDisplay(msg).content));
|
|
136
223
|
const target = normalizeUserText(msgText);
|
|
137
224
|
// An attachment-only prompt (TAL-276) has no text: the Agent's row for it carries none either.
|
|
138
225
|
if (!target)
|
|
@@ -169,7 +256,8 @@ export function findCurrentUserTurn(messages, msgText) {
|
|
|
169
256
|
/** Python `_merge_display_messages_after_agent_result` (append-only display merge). */
|
|
170
257
|
/** Python `_assistant_message_has_final_visible_text`: a non-error assistant row carrying visible answer text. */
|
|
171
258
|
function assistantHasFinalVisibleText(msg) {
|
|
172
|
-
|
|
259
|
+
// The Agent's failed-turn boundary is no answer (TAL-815).
|
|
260
|
+
if (msg.role !== 'assistant' || msg._error || agentRowKind(msg))
|
|
173
261
|
return false;
|
|
174
262
|
return messageText(msg.content).trim().length > 0;
|
|
175
263
|
}
|
|
@@ -470,12 +558,19 @@ export function decidedResultView(value) {
|
|
|
470
558
|
view.exit_code = value.exit_code;
|
|
471
559
|
return view;
|
|
472
560
|
}
|
|
561
|
+
// Agent v0.22.3 `agent/tool_result_classification.py` `shape_failure_error`: a failed status, or a non-empty `results`
|
|
562
|
+
// batch of objects that all carry an error (`delegate_task` with every child interrupted).
|
|
563
|
+
const FAILED_STATUSES = new Set(['failed', 'error']);
|
|
564
|
+
const failedByShape = (data) => FAILED_STATUSES.has(str(data.status).toLowerCase())
|
|
565
|
+
|| (Array.isArray(data.results) && data.results.length > 0 && data.results.every((item) => isDict(item) && presentError(item.error)));
|
|
473
566
|
/**
|
|
474
567
|
* The server's one tool outcome rule (TAL-313), for a live `raw_result` and a persisted tool-role content alike: a result
|
|
475
|
-
* is an error when it parses to an object with a non-empty `error`, a non-zero numeric `exit_code` / `exitCode`,
|
|
476
|
-
* `success: false
|
|
568
|
+
* is an error when it parses to an object with a non-empty `error`, a non-zero numeric `exit_code` / `exitCode`,
|
|
569
|
+
* `success: false`, a failed shape (TAL-1261), or `flagged` by its provider. A `skill_manage` refusal is the Agent's own
|
|
570
|
+
* retry loop and never an error unless its `error` reports `ROLLBACK FAILED` (Agent `agent/display.py`
|
|
571
|
+
* `is_neutral_failure`). `result_text` is the result's display snippet; `result_view` its display sections (TAL-315).
|
|
477
572
|
*/
|
|
478
|
-
export function toolOutcome(raw) {
|
|
573
|
+
export function toolOutcome(raw, toolName, flagged = false) {
|
|
479
574
|
const value = Array.isArray(raw) ? messageText(raw) : raw;
|
|
480
575
|
let data = value;
|
|
481
576
|
if (typeof value === 'string') {
|
|
@@ -487,8 +582,11 @@ export function toolOutcome(raw) {
|
|
|
487
582
|
}
|
|
488
583
|
}
|
|
489
584
|
const exit = isDict(data) ? data.exit_code ?? data.exitCode : undefined;
|
|
490
|
-
const
|
|
491
|
-
|
|
585
|
+
const failed = flagged || isDict(data) && (presentError(data.error) || (typeof exit === 'number' && exit !== 0) || data.success === false || failedByShape(data));
|
|
586
|
+
// Only the error text: a refused patch also returns a preview of the skill, whose prose may mention the marker.
|
|
587
|
+
const error = isDict(data) ? data.error : value;
|
|
588
|
+
const neutral = toolName === 'skill_manage' && !(typeof error === 'string' ? error : JSON.stringify(error ?? '')).includes('ROLLBACK FAILED');
|
|
589
|
+
return { is_error: failed && !neutral, result_text: toolResultSnippet(value), result_view: toolResultView(raw) };
|
|
492
590
|
}
|
|
493
591
|
const finiteOrNull = (v) => (typeof v === 'number' && Number.isFinite(v) ? v : null);
|
|
494
592
|
function nearestAssistantIdx(messages, msgIdx) {
|
|
@@ -513,7 +611,7 @@ export function extractToolCallsFromMessages(messages, liveToolCalls = [], recor
|
|
|
513
611
|
for (const tc of liveToolCalls)
|
|
514
612
|
if (isDict(tc) && str(tc.tid))
|
|
515
613
|
liveDurations.set(str(tc.tid), [...(liveDurations.get(str(tc.tid)) ?? []), finiteOrNull(tc.duration)]);
|
|
516
|
-
const outcome = (raw) => ({ is_error: toolOutcome(raw).is_error });
|
|
614
|
+
const outcome = (raw, name, flagged = false) => ({ is_error: toolOutcome(raw, name, flagged).is_error });
|
|
517
615
|
const toolCalls = [];
|
|
518
616
|
const pendingNames = new Map();
|
|
519
617
|
const pendingArgs = new Map();
|
|
@@ -558,7 +656,7 @@ export function extractToolCallsFromMessages(messages, liveToolCalls = [], recor
|
|
|
558
656
|
if (tid) {
|
|
559
657
|
const name = pendingNames.get(tid) ?? '';
|
|
560
658
|
if (name && name !== 'tool') {
|
|
561
|
-
toolCalls.push({ name, snippet: toolResultSnippet(m.content), tid, assistant_msg_idx: pendingAsst.get(tid) ?? -1, args: truncateToolArgs(pendingArgs.get(tid) ?? {}), ...outcome(m.content) });
|
|
659
|
+
toolCalls.push({ name, snippet: toolResultSnippet(m.content), tid, assistant_msg_idx: pendingAsst.get(tid) ?? -1, args: truncateToolArgs(pendingArgs.get(tid) ?? {}), ...outcome(m.content, name) });
|
|
562
660
|
seq.resolved = true;
|
|
563
661
|
}
|
|
564
662
|
}
|
|
@@ -572,8 +670,7 @@ export function extractToolCallsFromMessages(messages, liveToolCalls = [], recor
|
|
|
572
670
|
if (!tid || !name || name === 'tool' || !isDict(part))
|
|
573
671
|
continue;
|
|
574
672
|
const raw = part.content ?? '';
|
|
575
|
-
|
|
576
|
-
toolCalls.push({ name, snippet: toolResultSnippet(raw), tid, assistant_msg_idx: pendingAsst.get(tid) ?? -1, args: truncateToolArgs(pendingArgs.get(tid) ?? {}), ...resolved, is_error: resolved.is_error || part.is_error === true });
|
|
673
|
+
toolCalls.push({ name, snippet: toolResultSnippet(raw), tid, assistant_msg_idx: pendingAsst.get(tid) ?? -1, args: truncateToolArgs(pendingArgs.get(tid) ?? {}), ...outcome(raw, name, part.is_error === true) });
|
|
577
674
|
}
|
|
578
675
|
}
|
|
579
676
|
});
|
|
@@ -583,7 +680,7 @@ export function extractToolCallsFromMessages(messages, liveToolCalls = [], recor
|
|
|
583
680
|
if (seq.resolved || i >= live.length)
|
|
584
681
|
return;
|
|
585
682
|
const tc = live[i];
|
|
586
|
-
toolCalls.push({ name: str(tc.name) || 'tool', snippet: toolResultSnippet(seq.raw), tid: str(tc.tid), assistant_msg_idx: nearestAssistantIdx(messages, seq.msgIdx), args: truncateToolArgs(tc.args ?? {}, 4), ...outcome(seq.raw) });
|
|
683
|
+
toolCalls.push({ name: str(tc.name) || 'tool', snippet: toolResultSnippet(seq.raw), tid: str(tc.tid), assistant_msg_idx: nearestAssistantIdx(messages, seq.msgIdx), args: truncateToolArgs(tc.args ?? {}, 4), ...outcome(seq.raw, str(tc.name)) });
|
|
587
684
|
});
|
|
588
685
|
}
|
|
589
686
|
for (let i = toolCalls.length - 1; i >= 0; i -= 1) {
|
|
@@ -603,7 +700,7 @@ export function extractToolCallsFromMessages(messages, liveToolCalls = [], recor
|
|
|
603
700
|
* (recorded live, else `null`), `result` (the result snippet, else `null`) and `result_view` (its display sections, TAL-315,
|
|
604
701
|
* else `null`). Returns copies; stored rows are untouched.
|
|
605
702
|
*/
|
|
606
|
-
export function withToolCallOutcomes(messages, sessionToolCalls, activeTurnId) {
|
|
703
|
+
export function withToolCallOutcomes(messages, sessionToolCalls, activeTurnId, baseIndex = 0) {
|
|
607
704
|
// Every identifier a stored call may carry (`ToolCallSchema`).
|
|
608
705
|
const callId = (tc) => (isDict(tc) ? toolCallId(tc) || str(tc.tool_call_id) : '');
|
|
609
706
|
// Providers may reuse an id (`call_1` in every response), so a reply answers the latest earlier assistant row that
|
|
@@ -620,7 +717,7 @@ export function withToolCallOutcomes(messages, sessionToolCalls, activeTurnId) {
|
|
|
620
717
|
if (!isDict(m))
|
|
621
718
|
return;
|
|
622
719
|
if (m.role === 'tool')
|
|
623
|
-
answer(str(m.tool_call_id) || str(m.tool_use_id), { content: m.content, is_error: false });
|
|
720
|
+
answer(str(m.tool_call_id) || str(m.tool_use_id), { content: m.content, is_error: false, display_metadata: m.display_metadata });
|
|
624
721
|
else if (m.role === 'user' && Array.isArray(m.content)) {
|
|
625
722
|
// Anthropic-style results: `tool_result` blocks in a user row, each naming its call.
|
|
626
723
|
for (const part of m.content)
|
|
@@ -657,7 +754,7 @@ export function withToolCallOutcomes(messages, sessionToolCalls, activeTurnId) {
|
|
|
657
754
|
// Calls known only from a record: the session-level list's, and the live calls a failed or cancelled turn's partial
|
|
658
755
|
// snapshot kept (`_partial_tool_calls`).
|
|
659
756
|
const records = [];
|
|
660
|
-
const rowRecords = recordedByRow.get(index) ?? [];
|
|
757
|
+
const rowRecords = recordedByRow.get(baseIndex + index) ?? [];
|
|
661
758
|
const recorded = new Map(rowRecords.filter((tc) => str(tc.tid)).map((tc) => [str(tc.tid), tc]));
|
|
662
759
|
for (const tc of [...rowRecords, ...(Array.isArray(m._partial_tool_calls) ? m._partial_tool_calls : [])]) {
|
|
663
760
|
if (!isDict(tc))
|
|
@@ -674,12 +771,12 @@ export function withToolCallOutcomes(messages, sessionToolCalls, activeTurnId) {
|
|
|
674
771
|
const running = Boolean(activeTurnId) && m._turn_id === activeTurnId;
|
|
675
772
|
const resolve = (id, name, rec, answered) => {
|
|
676
773
|
const reply = id ? replies.get(key(index, id)) : undefined;
|
|
677
|
-
const outcome = reply ?
|
|
774
|
+
const outcome = reply ? toolOutcome(reply.content, name, reply.is_error) : null;
|
|
678
775
|
// TAL-448: a file edit's change, from its full reply, else the one its live record decided.
|
|
679
|
-
const editDiff = reply ? toolEditDiff(name, reply.content) : decidedEditDiff(rec?.edit_diff);
|
|
776
|
+
const editDiff = reply ? toolEditDiff(name, reply.content, reply.display_metadata) : decidedEditDiff(rec?.edit_diff);
|
|
680
777
|
return {
|
|
681
778
|
...(editDiff ? { edit_diff: editDiff } : {}),
|
|
682
|
-
done: Boolean(reply) || answered || !running, is_error: outcome ? outcome.
|
|
779
|
+
done: Boolean(reply) || answered || !running, is_error: outcome ? outcome.is_error : rec?.is_error === true,
|
|
683
780
|
duration: finiteOrNull(rec?.duration), result: outcome ? outcome.result_text : typeof rec?.snippet === 'string' ? rec.snippet : null,
|
|
684
781
|
result_view: outcome ? outcome.result_view : isDict(rec?.result_view) ? decidedResultView(rec.result_view) : typeof rec?.snippet === 'string' ? toolResultView(rec.snippet) : null,
|
|
685
782
|
};
|
|
@@ -752,7 +849,13 @@ export function buildPartialMessage(contentText, reasoningText, toolCalls, now =
|
|
|
752
849
|
if (hasReasoning)
|
|
753
850
|
msg.reasoning = reasoningText.trim();
|
|
754
851
|
if (hasTools)
|
|
755
|
-
msg._partial_tool_calls =
|
|
852
|
+
msg._partial_tool_calls = toolCalls.map((call) => {
|
|
853
|
+
if (!isDict(call))
|
|
854
|
+
return call;
|
|
855
|
+
const stored = { ...call };
|
|
856
|
+
delete stored.progress;
|
|
857
|
+
return stored;
|
|
858
|
+
});
|
|
756
859
|
return msg;
|
|
757
860
|
}
|
|
758
861
|
/**
|
|
@@ -800,7 +903,7 @@ export function journalOutputRows(events, turnId) {
|
|
|
800
903
|
at = e.created_at || at;
|
|
801
904
|
}
|
|
802
905
|
flush();
|
|
803
|
-
const done =
|
|
906
|
+
const done = selectAuthoritativeTerminalEvent(events);
|
|
804
907
|
if (done?.event !== 'done')
|
|
805
908
|
return { rows, answered: false };
|
|
806
909
|
// The last row answers only with visible prose and no calls after it (a reasoning-only segment is no answer).
|
|
@@ -945,8 +1048,7 @@ export function normalizeAssistantDisplay(message) {
|
|
|
945
1048
|
* TAL-493: once a boundary or settled turn recorded the highest state.db id it read (`stateDbSeenId`) and the rows carry
|
|
946
1049
|
* ids, identity replaces the timestamp rules: rows up to that id are covered, and every newer row not already in the
|
|
947
1050
|
* sidecar is appended, even one a writer stamped before the newest local row or the watermark but committed later.
|
|
948
|
-
*
|
|
949
|
-
* add it if a mixed WebUI/CLI transcript shows duplicated turns.
|
|
1051
|
+
* Direct and absorbed durable identities cover merged Agent prompts even when their text and timestamp changed.
|
|
950
1052
|
*/
|
|
951
1053
|
export function mergeSessionMessagesAppendOnly(sidecar, state, opts = {}) {
|
|
952
1054
|
const watermark = Number(opts.truncationWatermark);
|
|
@@ -954,32 +1056,43 @@ export function mergeSessionMessagesAppendOnly(sidecar, state, opts = {}) {
|
|
|
954
1056
|
if (!state.length)
|
|
955
1057
|
return sidecar;
|
|
956
1058
|
const ts = (m) => { const n = Number(m.timestamp); return Number.isFinite(n) ? n : null; };
|
|
957
|
-
const key =
|
|
1059
|
+
const key = stateDbMessageKey;
|
|
958
1060
|
const seenId = opts.stateDbSeenId;
|
|
1061
|
+
const generation = opts.stateDbGeneration ?? null;
|
|
1062
|
+
const includeUids = state.some((m) => stateDbIdentityKeys(m).some((id) => id.startsWith('uid:')));
|
|
1063
|
+
const identities = (m) => stateDbIdentityKeys(m, includeUids, generation);
|
|
1064
|
+
const representedIds = new Set(sidecar.flatMap((m) => identities(m)));
|
|
1065
|
+
const isRepresented = (m) => stateDbMessageRepresented(m, representedIds, includeUids, generation);
|
|
1066
|
+
const rememberIds = (m) => { for (const id of identities(m))
|
|
1067
|
+
representedIds.add(id); };
|
|
959
1068
|
if (typeof seenId === 'number' && Number.isFinite(seenId) && state.some((m) => stateDbRowId(m) !== null)) {
|
|
960
|
-
// Each local row stands for at most one new state.db row: a persisted copy by its id, any other by its key.
|
|
961
|
-
const localIds = new Set(sidecar.map(stateDbRowId));
|
|
962
1069
|
const localKeys = new Map();
|
|
963
1070
|
for (const m of sidecar)
|
|
964
|
-
if (
|
|
1071
|
+
if (!identities(m).length)
|
|
965
1072
|
localKeys.set(key(m), (localKeys.get(key(m)) ?? 0) + 1);
|
|
966
|
-
|
|
967
|
-
for (const m of state) {
|
|
968
|
-
const id = stateDbRowId(m);
|
|
969
|
-
if (id !== null && localIds.has(id))
|
|
970
|
-
continue;
|
|
971
|
-
// In state.db order, so a covered row matches its own local copy before a newer duplicate can.
|
|
972
|
-
const left = localKeys.get(key(m)) ?? 0;
|
|
973
|
-
if (left > 0) {
|
|
974
|
-
localKeys.set(key(m), left - 1);
|
|
975
|
-
continue;
|
|
976
|
-
}
|
|
977
|
-
if (id === null || id <= seenId)
|
|
978
|
-
continue;
|
|
979
|
-
merged.push(m);
|
|
980
|
-
}
|
|
981
|
-
return merged;
|
|
1073
|
+
return [...sidecar, ...appendStateDbIdentityRows(state, seenId, representedIds, localKeys, generation, includeUids)];
|
|
982
1074
|
}
|
|
1075
|
+
// Legacy sidecars may have no seen marker or row IDs. A verified copy can still match its archived
|
|
1076
|
+
// source's exact role/timestamp/content key. This only removes represented copies; the timestamp
|
|
1077
|
+
// and truncate/compress gates below continue to decide which remaining rows may be appended.
|
|
1078
|
+
const represented = new Set();
|
|
1079
|
+
const remember = (message) => {
|
|
1080
|
+
represented.add(stateDbMessageFingerprint(message));
|
|
1081
|
+
if (typeof message._state_db_source_key === 'string')
|
|
1082
|
+
represented.add(message._state_db_source_key);
|
|
1083
|
+
};
|
|
1084
|
+
for (const message of sidecar)
|
|
1085
|
+
remember(message);
|
|
1086
|
+
state = state.filter((message) => {
|
|
1087
|
+
if (isRepresented(message))
|
|
1088
|
+
return false;
|
|
1089
|
+
const sourceKey = message._state_db_source_key;
|
|
1090
|
+
if (typeof sourceKey === 'string' && represented.has(sourceKey))
|
|
1091
|
+
return false;
|
|
1092
|
+
remember(message);
|
|
1093
|
+
rememberIds(message);
|
|
1094
|
+
return true;
|
|
1095
|
+
});
|
|
983
1096
|
if (!sidecar.length) {
|
|
984
1097
|
if (!hasWatermark) {
|
|
985
1098
|
const seen = new Set();
|
|
@@ -1005,7 +1118,8 @@ export function mergeSessionMessagesAppendOnly(sidecar, state, opts = {}) {
|
|
|
1005
1118
|
if (seen.has(k))
|
|
1006
1119
|
continue;
|
|
1007
1120
|
const t = ts(m);
|
|
1008
|
-
|
|
1121
|
+
// A kept-message compaction summary inherits the reply's old timestamp, but is new history.
|
|
1122
|
+
if (maxSidecar !== null && t !== null && t <= maxSidecar && m._context_compression_marker !== true)
|
|
1009
1123
|
continue;
|
|
1010
1124
|
if (hasWatermark && t !== null && (t <= watermark || !advanced))
|
|
1011
1125
|
continue;
|
|
@@ -1014,10 +1128,28 @@ export function mergeSessionMessagesAppendOnly(sidecar, state, opts = {}) {
|
|
|
1014
1128
|
}
|
|
1015
1129
|
return merged;
|
|
1016
1130
|
}
|
|
1017
|
-
/**
|
|
1018
|
-
function
|
|
1019
|
-
const
|
|
1020
|
-
|
|
1131
|
+
/** Shared identity-mode append step; an indexed prefix supplies the same witnesses without visiting its rows. */
|
|
1132
|
+
export function appendStateDbIdentityRows(state, seenId, represented, localKeys, generation, includeUids) {
|
|
1133
|
+
const added = new Set();
|
|
1134
|
+
const consumed = new Map();
|
|
1135
|
+
const witnesses = { has: (id) => represented.has(id) || added.has(id) };
|
|
1136
|
+
const appended = [];
|
|
1137
|
+
for (const m of state) {
|
|
1138
|
+
if (stateDbMessageRepresented(m, witnesses, includeUids, generation))
|
|
1139
|
+
continue;
|
|
1140
|
+
const id = stateDbRowId(m), key = stateDbMessageKey(m);
|
|
1141
|
+
const used = consumed.get(key) ?? 0;
|
|
1142
|
+
const left = (localKeys.get(key) ?? 0) - used;
|
|
1143
|
+
if (left > 0 && (m._state_db_authored_change !== true || id === null || id <= seenId))
|
|
1144
|
+
consumed.set(key, used + 1);
|
|
1145
|
+
else if (id !== null && id > seenId)
|
|
1146
|
+
appended.push(m);
|
|
1147
|
+
else
|
|
1148
|
+
continue;
|
|
1149
|
+
for (const identity of stateDbIdentityKeys(m, includeUids, generation))
|
|
1150
|
+
added.add(identity);
|
|
1151
|
+
}
|
|
1152
|
+
return appended;
|
|
1021
1153
|
}
|
|
1022
1154
|
/** TAL-493: the `state_db_seen_id` after reading `rows`: their highest id, or null when they carry none. */
|
|
1023
1155
|
export function stateDbSeenId(rows) {
|
|
@@ -1103,6 +1235,44 @@ export function withDisplayMedia(messages, project) {
|
|
|
1103
1235
|
return out;
|
|
1104
1236
|
});
|
|
1105
1237
|
}
|
|
1238
|
+
/** Anthropic-style tool calls: `tool_use` blocks in the content array, interleaved with the text around them. */
|
|
1239
|
+
export function hasToolUseBlocks(message) {
|
|
1240
|
+
return Array.isArray(message.content) && message.content.some((part) => isDict(part) && part.type === 'tool_use');
|
|
1241
|
+
}
|
|
1242
|
+
/**
|
|
1243
|
+
* The final answer rule: the turn's last assistant row, with visible content, no tool calls, not interim or partial.
|
|
1244
|
+
* A Stop row is no answer: its outcome is the status (TAL-364; older rows still carry English copy).
|
|
1245
|
+
*/
|
|
1246
|
+
export function finalAnswerOf(last) {
|
|
1247
|
+
if ((Array.isArray(last.tool_calls) && last.tool_calls.length > 0) || hasToolUseBlocks(last) || last._interim === true || last._partial === true)
|
|
1248
|
+
return '';
|
|
1249
|
+
if (last._error === true && (last._terminal_state === 'cancelled' || last.provider_details_label === 'Cancellation details'))
|
|
1250
|
+
return '';
|
|
1251
|
+
return splitDisplayText(messageText(last.content))[0];
|
|
1252
|
+
}
|
|
1253
|
+
/** Conversation classification shared by the indexed selector and the hydrated projection. */
|
|
1254
|
+
export function isConversationalAssistant(message) {
|
|
1255
|
+
return isDict(message) && message.role === 'assistant' && !agentRowKind(message) && !markerKind(message)
|
|
1256
|
+
&& !message._marker_kind && !message._notice_kind && !message._background_silent && !message._background_update && !message._delivery;
|
|
1257
|
+
}
|
|
1258
|
+
/** Absolute coordinate of the newest settled visible answer; running and answerless turns never displace it. */
|
|
1259
|
+
export function newestSettledReply(messages, activeTurnId, offset = 0) {
|
|
1260
|
+
const visited = new Set();
|
|
1261
|
+
for (let i = messages.length - 1; i >= 0; i -= 1) {
|
|
1262
|
+
const m = messages[i];
|
|
1263
|
+
if (!isConversationalAssistant(m))
|
|
1264
|
+
continue;
|
|
1265
|
+
const turn = typeof m._turn_id === 'string' ? m._turn_id : `row:${offset + i}`;
|
|
1266
|
+
if (turn === activeTurnId || visited.has(turn))
|
|
1267
|
+
continue;
|
|
1268
|
+
visited.add(turn);
|
|
1269
|
+
const scene = m._anchor_activity_scene;
|
|
1270
|
+
const answer = isDict(scene) ? str(scene.final_answer) : finalAnswerOf(m);
|
|
1271
|
+
if (!m._error && !m._partial && !m._interim && splitDisplayText(answer)[0].trim())
|
|
1272
|
+
return offset + i;
|
|
1273
|
+
}
|
|
1274
|
+
return null;
|
|
1275
|
+
}
|
|
1106
1276
|
/** TAL-456: a settled user or assistant body longer than this ships a collapsed excerpt for clients to render. */
|
|
1107
1277
|
export const BODY_EXCERPT_LIMIT = 3000;
|
|
1108
1278
|
const graphemes = new Intl.Segmenter(undefined, { granularity: 'grapheme' });
|
|
@@ -1124,20 +1294,28 @@ function bodyExcerpt(text) {
|
|
|
1124
1294
|
/**
|
|
1125
1295
|
* TAL-456: stamps `_display_excerpt` and `_display_truncated` on settled user and assistant rows whose display text is longer than
|
|
1126
1296
|
* `BODY_EXCERPT_LIMIT`, and `final_answer_excerpt` on a settled scene whose final answer is, so clients render a bounded
|
|
1127
|
-
* excerpt instead of laying out the whole body.
|
|
1297
|
+
* excerpt instead of laying out the whole body. The newest settled answer and running turn stay full; copy and edit retain full text.
|
|
1128
1298
|
* Runs after scene hydration. Returns copies; stored rows are untouched.
|
|
1129
1299
|
*/
|
|
1130
|
-
export function withBodyExcerpts(messages, activeTurnId) {
|
|
1131
|
-
return messages.map((m) => {
|
|
1300
|
+
export function withBodyExcerpts(messages, activeTurnId, newestReplyIndex = newestSettledReply(messages, activeTurnId), offset = 0) {
|
|
1301
|
+
return messages.map((m, index) => {
|
|
1132
1302
|
if (!isDict(m) || (m.role !== 'user' && m.role !== 'assistant'))
|
|
1133
1303
|
return m;
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1304
|
+
let out = { ...m };
|
|
1305
|
+
delete out._display_excerpt;
|
|
1306
|
+
delete out._display_truncated;
|
|
1307
|
+
if (isDict(out._anchor_activity_scene)) {
|
|
1308
|
+
const scene = { ...out._anchor_activity_scene };
|
|
1309
|
+
delete scene.final_answer_excerpt;
|
|
1310
|
+
out._anchor_activity_scene = scene;
|
|
1311
|
+
}
|
|
1312
|
+
if ((activeTurnId && m._turn_id === activeTurnId) || index + offset === newestReplyIndex)
|
|
1313
|
+
return out;
|
|
1314
|
+
// A delivery shows its body under its own label (TAL-816), so the excerpt is the body's.
|
|
1315
|
+
const text = isDict(m._delivery) ? str(m._delivery.body) : typeof m._display_content === 'string' ? m._display_content : messageText(m.content);
|
|
1138
1316
|
if (text.length > BODY_EXCERPT_LIMIT)
|
|
1139
1317
|
out = { ...out, _display_excerpt: bodyExcerpt(text), _display_truncated: true };
|
|
1140
|
-
const scene =
|
|
1318
|
+
const scene = out._anchor_activity_scene;
|
|
1141
1319
|
const finalAnswer = isDict(scene) ? (typeof scene.final_answer_display === 'string' ? scene.final_answer_display : scene.final_answer) : null;
|
|
1142
1320
|
if (isDict(scene) && typeof finalAnswer === 'string' && finalAnswer.length > BODY_EXCERPT_LIMIT) {
|
|
1143
1321
|
out = { ...out, _anchor_activity_scene: { ...scene, final_answer_excerpt: bodyExcerpt(finalAnswer) } };
|
|
@@ -1232,6 +1410,29 @@ function toolCallId(tc) {
|
|
|
1232
1410
|
return str(tc.id) || str(tc.call_id);
|
|
1233
1411
|
}
|
|
1234
1412
|
const API_SAFE_MSG_KEYS = new Set(['role', 'content', 'tool_calls', 'tool_call_id', 'tool_use_id', 'name', 'refusal', 'reasoning_content']);
|
|
1413
|
+
function messageDataUse(msg) {
|
|
1414
|
+
return msg.data_use ?? (isDict(msg.display_metadata) ? msg.display_metadata.data_use : undefined);
|
|
1415
|
+
}
|
|
1416
|
+
/** Derived prompts inherit the source session's requirements even when tool rows are outside the selected window. */
|
|
1417
|
+
export function withDataUseRequirements(prompt, source) {
|
|
1418
|
+
const requirements = new Set();
|
|
1419
|
+
for (const msg of source) {
|
|
1420
|
+
const value = messageDataUse(msg);
|
|
1421
|
+
if (value == null)
|
|
1422
|
+
continue;
|
|
1423
|
+
if (!Array.isArray(value) || value.some((item) => typeof item !== 'string'))
|
|
1424
|
+
throw new Error('Invalid connector privacy requirements');
|
|
1425
|
+
for (const requirement of value)
|
|
1426
|
+
requirements.add(requirement);
|
|
1427
|
+
}
|
|
1428
|
+
const dataUse = [...requirements].sort();
|
|
1429
|
+
return dataUse.length ? prompt.map((msg) => msg.role === 'user' ? { ...msg, data_use: dataUse } : msg) : prompt;
|
|
1430
|
+
}
|
|
1431
|
+
// TAL-927: the Agent's reload projection (`_rows_to_conversation`) restores these on assistant rows so prior reasoning
|
|
1432
|
+
// replays and keeps its signatures; turn history keeps them too. Persistence-only: the Agent strips them per route.
|
|
1433
|
+
const AGENT_ASSISTANT_REPLAY_KEYS = new Set(['reasoning', 'reasoning_details', 'codex_reasoning_items', 'codex_message_items', 'finish_reason']);
|
|
1434
|
+
// The opaque ones are bound to the provider that issued them.
|
|
1435
|
+
const PROVIDER_ISSUED_REASONING_KEYS = new Set(['reasoning_details', 'codex_reasoning_items', 'codex_message_items']);
|
|
1235
1436
|
const OOB_USER_MESSAGE_BLOCK_RE = /\[OUT-OF-BAND\s+USER\s+MESSAGE(?:\s*(?:—|-)\s*[\s\S]*?)?\]\s*?[\s\S]*?\[\/OUT-OF-BAND\s+USER\s+MESSAGE\]/gi;
|
|
1236
1437
|
const OOB_DELIVERY_RE = /^\s*\[OUT-OF-BAND\s+USER\s+MESSAGE[^\]]*\]\s*([\s\S]*?)\s*\[\/OUT-OF-BAND\s+USER\s+MESSAGE\]\s*$/i;
|
|
1237
1438
|
/** The Agent's own record of a steer it delivered (`display_kind: 'steer'`, an out-of-band block): its text, else null. */
|
|
@@ -1273,9 +1474,12 @@ function stripOobBlocks(content) {
|
|
|
1273
1474
|
* out-of-band blocks, and keeps a cancelled (`_recovered`) user prompt only where it separates two assistant turns —
|
|
1274
1475
|
* otherwise the neighbours fuse cleanly or the prompt is stale, and replaying it would answer it again.
|
|
1275
1476
|
* `preserveApiContent` (Python `_sanitize_messages_for_agent`) keeps the Agent's `api_content` replay sidecar on
|
|
1276
|
-
* user/assistant rows
|
|
1477
|
+
* user/assistant rows, every row's `timestamp`, and the assistant reasoning carriers the Agent replays (TAL-927) for
|
|
1478
|
+
* turn history; compression and other projections strip those replay fields. Tool `data_use` routing requirements stay
|
|
1479
|
+
* in both histories, lifted from durable `display_metadata` when needed. Provider-issued carriers stay only on rows stamped at
|
|
1480
|
+
* or after `issuedReasoningSince`, the turn provider's start; without one they stay home too.
|
|
1277
1481
|
*/
|
|
1278
|
-
export function sanitizeMessagesForApi(messages, { preserveApiContent = false } = {}) {
|
|
1482
|
+
export function sanitizeMessagesForApi(messages, { preserveApiContent = false, issuedReasoningSince = null, maxMessages = Infinity } = {}) {
|
|
1279
1483
|
// Calls are OpenAI `tool_calls` or Anthropic-style `tool_use` content blocks; results name them by `tool_call_id`,
|
|
1280
1484
|
// `tool_use_id`, or a user row's `tool_result` blocks.
|
|
1281
1485
|
const toolUseIds = (msg) => (Array.isArray(msg.content) ? msg.content.flatMap((part) => (isDict(part) && part.type === 'tool_use' && str(part.id) ? [str(part.id)] : [])) : []);
|
|
@@ -1300,7 +1504,7 @@ export function sanitizeMessagesForApi(messages, { preserveApiContent = false }
|
|
|
1300
1504
|
if (isReasoningOnlyAssistant(msg) && !replay)
|
|
1301
1505
|
continue;
|
|
1302
1506
|
// The Agent already received a steer mid-turn; its persisted row is display-only.
|
|
1303
|
-
if (msg._error || isDict(msg._steer))
|
|
1507
|
+
if (msg._error || isDict(msg._steer) || msg._notice_kind === 'session_finalize')
|
|
1304
1508
|
continue;
|
|
1305
1509
|
if (msg._partial && !messageText(msg.content).trim())
|
|
1306
1510
|
continue;
|
|
@@ -1310,7 +1514,16 @@ export function sanitizeMessagesForApi(messages, { preserveApiContent = false }
|
|
|
1310
1514
|
if (!tid || !validToolCallIds.has(tid))
|
|
1311
1515
|
continue;
|
|
1312
1516
|
}
|
|
1313
|
-
const
|
|
1517
|
+
const replayCarriers = preserveApiContent && msg.role === 'assistant';
|
|
1518
|
+
const issuedHere = issuedReasoningSince !== null && Number(msg.timestamp) >= issuedReasoningSince;
|
|
1519
|
+
const replayKey = (k) => replayCarriers && AGENT_ASSISTANT_REPLAY_KEYS.has(k) && (issuedHere || !PROVIDER_ISSUED_REASONING_KEYS.has(k));
|
|
1520
|
+
const sanitized = Object.fromEntries(Object.entries(msg).filter(([k]) => API_SAFE_MSG_KEYS.has(k) || replayKey(k)));
|
|
1521
|
+
// Agent routing metadata survives both turn and compression history; the Agent strips it before provider calls.
|
|
1522
|
+
if (msg.role === 'tool') {
|
|
1523
|
+
const dataUse = messageDataUse(msg);
|
|
1524
|
+
if (dataUse !== undefined)
|
|
1525
|
+
sanitized.data_use = dataUse;
|
|
1526
|
+
}
|
|
1314
1527
|
if (Array.isArray(sanitized.tool_calls) && !sanitized.tool_calls.length)
|
|
1315
1528
|
Reflect.deleteProperty(sanitized, 'tool_calls');
|
|
1316
1529
|
if (replay)
|
|
@@ -1367,9 +1580,46 @@ export function sanitizeMessagesForApi(messages, { preserveApiContent = false }
|
|
|
1367
1580
|
msg = Object.fromEntries(Object.entries(msg).filter(([k]) => k !== '_recovered'));
|
|
1368
1581
|
}
|
|
1369
1582
|
final.push(msg);
|
|
1583
|
+
if (final.length >= maxMessages)
|
|
1584
|
+
break;
|
|
1370
1585
|
}
|
|
1371
1586
|
return final;
|
|
1372
1587
|
}
|
|
1588
|
+
/** A revision's compression threshold, using the sanitizer itself and stopping once four retained rows prove it. */
|
|
1589
|
+
export class ApiMessageSummary {
|
|
1590
|
+
excludeTurn;
|
|
1591
|
+
displayHistory;
|
|
1592
|
+
rows = [];
|
|
1593
|
+
unidentified = [new Map(), new Map()];
|
|
1594
|
+
enough = false;
|
|
1595
|
+
marker = false;
|
|
1596
|
+
nextCheck = 4;
|
|
1597
|
+
constructor(excludeTurn = null, displayHistory = true) {
|
|
1598
|
+
this.excludeTurn = excludeTurn;
|
|
1599
|
+
this.displayHistory = displayHistory;
|
|
1600
|
+
}
|
|
1601
|
+
add(row) {
|
|
1602
|
+
if (this.enough)
|
|
1603
|
+
return;
|
|
1604
|
+
if (this.displayHistory && (row._error || row._partial))
|
|
1605
|
+
return;
|
|
1606
|
+
this.marker ||= isContextCompressionMarker(row);
|
|
1607
|
+
if (this.enough || (this.excludeTurn && row._turn_id === this.excludeTurn))
|
|
1608
|
+
return;
|
|
1609
|
+
this.rows.push(row);
|
|
1610
|
+
for (const [mode, includeUids] of [false, true].entries())
|
|
1611
|
+
if (!stateDbIdentityKeys(row, includeUids).length) {
|
|
1612
|
+
const key = stateDbMessageKey(row);
|
|
1613
|
+
this.unidentified[mode].set(key, (this.unidentified[mode].get(key) ?? 0) + 1);
|
|
1614
|
+
}
|
|
1615
|
+
if (this.rows.length >= this.nextCheck) {
|
|
1616
|
+
this.finish();
|
|
1617
|
+
this.nextCheck *= 2;
|
|
1618
|
+
}
|
|
1619
|
+
}
|
|
1620
|
+
finish() { if (!this.enough)
|
|
1621
|
+
this.enough = sanitizeMessagesForApi(this.rows, { maxMessages: 4 }).length >= 4; }
|
|
1622
|
+
}
|
|
1373
1623
|
const isNativeImagePart = (part) => isDict(part) && (part.type === 'image_url' || 'image_url' in part);
|
|
1374
1624
|
/** True when any row's content carries a native `image_url` part. */
|
|
1375
1625
|
export function hasNativeImages(messages) {
|