@pstdio/sdk 0.9.0 → 0.10.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 CHANGED
@@ -26,6 +26,7 @@ bun add @pstdio/sdk
26
26
  | `@pstdio/sdk/resources` | Shared resource/entity types |
27
27
  | `@pstdio/sdk/prompts` | Prompt rendering helpers |
28
28
  | `@pstdio/sdk/extensions` | Extension authoring types |
29
+ | `@pstdio/sdk/hooks` | Hook context and client types |
29
30
 
30
31
  Example:
31
32
 
@@ -35,6 +36,7 @@ import type { CreateTicketInput } from "@pstdio/sdk/api";
35
36
  import type { TicketDetail } from "@pstdio/sdk/resources";
36
37
  import { renderPrompt } from "@pstdio/sdk/prompts";
37
38
  import type { ExtensionDefinition } from "@pstdio/sdk/extensions";
39
+ import type { WorktreeCreateContext } from "@pstdio/sdk/hooks";
38
40
  ```
39
41
 
40
42
  ## HTTP Client
@@ -177,6 +179,18 @@ const extension: ExtensionDefinition = {
177
179
  export default extension;
178
180
  ```
179
181
 
182
+ ## Hook Types
183
+
184
+ `@pstdio/sdk/hooks` exposes the shared context types used by hook runtimes and hook handlers.
185
+
186
+ ```ts
187
+ import type {
188
+ CommitContext,
189
+ RebaseContext,
190
+ WorktreeRemoveContext,
191
+ } from "@pstdio/sdk/hooks";
192
+ ```
193
+
180
194
  ## Package Development
181
195
 
182
196
  From the repo root:
@@ -148,8 +148,8 @@ var WEBVIEW_HOST_CAPABILITIES = [
148
148
  ];
149
149
  // src/extensions/workbench-targets.ts
150
150
  var workbenchMenuTargets = [
151
- "workbench.top.actions",
152
- "workbench.top.overflow",
151
+ "workbench.nav.actions",
152
+ "workbench.nav.overflow",
153
153
  "workbench.commandPalette"
154
154
  ];
