import { type TSchema } from "typebox"; import { type TerminalWorkspace } from "./terminal.js"; export declare const PARAM_DESCRIPTIONS: { readonly workspaceId: "Optional workspace id (see workspace_list). Omit to use the active workspace."; readonly sshHost: "Remote host (hostname or IP)."; readonly sshPort: "SSH port. Default 22."; readonly sshUser: "Remote login user."; readonly sshKeyPath: "Path to the private key file. Defaults to your member ssh key."; readonly sshRoot: "Remote root directory for this workspace. Relative paths resolve against it. Default '.' (remote home)."; readonly terminalName: "Optional short name for the terminal (shows in terminal_list)."; readonly terminalCwd: "Starting directory. Defaults to the workspace root."; readonly terminalCommand: "The command line to run."; readonly terminalKeys: "Control key to send instead of a command: ctrl-c, ctrl-z, or ctrl-d."; readonly terminalBlockSeconds: "Max seconds to wait before reporting the command as still running. Default 10, 0 = never block — the command backgrounds immediately (use for servers/long builds), collect output later with terminal_read."; readonly terminalWaitBlockSeconds: "Max seconds to wait for the exec to finish. Default 30; 0 waits until completion."; readonly query: "Case-insensitive substring to search in message content"; readonly from: "Filter by sender name (exact match, e.g. 'user' or 'developer')"; readonly after: "Only messages after this time: ISO timestamp or relative ('today', 'yesterday', '1h', '7d')"; readonly before: "Only messages before this time: same format as 'after'"; readonly around_seq: "Return a window of messages centered on the message with this seq (use with limit to control window size)"; readonly from_seq: "Return messages strictly after this seq (ascending) — reads the unread backlog the activation hint points at"; readonly limit: "Max messages to return (default 50, max 500)"; readonly output: "'text' returns inline (default). 'file' writes to a temp markdown file and returns the path — use Read tool to view it"; readonly chatRef: "Chat short id (rm_…/dm_…, see chat_list) or name."; readonly memberRef: "Member name or id (see member_list)."; readonly listQuery: "Keyword filter."; readonly listLimit: "Max entries to return (default 50)."; readonly listOffset: "Skip this many entries (for paging)."; readonly chatTo: "Target chat id or name; your private chat with the user is \"dm:\" (or \"user\")."; readonly chatMessage: "Message to post. @name activates that member (exact match required; a plain name never activates)."; readonly chatAttachments: "Local file paths to attach. Files are copied into that chat's attachment store."; readonly chatName: "Group chat name."; readonly chatDescription: "Group chat description (≤2000 characters); an empty string clears it."; readonly workspaceRegistrationId: "Workspace id — letters, digits, dot, dash, underscore."; readonly workspaceTargetId: "Workspace id (see workspace_list)."; readonly workspaceDescription: "Short human-readable description."; readonly filePath: "File path — relative paths resolve against the selected workspace."; readonly fileOffset: "Line number to start from (1-indexed)."; readonly fileLimit: `Maximum lines to read (output capped at ${string}).`; readonly fileContent: "Full file content to write."; readonly fileEdits: "Exact-match text replacements to apply in order."; readonly fileEditOldText: "Exact text to find; it must match exactly once."; readonly fileEditNewText: "Replacement text to write in place of oldText."; readonly terminalId: "Terminal id from terminal_create / terminal_list."; readonly terminalExecId: "Exec id (for example, e3)."; readonly terminalFromLine: "First absolute line number to read."; readonly terminalToLine: "Last absolute line number to read."; readonly createMembers: "Member ids to include; the creator is always included."; readonly addMembers: "Member ids to add."; readonly removeMembers: "Member ids to remove (history and memory are retained)."; readonly profileName: "New member name."; readonly profileDescription: "New description; an empty string clears it."; readonly gatewayAction: "One of: list, describe, call."; readonly gatewayTool: "Capability name from action \"list\"."; readonly gatewayArgs: "Arguments object for the capability."; }; export interface GatewayToolSpec { name: string; label: string; description: string; parameters: TSchema; example: Record; } export declare const GATEWAY_TOOL_SPECS: GatewayToolSpec[]; export interface DirectToolSpec { name: string; label: string; description: string; parameters: TSchema; } export declare const DIRECT_TOOL_SPECS: DirectToolSpec[]; export interface QueryRowReplyTo { seq: number; messageId: string; sender?: string; excerpt?: string; unavailable?: boolean; } export interface QueryRow { seq?: number; sender: string; content: string; ts?: number; replyTo?: QueryRowReplyTo; attachments?: Array<{ originalFilename: string; path?: string; unavailable?: boolean; }>; } /** Render one row as the member sees it: header + reply quote + content + attachments. */ export declare function renderQueryRowForMember(row: QueryRow): string; /** Render a page of rows (blank line between messages). */ export declare function renderQueryRowsForMember(rows: QueryRow[]): string; /** * Batch 7 P1 (spec §3): workspace-aware file tools — read/write/edit override * pi's built-ins by name (the SDK tool registry lets custom tools shadow * built-ins). Relative paths resolve against the active workspace root; the * optional `workspace` parameter picks a workspace by id. original = whole * local machine, no fence (fish: 整机不限制); ssh workspaces read/write over * sftp with a cached connection per workspace. */ export interface WorkspacePathResolution { workspace: TerminalWorkspace; /** For original: an absolute local path. For ssh: a remote path (may be relative to the workspace root). */ path: string; } export declare function resolveWorkspacePath(memberId: string, rawPath: string, workspaceId?: string): WorkspacePathResolution | { error: string; }; export declare function dropSftpConnectionsForMember(memberId?: string): Promise; export declare const IMAGE_EXTENSIONS: Set; export interface FileToolResult { content: Array<{ type: "text"; text: string; } | { type: "image"; data: string; mimeType: string; }>; details: Record; } export declare function workspaceReadTool(memberId: string, args: { path?: string; offset?: number; limit?: number; workspace?: string; }): Promise; export declare function workspaceWriteTool(memberId: string, args: { path?: string; content?: string; workspace?: string; }): Promise; export declare function workspaceEditTool(memberId: string, args: { path?: string; edits?: Array<{ oldText?: string; newText?: string; }>; workspace?: string; }): Promise; export interface AgentToolHostInput { tool: string; params: Record; memberId: string; currentSourceRef: string | null; } export type AgentToolHost = (input: AgentToolHostInput) => Promise | unknown; export declare function configureAgentToolHost(host: AgentToolHost | undefined): void; export interface ToolExecutionContext { signal?: AbortSignal; memberId?: string; } /** Runtime-owned tools stay here. Cross-domain chat/member/workspace operations * cross one injected app port, so agent code never interprets chat identities. */ export declare function handleToolCallback(tool: string, sourceRef: string, agentName: string, params: Record, context?: ToolExecutionContext): Promise; //# sourceMappingURL=tools.d.ts.map