-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathfirst-party-plugins.ts
More file actions
167 lines (164 loc) · 9.92 KB
/
Copy pathfirst-party-plugins.ts
File metadata and controls
167 lines (164 loc) · 9.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
// First-party plugins — the static list of feature plugins Copse ships.
//
// Following decision 15 (VS Code's built-in-extensions model), first-party
// plugins share the manifest, registry, and disable semantics with user plugins;
// they additionally supply typed runtime contributions (native tools,
// in-process function hooks, real renderer views).
//
// **Membership.**
// - `todosPlugin` — the P4 pilot plugin. Bundles the `update_todos` tool, the
// turn-start steering + closeout hooks, the plan panel contribution, and
// the plugin-scoped steering setting. Disabling it removes all four in one
// atomic flag flip (P1 atomicity, pinned by
// `enable-disable-atomicity.test.ts`).
// - `postTurnReviewPlugin` — the P5 first-party plugin for post-turn review.
// Declarative-only (no typed contributions); the plugin toggle is the atomic
// master switch consulted by the trigger site in `agent-service.ts`.
// - `reviewPlugin` — Copse Reviewer's app shell (replaced the P5-era
// `copse.model-comparison` plugin). Declares the `review_changes` tool and
// the "Review changes" bubble; the plugin toggle atomically drops both, and
// the Changes-view "Review" button, in one flag flip.
// - `longHorizonTasksPlugin` — the first-party plugin for the experimental
// long-horizon tasks feature (issue #558). Declares the `track_long_task`
// tool; the plugin toggle atomically drops the tool from the model tool list
// (`registry-bootstrap.ts` reads the plugin registry).
// - `roadmapPlansPlugin` — the first-party plugin for the experimental roadmap
// plans feature (issue #556). Declares the `roadmap_plan` tool; the plugin
// toggle atomically drops the tool from the model tool list
// (`registry-bootstrap.ts` reads the plugin registry) and gates the renderer's
// Roadmap pane visibility.
// - `advisorStrategyPlugin` — the first-party plugin for the experimental
// client-side advisor strategy (issue #566). Declares the `advisor` tool;
// the plugin toggle atomically drops the tool from the model tool list
// (`registry-bootstrap.ts` reads the plugin registry). The orthogonal
// `advisorModel` setting (which model the advisor consults) stays top-level.
// - `okfMemoriesPlugin` — the first-party plugin for the experimental OKF memories
// feature. Declares the `remember`/`recall` tools and the memory steering
// prompt block; the plugin toggle atomically drops the tools from the model
// tool list (`registry-bootstrap.ts` reads the plugin registry), stops
// appending the prompt block (`agent-system-prompt.ts`), and hides the
// renderer Memories pane (which reads the plugin's enablement via `plugins:list`).
// - `ciInvestigatorPlugin` — the first-party plugin for the experimental CI
// investigator subagent. Declares the `investigate_ci` tool plus its
// deep-log `gh_run_list` / `gh_run_view` helpers; the plugin toggle atomically
// drops all three from the model tool list (`registry-bootstrap.ts` reads the
// plugin registry, ANDing `gh` availability into the register direction) and
// re-points the "Investigate CI failure" follow-up.
// - `forcedPlanningPlugin` — the first-party plugin for the experimental
// forced-planning feature. Contributes one turn-start hook that thresholds on
// the *measured capability of the model running the turn* and injects a
// mandatory plan-first block below it; the plugin toggle atomically drops the
// hook from the assembly pipeline (`createHookRegistry` folds plugin hooks in),
// restoring a byte-identical system prompt. Ships disabled — its id is in the
// declared `DEFAULT_DISABLED_PLUGIN_IDS` set in `plugin-service.ts`.
// - `piiRedactionPlugin` — the first-party plugin for the experimental client-side
// PII redaction feature. Declares the `reveal_pii` tool + the redaction
// steering prompt block; the plugin toggle atomically drops the tool from the
// model tool list, stops appending the prompt block, and stops rewriting the
// user's input into placeholders (`registry-bootstrap.ts`,
// `agent-system-prompt.ts` and `pii-redactor.ts` read the plugin registry).
// - `mcpUiCanvasPlugin` — the first-party plugin for the experimental MCP-UI
// artefacts (canvas) feature (issue #611). Contributes no tool: it declares
// the `mcp-ui-canvas` **capability** — the canvas gates in `mcp-registry.ts`
// read `isCapabilityActive('mcp-ui-canvas')` instead of the retired
// `mcpUiArtefactsEnabled` setting, so the plugin toggle atomically turns canvas
// rendering (and the bundled canvas server) on/off — plus one conditional
// turn-start hook that steers a prototype request onto the bundled
// `render_html_artefact` tool when that tool is offered. Default DISABLED.
// - `devtoolsShortcutPlugin` — the first-party plugin for the experimental DevTools
// shortcut. Contributes no tool: it declares the `devtools-shortcut`
// **capability** — `create-main-window.ts` reads
// `isCapabilityActive('devtools-shortcut')` instead of the retired
// `devtoolsShortcutEnabled` setting, so the plugin toggle atomically
// registers/unregisters the global Ctrl+Shift+I shortcut. Default DISABLED.
// - `backgroundTasksPlugin` — the first-party plugin for the stable, default-on
// background tasks feature (issue #691). Declares the `run_background` tool
// AND the `loopback-bind` **permission / sandbox relaxation** (issue #1190):
// the plugin toggle atomically drops the tool from the model tool list
// (`registry-bootstrap.ts` reads the plugin registry) and the permission-gate
// only grants the loopback port-binding relaxation while the plugin declares it
// (`permission-gate.ts` reads `isPermissionDeclared('loopback-bind')`).
// Default ENABLED; users can still disable it through the plugin toggle.
// - `parallelSearchPlugin` — direct, credential-gated access to Parallel's
// hosted Search API. It declares the native `parallel_search` tool, search
// mode setting, and first-party credential detail. Default DISABLED.
// - `artifactCheckpointPlugin` — experimental delayed artifact-preservation
// steering. Contributes one `stepBoundary` hook and a scoped delay setting;
// default DISABLED.
// - `siteBuildingPlugin` — stable, default-on website creative-engineering
// steering. Contributes one conditional turn-start hook shared by the local
// loop and ACP; no customer- or demo-specific art direction is embedded.
import type { RegisteredPlugin } from './plugin-manifest.ts'
import { PluginRegistry } from './plugin-registry.ts'
import { todosPlugin } from './todos-plugin.ts'
import { postTurnReviewPlugin } from './post-turn-review-plugin.ts'
import { reviewPlugin } from './review-plugin.ts'
import { longHorizonTasksPlugin } from './long-horizon-tasks-plugin.ts'
import { roadmapPlansPlugin } from './roadmap-plans-plugin.ts'
import { advisorStrategyPlugin } from './advisor-strategy-plugin.ts'
import { okfMemoriesPlugin } from './okf-memories-plugin.ts'
import { ciInvestigatorPlugin } from './ci-investigator-plugin.ts'
import { piiRedactionPlugin } from './pii-redaction-plugin.ts'
import { forcedPlanningPlugin } from './forced-planning-plugin.ts'
import { mcpUiCanvasPlugin } from './mcp-ui-canvas-plugin.ts'
import { devtoolsShortcutPlugin } from './devtools-shortcut-plugin.ts'
import { backgroundTasksPlugin } from './background-tasks-plugin.ts'
import { automationsPlugin } from './automations-plugin.ts'
import { parallelSearchPlugin } from './parallel-search-plugin.ts'
import { darkFactoryPlugin } from './dark-factory-plugin.ts'
import { siteBuildingPlugin } from './site-building-plugin.ts'
import { artifactCheckpointPlugin } from './artifact-checkpoint-plugin.ts'
import { appleDevelopmentPlugin } from './apple-development-plugin.ts'
import { claudeMdPlugin } from './claude-md-plugin.ts'
import { agentsMdPlugin } from './agents-md-plugin.ts'
import { cursorRulesPlugin } from './cursor-rules-plugin.ts'
/**
* Every plugin Copse ships. Order is preserved as the Settings plugin-list
* enumeration order (P3): the pilot todos plugin, then P5's two extracted
* feature plugins (post-turn review + Copse Reviewer), then long-horizon
* tasks, then roadmap plans, then advisor strategy, then OKF memories, then
* the CI investigator, then PII redaction, then forced planning, then the two
* capability-only plugins (MCP-UI canvas + DevTools shortcut), then the
* background-tasks plugin (which declares a permission / sandbox relaxation,
* issue #1190), then the automations prototype, Parallel Search, dark factory,
* the artifact-checkpoint experiment, and the stable site-building steering plugin.
*/
export const FIRST_PARTY_PLUGINS: readonly RegisteredPlugin[] = [
claudeMdPlugin,
agentsMdPlugin,
cursorRulesPlugin,
todosPlugin,
appleDevelopmentPlugin,
postTurnReviewPlugin,
reviewPlugin,
longHorizonTasksPlugin,
roadmapPlansPlugin,
advisorStrategyPlugin,
okfMemoriesPlugin,
ciInvestigatorPlugin,
piiRedactionPlugin,
forcedPlanningPlugin,
mcpUiCanvasPlugin,
devtoolsShortcutPlugin,
backgroundTasksPlugin,
automationsPlugin,
parallelSearchPlugin,
darkFactoryPlugin,
artifactCheckpointPlugin,
siteBuildingPlugin,
]
/**
* The single source of truth for first-party plugins that must ship disabled.
* Stability is product metadata, not decorative copy: an experimental plugin is
* opt-in by construction, so adding one cannot accidentally enable it for a
* fresh profile while forgetting to update a second hand-maintained list.
*/
export const EXPERIMENTAL_FIRST_PARTY_PLUGIN_IDS: readonly string[] = FIRST_PARTY_PLUGINS.filter(
(plugin) => plugin.manifest.stability === 'experimental',
).map((plugin) => plugin.id)
/** A fresh {@link PluginRegistry} seeded with the shipped first-party plugins (all enabled). */
export function createFirstPartyPluginRegistry(): PluginRegistry {
const registry = new PluginRegistry()
for (const plugin of FIRST_PARTY_PLUGINS) registry.register(plugin)
return registry
}