@maudecode/talaria-web 1.18.0 → 1.19.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 +32 -32
- package/dist/api/automation-raw.js.map +1 -1
- package/dist/api/automation-router.d.ts +102 -22
- package/dist/api/automation-router.js +15 -13
- package/dist/api/automation-router.js.map +1 -1
- package/dist/api/chat-router.d.ts +1205 -34
- package/dist/api/chat-router.js +158 -78
- package/dist/api/chat-router.js.map +1 -1
- package/dist/api/git-router.d.ts +2 -2
- package/dist/api/git-router.js +29 -29
- package/dist/api/git-router.js.map +1 -1
- package/dist/api/raw-routes.d.ts +3 -3
- package/dist/api/raw-routes.js +63 -61
- package/dist/api/raw-routes.js.map +1 -1
- package/dist/api/router.d.ts +6 -6
- 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 +1928 -124
- package/dist/api/sessions-router.js +177 -173
- package/dist/api/sessions-router.js.map +1 -1
- package/dist/api/settings-router.d.ts +427 -9
- package/dist/api/settings-router.js +48 -32
- package/dist/api/settings-router.js.map +1 -1
- package/dist/api/sse-routes.d.ts +2 -2
- package/dist/api/sse-routes.js +63 -63
- 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 +663 -91
- package/dist/api/tools-router.js +309 -52
- 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 +66 -47
- package/dist/app.js.map +1 -1
- package/dist/auth/gate.js +10 -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 +2 -1
- 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 +85 -0
- package/dist/cli/main.js.map +1 -0
- package/dist/cli/supervise.d.ts +2 -0
- package/dist/cli/supervise.js +67 -4
- package/dist/cli/supervise.js.map +1 -1
- package/dist/config/agent-config.d.ts +34 -11
- package/dist/config/agent-config.js +113 -58
- 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 +1 -0
- package/dist/fs/atomic.js +4 -1
- package/dist/fs/atomic.js.map +1 -1
- package/dist/fs/stat.d.ts +1 -0
- package/dist/fs/stat.js +11 -0
- package/dist/fs/stat.js.map +1 -0
- package/dist/http/context.d.ts +14 -9
- package/dist/http/context.js +29 -20
- 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 +10 -4
- package/dist/profiles/profiles.js +77 -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 +78 -12
- package/dist/providers/catalog.js +445 -141
- 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 +18 -9
- package/dist/redact.js.map +1 -1
- package/dist/release.d.ts +7 -0
- package/dist/release.js +14 -0
- package/dist/release.js.map +1 -1
- package/dist/runtime.d.ts +5 -1
- package/dist/runtime.js +233 -90
- package/dist/runtime.js.map +1 -1
- package/dist/server.js +10 -0
- package/dist/server.js.map +1 -1
- package/dist/sessions/anchor.d.ts +9 -3
- package/dist/sessions/anchor.js +28 -36
- 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 +26 -20
- package/dist/sessions/background-tasks.js +88 -86
- 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 +15 -5
- package/dist/sessions/cli-sessions.js +62 -43
- package/dist/sessions/cli-sessions.js.map +1 -1
- package/dist/sessions/completions.d.ts +30 -2
- package/dist/sessions/completions.js +294 -53
- 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/gateway-sessions.d.ts +46 -0
- package/dist/sessions/gateway-sessions.js +378 -0
- package/dist/sessions/gateway-sessions.js.map +1 -0
- 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 +27 -18
- package/dist/sessions/list.js +133 -131
- package/dist/sessions/list.js.map +1 -1
- package/dist/sessions/merge.d.ts +68 -10
- package/dist/sessions/merge.js +259 -51
- 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 +82 -0
- package/dist/sessions/prefix-index.js +232 -0
- package/dist/sessions/prefix-index.js.map +1 -0
- package/dist/sessions/recovery.d.ts +4 -7
- package/dist/sessions/recovery.js +97 -281
- 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 +162 -59
- package/dist/sessions/service.js +1133 -521
- package/dist/sessions/service.js.map +1 -1
- package/dist/sessions/session.d.ts +18 -2
- package/dist/sessions/session.js +29 -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 +3 -1
- package/dist/sessions/state-db-worker.js.map +1 -1
- package/dist/sessions/state-db.d.ts +53 -8
- package/dist/sessions/state-db.js +576 -50
- package/dist/sessions/state-db.js.map +1 -1
- package/dist/sessions/storage/backend.d.ts +162 -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 +23 -0
- package/dist/sessions/storage/json-documents.js +233 -0
- package/dist/sessions/storage/json-documents.js.map +1 -0
- package/dist/sessions/storage/json-files.d.ts +12 -0
- package/dist/sessions/storage/json-files.js +124 -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 +114 -0
- package/dist/sessions/storage/json-journal.js +686 -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 +68 -0
- package/dist/sessions/storage/json.js +258 -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 +63 -73
- package/dist/sessions/store.js +305 -611
- package/dist/sessions/store.js.map +1 -1
- package/dist/sessions/streams.d.ts +4 -0
- package/dist/sessions/streams.js +9 -1
- 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 +5 -4
- package/dist/sessions/tool-display.js +22 -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 +7 -4
- package/dist/sessions/turn-context.js.map +1 -1
- package/dist/sessions/turn.d.ts +87 -17
- package/dist/sessions/turn.js +795 -347
- 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 +17 -3
- package/dist/sidecar/client.js +78 -8
- 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.js +19 -2
- package/dist/sidecar/fake.js.map +1 -1
- 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/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 +38 -1
- package/dist/tools/crons.js +82 -15
- package/dist/tools/crons.js.map +1 -1
- package/dist/tools/dashboard-plugins.d.ts +5 -5
- package/dist/tools/dashboard-plugins.js +14 -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 +62 -0
- package/dist/tools/gateway-restart.js +142 -0
- package/dist/tools/gateway-restart.js.map +1 -0
- package/dist/tools/health.d.ts +15 -3
- package/dist/tools/health.js +97 -34
- 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/kanban.d.ts +4 -2
- package/dist/tools/kanban.js +28 -19
- package/dist/tools/kanban.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-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/skills.d.ts +9 -4
- package/dist/tools/skills.js +44 -13
- package/dist/tools/skills.js.map +1 -1
- package/dist/tools/update-notifications.d.ts +34 -15
- package/dist/tools/update-notifications.js +141 -57
- 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 +93 -33
- package/dist/tools/updates.js +1051 -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 +31 -20
- package/dist/workspace/media.js.map +1 -1
- package/dist/workspace/rollback.d.ts +2 -2
- package/dist/workspace/rollback.js +5 -5
- 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 +5 -3
- package/sidecar/agent_dependency.json +4 -4
- package/sidecar/agent_support.json +26 -0
- package/sidecar/scripts/record-fixtures.py +12 -3
- package/sidecar/scripts/replay_sidecar.py +8 -0
- package/sidecar/scripts/suite_runner.py +302 -0
- package/sidecar/scripts/test.sh +12 -4
- package/sidecar/talaria_sidecar/__init__.py +6 -1
- package/sidecar/talaria_sidecar/__main__.py +4 -2
- package/sidecar/talaria_sidecar/agent_mutation.py +975 -0
- package/sidecar/talaria_sidecar/agent_services.py +1053 -0
- package/sidecar/talaria_sidecar/dependency_sync.py +85 -0
- package/sidecar/talaria_sidecar/home.py +43 -1
- package/sidecar/talaria_sidecar/methods/__init__.py +2 -2
- package/sidecar/talaria_sidecar/methods/aux.py +139 -31
- package/sidecar/talaria_sidecar/methods/chat.py +847 -134
- package/sidecar/talaria_sidecar/methods/commands.py +213 -4
- package/sidecar/talaria_sidecar/methods/config.py +123 -4
- package/sidecar/talaria_sidecar/methods/connectors.py +343 -0
- package/sidecar/talaria_sidecar/methods/cron.py +366 -34
- package/sidecar/talaria_sidecar/methods/cron_execution.py +284 -0
- package/sidecar/talaria_sidecar/methods/gateway.py +194 -54
- package/sidecar/talaria_sidecar/methods/gateway_sessions.py +234 -0
- package/sidecar/talaria_sidecar/methods/goals.py +81 -41
- package/sidecar/talaria_sidecar/methods/kanban.py +80 -27
- package/sidecar/talaria_sidecar/methods/memory.py +84 -0
- package/sidecar/talaria_sidecar/methods/oauth.py +5 -2
- package/sidecar/talaria_sidecar/methods/process.py +160 -11
- package/sidecar/talaria_sidecar/methods/profiles.py +44 -6
- package/sidecar/talaria_sidecar/methods/providers.py +196 -26
- package/sidecar/talaria_sidecar/methods/runtime.py +69 -1
- package/sidecar/talaria_sidecar/methods/skills.py +67 -4
- package/sidecar/talaria_sidecar/methods/state_db.py +277 -70
- 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 +49 -0
- package/sidecar/talaria_sidecar/methods/usage.py +113 -14
- package/sidecar/talaria_sidecar/methods/worktree.py +26 -19
- package/sidecar/talaria_sidecar/methods/write_approval.py +181 -0
- package/sidecar/talaria_sidecar/rpc.py +45 -4
- package/sidecar/talaria_sidecar/runtime.py +81 -12
- package/sidecar/talaria_sidecar/speed.py +35 -0
- package/static/dist/FILES.txt +126 -127
- package/static/dist/assets/AppShell-cey33v9s.js +8 -0
- package/static/dist/assets/ChatPage-i8wnugr7.js +18 -0
- package/static/dist/assets/ConnectTargets-hg19553x.js +1 -0
- package/static/dist/assets/ExtensionRoute-cly4apm5.js +1 -0
- package/static/dist/assets/Field-j8uqoigz.js +9 -0
- package/static/dist/assets/HubRoute-e4bgz41j.js +2 -0
- package/static/dist/assets/Markdown-lahuichm.js +598 -0
- package/static/dist/assets/RightPanel-lbo4i0fn.js +1 -0
- package/static/dist/assets/Select-gqatm2e0.js +1 -0
- package/static/dist/assets/SessionListPanel-mfqayfjh.js +1 -0
- package/static/dist/assets/SettingsLayout-b8980u7k.js +1 -0
- package/static/dist/assets/States-e7dkgtxf.js +1 -0
- package/static/dist/assets/Toaster-bfqqy786.js +1 -0
- package/static/dist/assets/_app-n1n6pfx1.js +1 -0
- package/static/dist/assets/{_app.ext._extensionId-gfbzpoou.js → _app.ext._extensionId-buxjxav3.js} +1 -1
- package/static/dist/assets/_app.index-jt8zwiu2.js +1 -0
- package/static/dist/assets/_app.insights-cv76ml71.js +1 -0
- package/static/dist/assets/_app.kanban-h6ts53j7.js +1 -0
- package/static/dist/assets/_app.logs-dm873z90.js +1 -0
- package/static/dist/assets/_app.memory-glk5y6m8.js +1 -0
- package/static/dist/assets/_app.profiles-ka6zpstq.js +1 -0
- package/static/dist/assets/{_app.session._sessionId-fn1bhde6.js → _app.session._sessionId-g2vzghvc.js} +1 -1
- package/static/dist/assets/_app.settings-hgjdhzcd.js +1 -0
- package/static/dist/assets/_app.settings._section-jf2kmhae.js +3 -0
- package/static/dist/assets/_app.skills-cii852yq.js +1 -0
- package/static/dist/assets/_app.tasks-fp9q7atm.js +1 -0
- package/static/dist/assets/_app.todos-dw94qzue.js +1 -0
- package/static/dist/assets/_app.workspaces-inyygzze.js +1 -0
- package/static/dist/assets/{abnfDiagram-VCTEODGH-c8kdixke.js → abnfDiagram-VCTEODGH-gjayq3ra.js} +1 -1
- package/static/dist/assets/architecture-7GRP2DOG-lp56972r.js +1 -0
- package/static/dist/assets/{architectureDiagram-5GKGNRK7-cku06x1p.js → architectureDiagram-5GKGNRK7-nwb3xovn.js} +1 -1
- package/static/dist/assets/archive-b1j004vn.js +1 -0
- package/static/dist/assets/back-g74gkozu.js +1 -0
- package/static/dist/assets/{blockDiagram-I7D4REHJ-jzthp1wa.js → blockDiagram-I7D4REHJ-joedghi3.js} +1 -1
- package/static/dist/assets/{c4Diagram-7LVT6UL2-mwr67mt8.js → c4Diagram-7LVT6UL2-hyrjrohe.js} +1 -1
- package/static/dist/assets/channel-es95o4y8.js +1 -0
- package/static/dist/assets/{chunk-4HAMMTFA-gpq1y228.js → chunk-4HAMMTFA-koouqbut.js} +1 -1
- package/static/dist/assets/{chunk-75Z2AOVW-ktje58c4.js → chunk-75Z2AOVW-bl4bhdnt.js} +1 -1
- package/static/dist/assets/{chunk-DU6HZSFF-ofajdixh.js → chunk-DU6HZSFF-gpedttsp.js} +3 -3
- package/static/dist/assets/{chunk-F27PBJKO-cmev85ti.js → chunk-F27PBJKO-d8xxi0zi.js} +1 -1
- package/static/dist/assets/{chunk-GMAD6QVW-htjgt22y.js → chunk-GMAD6QVW-jro0hl73.js} +1 -1
- package/static/dist/assets/{chunk-GVQU2GXP-qndvoxl7.js → chunk-GVQU2GXP-djn6gbyu.js} +1 -1
- package/static/dist/assets/{chunk-IMKFNOWR-e5bkd5q6.js → chunk-IMKFNOWR-vw4p5p7o.js} +1 -1
- package/static/dist/assets/{chunk-L3NEJ4N5-mj1155r6.js → chunk-L3NEJ4N5-n1hj77q8.js} +1 -1
- package/static/dist/assets/{chunk-OSK3NFVY-e7gkikcw.js → chunk-OSK3NFVY-oy0gwn2n.js} +1 -1
- package/static/dist/assets/{chunk-P2QGCYS3-f7t54xfm.js → chunk-P2QGCYS3-onf1hz6c.js} +1 -1
- package/static/dist/assets/{chunk-POPQ4Y6H-i927v9oa.js → chunk-POPQ4Y6H-m8sqn7cs.js} +1 -1
- package/static/dist/assets/{chunk-PWAF6VOD-m84lmnyt.js → chunk-PWAF6VOD-ek4smc8x.js} +1 -1
- package/static/dist/assets/{chunk-SHT3W25Y-mi0tlcu9.js → chunk-SHT3W25Y-g9gfvefo.js} +3 -3
- package/static/dist/assets/{chunk-SVP7TREG-dnau702j.js → chunk-SVP7TREG-f9nfv2cu.js} +1 -1
- package/static/dist/assets/{chunk-TICWLB2K-edem1gkg.js → chunk-TICWLB2K-bnk3m1mq.js} +1 -1
- package/static/dist/assets/classDiagram-ZZMXUADV-kmihoqxh.js +1 -0
- package/static/dist/assets/classDiagram-v2-VYDZK3BY-kmihoqxh.js +1 -0
- package/static/dist/assets/copied-bli9tbcx.js +1 -0
- package/static/dist/assets/{copy-magtofyp.js → copy-jamtd1pf.js} +1 -1
- package/static/dist/assets/{cynefin-OW5HDTMX-siqlulkl.js → cynefin-OW5HDTMX-f8xfdd3f.js} +1 -1
- package/static/dist/assets/{cynefinDiagram-5FMLGOSQ-i648tah9.js → cynefinDiagram-5FMLGOSQ-n9lb99h9.js} +1 -1
- package/static/dist/assets/{dagre-GXQ25YYZ-mwn6uc17.js → dagre-GXQ25YYZ-dgailddi.js} +4 -4
- package/static/dist/assets/{diagram-S7CK7UJ4-l8abxaes.js → diagram-S7CK7UJ4-m6aeoe7c.js} +1 -1
- package/static/dist/assets/{diagram-UQ7AKVKN-mekq7zgq.js → diagram-UQ7AKVKN-jall3j0x.js} +1 -1
- package/static/dist/assets/{diagram-VSXAHHWV-fnky6lvc.js → diagram-VSXAHHWV-hbawi7hn.js} +1 -1
- package/static/dist/assets/{diagram-VX7I27RA-xe6r5qfw.js → diagram-VX7I27RA-hendl2tt.js} +1 -1
- package/static/dist/assets/{diagram-Z3DM3KII-nq07dg7k.js → diagram-Z3DM3KII-igwc35p3.js} +1 -1
- package/static/dist/assets/{ebnfDiagram-PWID7BFC-c62ipm3g.js → ebnfDiagram-PWID7BFC-c64knz08.js} +1 -1
- package/static/dist/assets/{erDiagram-RLTQ6QDP-h39kmnzy.js → erDiagram-RLTQ6QDP-brdu9lcm.js} +1 -1
- package/static/dist/assets/eventmodeling-NTZA5JFV-njk1j8wl.js +1 -0
- package/static/dist/assets/flowDiagram-HODETNUW-nma6f0ga.js +1 -0
- package/static/dist/assets/folder-plus-lvt9kudb.js +1 -0
- package/static/dist/assets/{ganttDiagram-EL5Y4UJY-ngbsyp37.js → ganttDiagram-EL5Y4UJY-ma6jxj5i.js} +1 -1
- package/static/dist/assets/{gitGraph-4MIJSDKK-fr2i7caa.js → gitGraph-4MIJSDKK-naa9w6xa.js} +1 -1
- package/static/dist/assets/{gitGraphDiagram-WWUBYQGX-eravdti4.js → gitGraphDiagram-WWUBYQGX-hzltvsod.js} +1 -1
- package/static/dist/assets/{highlighted-body-KPVGNVTW-jwpop9p8.js → highlighted-body-KPVGNVTW-ghoavj8d.js} +1 -1
- package/static/dist/assets/host-hzm8n85n.js +1 -0
- package/static/dist/assets/index-drdcaqeq.css +2 -0
- package/static/dist/assets/index-jzm844he.js +11 -0
- package/static/dist/assets/{info-A6RAGUB7-h11x0dxo.js → info-A6RAGUB7-mn2ut5ko.js} +1 -1
- package/static/dist/assets/{infoDiagram-27XIBGKW-dfh47dw9.js → infoDiagram-27XIBGKW-h6kuqvsb.js} +1 -1
- package/static/dist/assets/{ishikawaDiagram-5VMMS53U-i6ypq351.js → ishikawaDiagram-5VMMS53U-e7bnwq7h.js} +1 -1
- package/static/dist/assets/{journeyDiagram-3NMN7TZE-lduf1z95.js → journeyDiagram-3NMN7TZE-etd1bi6p.js} +1 -1
- package/static/dist/assets/{kanban-definition-UXKFOSKX-e18bu4pg.js → kanban-definition-UXKFOSKX-emb1g9dz.js} +4 -4
- package/static/dist/assets/lazyRouteComponent-o816ytzl.js +1 -0
- package/static/dist/assets/{line-meizqsvn.js → line-h0ojzsvs.js} +1 -1
- package/static/dist/assets/link-k01ryaf9.js +1 -0
- package/static/dist/assets/login-bsae49ew.js +1 -0
- package/static/dist/assets/mermaid-HWGCJPDP-ihl34s74.js +1 -0
- package/static/dist/assets/{mermaid-parser.core-ntne45i9.js → mermaid-parser.core-bnre27u8.js} +3 -3
- package/static/dist/assets/{mindmap-definition-YA3MSWOX-27b26eok.js → mindmap-definition-YA3MSWOX-o1vathns.js} +1 -1
- package/static/dist/assets/onboarding-c65tysya.js +1 -0
- package/static/dist/assets/onboarding_model_label-gpn28uix.js +1 -0
- package/static/dist/assets/{packet-AYTQ26CC-l6jdka8p.js → packet-AYTQ26CC-hatq7m2e.js} +1 -1
- package/static/dist/assets/pcmTap.worklet-74EKjWAZ.js +1 -0
- package/static/dist/assets/{pegDiagram-XKGWAZYB-g1er3bxj.js → pegDiagram-XKGWAZYB-gwisz8jv.js} +1 -1
- package/static/dist/assets/{pie-WAS4IAKB-i0ylcrt9.js → pie-WAS4IAKB-fpftf0mk.js} +1 -1
- package/static/dist/assets/{pieDiagram-E7YTZNPT-fbz1e55z.js → pieDiagram-E7YTZNPT-khm1o9a6.js} +1 -1
- package/static/dist/assets/{quadrantDiagram-AXDQQJYC-hhue7d8o.js → quadrantDiagram-AXDQQJYC-owqc4uqn.js} +1 -1
- package/static/dist/assets/{radar-RG4KPBEZ-f9b70aa4.js → radar-RG4KPBEZ-cntfwjpq.js} +1 -1
- package/static/dist/assets/{railroad-74A4TZTK-lgsuoeda.js → railroad-74A4TZTK-a7t5eibp.js} +1 -1
- package/static/dist/assets/railroad-abnf-HS5TGJTU-ol8cdktf.js +1 -0
- package/static/dist/assets/railroad-ebnf-LZEXJU2U-i8vzd429.js +1 -0
- package/static/dist/assets/railroad-peg-WCYAUIDC-nw3ulewz.js +1 -0
- package/static/dist/assets/{railroadDiagram-O6MQD6OU-eqpy9fnz.js → railroadDiagram-O6MQD6OU-etuh0qa0.js} +1 -1
- package/static/dist/assets/{refresh-cw-hlwb02qv.js → refresh-cw-mqbkv2a3.js} +1 -1
- package/static/dist/assets/refresh-l29ljp76.js +1 -0
- package/static/dist/assets/{requirementDiagram-BXWQKSXE-ogf6puhi.js → requirementDiagram-BXWQKSXE-oq2ulk22.js} +1 -1
- package/static/dist/assets/{sankeyDiagram-P5KCCOFB-fqb8xcjf.js → sankeyDiagram-P5KCCOFB-iqc02emv.js} +1 -1
- package/static/dist/assets/saved-ndd4t2xb.js +1 -0
- package/static/dist/assets/{sequenceDiagram-WJ2MYXX4-dlcz6qjz.js → sequenceDiagram-WJ2MYXX4-i0v116q0.js} +2 -2
- package/static/dist/assets/settings_section_extensions_title-jhfo6o8z.js +1 -0
- package/static/dist/assets/share._token-c1ri0hy1.js +2 -0
- package/static/dist/assets/sliders-horizontal-j3jjt9tv.js +1 -0
- package/static/dist/assets/{stateDiagram-D77RDMKH-fyoznpcs.js → stateDiagram-D77RDMKH-dnpt1ato.js} +1 -1
- package/static/dist/assets/stateDiagram-v2-MP3YSRHH-bxjacpk6.js +1 -0
- package/static/dist/assets/{swimlanes-42K2YHIH-oefldhfy.js → swimlanes-42K2YHIH-loqbdazb.js} +1 -1
- package/static/dist/assets/swimlanesDiagram-VR7AAH4N-id62p9hz.js +8 -0
- package/static/dist/assets/{timeline-definition-24CTP7MA-b1vl2zil.js → timeline-definition-24CTP7MA-ol2hnvma.js} +1 -1
- package/static/dist/assets/toast-i3h34v6o.js +64 -0
- package/static/dist/assets/{treeView-Q6P3EWNA-f7hcci5o.js → treeView-Q6P3EWNA-idrj6iox.js} +1 -1
- package/static/dist/assets/{treemap-WGGIJYW6-nl85071a.js → treemap-WGGIJYW6-lzr49vv5.js} +1 -1
- package/static/dist/assets/untitled-oaoya4qj.js +1 -0
- package/static/dist/assets/useForm-nfaxgmsk.js +1 -0
- package/static/dist/assets/{useParams-b4dq6n4q.js → useParams-gjc70qru.js} +1 -1
- package/static/dist/assets/{useSearch-ipfmv3he.js → useSearch-e6ae539u.js} +1 -1
- package/static/dist/assets/{vennDiagram-4TSXK5OY-h5hzbk0n.js → vennDiagram-4TSXK5OY-bvwr9o2z.js} +1 -1
- package/static/dist/assets/{wardley-WFR3VGLG-jftvpm3e.js → wardley-WFR3VGLG-31ui8tma.js} +1 -1
- package/static/dist/assets/{wardleyDiagram-VM6X3IG4-hedh85ge.js → wardleyDiagram-VM6X3IG4-k5wqtx4b.js} +1 -1
- package/static/dist/assets/{xychartDiagram-S5SC5T6Z-e49523ab.js → xychartDiagram-S5SC5T6Z-aqbgvujg.js} +1 -1
- package/static/dist/index.html +1 -1
- package/static/dist/sw.js +1 -1
- 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/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.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.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/architecture-7GRP2DOG-6crvnylg.js +0 -1
- 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/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/endpoints-klbxod4t.js +0 -64
- package/static/dist/assets/eventmodeling-NTZA5JFV-obfede4u.js +0 -1
- package/static/dist/assets/flowDiagram-HODETNUW-kdpsp1je.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/lazyRouteComponent-e1y4t2i9.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/onboarding-lkphzu1s.js +0 -1
- package/static/dist/assets/onboarding_model_label-ftpjdwqk.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/refresh-abtu93ke.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/sliders-horizontal-n1zm34qq.js +0 -1
- package/static/dist/assets/sse-iwku0sjo.js +0 -1
- package/static/dist/assets/stateDiagram-v2-MP3YSRHH-ixhx8r46.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/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
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
import contextlib
|
|
6
|
+
import importlib.util
|
|
5
7
|
import logging
|
|
8
|
+
import os
|
|
9
|
+
import pathlib
|
|
6
10
|
import threading
|
|
7
11
|
from typing import Any
|
|
8
12
|
|
|
@@ -40,6 +44,103 @@ def parse_slash_command(command: str) -> tuple[str, str]:
|
|
|
40
44
|
return _ALIASES.get(base, base), parts[1] if len(parts) > 1 else ""
|
|
41
45
|
|
|
42
46
|
|
|
47
|
+
def _expand_plan(args: str, **_turn) -> str:
|
|
48
|
+
from agent.plan_prompt import build_plan_prompt
|
|
49
|
+
|
|
50
|
+
return build_plan_prompt(args)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def _expand_learn(args: str, **_turn) -> str:
|
|
54
|
+
from agent.learn_prompt import build_learn_prompt
|
|
55
|
+
|
|
56
|
+
return build_learn_prompt(args)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def _expand_init(args: str, *, workspace: str, **_turn) -> str:
|
|
60
|
+
from hermes_cli.init_command import build_init_prompt_for_cwd
|
|
61
|
+
|
|
62
|
+
# The Agent falls back to the process cwd for a missing directory; the sidecar's is never the user's project.
|
|
63
|
+
if not workspace or not os.path.isdir(workspace):
|
|
64
|
+
raise InvalidParams("workspace is not a directory")
|
|
65
|
+
return build_init_prompt_for_cwd(cwd=workspace, extra=args)
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def _expand_initiate_setup(_args: str, *, enabled_toolsets, **_turn) -> str:
|
|
69
|
+
from agent.initiate_setup_prompt import build_initiate_setup_prompt
|
|
70
|
+
from hermes_cli.setup_profile import primary_profile
|
|
71
|
+
from hermes_constants import get_hermes_home
|
|
72
|
+
from model_tools import get_tool_definitions
|
|
73
|
+
|
|
74
|
+
from .chat import _turn_toolsets
|
|
75
|
+
from .toolsets import disabled_toolsets
|
|
76
|
+
|
|
77
|
+
# The gateway's ``_hm_cmd_initiate_setup``: the tools this turn's agent gets, by name. MCP servers connect first, as
|
|
78
|
+
# chat start connects them before its agent snapshots tools; a failure leaves them out, as it does for the turn.
|
|
79
|
+
try:
|
|
80
|
+
discover_profile_mcp_tools()
|
|
81
|
+
except Exception: # noqa: BLE001
|
|
82
|
+
log.warning("MCP discovery failed", exc_info=True)
|
|
83
|
+
tools = get_tool_definitions(enabled_toolsets=_turn_toolsets(enabled_toolsets), disabled_toolsets=disabled_toolsets(),
|
|
84
|
+
quiet_mode=True, skip_tool_search_assembly=True)
|
|
85
|
+
return build_initiate_setup_prompt("webui", [tool["function"]["name"] for tool in tools], primary_profile(get_hermes_home()))
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
# The Agent built-ins every surface answers by rewriting the turn to a builder's prompt (the gateway's
|
|
89
|
+
# ``_hm_rewrite_turn_to_prompt``), with the Agent module each expander needs. ``None``: no expander yet, so no client
|
|
90
|
+
# offers it (``/blueprint`` seeds a turn only after its own slot parsing and job wiring).
|
|
91
|
+
_PROMPT_BUILTINS: dict[str, tuple[Any, str] | None] = {
|
|
92
|
+
"plan": (_expand_plan, "agent.plan_prompt"),
|
|
93
|
+
"learn": (_expand_learn, "agent.learn_prompt"),
|
|
94
|
+
"init": (_expand_init, "hermes_cli.init_command"),
|
|
95
|
+
"initiate-setup": (_expand_initiate_setup, "agent.initiate_setup_prompt"),
|
|
96
|
+
"blueprint": None,
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
def _prompt_expander(name: str):
|
|
101
|
+
"""The expander for a prompt built-in this Agent ships the builder for; None when it has none."""
|
|
102
|
+
entry = _PROMPT_BUILTINS.get(name)
|
|
103
|
+
if entry is None:
|
|
104
|
+
return None
|
|
105
|
+
try:
|
|
106
|
+
found = importlib.util.find_spec(entry[1]) is not None
|
|
107
|
+
except (ImportError, ValueError):
|
|
108
|
+
found = False
|
|
109
|
+
return entry[0] if found else None
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
def _prompt_mode(name: str) -> str | None:
|
|
113
|
+
if name not in _PROMPT_BUILTINS:
|
|
114
|
+
return None
|
|
115
|
+
return "expand" if _prompt_expander(name) else "unsupported"
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
def expand_prompt(command: str, workspace: str, enabled_toolsets) -> dict[str, Any]:
|
|
119
|
+
"""``/<prompt built-in> [args]`` as the turn text the Agent's own builder writes. ``name`` is the built-in's (None
|
|
120
|
+
when the command is not one) and ``message`` None when this Agent has no builder for it."""
|
|
121
|
+
try:
|
|
122
|
+
name, args = parse_slash_command(command)
|
|
123
|
+
from hermes_cli.commands import resolve_command
|
|
124
|
+
except (InvalidParams, ImportError):
|
|
125
|
+
return {"name": None, "message": None}
|
|
126
|
+
cmd = resolve_command(name)
|
|
127
|
+
if cmd is None or cmd.name not in _PROMPT_BUILTINS:
|
|
128
|
+
return {"name": None, "message": None}
|
|
129
|
+
expander = _prompt_expander(cmd.name)
|
|
130
|
+
if expander is None:
|
|
131
|
+
return {"name": cmd.name, "message": None}
|
|
132
|
+
try:
|
|
133
|
+
message = str(expander(args, workspace=workspace, enabled_toolsets=enabled_toolsets) or "").strip()
|
|
134
|
+
except InvalidParams:
|
|
135
|
+
raise
|
|
136
|
+
except Exception as exc: # noqa: BLE001
|
|
137
|
+
log.warning("Failed to expand /%s", cmd.name, exc_info=True)
|
|
138
|
+
raise RpcError(f"Couldn't start /{cmd.name}", condition="prompt_expand_failed") from exc
|
|
139
|
+
if not message:
|
|
140
|
+
raise RpcError(f"Couldn't start /{cmd.name}", condition="prompt_expand_failed")
|
|
141
|
+
return {"name": cmd.name, "message": message}
|
|
142
|
+
|
|
143
|
+
|
|
43
144
|
def list_commands() -> list[dict[str, Any]]:
|
|
44
145
|
try:
|
|
45
146
|
from hermes_cli.commands import COMMAND_REGISTRY
|
|
@@ -53,13 +154,13 @@ def list_commands() -> list[dict[str, Any]]:
|
|
|
53
154
|
out.append({
|
|
54
155
|
"name": cmd.name, "description": cmd.description, "category": cmd.category, "aliases": list(cmd.aliases),
|
|
55
156
|
"args_hint": cmd.args_hint, "subcommands": list(cmd.subcommands), "cli_only": bool(cmd.cli_only), "gateway_only": bool(cmd.gateway_only),
|
|
56
|
-
"exec": cmd.name in _ALLOWED,
|
|
157
|
+
"exec": cmd.name in _ALLOWED, "prompt": _prompt_mode(cmd.name),
|
|
57
158
|
})
|
|
58
159
|
listed = {c["name"] for c in out}
|
|
59
160
|
for name, (description, category, args_hint) in _RUNTIME_COMMANDS.items():
|
|
60
161
|
if name not in listed:
|
|
61
162
|
out.append({"name": name, "description": description, "category": category, "aliases": [a for a, n in _ALIASES.items() if n == name],
|
|
62
|
-
"args_hint": args_hint, "subcommands": [], "cli_only": False, "gateway_only": False, "exec": True})
|
|
163
|
+
"args_hint": args_hint, "subcommands": [], "cli_only": False, "gateway_only": False, "exec": True, "prompt": None})
|
|
63
164
|
try:
|
|
64
165
|
from hermes_cli.plugins import get_plugin_commands
|
|
65
166
|
|
|
@@ -68,7 +169,7 @@ def list_commands() -> list[dict[str, Any]]:
|
|
|
68
169
|
if name in existing or name in _NEVER_EXPOSE:
|
|
69
170
|
continue
|
|
70
171
|
out.append({"name": name, "description": str(info.get("description", "Plugin command")), "category": "Plugin", "aliases": [],
|
|
71
|
-
"args_hint": str(info.get("args_hint", "")), "subcommands": [], "cli_only": False, "gateway_only": False, "exec": True})
|
|
172
|
+
"args_hint": str(info.get("args_hint", "")), "subcommands": [], "cli_only": False, "gateway_only": False, "exec": True, "prompt": None})
|
|
72
173
|
except Exception: # noqa: BLE001 - plugin registry is optional
|
|
73
174
|
log.debug("plugin command listing failed", exc_info=True)
|
|
74
175
|
return out
|
|
@@ -95,15 +196,27 @@ def retire_unscoped_launch_mcp_servers() -> set[str]:
|
|
|
95
196
|
return names
|
|
96
197
|
|
|
97
198
|
|
|
199
|
+
def discover_profile_mcp_tools() -> list[str]:
|
|
200
|
+
"""Connect this profile's configured servers, retiring pre-multiplex launch connections first."""
|
|
201
|
+
from tools.mcp_tool_discovery import discover_mcp_tools
|
|
202
|
+
|
|
203
|
+
retire_unscoped_launch_mcp_servers()
|
|
204
|
+
return discover_mcp_tools()
|
|
205
|
+
|
|
206
|
+
|
|
98
207
|
def _reload_mcp() -> str:
|
|
99
208
|
with _RELOAD_MCP_LOCK:
|
|
100
209
|
try:
|
|
101
210
|
from agent.secret_scope import is_multiplex_active
|
|
211
|
+
from hermes_constants import get_hermes_home
|
|
102
212
|
from tools.mcp_tool import _lock, _mcp_tool_server_names, _server_visible_in_scope, _servers
|
|
213
|
+
from tools.mcp_tool_agent import reprobe_tool_availability
|
|
103
214
|
from tools.mcp_tool_discovery import discover_mcp_tools
|
|
104
215
|
from tools.mcp_tool_lifecycle import shutdown_mcp_servers
|
|
105
216
|
from tools.mcp_tool_scope import _key_name
|
|
106
217
|
from tools.registry import registry
|
|
218
|
+
|
|
219
|
+
from .chat import refresh_profile_agents_mcp_tools
|
|
107
220
|
except Exception as exc: # noqa: BLE001
|
|
108
221
|
raise RpcError("MCP runtime unavailable", condition="mcp_unavailable") from exc
|
|
109
222
|
# Like the gateway's ``_execute_mcp_reload``: under multiplexing only this profile's connections go down and
|
|
@@ -117,7 +230,11 @@ def _reload_mcp() -> str:
|
|
|
117
230
|
try:
|
|
118
231
|
old = server_names() | retire_unscoped_launch_mcp_servers()
|
|
119
232
|
shutdown_mcp_servers(scope=scope)
|
|
233
|
+
# As the gateway does: drop the cached tool availability verdicts, then hand the profile's open chats the
|
|
234
|
+
# rediscovered tools.
|
|
235
|
+
reprobe_tool_availability()
|
|
120
236
|
tools = discover_mcp_tools() or []
|
|
237
|
+
refresh_profile_agents_mcp_tools(get_hermes_home())
|
|
121
238
|
connected = server_names()
|
|
122
239
|
if scope is not None:
|
|
123
240
|
with _lock:
|
|
@@ -404,6 +521,74 @@ def plugin_visibility(selected_providers: dict) -> dict:
|
|
|
404
521
|
return {"plugins": rows, "supported_hooks": list(PLUGIN_VISIBILITY_HOOKS)}
|
|
405
522
|
|
|
406
523
|
|
|
524
|
+
def isolation_survey(base_home: pathlib.Path) -> list[dict]:
|
|
525
|
+
"""Each profile's ``plugins.isolation`` and installed third-party plugin count, read from disk without loading a plugin."""
|
|
526
|
+
from hermes_cli.plugin_isolation import isolation_mode
|
|
527
|
+
from hermes_cli.plugins_cmd import _scan_level
|
|
528
|
+
|
|
529
|
+
from .profiles import _yaml_load, named_profile_homes
|
|
530
|
+
|
|
531
|
+
rows = []
|
|
532
|
+
for name, home in [("default", base_home), *named_profile_homes(base_home)]:
|
|
533
|
+
seen: dict = {}
|
|
534
|
+
_scan_level(home / "plugins", "user", set(), "", 0, seen)
|
|
535
|
+
rows.append({"name": name, "isolation": isolation_mode(_yaml_load(home / "config.yaml") or {}), "third_party_plugins": len(seen)})
|
|
536
|
+
return rows
|
|
537
|
+
|
|
538
|
+
|
|
539
|
+
def _plugin_settings_modules():
|
|
540
|
+
"""The Agent's manifest ``config_schema`` reader/writer (v0.21.6+) and its plugin resolver; ``None`` on older Agents."""
|
|
541
|
+
try:
|
|
542
|
+
import hermes_cli.plugins_cmd as plugins_cmd
|
|
543
|
+
import hermes_cli.plugins_settings as plugins_settings
|
|
544
|
+
except ImportError:
|
|
545
|
+
return None
|
|
546
|
+
return plugins_cmd, plugins_settings
|
|
547
|
+
|
|
548
|
+
|
|
549
|
+
def plugin_settings() -> dict:
|
|
550
|
+
"""Every discovered plugin whose manifest declares settings, with its fields (secrets as ``env`` + ``has_value`` only)."""
|
|
551
|
+
modules = _plugin_settings_modules()
|
|
552
|
+
if modules is None:
|
|
553
|
+
return {"supported": False, "plugins": []}
|
|
554
|
+
plugins_cmd, plugins_settings = modules
|
|
555
|
+
rows = []
|
|
556
|
+
for _name, _version, _desc, _source, plugin_dir, key in plugins_cmd._discover_all_plugins():
|
|
557
|
+
fields = plugins_settings.plugin_settings_fields(key, pathlib.Path(str(plugin_dir)) if plugin_dir else None)
|
|
558
|
+
if fields:
|
|
559
|
+
rows.append({"key": key, "fields": fields})
|
|
560
|
+
return {"supported": True, "plugins": rows}
|
|
561
|
+
|
|
562
|
+
|
|
563
|
+
def save_plugin_settings(key: str, values: Any, secret_envs: Any = None) -> dict:
|
|
564
|
+
"""Write manifest-declared, non-secret settings through the Agent's locked writer; returns the refreshed fields.
|
|
565
|
+
|
|
566
|
+
``secret_envs`` (secret key -> ``.env`` name the caller wrote) must still match the manifest before anything is written.
|
|
567
|
+
"""
|
|
568
|
+
if not key or not isinstance(values, dict) or not isinstance(secret_envs or {}, dict):
|
|
569
|
+
raise InvalidParams("plugins.settings_save requires a 'key' and a 'values' mapping")
|
|
570
|
+
modules = _plugin_settings_modules()
|
|
571
|
+
if modules is None:
|
|
572
|
+
raise RpcError("This Hermes Agent cannot edit plugin settings", condition="plugin_settings_unsupported")
|
|
573
|
+
plugins_cmd, plugins_settings = modules
|
|
574
|
+
found = plugins_cmd._find_plugin_entry(key)
|
|
575
|
+
if found is None:
|
|
576
|
+
raise RpcError(f"plugin {key!r} not found", condition="plugin_not_found")
|
|
577
|
+
plugin_dir = pathlib.Path(str(found[4])) if found[4] else None
|
|
578
|
+
current = {field["key"]: field for field in plugins_settings.plugin_settings_fields(found[5], plugin_dir)}
|
|
579
|
+
for secret, env in (secret_envs or {}).items():
|
|
580
|
+
field = current.get(str(secret))
|
|
581
|
+
if field is None or field.get("type") != "secret" or field.get("env") != env:
|
|
582
|
+
raise RpcError(f"{secret!r} is no longer stored in {env}", condition="plugin_settings_changed")
|
|
583
|
+
try:
|
|
584
|
+
written = plugins_settings.save_plugin_settings(found[5], plugin_dir, values)
|
|
585
|
+
except PermissionError as exc:
|
|
586
|
+
raise RpcError(str(exc), condition="plugin_settings_managed") from exc
|
|
587
|
+
except ValueError as exc:
|
|
588
|
+
raise InvalidParams(str(exc)) from exc
|
|
589
|
+
return {"key": found[5], "written": written, "fields": plugins_settings.plugin_settings_fields(found[5], plugin_dir)}
|
|
590
|
+
|
|
591
|
+
|
|
407
592
|
def register(registry) -> None:
|
|
408
593
|
@registry.method("commands.registry")
|
|
409
594
|
def registry_(ctx: CallContext, params: dict) -> dict:
|
|
@@ -417,12 +602,22 @@ def register(registry) -> None:
|
|
|
417
602
|
output = execute_agent_command(command)
|
|
418
603
|
source = "agent"
|
|
419
604
|
if output is None:
|
|
420
|
-
|
|
605
|
+
from .chat import _turn_identity
|
|
606
|
+
|
|
607
|
+
# TAL-904: a chat's plugin command runs under that chat's session and workspace, as its turns do.
|
|
608
|
+
session_id = str(params.get("session_id") or "").strip()
|
|
609
|
+
with _turn_identity(session_id, str(params.get("workspace") or "")) if session_id else contextlib.nullcontext():
|
|
610
|
+
output = execute_plugin_command(command)
|
|
421
611
|
source = "plugin"
|
|
422
612
|
if output is None:
|
|
423
613
|
raise RpcError(f"unknown command {parse_slash_command(command)[0]!r}", condition="command_not_found")
|
|
424
614
|
return {"output": output, "source": source}
|
|
425
615
|
|
|
616
|
+
@registry.method("commands.expand_prompt")
|
|
617
|
+
def expand_prompt_(ctx: CallContext, params: dict) -> dict:
|
|
618
|
+
with scoped_home(profile_home_param(params)):
|
|
619
|
+
return expand_prompt(str(params.get("command") or ""), str(params.get("workspace") or ""), params.get("enabled_toolsets"))
|
|
620
|
+
|
|
426
621
|
@registry.method("commands.bundles")
|
|
427
622
|
def bundles(ctx: CallContext, params: dict) -> dict:
|
|
428
623
|
with scoped_home(profile_home_param(params)):
|
|
@@ -447,3 +642,17 @@ def register(registry) -> None:
|
|
|
447
642
|
def list_(ctx: CallContext, params: dict) -> dict:
|
|
448
643
|
with scoped_home(profile_home_param(params)):
|
|
449
644
|
return plugin_visibility(params.get("selected_providers") if isinstance(params.get("selected_providers"), dict) else {})
|
|
645
|
+
|
|
646
|
+
@registry.method("plugins.isolation")
|
|
647
|
+
def isolation(ctx: CallContext, params: dict) -> dict:
|
|
648
|
+
return {"profiles": isolation_survey(profile_home_param(params, "base_home"))}
|
|
649
|
+
|
|
650
|
+
@registry.method("plugins.settings")
|
|
651
|
+
def settings(ctx: CallContext, params: dict) -> dict:
|
|
652
|
+
with scoped_home(profile_home_param(params)):
|
|
653
|
+
return plugin_settings()
|
|
654
|
+
|
|
655
|
+
@registry.method("plugins.settings_save")
|
|
656
|
+
def settings_save(ctx: CallContext, params: dict) -> dict:
|
|
657
|
+
with scoped_home(profile_home_param(params)):
|
|
658
|
+
return save_plugin_settings(str(params.get("key") or "").strip(), params.get("values"), params.get("secret_envs"))
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
"""``config
|
|
2
|
-
Agent's per-model reasoning capability.
|
|
1
|
+
"""``config.*``, ``models.reasoning_efforts`` and ``personalities.list``: a profile's ``config.yaml`` and ``.env``,
|
|
2
|
+
the Agent's per-model reasoning capability, and the personalities the Agent offers for a config.
|
|
3
3
|
|
|
4
4
|
The TypeScript server owns every config.yaml *policy* (which keys mean what);
|
|
5
5
|
the sidecar only parses and serialises YAML with the Agent's own parser so the
|
|
6
6
|
Node side needs no YAML dependency. Writes are atomic and keep the file's mode.
|
|
7
|
+
``.env`` edits use the Agent's own line helpers under the ``<.env>.lock`` the
|
|
8
|
+
gateway, CLI and plugins also take, so concurrent writers never drop a key.
|
|
7
9
|
"""
|
|
8
10
|
|
|
9
11
|
from __future__ import annotations
|
|
10
12
|
|
|
13
|
+
import contextlib
|
|
11
14
|
import importlib
|
|
12
15
|
import logging
|
|
13
16
|
import os
|
|
17
|
+
import re
|
|
14
18
|
import tempfile
|
|
15
19
|
from pathlib import Path
|
|
16
20
|
|
|
@@ -74,7 +78,11 @@ def write_config(path: Path, config: dict) -> dict:
|
|
|
74
78
|
raise InvalidParams("config must be an object")
|
|
75
79
|
target = _write_target(path)
|
|
76
80
|
target.parent.mkdir(parents=True, exist_ok=True)
|
|
77
|
-
|
|
81
|
+
try:
|
|
82
|
+
replace = getattr(importlib.import_module("hermes_cli.config"), "atomic_config_replace", None)
|
|
83
|
+
except Exception: # noqa: BLE001
|
|
84
|
+
# Operator config must remain writable even when Agent imports are broken.
|
|
85
|
+
replace = None
|
|
78
86
|
mode = None
|
|
79
87
|
try:
|
|
80
88
|
mode = target.stat().st_mode & 0o777
|
|
@@ -83,9 +91,20 @@ def write_config(path: Path, config: dict) -> dict:
|
|
|
83
91
|
fd, tmp = tempfile.mkstemp(dir=str(target.parent), prefix=".config_", suffix=".tmp")
|
|
84
92
|
try:
|
|
85
93
|
with os.fdopen(fd, "w", encoding="utf-8") as handle:
|
|
86
|
-
|
|
94
|
+
if replace is not None:
|
|
95
|
+
# Stage the original document so the Agent retains comments; check the real link before committing.
|
|
96
|
+
try:
|
|
97
|
+
handle.write(target.read_text(encoding="utf-8"))
|
|
98
|
+
except FileNotFoundError:
|
|
99
|
+
pass
|
|
100
|
+
else:
|
|
101
|
+
parser = yaml_parser()
|
|
102
|
+
handle.write(parser.safe_dump(config, sort_keys=False, allow_unicode=True,
|
|
103
|
+
width=getattr(parser, "ROUNDTRIP_YAML_WIDTH", 2**31 - 1)))
|
|
87
104
|
handle.flush()
|
|
88
105
|
os.fsync(handle.fileno())
|
|
106
|
+
if replace is not None:
|
|
107
|
+
replace(Path(tmp), config)
|
|
89
108
|
if mode is not None:
|
|
90
109
|
os.chmod(tmp, mode)
|
|
91
110
|
# A link retargeted while the temp file was being written would otherwise send the write to the wrong file.
|
|
@@ -101,6 +120,88 @@ def write_config(path: Path, config: dict) -> dict:
|
|
|
101
120
|
return {"ok": True, "path": str(path)}
|
|
102
121
|
|
|
103
122
|
|
|
123
|
+
_ENV_NAME = re.compile(r"^[A-Za-z_][A-Za-z0-9_]*$")
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
def _env_refusal(agent_config, key: str, action: str) -> str | None:
|
|
127
|
+
"""The Agent's ``.env`` write-lock refusal (package-managed install or administrator-managed key)."""
|
|
128
|
+
refusal = getattr(agent_config, "env_write_refusal", None)
|
|
129
|
+
if refusal is not None:
|
|
130
|
+
return refusal(key, action)
|
|
131
|
+
# Agent 0.21.5 only reports the refusal on stderr.
|
|
132
|
+
return f"Cannot {action} {key}: this Hermes installation manages it" if agent_config._env_write_blocked(key, action) else None
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
def _env_lock(agent_config, path: Path):
|
|
136
|
+
"""The Agent's ``<.env>.lock`` (Agent 0.21.6+); older Agents have none to share."""
|
|
137
|
+
lock = getattr(agent_config, "_env_write_lock", None)
|
|
138
|
+
return lock(path) if lock is not None else contextlib.nullcontext()
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
def env_write(home: Path, updates) -> dict:
|
|
142
|
+
"""Upsert ``updates`` into ``home``'s ``.env`` (``None`` removes a key) with the Agent's own line helpers, under
|
|
143
|
+
the lock its ``save_env_value`` / ``remove_env_value`` take, in one atomic replace.
|
|
144
|
+
|
|
145
|
+
Unlike those two, nothing is published into ``os.environ``: other threads (a gateway spawn snapshotting the
|
|
146
|
+
environment) must never see another profile's key, and ``runtime.env`` alone owns this process's environment.
|
|
147
|
+
Values are trimmed and an empty one is skipped; a value the Agent would strip or quote is refused. Every key is
|
|
148
|
+
checked against the Agent's refusals before the write, and the file ends 0600.
|
|
149
|
+
"""
|
|
150
|
+
if not isinstance(updates, dict) or not all(isinstance(k, str) and _ENV_NAME.match(k) and (v is None or isinstance(v, str)) for k, v in updates.items()):
|
|
151
|
+
raise InvalidParams("updates must map variable names to strings or null")
|
|
152
|
+
changes: dict[str, str | None] = {}
|
|
153
|
+
for key, value in updates.items():
|
|
154
|
+
if value is not None:
|
|
155
|
+
value = value.strip()
|
|
156
|
+
if not value:
|
|
157
|
+
continue
|
|
158
|
+
if "\n" in value or "\r" in value:
|
|
159
|
+
raise InvalidParams("API key must not contain newline characters.")
|
|
160
|
+
# The Agent would strip non-ASCII and quote the rest; refused instead, so the running process and the
|
|
161
|
+
# server's reader see exactly the bytes the file holds.
|
|
162
|
+
if any(not "!" <= c <= "~" or c in "#\"'" for c in value):
|
|
163
|
+
raise InvalidParams("API key must not contain spaces, quotes, '#' or non-ASCII characters.")
|
|
164
|
+
changes[key] = value
|
|
165
|
+
from hermes_cli import config as agent_config
|
|
166
|
+
|
|
167
|
+
with scoped_home(home):
|
|
168
|
+
for key, value in changes.items():
|
|
169
|
+
refusal = _env_refusal(agent_config, key, "remove" if value is None else "set")
|
|
170
|
+
if refusal:
|
|
171
|
+
raise RpcError(refusal, condition="env_write_refused")
|
|
172
|
+
try:
|
|
173
|
+
agent_config.ensure_hermes_home()
|
|
174
|
+
path = agent_config.get_env_path()
|
|
175
|
+
with _env_lock(agent_config, path):
|
|
176
|
+
existed = path.exists()
|
|
177
|
+
lines = agent_config._read_env_lines(path) if existed else []
|
|
178
|
+
before = list(lines)
|
|
179
|
+
for key, value in changes.items():
|
|
180
|
+
defines = agent_config._env_line_defines_key
|
|
181
|
+
if value is None:
|
|
182
|
+
lines = [line for line in lines if not defines(line, key)]
|
|
183
|
+
continue
|
|
184
|
+
agent_config.validate_env_var_name_for_write(key)
|
|
185
|
+
entry = f"{key}={value}\n"
|
|
186
|
+
at = next((i for i, line in enumerate(lines) if defines(line, key)), None)
|
|
187
|
+
if at is not None:
|
|
188
|
+
lines[at] = entry
|
|
189
|
+
else:
|
|
190
|
+
if lines and not lines[-1].endswith("\n"):
|
|
191
|
+
lines[-1] += "\n"
|
|
192
|
+
lines.append(entry)
|
|
193
|
+
if lines != before:
|
|
194
|
+
agent_config._write_env_lines(path, lines, preserve_mode=existed)
|
|
195
|
+
except TimeoutError as exc:
|
|
196
|
+
raise RpcError(str(exc), condition="env_locked") from exc
|
|
197
|
+
except ValueError as exc:
|
|
198
|
+
raise RpcError(str(exc), condition="env_write_refused") from exc
|
|
199
|
+
agent_config.invalidate_env_cache()
|
|
200
|
+
if path.exists():
|
|
201
|
+
os.chmod(path, 0o600)
|
|
202
|
+
return {"ok": True, "path": str(path)}
|
|
203
|
+
|
|
204
|
+
|
|
104
205
|
def reasoning_efforts(model: str, provider: str) -> dict:
|
|
105
206
|
"""Levels the Agent would offer for ``model`` on ``provider`` (``hermes_cli.main_provider_setup``)."""
|
|
106
207
|
efforts: list[str] | None = None
|
|
@@ -122,6 +223,16 @@ def reasoning_efforts(model: str, provider: str) -> dict:
|
|
|
122
223
|
return {"efforts": [str(e) for e in (efforts or [])], "supports_reasoning": supports_reasoning}
|
|
123
224
|
|
|
124
225
|
|
|
226
|
+
def personalities(config) -> list[dict]:
|
|
227
|
+
"""TAL-901: ``config``'s personalities as the Agent offers them (``hermes_cli.personality``), with its list preview
|
|
228
|
+
and rendered prompt."""
|
|
229
|
+
from hermes_cli.personality import available_personalities, describe_personality, render_personality_prompt
|
|
230
|
+
|
|
231
|
+
if not isinstance(config, dict):
|
|
232
|
+
raise InvalidParams("config must be a mapping")
|
|
233
|
+
return [{"name": name, "description": describe_personality(value), "prompt": render_personality_prompt(value)} for name, value in available_personalities(config).items()]
|
|
234
|
+
|
|
235
|
+
|
|
125
236
|
def register(registry) -> None:
|
|
126
237
|
@registry.method("config.get", requires_agent=False)
|
|
127
238
|
def get(ctx: CallContext, params: dict) -> dict:
|
|
@@ -131,7 +242,15 @@ def register(registry) -> None:
|
|
|
131
242
|
def set_(ctx: CallContext, params: dict) -> dict:
|
|
132
243
|
return write_config(config_path_param(params), params.get("config"))
|
|
133
244
|
|
|
245
|
+
@registry.method("config.env_write")
|
|
246
|
+
def env_write_(ctx: CallContext, params: dict) -> dict:
|
|
247
|
+
return env_write(profile_home_param(params), params.get("updates"))
|
|
248
|
+
|
|
134
249
|
@registry.method("models.reasoning_efforts")
|
|
135
250
|
def efforts(ctx: CallContext, params: dict) -> dict:
|
|
136
251
|
with scoped_home(profile_home_param(params)):
|
|
137
252
|
return reasoning_efforts(str(params.get("model") or ""), str(params.get("provider") or ""))
|
|
253
|
+
|
|
254
|
+
@registry.method("personalities.list")
|
|
255
|
+
def personalities_(ctx: CallContext, params: dict) -> dict:
|
|
256
|
+
return {"personalities": personalities(params.get("config"))}
|