maestro-flow 0.3.9 → 0.3.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.
- package/.claude/agents/workflow-collab-planner.md +1 -1
- package/.claude/agents/workflow-executor.md +1 -1
- package/.claude/agents/workflow-plan-checker.md +1 -1
- package/.claude/agents/workflow-planner.md +1 -1
- package/.claude/commands/learn-decompose.md +176 -176
- package/.claude/commands/learn-follow.md +167 -167
- package/.claude/commands/learn-retro.md +1 -1
- package/.claude/commands/maestro-analyze.md +46 -3
- package/.claude/commands/maestro-coordinate.md +1 -3
- package/.claude/commands/maestro-execute.md +14 -0
- package/.claude/commands/maestro-plan.md +16 -0
- package/.claude/commands/manage-harvest.md +131 -131
- package/.claude/commands/manage-issue-discover.md +2 -2
- package/.claude/commands/manage-issue.md +5 -5
- package/.claude/commands/spec-add.md +67 -56
- package/.claude/commands/spec-load.md +66 -64
- package/.claude/commands/spec-setup.md +5 -9
- package/.codex/skills/learn-decompose/SKILL.md +119 -0
- package/.codex/skills/learn-follow/SKILL.md +83 -0
- package/.codex/skills/learn-investigate/SKILL.md +83 -0
- package/.codex/skills/learn-retro/SKILL.md +83 -0
- package/.codex/skills/learn-second-opinion/SKILL.md +86 -0
- package/.codex/skills/maestro/SKILL.md +335 -0
- package/.codex/skills/maestro-analyze/SKILL.md +84 -75
- package/.codex/skills/maestro-brainstorm/SKILL.md +452 -463
- package/.codex/skills/maestro-chain/SKILL.md +233 -0
- package/.codex/skills/maestro-coordinate/SKILL.md +167 -278
- package/.codex/skills/maestro-execute/SKILL.md +435 -438
- package/.codex/skills/maestro-fork/SKILL.md +68 -0
- package/.codex/skills/maestro-init/SKILL.md +171 -167
- package/.codex/skills/maestro-learn/SKILL.md +80 -0
- package/.codex/skills/maestro-link-coordinate/SKILL.md +224 -220
- package/.codex/skills/maestro-merge/SKILL.md +62 -0
- package/.codex/skills/maestro-milestone-audit/SKILL.md +108 -103
- package/.codex/skills/maestro-milestone-complete/SKILL.md +155 -149
- package/.codex/skills/maestro-milestone-release/SKILL.md +70 -0
- package/.codex/skills/maestro-overlay/SKILL.md +188 -185
- package/.codex/skills/maestro-plan/SKILL.md +66 -69
- package/.codex/skills/maestro-quick/SKILL.md +26 -23
- package/.codex/skills/maestro-roadmap/SKILL.md +65 -73
- package/.codex/skills/maestro-spec-generate/SKILL.md +66 -74
- package/.codex/skills/maestro-ui-design/SKILL.md +34 -31
- package/.codex/skills/maestro-verify/SKILL.md +556 -566
- package/.codex/skills/manage-codebase-rebuild/SKILL.md +397 -405
- package/.codex/skills/manage-codebase-refresh/SKILL.md +93 -82
- package/.codex/skills/manage-harvest/SKILL.md +82 -0
- package/.codex/skills/manage-issue/SKILL.md +80 -65
- package/.codex/skills/manage-issue-discover/SKILL.md +491 -503
- package/.codex/skills/manage-learn/SKILL.md +190 -186
- package/.codex/skills/manage-memory/SKILL.md +95 -72
- package/.codex/skills/manage-memory-capture/SKILL.md +99 -86
- package/.codex/skills/manage-status/SKILL.md +102 -89
- package/.codex/skills/quality-business-test/SKILL.md +228 -223
- package/.codex/skills/quality-debug/SKILL.md +54 -66
- package/.codex/skills/quality-integration-test/SKILL.md +532 -544
- package/.codex/skills/quality-refactor/SKILL.md +197 -191
- package/.codex/skills/quality-retrospective/SKILL.md +512 -505
- package/.codex/skills/quality-review/SKILL.md +93 -105
- package/.codex/skills/quality-sync/SKILL.md +101 -89
- package/.codex/skills/quality-test/SKILL.md +202 -198
- package/.codex/skills/quality-test-gen/SKILL.md +93 -104
- package/.codex/skills/spec-add/SKILL.md +58 -39
- package/.codex/skills/spec-load/SKILL.md +45 -40
- package/.codex/skills/spec-map/SKILL.md +180 -182
- package/.codex/skills/spec-setup/SKILL.md +94 -76
- package/.codex/skills/team-coordinate/SKILL.md +346 -357
- package/.codex/skills/team-executor/SKILL.md +70 -112
- package/.codex/skills/team-lifecycle-v4/SKILL.md +311 -299
- package/.codex/skills/team-quality-assurance/SKILL.md +234 -227
- package/.codex/skills/team-review/SKILL.md +232 -225
- package/.codex/skills/team-tech-debt/SKILL.md +78 -100
- package/.codex/skills/team-testing/SKILL.md +242 -235
- package/.codex/skills/wiki-connect/SKILL.md +75 -0
- package/.codex/skills/wiki-digest/SKILL.md +87 -0
- package/README.md +14 -11
- package/README.zh-CN.md +14 -11
- package/chains/issue-lifecycle.json +13 -13
- package/chains/singles/issue-analyze.json +3 -3
- package/chains/singles/issue-execute.json +3 -3
- package/chains/singles/issue-plan.json +3 -3
- package/dashboard/dist-server/dashboard/src/server/commander/commander-agent.js +2 -2
- package/dashboard/dist-server/dashboard/src/server/commander/commander-agent.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/coordinator/chain-map.js +3 -3
- package/dashboard/dist-server/dashboard/src/server/coordinator/chain-map.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/issues.js +34 -0
- package/dashboard/dist-server/dashboard/src/server/routes/issues.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/specs.d.ts +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/specs.js +75 -30
- package/dashboard/dist-server/dashboard/src/server/routes/specs.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/state/event-bus.d.ts +5 -0
- package/dashboard/dist-server/dashboard/src/server/state/event-bus.js +5 -0
- package/dashboard/dist-server/dashboard/src/server/state/event-bus.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/ws/handlers/execution-handler.js +2 -3
- package/dashboard/dist-server/dashboard/src/server/ws/handlers/execution-handler.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/shared/constants.js +5 -0
- package/dashboard/dist-server/dashboard/src/shared/constants.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/shared/issue-types.d.ts +5 -0
- package/dashboard/dist-server/dashboard/src/shared/issue-types.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/shared/normalize-task.d.ts +2 -0
- package/dashboard/dist-server/dashboard/src/shared/normalize-task.js +75 -0
- package/dashboard/dist-server/dashboard/src/shared/normalize-task.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/shared/team-types.d.ts +21 -0
- package/dashboard/dist-server/dashboard/src/shared/team-types.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/shared/types.d.ts +3 -2
- package/dashboard/dist-server/dashboard/src/shared/ws-protocol.d.ts +1 -1
- package/dashboard/dist-server/dashboard/src/shared/ws-protocol.js.map +1 -1
- package/dashboard/dist-server/src/hooks/constants.d.ts +92 -12
- package/dashboard/dist-server/src/hooks/constants.js +151 -16
- package/dashboard/dist-server/src/hooks/constants.js.map +1 -1
- package/dashboard/dist-server/src/types/index.d.ts +5 -0
- package/dist/src/commands/collab.d.ts +1 -34
- package/dist/src/commands/collab.d.ts.map +1 -1
- package/dist/src/commands/collab.js +8 -76
- package/dist/src/commands/collab.js.map +1 -1
- package/dist/src/commands/hooks.d.ts +5 -1
- package/dist/src/commands/hooks.d.ts.map +1 -1
- package/dist/src/commands/hooks.js +115 -10
- package/dist/src/commands/hooks.js.map +1 -1
- package/dist/src/commands/install-ui/InstallConfirm.d.ts +3 -1
- package/dist/src/commands/install-ui/InstallConfirm.d.ts.map +1 -1
- package/dist/src/commands/install-ui/InstallConfirm.js +3 -1
- package/dist/src/commands/install-ui/InstallConfirm.js.map +1 -1
- package/dist/src/commands/install-ui/InstallExecution.d.ts.map +1 -1
- package/dist/src/commands/install-ui/InstallExecution.js +5 -1
- package/dist/src/commands/install-ui/InstallExecution.js.map +1 -1
- package/dist/src/commands/install-ui/InstallFlow.d.ts.map +1 -1
- package/dist/src/commands/install-ui/InstallFlow.js +7 -3
- package/dist/src/commands/install-ui/InstallFlow.js.map +1 -1
- package/dist/src/commands/install-ui/StatuslineConfig.d.ts +6 -1
- package/dist/src/commands/install-ui/StatuslineConfig.d.ts.map +1 -1
- package/dist/src/commands/install-ui/StatuslineConfig.js +27 -5
- package/dist/src/commands/install-ui/StatuslineConfig.js.map +1 -1
- package/dist/src/commands/spec.d.ts.map +1 -1
- package/dist/src/commands/spec.js +7 -2
- package/dist/src/commands/spec.js.map +1 -1
- package/dist/src/hooks/__tests__/statusline-visual-test.d.ts +7 -0
- package/dist/src/hooks/__tests__/statusline-visual-test.d.ts.map +1 -0
- package/dist/src/hooks/__tests__/statusline-visual-test.js +236 -0
- package/dist/src/hooks/__tests__/statusline-visual-test.js.map +1 -0
- package/dist/src/hooks/constants.d.ts +92 -12
- package/dist/src/hooks/constants.d.ts.map +1 -1
- package/dist/src/hooks/constants.js +151 -16
- package/dist/src/hooks/constants.js.map +1 -1
- package/dist/src/hooks/guards/index.d.ts +2 -0
- package/dist/src/hooks/guards/index.d.ts.map +1 -1
- package/dist/src/hooks/guards/index.js +2 -0
- package/dist/src/hooks/guards/index.js.map +1 -1
- package/dist/src/hooks/guards/preflight-guard.d.ts +29 -0
- package/dist/src/hooks/guards/preflight-guard.d.ts.map +1 -0
- package/dist/src/hooks/guards/preflight-guard.js +95 -0
- package/dist/src/hooks/guards/preflight-guard.js.map +1 -0
- package/dist/src/hooks/guards/spec-validator.d.ts +25 -0
- package/dist/src/hooks/guards/spec-validator.d.ts.map +1 -0
- package/dist/src/hooks/guards/spec-validator.js +66 -0
- package/dist/src/hooks/guards/spec-validator.js.map +1 -0
- package/dist/src/hooks/index.d.ts +1 -0
- package/dist/src/hooks/index.d.ts.map +1 -1
- package/dist/src/hooks/index.js +1 -0
- package/dist/src/hooks/index.js.map +1 -1
- package/dist/src/hooks/keyword-spec-injector.d.ts +21 -0
- package/dist/src/hooks/keyword-spec-injector.d.ts.map +1 -0
- package/dist/src/hooks/keyword-spec-injector.js +96 -0
- package/dist/src/hooks/keyword-spec-injector.js.map +1 -0
- package/dist/src/hooks/plugins/spec-injection-plugin.d.ts +2 -1
- package/dist/src/hooks/plugins/spec-injection-plugin.d.ts.map +1 -1
- package/dist/src/hooks/plugins/spec-injection-plugin.js +21 -12
- package/dist/src/hooks/plugins/spec-injection-plugin.js.map +1 -1
- package/dist/src/hooks/preflight-core.d.ts +37 -0
- package/dist/src/hooks/preflight-core.d.ts.map +1 -0
- package/dist/src/hooks/preflight-core.js +86 -0
- package/dist/src/hooks/preflight-core.js.map +1 -0
- package/dist/src/hooks/spec-bridge.d.ts +40 -0
- package/dist/src/hooks/spec-bridge.d.ts.map +1 -0
- package/dist/src/hooks/spec-bridge.js +97 -0
- package/dist/src/hooks/spec-bridge.js.map +1 -0
- package/dist/src/hooks/spec-injector.d.ts.map +1 -1
- package/dist/src/hooks/spec-injector.js +18 -12
- package/dist/src/hooks/spec-injector.js.map +1 -1
- package/dist/src/hooks/statusline.d.ts +8 -17
- package/dist/src/hooks/statusline.d.ts.map +1 -1
- package/dist/src/hooks/statusline.js +269 -112
- package/dist/src/hooks/statusline.js.map +1 -1
- package/dist/src/i18n/locales/en.d.ts.map +1 -1
- package/dist/src/i18n/locales/en.js +5 -0
- package/dist/src/i18n/locales/en.js.map +1 -1
- package/dist/src/i18n/locales/zh.d.ts.map +1 -1
- package/dist/src/i18n/locales/zh.js +5 -0
- package/dist/src/i18n/locales/zh.js.map +1 -1
- package/dist/src/i18n/types.d.ts +5 -0
- package/dist/src/i18n/types.d.ts.map +1 -1
- package/dist/src/team/phase-orchestrator.d.ts +52 -0
- package/dist/src/team/phase-orchestrator.d.ts.map +1 -0
- package/dist/src/team/phase-orchestrator.js +165 -0
- package/dist/src/team/phase-orchestrator.js.map +1 -0
- package/dist/src/team/phase-types.d.ts +51 -0
- package/dist/src/team/phase-types.d.ts.map +1 -0
- package/dist/src/team/phase-types.js +41 -0
- package/dist/src/team/phase-types.js.map +1 -0
- package/dist/src/tools/collab-adapter.d.ts +17 -0
- package/dist/src/tools/collab-adapter.d.ts.map +1 -1
- package/dist/src/tools/collab-adapter.js +138 -0
- package/dist/src/tools/collab-adapter.js.map +1 -1
- package/dist/src/tools/index.d.ts.map +1 -1
- package/dist/src/tools/index.js +6 -0
- package/dist/src/tools/index.js.map +1 -1
- package/dist/src/tools/merge-validator.d.ts +24 -0
- package/dist/src/tools/merge-validator.d.ts.map +1 -0
- package/dist/src/tools/merge-validator.js +220 -0
- package/dist/src/tools/merge-validator.js.map +1 -0
- package/dist/src/tools/spec-entry-parser.d.ts +56 -0
- package/dist/src/tools/spec-entry-parser.d.ts.map +1 -0
- package/dist/src/tools/spec-entry-parser.js +196 -0
- package/dist/src/tools/spec-entry-parser.js.map +1 -0
- package/dist/src/tools/spec-init.d.ts.map +1 -1
- package/dist/src/tools/spec-init.js +66 -92
- package/dist/src/tools/spec-init.js.map +1 -1
- package/dist/src/tools/spec-keyword-index.d.ts +30 -0
- package/dist/src/tools/spec-keyword-index.d.ts.map +1 -0
- package/dist/src/tools/spec-keyword-index.js +101 -0
- package/dist/src/tools/spec-keyword-index.js.map +1 -0
- package/dist/src/tools/spec-loader.d.ts +3 -3
- package/dist/src/tools/spec-loader.d.ts.map +1 -1
- package/dist/src/tools/spec-loader.js +49 -23
- package/dist/src/tools/spec-loader.js.map +1 -1
- package/dist/src/tools/team-agents.d.ts +27 -0
- package/dist/src/tools/team-agents.d.ts.map +1 -0
- package/dist/src/tools/team-agents.js +362 -0
- package/dist/src/tools/team-agents.js.map +1 -0
- package/dist/src/tools/team-mailbox.d.ts +40 -0
- package/dist/src/tools/team-mailbox.d.ts.map +1 -0
- package/dist/src/tools/team-mailbox.js +384 -0
- package/dist/src/tools/team-mailbox.js.map +1 -0
- package/dist/src/tools/team-msg.d.ts +17 -8
- package/dist/src/tools/team-msg.d.ts.map +1 -1
- package/dist/src/tools/team-msg.js +110 -13
- package/dist/src/tools/team-msg.js.map +1 -1
- package/dist/src/tools/team-tasks-mcp.d.ts +27 -0
- package/dist/src/tools/team-tasks-mcp.d.ts.map +1 -0
- package/dist/src/tools/team-tasks-mcp.js +408 -0
- package/dist/src/tools/team-tasks-mcp.js.map +1 -0
- package/dist/src/types/index.d.ts +5 -0
- package/dist/src/types/index.d.ts.map +1 -1
- package/package.json +2 -1
- package/templates/cli/prompts/workflow-skill-conflict-patterns.txt +3 -3
- package/templates/cli/prompts/workflow-skill-lessons-learned.txt +3 -3
- package/templates/search-tools.md +1 -1
- package/workflows/analyze.md +816 -816
- package/workflows/brainstorm.md +471 -471
- package/workflows/cli-tools-usage.md +44 -27
- package/workflows/codebase-rebuild.md +332 -332
- package/workflows/codebase-refresh.md +240 -240
- package/workflows/delegate-usage.md +3 -3
- package/workflows/execute.md +1 -1
- package/workflows/harvest.md +420 -420
- package/workflows/integration-test.md +343 -343
- package/workflows/issue-analyze.md +6 -2
- package/workflows/issue-discover.md +414 -414
- package/workflows/issue-execute.md +6 -3
- package/workflows/issue-plan.md +5 -2
- package/workflows/maestro-coordinate.codex.md +281 -470
- package/workflows/maestro-coordinate.md +14 -14
- package/workflows/maestro-link-coordinate.md +2 -2
- package/workflows/maestro.codex.md +710 -0
- package/workflows/maestro.md +10 -11
- package/workflows/map.md +111 -111
- package/workflows/milestone-complete.md +176 -176
- package/workflows/plan.md +1 -1
- package/workflows/quick.md +497 -497
- package/workflows/refactor.md +300 -300
- package/workflows/retrospective.md +1 -1
- package/workflows/roadmap.md +335 -335
- package/workflows/spec-generate.md +640 -640
- package/workflows/specs-add.md +46 -81
- package/workflows/specs-load.md +15 -17
- package/workflows/specs-setup.md +40 -161
- package/.claude/commands/manage-issue-analyze.md +0 -62
- package/.claude/commands/manage-issue-execute.md +0 -73
- package/.claude/commands/manage-issue-plan.md +0 -62
- package/.codex/skills/manage-issue-analyze/SKILL.md +0 -207
- package/.codex/skills/manage-issue-execute/SKILL.md +0 -200
- package/.codex/skills/manage-issue-plan/SKILL.md +0 -186
|
@@ -14,16 +14,102 @@ export declare const BRIDGE_PREFIX = "maestro-ctx-";
|
|
|
14
14
|
export declare const NOTIFY_PREFIX = "maestro-notify-";
|
|
15
15
|
/** Coordinator tracker bridge file prefix in os.tmpdir() */
|
|
16
16
|
export declare const COORD_BRIDGE_PREFIX = "maestro-coord-";
|
|
17
|
+
/** Spec keyword injection dedup bridge file prefix in os.tmpdir() */
|
|
18
|
+
export declare const SPEC_KW_BRIDGE_PREFIX = "maestro-spec-kw-";
|
|
17
19
|
/** Max ms to wait for stdin before exiting (Windows pipe safety) */
|
|
18
20
|
export declare const STDIN_TIMEOUT_MS = 3000;
|
|
21
|
+
/** Powerline right-arrow separator (E0B0 needs Powerline font, fallback to triangle) */
|
|
22
|
+
export declare const PL_SEP: string;
|
|
23
|
+
/** Select icon set based on config */
|
|
24
|
+
export declare const ICONS: {
|
|
25
|
+
readonly model: "";
|
|
26
|
+
readonly milestone: "";
|
|
27
|
+
readonly phase: "";
|
|
28
|
+
readonly coord: "";
|
|
29
|
+
readonly task: "";
|
|
30
|
+
readonly team: "";
|
|
31
|
+
readonly dir: "";
|
|
32
|
+
readonly git: "";
|
|
33
|
+
readonly ctx: "";
|
|
34
|
+
} | {
|
|
35
|
+
readonly model: "✎";
|
|
36
|
+
readonly milestone: "⚑";
|
|
37
|
+
readonly phase: "◆";
|
|
38
|
+
readonly coord: "⚙";
|
|
39
|
+
readonly task: "▸";
|
|
40
|
+
readonly team: "👥";
|
|
41
|
+
readonly dir: "■";
|
|
42
|
+
readonly git: "◆";
|
|
43
|
+
readonly ctx: "◔";
|
|
44
|
+
};
|
|
45
|
+
/** Git status icons */
|
|
46
|
+
export declare const GIT_ICONS: {
|
|
47
|
+
readonly clean: "✓";
|
|
48
|
+
readonly dirty: "●";
|
|
49
|
+
readonly conflict: "⚠";
|
|
50
|
+
readonly ahead: "↑";
|
|
51
|
+
readonly behind: "↓";
|
|
52
|
+
};
|
|
19
53
|
/**
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* ^_^ — plenty of context (used < 50%)
|
|
23
|
-
* -_- — getting used (used 50–65%)
|
|
24
|
-
* O_O — running low (used 65–80%)
|
|
25
|
-
* X_X — critical (used >= 80%)
|
|
54
|
+
* RGB background colors — muted Notion-inspired palette.
|
|
55
|
+
* Each entry: [R, G, B]
|
|
26
56
|
*/
|
|
57
|
+
export declare const SEGMENT_BG: {
|
|
58
|
+
readonly model: readonly [63, 75, 91];
|
|
59
|
+
readonly milestone: readonly [160, 82, 45];
|
|
60
|
+
readonly phase: readonly [180, 142, 46];
|
|
61
|
+
readonly coord: readonly [58, 126, 200];
|
|
62
|
+
readonly task: readonly [55, 55, 60];
|
|
63
|
+
readonly team: readonly [123, 94, 167];
|
|
64
|
+
readonly dir: readonly [45, 134, 89];
|
|
65
|
+
readonly ctxOk: readonly [45, 134, 89];
|
|
66
|
+
readonly ctxWarn: readonly [180, 142, 46];
|
|
67
|
+
readonly ctxAlert: readonly [200, 122, 42];
|
|
68
|
+
readonly ctxCrit: readonly [196, 64, 64];
|
|
69
|
+
};
|
|
70
|
+
export declare const SEGMENT_FG: {
|
|
71
|
+
readonly model: readonly [255, 255, 255];
|
|
72
|
+
readonly milestone: readonly [255, 255, 255];
|
|
73
|
+
readonly phase: readonly [30, 30, 30];
|
|
74
|
+
readonly coord: readonly [255, 255, 255];
|
|
75
|
+
readonly task: readonly [224, 224, 224];
|
|
76
|
+
readonly team: readonly [255, 255, 255];
|
|
77
|
+
readonly dir: readonly [255, 255, 255];
|
|
78
|
+
readonly ctxOk: readonly [255, 255, 255];
|
|
79
|
+
readonly ctxWarn: readonly [30, 30, 30];
|
|
80
|
+
readonly ctxAlert: readonly [255, 255, 255];
|
|
81
|
+
readonly ctxCrit: readonly [255, 255, 255];
|
|
82
|
+
};
|
|
83
|
+
export type CtxLevel = 'ok' | 'warn' | 'alert' | 'crit';
|
|
84
|
+
export declare function getCtxLevel(usedPct: number): CtxLevel;
|
|
85
|
+
export declare function ansiBg(rgb: readonly [number, number, number]): string;
|
|
86
|
+
export declare function ansiFg(rgb: readonly [number, number, number]): string;
|
|
87
|
+
export declare const ANSI_RESET = "\u001B[0m";
|
|
88
|
+
export declare const ANSI_DIM = "\u001B[2m";
|
|
89
|
+
export declare const ANSI_BOLD = "\u001B[1m";
|
|
90
|
+
export declare const ANSI_CYAN = "\u001B[36m";
|
|
91
|
+
export declare const ANSI_BLINK = "\u001B[5m";
|
|
92
|
+
export type StatuslineStyle = 'powerline' | 'text';
|
|
93
|
+
export declare function getStatuslineStyle(): StatuslineStyle;
|
|
94
|
+
/**
|
|
95
|
+
* Text-mode segment colors — used as foreground on transparent background.
|
|
96
|
+
* Each color is the "accent" for that segment type.
|
|
97
|
+
*/
|
|
98
|
+
export declare const TEXT_COLORS: {
|
|
99
|
+
readonly model: readonly [86, 182, 194];
|
|
100
|
+
readonly milestone: readonly [224, 175, 104];
|
|
101
|
+
readonly phase: readonly [166, 209, 137];
|
|
102
|
+
readonly coord: readonly [137, 180, 250];
|
|
103
|
+
readonly task: readonly [205, 214, 244];
|
|
104
|
+
readonly team: readonly [203, 166, 247];
|
|
105
|
+
readonly dir: readonly [249, 226, 175];
|
|
106
|
+
readonly git: readonly [166, 227, 161];
|
|
107
|
+
readonly ctxOk: readonly [166, 227, 161];
|
|
108
|
+
readonly ctxWarn: readonly [249, 226, 175];
|
|
109
|
+
readonly ctxAlert: readonly [250, 179, 135];
|
|
110
|
+
readonly ctxCrit: readonly [243, 139, 168];
|
|
111
|
+
readonly separator: readonly [88, 91, 112];
|
|
112
|
+
};
|
|
27
113
|
export declare const FACES: {
|
|
28
114
|
readonly happy: "^_^";
|
|
29
115
|
readonly neutral: "-_-";
|
|
@@ -31,11 +117,5 @@ export declare const FACES: {
|
|
|
31
117
|
readonly critical: "X_X";
|
|
32
118
|
};
|
|
33
119
|
export type FaceLevel = keyof typeof FACES;
|
|
34
|
-
/** Map used% to face level */
|
|
35
120
|
export declare function getFaceLevel(usedPct: number): FaceLevel;
|
|
36
|
-
/** ANSI color codes by face level */
|
|
37
121
|
export declare const FACE_COLORS: Record<FaceLevel, string>;
|
|
38
|
-
export declare const ANSI_RESET = "\u001B[0m";
|
|
39
|
-
export declare const ANSI_DIM = "\u001B[2m";
|
|
40
|
-
export declare const ANSI_BOLD = "\u001B[1m";
|
|
41
|
-
export declare const ANSI_CYAN = "\u001B[36m";
|
|
@@ -1,4 +1,33 @@
|
|
|
1
1
|
// Shared constants for maestro hooks
|
|
2
|
+
import { readFileSync, existsSync } from 'node:fs';
|
|
3
|
+
import { join } from 'node:path';
|
|
4
|
+
import { homedir } from 'node:os';
|
|
5
|
+
/**
|
|
6
|
+
* Read statusline config from maestro config file.
|
|
7
|
+
* Falls back to env vars, then defaults.
|
|
8
|
+
*/
|
|
9
|
+
function readStatuslineConfig() {
|
|
10
|
+
// 1. Try maestro config file
|
|
11
|
+
try {
|
|
12
|
+
const configPath = join(process.env.MAESTRO_HOME || join(homedir(), '.maestro'), 'config.json');
|
|
13
|
+
if (existsSync(configPath)) {
|
|
14
|
+
const cfg = JSON.parse(readFileSync(configPath, 'utf8'));
|
|
15
|
+
if (cfg.statusline) {
|
|
16
|
+
return {
|
|
17
|
+
style: cfg.statusline.style === 'powerline' ? 'powerline' : 'text',
|
|
18
|
+
nerdFont: cfg.statusline.nerdFont === true,
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
catch { /* ignore */ }
|
|
24
|
+
// 2. Fall back to env vars
|
|
25
|
+
const envStyle = process.env.MAESTRO_STATUSLINE_STYLE?.toLowerCase();
|
|
26
|
+
const style = (envStyle === 'powerline' || envStyle === 'pl') ? 'powerline' : 'text';
|
|
27
|
+
const nerdFont = process.env.MAESTRO_NERD_FONT === '1';
|
|
28
|
+
return { style, nerdFont };
|
|
29
|
+
}
|
|
30
|
+
const _slConfig = readStatuslineConfig();
|
|
2
31
|
/** Remaining context % at which WARNING is emitted */
|
|
3
32
|
export const WARNING_THRESHOLD = 35;
|
|
4
33
|
/** Remaining context % at which CRITICAL is emitted */
|
|
@@ -15,23 +44,134 @@ export const BRIDGE_PREFIX = 'maestro-ctx-';
|
|
|
15
44
|
export const NOTIFY_PREFIX = 'maestro-notify-';
|
|
16
45
|
/** Coordinator tracker bridge file prefix in os.tmpdir() */
|
|
17
46
|
export const COORD_BRIDGE_PREFIX = 'maestro-coord-';
|
|
47
|
+
/** Spec keyword injection dedup bridge file prefix in os.tmpdir() */
|
|
48
|
+
export const SPEC_KW_BRIDGE_PREFIX = 'maestro-spec-kw-';
|
|
18
49
|
/** Max ms to wait for stdin before exiting (Windows pipe safety) */
|
|
19
50
|
export const STDIN_TIMEOUT_MS = 3000;
|
|
51
|
+
// ---------------------------------------------------------------------------
|
|
52
|
+
// Powerline statusline — Notion-inspired muted palette
|
|
53
|
+
// ---------------------------------------------------------------------------
|
|
54
|
+
/** Powerline right-arrow separator (E0B0 needs Powerline font, fallback to triangle) */
|
|
55
|
+
export const PL_SEP = _slConfig.nerdFont ? '\uE0B0' : '\u25B6';
|
|
56
|
+
/** Icon sets — Nerd Font (rich) vs Unicode (safe fallback) */
|
|
57
|
+
const ICONS_NERD = {
|
|
58
|
+
model: '\u{F0BA9}', // nf-md-robot
|
|
59
|
+
milestone: '\u{F0F4E}', // nf-md-flag_checkered
|
|
60
|
+
phase: '\uF0E3', // nf-oct-milestone
|
|
61
|
+
coord: '\u{F044C}', // nf-md-check_circle_outline
|
|
62
|
+
task: '\uEACB', // nf-cod-terminal_cmd
|
|
63
|
+
team: '\u{F0849}', // nf-md-account_group
|
|
64
|
+
dir: '\uEA83', // nf-cod-folder
|
|
65
|
+
git: '\uE725', // nf-dev-git_branch
|
|
66
|
+
ctx: '\u{F0425}', // nf-md-gauge
|
|
67
|
+
};
|
|
68
|
+
const ICONS_UNICODE = {
|
|
69
|
+
model: '\u270E', // ✎ pencil
|
|
70
|
+
milestone: '\u2691', // ⚑ flag
|
|
71
|
+
phase: '\u25C6', // ◆ diamond
|
|
72
|
+
coord: '\u2699', // ⚙ gear
|
|
73
|
+
task: '\u25B8', // ▸ triangle
|
|
74
|
+
team: '\u{1F465}', // 👥 people
|
|
75
|
+
dir: '\u25A0', // ■ square
|
|
76
|
+
git: '\u25C6', // ◆ diamond (git branch)
|
|
77
|
+
ctx: '\u25D4', // ◔ circle with quarter
|
|
78
|
+
};
|
|
79
|
+
/** Select icon set based on config */
|
|
80
|
+
export const ICONS = _slConfig.nerdFont ? ICONS_NERD : ICONS_UNICODE;
|
|
81
|
+
/** Git status icons */
|
|
82
|
+
export const GIT_ICONS = {
|
|
83
|
+
clean: '✓',
|
|
84
|
+
dirty: '●',
|
|
85
|
+
conflict: '⚠',
|
|
86
|
+
ahead: '↑',
|
|
87
|
+
behind: '↓',
|
|
88
|
+
};
|
|
20
89
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* ^_^ — plenty of context (used < 50%)
|
|
24
|
-
* -_- — getting used (used 50–65%)
|
|
25
|
-
* O_O — running low (used 65–80%)
|
|
26
|
-
* X_X — critical (used >= 80%)
|
|
90
|
+
* RGB background colors — muted Notion-inspired palette.
|
|
91
|
+
* Each entry: [R, G, B]
|
|
27
92
|
*/
|
|
93
|
+
export const SEGMENT_BG = {
|
|
94
|
+
model: [63, 75, 91], // slate
|
|
95
|
+
milestone: [160, 82, 45], // warm brown
|
|
96
|
+
phase: [180, 142, 46], // gold (muted)
|
|
97
|
+
coord: [58, 126, 200], // blue
|
|
98
|
+
task: [55, 55, 60], // charcoal
|
|
99
|
+
team: [123, 94, 167], // purple
|
|
100
|
+
dir: [45, 134, 89], // green
|
|
101
|
+
ctxOk: [45, 134, 89], // green (0–49%)
|
|
102
|
+
ctxWarn: [180, 142, 46], // gold (50–64%)
|
|
103
|
+
ctxAlert: [200, 122, 42], // orange (65–79%)
|
|
104
|
+
ctxCrit: [196, 64, 64], // red (80%+)
|
|
105
|
+
};
|
|
106
|
+
/** Foreground color per segment: white or dark */
|
|
107
|
+
const WHITE = [255, 255, 255];
|
|
108
|
+
const DARK = [30, 30, 30];
|
|
109
|
+
const LIGHT = [224, 224, 224];
|
|
110
|
+
export const SEGMENT_FG = {
|
|
111
|
+
model: WHITE,
|
|
112
|
+
milestone: WHITE,
|
|
113
|
+
phase: DARK,
|
|
114
|
+
coord: WHITE,
|
|
115
|
+
task: LIGHT,
|
|
116
|
+
team: WHITE,
|
|
117
|
+
dir: WHITE,
|
|
118
|
+
ctxOk: WHITE,
|
|
119
|
+
ctxWarn: DARK,
|
|
120
|
+
ctxAlert: WHITE,
|
|
121
|
+
ctxCrit: WHITE,
|
|
122
|
+
};
|
|
123
|
+
export function getCtxLevel(usedPct) {
|
|
124
|
+
if (usedPct < 50)
|
|
125
|
+
return 'ok';
|
|
126
|
+
if (usedPct < 65)
|
|
127
|
+
return 'warn';
|
|
128
|
+
if (usedPct < 80)
|
|
129
|
+
return 'alert';
|
|
130
|
+
return 'crit';
|
|
131
|
+
}
|
|
132
|
+
// ---------------------------------------------------------------------------
|
|
133
|
+
// ANSI helpers (true-color / 24-bit)
|
|
134
|
+
// ---------------------------------------------------------------------------
|
|
135
|
+
export function ansiBg(rgb) {
|
|
136
|
+
return `\x1b[48;2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
|
|
137
|
+
}
|
|
138
|
+
export function ansiFg(rgb) {
|
|
139
|
+
return `\x1b[38;2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
|
|
140
|
+
}
|
|
141
|
+
export const ANSI_RESET = '\x1b[0m';
|
|
142
|
+
export const ANSI_DIM = '\x1b[2m';
|
|
143
|
+
export const ANSI_BOLD = '\x1b[1m';
|
|
144
|
+
export const ANSI_CYAN = '\x1b[36m';
|
|
145
|
+
export const ANSI_BLINK = '\x1b[5m';
|
|
146
|
+
export function getStatuslineStyle() {
|
|
147
|
+
return _slConfig.style;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Text-mode segment colors — used as foreground on transparent background.
|
|
151
|
+
* Each color is the "accent" for that segment type.
|
|
152
|
+
*/
|
|
153
|
+
export const TEXT_COLORS = {
|
|
154
|
+
model: [86, 182, 194], // cyan
|
|
155
|
+
milestone: [224, 175, 104], // warm gold
|
|
156
|
+
phase: [166, 209, 137], // soft green
|
|
157
|
+
coord: [137, 180, 250], // light blue
|
|
158
|
+
task: [205, 214, 244], // white-ish
|
|
159
|
+
team: [203, 166, 247], // lavender
|
|
160
|
+
dir: [249, 226, 175], // yellow
|
|
161
|
+
git: [166, 227, 161], // green
|
|
162
|
+
ctxOk: [166, 227, 161], // green
|
|
163
|
+
ctxWarn: [249, 226, 175], // yellow
|
|
164
|
+
ctxAlert: [250, 179, 135], // peach
|
|
165
|
+
ctxCrit: [243, 139, 168], // red/pink
|
|
166
|
+
separator: [88, 91, 112], // dim gray for |
|
|
167
|
+
};
|
|
168
|
+
// Legacy face exports (kept for context-monitor compatibility)
|
|
28
169
|
export const FACES = {
|
|
29
170
|
happy: '^_^',
|
|
30
171
|
neutral: '-_-',
|
|
31
172
|
alert: 'O_O',
|
|
32
173
|
critical: 'X_X',
|
|
33
174
|
};
|
|
34
|
-
/** Map used% to face level */
|
|
35
175
|
export function getFaceLevel(usedPct) {
|
|
36
176
|
if (usedPct < 50)
|
|
37
177
|
return 'happy';
|
|
@@ -41,15 +181,10 @@ export function getFaceLevel(usedPct) {
|
|
|
41
181
|
return 'alert';
|
|
42
182
|
return 'critical';
|
|
43
183
|
}
|
|
44
|
-
/** ANSI color codes by face level */
|
|
45
184
|
export const FACE_COLORS = {
|
|
46
|
-
happy: '\x1b[32m',
|
|
47
|
-
neutral: '\x1b[33m',
|
|
48
|
-
alert: '\x1b[38;5;208m',
|
|
49
|
-
critical: '\x1b[5;31m',
|
|
185
|
+
happy: '\x1b[32m',
|
|
186
|
+
neutral: '\x1b[33m',
|
|
187
|
+
alert: '\x1b[38;5;208m',
|
|
188
|
+
critical: '\x1b[5;31m',
|
|
50
189
|
};
|
|
51
|
-
export const ANSI_RESET = '\x1b[0m';
|
|
52
|
-
export const ANSI_DIM = '\x1b[2m';
|
|
53
|
-
export const ANSI_BOLD = '\x1b[1m';
|
|
54
|
-
export const ANSI_CYAN = '\x1b[36m';
|
|
55
190
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/hooks/constants.ts"],"names":[],"mappings":"AAAA,qCAAqC;AAErC,sDAAsD;AACtD,MAAM,CAAC,MA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AAE;QAAE,OAAO,OAAO,CAAC;IACjC,IAAI,OAAO,GAAG,EAAE;QAAE,OAAO,SAAS,CAAC;IACnC,IAAI,OAAO,GAAG,EAAE;QAAE,OAAO,OAAO,CAAC;IACjC,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,MAAM,CAAC,MAAM,WAAW,GAA8B;IACpD,KAAK,EAAK,UAAU;IACpB,OAAO,EAAG,UAAU;IACpB,KAAK,EAAK,gBAAgB;IAC1B,QAAQ,EAAE,YAAY;CACvB,CAAC"}
|
|
@@ -10,6 +10,10 @@ export interface SpecInjectionConfig {
|
|
|
10
10
|
/** Max chars before truncation kicks in */
|
|
11
11
|
maxContentLength?: number;
|
|
12
12
|
}
|
|
13
|
+
export interface StatuslineConfig {
|
|
14
|
+
style: 'powerline' | 'text';
|
|
15
|
+
nerdFont?: boolean;
|
|
16
|
+
}
|
|
13
17
|
export interface MaestroConfig {
|
|
14
18
|
version: string;
|
|
15
19
|
extensions: ExtensionConfig[];
|
|
@@ -17,6 +21,7 @@ export interface MaestroConfig {
|
|
|
17
21
|
workflows: WorkflowConfig;
|
|
18
22
|
hooks?: HooksConfig;
|
|
19
23
|
specInjection?: SpecInjectionConfig;
|
|
24
|
+
statusline?: StatuslineConfig;
|
|
20
25
|
}
|
|
21
26
|
export interface ExtensionConfig {
|
|
22
27
|
name: string;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import type { Command } from 'commander';
|
|
2
|
-
import { type MemberRecord } from '../tools/team-members.js';
|
|
3
|
-
import { type ActivityEvent } from '../tools/team-activity.js';
|
|
4
2
|
/**
|
|
5
3
|
* Scan `.workflow/collab/overlays/` for bundle files from other team members,
|
|
6
4
|
* import bundles that are newer than previously imported, and update manifest.
|
|
@@ -11,37 +9,6 @@ export declare function syncOverlays(projectRoot: string, selfUid: string): {
|
|
|
11
9
|
imported: number;
|
|
12
10
|
skipped: number;
|
|
13
11
|
};
|
|
14
|
-
export
|
|
15
|
-
exitCode: 0 | 1 | 2;
|
|
16
|
-
warnings: string[];
|
|
17
|
-
conflicts: Array<{
|
|
18
|
-
user: string;
|
|
19
|
-
host: string;
|
|
20
|
-
action: string;
|
|
21
|
-
ts: string;
|
|
22
|
-
relative: string;
|
|
23
|
-
}>;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Pure preflight logic, exported for tests.
|
|
27
|
-
*
|
|
28
|
-
* Algorithm:
|
|
29
|
-
* 1. If no self → exit 0 (team mode off is a safe no-op).
|
|
30
|
-
* 2. Fetch recent activity (30 min window, clock tolerance handled by the
|
|
31
|
-
* team-activity module).
|
|
32
|
-
* 3. Filter: same phase, different user.
|
|
33
|
-
* 4. Deduplicate by `user@host` keeping the most recent event.
|
|
34
|
-
* 5. Emit one warning line per unique teammate.
|
|
35
|
-
*
|
|
36
|
-
* `force` affects ONLY the exit code — warnings are still returned verbatim
|
|
37
|
-
* so callers can print them to stderr before continuing.
|
|
38
|
-
*/
|
|
39
|
-
export declare function runPreflight(phase: number, opts: {
|
|
40
|
-
force?: boolean;
|
|
41
|
-
}, deps?: {
|
|
42
|
-
getSelf?: () => MemberRecord | null;
|
|
43
|
-
getActivity?: (mins: number) => ActivityEvent[];
|
|
44
|
-
now?: () => number;
|
|
45
|
-
}): PreflightResult;
|
|
12
|
+
export { runPreflight, type PreflightResult } from '../hooks/preflight-core.js';
|
|
46
13
|
export declare function registerCollabCommand(program: Command): void;
|
|
47
14
|
//# sourceMappingURL=collab.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collab.d.ts","sourceRoot":"","sources":["../../../src/commands/collab.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"collab.d.ts","sourceRoot":"","sources":["../../../src/commands/collab.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAiNzC;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,GACd;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAgFvC;AAiXD,OAAO,EAAE,YAAY,EAAE,KAAK,eAAe,EAAE,MAAM,4BAA4B,CAAC;AA+ChF,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAqJ5D"}
|
|
@@ -23,6 +23,7 @@ import { existsSync, mkdirSync, readFileSync, readdirSync, writeFileSync } from
|
|
|
23
23
|
import { join } from 'node:path';
|
|
24
24
|
import { joinTeam, resolveSelf, requireTeamMode, getMemberByUid, addProjectRole, removeProjectRole, listProjectRoles, } from '../tools/team-members.js';
|
|
25
25
|
import { reportActivity, readRecentActivity, rotateIfNeeded, } from '../tools/team-activity.js';
|
|
26
|
+
import { runPreflight, } from '../hooks/preflight-core.js';
|
|
26
27
|
import { importBundle, } from '../core/overlay/applier.js';
|
|
27
28
|
import { createTask, listTasks, getTask, updateTaskStatus, assignTask, addCheckEntry, } from '../tools/team-tasks.js';
|
|
28
29
|
import { paths } from '../config/paths.js';
|
|
@@ -599,78 +600,9 @@ function runSync(opts) {
|
|
|
599
600
|
// ---------------------------------------------------------------------------
|
|
600
601
|
// preflight
|
|
601
602
|
// ---------------------------------------------------------------------------
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
*/
|
|
606
|
-
function relTime(ts, now) {
|
|
607
|
-
const ms = now - new Date(ts).getTime();
|
|
608
|
-
const min = Math.floor(ms / 60000);
|
|
609
|
-
if (min < 1)
|
|
610
|
-
return 'just now';
|
|
611
|
-
if (min < 60)
|
|
612
|
-
return `${min} min`;
|
|
613
|
-
return `${Math.floor(min / 60)}h ${min % 60}m`;
|
|
614
|
-
}
|
|
615
|
-
/**
|
|
616
|
-
* Pure preflight logic, exported for tests.
|
|
617
|
-
*
|
|
618
|
-
* Algorithm:
|
|
619
|
-
* 1. If no self → exit 0 (team mode off is a safe no-op).
|
|
620
|
-
* 2. Fetch recent activity (30 min window, clock tolerance handled by the
|
|
621
|
-
* team-activity module).
|
|
622
|
-
* 3. Filter: same phase, different user.
|
|
623
|
-
* 4. Deduplicate by `user@host` keeping the most recent event.
|
|
624
|
-
* 5. Emit one warning line per unique teammate.
|
|
625
|
-
*
|
|
626
|
-
* `force` affects ONLY the exit code — warnings are still returned verbatim
|
|
627
|
-
* so callers can print them to stderr before continuing.
|
|
628
|
-
*/
|
|
629
|
-
export function runPreflight(phase, opts, deps) {
|
|
630
|
-
const getSelf = deps?.getSelf ?? resolveSelf;
|
|
631
|
-
const getActivity = deps?.getActivity ?? readRecentActivity;
|
|
632
|
-
const now = deps?.now ?? Date.now;
|
|
633
|
-
const self = getSelf();
|
|
634
|
-
if (!self) {
|
|
635
|
-
return { exitCode: 0, warnings: [], conflicts: [] };
|
|
636
|
-
}
|
|
637
|
-
const events = getActivity(30);
|
|
638
|
-
const filtered = events.filter((e) => e.phase_id === phase && e.user !== self.uid);
|
|
639
|
-
// Dedupe by user@host, keep the most recent.
|
|
640
|
-
const latest = new Map();
|
|
641
|
-
for (const e of filtered) {
|
|
642
|
-
const key = `${e.user}@${e.host}`;
|
|
643
|
-
const prev = latest.get(key);
|
|
644
|
-
if (!prev || Date.parse(e.ts) > Date.parse(prev.ts)) {
|
|
645
|
-
latest.set(key, e);
|
|
646
|
-
}
|
|
647
|
-
}
|
|
648
|
-
if (latest.size === 0) {
|
|
649
|
-
return { exitCode: 0, warnings: [], conflicts: [] };
|
|
650
|
-
}
|
|
651
|
-
const nowMs = now();
|
|
652
|
-
const warnings = [];
|
|
653
|
-
const conflicts = [];
|
|
654
|
-
// Stable order: most recent first.
|
|
655
|
-
const rows = Array.from(latest.values()).sort((a, b) => Date.parse(b.ts) - Date.parse(a.ts));
|
|
656
|
-
for (const e of rows) {
|
|
657
|
-
const rel = relTime(e.ts, nowMs);
|
|
658
|
-
warnings.push(`\u26a0 ${e.user}@${e.host} is active on phase ${phase} ` +
|
|
659
|
-
`(last: ${e.action}, ${rel} ago)`);
|
|
660
|
-
conflicts.push({
|
|
661
|
-
user: e.user,
|
|
662
|
-
host: e.host,
|
|
663
|
-
action: e.action,
|
|
664
|
-
ts: e.ts,
|
|
665
|
-
relative: rel,
|
|
666
|
-
});
|
|
667
|
-
}
|
|
668
|
-
return {
|
|
669
|
-
exitCode: opts.force ? 0 : 1,
|
|
670
|
-
warnings,
|
|
671
|
-
conflicts,
|
|
672
|
-
};
|
|
673
|
-
}
|
|
603
|
+
// runPreflight and PreflightResult are imported from '../hooks/preflight-core.js'
|
|
604
|
+
// and re-exported for backward compatibility.
|
|
605
|
+
export { runPreflight } from '../hooks/preflight-core.js';
|
|
674
606
|
function runPreflightCli(opts) {
|
|
675
607
|
// Team mode off is a silent no-op. Resolve self BEFORE checking phase arg
|
|
676
608
|
// so that CI/hooks invoking preflight on machines without team config
|
|
@@ -888,8 +820,8 @@ function runSpecList() {
|
|
|
888
820
|
console.log(`Personal specs for ${self.uid} (${files.length} files):`);
|
|
889
821
|
console.log('');
|
|
890
822
|
for (const file of files.sort()) {
|
|
891
|
-
const
|
|
892
|
-
const catLabel =
|
|
823
|
+
const cat = CATEGORY_MAP[file];
|
|
824
|
+
const catLabel = cat ?? 'learning';
|
|
893
825
|
console.log(` ${file} (${catLabel})`);
|
|
894
826
|
}
|
|
895
827
|
}
|
|
@@ -911,8 +843,8 @@ function runSpecEdit(filename) {
|
|
|
911
843
|
}
|
|
912
844
|
// Create file with template if it does not exist
|
|
913
845
|
if (!existsSync(filePath)) {
|
|
914
|
-
const
|
|
915
|
-
const catComment =
|
|
846
|
+
const cat = CATEGORY_MAP[specFile];
|
|
847
|
+
const catComment = cat ?? 'learning';
|
|
916
848
|
writeFileSync(filePath, `# ${specFile.replace('.md', '')}\n\n<!-- categories: ${catComment} -->\n\n`, 'utf-8');
|
|
917
849
|
console.log(`Created: ${filePath}`);
|
|
918
850
|
}
|