/** * synap capture — the one canonical structured-WRITE verb. * * SMART MODE (no --type): `synap capture "free text"` * → POST /capture/structure (AI pipeline: proposals + relations + followUp) * → renders a proposal table, prompts y/N, then POST /capture/execute. * * TYPED MODE (--type): `synap capture --type gotcha --claim "…" [--why] [--evidence] [--tags]` * → POST /entities as a typed `knowledge` entity; `ek_type` (gotcha|lesson|decision| * reference) discriminates the kind — ONE store, type tags (the canonical pattern, * NOT a residual dump). The workspace lens supplies the domain (no * `engineering_knowledge`). A formal decision RECORD (rationale/alternatives/status * lifecycle) comes from smart `capture ""` or `create entity --profile=decision`. * * Workspace routing: --workspace > --team (first product ws) > memory ws (default, * auto-approved, agent-private) > active ws. */ export type KnowledgeType = "gotcha" | "lesson" | "decision" | "reference"; export interface CaptureOpts { /** Smart mode: positional free-text (no --type). When present, uses AI /capture/structure pipeline. */ text?: string; /** Typed mode: one of gotcha|lesson|decision|reference */ type?: KnowledgeType; claim?: string; why?: string; evidence?: string; tags?: string; /** Override to first product workspace instead of the active workspace */ team?: boolean; /** Explicit workspace override — highest priority */ workspace?: string; /** * Explicit project pin (id or name) — highest priority for the project lens. * Falls back to SYNAP_PROJECT_ID / the active session's pinned project * (already threaded into `resolveHubConfig().projectId`) when omitted. */ project?: string; /** * GLOBAL lane: write a pod-wide procedural runbook to `knowledge_keys` * (cross-cutting best-practice/how-to, visible in every workspace) instead of * a domain `knowledge` entity in the active workspace. */ global?: boolean; /** Optional stable key (namespace:slug) for a --global runbook; derived if absent. */ key?: string; json?: boolean; /** Skip the y/N confirmation prompt (smart mode only) */ yes?: boolean; /** Link the captured knowledge to the active session */ session?: boolean; } export declare function captureKnowledge(opts: CaptureOpts): Promise; export declare function provisionAgentWorkspace(opts: { agentUserId?: string; name?: string; use?: boolean; json?: boolean; }): Promise;