fix(setup): dynamic FK cleanup, remove normalizeName coupling
- delete-cli-agent.ts discovers tables with agent_group_id dynamically instead of hardcoding a list - cli-agent step emits FOLDER in its status block so setup/auto.ts reads it from the step result instead of re-deriving via normalizeName Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
committed by
exe.dev user
parent
d86051805b
commit
8c5d67cc78
@@ -60,8 +60,9 @@ export async function run(args: string[]): Promise<void> {
|
||||
|
||||
log.info('Invoking init-cli-agent', { displayName, agentName });
|
||||
|
||||
let stdout = '';
|
||||
try {
|
||||
execFileSync('pnpm', scriptArgs, {
|
||||
stdout = execFileSync('pnpm', scriptArgs, {
|
||||
cwd: projectRoot,
|
||||
stdio: ['ignore', 'pipe', 'pipe'],
|
||||
encoding: 'utf-8',
|
||||
@@ -82,9 +83,11 @@ export async function run(args: string[]): Promise<void> {
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const folderMatch = stdout.match(/@ groups\/(\S+)/);
|
||||
emitStatus('CLI_AGENT', {
|
||||
DISPLAY_NAME: displayName,
|
||||
AGENT_NAME: agentName || displayName,
|
||||
FOLDER: folderMatch?.[1] ?? '',
|
||||
CHANNEL: 'cli/local',
|
||||
STATUS: 'success',
|
||||
LOG: 'logs/setup.log',
|
||||
|
||||
Reference in New Issue
Block a user