fleet-memory/hindsight-integrations/openclaw/package.json
Nicolò Boschi 6c695eb9f8
fix: improve openclaw test coverage (#396)
* fix: improve openclaw test coverage

* test(openclaw): export stripMemoryTags/extractRecallQuery and add hook integration tests

- Extract stripMemoryTags and extractRecallQuery as exported pure functions
  from index.ts so hooks share one implementation and tests cover the real code
- Update before_agent_start to call extractRecallQuery; update agent_end to
  call stripMemoryTags instead of duplicating the regex inline
- Rewrite index.test.ts to import the real functions (no more local duplicate)
  and add 11 tests for extractRecallQuery covering all envelope-stripping cases
- Add tests/hooks.integration.test.ts: loads the plugin via mock MoltbotPluginAPI
  in HTTP mode, spies on client.recall/retain, and exercises all hook behaviours:
  excluded providers, short messages, memory injection format, tag stripping,
  transcript formatting, array content blocks, metadata, document_id derivation
2026-02-18 14:10:33 +01:00

54 lines
1.2 KiB
JSON

{
"name": "@vectorize-io/hindsight-openclaw",
"version": "0.4.11",
"description": "Hindsight memory plugin for OpenClaw - biomimetic long-term memory with fact extraction",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",
"openclaw": {
"extensions": [
"./dist/index.js"
]
},
"keywords": [
"openclaw",
"memory",
"ai",
"agent",
"hindsight",
"long-term-memory"
],
"author": "Vectorize <support@vectorize.io>",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/vectorize-io/hindsight.git",
"directory": "hindsight-integrations/openclaw"
},
"files": [
"dist",
"openclaw.plugin.json",
"README.md"
],
"scripts": {
"build": "tsc",
"dev": "tsc --watch",
"clean": "rm -rf dist",
"test": "vitest run src",
"test:watch": "vitest src",
"test:integration": "vitest run --config vitest.integration.config.ts",
"prepublishOnly": "npm run clean && npm run build"
},
"dependencies": {
"node-fetch": "^3.3.2"
},
"devDependencies": {
"@types/node": "^20.0.0",
"@vitest/ui": "^4.0.18",
"typescript": "^5.3.0",
"vitest": "^4.0.18"
},
"engines": {
"node": ">=22"
}
}