@vibedeckx/linux-x64 0.3.12 → 0.3.13

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 (2) hide show
  1. package/dist/bin.js +89 -0
  2. package/package.json +1 -1
package/dist/bin.js CHANGED
@@ -207594,6 +207594,22 @@ async function getRegisteredWorktreeBranches(storage, projectId, projectPath) {
207594
207594
  }));
207595
207595
  return reconcileWorktreeBranches(projectPath, entries, sessionBranches, anchors);
207596
207596
  }
207597
+ async function anchorRootWorkspaceBranch(storage, projectId, projectPath, observedBranch) {
207598
+ invalidateWorktreeListCache(projectPath);
207599
+ const rootEntry = readWorktreeListTolerant(projectPath)[0];
207600
+ if (!rootEntry || rootEntry.branch !== observedBranch) {
207601
+ return { anchored: false, currentBranch: rootEntry?.branch ?? null };
207602
+ }
207603
+ await storage.workspaceRegistry.registerReadyCheckout({
207604
+ projectId,
207605
+ branch: "",
207606
+ // The main-workspace identity sentinel; never the branch name.
207607
+ targetId: "local",
207608
+ worktreePath: rootEntry.path,
207609
+ expectedBranch: rootEntry.branch
207610
+ });
207611
+ return { anchored: true, expectedBranch: rootEntry.branch };
207612
+ }
207597
207613
 
207598
207614
  // ../../node_modules/.pnpm/@ai-sdk+provider@3.0.8/node_modules/@ai-sdk/provider/dist/index.mjs
207599
207615
  var marker = "vercel.ai.error";
@@ -242266,6 +242282,26 @@ var routes8 = async (fastify2) => {
242266
242282
  return reply.code(500).send({ error: `Failed to delete worktree: ${errorMessage}` });
242267
242283
  }
242268
242284
  });
242285
+ fastify2.post("/api/path/worktrees/anchor", async (req, reply) => {
242286
+ const { path: projectPath, branch } = req.body ?? {};
242287
+ if (!projectPath || !branch) {
242288
+ return reply.code(400).send({ error: "Path and branch are required" });
242289
+ }
242290
+ try {
242291
+ const project = await ensurePathProject(fastify2, projectPath);
242292
+ const result = await anchorRootWorkspaceBranch(fastify2.storage, project.id, projectPath, branch);
242293
+ if (!result.anchored) {
242294
+ return reply.code(409).send({
242295
+ error: `The main workspace is on '${result.currentBranch ?? "detached HEAD"}', not '${branch}'`,
242296
+ currentBranch: result.currentBranch
242297
+ });
242298
+ }
242299
+ return reply.code(200).send({ expectedBranch: result.expectedBranch });
242300
+ } catch (error48) {
242301
+ const errorMessage = error48 instanceof Error ? error48.message : "Unknown error";
242302
+ return reply.code(500).send({ error: `Failed to anchor workspace: ${errorMessage}` });
242303
+ }
242304
+ });
242269
242305
  fastify2.get("/api/projects/:id/worktrees", async (req, reply) => {
242270
242306
  const userId = requireUserFacingUserId(req, reply);
242271
242307
  if (userId === null) return;
@@ -242316,6 +242352,56 @@ var routes8 = async (fastify2) => {
242316
242352
  return reply.code(500).send({ error: `Failed to list worktrees: ${errorMessage}` });
242317
242353
  }
242318
242354
  });