155
155
  var workbenchTreeTargets = [
@@ -161,7 +161,7 @@ var workbenchViewTargets = [
161
161
  "workbench.main",
162
162
  "workbench.main.left",
163
163
  "workbench.main.right",
164
- "workbench.main.bottom"
164
+ "workbench.secondary"
165
165
  ];
166
166
  var workbenchSettingsTargets = ["workbench.settings"];
167
167
  var workbenchSettingsScopes = ["project", "global"];
@@ -170,20 +170,20 @@ var workbenchModeLayoutTargets = [
170
170
  "workbench.main.left",
171
171
  "workbench.main",
172
172
  "workbench.main.right",
173
- "workbench.main.bottom"
173
+ "workbench.secondary"
174
174
  ];
175
175
  var workbenchTargets = [
176
176
  {
177
- id: "workbench.top.actions",
177
+ id: "workbench.nav.actions",
178
178
  allowedKinds: ["menu"],
179
179
  granularity: "surface",
180
- rationale: "Primary command surface in the host-owned top workbench chrome."
180
+ rationale: "Primary command surface in the host-owned nav (top) workbench chrome."
181
181
  },
182
182
  {
183
- id: "workbench.top.overflow",
183
+ id: "workbench.nav.overflow",
184
184
  allowedKinds: ["menu"],
185
185
  granularity: "surface",
186
- rationale: "Secondary command surface in the host-owned top workbench chrome."
186
+ rationale: "Secondary command surface in the host-owned nav (top) workbench chrome."
187
187
  },
188
188
  {
189
189
  id: "workbench.commandPalette",
@@ -228,10 +228,10 @@ var workbenchTargets = [
228
228
  rationale: "Direct extension view placement in the main-right area."
229
229
  },
230
230
  {
231
- id: "workbench.main.bottom",
231
+ id: "workbench.secondary",
232
232
  allowedKinds: ["view"],
233
233
  granularity: "area",
234
- rationale: "Direct extension view placement in the main-bottom area."
234
+ rationale: "Direct extension view placement in the secondary area."
235
235
  },
236
236
  {
237
237
  id: "workbench.settings",
@@ -1,9 +1,9 @@
1
- export declare const workbenchMenuTargets: readonly ["workbench.top.actions", "workbench.top.overflow", "workbench.commandPalette"];
1
+ export declare const workbenchMenuTargets: readonly ["workbench.nav.actions", "workbench.nav.overflow", "workbench.commandPalette"];
2
2
  export declare const workbenchTreeTargets: readonly ["workbench.left.tree", "workbench.main.left.tree", "workbench.main.right.tree"];
3
- export declare const workbenchViewTargets: readonly ["workbench.main", "workbench.main.left", "workbench.main.right", "workbench.main.bottom"];
3
+ export declare const workbenchViewTargets: readonly ["workbench.main", "workbench.main.left", "workbench.main.right", "workbench.secondary"];
4
4
  export declare const workbenchSettingsTargets: readonly ["workbench.settings"];
5
5
  export declare const workbenchSettingsScopes: readonly ["project", "global"];
6
- export declare const workbenchModeLayoutTargets: readonly ["workbench.left", "workbench.main.left", "workbench.main", "workbench.main.right", "workbench.main.bottom"];
6
+ export declare const workbenchModeLayoutTargets: readonly ["workbench.left", "workbench.main.left", "workbench.main", "workbench.main.right", "workbench.secondary"];
7
7
  export type WorkbenchMenuTarget = (typeof workbenchMenuTargets)[number];
8
8
  export type WorkbenchTreeTarget = (typeof workbenchTreeTargets)[number];
9
9
  export type WorkbenchViewTarget = (typeof workbenchViewTargets)[number];
@@ -21,15 +21,15 @@ export interface WorkbenchTargetDefinition {
21
21
  rationale: string;
22
22
  }
23
23
  export declare const workbenchTargets: readonly [{
24
- readonly id: "workbench.top.actions";
24
+ readonly id: "workbench.nav.actions";
25
25
  readonly allowedKinds: readonly ["menu"];
26
26
  readonly granularity: "surface";
27
- readonly rationale: "Primary command surface in the host-owned top workbench chrome.";
27
+ readonly rationale: "Primary command surface in the host-owned nav (top) workbench chrome.";
28
28
  }, {
29
- readonly id: "workbench.top.overflow";
29
+ readonly id: "workbench.nav.overflow";
30
30
  readonly allowedKinds: readonly ["menu"];
31
31
  readonly granularity: "surface";
32
- readonly rationale: "Secondary command surface in the host-owned top workbench chrome.";
32
+ readonly rationale: "Secondary command surface in the host-owned nav (top) workbench chrome.";
33
33
  }, {
34
34
  readonly id: "workbench.commandPalette";
35
35
  readonly allowedKinds: readonly ["menu"];
@@ -66,10 +66,10 @@ export declare const workbenchTargets: readonly [{
66
66
  readonly granularity: "area";
67
67
  readonly rationale: "Direct extension view placement in the main-right area.";
68
68
  }, {
69
- readonly id: "workbench.main.bottom";
69
+ readonly id: "workbench.secondary";
70
70
  readonly allowedKinds: readonly ["view"];
71
71
  readonly granularity: "area";
72
- readonly rationale: "Direct extension view placement in the main-bottom area.";
72
+ readonly rationale: "Direct extension view placement in the secondary area.";
73
73
  }, {
74
74
  readonly id: "workbench.settings";
75
75
  readonly allowedKinds: readonly ["settings"];
@@ -77,15 +77,15 @@ export declare const workbenchTargets: readonly [{
77
77
  readonly rationale: "Settings panel placement in host-owned settings navigation.";
78
78
  }];
79
79
  export declare const getWorkbenchTargetDefinition: (id: string) => {
80
- readonly id: "workbench.top.actions";
80
+ readonly id: "workbench.nav.actions";
81
81
  readonly allowedKinds: readonly ["menu"];
82
82
  readonly granularity: "surface";
83
- readonly rationale: "Primary command surface in the host-owned top workbench chrome.";
83
+ readonly rationale: "Primary command surface in the host-owned nav (top) workbench chrome.";
84
84
  } | {
85
- readonly id: "workbench.top.overflow";
85
+ readonly id: "workbench.nav.overflow";
86
86
  readonly allowedKinds: readonly ["menu"];
87
87
  readonly granularity: "surface";
88
- readonly rationale: "Secondary command surface in the host-owned top workbench chrome.";
88
+ readonly rationale: "Secondary command surface in the host-owned nav (top) workbench chrome.";
89
89
  } | {
90
90
  readonly id: "workbench.commandPalette";
91
91
  readonly allowedKinds: readonly ["menu"];
@@ -122,10 +122,10 @@ export declare const getWorkbenchTargetDefinition: (id: string) => {
122
122
  readonly granularity: "area";
123
123
  readonly rationale: "Direct extension view placement in the main-right area.";
124
124
  } | {
125
- readonly id: "workbench.main.bottom";
125
+ readonly id: "workbench.secondary";
126
126
  readonly allowedKinds: readonly ["view"];
127
127
  readonly granularity: "area";
128
- readonly rationale: "Direct extension view placement in the main-bottom area.";
128
+ readonly rationale: "Direct extension view placement in the secondary area.";
129
129
  } | {
130
130
  readonly id: "workbench.settings";
131
131
  readonly allowedKinds: readonly ["settings"];
@@ -2,4 +2,4 @@ export type { AttemptStatusChangeContext } from "./attempt";
2
2
  export type { BaseHookContext, HookClient, HookPayload, SessionFollowupInput } from "./base";
3
3
  export type { SessionHookContext } from "./session";
4
4
  export type { TicketContext, TicketCreationContext, TicketStatusChangeContext } from "./ticket";
5
- export type { WorktreeContext, WorktreeCreateContext } from "./worktree";
5
+ export type { CommitContext, ConflictContext, MergeContext, RebaseContext, WorktreeContext, WorktreeCreateContext, WorktreeRemoveContext, } from "./worktree";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pstdio/sdk",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/pufflyai/prompt-studio"