import type { RemoteCredential, RemoteCredentialSource } from './remote.js'; import type { SynomemService } from './service.js'; import type { ActorIdentity, ContextListing, EffectiveContext, IdentityDescription, SynomemClientOptions } from './types.js'; export type { RemoteCredentialSource } from './remote.js'; export interface ResolvedContext { service: SynomemService; context: EffectiveContext; } export interface ContextResolver { /** `fixed`: omitting a context selects the one pinned target. */ mode(): 'fixed' | 'explicit' | 'unknown'; /** Resolve one operation's binding. `undefined` or `'default'` selects the fixed context. */ resolve(contextId?: string): Promise; list(): Promise; describe?(): Promise; /** * Where this resolver's contexts live. Hosted-only tools (email) are offered only when * some context is remote; `mixed` presets re-check per call. Absent means local. */ backend?(): 'local' | 'remote' | 'mixed'; close?(): Promise; } /** The selector a model may pass to mean "the fixed context", e.g. in resource URIs. */ export declare const DEFAULT_CONTEXT = "default"; /** * The stable local context id for one actor in one store, from the store's own * context registry (`/contexts.json`). * * The id is cryptographically random (128 bits) and minted the first time the * actor is addressed, never derived from a name or from the canonical tuple: * an id reveals nothing about its target and cannot be guessed. It survives * renames and moving the store (the registry moves with it), and an unrelated * store with a same-named agent has its own registry and so its own id. * Minting is serialized across processes so two harnesses opening the store * at once agree on one id. */ export declare function localContextId(home: string, actor: ActorIdentity): string; /** * A remote (hosted API) resolver over one credential. * * `pinnedContextId` makes a fixed profile: only that target, whatever else the grant * allows. `allowedContextIds` makes an explicit preset: only those targets may be * selected. Either way the API re-authorizes every request; these only narrow. */ export declare function createRemoteResolver(options: { baseUrl: string; credential: RemoteCredentialSource | RemoteCredential; pinnedContextId?: string; allowedContextIds?: string[]; fetch?: typeof fetch; }): ContextResolver; /** * A local (SQLite) resolver: fixed mode, one store, one canonical actor. */ export declare function createLocalResolver(options: { home: string; actor: ActorIdentity; } & Omit): ContextResolver; //# sourceMappingURL=resolvers.d.ts.map