@vite-hub/workspace 0.3.1 → 0.4.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.
Files changed (78) hide show
  1. package/README.md +17 -13
  2. package/dist/blob-database.d.ts +1 -1
  3. package/dist/blob-database.js +6 -6
  4. package/dist/checkout.js +1 -1
  5. package/dist/cloudflare.d.ts +1 -1
  6. package/dist/cloudflare.js +1 -1
  7. package/dist/{config-BQKcPawI.d.ts → config-CDeGd0RB.d.ts} +1 -1
  8. package/dist/{config-BAgL2dtB.js → config-D1QENneP.js} +21 -21
  9. package/dist/durability.d.ts +1 -1
  10. package/dist/durability.js +2 -2
  11. package/dist/{error-diagnostics-CtKjGtGb.js → error-diagnostics-B5s9kNEA.js} +10 -6
  12. package/dist/{error-diagnostics-DSkCJC_L.js → error-diagnostics-CQ4BUqRe.js} +5 -1
  13. package/dist/{file-2pFYNtsU.js → file-CqG9zqiF.js} +1 -1
  14. package/dist/{files-BOo4SbwE.js → files-B6wpAhEx.js} +1 -1
  15. package/dist/files.d.ts +5 -5
  16. package/dist/files.js +4 -4
  17. package/dist/{github-CrYp4v8k.js → github-DKAlO0Vh.js} +3 -3
  18. package/dist/{glob-B8YGvTrZ.js → glob-BOqSKzSg.js} +1 -1
  19. package/dist/{host-BFBpXn0N.js → host-Bf1a2uo_.js} +4 -4
  20. package/dist/{hosted-vercel-blob-B3-wRdUm.js → hosted-vercel-blob-AbXG8fvR.js} +3 -3
  21. package/dist/hosted-vercel-blob.d.ts +1 -1
  22. package/dist/hosted-vercel-blob.js +1 -1
  23. package/dist/{hosted-KcUR_jPv.js → hosted-zG7HJaE4.js} +6 -6
  24. package/dist/hosted.d.ts +1 -1
  25. package/dist/hosted.js +1 -1
  26. package/dist/index.d.ts +12 -12
  27. package/dist/index.js +15 -15
  28. package/dist/{lifecycle-B-enk_4A.js → lifecycle-D8FdpBod.js} +4 -4
  29. package/dist/loader.d.ts +1 -1
  30. package/dist/loader.js +1 -1
  31. package/dist/{mcp-resources-DF0F5rcL.js → mcp-resources-DntxtmDU.js} +1 -1
  32. package/dist/{memory-BOexthyW.js → memory-D5jq9HZW.js} +1 -1
  33. package/dist/{metadata-target-CWz6KHKq.js → metadata-target-DDoOQNp1.js} +3 -3
  34. package/dist/{operation-definition-8gOe-ubD.d.ts → operation-definition-nmRu_O3V.d.ts} +5 -0
  35. package/dist/{operations-C6FpR8Rr.js → operations-D8uCpzhM.js} +4 -4
  36. package/dist/{operations-CE2drFih.js → operations-DsY2MQnG.js} +207 -141
  37. package/dist/operations.d.ts +2 -2
  38. package/dist/operations.js +1 -1
  39. package/dist/{path-AxMho1wo.d.ts → path-uxLkzrZm.d.ts} +1 -1
  40. package/dist/{plugins-C8C0auoW.d.ts → plugins-CsrXCA1Q.d.ts} +1 -1
  41. package/dist/{provider-9s4Ufkm5.js → provider-sm9uzkLg.js} +7 -6
  42. package/dist/providers/github/store.d.ts +1 -1
  43. package/dist/providers/github/store.js +1 -1
  44. package/dist/{registry-B3BBm4Ts.d.ts → registry-CFl1Htyc.d.ts} +1 -1
  45. package/dist/{registry-CYNN623b.d.ts → registry-CwryP59t.d.ts} +2 -2
  46. package/dist/{registry-CNphafBx.js → registry-DmVfUe4K.js} +2 -2
  47. package/dist/runtime/assets.d.ts +1 -1
  48. package/dist/runtime/empty-assets-registry.d.ts +1 -1
  49. package/dist/runtime/empty-registry.d.ts +2 -2
  50. package/dist/runtime/registry.d.ts +1 -1
  51. package/dist/runtime/state.d.ts +4 -4
  52. package/dist/runtime/state.js +6 -6
  53. package/dist/runtime/workspace.d.ts +1 -1
  54. package/dist/runtime/workspace.js +1 -1
  55. package/dist/runtime.d.ts +7 -7
  56. package/dist/runtime.js +13 -13
  57. package/dist/{server-8tGltlGz.js → server-Cd4-iCh5.js} +4 -4
  58. package/dist/server.d.ts +2 -2
  59. package/dist/server.js +1 -1
  60. package/dist/{shared-B3_EUk89.js → shared-ovXVSV3-.js} +9 -5
  61. package/dist/source-metadata.d.ts +2 -2
  62. package/dist/source-metadata.js +3 -3
  63. package/dist/{state-BISnUf1s.d.ts → state-C-YtsaiJ.d.ts} +4 -4
  64. package/dist/{state-DbrW-njQ.js → state-Cb_hIyAw.js} +4 -4
  65. package/dist/{store-ybhyD38Z.js → store-NZoRto-Y.js} +107 -7
  66. package/dist/{sync-CCD_VYC8.js → sync-CrT8zjwc.js} +3 -3
  67. package/dist/{target-jWhTdIuF.js → target-Dm9dHAVJ.js} +1 -1
  68. package/dist/test.d.ts +1 -1
  69. package/dist/test.js +1 -1
  70. package/dist/{types-BbtwmBZ5.d.ts → types-1Z-tKK3g.d.ts} +17 -2
  71. package/dist/{use-CSpT5W87.js → use-B0o5HoBl.js} +8 -8
  72. package/dist/{use-C6lV3-wC.d.ts → use-CjbF8EO9.d.ts} +1 -1
  73. package/dist/{utils-CgMZCHsX.js → utils-Dw-WULEZ.js} +10 -4
  74. package/dist/vite.d.ts +4 -2
  75. package/dist/vite.js +559 -354
  76. package/dist/{workspace-CYB2xZ1T.d.ts → workspace-CIXgHeyX.d.ts} +1 -1
  77. package/dist/{workspace-sPWn2Jxj.js → workspace-DvKu5PRa.js} +12 -12
  78. package/package.json +14 -14
