/
Alex_Ural
/
opencode
Обзор
Документация
Войти
/
Alex_Ural
/
opencode
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
packages/cli/src/commands/handlers/debug/agents.ts
21 строка
707 B
Dax
feat(core): add command registry (#30624)
04 июн 2026, 09:57
Не верифицирован
04 июн 2026, 09:57
1ff1910
Код
Авторство
О чём код?
import { EOL } from "os" import * as Effect from "effect/Effect" import { Commands } from "../../commands" import { Runtime } from "../../../framework/runtime" import { Daemon } from "../../../services/daemon" export default Runtime.handler( Commands.commands.debug.commands.agents, Effect.fn("cli.debug.agents")(function* () { const daemon = yield* Daemon.Service const client = yield* daemon.client() const response = yield* Effect.promise(() => client.v2.agent.list({ location: { directory: process.cwd() } })) process.stdout.write( JSON.stringify( response.data?.data.toSorted((a, b) => a.id.localeCompare(b.id)), null, 2, ) + EOL, ) }), )