UNPKG

@mrtkrcm/acp-claude-code

Version:

ACP (Agent Client Protocol) bridge for Claude Code

140 lines 4.78 kB
export * from "./schema.js"; import type { PlanEntry as ACPPlanEntry, ToolCallLocation as ACPToolCallLocation, ToolCallContent as ACPToolCallContent, PermissionOption as ACPPermissionOption, RequestPermissionRequest, RequestPermissionResponse, Annotations, ContentBlock, EmbeddedResourceResource } from "./schema.js"; export interface PlanEntry extends ACPPlanEntry { title?: string; } export type ToolCallLocation = ACPToolCallLocation; export type ToolCallContent = ACPToolCallContent; export type PermissionOption = ACPPermissionOption; export type ACPRequestPermissionRequest = RequestPermissionRequest; export type ACPRequestPermissionResponse = RequestPermissionResponse; export type ACPAnnotations = Annotations; export type ACPContentBlock = ContentBlock; export type ACPEmbeddedResource = EmbeddedResourceResource; export type PermissionOptionKind = 'allow_once' | 'allow_always' | 'reject_once' | 'reject_always'; export interface EnhancedToolContent { type: "content" | "diff" | "resource"; content?: ACPContentBlock; path?: string; oldText?: string | null; newText?: string; resource?: ACPEmbeddedResource; } export type PlanStatus = "pending" | "in_progress" | "completed" | "failed"; export type PlanPriority = "high" | "medium" | "low"; export type SessionUpdateType = "agent_message_chunk" | "agent_thought_chunk" | "user_message_chunk" | "tool_call" | "tool_call_update" | "plan"; export interface EnhancedPromptCapabilities { audio: boolean; embeddedContext: boolean; image: boolean; plans: boolean; thoughtStreaming: boolean; } export interface ToolOperationContext { toolName: string; input: unknown; operationType?: "create" | "read" | "edit" | "delete" | "move" | "search" | "execute" | "other"; affectedFiles?: string[]; complexity?: "simple" | "moderate" | "complex"; streamingOperationId?: string; } import { z } from 'zod'; export interface ClaudeMessage { type: string; text?: string; id?: string; tool_name?: string; input?: unknown; output?: string; error?: string; event?: ClaudeStreamEvent; message?: { role?: string; content?: Array<{ type: string; text?: string; id?: string; name?: string; input?: Record<string, unknown>; tool_use_id?: string; content?: string; }>; }; result?: string; subtype?: string; } export interface ClaudeStreamEvent { type: string; content_block?: { type: string; text?: string; }; delta?: { type: string; text?: string; }; } export interface ClaudeQueryOptions { maxTurns?: number; permissionMode?: "ask_on_edit" | "ask_always" | "auto" | "default"; onStatus?: (status: string) => void; allowedTools?: string[]; disallowedTools?: string[]; toolPermissions?: Record<string, PermissionLevel>; } export interface ResourceMetadata { size?: number; encoding?: string; lastModified?: string; } export type PermissionLevel = "allow" | "deny" | "ask"; export interface BashToolInput { command: string; description?: string; timeout?: number; run_in_background?: boolean; } export interface GenericToolInput { [key: string]: unknown; } export declare const PermissionModeSchema: z.ZodEnum<{ default: "default"; plan: "plan"; acceptEdits: "acceptEdits"; bypassPermissions: "bypassPermissions"; }>; export declare const SessionIdSchema: z.ZodString; export declare const NewSessionRequestSchema: z.ZodObject<{ cwd: z.ZodString; mcpServers: z.ZodDefault<z.ZodArray<z.ZodObject<{ name: z.ZodString; command: z.ZodString; args: z.ZodDefault<z.ZodArray<z.ZodString>>; env: z.ZodDefault<z.ZodArray<z.ZodObject<{ name: z.ZodString; value: z.ZodString; }, z.core.$strip>>>; }, z.core.$strip>>>; }, z.core.$strip>; export declare const LoadSessionRequestSchema: z.ZodObject<{ sessionId: z.ZodString; cwd: z.ZodString; mcpServers: z.ZodDefault<z.ZodArray<z.ZodObject<{ name: z.ZodString; command: z.ZodString; args: z.ZodDefault<z.ZodArray<z.ZodString>>; env: z.ZodDefault<z.ZodArray<z.ZodObject<{ name: z.ZodString; value: z.ZodString; }, z.core.$strip>>>; }, z.core.$strip>>>; }, z.core.$strip>; export declare const PromptRequestSchema: z.ZodObject<{ sessionId: z.ZodString; prompt: z.ZodArray<z.ZodObject<{ type: z.ZodString; text: z.ZodOptional<z.ZodString>; }, z.core.$strip>>; }, z.core.$strip>; export declare const MIME_TYPE_MAPPINGS: Record<string, string>; //# sourceMappingURL=types.d.ts.map