vibeman 0.0.10 → 0.0.11

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 (28) hide show
  1. package/dist/api.js +103 -17
  2. package/dist/commit.txt +1 -1
  3. package/dist/scripts/lib/test-fixtures.mjs +235 -65
  4. package/dist/ui/assets/{index-CWgmwE7z.js → index-5kvaa7VH.js} +1 -1
  5. package/dist/ui/assets/{index-CD2PhloT.js → index-B2YlQpV0.js} +1 -1
  6. package/dist/ui/assets/{index-DldaqXn6.js → index-BFpKdhc4.js} +1 -1
  7. package/dist/ui/assets/{index-BdgeaxTn.js → index-BKcn2ir8.js} +1 -1
  8. package/dist/ui/assets/{index-BzO4aEU4.js → index-BmCH7Zkp.js} +84 -90
  9. package/dist/ui/assets/{index-CFcf2YpG.js → index-BnA5v3sz.js} +1 -1
  10. package/dist/ui/assets/{index-BruMxn3d.js → index-BtgmEMNX.js} +1 -1
  11. package/dist/ui/assets/{index-CgviUgKz.js → index-Buod5MG9.js} +1 -1
  12. package/dist/ui/assets/{index-B0NmAYJN.js → index-BxFJT2l4.js} +1 -1
  13. package/dist/ui/assets/{index-Dnr92rQ_.js → index-CCzed9cx.js} +1 -1
  14. package/dist/ui/assets/{index-D8xwHS_p.js → index-CJ0FVxY4.js} +1 -1
  15. package/dist/ui/assets/{index-CaNPyagk.js → index-CaM8gf-6.js} +1 -1
  16. package/dist/ui/assets/{index-CPuLdrTd.js → index-CfiNAuWd.js} +1 -1
  17. package/dist/ui/assets/{index-CSkk6z9k.js → index-Ck0eDlqj.js} +1 -1
  18. package/dist/ui/assets/{index-CLhIxBF6.js → index-CmzQ8vUy.js} +1 -1
  19. package/dist/ui/assets/{index-1OrA9MPB.js → index-CoX8THvk.js} +1 -1
  20. package/dist/ui/assets/{index-Cp5EjPNE.js → index-D4lRQ9OU.js} +1 -1
  21. package/dist/ui/assets/{index-CKpno_Qc.js → index-DCwTMEKA.js} +1 -1
  22. package/dist/ui/assets/{index-CT4pbHjn.js → index-D_p2Z3lg.js} +1 -1
  23. package/dist/ui/assets/{index-DRKRyv6M.js → index-DlPVzvxz.js} +1 -1
  24. package/dist/ui/assets/{index-Di0_yzEh.js → index-Q46jjFaN.js} +1 -1
  25. package/dist/ui/assets/{index-bWcEeJr3.js → index-XVbgp8h-.js} +1 -1
  26. package/dist/ui/assets/{index-CYbGiKUk.js → index-xr3-NPcF.js} +1 -1
  27. package/dist/ui/index.html +1 -1
  28. package/package.json +1 -1
package/dist/api.js CHANGED
@@ -19058,7 +19058,7 @@ Gate rule: if the score is below 70, the review is considered failed. Set vibema
19058
19058
  type: "coding_agent",
