@pstdio/sdk 0.44.0 → 0.45.0-nightly.20261020145025

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.
@@ -1,4 +1,36 @@
1
+ var __create = Object.create;
2
+ var __getProtoOf = Object.getPrototypeOf;
1
3
  var __defProp = Object.defineProperty;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ function __accessProp(key) {
7
+ return this[key];
8
+ }
9
+ var __toESMCache_node;
10
+ var __toESMCache_esm;
11
+ var __toESM = (mod, isNodeMode, target) => {
12
+ var canCache = mod != null && typeof mod === "object";
13
+ if (canCache) {
14
+ var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
15
+ var cached = cache.get(mod);
16
+ if (cached)
17
+ return cached;
18
+ }
19
+ target = mod != null ? __create(__getProtoOf(mod)) : {};
20
+ const to = isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
21
+ if (mod && typeof mod === "object" || typeof mod === "function") {
22
+ for (let key of __getOwnPropNames(mod))
23
+ if (!__hasOwnProp.call(to, key))
24
+ __defProp(to, key, {
25
+ get: __accessProp.bind(mod, key),
26
+ enumerable: true
27
+ });
28
+ }
29
+ if (canCache)
30
+ cache.set(mod, to);
31
+ return to;
32
+ };
33
+ var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
2
34
  var __returnValue = (v) => v;
