- Integrate apaw_agent_model_research_v3.html as standalone dashboard - Add model-benchmarks.json with 32 agents, 11 scored models, 11 recommendations - Add build-research-dashboard.ts: inject live data into template → standalone HTML - Add rebuild-template.cjs: regenerate template from v3.html source - Add sync-benchmarks-from-yaml.cjs: sync YAML → JSON round-trip - Add sync-model-research.ts: apply recommendation matrix to config files - Add model-benchmarks.schema.json and model-research.schema.json for validation - Add bidirectional-data-flow.md architecture documentation - Add log-execution.cjs pipeline hook - Update capability-index.yaml: add fallback_models, failover_strategy - Update kilo-meta.json, kilo.jsonc, KILO_SPEC.md with synced models - Update evolution.md / research.md / self-evolution.md / evolutionary-sync.md docs - Fix security-auditor.md: quote YAML color (#DC2626) - Fix orchestrator.md: remove duplicate devops-engineer key - Build research-dashboard.html (106KB standalone) + dated archive
42 lines
1.2 KiB
JavaScript
42 lines
1.2 KiB
JavaScript
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 };
|