@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
|
@@ -10,10 +10,14 @@ composes: ``hermes_cli.auth``, ``hermes_cli.models``, ``hermes_cli.runtime_provi
|
|
|
10
10
|
from __future__ import annotations
|
|
11
11
|
|
|
12
12
|
import dataclasses
|
|
13
|
+
import json
|
|
13
14
|
import logging
|
|
15
|
+
import sqlite3
|
|
14
16
|
import sys
|
|
15
17
|
import threading
|
|
18
|
+
from contextlib import closing
|
|
16
19
|
from pathlib import Path
|
|
20
|
+
from types import SimpleNamespace
|
|
17
21
|
from typing import Any
|
|
18
22
|
|
|
19
23
|
from ..errors import InvalidParams, RpcError
|
|
@@ -94,6 +98,50 @@ def _user_plugin_profiles() -> dict[int, tuple[Any, Path]]:
|
|
|
94
98
|
return out
|
|
95
99
|
|
|
96
100
|
|
|
101
|
+
def _hosted_plugin_profiles(roots: dict[Path, str]) -> dict[Path, list] | None:
|
|
102
|
+
"""Resolve enabled directories through the Agent's host metadata and scoped provider registry."""
|
|
103
|
+
import providers
|
|
104
|
+
|
|
105
|
+
if not hasattr(providers, "_home_layer") or not callable(getattr(providers, "provider_source", None)):
|
|
106
|
+
return None
|
|
107
|
+
try:
|
|
108
|
+
from hermes_cli.plugin_isolation import ISOLATION_HOST, isolation_mode
|
|
109
|
+
except ImportError: # per-home registries predate host isolation
|
|
110
|
+
return None
|
|
111
|
+
|
|
112
|
+
if isolation_mode() != ISOLATION_HOST:
|
|
113
|
+
return None
|
|
114
|
+
from hermes_cli.plugin_host_profiles import load_hosted_profiles
|
|
115
|
+
from hermes_constants import get_hermes_home, hermes_home_key
|
|
116
|
+
|
|
117
|
+
registered = {p.name: p for p in providers.list_providers() if providers.provider_source(p.name) == "user"}
|
|
118
|
+
home_key = hermes_home_key(get_hermes_home())
|
|
119
|
+
# Discovery also loads disabled and manifest-less category plugins. Include them when checking name collisions.
|
|
120
|
+
directories = set(roots)
|
|
121
|
+
for parent, flat in ((providers._user_plugins_dir(), False), (providers._installed_plugins_dir(), True)):
|
|
122
|
+
if parent is not None:
|
|
123
|
+
directories.update(child.resolve() for child in parent.iterdir()
|
|
124
|
+
if child.is_dir() and not child.name.startswith(("_", "."))
|
|
125
|
+
and (not flat or (child.name != "model-providers" and providers._declares_model_provider_kind(child))))
|
|
126
|
+
owners: dict[str, set[Path]] = {}
|
|
127
|
+
for root in directories:
|
|
128
|
+
try:
|
|
129
|
+
# Reuse the Agent's cached extraction; provider ids need not match manifest or directory names.
|
|
130
|
+
profiles = load_hosted_profiles(root, providers._user_module_name(root, home_key))
|
|
131
|
+
for profile in profiles:
|
|
132
|
+
owners.setdefault(profile.name, set()).add(root)
|
|
133
|
+
except Exception: # noqa: BLE001 - failed extraction keeps the manifest's not_loaded row
|
|
134
|
+
log.debug("reading hosted provider plugin %s failed", root, exc_info=True)
|
|
135
|
+
found: dict[Path, list] = {root: [] for root in roots}
|
|
136
|
+
for name, profile in registered.items():
|
|
137
|
+
origins = owners.get(name, set())
|
|
138
|
+
if len(origins) == 1:
|
|
139
|
+
root = next(iter(origins))
|
|
140
|
+
if root in found:
|
|
141
|
+
found[root].append(profile)
|
|
142
|
+
return found
|
|
143
|
+
|
|
144
|
+
|
|
97
145
|
def _load_plugin(root: Path) -> None:
|
|
98
146
|
"""Load the scoped profile's installed plugin that the process-wide discovery (run under the launch profile) skipped.
|
|
99
147
|
|
|
@@ -123,12 +171,13 @@ def _load_plugin(root: Path) -> None:
|
|
|
123
171
|
def installed_plugin_profiles() -> list[tuple[str, Any]]:
|
|
124
172
|
"""``(manifest name, profile | None)`` for each enabled model-provider plugin installed in the scoped home.
|
|
125
173
|
|
|
126
|
-
Bundled providers are built-ins, not plugins.
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
174
|
+
Bundled providers are built-ins, not plugins. Hosted profiles come from the Agent's scoped user registry and
|
|
175
|
+
directory metadata. In-process profiles belong to this home when their module lives in its plugin directories;
|
|
176
|
+
a plugin the launch discovery skipped is loaded here.
|
|
177
|
+
``None`` means the plugin could not be loaded or attributed: it failed to import, its hosted provider id is
|
|
178
|
+
ambiguous, or a registration/module name collided in an older process-wide registry.
|
|
179
|
+
shortcut: in-process ownership uses module globals, so an unbound inline profile reads as not
|
|
180
|
+
loaded; use Agent registration metadata if it becomes available.
|
|
132
181
|
"""
|
|
133
182
|
try:
|
|
134
183
|
from hermes_cli.plugins_discovery import _get_disabled_plugins, _get_enabled_plugins, collect_directory_manifests, gate_manifest
|
|
@@ -143,6 +192,10 @@ def installed_plugin_profiles() -> list[tuple[str, Any]]:
|
|
|
143
192
|
if not roots:
|
|
144
193
|
return []
|
|
145
194
|
|
|
195
|
+
hosted = _hosted_plugin_profiles(roots)
|
|
196
|
+
if hosted is not None:
|
|
197
|
+
return [(name, p) for root, name in roots.items() for p in (hosted[root] or [None])]
|
|
198
|
+
|
|
146
199
|
def owned() -> dict[Path, list]:
|
|
147
200
|
found: dict[Path, list] = {root: [] for root in roots}
|
|
148
201
|
for profile, directory in _user_plugin_profiles().values():
|
|
@@ -160,12 +213,17 @@ def installed_plugin_profiles() -> list[tuple[str, Any]]:
|
|
|
160
213
|
return [(name, p) for root, name in roots.items() for p in (found[root] or [None])]
|
|
161
214
|
|
|
162
215
|
|
|
163
|
-
def
|
|
164
|
-
"""Whether
|
|
165
|
-
|
|
216
|
+
def _unavailable_plugin(provider_id: str) -> bool:
|
|
217
|
+
"""Whether a registered plugin lacks an enabled, unambiguous owner in this home."""
|
|
218
|
+
import providers
|
|
166
219
|
|
|
167
|
-
profile = get_provider_profile(provider_id)
|
|
168
|
-
if profile is None
|
|
220
|
+
profile = providers.get_provider_profile(provider_id)
|
|
221
|
+
if profile is None:
|
|
222
|
+
return False
|
|
223
|
+
if hasattr(providers, "_home_layer") and callable(getattr(providers, "provider_source", None)):
|
|
224
|
+
if providers.provider_source(profile.name) != "user":
|
|
225
|
+
return False
|
|
226
|
+
elif id(profile) not in _user_plugin_profiles():
|
|
169
227
|
return False
|
|
170
228
|
return not any(p is profile for _name, p in installed_plugin_profiles())
|
|
171
229
|
|
|
@@ -197,6 +255,9 @@ def _setup_state(profile: Any) -> str:
|
|
|
197
255
|
return "unavailable"
|
|
198
256
|
if profile.auth_type == "external_process":
|
|
199
257
|
return "ready" if status.get("configured") else "missing_cli"
|
|
258
|
+
if profile.auth_type in ("oauth_external", "oauth_device_code"):
|
|
259
|
+
# The Agent's ``configured`` only means registered here; a pooled token, live or refreshable on use, means signed in.
|
|
260
|
+
return "ready" if status.get("logged_in") or status.get("needs_refresh") else "needs_setup"
|
|
200
261
|
return "ready" if status.get("logged_in") or status.get("configured") else "needs_setup"
|
|
201
262
|
|
|
202
263
|
|
|
@@ -212,47 +273,97 @@ def plugin_providers() -> list[dict]:
|
|
|
212
273
|
return rows
|
|
213
274
|
|
|
214
275
|
|
|
215
|
-
def _plugin_catalog(provider_id: str) -> list[str]:
|
|
276
|
+
def _plugin_catalog(provider_id: str) -> tuple[list[str], bool]:
|
|
216
277
|
"""Discovery for an installed plugin the Agent's catalog has no fetcher for: the profile's own listing, then its fallback.
|
|
217
278
|
|
|
218
279
|
API-key plugins already get both from ``provider_model_ids`` with their key, so only keyless auth types list here.
|
|
280
|
+
Like the Agent, the fallback list is a placeholder only when a listing was tried and declined.
|
|
219
281
|
"""
|
|
220
282
|
for _name, profile in installed_plugin_profiles():
|
|
221
283
|
if profile is None or str(profile.name).strip().lower() != provider_id.strip().lower():
|
|
222
284
|
continue
|
|
285
|
+
lists = bool(profile.supports_model_listing) and profile.auth_type != "api_key"
|
|
223
286
|
try:
|
|
224
|
-
live = profile.fetch_models(timeout=8.0) if
|
|
287
|
+
live = profile.fetch_models(timeout=8.0) if lists else None
|
|
225
288
|
except Exception: # noqa: BLE001 - a broken plugin answers with its fallback catalog
|
|
226
289
|
log.debug("fetch_models(%r) failed", provider_id, exc_info=True)
|
|
227
290
|
live = None
|
|
228
|
-
return [str(m) for m in (live or profile.fallback_models or ()) if m]
|
|
229
|
-
return []
|
|
291
|
+
return [str(m) for m in (live or profile.fallback_models or ()) if m], lists and not live
|
|
292
|
+
return [], False
|
|
230
293
|
|
|
231
294
|
|
|
232
|
-
def model_ids(provider_id: str, *, force_refresh: bool) -> list[str]:
|
|
295
|
+
def model_ids(provider_id: str, *, force_refresh: bool) -> tuple[list[str], bool]:
|
|
296
|
+
"""The Agent's catalog for a provider, and whether it is the curated placeholder for an unreachable one (TAL-799)."""
|
|
233
297
|
try:
|
|
234
|
-
from hermes_cli
|
|
298
|
+
from hermes_cli import models
|
|
235
299
|
except Exception as exc: # noqa: BLE001
|
|
236
300
|
raise RpcError(f"model catalog unavailable: {exc}", condition="providers_unavailable") from exc
|
|
237
301
|
try:
|
|
238
|
-
if
|
|
239
|
-
return []
|
|
240
|
-
except Exception: # noqa: BLE001 -
|
|
302
|
+
if _unavailable_plugin(provider_id):
|
|
303
|
+
return [], False
|
|
304
|
+
except Exception: # noqa: BLE001 - an unverified owner must not expose another plugin's models
|
|
241
305
|
log.debug("plugin ownership check for %r failed", provider_id, exc_info=True)
|
|
306
|
+
return [], False
|
|
242
307
|
try:
|
|
243
|
-
ids = provider_model_ids(provider_id, force_refresh=force_refresh)
|
|
308
|
+
ids = models.provider_model_ids(provider_id, force_refresh=force_refresh)
|
|
244
309
|
except TypeError:
|
|
245
|
-
ids = provider_model_ids(provider_id)
|
|
310
|
+
ids = models.provider_model_ids(provider_id)
|
|
246
311
|
except Exception: # noqa: BLE001
|
|
247
312
|
log.debug("provider_model_ids(%r) failed", provider_id, exc_info=True)
|
|
248
313
|
ids = []
|
|
314
|
+
# Agents before the marker never flag a fallback.
|
|
315
|
+
curated = getattr(models, "CuratedFallbackModels", None)
|
|
316
|
+
fallback = isinstance(curated, type) and isinstance(ids, curated)
|
|
249
317
|
ids = [str(m) for m in (ids or []) if m]
|
|
250
318
|
if ids:
|
|
251
|
-
return ids
|
|
319
|
+
return ids, fallback
|
|
252
320
|
try:
|
|
253
321
|
return _plugin_catalog(provider_id)
|
|
254
322
|
except RpcError:
|
|
255
|
-
return []
|
|
323
|
+
return [], False
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
def _requests_local_runtime(requested: str | None) -> bool:
|
|
327
|
+
"""Whether a resolution asks for the Agent's managed llama.cpp provider, picked the way the Agent picks it: the
|
|
328
|
+
named provider, else the profile's, else ``HERMES_INFERENCE_PROVIDER``."""
|
|
329
|
+
try:
|
|
330
|
+
from hermes_cli.providers import LLAMACPP_ALIASES
|
|
331
|
+
from hermes_cli.runtime_provider import resolve_requested_provider
|
|
332
|
+
|
|
333
|
+
return resolve_requested_provider(requested) in LLAMACPP_ALIASES
|
|
334
|
+
except Exception: # noqa: BLE001 - an Agent without the local runtime
|
|
335
|
+
return False
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
def runtime_failure(exc: Exception, requested: str | None, message: str | None = None) -> RpcError:
|
|
339
|
+
"""The typed error for a runtime that did not resolve. The local llama.cpp provider has no credential to add: it
|
|
340
|
+
fails because its server is off or still starting, and the Agent's message says which (TAL-798)."""
|
|
341
|
+
condition = "local_runtime_unavailable" if _requests_local_runtime(requested) else "credential_missing"
|
|
342
|
+
return RpcError(message or str(exc), condition=condition, data={"error_type": type(exc).__name__})
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
def local_models() -> dict:
|
|
346
|
+
"""The Agent's managed llama.cpp runtime (TAL-798): the downloaded GGUFs, selectable before its server runs (a turn
|
|
347
|
+
on one boots it), and the endpoint the running server recorded. An Agent without the local runtime lists none."""
|
|
348
|
+
try:
|
|
349
|
+
from hermes_cli.local_runtime.bootstrap import staged_model_ids
|
|
350
|
+
from hermes_cli.providers import LLAMACPP_PROVIDER_ID
|
|
351
|
+
except Exception: # noqa: BLE001 - predates the local runtime
|
|
352
|
+
return {"provider_id": "", "models": [], "current_endpoint": None}
|
|
353
|
+
try:
|
|
354
|
+
models = [str(m) for m in staged_model_ids() if m]
|
|
355
|
+
except Exception: # noqa: BLE001 - an unreadable models directory lists none
|
|
356
|
+
log.debug("staged_model_ids failed", exc_info=True)
|
|
357
|
+
models = []
|
|
358
|
+
endpoint = None
|
|
359
|
+
try:
|
|
360
|
+
from hermes_cli.local_runtime.endpoint import _state_endpoint
|
|
361
|
+
|
|
362
|
+
state = _state_endpoint()
|
|
363
|
+
endpoint = str(state["base_url"]) if state else None
|
|
364
|
+
except Exception: # noqa: BLE001 - no recorded server
|
|
365
|
+
log.debug("local runtime endpoint failed", exc_info=True)
|
|
366
|
+
return {"provider_id": str(LLAMACPP_PROVIDER_ID), "models": models, "current_endpoint": endpoint}
|
|
256
367
|
|
|
257
368
|
|
|
258
369
|
def resolve_runtime(*, requested: str | None, api_key: str | None, base_url: str | None, target_model: str | None) -> dict:
|
|
@@ -267,7 +378,7 @@ def resolve_runtime(*, requested: str | None, api_key: str | None, base_url: str
|
|
|
267
378
|
message = format_runtime_provider_error(exc)
|
|
268
379
|
except Exception: # noqa: BLE001
|
|
269
380
|
message = str(exc)
|
|
270
|
-
raise
|
|
381
|
+
raise runtime_failure(exc, requested, message) from exc
|
|
271
382
|
return _plain(runtime) if isinstance(runtime, dict) else {"runtime": _plain(runtime)}
|
|
272
383
|
|
|
273
384
|
|
|
@@ -365,7 +476,60 @@ def capabilities(provider: str, model: str) -> dict | None:
|
|
|
365
476
|
return row if isinstance(row, dict) else None
|
|
366
477
|
|
|
367
478
|
|
|
479
|
+
def selection_warnings(home: Path, params: dict) -> dict:
|
|
480
|
+
"""Read-only guard decision using the same route resolver as a turn; never builds or evicts an Agent."""
|
|
481
|
+
from . import chat
|
|
482
|
+
try:
|
|
483
|
+
from hermes_cli.model_selection_guards import SelectionContext, selection_context_for_agent, selection_warnings as warnings
|
|
484
|
+
except ImportError as exc:
|
|
485
|
+
raise RpcError("Model selection warnings are unavailable in this Agent", condition="unsupported") from exc
|
|
486
|
+
|
|
487
|
+
model = str(params["model"])
|
|
488
|
+
runtime = chat._resolve_runtime(params.get("provider"), model)
|
|
489
|
+
provider = str(runtime.get("provider") or params.get("provider") or "")
|
|
490
|
+
base_url = str(runtime.get("base_url") or "")
|
|
491
|
+
tokens = params.get("context_tokens")
|
|
492
|
+
if not tokens:
|
|
493
|
+
with chat._AGENT_CACHE_LOCK:
|
|
494
|
+
entry = chat._AGENT_CACHE.get(params["session_id"])
|
|
495
|
+
if entry and Path(entry[2]).resolve() == home.resolve():
|
|
496
|
+
context = selection_context_for_agent(entry[0])
|
|
497
|
+
tokens = context.context_tokens if context else None
|
|
498
|
+
if not tokens and (home / "state.db").exists():
|
|
499
|
+
from agent.usage_anchor import persisted_anchor_tokens
|
|
500
|
+
|
|
501
|
+
# SessionDB opens and migrates its database. The guard needs only this read-only accessor.
|
|
502
|
+
with closing(sqlite3.connect(f"{(home / 'state.db').resolve().as_uri()}?mode=ro", uri=True)) as db:
|
|
503
|
+
row = db.execute("SELECT model_config FROM sessions WHERE id=?", (params["session_id"],)).fetchone()
|
|
504
|
+
config = json.loads(row[0] or "{}") if row else {}
|
|
505
|
+
reader = SimpleNamespace(get_session_model_config_value=lambda sid, key, default=None: config.get(key, default))
|
|
506
|
+
tokens = persisted_anchor_tokens(reader, params["session_id"], params.get("messages", []))
|
|
507
|
+
# A same-model pick on another provider still abandons the previous route's prompt cache.
|
|
508
|
+
current = params.get("current_model") if params.get("current_provider") == params.get("provider") else None
|
|
509
|
+
context = SelectionContext(context_tokens=tokens, current_model=current)
|
|
510
|
+
result = warnings(model, provider=provider, base_url=base_url, api_key=runtime.get("api_key"), selection_context=context)
|
|
511
|
+
return {"warnings": [_plain(w) for w in result], "context_tokens": tokens or None, "provider": provider, "base_url": base_url}
|
|
512
|
+
|
|
513
|
+
|
|
368
514
|
def register(reg) -> None:
|
|
515
|
+
@reg.method("models.selection_warnings")
|
|
516
|
+
def selection(ctx: CallContext, params: dict) -> dict:
|
|
517
|
+
if not params.get("model") or not params.get("session_id"):
|
|
518
|
+
raise InvalidParams("model and session_id are required")
|
|
519
|
+
home = profile_home_param(params)
|
|
520
|
+
with scoped_home(home):
|
|
521
|
+
return selection_warnings(home, params)
|
|
522
|
+
|
|
523
|
+
@reg.method("models.speed_tiers")
|
|
524
|
+
def speed_tiers(ctx: CallContext, params: dict) -> dict:
|
|
525
|
+
from ..speed import supported_speed_tiers
|
|
526
|
+
|
|
527
|
+
routes = params.get("routes")
|
|
528
|
+
if not isinstance(routes, list) or any(not isinstance(route, dict) or not route.get("model") for route in routes):
|
|
529
|
+
raise InvalidParams("routes must contain model routes")
|
|
530
|
+
with scoped_home(profile_home_param(params)):
|
|
531
|
+
return {"tiers": [supported_speed_tiers(str(route["model"]), str(route.get("provider") or ""), str(route.get("base_url") or "")) for route in routes]}
|
|
532
|
+
|
|
369
533
|
@reg.method("providers.registry")
|
|
370
534
|
def registry_(ctx: CallContext, params: dict) -> dict:
|
|
371
535
|
with scoped_home(profile_home_param(params)):
|
|
@@ -382,7 +546,13 @@ def register(reg) -> None:
|
|
|
382
546
|
if not provider:
|
|
383
547
|
raise InvalidParams("provider is required")
|
|
384
548
|
with scoped_home(profile_home_param(params)):
|
|
385
|
-
|
|
549
|
+
ids, fallback = model_ids(provider, force_refresh=bool(params.get("force_refresh", False)))
|
|
550
|
+
return {"provider": provider, "model_ids": ids, "fallback": fallback}
|
|
551
|
+
|
|
552
|
+
@reg.method("providers.local_models")
|
|
553
|
+
def local(ctx: CallContext, params: dict) -> dict:
|
|
554
|
+
with scoped_home(profile_home_param(params)):
|
|
555
|
+
return local_models()
|
|
386
556
|
|
|
387
557
|
@reg.method("providers.resolve_runtime")
|
|
388
558
|
def runtime(ctx: CallContext, params: dict) -> dict:
|
|
@@ -2,18 +2,83 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
import json
|
|
5
6
|
import os
|
|
6
7
|
import re
|
|
8
|
+
import subprocess
|
|
9
|
+
import sys
|
|
10
|
+
import tempfile
|
|
11
|
+
import time
|
|
12
|
+
from pathlib import Path
|
|
7
13
|
|
|
8
14
|
from .. import SIDECAR_RPC_VERSION
|
|
9
15
|
from ..errors import InvalidParams, RpcError
|
|
10
|
-
from ..home import edit_launch_env
|
|
16
|
+
from ..home import edit_launch_env, _frozen_launch_env
|
|
11
17
|
from ..rpc import CallContext
|
|
12
18
|
|
|
13
19
|
|
|
14
20
|
def register(registry) -> None:
|
|
15
21
|
runtime = registry.runtime
|
|
16
22
|
|
|
23
|
+
@registry.method("runtime.agent_mutation", requires_agent=False)
|
|
24
|
+
def agent_mutation(ctx: CallContext, params: dict) -> dict:
|
|
25
|
+
from ..agent_mutation import call
|
|
26
|
+
return call(runtime, ctx, params)
|
|
27
|
+
|
|
28
|
+
@registry.method("runtime.agent_recovery", requires_agent=False)
|
|
29
|
+
def agent_recovery(ctx: CallContext, params: dict) -> dict:
|
|
30
|
+
from ..agent_mutation import recover_retained
|
|
31
|
+
return recover_retained(runtime, ctx, probe=params.get('probe') is True, complete_revision=params.get('complete_revision'))
|
|
32
|
+
|
|
33
|
+
@registry.method("runtime.sync_dependencies", requires_agent=False)
|
|
34
|
+
def sync_dependencies(ctx: CallContext, params: dict) -> dict:
|
|
35
|
+
# Source has already advanced; loading it or checking the old revision would prevent repair.
|
|
36
|
+
expected = params.get("agent_dir")
|
|
37
|
+
root = runtime.agent_dir
|
|
38
|
+
if not isinstance(expected, str) or not expected or root is None or Path(expected).resolve() != root.resolve():
|
|
39
|
+
raise InvalidParams("agent_dir must match the sidecar's configured Agent checkout")
|
|
40
|
+
if not (root / "hermes_cli" / "venv_sync.py").is_file():
|
|
41
|
+
return {"ok": True, "skipped": True, "detail": ""}
|
|
42
|
+
env = _frozen_launch_env()
|
|
43
|
+
env.update(HERMES_HOME=str(runtime.hermes_home), HERMES_DISABLE_LAZY_INSTALLS="1",
|
|
44
|
+
PYTHONPATH=str(root) + (os.pathsep + env["PYTHONPATH"] if env.get("PYTHONPATH") else ""))
|
|
45
|
+
# The supervisor's stdin is a lifetime lease: closing it also covers a killed sidecar.
|
|
46
|
+
with tempfile.TemporaryFile() as stdout, tempfile.TemporaryFile() as stderr:
|
|
47
|
+
try:
|
|
48
|
+
proc = subprocess.Popen(
|
|
49
|
+
[sys.executable, str(Path(__file__).parents[1] / "dependency_sync.py"), str(root)],
|
|
50
|
+
cwd=root, env=env, stdin=subprocess.PIPE, stdout=stdout, stderr=stderr,
|
|
51
|
+
)
|
|
52
|
+
except OSError as exc:
|
|
53
|
+
return {"ok": False, "skipped": False, "detail": str(exc)}
|
|
54
|
+
deadline = time.monotonic() + 300
|
|
55
|
+
try:
|
|
56
|
+
while proc.poll() is None:
|
|
57
|
+
ctx.check_cancelled()
|
|
58
|
+
if time.monotonic() >= deadline:
|
|
59
|
+
return {"ok": False, "skipped": False, "detail": "Agent dependency sync timed out."}
|
|
60
|
+
ctx.cancel_event.wait(0.05)
|
|
61
|
+
finally:
|
|
62
|
+
proc.stdin.close()
|
|
63
|
+
proc.wait() # The supervisor terminates and reaps its writer before releasing the lock.
|
|
64
|
+
stdout.seek(0)
|
|
65
|
+
output = stdout.read(4 * 1024 * 1024 + 1)
|
|
66
|
+
stderr.seek(0, os.SEEK_END)
|
|
67
|
+
stderr.seek(max(0, stderr.tell() - 4000))
|
|
68
|
+
diagnostic = stderr.read().decode("utf-8", errors="replace")
|
|
69
|
+
if proc.returncode != 0:
|
|
70
|
+
return {"ok": False, "skipped": False, "detail": diagnostic or output[-4000:].decode("utf-8", errors="replace") or "Agent dependency sync failed."}
|
|
71
|
+
try:
|
|
72
|
+
if len(output) > 4 * 1024 * 1024:
|
|
73
|
+
raise ValueError("sync output exceeds limit")
|
|
74
|
+
response = json.loads(output)
|
|
75
|
+
if not isinstance(response, dict):
|
|
76
|
+
raise ValueError("not an object")
|
|
77
|
+
except ValueError:
|
|
78
|
+
return {"ok": False, "skipped": False, "detail": "Agent dependency sync returned an invalid result."}
|
|
79
|
+
return {"ok": response.get("ok") is True, "skipped": False,
|
|
80
|
+
"detail": str(response.get("detail") or "")[-4000:]}
|
|
81
|
+
|
|
17
82
|
@registry.method("runtime.handshake", requires_agent=False)
|
|
18
83
|
def handshake(ctx: CallContext, params: dict) -> dict:
|
|
19
84
|
requested = params.get("rpc_version")
|
|
@@ -50,6 +115,7 @@ def register(registry) -> None:
|
|
|
50
115
|
raise InvalidParams("set must map variable names to strings")
|
|
51
116
|
if not isinstance(to_unset, list) or not all(isinstance(k, str) and names.match(k) for k in to_unset):
|
|
52
117
|
raise InvalidParams("unset must list variable names")
|
|
118
|
+
to_set = {**to_set, "HERMES_DISABLE_LAZY_INSTALLS": "1"}
|
|
53
119
|
for name in to_unset:
|
|
54
120
|
os.environ.pop(name, None)
|
|
55
121
|
for name, value in to_set.items():
|
|
@@ -67,7 +133,9 @@ def register(registry) -> None:
|
|
|
67
133
|
if not isinstance(code, int):
|
|
68
134
|
raise InvalidParams("exit_code must be an integer")
|
|
69
135
|
from .chat import drain_agents
|
|
136
|
+
from ..agent_mutation import close_all
|
|
70
137
|
|
|
138
|
+
close_all()
|
|
71
139
|
drain_agents()
|
|
72
140
|
ctx.server.request_shutdown(exit_code=code)
|
|
73
141
|
return {"ok": True}
|
|
@@ -54,6 +54,25 @@ def _category(skill_md: Path, dirs: list[Path], local: Path) -> str | None:
|
|
|
54
54
|
|
|
55
55
|
|
|
56
56
|
def list_skills(profile_home: Path, category: str | None = None) -> dict:
|
|
57
|
+
try:
|
|
58
|
+
from agent.skill_utils import get_disabled_skill_names, is_disabled_entry
|
|
59
|
+
from tools.skills_tool import _skill_catalog, _sort_skills
|
|
60
|
+
except ImportError:
|
|
61
|
+
return _legacy_list_skills(profile_home, category)
|
|
62
|
+
disabled = get_disabled_skill_names("webui")
|
|
63
|
+
# Keep disabled rows manageable, but never advertise shadowed or unloadable copies.
|
|
64
|
+
out = [{"name": entry["load_name"], "load_name": entry["load_name"],
|
|
65
|
+
"declared_name": entry["name"], "status": entry["status"], "tier": entry["tier"],
|
|
66
|
+
"description": entry.get("description") or "", "category": entry.get("category"),
|
|
67
|
+
"disabled": is_disabled_entry(entry, disabled)}
|
|
68
|
+
for entry in _skill_catalog(skip_disabled=True) if entry["load_name"]]
|
|
69
|
+
if category:
|
|
70
|
+
out = [s for s in out if s.get("category") == category]
|
|
71
|
+
out = _sort_skills(out)
|
|
72
|
+
return {"success": True, "skills": out, "categories": sorted({s["category"] for s in out if s.get("category")}), "count": len(out)}
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
def _legacy_list_skills(profile_home: Path, category: str | None = None) -> dict:
|
|
57
76
|
skills_dir = profile_home / "skills"
|
|
58
77
|
try:
|
|
59
78
|
from agent.skill_utils import iter_skill_index_files
|
|
@@ -99,6 +118,27 @@ def list_skills(profile_home: Path, category: str | None = None) -> dict:
|
|
|
99
118
|
|
|
100
119
|
|
|
101
120
|
def find_skill(name: str, dirs: list[Path]) -> tuple[Path | None, Path | None]:
|
|
121
|
+
try:
|
|
122
|
+
from agent.skill_utils import resolve_skill_catalog # noqa: F401 - capability gate for the matching lookup API
|
|
123
|
+
from tools.skills_tool import _locate_skill, _skill_lookup_path_error, _skill_search_dirs
|
|
124
|
+
except ImportError:
|
|
125
|
+
return _legacy_find_skill(name, dirs)
|
|
126
|
+
if error := _skill_lookup_path_error(name):
|
|
127
|
+
raise InvalidParams(error)
|
|
128
|
+
local_name = name.replace(":", "/", 1) if ":" in name else None
|
|
129
|
+
if local_name and (error := _skill_lookup_path_error(local_name)):
|
|
130
|
+
raise InvalidParams(error)
|
|
131
|
+
roots, _ = _skill_search_dirs()
|
|
132
|
+
error, skill_dir, skill_md = _locate_skill(name, local_name, roots)
|
|
133
|
+
if error:
|
|
134
|
+
result = json.loads(error)
|
|
135
|
+
if result.get("matches"):
|
|
136
|
+
raise InvalidParams(result["error"])
|
|
137
|
+
return None, None
|
|
138
|
+
return skill_dir, skill_md
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
def _legacy_find_skill(name: str, dirs: list[Path]) -> tuple[Path | None, Path | None]:
|
|
102
142
|
from agent.skill_utils import iter_skill_index_files
|
|
103
143
|
from tools.skills_tool import _EXCLUDED_SKILL_DIRS, _parse_frontmatter
|
|
104
144
|
|
|
@@ -208,9 +248,15 @@ def view_from_file(skill_dir: Path | None, skill_md: Path) -> dict:
|
|
|
208
248
|
def view_skill(profile_home: Path, name: str) -> dict:
|
|
209
249
|
skills_dir = profile_home / "skills"
|
|
210
250
|
dirs = search_dirs(skills_dir)
|
|
211
|
-
|
|
251
|
+
try:
|
|
252
|
+
skill_dir, skill_md = find_skill(name, dirs)
|
|
253
|
+
except InvalidParams as exc:
|
|
254
|
+
return {"success": False, "error": str(exc)}
|
|
212
255
|
if skill_md:
|
|
213
|
-
|
|
256
|
+
result = view_from_file(skill_dir, skill_md)
|
|
257
|
+
if result.get("success"):
|
|
258
|
+
result["editable"] = skill_md.name == "SKILL.md" and _within(skills_dir, skill_md)
|
|
259
|
+
return result
|
|
214
260
|
if ":" in str(name or ""):
|
|
215
261
|
try:
|
|
216
262
|
from agent.skill_utils import is_valid_namespace, parse_qualified_name
|
|
@@ -223,7 +269,10 @@ def view_skill(profile_home: Path, name: str) -> dict:
|
|
|
223
269
|
pm = get_plugin_manager()
|
|
224
270
|
if pm.find_plugin_skill(name) is not None or pm.list_plugin_skills(namespace):
|
|
225
271
|
raw = skill_view(name)
|
|
226
|
-
|
|
272
|
+
result = json.loads(raw) if isinstance(raw, str) else raw
|
|
273
|
+
if result.get("success"):
|
|
274
|
+
result["editable"] = False
|
|
275
|
+
return result
|
|
227
276
|
except Exception: # noqa: BLE001
|
|
228
277
|
pass
|
|
229
278
|
names = [s["name"] for s in list_skills(profile_home).get("skills", [])]
|
|
@@ -259,4 +308,18 @@ def register(registry) -> None:
|
|
|
259
308
|
raise InvalidParams("name is required")
|
|
260
309
|
with scoped_home(home):
|
|
261
310
|
skill_dir, skill_md = find_skill(name, search_dirs(home / "skills"))
|
|
262
|
-
|
|
311
|
+
identity = {}
|
|
312
|
+
if skill_md:
|
|
313
|
+
try:
|
|
314
|
+
from tools.skills_tool import _skill_catalog
|
|
315
|
+
except ImportError:
|
|
316
|
+
pass
|
|
317
|
+
else:
|
|
318
|
+
catalog = _skill_catalog(skip_disabled=True, include_hidden=True)
|
|
319
|
+
entry = next((e for e in catalog if e["path"] == skill_md), None)
|
|
320
|
+
if entry is not None:
|
|
321
|
+
if not entry["load_name"]:
|
|
322
|
+
raise InvalidParams("Skill has no unambiguous catalog identity")
|
|
323
|
+
identity = {"load_name": entry["load_name"], "declared_name": entry["name"],
|
|
324
|
+
"sibling_load_names": [e["load_name"] for e in catalog if e["name"] == entry["name"] and e["load_name"]]}
|
|
325
|
+
return {"found": skill_md is not None, "skill_dir": str(skill_dir) if skill_dir else None, "skill_md": str(skill_md) if skill_md else None, **identity}
|