@vite-hub/workspace 0.0.4 → 0.3.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 (137) hide show
  1. package/README.md +339 -115
  2. package/dist/abort-BCwpdrN0.js +32 -0
  3. package/dist/{asset-registry-8QI3ML3K.js → asset-registry-DfBV5kmw.js} +3 -2
  4. package/dist/blob-database.d.ts +474 -0
  5. package/dist/blob-database.js +608 -0
  6. package/dist/checkout.d.ts +128 -0
  7. package/dist/checkout.js +849 -0
  8. package/dist/cloudflare.d.ts +6 -7
  9. package/dist/cloudflare.js +1 -1
  10. package/dist/config-B-863EgC.js +15 -0
  11. package/dist/config-BAgL2dtB.js +1076 -0
  12. package/dist/{config-DE9xlaIw.d.ts → config-BQKcPawI.d.ts} +1 -2
  13. package/dist/discard-CNNtCozM.js +8 -0
  14. package/dist/durability.d.ts +22 -0
  15. package/dist/durability.js +70 -0
  16. package/dist/error-diagnostics-CtKjGtGb.js +188 -0
  17. package/dist/error-diagnostics-DSkCJC_L.js +266 -0
  18. package/dist/file-2pFYNtsU.js +22 -0
  19. package/dist/{files-Q6xZjDHA.js → files-BOo4SbwE.js} +3 -3
  20. package/dist/files.d.ts +38 -0
  21. package/dist/files.js +6 -0
  22. package/dist/{github-DHnjxQIX.js → github-CrYp4v8k.js} +44 -24
  23. package/dist/glob-B8YGvTrZ.js +21 -0
  24. package/dist/glob-Cjxms1t7.js +30 -0
  25. package/dist/{host-DJH8cuoU.js → host-BFBpXn0N.js} +144 -77
  26. package/dist/{hosted-RPeJOCFz.js → hosted-KcUR_jPv.js} +303 -97
  27. package/dist/hosted-vercel-blob-B3-wRdUm.js +410 -0
  28. package/dist/hosted-vercel-blob.d.ts +6 -7
  29. package/dist/hosted-vercel-blob.js +1 -1
  30. package/dist/hosted.d.ts +10 -9
  31. package/dist/hosted.js +2 -2
  32. package/dist/index.d.ts +26 -47
  33. package/dist/index.js +30 -100
  34. package/dist/internal/path.d.ts +2 -0
  35. package/dist/internal/path.js +2 -0
  36. package/dist/lifecycle-B-enk_4A.js +596 -0
  37. package/dist/lineage.d.ts +26 -0
  38. package/dist/lineage.js +76 -0
  39. package/dist/loader.d.ts +5 -6
  40. package/dist/loader.js +3 -2
  41. package/dist/mcp-resources-DF0F5rcL.js +39 -0
  42. package/dist/memory-BOexthyW.js +247 -0
  43. package/dist/metadata-target-CWz6KHKq.js +1589 -0
  44. package/dist/object-Da1zyPCR.js +11 -0
  45. package/dist/operation-definition-8gOe-ubD.d.ts +234 -0
  46. package/dist/operations-C6FpR8Rr.js +389 -0
  47. package/dist/operations-CE2drFih.js +1234 -0
  48. package/dist/operations.d.ts +90 -0
  49. package/dist/operations.js +3 -0
  50. package/dist/path--wrT_Azm.js +113 -0
  51. package/dist/path-AxMho1wo.d.ts +7 -0
  52. package/dist/path-DrSIenjj.js +59 -0
  53. package/dist/path-zHxQUbqa.d.ts +9 -0
  54. package/dist/plugins-C8C0auoW.d.ts +10 -0
  55. package/dist/provider-9s4Ufkm5.js +1479 -0
  56. package/dist/providers/github/store.d.ts +3 -5
  57. package/dist/providers/github/store.js +1 -1
  58. package/dist/registry-B3BBm4Ts.d.ts +19 -0
  59. package/dist/{registry-D3yzt8HQ.js → registry-CNphafBx.js} +60 -23
  60. package/dist/registry-CYNN623b.d.ts +9 -0
  61. package/dist/request-scope-Dw5n8bMC.js +83 -0
  62. package/dist/results-DgkZUmTL.js +8 -0
  63. package/dist/{chunk-2rV9d50f.js → rolldown-runtime-rQ84J-ij.js} +3 -4
  64. package/dist/runtime/assets.d.ts +3 -5
  65. package/dist/runtime/assets.js +7 -6
  66. package/dist/runtime/empty-assets-registry.d.ts +1 -2
  67. package/dist/runtime/empty-registry.d.ts +2 -2
  68. package/dist/runtime/registry.d.ts +2 -0
  69. package/dist/runtime/registry.js +23 -0
  70. package/dist/runtime/request.d.ts +4 -0
  71. package/dist/runtime/request.js +8 -0
  72. package/dist/runtime/state.d.ts +5 -4
  73. package/dist/runtime/state.js +8 -18
  74. package/dist/runtime/workspace.d.ts +1 -1
  75. package/dist/runtime/workspace.js +1 -1
  76. package/dist/runtime.d.ts +52 -17
  77. package/dist/runtime.js +324 -67
  78. package/dist/{search-BpiCF2Tw.js → search-C_RfoM2j.js} +10 -9
  79. package/dist/server-8tGltlGz.js +303 -0
  80. package/dist/server.d.ts +36 -39
  81. package/dist/server.js +2 -328
  82. package/dist/shared-B3_EUk89.js +848 -0
  83. package/dist/source-metadata.d.ts +10 -7
  84. package/dist/source-metadata.js +12 -12
  85. package/dist/state-BISnUf1s.d.ts +35 -0
  86. package/dist/{ai-BqCC8BpY.js → state-DbrW-njQ.js} +237 -114
  87. package/dist/store-ybhyD38Z.js +1873 -0
  88. package/dist/{sync-DnTQwt8r.js → sync-CCD_VYC8.js} +61 -41
  89. package/dist/target-jWhTdIuF.js +89 -0
  90. package/dist/test.d.ts +1 -1
  91. package/dist/test.js +1 -1
  92. package/dist/{types-CYuwjJ4V.d.ts → types-BbtwmBZ5.d.ts} +321 -35
  93. package/dist/use-C6lV3-wC.d.ts +321 -0
  94. package/dist/{use-BTNDR5Rd.js → use-CSpT5W87.js} +141 -107
  95. package/dist/utils-CgMZCHsX.js +616 -0
  96. package/dist/vite.d.ts +585 -2
  97. package/dist/vite.js +21369 -2
  98. package/dist/workspace-CYB2xZ1T.d.ts +7 -0
  99. package/dist/{workspace-Dq08Yn72.js → workspace-sPWn2Jxj.js} +441 -225
  100. package/package.json +97 -72
  101. package/dist/ai-CjxvGqM0.d.ts +0 -162
  102. package/dist/ai.d.ts +0 -3
  103. package/dist/ai.js +0 -2
  104. package/dist/collections/client.d.ts +0 -39
  105. package/dist/collections/client.js +0 -137
  106. package/dist/collections.d.ts +0 -59
  107. package/dist/collections.js +0 -159
  108. package/dist/config-Bc3c4Su1.js +0 -7904
  109. package/dist/config-CHLLWklZ.js +0 -36
  110. package/dist/file-Bc1X7pco.js +0 -23
  111. package/dist/glob-CEZKeZFC.js +0 -18
  112. package/dist/hosted-vercel-blob-d6C8ND5j.js +0 -23580
  113. package/dist/lifecycle-LrL3sA4n.js +0 -316
  114. package/dist/metadata-target-B0tOmVW7.js +0 -717
  115. package/dist/mountx.d.ts +0 -10
  116. package/dist/mountx.js +0 -143
  117. package/dist/nitro.d.ts +0 -2
  118. package/dist/nitro.js +0 -2
  119. package/dist/nuxt.d.ts +0 -26
  120. package/dist/nuxt.js +0 -42
  121. package/dist/path-Cp59koVz.js +0 -139
  122. package/dist/provider-B1yLjCJJ.js +0 -746
  123. package/dist/publish.d.ts +0 -35
  124. package/dist/publish.js +0 -112
  125. package/dist/registry-Uj6IVxes.d.ts +0 -11
  126. package/dist/request-execution-B-dSFlGB.js +0 -84
  127. package/dist/runtime-options-BsPSv5O7.js +0 -13
  128. package/dist/runtime-type-iEE6BjQJ.js +0 -34
  129. package/dist/shared-DTR1Hhma.js +0 -331
  130. package/dist/state-tYcRWEh2.d.ts +0 -26
  131. package/dist/store-Dt_Jyys3.js +0 -608
  132. package/dist/target-D4Bqb1eH.js +0 -11
  133. package/dist/token-CVzURBxC.js +0 -61
  134. package/dist/use-BiHzt0xA.d.ts +0 -103
  135. package/dist/vite-BptCrpv2.js +0 -4526
  136. package/dist/vite-CtA9guIM.d.ts +0 -66
  137. package/dist/workspace-Xddf4G1B.d.ts +0 -6
