const COMMON_PATTERNS_CODE = `# 1) Retrieve target entities before writing
retrieve_entity_by_identifier(identifier="Ana Rivera", entity_type="contact")

# 2) Store conversation + message + extracted entities in one call
store_structured(
  entities=[
    { entity_type: "conversation", title: "Project sync" },
    { entity_type: "conversation_message", role: "user", sender_kind: "user", content: "...", turn_key: "conv:1" }
  ],
  relationships=[{ relationship_type: "PART_OF", source_index: 1, target_index: 0 }],
  idempotency_key="conversation-conv-1-1711900000000"
)

# 3) Link entities explicitly
create_relationship(
  relationship_type="REFERS_TO",
  source_entity_id="<message_id>",
  target_entity_id="<task_id>"
)

# 4) Store a file with entities in one combined call
store(
  entities=[...],
  file_path="/path/to/invoice.pdf",
  idempotency_key="store-invoice-1711900000000"
)

# 5) Parse a file without storing (agent-side extraction)
parse_file(file_path="/path/to/document.pdf")`;
export const ROOT_LANDING_MCP_OVERVIEW = {
    intro: "Neotoma exposes 30 MCP actions covering storage, retrieval, relationships, schema management, corrections, and lifecycle. MCP is the primary interface for agent workflows because it keeps deterministic state operations explicit: retrieve before reasoning, store with provenance, and create typed relationships.",
    clientConfigNote: "Client-specific connection snippets live in the harness section above. The overview below focuses on transport, auth posture, action patterns, and the tool surface itself.",
    transportModes: [
        {
            label: "stdio",
            summary: "Local process, recommended for Cursor, Claude Code, and Codex. The MCP client launches the Neotoma process directly.",
        },
        {
            label: "HTTP (SSE)",
            summary: "Remote or tunnel access via /mcp on the current host. Use with HTTPS when exposing a personal tunnel or hosted instance.",
        },
        {
            label: "WebSocket",
            summary: "Bridge mode for clients that require WebSocket transport.",
        },
    ],
    authentication: "All MCP actions operate under an authenticated user context. Authentication is handled via OAuth (recommended) or Bearer token. The user_id parameter is optional and inferred from the auth context.",
    commonPatterns: [
        {
            title: "Common action patterns",
            format: "python",
            code: COMMON_PATTERNS_CODE,
        },
    ],
    schemaWorkflow: [
        'list_entity_types(keyword="invoice") - discover existing schemas',
        'analyze_schema_candidates(entity_type="invoice") - see what fields are candidates',
        'update_schema_incremental(entity_type="invoice", new_fields=[...]) - promote fields',
    ],
    actions: [
        { action: "get_authenticated_user", description: "Get or authenticate the current user.", parameters: "-" },
        { action: "retrieve_entities", description: "Query entities with filters.", parameters: "filters, limit?, search?" },
        { action: "retrieve_entity_snapshot", description: "Get an entity snapshot with provenance.", parameters: "entity_id, at?" },
        { action: "list_observations", description: "List observations for an entity or get field provenance.", parameters: "entity_id" },
        { action: "retrieve_field_provenance", description: "Get provenance for one field on an entity.", parameters: "entity_id, field" },
        { action: "list_relationships", description: "List relationships for an entity.", parameters: "entity_id" },
        { action: "retrieve_entity_by_identifier", description: "Search for an entity by identifier or semantic match.", parameters: "identifier, entity_type?" },
        { action: "retrieve_related_entities", description: "Retrieve related entities or the graph neighborhood.", parameters: "entity_id, relationship_types?, depth?" },
        { action: "retrieve_graph_neighborhood", description: "Retrieve the graph neighborhood around one node.", parameters: "node_id, node_type" },
        { action: "merge_entities", description: "Merge two entities.", parameters: "source_entity_id, target_entity_id" },
        { action: "delete_entity", description: "Delete an entity.", parameters: "entity_id" },
        { action: "restore_entity", description: "Restore a deleted entity.", parameters: "entity_id" },
        { action: "get_relationship_snapshot", description: "Get one relationship or snapshot details.", parameters: "relationship_key" },
        { action: "create_relationship", description: "Create a typed relationship.", parameters: "relationship_type, source_entity_id, target_entity_id" },
        { action: "delete_relationship", description: "Delete a relationship.", parameters: "relationship_key" },
        { action: "restore_relationship", description: "Restore a deleted relationship.", parameters: "relationship_key" },
        { action: "list_timeline_events", description: "List timeline events or get one by ID.", parameters: "type?, from?, to?" },
        { action: "list_entity_types", description: "List schema types or get a schema by entity type.", parameters: "keyword?" },
        { action: "analyze_schema_candidates", description: "Analyze schema candidates for a type.", parameters: "entity_type, entity_id?" },
        { action: "get_schema_recommendations", description: "Get recommended schema fields for a type.", parameters: "entity_type" },
        { action: "update_schema_incremental", description: "Promote or adjust schema fields incrementally.", parameters: "entity_type, new_fields" },
        { action: "register_schema", description: "Register a schema explicitly.", parameters: "schema" },
        { action: "store", description: "Store structured entities, optionally with a file.", parameters: "entities, file_path?, idempotency_key?" },
        { action: "store_structured", description: "Store structured entities.", parameters: "entities, idempotency_key?, relationships?" },
        { action: "store_unstructured", description: "Store an unstructured file.", parameters: "file_path or file_content, mime_type" },
        { action: "correct", description: "Submit a correction or reinterpret a source.", parameters: "entity_id, field, value" },
        { action: "health_check_snapshots", description: "Get server stats, server info, or run snapshot health checks.", parameters: "-" },
        { action: "retrieve_file_url", description: "Get a signed file URL.", parameters: "path" },
        { action: "parse_file", description: "Parse a file into agent-readable text without storing.", parameters: "file_path or file_content+mime_type" },
        { action: "npm_check_update", description: "Check for a newer npm package version.", parameters: "packageName?" },
    ],
    relationshipTypes: [
        "PART_OF",
        "CORRECTS",
        "REFERS_TO",
        "SETTLES",
        "DUPLICATE_OF",
        "DEPENDS_ON",
        "SUPERSEDES",
        "EMBEDS",
    ],
    relationshipTypesNote: "Use EMBEDS when a container (blog post, document) embeds an asset (image, attachment): source = container, target = asset.",
    entityTypes: [
        "contact",
        "person",
        "company",
        "task",
        "invoice",
        "transaction",
        "receipt",
        "note",
        "contract",
        "event",
        "conversation",
        "agent_message",
        "feature_unit",
        "release",
        "agent_decision",
        "agent_session",
        "validation_result",
        "codebase_entity",
        "architectural_decision",
    ],
    entityTypesNote: "Use list_entity_types to discover all available types, or store with any descriptive type and let the server infer the schema.",
    links: [
        { label: "MCP server reference", href: "/mcp" },
        { label: "REST API reference", href: "/api" },
        { label: "CLI reference", href: "/cli" },
        { label: "Agent instructions", href: "/agent-instructions" },
        { label: "Schema management", href: "/schema-management" },
    ],
};
//# sourceMappingURL=mcp_overview.js.map