@deksden-com/dd-flow-cli 0.1.0 → 0.3.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.
Files changed (37) hide show
  1. package/README.md +13 -0
  2. package/dist/build-info.json +15 -0
  3. package/dist/cli/help.js +133 -14
  4. package/dist/cli/run-cli.js +242 -8
  5. package/dist/schemas/archived-flow-manifest.schema.json +112 -0
  6. package/dist/schemas/compatibility.schema.json +26 -0
  7. package/dist/schemas/flow-guidance.schema.json +73 -0
  8. package/dist/schemas/flow-run-index.schema.json +30 -4
  9. package/dist/schemas/global-dashboard-data.schema.json +68 -0
  10. package/dist/schemas/mb-sdlc-review-report.schema.json +242 -0
  11. package/dist/schemas/merge-stage-report.schema.json +61 -1
  12. package/dist/schemas/plan-stage-report.schema.json +255 -0
  13. package/dist/schemas/project-dashboard-data.schema.json +98 -0
  14. package/dist/schemas/project-flow-pack-manifest.schema.json +127 -0
  15. package/dist/schemas/protocol-dashboard-data.schema.json +89 -0
  16. package/dist/schemas/status-report.schema.json +186 -0
  17. package/dist/schemas/version-report.schema.json +22 -0
  18. package/dist/services/build-info.js +114 -0
  19. package/dist/services/canon.js +298 -0
  20. package/dist/services/cleanup.js +14 -1
  21. package/dist/services/config.js +25 -0
  22. package/dist/services/dashboard.js +655 -10
  23. package/dist/services/flow-guidance.js +214 -0
  24. package/dist/services/ids.js +106 -0
  25. package/dist/services/lanes.js +6 -2
  26. package/dist/services/merge-queue.js +68 -4
  27. package/dist/services/merge-worker.js +177 -0
  28. package/dist/services/projects.js +7 -1
  29. package/dist/services/protocols.js +648 -17
  30. package/dist/services/runs.js +98 -21
  31. package/dist/services/schema-validation.js +88 -9
  32. package/dist/services/sessions.js +3 -2
  33. package/dist/services/status.js +306 -0
  34. package/dist/services/version-status.js +284 -0
  35. package/dist/storage/database.js +13 -0
  36. package/dist/storage/paths.js +21 -0
  37. package/package.json +2 -2
@@ -6,6 +6,8 @@ import { projectRuntimeRoot, resolveProjectRoot } from "../storage/paths.js";
6
6
  import { appendAudit } from "./audit.js";
7
7
  import { activeCodexSessionBindingsForProject, activeFlowSessionBindingsForProject, codexHomeProfilesForProject, codexHookEventsForProject, hookStatusForProject } from "./hooks.js";
8
8
  import { dashboardMarkdownPath, globalDashboardMarkdownPath, readProjectConfig } from "./config.js";
9
+ import { loadProjectFlowContract } from "../domain/flow-contract.js";
10
+ import { buildStaticFlowGuidance } from "./flow-guidance.js";
9
11
  export function registerProject(context, input) {
10
12
  const root = resolveProjectRoot(input.root);
11
13
  const existing = findProjectByRoot(context, root);
@@ -154,10 +156,14 @@ export function getProjectStatus(context, input) {
154
156
  if (!project) {
155
157
  throw new AppError("not_found", `Project is not registered: ${root}`, 1);
156
158
  }
159
+ const flowContract = loadProjectFlowContract(root);
157
160
  const protocols = context.db.all(`SELECT id, status, stage, next_action, updated_at
158
161
  FROM protocols
159
162
  WHERE project_id = ?
160
- ORDER BY updated_at DESC`, [project.id]);
163
+ ORDER BY updated_at DESC`, [project.id]).map((protocol) => ({
164
+ ...protocol,
165
+ flow_guidance: buildStaticFlowGuidance({ stage: String(protocol.stage), contract: flowContract })
166
+ }));
161
167
  const mergeQueue = context.db.all(`SELECT protocol_id, status, claimed_by_session_id, claimed_at, attempts_count, last_reason, completed_at,
162
168
  created_at, updated_at
163
169
  FROM merge_queue