@cortexkit/opencode-magic-context 0.8.3 → 0.8.4

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 (33) hide show
  1. package/README.md +17 -7
  2. package/dist/cli.js +2 -2
  3. package/dist/features/builtin-commands/commands.d.ts.map +1 -1
  4. package/dist/hooks/magic-context/command-handler.d.ts.map +1 -1
  5. package/dist/hooks/magic-context/send-session-notification.d.ts.map +1 -1
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +62246 -61171
  8. package/dist/plugin/rpc-handlers.d.ts +11 -0
  9. package/dist/plugin/rpc-handlers.d.ts.map +1 -0
  10. package/dist/shared/conflict-detector.d.ts +0 -4
  11. package/dist/shared/conflict-detector.d.ts.map +1 -1
  12. package/dist/shared/rpc-client.d.ts +16 -0
  13. package/dist/shared/rpc-client.d.ts.map +1 -0
  14. package/dist/shared/rpc-notifications.d.ts +21 -0
  15. package/dist/shared/rpc-notifications.d.ts.map +1 -0
  16. package/dist/shared/rpc-server.d.ts +17 -0
  17. package/dist/shared/rpc-server.d.ts.map +1 -0
  18. package/dist/shared/rpc-types.d.ts +59 -0
  19. package/dist/shared/rpc-types.d.ts.map +1 -0
  20. package/dist/shared/rpc-utils.d.ts +8 -0
  21. package/dist/shared/rpc-utils.d.ts.map +1 -0
  22. package/dist/tui/data/context-db.d.ts +17 -69
  23. package/dist/tui/data/context-db.d.ts.map +1 -1
  24. package/package.json +1 -1
  25. package/src/shared/conflict-detector.ts +1 -17
  26. package/src/shared/rpc-client.ts +123 -0
  27. package/src/shared/rpc-notifications.ts +44 -0
  28. package/src/shared/rpc-server.ts +136 -0
  29. package/src/shared/rpc-types.ts +58 -0
  30. package/src/shared/rpc-utils.ts +16 -0
  31. package/src/tui/data/context-db.ts +99 -625
  32. package/src/tui/index.tsx +53 -55
  33. package/src/tui/slots/sidebar-content.tsx +8 -7
package/README.md CHANGED
@@ -7,7 +7,6 @@
7
7
 
8
8
  <p align="center">
9
9
  <a href="https://www.npmjs.com/package/@cortexkit/opencode-magic-context"><img src="https://img.shields.io/npm/v/@cortexkit/opencode-magic-context?color=blue&style=flat-square" alt="npm"></a>
10
- <a href="https://www.npmjs.com/package/@cortexkit/opencode-magic-context"><img src="https://img.shields.io/npm/dm/@cortexkit/opencode-magic-context?color=brightgreen&style=flat-square&label=downloads" alt="downloads"></a>
11
10
  <a href="https://github.com/cortexkit/opencode-magic-context/stargazers"><img src="https://img.shields.io/github/stars/cortexkit/opencode-magic-context?style=flat-square&color=yellow" alt="stars"></a>
12
11
  <a href="https://github.com/cortexkit/opencode-magic-context/commits"><img src="https://img.shields.io/github/last-commit/cortexkit/opencode-magic-context?style=flat-square&color=green" alt="last commit"></a>
13
12
  <a href="https://github.com/cortexkit/opencode-magic-context/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-MIT-green?style=flat-square" alt="MIT License"></a>
@@ -71,7 +70,7 @@ irm https://raw.githubusercontent.com/cortexkit/opencode-magic-context/master/sc
71
70
 
72
71
  **Or run directly (any OS):**
73
72
  ```bash
74
- bunx @cortexkit/opencode-magic-context setup
73
+ bunx @cortexkit/opencode-magic-context@latest setup
75
74
  ```
76
75
 
77
76
  The wizard will:
@@ -137,7 +136,7 @@ The setup wizard handles this automatically if it detects an oh-my-openagent or
137
136
  Already installed but something isn't working? Run the doctor to check and auto-fix configuration issues:
