vibe-coding-master 0.7.49 → 0.7.50

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.
package/README.md CHANGED
@@ -124,8 +124,9 @@ If you want VCM app state to survive container rebuilds, set:
124
124
  1. Start VCM with `vcm`.
125
125
  2. Open the GUI.
126
126
  3. In `Repository`, enter a local Git repository path and click `Connect`.
127
- 4. Create or select a task in the `Task` section. VCM creates a task branch and
128
- worktree immediately.
127
+ 4. Create or select a task in the `Task` section. Before creating a new task,
128
+ VCM fast-forward pulls the connected branch when it has an upstream, then
129
+ creates the task branch and worktree from the updated `HEAD`.
129
130
  5. In `VCM Harness`, initialize or update fixed harness files if VCM reports
130
131
  pending changes. Harness changes are written to the active task worktree.
131
132
  6. If bootstrap is incomplete, open Harness Studio and run bootstrap through
@@ -632,6 +633,7 @@ Make sure:
632
633
 
633
634
  - the repository is a Git repository
634
635
  - the connected base repo is clean
636
+ - the connected branch can be fast-forward pulled when it has an upstream
635
637
  - no other task is currently active for this project
636
638
  - the derived `feature/<task>` branch does not already exist
637
639
  - the derived `.claude/worktrees/<task>` directory does not already exist
@@ -34,7 +34,7 @@ export function createRuntimeRecoveryService(deps) {
34
34
  const roundRecovered = await recoverRound(taskRepoRoot, config.stateRoot, task.taskSlug, recoveredAt, context);
35
35
  await recoverMessages(taskRepoRoot, config.stateRoot, task.taskSlug, recoveredAt, context);
36
36
  await recoverGateReview(taskRepoRoot, recoveredAt, context);
37
- await cleanupCoderWorkers(taskRepoRoot, context);
37
+ await recoverCoderWorkers(taskRepoRoot, task.taskSlug, context);
38
38
  await deps.architectRestartService?.recoverTask(repoRoot, task.taskSlug);
39
39
  await deps.roleContextRestartService?.recoverTask(repoRoot, task.taskSlug);
40
40
  if ((roundRecovered || task.status === "running") && !hasLiveTaskSession(task.taskSlug)) {
@@ -238,16 +238,32 @@ export function createRuntimeRecoveryService(deps) {
238
238
  });
239
239
  context.changedPaths.add(relativePath);
240
240
  }
