@pstdio/sdk 0.9.0 → 0.11.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.
Files changed (43) hide show
  1. package/README.md +15 -4
  2. package/dist/api/extensions.d.ts +1 -1
  3. package/dist/api/index.d.ts +2 -5
  4. package/dist/api/workspaces.d.ts +2 -6
  5. package/dist/client/client.d.ts +0 -9
  6. package/dist/client/index.d.ts +0 -3
  7. package/dist/client/index.js +16 -110
  8. package/dist/client/projects.d.ts +2 -2
  9. package/dist/client/workspaces.d.ts +2 -4
  10. package/dist/extensions/command-outcome.d.ts +5 -0
  11. package/dist/extensions/define-extension-view.d.ts +25 -0
  12. package/dist/extensions/index.d.ts +6 -3
  13. package/dist/extensions/index.js +98 -43
  14. package/dist/extensions/kernel-slots.d.ts +7 -63
  15. package/dist/extensions/l10n.d.ts +10 -0
  16. package/dist/extensions/params.d.ts +2 -1
  17. package/dist/extensions/types/context.d.ts +51 -189
  18. package/dist/extensions/types/contributions.d.ts +133 -34
  19. package/dist/extensions/types/extension.d.ts +15 -6
  20. package/dist/extensions/types/index.d.ts +1 -0
  21. package/dist/extensions/types/params.d.ts +5 -2
  22. package/dist/extensions/types/tree-renderer.d.ts +89 -0
  23. package/dist/extensions/types/webview-capabilities.d.ts +30 -2
  24. package/dist/extensions/when.d.ts +9 -0
  25. package/dist/extensions/workbench-targets.d.ts +15 -25
  26. package/dist/hooks/entities.d.ts +7 -9
  27. package/dist/hooks/index.d.ts +1 -3
  28. package/dist/hooks/session.d.ts +2 -3
  29. package/dist/hooks/worktree.d.ts +4 -3
  30. package/dist/resources/index.d.ts +0 -3
  31. package/dist/resources/workspace.d.ts +0 -1
  32. package/package.json +1 -1
  33. package/dist/api/statuses.d.ts +0 -2
  34. package/dist/api/tags.d.ts +0 -2
  35. package/dist/api/tickets.d.ts +0 -26
  36. package/dist/client/statuses.d.ts +0 -24
  37. package/dist/client/tags.d.ts +0 -15
  38. package/dist/client/tickets.d.ts +0 -24
  39. package/dist/hooks/attempt.d.ts +0 -16
  40. package/dist/hooks/ticket.d.ts +0 -26
  41. package/dist/resources/status.d.ts +0 -2
  42. package/dist/resources/tag.d.ts +0 -2
  43. package/dist/resources/ticket.d.ts +0 -2