3
35
  function __exportSetter(name, newValue) {
4
36
  this[name] = __returnValue.bind(null, newValue);
@@ -5562,10 +5594,16 @@ var ZodBase64 = /* @__PURE__ */ $constructor("ZodBase64", (inst, def) => {
5562
5594
  $ZodBase64.init(inst, def);
5563
5595
  ZodStringFormat.init(inst, def);
5564
5596
  });
5597
+ function base642(params) {
5598
+ return _base64(ZodBase64, params);
5599
+ }
5565
5600
  var ZodBase64URL = /* @__PURE__ */ $constructor("ZodBase64URL", (inst, def) => {
5566
5601
  $ZodBase64URL.init(inst, def);
5567
5602
  ZodStringFormat.init(inst, def);
5568
5603
  });
5604
+ function base64url2(params) {
5605
+ return _base64url(ZodBase64URL, params);
5606
+ }
5569
5607
  var ZodE164 = /* @__PURE__ */ $constructor("ZodE164", (inst, def) => {
5570
5608
  $ZodE164.init(inst, def);
5571
5609
  ZodStringFormat.init(inst, def);
@@ -6213,12 +6251,36 @@ function preprocess(fn, schema) {
6213
6251
  out: schema
6214
6252
  });
6215
6253
  }
6254
+ // ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/classic/iso.js
6255
+ var exports_iso = {};
6256
+ __export(exports_iso, {
6257
+ ZodISODate: () => ZodISODate,
6258
+ ZodISODateTime: () => ZodISODateTime,
6259
+ ZodISODuration: () => ZodISODuration,
6260
+ ZodISOTime: () => ZodISOTime,
6261
+ date: () => date2,
6262
+ datetime: () => datetime2,
6263
+ duration: () => duration2,
6264
+ time: () => time2
6265
+ });
6266
+ function datetime2(params) {
6267
+ return _isoDateTime(ZodISODateTime, params);
6268
+ }
6269
+ function date2(params) {
6270
+ return _isoDate(ZodISODate, params);
6271
+ }
6272
+ function time2(params) {
6273
+ return _isoTime(ZodISOTime, params);
6274
+ }
6275
+ function duration2(params) {
6276
+ return _isoDuration(ZodISODuration, params);
6277
+ }
6216
6278
  // ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/classic/coerce.js
6217
6279
  var exports_coerce = {};
6218
6280
  __export(exports_coerce, {
6219
6281
  bigint: () => bigint2,
6220
6282
  boolean: () => boolean3,
6221
- date: () => date2,
6283
+ date: () => date3,
6222
6284
  number: () => number3,
6223
6285
  string: () => string3
6224
6286
  });
@@ -6234,7 +6296,7 @@ function boolean3(params) {
6234
6296
  function bigint2(params) {
6235
6297
  return _coercedBigint(ZodBigInt, params);
6236
6298
  }
6237
- function date2(params) {
6299
+ function date3(params) {
6238
6300
  return _coercedDate(ZodDate, params);
6239
6301
  }
6240
6302
  // ../pstdio-api-contracts/src/activity.ts
@@ -6343,30 +6405,6 @@ var harnessLocalId = (id) => id.slice(id.lastIndexOf(".") + 1);
6343
6405
  var agentDetailsSchema = agentInfoSchema.extend({
6344
6406
  skills: agentSkillsLayoutSchema.extend({ globalDir: string2() }).optional()
6345
6407
  });
6346
- // ../pstdio-sync-contracts/src/compatibility.ts
6347
- var peerSchema = strictObject({
6348
- release: string2().min(1),
6349
- protocolVersions: array(number2().int().positive()).min(1),
6350
- supportedFeatures: array(string2().min(1)),
6351
- requiredFeatures: array(string2().min(1))
6352
- });
6353
- var protocolPeer = {
6354
- release: "contracts-v1",
6355
- protocolVersions: [1],
6356
- supportedFeatures: ["atomic-groups", "retained-recovery", "revisioned-resolution"],
6357
- requiredFeatures: ["atomic-groups", "retained-recovery", "revisioned-resolution"]
6358
- };
6359
- function negotiate(client, relay) {
6360
- const common = client.protocolVersions.includes(1) && relay.protocolVersions.includes(1);
6361
- const features = client.requiredFeatures.every((feature) => relay.supportedFeatures.includes(feature)) && relay.requiredFeatures.every((feature) => client.supportedFeatures.includes(feature));
6362
- if (common && features)
6363
- return { status: "compatible", protocolVersion: 1 };
6364
- return {
6365
- status: "unsupported-protocol",
6366
- recoverable: true,
6367
- action: "Update the local runtime or relay to a common protocol and required feature set. Local work remains saved; retry after updating."
6368
- };
6369
- }
6370
6408
  // ../pstdio-sync-contracts/src/json.ts
6371
6409
  function isJson(value) {
6372
6410
  try {
@@ -6502,24 +6540,258 @@ async function fingerprint(value) {
6502
6540
  const digest = await crypto.subtle.digest("SHA-256", bytes);
6503
6541
  return Array.from(new Uint8Array(digest), (byte) => byte.toString(16).padStart(2, "0")).join("");
6504
6542
  }
6505
- async function sealMutation(body) {
6506
- const parsed = mutationSchema.parse({ ...body, fingerprint: "0".repeat(64) });
6507
- const { fingerprint: _ignored, ...normalized } = parsed;
6508
- return { ...normalized, fingerprint: await fingerprint(normalized) };
6509
- }
6510
- async function validateMutation(input) {
6511
- const mutation = mutationSchema.parse(input);
6512
- const { fingerprint: supplied, ...body } = mutation;
6513
- if (await fingerprint(body) !== supplied)
6514
- throw new Error("Payload fingerprint does not match");
6515
- return mutation;
6516
- }
6543
+
6544
+ // ../pstdio-sync-contracts/src/checkpoint.ts
6545
+ var writerPositionSchema = strictObject({
6546
+ environmentId: identitySchema,
6547
+ sequence: number2().int().positive()
6548
+ });
6549
+ var checkpointBodySchema = strictObject({
6550
+ protocolVersion: literal(2),
6551
+ scope: scopeSchema,
6552
+ epoch: identitySchema,
6553
+ generation: revisionSchema,
6554
+ environmentId: identitySchema,
6555
+ sequence: number2().int().positive(),
6556
+ parents: array(identitySchema),
6557
+ document: strictObject({ recordId: identitySchema, generation: revisionSchema, recoveryRevision: revisionSchema }),
6558
+ changes: array(changeSchema).min(1),
6559
+ resolution: resolutionSchema.optional(),
6560
+ rebase: strictObject({
6561
+ expectedSnapshotHash: fingerprintSchema,
6562
+ sources: array(strictObject({ operationId: identitySchema, fingerprint: fingerprintSchema })).min(1)
6563
+ }).optional()
6564
+ });
6565
+ var checkpointGroupSchema = checkpointBodySchema.extend({ fingerprint: fingerprintSchema }).superRefine((group, ctx) => {
6566
+ checkGroup({ ...group, operationId: `${group.environmentId}:${group.sequence}` }, ctx);
6567
+ const sources = group.rebase?.sources.map((source) => source.operationId) ?? [];
6568
+ if (new Set(sources).size !== sources.length || sources.some((id) => !group.parents.includes(id)))
6569
+ ctx.addIssue({ code: "custom", message: "Rebased sources must be unique captured parents" });
6570
+ if (new Set(group.parents).size !== group.parents.length || group.parents.includes(`${group.environmentId}:${group.sequence}`))
6571
+ ctx.addIssue({ code: "custom", message: "Checkpoint parents must be unique and cannot include itself" });
6572
+ if (new Set(group.changes.map((change) => change.recordId)).size !== group.changes.length || !group.changes.some((change) => change.recordId === group.document.recordId && change.shared?.kind === "text"))
6573
+ ctx.addIssue({ code: "custom", message: "Checkpoint needs a document delta and unique projection records" });
6574
+ });
6575
+ var coverageAckSchema = strictObject({
6576
+ protocolVersion: literal(2),
6577
+ scope: scopeSchema,
6578
+ epoch: identitySchema,
6579
+ generation: revisionSchema,
6580
+ environmentId: identitySchema,
6581
+ cut: revisionSchema,
6582
+ snapshotHash: fingerprintSchema,
6583
+ branches: array(identitySchema),
6584
+ recovery: array(strictObject({
6585
+ recordId: identitySchema,
6586
+ generation: revisionSchema,
6587
+ revision: revisionSchema,
6588
+ checkpointRevision: revisionSchema,
6589
+ baseCut: revisionSchema,
6590
+ branches: array(identitySchema)
6591
+ }).refine((recovery) => recovery.checkpointRevision <= recovery.revision, "Recovery checkpoint is in the future"))
6592
+ });
6593
+ var writerFrontierSchema = strictObject({ floor: revisionSchema });
6594
+ var recoveryFileSchema = strictObject({
6595
+ protocolVersion: literal(2),
6596
+ scope: scopeSchema,
6597
+ recordId: identitySchema,
6598
+ epoch: identitySchema,
6599
+ generation: revisionSchema,
6600
+ revision: revisionSchema,
6601
+ checkpointRevision: revisionSchema,
6602
+ state: string2(),
6603
+ checkpointVector: string2(),
6604
+ projectionBaseline: string2(),
6605
+ frozen: strictObject({
6606
+ identity: identitySchema,
6607
+ revision: revisionSchema,
6608
+ update: string2(),
6609
+ vector: string2(),
6610
+ group: checkpointGroupSchema.nullable(),
6611
+ projectionBaseline: string2()
6612
+ }).nullable()
6613
+ });
6614
+ var liveFrameSchema = strictObject({
6615
+ protocolVersion: literal(2),
6616
+ scope: scopeSchema,
6617
+ epoch: identitySchema,
6618
+ documentId: identitySchema,
6619
+ generation: revisionSchema,
6620
+ kind: _enum(["update", "state-vector", "barrier"]),
6621
+ payload: string2()
6622
+ });
6623
+ var backupCoverageSchema = strictObject({
6624
+ scope: scopeSchema,
6625
+ epoch: identitySchema,
6626
+ generation: revisionSchema,
6627
+ cut: revisionSchema,
6628
+ snapshotHash: fingerprintSchema,
6629
+ manifestHash: fingerprintSchema
6630
+ });
6631
+ var documentRotationSchema = strictObject({
6632
+ scope: scopeSchema,
6633
+ epoch: identitySchema,
6634
+ documentId: identitySchema,
6635
+ previousGeneration: revisionSchema,
6636
+ generation: revisionSchema,
6637
+ seed: string2()
6638
+ }).refine((rotation) => rotation.generation === rotation.previousGeneration + 1, "Document generation must advance once");
6639
+ var documentPositionSchema = strictObject({
6640
+ scope: scopeSchema,
6641
+ epoch: identitySchema,
6642
+ documentId: identitySchema,
6643
+ generation: revisionSchema,
6644
+ position: string2()
6645
+ });
6646
+ // ../pstdio-sync-contracts/src/compatibility.ts
6647
+ var peerSchema = strictObject({
6648
+ release: string2().min(1),
6649
+ protocolVersions: array(number2().int().positive()).min(1),
6650
+ supportedFeatures: array(string2().min(1)),
6651
+ requiredFeatures: array(string2().min(1))
6652
+ });
6517
6653
  // ../pstdio-sync-contracts/src/identity.ts
6518
6654
  var environmentIdentitySchema = strictObject({ environmentId: identitySchema });
6519
6655
  var environmentTargetSchema = environmentIdentitySchema.extend({
6520
6656
  workbenchId: identitySchema,
6521
6657
  workspaceId: identitySchema
6522
6658
  });
6659
+ // ../pstdio-sync-contracts/src/protocol/envelopes.ts
6660
+ var syncIdSchema = string2().regex(/^[A-Za-z0-9_-]{16,128}$/);
6661
+ var sequenceSchema = number2().int().nonnegative().max(Number.MAX_SAFE_INTEGER);
6662
+ var byteLengthSchema = sequenceSchema;
6663
+ var payloadSchema = base642();
6664
+ var blobIdsSchema = array(syncIdSchema).max(1e5).refine((ids) => new Set(ids).size === ids.length, "Blob IDs must be unique");
6665
+ var spaceOwnerSchema = identitySchema.nullable();
6666
+ var updateEnvelopeSchema = strictObject({
6667
+ updateId: syncIdSchema,
6668
+ payload: payloadSchema,
6669
+ blobIds: blobIdsSchema
6670
+ });
6671
+ var updateResultSchema = strictObject({ sequence: sequenceSchema.min(1), duplicate: boolean2() });
6672
+ var stateEnvelopeSchema = strictObject({
6673
+ stateId: syncIdSchema,
6674
+ baseStateId: syncIdSchema.nullable(),
6675
+ through: sequenceSchema,
6676
+ payload: payloadSchema,
6677
+ summary: payloadSchema,
6678
+ blobIds: blobIdsSchema
6679
+ });
6680
+ var stateInfoSchema = strictObject({
6681
+ stateId: syncIdSchema,
6682
+ baseStateId: syncIdSchema.nullable(),
6683
+ through: sequenceSchema,
6684
+ byteLength: byteLengthSchema,
6685
+ summary: payloadSchema,
6686
+ deviceId: identitySchema,
6687
+ createdAt: exports_iso.datetime()
6688
+ });
6689
+ var stateResultSchema = strictObject({ state: stateInfoSchema });
6690
+ var storedUpdateSchema = strictObject({
6691
+ sequence: sequenceSchema.min(1),
6692
+ updateId: syncIdSchema,
6693
+ deviceId: identitySchema,
6694
+ payload: payloadSchema,
6695
+ createdAt: exports_iso.datetime()
6696
+ });
6697
+ var readRequestSchema = strictObject({ after: sequenceSchema });
6698
+ var readResultSchema = discriminatedUnion("status", [
6699
+ strictObject({
6700
+ status: literal("updates"),
6701
+ state: stateInfoSchema.nullable(),
6702
+ lastSequence: sequenceSchema,
6703
+ updates: array(storedUpdateSchema),
6704
+ more: boolean2()
6705
+ }),
6706
+ strictObject({
6707
+ status: literal("state-required"),
6708
+ state: stateInfoSchema.nullable(),
6709
+ lastSequence: sequenceSchema
6710
+ })
6711
+ ]);
6712
+ var blobBeginSchema = strictObject({ sha256: fingerprintSchema, byteLength: byteLengthSchema });
6713
+ var blobStatusSchema = strictObject({
6714
+ partSize: number2().int().positive(),
6715
+ completed: boolean2(),
6716
+ parts: array(strictObject({ number: number2().int().positive(), sha256: fingerprintSchema, byteLength: byteLengthSchema }))
6717
+ });
6718
+ var blobReadSchema = strictObject({ offset: byteLengthSchema });
6719
+ var liveClientMessageSchema = strictObject({
6720
+ type: literal("live"),
6721
+ spaceOwner: spaceOwnerSchema,
6722
+ payload: payloadSchema
6723
+ });
6724
+ var liveServerMessageSchema = discriminatedUnion("type", [
6725
+ strictObject({ type: literal("ready"), protocolVersion: number2().int().positive() }),
6726
+ strictObject({
6727
+ type: literal("live"),
6728
+ spaceOwner: spaceOwnerSchema,
6729
+ deviceId: identitySchema,
6730
+ payload: payloadSchema
6731
+ }),
6732
+ strictObject({
6733
+ type: literal("changed"),
6734
+ spaceOwner: spaceOwnerSchema,
6735
+ documentId: syncIdSchema,
6736
+ lastSequence: sequenceSchema,
6737
+ stateId: syncIdSchema.nullable()
6738
+ })
6739
+ ]);
6740
+ var syncErrorSchema = discriminatedUnion("error", [
6741
+ strictObject({
6742
+ error: literal("protocol-unsupported"),
6743
+ supported: array(number2().int()),
6744
+ message: string2()
6745
+ }),
6746
+ strictObject({ error: literal("stale-state"), state: stateInfoSchema.nullable() }),
6747
+ strictObject({ error: literal("missing-blobs"), blobIds: array(syncIdSchema) }),
6748
+ strictObject({
6749
+ error: _enum([
6750
+ "invalid-request",
6751
+ "unauthorized",
6752
+ "forbidden",
6753
+ "not-found",
6754
+ "method-not-allowed",
6755
+ "too-large",
6756
+ "quota-exceeded",
6757
+ "rate-limited",
6758
+ "unavailable"
6759
+ ])
6760
+ })
6761
+ ]);
6762
+ // ../pstdio-sync-contracts/src/protocol/keys.ts
6763
+ var spaceKeySchema = strictObject({
6764
+ generation: number2().int().positive(),
6765
+ secret: base64url2().length(43)
6766
+ });
6767
+ var spaceKeysSchema = strictObject({
6768
+ project: array(spaceKeySchema).min(1),
6769
+ personal: array(spaceKeySchema).min(1)
6770
+ });
6771
+ // ../pstdio-sync-contracts/src/protocol/routes.ts
6772
+ var space = { projectId: identitySchema, spaceOwner: identitySchema.nullable() };
6773
+ var routeSchema = discriminatedUnion("kind", [
6774
+ strictObject({
6775
+ kind: literal("document"),
6776
+ ...space,
6777
+ documentId: syncIdSchema,
6778
+ operation: _enum(["updates", "read", "state"])
6779
+ }),
6780
+ strictObject({ kind: literal("state"), ...space, documentId: syncIdSchema, stateId: syncIdSchema }),
6781
+ strictObject({
6782
+ kind: literal("blob"),
6783
+ ...space,
6784
+ blobId: syncIdSchema,
6785
+ operation: _enum(["begin", "finish", "read"])
6786
+ }),
6787
+ strictObject({
6788
+ kind: literal("part"),
6789
+ ...space,
6790
+ blobId: syncIdSchema,
6791
+ number: number2().int().min(1).max(1e4)
6792
+ }),
6793
+ strictObject({ kind: literal("live"), projectId: identitySchema })
6794
+ ]);
6523
6795
  // ../pstdio-sync-contracts/src/state.ts
6524
6796
  var checkpointSchema = strictObject({ epoch: identitySchema, sequence: revisionSchema });
6525
6797
  var recordSchema = strictObject({
@@ -6596,6 +6868,44 @@ var replaySchema = strictObject({
6596
6868
  message: "Replay must contain contiguous complete accepted groups in one scope and epoch"
6597
6869
  });
6598
6870
  });
6871
+ // ../pstdio-sync-contracts/src/retention.ts
6872
+ var coveredReceiptSchema = strictObject({
6873
+ group: checkpointGroupSchema,
6874
+ status: _enum(["accepted", "pending", "conflict"]),
6875
+ cut: revisionSchema.nullable()
6876
+ }).refine((receipt) => receipt.status === "accepted" === (receipt.cut !== null), "Only accepted receipts have a cut");
6877
+ var coveredSnapshotSchema = strictObject({
6878
+ protocolVersion: literal(2),
6879
+ scope: scopeSchema,
6880
+ epoch: identitySchema,
6881
+ generation: revisionSchema,
6882
+ cut: revisionSchema,
6883
+ covered: revisionSchema,
6884
+ records: dictionarySchema(recordSchema),
6885
+ conflicts: dictionarySchema(conflictSchema),
6886
+ publishedRevision: identitySchema,
6887
+ documents: dictionarySchema(revisionSchema),
6888
+ receipts: dictionarySchema(coveredReceiptSchema),
6889
+ writers: dictionarySchema(writerFrontierSchema),
6890
+ retainedBranches: array(identitySchema)
6891
+ });
6892
+ var recoveryCoverageSchema = strictObject({
6893
+ recordId: identitySchema,
6894
+ generation: revisionSchema,
6895
+ revision: revisionSchema,
6896
+ checkpointRevision: revisionSchema,
6897
+ baseCut: revisionSchema,
6898
+ branches: array(identitySchema)
6899
+ }).refine((recovery) => recovery.checkpointRevision <= recovery.revision, "Checkpoint cannot cover future recovery edits");
6900
+ var backupManifestSchema = strictObject({
6901
+ protocolVersion: literal(2),
6902
+ snapshot: coveredSnapshotSchema,
6903
+ assets: array(assetSchema),
6904
+ packages: array(assetSchema),
6905
+ copiesScope: scopeSchema,
6906
+ snapshotHash: fingerprintSchema,
6907
+ coverage: array(coverageAckSchema)
6908
+ });
6599
6909
  // ../pstdio-sync-contracts/src/transport.ts
6600
6910
  var relayOperationSchema = _enum([
6601
6911
  "initialize",
@@ -6616,21 +6926,21 @@ var relayReplayResultSchema = discriminatedUnion("status", [
6616
6926
  strictObject({ status: literal("replay"), batch: replaySchema }),
6617
6927
  strictObject({ status: literal("snapshot-required"), checkpoint: checkpointSchema })
6618
6928
  ]);
6619
- var byteLengthSchema = number2().int().nonnegative().max(Number.MAX_SAFE_INTEGER);
6929
+ var byteLengthSchema2 = number2().int().nonnegative().max(Number.MAX_SAFE_INTEGER);
6620
6930
  var relayAssetBeginSchema = strictObject({ uploadId: identitySchema, asset: assetSchema });
6621
6931
  var relayAssetUploadSchema = strictObject({ uploadId: identitySchema });
6622
6932
  var relayAssetPartSchema = strictObject({
6623
6933
  uploadId: identitySchema,
6624
6934
  number: number2().int().min(1).max(1e4),
6625
6935
  sha256: fingerprintSchema,
6626
- byteLength: byteLengthSchema
6936
+ byteLength: byteLengthSchema2
6627
6937
  });
6628
- var relayAssetReadSchema = strictObject({ asset: assetSchema, offset: byteLengthSchema }).refine(({ asset, offset }) => offset <= asset.byteLength, "Offset exceeds the asset");
6938
+ var relayAssetReadSchema = strictObject({ asset: assetSchema, offset: byteLengthSchema2 }).refine(({ asset, offset }) => offset <= asset.byteLength, "Offset exceeds the asset");
6629
6939
  var relayAssetStatusSchema = strictObject({
6630
6940
  asset: assetSchema,
6631
6941
  partSize: number2().int().positive(),
6632
6942
  completed: boolean2(),
6633
- parts: array(strictObject({ number: number2().int().positive(), sha256: fingerprintSchema, byteLength: byteLengthSchema }))
6943
+ parts: array(strictObject({ number: number2().int().positive(), sha256: fingerprintSchema, byteLength: byteLengthSchema2 }))
6634
6944
  });
6635
6945
  var relayEventSchema = strictObject({ protocolVersion: literal(1), type: _enum(["ready", "changed"]) });
6636
6946
  var relayInitializeSchema = strictObject({ publishedRevision: identitySchema });
@@ -7468,6 +7778,14 @@ var extensionRendererRecordBaseSchema = object({
7468
7778
  emptyDescription: localizableStringSchema.optional()
7469
7779
  });
7470
7780
  var extensionTreeRendererRecordSchema = extensionRendererRecordBaseSchema.extend({
7781
+ structure: array(object({
7782
+ id: string2(),
7783
+ label: localizableStringSchema.optional(),
7784
+ collapsible: boolean2().optional(),
7785
+ hiddenByDefault: boolean2().optional(),
7786
+ canHide: boolean2().optional(),
7787
+ resourceNode: object({ id: string2(), icon: string2().optional() }).optional()
7788
+ })).optional(),
7471
7789
  searchable: boolean2().optional(),
7472
7790
  searchPlaceholder: localizableStringSchema.optional(),
7473
7791
  headerHandlerId: string2().optional(),
@@ -7825,6 +8143,11 @@ var regionSizeSchema = object({
7825
8143
  });
7826
8144
  var regionSettingsSchema = object({
7827
8145
  showHeader: boolean2().optional(),
8146
+ canOpen: boolean2().optional(),
8147
+ canClose: boolean2().optional(),
8148
+ acceptsTabs: boolean2().optional(),
8149
+ resizable: boolean2().optional(),
8150
+ floatable: boolean2().optional(),
7828
8151
  size: regionSizeSchema.optional(),
7829
8152
  collapsible: boolean2().optional(),
7830
8153
  alwaysShowTabs: boolean2().optional()
@@ -9246,13 +9569,15 @@ var serializeCommandError = (error) => {
9246
9569
  return result;
9247
9570
  };
9248
9571
  // ../pstdio-api-contracts/src/extension-kernel/types/extension.ts
9249
- var EXTENSION_API_VERSION = "0.2.0";
9572
+ var EXTENSION_API_VERSION = "0.2.1";
9250
9573
  // ../pstdio-api-contracts/src/extension-kernel/types/webview-capabilities.ts
9251
9574
  var WEBVIEW_HOST_CAPABILITY_VERSION = 1;
9252
9575
  var WEBVIEW_DECLARABLE_CAPABILITIES = [
9253
9576
  "clipboard.write",
9254
9577
  "commands.execute",
9255
9578
  "commands.stream",
9579
+ "harnesses.read",
9580
+ "resources.actions",
9256
9581
  "navigation.open",
9257
9582
  "page.params.update",
9258
9583
  "placement.close",
@@ -9575,6 +9900,10 @@ var reconcileMessageHistory = (input, projection = {}) => {
9575
9900
  throw error;
9576
9901
  }
9577
9902
  };
9903
+ // ../pstdio-api-contracts/src/link-icons.ts
9904
+ var linkIconSchema = object({
9905
+ data_url: string2()
9906
+ });
9578
9907
  // ../pstdio-api-contracts/src/pagination.ts
9579
9908
  var pageQuerySchema = object({ cursor: string2().optional(), limit: exports_coerce.number().optional() });
9580
9909
  // ../pstdio-api-contracts/src/session-request-values.ts
@@ -1,3 +1,3 @@
1
- import { Am as harnessLocalId, Bs as ListNotificationsQuery, Cm as AssetTransfer, Dm as AgentModel, Em as AgentInfo, Fs as SkillFile, Gs as NotificationFinalStatus, Gu as SessionDetails, Hs as Notification, Is as SkillWithContent, Js as NotificationPriority, Ju as SessionFollowUpResponse, Ks as NotificationKind, Ku as SessionFollowUpDecision, Ls as SkillWithContentDetails, Lu as Session, Mm as ActivityPage, Ns as Skill, Om as AgentSkillsLayout, Ps as SkillDetails, S as ProjectUpdateRequest, Sm as AssetReference, Tm as AgentDetails, Us as NotificationAction, Ut as Workspace, Uu as SessionCreateRequest, Vs as ListNotificationsResponse, Ws as NotificationActorType, Wt as WorkspaceListItem, Wu as SessionCreateResponse, Xs as SetNotificationStatusInput, Xu as SessionStatus, Ys as NotificationStatus, Zs as UpdateNotificationInput, _c as PageQuery, b as ProjectCreateRequest, gc as Page, jm as ActivityEntry, p as Settings, qs as NotificationOrigin, qu as SessionFollowUpRequest, s as WorkspaceEntryMoveInput, v as InitialWorkspaceRequest, w as FileRecord, wm as AgentAvailabilityType, x as ProjectDetails, y as Project, zs as CreateNotificationInput, zu as SessionAttachmentDetails } from "./index-BooGkjrP.js";
1
+ import { $s as SetNotificationStatusInput, Am as AgentDetails, Bs as SkillWithContentDetails, Cf as SessionFollowUpRequest, Dm as AssetReference, Ef as SessionStatus, Fm as harnessLocalId, Gs as Notification, Gt as WorkspaceListItem, Hs as CreateNotificationInput, Im as ActivityEntry, Is as Skill, Js as NotificationFinalStatus, Ks as NotificationAction, Lm as ActivityPage, Ls as SkillDetails, Mm as AgentModel, Nm as AgentSkillsLayout, Om as AssetTransfer, Qs as NotificationStatus, Rs as SkillFile, S as ProjectUpdateRequest, Sf as SessionFollowUpDecision, T as FileRecord, Us as ListNotificationsQuery, Ws as ListNotificationsResponse, Wt as Workspace, Xs as NotificationOrigin, Ys as NotificationKind, Zs as NotificationPriority, b as ProjectCreateRequest, bc as PageQuery, bf as SessionCreateResponse, ec as UpdateNotificationInput, hf as SessionAttachmentDetails, jm as AgentInfo, km as AgentAvailabilityType, p as Settings, pf as Session, qs as NotificationActorType, s as WorkspaceEntryMoveInput, v as InitialWorkspaceRequest, wf as SessionFollowUpResponse, x as ProjectDetails, xf as SessionDetails, y as Project, yc as Page, yf as SessionCreateRequest, zs as SkillWithContent } from "./index-2xyvngQL.js";
2
2
  export { type ActivityEntry, type ActivityPage, type AgentAvailabilityType, type AgentDetails, type AgentInfo, type AgentModel, type AgentSkillsLayout, type AssetReference, type AssetTransfer, type CreateNotificationInput, type FileRecord, type InitialWorkspaceRequest, type ListNotificationsQuery, type ListNotificationsResponse, type Notification, type NotificationAction, type NotificationActorType, type NotificationFinalStatus, type NotificationKind, type NotificationOrigin, type NotificationPriority, type NotificationStatus, type Page, type PageQuery, type Project, type ProjectCreateRequest, type ProjectDetails, type ProjectUpdateRequest, type Session, type SessionAttachmentDetails, type SessionCreateRequest, type SessionCreateResponse, type SessionDetails, type SessionFollowUpDecision, type SessionFollowUpRequest, type SessionFollowUpResponse, type SessionStatus, type SetNotificationStatusInput, type Settings, type Skill, type SkillDetails, type SkillFile, type SkillWithContent, type SkillWithContentDetails, type UpdateNotificationInput, type Workspace, type WorkspaceEntryMoveInput, type WorkspaceListItem, harnessLocalId };
3
3
  export {};
@@ -0,0 +1,2 @@
1
+ import "./index-2xyvngQL.js";
2
+ export {};
@@ -0,0 +1,2 @@
1
+ import "./index-2xyvngQL.js";
2
+ export {};