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

57 lines
2.4 KiB
JSON

{
"schema": 1,
"id": "slack",
"name": "Slack",
"version": "1.0.0",
"description": "Slack thread pills: thread links (a reply link joins its thread), thread reads, channel names learned from any Slack result.",
"icon": "slack",
"settings": {
"subtitle": "Which conversations show Slack thread pills",
"fields": [
{ "key": "slackWorkspace", "label": "Workspace", "type": "text",
"help": "<workspace>.slack.com — the link of a thread named by its channel + ts only" },
{ "key": "channelMap", "label": "Channel names", "type": "textarea",
"help": "one `C0123ABCD=name` per line — wins over the names learned from transcripts" },
{ "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": "slack",
"label": "Slack thread",
"urlRegex": "^https://(?P<workspace>[\\w-]+)\\.slack\\.com/archives/(?P<channel>[CDG][A-Z0-9]{6,})/p(?P<ptss>\\d{10})(?P<ptsu>\\d{6})(?:\\?(?:[^#\\s]*&)?thread_ts=(?P<tss>\\d{10})\\.(?P<tsu>\\d{6}))?",
"idRegex": "^(?P<channel>[CDG][A-Z0-9]{6,})/(?P<tss>\\d{10})\\.(?P<tsu>\\d{6})$",
"idTemplate": "{channel}/{tss|ptss}.{tsu|ptsu}",
"urlTemplate": "https://{workspace|config.slackWorkspace}.slack.com/archives/{channel}/p{tss|ptss}{tsu|ptsu}",
"labelTemplate": [{ "match": "^D", "template": "DM" }, { "template": "#{name}" }],
"titleToken": [{ "match": "^D", "template": "" }, { "template": "{label}" }],
"namesGroup": "channel",
"dateGroup": "tss",
"ignoreUrlRegex": "^https://[\\w-]+\\.slack\\.com/(?!archives/[CDG][A-Z0-9]{6,}/p\\d{16})",
"toolExtractors": [
{
"tool": "mcp__*slack_read_thread*",
"inputTemplate": "{channel_id|channel}/{message_ts}",
"tagOnCall": true
},
{
"tool": "*",
"channelMapRegex": [
"Channel: #(?P<name>[\\w.-]+) \\(ID: (?P<id>[CDG][A-Z0-9]{6,})\\)",
"<#(?P<id>[CDG][A-Z0-9]{6,})\\|(?P<name>[\\w.-]+)>"
],
"textHint": ["Channel: #", "<#"]
}
],
"icon": "slack",
"color": "fuchsia",
"clickAction": "open",
"priority": 30
}
]
}