@lumenflow/cli 1.3.6 → 1.5.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.
package/dist/release.js CHANGED
@@ -13,9 +13,12 @@
13
13
  * - Creates git tag vX.Y.Z
14
14
  *
15
15
  * Usage:
16
- * pnpm release --version 1.3.0
17
- * pnpm release --version 1.3.0 --dry-run # Preview without making changes
18
- * pnpm release --version 1.3.0 --skip-publish # Bump and tag only (no npm publish)
16
+ * pnpm release --release-version 1.3.0
17
+ * pnpm release --release-version 1.3.0 --dry-run # Preview without making changes
18
+ * pnpm release --release-version 1.3.0 --skip-publish # Bump and tag only (no npm publish)
19
+ *
20
+ * WU-1085: The --release-version flag was renamed from --version to avoid conflict
21
+ * with the standard CLI --version flag that shows the CLI version.
19
22
  *
20
23
  * WU-1074: Add release command for npm publishing
21
24
  */
@@ -262,19 +265,22 @@ export async function pushTagWithForce(git, tagName, reason = 'release: tag push
262
265
  }
263
266
  /**
264
267
  * Main release function
268
+ * WU-1085: Renamed --version to --release-version to avoid conflict with CLI --version flag
265
269
  */
266
270
  async function main() {
267
271
  const program = new Command()
268
- .name('release')
272
+ .name('lumenflow-release')
269
273
  .description('Release @lumenflow/* packages to npm with version bump, tag, and publish')
270
- .requiredOption('-v, --version <version>', 'Semver version to release (e.g., 1.3.0)')
274
+ .version('1.0.0', '-V, --version', 'Output the CLI version')
275
+ .requiredOption('-v, --release-version <version>', 'Semver version to release (e.g., 1.3.0)')
271
276
  .option('--dry-run', 'Preview changes without making them', false)
272
277
  .option('--skip-publish', 'Skip npm publish (only bump and tag)', false)
273
278
  .option('--skip-build', 'Skip build step (use existing dist)', false)
274
279
  .helpOption('-h, --help', 'Display help for command');
275
280
  program.parse();
276
281
  const opts = program.opts();
277
- const { version, dryRun, skipPublish, skipBuild } = opts;
282
+ // WU-1085: Use releaseVersion instead of version (renamed to avoid CLI --version conflict)
283
+ const { releaseVersion: version, dryRun, skipPublish, skipBuild } = opts;
278
284
  console.log(`${LOG_PREFIX} Starting release process for v${version}`);
279
285
  if (dryRun) {
280
286
  console.log(`${LOG_PREFIX} DRY RUN MODE - no changes will be made`);
package/dist/wu-done.js CHANGED
@@ -534,6 +534,32 @@ async function ensureCleanWorkingTree() {
534
534
  ` - Leftover changes from previous session`);
535
535
  }
536
536
  }
