{"record":{"id":"5c7dd19a4098903f","repo":"JuliusBrussee/caveman","slug":"cave-memory-consent-unsupported","errorCode":"cave_memory_consent_unsupported","errorMessage":"cave_memory_consent_unsupported: only \"local_only\" consent is supported","messagePattern":"cave_memory_consent_unsupported: only \"local_only\" consent is supported","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/agent/src/primitives.ts","lineNumber":290,"sourceCode":"    throw new Error(\"caveman agent: memory recallBudget must be a non-negative integer\");\n  }\n  try {\n    memoryTTLMilliseconds(options.ttl);\n  } catch {\n    throw new Error(\"caveman agent: memory ttl must use positive m, h, or d duration\");\n  }\n  // Fail closed at CONSTRUCTION, not at tool-call time: the durable\n  // store implements only local, single-tenant memory. A `project`/`external`\n  // provenance or a `project_shared` consent is a shared-backend contract this\n  // package does not provide, so it is refused here rather than burning a model\n  // turn to discover a config the framework already knew was unsupported.\n  const provenance = options.provenance ?? \"local\";\n  if (provenance !== \"local\") {\n    throw new Error(\"cave_memory_provenance_unsupported: only \\\"local\\\" memory is supported\");\n  }\n  const consent = options.consent ?? \"local_only\";\n  if (consent !== \"local_only\") {\n    throw new Error(\"cave_memory_consent_unsupported: only \\\"local_only\\\" consent is supported\");\n  }\n  return Object.freeze({\n    kind: \"memory\",\n    namespace: options.namespace,\n    provenance,\n    ttl: options.ttl,\n    recallBudget: options.recallBudget,\n    consent,\n  });\n}\n\nexport type ContextKind =\n  | \"instruction\"\n  | \"user_intent\"\n  | \"tool_schema\"\n  | \"skill\"\n  | \"memory\"\n  | \"history\"","sourceCodeStart":272,"sourceCodeEnd":308,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/766dce6b1394ebb56a3090748d5a0240a5aefb36/packages/agent/src/primitives.ts#L272-L308","documentation":"Fail-closed guard in memory(): consent is 'project_shared', but only 'local_only' consent is implemented. Sharing memory across tenants is a contract this package does not provide, so it is refused at construction.","triggerScenarios":"Thrown at packages/agent/src/primitives.ts:290 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set consent: 'local_only' (or omit it) in memory()","Remove project_shared consent until a shared store exists","Model cross-project knowledge as explicit context inputs instead"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"766dce6b1394ebb56a3090748d5a0240a5aefb36","analyzedAt":"2026-08-18T03:14:35.516Z","contentChangedAt":"2026-08-18T03:14:35.516Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}