@pstdio/sdk 0.41.0 → 0.42.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.
@@ -6284,7 +6284,10 @@ var harnessParamsSchema = record(string2(), harnessParamDescriptorSchema);
6284
6284
  var agentInfoSchema = object({
6285
6285
  id: string2(),
6286
6286
  name: string2(),
6287
- availability: object({ type: agentAvailabilityTypeSchema }),
6287
+ availability: object({
6288
+ type: agentAvailabilityTypeSchema,
6289
+ reason: string2().optional()
6290
+ }),
6288
6291
  skills: agentSkillsLayoutSchema.optional(),
6289
6292
  params: harnessParamsSchema.optional()
6290
6293
  });
@@ -6479,6 +6482,10 @@ var extensionCommandRecordSchema = object({
6479
6482
  examples: array(string2()).optional(),
6480
6483
  automation: boolean2().optional(),
6481
6484
  mutating: boolean2().optional(),
6485
+ resourceMutation: discriminatedUnion("kind", [
6486
+ object({ kind: literal("rename"), resourceType: string2(), idParam: string2(), labelParam: string2() }),
6487
+ object({ kind: literal("remove"), resourceType: string2(), idParam: string2() })
6488
+ ]).optional(),
6482
6489
  params: record(string2(), object({ type: string2() }).catchall(unknown())).optional()
6483
6490
  });
6484
6491
  var extensionParamObjectSchema = record(string2(), object({ type: string2() }).catchall(unknown()));
@@ -6943,6 +6950,7 @@ var extensionTreeRendererRecordSchema = extensionRendererRecordBaseSchema.extend
6943
6950
  headerHandlerId: string2().optional(),
6944
6951
  bodyHandlerId: string2(),
6945
6952
  childrenHandlerId: string2().optional(),
6953
+ moveHandlerId: string2().optional(),
6946
6954
  footerHandlerId: string2().optional(),
6947
6955
  defaultExpandedSectionIds: array(string2()).optional(),
6948
6956
  defaultExpandedNodeIds: array(string2()).optional()
