@allpepper/task-orchestrator 1.1.1 → 1.1.2

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": "@allpepper/task-orchestrator",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "MCP server for hierarchical task orchestration with SQLite persistence",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -73,7 +73,6 @@ function validateComplexity(complexity: number): boolean {
73
73
  // ============================================================================
74
74
 
75
75
  export function createTask(params: {
76
- projectId?: string;
77
76
  featureId?: string;
78
77
  title: string;
79
78
  summary: string;
@@ -97,6 +96,19 @@ export function createTask(params: {
97
96
  return err('Summary is required', 'VALIDATION_ERROR');
98
97
  }
99
98
 
99
+ // Derive projectId from feature - feature is the source of truth for project membership
100
+ let projectId: string | undefined;
101
+ if (params.featureId) {
102
+ const feature = queryOne<{ project_id: string | null }>(
103
+ 'SELECT project_id FROM features WHERE id = ?',
104
+ [params.featureId]
105
+ );
106
+ if (!feature) {
107
+ return err(`Feature not found: ${params.featureId}`, 'NOT_FOUND');
108
+ }
109
+ projectId = feature.project_id ?? undefined;
110
+ }
111
+
100
112
  const id = generateId();
101
113
  const timestamp = now();
102
114
  const status = params.status ?? TaskStatus.PENDING;
@@ -113,7 +125,7 @@ export function createTask(params: {
113
125
  ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`,
114
126
  [
115
127
  id,
116
- params.projectId ?? null,
128
+ projectId ?? null,
117
129
  params.featureId ?? null,
118
130
  params.title.trim(),
119
131
  params.summary.trim(),
@@ -127,7 +127,6 @@ export function registerManageContainerTool(server: McpServer): void {
127
127
  }
128
128
 
129
129
  result = createTask({
130
- projectId: params.projectId,
131
130
  featureId: params.featureId,
132
131
  title: nameOrTitle,
133
132
  summary: params.summary,