mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 12:54:20 +01:00
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:
1 parent
c591c15743
commit
f566556fd6
77 files changed
+3170
-702
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import { trimUrlTrailingSlashes } from '@opencode-manager/shared/utils'
|
||||
import type { OcmState } from './state.js'
|
||||
import { normalizeManagerUrl } from './manager-auth.js'
|
||||
|
||||
export const REMOTE_MANAGER_URL_ENV = 'OCM_REMOTE_MANAGER_URL'
|
||||
export const REMOTE_REPO_NAME_ENV = 'OCM_REMOTE_REPO_NAME'
|
||||
@@ -43,6 +43,6 @@ export function readRemoteContext(env: NodeJS.ProcessEnv): RemoteContext | undef
|
||||
|
||||
/** Returns the saved manager name when it belongs to the attached manager, else the manager host. */
|
||||
export function remoteDisplayName(remote: RemoteContext, state: OcmState | null): string {
|
||||
if (state?.managerName && normalizeManagerUrl(state.managerUrl) === normalizeManagerUrl(remote.managerUrl)) return state.managerName
|
||||
if (state?.managerName && trimUrlTrailingSlashes(state.managerUrl) === trimUrlTrailingSlashes(remote.managerUrl)) return state.managerName
|
||||
return remote.managerHost
|
||||
}
|
||||
Reference in new issue
Block a user