@hanhnd/agent-kit 1.0.11 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/kit-server.js +3 -2
- package/dist/tools/agent.js +3 -2
- package/package.json +1 -1
package/dist/kit-server.js
CHANGED
|
@@ -21150,9 +21150,10 @@ function taskSlug(task) {
|
|
|
21150
21150
|
function initAgentLog(workspaceRoot, slug, agent) {
|
|
21151
21151
|
const logsDir = path3.join(workspaceRoot, ".agent-kit", "logs", "agents");
|
|
21152
21152
|
fs2.mkdirSync(logsDir, { recursive: true });
|
|
21153
|
-
const
|
|
21153
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
21154
|
+
const logFile = path3.join(logsDir, `delegate-${now}-${slug}.log`);
|
|
21154
21155
|
const header = `Agent: ${agent}
|
|
21155
|
-
Date: ${
|
|
21156
|
+
Date: ${now}
|
|
21156
21157
|
${"\u2500".repeat(60)}
|
|
21157
21158
|
|
|
21158
21159
|
`;
|
package/dist/tools/agent.js
CHANGED
|
@@ -33,8 +33,9 @@ function taskSlug(task) {
|
|
|
33
33
|
function initAgentLog(workspaceRoot, slug, agent) {
|
|
34
34
|
const logsDir = path.join(workspaceRoot, '.agent-kit', 'logs', 'agents');
|
|
35
35
|
fs.mkdirSync(logsDir, { recursive: true });
|
|
36
|
-
const
|
|
37
|
-
const
|
|
36
|
+
const now = new Date().toISOString();
|
|
37
|
+
const logFile = path.join(logsDir, `delegate-${now}-${slug}.log`);
|
|
38
|
+
const header = `Agent: ${agent}\nDate: ${now}\n${'─'.repeat(60)}\n\n`;
|
|
38
39
|
fs.writeFileSync(logFile, header, 'utf-8');
|
|
39
40
|
const logStream = fs.createWriteStream(logFile, { flags: 'a' });
|
|
40
41
|
logStream.on('error', () => { });
|