19059
19059
  config: {
19060
19060
  model: DEFAULT_MODEL,
19061
- agentThreadOptions: { modelReasoningEffort: "xhigh" },
19061
+ agentThreadOptions: { modelReasoningEffort: "medium" },
19062
19062
  systemPrompt: "You are a senior engineer working inside this repository.",
19063
19063
  prompt: `Merge the feature branch into the default branch.
19064
19064
 
@@ -19069,9 +19069,14 @@ Gate rule: if the score is below 70, the review is considered failed. Set vibema
19069
19069
  - worktreePath: {{runPayload.worktreePath}}
19070
19070
  - repoRoot: {{runPayload.repoRoot}}
19071
19071
 
19072
+ ## Execution Strategy
19073
+ - Keep this run deterministic and fast: do not run exploratory commands unless a step fails unexpectedly.
19074
+ - Prefer direct execution of the steps below, in order.
19075
+ - On conflict, prioritize correctness over speed and produce explicit conflict-file reporting.
19076
+
19072
19077
  ## Commands
19073
19078
 
19074
- ### Step 1: Fetch
19079
+ ### Step 1: Fetch (non-blocking)
19075
19080
  \`\`\`
19076
19081
  git -C "{{runPayload.worktreePath}}" fetch origin || true
19077
19082
  \`\`\`
@@ -19084,24 +19089,50 @@ git -C "{{runPayload.worktreePath}}" symbolic-ref refs/remotes/origin/HEAD | sed
19084
19089
  \`\`\`
19085
19090
  Fallback to "main" if detection fails.
19086
19091
 
19087
- ### Step 3: Try fast-forward merge in repoRoot
19088
- The defaultBranch (e.g. main) is typically checked out at repoRoot, not worktreePath. Run the merge there:
19092
+ ### Step 3: Fast path merge in repoRoot
19093
+ The default branch (e.g. main) is typically checked out at repoRoot, not worktreePath.
19094
+
19095
+ Attempt fast-forward merge directly:
19089
19096
  \`\`\`
19090
19097
  git -C "{{runPayload.repoRoot}}" merge --ff-only {{runPayload.branchName}}
19091
19098
  \`\`\`
19092
- If this succeeds, skip to Step 5.
19099
+ If this fails because local uncommitted changes would be overwritten:
19100
+ 1. Create a temporary stash in repoRoot (non-destructive):
19101
+ \`\`\`
19102
+ git -C "{{runPayload.repoRoot}}" stash push -u -m "temp-merge-{{runPayload.branchName}}"
19103
+ \`\`\`
19104
+ 2. Retry the same fast-forward merge command once.
19105
+ If merge succeeds, skip to Step 5.
19093
19106
 
19094
- ### Step 4: Rebase and retry (only if Step 3 failed)
19095
- Fast-forward failed, so rebase the feature branch onto the default branch first:
19107
+ ### Step 4: Rebase feature branch and retry merge (only if Step 3 still failed)
19108
+ Rebase the feature branch onto local <defaultBranch> first (not origin/<defaultBranch>, so local commits on defaultBranch are included):
19096
19109
  \`\`\`
19097
19110
  git -C "{{runPayload.worktreePath}}" checkout {{runPayload.branchName}}
19098
- git -C "{{runPayload.worktreePath}}" rebase origin/<defaultBranch>
19111
+ git -C "{{runPayload.worktreePath}}" rebase <defaultBranch>
19112
+ \`\`\`
19113
+
19114
+ If rebase has conflicts:
19115
+ 1. List conflicted files and resolve conflict markers in each file.
19116
+ 2. Stage resolved files and continue:
19117
+ \`\`\`
19118
+ git -C "{{runPayload.worktreePath}}" add <resolved-files>
19119
+ git -C "{{runPayload.worktreePath}}" rebase --continue
19099
19120
  \`\`\`
19100
- If rebase has conflicts, resolve them, then \`git rebase --continue\`.
19121
+ 3. Repeat until rebase is complete.
19122
+ 4. If conflicts cannot be resolved, run:
19123
+ \`\`\`
19124
+ git -C "{{runPayload.worktreePath}}" rebase --abort
19125
+ \`\`\`
19126
+ Then fail the task with:
19127
+ - conflicted files
19128
+ - exact blockers
19129
+ - actionable next commands for manual resolution
19130
+
19101
19131
  After rebase completes, retry the merge in repoRoot:
19102
19132
  \`\`\`
19103
19133
  git -C "{{runPayload.repoRoot}}" merge --ff-only {{runPayload.branchName}}
19104
19134
  \`\`\`
19135
+ If this retry fails, report reason and stop.
19105
19136
 
19106
19137
  ### Step 5: Finalize
19107
19138
  On success:
@@ -19110,6 +19141,7 @@ On success:
19110
19141
  3. Delete the feature branch: \`git -C "{{runPayload.repoRoot}}" branch -d {{runPayload.branchName}}\` (branch deletion failure is non-blocking; continue cleanup)
19111
19142
  4. Remove the worktree: \`git -C "{{runPayload.repoRoot}}" worktree remove "{{runPayload.worktreePath}}" --force\`
19112
19143
  5. Prune worktrees: \`git -C "{{runPayload.repoRoot}}" worktree prune\`
19144
+ 6. If a temporary stash was created in Step 3, keep it unless safe to apply cleanly. Report whether it remains.
19113
19145
 
19114
19146
  ## Rules
19115
19147
  - Always run default-branch merges in repoRoot (the default branch is checked out there).
@@ -19734,7 +19766,13 @@ var currentDir2, TASK_TEMPLATE_REPO_PATH = ".vibeman/templates/task.md", SOURCE_
19734
19766
  var init_templates = __esm(() => {
19735
19767
  currentDir2 = dirname4(fileURLToPath4(import.meta.url));
19736
19768
  SOURCE_RELATIVE_TEMPLATE_PATH = resolve7(currentDir2, "../../resources/templates/task.md");
19737
- RUNTIME_TEMPLATE_PATH_SEGMENTS = ["apps", "api", "resources", "templates", "task.md"];
19769
+ RUNTIME_TEMPLATE_PATH_SEGMENTS = [
19770
+ "apps",
19771
+ "api",
19772
+ "resources",
19773
+ "templates",
19774
+ "task.md"
19775
+ ];
19738
19776
  });
19739
19777
 
19740
19778
  // ../../node_modules/@trpc/server/dist/codes-DagpWZLc.mjs
@@ -87077,7 +87115,12 @@ function buildTaskFileSection(input, mode) {
87077
87115
  ].join(`
87078
87116
  `);
87079
87117
  } catch {
87080
- return ["## Task File", `Path: ${taskPath}`, `Root: ${taskRoot}`, "(unable to read task file)"].join(`
87118
+ return [
87119
+ "## Task File",
87120
+ `Path: ${taskPath}`,
87121
+ `Root: ${taskRoot}`,
87122
+ "(unable to read task file)"
87123
+ ].join(`
87081
87124
  `);
87082
87125
  }
