import { type AgentAdapter, type AgentAPI, type AgentContext, type Blueprint, type Domain, type Profile } from "../schema.js"; /** PiAdapter:封装 Pi Agent 的注入机制。 */ export declare class PiAdapter implements AgentAdapter { name: string; /** Phase term-P4.3:保留 Pi API 名 system_prompt/context_message—— * 这是 AgentAdapter 映射边界声明(Pi 支持哪些 Agent Runtime 层注入位置)。 * Blueprint 用 session/turn 语义值(聚合组 inject 字段),Adapter 内部映射到此字段声明的 Pi API 名。 */ supportedTargets: string[]; private ctx; private blueprint; private domains; private segment; /** 与当前 Pi runtime 的 AgentAPI 绑定;同一 runtime 不重复注册 handler。 * v12.x:per-pi 实例字段——`registry.ts` 给每个 pi 一个新 PiAdapter,所以 `injectedApi` * 不会被其他 session 覆盖。 */ private injectedApi; /** v13.x(issue pt-turn-inject-not-profile-scoped):当前 Profile——turn 路径 scope 过滤用。 */ private profile; /** 设置编译产物(transpile 后调)。v12.x:per-pi 实例字段——本 session 的 segment * 不会被其他 session 覆盖。 * v13.x(issue pt-turn-inject-not-profile-scoped):加 profile 参数——turn 路径 scope 过滤用。 */ setAgentContext(ctx: AgentContext, blueprint: Blueprint, domains: Domain[], profile: Profile): void; /** 清除当前 session 的 context;保留当前 runtime 的 handler 绑定。 * v12.x:per-pi 实例字段——只清本 session 的状态。 */ resetInjection(): void; /** 启动时注册:把 AgentContext 注入到 Agent。 */ registerInject(api: AgentAPI, ctx: AgentContext, blueprint: Blueprint, domains?: Domain[], profile?: Profile | null): void; /** 查询可用手册(/pt flows 用)。 * v9:遍历 Blueprint 的 inject=turn 聚合组 → 引用 Domain → 找 FlowTemplate + Rules 段的 Rule。 */ listManuals(_ctx: AgentContext, blueprint: Blueprint, domains: Domain[]): Array<{ name: string; hint?: string; domain: string; }>; }