Files
plugins/packages/nowledge-mem-agent/package.json
T
zhou.han 9e86a2c7b7 proc: a Linux zombie no longer holds a lock (#1198)
yetihan (#1198): a lock whose owner is a Linux zombie was held for
good. process.kill(pid, 0) succeeds on a zombie, so 15 packages' lock
and liveness checks counted an exited, unreaped owner as alive.

- scripts/proc.mjs: processStatus(pid) is dead on ESRCH, and on Linux
  also when /proc/<pid>/stat says Z or X; EPERM is "permission", any
  other error "unknown". processAlive / processExists keep each
  caller's old EPERM and unknown-error meaning.
- scripts/sync-proc.mjs copies it into each package (--check in the
  tests); every package's own check keeps its old semantics, now with
  zombies dead. agent-console's daemon bundle and window-warmup's dist
  are rebuilt.
- 15 packages bumped.

Review run at 28ef6622 (mote, HOME=$(mktemp -d)):
- node scripts/sync-proc.mjs --check: ok.
- bun test (whole repo): 8934 pass, 0 fail.
- bun scripts/check.mjs: every package ok.
- window-warmup's build reproduces its dist/plugin.js byte for byte.
  agent-console's bundle diff read line by line: the proc module plus
  esbuild's renumbered imports, nothing else (esbuild isn't installed
  on mote, so it wasn't rebuilt there).
- Real zombie on Linux (WSL, magpie-desktop): a bash child left
  unreaped by an exec'd sleep, /proc stat "Z": the old kill(0) check
  says alive, processStatus says dead; the running process says alive.

Not tried: each package's lock contention end to end.
2026-11-16 12:19:09 +08:00

53 lines
1.4 KiB
JSON

{
"name": "@magpie-community/agent-nowledge-mem",
"version": "0.1.1",
"description": "Manage Nowledge Mem Default, AI Now and Background models from Magpie",
"type": "module",
"main": "./index.mjs",
"repository": {
"type": "git",
"url": "git+https://github.com/magpie-community/plugins.git",
"directory": "packages/nowledge-mem-agent"
},
"homepage": "https://github.com/magpie-community/plugins/tree/main/packages/nowledge-mem-agent",
"bugs": {
"url": "https://github.com/magpie-community/plugins/issues"
},
"files": [
"nowledge-mem.agent.js",
"index.mjs",
"cli.mjs",
"lib/",
"lib/proc.mjs",
"README.md",
"VALIDATION.md",
"LICENSE",
"README.zh-CN.md"
],
"scripts": {
"test": "bun test ./*.test.mjs",
"check": "node --check index.mjs && node --check cli.mjs && node --check nowledge-mem.agent.js"
},
"engines": {
"node": ">=22"
},
"keywords": [
"opencode",
"opencode-plugin",
"magpie-plugin",
"magpie-agent",
"nowledge-mem",
"agent"
],
"license": "MIT",
"magpie": {
"agent": "./nowledge-mem.agent.js",
"name": "Nowledge Mem / AI Now",
"summary": {
"zh": "从 Magpie 管理 Nowledge Mem 的 Default、AI Now 和后台任务模型",
"en": "Manage Nowledge Mem Default, AI Now and Background models"
},
"icon": "https://mem.nowledge.co/favicon.png"
}
}