@@ -7538,6 +7546,7 @@ var workbenchExtensionResourceKindRecordSchema = object({
7538
7546
  label: localizableStringSchema.optional(),
7539
7547
  icon: string2().optional(),
7540
7548
  resolveCommand: string2().optional(),
7549
+ resolveManyCommand: string2().optional(),
7541
7550
  menuSlots: array(object({
7542
7551
  id: string2(),
7543
7552
  placement: _enum(["header-primary", "header-overflow", "context-menu"]),
@@ -7791,6 +7800,57 @@ var setupProjectExtensionResponseSchema = object({
7791
7800
  installedAgents: array(string2())
7792
7801
  }))
7793
7802
  });
7803
+ // ../pstdio-api-contracts/src/extensions/installation.ts
7804
+ var installNameSchema = string2().min(1).refine((name) => name !== "." && name !== ".." && !/[\\/:]/.test(name) && name.trim().length > 0, "Install name must be one folder name.");
7805
+ var installExtensionRequestSchema = object({
7806
+ source: discriminatedUnion("kind", [
7807
+ object({ kind: literal("catalog"), name: string2().min(1), ref: string2().min(1).optional() }).strict(),
7808
+ object({ kind: literal("project-folder"), path: string2().min(1), development: boolean2().optional() }).strict()
7809
+ ]),
7810
+ installName: installNameSchema.optional(),
7811
+ force: boolean2().optional(),
7812
+ skipInstall: boolean2().optional()
7813
+ }).strict();
7814
+ var formBoolean = _enum(["true", "false"]).optional().transform((value) => value === "true");
7815
+ var uploadExtensionRequestSchema = object({
7816
+ kind: literal("upload"),
7817
+ installName: installNameSchema.optional(),
7818
+ folderName: installNameSchema,
7819
+ files: preprocess((value) => Array.isArray(value) ? value : [value], array(_instanceof(File).meta({ type: "string", format: "binary" })).min(1)),
7820
+ force: formBoolean,
7821
+ skipInstall: formBoolean,
7822
+ development: formBoolean
7823
+ }).strict();
7824
+ var installedExtensionSourceSchema = object({
7825
+ check: extensionsCheckResponseSchema,
7826
+ installName: string2(),
7827
+ manifest: record(string2(), unknown()),
7828
+ metadata: object({
7829
+ id: string2(),
7830
+ name: string2(),
7831
+ displayName: string2(),
7832
+ version: string2(),
7833
+ description: string2().optional(),
7834
+ enginesPstdio: string2()
7835
+ }),
7836
+ source: discriminatedUnion("kind", [
7837
+ object({ kind: literal("local"), path: string2(), ref: string2().optional() }),
7838
+ object({ kind: literal("named"), name: string2(), ref: string2() })
7839
+ ]),
7840
+ sourceHash: string2(),
7841
+ targetPath: string2()
7842
+ });
7843
+ var installExtensionResponseSchema = object({
7844
+ source: installedExtensionSourceSchema,
7845
+ extension: projectExtensionInstanceSchema
7846
+ });
7847
+ var extensionDiagnosticsResponseSchema = object({
7848
+ roots: array(object({
7849
+ scope: _enum(["repo", "user"]),
7850
+ path: string2(),
7851
+ check: extensionsCheckResponseSchema
7852
+ }))
7853
+ });
7794
7854
  // ../pstdio-api-contracts/src/automation.ts
7795
7855
  var automationRunStatusSchema = _enum(["queued", "running", "succeeded", "failed", "cancelled", "rejected"]);
7796
7856
  var issueAutomationTokenInputSchema = object({
@@ -8059,6 +8119,8 @@ var projectEvents = {
8059
8119
  opened: hostEventRef("project.opened")
8060
8120
  };
8061
8121
  var viewDataEvents = {
8122
+ boardViewsChanged: hostEventRef("view.board-views.changed"),
8123
+ resourceAnchorsChanged: hostEventRef("view.resource-anchors.changed"),
8062
8124
  sessionsChanged: hostEventRef("view.sessions.changed"),
8063
8125
  workspacesChanged: hostEventRef("view.workspaces.changed"),
8064
8126
  repositoriesChanged: hostEventRef("view.repositories.changed")
@@ -8188,6 +8250,7 @@ var WEBVIEW_HOST_CAPABILITY_VERSION = 1;
8188
8250
  var WEBVIEW_DECLARABLE_CAPABILITIES = [
8189
8251
  "clipboard.write",
8190
8252
  "commands.execute",
8253
+ "commands.stream",
8191
8254
  "navigation.open",
8192
8255
  "placement.close",
8193
8256
  "notification.show",
@@ -8541,6 +8604,64 @@ var updateProjectInputSchema = object({
8541
8604
  }).refine((value) => Object.keys(value).length > 0, {
8542
8605
  message: "At least one field must be provided"
8543
8606
  });
8607
+ // ../pstdio-api-contracts/src/session-request-values.ts
8608
+ var harnessParamValueSchema = union([string2(), boolean2()]);
8609
+ var harnessParamsInputSchema = record(string2(), harnessParamValueSchema);
8610
+ var sessionAttachmentRefSchema = object({ file_id: string2().min(1) });
8611
+
8612
+ // ../pstdio-api-contracts/src/queued-follow-ups.ts
8613
+ var queuedFollowUpSchema = object({
8614
+ queuePosition: number2().int().positive(),
8615
+ revision: string2().min(1),
8616
+ prompt: string2(),
8617
+ steeringUnavailableReason: string2().nullable().optional(),
8618
+ steeringDelivery: object({ id: string2(), runStartedAt: string2() }).nullable(),
8619
+ model: string2().nullable(),
8620
+ params: harnessParamsInputSchema,
8621
+ attachments: array(sessionAttachmentRefSchema)
8622
+ });
8623
+ var updateQueuedFollowUpInputSchema = object({
8624
+ prompt: string2().trim().min(1),
8625
+ expectedRevision: string2().min(1).optional(),
8626
+ model: string2().min(1).nullable().optional(),
8627
+ params: harnessParamsInputSchema.nullable().optional(),
8628
+ attachments: array(sessionAttachmentRefSchema).optional()
8629
+ });
8630
+ var combineQueuedFollowUpsInputSchema = object({
8631
+ sourcePosition: number2().int().positive(),
8632
+ sourceRevision: string2().min(1),
8633
+ targetRevision: string2().min(1)
8634
+ });
8635
+ var queuedFollowUpUpdateResponseSchema = object({ ok: literal(true), request: queuedFollowUpSchema });
8636
+ var pendingQueuedFollowUpsResponseSchema = object({
8637
+ requests: array(queuedFollowUpSchema),
8638
+ activeRunStartedAt: string2().nullable(),
8639
+ steeringAvailable: boolean2(),
8640
+ steeringUnavailableReason: string2().nullable()
8641
+ });
8642
+ var steerQueuedFollowUpInputSchema = object({
8643
+ expectedRevision: string2().min(1),
8644
+ expectedRunStartedAt: string2().min(1)
8645
+ });
8646
+ var queuedSteeringResultSchema = discriminatedUnion("status", [
8647
+ object({ status: literal("accepted"), deliveryId: string2() }),
8648
+ object({
8649
+ status: literal("rejected"),
8650
+ reason: _enum([
8651
+ "unsupported",
8652
+ "inactive",
8653
+ "stale_run",
8654
+ "blocking_input",
8655
+ "missing",
8656
+ "stale_revision",
8657
+ "different_settings",
8658
+ "delivery_failed",
8659
+ "invalid_attachments"
8660
+ ]),
8661
+ message: string2()
8662
+ }),
8663
+ object({ status: literal("uncertain"), deliveryId: string2(), message: string2() })
8664
+ ]);
8544
8665
  // ../pstdio-api-contracts/src/resource-anchors.ts
8545
8666
  var resourceLinkRefSchema = extensionResourceRefSchema.extend({
8546
8667
  type: string2().min(1),
@@ -8721,8 +8842,6 @@ var sessionStatusSchema = _enum([
8721
8842
  "cancelled",
8722
8843
  "disconnected"
8723
8844
  ]);
8724
- var harnessParamValueSchema = union([string2(), boolean2()]);
8725
- var harnessParamsInputSchema = record(string2(), harnessParamValueSchema);
8726
8845
  var sessionSchema = object({
8727
8846
  id: string2(),
8728
8847
  project_id: string2().nullable(),
@@ -8742,9 +8861,6 @@ var sessionSchema = object({
8742
8861
  created_at: string2(),
8743
8862
  updated_at: string2()
8744
8863
  });
8745
- var sessionAttachmentRefSchema = object({
8746
- file_id: string2().min(1)
8747
- });
8748
8864
  var createSessionResponseSchema = sessionSchema.extend({
8749
8865
  operation_result: harnessOperationResponseSchema.optional()
8750
8866
  });
@@ -8797,7 +8913,10 @@ var followUpDecisionSchema = union([
8797
8913
  var followUpResponseSchema = sessionSchema.extend({
8798
8914
  follow_up: followUpDecisionSchema
8799
8915
  });
8800
- var sessionQueuedMessagesResponseSchema = object({ messages: array(sessionMessageSchema) });
8916
+ var sessionQueuedMessagesResponseSchema = object({
8917
+ messages: array(sessionMessageSchema),
8918
+ queue: pendingQueuedFollowUpsResponseSchema.optional()
8919
+ });
8801
8920
  var sessionConversationSourcesSchema = object({
8802
8921
  checkpoint: array(sessionMessageSchema).nullable(),
8803
8922
  native: array(sessionMessageSchema).nullable(),
@@ -1,4 +1,4 @@
1
- import { Af as AgentAvailabilityType, Mf as AgentModel, Nf as AgentSkillsLayout, Pf as harnessLocalId, Xu as SkillFile, Yu as Skill, Zu as SkillWithContent, b as FileRecord, cd as Session, jf as AgentInfo, m as Settings, md as SessionStatus, v as Project } from "./index-BvsVU-eX.js";
2
- import { n as WorkspaceListItem, t as Workspace } from "./index-CJNVNXEP.js";
1
+ import { Fd as SkillFile, Id as SkillWithContent, Pd as Skill, b as FileRecord, ep as AgentAvailabilityType, id as Session, ip as harnessLocalId, m as Settings, np as AgentModel, rp as AgentSkillsLayout, tp as AgentInfo, ud as SessionStatus, v as Project } from "./index-DKb6w-4h.js";
2
+ import { n as WorkspaceListItem, t as Workspace } from "./index-CBZam0c-.js";
3
3
  export { type AgentAvailabilityType, type AgentInfo, type AgentModel, type AgentSkillsLayout, type FileRecord, type Project, type Session, type SessionStatus, type Settings, type Skill, type SkillFile, type SkillWithContent, type Workspace, type WorkspaceListItem, harnessLocalId };
4
4
  export {};
@@ -0,0 +1,2 @@
1
+ import "./index-DKb6w-4h.js";
2
+ export {};
@@ -0,0 +1,2 @@
1
+ import "./index-DKb6w-4h.js";
2
+ export {};
package/dist/testing.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Ad as ResourceAnchor, Di as ArtifactMount, Ed as ExtensionResourcesApi, Id as ResourceRef, Nd as ResourceAnchorQuery, Oi as CommandContext, Zi as ExtensionStorageApi } from "./index-BvsVU-eX.js";
1
+ import { $d as ResourceAnchor, Ai as CommandContext, Sf as JsonValue, Yd as ExtensionResourcesApi, Zi as ExtensionStorageApi, af as ResourceRef, ki as ArtifactMount, nf as ResourceAnchorQuery } from "./index-DKb6w-4h.js";
2
2
  //#region src/testing/command-context.d.ts
3
3
  type CommandContextOverrides = { [K in keyof CommandContext]?: Partial<CommandContext[K]>; };
4
4
  interface CommandContextInput<TParams extends Record<string, unknown>> {
@@ -8,9 +8,9 @@ interface CommandContextInput<TParams extends Record<string, unknown>> {
8
8
  resourcePrefixes?: Record<string, string>;
9
9
  overrides?: CommandContextOverrides;
10
10
  }
11
- export declare const makeCommandContext: <TParams extends Record<string, unknown>>(input: CommandContextInput<TParams>) => CommandContext<Record<string, unknown>>;
11
+ export declare const makeCommandContext: <TParams extends Record<string, unknown>>(input: CommandContextInput<TParams>) => CommandContext<Record<string, unknown>, JsonValue>;
12
12
  export declare const commandParamsFor: <TParams extends Record<string, unknown>>(context: CommandContext) => TParams;
13
- export declare const makeCommandArgs: <TParams extends Record<string, unknown>>(input: CommandContextInput<TParams>) => readonly [CommandContext<Record<string, unknown>>, TParams];
13
+ export declare const makeCommandArgs: <TParams extends Record<string, unknown>>(input: CommandContextInput<TParams>) => readonly [CommandContext<Record<string, unknown>, JsonValue>, TParams];
14
14
  //#endregion
15
15
  //#region src/testing/memory-repo-files.d.ts
16
16
  export declare const createMemoryRepoFiles: () => ArtifactMount & {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pstdio/sdk",
3
- "version": "0.41.0",
3
+ "version": "0.42.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/pufflyai/prompt-studio"
@@ -1,2 +0,0 @@
1
- import "./index-BvsVU-eX.js";
2
- export {};
@@ -1,2 +0,0 @@
1
- import "./index-BvsVU-eX.js";
2
- export {};