MCPcopy Create free account
hub / github.com/bearlyai/OpenADE / assertTaskMeta

Function assertTaskMeta

projects/openade-module/src/yjsMutation.ts:238–242  ·  view source on GitHub ↗
(meta: Y.Map<unknown>, taskId: string)

Source from the content-addressed store, hash-verified

236}
237
238function assertTaskMeta(meta: Y.Map<unknown>, taskId: string): void {
239 const metaId = meta.get("id")
240 if (typeof metaId !== "string" || !metaId) throw new Error(`Task ${taskId} not found`)
241 if (metaId !== taskId) throw new Error(`Task document ${taskId} has mismatched metadata id ${metaId}`)
242}
243
244function getActionEventMap(doc: Y.Doc, taskId: string, eventId: string): Y.Map<unknown> {
245 const event = getOrderedItemMap(doc, "task:events", eventId)

Callers 15

deleteTaskFunction · 0.85
setupTaskEnvironmentFunction · 0.85
createActionEventFunction · 0.85
appendActionStreamEventFunction · 0.85
completeActionEventFunction · 0.85
errorActionEventFunction · 0.85
stoppedActionEventFunction · 0.85
updateActionExecutionFunction · 0.85
addHyperPlanSubExecutionFunction · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected