forked from anomalyco/opencode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathagent.ts
More file actions
27 lines (26 loc) · 759 Bytes
/
Copy pathagent.ts
File metadata and controls
27 lines (26 loc) · 759 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { Effect } from "effect"
import { effectCmd } from "../../effect-cmd"
export const AgentCommand = effectCmd({
command: "agent <name>",
describe: "show agent configuration details",
builder: (yargs) =>
yargs
.positional("name", {
type: "string",
demandOption: true,
description: "Agent name",
})
.option("tool", {
type: "string",
description: "Tool id to execute",
})
.option("params", {
type: "string",
description: "Tool params as JSON or a JS object literal",
}),
handler: (args) =>
Effect.gen(function* () {
const { debugAgent } = yield* Effect.promise(() => import("./agent.handler"))
return yield* debugAgent(args)
}),
})