echoes-vault-opencode 1.0.9 → 1.0.11

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.
Files changed (2) hide show
  1. package/package.json +2 -3
  2. package/tui.ts +2 -69
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "echoes-vault-opencode",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
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",
@@ -28,8 +28,7 @@
28
28
  ],
29
29
  "license": "MIT",
30
30
  "dependencies": {
31
- "@opencode-ai/plugin": ">=1.16.0",
32
- "@opentui/solid": ">=0.3.2"
31
+ "@opencode-ai/plugin": ">=1.16.0"
33
32
  },
34
33
  "devDependencies": {
35
34
  "@types/node": "^22.0.0",
package/tui.ts CHANGED
@@ -1,72 +1,5 @@
1
- /** @jsxImportSource @opentui/solid */
2
-
3
- import type { TuiPlugin } from "@opencode-ai/plugin/tui"
4
-
5
- const tui: TuiPlugin = async (api) => {
6
- const KV = "echoes_vault"
7
-
8
- type VaultState = {
9
- initialized: boolean
10
- sessionActive: boolean
11
- pagesCount: number
12
- lastSession: string | null
13
- }
14
-
15
- let vault: VaultState = {
16
- initialized: false,
17
- sessionActive: false,
18
- pagesCount: 0,
19
- lastSession: null,
20
- }
21
-
22
- try {
23
- const saved = api.kv.get<VaultState>(KV)
24
- if (saved) vault = saved
25
-
26
- api.event.on("session.created", () => {
27
- vault.sessionActive = true
28
- vault.lastSession = new Date().toISOString().slice(0, 10)
29
- try { api.kv.set(KV, vault) } catch {}
30
- })
31
-
32
- api.event.on("session.deleted", () => {
33
- vault.sessionActive = false
34
- try { api.kv.set(KV, vault) } catch {}
35
- })
36
-
37
- api.event.on("session.idle", () => {
38
- vault.sessionActive = false
39
- try { api.kv.set(KV, vault) } catch {}
40
- })
41
-
42
- api.slots.register({
43
- sidebar_content: ({ session_id }: { session_id: string }) => {
44
- const sessionInfo = session_id ? api.state.session.get(session_id) : undefined
45
- const title = sessionInfo?.title ?? "—"
46
- const count = vault.pagesCount
47
-
48
- return (
49
- <Box flexDirection="column">
50
- <Box border="all" borderStyle="single" paddingX={1} paddingY={0}>
51
- <Text bold>EchoesVault</Text>
52
- </Box>
53
- <Box paddingX={1}>
54
- <Text dim>
55
- {vault.sessionActive ? `Session: ${title}` : "Idle"}
56
- {count > 0 ? ` · ${count} pages` : ""}
57
- </Text>
58
- </Box>
59
- <Box paddingX={1} paddingY={0}>
60
- <Text dim>/echoes-init /echoes-start /echoes-end /echoes-status</Text>
61
- </Box>
62
- </Box>
63
- )
64
- },
65
- })
66
- } catch (error) {
67
- console.error("[echoes-vault] TUI init failed:", error)
68
- try { api.ui.toast({ message: "EchoesVault TUI failed to load", variant: "error" }) } catch {}
69
- }
1
+ const tui = async () => {
2
+ // minimal noop — no JSX, no slots, no API calls
70
3
  }
71
4
 
72
5
  export default { tui }