@aithr-ai/mcp-server 1.2.0 → 1.2.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aithr-ai/mcp-server",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "MCP server to connect Claude Code to Aether canvas - AI-powered team workspace for software development",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -646,6 +646,7 @@ aether_complete_orchestra(
646
646
  |------|---------|
647
647
  | `aether_start_orchestra(maxIterations?, maxAgents?, timeoutMinutes?, completionCriteria?)` | Start session |
648
648
  | `aether_set_orchestra_plan(sessionId, planContent, phases, completionCriteria?)` | Set development plan |
649
+ | `aether_create_contract(sessionId, requirements, existingCodeSummary?)` | Generate Source of Truth contract |
649
650
  | `aether_orchestra_approve(sessionId)` | Approve and start execution |
650
651
  | `aether_orchestra_status(sessionId?, includeReports?, includeLogs?)` | Get full status |
651
652
  | `aether_orchestra_next(sessionId, maxTasks?)` | Get ready tasks |
@@ -654,6 +655,14 @@ aether_complete_orchestra(
654
655
  | `aether_orchestra_pause(sessionId)` | Pause execution |
655
656
  | `aether_orchestra_resume(sessionId)` | Resume execution |
656
657
  | `aether_complete_orchestra(sessionId, completionReason, summary?)` | Complete session |
658
+ | `aether_edit_orchestra(sessionId, action, ...)` | Edit plan without restarting |
659
+
660
+ ### Workflow Enforcement Tools (v7)
661
+ | Tool | Purpose |
662
+ |------|---------|
663
+ | `aether_orchestra_guide(sessionId?)` | Get intelligent guidance on next action |
664
+ | `aether_orchestra_validate(sessionId?, intendedAction?)` | Pre-flight check before major actions |
665
+ | `aether_orchestra_checkpoint(sessionId, phaseNumber?, validateContract?, autoAdvance?)` | Quality gate between phases |
657
666
 
658
667
  ---
659
668
 
@@ -2018,6 +2027,280 @@ The session automatically pauses when:
2018
2027
 
2019
2028
  ---
2020
2029
 
2030
+ ## Workflow Enforcement (Orchestra v7)
2031
+
2032
+ Orchestra v7 introduces workflow enforcement tools to prevent skipped steps and ensure proper execution order.
2033
+
2034
+ ### The Problem
2035
+
2036
+ Without enforcement, Claude Code might:
2037
+ - Skip contract generation (causing type inconsistencies)
2038
+ - Try to execute tasks before plan approval
2039
+ - Miss phase checkpoints
2040
+ - Not know what step comes next
2041
+
2042
+ ### Workflow Enforcement Tools
2043
+
2044
+ | Tool | Purpose | When to Use |
2045
+ |------|---------|-------------|
2046
+ | `aether_orchestra_guide` | Get intelligent guidance on next action | When unsure what to do next |
2047
+ | `aether_orchestra_validate` | Pre-flight check before actions | Before approving, executing, or completing |
2048
+ | `aether_orchestra_checkpoint` | Quality gate between phases | After completing a phase |
2049
+
2050
+ ### The Correct Workflow
2051
+
2052
+ ```
2053
+ 📋 ORCHESTRA WORKFLOW (MANDATORY ORDER):
2054
+
2055
+ 1. aether_start_orchestra → Creates session (status: planning)
2056
+ 2. aether_set_orchestra_plan → Defines phases/tasks (status: awaiting_approval)
2057
+ 3. aether_create_contract → Generates type contracts [RECOMMENDED]
2058
+ 4. aether_orchestra_approve → Begins execution (status: running)
2059
+ 5. aether_orchestra_next → Get ready tasks
2060
+ 6. aether_trigger_generation → Execute task with orchestraContext
2061
+ 7. aether_report_to_orchestrator → Report completion/blockers
2062
+ 8. Repeat 5-7 until phase complete
2063
+ 9. aether_orchestra_checkpoint → Validate phase before advancing
2064
+ 10. Repeat 5-9 until all phases done
2065
+ 11. aether_complete_orchestra → Finalize session
2066
+ ```
2067
+
2068
+ ### Using aether_orchestra_guide
2069
+
2070
+ **RECOMMENDED**: Call this when starting or when unsure what to do:
2071
+
2072
+ ```javascript
2073
+ // Get intelligent guidance
2074
+ aether_orchestra_guide({})
2075
+
2076
+ // Returns (example when no session exists):
2077
+ {
2078
+ nextTool: "aether_start_orchestra",
2079
+ parameters: {},
2080
+ explanation: "No active orchestra session found. Start a new session to begin.",
2081
+ example: "aether_start_orchestra({ maxIterations: 100, timeoutMinutes: 480 })"
2082
+ }
2083
+
2084
+ // Returns (example when plan set but no contract):
2085
+ {
2086
+ nextTool: "aether_create_contract",
2087
+ parameters: { sessionId: "abc-123", requirements: "<Full project requirements>" },
2088
+ explanation: "Plan is set. Now generate the Source of Truth contract.",
2089
+ note: "This step is RECOMMENDED but optional. You can skip to aether_orchestra_approve."
2090
+ }
2091
+
2092
+ // Returns (example when tasks ready):
2093
+ {
2094
+ nextTool: "aether_orchestra_next",
2095
+ parameters: { sessionId: "abc-123" },
2096
+ explanation: "3 task(s) ready to execute. Get them and trigger generation.",
2097
+ followUp: "After getting tasks, use aether_trigger_generation with orchestraContext."
2098
+ }
2099
+ ```
2100
+
2101
+ ### Using aether_orchestra_validate
2102
+
2103
+ **Pre-flight check** before taking any major action:
2104
+
2105
+ ```javascript
2106
+ // Validate before approving
2107
+ aether_orchestra_validate({
2108
+ sessionId: "abc-123",
2109
+ intendedAction: "approve"
2110
+ })
2111
+
2112
+ // Returns (if prerequisites missing):
2113
+ {
2114
+ valid: false,
2115
+ status: "planning",
2116
+ hasPlan: true,
2117
+ hasContract: false,
2118
+ warnings: ["Contract not generated (RECOMMENDED)"],
2119
+ actionValid: true,
2120
+ nextStep: {
2121
+ tool: "aether_create_contract",
2122
+ reason: "Generate contract for consistent types/schemas across agents",
2123
+ canSkip: true
2124
+ },
2125
+ workflow: "📋 ORCHESTRA WORKFLOW: ... Current position: Step 3 (awaiting contract)"
2126
+ }
2127
+
2128
+ // Returns (if ready to proceed):
2129
+ {
2130
+ valid: true,
2131
+ status: "awaiting_approval",
2132
+ hasPlan: true,
2133
+ hasContract: true,
2134
+ warnings: [],
2135
+ actionValid: true,
2136
+ nextStep: {
2137
+ tool: "aether_orchestra_approve",
2138
+ reason: "Approve the plan to begin execution"
2139
+ }
2140
+ }
2141
+ ```
2142
+
2143
+ **Intended Actions:**
2144
+ - `execute_task` - Checks if session is running
2145
+ - `approve` - Checks if plan exists
2146
+ - `complete` - Checks if session isn't already complete
2147
+ - `any` - General validation
2148
+
2149
+ ### Using aether_orchestra_checkpoint
2150
+
2151
+ **Quality gate** between phases:
2152
+
2153
+ ```javascript
2154
+ // Validate phase completion
2155
+ aether_orchestra_checkpoint({
2156
+ sessionId: "abc-123",
2157
+ phaseNumber: 1, // Optional, uses current phase if not provided
2158
+ validateContract: true, // Check contract compliance
2159
+ autoAdvance: true // Automatically advance to next phase if passed
2160
+ })
2161
+
2162
+ // Returns (if phase incomplete):
2163
+ {
2164
+ success: false,
2165
+ checkpointPassed: false,
2166
+ phase: { number: 1, title: "Foundation", status: "in_progress" },
2167
+ tasks: { total: 5, completed: 3, running: 1, pending: 1 },
2168
+ blockers: [
2169
+ "1 task(s) still running",
2170
+ "1 task(s) still pending"
2171
+ ],
2172
+ message: "❌ Phase 1 checkpoint FAILED - 2 blocker(s)"
2173
+ }
2174
+
2175
+ // Returns (if phase complete and auto-advancing):
2176
+ {
2177
+ success: true,
2178
+ checkpointPassed: true,
2179
+ phase: { number: 1, title: "Foundation", status: "completed" },
2180
+ tasks: { total: 5, completed: 5, running: 0, pending: 0 },
2181
+ artifacts: { expected: 5, found: 5, missing: [] },
2182
+ contract: { checked: true, hasContract: true, warnings: [] },
2183
+ blockers: [],
2184
+ autoAdvanced: true,
2185
+ advancedToPhase: 2,
2186
+ message: "✅ Phase 1 checkpoint PASSED - Advanced to Phase 2"
2187
+ }
2188
+ ```
2189
+
2190
+ ### Best Practices for Workflow Enforcement
2191
+
2192
+ #### 1. Start with Guide
2193
+
2194
+ When beginning or resuming a session:
2195
+
2196
+ ```javascript
2197
+ // First call - get guidance
2198
+ const guidance = await aether_orchestra_guide({});
2199
+ console.log(`Next: ${guidance.nextTool}`);
2200
+ console.log(`Why: ${guidance.explanation}`);
2201
+
2202
+ // Then follow the recommendation
2203
+ await callTool(guidance.nextTool, guidance.parameters);
2204
+ ```
2205
+
2206
+ #### 2. Validate Before Major Actions
2207
+
2208
+ Before approving or completing:
2209
+
2210
+ ```javascript
2211
+ // Check if ready to approve
2212
+ const validation = await aether_orchestra_validate({
2213
+ sessionId,
2214
+ intendedAction: "approve"
2215
+ });
2216
+
2217
+ if (!validation.valid) {
2218
+ console.log(`Not ready: ${validation.warnings.join(', ')}`);
2219
+ console.log(`Next step: ${validation.nextStep.tool}`);
2220
+ return;
2221
+ }
2222
+
2223
+ // Safe to proceed
2224
+ await aether_orchestra_approve({ sessionId });
2225
+ ```
2226
+
2227
+ #### 3. Checkpoint Between Phases
2228
+
2229
+ After completing all tasks in a phase:
2230
+
2231
+ ```javascript
2232
+ // Validate phase before advancing
2233
+ const checkpoint = await aether_orchestra_checkpoint({
2234
+ sessionId,
2235
+ autoAdvance: true
2236
+ });
2237
+
2238
+ if (!checkpoint.checkpointPassed) {
2239
+ console.log(`Phase blocked: ${checkpoint.blockers.join('\n')}`);
2240
+ // Handle blockers before continuing
2241
+ return;
2242
+ }
2243
+
2244
+ // Phase validated, proceeding to next
2245
+ console.log(`Advanced to Phase ${checkpoint.advancedToPhase}`);
2246
+ ```
2247
+
2248
+ #### 4. Never Skip the Contract Step
2249
+
2250
+ The contract ensures type consistency:
2251
+
2252
+ ```javascript
2253
+ // Always check for contract before executing tasks
2254
+ const validation = await aether_orchestra_validate({ sessionId });
2255
+
2256
+ if (!validation.hasContract) {
2257
+ // Generate contract first
2258
+ await aether_create_contract({
2259
+ sessionId,
2260
+ requirements: fullProjectRequirements
2261
+ });
2262
+ }
2263
+ ```
2264
+
2265
+ ### Workflow Enforcement Decision Tree
2266
+
2267
+ ```
2268
+ START
2269
+
2270
+
2271
+ aether_orchestra_guide({})
2272
+
2273
+ ├─ No session? ──────────────▶ aether_start_orchestra
2274
+
2275
+ ├─ No plan? ─────────────────▶ aether_set_orchestra_plan
2276
+
2277
+ ├─ No contract? ─────────────▶ aether_create_contract (recommended)
2278
+ │ or
2279
+ │ aether_orchestra_approve (skip)
2280
+
2281
+ ├─ Awaiting approval? ───────▶ aether_orchestra_validate({ intendedAction: "approve" })
2282
+ │ │
2283
+ │ ├─ valid=true ──▶ aether_orchestra_approve
2284
+ │ └─ valid=false ─▶ Fix warnings first
2285
+
2286
+ ├─ Running + tasks ready? ───▶ aether_orchestra_next
2287
+ │ │
2288
+ │ ▼
2289
+ │ aether_trigger_generation (with orchestraContext)
2290
+ │ │
2291
+ │ ▼
2292
+ │ aether_report_to_orchestrator
2293
+
2294
+ ├─ Phase complete? ──────────▶ aether_orchestra_checkpoint({ autoAdvance: true })
2295
+ │ │
2296
+ │ ├─ passed ──▶ Continue to next phase
2297
+ │ └─ failed ──▶ Fix blockers
2298
+
2299
+ └─ All phases done? ─────────▶ aether_complete_orchestra
2300
+ ```
2301
+
2302
+ ---
2303
+
2021
2304
  ## Audit Trail
2022
2305
 
2023
2306
  Every action in Orchestra is logged for full auditability.
@@ -2320,6 +2603,52 @@ aether_complete_orchestra({
2320
2603
  completionReason: 'all_criteria_met' | 'all_phases_complete' | 'manual_stop' | 'timeout' | 'max_iterations',
2321
2604
  summary?: string
2322
2605
  })
2606
+
2607
+ // Edit Orchestra (modify plan without restarting)
2608
+ aether_edit_orchestra({
2609
+ sessionId: string,
2610
+ action: 'add_task' | 'remove_task' | 'update_task' | 'split_task' | 'add_phase' | 'update_phase',
2611
+ phaseId?: string, // For add_task
2612
+ taskId?: string, // For remove_task, update_task, split_task
2613
+ task?: object, // Task definition for add_task/update_task
2614
+ splitInto?: object[], // Sub-tasks for split_task
2615
+ phase?: object, // Phase definition for add_phase
2616
+ phaseUpdates?: object // Updates for update_phase
2617
+ })
2618
+
2619
+ // Create Contract (Source of Truth)
2620
+ aether_create_contract({
2621
+ sessionId: string,
2622
+ requirements: string, // Full project requirements
2623
+ existingCodeSummary?: string // For brownfield projects
2624
+ })
2625
+ // Returns: { success: boolean, contract: object, contractVersion: number }
2626
+ ```
2627
+
2628
+ ### Workflow Enforcement (v7)
2629
+
2630
+ ```typescript
2631
+ // Get Intelligent Guidance
2632
+ aether_orchestra_guide({
2633
+ sessionId?: string // Uses latest if not provided
2634
+ })
2635
+ // Returns: { nextTool: string, parameters: object, explanation: string, example?: string }
2636
+
2637
+ // Pre-flight Validation
2638
+ aether_orchestra_validate({
2639
+ sessionId?: string,
2640
+ intendedAction?: 'execute_task' | 'approve' | 'complete' | 'any'
2641
+ })
2642
+ // Returns: { valid: boolean, status: string, hasPlan: boolean, hasContract: boolean, warnings: string[], nextStep: object }
2643
+
2644
+ // Phase Checkpoint
2645
+ aether_orchestra_checkpoint({
2646
+ sessionId: string,
2647
+ phaseNumber?: number, // Uses current phase if not provided
2648
+ validateContract?: boolean, // Default: true
2649
+ autoAdvance?: boolean // Default: false - advance to next phase if passed
2650
+ })
2651
+ // Returns: { checkpointPassed: boolean, blockers: string[], autoAdvanced: boolean, advancedToPhase?: number }
2323
2652
  ```
2324
2653
 
2325
2654
  ### Generation
@@ -2428,6 +2757,7 @@ aether_push_local({
2428
2757
 
2429
2758
  | Version | Date | Changes |
2430
2759
  |---------|------|---------|
2760
+ | v7.0 | 2025-01 | Workflow enforcement: validate, checkpoint, guide tools |
2431
2761
  | v6.0 | 2025-01 | File collision prevention, file lock manager |
2432
2762
  | v5.0 | 2025-01 | Contract-first development, validation protocol |
2433
2763
  | v4.0 | 2024-12 | Orchestrator Brain, dynamic decisions |
@@ -2441,17 +2771,22 @@ aether_push_local({
2441
2771
 
2442
2772
  ### Starting an Orchestra Session
2443
2773
 
2774
+ - [ ] `aether_orchestra_guide({})` - Get guidance on what to do
2444
2775
  - [ ] `/orchestra` - Create session and plan
2445
2776
  - [ ] Review generated DEVELOPMENT_PLAN.md
2446
2777
  - [ ] Verify local project path for validation
2778
+ - [ ] `aether_create_contract()` - Generate Source of Truth [RECOMMENDED]
2779
+ - [ ] `aether_orchestra_validate({ intendedAction: "approve" })` - Pre-flight check
2447
2780
  - [ ] `/orchestra approve` - Start execution
2448
2781
 
2449
2782
  ### During Execution
2450
2783
 
2784
+ - [ ] Use `aether_orchestra_guide` when unsure what to do next
2451
2785
  - [ ] Monitor `aether_orchestra_status` regularly
2452
2786
  - [ ] Check `safeguards` for approaching limits
2453
2787
  - [ ] Validate after each code-generating task
2454
2788
  - [ ] Full validation after each phase (typecheck + lint + test)
2789
+ - [ ] `aether_orchestra_checkpoint({ autoAdvance: true })` - Gate between phases
2455
2790
  - [ ] Handle blockers promptly
2456
2791
 
2457
2792
  ### On Completion
@@ -2465,12 +2800,30 @@ aether_push_local({
2465
2800
  ### If Issues Occur
2466
2801
 
2467
2802
  - [ ] Check `aether_orchestra_status` with logs
2803
+ - [ ] Use `aether_orchestra_guide` to get next step
2468
2804
  - [ ] Review `tasksBlockedByFiles` for v6 conflicts
2469
2805
  - [ ] Check `lastValidationErrors`
2806
+ - [ ] Use `aether_edit_orchestra` to modify plan mid-flight
2470
2807
  - [ ] Use `aether_orchestra_pause` if needed
2471
2808
  - [ ] Create fix tasks or manually resolve
2472
2809
  - [ ] `aether_orchestra_resume` to continue
2473
2810
 
2811
+ ### Workflow Enforcement Quick Commands
2812
+
2813
+ ```javascript
2814
+ // When unsure what to do next:
2815
+ aether_orchestra_guide({})
2816
+
2817
+ // Before approving a plan:
2818
+ aether_orchestra_validate({ intendedAction: "approve" })
2819
+
2820
+ // After completing a phase:
2821
+ aether_orchestra_checkpoint({ sessionId, autoAdvance: true })
2822
+
2823
+ // To modify plan without restarting:
2824
+ aether_edit_orchestra({ sessionId, action: "add_task", ... })
2825
+ ```
2826
+
2474
2827
  ---
2475
2828
 
2476
- *Orchestra v6 - Autonomous AI Development Orchestration with Contract-First Development, Dynamic Agent Switching, and File Collision Prevention. The trust of millions of codebases depends on this system working reliably.*
2829
+ *Orchestra v7 - Autonomous AI Development Orchestration with Workflow Enforcement, Contract-First Development, Dynamic Agent Switching, and File Collision Prevention. The trust of millions of codebases depends on this system working reliably.*