diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 310ad0d..9506dec 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -49,7 +49,7 @@ jobs: PKG_VER="dev-$(date +%Y%m%d)-${GITHUB_SHA::7}" fi mkdir -p release - git archive --format=zip --prefix=openclaw-extension-powermem/ HEAD -o release/openclaw-extension-powermem-$PKG_VER.zip + git archive --format=zip --prefix=memory-powermem/ HEAD -o release/memory-powermem-$PKG_VER.zip # Create GitHub Release only when run on a tag - name: Create GitHub Release diff --git a/INSTALL.md b/INSTALL.md index 1393b8b..05368c3 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -9,20 +9,20 @@ Give [OpenClaw](https://github.com/openclaw/openclaw) long-term memory via [Powe **Prerequisites:** OpenClaw installed (`openclaw --version`). PowerMem is **not** installed by this script—you either run a PowerMem server yourself (HTTP mode) or use the `pmem` CLI (CLI mode). The script only deploys the plugin and configures OpenClaw. ```bash -curl -fsSL https://raw.githubusercontent.com/ob-labs/openclaw-extension-powermem/main/install.sh | bash +curl -fsSL https://raw.githubusercontent.com/ob-labs/memory-powermem/main/install.sh | bash ``` Or run from the repo root (no download): ```bash -cd /path/to/openclaw-extension-powermem +cd /path/to/memory-powermem bash install.sh ``` Non-interactive (defaults: HTTP mode, baseUrl http://localhost:8000): ```bash -curl -fsSL https://raw.githubusercontent.com/ob-labs/openclaw-extension-powermem/main/install.sh | bash -s -y +curl -fsSL https://raw.githubusercontent.com/ob-labs/memory-powermem/main/install.sh | bash -s -y ``` Install to a specific OpenClaw instance: @@ -45,7 +45,7 @@ Copy the skill file into OpenClaw’s skill directory, then ask OpenClaw to do t ```bash mkdir -p ~/.openclaw/skills/install-powermem-memory -cp /path/to/openclaw-extension-powermem/skills/install-powermem-memory/SKILL.md \ +cp /path/to/memory-powermem/skills/install-powermem-memory/SKILL.md \ ~/.openclaw/skills/install-powermem-memory/ ``` @@ -53,7 +53,7 @@ cp /path/to/openclaw-extension-powermem/skills/install-powermem-memory/SKILL.md ```powershell New-Item -ItemType Directory -Force "$env:USERPROFILE\.openclaw\skills\install-powermem-memory" -Copy-Item "path\to\openclaw-extension-powermem\skills\install-powermem-memory\SKILL.md" ` +Copy-Item "path\to\memory-powermem\skills\install-powermem-memory\SKILL.md" ` "$env:USERPROFILE\.openclaw\skills\install-powermem-memory\" ``` @@ -92,9 +92,9 @@ Verify: `curl -s http://localhost:8000/api/v1/system/health` ### 2. Install the plugin into OpenClaw ```bash -openclaw plugins install /path/to/openclaw-extension-powermem +openclaw plugins install /path/to/memory-powermem # Or symlink for development: -openclaw plugins install -l /path/to/openclaw-extension-powermem +openclaw plugins install -l /path/to/memory-powermem ``` Confirm: `openclaw plugins list` shows `memory-powermem`. diff --git a/README.md b/README.md index 24713ad..9ca764f 100644 --- a/README.md +++ b/README.md @@ -147,16 +147,16 @@ On your machine (use your actual plugin path): ```bash # Install from npm (recommended for end users; OpenClaw downloads the package from the npm registry) -openclaw plugins install openclaw-extension-powermem +openclaw plugins install memory-powermem # Install from a local directory (e.g. cloned repo) -openclaw plugins install /path/to/openclaw-extension-powermem +openclaw plugins install /path/to/memory-powermem # For development (symlink, no copy) -openclaw plugins install -l /path/to/openclaw-extension-powermem +openclaw plugins install -l /path/to/memory-powermem ``` -**Note:** Running `npm i openclaw-extension-powermem` in a Node project only adds the package to that project’s `node_modules`; it does **not** register the plugin with OpenClaw. To use this as an OpenClaw plugin, you must run `openclaw plugins install openclaw-extension-powermem` (or install from a path as above), then restart the gateway. +**Note:** Running `npm i memory-powermem` in a Node project only adds the package to that project’s `node_modules`; it does **not** register the plugin with OpenClaw. To use this as an OpenClaw plugin, you must run `openclaw plugins install memory-powermem` (or install from a path as above), then restart the gateway. After install, run `openclaw plugins list` and confirm `memory-powermem` is listed. The plugin uses **default config** when none is set: `baseUrl: "http://localhost:8000"`, `autoCapture`, `autoRecall`, and `inferOnAdd` enabled — so you do not need to edit `~/.openclaw/openclaw.json` for the typical setup (PowerMem on localhost:8000). @@ -233,6 +233,24 @@ If search returns the line you added (or similar), the full flow (PowerMem → p --- +## OpenClaw plugin commands (reference) + +Common CLI commands for managing plugins: + +| Command | Description | +|---------|-------------| +| `openclaw plugins list` | List installed plugins; confirm `memory-powermem` is listed. Use `--json` for machine-readable output. | +| `openclaw plugins info ` | Show details for a plugin (e.g. `openclaw plugins info memory-powermem`). | +| `openclaw plugins uninstall ` | Remove the plugin (e.g. `openclaw plugins uninstall memory-powermem`). Use `--keep-files` to leave files on disk. | +| `openclaw plugins enable ` | Enable a disabled plugin. | +| `openclaw plugins disable ` | Disable a plugin without uninstalling. | +| `openclaw plugins doctor` | Diagnose plugin load and configuration issues. | +| `openclaw plugins update ` | Update a plugin installed from npm. Use `openclaw plugins update --all` to update all. | + +After installing, uninstalling, or changing config, restart the OpenClaw gateway for changes to take effect. + +--- + ## Config options (optional) | Option | Required | Description | @@ -302,7 +320,7 @@ Exposed to OpenClaw agents: ## Development ```bash -cd /path/to/openclaw-extension-powermem +cd /path/to/memory-powermem pnpm install pnpm lint # type-check pnpm test # run tests (if any) diff --git a/README_CN.md b/README_CN.md index 2413546..ee1ba7f 100644 --- a/README_CN.md +++ b/README_CN.md @@ -148,16 +148,16 @@ curl -s http://localhost:8000/api/v1/system/health ```bash # 从 npm 安装(推荐给终端用户;会从 npm 官方源自动下载并安装) -openclaw plugins install openclaw-extension-powermem +openclaw plugins install memory-powermem # 若插件在本机目录(例如克隆下来的) -openclaw plugins install /path/to/openclaw-extension-powermem +openclaw plugins install /path/to/memory-powermem # 开发时想改代码即生效,可用链接方式(不拷贝) -openclaw plugins install -l /path/to/openclaw-extension-powermem +openclaw plugins install -l /path/to/memory-powermem ``` -**说明:** 在某个 Node 项目里执行 `npm i openclaw-extension-powermem` 只会把包装进该项目的 `node_modules`,**不会**在 OpenClaw 里注册插件。若要在 OpenClaw 里使用本插件,必须执行 `openclaw plugins install openclaw-extension-powermem`(或按上面用本地路径安装),再重启 gateway。 +**说明:** 在某个 Node 项目里执行 `npm i memory-powermem` 只会把包装进该项目的 `node_modules`,**不会**在 OpenClaw 里注册插件。若要在 OpenClaw 里使用本插件,必须执行 `openclaw plugins install memory-powermem`(或按上面用本地路径安装),再重启 gateway。 安装成功后,可用 `openclaw plugins list` 确认能看到 `memory-powermem`。未在配置中书写本插件 config 时,插件会使用 **默认配置**:`baseUrl: "http://localhost:8000"`,并开启 `autoCapture`、`autoRecall`、`inferOnAdd`,因此典型情况(PowerMem 跑在 localhost:8000)下无需编辑 `~/.openclaw/openclaw.json`。 @@ -234,6 +234,24 @@ openclaw ltm search "咖啡" --- +## OpenClaw 插件常用命令(参考) + +管理插件时常用的 CLI 命令: + +| 命令 | 说明 | +|------|------| +| `openclaw plugins list` | 列出已安装插件,确认是否包含 `memory-powermem`。加 `--json` 可输出机器可读格式。 | +| `openclaw plugins info ` | 查看某个插件的详情(例如 `openclaw plugins info memory-powermem`)。 | +| `openclaw plugins uninstall ` | 卸载插件(例如 `openclaw plugins uninstall memory-powermem`)。加 `--keep-files` 可保留磁盘上的文件。 | +| `openclaw plugins enable ` | 启用已安装但被禁用的插件。 | +| `openclaw plugins disable ` | 禁用插件(不卸载)。 | +| `openclaw plugins doctor` | 诊断插件加载与配置问题。 | +| `openclaw plugins update ` | 更新从 npm 安装的插件。使用 `openclaw plugins update --all` 可更新全部。 | + +安装、卸载或修改配置后,需重启 OpenClaw gateway 后才会生效。 + +--- + ## 配置项说明(可选) | 选项 | 必填 | 说明 | @@ -303,7 +321,7 @@ openclaw ltm search "咖啡" ## 本仓库开发命令 ```bash -cd /path/to/openclaw-extension-powermem +cd /path/to/memory-powermem pnpm install pnpm lint # 类型检查 pnpm test # 运行测试(若有) diff --git a/config.ts b/config.ts index 53fa9a8..05b6cf1 100644 --- a/config.ts +++ b/config.ts @@ -151,7 +151,7 @@ export const DEFAULT_AGENT_ID = "openclaw-agent"; /** * Default plugin config when openclaw.json has no plugins.entries["memory-powermem"].config. - * Allows "openclaw plugins install openclaw-extension-powermem" to work without manual config. + * Allows "openclaw plugins install memory-powermem" to work without manual config. */ export const DEFAULT_PLUGIN_CONFIG: PowerMemConfig = { mode: "http", diff --git a/install.sh b/install.sh index 2d7371b..a3d6db6 100644 --- a/install.sh +++ b/install.sh @@ -2,12 +2,12 @@ # # OpenClaw + PowerMem memory plugin installer # Usage (from GitHub): -# curl -fsSL https://raw.githubusercontent.com/ob-labs/openclaw-extension-powermem/main/install.sh | bash +# curl -fsSL https://raw.githubusercontent.com/ob-labs/memory-powermem/main/install.sh | bash # Or from repo root: # bash install.sh [ -y ] [ --workdir PATH ] # # Env: -# REPO=owner/repo - GitHub repo for download (default: ob-labs/openclaw-extension-powermem) +# REPO=owner/repo - GitHub repo for download (default: ob-labs/memory-powermem) # BRANCH=branch - Branch/tag (default: main) # INSTALL_YES=1 - Non-interactive (same as -y) # SKIP_OPENCLAW=1 - Skip openclaw presence check @@ -15,7 +15,7 @@ set -e -REPO="${REPO:-ob-labs/openclaw-extension-powermem}" +REPO="${REPO:-ob-labs/memory-powermem}" BRANCH="${BRANCH:-main}" INSTALL_YES="${INSTALL_YES:-0}" SKIP_OC="${SKIP_OPENCLAW:-0}" @@ -176,8 +176,8 @@ deploy_from_repo() { } deploy_from_github() { - # REPO defaults to ob-labs/openclaw-extension-powermem - [[ -n "$REPO" ]] || REPO="ob-labs/openclaw-extension-powermem" + # REPO defaults to ob-labs/memory-powermem + [[ -n "$REPO" ]] || REPO="ob-labs/memory-powermem" local gh_raw="https://raw.githubusercontent.com/${REPO}/${BRANCH}" local files=( "index.ts" diff --git a/package-lock.json b/package-lock.json index a4573c0..7ac373c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "openclaw-extension-powermem", + "name": "memory-powermem", "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "openclaw-extension-powermem", + "name": "memory-powermem", "version": "1.0.0", "license": "Apache-2.0", "dependencies": { diff --git a/package.json b/package.json index fca8a2c..d394096 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "openclaw-extension-powermem", + "name": "memory-powermem", "version": "1.0.0", "description": "OpenClaw plugin: long-term memory via PowerMem (HTTP or local CLI; intelligent extraction, Ebbinghaus forgetting curve).", "type": "module", diff --git a/skills/install-powermem-memory/SKILL.md b/skills/install-powermem-memory/SKILL.md index 1dc1018..ba30cf1 100644 --- a/skills/install-powermem-memory/SKILL.md +++ b/skills/install-powermem-memory/SKILL.md @@ -37,11 +37,11 @@ This skill folder includes supplementary docs to reference when needed: 3. **Install the plugin** If the user has the repo path: ```bash - openclaw plugins install /path/to/openclaw-extension-powermem + openclaw plugins install /path/to/memory-powermem ``` Or from GitHub one-liner: ```bash - curl -fsSL https://raw.githubusercontent.com/ob-labs/openclaw-extension-powermem/main/install.sh | bash + curl -fsSL https://raw.githubusercontent.com/ob-labs/memory-powermem/main/install.sh | bash ``` 4. **Configure OpenClaw** diff --git a/skills/install-powermem-memory/powermem-intro.md b/skills/install-powermem-memory/powermem-intro.md index d578b75..1d5ab0d 100644 --- a/skills/install-powermem-memory/powermem-intro.md +++ b/skills/install-powermem-memory/powermem-intro.md @@ -27,7 +27,7 @@ Use this doc when the user asks "what is PowerMem", "why use PowerMem", or needs ## Relationship with OpenClaw - **OpenClaw**: Provides gateway, sessions, tool dispatch, etc.; its **memory slot** must be implemented by a plugin. -- **openclaw-extension-powermem**: Implements the memory slot and forwards store/recall/forget requests to PowerMem (HTTP or CLI). +- **memory-powermem**: Implements the memory slot and forwards store/recall/forget requests to PowerMem (HTTP or CLI). - **PowerMem**: Handles storage, retrieval, intelligent extraction, and forgetting curve; it is where data actually lives. So: the user must **install and run PowerMem first** (or install the `pmem` CLI), then install this plugin and configure the connection (HTTP `baseUrl` or CLI `pmemPath`).