import { CommandId, ThreadId } from '@t3tools/contracts';
import * as Effect from 'effect/Effect';
import { rpcClient, runPromise } from './t3.ts';
await runPromise(Effect.gen(function* () {
 const client = yield* rpcClient(process.cwd()+'/.t3', 'http://127.0.0.1:14240');
 yield* client['orchestration.dispatchCommand']({type:'thread.delete',commandId:CommandId.make(crypto.randomUUID()),threadId:ThreadId.make('mcp:8ea72573-2813-42dd-8d61-91b40c7ae7bc')});
}).pipe(Effect.scoped));
console.log('Deleted thread 1 through the app orchestration RPC; thread 2 remains active.');
