@getpaseo/client 0.7.0-beta.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/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { AgentSnapshotPayload, CreateAgentRequestMessage, FetchWorkspacesRequestMessage, FetchWorkspacesResponseMessage, GetProvidersSnapshotResponseMessage, ListAvailableProvidersResponse, ListProviderFeaturesRequestMessage, ListProviderFeaturesResponseMessage, ListProviderModelsResponseMessage, ProjectListRequestMessage, ProjectListResponseMessage, ListProviderModesResponseMessage, MutableDaemonConfig, MutableDaemonConfigPatch, ProviderDiagnosticResponseMessage, ProjectPlacementPayload, WorkspaceProjectDescriptorPayload, 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 = {
@@ -178,6 +178,10 @@ export interface PaseoAgentRunOptions extends PaseoAgentSendOptions {
178
178
  timeoutMs?: number;
179
179
  }
180
180
  export type PaseoAgentRunResult = WaitForFinishResult;
181
+ export interface PaseoAgentCommandsOptions {
182
+ requestId?: string;
183
+ }
184
+ export type PaseoAgentCommandsResult = ListCommandsResponse["payload"];
181
185
  export type PaseoAgentUpdate = Extract<SessionOutboundMessage, {
182
186
  type: "agent_update";
183
187
  }>["payload"];
@@ -200,9 +204,25 @@ export interface PaseoAgentTimelineHandle {
200
204
  }
201
205
  export interface PaseoAgentHandle {
202
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
+ */
203
214
  readonly workspaceId: string | null;
204
215
  readonly cwd: string | null;
205
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;
206
226
  readonly timeline: PaseoAgentTimelineHandle;
207
227
  current(): PaseoAgent | null;
208
228
  refresh(requestId?: string): Promise<PaseoAgentRefetchResult | null>;
@@ -211,6 +231,14 @@ export interface PaseoAgentHandle {
211
231
  run(text: string, options?: PaseoAgentRunOptions): Promise<PaseoAgentRunResult>;
212
232
  /** Waits for the current turn, including one started with `prompt`. */
213
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>;
214
242
  archive(): Promise<{
215
243
  archivedAt: string;
216
244
  }>;
package/dist/index.js CHANGED
@@ -191,6 +191,33 @@ function createAgentHandleFactory(daemonClient) {
191
191
  get status() {
192
192
  return current?.status ?? null;
193
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
+ },
194
221
  current: () => current,
195
222
  refresh: async (requestId) => {
196
223
  const result = await daemonClient.fetchAgent({ agentId: id, requestId });
@@ -216,6 +243,7 @@ function createAgentHandleFactory(daemonClient) {
216
243
  }
217
244
  return result;
218
245
  },
246
+ commands: (options) => daemonClient.listCommands({ agentId: id, ...options }),
219
247
  archive: async () => {
220
248
  const result = await daemonClient.archiveAgent(id);
221
249
  if (current) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getpaseo/client",
3
- "version": "0.7.0-beta.1",
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.7.0-beta.1",
43
- "@getpaseo/relay": "0.7.0-beta.1",
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": {