@@ -1,10 +1,8 @@
1
- import type { Ticket, Workspace } from "../resources";
2
- /** @deprecated Legacy core ticket hook entity. Ticket data is owned by the pstdio tickets extension. */
3
- export type HookTicket = Ticket & {
4
- status_name: string | null;
5
- };
6
- export type HookWorkspace = Workspace & {
7
- /** @deprecated Legacy ticket-workspace linkage. Ticket data is owned by the pstdio tickets extension. */
8
- ticket_shorthand: string;
9
- attempt_status_name: string | null;
1
+ import type { Workspace } from "../resources";
2
+ export type HookResourceAnchor = {
3
+ type: string;
4
+ id: string;
5
+ label?: string;
6
+ metadata?: Record<string, unknown>;
10
7
  };
8
+ export type HookWorkspace = Workspace;
@@ -1,5 +1,3 @@
1
- export type { AttemptStatusChangeContext } from "./attempt";
2
1
  export type { BaseHookContext, HookClient, HookPayload, SessionFollowupInput } from "./base";
3
2
  export type { SessionHookContext } from "./session";
4
- export type { TicketContext, TicketCreationContext, TicketStatusChangeContext } from "./ticket";
5
- export type { WorktreeContext, WorktreeCreateContext } from "./worktree";
3
+ export type { CommitContext, ConflictContext, MergeContext, RebaseContext, WorktreeContext, WorktreeCreateContext, WorktreeRemoveContext, } from "./worktree";
@@ -1,5 +1,5 @@
1
1
  import type { BaseHookContext } from "./base";
2
- import type { HookTicket, HookWorkspace } from "./entities";
2
+ import type { HookResourceAnchor, HookWorkspace } from "./entities";
3
3
  export type SessionHookContext = BaseHookContext & {
4
4
  sessionId: string;
5
5
  sessionStatus: "in_progress" | "awaiting_input" | "queued" | "completed" | "failed" | "cancelled" | "disconnected";
@@ -8,6 +8,5 @@ export type SessionHookContext = BaseHookContext & {
8
8
  workspaceId?: string;
9
9
  worktreePath?: string;
10
10
  branch?: string;
11
- ticket?: HookTicket;
12
- attemptStatus?: string;
11
+ anchors?: HookResourceAnchor[];
13
12
  };
@@ -1,11 +1,12 @@
1
1
  import type { BaseHookContext } from "./base";
2
+ import type { HookResourceAnchor } from "./entities";
2
3
  export type WorktreeCreateContext = BaseHookContext & {
3
4
  repoPath: string;
4
5
  worktreePath: string;
5
6
  branch: string;
6
7
  workspace: string;
7
- ticket: string;
8
8
  base: string;
9
+ anchors?: HookResourceAnchor[];
9
10
  };
10
11
  export type WorktreeContext = BaseHookContext & {
11
12
  repoPath: string;
@@ -13,7 +14,7 @@ export type WorktreeContext = BaseHookContext & {
13
14
  branch: string;
14
15
  workspace: string;
15
16
  workspaceId: string;
16
- ticket: string;
17
+ anchors?: HookResourceAnchor[];
17
18
  };
18
19
  export type CommitContext = {
19
20
  repoPath: string;
@@ -47,6 +48,6 @@ export type WorktreeRemoveContext = {
47
48
  branch: string;
48
49
  workspace: string;
49
50
  workspaceId: string;
50
- ticket: string | null;
51
+ anchors?: HookResourceAnchor[];
51
52
  projectId: string;
52
53
  };
@@ -7,8 +7,5 @@ export type { Project } from "./project";
7
7
  export type { Session, SessionStatus } from "./session";
8
8
  export type { Settings } from "./settings";
9
9
  export type { Skill, SkillFile, SkillWithContent } from "./skill";
10
- export type { AttemptStatus, Status } from "./status";
11
- export type { Tag, TagOption } from "./tag";
12
10
  export type { Template, TemplateType, TemplateWithContent } from "./template";
13
- export type { Ticket, TicketDetail, TicketFile, TicketListItem } from "./ticket";
14
11
  export type { Workspace, WorkspaceListItem } from "./workspace";
@@ -1,4 +1,3 @@
1
1
  import type { Workspace as ContractWorkspace, WorkspaceListItem as ContractWorkspaceListItem } from "pstdio-api-contracts";
2
2
  export type Workspace = ContractWorkspace;
3
- /** @deprecated Includes legacy ticket-workspace linkage. Ticket ownership is moving to the pstdio tickets extension. */
4
3
  export type WorkspaceListItem = ContractWorkspaceListItem;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pstdio/sdk",
3
- "version": "0.9.0",
3
+ "version": "0.11.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/pufflyai/prompt-studio"
@@ -1,2 +0,0 @@
1
- /** @deprecated Legacy core ticket status API. Ticket statuses are owned by the pstdio tickets extension. */
2
- export type { CreateAttemptStatusInput, CreateStatusInput } from "pstdio-api-contracts";
@@ -1,2 +0,0 @@
1
- /** @deprecated Legacy core ticket tag API. Ticket tags are owned by the pstdio tickets extension. */
2
- export type { CreateTagInput, CreateTagOptionInput, UpdateTagInput, UpdateTagOptionInput, } from "pstdio-api-contracts";
@@ -1,26 +0,0 @@
1
- /** @deprecated Legacy core ticket API. Ticket data is owned by the pstdio tickets extension. */
2
- export type { CreateTicketAttemptInput, CreateTicketInput, ListProjectActivityForTicketsInput, ListTicketActivityInput, ListTicketActivityResponse, TicketAttemptMode, UpdateTicketInput, UpdateWhenAttemptStatusInput, UpdateWhenAttemptStatusResponse, UploadTicketFileInput, } from "pstdio-api-contracts";
3
- import type { Ticket, Workspace } from "../resources";
4
- /** @deprecated Legacy core ticket API. Ticket data is owned by the pstdio tickets extension. */
5
- export type ListTicketsInput = {
6
- status?: string;
7
- tag?: string | string[];
8
- archived?: boolean;
9
- draft?: boolean;
10
- parent_id?: string;
11
- shorthand?: string;
12
- search?: string;
13
- };
14
- /** @deprecated Legacy core ticket attempts. Ticket attempts are owned by the pstdio tickets extension. */
15
- export type TicketAttemptResponse = {
16
- mode: "worktree" | "current_branch";
17
- ticket: Ticket;
18
- workspace: Workspace;
19
- session: {
20
- id: string;
21
- workspace_id: string;
22
- title: string;
23
- created_at: string;
24
- updated_at: string;
25
- } | null;
26
- };
@@ -1,24 +0,0 @@
1
- import type { AttemptStatus, CreateAttemptStatusInput, CreateStatusInput } from "pstdio-api-contracts";
2
- import type { Status } from "../resources";
3
- import type { RequestFn } from "./request";
4
- /** @deprecated Legacy core ticket status client. Ticket statuses are owned by the pstdio tickets extension. */
5
- export type StatusClient = {
6
- list(projectId: string): Promise<Status[]>;
7
- create(projectId: string, input: CreateStatusInput): Promise<Status>;
8
- update(projectId: string, statusId: string, input: {
9
- color?: string;
10
- }): Promise<Status>;
11
- setDefault(projectId: string, statusId: string): Promise<void>;
12
- delete(projectId: string, statusId: string): Promise<void>;
13
- listAttemptStatuses(projectId: string): Promise<AttemptStatus[]>;
14
- createAttemptStatus(projectId: string, input: CreateAttemptStatusInput): Promise<AttemptStatus>;
15
- updateAttemptStatus(projectId: string, statusId: string, input: {
16
- name?: string;
17
- color?: string;
18
- sort_order?: number;
19
- is_default?: boolean;
20
- }): Promise<AttemptStatus>;
21
- deleteAttemptStatus(projectId: string, statusId: string): Promise<void>;
22
- };
23
- /** @deprecated Legacy core ticket status client. Ticket statuses are owned by the pstdio tickets extension. */
24
- export declare const createStatusClient: (request: RequestFn) => StatusClient;
@@ -1,15 +0,0 @@
1
- import type { CreateTagInput, CreateTagOptionInput, UpdateTagInput, UpdateTagOptionInput } from "../api/tags";
2
- import type { Tag, TagOption } from "../resources";
3
- import type { RequestFn } from "./request";
4
- /** @deprecated Legacy core ticket tag client. Ticket tags are owned by the pstdio tickets extension. */
5
- export type TagClient = {
6
- list(projectId: string): Promise<Tag[]>;
7
- create(projectId: string, input: CreateTagInput): Promise<Tag>;
8
- update(projectId: string, tagId: string, input: UpdateTagInput): Promise<Tag>;
9
- delete(projectId: string, tagId: string): Promise<void>;
10
- createOption(projectId: string, tagId: string, input: CreateTagOptionInput): Promise<TagOption>;
11
- updateOption(projectId: string, tagId: string, optionId: string, input: UpdateTagOptionInput): Promise<TagOption>;
12
- deleteOption(projectId: string, tagId: string, optionId: string): Promise<void>;
13
- };
14
- /** @deprecated Legacy core ticket tag client. Ticket tags are owned by the pstdio tickets extension. */
15
- export declare const createTagClient: (request: RequestFn) => TagClient;
@@ -1,24 +0,0 @@
1
- import type { CreateTicketAttemptInput, CreateTicketInput, ListProjectActivityForTicketsInput, ListTicketActivityInput, ListTicketActivityResponse, ListTicketsInput, TicketAttemptResponse, UpdateTicketInput, UpdateWhenAttemptStatusInput, UpdateWhenAttemptStatusResponse, UploadTicketFileInput } from "../api/tickets";
2
- import type { Ticket, TicketDetail, TicketFile, TicketListItem } from "../resources";
3
- import { type ClientOptions, type RequestFn } from "./request";
4
- /** @deprecated Legacy core ticket client. Ticket data is owned by the pstdio tickets extension. */
5
- export type TicketClient = {
6
- list(projectId: string, input?: ListTicketsInput): Promise<TicketListItem[]>;
7
- get(ticketId: string): Promise<TicketDetail>;
8
- create(input: CreateTicketInput): Promise<Ticket>;
9
- update(ticketId: string, input: UpdateTicketInput): Promise<Ticket>;
10
- delete(ticketId: string): Promise<void>;
11
- createAttempt(ticketId: string, input: CreateTicketAttemptInput): Promise<TicketAttemptResponse>;
12
- listActivity(ticketId: string, input?: ListTicketActivityInput): Promise<ListTicketActivityResponse>;
13
- listProjectActivity(projectId: string, input?: ListProjectActivityForTicketsInput): Promise<ListTicketActivityResponse>;
14
- updateWhenAttemptStatus(ticketId: string, input: UpdateWhenAttemptStatusInput): Promise<UpdateWhenAttemptStatusResponse>;
15
- listFiles(ticketId: string): Promise<TicketFile[]>;
16
- getFileContent(ticketId: string, fileId: string, options?: {
17
- cache?: RequestCache;
18
- signal?: AbortSignal;
19
- }): Promise<Uint8Array>;
20
- uploadFile(ticketId: string, input: UploadTicketFileInput): Promise<TicketFile>;
21
- deleteFile(ticketId: string, fileId: string): Promise<void>;
22
- };
23
- /** @deprecated Legacy core ticket client. Ticket data is owned by the pstdio tickets extension. */
24
- export declare const createTicketClient: (request: RequestFn, options?: ClientOptions) => TicketClient;
@@ -1,16 +0,0 @@
1
- import type { BaseHookContext } from "./base";
2
- import type { HookTicket, HookWorkspace } from "./entities";
3
- /** @deprecated Legacy ticket attempt hook context. Workspace status automation is extension-owned. */
4
- export type AttemptStatusChangeContext = BaseHookContext & {
5
- workspace: HookWorkspace;
6
- workspaceId: string;
7
- prompts: Record<string, string>;
8
- /** @deprecated Legacy ticket linkage. Ticket data is owned by the pstdio tickets extension. */
9
- ticket?: HookTicket;
10
- worktreePath?: string;
11
- branch?: string;
12
- fromStatus: string;
13
- toStatus: string;
14
- sessionId?: string;
15
- originalSessionId?: string;
16
- };
@@ -1,26 +0,0 @@
1
- import type { BaseHookContext } from "./base";
2
- /** @deprecated Legacy core ticket hook context. Ticket lifecycle is owned by the pstdio tickets extension. */
3
- export type TicketContext = BaseHookContext & {
4
- id: string;
5
- shorthand: string;
6
- displayTitle: string | null;
7
- userPrompt: string | null;
8
- parentId: string | null;
9
- draft: boolean;
10
- archived: boolean;
11
- status: string | null;
12
- tagIds: string[];
13
- tagNames: string[];
14
- fileIds: string[];
15
- };
16
- /** @deprecated Legacy core ticket hook context. Ticket lifecycle is owned by the pstdio tickets extension. */
17
- export type TicketCreationContext = Omit<TicketContext, "id" | "shorthand"> & {
18
- id: null;
19
- shorthand: null;
20
- content: string | null;
21
- };
22
- /** @deprecated Legacy core ticket hook context. Ticket lifecycle is owned by the pstdio tickets extension. */
23
- export type TicketStatusChangeContext = TicketContext & {
24
- fromStatus: string | null;
25
- toStatus: string | null;
26
- };
@@ -1,2 +0,0 @@
1
- /** @deprecated Legacy core ticket status resources. Ticket statuses are owned by the pstdio tickets extension. */
2
- export type { AttemptStatus, Status } from "pstdio-api-contracts";
@@ -1,2 +0,0 @@
1
- /** @deprecated Legacy core ticket tag resources. Ticket tags are owned by the pstdio tickets extension. */
2
- export type { Tag, TagOption } from "pstdio-api-contracts";
@@ -1,2 +0,0 @@
1
- /** @deprecated Legacy core ticket resources. Ticket data is owned by the pstdio tickets extension. */
2
- export type { FileRecord as TicketFile, Ticket, TicketDetail, TicketListItem } from "pstdio-api-contracts";