mirror of
https://github.com/sdwolf4103/opencode-working-memory.git
synced 2026-07-17 12:56:42 +02:00
Fix typecheck errors and update install docs for npm release
This commit is contained in:
+22
-39
@@ -3,48 +3,40 @@
|
||||
## Prerequisites
|
||||
|
||||
- **OpenCode** 1.0.0 or higher
|
||||
- **Node.js** 18+ (for development only)
|
||||
- **Node.js** 18+ with npm
|
||||
|
||||
## Quick Install (For Users)
|
||||
## Quick Install
|
||||
|
||||
### Option 1: Install from npm (Recommended)
|
||||
|
||||
```bash
|
||||
npm install opencode-working-memory
|
||||
npm install -g opencode-working-memory
|
||||
```
|
||||
|
||||
Then add to your `.opencode/package.json`:
|
||||
Then add to your `~/.config/opencode/opencode.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"plugins": [
|
||||
"opencode-working-memory"
|
||||
]
|
||||
"plugin": ["opencode-working-memory"]
|
||||
}
|
||||
```
|
||||
|
||||
Restart OpenCode. Done.
|
||||
|
||||
### Option 2: Install from GitHub
|
||||
|
||||
Add to your `.opencode/package.json`:
|
||||
```bash
|
||||
npm install -g github:sdwolf4103/opencode-working-memory
|
||||
```
|
||||
|
||||
Then add to `~/.config/opencode/opencode.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"dependencies": {
|
||||
"opencode-working-memory": "github:sdwolf4103/opencode-working-memory"
|
||||
},
|
||||
"plugins": [
|
||||
"opencode-working-memory"
|
||||
]
|
||||
"plugin": ["opencode-working-memory"]
|
||||
}
|
||||
```
|
||||
|
||||
Then run:
|
||||
|
||||
```bash
|
||||
cd .opencode
|
||||
npm install
|
||||
```
|
||||
|
||||
### Option 3: Local Development Install
|
||||
|
||||
Clone the repository:
|
||||
@@ -53,22 +45,14 @@ Clone the repository:
|
||||
git clone https://github.com/sdwolf4103/opencode-working-memory.git
|
||||
cd opencode-working-memory
|
||||
npm install
|
||||
npm link
|
||||
```
|
||||
|
||||
Link to your OpenCode project:
|
||||
|
||||
```bash
|
||||
cd /path/to/your/project/.opencode
|
||||
npm link /path/to/opencode-working-memory
|
||||
```
|
||||
|
||||
Add to `.opencode/package.json`:
|
||||
Then reference it in `~/.config/opencode/opencode.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"plugins": [
|
||||
"opencode-working-memory"
|
||||
]
|
||||
"plugin": ["opencode-working-memory"]
|
||||
}
|
||||
```
|
||||
|
||||
@@ -80,7 +64,7 @@ After installation, start an OpenCode session and run:
|
||||
core_memory_update goal "Test installation"
|
||||
```
|
||||
|
||||
You should see a success message. Check `.opencode/memory-core/` for the session file.
|
||||
You should see a success message. Check `.opencode/memory-core/` in your project directory for the session file.
|
||||
|
||||
## Configuration
|
||||
|
||||
@@ -93,8 +77,8 @@ The plugin works out-of-the-box with sensible defaults. For advanced configurati
|
||||
**Symptom**: No `core_memory_update` tool available
|
||||
|
||||
**Solution**:
|
||||
1. Check `.opencode/package.json` includes plugin in `"plugins": []` array
|
||||
2. Verify `npm install` completed successfully
|
||||
1. Check `~/.config/opencode/opencode.json` includes `"opencode-working-memory"` in `"plugin": []` array
|
||||
2. Verify `npm install -g opencode-working-memory` completed successfully
|
||||
3. Restart OpenCode session
|
||||
|
||||
### Memory Files Not Created
|
||||
@@ -112,17 +96,16 @@ The plugin works out-of-the-box with sensible defaults. For advanced configurati
|
||||
|
||||
**Solution**:
|
||||
1. Ensure `@opencode-ai/plugin` is installed: `npm install @opencode-ai/plugin`
|
||||
2. Run type checking: `npx tsc --noEmit`
|
||||
2. Run type checking: `npm run typecheck`
|
||||
3. See [AGENTS.md](../AGENTS.md) for code style guidelines
|
||||
|
||||
## Uninstallation
|
||||
|
||||
```bash
|
||||
cd .opencode
|
||||
npm uninstall opencode-working-memory
|
||||
npm uninstall -g opencode-working-memory
|
||||
```
|
||||
|
||||
Remove from `.opencode/package.json` plugins array. Memory files in `.opencode/memory-*` will persist unless manually deleted.
|
||||
Remove `"opencode-working-memory"` from `~/.config/opencode/opencode.json`. Memory files in `.opencode/memory-*` will persist unless manually deleted.
|
||||
|
||||
## Next Steps
|
||||
|
||||
|
||||
Reference in New Issue
Block a user