mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
refactor(cli): rename ps to ls and add top-level agent commands
This commit is contained in:
@@ -656,6 +656,29 @@ export class DaemonClientV2 {
|
||||
this.sendSessionMessage(message);
|
||||
}
|
||||
|
||||
async waitForSessionState(timeout = 5000, requestId?: string): Promise<void> {
|
||||
const resolvedRequestId = this.createRequestId(requestId);
|
||||
const message = SessionInboundMessageSchema.parse({
|
||||
type: "request_session_state",
|
||||
requestId: resolvedRequestId,
|
||||
});
|
||||
|
||||
// First check the existing message queue in case session_state was already received
|
||||
for (const msg of this.messageQueue) {
|
||||
if (msg.type === "session_state") {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// If not in queue, wait for the session_state message
|
||||
await this.sendSessionMessageOrThrow(message);
|
||||
return this.waitFor(
|
||||
(msg) => msg.type === "session_state" ? undefined : null,
|
||||
timeout,
|
||||
{ skipQueue: false }
|
||||
);
|
||||
}
|
||||
|
||||
async loadVoiceConversation(
|
||||
voiceConversationId: string,
|
||||
requestId?: string
|
||||
|
||||
@@ -5,3 +5,20 @@ export { resolvePaseoHome } from "./paseo-home.js";
|
||||
export { createRootLogger, type LogLevel, type LogFormat } from "./logger.js";
|
||||
export { loadPersistedConfig, type PersistedConfig } from "./persisted-config.js";
|
||||
export { DaemonClientV2, type DaemonClientV2Config, type ConnectionState, type DaemonEvent } from "../client/daemon-client-v2.js";
|
||||
|
||||
// Agent SDK types for CLI commands
|
||||
export type {
|
||||
AgentMode,
|
||||
AgentUsage,
|
||||
AgentCapabilityFlags,
|
||||
AgentPermissionRequest,
|
||||
AgentTimelineItem,
|
||||
} from "./agent/agent-sdk-types.js";
|
||||
|
||||
// WebSocket message types for CLI streaming
|
||||
export type {
|
||||
AgentSnapshotPayload,
|
||||
AgentStreamEventPayload,
|
||||
AgentStreamMessage,
|
||||
AgentStreamSnapshotMessage,
|
||||
} from "../shared/messages.js";
|
||||
|
||||
Reference in New Issue
Block a user