Method reference
This page lists the methods of the @pstdio/sdk HTTP client and what the other SDK entry points export.
Import a declared @pstdio/sdk subpath. The package has no root entry point.
The SDK overview lists all entries and their dependency requirements.
HTTP client
import { createClient, PstdioApiError } from "@pstdio/sdk/client";
const client = createClient();
const projects = await client.projects.list();
createClient(options?: ClientOptions) accepts baseUrl, token, and fetch.
Outside the browser, it reads PSTDIO_API_URL and PSTDIO_API_TOKEN when those
options are omitted. The fallback URL is http://127.0.0.1:19840.
createRequest(options: ClientOptions) returns the low-level request function.
HTTP failures throw PstdioApiError, which exposes message and status.
See the request types for request
headers, cancellation, and other options.
The client exposes these groups. Each link contains the current method signatures and request and response types.
| Group | Methods | Contract |
|---|---|---|
views |
boards, board, list, orphaned, get, create, update, delete, reorder, setDefault |
BoardViewsClient |
projects |
list, get, create, attachInitialWorkspace, retrySetup, update, delete, listActivity |
ProjectClient |
filesystem |
list, createDirectory |
FilesystemClient |
workspaces |
listProviders, list, getByShorthand, create, rename, listActivity, listFiles, createDirectory, createFile, readFile, writeFile, moveEntry, deleteEntry, removeWorktree, delete |
WorkspaceClient |
sessions |
list, get, uploadAttachment, deleteAttachment, create, archive, followUp, approve, getConversation, getConversationSources, getHarnessCommands, invokeHarnessOperation, getQueuedMessages, resolveSessionId, updateStatus, listActivity, stream, connectStream |
SessionClient |
skills |
list, get, updatePreferences |
SkillClient |
agents |
info, models |
AgentClient |
extensions |
enableInstalled, listAppearance, listCommands, listProject, upgradeProject, listConnections, configureConnection, checkConnection, deleteConnection, execute, dispatchEvent |
ExtensionClient |
automation |
issueToken, listTokens, revokeToken, createRun, getRun, listRunEvents, cancelRun |
AutomationClient |
notifications |
list, count, get, create, update, markRead, dismiss, markDone, snooze, resolveByDedupeKey |
NotificationsClient |
settings |
get, update |
SettingsClient |
sync |
start |
SyncClient |
runtime |
provisionBrowserSession |
RuntimeClient |
See the client guide for sessions, file attachments,
connections, and remote automation examples. Board views describes the views group.
Planner commands
Tickets, statuses, and tags belong to the Planner extension. Use its commands
through client.extensions.execute, or use the pst tickets CLI aliases.
The installed extension must be enabled in the project.
const response = await client.extensions.execute("pstdio.pstdio-planner.command.list-tickets", {
projectId,
params: { status: "In Progress" },
});
if (response.outcome.status === "success") {
console.log(response.outcome.value);
}
Use client.extensions.listCommands(projectId) to discover command IDs. IDs include
the publisher, extension name, contribution kind, and local ID. Do not construct
them from the package name alone.
Extension authoring
@pstdio/sdk/extensions exports contribution helpers, typed references, command
and renderer contexts, storage contracts, and the webview client. The current host
extension API version is EXTENSION_API_VERSION, such as 0.1.0. engines.pstdio declares caret ranges that include it, such as ^0.1.0. See API versioning.
Use the composition cookbook for definePage,
shared placement items, resource identity, navigation, controls, qualifyRef,
and typed GuestHost.call capabilities. The
React entry provides
useCommandQuery and useCommandMutation for webviews.
Other entries
@pstdio/sdk/apiexports HTTP request and response types.@pstdio/sdk/resourcesexports product resource types.@pstdio/sdk/promptsexportsrenderPrompt(template, data)for Mustache rendering.@pstdio/sdk/hooksexports hook API contracts.@pstdio/sdk/dataexports draft layout, frontmatter, and ID/name resolution helpers. See data exports.@pstdio/sdk/testingexports command contexts and in-memory storage, file, and resource adapters for extension tests. See testing exports.