@@ -1,4 +1,4 @@
1
- import { I as WorkspaceDefinition, T as Workspace } from "./types-BbtwmBZ5.js";
1
+ import { I as WorkspaceDefinition, T as Workspace } from "./types-1Z-tKK3g.js";
2
2
  //#region src/core/workspace.d.ts
3
3
  declare function createWorkspace(definition: WorkspaceDefinition, options?: {
4
4
  reuseStartupSnapshots?: boolean;
@@ -1,15 +1,15 @@
1
- import { t as createMemoryWorkspaceStore } from "./memory-BOexthyW.js";
1
+ import { t as createMemoryWorkspaceStore } from "./memory-D5jq9HZW.js";
2
2
  import { s as workspaceError, t as normalizeSafeWorkspacePath } from "./path-DrSIenjj.js";
3
- import { o as copyJsonFileMetadata, t as forwardWorkspaceStoreTarget } from "./target-jWhTdIuF.js";
3
+ import { o as copyJsonFileMetadata, t as forwardWorkspaceStoreTarget } from "./target-Dm9dHAVJ.js";
4
4
  import { a as isExcludedWorkspacePath, f as sha256, i as decodeFile, l as normalizeWorkspacePath, n as contentStreamToBytes, r as contentToBytes, s as matchesAny } from "./path--wrT_Azm.js";
5
- import { t as workspaceErrorDiagnostics } from "./error-diagnostics-CtKjGtGb.js";
6
- import { d as normalizeHistoryRef, i as createWorkspaceHistory, l as historyConflict, m as createWorkspaceWritePolicy } from "./utils-CgMZCHsX.js";
5
+ import { t as workspaceErrorDiagnostics } from "./error-diagnostics-B5s9kNEA.js";
6
+ import { d as normalizeHistoryRef, f as rejectHistoryHead, h as createWorkspaceWritePolicy, i as createWorkspaceHistory, l as historyConflict } from "./utils-Dw-WULEZ.js";
7
7
  import { t as createWorkspaceGlobMatcher } from "./glob-Cjxms1t7.js";
8
- import { t as createWorkspaceStoreFromProvider } from "./provider-9s4Ufkm5.js";
9
- import { n as forwardWorkspaceRevisionMaterializer } from "./store-ybhyD38Z.js";
8
+ import { t as createWorkspaceStoreFromProvider } from "./provider-sm9uzkLg.js";
9
+ import { n as forwardWorkspaceRevisionMaterializer } from "./store-NZoRto-Y.js";
10
10
  import { t as searchText } from "./search-C_RfoM2j.js";
11
- import { a as normalizeWorkspaceSources, c as sourceMountIntersectsPath, f as prepareWorkspaceSource, g as getWorkspaceSourceRequestExecutor, n as createSourceContext, s as sourceMountContainsPath, v as workspaceSourceRequestDescriptorPath, y as requestJsonEqual } from "./config-BAgL2dtB.js";
12
- import { C as withWorkspaceStoreMutation, D as readWorkspaceFileOwner, _ as reconcileRemovedStartupSources, b as statVirtualSourcePath, c as workspaceInternalMetadataCapability, f as materializeWorkspaceSources, g as readSourceSnapshotPaths, h as readResolvedSourceFile, l as hasCurrentSourceSnapshot, m as readCurrentSourceSnapshot, n as createWorkspaceMetadataTarget, p as materializesCompleteSource, t as attachWorkspaceMetadataTarget, u as hasFreshSourceSnapshot, v as searchMaterializedStore } from "./metadata-target-CWz6KHKq.js";
11
+ import { a as normalizeWorkspaceSources, c as sourceMountIntersectsPath, f as prepareWorkspaceSource, g as getWorkspaceSourceRequestExecutor, n as createSourceContext, s as sourceMountContainsPath, v as workspaceSourceRequestDescriptorPath, y as requestJsonEqual } from "./config-D1QENneP.js";
12
+ import { C as withWorkspaceStoreMutation, D as readWorkspaceFileOwner, _ as reconcileRemovedStartupSources, b as statVirtualSourcePath, c as workspaceInternalMetadataCapability, f as materializeWorkspaceSources, g as readSourceSnapshotPaths, h as readResolvedSourceFile, l as hasCurrentSourceSnapshot, m as readCurrentSourceSnapshot, n as createWorkspaceMetadataTarget, p as materializesCompleteSource, t as attachWorkspaceMetadataTarget, u as hasFreshSourceSnapshot, v as searchMaterializedStore } from "./metadata-target-DDoOQNp1.js";
13
13
  import { n as trackStagedWrites } from "./request-scope-Dw5n8bMC.js";
14
14
  import { noExecutionAuthority } from "@vite-hub/runtime";
15
15
  //#region src/session/scope.ts
@@ -926,7 +926,7 @@ function createWorkspaceSourceView(definition, store, options = {}) {
926
926
  return await withWorkspaceStoreMutation(store, async () => {
927
927
  const ref = normalizeHistoryRef(options.ref);
928
928
  const head = await history.head({ ref });
929
- if ((head?.id ?? null) !== options.ifHead) throw historyConflict(ref, options.ifHead, head?.id ?? null);
929
+ if ((head?.id ?? null) !== options.ifHead) rejectHistoryHead(options, historyConflict(ref, options.ifHead, head?.id ?? null));
930
930
  const forkRef = head || options.startFrom ? void 0 : await history.forksFrom?.(ref);
931
931
  const startId = head?.id ?? options.startFrom ?? (forkRef ? (await history.head({ ref: forkRef }))?.id : void 0);
932
932
  const previous = startId ? await history.open(startId) : void 0;
@@ -1292,7 +1292,7 @@ function createWorkspace(definition, options = {}) {
1292
1292
  };
1293
1293
  },
1294
1294
  async sync(options) {
1295
- const { syncWorkspaceSources } = await import("./sync-CCD_VYC8.js");
1295
+ const { syncWorkspaceSources } = await import("./sync-CrT8zjwc.js");
1296
1296
  return await syncWorkspaceSources(definition, store, options);
1297
1297
  },
1298
1298
  async materializeSources(options) {
@@ -1347,7 +1347,7 @@ function createWorkspace(definition, options = {}) {
1347
1347
  async startSession(options) {
1348
1348
  const host = options?.host;
1349
1349
  if (host) {
1350
- const { createHostedWorkspaceSession } = await import("./host-BFBpXn0N.js").then((n) => n.n);
1350
+ const { createHostedWorkspaceSession } = await import("./host-Bf1a2uo_.js").then((n) => n.n);
1351
1351
  return await createHostedWorkspaceSession(workspace, {
1352
1352
  ...options,
1353
1353
  host
@@ -1362,7 +1362,7 @@ function createWorkspace(definition, options = {}) {
1362
1362
  const synchronizedWorkspace = workspace;
1363
1363
  synchronizedWorkspace.__workspaceDefinitionSyncKey = definition;
1364
1364
  synchronizedWorkspace.__syncWorkspaceDefinition = async (abortSignal) => {
1365
- const { syncWorkspaceDefinition } = await import("./lifecycle-B-enk_4A.js").then((n) => n.t);
1365
+ const { syncWorkspaceDefinition } = await import("./lifecycle-D8FdpBod.js").then((n) => n.t);
1366
1366
  await syncWorkspaceDefinition(definition, store, abortSignal);
1367
1367
  };
1368
1368
  return attachWorkspaceSourceRequestExecution(workspace, createWorkspaceSourceRequestExecution(definition));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vite-hub/workspace",
3
- "version": "0.3.1",
3
+ "version": "0.4.1",
4
4
  "description": "Agent-oriented filesystem state and Vite integration for ViteHub.",
5
5
  "keywords": [
6
6
  "ai-agents",
@@ -140,11 +140,10 @@
140
140
  "dependencies": {
141
141
  "@valibot/to-json-schema": "^1.8.0",
142
142
  "@vercel/nft": "^1.11.0",
143
- "@vite-hub/runtime": "0.3.1",
144
- "@vite-hub/source": "0.3.1",
143
+ "@vite-hub/runtime": "0.4.1",
144
+ "@vite-hub/source": "0.4.1",
145
145
  "birpc": "^4.2.0",
146
146
  "defu": "^6.1.7",
147
- "esbuild": "^0.28.2",
148
147
  "exsolve": "^1.1.3",
149
148
  "isomorphic-git": "^1.44.10",
150
149
  "jiti": "^2.7.0",
@@ -153,19 +152,20 @@
153
152
  "nostics": "1.4.0",
154
153
  "valibot": "^1.5.0",
155
154
  "yaml": "^2.9.1",
156
- "@vite-hub/markdown-template": "0.3.1",
157
- "@vite-hub/blob": "0.3.1",
158
- "@vite-hub/database": "0.3.1",
159
- "@vite-hub/sandbox": "0.3.1"
155
+ "@vite-hub/markdown-template": "0.4.1",
156
+ "@vite-hub/blob": "0.4.1",
157
+ "@vite-hub/database": "0.4.1",
158
+ "@vite-hub/sandbox": "0.4.1"
160
159
  },
161
160
  "devDependencies": {
162
161
  "@types/node": "^24.19.1",
163
162
  "@vercel/blob": "^2.8.0",
164
- "@vite-hub/env": "0.3.1",
165
- "@vite-hub/forge": "0.3.1",
163
+ "@vite-hub/env": "0.4.1",
164
+ "@vite-hub/forge": "0.4.1",
166
165
  "@vite-hub/internal": "0.0.1",
167
- "@vite-hub/shell": "0.3.1",
166
+ "@vite-hub/shell": "0.4.1",
168
167
  "ai": "7.0.130",
168
+ "esbuild": "^0.28.2",
169
169
  "publint": "^0.3.25",
170
170
  "typescript": "^6.0.3",
171
171
  "vite": "^8.2.2",
@@ -176,11 +176,11 @@
176
176
  "@libsql/client": "^0.18.0"
177
177
  },
178
178
  "peerDependencies": {
179
- "@vite-hub/shell": "0.3.1",
179
+ "@vite-hub/shell": "0.4.1",
180
180
  "ai": "^6.0.0 || ^7.0.0-0",
181
181
  "vite": ">=8.0.0",
182
182
  "drizzle-orm": "1.0.0-rc.5 || ^1.0.0",
183
- "@vite-hub/forge": "0.3.1"
183
+ "@vite-hub/forge": "0.4.1"
184
184
  },
185
185
  "peerDependenciesMeta": {
186
186
  "@vite-hub/shell": {
@@ -197,7 +197,7 @@
197
197
  }
198
198
  },
199
199
  "engines": {
200
- "node": ">=22.18.0"
200
+ "node": ">=24.15.0"
201
201
  },
202
202
  "scripts": {
203
203
  "build": "vp pack",