{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://eidetic-engine/schemas/ee.daemon.request.v1.json",
"title": "ee.daemon.request.v1",
"description": "Optional daemon RPC: 4-byte big-endian length followed by UTF-8 JSON. The workspace endpoint is `${XDG_RUNTIME_DIR}/ee/d-<workspace-hash>.sock`, falling back to the private per-UID `${TMPDIR:-/tmp}/ee-${uid}/d-<workspace-hash>.sock`. Long runtime paths use /tmp/ee-${uid} to preserve socket length headroom. The hash binds the canonical workspace path; --socket explicitly overrides selection. Memory methods require the peer UID and a non-empty workspace_id matching the daemon's bound workspace. Missing or mismatched workspace identity returns daemon_method_unauthorized. Strict method-specific schemas are advertised by ee.daemon.capabilities; callers must negotiate them before use and fall back locally when unavailable. Search uses ee.daemon.search.request.v2 and ee.daemon.search.response.v3. Bounded SessionStart and anchored recall use ee.daemon.orient_hook.request.v1 and ee.daemon.recall.request.v1, returning ee.daemon.memory_read.response.v1; both remain usable while embeddings warm. Unknown envelope fields and methods are rejected. Every CLI command remains usable without a daemon.",
"type": "object",
"required": [
"schema",
"request_id",
"agent_id",
"method"
],
"additionalProperties": false,
"properties": {
"schema": {
"type": "string",
"const": "ee.daemon.request.v1"
},
"request_id": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"description": "Caller-chosen identifier echoed in the matching response. Recommended shape: ULID or UUIDv7. The daemon does not assign request ids; missing or non-matching ids in responses indicate a framing bug or a redirected connection."
},
"agent_id": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"description": "Caller-chosen local agent identity echoed in the matching response. This is an attribution/audit field reserved by bd-1clej; daemon authorization uses peer UID plus method/workspace policy and MUST NOT be inferred from agent_id alone."
},
"workspace_id": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"description": "Optional caller workspace identity echoed in the matching response when present. Required for registered workspace-bound methods such as `ee.daemon.context` and `ee.daemon.search`; those methods return `daemon_method_unauthorized` when this value is absent, blank, or does not match the daemon's bound workspace."
},
"method": {
"type": "string",
"enum": [
"ee.daemon.capabilities",
"ee.daemon.echo",
"ee.daemon.context",
"ee.daemon.search",
"ee.daemon.orient_hook",
"ee.daemon.recall",
"ee.daemon.shutdown",
"ee.daemon.telemetry",
"ee.daemon.write",
"ee.daemon.write_journal"
],
"description": "Registered method dispatch name. `ee.daemon.capabilities` is mandatory negotiation before clients use method-specific schemas. `ee.daemon.search` is same-UID and workspace-bound, requires the strict nested `ee.daemon.search.request.v2` schema, and returns `ee.daemon.search.response.v3`; clients must use canonical in-process search when the method or either nested schema is absent."
},
"params": {
"type": "object",
"description": "Method-specific parameters. `ee.daemon.search` accepts only the camelCase fields declared by `ee.daemon.search.request.v2`: required `schema`, `query`, and `workspacePath`, plus canonical search options and the optional `explainPerformance` boolean. Unknown fields or a schema mismatch are rejected. Search paths must be absolute; the canonical workspace must equal the canonical envelope `workspace_id`, and explicit database/index paths must remain canonically contained by that workspace so symlink escapes are rejected. Other registered methods retain their documented method-specific shapes.",
"additionalProperties": true
}
}
}