241
- async function cleanupCoderWorkers(taskRepoRoot, context) {
242
- const absolutePath = path.join(taskRepoRoot, CODER_WORKERS_RUNTIME_DIR);
243
- if (!(await deps.fs.pathExists(absolutePath))) {
241
+ async function recoverCoderWorkers(taskRepoRoot, taskSlug, context) {
242
+ if (hasLiveRoundRole(taskSlug, "coder") || !deps.fs.removePath) {
244
243
  return;
245
244
  }
246
- if (!deps.fs.removePath) {
245
+ const tasksPath = path.join(taskRepoRoot, CODER_WORKERS_RUNTIME_DIR, "tasks");
246
+ if (!(await deps.fs.pathExists(tasksPath))) {
247
247
  return;
248
248
  }
249
- await deps.fs.removePath(absolutePath, { recursive: true, force: true });
250
- context.changedPaths.add(CODER_WORKERS_RUNTIME_DIR);
249
+ for (const entry of await deps.fs.readDir(tasksPath)) {
250
+ if (!entry.endsWith(".json")) {
251
+ continue;
252
+ }
253
+ const absolutePath = path.join(tasksPath, entry);
254
+ let state;
255
+ try {
256
+ state = await deps.fs.readJson(absolutePath);
257
+ }
258
+ catch {
259
+ continue;
260
+ }
261
+ if (state.status !== "running" || state.handled === true) {
262
+ continue;
263
+ }
264
+ await deps.fs.removePath(absolutePath, { force: true });
265
+ context.changedPaths.add(path.posix.join(CODER_WORKERS_RUNTIME_DIR, "tasks", entry));
266
+ }
251
267
  }
252
268
  async function recoverHarnessBootstrap(repoRoot, _timestamp, context) {
253
269
  const absolutePath = path.join(repoRoot, BOOTSTRAP_SESSION_PATH);
@@ -53,6 +53,19 @@ export function createTaskService(deps) {
53
53
  hint: `Commit, stash, or discard these changes before creating a task worktree: ${baseVisibleChanges.slice(0, 12).join(", ")}`
54
54
  });
55
55
  }
56
+ const upstreamBranch = await deps.git.getUpstreamBranch(repoRoot);
57
+ if (upstreamBranch) {
58
+ await deps.git.pullFastForward(repoRoot);
59
+ const postPullVisibleChanges = await getBaseRepoVisibleChanges(deps.git, repoRoot);
60
+ if (postPullVisibleChanges.length > 0) {
61
+ throw new VcmError({
62
+ code: "BASE_REPO_DIRTY",
63
+ message: "The connected repository has Git-visible changes after pulling its upstream branch.",
64
+ statusCode: 409,
65
+ hint: `Commit, stash, or discard these changes before creating a task worktree: ${postPullVisibleChanges.slice(0, 12).join(", ")}`
66
+ });
67
+ }
68
+ }
56
69
  const timestamp = now();
57
70
  await deps.fs.ensureDir(path.dirname(worktreePath));
58
71
  await deps.git.createWorktree({
@@ -51,7 +51,6 @@ ${renderRoleMemoryRules("architect")}
51
51
  - Use \`vcm-architect-validation-worker\` for exact non-interactive commands already selected by Architect. The worker does not select validation scope, modify tests or code, diagnose failures, or decide whether validation is sufficient.
52
52
  - Do not rerun a green command already reported by another Architect worker merely to execute it in the main Architect context.
53
53
  - Validation workers write reports under \`.ai/vcm/architect-workers/validation/\`. Architect must interpret the raw results and copy required evidence into the owning Architect artifact.
54
- - Remove \`.ai/vcm/architect-workers/\` after its accepted facts and command results have been consolidated into Architect-owned artifacts.
55
54
 
56
55
  ### Architecture Interview
57
56
 
@@ -74,7 +74,7 @@ ${renderRoleMemoryRules("coder")}
74
74
  - Stay in the same Coder turn until every worker state is \`completed\` and Coder has reviewed and integrated all reports and commits. Do not end the turn to wait for worker callbacks.
75
75
  - A completed worker reports \`Implementation Result: success|has_failed_items\`; \`completed\` means the full assigned sweep and handoff finished, not that every item passed.
76
76
  - After workers finish, inspect each item disposition and commit, integrate successful work and committed failure scenes, resolve integration conflicts or invalid edits, and verify that every remaining marker corresponds to a failed disposition. Only then mark \`handled: true\` in each worker state.
77
- - Run coder-level baseline validation, summarize worker reports and commits in \`.ai/vcm/handoffs/coder-completion.md\`, and clean \`.ai/vcm/coder-workers/\`.
77
+ - Run coder-level baseline validation and summarize worker reports and commits in \`.ai/vcm/handoffs/coder-completion.md\`.
78
78
 
79
79
  ### Handoff
80
80
 
@@ -18,7 +18,7 @@ The hard ceiling is 60 minutes per job, enforced by the job worker itself. No ap
18
18
  3. If watch-job exits 125, the job is still running and a bounded handoff is active for the next watcher: run \`.ai/tools/watch-job <job-id>\` again immediately. Do not end the turn between windows.
19
19
  4. Repeat until watch-job reports a terminal result.
20
20
  5. Read the final status and the relevant log tail.
21
- 6. Record command, result, duration, and required follow-up wherever the caller normally records command evidence.
21
+ 6. Record job ID, command, result, duration, and required follow-up wherever the caller normally records command evidence.
22
22
 
23
23
  Example:
24
24
 
@@ -71,8 +71,5 @@ On timeout the worker stops the command process group and records \`timeout\` in
71
71
  - do not mark the command as passed
72
72
  - do not retry in the background
73
73
 
74
- ## Cleanup
75
-
76
- \`.ai/vcm/jobs/**\` is runtime state. Delete it after the command result and useful log evidence have been recorded where needed.
77
74
  `;
78
75
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibe-coding-master",
3
- "version": "0.7.49",
3
+ "version": "0.7.50",
4
4
  "description": "Local GUI session cockpit for Claude Code role sessions.",
5
5
  "type": "module",
6
6
  "files": [