@sage-protocol/sage-plugin 0.1.4 → 0.1.6

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.
@@ -0,0 +1,18 @@
1
+ name: release-please
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+
7
+ permissions:
8
+ contents: write
9
+ pull-requests: write
10
+
11
+ jobs:
12
+ release-please:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: googleapis/release-please-action@v4
16
+ with:
17
+ config-file: release-please-config.json
18
+ manifest-file: .release-please-manifest.json
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.1.5"
3
+ }
package/CHANGELOG.md ADDED
@@ -0,0 +1,20 @@
1
+ # Changelog
2
+
3
+ ## [0.1.5](https://github.com/sage-protocol/sage-plugin/compare/sage-plugin-v0.1.4...sage-plugin-v0.1.5) (2026-02-02)
4
+
5
+
6
+ ### Features
7
+
8
+ * adding ci, release please and improvements ([0e303fe](https://github.com/sage-protocol/sage-plugin/commit/0e303fe219a96e83318a3d221b0b403d463e0923))
9
+ * version bump ([9aa7d91](https://github.com/sage-protocol/sage-plugin/commit/9aa7d916f758e9e6be422888b2ad15711e96df19))
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * bug fixes and improvements ([0b88fc9](https://github.com/sage-protocol/sage-plugin/commit/0b88fc97f6fc71f81e8a2ca843922a98a87692ae))
15
+ * fixing opencode plugin bindings for prompt processing and hook behavior ([289949a](https://github.com/sage-protocol/sage-plugin/commit/289949a0701ea4d5ef0b5630eb9d39d734784401))
16
+ * updates ([6f56a0c](https://github.com/sage-protocol/sage-plugin/commit/6f56a0cdfb91b7cb75695490ac4b899d01017951))
17
+
18
+ ## Changelog
19
+
20
+ All notable changes to this package are documented here.
package/README.md CHANGED
@@ -1,37 +1,67 @@
1
1
  # Sage Plugin (OpenCode)
2
2
 
3
- Unified OpenCode plugin for Scroll that handles both prompt capture (for RLM feedback) and inline skill/prompt suggestions.
3
+ OpenCode plugin for Sage Protocol. Captures prompt/response pairs for RLM feedback and provides inline skill suggestions during coding sessions.
4
+
5
+ ## What It Does
6
+
7
+ - **Prompt Capture** - Silently records prompt/response pairs with session metadata (model, tokens, cost)
8
+ - **Inline Suggestions** - Debounced skill and prompt suggestions injected into the OpenCode TUI
9
+ - **RLM Feedback** - Tracks whether suggestions were accepted, steered, or rejected within a 30-second correlation window
10
+ - **Session Tracking** - Maintains session and model context across streaming responses
11
+
12
+ ## Install
13
+
14
+ ```bash
15
+ mkdir -p ~/.config/opencode/plugin/@sage-protocol
16
+ cp -r sage-plugin ~/.config/opencode/plugin/@sage-protocol/
17
+ ```
18
+
19
+ Add the plugin to your `opencode.json`:
20
+
21
+ ```json
22
+ {
23
+ "plugin": ["@sage-protocol/sage-plugin"],
24
+ "mcp": {
25
+ "sage": {
26
+ "type": "local",
27
+ "command": ["sage", "mcp", "start"],
28
+ "enabled": true
29
+ }
30
+ }
31
+ }
32
+ ```
33
+
34
+ Or run `sage init --opencode` to configure automatically.
35
+
36
+ ## Configuration
37
+
38
+ | Variable | Default | Description |
39
+ | -------------------------- | ------- | -------------------------------------------- |
40
+ | `SAGE_BIN` | `sage` | Path to the sage binary |
41
+ | `SAGE_SUGGEST_LIMIT` | `3` | Max suggestions per request |
42
+ | `SAGE_SUGGEST_DEBOUNCE_MS` | `800` | Debounce delay for TUI suggestions |
43
+ | `SAGE_SUGGEST_PROVISION` | `1` | Set `0` to skip MCP provisioning |
44
+ | `SAGE_RLM_FEEDBACK` | `1` | Set `0` to disable RLM feedback tracking |
45
+ | `SAGE_PLUGIN_DRY_RUN` | `0` | Set `1` to disable spawning sage (for tests) |
46
+
47
+ Notes:
48
+
49
+ - The plugin passes user prompts via `PROMPT` and assistant responses via `SAGE_RESPONSE` when invoking `sage capture hook prompt|response`.
4
50
 
5
51
  ## Requirements
6
- - Bun runtime (tested with 1.3+)
7
- - `scroll` CLI available in PATH (or set `SCROLL_BIN`)
8
-
9
- ## Setup
10
- 1. Copy the plugin into OpenCode plugins (scoped name retained):
11
- ```bash
12
- mkdir -p ~/.config/opencode/plugin
13
- mkdir -p ~/.config/opencode/plugin/@sage-protocol
14
- cp -r sage-plugin ~/.config/opencode/plugin/@sage-protocol/
15
- ```
16
- 2. Ensure `opencode.json` includes the plugin:
17
- ```json
18
- {
19
- "plugin": ["@sage-protocol/sage-plugin"],
20
- "mcp": { "scroll": { "type": "local", "command": ["scroll", "mcp", "start"], "enabled": true } }
21
- }
22
- ```
23
- (running `scroll init --opencode` will add this automatically.)
24
-
25
- ## Environment
26
- - `SCROLL_BIN`: override scroll binary path
27
- - `SCROLL_SUGGEST_LIMIT`: suggestions per request (default 3)
28
- - `SCROLL_SUGGEST_DEBOUNCE_MS`: debounce for TUI suggestions (default 800ms)
29
- - `SCROLL_SUGGEST_PROVISION`: set `0` to skip MCP provisioning
30
- - `SCROLL_PLUGIN_DRY_RUN`: set `1` to disable spawning scroll (useful for tests)
31
-
32
- ## Dev
52
+
53
+ - Sage CLI on PATH (or set `SAGE_BIN`)
54
+ - Bun v1.3+
55
+ - OpenCode
56
+
57
+ ## Development
58
+
33
59
  ```bash
34
60
  bun install
35
61
  bun run lint
36
62
  bun test
37
63
  ```
64
+
65
+ ## License
66
+
67
+ MIT
package/bun.lock CHANGED
@@ -3,7 +3,7 @@
3
3
  "configVersion": 1,
4
4
  "workspaces": {
5
5
  "": {
6
- "name": "scroll-plugin",
6
+ "name": "sage-plugin",
7
7
  "devDependencies": {
8
8
  "@biomejs/biome": "^1.7.3",
9
9
  },