import type { ActorDirectoryInput, ActorProfileInput } from './actor-directory.js'; import type { BookmarkInput } from './bookmarks.js'; import type { SearchInput, SearchPage } from './search.js'; import type { NotificationInput } from './notifications.js'; import type { ReplyCreateInput, ReplyDeleteInput, ReplyRecord, ReactionSetInput, ThreadInput } from './participation.js'; import type { ActorRef, AddressableActor, RecordAuthority } from './policy.js'; import { ProjectionManager } from './projections.js'; import { SynomemStorage } from './storage.js'; import type { SynomemService, SynomemDomainService, SynomemServiceCapabilities, SynomemServiceInfo, ProjectionRebuildResult } from './service.js'; import type { SynomemRepository } from './ports/repository.js'; import type { ProjectionWriter } from './ports/projections.js'; import type { ActorIdentity, AgentDirectoryEntry, AgentProfile, AgentResolution, AgentRuntimeBinding, BindRuntimeInput, CreateAgentInput, CreatePostInput, PostRecord, PostRoster, UpdatePostInput, DoctorResult, ProjectionStatus, GiveKudosInput, GiveKudosResult, SendMemoInput, SendMemoResult, MemoRecord, CreateNoteInput, CreateNoteResult, ReviseNoteInput, NoteRecord, CreateTaskInput, CreateTodoInput, CreateTodoResult, CreateTaskResult, UpdateTaskInput, UpdateTodoInput, TaskRecord, OverrideTaskDecisionInput, TodoRecord, ItemListInput, ItemRecord, Topic, CreateTopicInput, UpdateTopicInput, TopicListInput, TopicResolution, ItemSummary, ChangesInput, KudosChangesInput, SynomemClientOptions, SynomemEvent, KudosListInput, KudosRecord, KudosStats, KudosSummary, ChangePage, Page, UpdateAgentInput } from './types.js'; export interface SynomemCoreOptions { repository: SynomemRepository; projectionWriter: ProjectionWriter; actor?: ActorIdentity; clock?: () => Date; idGenerator?: () => string; signal?: AbortSignal; /** Authority from the trusted adapter; defaults to no administration. */ authority?: RecordAuthority; canWrite?: boolean; } export declare class SynomemCore implements SynomemDomainService { /** * Mutable because an agent actor is resolved to its canonical identity on * init: callers name a handle, events record the opaque ID. */ actor: ActorIdentity; private readonly repository; private readonly projectionWriter; private readonly clock; private readonly idGenerator; private readonly signal?; protected administrative: boolean; private writeAllowed; private readonly mutationContext; protected authority: RecordAuthority; private initialized; readonly bookmarks: { list: (input?: BookmarkInput) => Promise; has: (rootId: string) => Promise<{ saved: boolean; }>; set: (input: { rootId: string; present: boolean; }) => Promise<{ saved: boolean; }>; }; readonly notifications: { list: (input?: NotificationInput) => Promise; read: (id: string) => Promise; dismiss: (id: string) => Promise; readThrough: (through: string) => Promise; }; readonly replies: { changes: (input: ThreadInput) => Promise; create: (input: ReplyCreateInput) => Promise; get: (id: string) => Promise; delete: (input: ReplyDeleteInput) => Promise; }; readonly threads: { read: (input: { rootId: string; through: string; }) => Promise; get: (input: ThreadInput) => Promise; subscription: (input: { rootId: string; following: boolean; muted: boolean; }) => Promise; }; readonly reactions: { set: (input: ReactionSetInput) => Promise; get: (targetId: string) => Promise; }; private allowedActions; private decorateRecord; private getReply; private createReply; private canModerateRoot; private deleteReply; private reactionRoot; private setReaction; search(input: SearchInput): Promise; readonly agents: { create: (input: CreateAgentInput) => Promise; update: (id: string, changes: UpdateAgentInput) => Promise; get: (idOrAlias: string) => Promise; list: () => Promise; resolve: (query: string) => Promise; archive: (idOrAlias: string) => Promise; restore: (idOrAlias: string) => Promise; addAliases: (idOrAlias: string, aliases: string[]) => Promise; removeAliases: (idOrAlias: string, aliases: string[]) => Promise; directory: () => Promise; bindings: (idOrAlias: string) => Promise; bindRuntime: (input: BindRuntimeInput) => Promise; unbindRuntime: (bindingId: string) => Promise; }; readonly topics: { create: (input: CreateTopicInput) => Promise; update: (idOrAlias: string, changes: UpdateTopicInput) => Promise; get: (idOrAlias: string) => Promise; list: (input?: TopicListInput) => Promise; resolve: (query: string) => Promise; archive: (idOrAlias: string) => Promise; restore: (idOrAlias: string) => Promise; }; readonly kudos: { give: (input: GiveKudosInput) => Promise; list: (input?: KudosListInput) => Promise>; changes: (input?: KudosChangesInput) => Promise; get: (id: string) => Promise; acknowledge: (input: { expectedVersion: number; kudosId: string; note?: string; idempotencyKey?: string; }) => Promise; revoke: (input: { expectedVersion: number; kudosId: string; reason: string; administrative?: boolean; idempotencyKey?: string; }) => Promise; }; readonly memos: { send: (input: SendMemoInput) => Promise; list: (input?: Omit) => Promise>; get: (id: string) => Promise; read: (input: { expectedVersion: number; memoId: string; idempotencyKey?: string; }) => Promise; archive: (input: { expectedVersion: number; memoId: string; idempotencyKey?: string; }) => Promise; }; readonly posts: { create: (input: CreatePostInput) => Promise<{ record: PostRecord; created: boolean; deduplicated: boolean; }>; list: (input?: Omit) => Promise>; get: (id: string) => Promise; update: (input: UpdatePostInput) => Promise; archive: (input: { expectedVersion: number; postId: string; reason?: string; idempotencyKey?: string; }) => Promise; acknowledge: (input: { expectedVersion: number; postId: string; note?: string; idempotencyKey?: string; }) => Promise; withdrawAcknowledgment: (input: { expectedVersion: number; postId: string; reason?: string; idempotencyKey?: string; }) => Promise; roster: (postId: string) => Promise; }; readonly notes: { create: (input: CreateNoteInput) => Promise; list: (input?: Omit) => Promise>; get: (id: string) => Promise; revise: (input: ReviseNoteInput) => Promise; archive: (input: { expectedVersion: number; noteId: string; idempotencyKey?: string; }) => Promise; }; readonly tasks: { overrideDecision: (input: OverrideTaskDecisionInput) => Promise; create: (input: CreateTaskInput) => Promise; list: (input?: Omit) => Promise>; get: (id: string) => Promise; update: (input: UpdateTaskInput) => Promise; accept: (input: { expectedVersion: number; taskId: string; response?: string; idempotencyKey?: string; }) => Promise; reject: (input: { expectedVersion: number; taskId: string; response: string; idempotencyKey?: string; }) => Promise; complete: (input: { expectedVersion: number; taskId: string; note?: string; idempotencyKey?: string; }) => Promise; reopen: (input: { expectedVersion: number; taskId: string; idempotencyKey?: string; }) => Promise; cancel: (input: { expectedVersion: number; taskId: string; reason?: string; idempotencyKey?: string; }) => Promise; }; readonly todos: { create: (input: CreateTodoInput) => Promise; list: (input?: Omit) => Promise>; get: (id: string) => Promise; update: (input: UpdateTodoInput) => Promise; complete: (input: { expectedVersion: number; todoId: string; note?: string; idempotencyKey?: string; }) => Promise; reopen: (input: { expectedVersion: number; todoId: string; idempotencyKey?: string; }) => Promise; cancel: (input: { expectedVersion: number; todoId: string; reason?: string; idempotencyKey?: string; }) => Promise; archive: (input: { expectedVersion: number; todoId: string; idempotencyKey?: string; }) => Promise; }; /** * Unanswered and overdue discovery. * * The plan asks for shared work to be observable without treating runtime * metadata as a delivery guarantee. These are query states derived from * durable events: they say nobody has answered yet, not that the agent was * offline, missed a notification, or lacks a capability it claimed. */ readonly discovery: { /** * Tasks awaiting acceptance, unread memos, and unacknowledged kudos — * optionally only those older than a given age or instant. */ unanswered: (input?: Omit & { olderThanHours?: number; }) => Promise>; /** Open work whose deadline has passed. Defaults to "now". */ overdue: (input?: Omit & { asOf?: string; }) => Promise>; }; readonly items: { list: (input?: ItemListInput) => Promise>; get: (id: string) => Promise; changes: (input?: ChangesInput) => Promise; }; constructor(options: SynomemCoreOptions); /** Trusted adapters refresh live authority after acquiring the workspace write boundary. Never exposed as a tool/input. */ setAuthority(authority: RecordAuthority, canWrite?: boolean): void; init(): Promise; close(): Promise; readonly actors: { profile: (input: ActorProfileInput) => Promise<{ actor: AddressableActor; counts: { kudosReceived: number; usefulReceived: number; }; authored: Page; }>; list: (input?: ActorDirectoryInput) => Promise; get: (ref: ActorRef) => Promise; registerHuman: (input: { id: string; handle: string; displayName: string; }) => Promise; }; private resolveActor; private boundRef; private canManage; private intervention; private syncActor; private normalizeMutation; private authorizeReceipt; private personalWrite; private mutate; private now; private nextId; private eventBase; protected checkAbort(): void; private validate; private createAgent; private updateAgent; /** * Archiving stops an agent acting without erasing it. * * Events reference the actor permanently, so deleting an agent would leave * history pointing at nothing. Archived agents keep their records and their * handle, and can be restored. */ private setAgentStatus; /** Adds aliases without disturbing the ones already there. */ private addAgentAliases; private removeAgentAliases; private getAgent; private listAgents; /** * Resolves a name without ever choosing between equally valid answers. * * Callers that want a single agent should treat an empty `match` as a * question for the user, not as "not found": `candidates` distinguishes the * two cases. */ private resolveAgent; private agentDirectory; private listRuntimeBindings; /** * Records where an agent runs. Re-binding the same runtime and profile * updates the claim in place rather than accumulating duplicates, because a * reinstall is the same agent in the same place, not a second one. */ private bindRuntime; private unbindRuntime; private createTopic; private updateTopicRecord; private setTopicStatus; private getTopicRecord; private listTopicsRecord; private resolveTopicRecord; /** Resolve and validate every topic against this service's configured workspace. */ private resolveTopicReferences; private giveKudos; private getKudosRecord; private getKudos; private listKudos; private listKudosChanges; private acknowledgeKudos; private revokeKudos; private priorMutation; private canViewItem; private requireVisibleItem; private getMemoRecord; private getMemo; private sendMemo; private assertRecipient; private readMemo; private archiveMemo; private getPostRecord; private getPost; private canonicalPostMentions; private createPost; /** Only the author edits a post. Everyone else responds to it. */ private assertPostAuthor; private updatePost; private archivePost; private acknowledgePost; private withdrawPostAcknowledgment; private postRoster; private getNoteRecord; private getNote; private createNote; private assertNoteOwner; private reviseNote; private archiveNote; private getTaskRecord; private getTask; private createTask; private assertTaskParticipant; private assertTaskAssignee; private updateTask; private overrideTaskDecision; private taskTransition; private completeTask; private acceptTask; private rejectTask; private reopenTask; private cancelTask; private createTodo; private getTodoRecord; /** * Todos are owner-only for every ordinary actor — the same rule notes * already follow (`assertNoteOwner`): an organization owner or admin is the * deliberate exception, since only they can create an agent in the first * place, so the account behind any todo's owner is always one they * administer. Without this exception, a human administrator viewing an * agent they created themselves could see that agent's private Todos in a * list (the repository's own visibility query already grants that) but * never open one — a redundant, stricter, and contradictory check sitting * on top of a permission that had already been granted. */ private assertTodoOwner; private getTodo; private updateTodo; private todoTransition; /** * Turns an agent name in a filter into the canonical ID the records hold. * * Callers filter by the name they know — a handle or an alias — while every * record stores the opaque ID. Without this the filter silently matches * nothing, which reads as "there is nothing here" rather than "that name * means something else now". * * An unresolvable name is passed through unchanged so it can match a legacy * name-shaped ID rather than being swallowed. */ private canonicalAgentId; private listItems; private listItemChanges; private getItem; stats(input?: KudosListInput): Promise; } export declare class SynomemClient extends SynomemCore implements SynomemService { readonly home: string; readonly storage: SynomemStorage; readonly projections: ProjectionManager; constructor(options?: SynomemClientOptions); projectionStatus(): Promise; doctor(): Promise; export(format: 'json' | 'jsonl' | 'markdown'): Promise; backup(destination: string): Promise; rebuild(): Promise; capabilities(): Promise; info(): Promise; getCanonicalEvent(id: string): Promise; } export declare function createLocalOwnerClient(options?: Omit): SynomemClient; //# sourceMappingURL=client.d.ts.map