A resource plugin can declare a `hueRole: group` kind — what an issue belongs to (a Linear project); its issue kind names it with `groupBy`. The linear plugin's `linear-project` uses it (plugin 1.1.0, ai-agent-plugins branch linear-projects). Decided in form linear-projects-icons-colour_yfnahd. - Lookups only: get_project and list_projects (a new extractor field, `itemsPath: projects[]`, reads each item of a listing without tagging the conversation) teach Linear's icon and colour; `vendor_icons` turns `Brush` / `:heavy_plus_sign:` into glyph keys (`brush`, `emoji:➕`, gemoji table vendored). PARSER_VERSION 47 re-mines past lookups. - Colour (`cardColour: group`, the default): a card wears its issue's project colour, each issue of the project a shade (`LookColors.group_color`, `shade_hex` ≡ the PWA's `shadeHex`); a palette hue when Linear's is unknown; an issue with no known project keeps issue + PR colours. A Settings → Tags colour on `linear:project/<name>` wins (the PWA re-shades it with `colorGroup` / `colorShade`); *Colour…* on such a card writes that tag. - Icon (`iconOrder: group`): project › label › team; the project's tag icon, else Linear's own. - Pill (`groupPills`): the issue's project beside it, in its own icon and colour (`Resource.icon` / `color`; the glyph is tinted, not the pill). - `groupLooks` off: only what Settings → Tags sets. - Emoji tag icons (`emoji:<char>`), Linear's look as a project tag's derived default in Settings → Tags, the mock seeds two projects. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
104 lines
4.7 KiB
JSON
104 lines
4.7 KiB
JSON
{
|
||
"schema": 1,
|
||
"id": "linear",
|
||
"name": "Linear",
|
||
"version": "1.1.0",
|
||
"description": "Linear issue and project pills: links, typed keys (INS-2229), issue branches, get_issue / get_project lookups — and the card colour and icon of an issue's project (Linear's own).",
|
||
"icon": "kanban",
|
||
"settings": {
|
||
"subtitle": "Which conversations show Linear pills, and how a project dresses its cards",
|
||
"fields": [
|
||
{ "key": "linearWorkspace", "label": "Workspace", "type": "text",
|
||
"help": "linear.app/<workspace> — the link of an issue named by its key only" },
|
||
{ "key": "workers", "label": "Runners", "type": "list",
|
||
"help": "runner ids (local = the lab); empty = every runner" },
|
||
{ "key": "cwdGlobs", "label": "Folders", "type": "list",
|
||
"help": "cwd globs (~/work/acme*); empty = anywhere" },
|
||
{ "key": "notifPills", "label": "Pills on notifications", "type": "checkbox", "default": false },
|
||
{ "key": "cardColour", "label": "Card colour", "type": "select", "default": "group",
|
||
"options": [
|
||
{ "value": "group", "label": "The issue's project — each issue a shade of it" },
|
||
{ "value": "hue", "label": "One per issue — each PR a shade of it" }
|
||
],
|
||
"help": "An issue whose project isn't known yet keeps a colour of its own" },
|
||
{ "key": "iconOrder", "label": "Card icon", "type": "select", "default": "group",
|
||
"options": [
|
||
{ "value": "group", "label": "Project › label › team" },
|
||
{ "value": "label", "label": "Label › project › team" }
|
||
],
|
||
"help": "The first of these that has an icon draws the card's tile" },
|
||
{ "key": "groupPills", "label": "Project pills", "type": "checkbox", "default": true,
|
||
"help": "Show the issue's project as a pill next to it" },
|
||
{ "key": "groupLooks", "label": "Linear's project icons and colours", "type": "checkbox", "default": true,
|
||
"help": "Learned from get_project / list_projects lookups. Off: only what you set in Settings → Tags" }
|
||
]
|
||
},
|
||
"resources": [
|
||
{
|
||
"id": "linear",
|
||
"label": "Linear issue",
|
||
"urlRegex": "^https://linear\\.app/(?P<workspace>[\\w-]+)/issue/(?P<team>[A-Za-z][A-Za-z0-9]{0,6})-(?P<num>\\d{1,6})(?:/(?P<slug>[^/?#\\s]+))?",
|
||
"idRegex": "^(?P<team>[A-Za-z][A-Za-z0-9]{0,6})-(?P<num>\\d{1,6})$",
|
||
"idTemplate": "{team:upper}-{num}",
|
||
"urlTemplate": "https://linear.app/{workspace|config.linearWorkspace}/issue/{team:upper}-{num}",
|
||
"labelTemplate": "{team:upper}-{num}",
|
||
"titleToken": "{team:upper}-{num}",
|
||
"slugTitleGroup": "slug",
|
||
"bareKeyRegex": "(?<![\\w/#.-])(?P<team>[A-Z][A-Z0-9]{0,6})-(?P<num>\\d{1,6})(?![\\w-])",
|
||
"bareKeyTeamGroup": "team",
|
||
"branchKeyPattern": "^(?:[\\w.-]+/)?(?:worktree-)?(?P<team>[A-Za-z][A-Za-z0-9]{0,6})-(?P<num>\\d{1,6})(?:-(?P<slug>.+))?$",
|
||
"needles": ["{team:upper}-{num}"],
|
||
"groupBy": "project",
|
||
"toolExtractors": [
|
||
{
|
||
"tool": "mcp__*__get_issue",
|
||
"inputTemplate": "{id|issueId}",
|
||
"urlFields": ["url"],
|
||
"idFields": ["id", "identifier"],
|
||
"titleFields": ["title"],
|
||
"stateFields": ["status"],
|
||
"metaFields": { "labels": "labels[].name", "project": "project.name", "team": "team.name" }
|
||
}
|
||
],
|
||
"icon": "linear",
|
||
"color": "indigo",
|
||
"clickAction": "open",
|
||
"priority": 10,
|
||
"hueRole": "hue"
|
||
},
|
||
{
|
||
"id": "linear-project",
|
||
"label": "Linear project",
|
||
"urlRegex": "^https://linear\\.app/(?P<workspace>[\\w-]+)/project/(?P<slug>[a-z0-9][a-z0-9-]{0,118})-(?P<pid>[0-9a-f]{12})(?![a-z0-9-])",
|
||
"idRegex": "^(?:(?P<slug>[a-z0-9][a-z0-9-]{0,118})-(?P<pid>[0-9a-f]{12})|name:(?P<nslug>[a-z0-9][a-z0-9-]{0,118}))$",
|
||
"idTemplate": ["{slug}-{pid}", "name:{nslug}"],
|
||
"urlTemplate": "https://linear.app/{workspace|config.linearWorkspace}/project/{slug}-{pid}",
|
||
"labelTemplate": [{ "match": "^name:", "template": "{nslug:title}" }, { "template": "{slug:title}" }],
|
||
"titleToken": [{ "template": "" }],
|
||
"slugTitleGroup": "slug",
|
||
"toolExtractors": [
|
||
{
|
||
"tool": "mcp__*__get_project",
|
||
"urlFields": ["url"],
|
||
"titleFields": ["name"],
|
||
"stateFields": ["status.name", "status"],
|
||
"metaFields": { "icon": "icon", "color": "color" }
|
||
},
|
||
{
|
||
"tool": "mcp__*__list_projects",
|
||
"itemsPath": "projects[]",
|
||
"urlFields": ["url"],
|
||
"titleFields": ["name"],
|
||
"stateFields": ["status.name", "status"],
|
||
"metaFields": { "icon": "icon", "color": "color" }
|
||
}
|
||
],
|
||
"icon": "folder-kanban",
|
||
"color": "indigo",
|
||
"clickAction": "open",
|
||
"priority": 40,
|
||
"hueRole": "group"
|
||
}
|
||
]
|
||
}
|