import { Data, Schema } from "effect"; import { ToolId, SecretId, PolicyId } from "./ids"; export class ToolNotFoundError extends Schema.TaggedError()( "ToolNotFoundError", { toolId: ToolId }, ) {} export class ToolInvocationError extends Data.TaggedError("ToolInvocationError")<{ readonly toolId: ToolId; readonly message: string; readonly cause?: unknown; }> {} export class SecretNotFoundError extends Schema.TaggedError()( "SecretNotFoundError", { secretId: SecretId }, ) {} export class SecretResolutionError extends Schema.TaggedError()( "SecretResolutionError", { secretId: SecretId, message: Schema.String, }, ) {} export class PolicyDeniedError extends Schema.TaggedError()( "PolicyDeniedError", { policyId: PolicyId, toolId: ToolId, reason: Schema.String, }, ) {}