config: full APAW agent infrastructure + Phantom project files
- Added all agent definitions (.kile/agents/*.md) - Added commands, rules, skills, shared modules - Added src/, scripts/, tests/, docker/, agent-evolution/ - Extracted 3 archives: website/, workspace/, release/ - Created .env with Gitea creds for UniqueSoft/Phantom - Created docs/ with project-specific guides - Added .gitignore for node_modules
This commit is contained in:
41
scripts/log-execution.cjs
Normal file
41
scripts/log-execution.cjs
Normal file
@@ -0,0 +1,41 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const LOG_FILE = '.kilo/logs/agent-executions.jsonl';
|
||||
|
||||
function logExecution(data) {
|
||||
const entry = {
|
||||
ts: new Date().toISOString(),
|
||||
agent: data.agent || 'unknown',
|
||||
issue: data.issue || 0,
|
||||
project: data.project || 'UniqueSoft/APAW',
|
||||
task: data.task || 'unknown',
|
||||
subtask_type: data.subtask_type || 'general',
|
||||
duration_ms: data.duration_ms || 0,
|
||||
tokens_used: data.tokens_used || 0,
|
||||
status: data.status || 'unknown',
|
||||
files: data.files || [],
|
||||
score: data.score || 0,
|
||||
next_agent: data.next_agent || null
|
||||
};
|
||||
|
||||
fs.appendFileSync(LOG_FILE, JSON.stringify(entry) + '\n');
|
||||
return entry;
|
||||
}
|
||||
|
||||
// CLI usage
|
||||
if (require.main === module) {
|
||||
const args = {};
|
||||
for (let i = 2; i < process.argv.length; i += 2) {
|
||||
const key = process.argv[i].replace(/^--/, '');
|
||||
const val = process.argv[i + 1];
|
||||
if (key === 'files') args[key] = val.split(',');
|
||||
else if (key === 'issue' || key === 'duration_ms' || key === 'tokens_used' || key === 'score') args[key] = parseInt(val) || 0;
|
||||
else args[key] = val;
|
||||
}
|
||||
|
||||
const entry = logExecution(args);
|
||||
console.log('Logged:', entry.ts, entry.agent, entry.status);
|
||||
}
|
||||
|
||||
module.exports = { logExecution };
|
||||
Reference in New Issue
Block a user