@joe-broadhead/opencode-linear 0.0.1 → 0.0.3

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/CHANGELOG.md CHANGED
@@ -2,6 +2,76 @@
2
2
 
3
3
  All notable changes to this project are documented here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and versions follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
4
4
 
5
+ ## [0.0.3] - 2026-11-04
6
+
7
+ ### Added
8
+
9
+ - `linear_issues`, the plugin's own tool: the Linear issues assigned to you, in any state, as a table of identifier,
10
+ title, state, priority and link (25 rows by default, at most 100). It reads them through Linear's `list_issues`,
11
+ holds no credential, and runs without asking, through a new default rule
12
+ `{ "action": "linear_issues", "resource": "*", "effect": "allow" }`. It is a direct tool, offered even when Code
13
+ Mode holds Linear's other tools, so that Jelly can draw its result as a table. It is not a method of the tools RPC.
14
+ Its errors are `AUTH_REQUIRED` and `UPSTREAM_UNREADABLE`, documented in the configuration guide.
15
+ - `/linear-status` and the status RPC count `linear_issues` among the Linear tools, never as an unknown one.
16
+ - A `jelly` section in `package.json` for [Jelly](https://github.com/joe-broadhead/opencode-linear/blob/HEAD/docs/jelly.md): the plugin's title, each of its 78 tools with its
17
+ permission, default effect and whether it only reads, the skills, the sign-in, a table card for `linear_issues`, and
18
+ a "My Linear issues" Home feed that refreshes every 15 minutes. Jelly reads it without loading the plugin.
19
+
20
+ ## [0.0.2] - 2026-11-04
21
+
22
+ ### Added
23
+
24
+ - OpenCode 2.2.5 is a tested release, next to 2.2.3 and 2.2.4.
25
+ - Code Mode's catalog now describes the `linear` namespace: what Linear's tools do, whether changes are available and
26
+ ask first, and that Linear content is untrusted.
27
+ - The status RPC has `version`, the plugin's version, and `host.range`, the supported range.
28
+ - The status RPC declares the error `unavailable`. When status cannot be read, it answers
29
+ `STATUS_UNAVAILABLE: Could not read Linear's status (…).` with a next step, instead of OpenCode's bare error, and the
30
+ `/linear` dialog shows both.
31
+
32
+ ### Changed
33
+
34
+ - The status RPC (`linear.workspace` `status`) uses the field names every plugin of this family shares. Scripts that
35
+ read it need these changes:
36
+ - `connection` is now `state`, with the shared states: `pending` is now `connecting`, `needs_sign_in` is now
37
+ `sign_in_required`, and a `linear` server at another URL than your `access` uses is now `conflict`;
38
+ - `agentsWithoutRules` is now `unguardedAgents`;
39
+ - `host.warning` is gone, and the `OpenCode` row says why an untested host runs; `host.version` is `null` when
40
+ OpenCode reports no version; `host.tested` is true only for 2.2.3, 2.2.4 and 2.2.5;
41
+ - `unknownTools` holds at most 20 names, only those made of lowercase letters, digits and `_`, and the new
42
+ `unknownCount` counts every unknown tool;
43
+ - `error` is set only for a failed connection: OpenCode's reason on one line of at most 160 characters, with any URL
44
+ cut before its query. Status no longer shows OpenCode's text for a needed sign-in, which can hold an
45
+ authorization URL.
46
+ - On a release inside `>=2.2.3 <2.3.0` other than 2.2.3, 2.2.4 and 2.2.5, Linear starts as before, and status calls
47
+ the version untested. The `OpenCode` row reads, for example, `2.2.5 (tested; supported range >=2.2.3 <2.3.0)`.
48
+ - `HOST_UNTESTED`'s next step is now `Use OpenCode >=2.2.3 <2.3.0, or set the plugin option "allowUntestedHost": true
49
+ to run anyway.`
50
+ - While agents lack the default rules, the next step says the whole fix: put the block first in each listed agent's
51
+ own `permissions`, followed by your top-level rules for `linear_*` tools. Scripts reading only `nextStep` get it too.
52
+ - The tools RPC's `describe` accepts only `{}` or nothing, and otherwise answers `describe takes no input`. An envelope
53
+ that is not an object gets one plain message, a refusal names the action that was refused, and a call during which
54
+ Linear reconnects answers `CONNECTING` instead of `CONNECTION_FAILED`. `docs/scripting.md` lists the envelope
55
+ messages.
56
+
57
+ ### Fixed
58
+
59
+ - Linear's read-only server no longer lists `whoami`, but the plugin still counted it as one of 42 known reads: the
60
+ tools RPC's `whoami` method always answered `TOOL_UNAVAILABLE`, and the `linear` skill told the model to call it.
61
+ The known reads are now exactly the 41 tools that server lists, so `whoami` is no longer a method of the tools RPC
62
+ or allowed by the default rules; if Linear serves it again, it asks before it runs. The skill and the docs use
63
+ `get_user` with `query` `"me"` for the signed-in user, and `describe` shows which methods the server for your access
64
+ lists now.
65
+ - The README's Uninstall steps failed: once the plugin was removed and OpenCode reloaded, `opencode mcp logout linear`
66
+ answered "MCP server not found", and the sign-ins stayed in OpenCode's credential store, including the other
67
+ access's, which that command never reaches. Uninstall now signs out first, of both accesses, checks with
68
+ `opencode auth list`, then removes the plugin.
69
+ - The README now says what to do after `opencode plugin add` (run `opencode reload`, then `/linear-status`) and how to
70
+ update the plugin.
71
+ - `docs/scripting.md` said `opencode api` runs in the directory you call it from. It runs in the OpenCode service's
72
+ default location, your home directory; the doc now says how to target a project. It also says that `opencode api`
73
+ exits with status 1 for an RPC error, and that a result with only text has that text as its `output`.
74
+
5
75
  ## [0.0.1] - 2026-11-03
6
76
 
7
77
  ### Added
package/README.md CHANGED
@@ -7,7 +7,8 @@ Unofficial; not affiliated with Linear.
7
7
 
8
8
  ## Requirements
9
9
 
10
- - OpenCode `>=2.2.3 <2.3.0`, tested on 2.2.3 and 2.2.4.
10
+ - OpenCode `>=2.2.3 <2.3.0`, tested on 2.2.3, 2.2.4 and 2.2.5. Outside that range the plugin does not start, unless
11
+ you set `allowUntestedHost`.
11
12
  - macOS or Linux.
12
13
  - A Linear account.
13
14
 
@@ -17,9 +18,22 @@ Unofficial; not affiliated with Linear.
17
18
  opencode plugin add @joe-broadhead/opencode-linear
18
19
  ```
19
20
 
20
- Restart OpenCode if it is running. The plugin registers Linear's MCP server under the name `linear`, adds default
21
- permission rules, the `/linear-status` command, the `/linear` status view and two skills. It adds no tools of its own:
22
- the tools are Linear's, and OpenCode handles the connection, the sign-in and the stored credentials.
21
+ Run `opencode reload`, or restart OpenCode. Then run `/linear-status`: it shows `sign-in required` until you sign in
22
+ (see [Sign in](#sign-in)).
23
+
24
+ The plugin registers Linear's MCP server under the name `linear`, adds default permission rules, the `/linear-status`
25
+ command, the `/linear` status view, two skills and one tool of its own, `linear_issues`. Every other tool is Linear's,
26
+ and OpenCode handles the connection, the sign-in and the stored credentials.
27
+
28
+ `linear_issues` answers the issues assigned to you as a table: identifier, title, state, priority and link. It reads
29
+ them through Linear's own `list_issues`, under that tool's sign-in and permission rules, and holds no credential. It is
30
+ a direct tool, offered to the model even when Code Mode holds Linear's other tools, because
31
+ [Jelly](https://github.com/joe-broadhead/opencode-linear/blob/HEAD/docs/jelly.md) draws a tool's result as a table only
32
+ for a direct call, not for one made inside Code Mode.
33
+
34
+ **Update** with `opencode plugin update @joe-broadhead/opencode-linear`, then run `opencode reload`. An entry pinned
35
+ to a version, such as `@joe-broadhead/opencode-linear@0.0.1`, does not update: remove the `@version` from its
36
+ `plugins` entry first.
23
37
 
24
38
  ## Sign in
25
39
 
@@ -38,7 +52,8 @@ OpenCode shows its "MCP server needs authentication" notice.
38
52
 
39
53
  To sign out, or to change workspace, run `opencode mcp logout linear` while the access you want to change is the one
40
54
  configured. It removes the stored sign-ins for that access only. Or remove the account in `/connect` → Linear. Then
41
- sign in again and pick the workspace on Linear's consent page.
55
+ sign in again and pick the workspace on Linear's consent page. To sign out of both before you remove the plugin, see
56
+ [Uninstall](#uninstall).
42
57
 
43
58
  ## Use
44
59
 
@@ -76,9 +91,11 @@ The plugin adds these rules to every agent, directly after the agent's base rule
76
91
 
77
92
  1. `{ "action": "linear_*", "resource": "*", "effect": "ask" }`: every Linear tool asks, including tools Linear adds
78
93
  later.
79
- 2. One `allow` rule for each of Linear's 42 read tools, listed in
94
+ 2. One `allow` rule for each of Linear's 41 read tools, listed in
80
95
  [`src/linear-tools.ts`](https://github.com/joe-broadhead/opencode-linear/blob/HEAD/src/linear-tools.ts). These
81
96
  run without a prompt.
97
+ 3. `{ "action": "linear_issues", "resource": "*", "effect": "allow" }`: the plugin's own `linear_issues`, which only
98
+ reads, runs without a prompt too. Its call to `list_issues` still follows that tool's rules.
82
99
 
83
100
  So reads run, and every change asks before it runs. Everything that comes later than these rules still wins: an
84
101
  agent's own stricter rules (Plan cannot edit, Explore cannot use Linear), your `permissions` in `opencode.json`, and
@@ -103,7 +120,7 @@ Set options with the object form of the plugin entry:
103
120
  | Option | Values | Default | Effect |
104
121
  | --- | --- | --- | --- |
105
122
  | `access` | `"read"` or `"write"` | `"read"` | `"read"` uses Linear's read-only server and the `read` scope. `"write"` uses `https://mcp.linear.app/mcp` with `read write`, and adds the `linear-write` skill. |
106
- | `allowUntestedHost` | `true` or `false` | `false` | Starts on an OpenCode version outside the tested line, with a warning in status. |
123
+ | `allowUntestedHost` | `true` or `false` | `false` | Starts on an OpenCode version outside `>=2.2.3 <2.3.0`, with a warning in status. |
107
124
 
108
125
  Switching `access` changes the server address, and read and write access each have their own sign-in. If you have
109
126
  never signed in with the new access, run `/connect` and choose Linear, then press `o` or Enter to open the link. If you
@@ -145,28 +162,42 @@ Run `/linear-status` first. Its last line is the next step.
145
162
  | Connection: conflict | Your config has an `mcp.servers.linear` entry with a URL other than the one your `access` uses. Point it at that URL or remove it, then restart OpenCode. |
146
163
  | Tools: unknown | Linear added tools the plugin does not know yet. They ask before they run. |
147
164
  | Agents without default rules | Put the printed block first in each listed agent's own `permissions`, followed by your top-level rules for `linear_*` tools. |
148
- | OpenCode: host untested | OpenCode is outside `>=2.2.3 <2.3.0` and `allowUntestedHost` is set. If Linear misbehaves, use a tested OpenCode. |
165
+ | OpenCode: untested | OpenCode is not 2.2.3, 2.2.4 or 2.2.5. Inside `>=2.2.3 <2.3.0` the plugin runs normally; outside it, it runs only because `allowUntestedHost` is set. If Linear misbehaves, use a tested release. |
149
166
  | Signed in to the wrong workspace, for example after switching `access` | Read and write access each have their own sign-in, and Linear's consent page decides the workspace. With the wrong access still configured, run `opencode mcp logout linear` (or remove the account in `/connect` → Linear), then sign in again and pick the workspace. |
150
167
  | A Linear tool is refused in `opencode run` | Nobody could answer its prompt. Add an `allow` rule for that tool. |
151
168
  | `/linear` is missing | The plugin did not start. Run `/plugins` to see the error. |
152
169
  | `OPTIONS_INVALID` | An option is unknown or has a wrong value. The message names the option and the accepted values. |
153
- | `HOST_UNTESTED` | Your OpenCode is outside `>=2.2.3 <2.3.0`. Use a tested OpenCode, or set `"allowUntestedHost": true` to try anyway. |
170
+ | `HOST_UNTESTED` | Your OpenCode is outside `>=2.2.3 <2.3.0`, so the plugin did not start. Use OpenCode `>=2.2.3 <2.3.0`, or set `"allowUntestedHost": true` to run anyway. |
154
171
  | `STATUS_UNAVAILABLE` | The status could not be read, or the plugin is not running. Follow the next step in the message. |
155
172
  | `SKILLS_INVALID` | A skill file in the package is missing or broken. Reinstall the plugin. |
173
+ | `AUTH_REQUIRED` from `linear_issues` | OpenCode does not list Linear's `list_issues`, usually because you are not signed in. Run `/connect` and choose Linear; if you are signed in, run `/linear-status`. |
174
+ | `UPSTREAM_UNREADABLE` from `linear_issues` | Linear's `list_issues` answered with something other than a list of issues. Ask for `list_issues` with assignee `me` instead, and update the plugin. |
156
175
 
157
176
  A script's errors from the tools RPC have their own codes, listed in
158
177
  [Scripting](https://github.com/joe-broadhead/opencode-linear/blob/HEAD/docs/scripting.md#errors).
159
178
 
160
179
  ## Uninstall
161
180
 
162
- ```sh
163
- opencode plugin remove @joe-broadhead/opencode-linear
164
- opencode mcp logout linear
165
- ```
181
+ Sign out while the plugin is still installed: once it is removed, OpenCode no longer knows the `linear` server, so
182
+ `opencode mcp logout linear` fails with `MCP server not found: linear` and the sign-ins stay in OpenCode's credential
183
+ store. Read access and write access each have their own sign-in, and OpenCode signs out only the one for the `access`
184
+ configured now.
185
+
186
+ 1. Sign out: `opencode mcp logout linear`. Right after OpenCode starts or reloads, it can answer
187
+ `MCP server not found: linear` for a few seconds; wait, then run it again.
188
+ 2. If you ever used the other access, sign out of it too. Set `"access"` in the plugin's `plugins` entry in
189
+ `opencode.json` to the other value (`"write"`, or `"read"`, the default), for example
190
+ `{ "package": "@joe-broadhead/opencode-linear", "options": { "access": "write" } }`, run `opencode reload`, then
191
+ run `opencode mcp logout linear` again.
192
+ 3. Check: `opencode auth list` no longer lists **Linear**.
193
+ 4. Remove the plugin: `opencode plugin remove @joe-broadhead/opencode-linear`, then `opencode reload`.
194
+ `opencode mcp list` no longer lists `linear`.
195
+ 5. Remove any Linear rules you copied into your agents' own `permissions`.
166
196
 
167
197
  ## Links
168
198
 
169
199
  - [Configuration](https://github.com/joe-broadhead/opencode-linear/blob/HEAD/docs/configuration.md)
200
+ - [In Jelly](https://github.com/joe-broadhead/opencode-linear/blob/HEAD/docs/jelly.md)
170
201
  - [Architecture](https://github.com/joe-broadhead/opencode-linear/blob/HEAD/docs/architecture.md)
171
202
  - [Contributing](https://github.com/joe-broadhead/opencode-linear/blob/HEAD/CONTRIBUTING.md)
172
203
  - [Security](https://github.com/joe-broadhead/opencode-linear/blob/HEAD/SECURITY.md)