@planu/cli 4.11.6 → 4.11.8

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 (56) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cli/commands/serve.js +4 -0
  3. package/dist/config/license-plans.json +1 -0
  4. package/dist/engine/actuals/git-analyzer.js +4 -4
  5. package/dist/engine/browser-validator.js +26 -21
  6. package/dist/engine/crash-shield/file-collector.d.ts +20 -3
  7. package/dist/engine/crash-shield/file-collector.js +137 -8
  8. package/dist/engine/crash-shield/index.d.ts +18 -1
  9. package/dist/engine/crash-shield/index.js +58 -17
  10. package/dist/engine/diff-spec-generator.js +12 -5
  11. package/dist/engine/dogfooding/runtime-gap-detector.d.ts +3 -0
  12. package/dist/engine/dogfooding/runtime-gap-detector.js +386 -0
  13. package/dist/engine/figma/visual-qa.d.ts +2 -1
  14. package/dist/engine/figma/visual-qa.js +8 -7
  15. package/dist/engine/git-safe-input.d.ts +6 -0
  16. package/dist/engine/git-safe-input.js +41 -0
  17. package/dist/engine/qa-gate.js +2 -1
  18. package/dist/engine/spec-state-machine/transition-spec.d.ts +16 -1
  19. package/dist/engine/spec-state-machine/transition-spec.js +19 -4
  20. package/dist/engine/triagier/classifier.d.ts +2 -2
  21. package/dist/engine/triagier/classifier.js +12 -15
  22. package/dist/index.js +12 -4
  23. package/dist/storage/approval-operation-lock.d.ts +10 -0
  24. package/dist/storage/approval-operation-lock.js +44 -0
  25. package/dist/storage/approval-store.d.ts +2 -0
  26. package/dist/storage/approval-store.js +9 -1
  27. package/dist/storage/spec-store.d.ts +29 -2
  28. package/dist/storage/spec-store.js +307 -7
  29. package/dist/tools/approval-handler.js +255 -124
  30. package/dist/tools/browser-validate-handler.js +17 -3
  31. package/dist/tools/code-impact-handler.js +4 -2
  32. package/dist/tools/dogfood-watch.d.ts +6 -0
  33. package/dist/tools/dogfood-watch.js +48 -0
  34. package/dist/tools/figma/visual-qa.js +2 -1
  35. package/dist/tools/tool-registry/core-tools.js +12 -0
  36. package/dist/tools/tool-registry/group-quality-compliance.js +12 -1
  37. package/dist/tools/update-status/file-sync.js +3 -2
  38. package/dist/tools/update-status/index.d.ts +2 -0
  39. package/dist/tools/update-status/index.js +1086 -812
  40. package/dist/tools/update-status/response-builder.js +11 -0
  41. package/dist/tools/update-status/side-effects.d.ts +16 -1
  42. package/dist/tools/update-status/side-effects.js +140 -0
  43. package/dist/tools/update-status/transition-guard.js +1 -1
  44. package/dist/tools/update-status-actions.d.ts +10 -2
  45. package/dist/tools/update-status-actions.js +166 -192
  46. package/dist/tools/update-status-convention-gate.d.ts +3 -1
  47. package/dist/tools/update-status-convention-gate.js +135 -7
  48. package/dist/types/browser-validator.d.ts +2 -0
  49. package/dist/types/dogfooding.d.ts +34 -0
  50. package/dist/types/dogfooding.js +2 -0
  51. package/dist/types/index.d.ts +1 -0
  52. package/dist/types/index.js +1 -0
  53. package/dist/types/spec/core.d.ts +28 -1
  54. package/package.json +25 -25
  55. package/planu-native.json +1 -1
  56. package/planu-plugin.json +1 -1
@@ -3,10 +3,11 @@ import { metricsStore } from '../../storage/index.js';
3
3
  import { addLesson, getLessons } from '../../storage/lessons-store.js';
4
4
  import { dispatchFeedbackEvent } from '../learn.js';
5
5
  import { autoReconcileOnDone } from '../update-status-reconcile.js';
6
- import { readFile, writeFile } from 'node:fs/promises';
6
+ import { readFile } from 'node:fs/promises';
7
7
  import { parseFrontmatter } from '../../engine/frontmatter-parser.js';
8
8
  import { computeFrontmatterSha } from '../../engine/frontmatter-sha/index.js';
9
9
  import { appendTransitionEvent } from '../../storage/transition-log.js';
10
+ import { atomicWriteFile } from '../../engine/safety/atomic-write-file.js';
10
11
  export async function recordDoneMetrics(projectId, specId, spec, actuals, projectPath) {
11
12
  if (actuals.devHours + actuals.reviewHours === 0) {
12
13
  return;
@@ -110,7 +111,7 @@ export async function syncSpecFiles(updatedSpec, _currentStatus, newStatus, proj
110
111
  newStatus,
111
112
  specId: updatedSpec.id,
112
113
  });
113
- await writeFile(updatedSpec.specPath, updatedContent, 'utf-8');
114
+ await atomicWriteFile(updatedSpec.specPath, updatedContent);
114
115
  // SPEC-544: Auto-stage spec.md after writing so it's included in the user's next commit
115
116
  // SPEC-575: Auto-commit staged planu/ docs (idempotent, safe-fail)
116
117
  // Commit message must reflect the actual transition — 'mark-done' is only
@@ -1,4 +1,6 @@
1
1
  import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
2
  import type { UpdateStatusInput, ToolResult } from '../../types/index.js';
3
+ /** Recover durable post-commit work for every registered project after server startup. */
4
+ export declare function recoverPendingPostCommitTasksAtStartup(): Promise<void>;
3
5
  export declare function handleUpdateStatus(params: UpdateStatusInput, server?: McpServer): Promise<ToolResult>;
4
6
  //# sourceMappingURL=index.d.ts.map