feat(background): add background registry and status tool with tests
This commit is contained in:
12
tmp-debug.mjs
Normal file
12
tmp-debug.mjs
Normal file
@@ -0,0 +1,12 @@
|
||||
import { createBackgroundRegistry } from './src/background-registry.js';
|
||||
import { createBackgroundStatusTool } from './src/background-status-tool.js';
|
||||
(async()=>{
|
||||
const reg = createBackgroundRegistry();
|
||||
reg.recordLaunch({ runId: 'r1', preset: 'p1', task: 't1' });
|
||||
reg.recordLaunch({ runId: 'r2', preset: 'p2', task: 't2' });
|
||||
reg.recordUpdate('r2', { status: 'completed', exitCode: 0, finalText: 'done' });
|
||||
const tool = createBackgroundStatusTool({ registry: reg });
|
||||
const resDefault = await tool.execute('id', {}, undefined, undefined, undefined);
|
||||
console.log('default details', resDefault.details);
|
||||
console.log('default content', resDefault.content);
|
||||
})();
|
||||
Reference in New Issue
Block a user