@hyperdrive.bot/paseo-client 0.3.34 → 0.3.35
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 +28 -2
- package/dist/daemon-client.js +57 -0
- package/dist/index.d.ts +10 -1
- package/dist/index.js +4 -0
- package/package.json +3 -3
package/dist/daemon-client.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { z } from "zod";
|
|
2
2
|
import { type ClientCapability } from "@hyperdrive.bot/paseo-protocol/client-capabilities";
|
|
3
3
|
import { AgentRefreshedStatusPayloadSchema, CheckoutRenameBranchResponseSchema, RenameTerminalResponseSchema, RestartRequestedStatusPayloadSchema, ShutdownRequestedStatusPayloadSchema, DaemonUpdateResponseSchema, type ServerInfoStatusPayload } from "@hyperdrive.bot/paseo-protocol/messages";
|
|
4
|
-
import type { AgentStreamEventPayload, InstalledExtension, AgentSnapshotPayload, ProjectPlacementPayload, AgentPermissionResolvedMessage, CreateAgentRequestMessage, CreatePaseoWorktreeRequest, FileDownloadTokenResponse, FileExplorerResponse, FetchAgentTimelineResponseMessage, AgentForkContextResponseMessage, GitSetupOptions, CheckoutStatusResponse, CheckoutCommitResponse, CheckoutMergeResponse, CheckoutMergeFromBaseResponse, CheckoutPullResponse, CheckoutPushResponse, CheckoutRefreshResponse, CheckoutPrCreateResponse, CheckoutPrMergeResponse, CheckoutPrMergeMethod, CheckoutGithubSetAutoMergeResponse, CheckoutGithubGetCheckDetailsResponse, CheckoutPrStatusResponse, PullRequestTimelineResponse, CheckoutSwitchBranchResponse, StashSaveResponse, StashPopResponse, StashListResponse, ValidateBranchResponse, BranchSuggestionsResponse, GitHubSearchResponse, GitHubSearchRequest, DirectorySuggestionsResponse, PaseoWorktreeListResponse, PaseoWorktreeArchiveResponse, ProjectIconResponse, ProjectAddResponse, OpenProjectResponseMessage, ArchiveWorkspaceResponseMessage, WorkspaceSetupStatusResponseMessage, ListCommandsResponse, ListProviderFeaturesResponseMessage, ListProviderModelsResponseMessage, ListProviderModesResponseMessage, ListAvailableProvidersResponse, GetProvidersSnapshotResponseMessage, RefreshProvidersSnapshotResponseMessage, ProviderDiagnosticResponseMessage, ProviderUsageListResponseMessage, DaemonGetStatusResponse, DaemonGetPairingOfferResponse, DiagnosticsResponse, AgentRewindResponseMessage, ListTerminalsResponse, CreateTerminalResponse, SubscribeTerminalResponse, SubscribeTerminalRequest, CloseItemsResponse, KillTerminalResponse, CaptureTerminalResponse, TerminalInput, SessionInboundMessage, SessionOutboundMessage, SendAgentMessageRequest, PaseoConfigRaw, PaseoConfigRevision, ProjectRenameResponse, WatchNotificationActionMessage, WatchSessionSearchMessage, WatchComposerDictateMessage, WorkflowSnapshot, WorkflowStatus, WorkflowTaskGraph, WorkspaceCreateRequest } from "@hyperdrive.bot/paseo-protocol/messages";
|
|
4
|
+
import type { AgentStreamEventPayload, InstalledExtension, AgentSnapshotPayload, ProjectPlacementPayload, AgentPermissionResolvedMessage, CreateAgentRequestMessage, CreatePaseoWorktreeRequest, FileDownloadTokenResponse, FileExplorerResponse, FetchAgentTimelineResponseMessage, AgentForkContextResponseMessage, GitSetupOptions, CheckoutStatusResponse, CheckoutCommitResponse, CheckoutMergeResponse, CheckoutMergeFromBaseResponse, CheckoutPullResponse, CheckoutPushResponse, CheckoutRefreshResponse, CheckoutPrCreateResponse, CheckoutPrMergeResponse, CheckoutPrMergeMethod, CheckoutGithubSetAutoMergeResponse, CheckoutGithubGetCheckDetailsResponse, CheckoutPrStatusResponse, PullRequestTimelineResponse, CheckoutSwitchBranchResponse, StashSaveResponse, StashPopResponse, StashListResponse, ValidateBranchResponse, BranchSuggestionsResponse, GitHubSearchResponse, GitHubSearchRequest, DirectorySuggestionsResponse, PaseoWorktreeListResponse, PaseoWorktreeArchiveResponse, ProjectIconResponse, ProjectAddResponse, OpenProjectResponseMessage, ArchiveWorkspaceResponseMessage, WorkspaceSetupStatusResponseMessage, ListCommandsResponse, ListProviderFeaturesResponseMessage, ListProviderModelsResponseMessage, ListProviderModesResponseMessage, ListAvailableProvidersResponse, GetProvidersSnapshotResponseMessage, RefreshProvidersSnapshotResponseMessage, ProviderDiagnosticResponseMessage, ProviderUsageListResponseMessage, DaemonGetStatusResponse, DaemonGetPairingOfferResponse, DiagnosticsResponse, AgentRewindResponseMessage, ListTerminalsResponse, CreateTerminalResponse, SubscribeTerminalResponse, SubscribeTerminalRequest, CloseItemsResponse, KillTerminalResponse, CaptureTerminalResponse, TerminalInput, SessionInboundMessage, SessionOutboundMessage, SendAgentMessageRequest, PaseoConfigRaw, PaseoConfigRevision, ProjectRenameResponse, BackgroundTaskPayload, WatchNotificationActionMessage, WatchSessionSearchMessage, WatchComposerDictateMessage, WorkflowSnapshot, WorkflowStatus, WorkflowTaskGraph, WorkspaceCreateRequest } from "@hyperdrive.bot/paseo-protocol/messages";
|
|
5
5
|
import type { AgentPermissionRequest, AgentPermissionResponse, AgentPersistenceHandle, AgentProviderNotice, AgentProvider, AgentSessionConfig } from "@hyperdrive.bot/paseo-protocol/agent-types";
|
|
6
|
-
import type { MutableDaemonConfig, MutableDaemonConfigPatch } from "@hyperdrive.bot/paseo-protocol/messages";
|
|
6
|
+
import type { MutableDaemonConfig, MutableDaemonConfigPatch, ProvidersReloadConfigPayload } from "@hyperdrive.bot/paseo-protocol/messages";
|
|
7
7
|
import type { FileUploadErrorCode } from "@hyperdrive.bot/paseo-protocol/messages";
|
|
8
8
|
import { type DaemonTransportFactory, type WebSocketFactory } from "./daemon-client-transport.js";
|
|
9
9
|
import { type TerminalStreamEvent } from "./terminal-stream-router.js";
|
|
@@ -739,6 +739,25 @@ export declare class DaemonClient {
|
|
|
739
739
|
* CLI's own `ctrl+x ctrl+k` kill chord over the PTY (kills it inside Claude
|
|
740
740
|
* Code). Resolves to whether the dismiss was delivered.
|
|
741
741
|
*/
|
|
742
|
+
/**
|
|
743
|
+
* List background shells -- one agent's, or every agent's when `agentId` is
|
|
744
|
+
* omitted. These are commands the provider launched with `run_in_background`
|
|
745
|
+
* so they outlive the turn; the rows carry the command, status and start time
|
|
746
|
+
* so the client can show what is running and for how long.
|
|
747
|
+
*/
|
|
748
|
+
listBackgroundTasks(agentId?: string): Promise<BackgroundTaskPayload[]>;
|
|
749
|
+
/**
|
|
750
|
+
* Read a background shell's captured output. Resolves with `text: null` when
|
|
751
|
+
* the daemon does not know the shell or it captured nothing. The daemon tails
|
|
752
|
+
* and redacts before sending.
|
|
753
|
+
*/
|
|
754
|
+
readBackgroundTaskOutput(agentId: string, taskId: string, options?: {
|
|
755
|
+
maxBytes?: number;
|
|
756
|
+
}): Promise<{
|
|
757
|
+
text: string | null;
|
|
758
|
+
truncated: boolean;
|
|
759
|
+
byteSize: number;
|
|
760
|
+
}>;
|
|
742
761
|
dismissBackgroundTask(agentId: string, taskId: string): Promise<{
|
|
743
762
|
dismissed: boolean;
|
|
744
763
|
}>;
|
|
@@ -1004,6 +1023,13 @@ export declare class DaemonClient {
|
|
|
1004
1023
|
cwd?: string;
|
|
1005
1024
|
requestId?: string;
|
|
1006
1025
|
}): Promise<GetProvidersSnapshotPayload>;
|
|
1026
|
+
/**
|
|
1027
|
+
* Re-read `agents.providers` from the daemon's config.json into its live
|
|
1028
|
+
* provider registry. No restart. Returns the add/update/remove diff.
|
|
1029
|
+
*/
|
|
1030
|
+
reloadProviderConfig(options?: {
|
|
1031
|
+
requestId?: string;
|
|
1032
|
+
}): Promise<ProvidersReloadConfigPayload>;
|
|
1007
1033
|
getDaemonConfig(requestId?: string): Promise<{
|
|
1008
1034
|
requestId: string;
|
|
1009
1035
|
config: MutableDaemonConfig;
|
package/dist/daemon-client.js
CHANGED
|
@@ -1319,6 +1319,49 @@ export class DaemonClient {
|
|
|
1319
1319
|
* CLI's own `ctrl+x ctrl+k` kill chord over the PTY (kills it inside Claude
|
|
1320
1320
|
* Code). Resolves to whether the dismiss was delivered.
|
|
1321
1321
|
*/
|
|
1322
|
+
/**
|
|
1323
|
+
* List background shells -- one agent's, or every agent's when `agentId` is
|
|
1324
|
+
* omitted. These are commands the provider launched with `run_in_background`
|
|
1325
|
+
* so they outlive the turn; the rows carry the command, status and start time
|
|
1326
|
+
* so the client can show what is running and for how long.
|
|
1327
|
+
*/
|
|
1328
|
+
async listBackgroundTasks(agentId) {
|
|
1329
|
+
const requestId = this.createRequestId();
|
|
1330
|
+
const message = SessionInboundMessageSchema.parse({
|
|
1331
|
+
type: "list_background_tasks_request",
|
|
1332
|
+
...(agentId === undefined ? {} : { agentId }),
|
|
1333
|
+
requestId,
|
|
1334
|
+
});
|
|
1335
|
+
const result = await this.sendCorrelatedRequest({
|
|
1336
|
+
requestId,
|
|
1337
|
+
message,
|
|
1338
|
+
responseType: "list_background_tasks_response",
|
|
1339
|
+
options: { skipQueue: true },
|
|
1340
|
+
});
|
|
1341
|
+
return result.tasks;
|
|
1342
|
+
}
|
|
1343
|
+
/**
|
|
1344
|
+
* Read a background shell's captured output. Resolves with `text: null` when
|
|
1345
|
+
* the daemon does not know the shell or it captured nothing. The daemon tails
|
|
1346
|
+
* and redacts before sending.
|
|
1347
|
+
*/
|
|
1348
|
+
async readBackgroundTaskOutput(agentId, taskId, options) {
|
|
1349
|
+
const requestId = this.createRequestId();
|
|
1350
|
+
const message = SessionInboundMessageSchema.parse({
|
|
1351
|
+
type: "background_task_output_request",
|
|
1352
|
+
agentId,
|
|
1353
|
+
taskId,
|
|
1354
|
+
...(options?.maxBytes === undefined ? {} : { maxBytes: options.maxBytes }),
|
|
1355
|
+
requestId,
|
|
1356
|
+
});
|
|
1357
|
+
const result = await this.sendCorrelatedRequest({
|
|
1358
|
+
requestId,
|
|
1359
|
+
message,
|
|
1360
|
+
responseType: "background_task_output_response",
|
|
1361
|
+
options: { skipQueue: true },
|
|
1362
|
+
});
|
|
1363
|
+
return { text: result.text, truncated: result.truncated, byteSize: result.byteSize };
|
|
1364
|
+
}
|
|
1322
1365
|
async dismissBackgroundTask(agentId, taskId) {
|
|
1323
1366
|
const requestId = this.createRequestId();
|
|
1324
1367
|
const message = SessionInboundMessageSchema.parse({
|
|
@@ -3141,6 +3184,20 @@ export class DaemonClient {
|
|
|
3141
3184
|
});
|
|
3142
3185
|
return normalizeProvidersSnapshotPayload(payload);
|
|
3143
3186
|
}
|
|
3187
|
+
/**
|
|
3188
|
+
* Re-read `agents.providers` from the daemon's config.json into its live
|
|
3189
|
+
* provider registry. No restart. Returns the add/update/remove diff.
|
|
3190
|
+
*/
|
|
3191
|
+
async reloadProviderConfig(options) {
|
|
3192
|
+
return this.sendCorrelatedSessionRequest({
|
|
3193
|
+
requestId: options?.requestId,
|
|
3194
|
+
message: {
|
|
3195
|
+
type: "providers.reload_config.request",
|
|
3196
|
+
},
|
|
3197
|
+
responseType: "providers.reload_config.response",
|
|
3198
|
+
timeout: 15000,
|
|
3199
|
+
});
|
|
3200
|
+
}
|
|
3144
3201
|
async getDaemonConfig(requestId) {
|
|
3145
3202
|
return this.sendCorrelatedSessionRequest({
|
|
3146
3203
|
requestId,
|
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 } from "@hyperdrive.bot/paseo-protocol/messages";
|
|
1
|
+
import type { AgentSnapshotPayload, CreateAgentRequestMessage, FetchWorkspacesRequestMessage, FetchWorkspacesResponseMessage, GetProvidersSnapshotResponseMessage, ListAvailableProvidersResponse, ListProviderFeaturesRequestMessage, ListProviderFeaturesResponseMessage, ListProviderModelsResponseMessage, ListProviderModesResponseMessage, MutableDaemonConfig, MutableDaemonConfigPatch, ProviderDiagnosticResponseMessage, ProjectPlacementPayload, RefreshProvidersSnapshotResponseMessage, SendAgentMessageRequest, ProvidersReloadConfigPayload, SessionOutboundMessage, WorkspaceDescriptorPayload } from "@hyperdrive.bot/paseo-protocol/messages";
|
|
2
2
|
import { DaemonClient } from "./daemon-client.js";
|
|
3
3
|
import type { FetchAgentTimelineCursor, FetchAgentTimelineDirection, FetchAgentTimelinePayload, FetchAgentTimelineProjection } from "./daemon-client.js";
|
|
4
4
|
export { DaemonClient };
|
|
@@ -241,6 +241,15 @@ export interface PaseoProviderActions {
|
|
|
241
241
|
}): Promise<PaseoProviderAvailabilityResult>;
|
|
242
242
|
snapshot(options?: PaseoProviderListOptions): Promise<PaseoProviderSnapshotResult>;
|
|
243
243
|
refresh(options?: PaseoProviderRefreshOptions): Promise<PaseoProviderRefreshResult>;
|
|
244
|
+
/**
|
|
245
|
+
* Re-read `agents.providers` from the daemon's config.json into its live
|
|
246
|
+
* registry — add, update, AND remove — without restarting the daemon.
|
|
247
|
+
* Distinct from {@link refresh}, which only re-probes availability of the
|
|
248
|
+
* providers the daemon already knows about.
|
|
249
|
+
*/
|
|
250
|
+
reloadConfig(options?: {
|
|
251
|
+
requestId?: string;
|
|
252
|
+
}): Promise<ProvidersReloadConfigPayload>;
|
|
244
253
|
diagnostic(provider: PaseoAgentProvider, options?: {
|
|
245
254
|
requestId?: string;
|
|
246
255
|
}): Promise<PaseoProviderDiagnosticResult>;
|
package/dist/index.js
CHANGED
|
@@ -42,6 +42,10 @@ export function createPaseoClient(config) {
|
|
|
42
42
|
listAvailable: (options) => daemonClient.listAvailableProviders(options),
|
|
43
43
|
snapshot: (options) => daemonClient.getProvidersSnapshot(options),
|
|
44
44
|
refresh: (options) => daemonClient.refreshProvidersSnapshot(options),
|
|
45
|
+
// Re-read agents.providers from the daemon's config.json (add/update/remove).
|
|
46
|
+
// Distinct from `refresh`, which only re-probes availability of the
|
|
47
|
+
// providers the daemon already knows about.
|
|
48
|
+
reloadConfig: (options) => daemonClient.reloadProviderConfig(options),
|
|
45
49
|
diagnostic: (provider, options) => daemonClient.getProviderDiagnostic(provider, options),
|
|
46
50
|
subscribe: (handler) => daemonClient.on("providers_snapshot_update", (message) => {
|
|
47
51
|
handler(message.payload);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperdrive.bot/paseo-client",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.35",
|
|
4
4
|
"description": "Paseo client SDK package",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"test": "vitest run"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@hyperdrive.bot/paseo-protocol": "0.3.
|
|
39
|
-
"@hyperdrive.bot/paseo-relay": "0.3.
|
|
38
|
+
"@hyperdrive.bot/paseo-protocol": "0.3.35",
|
|
39
|
+
"@hyperdrive.bot/paseo-relay": "0.3.35",
|
|
40
40
|
"zod": "^4.4.3"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|