@getpaseo/client 0.6.1 → 0.7.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/daemon-client.d.ts +9 -1
- package/dist/daemon-client.js +35 -0
- package/dist/index.d.ts +38 -1
- package/dist/index.js +31 -0
- package/package.json +3 -3
package/dist/daemon-client.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { z } from "zod";
|
|
|
2
2
|
import { type ClientCapability } from "@getpaseo/protocol/client-capabilities";
|
|
3
3
|
import type { AgentAttentionNotificationPayload } from "@getpaseo/protocol/agent-attention-notification";
|
|
4
4
|
import { AgentRefreshedStatusPayloadSchema, CheckoutRenameBranchResponseSchema, RenameTerminalResponseSchema, RestartRequestedStatusPayloadSchema, ShutdownRequestedStatusPayloadSchema, DaemonUpdateResponseSchema, type ActiveTurnBehavior, type ServerInfoStatusPayload } from "@getpaseo/protocol/messages";
|
|
5
|
-
import type { AgentStreamEventPayload, AgentSnapshotPayload, ProjectPlacementPayload, AgentPermissionResolvedMessage, CreateAgentRequestMessage, CreatePaseoWorktreeRequest, FileDownloadTokenResponse, FileUploadResponse, FileExplorerResponse, FileVersion, FileWriteResult, FetchAgentTimelineResponseMessage, AgentForkContextResponseMessage, GitSetupOptions, CheckoutStatusResponse, CheckoutCommit, ParsedDiffFile, CheckoutCommitResponse, CheckoutMergeResponse, CheckoutMergeFromBaseResponse, CheckoutPullResponse, CheckoutPushResponse, CheckoutRefreshResponse, CheckoutPrCreateResponse, CheckoutPrMergeResponse, CheckoutPrMergeMethod, CheckoutForgeSetAutoMergeResponse, CheckoutGithubSetAutoMergeResponse, CheckoutForgeGetCheckDetailsResponse, CheckoutGithubGetCheckDetailsResponse, CheckoutPrStatusResponse, PullRequestTimelineResponse, CheckoutSwitchBranchResponse, StashSaveResponse, StashPopResponse, StashListResponse, ValidateBranchResponse, BranchSuggestionsResponse, ForgeSearchResponse, ForgeSearchRequest, GitHubSearchResponse, GitHubSearchRequest, DirectorySuggestionsResponse, PaseoWorktreeListResponse, PaseoWorktreeArchiveResponse, ProjectIconSource, ProjectIconResponse, ProjectIconGetResponse, ProjectAddResponse, ProjectCreateDirectoryResponse, OpenProjectResponseMessage, WorkspaceGithubSearchRepositoriesResponse, ProjectGithubCloneProtocol, ProjectGithubCloneResponse, ArchiveWorkspaceResponseMessage, WorkspaceSetupStatusResponseMessage, ListCommandsResponse, ListProviderFeaturesResponseMessage, ListProviderModelsResponseMessage, ListProviderModesResponseMessage, ListAvailableProvidersResponse, GetProvidersSnapshotResponseMessage, RefreshProvidersSnapshotResponseMessage, ProviderDiagnosticResponseMessage, ProviderUsageListResponseMessage, DaemonGetStatusResponse, DaemonGetPairingOfferResponse, DaemonConfigReloadResponse, DiagnosticsResponse, AgentRewindResponseMessage, ListTerminalsResponse, CreateTerminalResponse, SubscribeTerminalResponse, SubscribeTerminalRequest, CloseItemsResponse, KillTerminalResponse, CaptureTerminalResponse, TerminalInput, SessionInboundMessage, SessionOutboundMessage, SendAgentMessageRequest, PaseoConfigRaw, PaseoConfigRevision, WorkspaceCreateRequest, WorkspaceRecoveryState, PluginListItem, PluginLogEntry, AgentSkillSelection, AgentSkillsStatus, AgentSkillsSaveResult } from "@getpaseo/protocol/messages";
|
|
5
|
+
import type { AgentStreamEventPayload, AgentSnapshotPayload, ProjectPlacementPayload, AgentPermissionResolvedMessage, CreateAgentRequestMessage, CreatePaseoWorktreeRequest, FileDownloadTokenResponse, FileUploadResponse, FileExplorerResponse, FileVersion, FileWriteResult, FetchAgentTimelineResponseMessage, AgentForkContextResponseMessage, GitSetupOptions, CheckoutStatusResponse, CheckoutCommit, ParsedDiffFile, CheckoutCommitResponse, CheckoutMergeResponse, CheckoutMergeFromBaseResponse, CheckoutPullResponse, CheckoutPushResponse, CheckoutRefreshResponse, CheckoutPrCreateResponse, CheckoutPrMergeResponse, CheckoutPrMergeMethod, CheckoutForgeSetAutoMergeResponse, CheckoutGithubSetAutoMergeResponse, CheckoutForgeGetCheckDetailsResponse, CheckoutGithubGetCheckDetailsResponse, CheckoutPrStatusResponse, PullRequestTimelineResponse, CheckoutSwitchBranchResponse, StashSaveResponse, StashPopResponse, StashListResponse, ValidateBranchResponse, BranchSuggestionsResponse, ForgeSearchResponse, ForgeSearchRequest, GitHubSearchResponse, GitHubSearchRequest, DirectorySuggestionsResponse, PaseoWorktreeListResponse, PaseoWorktreeArchiveResponse, ProjectIconSource, ProjectIconResponse, ProjectIconGetResponse, ProjectAddResponse, ProjectCreateDirectoryResponse, OpenProjectResponseMessage, WorkspaceGithubSearchRepositoriesResponse, ProjectGithubCloneProtocol, ProjectGithubCloneResponse, ArchiveWorkspaceResponseMessage, WorkspaceSetupStatusResponseMessage, ListCommandsResponse, ListProviderFeaturesResponseMessage, ListProviderModelsResponseMessage, ListProviderModesResponseMessage, ListAvailableProvidersResponse, GetProvidersSnapshotResponseMessage, RefreshProvidersSnapshotResponseMessage, ProviderDiagnosticResponseMessage, ProviderUsageListResponseMessage, DaemonGetStatusResponse, DaemonGetPairingOfferResponse, DaemonConfigReloadResponse, DiagnosticsResponse, AgentRewindResponseMessage, ListTerminalsResponse, CreateTerminalResponse, SubscribeTerminalResponse, SubscribeTerminalRequest, CloseItemsResponse, KillTerminalResponse, CaptureTerminalResponse, TerminalInput, SessionInboundMessage, SessionOutboundMessage, SendAgentMessageRequest, PaseoConfigRaw, PaseoConfigRevision, WorkspaceCreateRequest, WorkspaceRecoveryState, PluginListItem, PluginLogEntry, PluginSourceStatusItem, PluginSourceUpdateItem, AgentSkillSelection, AgentSkillsStatus, AgentSkillsSaveResult } from "@getpaseo/protocol/messages";
|
|
6
6
|
import type { AgentPermissionRequest, AgentPermissionResponse, AgentPersistenceHandle, AgentProviderNotice, AgentProvider, AgentSessionConfig } from "@getpaseo/protocol/agent-types";
|
|
7
7
|
import type { AgentConfigApply, MutableDaemonConfig, MutableDaemonConfigPatch } from "@getpaseo/protocol/messages";
|
|
8
8
|
import { type DaemonTransportFactory, type WebSocketFactory } from "./daemon-client-transport.js";
|
|
@@ -1070,6 +1070,14 @@ export declare class DaemonClient {
|
|
|
1070
1070
|
selection: AgentSkillSelection;
|
|
1071
1071
|
}>;
|
|
1072
1072
|
installDirectoryPlugin(path: string, id?: string): Promise<PluginListItem>;
|
|
1073
|
+
installPluginSource(input: {
|
|
1074
|
+
source: string;
|
|
1075
|
+
id?: string;
|
|
1076
|
+
ref?: string;
|
|
1077
|
+
pluginPath?: string;
|
|
1078
|
+
}): Promise<PluginListItem>;
|
|
1079
|
+
getPluginSourceStatus(pluginId?: string): Promise<PluginSourceStatusItem[]>;
|
|
1080
|
+
updatePluginSources(pluginId?: string): Promise<PluginSourceUpdateItem[]>;
|
|
1073
1081
|
inspectDirectoryPlugin(path: string): Promise<{
|
|
1074
1082
|
id: string;
|
|
1075
1083
|
}>;
|
package/dist/daemon-client.js
CHANGED
|
@@ -3343,6 +3343,41 @@ export class DaemonClient {
|
|
|
3343
3343
|
});
|
|
3344
3344
|
return payload.plugin;
|
|
3345
3345
|
}
|
|
3346
|
+
async installPluginSource(input) {
|
|
3347
|
+
const requestId = this.createRequestId();
|
|
3348
|
+
const payload = await this.sendCorrelatedSessionRequest({
|
|
3349
|
+
requestId,
|
|
3350
|
+
message: { type: "plugin.source.install.request", requestId, ...input },
|
|
3351
|
+
responseType: "plugin.source.install.response",
|
|
3352
|
+
});
|
|
3353
|
+
return payload.plugin;
|
|
3354
|
+
}
|
|
3355
|
+
async getPluginSourceStatus(pluginId) {
|
|
3356
|
+
const requestId = this.createRequestId();
|
|
3357
|
+
const payload = await this.sendCorrelatedSessionRequest({
|
|
3358
|
+
requestId,
|
|
3359
|
+
message: {
|
|
3360
|
+
type: "plugin.source.status.request",
|
|
3361
|
+
requestId,
|
|
3362
|
+
...(pluginId ? { pluginId } : {}),
|
|
3363
|
+
},
|
|
3364
|
+
responseType: "plugin.source.status.response",
|
|
3365
|
+
});
|
|
3366
|
+
return payload.plugins;
|
|
3367
|
+
}
|
|
3368
|
+
async updatePluginSources(pluginId) {
|
|
3369
|
+
const requestId = this.createRequestId();
|
|
3370
|
+
const payload = await this.sendCorrelatedSessionRequest({
|
|
3371
|
+
requestId,
|
|
3372
|
+
message: {
|
|
3373
|
+
type: "plugin.source.update.request",
|
|
3374
|
+
requestId,
|
|
3375
|
+
...(pluginId ? { pluginId } : {}),
|
|
3376
|
+
},
|
|
3377
|
+
responseType: "plugin.source.update.response",
|
|
3378
|
+
});
|
|
3379
|
+
return payload.plugins;
|
|
3380
|
+
}
|
|
3346
3381
|
async inspectDirectoryPlugin(path) {
|
|
3347
3382
|
const requestId = this.createRequestId();
|
|
3348
3383
|
return this.sendCorrelatedSessionRequest({
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AgentSnapshotPayload, CreateAgentRequestMessage, FetchWorkspacesRequestMessage, FetchWorkspacesResponseMessage, GetProvidersSnapshotResponseMessage, ListAvailableProvidersResponse, ListProviderFeaturesRequestMessage, ListProviderFeaturesResponseMessage, ListProviderModelsResponseMessage, ListProviderModesResponseMessage, MutableDaemonConfig, MutableDaemonConfigPatch, ProviderDiagnosticResponseMessage, ProjectPlacementPayload, RefreshProvidersSnapshotResponseMessage, SendAgentMessageRequest, SessionOutboundMessage, WorkspaceDescriptorPayload, WorkspaceCreateRequest } from "@getpaseo/protocol/messages";
|
|
1
|
+
import type { AgentSnapshotPayload, CreateAgentRequestMessage, FetchWorkspacesRequestMessage, FetchWorkspacesResponseMessage, GetProvidersSnapshotResponseMessage, ListAvailableProvidersResponse, ListCommandsResponse, ListProviderFeaturesRequestMessage, ListProviderFeaturesResponseMessage, ListProviderModelsResponseMessage, ProjectListRequestMessage, ProjectListResponseMessage, ListProviderModesResponseMessage, MutableDaemonConfig, MutableDaemonConfigPatch, ProviderDiagnosticResponseMessage, ProjectPlacementPayload, WorkspaceProjectDescriptorPayload, RefreshProvidersSnapshotResponseMessage, SendAgentMessageRequest, SessionOutboundMessage, WorkspaceDescriptorPayload, WorkspaceCreateRequest } from "@getpaseo/protocol/messages";
|
|
2
2
|
import { DaemonClient } from "./daemon-client.js";
|
|
3
3
|
import type { FetchAgentsEntry, FetchAgentsOptions, FetchAgentsPageInfo, FetchAgentTimelineCursor, FetchAgentTimelineDirection, FetchAgentTimelinePayload, FetchAgentTimelineProjection, WaitForFinishResult } from "./daemon-client.js";
|
|
4
4
|
export type ConnectionState = {
|
|
@@ -45,6 +45,11 @@ export interface PaseoClientConfig {
|
|
|
45
45
|
export type PaseoWorkspace = WorkspaceDescriptorPayload;
|
|
46
46
|
export type PaseoAgent = AgentSnapshotPayload;
|
|
47
47
|
export type PaseoAgentListOptions = FetchAgentsOptions;
|
|
48
|
+
export type PaseoProject = WorkspaceProjectDescriptorPayload;
|
|
49
|
+
export type PaseoProjectListOptions = Omit<ProjectListRequestMessage, "type" | "requestId"> & {
|
|
50
|
+
requestId?: string;
|
|
51
|
+
};
|
|
52
|
+
export type PaseoProjectListResult = ProjectListResponseMessage["payload"];
|
|
48
53
|
export interface PaseoAgentListResult {
|
|
49
54
|
requestId: string;
|
|
50
55
|
subscriptionId?: string | null;
|
|
@@ -102,6 +107,9 @@ export interface PaseoWorkspaceHandle {
|
|
|
102
107
|
*/
|
|
103
108
|
subscribe(handler: (update: PaseoWorkspaceUpdate) => void): () => void;
|
|
104
109
|
}
|
|
110
|
+
export interface PaseoProjectActions {
|
|
111
|
+
list(options?: PaseoProjectListOptions): Promise<PaseoProjectListResult>;
|
|
112
|
+
}
|
|
105
113
|
export interface PaseoWorkspaceActions {
|
|
106
114
|
list(options?: PaseoWorkspaceListOptions): Promise<PaseoWorkspaceListResult>;
|
|
107
115
|
ref(workspace: string | PaseoWorkspace): PaseoWorkspaceHandle;
|
|
@@ -170,6 +178,10 @@ export interface PaseoAgentRunOptions extends PaseoAgentSendOptions {
|
|
|
170
178
|
timeoutMs?: number;
|
|
171
179
|
}
|
|
172
180
|
export type PaseoAgentRunResult = WaitForFinishResult;
|
|
181
|
+
export interface PaseoAgentCommandsOptions {
|
|
182
|
+
requestId?: string;
|
|
183
|
+
}
|
|
184
|
+
export type PaseoAgentCommandsResult = ListCommandsResponse["payload"];
|
|
173
185
|
export type PaseoAgentUpdate = Extract<SessionOutboundMessage, {
|
|
174
186
|
type: "agent_update";
|
|
175
187
|
}>["payload"];
|
|
@@ -192,9 +204,25 @@ export interface PaseoAgentTimelineHandle {
|
|
|
192
204
|
}
|
|
193
205
|
export interface PaseoAgentHandle {
|
|
194
206
|
readonly id: string;
|
|
207
|
+
/**
|
|
208
|
+
* `workspaceId` through `archivedAt` mirror the last snapshot this handle
|
|
209
|
+
* observed. A handle from `ref()` reads `null` for all of them until
|
|
210
|
+
* `refresh()`, `run()`, `waitForFinish()`, a timeline refetch, or
|
|
211
|
+
* `subscribe()` delivers a snapshot. Optional snapshot values also read as
|
|
212
|
+
* `null`; use `current()` when you need to distinguish those states.
|
|
213
|
+
*/
|
|
195
214
|
readonly workspaceId: string | null;
|
|
196
215
|
readonly cwd: string | null;
|
|
197
216
|
readonly status: PaseoAgent["status"] | null;
|
|
217
|
+
readonly capabilities: PaseoAgent["capabilities"] | null;
|
|
218
|
+
readonly availableModes: PaseoAgent["availableModes"] | null;
|
|
219
|
+
readonly pendingPermissions: PaseoAgent["pendingPermissions"] | null;
|
|
220
|
+
readonly activeTurn: NonNullable<PaseoAgent["activeTurn"]> | null;
|
|
221
|
+
readonly lastUsage: NonNullable<PaseoAgent["lastUsage"]> | null;
|
|
222
|
+
readonly lastError: NonNullable<PaseoAgent["lastError"]> | null;
|
|
223
|
+
readonly features: NonNullable<PaseoAgent["features"]> | null;
|
|
224
|
+
readonly runtimeInfo: NonNullable<PaseoAgent["runtimeInfo"]> | null;
|
|
225
|
+
readonly archivedAt: NonNullable<PaseoAgent["archivedAt"]> | null;
|
|
198
226
|
readonly timeline: PaseoAgentTimelineHandle;
|
|
199
227
|
current(): PaseoAgent | null;
|
|
200
228
|
refresh(requestId?: string): Promise<PaseoAgentRefetchResult | null>;
|
|
@@ -203,6 +231,14 @@ export interface PaseoAgentHandle {
|
|
|
203
231
|
run(text: string, options?: PaseoAgentRunOptions): Promise<PaseoAgentRunResult>;
|
|
204
232
|
/** Waits for the current turn, including one started with `prompt`. */
|
|
205
233
|
waitForFinish(timeoutMs?: number): Promise<PaseoAgentRunResult>;
|
|
234
|
+
/**
|
|
235
|
+
* Asks the running session for the slash commands and skills it actually
|
|
236
|
+
* loaded. Providers answer from the live session, so this sees built-in and
|
|
237
|
+
* bundled entries that no directory scan can find. The payload carries its own
|
|
238
|
+
* `error` string; a provider that cannot answer reports it there rather than
|
|
239
|
+
* rejecting.
|
|
240
|
+
*/
|
|
241
|
+
commands(options?: PaseoAgentCommandsOptions): Promise<PaseoAgentCommandsResult>;
|
|
206
242
|
archive(): Promise<{
|
|
207
243
|
archivedAt: string;
|
|
208
244
|
}>;
|
|
@@ -288,6 +324,7 @@ export interface PaseoConfigActions {
|
|
|
288
324
|
}
|
|
289
325
|
export interface PaseoApi {
|
|
290
326
|
readonly workspaces: PaseoWorkspaceActions;
|
|
327
|
+
readonly projects: PaseoProjectActions;
|
|
291
328
|
readonly agents: PaseoAgentActions;
|
|
292
329
|
readonly providers: PaseoProviderActions;
|
|
293
330
|
readonly config: PaseoConfigActions;
|
package/dist/index.js
CHANGED
|
@@ -43,6 +43,9 @@ export function createPaseoApi(daemonClient) {
|
|
|
43
43
|
};
|
|
44
44
|
const createWorkspaceHandle = createWorkspaceHandleFactory(daemonClient, createAgent);
|
|
45
45
|
return {
|
|
46
|
+
projects: {
|
|
47
|
+
list: (options) => daemonClient.listProjects(options),
|
|
48
|
+
},
|
|
46
49
|
workspaces: {
|
|
47
50
|
list: (options) => daemonClient.fetchWorkspaces(options),
|
|
48
51
|
ref: (workspace) => createWorkspaceHandle(workspace),
|
|
@@ -188,6 +191,33 @@ function createAgentHandleFactory(daemonClient) {
|
|
|
188
191
|
get status() {
|
|
189
192
|
return current?.status ?? null;
|
|
190
193
|
},
|
|
194
|
+
get capabilities() {
|
|
195
|
+
return current?.capabilities ?? null;
|
|
196
|
+
},
|
|
197
|
+
get availableModes() {
|
|
198
|
+
return current?.availableModes ?? null;
|
|
199
|
+
},
|
|
200
|
+
get pendingPermissions() {
|
|
201
|
+
return current?.pendingPermissions ?? null;
|
|
202
|
+
},
|
|
203
|
+
get activeTurn() {
|
|
204
|
+
return current?.activeTurn ?? null;
|
|
205
|
+
},
|
|
206
|
+
get lastUsage() {
|
|
207
|
+
return current?.lastUsage ?? null;
|
|
208
|
+
},
|
|
209
|
+
get lastError() {
|
|
210
|
+
return current?.lastError ?? null;
|
|
211
|
+
},
|
|
212
|
+
get features() {
|
|
213
|
+
return current?.features ?? null;
|
|
214
|
+
},
|
|
215
|
+
get runtimeInfo() {
|
|
216
|
+
return current?.runtimeInfo ?? null;
|
|
217
|
+
},
|
|
218
|
+
get archivedAt() {
|
|
219
|
+
return current?.archivedAt ?? null;
|
|
220
|
+
},
|
|
191
221
|
current: () => current,
|
|
192
222
|
refresh: async (requestId) => {
|
|
193
223
|
const result = await daemonClient.fetchAgent({ agentId: id, requestId });
|
|
@@ -213,6 +243,7 @@ function createAgentHandleFactory(daemonClient) {
|
|
|
213
243
|
}
|
|
214
244
|
return result;
|
|
215
245
|
},
|
|
246
|
+
commands: (options) => daemonClient.listCommands({ agentId: id, ...options }),
|
|
216
247
|
archive: async () => {
|
|
217
248
|
const result = await daemonClient.archiveAgent(id);
|
|
218
249
|
if (current) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getpaseo/client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0-beta.2",
|
|
4
4
|
"description": "Paseo client SDK package",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"test": "vitest run"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@getpaseo/protocol": "0.
|
|
43
|
-
"@getpaseo/relay": "0.
|
|
42
|
+
"@getpaseo/protocol": "0.7.0-beta.2",
|
|
43
|
+
"@getpaseo/relay": "0.7.0-beta.2",
|
|
44
44
|
"zod": "^4.4.3"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|