import type { AccessContext, Workspace } from "../types.js"; import type { ManagedSelfContext } from "./managed-self-context.js"; export type WorkspaceScopeContext = { organizationId: string; organizationLabel: string; workspaceId: string; workspaceLabel: string; workspaceKind: "personal" | "shared"; personalWorkspaceId: string | null; }; /** * A workspace shell is eligible only when the current server list and the * current principal's exact workspace/account grant agree on the same row. */ export declare function authorizedWorkspaceFromList(input: { workspaceId: string; workspaces: readonly Workspace[]; accessContext: AccessContext; }): Workspace | null; /** * Build display context only from the exact server-issued workspace grant and, * for Personal facts, the current managed principal's organization membership. * Names, permissions, defaults, and creator fields are never treated as scope * authority. */ export declare function resolveWorkspaceScopeContext(input: { workspace: Workspace | null; workspaces: readonly Workspace[]; accessContext: AccessContext; managedSelfContext: ManagedSelfContext | null; }): WorkspaceScopeContext | null;