@pstdio/sdk 0.23.0 → 0.24.1

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.
@@ -932,6 +932,7 @@ export declare interface ExtensionContextBase<TSettings extends Record<string, u
932
932
  repo?: RepoContext;
933
933
  source?: CommandSource;
934
934
  storage: ExtensionStorageApi;
935
+ resources: ExtensionResourcesApi;
935
936
  artifacts: ExtensionArtifactApi;
936
937
  /** Working tree of the invocation's repo, scoped to its root. Absent for non-repo (event/hook) invocations. */
937
938
  repoFiles?: ArtifactMount;
@@ -1062,6 +1063,15 @@ export declare interface ExtensionReposApi {
1062
1063
  }): Promise<string>;
1063
1064
  }
1064
1065
 
1066
+ export declare interface ExtensionResourcesApi {
1067
+ allocate(input: {
1068
+ kind: string;
1069
+ }): Promise<{
1070
+ id: string;
1071
+ shorthand: string;
1072
+ }>;
1073
+ }
1074
+
1065
1075
  export declare interface ExtensionSessionResource {
1066
1076
  type: "session";
1067
1077
  id: string;
@@ -2290,6 +2300,10 @@ export declare const projectEvents: {
2290
2300
  }>;
2291
2301
  };
2292
2302
 
