@yannelli/paseo-linear-plugin 0.0.0-stage → 0.3.0
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/LICENSE +201 -0
- package/NOTICE +13 -0
- package/OVERVIEW.md +33 -0
- package/README.md +207 -2
- package/client/agent-options.ts +200 -0
- package/client/breadcrumbs.tsx +110 -0
- package/client/browser.tsx +275 -0
- package/client/compat.ts +107 -0
- package/client/connect.tsx +136 -0
- package/client/create-issue.tsx +291 -0
- package/client/glyphs.tsx +117 -0
- package/client/issue-detail.tsx +366 -0
- package/client/issue-list.tsx +373 -0
- package/client/issue-row.tsx +152 -0
- package/client/issue-sections.tsx +325 -0
- package/client/issue-tree.ts +132 -0
- package/client/key-scope.tsx +23 -0
- package/client/launch-choices.ts +125 -0
- package/client/launch-fields.tsx +152 -0
- package/client/launch-plan.ts +227 -0
- package/client/launch.tsx +484 -0
- package/client/markdown.tsx +240 -0
- package/client/model-browser.tsx +296 -0
- package/client/pickers.tsx +238 -0
- package/client/provider-icon.tsx +78 -0
- package/client/queries.ts +211 -0
- package/client/settings-connection.tsx +109 -0
- package/client/settings-fields.tsx +173 -0
- package/client/settings-keys.tsx +117 -0
- package/client/settings-projects.tsx +281 -0
- package/client/settings-prompts.tsx +198 -0
- package/client/store.ts +71 -0
- package/client/timeline-card.tsx +63 -0
- package/client/ui.tsx +352 -0
- package/index.client.tsx +111 -0
- package/index.server.ts +12 -0
- package/package.json +51 -4
- package/paseo-plugin.json +7 -0
- package/server/cache.ts +68 -0
- package/server/credentials.ts +101 -0
- package/server/graphql.ts +68 -0
- package/server/handlers.ts +172 -0
- package/server/linear.ts +130 -0
- package/server/queries.ts +280 -0
- package/shared/issues.ts +31 -0
- package/shared/linear.ts +268 -0
- package/shared/markdown.ts +416 -0
- package/shared/prompts.ts +150 -0
- package/shared/settings.ts +68 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/NOTICE
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
paseo-linear-plugin
|
|
2
|
+
Copyright 2026 Ryan Yannelli
|
|
3
|
+
|
|
4
|
+
This product includes software from Paseo (https://github.com/getpaseo/paseo),
|
|
5
|
+
Copyright (c) 2025-present Mohamed Boudra, licensed under the Apache License,
|
|
6
|
+
Version 2.0. The plugin source in index.client.tsx, index.server.ts, client/,
|
|
7
|
+
server/, shared/, and test/linear.test.ts started as the Linear example plugin
|
|
8
|
+
(plugin-examples/linear) in the Paseo repository. This repository adds Linear keys per Paseo project, a
|
|
9
|
+
response cache, list sorting, sub-issue nesting and breadcrumbs, Markdown
|
|
10
|
+
rendering, and the agent setup page. It also changes the package metadata.
|
|
11
|
+
|
|
12
|
+
client/provider-icon.tsx contains the provider icons from the Paseo app
|
|
13
|
+
(packages/app/src/components/icons). Each icon is a mark of its owner.
|
package/OVERVIEW.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Linear issues
|
|
2
|
+
|
|
3
|
+
Browse and edit Linear issues in Paseo, and start agents from them. Open **Linear** from the sidebar, or open the Linear panel in a workspace. Requires Paseo 0.10.0 or newer.
|
|
4
|
+
|
|
5
|
+
## Connect Linear
|
|
6
|
+
|
|
7
|
+
Paste a Linear personal API key in **Settings → Plugins → Linear → Account**. Create the key in Linear under Settings → Security & access → Personal API keys. To change issues, the key must have write access. The daemon saves the key on its host with owner-only permissions. If no key is saved, the plugin uses `LINEAR_API_KEY` from the daemon environment.
|
|
8
|
+
|
|
9
|
+
To use a different Linear key for one Paseo project, add it under **Project keys**. Workspace panels in that project use its key. The Linear screen shows a key button to switch keys.
|
|
10
|
+
|
|
11
|
+
## Browse issues
|
|
12
|
+
|
|
13
|
+
- Search titles and descriptions, or type an identifier such as `ENG-123`.
|
|
14
|
+
- Filter by assignee and status. Pick a team to see only its issues.
|
|
15
|
+
- Sort by Last updated, Newest, Priority, Due date, or Title.
|
|
16
|
+
- Select **Sub-issues** to nest sub-issues under their parent. The breadcrumbs above an issue show its team and parent chain.
|
|
17
|
+
- Change the status, priority, and assignee. Add comments, or create an issue.
|
|
18
|
+
- Descriptions and comments show as Markdown.
|
|
19
|
+
- `/linear` opens the panel. `/linear ENG-123` opens an issue.
|
|
20
|
+
|
|
21
|
+
## Start an agent
|
|
22
|
+
|
|
23
|
+
Select **Start agent** or **Start review** on an issue. The setup page shows the prompt and the composer controls for the prompt template, model, thinking level, and mode. The model picker lists providers first, and its search covers all models. Choose the project and where the agent runs: a new worktree, a pull request checkout, the issue branch, an existing agent workspace, or the current workspace or project folder. You can include comments in the prompt. For Implement, you can also move the issue to In Progress and assign it to you.
|
|
24
|
+
|
|
25
|
+
The prompt follows the template until you edit it. **Reset prompt** restores it. Edit the templates in **Prompts**, and add project instructions in **Projects**.
|
|
26
|
+
|
|
27
|
+
## Attach an issue
|
|
28
|
+
|
|
29
|
+
Choose **Attach Linear issue** in the composer attachment menu. The agent gets the issue text with your message. This uses the default key.
|
|
30
|
+
|
|
31
|
+
## Data and permissions
|
|
32
|
+
|
|
33
|
+
Only the daemon sends requests to `https://api.linear.app/graphql`. The daemon never sends a key back to the app. Paseo sends the prompt, with the issue snapshot, to the agent provider. The daemon keeps recent Linear responses in memory for up to 24 hours, and the list shows them with **Showing saved results. Updating…** while it gets new data.
|
package/README.md
CHANGED
|
@@ -1,3 +1,208 @@
|
|
|
1
|
-
|
|
1
|
+

|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# Linear issues for Paseo
|
|
4
|
+
|
|
5
|
+
A Paseo plugin for Linear. It adds a Linear screen and a workspace panel where you browse and edit Linear issues. From an issue, you can start an agent that implements it or reviews the work. Your Linear API key stays on the daemon host.
|
|
6
|
+
|
|
7
|
+
- Browse issues in a list next to the issue view. Search and filter the list, and change its sort order.
|
|
8
|
+
- Nest sub-issues under their parent. Breadcrumbs show the parent chain of an issue.
|
|
9
|
+
- Read descriptions and comments as Markdown.
|
|
10
|
+
- Change the status, priority, and assignee. Add comments and create issues.
|
|
11
|
+
- Start an agent or a review from an issue. Choose the prompt, agent, model, effort, project, and where the agent runs.
|
|
12
|
+
- Use a different Linear key for a Paseo project.
|
|
13
|
+
- See saved results at once while the plugin gets new data from Linear.
|
|
14
|
+
- Attach a Linear issue to a message in the composer.
|
|
15
|
+
|
|
16
|
+

|
|
17
|
+
|
|
18
|
+

|
|
19
|
+
|
|
20
|
+

|
|
21
|
+
|
|
22
|
+
The images are illustrations with sample data. They come from `docs/graphics`; see [Graphics](#graphics).
|
|
23
|
+
|
|
24
|
+
## What you need
|
|
25
|
+
|
|
26
|
+
- Paseo 0.10.0 or newer, with **Enable plugins** turned on in **Settings → Plugins**.
|
|
27
|
+
- A Linear personal API key. Create one in Linear under **Settings → Security & access → Personal API keys**. To change issues, add comments, or create issues, the key must have write access.
|
|
28
|
+
|
|
29
|
+
## Install
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
paseo plugin add npm:@yannelli/paseo-linear-plugin
|
|
33
|
+
paseo plugin ls linear
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
To pin a version, add it to the source, for example `npm:@yannelli/paseo-linear-plugin@0.1.0`. To install a Git tag instead, run `paseo plugin add github:yannelli/paseo-linear-plugin --ref v0.1.0`. Plugins run trusted code with the daemon user's access.
|
|
37
|
+
|
|
38
|
+
## Connect Linear
|
|
39
|
+
|
|
40
|
+
### Default key
|
|
41
|
+
|
|
42
|
+
Open **Settings → Plugins → Linear → Account**, paste your key, and select **Connect Linear**. The Linear screen shows the same form until a key is set. The plugin checks the key with Linear before it saves it.
|
|
43
|
+
|
|
44
|
+
The daemon saves the key in `$PASEO_HOME/plugin-data/linear/credentials.json`, which is `~/.paseo/plugin-data/linear/credentials.json` by default. The file has mode `0600` and its folder has mode `0700`. A saved key takes effect at once. **Disconnect** deletes the saved key.
|
|
45
|
+
|
|
46
|
+
### Key from the environment
|
|
47
|
+
|
|
48
|
+
If no key is saved, the plugin uses `LINEAR_API_KEY` from the environment that starts the daemon:
|
|
49
|
+
|
|
50
|
+
```sh
|
|
51
|
+
export LINEAR_API_KEY="lin_api_..."
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
A saved key takes precedence over the environment. To change the environment key, restart the daemon with the new value.
|
|
55
|
+
|
|
56
|
+
### Project keys
|
|
57
|
+
|
|
58
|
+
A Paseo project can use a different Linear key, for example for a different Linear workspace. In the **Project keys** section of the Account settings, choose the project, paste the key, and select **Save project key**.
|
|
59
|
+
|
|
60
|
+
- The Linear panel in a workspace of that project uses the project key.
|
|
61
|
+
- When project keys exist, the Linear screen shows a key button in the filter row. Use it to switch between **Default key** and the project keys.
|
|
62
|
+
- The plugin looks for a key in this order: the project key, the saved default key, then `LINEAR_API_KEY`.
|
|
63
|
+
- The composer attachment always uses the default key.
|
|
64
|
+
|
|
65
|
+
## Use
|
|
66
|
+
|
|
67
|
+
### Browse issues
|
|
68
|
+
|
|
69
|
+
Open **Linear** from the sidebar, or run **Linear: Open issues** in the command center. In a workspace, run **Linear: Show issues in this workspace**, or type `/linear` in the composer. `/linear ENG-123` opens that issue, and `/linear <text>` searches.
|
|
70
|
+
|
|
71
|
+
- The search box matches issue titles and descriptions. An identifier such as `ENG-123` shows that issue only.
|
|
72
|
+
- Filter by assignee (**Mine**, **Everyone**, **Unassigned**), by status (**Active**, **Backlog**, **Done**, **All**), and by team.
|
|
73
|
+
- The list groups issues by status and loads more as you scroll.
|
|
74
|
+
- If you map Linear teams to a project in **Settings → Plugins → Linear → Projects**, the panel starts with the first mapped team.
|
|
75
|
+
|
|
76
|
+
### Sort
|
|
77
|
+
|
|
78
|
+
Select the sort button in the filter row. The options are **Last updated**, **Newest**, **Priority**, **Due date**, and **Title**.
|
|
79
|
+
|
|
80
|
+
### Sub-issues
|
|
81
|
+
|
|
82
|
+
Select **Sub-issues** in the filter row to nest sub-issues under their parent. A sub-issue shows under its parent when the parent is in the list, even if their statuses differ. Select the chevron to collapse or expand a parent. A collapsed parent shows how many sub-issues it hides.
|
|
83
|
+
|
|
84
|
+
The issue header shows breadcrumbs: the team, the parent chain, then the issue, for example **Engineering › ENG-120 › ENG-123**. Select a parent to open it. A long chain folds its middle into **…**; select it to show all parents.
|
|
85
|
+
|
|
86
|
+
### Read and edit an issue
|
|
87
|
+
|
|
88
|
+
- Select the status, priority, or assignee chip to change it.
|
|
89
|
+
- Descriptions and comments show as Markdown: headings, lists, task lists, code, quotes, tables, and links.
|
|
90
|
+
- Add a comment in the **Activity** section.
|
|
91
|
+
- The header buttons refresh the issue, copy its branch name, and open it in Linear.
|
|
92
|
+
- Select **New issue**, or run **Linear: Create issue**, to create an issue. Set the team, status, priority, assignee, title, and a Markdown description.
|
|
93
|
+
|
|
94
|
+
### Start an agent
|
|
95
|
+
|
|
96
|
+
Select **Start agent** or **Start review** in the issue view. The agent setup page opens in the panel or the screen. It works with or without a current workspace.
|
|
97
|
+
|
|
98
|
+
1. Edit the prompt in the prompt box if you want. The prompt follows the template and options until you edit it. Select **Reset prompt** to go back to the template.
|
|
99
|
+
2. Use the controls under the prompt box, as in the Paseo composer. They set the prompt template (Implement or Review), the model, the thinking level, and the mode. The thinking level shows when the model has levels, and the mode shows when the agent has modes.
|
|
100
|
+
- The model picker lists the providers first. Select a provider to see its models, or search to find models from all providers.
|
|
101
|
+
- Choosing a model from another provider also changes the agent, and resets the thinking level and mode to that agent's defaults.
|
|
102
|
+
3. Choose the **Project**. The default is the project of the current workspace. Without a workspace, it is the last project you used for the team, then a project mapped to the team.
|
|
103
|
+
4. Choose where the agent runs in **Run in**:
|
|
104
|
+
- **New worktree** on the issue branch.
|
|
105
|
+
- **Check out PR #N** for a review, when the issue links a GitHub pull request.
|
|
106
|
+
- **Check out issue branch** for a review.
|
|
107
|
+
- **Existing agent workspace** or **Implementation workspace**, when an agent already works on the issue.
|
|
108
|
+
- **This workspace**, or **Project folder** when you are not in a workspace of that project.
|
|
109
|
+
|
|
110
|
+
The worktree and checkout options show only for a Git project.
|
|
111
|
+
5. Set the options: **Include comments in the prompt**, **Move the issue to In Progress**, and **Assign the issue to me**. The last two show only for Implement, and only when they would change the issue.
|
|
112
|
+
6. Select **Start agent** or **Start review**.
|
|
113
|
+
|
|
114
|
+
The plugin starts the agent and then updates Linear. If the Linear update fails, the agent keeps running and a message shows the error. The agent's timeline gets a card that links to the issue. The issue view lists the agents started from it under **Agents on this issue**.
|
|
115
|
+
|
|
116
|
+
Set the default model, where agents run, the default options, and the Implement and Review templates in **Settings → Plugins → Linear → Prompts**. In **Projects**, add instructions and steps for a project, or append to or replace a template for that project.
|
|
117
|
+
|
|
118
|
+
### Attach an issue to a message
|
|
119
|
+
|
|
120
|
+
In the composer, open the attachment menu and choose **Attach Linear issue**. Type an identifier such as `ENG-123`, or words from a title. An empty search lists the 20 most recently updated issues. The agent gets the issue text with your message. The plugin takes this snapshot when you select the issue.
|
|
121
|
+
|
|
122
|
+
## Data and permissions
|
|
123
|
+
|
|
124
|
+
- **Your key stays on the daemon host.** When you save a key, the app sends it to the daemon once. The daemon never sends a key back to the app. The app gets only the last four characters, to show which key is in use. Only the daemon sends requests to `https://api.linear.app/graphql`.
|
|
125
|
+
- **Data sent to Linear:** queries for issues, teams, users, and comments, and the changes you make. When you start an agent with the options on, the plugin moves the issue to In Progress and assigns it to you.
|
|
126
|
+
- **Data sent to the agent provider:** the prompt. It holds the template text and an issue snapshot: identifier, title, URL, team, status, priority, assignee, project, labels, parent, description, sub-issues, and links. It holds comments only when **Include comments in the prompt** is on. It also holds the project instructions and steps from the Projects settings. An attached issue sends the identifier, title, URL, status, priority, assignee, project, labels, and description.
|
|
127
|
+
- **Cached results:** the daemon keeps up to 300 recent Linear responses in memory for up to 24 hours. It groups them by a hash of the key, so two keys never share results. The app shows saved results at once with **Showing saved results. Updating…** while it gets new data. An edit clears the cached lists and issues for that key. Saving or removing a key clears the whole cache. The cache is not written to disk, and a daemon restart clears it.
|
|
128
|
+
|
|
129
|
+
Linear errors, such as a rejected key or a rate limit, show in the panel or as a message.
|
|
130
|
+
|
|
131
|
+
## How it works
|
|
132
|
+
|
|
133
|
+
| File | Runtime | Role |
|
|
134
|
+
| --- | --- | --- |
|
|
135
|
+
| `index.client.tsx` | App | Registers the Linear screen, the workspace panel, the Account, Prompts, and Projects settings, the command center items, the `/linear` command, the timeline card, and the composer attachment |
|
|
136
|
+
| `index.server.ts` | Daemon | Registers the settings and the RPC handlers |
|
|
137
|
+
| `client/browser.tsx` | App | Screen and panel: picks the key, then shows the list, the issue, or the agent setup page |
|
|
138
|
+
| `client/issue-list.tsx`, `client/issue-row.tsx`, `client/issue-tree.ts` | App | Search, filters, sort, rows, status groups, and sub-issue nesting |
|
|
139
|
+
| `client/issue-detail.tsx`, `client/issue-sections.tsx`, `client/breadcrumbs.tsx` | App | Issue view: properties, breadcrumbs, sub-issues, links, agents, and comments |
|
|
140
|
+
| `client/markdown.tsx` | App | Renders Markdown |
|
|
141
|
+
| `client/launch.tsx`, `client/launch-fields.tsx`, `client/launch-choices.ts`, `client/launch-plan.ts`, `client/agent-options.ts` | App | Agent setup page, Run in options, and agent start |
|
|
142
|
+
| `client/model-browser.tsx`, `client/provider-icon.tsx` | App | Model picker and provider icons |
|
|
143
|
+
| `client/create-issue.tsx`, `client/pickers.tsx` | App | New issue form and option pickers |
|
|
144
|
+
| `client/connect.tsx`, `client/settings-*.tsx` | App | Key form and settings screens |
|
|
145
|
+
| `client/queries.ts`, `client/store.ts`, `client/key-scope.tsx` | App | Data hooks with saved results, browser state, and the key in use |
|
|
146
|
+
| `client/compat.ts` | App | Registers the screen on Paseo 0.10 and on later releases |
|
|
147
|
+
| `client/timeline-card.tsx`, `client/ui.tsx`, `client/glyphs.tsx` | App | Timeline card, shared controls, and icons |
|
|
148
|
+
| `shared/linear.ts` | Both | RPC contracts and issue schemas |
|
|
149
|
+
| `shared/issues.ts` | Both | The `issues.search` RPC and the composer attachment source |
|
|
150
|
+
| `shared/settings.ts` | Both | Settings schema: templates, agent defaults, and project settings |
|
|
151
|
+
| `shared/prompts.ts` | Both | Default templates and the issue snapshot |
|
|
152
|
+
| `shared/markdown.ts` | Both | Markdown parser |
|
|
153
|
+
| `server/handlers.ts` | Daemon | RPC handlers, key lookup, and cache use |
|
|
154
|
+
| `server/credentials.ts` | Daemon | Key file and key order |
|
|
155
|
+
| `server/cache.ts` | Daemon | Response cache in memory |
|
|
156
|
+
| `server/graphql.ts`, `server/queries.ts` | Daemon | Linear GraphQL client, queries, and changes |
|
|
157
|
+
| `server/linear.ts` | Daemon | Search and snapshot text for the composer attachment |
|
|
158
|
+
|
|
159
|
+
The client bundle holds no credentials and makes no calls to Linear.
|
|
160
|
+
|
|
161
|
+
## Development
|
|
162
|
+
|
|
163
|
+
Use Node.js 24.
|
|
164
|
+
|
|
165
|
+
```sh
|
|
166
|
+
git clone https://github.com/yannelli/paseo-linear-plugin.git
|
|
167
|
+
cd paseo-linear-plugin
|
|
168
|
+
npm ci
|
|
169
|
+
npm run check
|
|
170
|
+
paseo plugin add "$PWD"
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
After you edit the source, run `paseo plugin reload linear`. `npm run check` runs the typecheck and the tests. The tests cover the Linear client, the key file, the cache, the handlers, sub-issue nesting, the Markdown parser, the agent options, and the release scripts. They use a local GraphQL server and do not call Linear.
|
|
174
|
+
|
|
175
|
+
## Graphics
|
|
176
|
+
|
|
177
|
+
`docs/graphics/scene.html` and `scene.css` define the README images, the GitHub social preview, and the icon. Render them into `docs/images` with Playwright and Chromium:
|
|
178
|
+
|
|
179
|
+
```sh
|
|
180
|
+
node docs/graphics/render.mjs
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
The script finds Playwright locally or in the global npm root. Set `PLAYWRIGHT_MODULE` to its entry file to choose another copy. It stops if the fonts do not load, if content leaves the frame or is cut off, or if an image is 900 KB or larger. The fonts are Instrument Sans and JetBrains Mono under the [SIL Open Font License](docs/graphics/fonts/OFL.txt). The line icons follow [Lucide](https://lucide.dev), which uses the ISC License. The mark is original and is not the Linear logo.
|
|
184
|
+
|
|
185
|
+
## Releases
|
|
186
|
+
|
|
187
|
+
GitHub Actions runs the checks and publishes a release on qualifying pushes to `main`. The first release is `v0.1.0`. The workflow updates `package.json` and `package-lock.json`, pushes an annotated tag, and publishes release notes. It then publishes [`@yannelli/paseo-linear-plugin`](https://www.npmjs.com/package/@yannelli/paseo-linear-plugin) to npm through trusted publishing (OIDC), with no npm token. See [npm publishing](docs/npm-publishing.md) for the first-publish steps.
|
|
188
|
+
|
|
189
|
+
Use Conventional Commits in commits and squash-merge titles:
|
|
190
|
+
|
|
191
|
+
| Commit | Version change |
|
|
192
|
+
| --- | --- |
|
|
193
|
+
| `fix:`, `perf:`, `revert:` | Patch |
|
|
194
|
+
| `feat:` | Minor |
|
|
195
|
+
| `!` after the type or scope, or a `BREAKING CHANGE:` footer | Major, including before 1.0 |
|
|
196
|
+
| `docs:`, `chore:`, `ci:`, and other types without a breaking marker | No release |
|
|
197
|
+
|
|
198
|
+
The highest change since the last release sets the next version. For example, `fix: trim identifier queries` changes `0.1.0` to `0.1.1`, and `feat: filter by project` changes it to `0.2.0`.
|
|
199
|
+
|
|
200
|
+
Run `npm run release:dry-run` from a clean `main` checkout with all tags fetched to preview the next release. To complete a GitHub or npm publication that stopped after its tag was pushed, run the **Release** workflow again.
|
|
201
|
+
|
|
202
|
+
## Contributing
|
|
203
|
+
|
|
204
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for setup, checks, commit message rules, and how releases work.
|
|
205
|
+
|
|
206
|
+
## License
|
|
207
|
+
|
|
208
|
+
Apache License 2.0. The plugin started as the Linear example plugin (`plugin-examples/linear`) in [getpaseo/paseo](https://github.com/getpaseo/paseo). See [NOTICE](NOTICE).
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
// Turns the daemon's provider snapshot into Agent, Model, Effort, and Mode choices.
|
|
2
|
+
|
|
3
|
+
export interface Choice {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface ModelChoice extends Choice {
|
|
9
|
+
description: string | null;
|
|
10
|
+
isDefault: boolean;
|
|
11
|
+
efforts: Choice[];
|
|
12
|
+
defaultEffortId: string | null;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface ModeChoice extends Choice {
|
|
16
|
+
icon: string | null;
|
|
17
|
+
colorTier: string | null;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface AgentChoice extends Choice {
|
|
21
|
+
/** SVG markup for custom providers. Built-in providers have none. */
|
|
22
|
+
iconSvg: string | null;
|
|
23
|
+
models: ModelChoice[];
|
|
24
|
+
modes: ModeChoice[];
|
|
25
|
+
defaultModeId: string | null;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
interface ThinkingOption {
|
|
29
|
+
id: string;
|
|
30
|
+
label: string;
|
|
31
|
+
isDefault?: boolean;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
interface SnapshotModel {
|
|
35
|
+
id: string;
|
|
36
|
+
label: string;
|
|
37
|
+
description?: string;
|
|
38
|
+
isDefault?: boolean;
|
|
39
|
+
isSelectable?: boolean;
|
|
40
|
+
thinkingOptions?: readonly ThinkingOption[];
|
|
41
|
+
defaultThinkingOptionId?: string;
|
|
42
|
+
thinkingSet?: number;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
interface SnapshotEntry {
|
|
46
|
+
provider: string;
|
|
47
|
+
label?: string;
|
|
48
|
+
iconSvg?: string;
|
|
49
|
+
status: string;
|
|
50
|
+
enabled?: boolean;
|
|
51
|
+
models?: readonly SnapshotModel[];
|
|
52
|
+
modes?: readonly (Choice & { icon?: string; colorTier?: string })[];
|
|
53
|
+
defaultModeId?: string | null;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface ProviderSnapshot {
|
|
57
|
+
entries: readonly SnapshotEntry[];
|
|
58
|
+
compactSnapshot?: {
|
|
59
|
+
entries: readonly SnapshotEntry[];
|
|
60
|
+
thinkingSets: readonly { options: readonly ThinkingOption[]; defaultOptionId?: string }[];
|
|
61
|
+
} | null;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// App connections get the compact catalog, where a model points into a shared list of efforts.
|
|
65
|
+
export function agentChoices(snapshot: ProviderSnapshot): AgentChoice[] {
|
|
66
|
+
const compact = snapshot.entries.length === 0 ? snapshot.compactSnapshot : null;
|
|
67
|
+
const entries = compact ? compact.entries : snapshot.entries;
|
|
68
|
+
return entries
|
|
69
|
+
.filter((entry) => entry.status === "ready" && entry.enabled !== false)
|
|
70
|
+
.map((entry) => ({
|
|
71
|
+
id: entry.provider,
|
|
72
|
+
label: entry.label ?? entry.provider,
|
|
73
|
+
iconSvg: entry.iconSvg ?? null,
|
|
74
|
+
models: (entry.models ?? [])
|
|
75
|
+
.filter((model) => model.isSelectable !== false)
|
|
76
|
+
.map((model) => {
|
|
77
|
+
const set =
|
|
78
|
+
model.thinkingSet === undefined ? null : compact?.thinkingSets[model.thinkingSet];
|
|
79
|
+
const options = set?.options ?? model.thinkingOptions ?? [];
|
|
80
|
+
const fallback = options.find((option) => option.isDefault)?.id ?? null;
|
|
81
|
+
return {
|
|
82
|
+
id: model.id,
|
|
83
|
+
label: model.label,
|
|
84
|
+
description: model.description ?? null,
|
|
85
|
+
isDefault: model.isDefault === true,
|
|
86
|
+
efforts: options.map(({ id, label }) => ({ id, label })),
|
|
87
|
+
defaultEffortId: model.defaultThinkingOptionId ?? set?.defaultOptionId ?? fallback,
|
|
88
|
+
};
|
|
89
|
+
}),
|
|
90
|
+
modes: (entry.modes ?? []).map(({ id, label, icon, colorTier }) => ({
|
|
91
|
+
id,
|
|
92
|
+
label,
|
|
93
|
+
icon: icon ?? null,
|
|
94
|
+
colorTier: colorTier ?? null,
|
|
95
|
+
})),
|
|
96
|
+
defaultModeId: entry.defaultModeId ?? null,
|
|
97
|
+
}))
|
|
98
|
+
.filter((entry) => entry.models.length > 0);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export interface AgentSelection {
|
|
102
|
+
agent: AgentChoice;
|
|
103
|
+
model: ModelChoice;
|
|
104
|
+
effort: Choice | null;
|
|
105
|
+
mode: ModeChoice | null;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export interface AgentPicks {
|
|
109
|
+
agent: string | null;
|
|
110
|
+
model: string | null;
|
|
111
|
+
effort: string | null;
|
|
112
|
+
mode: string | null;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/** `configured` is the settings default in `provider/model` form. Empty uses the first agent. */
|
|
116
|
+
export function resolveAgent(
|
|
117
|
+
agents: readonly AgentChoice[],
|
|
118
|
+
picks: AgentPicks,
|
|
119
|
+
configured: string,
|
|
120
|
+
): AgentSelection | null {
|
|
121
|
+
const [configuredAgent, ...rest] = configured.split("/");
|
|
122
|
+
const configuredModel = rest.join("/");
|
|
123
|
+
const agent =
|
|
124
|
+
agents.find((entry) => entry.id === picks.agent) ??
|
|
125
|
+
agents.find((entry) => entry.id === configuredAgent) ??
|
|
126
|
+
agents[0];
|
|
127
|
+
if (!agent) return null;
|
|
128
|
+
const preferredModel = agent.id === configuredAgent ? configuredModel : null;
|
|
129
|
+
const model =
|
|
130
|
+
agent.models.find((entry) => entry.id === picks.model) ??
|
|
131
|
+
agent.models.find((entry) => entry.id === preferredModel) ??
|
|
132
|
+
agent.models.find((entry) => entry.isDefault) ??
|
|
133
|
+
agent.models[0];
|
|
134
|
+
if (!model) return null;
|
|
135
|
+
const effort =
|
|
136
|
+
model.efforts.find((entry) => entry.id === picks.effort) ??
|
|
137
|
+
model.efforts.find((entry) => entry.id === model.defaultEffortId) ??
|
|
138
|
+
null;
|
|
139
|
+
const mode =
|
|
140
|
+
agent.modes.find((entry) => entry.id === picks.mode) ??
|
|
141
|
+
agent.modes.find((entry) => entry.id === agent.defaultModeId) ??
|
|
142
|
+
null;
|
|
143
|
+
return { agent, model, effort, mode };
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/** Config for `agents.create`. Ids come from the selection, so they always fit the model. */
|
|
147
|
+
export function agentConfig(selection: AgentSelection) {
|
|
148
|
+
return {
|
|
149
|
+
provider: `${selection.agent.id}/${selection.model.id}`,
|
|
150
|
+
...(selection.effort ? { thinkingOptionId: selection.effort.id } : {}),
|
|
151
|
+
...(selection.mode ? { modeId: selection.mode.id } : {}),
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export interface ModelMatch {
|
|
156
|
+
agent: AgentChoice;
|
|
157
|
+
model: ModelChoice;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/** Models whose name, id, description, or agent name contain every word of the query. */
|
|
161
|
+
export function searchModels(agents: readonly AgentChoice[], query: string): ModelMatch[] {
|
|
162
|
+
const words = query.toLowerCase().split(/\s+/).filter(Boolean);
|
|
163
|
+
if (words.length === 0) return [];
|
|
164
|
+
return agents.flatMap((agent) =>
|
|
165
|
+
agent.models
|
|
166
|
+
.filter((model) => {
|
|
167
|
+
const text = [model.label, model.id, model.description ?? "", agent.label]
|
|
168
|
+
.join(" ")
|
|
169
|
+
.toLowerCase();
|
|
170
|
+
return words.every((word) => text.includes(word));
|
|
171
|
+
})
|
|
172
|
+
.map((model) => ({ agent, model })),
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
const MODE_ICONS = new Set([
|
|
177
|
+
"Bot",
|
|
178
|
+
"Shield",
|
|
179
|
+
"ShieldAlert",
|
|
180
|
+
"ShieldCheck",
|
|
181
|
+
"ShieldEllipsis",
|
|
182
|
+
"ShieldOff",
|
|
183
|
+
"ShieldPlus",
|
|
184
|
+
"ShieldQuestionMark",
|
|
185
|
+
]);
|
|
186
|
+
|
|
187
|
+
/** The Lucide icon Paseo shows for a mode. */
|
|
188
|
+
export function modeIcon(mode: ModeChoice): string {
|
|
189
|
+
const icon = mode.icon ?? "ShieldCheck";
|
|
190
|
+
return MODE_ICONS.has(icon) ? icon : "Bot";
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
function sentenceCase(text: string): string {
|
|
194
|
+
return text.charAt(0).toUpperCase() + text.slice(1).toLowerCase();
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/** Effort and mode names as Paseo writes them, for example "Extra high". */
|
|
198
|
+
export function optionLabel(option: Choice): string {
|
|
199
|
+
return option.id === "xhigh" ? "Extra high" : sentenceCase(option.label);
|
|
200
|
+
}
|