537
+ /**
538
+ * WU-1084: Check for uncommitted changes on main after merge completes.
539
+ *
540
+ * This catches cases where pnpm format (or other tooling) touched files
541
+ * outside the WU's code_paths during worktree work. These changes survive
542
+ * the merge and would be silently left behind when the worktree is removed.
543
+ *
544
+ * @param gitStatus - Output from git status (porcelain format)
545
+ * @param wuId - The WU ID for error messaging
546
+ * @returns Object with isDirty flag and optional error message
547
+ */
548
+ export function checkPostMergeDirtyState(gitStatus, wuId) {
549
+ const trimmedStatus = gitStatus.trim();
550
+ if (!trimmedStatus) {
551
+ return { isDirty: false };
552
+ }
553
+ const error = `Main branch has uncommitted changes after merge:\n\n${trimmedStatus}\n\n` +
554
+ `This indicates files were modified outside the WU's code_paths.\n` +
555
+ `Common cause: pnpm format touched files outside the WU scope.\n\n` +
556
+ `The worktree has NOT been removed to allow investigation.\n\n` +
557
+ `Options:\n` +
558
+ ` 1. Review and commit the changes: git add . && git commit -m "format: fix formatting"\n` +
559
+ ` 2. Discard if unwanted: git checkout -- .\n` +
560
+ ` 3. Then re-run: pnpm wu:done --id ${wuId} --skip-worktree-completion`;
561
+ return { isDirty: true, error };
562
+ }
537
563
  /**
538
564
  * Extract completed WU IDs from git log output.
539
565
  * @param {string} logOutput - Git log output (one commit per line)
@@ -2033,6 +2059,13 @@ async function main() {
2033
2059
  else {
2034
2060
  await ensureNoAutoStagedOrNoop([WU_PATH, STATUS_PATH, BACKLOG_PATH, STAMPS_DIR]);
2035
2061
  }
2062
+ // WU-1084: Check for uncommitted changes on main after merge
2063
+ // This catches cases where pnpm format touched files outside code_paths
2064
+ const postMergeStatus = await getGitForCwd().getStatus();
2065
+ const dirtyCheck = checkPostMergeDirtyState(postMergeStatus, id);
2066
+ if (dirtyCheck.isDirty) {
2067
+ die(dirtyCheck.error);
2068
+ }
2036
2069
  // Step 6 & 7: Cleanup (remove worktree, delete branch) - WU-1215
2037
2070
  // WU-1811: Only run cleanup if all completion steps succeeded
2038
2071
  if (completionResult.cleanupSafe !== false) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lumenflow/cli",
3
- "version": "1.3.6",
3
+ "version": "1.5.0",
4
4
  "description": "Command-line interface for LumenFlow workflow framework",
5
5
  "keywords": [
6
6
  "lumenflow",
@@ -21,6 +21,18 @@
21
21
  "url": "https://hellm.ai"
22
22
  },
23
23
  "type": "module",
24
+ "main": "./dist/index.js",
25
+ "types": "./dist/index.d.ts",
26
+ "exports": {
27
+ ".": {
28
+ "types": "./dist/index.d.ts",
29
+ "import": "./dist/index.js"
30
+ },
31
+ "./cli-entry-point": {
32
+ "types": "./dist/cli-entry-point.d.ts",
33
+ "import": "./dist/cli-entry-point.js"
34
+ }
35
+ },
24
36
  "bin": {
25
37
  "wu-claim": "./dist/wu-claim.js",
26
38
  "wu-done": "./dist/wu-done.js",
@@ -70,7 +82,8 @@
70
82
  "lumenflow-gates": "./dist/gates.js",
71
83
  "lumenflow-init": "./dist/init.js",
72
84
  "lumenflow": "./dist/init.js",
73
- "lumenflow-release": "./dist/release.js"
85
+ "lumenflow-release": "./dist/release.js",
86
+ "lumenflow-docs-sync": "./dist/docs-sync.js"
74
87
  },
75
88
  "files": [
76
89
  "dist",
@@ -87,11 +100,11 @@
87
100
  "pretty-ms": "^9.2.0",
88
101
  "simple-git": "^3.30.0",
89
102
  "yaml": "^2.8.2",
90
- "@lumenflow/core": "1.3.6",
91
- "@lumenflow/metrics": "1.3.6",
92
- "@lumenflow/memory": "1.3.6",
93
- "@lumenflow/initiatives": "1.3.6",
94
- "@lumenflow/agent": "1.3.6"
103
+ "@lumenflow/core": "1.5.0",
104
+ "@lumenflow/initiatives": "1.5.0",
105
+ "@lumenflow/memory": "1.5.0",
106
+ "@lumenflow/agent": "1.5.0",
107
+ "@lumenflow/metrics": "1.5.0"
95
108
  },
96
109
  "devDependencies": {
97
110
  "@vitest/coverage-v8": "^4.0.17",