87083
87126
  }
@@ -89626,12 +89669,7 @@ function getWorkflowMeta2(runPayload) {
89626
89669
  }
89627
89670
  function resetWorkflowMetaCounters(runPayload) {
89628
89671
  const meta3 = getWorkflowMeta2(runPayload);
89629
- const {
89630
- humanInputs: _humanInputs,
89631
- pause: _pause,
89632
- workflowRefs: _workflowRefs,
89633
- ...rest
89634
- } = meta3;
89672
+ const { humanInputs: _humanInputs, pause: _pause, workflowRefs: _workflowRefs, ...rest } = meta3;
89635
89673
  return {
89636
89674
  ...runPayload,
89637
89675
  [WORKFLOW_META_KEY]: {
@@ -89673,8 +89711,21 @@ async function updateTaskStatusForRunPayload(input) {
89673
89711
  const updatedContent = applyTaskStatusUpdate(originalContent, {
89674
89712
  status: input.status
89675
89713
  });
89714
+ let fileUpdated = false;
89676
89715
  if (updatedContent !== originalContent) {
89677
89716
  await writeFile3(absoluteTaskPath, updatedContent, "utf8");
89717
+ fileUpdated = true;
89718
+ }
89719
+ if (fileUpdated) {
89720
+ await autoCommitTaskStatusUpdate({
89721
+ runId: input.runId,
89722
+ nodeKey: input.nodeKey,
89723
+ repoRoot,
89724
+ taskPath,
89725
+ status: input.status,
89726
+ taskId: typeof input.runPayload.taskId === "string" ? input.runPayload.taskId.trim() : undefined,
89727
+ taskName: typeof input.runPayload.taskName === "string" ? input.runPayload.taskName.trim() : undefined
89728
+ });
89678
89729
  }
89679
89730
  } catch (error48) {
89680
89731
  const message = error48 instanceof Error ? error48.message : String(error48);
@@ -89688,6 +89739,40 @@ async function updateTaskStatusForRunPayload(input) {
89688
89739
  }
89689
89740
  return input.runPayload;
89690
89741
  }
89742
+ function buildTaskStatusCommitMessage(input) {
89743
+ const taskIdentity = input.taskId?.trim() || input.taskName?.trim() || input.taskPath;
89744
+ return `task: ${taskIdentity} status ${input.status}`.replace(/\s+/g, " ").trim();
89745
+ }
89746
+ function isNothingToCommitError(message) {
89747
+ const lowered = message.toLowerCase();
89748
+ return lowered.includes("nothing to commit") || lowered.includes("no changes added to commit");
89749
+ }
89750
+ async function autoCommitTaskStatusUpdate(input) {
89751
+ const commitMessage = buildTaskStatusCommitMessage({
89752
+ taskId: input.taskId,
89753
+ taskName: input.taskName,
89754
+ taskPath: input.taskPath,
89755
+ status: input.status
89756
+ });
89757
+ if (!commitMessage)
89758
+ return;
89759
+ try {
89760
+ const git = createGitService(input.repoRoot);
89761
+ await git.commit(commitMessage, { paths: [input.taskPath] });
89762
+ } catch (error48) {
89763
+ const message = error48 instanceof Error ? error48.message : String(error48);
89764
+ if (isNothingToCommitError(message)) {
89765
+ return;
89766
+ }
89767
+ logger.warn({
89768
+ module: "workflow",
89769
+ runId: input.runId,
89770
+ nodeKey: input.nodeKey,
89771
+ error: message,
89772
+ taskPath: input.taskPath
89773
+ }, "Failed to auto-commit task status update.");
89774
+ }
89775
+ }
89691
89776
  function createLog2(event, data) {
89692
89777
  return { ts: new Date().toISOString(), level: "info", event, data };
89693
89778
  }
@@ -89728,6 +89813,7 @@ var init_runner2 = __esm(() => {
89728
89813
  init_codex_executor_config();
89729
89814
  init_types7();
89730
89815
  init_log();
89816
+ init_git();
89731
89817
  init_task_markdown();
89732
89818
  init_tasks();
89733
89819
  import_client4 = __toESM(require_default2(), 1);
package/dist/commit.txt CHANGED
@@ -1 +1 @@
1
- 81c7406
1
+ 07b258d