@fanchao8609/agent_brain_sync 0.3.0 → 0.4.0
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/package.json +1 -1
- package/src/install.js +7 -2
package/package.json
CHANGED
package/src/install.js
CHANGED
|
@@ -258,7 +258,7 @@ import { appendFile, mkdir, readFile, stat } from "node:fs/promises"
|
|
|
258
258
|
import { homedir } from "node:os"
|
|
259
259
|
import { join, dirname } from "node:path"
|
|
260
260
|
|
|
261
|
-
|
|
261
|
+
const server = async ({ client, directory }) => {
|
|
262
262
|
// 本会话是否真改过文件 (由 tool.execute.after 观测)
|
|
263
263
|
let wroteFiles = false
|
|
264
264
|
let nudged = false
|
|
@@ -270,7 +270,7 @@ export const AbsPlugin = async ({ client, directory }) => {
|
|
|
270
270
|
const pad = (n) => String(n).padStart(2, "0")
|
|
271
271
|
const stamp = d.getFullYear() + "-" + pad(d.getMonth() + 1) + "-" + pad(d.getDate()) + " " + pad(d.getHours()) + ":" + pad(d.getMinutes()) + ":" + pad(d.getSeconds())
|
|
272
272
|
await mkdir(dir, { recursive: true })
|
|
273
|
-
await appendFile(join(dir, "hooks.log"), "[" + stamp + "]
|
|
273
|
+
await appendFile(join(dir, "hooks.log"), "[" + stamp + "] opencode:" + evt + "\\n")
|
|
274
274
|
} catch {} // fire-and-forget: 永不阻塞宿主
|
|
275
275
|
}
|
|
276
276
|
|
|
@@ -336,6 +336,11 @@ export const AbsPlugin = async ({ client, directory }) => {
|
|
|
336
336
|
},
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
|
+
|
|
340
|
+
export default {
|
|
341
|
+
id: "abs",
|
|
342
|
+
server,
|
|
343
|
+
}
|
|
339
344
|
${MARK}
|
|
340
345
|
`;
|
|
341
346
|
}
|