@@ -1,10 +1,6 @@
1
1
  import { ExecutionAuthority } from "@vite-hub/runtime";
2
- import { Source, SourceContext, SourceRevision } from "@vite-hub/source";
3
- import { FileSourceOptions } from "@vite-hub/source/file";
4
- import { GitHubSourceOptions } from "@vite-hub/source/github";
5
- import { GlobSourceOptions } from "@vite-hub/source/glob";
2
+ import { FileSourceOptions, GitHubSourceOptions, GlobSourceOptions, Source, SourceContext, SourceRevision } from "@vite-hub/source";
6
3
  import { McpResourcesSourceOptions } from "@vite-hub/source/mcp";
7
-
8
4
  //#region src/core/types.d.ts
9
5
  type WorkspaceContent = string | Uint8Array;
10
6
  type WorkspaceContentStream = ReadableStream<Uint8Array> | AsyncIterable<Uint8Array>;
@@ -17,6 +13,7 @@ type ReadFileResult<TOptions extends ReadFileOptions | undefined = undefined> =
17
13
  interface WriteFileOptions {
18
14
  ifDigest?: string | null;
19
15
  mediaType?: string;
16
+ /** JSON-safe file attributes. Undefined properties, cycles, class instances, and non-finite numbers are rejected before provider dispatch. */
20
17
  metadata?: Record<string, unknown>;
21
18
  preservePath?: boolean;
22
19
  }
@@ -26,6 +23,7 @@ interface ListOptions {
26
23
  recursive?: boolean;
27
24
  }
28
25
  interface GlobOptions {
26
+ /** Workspace-relative directory to match patterns within. Result paths remain relative to the Workspace root. */
29
27
  cwd?: string;
30
28
  }
