import { Schema } from "effect"; import { ToolId, SecretId, PolicyId } from "./ids"; export class ToolNotFoundError extends Schema.TaggedError()( "ToolNotFoundError", { toolId: ToolId }, ) {} export class ToolInvocationError extends Schema.TaggedError()( "ToolInvocationError", { toolId: ToolId, message: Schema.String, cause: Schema.optional(Schema.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, }, ) {}