@yannelli/paseo-linear-plugin 1.1.0-beta.2 → 1.1.0-beta.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.
- package/OVERVIEW.md +8 -4
- package/README.md +24 -9
- package/client/graph-camera.tsx +28 -8
- package/client/graph-labels.ts +7 -4
- package/client/live-cursor.tsx +76 -49
- package/client/live-graph.tsx +59 -29
- package/client/live-header.tsx +26 -2
- package/client/live-map.tsx +7 -1
- package/client/live-panel.tsx +9 -2
- package/client/live-timeline.ts +36 -5
- package/client/plugin-icon.tsx +41 -9
- package/client/project-init.tsx +28 -4
- package/client/project-knowledge.tsx +87 -0
- package/client/settings-icon.tsx +57 -8
- package/client/settings-projects.tsx +16 -5
- package/client/web.ts +32 -0
- package/index.client.tsx +134 -79
- package/index.server.ts +5 -2
- package/package.json +1 -1
- package/server/init.ts +31 -7
- package/server/inspect.ts +392 -0
- package/server/knowledge.ts +157 -0
- package/server/live.ts +21 -3
- package/server/stores.ts +1 -1
- package/shared/custom-icon.ts +40 -0
- package/shared/graph-camera.ts +28 -8
- package/shared/graph-geometry.ts +30 -19
- package/shared/knowledge.ts +255 -0
- package/shared/live.ts +19 -3
- package/shared/map-model.ts +50 -2
- package/shared/project-setup.ts +3 -2
package/OVERVIEW.md
CHANGED
|
@@ -27,21 +27,25 @@ Select **Start agent** or **Start review** on an issue. The setup page shows the
|
|
|
27
27
|
|
|
28
28
|
## Linear Live
|
|
29
29
|
|
|
30
|
-
Open **Linear Live** from the Linear pill in an agent's composer. It shows the issue's sub-issues with their statuses and the agent's todos, a map of the files the agent reads and edits, or a graph of those files joined by their imports and links, with the agent gliding to what it works on, the agents it starts, and its latest commands. It works with Claude, Codex, and other providers. The map comes from paths in the ticket text, or, if you choose it in **Settings → Plugins → Linear → Live**, from an explore agent that reads the repository before the agent starts. The implement agent waits for the map. The explore agent uses provider usage. Buttons on the map reload it, build it again with the explore agent, or clear it. On the graph, a button follows the running agents and zooms to their files. You can also zoom with the buttons, the wheel, or a pinch, and lock the view so the page scrolls. Agents in worktrees of the same project show on the map and the graph. Explore and setup agents are told to only read. The plugin starts Claude in Always Ask and answers the permission requests these agents raise: it allows reads and search commands in the project folder and denies the rest. Codex has no read-only mode, so it runs in its default mode, and the plugin answers only the requests Codex raises.
|
|
30
|
+
Open **Linear Live** from the Linear pill in an agent's composer. It shows the issue's sub-issues with their statuses and the agent's todos, a map of the files the agent reads and edits, or a graph of those files joined by their imports and links, with the agent gliding to what it works on, the agents it starts, and its latest commands. It works with Claude, Codex, and other providers. The map comes from paths in the ticket text, or, if you choose it in **Settings → Plugins → Linear → Live**, from an explore agent that reads the repository before the agent starts. The implement agent waits for the map. The explore agent uses provider usage. Buttons on the map reload it, build it again with the explore agent, or clear it. On the graph, a button follows the running agents and zooms to their files. You can also zoom with the buttons, the wheel, or a pinch, and lock the view so the page scrolls. Nodes, labels, and agent cursors grow as you zoom in. Agents in worktrees of the same project show on the map and the graph. Explore and setup agents are told to only read. The plugin starts Claude in Always Ask and answers the permission requests these agents raise: it allows reads and search commands in the project folder and denies the rest. Codex has no read-only mode, so it runs in its default mode, and the plugin answers only the requests Codex raises.
|
|
31
31
|
|
|
32
32
|
On agents not started from an issue, the Linear pill searches Linear and sends an issue to the agent.
|
|
33
33
|
|
|
34
34
|
## Plugin icon
|
|
35
35
|
|
|
36
|
-
In **Settings → Plugins → Linear → Icon**, choose an SVG file or paste SVG markup. Composer pills, the Linear sidebar row, the timeline card, and the Linear screens use it.
|
|
36
|
+
In **Settings → Plugins → Linear → Icon**, choose an SVG file or paste SVG markup. Composer pills, the Linear sidebar row, the timeline card, and the Linear screens use it. Panel tabs, the new tab menu, and Command Center take built-in icons only, so pick one of those for them. Keep the original colors, or paint the icon with the theme color, the theme accent, Linear indigo, or a custom color. **Solid** fills outline shapes. The plugin refuses SVGs with scripts, event handlers, or links to other files. The iOS and Android apps show the built-in icon in the chosen color.
|
|
37
37
|
|
|
38
38
|
## Update Linear from todos
|
|
39
39
|
|
|
40
40
|
Turn on **Update Linear from agent todos** in the Live settings. After each turn, a todo that starts with a sub-issue key, such as `ENG-124: add the queue`, moves that sub-issue to In Progress, and then to Done when all its todos are done. The parent moves to In Review when every sub-issue is done, never to Done. Statuses only move forward.
|
|
41
41
|
|
|
42
|
+
## Project knowledge
|
|
43
|
+
|
|
44
|
+
The daemon keeps a map of each project's files without an agent: its folders, services, packages, languages, commands, and guide files. Explore and setup agents start from it. Ticket-text maps use it to match short paths to real files and to put a named service on the map. When an agent works off the map, Linear Live shows the service or folder it is in. See it, or inspect again, under **Project knowledge** in **Projects**.
|
|
45
|
+
|
|
42
46
|
## Set up project prompts
|
|
43
47
|
|
|
44
|
-
In **Projects**, select **Start** under **Set up with an agent**. An agent reads the repository's guidelines, scripts, and CI files and proposes project instructions, steps, and prompt additions. You accept each change before it is saved.
|
|
48
|
+
In **Projects**, select **Start** under **Set up with an agent**. An agent reads the repository's guidelines, scripts, and CI files and proposes project instructions, steps, and prompt additions. You accept each change before it is saved. **Open agent** shows the agent while it works, and the lines it writes about the project and its areas go into the project knowledge.
|
|
45
49
|
|
|
46
50
|
## Choose projects
|
|
47
51
|
|
|
@@ -53,4 +57,4 @@ Choose **Attach Linear issue** in the composer attachment menu. The agent gets t
|
|
|
53
57
|
|
|
54
58
|
## Data and permissions
|
|
55
59
|
|
|
56
|
-
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. Explore and setup agents read project files and send them to your agent provider. The daemon saves explore maps, and agents that wait for a map, beside the key file, and Linear Live lists and reads files only inside the agent's folder. For Claude agents, the daemon also reads the subagent transcripts Claude saves for the session, to show what each subagent does. With agent guidance on, it writes Claude Code hooks with the issue keys and titles beside the key file, and it serves the Linear tools on 127.0.0.1 with a token for each agent. Each token reaches only its issue and that issue's sub-issues. With todo sync on, the daemon changes issue statuses in Linear. 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.
|
|
60
|
+
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. Explore and setup agents read project files and send them to your agent provider. The daemon saves explore maps, project knowledge, and agents that wait for a map, beside the key file, and Linear Live lists and reads files only inside the agent's folder. For Claude agents, the daemon also reads the subagent transcripts Claude saves for the session, to show what each subagent does. With agent guidance on, it writes Claude Code hooks with the issue keys and titles beside the key file, and it serves the Linear tools on 127.0.0.1 with a token for each agent. Each token reaches only its issue and that issue's sub-issues. With todo sync on, the daemon changes issue statuses in Linear. 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
|
@@ -156,16 +156,16 @@ The **Linear** screen in the sidebar is not tied to a project, so it stays avail
|
|
|
156
156
|
Linear Live is an agent panel. Open it from the Linear pill, or with **Linear: Open Linear Live** in the command center while an agent is open. It works for agents started from an issue, with Claude, Codex, and other providers.
|
|
157
157
|
|
|
158
158
|
- **Sub-issues:** each sub-issue shows its Linear status and the agent's todo progress. The todos of the current sub-issue show under it. Select a sub-issue to show only its files on the map. Hide the issues column with the button on the **Issue** card to give the map or the graph the full width. The column becomes a strip with the status of each issue. Select an issue there to show only its files.
|
|
159
|
-
- **Map:** files are grouped by folder. The map marks the files the agent read, edited, or created, and the file it is on now. Files the agent touched but the map did not predict have a dashed border. A folder the agent listed or searched gets a solid border, and its header shows how many of its files the agent touched. Reads through the shell count too: `cat`, `sed -n`, `head`, `grep`, `rg`, `ls`, `find`, `git show`, and redirects to files.
|
|
160
|
-
- **Graph:** the files and the links between them. A line joins two files when one imports the other, a Markdown or style file links to the other, `package.json` names it, or the text of one names the path of the other. This works for TypeScript and JavaScript (with `tsconfig` paths and workspace packages), Python, Go, Rust, Ruby, CSS and Sass, Markdown, HTML, and config files. Files of one folder sit together under the folder name and take the color of their sub-issue. The issue is in the center, with its sub-issues joined to the files the map gives them. The agent hovers over what it works on: the file it reads or edits, or the sub-issue whose todo it just started. When the work moves, it glides along the links to the next node, and the lines at that node take its color. New files join without moving the rest. Agents that this agent started get their own cursor when they work in the same folder or in a worktree of the same project. An agent with no file activity yet hovers over the sub-issue whose key starts its title. Running subagents circle the agent that started them. Select a sub-issue to show only its files. Select any node to see what it is
|
|
161
|
-
- **Graph view:** the icon buttons at the top right of the graph move the view. **Follow the running agents** zooms to the nodes the running agents work on and the files next to them, and moves with the agents. **Show the whole graph** zooms out. **Zoom out** and **Zoom in** change the zoom in steps. Scroll to zoom at the pointer, drag to move when zoomed in, or pinch on a touch screen. Each of these stops following. The lock button lets the wheel and drags scroll the page instead. Nodes, lines, and
|
|
159
|
+
- **Map:** files are grouped by folder. The map marks the files the agent read, edited, or created, and the file it is on now. Files the agent touched but the map did not predict have a dashed border. A folder the agent listed or searched gets a solid border, and its header shows how many of its files the agent touched. The header also names the service, package, or main folder the folder is in, from the [project knowledge](#project-knowledge). When the agent touches files the map did not predict, the line under the map tells where they are, such as `Off the map: billing-api · service (2), docs (1)`, and the **Now** line in the header shows **Off the map** with the place of the current file. Reads through the shell count too: `cat`, `sed -n`, `head`, `grep`, `rg`, `ls`, `find`, `git show`, and redirects to files.
|
|
160
|
+
- **Graph:** the files and the links between them. A line joins two files when one imports the other, a Markdown or style file links to the other, `package.json` names it, or the text of one names the path of the other. This works for TypeScript and JavaScript (with `tsconfig` paths and workspace packages), Python, Go, Rust, Ruby, CSS and Sass, Markdown, HTML, and config files. Files of one folder sit together under the folder name and take the color of their sub-issue. The issue is in the center, with its sub-issues joined to the files the map gives them. The agent hovers over what it works on: the file it reads or edits, or the sub-issue whose todo it just started. When the work moves, it glides along the links to the next node, and the lines at that node take its color. New files join without moving the rest. Agents that this agent started get their own cursor when they work in the same folder or in a worktree of the same project. An agent with no file activity yet hovers over the sub-issue whose key starts its title. Running subagents circle the agent that started them. Select a sub-issue to show only its files. Select any node to see what it is, how many files it links to, and for an off-map file, the service or folder it is in. Switch between **Map** and **Graph** on the card, or set the default in **Show files as** in the Live settings.
|
|
161
|
+
- **Graph view:** the icon buttons at the top right of the graph move the view. **Follow the running agents** zooms to the nodes the running agents work on and the files next to them, centers on the agents as far as those files stay in view, and moves with the agents. **Show the whole graph** zooms out. **Zoom out** and **Zoom in** change the zoom in steps. Scroll to zoom at the pointer, drag to move when zoomed in, or pinch on a touch screen. Each of these stops following. The lock button lets the wheel and drags scroll the page instead. Nodes, lines, labels, and agent cursors grow with the square root of the zoom, so at 4x zoom they are twice their size, and more file names show when there is room. Labels stay clear of the buttons, and an agent's caption moves to its left side near the right edge. The graph keeps your follow and lock choices.
|
|
162
162
|
- **Agents:** the agents that work under this agent. Paseo agents that this agent started show their status, their files, and their own markers on the map when they work in the same folder or in a worktree of the same project. Select one to open it. Subagents that run inside the provider, such as Claude's Agent tool, show their type, description, and status. For Claude, the daemon reads each subagent's transcript, also for subagents that run in the background, so a subagent shows what it does now, gets its own cursor, and adds its files to the map. Other providers do not send subagent file reads, so the map shows only the files named in the subagent's prompt.
|
|
163
163
|
- **Activity:** the latest reads, edits, searches, and commands, with line counts and exit codes.
|
|
164
164
|
|
|
165
165
|
The map comes from one of two sources. Choose it in **Settings → Plugins → Linear → Live**:
|
|
166
166
|
|
|
167
|
-
- **Ticket text** (the default) finds file and folder paths in the issue title, description, and sub-issue titles. It costs nothing, but it finds only paths the issue names. Linear sends sub-issue titles but not their descriptions.
|
|
168
|
-
- **Explore agent** maps the files first when you start an implement agent. It reads the repository and lists the files for each sub-issue. The implement agent starts when the map is ready, or with the ticket-text map if exploring fails. A saved map is used again, so each issue is explored once. The plugin archives the explore agent when it finishes. Choose its model and effort in the Live settings. A faster, cheaper model, such as Haiku, is usually enough. It lists up to 150 files.
|
|
167
|
+
- **Ticket text** (the default) finds file and folder paths in the issue title, description, and sub-issue titles. It costs nothing, but it finds only paths the issue names. Linear sends sub-issue titles but not their descriptions. With project knowledge, a short path such as `queries.ts` becomes the one project file that ends with it, and a service or package that the text names, such as `billing-api` or "the billing service", puts its folder on the map. A plain folder counts only when the text calls it a folder, such as "the docs folder".
|
|
168
|
+
- **Explore agent** maps the files first when you start an implement agent. It starts from the project map in the project knowledge, reads the repository, and lists the files for each sub-issue. The implement agent starts when the map is ready, or with the ticket-text map if exploring fails. A saved map is used again, so each issue is explored once. The plugin archives the explore agent when it finishes. Choose its model and effort in the Live settings. A faster, cheaper model, such as Haiku, is usually enough. It lists up to 150 files.
|
|
169
169
|
|
|
170
170
|
The buttons on the map card control the saved map. **Read files and links again** reloads the map, the folder lists, and the links. **Build** or **Rebuild the map with the explore agent** starts an explore run now and replaces the saved map when it finishes. **Clear the saved map** deletes it, so the map uses the ticket text until the next explore run. You cannot clear a map while an explore run makes it.
|
|
171
171
|
|
|
@@ -181,10 +181,11 @@ Each agent's composer has a **Linear** pill. On an agent started from an issue,
|
|
|
181
181
|
|
|
182
182
|
### Plugin icon
|
|
183
183
|
|
|
184
|
-
In **Settings → Plugins → Linear → Icon**, choose an SVG file or paste SVG markup. Composer pills, the Linear sidebar row on Paseo 0.11 and newer, the issue card in the timeline, and the Linear screens then use it.
|
|
184
|
+
In **Settings → Plugins → Linear → Icon**, choose an SVG file or paste SVG markup. Composer pills, the Linear sidebar row on Paseo 0.11 and newer, the issue card in the timeline, and the Linear screens then use it. The plugin accepts SVG only. It refuses scripts, event handlers, HTML content, entities, and links to other files or bitmap images. The SVG needs a viewBox, or a width and height in pixels.
|
|
185
185
|
|
|
186
186
|
- **Color:** **Original colors** keeps the SVG as drawn, and `currentColor` takes the color Paseo gives the icon. **Theme color**, **Theme accent**, **Linear indigo**, and **Custom color** paint the whole icon one color and keep its transparency. These choices also apply to the built-in icon.
|
|
187
187
|
- **Solid:** fills shapes that only have an outline, with their stroke color, so a line icon shows as a solid shape.
|
|
188
|
+
- **Built-in icon:** Paseo draws panel tabs, the new tab menu, and Command Center with built-in Lucide icons only, so your SVG cannot show there. Pick the built-in icon for those places, such as Rocket or Target. Without an SVG, every place uses it. Tabs that are open change when you reload Paseo or open them again. The web app keeps the choice on the device, so the tabs get it as Paseo starts.
|
|
188
189
|
|
|
189
190
|
The preview shows each change before you save. The iOS and Android apps cannot draw SVG images from plugins, so they show the built-in icon in the chosen color.
|
|
190
191
|
|
|
@@ -199,9 +200,20 @@ Turn on **Update Linear from agent todos** in the Live settings. After each turn
|
|
|
199
200
|
|
|
200
201
|
The daemon reads the issue from Linear before each sync, so a status you changed by hand counts. **Sync now** in the pill runs the same check at once.
|
|
201
202
|
|
|
203
|
+
### Project knowledge
|
|
204
|
+
|
|
205
|
+
The daemon keeps a map of each project's files, so explore and setup agents, ticket-text maps, and Linear Live know the project before an agent reads it. No agent runs for it, and it costs no provider usage. The daemon makes it the first time a project needs it: when you open the project in **Settings → Plugins → Linear → Projects**, open Linear Live for one of its agents, or start an explore or setup run. It makes it again when it is 6 hours old, and **Inspect again** under **Project knowledge** makes it at once.
|
|
206
|
+
|
|
207
|
+
- **Files:** the files git tracks or would track, without ignored files. Outside a git repository, the daemon walks the folder and skips folders such as `node_modules`, `dist`, and `.git`. It keeps up to 20,000 paths, the shallow ones first.
|
|
208
|
+
- **Areas:** services, packages, and main folders. A folder with a manifest such as `package.json`, `go.mod`, `Cargo.toml`, `pyproject.toml`, or a `.csproj` file is a package, named by the manifest. A folder with a `Dockerfile`, `Procfile`, `fly.toml`, or a similar file, a folder that a compose file builds, and a package under a folder such as `apps/` or `services/` is a service. Each top folder is an area too, and so is each subfolder of a top folder that holds 40% or more of the files. Folder names give a role, such as backend, frontend, tests, or docs. Manifests in fixture, example, and template folders do not count.
|
|
209
|
+
- **Languages, commands, and guides:** file counts by language, the root package scripts and Makefile targets, and files that guide agents, such as `AGENTS.md`, `CLAUDE.md`, the README, CONTRIBUTING, and CI workflows.
|
|
210
|
+
- **Summaries:** the setup agent adds one line about the project and one line about each area. They stay when the daemon makes the map again.
|
|
211
|
+
|
|
212
|
+
The **Project knowledge** section in the Projects settings shows what the daemon found.
|
|
213
|
+
|
|
202
214
|
### Set up project prompts with an agent
|
|
203
215
|
|
|
204
|
-
In **Settings → Plugins → Linear → Projects**, select **Start** under **Set up with an agent**.
|
|
216
|
+
In **Settings → Plugins → Linear → Projects**, select **Start** under **Set up with an agent**. The daemon makes the project knowledge again first, and the agent starts from that project map. While it runs, **Open agent** opens the setup agent so you can watch it. The agent reads the project's AGENTS.md, CLAUDE.md, CONTRIBUTING, README, scripts, and CI files. It then proposes project instructions, steps, and text to add to the Implement and Review prompts. Each change shows the current and proposed text. Turn off the ones you do not want, select **Use accepted changes**, and then save. Nothing changes until you save. The agent also describes the project and each area, and the daemon saves those lines to the project knowledge at once.
|
|
205
217
|
|
|
206
218
|
## Data and permissions
|
|
207
219
|
|
|
@@ -209,10 +221,11 @@ In **Settings → Plugins → Linear → Projects**, select **Start** under **Se
|
|
|
209
221
|
- **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.
|
|
210
222
|
- **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.
|
|
211
223
|
- **Linear Live and setup agents:** the explore agent gets the issue snapshot without comments, and both agents read files in the project. Your agent provider gets what they read. The map of an explore run is saved in `live-maps.json` beside the key file, for up to 200 issues. An agent that waits for a map is saved in `pending-launches.json` there until it starts. Linear Live lists files only in the folders it shows, and reads the files on the graph to find their links, inside the agent's own folder. It does not follow links that lead outside that folder. For a Claude agent with subagents, the daemon reads the tool calls in the subagent transcripts that Claude saves for that session. It sends the app only the tool names, file paths, and commands, never file text.
|
|
224
|
+
- **Project knowledge:** the daemon lists the files of a Paseo project with `git ls-files`, or by walking the folder, and reads small manifest files (up to 256 KB) inside the project folder. It does not follow links that lead outside the folder. It saves file paths, manifest names, script names, and summaries in `knowledge/` beside the key file, one file per project. The app gets the areas, counts, commands, and guides, never the file list. Explore and setup prompts hold the project map: folder names with file counts, areas, commands, and guide file names. Your agent provider gets that text.
|
|
212
225
|
- **Linear tools for agents:** the daemon runs the `linear` MCP server on `127.0.0.1` only, and only after an agent gets it. Each agent gets its own random token, and its tools reach only its issue and that issue's sub-issues. Edits use the Linear key of the project that loaded the issue. Requests from a web page are refused. `agent-tools.json` beside the key file keeps the port and a hash of each token, so agents keep their tools after a restart. The token itself is in the agent's Paseo config.
|
|
213
226
|
- **Claude hooks:** when an **Agent guidance** switch is on for a Claude agent, the daemon writes a Claude Code plugin to `claude-hooks/` beside the key file, one folder for each issue and set of hooks. It holds the issue key and title and the sub-issue keys and titles. The agent starts with `--plugin-dir` set to that folder. The hooks print that text and run no other command. The daemon does not write hooks on Windows hosts.
|
|
214
227
|
- **Todo sync:** when it is on, the daemon changes issue statuses in Linear with the key of the project that loaded the issue.
|
|
215
|
-
- **Plugin icon:** the SVG is saved in the plugin settings on the daemon host. The app draws it as an image, which does not run scripts or load other files.
|
|
228
|
+
- **Plugin icon:** the SVG is saved in the plugin settings on the daemon host. The app draws it as an image, which does not run scripts or load other files. The web app keeps the name of the built-in icon in its local storage.
|
|
216
229
|
- **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.
|
|
217
230
|
|
|
218
231
|
Linear errors, such as a rejected key or a rate limit, show in the panel or as a message.
|
|
@@ -240,7 +253,7 @@ Linear errors, such as a rejected key or a rate limit, show in the panel or as a
|
|
|
240
253
|
| `client/live-map.tsx`, `client/live-graph.tsx`, `client/graph-labels.ts`, `client/graph-camera.tsx`, `client/live-cursor.tsx`, `client/live-agents.tsx` | App | File map, file graph with its labels and camera, agent cursors, and the agents list |
|
|
241
254
|
| `client/tool-buttons.tsx`, `client/web.ts` | App | Icon buttons for the map and graph, and the wheel listener and file picker on the web |
|
|
242
255
|
| `client/pill.tsx` | App | Linear pill in each agent's composer |
|
|
243
|
-
| `client/project-init.tsx` | App | Project setup proposal in the Projects settings |
|
|
256
|
+
| `client/project-init.tsx`, `client/project-knowledge.tsx` | App | Project setup proposal and the Project knowledge section in the Projects settings |
|
|
244
257
|
| `shared/linear.ts` | Both | RPC contracts and issue schemas |
|
|
245
258
|
| `shared/issues.ts` | Both | The `issues.search` RPC and the composer attachment source |
|
|
246
259
|
| `shared/settings.ts` | Both | Settings schema: templates, agent defaults, and project settings |
|
|
@@ -252,6 +265,7 @@ Linear errors, such as a rejected key or a rate limit, show in the panel or as a
|
|
|
252
265
|
| `shared/agent-hooks.ts`, `server/agent-hooks.ts` | Both, Daemon | Claude Code hooks for agent guidance, and the plugin folder the daemon writes |
|
|
253
266
|
| `shared/agent-tools.ts`, `server/agent-tools.ts`, `server/mcp-http.ts` | Both, Daemon | The `linear` MCP server: its tools, tokens, and HTTP transport |
|
|
254
267
|
| `shared/todo-sync.ts`, `shared/project-setup.ts` | Both | Todo keys, status moves, and setup proposals |
|
|
268
|
+
| `shared/knowledge.ts` | Both | Project knowledge contracts, areas and their labels, the project map for prompts, and ticket path matching |
|
|
255
269
|
| `server/handlers.ts` | Daemon | RPC handlers, key lookup, and cache use |
|
|
256
270
|
| `server/credentials.ts` | Daemon | Key file and key order |
|
|
257
271
|
| `server/cache.ts` | Daemon | Response cache in memory |
|
|
@@ -259,6 +273,7 @@ Linear errors, such as a rejected key or a rate limit, show in the panel or as a
|
|
|
259
273
|
| `server/linear.ts` | Daemon | Search and snapshot text for the composer attachment |
|
|
260
274
|
| `server/live.ts`, `server/links.ts`, `server/subagent-logs.ts`, `server/agent-runs.ts` | Daemon | File listing, links between files, subagent transcripts, explore runs, and the saved maps |
|
|
261
275
|
| `server/sync.ts`, `server/init.ts` | Daemon | Todo sync after each turn, and project setup runs |
|
|
276
|
+
| `server/inspect.ts`, `server/knowledge.ts` | Daemon | Project inspection without an agent, and the saved project knowledge |
|
|
262
277
|
|
|
263
278
|
The client bundle holds no credentials and makes no calls to Linear.
|
|
264
279
|
|
package/client/graph-camera.tsx
CHANGED
|
@@ -1,19 +1,30 @@
|
|
|
1
1
|
import { type RefObject, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
2
2
|
import { Animated, Easing, type GestureResponderHandlers, PanResponder, View } from "react-native";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
type Box,
|
|
5
|
+
type Camera,
|
|
6
|
+
clampCamera,
|
|
7
|
+
FIT,
|
|
8
|
+
type Focus,
|
|
9
|
+
frameBox,
|
|
10
|
+
growth,
|
|
11
|
+
MAX_ZOOM,
|
|
12
|
+
MIN_ZOOM,
|
|
13
|
+
zoomAt,
|
|
14
|
+
} from "../shared/graph-camera";
|
|
4
15
|
import { NATIVE_DRIVER } from "./live-timeline";
|
|
5
16
|
import { ToolButton, ToolGroup } from "./tool-buttons";
|
|
6
17
|
import type { Theme } from "./ui";
|
|
7
18
|
import { listenWheel } from "./web";
|
|
8
19
|
|
|
9
20
|
// Animated values move the graph canvas, so a wheel or a drag never renders the graph again.
|
|
10
|
-
// Nodes, edges, and cursors scale
|
|
21
|
+
// Nodes, edges, labels, and cursors scale back part of the zoom, so they grow less than it.
|
|
11
22
|
|
|
12
23
|
export interface CameraOptions {
|
|
13
24
|
width: number;
|
|
14
25
|
height: number;
|
|
15
26
|
/** Where auto mode looks; null shows the whole graph. */
|
|
16
|
-
focus: Box | null;
|
|
27
|
+
focus: Box | Focus | null;
|
|
17
28
|
auto: boolean;
|
|
18
29
|
/** Wheel and drag move the page, not the camera. */
|
|
19
30
|
locked: boolean;
|
|
@@ -28,8 +39,8 @@ export interface CameraControl {
|
|
|
28
39
|
ref: RefObject<View | null>;
|
|
29
40
|
handlers: GestureResponderHandlers;
|
|
30
41
|
transform: [{ translateX: Animated.Value }, { translateY: Animated.Value }, { scale: Animated.Value }];
|
|
31
|
-
/**
|
|
32
|
-
|
|
42
|
+
/** The scale of canvas items, so they draw at growth(zoom) times their size on screen. */
|
|
43
|
+
itemScale: Animated.AnimatedInterpolation<number>;
|
|
33
44
|
limit: ZoomLimit;
|
|
34
45
|
/** The camera once it stops moving; labels are placed for it. */
|
|
35
46
|
settled: Camera;
|
|
@@ -40,6 +51,8 @@ export interface CameraControl {
|
|
|
40
51
|
const ZOOM_STEP = 1.5;
|
|
41
52
|
const DRAG_START = 6;
|
|
42
53
|
const SETTLE_MS = 160;
|
|
54
|
+
/** Zooms where the item scale is exact; it is linear between them. */
|
|
55
|
+
const ZOOM_SAMPLES = [1, 1.25, 1.5, 1.75, 2, 2.5, 3, 3.5, 4];
|
|
43
56
|
|
|
44
57
|
type Touch = { pageX: number; pageY: number };
|
|
45
58
|
const spreadOf = (touches: readonly Touch[]) => {
|
|
@@ -49,7 +62,13 @@ const spreadOf = (touches: readonly Touch[]) => {
|
|
|
49
62
|
|
|
50
63
|
export function useGraphCamera(options: CameraOptions): CameraControl {
|
|
51
64
|
const [values] = useState(() => ({ x: new Animated.Value(0), y: new Animated.Value(0), zoom: new Animated.Value(1) }));
|
|
52
|
-
const [
|
|
65
|
+
const [itemScale] = useState(() =>
|
|
66
|
+
values.zoom.interpolate({
|
|
67
|
+
inputRange: ZOOM_SAMPLES,
|
|
68
|
+
outputRange: ZOOM_SAMPLES.map((zoom) => growth(zoom) / zoom),
|
|
69
|
+
extrapolate: "clamp",
|
|
70
|
+
}),
|
|
71
|
+
);
|
|
53
72
|
const [limit, setLimit] = useState<ZoomLimit>("min");
|
|
54
73
|
const [settled, setSettled] = useState<Camera>(FIT);
|
|
55
74
|
const pause = useRef<ReturnType<typeof setTimeout> | null>(null);
|
|
@@ -99,7 +118,8 @@ export function useGraphCamera(options: CameraOptions): CameraControl {
|
|
|
99
118
|
);
|
|
100
119
|
|
|
101
120
|
const { width, height, auto, locked, focus } = options;
|
|
102
|
-
const
|
|
121
|
+
const center = focus && "center" in focus ? [focus.center.x, focus.center.y] : [];
|
|
122
|
+
const focusKey = focus ? [focus.left, focus.top, focus.right, focus.bottom, ...center].map(Math.round).join(",") : "";
|
|
103
123
|
useEffect(() => {
|
|
104
124
|
if (width === 0 || !auto) return;
|
|
105
125
|
const box = latest.current.focus;
|
|
@@ -168,7 +188,7 @@ export function useGraphCamera(options: CameraOptions): CameraControl {
|
|
|
168
188
|
[move],
|
|
169
189
|
);
|
|
170
190
|
const fit = useCallback(() => move(FIT, true), [move]);
|
|
171
|
-
return { ref, handlers, transform,
|
|
191
|
+
return { ref, handlers, transform, itemScale, limit, settled, zoomBy, fit };
|
|
172
192
|
}
|
|
173
193
|
|
|
174
194
|
export function CameraButtons(props: {
|
package/client/graph-labels.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type LabelRequest, labelBox, labelSides, type Placed, type Point, placeLabels } from "../shared/graph-geometry";
|
|
1
|
+
import { type LabelRequest, labelBox, labelSides, type Placed, type Point, placeLabels, type Rect } from "../shared/graph-geometry";
|
|
2
2
|
import { folderCenters, type Graph, type GraphNode } from "../shared/graph-model";
|
|
3
3
|
import type { IssueDetail } from "../shared/linear";
|
|
4
4
|
import { todoStatus } from "../shared/todo-sync";
|
|
@@ -52,6 +52,8 @@ export interface LabelInput {
|
|
|
52
52
|
height: number;
|
|
53
53
|
/** Zoomed in, so files no agent touched get labels too when they fit. */
|
|
54
54
|
every?: boolean;
|
|
55
|
+
/** Areas covered by controls, such as the camera buttons. */
|
|
56
|
+
blocked?: readonly Rect[];
|
|
55
57
|
}
|
|
56
58
|
|
|
57
59
|
function linesOf(node: GraphNode, input: LabelInput): readonly [string, string | null] {
|
|
@@ -114,10 +116,11 @@ export function graphLabels(input: LabelInput): { nodes: Map<string, Label>; fol
|
|
|
114
116
|
requests.push({ id, width, height: 14, spots: [{ left: center.x - width / 2, top: center.top - 30 }, { left: center.x - width / 2, top: center.y - 7 }] });
|
|
115
117
|
}
|
|
116
118
|
for (const node of wanted.filter((entry) => order(entry) > 2)) push(node);
|
|
117
|
-
const shapes: { at: Point; radius: number }[] =
|
|
119
|
+
const shapes: ({ at: Point; radius: number } | Rect)[] = [...(input.blocked ?? [])];
|
|
120
|
+
for (const node of graph.nodes) {
|
|
118
121
|
const at = positions.get(node.id);
|
|
119
|
-
|
|
120
|
-
}
|
|
122
|
+
if (at) shapes.push({ at, radius: nodeSize(node) / 2 });
|
|
123
|
+
}
|
|
121
124
|
// Keep labels out from under the agents and their captions, as a row of small circles.
|
|
122
125
|
for (const cursor of input.cursors) {
|
|
123
126
|
shapes.push({ at: cursor.at, radius: 16 });
|
package/client/live-cursor.tsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Icon } from "@getpaseo/plugin/client/react-native";
|
|
2
2
|
import { memo, useEffect, useMemo, useRef, useState } from "react";
|
|
3
3
|
import { Animated, Easing, Text, View } from "react-native";
|
|
4
|
+
import { type Camera, growth, project } from "../shared/graph-camera";
|
|
4
5
|
import { type Point, pointAt, type Route, route } from "../shared/graph-geometry";
|
|
5
6
|
import { type Graph, graphPath } from "../shared/graph-model";
|
|
6
7
|
import type { CursorAgent } from "./live-agents";
|
|
@@ -13,12 +14,23 @@ import type { Theme } from "./ui";
|
|
|
13
14
|
|
|
14
15
|
type Coordinate = number | Animated.Value | Animated.AnimatedInterpolation<number>;
|
|
15
16
|
|
|
17
|
+
/** A node's middle on the canvas, and the pin's offset from it, which grows with the node. */
|
|
18
|
+
export interface Hover extends Point {
|
|
19
|
+
dx: number;
|
|
20
|
+
dy: number;
|
|
21
|
+
}
|
|
22
|
+
|
|
16
23
|
interface Motion {
|
|
17
24
|
x: Coordinate;
|
|
18
25
|
y: Coordinate;
|
|
26
|
+
dx: Coordinate;
|
|
27
|
+
dy: Coordinate;
|
|
19
28
|
}
|
|
20
29
|
|
|
21
30
|
const BADGE = 26;
|
|
31
|
+
/** The pin runs from the badge top to the pointer tip; the pulse rings its middle. */
|
|
32
|
+
const PIN_MIDDLE = 3;
|
|
33
|
+
const RING = 34;
|
|
22
34
|
export const CAPTION_ROOM = 210;
|
|
23
35
|
const MAX_SATELLITES = 3;
|
|
24
36
|
|
|
@@ -26,6 +38,12 @@ function glideTime(length: number): number {
|
|
|
26
38
|
return Math.min(1200, Math.max(420, 380 + length * 0.8));
|
|
27
39
|
}
|
|
28
40
|
|
|
41
|
+
/** The caption goes left when it would run past the right edge of the view. */
|
|
42
|
+
export function captionFlips(at: Hover, view: Camera, width: number, height: number): boolean {
|
|
43
|
+
const grow = growth(view.zoom);
|
|
44
|
+
return project(view, at, width, height).x + at.dx * grow > width - CAPTION_ROOM * grow;
|
|
45
|
+
}
|
|
46
|
+
|
|
29
47
|
export interface CursorProps {
|
|
30
48
|
theme: Theme;
|
|
31
49
|
agent: CursorAgent;
|
|
@@ -35,11 +53,13 @@ export interface CursorProps {
|
|
|
35
53
|
/** Changes when node positions change. */
|
|
36
54
|
layoutKey: string;
|
|
37
55
|
/** Where the cursor hovers over a node. */
|
|
38
|
-
hover(id: string):
|
|
39
|
-
/** Canvas
|
|
56
|
+
hover(id: string): Hover | null;
|
|
57
|
+
/** Canvas size and the settled camera, to keep the caption inside the view. */
|
|
40
58
|
width: number;
|
|
41
|
-
|
|
42
|
-
|
|
59
|
+
height: number;
|
|
60
|
+
view: Camera;
|
|
61
|
+
/** The camera's item scale, so the cursor grows as nodes do. */
|
|
62
|
+
itemScale: Animated.AnimatedInterpolation<number>;
|
|
43
63
|
reduce: boolean;
|
|
44
64
|
}
|
|
45
65
|
|
|
@@ -50,31 +70,31 @@ export const AgentCursor = memo(function AgentCursor(props: CursorProps) {
|
|
|
50
70
|
const [halo] = useState(() => new Animated.Value(0));
|
|
51
71
|
const [spin] = useState(() => new Animated.Value(0));
|
|
52
72
|
const [motion, setMotion] = useState<Motion | null>(null);
|
|
53
|
-
const [
|
|
73
|
+
const [landed, setLanded] = useState<Hover | null>(null);
|
|
54
74
|
const latest = useRef(props);
|
|
55
75
|
latest.current = props;
|
|
56
76
|
// Each glide gets its own value, so binding a new route never jumps to the old start.
|
|
57
|
-
const active = useRef<{ value: Animated.Value; path: Route
|
|
77
|
+
const active = useRef<{ value: Animated.Value; path: Route<Hover>; layoutKey: string } | null>(null);
|
|
58
78
|
const state = useRef({
|
|
59
79
|
at: null as string | null,
|
|
60
|
-
point: null as
|
|
80
|
+
point: null as Hover | null,
|
|
61
81
|
moving: false,
|
|
62
82
|
pending: null as string | null,
|
|
63
83
|
});
|
|
64
84
|
|
|
65
85
|
// These read only refs, so the animation callbacks never see stale props.
|
|
66
|
-
const land = (point:
|
|
86
|
+
const land = (point: Hover) => {
|
|
67
87
|
state.current.point = point;
|
|
68
|
-
|
|
88
|
+
setLanded(point);
|
|
69
89
|
};
|
|
70
90
|
const rest = (id: string) => {
|
|
71
91
|
state.current.at = id;
|
|
72
92
|
const point = latest.current.hover(id);
|
|
73
93
|
if (!point) return;
|
|
74
94
|
land(point);
|
|
75
|
-
setMotion({ x: point.x, y: point.y });
|
|
95
|
+
setMotion({ x: point.x, y: point.y, dx: point.dx, dy: point.dy });
|
|
76
96
|
};
|
|
77
|
-
const glide = (points:
|
|
97
|
+
const glide = (points: Hover[], to: string) => {
|
|
78
98
|
const path = route(points);
|
|
79
99
|
if (latest.current.reduce || !path) {
|
|
80
100
|
state.current.moving = false;
|
|
@@ -85,11 +105,10 @@ export const AgentCursor = memo(function AgentCursor(props: CursorProps) {
|
|
|
85
105
|
const value = new Animated.Value(0);
|
|
86
106
|
active.current = { value, path, layoutKey: latest.current.layoutKey };
|
|
87
107
|
state.current.moving = true;
|
|
88
|
-
land(path.points[path.points.length - 1] as
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
});
|
|
108
|
+
land(path.points[path.points.length - 1] as Hover);
|
|
109
|
+
const along = (pick: (point: Hover) => number) =>
|
|
110
|
+
value.interpolate({ inputRange: path.stops, outputRange: path.points.map(pick) });
|
|
111
|
+
setMotion({ x: along((point) => point.x), y: along((point) => point.y), dx: along((point) => point.dx), dy: along((point) => point.dy) });
|
|
93
112
|
Animated.timing(value, {
|
|
94
113
|
toValue: 1,
|
|
95
114
|
duration: glideTime(path.length),
|
|
@@ -135,7 +154,7 @@ export const AgentCursor = memo(function AgentCursor(props: CursorProps) {
|
|
|
135
154
|
if (glideNow.layoutKey === props.layoutKey) return;
|
|
136
155
|
current.pending = null;
|
|
137
156
|
glideNow.value.stopAnimation((share) => glide([pointAt(glideNow.path, share), end], goal));
|
|
138
|
-
} else if (current.point &&
|
|
157
|
+
} else if (current.point && ["x", "y", "dx", "dy"].some((key) => current.point?.[key as keyof Hover] !== end[key as keyof Hover])) {
|
|
139
158
|
glide([current.point, end], goal);
|
|
140
159
|
}
|
|
141
160
|
}, [props.layoutKey]);
|
|
@@ -178,6 +197,11 @@ export const AgentCursor = memo(function AgentCursor(props: CursorProps) {
|
|
|
178
197
|
}, [satellites, reduce, spin]);
|
|
179
198
|
|
|
180
199
|
const caption = agent.caption ?? (agent.kind === "child" ? agent.label : null);
|
|
200
|
+
const flip = landed ? captionFlips(landed, props.view, props.width, props.height) : false;
|
|
201
|
+
const offset = useMemo(
|
|
202
|
+
() => (motion ? { transform: [{ translateX: motion.dx }, { translateY: motion.dy }] } : null),
|
|
203
|
+
[motion],
|
|
204
|
+
);
|
|
181
205
|
const styles = useMemo(() => {
|
|
182
206
|
const half = BADGE / 2;
|
|
183
207
|
return {
|
|
@@ -185,14 +209,15 @@ export const AgentCursor = memo(function AgentCursor(props: CursorProps) {
|
|
|
185
209
|
float: { transform: [{ translateY: bob.interpolate({ inputRange: [0, 1], outputRange: [0, -3] }) }] },
|
|
186
210
|
halo: {
|
|
187
211
|
position: "absolute",
|
|
188
|
-
left: -
|
|
189
|
-
top:
|
|
190
|
-
width:
|
|
191
|
-
height:
|
|
192
|
-
borderRadius:
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
212
|
+
left: -RING / 2,
|
|
213
|
+
top: PIN_MIDDLE - RING / 2,
|
|
214
|
+
width: RING,
|
|
215
|
+
height: RING,
|
|
216
|
+
borderRadius: RING / 2,
|
|
217
|
+
borderWidth: 2,
|
|
218
|
+
borderColor: agent.color,
|
|
219
|
+
opacity: halo.interpolate({ inputRange: [0, 1], outputRange: [0.6, 0] }),
|
|
220
|
+
transform: [{ scale: halo.interpolate({ inputRange: [0, 1], outputRange: [1, 1.7] }) }],
|
|
196
221
|
},
|
|
197
222
|
badge: {
|
|
198
223
|
position: "absolute",
|
|
@@ -261,32 +286,34 @@ export const AgentCursor = memo(function AgentCursor(props: CursorProps) {
|
|
|
261
286
|
return (
|
|
262
287
|
<Animated.View
|
|
263
288
|
pointerEvents="none"
|
|
264
|
-
style={[styles.anchor, { transform: [{ translateX: motion.x }, { translateY: motion.y }, { scale: props.
|
|
289
|
+
style={[styles.anchor, { transform: [{ translateX: motion.x }, { translateY: motion.y }, { scale: props.itemScale }] }]}
|
|
265
290
|
>
|
|
266
|
-
<Animated.View style={
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
{
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
{
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
{caption ? (
|
|
284
|
-
<View style={styles.caption}>
|
|
285
|
-
<Text numberOfLines={1} style={styles.captionText}>
|
|
286
|
-
{caption}
|
|
287
|
-
</Text>
|
|
291
|
+
<Animated.View style={offset}>
|
|
292
|
+
<Animated.View style={styles.float}>
|
|
293
|
+
{agent.running ? <Animated.View style={styles.halo} /> : null}
|
|
294
|
+
{moons.length > 0 ? (
|
|
295
|
+
<Animated.View style={styles.orbit}>
|
|
296
|
+
{moons.map((moon, index) => (
|
|
297
|
+
<View key={index} style={[styles.moon, moon]} />
|
|
298
|
+
))}
|
|
299
|
+
</Animated.View>
|
|
300
|
+
) : null}
|
|
301
|
+
<View style={styles.pointer} />
|
|
302
|
+
<View style={styles.badge}>
|
|
303
|
+
{agent.provider ? (
|
|
304
|
+
<ProviderIcon provider={agent.provider} size={13} color={colors.accentForeground} />
|
|
305
|
+
) : (
|
|
306
|
+
<Icon name="Bot" size={13} color={colors.surface0} />
|
|
307
|
+
)}
|
|
288
308
|
</View>
|
|
289
|
-
|
|
309
|
+
{caption ? (
|
|
310
|
+
<View style={styles.caption}>
|
|
311
|
+
<Text numberOfLines={1} style={styles.captionText}>
|
|
312
|
+
{caption}
|
|
313
|
+
</Text>
|
|
314
|
+
</View>
|
|
315
|
+
) : null}
|
|
316
|
+
</Animated.View>
|
|
290
317
|
</Animated.View>
|
|
291
318
|
</Animated.View>
|
|
292
319
|
);
|