2303
+ export declare const projectPrefix: () => {
2304
+ $prefix: "project";
2305
+ };
2306
+
2293
2307
  export declare const projectSlots: {
2294
2308
  sidenav: SlotRef<object, "panel">;
2295
2309
  headerPrimary: SlotRef<object, "menu">;
@@ -2482,6 +2496,9 @@ export declare function resourceKey(resource: ResourceRef): string;
2482
2496
  export declare function resourceKey(resource: ResourceRef | undefined): string | undefined;
2483
2497
 
2484
2498
  export declare interface ResourceKindDefinition extends ContributionDefinition<"resource-kind"> {
2499
+ readonly prefix?: string | {
2500
+ readonly $prefix: "project";
2501
+ };
2485
2502
  readonly label?: Localizable<string>;
2486
2503
  readonly icon?: string;
2487
2504
  readonly menuSlots?: readonly ResourceMenuSlotDefinition[];
@@ -2524,6 +2541,7 @@ export declare type ResourceParam<TRequired extends boolean | undefined = boolea
2524
2541
  export declare interface ResourceRef {
2525
2542
  type: string;
2526
2543
  id: string;
2544
+ shorthand?: string;
2527
2545
  projectId?: string;
2528
2546
  label?: string;
2529
2547
  icon?: string;
package/dist/hooks.d.ts CHANGED
@@ -155,6 +155,7 @@ declare const commandExecuteRequestSchema: z.ZodObject<{
155
155
  workspaceId: z.ZodOptional<z.ZodString>;
156
156
  params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
157
157
  resource: z.ZodOptional<z.ZodObject<{
158
+ shorthand: z.ZodOptional<z.ZodString>;
158
159
  type: z.ZodString;
159
160
  id: z.ZodString;
160
161
  projectId: z.ZodOptional<z.ZodString>;
@@ -182,6 +183,7 @@ declare const commandExecuteRequestSchema: z.ZodObject<{
182
183
  mode: z.ZodOptional<z.ZodString>;
183
184
  projectId: z.ZodOptional<z.ZodString>;
184
185
  resource: z.ZodOptional<z.ZodObject<{
186
+ shorthand: z.ZodOptional<z.ZodString>;
185
187
  type: z.ZodString;
186
188
  id: z.ZodString;
187
189
  projectId: z.ZodOptional<z.ZodString>;
@@ -324,6 +326,7 @@ declare const createAutomationRunInputSchema: z.ZodObject<{
324
326
  workspaceId: z.ZodOptional<z.ZodString>;
325
327
  params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
326
328
  resource: z.ZodOptional<z.ZodObject<{
329
+ shorthand: z.ZodOptional<z.ZodString>;
327
330
  type: z.ZodString;
328
331
  id: z.ZodString;
329
332
  projectId: z.ZodOptional<z.ZodString>;
@@ -367,6 +370,7 @@ declare const createSessionInputSchema: z.ZodObject<{
367
370
  agent: z.ZodOptional<z.ZodString>;
368
371
  workspace_id: z.ZodOptional<z.ZodString>;
369
372
  anchors: z.ZodOptional<z.ZodArray<z.ZodObject<{
373
+ shorthand: z.ZodOptional<z.ZodString>;
370
374
  type: z.ZodString;
371
375
  id: z.ZodString;
372
376
  projectId: z.ZodOptional<z.ZodString>;
@@ -526,6 +530,7 @@ declare const followUpResponseSchema: z.ZodObject<{
526
530
  cwd: z.ZodNullable<z.ZodString>;
527
531
  params_json: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>>;
528
532
  anchors_json: z.ZodArray<z.ZodObject<{
533
+ shorthand: z.ZodOptional<z.ZodString>;
529
534
  type: z.ZodString;
530
535
  id: z.ZodString;
531
536
  projectId: z.ZodOptional<z.ZodString>;
@@ -1213,6 +1218,7 @@ declare const resolveSessionIdResponseSchema: z.ZodObject<{
1213
1218
  declare interface ResourceRef {
1214
1219
  type: string;
1215
1220
  id: string;
1221
+ shorthand?: string;
1216
1222
  projectId?: string;
1217
1223
  label?: string;
1218
1224
  icon?: string;
@@ -1291,6 +1297,7 @@ declare const sessionConversationResponseSchema: z.ZodObject<{
1291
1297
  cwd: z.ZodNullable<z.ZodString>;
1292
1298
  params_json: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>>;
1293
1299
  anchors_json: z.ZodArray<z.ZodObject<{
1300
+ shorthand: z.ZodOptional<z.ZodString>;
1294
1301
  type: z.ZodString;
1295
1302
  id: z.ZodString;
1296
1303
  projectId: z.ZodOptional<z.ZodString>;
@@ -1342,6 +1349,7 @@ declare const sessionSchema: z.ZodObject<{
1342
1349
  cwd: z.ZodNullable<z.ZodString>;
1343
1350
  params_json: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>>;
1344
1351
  anchors_json: z.ZodArray<z.ZodObject<{
1352
+ shorthand: z.ZodOptional<z.ZodString>;
1345
1353
  type: z.ZodString;
1346
1354
  id: z.ZodString;
1347
1355
  projectId: z.ZodOptional<z.ZodString>;
@@ -1374,6 +1382,7 @@ declare type SettingsClient = {
1374
1382
  };
1375
1383
 
1376
1384
  declare const settingsSchema: z.ZodObject<{
1385
+ notifications_enabled: z.ZodBoolean;
1377
1386
  max_concurrent_sessions: z.ZodNullable<z.ZodNumber>;
1378
1387
  }, z.core.$strip>;
1379
1388
 
@@ -1509,6 +1518,7 @@ declare interface UpdateNotificationInput {
1509
1518
  declare type UpdateSettingsInput = z.infer<typeof updateSettingsInputSchema>;
1510
1519
 
1511
1520
  declare const updateSettingsInputSchema: z.ZodObject<{
1521
+ notifications_enabled: z.ZodOptional<z.ZodBoolean>;
1512
1522
  max_concurrent_sessions: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1513
1523
  }, z.core.$strict>;
1514
1524
 
@@ -1674,6 +1684,7 @@ declare const workspaceListItemSchema: z.ZodObject<{
1674
1684
  workspace_shorthand: z.ZodString;
1675
1685
  startup_log_file_id: z.ZodNullable<z.ZodString>;
1676
1686
  anchors_json: z.ZodArray<z.ZodObject<{
1687
+ shorthand: z.ZodOptional<z.ZodString>;
1677
1688
  type: z.ZodString;
1678
1689
  id: z.ZodString;
1679
1690
  projectId: z.ZodOptional<z.ZodString>;
@@ -1726,6 +1737,7 @@ declare const workspaceSchema: z.ZodObject<{
1726
1737
  workspace_shorthand: z.ZodString;
1727
1738
  startup_log_file_id: z.ZodNullable<z.ZodString>;
1728
1739
  anchors_json: z.ZodArray<z.ZodObject<{
1740
+ shorthand: z.ZodOptional<z.ZodString>;
1729
1741
  type: z.ZodString;
1730
1742
  id: z.ZodString;
1731
1743
  projectId: z.ZodOptional<z.ZodString>;
@@ -1,18 +1,3 @@
1
- var __defProp = Object.defineProperty;
2
- var __returnValue = (v) => v;
3
- function __exportSetter(name, newValue) {
4
- this[name] = __returnValue.bind(null, newValue);
5
- }
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, {
9
- get: all[name],
10
- enumerable: true,
11
- configurable: true,
12
- set: __exportSetter.bind(all, name)
13
- });
14
- };
15
-
16
1
  // src/prompts/render-prompt.ts
17
2
  import Mustache from "mustache";
18
3
  var renderPrompt = (template, data) => Mustache.render(template, data);