138
137
 
139
138
  ```bash
140
- bunx @cortexkit/opencode-magic-context doctor
139
+ bunx @cortexkit/opencode-magic-context@latest doctor
141
140
  ```
142
141
 
143
142
  Doctor checks for conflicts (compaction, DCP, OMO hooks), ensures the TUI sidebar is configured, verifies the plugin is registered, and checks the npm cache — fixing what it can automatically.
@@ -145,7 +144,7 @@ Doctor checks for conflicts (compaction, DCP, OMO hooks), ensures the TUI sideba
145
144
  Use `--force` to force-clear the plugin cache even when versions match (fixes broken transitive dependencies):
146
145
 
147
146
  ```bash
148
- bunx @cortexkit/opencode-magic-context doctor --force
147
+ bunx @cortexkit/opencode-magic-context@latest doctor --force
149
148
  ```
150
149
 
151
150
  ---
@@ -307,7 +306,7 @@ The TUI plugin is configured automatically by the setup wizard and the `doctor`
307
306
 
308
307
  ### Startup conflict detection
309
308
 
310
- On startup, Magic Context checks for common configuration problems — OpenCode's built-in compaction being enabled, DCP plugin being active alongside Magic Context, or conflicting oh-my-openagent hooks. When conflicts are detected, it warns the active session with a fix suggestion pointing to `bunx @cortexkit/opencode-magic-context doctor`.
309
+ On startup, Magic Context checks for common configuration problems — OpenCode's built-in compaction being enabled, DCP plugin being active alongside Magic Context, or conflicting oh-my-openagent hooks. When conflicts are detected, it warns the active session with a fix suggestion pointing to `bunx @cortexkit/opencode-magic-context@latest doctor`.
311
310
 
312
311
  ---
313
312
 
@@ -328,8 +327,7 @@ On startup, Magic Context checks for common configuration problems — OpenCode'
328
327
  A companion desktop app for browsing and managing Magic Context state outside of OpenCode.
329
328
 
330
329
  <p align="center">
331
- <a href="https://github.com/cortexkit/opencode-magic-context/releases?q=dashboard"><strong>⬇️ Download for macOS · Windows · Linux</strong></a>
332
- </p>
330
+ <a href="https://github.com/cortexkit/opencode-magic-context/releases/tag/dashboard-v0.2.4"><strong>⬇️ Download for macOS · Windows · Linux</strong></a></p>
333
331
 
334
332
  **Features:**
335
333
  - **Memory Browser** — search, filter, and edit project memories with category and project filtering
@@ -387,6 +385,18 @@ All durable states live in a local SQLite database. If the database can't be ope
387
385
 
388
386
  ---
389
387
 
388
+ ## Star History
389
+
390
+ <a href="https://www.star-history.com/?repos=cortexkit%2Fopencode-magic-context&type=date&legend=bottom-right">
391
+ <picture>
392
+ <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/chart?repos=cortexkit/opencode-magic-context&type=date&theme=dark&legend=top-left" />
393
+ <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/chart?repos=cortexkit/opencode-magic-context&type=date&legend=top-left" />
394
+ <img alt="Star History Chart" src="https://api.star-history.com/chart?repos=cortexkit/opencode-magic-context&type=date&legend=top-left" />
395
+ </picture>
396
+ </a>
397
+
398
+ ---
399
+
390
400
  ## Development
391
401
 
