chore(vendor): import pi 0.85.1
Imported as a linear vendor commit so forge rebases do not replay the upstream root tree. git-subtree-dir: third_party/pi git-subtree-split: d981de1229ef899957bbe968bc8dcda02a21f477
This commit is contained in:
1 parent
5ebc7018c3
commit
4def357d09
1669 files changed
+397627
No files matched your search
+54
@@ -0,0 +1,54 @@
|
||||
import { type Context, defineService } from "@earendil-works/chord";
|
||||
|
||||
export interface AgentPromptImage {
|
||||
type: "image";
|
||||
data: string;
|
||||
mimeType: string;
|
||||
}
|
||||
|
||||
export interface AgentPromptRequest {
|
||||
message: string;
|
||||
images: AgentPromptImage[] | null;
|
||||
}
|
||||
|
||||
export interface AgentOperationError {
|
||||
code: string;
|
||||
message: string;
|
||||
}
|
||||
|
||||
export type AgentOperationResponse =
|
||||
| { accepted: true; operationId: string; error: AgentOperationError | null }
|
||||
| { accepted: false; operationId: string | null; error: AgentOperationError };
|
||||
|
||||
export type AgentQueueResponse =
|
||||
| { accepted: true; entryId: string; error: null }
|
||||
| { accepted: false; entryId: null; error: AgentOperationError };
|
||||
|
||||
export interface AgentCompactionRequest {
|
||||
customInstructions: string | null;
|
||||
}
|
||||
|
||||
export interface AgentNavigationRequest {
|
||||
targetId: string | null;
|
||||
summarize: boolean;
|
||||
label: string | null;
|
||||
customInstructions: string | null;
|
||||
}
|
||||
|
||||
/** Presentation-safe command facade over the worker-owned main AgentLane. */
|
||||
export interface AgentController {
|
||||
prompt(request: AgentPromptRequest, context: Context): Promise<AgentOperationResponse>;
|
||||
requestAbort(operationId: string, context: Context): Promise<void>;
|
||||
steer(request: AgentPromptRequest, context: Context): Promise<AgentQueueResponse>;
|
||||
followUp(request: AgentPromptRequest, context: Context): Promise<AgentQueueResponse>;
|
||||
nextRun(request: AgentPromptRequest, context: Context): Promise<AgentQueueResponse>;
|
||||
cancelQueued(
|
||||
entryId: string,
|
||||
context: Context,
|
||||
): Promise<{ outcome: "cancelled" | "already_consumed" | "not_found" }>;
|
||||
resume(context: Context): Promise<AgentOperationResponse>;
|
||||
compact(request: AgentCompactionRequest, context: Context): Promise<AgentOperationResponse>;
|
||||
navigate(request: AgentNavigationRequest, context: Context): Promise<AgentOperationResponse>;
|
||||
}
|
||||
|
||||
export const AgentController = defineService<AgentController>("pi.agent-controller");
|
||||
Reference in new issue
Block a user