feat(servers): harden pairing and run linked-server sessions in the UI

Replace the plaintext pairing exchange with a nonce and HMAC proof plus
AES-256-GCM encrypted credentials, bumping links to v2. Track session
ownership per linked server so activity, session picker, transcript, MCP
and skills views work against remote servers. Share encrypted secret
access, event routing and URL helpers across backend, shared and CLI.
This commit is contained in:
Chris Scott committed 2026-10-18 20:27:34 -04:00
1 parent c591c15743
commit f566556fd6
77 files changed
+3170 -702

No files matched your search

+4 -1
View File
@@ -48,6 +48,8 @@ interface UseSessionsAcrossDirectoriesOptions {
allDirectories?: boolean
project?: { id: string; subpath: string }
includeChildren?: boolean
/** Overrides the route's server for callers that always read a specific server, such as local active work. */
serverId?: string
}
type SessionDirectoryCursors = Record<string, string>
@@ -65,7 +67,8 @@ export const useSessionsAcrossDirectories = (
directories: string[],
options?: UseSessionsAcrossDirectoriesOptions,
) => {
const serverId = useOpenCodeServerId();
const routeServerId = useOpenCodeServerId();
const serverId = options?.serverId ?? routeServerId;
const uniqueDirectories = useMemo(
() => Array.from(new Set(directories.filter(Boolean))),
[directories],