392
402
  **Requirements:** [Bun](https://bun.sh) ≥ 1.0
package/dist/cli.js CHANGED
@@ -10116,8 +10116,8 @@ if (command === "setup") {
10116
10116
  console.log(" doctor --force Force clear plugin cache (fixes broken dependencies)");
10117
10117
  console.log("");
10118
10118
  console.log(" Usage:");
10119
- console.log(" bunx @cortexkit/opencode-magic-context setup");
10120
- console.log(" bunx @cortexkit/opencode-magic-context doctor");
10119
+ console.log(" bunx @cortexkit/opencode-magic-context@latest setup");
10120
+ console.log(" bunx @cortexkit/opencode-magic-context@latest doctor");
10121
10121
  console.log("");
10122
10122
  process.exit(command ? 1 : 0);
10123
10123
  }
@@ -1 +1 @@
1
- {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../src/features/builtin-commands/commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAOpD,wBAAgB,8BAA8B,IAAI,oBAAoB,CAmCrE"}
1
+ {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../src/features/builtin-commands/commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,wBAAgB,8BAA8B,IAAI,oBAAoB,CAwBrE"}
@@ -1 +1 @@
1
- {"version":3,"file":"command-handler.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/command-handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACvF,OAAO,EACH,KAAK,cAAc,EAGtB,MAAM,sCAAsC,CAAC;AAG9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAIxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BA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C;IACF,OAAO,CAAC,EAAE;QACN,MAAM,EAAE,aAAa,CAAC;QACtB,WAAW,EAAE,MAAM,CAAC;QACpB,MAAM,EAAE,OAAO,CAAC;QAChB,SAAS,EAAE,MAAM,CAAC;QAClB,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;QACrE,wBAAwB,CAAC,EAAE;YAAE,OAAO,EAAE,OAAO,CAAC;YAAC,kBAAkB,EAAE,MAAM,CAAA;SAAE,CAAC;QAC5E,uBAAuB,CAAC,EAAE;YACtB,OAAO,EAAE,OAAO,CAAC;YACjB,YAAY,EAAE,MAAM,CAAC;YACrB,SAAS,EAAE,MAAM,CAAC;SACrB,CAAC;KACL,CAAC;CACL;sCASkB,mBAAmB,WACjB,oBAAoB,WACpB,kBAAkB,KAC5B,OAAO,CAAC,IAAI,CAAC;EA+FvB"}
1
+ {"version":3,"file":"command-handler.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/command-handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACvF,OAAO,EACH,KAAK,cAAc,EAGtB,MAAM,sCAAsC,CAAC;AAG9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAKxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAOtE,MAAM,WAAW,mBAAmB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,oBAAoB;IACjC,KAAK,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACjD;AA4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,OAAO,CAAC;YAAC,kBAAkB,EAAE,MAAM,CAAA;SAAE,CAAC;QAC5E,uBAAuB,CAAC,EAAE;YACtB,OAAO,EAAE,OAAO,CAAC;YACjB,YAAY,EAAE,MAAM,CAAC;YACrB,SAAS,EAAE,MAAM,CAAC;SACrB,CAAC;KACL,CAAC;CACL;sCASkB,mBAAmB,WACjB,oBAAoB,WACpB,kBAAkB,KAC5B,OAAO,CAAC,IAAI,CAAC;EA0GvB"}
@@ -1 +1 @@
1
- {"version":3,"file":"send-session-notification.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/send-session-notification.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,kBAAkB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAoDD,wBAAsB,kBAAkB,CACpC,MAAM,EAAE,OAAO,EACf,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,kBAAkB,GAC3B,OAAO,CAAC,IAAI,CAAC,CAwEf;AAED;;;GAGG;AACH,wBAAsB,cAAc,CAChC,MAAM,EAAE,OAAO,EACf,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC,CA0Bf"}
1
+ {"version":3,"file":"send-session-notification.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/send-session-notification.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,kBAAkB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAoDD,wBAAsB,kBAAkB,CACpC,MAAM,EAAE,OAAO,EACf,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,kBAAkB,GAC3B,OAAO,CAAC,IAAI,CAAC,CAyEf;AAED;;;GAGG;AACH,wBAAsB,cAAc,CAChC,MAAM,EAAE,OAAO,EACf,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC,CA0Bf"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAuBlD,QAAA,MAAM,MAAM,EAAE,MAkMb,CAAC;AAEF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAyBlD,QAAA,MAAM,MAAM,EAAE,MAuMb,CAAC;AAEF,eAAe,MAAM,CAAC"}