mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-05-01 06:23:28 +08:00
feat: add loop status transcript inspector
This commit is contained in:
committed by
Affaan Mustafa
parent
2fd8dfc7e1
commit
b8452dc108
@@ -69,6 +69,7 @@ function main() {
|
||||
assert.match(result.stdout, /list-installed/);
|
||||
assert.match(result.stdout, /doctor/);
|
||||
assert.match(result.stdout, /auto-update/);
|
||||
assert.match(result.stdout, /loop-status/);
|
||||
}],
|
||||
['delegates explicit install command', () => {
|
||||
const result = runCli(['install', '--dry-run', '--json', 'typescript']);
|
||||
@@ -142,6 +143,36 @@ function main() {
|
||||
assert.strictEqual(payload.adapterId, 'claude-history');
|
||||
assert.strictEqual(payload.workers[0].branch, 'feat/ecc-cli');
|
||||
}],
|
||||
['delegates loop-status command', () => {
|
||||
const homeDir = createTempDir('ecc-cli-home-');
|
||||
const transcriptDir = path.join(homeDir, '.claude', 'projects', '-tmp-ecc');
|
||||
fs.mkdirSync(transcriptDir, { recursive: true });
|
||||
fs.writeFileSync(
|
||||
path.join(transcriptDir, 'session-loop.jsonl'),
|
||||
JSON.stringify({
|
||||
timestamp: '2026-04-30T09:00:00.000Z',
|
||||
sessionId: 'session-loop',
|
||||
message: {
|
||||
role: 'assistant',
|
||||
content: [
|
||||
{
|
||||
type: 'tool_use',
|
||||
id: 'toolu_loop',
|
||||
name: 'ScheduleWakeup',
|
||||
input: { delaySeconds: 300 },
|
||||
},
|
||||
],
|
||||
},
|
||||
}) + '\n'
|
||||
);
|
||||
|
||||
const result = runCli(['loop-status', '--home', homeDir, '--now', '2026-04-30T10:00:00.000Z', '--json']);
|
||||
|
||||
assert.strictEqual(result.status, 0, result.stderr);
|
||||
const payload = parseJson(result.stdout);
|
||||
assert.strictEqual(payload.schemaVersion, 'ecc.loop-status.v1');
|
||||
assert.strictEqual(payload.sessions[0].sessionId, 'session-loop');
|
||||
}],
|
||||
['supports help for a subcommand', () => {
|
||||
const result = runCli(['help', 'repair']);
|
||||
assert.strictEqual(result.status, 0, result.stderr);
|
||||
|
||||
Reference in New Issue
Block a user