MCPcopy Create free account
hub / github.com/anomalyco/opencode / ask

Function ask

packages/opencode/src/cli/cmd/debug/agent.handler.ts:182–191  ·  view source on GitHub ↗
(req: Omit<PermissionV1.Request, "id" | "sessionID" | "tool">)

Source from the content-addressed store, hash-verified

180 messages: [],
181 metadata: () => Effect.void,
182 ask(req: Omit<PermissionV1.Request, "id" | "sessionID" | "tool">) {
183 return Effect.sync(() => {
184 for (const pattern of req.patterns) {
185 const rule = Permission.evaluate(req.permission, pattern, ruleset)
186 if (rule.action === "deny") {
187 throw new PermissionV1.DeniedError({ ruleset })
188 }
189 }
190 })
191 },
192 }
193})

Callers 1

shell.tsFile · 0.50

Calls 1

syncMethod · 0.80

Tested by

no test coverage detected