Add 5 pi extensions: pi-subagents, pi-crew, rpiv-pi, pi-interactive-shell, pi-intercom
This commit is contained in:
46
extensions/pi-intercom/types.ts
Normal file
46
extensions/pi-intercom/types.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
export interface SessionInfo {
|
||||
id: string;
|
||||
name?: string;
|
||||
cwd: string;
|
||||
model: string;
|
||||
pid: number;
|
||||
startedAt: number;
|
||||
lastActivity: number;
|
||||
status?: string;
|
||||
}
|
||||
|
||||
export interface Message {
|
||||
id: string;
|
||||
timestamp: number;
|
||||
replyTo?: string;
|
||||
expectsReply?: boolean;
|
||||
content: {
|
||||
text: string;
|
||||
attachments?: Attachment[];
|
||||
};
|
||||
}
|
||||
|
||||
export interface Attachment {
|
||||
type: "file" | "snippet" | "context";
|
||||
name: string;
|
||||
content: string;
|
||||
language?: string;
|
||||
}
|
||||
|
||||
export type ClientMessage =
|
||||
| { type: "register"; session: Omit<SessionInfo, "id"> }
|
||||
| { type: "unregister" }
|
||||
| { type: "list"; requestId: string }
|
||||
| { type: "send"; to: string; message: Message }
|
||||
| { type: "presence"; name?: string; status?: string; model?: string };
|
||||
|
||||
export type BrokerMessage =
|
||||
| { type: "registered"; sessionId: string }
|
||||
| { type: "sessions"; requestId: string; sessions: SessionInfo[] }
|
||||
| { type: "message"; from: SessionInfo; message: Message }
|
||||
| { type: "presence_update"; session: SessionInfo }
|
||||
| { type: "session_joined"; session: SessionInfo }
|
||||
| { type: "session_left"; sessionId: string }
|
||||
| { type: "error"; error: string }
|
||||
| { type: "delivered"; messageId: string }
|
||||
| { type: "delivery_failed"; messageId: string; reason: string };
|
||||
Reference in New Issue
Block a user