create-claude-workspace 2.3.6 → 2.3.7
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/dist/scheduler/index.mjs +8 -0
- package/dist/scheduler/loop.mjs +24 -2
- package/package.json +1 -1
package/dist/scheduler/index.mjs
CHANGED
|
@@ -147,9 +147,17 @@ function detectTaskMode(projectDir) {
|
|
|
147
147
|
return 'local';
|
|
148
148
|
try {
|
|
149
149
|
const issues = fetchOpenIssues(projectDir, platform);
|
|
150
|
+
if (issues.length === 0)
|
|
151
|
+
return 'local';
|
|
152
|
+
// If remote has issues with status:: labels → platform mode
|
|
150
153
|
const hasStatusLabels = issues.some(i => i.labels.some(l => l.startsWith('status::')));
|
|
151
154
|
if (hasStatusLabels)
|
|
152
155
|
return 'platform';
|
|
156
|
+
// If remote has issues but no local task files → platform mode
|
|
157
|
+
const todoPath = resolve(projectDir, '.claude/scheduler/tasks.json');
|
|
158
|
+
const todoMdPath = resolve(projectDir, 'TODO.md');
|
|
159
|
+
if (!existsSync(todoPath) && !existsSync(todoMdPath))
|
|
160
|
+
return 'platform';
|
|
153
161
|
}
|
|
154
162
|
catch { /* CLI not available or no issues */ }
|
|
155
163
|
return 'local';
|
package/dist/scheduler/loop.mjs
CHANGED
|
@@ -85,8 +85,30 @@ export async function runIteration(deps) {
|
|
|
85
85
|
tasks = parseTodoMd(content);
|
|
86
86
|
}
|
|
87
87
|
else {
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
// No local files — try falling back to remote issues
|
|
89
|
+
const platform = detectCIPlatform(projectDir);
|
|
90
|
+
if (platform !== 'none') {
|
|
91
|
+
try {
|
|
92
|
+
const issues = fetchOpenIssues(projectDir, platform);
|
|
93
|
+
if (issues.length > 0) {
|
|
94
|
+
logger.info(`No local tasks — switching to platform mode (${issues.length} remote issue(s))`);
|
|
95
|
+
state.taskMode = 'platform';
|
|
96
|
+
tasks = issues.map(i => issueToTask(i, state.currentPhase));
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
logger.info('No tasks found (no tasks.json, TODO.md, or remote issues)');
|
|
100
|
+
return false;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
catch {
|
|
104
|
+
logger.info('No tasks found (no tasks.json or TODO.md)');
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
logger.info('No tasks found (no tasks.json or TODO.md)');
|
|
110
|
+
return false;
|
|
111
|
+
}
|
|
90
112
|
}
|
|
91
113
|
}
|
|
92
114
|
// Reconcile task status with scheduler state (handles restart without --resume)
|