create-claude-workspace 2.1.6 → 2.1.8
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.
|
@@ -19,6 +19,8 @@ export async function watchPipeline(branch, platform, projectDir, logger, signal
|
|
|
19
19
|
return { status: 'not-found' };
|
|
20
20
|
}
|
|
21
21
|
const startTime = Date.now();
|
|
22
|
+
let notFoundCount = 0;
|
|
23
|
+
const MAX_NOT_FOUND = 3; // Give CI a few polls to appear, then give up
|
|
22
24
|
while (Date.now() - startTime < MAX_POLL_TIME) {
|
|
23
25
|
if (signal?.stopped)
|
|
24
26
|
return { status: 'canceled' };
|
|
@@ -31,6 +33,16 @@ export async function watchPipeline(branch, platform, projectDir, logger, signal
|
|
|
31
33
|
: undefined;
|
|
32
34
|
return { status, logs };
|
|
33
35
|
}
|
|
36
|
+
if (status === 'not-found') {
|
|
37
|
+
notFoundCount++;
|
|
38
|
+
if (notFoundCount >= MAX_NOT_FOUND) {
|
|
39
|
+
logger.info('No CI pipeline found — skipping CI watch');
|
|
40
|
+
return { status: 'not-found' };
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
notFoundCount = 0;
|
|
45
|
+
}
|
|
34
46
|
logger.info(`CI: ${status}, waiting ${POLL_INTERVAL / 1000}s...`);
|
|
35
47
|
await sleep(POLL_INTERVAL);
|
|
36
48
|
}
|
|
@@ -381,7 +381,8 @@ export class TUI {
|
|
|
381
381
|
const model = input.model || '';
|
|
382
382
|
const desc = input.description || input.prompt || '';
|
|
383
383
|
const col = ANSI_COLORS[agentColor(type)] || '';
|
|
384
|
-
this.
|
|
384
|
+
// Don't push to agent stack — this is a sub-agent inside the SDK session.
|
|
385
|
+
// Our external spawn lifecycle is managed by onSpawnStart/onSpawnEnd callbacks.
|
|
385
386
|
this.log(` ${pre}${time} ${icon} ${col}${BOLD}${type}${RESET}${model ? ` ${ANSI_COLORS.gray}(${model})${RESET}` : ''} ${ANSI_COLORS.gray}${desc}${RESET}`, `AGENT: ${type} ${model} — ${desc}`);
|
|
386
387
|
return;
|
|
387
388
|
}
|
|
@@ -441,7 +442,9 @@ export class TUI {
|
|
|
441
442
|
}
|
|
442
443
|
if (msg.subtype === 'task_notification') {
|
|
443
444
|
const status = msg.status || '';
|
|
444
|
-
|
|
445
|
+
// Don't pop agent stack here — SDK task_notification is about sub-agents inside the session.
|
|
446
|
+
// Our external spawn lifecycle is managed by onSpawnStart/onSpawnEnd callbacks.
|
|
447
|
+
const name = this.state.agents.length > 0 ? this.state.agents[this.state.agents.length - 1] : 'agent';
|
|
445
448
|
const col = ANSI_COLORS[agentColor(name)] || '';
|
|
446
449
|
const icon = status === 'completed' ? `${ANSI_COLORS.green}✓` : `${ANSI_COLORS.red}✗`;
|
|
447
450
|
const detail = msg.summary ? ` ${ANSI_COLORS.gray}${msg.summary}${RESET}` : '';
|