echoes-vault-opencode 0.0.4 → 1.0.1
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 +2 -1
- package/index.ts +23 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,6 +14,7 @@ AI agents forget everything when a session ends. EchoesVault gives OpenCode a pe
|
|
|
14
14
|
|
|
15
15
|
## Features
|
|
16
16
|
|
|
17
|
+
- **Google OKF Compliant** — EchoesVault uses Google's [Open Knowledge Format (OKF)](https://github.com/GoogleCloudPlatform/knowledge-catalog/tree/main/okf) under the hood. Your knowledge base is 100% interoperable with standard AI parsers and renders natively on GitHub and GitLab.
|
|
17
18
|
- **Zero context loss** — start every session exactly where you left off. `/echoes-resume` reads the last 3 daily logs and the full knowledge index and feeds them to the AI automatically.
|
|
18
19
|
- **Zero setup** — on first load the plugin creates the entire vault structure, slash commands, and agent skills by itself. Nothing to configure.
|
|
19
20
|
- **Obsidian-compatible vault** — `EchoesVault/` is a valid Obsidian vault. Open it in Obsidian at any time for visual navigation, graph view, and search.
|
|
@@ -35,7 +36,7 @@ EchoesVault/
|
|
|
35
36
|
└── raw/ — read-only source materials
|
|
36
37
|
```
|
|
37
38
|
|
|
38
|
-
Every page in `pages/` starts with YAML frontmatter:
|
|
39
|
+
Every page in `pages/` starts with YAML frontmatter. The `type` property is strictly enforced to maintain OKF compliance:
|
|
39
40
|
|
|
40
41
|
```yaml
|
|
41
42
|
---
|
package/index.ts
CHANGED
|
@@ -253,6 +253,17 @@ const ensureSkills = async (directory: string): Promise<void> => {
|
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
255
|
|
|
256
|
+
const parseCommandFrontmatter = (cmd: string): { template: string; description?: string; agent?: string } => {
|
|
257
|
+
const match = cmd.match(/^---\n([\s\S]*?)\n---\n([\s\S]*)$/)
|
|
258
|
+
if (!match) return { template: cmd }
|
|
259
|
+
const frontmatter: Record<string, string> = {}
|
|
260
|
+
for (const line of match[1].split("\n")) {
|
|
261
|
+
const [key, ...rest] = line.split(":")
|
|
262
|
+
if (key && rest.length) frontmatter[key.trim()] = rest.join(":").trim()
|
|
263
|
+
}
|
|
264
|
+
return { template: match[2], description: frontmatter.description, agent: frontmatter.agent }
|
|
265
|
+
}
|
|
266
|
+
|
|
256
267
|
export const OpenCodeEchoes: Plugin = async ({ directory }) => {
|
|
257
268
|
const paths = resolveVaultPaths(directory)
|
|
258
269
|
const indexFile = path.join(paths.vault, "index.md")
|
|
@@ -268,6 +279,18 @@ export const OpenCodeEchoes: Plugin = async ({ directory }) => {
|
|
|
268
279
|
await ensureSkills(directory)
|
|
269
280
|
|
|
270
281
|
return {
|
|
282
|
+
config: async (input) => {
|
|
283
|
+
const cmds: Record<string, string> = {
|
|
284
|
+
"echoes-init": ECHOES_INIT_COMMAND,
|
|
285
|
+
"echoes-resume": ECHOES_RESUME_COMMAND,
|
|
286
|
+
"echoes-save": ECHOES_SAVE_COMMAND,
|
|
287
|
+
}
|
|
288
|
+
input.command = input.command || {}
|
|
289
|
+
for (const [name, cmd] of Object.entries(cmds)) {
|
|
290
|
+
const { template, description, agent } = parseCommandFrontmatter(cmd)
|
|
291
|
+
input.command[name] = { template, description, agent }
|
|
292
|
+
}
|
|
293
|
+
},
|
|
271
294
|
tool: {
|
|
272
295
|
commit_memory_to_echoes_vault: tool({
|
|
273
296
|
description:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "echoes-vault-opencode",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.0.1",
|
|
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",
|