21 lines
1014 B
TypeScript
21 lines
1014 B
TypeScript
// The live collection of the agent module (umbrella TS6.1). The live server announces a change of `agent_run`
|
|
// -- a run started, a step committed, an approval parked, a run finished or cancelled -- as
|
|
// `{ entity: "agent.run", id }`, ids only; a reader reads the run back through `agent.run.getMany`, so the
|
|
// procedure's permission and the repository's tenant wall decide what a member sees. The run list is rows of
|
|
// this collection; the approval queue is read again on its changes, since a run that parks an approval or
|
|
// leaves one changes its status. `pnpm kit check` refuses a collection without its batch-get procedure.
|
|
|
|
import type { ModuleCollection } from "@conusai-kit/core"
|
|
|
|
export const RUN_COLLECTION = {
|
|
entity: "agent.run",
|
|
table: "agent_run",
|
|
key: "runId",
|
|
scopeLevel: "project",
|
|
read: "agent.run.read",
|
|
list: "agent.run.list",
|
|
getMany: "agent.run.getMany",
|
|
} as const satisfies ModuleCollection
|
|
|
|
export const AGENT_COLLECTIONS: readonly ModuleCollection[] = [RUN_COLLECTION]
|