MCPcopy Create free account
hub / github.com/apache/maka / get

Method get

packages/storage/src/task-ledger-store.ts:91–101  ·  view source on GitHub ↗
(
    sessionId: string,
    id: string,
    options: TaskLedgerListOptions = {},
  )

Source from the content-addressed store, hash-verified

89 }
90
91 async get(
92 sessionId: string,
93 id: string,
94 options: TaskLedgerListOptions = {},
95 ): Promise<Task | undefined> {
96 assertSafeSessionId(sessionId);
97 if (!isSafeTaskId(id))
98 throw new Error('Task id must be a stable token (alphanumeric plus . _ : -, max 64 chars)');
99 const tasks = await this.list(sessionId, options);
100 return findTaskByRef(tasks, id);
101 }
102
103 async #listCanonical(sessionId: string, options: TaskLedgerListOptions = {}): Promise<Task[]> {
104 assertSafeSessionId(sessionId);

Callers

nothing calls this directly

Calls 4

listMethod · 0.95
isSafeTaskIdFunction · 0.90
findTaskByRefFunction · 0.90
assertSafeSessionIdFunction · 0.70

Tested by

no test coverage detected