Something went wrong. Try again.
A local-first event pipeline for independent agents, built on Jazz.
Something went wrong. Try again.
881 B · 29 lines
TypeScript
123456789101112131415161718192021222324252627282930import { schema as s } from "jazz-tools";import { inferenceAccountingEnabled, thoughtstreamApp } from "./schema.js";
/** Local development policy. Remote deployment must replace this permissive policy. */export const thoughtstreamPermissions = s.definePermissions(thoughtstreamApp, ({ policy }) => { const tables = [ policy.events, policy.documentVersions, policy.documents, policy.sources, policy.sourceCursors, policy.agents, policy.runs, policy.traceChunks, policy.consumerProgress, policy.projections, ...(inferenceAccountingEnabled ? [policy.inferenceBudgetAccounts, policy.inferenceAccounting] : []), ]; for (const table of tables) { table.allowRead.always(); table.allowInsert.always(); table.allowUpdate.always(); table.allowDelete.always(); }});
export default thoughtstreamPermissions;