MCPcopy Create free account
hub / github.com/Noumena-Network/code / taskGetHandler

Function taskGetHandler

src/cli/handlers/ant.ts:793–813  ·  view source on GitHub ↗
(
  id: string,
  opts: TaskListOptions = {},
)

Source from the content-addressed store, hash-verified

791}
792
793export async function taskGetHandler(
794 id: string,
795 opts: TaskListOptions = {},
796): Promise<void> {
797 try {
798 const taskListId = normalizeTaskListId(opts.list)
799 const task = await getTask(taskListId, id)
800 if (!task) {
801 throw new Error(`Task ${id} was not found in ${taskListId}.`)
802 }
803
804 writeJson({
805 taskListId,
806 task,
807 })
808 await gracefulShutdown(0)
809 } catch (error) {
810 writeToStderr(`Failed to get task: ${errorMessage(error)}\n`)
811 await gracefulShutdown(1)
812 }
813}
814
815export async function taskUpdateHandler(
816 id: string,

Callers 1

runFunction · 0.85

Calls 6

normalizeTaskListIdFunction · 0.85
getTaskFunction · 0.85
writeJsonFunction · 0.85
gracefulShutdownFunction · 0.85
writeToStderrFunction · 0.85
errorMessageFunction · 0.50

Tested by

no test coverage detected