echoes-vault-opencode 1.0.3 → 1.0.5
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/README.md +14 -0
- package/index.ts +43 -3
- package/package.json +7 -1
package/README.md
CHANGED
|
@@ -52,6 +52,15 @@ status: active
|
|
|
52
52
|
|
|
53
53
|
## Installation
|
|
54
54
|
|
|
55
|
+
### Via OpenCode UI (recommended)
|
|
56
|
+
|
|
57
|
+
1. Press <kbd>control</kbd> + <kbd>P</kbd> to open the command palette
|
|
58
|
+
2. Select **Install plugin**
|
|
59
|
+
3. Enter the package name: `echoes-vault-opencode`
|
|
60
|
+
4. Restart OpenCode
|
|
61
|
+
|
|
62
|
+
### Manual
|
|
63
|
+
|
|
55
64
|
Add the plugin to your `opencode.json`:
|
|
56
65
|
|
|
57
66
|
```json
|
|
@@ -99,6 +108,7 @@ The AI distills the session into a dense technical summary, writes new encyclope
|
|
|
99
108
|
| `/echoes-init` | Initialize the vault and brief the AI on the knowledge base rules |
|
|
100
109
|
| `/echoes-start` | Start session — restore context from the last 3 daily logs and the index |
|
|
101
110
|
| `/echoes-end` | End session — distill and commit session memory to the vault |
|
|
111
|
+
| `/echoes-status` | Report vault health, statistics, and scalability |
|
|
102
112
|
|
|
103
113
|
### AI tools reference
|
|
104
114
|
|
|
@@ -121,6 +131,10 @@ Skills guide the AI on *when* and *how* to use the tools above. They are loaded
|
|
|
121
131
|
| `echoes_search_vault_pages` | When to search the vault before generating code |
|
|
122
132
|
| `echoes_create_or_update_page` | When to create vs. update a page, deprecation rules |
|
|
123
133
|
|
|
134
|
+
## Support the project
|
|
135
|
+
|
|
136
|
+
EchoesVault is built on top of [OpenCode](https://opencode.ai/go?ref=EZW07YHVTG). If you find this plugin useful, consider subscribing to **OpenCode GO** — it unlocks unlimited usage and directly funds the platform this plugin depends on. There's a 50% discount available via [this link](https://opencode.ai/go?ref=EZW07YHVTG).
|
|
137
|
+
|
|
124
138
|
## License
|
|
125
139
|
|
|
126
140
|
[MIT](LICENSE)
|
package/index.ts
CHANGED
|
@@ -148,6 +148,44 @@ Prepare the following payload for the skill:
|
|
|
148
148
|
Compile these data points and execute the save function immediately!
|
|
149
149
|
`
|
|
150
150
|
|
|
151
|
+
const ECHOES_STATUS_COMMAND = `---
|
|
152
|
+
description: Report the current health, statistics, and scalability of the EchoesVault
|
|
153
|
+
agent: build
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
# SYSTEM MESSAGE: Vault Status Report
|
|
157
|
+
You are the EchoesVault Keeper. The user has requested a quick, high-level health check of the knowledge base. Do NOT analyze the deep architectural meaning of the files. Your goal is to output a fast, token-efficient metrics dashboard.
|
|
158
|
+
|
|
159
|
+
## \ud83d\udce5 INPUT DATA
|
|
160
|
+
Here is the current registry (\`EchoesVault/index.md\`):
|
|
161
|
+
<index>
|
|
162
|
+
!\`cat EchoesVault/index.md 2>/dev/null || echo "EchoesVault/index.md not found"\`
|
|
163
|
+
</index>
|
|
164
|
+
|
|
165
|
+
Here is today's daily log if it exists:
|
|
166
|
+
<today_log>
|
|
167
|
+
!\`cat EchoesVault/daily/$(date +%Y-%m-%d).md 2>/dev/null || echo "No entries yet"\`
|
|
168
|
+
</today_log>
|
|
169
|
+
|
|
170
|
+
## \ud83d\ude80 ACTION
|
|
171
|
+
Analyze the inputs strictly for quantitative metrics. Provide a highly concise, bulleted dashboard using the exact formatting below.
|
|
172
|
+
|
|
173
|
+
**CRITICAL SCALE RULE:**
|
|
174
|
+
Count the total number of topics in the index. If the total count is greater than 200, you MUST append the \`> [!warning] SCALE ALERT\` block below your dashboard. If the count is 200 or less, omit the alert block entirely.
|
|
175
|
+
|
|
176
|
+
**Expected Output Format:**
|
|
177
|
+
\ud83d\udcca **EchoesVault Status**
|
|
178
|
+
* **Total Topics:** [Count of files listed in the index]
|
|
179
|
+
* **Deprecated Pages:** [Count of files marked as deprecated in the index, if any]
|
|
180
|
+
* **Today's Session:** [Active (with X entries) / Not started yet]
|
|
181
|
+
* **Index Health:** [Healthy / Warning: mention obvious duplicates or empty descriptions]
|
|
182
|
+
|
|
183
|
+
> [!warning] SCALE ALERT
|
|
184
|
+
> The vault has exceeded 200 pages. To prevent context window inflation and high token costs during \`/echoes-start\`, consider migrating this knowledge base to a hybrid RAG (Retrieval-Augmented Generation) system.
|
|
185
|
+
|
|
186
|
+
Keep your response under 90 words. Output strictly the dashboard (and the conditional alert if triggered). No conversational filler.
|
|
187
|
+
`
|
|
188
|
+
|
|
151
189
|
const APPEND_TO_DAILY_LOG_SKILL = `---
|
|
152
190
|
name: echoes_append_to_daily_log
|
|
153
191
|
description: Append an intermediate technical note or decision to today's daily log immediately after completing a sub-task.
|
|
@@ -222,6 +260,7 @@ const ensureCommands = async (directory: string): Promise<void> => {
|
|
|
222
260
|
"echoes-init.md": ECHOES_INIT_COMMAND,
|
|
223
261
|
"echoes-start.md": ECHOES_START_COMMAND,
|
|
224
262
|
"echoes-end.md": ECHOES_END_COMMAND,
|
|
263
|
+
"echoes-status.md": ECHOES_STATUS_COMMAND,
|
|
225
264
|
}
|
|
226
265
|
const cmdDir = path.join(directory, ".opencode", "commands")
|
|
227
266
|
await fs.mkdir(cmdDir, { recursive: true })
|
|
@@ -264,7 +303,7 @@ const parseCommandFrontmatter = (cmd: string): { template: string; description?:
|
|
|
264
303
|
return { template: match[2], description: frontmatter.description, agent: frontmatter.agent }
|
|
265
304
|
}
|
|
266
305
|
|
|
267
|
-
|
|
306
|
+
const OpenCodeEchoes: Plugin = async ({ directory }) => {
|
|
268
307
|
const paths = resolveVaultPaths(directory)
|
|
269
308
|
const indexFile = path.join(paths.vault, "index.md")
|
|
270
309
|
|
|
@@ -284,6 +323,7 @@ export const OpenCodeEchoes: Plugin = async ({ directory }) => {
|
|
|
284
323
|
"echoes-init": ECHOES_INIT_COMMAND,
|
|
285
324
|
"echoes-start": ECHOES_START_COMMAND,
|
|
286
325
|
"echoes-end": ECHOES_END_COMMAND,
|
|
326
|
+
"echoes-status": ECHOES_STATUS_COMMAND,
|
|
287
327
|
}
|
|
288
328
|
input.command = input.command || {}
|
|
289
329
|
for (const [name, cmd] of Object.entries(cmds)) {
|
|
@@ -494,5 +534,5 @@ export const OpenCodeEchoes: Plugin = async ({ directory }) => {
|
|
|
494
534
|
}
|
|
495
535
|
}
|
|
496
536
|
|
|
497
|
-
export default OpenCodeEchoes
|
|
498
|
-
export { OpenCodeEchoes
|
|
537
|
+
export default { server: OpenCodeEchoes }
|
|
538
|
+
export { OpenCodeEchoes }
|
package/package.json
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "echoes-vault-opencode",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "EchoesVault — persistent memory plugin for OpenCode. Obsidian-style knowledge base with daily logs, encyclopedia pages, and session resumption.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
"./server": {
|
|
9
|
+
"import": "./index.ts",
|
|
10
|
+
"types": "./index.ts"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
7
13
|
"files": [
|
|
8
14
|
"index.ts"
|
|
9
15
|
],
|