@ashlr/hub 3.4.0 → 3.5.1
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/CHANGELOG.md +107 -1
- package/README.md +3 -0
- package/dist/build-identity.json +2 -2
- package/dist/cli/index.js +11 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/local-runtime.js +40 -9
- package/dist/cli/local-runtime.js.map +1 -1
- package/dist/core/fleet/external-skill-audit.js +1 -1
- package/dist/core/fleet/external-skill-audit.js.map +1 -1
- package/dist/core/local-eval/classify.d.ts +57 -0
- package/dist/core/local-eval/classify.js +121 -0
- package/dist/core/local-eval/classify.js.map +1 -0
- package/dist/core/local-eval/configuration.d.ts +37 -0
- package/dist/core/local-eval/configuration.js +171 -0
- package/dist/core/local-eval/configuration.js.map +1 -0
- package/dist/core/local-eval/index.d.ts +15 -0
- package/dist/core/local-eval/index.js +16 -0
- package/dist/core/local-eval/index.js.map +1 -0
- package/dist/core/local-eval/main.d.ts +31 -0
- package/dist/core/local-eval/main.js +174 -0
- package/dist/core/local-eval/main.js.map +1 -0
- package/dist/core/local-eval/report.d.ts +25 -0
- package/dist/core/local-eval/report.js +157 -0
- package/dist/core/local-eval/report.js.map +1 -0
- package/dist/core/local-eval/runner.d.ts +55 -0
- package/dist/core/local-eval/runner.js +290 -0
- package/dist/core/local-eval/runner.js.map +1 -0
- package/dist/core/local-eval/tasks.d.ts +22 -0
- package/dist/core/local-eval/tasks.js +303 -0
- package/dist/core/local-eval/tasks.js.map +1 -0
- package/dist/core/local-eval/trace.d.ts +67 -0
- package/dist/core/local-eval/trace.js +309 -0
- package/dist/core/local-eval/trace.js.map +1 -0
- package/dist/core/local-eval/types.d.ts +262 -0
- package/dist/core/local-eval/types.js +23 -0
- package/dist/core/local-eval/types.js.map +1 -0
- package/dist/core/local-runtime/llama/anthropic-proxy-host.d.ts +68 -0
- package/dist/core/local-runtime/llama/anthropic-proxy-host.js +120 -0
- package/dist/core/local-runtime/llama/anthropic-proxy-host.js.map +1 -0
- package/dist/core/local-runtime/llama/anthropic-proxy-process.d.ts +15 -0
- package/dist/core/local-runtime/llama/anthropic-proxy-process.js +21 -0
- package/dist/core/local-runtime/llama/anthropic-proxy-process.js.map +1 -0
- package/dist/core/local-runtime/llama/anthropic-proxy.d.ts +2 -1
- package/dist/core/local-runtime/llama/anthropic-proxy.js +14 -6
- package/dist/core/local-runtime/llama/anthropic-proxy.js.map +1 -1
- package/dist/core/local-runtime/llama/anthropic-shim.d.ts +33 -0
- package/dist/core/local-runtime/llama/anthropic-shim.js +59 -0
- package/dist/core/local-runtime/llama/anthropic-shim.js.map +1 -1
- package/dist/core/local-runtime/llama/config.d.ts +123 -6
- package/dist/core/local-runtime/llama/config.js +196 -6
- package/dist/core/local-runtime/llama/config.js.map +1 -1
- package/dist/core/local-runtime/llama/index.d.ts +15 -0
- package/dist/core/local-runtime/llama/index.js +13 -0
- package/dist/core/local-runtime/llama/index.js.map +1 -1
- package/dist/core/local-runtime/llama/paths.d.ts +17 -0
- package/dist/core/local-runtime/llama/paths.js +25 -0
- package/dist/core/local-runtime/llama/paths.js.map +1 -1
- package/dist/core/local-runtime/llama/proxy-invocation.d.ts +101 -0
- package/dist/core/local-runtime/llama/proxy-invocation.js +134 -0
- package/dist/core/local-runtime/llama/proxy-invocation.js.map +1 -0
- package/dist/core/local-runtime/llama/proxy-launchd.d.ts +83 -0
- package/dist/core/local-runtime/llama/proxy-launchd.js +216 -0
- package/dist/core/local-runtime/llama/proxy-launchd.js.map +1 -0
- package/dist/core/local-runtime/llama/shapes.d.ts +2 -1
- package/dist/core/local-runtime/llama/shapes.js +2 -1
- package/dist/core/local-runtime/llama/shapes.js.map +1 -1
- package/dist/core/verse/adapters/claude.js +16 -0
- package/dist/core/verse/adapters/claude.js.map +1 -1
- package/dist/core/verse/adapters/codex.js +60 -2
- package/dist/core/verse/adapters/codex.js.map +1 -1
- package/dist/core/verse/adapters/grok.js +13 -0
- package/dist/core/verse/adapters/grok.js.map +1 -1
- package/dist/core/verse/control-api.d.ts +8 -9
- package/dist/core/verse/control-api.js +14 -114
- package/dist/core/verse/control-api.js.map +1 -1
- package/dist/core/verse/github-api.d.ts +50 -0
- package/dist/core/verse/github-api.js +211 -0
- package/dist/core/verse/github-api.js.map +1 -0
- package/dist/core/verse/github-proposal.d.ts +64 -0
- package/dist/core/verse/github-proposal.js +186 -0
- package/dist/core/verse/github-proposal.js.map +1 -0
- package/dist/core/verse/github-repo.d.ts +104 -0
- package/dist/core/verse/github-repo.js +476 -0
- package/dist/core/verse/github-repo.js.map +1 -0
- package/dist/core/verse/github-types.d.ts +174 -0
- package/dist/core/verse/github-types.js +31 -0
- package/dist/core/verse/github-types.js.map +1 -0
- package/dist/core/verse/mcp-cli-health.d.ts +149 -0
- package/dist/core/verse/mcp-cli-health.js +227 -0
- package/dist/core/verse/mcp-cli-health.js.map +1 -0
- package/dist/core/verse/mcp-control-api.d.ts +68 -0
- package/dist/core/verse/mcp-control-api.js +322 -0
- package/dist/core/verse/mcp-control-api.js.map +1 -0
- package/dist/core/verse/mcp-mutation.d.ts +187 -0
- package/dist/core/verse/mcp-mutation.js +471 -0
- package/dist/core/verse/mcp-mutation.js.map +1 -0
- package/dist/core/verse/mcp-scope.d.ts +114 -0
- package/dist/core/verse/mcp-scope.js +149 -0
- package/dist/core/verse/mcp-scope.js.map +1 -0
- package/dist/core/verse/mcp-seat-view.d.ts +197 -0
- package/dist/core/verse/mcp-seat-view.js +322 -0
- package/dist/core/verse/mcp-seat-view.js.map +1 -0
- package/dist/core/verse/path-guard.d.ts +115 -0
- package/dist/core/verse/path-guard.js +171 -0
- package/dist/core/verse/path-guard.js.map +1 -0
- package/dist/core/verse/seats.js +30 -2
- package/dist/core/verse/seats.js.map +1 -1
- package/dist/core/verse/session-engine.js +60 -1
- package/dist/core/verse/session-engine.js.map +1 -1
- package/dist/core/verse/session-store.js +20 -0
- package/dist/core/verse/session-store.js.map +1 -1
- package/dist/core/verse/types.d.ts +225 -1
- package/dist/core/verse/types.js +26 -0
- package/dist/core/verse/types.js.map +1 -1
- package/dist/core/verse/verse-api.d.ts +16 -1
- package/dist/core/verse/verse-api.js +338 -16
- package/dist/core/verse/verse-api.js.map +1 -1
- package/dist/core/verse/workspaces.d.ts +130 -0
- package/dist/core/verse/workspaces.js +501 -0
- package/dist/core/verse/workspaces.js.map +1 -0
- package/dist/core/web/api.js +23 -0
- package/dist/core/web/api.js.map +1 -1
- package/dist/core/web/public/next/assets/App-BbVoUCIi.js +7 -0
- package/dist/core/web/public/next/assets/App-BbVoUCIi.js.map +1 -0
- package/dist/core/web/public/next/assets/App-Cgi6j1Gk.css +1 -0
- package/dist/core/web/public/next/assets/ApprovalsSection-BW9iVjUa.js +2 -0
- package/dist/core/web/public/next/assets/ApprovalsSection-BW9iVjUa.js.map +1 -0
- package/dist/core/web/public/next/assets/ApprovalsSection-Su-NUTis.css +1 -0
- package/dist/core/web/public/next/assets/AutonomySection-CRqHUhED.js +2 -0
- package/dist/core/web/public/next/assets/AutonomySection-CRqHUhED.js.map +1 -0
- package/dist/core/web/public/next/assets/AutonomySection-Cpk_oEhc.css +1 -0
- package/dist/core/web/public/next/assets/ChatSection-5irrh6Jw.js +80 -0
- package/dist/core/web/public/next/assets/ChatSection-5irrh6Jw.js.map +1 -0
- package/dist/core/web/public/next/assets/ChatSection-LQiAn6Eu.css +1 -0
- package/dist/core/web/public/next/assets/ConfirmDialog-CXevY3Au.js +2 -0
- package/dist/core/web/public/next/assets/ConfirmDialog-CXevY3Au.js.map +1 -0
- package/dist/core/web/public/next/assets/{ConfirmDialog-cYuivhCX.css → ConfirmDialog-Dx15x0Ho.css} +1 -1
- package/dist/core/web/public/next/assets/Dialog-Bn0CgEGz.js +2 -0
- package/dist/core/web/public/next/assets/Dialog-Bn0CgEGz.js.map +1 -0
- package/dist/core/web/public/next/assets/Dialog-tQ8kFulD.css +1 -0
- package/dist/core/web/public/next/assets/DiffViewer-C8HHTnVE.css +1 -0
- package/dist/core/web/public/next/assets/DiffViewer-QKyisN2L.js +7 -0
- package/dist/core/web/public/next/assets/DiffViewer-QKyisN2L.js.map +1 -0
- package/dist/core/web/public/next/assets/{MutationTokenDialog-jWLLCxWn.css → MutationTokenDialog-CrfJ0PdD.css} +1 -1
- package/dist/core/web/public/next/assets/MutationTokenDialog-DbSHPy3w.js +2 -0
- package/dist/core/web/public/next/assets/MutationTokenDialog-DbSHPy3w.js.map +1 -0
- package/dist/core/web/public/next/assets/ResourcePoolConsoleApp-C-PCgCzo.js +7 -0
- package/dist/core/web/public/next/assets/ResourcePoolConsoleApp-C-PCgCzo.js.map +1 -0
- package/dist/core/web/public/next/assets/ResourcePoolConsoleApp-CM_8pJs6.css +1 -0
- package/dist/core/web/public/next/assets/RouteErrorBoundary-Dw8ZjmkS.js +2 -0
- package/dist/core/web/public/next/assets/RouteErrorBoundary-Dw8ZjmkS.js.map +1 -0
- package/dist/core/web/public/next/assets/RouteErrorBoundary-ekyMXAK8.css +1 -0
- package/dist/core/web/public/next/assets/SettingsSection-BII7TTSD.css +1 -0
- package/dist/core/web/public/next/assets/SettingsSection-CWxtTNlD.js +2 -0
- package/dist/core/web/public/next/assets/SettingsSection-CWxtTNlD.js.map +1 -0
- package/dist/core/web/public/next/assets/UniverseConsoleApp-Bk5HipM0.js +2 -0
- package/dist/core/web/public/next/assets/UniverseConsoleApp-Bk5HipM0.js.map +1 -0
- package/dist/core/web/public/next/assets/UniverseConsoleApp-Dh7A-hLD.css +1 -0
- package/dist/core/web/public/next/assets/UniverseView-Bqa8DH57.css +1 -0
- package/dist/core/web/public/next/assets/UniverseView-D8k9q0ce.js +9 -0
- package/dist/core/web/public/next/assets/UniverseView-D8k9q0ce.js.map +1 -0
- package/dist/core/web/public/next/assets/UsageSection-B2E06ZH1.js +2 -0
- package/dist/core/web/public/next/assets/UsageSection-B2E06ZH1.js.map +1 -0
- package/dist/core/web/public/next/assets/UsageSection-DwgNOYvi.css +1 -0
- package/dist/core/web/public/next/assets/VerseConsoleApp-CRfZUV-T.js +3 -0
- package/dist/core/web/public/next/assets/VerseConsoleApp-CRfZUV-T.js.map +1 -0
- package/dist/core/web/public/next/assets/VerseConsoleApp-D2E3mU9a.css +1 -0
- package/dist/core/web/public/next/assets/charts-CsrtT4rk.css +1 -0
- package/dist/core/web/public/next/assets/charts-DSUpczxG.js +2 -0
- package/dist/core/web/public/next/assets/charts-DSUpczxG.js.map +1 -0
- package/dist/core/web/public/next/assets/fleet-model-ClBbQ0Uj.js +2 -0
- package/dist/core/web/public/next/assets/fleet-model-ClBbQ0Uj.js.map +1 -0
- package/dist/core/web/public/next/assets/format-BNYWGJat.js +2 -0
- package/dist/core/web/public/next/assets/format-BNYWGJat.js.map +1 -0
- package/dist/core/web/public/next/assets/global-C4jfYHrj.js +2 -0
- package/dist/core/web/public/next/assets/global-C4jfYHrj.js.map +1 -0
- package/dist/core/web/public/next/assets/global-D463gG1X.css +1 -0
- package/dist/core/web/public/next/assets/icons-BxOX8-XB.js +2 -0
- package/dist/core/web/public/next/assets/icons-BxOX8-XB.js.map +1 -0
- package/dist/core/web/public/next/assets/index-BMRIET7F.js +11 -0
- package/dist/core/web/public/next/assets/index-BMRIET7F.js.map +1 -0
- package/dist/core/web/public/next/assets/queries-AxnVa02h.js +2 -0
- package/dist/core/web/public/next/assets/queries-AxnVa02h.js.map +1 -0
- package/dist/core/web/public/next/assets/use-guarded-action-BO6c94Wp.js +2 -0
- package/dist/core/web/public/next/assets/use-guarded-action-BO6c94Wp.js.map +1 -0
- package/dist/core/web/public/next/assets/verse-model-CvtK6vP6.js +2 -0
- package/dist/core/web/public/next/assets/verse-model-CvtK6vP6.js.map +1 -0
- package/dist/core/web/public/next/assets/workspace-model-cE4LkKpE.js +2 -0
- package/dist/core/web/public/next/assets/workspace-model-cE4LkKpE.js.map +1 -0
- package/dist/core/web/public/next/index.html +1 -1
- package/dist/release-dependency-inventory.json +1 -1
- package/docs/README.md +4 -0
- package/node_modules/marked/README.md +8 -0
- package/node_modules/marked/bin/main.js +12 -11
- package/node_modules/marked/lib/marked.d.ts +88 -25
- package/node_modules/marked/lib/marked.esm.js +50 -44
- package/node_modules/marked/lib/marked.esm.js.map +3 -3
- package/node_modules/marked/lib/marked.umd.js +50 -44
- package/node_modules/marked/lib/marked.umd.js.map +3 -3
- package/node_modules/marked/man/marked.1 +1 -1
- package/node_modules/marked/package.json +21 -21
- package/package.json +13 -8
- package/dist/cli/activation.d.ts +0 -41
- package/dist/cli/activation.js +0 -485
- package/dist/cli/activation.js.map +0 -1
- package/dist/core/fleet/generated-repair-resolution.d.ts +0 -36
- package/dist/core/fleet/generated-repair-resolution.js +0 -245
- package/dist/core/fleet/generated-repair-resolution.js.map +0 -1
- package/dist/core/local-runtime/llama/port.d.ts +0 -17
- package/dist/core/local-runtime/llama/port.js +0 -47
- package/dist/core/local-runtime/llama/port.js.map +0 -1
- package/dist/core/local-runtime/llama/proxy-host.d.ts +0 -54
- package/dist/core/local-runtime/llama/proxy-host.js +0 -159
- package/dist/core/local-runtime/llama/proxy-host.js.map +0 -1
- package/dist/core/local-runtime/llama/proxy-process.d.ts +0 -148
- package/dist/core/local-runtime/llama/proxy-process.js +0 -250
- package/dist/core/local-runtime/llama/proxy-process.js.map +0 -1
- package/dist/core/local-runtime/llama/proxy-record.d.ts +0 -40
- package/dist/core/local-runtime/llama/proxy-record.js +0 -133
- package/dist/core/local-runtime/llama/proxy-record.js.map +0 -1
- package/dist/core/local-runtime/llama/proxy-supervisor.d.ts +0 -118
- package/dist/core/local-runtime/llama/proxy-supervisor.js +0 -511
- package/dist/core/local-runtime/llama/proxy-supervisor.js.map +0 -1
- package/dist/core/web/public/next/assets/App-BCKqSppK.css +0 -1
- package/dist/core/web/public/next/assets/App-LuILXjWG.js +0 -16
- package/dist/core/web/public/next/assets/App-LuILXjWG.js.map +0 -1
- package/dist/core/web/public/next/assets/ApprovalsSection-B_Xor8JH.js +0 -2
- package/dist/core/web/public/next/assets/ApprovalsSection-B_Xor8JH.js.map +0 -1
- package/dist/core/web/public/next/assets/ApprovalsSection-CRP59wSb.css +0 -1
- package/dist/core/web/public/next/assets/AutonomySection-BB8RD-tv.css +0 -1
- package/dist/core/web/public/next/assets/AutonomySection-BEwITtPJ.js +0 -2
- package/dist/core/web/public/next/assets/AutonomySection-BEwITtPJ.js.map +0 -1
- package/dist/core/web/public/next/assets/ChatSection-DrxqhBPK.css +0 -1
- package/dist/core/web/public/next/assets/ChatSection-bRAzlMth.js +0 -77
- package/dist/core/web/public/next/assets/ChatSection-bRAzlMth.js.map +0 -1
- package/dist/core/web/public/next/assets/ConfirmDialog-BqkZdPs_.js +0 -2
- package/dist/core/web/public/next/assets/ConfirmDialog-BqkZdPs_.js.map +0 -1
- package/dist/core/web/public/next/assets/Dialog-CPmedg4S.js +0 -2
- package/dist/core/web/public/next/assets/Dialog-CPmedg4S.js.map +0 -1
- package/dist/core/web/public/next/assets/Dialog-DxN7RgB5.css +0 -1
- package/dist/core/web/public/next/assets/DiffViewer-DmPJbeM_.js +0 -7
- package/dist/core/web/public/next/assets/DiffViewer-DmPJbeM_.js.map +0 -1
- package/dist/core/web/public/next/assets/DiffViewer-hN7X6wGT.css +0 -1
- package/dist/core/web/public/next/assets/Epistemic-DiyMyeaN.css +0 -1
- package/dist/core/web/public/next/assets/Epistemic-M3SxLHjq.js +0 -2
- package/dist/core/web/public/next/assets/Epistemic-M3SxLHjq.js.map +0 -1
- package/dist/core/web/public/next/assets/Meter-CGBsbXUX.css +0 -1
- package/dist/core/web/public/next/assets/Meter-D_X7c9U3.js +0 -2
- package/dist/core/web/public/next/assets/Meter-D_X7c9U3.js.map +0 -1
- package/dist/core/web/public/next/assets/MutationTokenDialog-Ba5ZHu-8.js +0 -2
- package/dist/core/web/public/next/assets/MutationTokenDialog-Ba5ZHu-8.js.map +0 -1
- package/dist/core/web/public/next/assets/RefreshIndicator-O7jUBOmX.css +0 -1
- package/dist/core/web/public/next/assets/RefreshIndicator-vHGpmyzb.js +0 -2
- package/dist/core/web/public/next/assets/RefreshIndicator-vHGpmyzb.js.map +0 -1
- package/dist/core/web/public/next/assets/ResourcePoolConsoleApp-B5g6JEVk.js +0 -7
- package/dist/core/web/public/next/assets/ResourcePoolConsoleApp-B5g6JEVk.js.map +0 -1
- package/dist/core/web/public/next/assets/ResourcePoolConsoleApp-DLl4DbGG.css +0 -1
- package/dist/core/web/public/next/assets/RouteErrorBoundary-BIpdnxp-.css +0 -1
- package/dist/core/web/public/next/assets/RouteErrorBoundary-CroxuKoi.js +0 -2
- package/dist/core/web/public/next/assets/RouteErrorBoundary-CroxuKoi.js.map +0 -1
- package/dist/core/web/public/next/assets/SettingsSection-DGJMdUh2.css +0 -1
- package/dist/core/web/public/next/assets/SettingsSection-p-7FCGfn.js +0 -2
- package/dist/core/web/public/next/assets/SettingsSection-p-7FCGfn.js.map +0 -1
- package/dist/core/web/public/next/assets/Skeleton-4qq4HuJO.js +0 -2
- package/dist/core/web/public/next/assets/Skeleton-4qq4HuJO.js.map +0 -1
- package/dist/core/web/public/next/assets/Skeleton-D2JaTXyv.css +0 -1
- package/dist/core/web/public/next/assets/StatusBadge-BbEdqEGn.js +0 -2
- package/dist/core/web/public/next/assets/StatusBadge-BbEdqEGn.js.map +0 -1
- package/dist/core/web/public/next/assets/StatusBadge-TpDqZf6K.css +0 -1
- package/dist/core/web/public/next/assets/TableView-R6Yeztp1.css +0 -1
- package/dist/core/web/public/next/assets/TableView-nyYs7Sv1.js +0 -2
- package/dist/core/web/public/next/assets/TableView-nyYs7Sv1.js.map +0 -1
- package/dist/core/web/public/next/assets/UniverseConsoleApp-CiZZxRPV.css +0 -1
- package/dist/core/web/public/next/assets/UniverseConsoleApp-DjTpQUrA.js +0 -2
- package/dist/core/web/public/next/assets/UniverseConsoleApp-DjTpQUrA.js.map +0 -1
- package/dist/core/web/public/next/assets/UniverseView-BtApwayT.js +0 -9
- package/dist/core/web/public/next/assets/UniverseView-BtApwayT.js.map +0 -1
- package/dist/core/web/public/next/assets/UniverseView-gBxl6yum.css +0 -1
- package/dist/core/web/public/next/assets/UsageSection-Db99N6ao.js +0 -2
- package/dist/core/web/public/next/assets/UsageSection-Db99N6ao.js.map +0 -1
- package/dist/core/web/public/next/assets/UsageSection-UUYDidOg.css +0 -1
- package/dist/core/web/public/next/assets/VerseConsoleApp-COa3J2dO.js +0 -3
- package/dist/core/web/public/next/assets/VerseConsoleApp-COa3J2dO.js.map +0 -1
- package/dist/core/web/public/next/assets/VerseConsoleApp-mOAXvWa6.css +0 -1
- package/dist/core/web/public/next/assets/fleet-model-DXCfVtNW.js +0 -2
- package/dist/core/web/public/next/assets/fleet-model-DXCfVtNW.js.map +0 -1
- package/dist/core/web/public/next/assets/format-fggwu_Rs.js +0 -2
- package/dist/core/web/public/next/assets/format-fggwu_Rs.js.map +0 -1
- package/dist/core/web/public/next/assets/global-BeRYd1Bu.css +0 -1
- package/dist/core/web/public/next/assets/global-CNVapoV1.js +0 -2
- package/dist/core/web/public/next/assets/global-CNVapoV1.js.map +0 -1
- package/dist/core/web/public/next/assets/index-BkUlX2Se.js +0 -51
- package/dist/core/web/public/next/assets/index-BkUlX2Se.js.map +0 -1
- package/dist/core/web/public/next/assets/index-YNTgDG2b.js +0 -2
- package/dist/core/web/public/next/assets/index-YNTgDG2b.js.map +0 -1
- package/dist/core/web/public/next/assets/queries-C9XS4SYq.js +0 -2
- package/dist/core/web/public/next/assets/queries-C9XS4SYq.js.map +0 -1
- package/dist/core/web/public/next/assets/use-guarded-action-Bqa2v0a-.css +0 -1
- package/dist/core/web/public/next/assets/use-guarded-action-Bql1nA-z.js +0 -2
- package/dist/core/web/public/next/assets/use-guarded-action-Bql1nA-z.js.map +0 -1
- package/dist/core/web/public/next/assets/verse-model-IrNQKtER.js +0 -2
- package/dist/core/web/public/next/assets/verse-model-IrNQKtER.js.map +0 -1
- package/node_modules/which/CHANGELOG.md +0 -166
- /package/node_modules/marked/{LICENSE.md → LICENSE} +0 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* core/verse/github-types.ts — the GitHub wire contract for Ashlr Verse
|
|
3
|
+
* (docs/VERSE-WORKSPACES.md §2).
|
|
4
|
+
*
|
|
5
|
+
* `src/core/integrations/github.ts` already does the hard part; none of it was
|
|
6
|
+
* reachable from Verse. These are the shapes that carry it across the wire,
|
|
7
|
+
* plus the one shape the hub never had: a DISCLOSURE of what an approved
|
|
8
|
+
* proposal of kind `pr` is about to do, computed BEFORE the operator clicks.
|
|
9
|
+
*
|
|
10
|
+
* TWO RULES ENCODED HERE RATHER THAN LEFT TO THE UI
|
|
11
|
+
*
|
|
12
|
+
* 1. NO REMOTE URL EVER APPEARS IN THESE SHAPES. A git remote URL may carry
|
|
13
|
+
* credentials in its userinfo (`https://x-access-token:<token>@github.com/…`
|
|
14
|
+
* is a supported GitHub transport, and core/git.ts's canonicaliser accepts
|
|
15
|
+
* it). Repository identity therefore travels ONLY as `nameWithOwner`, which
|
|
16
|
+
* is derived from the URL and cannot contain one. `pushUrl`/`fetchUrls` from
|
|
17
|
+
* `resolveGitHubOriginAuthorityDetails()` are deliberately dropped on the
|
|
18
|
+
* floor; see test/verse-github-repo.test.ts for the guard that keeps it so.
|
|
19
|
+
*
|
|
20
|
+
* 2. THE PR PLAN IS A PREDICTION, AND SAYS SO. Before apply, `branch` and
|
|
21
|
+
* `base` are what `core/inbox/apply.ts` WOULD use; after apply they are what
|
|
22
|
+
* it DID use, read back off `proposal.remoteHandoff`. `baseSource` and
|
|
23
|
+
* `branchSource` name which of the two an operator is looking at, because a
|
|
24
|
+
* disclosure that cannot distinguish a prediction from a record is not a
|
|
25
|
+
* disclosure.
|
|
26
|
+
*
|
|
27
|
+
* Nothing here is a new source of truth — every field is a projection of state
|
|
28
|
+
* the hub already computes.
|
|
29
|
+
*/
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=github-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github-types.js","sourceRoot":"","sources":["../../../src/core/verse/github-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG"}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* core/verse/mcp-cli-health.ts — per-account CLI health, and version drift.
|
|
3
|
+
*
|
|
4
|
+
* docs/VERSE-WORKSPACES.md §3: "Per-account CLI health is nearly free: the
|
|
5
|
+
* probes already report auth state, plan and CLI version per account. A
|
|
6
|
+
* version drift is worth surfacing loudly, because the Claude usage probe is
|
|
7
|
+
* pinned to an exact CLI version and fails closed when it moves."
|
|
8
|
+
*
|
|
9
|
+
* ── One correction to that premise, found in the source ─────────────────────
|
|
10
|
+
*
|
|
11
|
+
* Auth state and plan ARE already reported per account, on
|
|
12
|
+
* `VerseAccountRecord` (`state` / `authentication` / `planType`). The CLI
|
|
13
|
+
* VERSION is not. Nothing caches it:
|
|
14
|
+
*
|
|
15
|
+
* - `probeClaudeAccountUsage` runs `--version`, COMPARES it to an inline
|
|
16
|
+
* literal, and throws the string away — it keeps only the verdict, as the
|
|
17
|
+
* verbatim reason `usage-version-unsupported`
|
|
18
|
+
* (src/core/resources/claude-account-usage.ts:99).
|
|
19
|
+
* - `checkResourceLauncherCompatibility` DOES return a recognised numeric
|
|
20
|
+
* `version` (src/core/resources/launcher-compatibility.ts:163-165), but it
|
|
21
|
+
* is only ever reached from the `ashlr resources launcher check` CLI
|
|
22
|
+
* command. No route, collector or snapshot calls it.
|
|
23
|
+
*
|
|
24
|
+
* So this module splits the two honestly:
|
|
25
|
+
*
|
|
26
|
+
* 1. {@link buildVerseCliHealth} is PURE and free. It derives drift from
|
|
27
|
+
* what the collector already has: the verbatim probe reason plus the
|
|
28
|
+
* pinned-version constant. When the probe is failing closed on the pin,
|
|
29
|
+
* that is stated as a FACT, loudly, with the pin quoted — not as a
|
|
30
|
+
* generic "unknown".
|
|
31
|
+
* 2. {@link probeVerseAccountCliVersions} gets the actual installed version
|
|
32
|
+
* number, and it SPAWNS the provider CLI to do it. It is therefore not
|
|
33
|
+
* wired to a GET. A read route that silently launches four vendor
|
|
34
|
+
* binaries is a side effect wearing a read's clothes.
|
|
35
|
+
*
|
|
36
|
+
* ── What may leave this module ──────────────────────────────────────────────
|
|
37
|
+
*
|
|
38
|
+
* Never a launcher argv, never a private absolute path. The probe result
|
|
39
|
+
* shape carries id / provider / version / status / reason and nothing else;
|
|
40
|
+
* `ResourceLauncherCompatibilityResult` itself never echoes the command.
|
|
41
|
+
*/
|
|
42
|
+
import { checkResourceLauncherCompatibility, type ResourceLauncherCompatibilityResult } from '../resources/launcher-compatibility.js';
|
|
43
|
+
import { type VerseAccountProvider, type VerseAccountRecord } from './accounts.js';
|
|
44
|
+
export type VerseCliVersionState =
|
|
45
|
+
/** A probe ran and the installed version is the pinned one. */
|
|
46
|
+
'matches-pin'
|
|
47
|
+
/** The usage probe is failing closed because the installed CLI is not the pin. */
|
|
48
|
+
| 'drift'
|
|
49
|
+
/** A probe ran and reported a version, but nothing pins this provider. */
|
|
50
|
+
| 'reported'
|
|
51
|
+
/** No version has been read. This is the default, and it is not a fault. */
|
|
52
|
+
| 'unverified';
|
|
53
|
+
export interface VerseAccountCliHealth {
|
|
54
|
+
accountId: string;
|
|
55
|
+
label: string;
|
|
56
|
+
provider: VerseAccountProvider;
|
|
57
|
+
/** Straight off the collector's record — already surfaced, just not here. */
|
|
58
|
+
authentication: VerseAccountRecord['authentication'];
|
|
59
|
+
state: VerseAccountRecord['state'];
|
|
60
|
+
health: VerseAccountRecord['health'];
|
|
61
|
+
planType: string | null;
|
|
62
|
+
observedAt: string | null;
|
|
63
|
+
/** Verbatim probe reason. Never rewritten into prose. */
|
|
64
|
+
reason: string;
|
|
65
|
+
/** The installed CLI version, when something actually read it. Never guessed. */
|
|
66
|
+
version: string | null;
|
|
67
|
+
/** The version this hub's usage probe requires. Null when nothing is pinned. */
|
|
68
|
+
pinnedVersion: string | null;
|
|
69
|
+
versionState: VerseCliVersionState;
|
|
70
|
+
/**
|
|
71
|
+
* TRUE when the usage probe is refusing to read this account's quota
|
|
72
|
+
* BECAUSE of the version pin. This is the loud bit: it is a one-line
|
|
73
|
+
* constant bump, not an outage, and a silent "unknown" would hide it.
|
|
74
|
+
*/
|
|
75
|
+
usageBlockedByPin: boolean;
|
|
76
|
+
notes: string[];
|
|
77
|
+
}
|
|
78
|
+
export interface VerseCliHealthSnapshot {
|
|
79
|
+
sampledAt: string;
|
|
80
|
+
accounts: VerseAccountCliHealth[];
|
|
81
|
+
/** TRUE when any account is blocked by the pin. Drives the loud banner. */
|
|
82
|
+
driftDetected: boolean;
|
|
83
|
+
notes: string[];
|
|
84
|
+
}
|
|
85
|
+
export declare function verseCliPinNote(pinned: string): string;
|
|
86
|
+
export declare const VERSE_CLI_VERSION_UNREAD_NOTE: string;
|
|
87
|
+
/**
|
|
88
|
+
* The pinned version is stored TWICE, and the two copies are never compared:
|
|
89
|
+
* the enforcing check is an inline literal in the usage probe, and
|
|
90
|
+
* `VERSE_CLAUDE_USAGE_PINNED_VERSION` is a mirror kept for display. They can
|
|
91
|
+
* drift silently. `test/verse-mcp-cli-health.test.ts` compares them.
|
|
92
|
+
*/
|
|
93
|
+
export declare const VERSE_CLI_PIN_SOURCE = "src/core/resources/claude-account-usage.ts";
|
|
94
|
+
/** One measured version reading. The only shape the probe is allowed to emit. */
|
|
95
|
+
export interface VerseCliVersionReading {
|
|
96
|
+
/** Recognised numeric version, or null when the output was not recognised. */
|
|
97
|
+
version: string | null;
|
|
98
|
+
status: ResourceLauncherCompatibilityResult['status'];
|
|
99
|
+
reason: ResourceLauncherCompatibilityResult['reason'];
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Per-account CLI health from what the collector already knows.
|
|
103
|
+
*
|
|
104
|
+
* PURE. No filesystem, no subprocess. `readings` is optional and only present
|
|
105
|
+
* after an operator has explicitly run the version probe.
|
|
106
|
+
*/
|
|
107
|
+
export declare function buildVerseCliHealth(options: {
|
|
108
|
+
accounts: readonly VerseAccountRecord[];
|
|
109
|
+
readings?: ReadonlyMap<string, VerseCliVersionReading>;
|
|
110
|
+
now?: () => Date;
|
|
111
|
+
}): VerseCliHealthSnapshot;
|
|
112
|
+
/**
|
|
113
|
+
* Per-account launcher argv + private cwd. NEVER serialized, never logged.
|
|
114
|
+
*
|
|
115
|
+
* Exported only so the injection seam below can be typed by a caller (and so
|
|
116
|
+
* declaration emit does not have to name a private type). Producing one of
|
|
117
|
+
* these is reading an account's identity; publishing one is a leak.
|
|
118
|
+
*/
|
|
119
|
+
export interface VerseCliAccountLaunch {
|
|
120
|
+
id: string;
|
|
121
|
+
provider: VerseAccountProvider;
|
|
122
|
+
command: string[];
|
|
123
|
+
cwd: string;
|
|
124
|
+
}
|
|
125
|
+
/** Injection seam so tests never spawn a provider CLI. */
|
|
126
|
+
export type VerseCliCompatibilityCheck = typeof checkResourceLauncherCompatibility;
|
|
127
|
+
export interface VerseCliProbeOptions {
|
|
128
|
+
accountsRoot: string;
|
|
129
|
+
/** Per-account deadline. The underlying check makes up to four invocations. */
|
|
130
|
+
timeoutMs?: number;
|
|
131
|
+
signal?: AbortSignal;
|
|
132
|
+
/** Injected compatibility check (tests). Defaults to the real one. */
|
|
133
|
+
check?: VerseCliCompatibilityCheck;
|
|
134
|
+
/** Injected launch reader (tests). Defaults to reading connections.json. */
|
|
135
|
+
readLaunches?: (accountsRoot: string) => VerseCliAccountLaunch[];
|
|
136
|
+
}
|
|
137
|
+
export declare const VERSE_CLI_PROBE_DEFAULT_TIMEOUT_MS = 10000;
|
|
138
|
+
/**
|
|
139
|
+
* Run the real `--version` / `--help` compatibility check per account.
|
|
140
|
+
*
|
|
141
|
+
* SPAWNS the provider CLI (help/version arguments only — no login, no prompt,
|
|
142
|
+
* no quota read; see launcher-compatibility.ts's own contract). Sequential on
|
|
143
|
+
* purpose: four concurrent native CLIs is exactly the burst that starves other
|
|
144
|
+
* probes on this machine.
|
|
145
|
+
*
|
|
146
|
+
* Returns ONLY the reading. The launcher argv and the private cwd that were
|
|
147
|
+
* needed to produce it are dropped here and never reach a caller.
|
|
148
|
+
*/
|
|
149
|
+
export declare function probeVerseAccountCliVersions(options: VerseCliProbeOptions): Promise<Map<string, VerseCliVersionReading>>;
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* core/verse/mcp-cli-health.ts — per-account CLI health, and version drift.
|
|
3
|
+
*
|
|
4
|
+
* docs/VERSE-WORKSPACES.md §3: "Per-account CLI health is nearly free: the
|
|
5
|
+
* probes already report auth state, plan and CLI version per account. A
|
|
6
|
+
* version drift is worth surfacing loudly, because the Claude usage probe is
|
|
7
|
+
* pinned to an exact CLI version and fails closed when it moves."
|
|
8
|
+
*
|
|
9
|
+
* ── One correction to that premise, found in the source ─────────────────────
|
|
10
|
+
*
|
|
11
|
+
* Auth state and plan ARE already reported per account, on
|
|
12
|
+
* `VerseAccountRecord` (`state` / `authentication` / `planType`). The CLI
|
|
13
|
+
* VERSION is not. Nothing caches it:
|
|
14
|
+
*
|
|
15
|
+
* - `probeClaudeAccountUsage` runs `--version`, COMPARES it to an inline
|
|
16
|
+
* literal, and throws the string away — it keeps only the verdict, as the
|
|
17
|
+
* verbatim reason `usage-version-unsupported`
|
|
18
|
+
* (src/core/resources/claude-account-usage.ts:99).
|
|
19
|
+
* - `checkResourceLauncherCompatibility` DOES return a recognised numeric
|
|
20
|
+
* `version` (src/core/resources/launcher-compatibility.ts:163-165), but it
|
|
21
|
+
* is only ever reached from the `ashlr resources launcher check` CLI
|
|
22
|
+
* command. No route, collector or snapshot calls it.
|
|
23
|
+
*
|
|
24
|
+
* So this module splits the two honestly:
|
|
25
|
+
*
|
|
26
|
+
* 1. {@link buildVerseCliHealth} is PURE and free. It derives drift from
|
|
27
|
+
* what the collector already has: the verbatim probe reason plus the
|
|
28
|
+
* pinned-version constant. When the probe is failing closed on the pin,
|
|
29
|
+
* that is stated as a FACT, loudly, with the pin quoted — not as a
|
|
30
|
+
* generic "unknown".
|
|
31
|
+
* 2. {@link probeVerseAccountCliVersions} gets the actual installed version
|
|
32
|
+
* number, and it SPAWNS the provider CLI to do it. It is therefore not
|
|
33
|
+
* wired to a GET. A read route that silently launches four vendor
|
|
34
|
+
* binaries is a side effect wearing a read's clothes.
|
|
35
|
+
*
|
|
36
|
+
* ── What may leave this module ──────────────────────────────────────────────
|
|
37
|
+
*
|
|
38
|
+
* Never a launcher argv, never a private absolute path. The probe result
|
|
39
|
+
* shape carries id / provider / version / status / reason and nothing else;
|
|
40
|
+
* `ResourceLauncherCompatibilityResult` itself never echoes the command.
|
|
41
|
+
*/
|
|
42
|
+
import { readFileSync } from 'node:fs';
|
|
43
|
+
import { dirname, join } from 'node:path';
|
|
44
|
+
import { checkResourceLauncherCompatibility, } from '../resources/launcher-compatibility.js';
|
|
45
|
+
import { VERSE_CLAUDE_USAGE_PINNED_VERSION, VERSE_CLAUDE_VERSION_REASON, } from './accounts.js';
|
|
46
|
+
// ---------------------------------------------------------------------------
|
|
47
|
+
// Notes
|
|
48
|
+
// ---------------------------------------------------------------------------
|
|
49
|
+
export function verseCliPinNote(pinned) {
|
|
50
|
+
return (`The Claude usage probe only runs against Claude Code ${pinned} and fails closed on any ` +
|
|
51
|
+
'other build, so this account has no quota reading until the installed CLI matches the ' +
|
|
52
|
+
'pin or the pin is moved. This is a version pin, not an outage.');
|
|
53
|
+
}
|
|
54
|
+
export const VERSE_CLI_VERSION_UNREAD_NOTE = 'No CLI version has been read for this account. Nothing in the collector records one; ' +
|
|
55
|
+
'the version check is an explicit action because it launches the provider CLI.';
|
|
56
|
+
/**
|
|
57
|
+
* The pinned version is stored TWICE, and the two copies are never compared:
|
|
58
|
+
* the enforcing check is an inline literal in the usage probe, and
|
|
59
|
+
* `VERSE_CLAUDE_USAGE_PINNED_VERSION` is a mirror kept for display. They can
|
|
60
|
+
* drift silently. `test/verse-mcp-cli-health.test.ts` compares them.
|
|
61
|
+
*/
|
|
62
|
+
export const VERSE_CLI_PIN_SOURCE = 'src/core/resources/claude-account-usage.ts';
|
|
63
|
+
// ---------------------------------------------------------------------------
|
|
64
|
+
// Pure derivation — free, and the default
|
|
65
|
+
// ---------------------------------------------------------------------------
|
|
66
|
+
/** Providers whose usage probe is pinned to an exact CLI build. */
|
|
67
|
+
const PINNED_VERSION = {
|
|
68
|
+
claude: VERSE_CLAUDE_USAGE_PINNED_VERSION,
|
|
69
|
+
};
|
|
70
|
+
function deriveOne(record, reading) {
|
|
71
|
+
const pinnedVersion = PINNED_VERSION[record.provider] ?? null;
|
|
72
|
+
// The collector's verbatim reason is the free drift signal: the usage probe
|
|
73
|
+
// emits exactly this code when `--version` did not match the pin.
|
|
74
|
+
const usageBlockedByPin = pinnedVersion !== null && record.reason === VERSE_CLAUDE_VERSION_REASON;
|
|
75
|
+
const version = reading?.version ?? null;
|
|
76
|
+
const versionState = usageBlockedByPin ? 'drift'
|
|
77
|
+
: version === null ? 'unverified'
|
|
78
|
+
: pinnedVersion === null ? 'reported'
|
|
79
|
+
: version === pinnedVersion ? 'matches-pin'
|
|
80
|
+
: 'drift';
|
|
81
|
+
const notes = [];
|
|
82
|
+
if (usageBlockedByPin || (pinnedVersion !== null && version !== null && version !== pinnedVersion)) {
|
|
83
|
+
notes.push(verseCliPinNote(pinnedVersion));
|
|
84
|
+
}
|
|
85
|
+
if (version === null)
|
|
86
|
+
notes.push(VERSE_CLI_VERSION_UNREAD_NOTE);
|
|
87
|
+
return {
|
|
88
|
+
accountId: record.id,
|
|
89
|
+
label: record.label,
|
|
90
|
+
provider: record.provider,
|
|
91
|
+
authentication: record.authentication,
|
|
92
|
+
state: record.state,
|
|
93
|
+
health: record.health,
|
|
94
|
+
planType: record.planType,
|
|
95
|
+
observedAt: record.observedAt,
|
|
96
|
+
reason: record.reason,
|
|
97
|
+
version,
|
|
98
|
+
pinnedVersion,
|
|
99
|
+
versionState,
|
|
100
|
+
usageBlockedByPin,
|
|
101
|
+
notes,
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Per-account CLI health from what the collector already knows.
|
|
106
|
+
*
|
|
107
|
+
* PURE. No filesystem, no subprocess. `readings` is optional and only present
|
|
108
|
+
* after an operator has explicitly run the version probe.
|
|
109
|
+
*/
|
|
110
|
+
export function buildVerseCliHealth(options) {
|
|
111
|
+
const readings = options.readings;
|
|
112
|
+
const accounts = options.accounts.map((record) => deriveOne(record, readings?.get(record.id)));
|
|
113
|
+
const drifted = accounts.filter((account) => account.versionState === 'drift');
|
|
114
|
+
const notes = [];
|
|
115
|
+
if (drifted.length > 0) {
|
|
116
|
+
notes.push(`${drifted.length} account${drifted.length === 1 ? '' : 's'} ` +
|
|
117
|
+
`${drifted.length === 1 ? 'is' : 'are'} running a CLI the usage probe does not accept. ` +
|
|
118
|
+
`The pin lives in ${VERSE_CLI_PIN_SOURCE}.`);
|
|
119
|
+
}
|
|
120
|
+
return {
|
|
121
|
+
sampledAt: (options.now ?? (() => new Date()))().toISOString(),
|
|
122
|
+
accounts,
|
|
123
|
+
driftDetected: drifted.length > 0,
|
|
124
|
+
notes,
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Read the launcher argv and private state directory for each account.
|
|
129
|
+
*
|
|
130
|
+
* Both are the account's identity and stay inside this process. The returned
|
|
131
|
+
* value is consumed by {@link probeVerseAccountCliVersions} and never leaves.
|
|
132
|
+
*/
|
|
133
|
+
function readAccountLaunches(accountsRoot) {
|
|
134
|
+
let parsed;
|
|
135
|
+
try {
|
|
136
|
+
const raw = readFileSync(join(accountsRoot, 'connections.json'), 'utf8');
|
|
137
|
+
if (raw.length > 1024 * 1024)
|
|
138
|
+
return [];
|
|
139
|
+
parsed = JSON.parse(raw);
|
|
140
|
+
}
|
|
141
|
+
catch {
|
|
142
|
+
return [];
|
|
143
|
+
}
|
|
144
|
+
if (parsed === null || typeof parsed !== 'object' || Array.isArray(parsed))
|
|
145
|
+
return [];
|
|
146
|
+
const accounts = parsed['accounts'];
|
|
147
|
+
if (!Array.isArray(accounts))
|
|
148
|
+
return [];
|
|
149
|
+
const out = [];
|
|
150
|
+
for (const entry of accounts) {
|
|
151
|
+
if (entry === null || typeof entry !== 'object' || Array.isArray(entry))
|
|
152
|
+
continue;
|
|
153
|
+
const row = entry;
|
|
154
|
+
const id = row['id'];
|
|
155
|
+
const provider = row['provider'];
|
|
156
|
+
const command = row['command'];
|
|
157
|
+
if (typeof id !== 'string' || id.length === 0)
|
|
158
|
+
continue;
|
|
159
|
+
if (provider !== 'codex' && provider !== 'claude' && provider !== 'grok')
|
|
160
|
+
continue;
|
|
161
|
+
if (!Array.isArray(command) || !command.every((part) => typeof part === 'string'))
|
|
162
|
+
continue;
|
|
163
|
+
const launcher = command.find((part) => part.endsWith('launcher.mjs'));
|
|
164
|
+
if (launcher === undefined)
|
|
165
|
+
continue;
|
|
166
|
+
let cwd = null;
|
|
167
|
+
try {
|
|
168
|
+
const manifest = JSON.parse(readFileSync(join(dirname(launcher), 'profile.json'), 'utf8'));
|
|
169
|
+
if (manifest !== null && typeof manifest === 'object' && !Array.isArray(manifest)) {
|
|
170
|
+
const value = manifest['nativeStatePath'];
|
|
171
|
+
if (typeof value === 'string' && value.length > 0)
|
|
172
|
+
cwd = value;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
catch {
|
|
176
|
+
cwd = null;
|
|
177
|
+
}
|
|
178
|
+
if (cwd === null)
|
|
179
|
+
continue;
|
|
180
|
+
out.push({ id, provider, command: command, cwd });
|
|
181
|
+
if (out.length >= 8)
|
|
182
|
+
break;
|
|
183
|
+
}
|
|
184
|
+
return out;
|
|
185
|
+
}
|
|
186
|
+
export const VERSE_CLI_PROBE_DEFAULT_TIMEOUT_MS = 10_000;
|
|
187
|
+
/**
|
|
188
|
+
* Run the real `--version` / `--help` compatibility check per account.
|
|
189
|
+
*
|
|
190
|
+
* SPAWNS the provider CLI (help/version arguments only — no login, no prompt,
|
|
191
|
+
* no quota read; see launcher-compatibility.ts's own contract). Sequential on
|
|
192
|
+
* purpose: four concurrent native CLIs is exactly the burst that starves other
|
|
193
|
+
* probes on this machine.
|
|
194
|
+
*
|
|
195
|
+
* Returns ONLY the reading. The launcher argv and the private cwd that were
|
|
196
|
+
* needed to produce it are dropped here and never reach a caller.
|
|
197
|
+
*/
|
|
198
|
+
export async function probeVerseAccountCliVersions(options) {
|
|
199
|
+
const check = options.check ?? checkResourceLauncherCompatibility;
|
|
200
|
+
const read = options.readLaunches ?? readAccountLaunches;
|
|
201
|
+
const timeoutMs = options.timeoutMs ?? VERSE_CLI_PROBE_DEFAULT_TIMEOUT_MS;
|
|
202
|
+
const out = new Map();
|
|
203
|
+
for (const launch of read(options.accountsRoot)) {
|
|
204
|
+
if (options.signal?.aborted)
|
|
205
|
+
break;
|
|
206
|
+
try {
|
|
207
|
+
const result = await check({
|
|
208
|
+
provider: launch.provider,
|
|
209
|
+
command: launch.command,
|
|
210
|
+
cwd: launch.cwd,
|
|
211
|
+
timeoutMs,
|
|
212
|
+
...(options.signal ? { signal: options.signal } : {}),
|
|
213
|
+
});
|
|
214
|
+
out.set(launch.id, {
|
|
215
|
+
version: result.version,
|
|
216
|
+
status: result.status,
|
|
217
|
+
reason: result.reason,
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
catch {
|
|
221
|
+
// A refused configuration is a reading of "unavailable", not a crash.
|
|
222
|
+
out.set(launch.id, { version: null, status: 'unavailable', reason: 'launcher-process-failed' });
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
return out;
|
|
226
|
+
}
|
|
227
|
+
//# sourceMappingURL=mcp-cli-health.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-cli-health.js","sourceRoot":"","sources":["../../../src/core/verse/mcp-cli-health.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,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AE,CAAC;aACtD,CAAC,CAAC;YACH,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,EAAE;gBACjB,OAAO,EAAE,MAAM,CAAC,OAAO;gBACvB,MAAM,EAAE,MAAM,CAAC,MAAM;gBACrB,MAAM,EAAE,MAAM,CAAC,MAAM;aACtB,CAAC,CAAC;QACL,CAAC;QAAC,MAAM,CAAC;YACP,sEAAsE;YACtE,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,yBAAyB,EAAE,CAAC,CAAC;QAClG,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* core/verse/mcp-control-api.ts — the HTTP surface for MCP and per-account
|
|
3
|
+
* CLI management.
|
|
4
|
+
*
|
|
5
|
+
* Deliberately a SEPARATE handler from `control-api.ts` rather than new arms
|
|
6
|
+
* on its `if`-chain: that file is owned by another work stream, and this one
|
|
7
|
+
* carries a mutation that installs arbitrary code. Keeping them apart means
|
|
8
|
+
* the review surface for "can the hub run new code" is one file.
|
|
9
|
+
*
|
|
10
|
+
* ── Route shape ─────────────────────────────────────────────────────────────
|
|
11
|
+
*
|
|
12
|
+
* GET /api/verse/mcp which servers each seat would load
|
|
13
|
+
* GET /api/verse/mcp/cli-health per-account auth, plan and version drift
|
|
14
|
+
* POST /api/verse/mcp/cli-probe read the installed CLI versions (SPAWNS)
|
|
15
|
+
* POST /api/verse/mcp/proposal validate + disclose a write (writes nothing)
|
|
16
|
+
* POST /api/verse/mcp/apply perform the write the digest confirms
|
|
17
|
+
*
|
|
18
|
+
* The two GETs are free: no subprocess, no provider call, no write. Everything
|
|
19
|
+
* that costs something or changes something is a POST behind
|
|
20
|
+
* `passesMutationGate`, including `cli-probe` — it launches up to four vendor
|
|
21
|
+
* binaries, and a read route that does that is a side effect in disguise.
|
|
22
|
+
*
|
|
23
|
+
* `proposal` is a POST for the same reason, even though it writes nothing: it
|
|
24
|
+
* carries an operator-supplied command in its body, and it is the step that
|
|
25
|
+
* must be authenticated for the resulting digest to mean anything.
|
|
26
|
+
*
|
|
27
|
+
* ── Ordering requirement ────────────────────────────────────────────────────
|
|
28
|
+
*
|
|
29
|
+
* These paths live under `/api/verse/*`, which `isVerseApiPath()` matches
|
|
30
|
+
* wholesale and 404s when it does not recognise. So the dispatch call in
|
|
31
|
+
* `src/core/web/api.ts` MUST come before both `isVerseControlPath` and
|
|
32
|
+
* `isVerseApiPath`. See the comment at that call site.
|
|
33
|
+
*/
|
|
34
|
+
import type { IncomingMessage, ServerResponse } from 'node:http';
|
|
35
|
+
import type { AshlrConfig } from '../types.js';
|
|
36
|
+
import { type VerseMcpSeatInput } from './mcp-seat-view.js';
|
|
37
|
+
/** True for exactly the five MCP-management routes. */
|
|
38
|
+
export declare function isVerseMcpPath(path: string): boolean;
|
|
39
|
+
export interface VerseMcpApiContext {
|
|
40
|
+
cfg: AshlrConfig;
|
|
41
|
+
token: string;
|
|
42
|
+
allowDispatch: boolean;
|
|
43
|
+
readSession?: {
|
|
44
|
+
id: string;
|
|
45
|
+
expiresAt: number;
|
|
46
|
+
};
|
|
47
|
+
/** Test seam: override the accounts root without touching config. */
|
|
48
|
+
accountsRoot?: string;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Seat inputs for the MCP view, WITHOUT running `discoverSeats()`.
|
|
52
|
+
*
|
|
53
|
+
* `discoverSeats` probes Ollama over HTTP and builds telemetry — none of which
|
|
54
|
+
* this view needs, and all of which would make a cheap read expensive. What
|
|
55
|
+
* the MCP question turns on is (engine, account), and that is exactly what
|
|
56
|
+
* `readVerseAccountIdentities` publishes. Seat ids for native seats ARE the
|
|
57
|
+
* account ids (see VerseSeat.id's own documentation).
|
|
58
|
+
*
|
|
59
|
+
* Local seats are collapsed into ONE row on purpose: every Ollama tag is
|
|
60
|
+
* launched through the same `buildClaudeLaunch` argv, so they are all isolated
|
|
61
|
+
* identically and listing twelve identical rows would be noise, not detail.
|
|
62
|
+
*/
|
|
63
|
+
export declare function verseMcpSeatInputs(accountsRoot: string): VerseMcpSeatInput[];
|
|
64
|
+
/**
|
|
65
|
+
* Handle one MCP-management request. Returns true when a response was
|
|
66
|
+
* written (including errors); false when `path` is not one of these routes.
|
|
67
|
+
*/
|
|
68
|
+
export declare function handleVerseMcpApi(ctx: VerseMcpApiContext, req: IncomingMessage, res: ServerResponse, path: string, method: string): Promise<boolean>;
|