@pstdio/sdk 0.25.0 → 0.35.0
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/README.md +29 -0
- package/dist/api/index.js +209 -3
- package/dist/api.d.ts +15 -3787
- package/dist/client/index.js +21 -5
- package/dist/client.d.ts +3 -1728
- package/dist/data.d.ts +27 -49
- package/dist/extensions/index.js +194 -2
- package/dist/extensions-react.d.ts +18 -23
- package/dist/extensions.d.ts +3 -3940
- package/dist/hooks.d.ts +95 -1789
- package/dist/index-Cm5A8d4m.d.ts +261 -0
- package/dist/index-iez3LrOK.d.ts +7 -0
- package/dist/index-x7CdJPRb.d.ts +7965 -0
- package/dist/prompts.d.ts +4 -3
- package/dist/resources/index.js +209 -3
- package/dist/resources.d.ts +4 -426
- package/dist/sessions-DcxmP7uF.d.ts +2 -0
- package/dist/skills-DcxmP7uF.d.ts +2 -0
- package/dist/testing/index.js +15 -2
- package/dist/testing.d.ts +27 -921
- package/package.json +1 -1
package/dist/client/index.js
CHANGED
|
@@ -46,6 +46,12 @@ var createExtensionClient = (request) => ({
|
|
|
46
46
|
})
|
|
47
47
|
});
|
|
48
48
|
|
|
49
|
+
// src/client/filesystem.ts
|
|
50
|
+
var createFilesystemClient = (request) => ({
|
|
51
|
+
list: (path) => request(`/v1/filesystem/list${path ? `?path=${encodeURIComponent(path)}` : ""}`),
|
|
52
|
+
createDirectory: (input) => request("/v1/filesystem/directories", { method: "POST", body: input })
|
|
53
|
+
});
|
|
54
|
+
|
|
49
55
|
// src/client/notifications.ts
|
|
50
56
|
var appendArrayOrValue = (params, key, value) => {
|
|
51
57
|
if (value === undefined)
|
|
@@ -319,6 +325,14 @@ var dispatchSessionStreamEvent = (event, handlers) => {
|
|
|
319
325
|
handlers.onApprovalRequest?.(parseEventData(event.data));
|
|
320
326
|
return;
|
|
321
327
|
}
|
|
328
|
+
if (event.event === "history_issue") {
|
|
329
|
+
handlers.onHistoryIssue?.(parseEventData(event.data));
|
|
330
|
+
return;
|
|
331
|
+
}
|
|
332
|
+
if (event.event === "queued_messages") {
|
|
333
|
+
handlers.onQueuedMessages?.(parseEventData(event.data));
|
|
334
|
+
return;
|
|
335
|
+
}
|
|
322
336
|
if (event.event === "end") {
|
|
323
337
|
handlers.onEnd?.(parseEventData(event.data));
|
|
324
338
|
}
|
|
@@ -356,7 +370,7 @@ var createSessionClient = (request, clientOptions) => ({
|
|
|
356
370
|
archive: (sessionId) => request(`/v1/sessions/${sessionId}/archive`, { method: "POST" }),
|
|
357
371
|
followUp: (sessionId, input) => request(`/v1/sessions/${sessionId}/follow-up`, { method: "POST", body: input }),
|
|
358
372
|
approve: (sessionId, input) => request(`/v1/sessions/${sessionId}/approve`, { method: "POST", body: input }),
|
|
359
|
-
getConversation: (sessionId) => request(`/v1/sessions/${sessionId}/conversation
|
|
373
|
+
getConversation: (sessionId, signal) => request(`/v1/sessions/${sessionId}/conversation`, { signal }),
|
|
360
374
|
resolveSessionId: (input) => request("/v1/sessions/resolve-session-id", { method: "POST", body: input }),
|
|
361
375
|
updateStatus: (sessionId, status) => request(`/v1/sessions/${sessionId}/status`, { method: "PATCH", body: { status } }),
|
|
362
376
|
stream: (sessionId, onEvent, options = {}) => streamSessionEvents(clientOptions, buildSessionStreamPath(sessionId), onEvent, options),
|
|
@@ -529,7 +543,8 @@ var createSyncClient = (clientOptions) => ({
|
|
|
529
543
|
|
|
530
544
|
// src/client/workspaces.ts
|
|
531
545
|
var createWorkspaceClient = (request) => ({
|
|
532
|
-
|
|
546
|
+
listProviders: (projectId) => request(`/v1/projects/${encodeURIComponent(projectId)}/workspace-providers`),
|
|
547
|
+
listFiles: (workspaceId, input = {}, options) => {
|
|
533
548
|
const params = new URLSearchParams;
|
|
534
549
|
if (input.path !== undefined)
|
|
535
550
|
params.append("path", input.path);
|
|
@@ -538,11 +553,11 @@ var createWorkspaceClient = (request) => ({
|
|
|
538
553
|
if (input.limit !== undefined)
|
|
539
554
|
params.append("limit", String(input.limit));
|
|
540
555
|
const query = params.toString();
|
|
541
|
-
return request(`/v1/workspaces/${encodeURIComponent(workspaceId)}/files${query ? `?${query}` : ""}
|
|
556
|
+
return request(`/v1/workspaces/${encodeURIComponent(workspaceId)}/files${query ? `?${query}` : ""}`, options);
|
|
542
557
|
},
|
|
543
|
-
readFile: (workspaceId, path) => {
|
|
558
|
+
readFile: (workspaceId, path, options) => {
|
|
544
559
|
const params = new URLSearchParams({ path });
|
|
545
|
-
return request(`/v1/workspaces/${encodeURIComponent(workspaceId)}/file?${params.toString()}
|
|
560
|
+
return request(`/v1/workspaces/${encodeURIComponent(workspaceId)}/file?${params.toString()}`, options);
|
|
546
561
|
},
|
|
547
562
|
createDirectory: (workspaceId, path) => {
|
|
548
563
|
const params = new URLSearchParams({ path });
|
|
@@ -606,6 +621,7 @@ var createClient = (options = {}) => {
|
|
|
606
621
|
const request = createRequest(options);
|
|
607
622
|
return {
|
|
608
623
|
projects: createProjectClient(request),
|
|
624
|
+
filesystem: createFilesystemClient(request),
|
|
609
625
|
workspaces: createWorkspaceClient(request),
|
|
610
626
|
sessions: createSessionClient(request, options),
|
|
611
627
|
skills: createSkillClient(request),
|