31
29
  interface WorkspaceSearchQuery {
@@ -48,6 +46,8 @@ interface MkdirOptions {
48
46
  interface RmOptions {
49
47
  recursive?: boolean;
50
48
  force?: boolean;
49
+ /** Remove only when the current file digest matches. */
50
+ ifDigest?: string | null;
51
51
  }
52
52
  type WorkspaceWriteOperation = "writeFile" | "mkdir" | "rm";
53
53
  type WorkspaceWriteMode = boolean | "create" | "update" | "delete";
@@ -55,17 +55,36 @@ interface WorkspaceWriteInput {
55
55
  workspace: string;
56
56
  operation: WorkspaceWriteOperation;
57
57
  path: string;
58
+ /** The history ref of a history commit, such as `draft`. Undefined for writes to the working tree. */
59
+ ref?: string;
58
60
  content?: WorkspaceContent;
59
61
  mediaType?: string;
60
62
  metadata?: Record<string, unknown>;
61
63
  previous?: WorkspaceStat;
62
64
  rule?: ResolvedWorkspaceRule;
65
+ /** The history commit that the write is part of. Undefined for writes to the working tree. */
66
+ commit?: WorkspaceWriteCommit;
67
+ }
68
+ /** What a hook knows of the history commit that a write is part of. It is read-only. */
69
+ interface WorkspaceWriteCommit {
70
+ readonly message?: string;
71
+ /**
72
+ * The revision metadata that the caller passed to `history.commit()`. A plugin can read the intent of the caller from
73
+ * it. For example, `vitehub push --override-lease` records `lease: "override"`.
74
+ */
75
+ readonly metadata: Readonly<Record<string, unknown>>;
76
+ /** Every path that the commit adds, changes, or deletes, in sorted order. A hook can check all of them and name every problem in one error. */
77
+ readonly paths: readonly string[];
63
78
  }
64
79
  type WorkspaceWriteValidatorResult = boolean | void | WorkspaceWriteInput;
65
80
  type WorkspaceWriteValidator = (input: WorkspaceWriteInput) => WorkspaceWriteValidatorResult | Promise<WorkspaceWriteValidatorResult>;
81
+ /**
82
+ * Limits writes to the paths that match the rule pattern. Every matching rule applies, from the least to the most
83
+ * specific. A more specific rule replaces a field only when it sets that field, and the validators of every matching
84
+ * rule run. Rules do not limit reads.
85
+ */
66
86
  interface WorkspaceRule {
67
87
  commit?: boolean | string;
68
- read?: boolean;
69
88
  write?: WorkspaceWriteMode;
70
89
  maxBytes?: number | `${number}kb` | `${number}mb`;
71
90
  mediaType?: string | string[];
@@ -93,11 +112,18 @@ interface WorkspacePlugin {
93
112
  rules?: WorkspaceRules;
94
113
  hooks?: WorkspaceHooks;
95
114
  }
96
- interface SnapshotOptions {
97
- name?: string;
115
+ /** The person that a snapshot or a history commit records as its author. */
116
+ interface WorkspaceAuthor {
117
+ name: string;
118
+ email: string;
98
119
  }
99
- interface WorkspacePublishOptions {
120
+ interface SnapshotOptions {
100
121
  name?: string;
122
+ /**
123
+ * Who made the change, such as the signed-in user. The GitHub and Cloudflare Artifacts Stores write it as the Git
124
+ * commit author. Stores with retained history keep it as `metadata.author` of the revision.
125
+ */
126
+ author?: WorkspaceAuthor;
101
127
  }
102
128
  interface DiffOptions {
103
129
  from?: WorkspaceSnapshot;
@@ -109,7 +135,6 @@ interface WorkspaceSyncSnapshotOptions extends SnapshotOptions {
109
135
  }
110
136
  interface WorkspaceSyncOptions {
111
137
  details?: WorkspaceSyncResultDetails;
112
- publish?: boolean;
113
138
  publishPartial?: boolean;
114
139
  snapshot?: boolean | WorkspaceSyncSnapshotOptions;
115
140
  sources: WorkspaceSourceSelection;
@@ -117,6 +142,12 @@ interface WorkspaceSyncOptions {
117
142
  interface WorkspaceSessionOptions {
118
143
  abortSignal?: AbortSignal;
119
144
  attach?: boolean;
145
+ /**
146
+ * Set when the caller owns `target` and deletes it after `close()`.
147
+ * A hosted Session then leaves the target as it is on close and on failed setup.
148
+ * It does not restore the Workspace tree or excluded paths there. Commits are unchanged.
149
+ */
150
+ disposableTarget?: boolean;
120
151
  host?: WorkspaceSessionHost;
121
152
  materializeSources?: false;
122
153
  onProgress?: (event: WorkspacePrepareSessionProgressEvent) => void | Promise<void>;
@@ -159,6 +190,8 @@ interface WorkspaceSessionHostFiles {
159
190
  interface WorkspaceSessionHost {
160
191
  readonly executionAuthority: ExecutionAuthority;
161
192
  readonly inspectionConcurrency?: number;
193
+ /** Maximum independent workspace files copied into this host concurrently. Defaults to 1. */
194
+ readonly materializationConcurrency?: number;
162
195
  detachAbortSignal?(): void;
163
196
  files: WorkspaceSessionHostFiles;
164
197
  exec(command: string, args?: readonly string[], options?: {
@@ -187,6 +220,8 @@ interface ExecResult {
187
220
  }
188
221
  interface WorkspaceSession {
189
222
  readonly executionAuthority: ExecutionAuthority;
223
+ /** Retained revision used to materialize this Session, when the Store provides one. */
224
+ readonly revision?: string;
190
225
  readFile<TOptions extends ReadFileOptions | undefined = undefined>(path: string, options?: TOptions): Promise<ReadFileResult<TOptions>>;
191
226
  writeFile(path: string, content: WorkspaceContent, options?: WorkspaceSessionWriteFileOptions): Promise<void>;
192
227
  mkdir(path: string, options?: MkdirOptions): Promise<void>;
@@ -234,12 +269,14 @@ interface WorkspaceFile {
234
269
  path: string;
235
270
  content: WorkspaceContent;
236
271
  mediaType?: string;
272
+ /** JSON-safe file attributes: plain objects, dense arrays, strings, booleans, null, and finite numbers except negative zero. `source` is reserved for a string Source name. */
237
273
  metadata?: Record<string, unknown>;
238
274
  }
239
275
  interface WorkspaceStreamFile {
240
276
  path: string;
241
277
  content: WorkspaceContentStream;
242
278
  mediaType?: string;
279
+ /** JSON-safe file attributes: plain objects, dense arrays, strings, booleans, null, and finite numbers except negative zero. `source` is reserved for a string Source name. */
243
280
  metadata?: Record<string, unknown>;
244
281
  }
245
282
  interface WorkspaceEntry {
@@ -252,6 +289,8 @@ interface WorkspaceEntry {
252
289
  digest?: string;
253
290
  }
254
291
  interface WorkspaceStat extends WorkspaceEntry {
292
+ /** Opaque stored-file version. Must change on modification or recreation, even when bytes are unchanged. */
293
+ revision?: string;
255
294
  type: "file" | "directory";
256
295
  }
257
296
  interface WorkspaceSnapshot {
@@ -265,6 +304,214 @@ interface WorkspaceSnapshot {
265
304
  size?: number;
266
305
  }>;
267
306
  }
307
+ interface WorkspaceRevision {
308
+ id: string;
309
+ /** The history ref this revision was committed to. */
310
+ ref: string;
311
+ parentId: string | null;
312
+ createdAt: string;
313
+ message?: string;
314
+ metadata?: Record<string, unknown>;
315
+ /**
316
+ * How many files the revision has, and their total size. The GitHub Store leaves both out of `list()` and `head()`,
317
+ * because counting needs one more request per commit. `open(id)` reports them.
318
+ */
319
+ files?: number;
320
+ bytes?: number;
321
+ }
322
+ interface WorkspaceHistoryRefOptions {
323
+ /** Named history line inside the Workspace. Defaults to `main`. */
324
+ ref?: string;
325
+ }
326
+ /** File content with optional stored attributes. Plain content infers the media type from the path. */
327
+ interface WorkspaceHistoryFileInput {
328
+ content: WorkspaceContent;
329
+ mediaType?: string;
330
+ metadata?: Record<string, unknown>;
331
+ }
332
+ type WorkspaceHistoryFile = WorkspaceContent | WorkspaceHistoryFileInput;
333
+ interface WorkspaceHistoryChanges {
334
+ /** Files to add or replace on top of the ref head. */
335
+ put?: Record<string, WorkspaceHistoryFile>;
336
+ /** Files to remove from the ref head. Each path must exist in the head. */
337
+ delete?: string[];
338
+ }
339
+ interface WorkspaceHistoryCommitBase extends WorkspaceHistoryRefOptions {
340
+ /** The expected head of `ref`. Use null for the first revision on the ref. */
341
+ ifHead: string | null;
342
+ /** Expected heads of other refs that must remain unchanged for the commit. */
343
+ ifHeads?: Record<string, string | null>;
344
+ /**
345
+ * With `ifHead: null`, start the new ref from this revision instead of from the ref that `history.forksFrom(ref)`
346
+ * names. Only Stores with `forksFrom` accept it. The caller has read the files of that revision.
347
+ */
348
+ startFrom?: string;
349
+ message?: string;
350
+ metadata?: Record<string, unknown>;
351
+ }
352
+ interface WorkspaceHistoryFilesCommitOptions extends WorkspaceHistoryCommitBase {
353
+ /** The complete desired file set. Omitted paths are deleted. */
354
+ files: Record<string, WorkspaceHistoryFile>;
355
+ changes?: never;
356
+ }
357
+ interface WorkspaceHistoryChangesCommitOptions extends WorkspaceHistoryCommitBase {
358
+ /** A patch applied to the ref head. Unlisted paths keep their content. */
359
+ changes: WorkspaceHistoryChanges;
360
+ files?: never;
361
+ }
362
+ type WorkspaceHistoryCommitOptions = WorkspaceHistoryFilesCommitOptions | WorkspaceHistoryChangesCommitOptions;
363
+ /** Store commits receive normalized files after rules, validators, hooks, and Source grants pass. */
364
+ type WorkspaceStoreHistoryCommitOptions = WorkspaceHistoryCommitBase & ({
365
+ files: Record<string, WorkspaceFile>;
366
+ changes?: never;
367
+ } | {
368
+ changes: {
369
+ put?: Record<string, WorkspaceFile>;
370
+ delete?: string[];
371
+ };
372
+ files?: never;
373
+ });
374
+ interface WorkspaceHistoryListOptions extends WorkspaceHistoryRefOptions {
375
+ cursor?: string;
376
+ limit?: number;
377
+ /** Return revisions whose file manifest changed at this file or folder path. */
378
+ path?: string;
379
+ }
380
+ interface WorkspaceHistoryListResult {
381
+ revisions: WorkspaceRevision[];
382
+ cursor?: string;
383
+ }
384
+ interface WorkspaceHistoryRef {
385
+ name: string;
386
+ head: WorkspaceRevision;
387
+ }
388
+ interface WorkspaceRevisionView {
389
+ readonly revision: WorkspaceRevision;
390
+ /** File digests, when provided, are the digests of the retained bytes: SHA-256, or the Git blob sha for the GitHub Store. Compute one with `history.digest`. */
391
+ list(path?: string, options?: ListOptions): Promise<WorkspaceEntry[]>;
392
+ stat(path: string): Promise<WorkspaceStat>;
393
+ readFile<TOptions extends ReadFileOptions | undefined = undefined>(path: string, options?: TOptions): Promise<ReadFileResult<TOptions>>;
394
+ /**
395
+ * Read many files of the revision at once, so that `readFile()` of each path needs no request. The GitHub Store reads
396
+ * them from one archive of the commit. Stores without it read each file on its own.
397
+ */
398
+ preload?(paths: readonly string[]): Promise<void>;
399
+ }
400
+ /** An open pull request on a forge, for a Store whose refs are branches. */
401
+ interface WorkspacePullRequest {
402
+ number: number;
403
+ url: string;
404
+ title: string;
405
+ /** The ref of the branch that the pull request merges. */
406
+ head: string;
407
+ /** The ref that it merges into. */
408
+ base: string;
409
+ /** Common ancestor of the head and base, for comparing all changes in the pull request. */
410
+ mergeBase?: string;
411
+ }
412
+ interface WorkspaceOpenPullRequestOptions {
413
+ /** The ref to merge. */
414
+ head: string;
415
+ /** The ref to merge into. */
416
+ base: string;
417
+ title: string;
418
+ body?: string;
419
+ draft?: boolean;
420
+ /** Delete the head ref after GitHub definitively rejects the pull request. Unknown outcomes keep it for recovery. */
421
+ deleteHeadOnFailure?: boolean;
422
+ /** Exclude overlapping open PRs across Store instances. Ambiguous requests retain their reservations until reconciled. */
423
+ reservation?: {
424
+ headPrefix: string;
425
+ paths: string[];
426
+ };
427
+ }
428
+ /** A file that both refs changed in different ways. Digests are the Store's (`history.digest`); null means deleted. */
429
+ interface WorkspaceMergeConflict {
430
+ /** The Workspace path. */
431
+ path: string;
432
+ /** The digest on the ref that receives the merge. */
433
+ ours: string | null;
434
+ /** The digest on the ref that is merged in. */
435
+ theirs: string | null;
436
+ /** The digest at the merge base of both refs. Null when the file did not exist there. */
437
+ base: string | null;
438
+ }
439
+ /** What `onConflict` can use while it resolves conflicts. */
440
+ interface WorkspaceMergeConflictContext {
441
+ /** Reads the bytes of a digest that a conflict names. */
442
+ read(digest: string): Promise<Uint8Array>;
443
+ }
444
+ /** What `onConflict` decided. */
445
+ interface WorkspaceMergeResolution {
446
+ /** Metadata for the merge commit. It is added to `metadata`. */
447
+ metadata?: Record<string, unknown>;
448
+ /**
449
+ * Merged text of conflicting files, by Workspace path. The merge commit writes it instead of the receiving ref's
450
+ * version. A path that is not one of the conflicts throws.
451
+ */
452
+ files?: Record<string, string>;
453
+ }
454
+ interface WorkspaceMergeOptions {
455
+ /**
456
+ * Called when the Store's own merge conflicts. With it, the Store merges everything else and calls this with the
457
+ * files that both refs changed. Each file keeps the receiving ref's version unless the resolution gives its merged
458
+ * text. Without it, a conflict throws `WORKSPACE_CONFLICT`.
459
+ */
460
+ onConflict?(conflicts: WorkspaceMergeConflict[], context: WorkspaceMergeConflictContext): WorkspaceMergeResolution | Promise<WorkspaceMergeResolution>;
461
+ /** The ref to bring in. */
462
+ from: string;
463
+ /** The ref that receives the merge. */
464
+ into: string;
465
+ /** The message of the merge commit. */
466
+ message?: string;
467
+ /** Revision metadata, kept like the metadata of a commit. */
468
+ metadata?: Record<string, unknown>;
469
+ }
470
+ interface WorkspaceHistoryReader {
471
+ /**
472
+ * The open pull requests whose head ref starts with `headPrefix`, newest first, for a Store that has them. The GitHub
473
+ * Store finds the branches with that prefix first, so it requires `headPrefix`.
474
+ */
475
+ pullRequests?(options?: {
476
+ headPrefix?: string;
477
+ }): Promise<WorkspacePullRequest[]>;
478
+ /**
479
+ * The digest of file bytes, as `WorkspaceEntry.digest` reports it for this Store: SHA-256 by default, the Git blob sha
480
+ * for the GitHub Store. Compare digests only with this function.
481
+ */
482
+ digest?(bytes: Uint8Array): Promise<string>;
483
+ /**
484
+ * The ref that a missing `ref` starts from when a commit creates it with `ifHead: null`, or undefined when the ref
485
+ * starts empty. The GitHub Store starts `draft` from the head of `published`.
486
+ */
487
+ forksFrom?(ref: string): Promise<string | undefined>;
488
+ head(options?: WorkspaceHistoryRefOptions): Promise<WorkspaceRevision | null>;
489
+ list(options?: WorkspaceHistoryListOptions): Promise<WorkspaceHistoryListResult>;
490
+ /** Refs that have at least one revision, sorted by name. */
491
+ refs(): Promise<WorkspaceHistoryRef[]>;
492
+ open(id: string): Promise<WorkspaceRevisionView>;
493
+ /** Unique uncompressed file bytes retained across committed revisions on every ref. */
494
+ usage(): Promise<{
495
+ bytes: number;
496
+ objects: number;
497
+ }>;
498
+ }
499
+ /** Writes that only some Stores have. A Store without them leaves the members out. */
500
+ interface WorkspaceHistoryExtensions {
501
+ /** Merge `from` into `into` with a merge commit. Returns null when `into` already has everything in `from`. A merge that conflicts throws `WORKSPACE_CONFLICT`. */
502
+ merge?(options: WorkspaceMergeOptions): Promise<WorkspaceRevision | null>;
503
+ /** Open a pull request from one ref into another. */
504
+ openPullRequest?(options: WorkspaceOpenPullRequestOptions): Promise<WorkspacePullRequest>;
505
+ }
506
+ interface WorkspaceRetainedHistory extends WorkspaceHistoryReader, WorkspaceHistoryExtensions {
507
+ commit(options: WorkspaceHistoryCommitOptions): Promise<WorkspaceRevision>;
508
+ }
509
+ /** Run the Workspace commit policy on a prepared merge before the Store advances its destination ref. */
510
+ type WorkspaceMergeCommit = (options: WorkspaceStoreHistoryCommitOptions, apply: (checked: WorkspaceStoreHistoryCommitOptions) => Promise<WorkspaceRevision>) => Promise<WorkspaceRevision>;
511
+ interface WorkspaceStoreHistory extends WorkspaceHistoryReader, Omit<WorkspaceHistoryExtensions, "merge"> {
512
+ merge?(options: WorkspaceMergeOptions, commit?: WorkspaceMergeCommit): Promise<WorkspaceRevision | null>;
513
+ commit(options: WorkspaceStoreHistoryCommitOptions): Promise<WorkspaceRevision>;
514
+ }
268
515
  interface WorkspaceDiffEntry {
269
516
  path: string;
270
517
  type: "added" | "modified" | "removed";
@@ -284,6 +531,7 @@ interface WorkspaceRebaseOptions {
284
531
  takeRemote?: string[];
285
532
  }
286
533
  interface WorkspaceStore {
534
+ history?: WorkspaceStoreHistory;
287
535
  readFile(path: string): Promise<WorkspaceFile | undefined>;
288
536
  writeFile(path: string, file: WorkspaceFile): Promise<void>;
289
537
  writeFileConditional?(path: string, file: WorkspaceFile, ifDigest: string | null): Promise<void>;
@@ -295,11 +543,12 @@ interface WorkspaceStore {
295
543
  stat(path: string): Promise<WorkspaceStat | undefined>;
296
544
  mkdir(path: string, options?: MkdirOptions): Promise<void>;
297
545
  rm(path: string, options?: RmOptions): Promise<void>;
546
+ removeEmptyDirectory?(path: string): Promise<void>;
298
547
  snapshot(options?: SnapshotOptions): Promise<WorkspaceSnapshot>;
299
548
  rebase?(options?: WorkspaceRebaseOptions): Promise<void>;
300
549
  diff(options?: DiffOptions): Promise<WorkspaceDiff>;
301
550
  getMeta?(key: string): Promise<unknown>;
302
- setMeta?(key: string, value: unknown): Promise<void>;
551
+ setMeta?(key: string, value: unknown, capability?: symbol): Promise<void>;
303
552
  }
304
553
  interface SourceContextWorkspaceFiles {
305
554
  readFile<TOptions extends ReadFileOptions | undefined = undefined>(path: string, options?: TOptions): Promise<ReadFileResult<TOptions>>;
@@ -395,6 +644,8 @@ interface WorkspaceSourceRequestDescriptor {
395
644
  }
396
645
  interface WorkspaceSourceRequestExecutionInput {
397
646
  body?: unknown;
647
+ /** Abort a controlled request when its owning Shell invocation ends. */
648
+ signal?: AbortSignal;
398
649
  method: WorkspaceSourceRequestMethod;
399
650
  url: string;
400
651
  }
@@ -406,8 +657,15 @@ interface WorkspaceSourceRequestExecutionResult {
406
657
  }
407
658
  type WorkspaceSourceRequestExecutor = (input: WorkspaceSourceRequestExecutionInput, context: SourceContext$1) => MaybePromise<WorkspaceSourceRequestExecutionResult>;
408
659
  interface WorkspaceSource {
660
+ /** `false` keeps the Skills in this Source out of a Provider Agent's skill roots. */
661
+ skills?: false;
409
662
  /** Stable provider name used for inspection and diagnostics. */
410
663
  name?: string;
664
+ /**
665
+ * The key of the one item of a file Source. Without a mount path, the Workspace places that item at this path.
666
+ * Other Sources mount under their binding key.
667
+ */
668
+ key?: string;
411
669
  mount?: WorkspaceSourceMount;
412
670
  materialize?: WorkspaceMaterializeMode;
413
671
  cache?: false | WorkspaceCacheOptions;
@@ -418,10 +676,20 @@ interface WorkspaceSource {
418
676
  resolve?: WorkspaceSourceResolver;
419
677
  resolveRevision?(ctx: SourceContext$1): Promise<SourceRevision | undefined>;
420
678
  prepare?(ctx: SourceContext$1): Promise<void>;
679
+ /**
680
+ * The build calls it for a `lazy` or `startup` Source, which the app reads after deploy. It throws when the Source
681
+ * cannot reach its data with the credentials of the build, so a revoked token fails the build and not the first read.
682
+ */
683
+ checkAccess?(ctx: SourceContext$1): Promise<void>;
421
684
  getKeys(ctx: SourceContext$1): Promise<string[]>;
422
685
  getItem(key: string, ctx: SourceContext$1): Promise<WorkspaceSourceItem>;
423
686
  getItems?(ctx: SourceContext$1): Promise<WorkspaceSourceItem[]>;
424
687
  getMeta?(key: string, ctx: SourceContext$1): Promise<Record<string, unknown> | undefined>;
688
+ /**
689
+ * Returns a Source that holds only the items that match `include`, inside the items this Source holds.
690
+ * GitHub Sources fetch only the matching paths.
691
+ */
692
+ subset?(include: readonly string[]): WorkspaceSource;
425
693
  }
426
694
  interface WorkspaceSourceSyncPolicy {
427
695
  concurrency?: "skip" | "queue";
@@ -432,6 +700,8 @@ type WorkspaceSourceDefinition = WorkspaceSource | Source;
432
700
  type WorkspaceSourceBindingOptions = Pick<WorkspaceSource, "cache" | "materialize" | "mount" | "probeKeys" | "sync" | "validate">;
433
701
  interface WorkspaceSourceBindingInput extends WorkspaceSourceBindingOptions {
434
702
  source: WorkspaceSourceInput;
703
+ /** `false` keeps the Skills in this Source out of a Provider Agent's skill roots. */
704
+ skills?: false;
435
705
  }
436
706
  type WorkspaceCustomSourceInput = WorkspaceSourceDefinition & WorkspaceSourceBindingOptions;
437
707
  type WorkspaceFileSourceInput<TKey extends string = string> = TKey | (FileSourceOptions<TKey> & WorkspaceSourceBindingOptions);
@@ -483,19 +753,6 @@ interface WorkspaceLoader {
483
753
  schema?: unknown;
484
754
  load(ctx: LoaderContext): Promise<void>;
485
755
  }
486
- interface PublishContext {
487
- abortSignal?: AbortSignal;
488
- durable: boolean;
489
- workspace: WorkspaceDefinition;
490
- store: WorkspaceStore;
491
- rootDir: string;
492
- snapshot?: WorkspaceSnapshot;
493
- }
494
- interface WorkspacePublisher {
495
- name: string;
496
- clientSafe?: boolean;
497
- publish(ctx: PublishContext): Promise<void>;
498
- }
499
756
  interface Logger {
500
757
  debug(...args: unknown[]): void;
501
758
  info(...args: unknown[]): void;
@@ -503,14 +760,25 @@ interface Logger {
503
760
  error(...args: unknown[]): void;
504
761
  }
505
762
  interface LocalWorkspaceStoreOptions {
506
- provider?: "local";
763
+ /**
764
+ * `"git"` hides `.git` and paths that Git ignores, such as dependencies and build output, from
765
+ * listings, snapshots, and diffs. The root must be a Git checkout.
766
+ */
767
+ ignore?: "git";
768
+ /**
769
+ * Path lock scope. `"filesystem"` (default) coordinates every process that shares the root
770
+ * through lock directories under `.vitehub/locks`. `"process"` keeps the same per-path read and
771
+ * write locks in memory. Use it only when one process owns the root.
772
+ */
773
+ locks?: "filesystem" | "process";
774
+ driver?: "local";
507
775
  root?: string;
508
776
  }
509
777
  interface MemoryWorkspaceStoreOptions {
510
- provider: "memory";
778
+ driver: "memory";
511
779
  }
512
780
  interface CloudflareArtifactsWorkspaceStoreOptions {
513
- provider: "cloudflare-artifacts";
781
+ driver: "cloudflare";
514
782
  binding?: string;
515
783
  namespace?: string;
516
784
  repo?: string;
@@ -518,17 +786,36 @@ interface CloudflareArtifactsWorkspaceStoreOptions {
518
786
  branch?: string;
519
787
  }
520
788
  interface VercelBlobWorkspaceStoreOptions {
521
- provider: "vercel-blob";
789
+ driver: "vercel";
522
790
  token?: string;
791
+ /**
792
+ * A namespace under `_vitehub/workspaces/`. For example, `handbook`
793
+ * stores Workspace files under `_vitehub/workspaces/handbook/`.
794
+ */
523
795
  prefix?: string;
524
796
  access?: "private" | "public";
525
797
  }
526
798
  type GitHubWorkspaceOption = string | (() => string | undefined);
799
+ /**
800
+ * Branch names for the history refs `published` and `draft`. A history call on `published` reads or writes
801
+ * `refs.published`, and revisions on that branch report the ref `published`. A ref without an alias is its own branch name.
802
+ */
803
+ interface GitHubWorkspaceRefs {
804
+ published?: string;
805
+ draft?: string;
806
+ }
527
807
  interface GitHubWorkspaceStoreOptions {
528
- provider: "github";
808
+ driver: "github";
529
809
  branch?: GitHubWorkspaceOption;
810
+ /**
811
+ * An opaque value that the store target carries for consumers that keep their own rows next to the Workspace, such as a
812
+ * Drizzle Database. The store does not use it.
813
+ */
814
+ database?: unknown;
815
+ refs?: GitHubWorkspaceRefs;
530
816
  repo?: GitHubWorkspaceOption;
531
817
  repository?: GitHubWorkspaceOption;
818
+ /** The folder of the Workspace in the repository. An empty string is the repository root. Defaults to `.vitehub/workspaces/<workspace>`. */
532
819
  root?: GitHubWorkspaceOption;
533
820
  token?: GitHubWorkspaceOption;
534
821
  }
@@ -542,7 +829,6 @@ interface WorkspaceDefinition {
542
829
  bindings?: Record<string, WorkspaceInstructionBinding>;
543
830
  sources?: Record<string, WorkspaceSourceInput>;
544
831
  loaders?: WorkspaceLoader[];
545
- publish?: WorkspacePublisher[];
546
832
  plugins?: WorkspacePlugin[];
547
833
  rules?: WorkspaceRules;
548
834
  hooks?: WorkspaceHooks;
@@ -550,7 +836,7 @@ interface WorkspaceDefinition {
550
836
  type WorkspaceDefinitionInput = Omit<WorkspaceDefinition, "name"> & {
551
837
  name?: never;
552
838
  };
553
- interface WorkspaceModuleOptions {
839
+ interface WorkspaceOptions {
554
840
  root?: string;
555
841
  projectRoot?: string;
556
842
  assets?: boolean | string[];
@@ -563,14 +849,16 @@ interface ResolvedWorkspaceModuleOptions {
563
849
  }
564
850
  interface WorkspaceCapabilities {
565
851
  conditionalWrites: boolean;
852
+ retainedHistory?: boolean;
566
853
  }
567
854
  interface Workspace {
568
855
  name: string;
856
+ history: WorkspaceRetainedHistory;
569
857
  capabilities?(): Promise<WorkspaceCapabilities>;
570
858
  sync(options: WorkspaceSyncOptions): Promise<WorkspaceSourceSyncResult>;
571
859
  materializeSources?(options?: WorkspaceMaterializeSourcesOptions): Promise<WorkspaceMaterializeSourcesResult>;
572
860
  getMeta?(key: string): Promise<unknown>;
573
- setMeta?(key: string, value: unknown): Promise<void>;
861
+ setMeta?(key: string, value: unknown, capability?: symbol): Promise<void>;
574
862
  readFile<TOptions extends ReadFileOptions | undefined = undefined>(path: string, options?: TOptions): Promise<ReadFileResult<TOptions>>;
575
863
  writeFile(path: string, content: WorkspaceContent, options?: WriteFileOptions): Promise<string>;
576
864
  list(path?: string, options?: ListOptions): Promise<WorkspaceEntry[]>;
@@ -580,7 +868,6 @@ interface Workspace {
580
868
  exists(path: string): Promise<boolean>;
581
869
  mkdir(path: string, options?: MkdirOptions): Promise<void>;
582
870
  rm(path: string, options?: RmOptions): Promise<void>;
583
- publish(options?: WorkspacePublishOptions): Promise<void>;
584
871
  snapshot(options?: SnapshotOptions): Promise<WorkspaceSnapshot>;
585
872
  rebase(options?: WorkspaceRebaseOptions): Promise<void>;
586
873
  diff(options?: DiffOptions): Promise<WorkspaceDiff>;
@@ -607,7 +894,6 @@ interface WorkspaceSourceSyncStatus {
607
894
  }
608
895
  interface WorkspaceSourceSyncResult {
609
896
  durationMs: number;
610
- published: boolean;
611
897
  snapshot?: WorkspaceSnapshot;
612
898
  sources: WorkspaceSourceSyncStatus[];
613
899
  status: "error" | "partial" | "ready" | "skipped";
@@ -676,4 +962,4 @@ interface WorkspaceMaterializeSourcesResult {
676
962
  sources: WorkspaceSourceMaterializationStatus[];
677
963
  }
678
964
  //#endregion
679
- export { WorkspaceMaterializeSourcesOptions as $, WorkspaceStore as $t, WorkspaceCacheOptions as A, WorkspaceSourceMaterializationPathResult as At, WorkspaceFetchSourceInput as B, WorkspaceSourceResolutionContextMap as Bt, SourceContextWorkspaceFiles as C, WorkspaceSnapshot as Ct, WorkspaceAssets as D, WorkspaceSourceInput as Dt, WorkspaceAssetPath as E, WorkspaceSourceDefinition as Et, WorkspaceDefinition as F, WorkspaceSourceRequestExecutionInput as Ft, WorkspaceGlobSourceInput as G, WorkspaceSourceSelection as Gt, WorkspaceFile as H, WorkspaceSourceResolutionInvocation as Ht, WorkspaceDefinitionInput as I, WorkspaceSourceRequestExecutionResult as It, WorkspaceInstructionBinding as J, WorkspaceSourceSyncPathResult as Jt, WorkspaceHookContext as K, WorkspaceSourceSyncConfig as Kt, WorkspaceDiff as L, WorkspaceSourceRequestExecutor as Lt, WorkspaceContent as M, WorkspaceSourceMount as Mt, WorkspaceContentStream as N, WorkspaceSourceMountOptions as Nt, WorkspaceAssetsRegistry as O, WorkspaceSourceItem as Ot, WorkspaceCustomSourceInput as P, WorkspaceSourceRequestDescriptor as Pt, WorkspaceMaterializeMode as Q, WorkspaceStat as Qt, WorkspaceDiffEntry as R, WorkspaceSourceRequestMethod as Rt, SourceContext$1 as S, WorkspaceSessionWriteFileOptions as St, Workspace as T, WorkspaceSourceBindingInput as Tt, WorkspaceFileSourceInput as U, WorkspaceSourceResolutionResult as Ut, WorkspaceFetchSourceRequestOptions as V, WorkspaceSourceResolutionContextValueReader as Vt, WorkspaceGitHubSourceInput as W, WorkspaceSourceResolver as Wt, WorkspaceLoader as X, WorkspaceSourceSyncResult as Xt, WorkspaceInstructionBindingValue as Y, WorkspaceSourceSyncPolicy as Yt, WorkspaceLoaderSource as Z, WorkspaceSourceSyncStatus as Zt, ReadFileResult as _, WorkspaceSession as _t, GitHubWorkspaceOption as a, WorkspaceValidateMode as an, WorkspaceNameMap as at, RmOptions as b, WorkspaceSessionHostFiles as bt, ListOptions as c, WorkspaceWriteInput as cn, WorkspacePublishOptions as ct, Logger as d, WorkspaceWriteValidator as dn, WorkspaceRule as dt, WorkspaceStoreOptions as en, WorkspaceMaterializeSourcesProgressEvent as et, MaybePromise as f, WorkspaceWriteValidatorResult as fn, WorkspaceRules as ft, ReadFileOptions as g, WorkspaceSelectedScope as gt, PublishContext as h, WorkspaceSearchQuery as ht, ExecResult as i, WorkspaceSyncSnapshotOptions as in, WorkspaceName as it, WorkspaceCapabilities as j, WorkspaceSourceMaterializationStatus as jt, WorkspaceAutoCommitPlan as k, WorkspaceSourceMaterializationCounts as kt, LoaderContext as l, WorkspaceWriteMode as ln, WorkspacePublisher as lt, MkdirOptions as m, WorkspaceSearchHit as mt, DiffOptions as n, WorkspaceSyncOptions as nn, WorkspaceMcpResourcesSourceInput as nt, GitHubWorkspaceStoreOptions as o, WorkspaceWriteErrorHook as on, WorkspacePlugin as ot, MemoryWorkspaceStoreOptions as p, WriteFileOptions as pn, WorkspaceScopeName as pt, WorkspaceHooks as q, WorkspaceSourceSyncCounts as qt, ExecOptions as r, WorkspaceSyncResultDetails as rn, WorkspaceModuleOptions as rt, GlobOptions as s, WorkspaceWriteHook as sn, WorkspacePrepareSessionProgressEvent as st, CloudflareArtifactsWorkspaceStoreOptions as t, WorkspaceStreamFile as tn, WorkspaceMaterializeSourcesResult as tt, LocalWorkspaceStoreOptions as u, WorkspaceWriteOperation as un, WorkspaceRebaseOptions as ut, ResolvedWorkspaceModuleOptions as v, WorkspaceSessionHost as vt, VercelBlobWorkspaceStoreOptions as w, WorkspaceSource as wt, SnapshotOptions as x, WorkspaceSessionOptions as xt, ResolvedWorkspaceRule as y, WorkspaceSessionHostFileEntry as yt, WorkspaceEntry as z, WorkspaceSourceResolutionContext as zt };
965
+ export { WorkspaceHistoryFileInput as $, WorkspaceSourceMaterializationStatus as $t, WorkspaceAutoCommitPlan as A, WorkspaceWriteCommit as An, WorkspaceRetainedHistory as At, WorkspaceEntry as B, WorkspaceSessionHost as Bt, SourceContextWorkspaceFiles as C, WorkspaceStoreHistoryCommitOptions as Cn, WorkspaceNameMap as Ct, WorkspaceAssets as D, WorkspaceSyncResultDetails as Dn, WorkspacePrepareSessionProgressEvent as Dt, WorkspaceAssetPath as E, WorkspaceSyncOptions as En, WorkspacePlugin as Et, WorkspaceCustomSourceInput as F, WorkspaceWriteOperation as Fn, WorkspaceScopeName as Ft, WorkspaceGitHubSourceInput as G, WorkspaceSnapshot as Gt, WorkspaceFetchSourceRequestOptions as H, WorkspaceSessionHostFiles as Ht, WorkspaceDefinition as I, WorkspaceWriteValidator as In, WorkspaceSearchHit as It, WorkspaceHistoryChangesCommitOptions as J, WorkspaceSourceDefinition as Jt, WorkspaceGlobSourceInput as K, WorkspaceSource as Kt, WorkspaceDefinitionInput as L, WorkspaceWriteValidatorResult as Ln, WorkspaceSearchQuery as Lt, WorkspaceCapabilities as M, WorkspaceWriteHook as Mn, WorkspaceRevisionView as Mt, WorkspaceContent as N, WorkspaceWriteInput as Nn, WorkspaceRule as Nt, WorkspaceAssetsRegistry as O, WorkspaceSyncSnapshotOptions as On, WorkspacePullRequest as Ot, WorkspaceContentStream as P, WorkspaceWriteMode as Pn, WorkspaceRules as Pt, WorkspaceHistoryFile as Q, WorkspaceSourceMaterializationPathResult as Qt, WorkspaceDiff as R, WriteFileOptions as Rn, WorkspaceSelectedScope as Rt, SourceContext$1 as S, WorkspaceStoreHistory as Sn, WorkspaceName as St, Workspace as T, WorkspaceStreamFile as Tn, WorkspaceOptions as Tt, WorkspaceFile as U, WorkspaceSessionOptions as Ut, WorkspaceFetchSourceInput as V, WorkspaceSessionHostFileEntry as Vt, WorkspaceFileSourceInput as W, WorkspaceSessionWriteFileOptions as Wt, WorkspaceHistoryCommitOptions as X, WorkspaceSourceItem as Xt, WorkspaceHistoryCommitBase as Y, WorkspaceSourceInput as Yt, WorkspaceHistoryExtensions as Z, WorkspaceSourceMaterializationCounts as Zt, ReadFileResult as _, WorkspaceSourceSyncPolicy as _n, WorkspaceMergeCommit as _t, GitHubWorkspaceOption as a, WorkspaceSourceRequestExecutor as an, WorkspaceHistoryRefOptions as at, RmOptions as b, WorkspaceStat as bn, WorkspaceMergeOptions as bt, GlobOptions as c, WorkspaceSourceResolutionContextMap as cn, WorkspaceInstructionBinding as ct, LocalWorkspaceStoreOptions as d, WorkspaceSourceResolutionResult as dn, WorkspaceLoaderSource as dt, WorkspaceSourceMount as en, WorkspaceHistoryFilesCommitOptions as et, Logger as f, WorkspaceSourceResolver as fn, WorkspaceMaterializeMode as ft, ReadFileOptions as g, WorkspaceSourceSyncPathResult as gn, WorkspaceMcpResourcesSourceInput as gt, MkdirOptions as h, WorkspaceSourceSyncCounts as hn, WorkspaceMaterializeSourcesResult as ht, ExecResult as i, WorkspaceSourceRequestExecutionResult as in, WorkspaceHistoryRef as it, WorkspaceCacheOptions as j, WorkspaceWriteErrorHook as jn, WorkspaceRevision as jt, WorkspaceAuthor as k, WorkspaceValidateMode as kn, WorkspaceRebaseOptions as kt, ListOptions as l, WorkspaceSourceResolutionContextValueReader as ln, WorkspaceInstructionBindingValue as lt, MemoryWorkspaceStoreOptions as m, WorkspaceSourceSyncConfig as mn, WorkspaceMaterializeSourcesProgressEvent as mt, DiffOptions as n, WorkspaceSourceRequestDescriptor as nn, WorkspaceHistoryListResult as nt, GitHubWorkspaceRefs as o, WorkspaceSourceRequestMethod as on, WorkspaceHookContext as ot, MaybePromise as p, WorkspaceSourceSelection as pn, WorkspaceMaterializeSourcesOptions as pt, WorkspaceHistoryChanges as q, WorkspaceSourceBindingInput as qt, ExecOptions as r, WorkspaceSourceRequestExecutionInput as rn, WorkspaceHistoryReader as rt, GitHubWorkspaceStoreOptions as s, WorkspaceSourceResolutionContext as sn, WorkspaceHooks as st, CloudflareArtifactsWorkspaceStoreOptions as t, WorkspaceSourceMountOptions as tn, WorkspaceHistoryListOptions as tt, LoaderContext as u, WorkspaceSourceResolutionInvocation as un, WorkspaceLoader as ut, ResolvedWorkspaceModuleOptions as v, WorkspaceSourceSyncResult as vn, WorkspaceMergeConflict as vt, VercelBlobWorkspaceStoreOptions as w, WorkspaceStoreOptions as wn, WorkspaceOpenPullRequestOptions as wt, SnapshotOptions as x, WorkspaceStore as xn, WorkspaceMergeResolution as xt, ResolvedWorkspaceRule as y, WorkspaceSourceSyncStatus as yn, WorkspaceMergeConflictContext as yt, WorkspaceDiffEntry as z, WorkspaceSession as zt };