242355
+ fastify2.post("/api/projects/:id/worktrees/anchor", async (req, reply) => {
242356
+ const userId = requireUserFacingUserId(req, reply);
242357
+ if (userId === null) return;
242358
+ const project = await fastify2.storage.projects.getById(req.params.id, userId);
242359
+ if (!project) {
242360
+ return reply.code(404).send({ error: "Project not found" });
242361
+ }
242362
+ const branch = req.body?.branch;
242363
+ if (!branch) return reply.code(400).send({ error: "Branch is required" });
242364
+ const requestedTarget = req.body.target ?? "local";
242365
+ let remoteConfig;
242366
+ if (requestedTarget === "local") {
242367
+ remoteConfig = project.path ? null : await getRemoteConfig(fastify2, project);
242368
+ } else {
242369
+ const targetRemote = await fastify2.storage.projectRemotes.getByProjectAndServer(project.id, requestedTarget);
242370
+ if (!targetRemote) return reply.code(400).send({ error: "Unknown remote target" });
242371
+ remoteConfig = { serverId: targetRemote.remote_server_id, remotePath: targetRemote.remote_path };
242372
+ }
242373
+ if (remoteConfig) {
242374
+ const result = await proxyToRemoteAuto(
242375
+ remoteConfig.serverId,
242376
+ "POST",
242377
+ "/api/path/worktrees/anchor",
242378
+ { path: remoteConfig.remotePath, branch },
242379
+ { reverseConnectManager: fastify2.reverseConnectManager }
242380
+ );
242381
+ if (result.status === 404) {
242382
+ return reply.code(501).send({
242383
+ error: "This remote worker is too old to anchor a workspace. Update it and try again."
242384
+ });
242385
+ }
242386
+ return reply.code(proxyStatus(result)).send(result.data);
242387
+ }
242388
+ if (!project.path) {
242389
+ return reply.code(400).send({ error: "Project has no local path" });
242390
+ }
242391
+ try {
242392
+ const result = await anchorRootWorkspaceBranch(fastify2.storage, project.id, project.path, branch);
242393
+ if (!result.anchored) {
242394
+ return reply.code(409).send({
242395
+ error: `The main workspace is on '${result.currentBranch ?? "detached HEAD"}', not '${branch}'`,
242396
+ currentBranch: result.currentBranch
242397
+ });
242398
+ }
242399
+ return reply.code(200).send({ expectedBranch: result.expectedBranch });
242400
+ } catch (error48) {
242401
+ const errorMessage = error48 instanceof Error ? error48.message : "Unknown error";
242402
+ return reply.code(500).send({ error: `Failed to anchor workspace: ${errorMessage}` });
242403
+ }
242404
+ });
242319
242405
  fastify2.get("/api/projects/:id/branches", async (req, reply) => {
242320
242406
  const userId = requireUserFacingUserId(req, reply);
242321
242407
  if (userId === null) return;
@@ -252617,6 +252703,9 @@ var WORKER_CAPABILITIES = {
252617
252703
  "http:GET /api/path/worktrees": { since: "0.2.0", summary: "worktree \u5217\u8868/\u72B6\u6001" },
252618
252704
  "http:POST /api/path/worktrees": { since: "0.2.0", summary: "\u5EFA worktree" },
252619
252705
  "http:DELETE /api/path/worktrees": { since: "0.2.0", summary: "\u5220 worktree" },
252706
+ // Additive: a worker below 0.3.13 404s it and the hub answers 501 with an
252707
+ // "update the worker" message instead of proxying the failure through.
252708
+ "http:POST /api/path/worktrees/anchor": { since: "0.3.13", summary: "\u91CD\u951A\u4E3B\u5DE5\u4F5C\u533A\u5206\u652F" },
252620
252709
  "http:GET /api/path/branches": { since: "0.2.0", summary: "\u5206\u652F\u5217\u8868" },
252621
252710
  "http:GET /api/path/branches/activity": { since: "0.2.0", summary: "\u5206\u652F\u6D3B\u52A8\u6982\u89C8" },
252622
252711
  "http:POST /api/path/branches/merge-status": { since: "0.2.0", summary: "\u5206\u652F\u5408\u5E76\u72B6\u6001\u68C0\u6D4B" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibedeckx/linux-x64",
3
- "version": "0.3.12",
3
+ "version": "0.3.13",
4
4
  "description": "Vibedeckx platform binaries for Linux x64",
5
5
  "os": [
6
6
  "linux"