Files
gabrielvidalandClaude Opus 5.5 c8fa334528 refactor(resources): plugin-driven resource kinds — retire live PR polling and Profile.resources
Work Resources becomes generic core composition over declarative plugin
`resources[]`, ahead of the `github` / `linear` / `slack` plugins (Wave 2B-2).

- Core knows only `branch` and `url` (cli/resource_urls.py). Every link is
  mined raw, so the plugins' kinds apply at view time: installing a plugin
  lights up the whole archive with zero re-parse. Notion links are plain
  `url` pills.
- New backend/plugins/resources.py: PluginResourceRegistry compiled from the
  owner's active plugins' `resources[]` + each plugin's settings (workers,
  cwdGlobs, notifPills, channelMap, {config.*} templates); cached on the new
  PluginStore.version and kept by identity while unchanged.
- manifest.py: expanded, ReDoS-checked `resources[]` (urlRegex, idRegex,
  id/url/label templates, titleToken, bareKeyRegex + team gate,
  branchKeyPattern cross-links, ignoreUrlRegex, toolExtractors[], icon,
  color, stateTones, clickAction, priority, hueRole); the v3 shape and the
  approval fingerprint stay as they were.
- ResourceMiner runs declarative toolExtractors / bare keys in-process (no
  subprocess); legacy resourcesAuto / resourceTeams / slackChannels still read.
- resource_view: per-plugin scope, branchKeyPattern cross-linking, priority
  primary, generic `<lead> · <title> · <shade>` title; Context cached on
  (summaries, meta, registry) with per-transcript memo.
- look.subject → generic (hueKey, shadeKey) from hueRole; past.py generic.
- conv add/rm send raw links / keys; the hub's registry reads them.
- Removed: conversations/pr_state.py, sidecar/routes_gh.py (/gh/pr-states),
  deps.pr_states, Profile.resources + Orus defaults (dropped on load),
  GET /api/profiles/resource-directory, ProfileResourcesEditor + the
  Profile page's Tracking tab.
- Frontend pills read `ui.resources` descriptors (icon, tone, stateTones,
  clickAction); historical kinds keep a fallback. ResourceKind widens to str.
- Fixture manifests + test kit for the three plugins in
  backend/fixtures/resource_plugins/.

OpenAPI not re-dumped (coordinator does it after Batch 2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 11:59:25 +01:00

54 lines
2.2 KiB
JSON

{
"schema": 1,
"id": "linear",
"name": "Linear",
"version": "1.0.0",
"description": "Linear issue pills: links, typed keys (INS-2229), issue branches, get_issue lookups — and the card colour of everything about one issue.",
"icon": "kanban",
"settings": {
"subtitle": "Which conversations show Linear issue pills",
"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 }
]
},
"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}"],
"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"
}
]
}