@pluginfinity/targets 0.1.1 → 0.2.0

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/claude.js CHANGED
@@ -1,4 +1,4 @@
1
- import { CLAUDE_HOOK_EVENTS, Target, drop, keep } from "@pluginfinity/core";
1
+ import { CLAUDE_HOOK_EVENTS, LSP_FIELDS, Target, drop, keep } from "@pluginfinity/core";
2
2
 
3
3
  //#region src/claude.ts
4
4
  const ROOT = `\${CLAUDE_PLUGIN_ROOT}`;
@@ -44,6 +44,7 @@ const agentFields = {
44
44
  initialPrompt: drop,
45
45
  experimental: keep
46
46
  };
47
+ const lspFields = Object.fromEntries(LSP_FIELDS.map((field) => [field, keep]));
47
48
  /**
48
49
  * Claude Code, described by what it can do.
49
50
  *
@@ -67,18 +68,21 @@ const CLAUDE = Target.make({
67
68
  pluginRoot: {
68
69
  hooks: ROOT,
69
70
  mcp: ROOT,
71
+ lsp: ROOT,
70
72
  body: ROOT
71
73
  },
72
74
  skills: {
73
75
  dir: "skills",
74
76
  fields: skillFields,
75
- hostFields: []
77
+ hostFields: [],
78
+ invoke: "/{plugin}:{skill}"
76
79
  },
77
80
  agents: {
78
81
  dir: "agents",
79
82
  suffix: ".md",
80
83
  fields: agentFields,
81
- hostFields: []
84
+ hostFields: [],
85
+ id: "{plugin}:{agent}"
82
86
  },
83
87
  hooks: {
84
88
  path: "hooks/hooks.json",
@@ -90,11 +94,21 @@ const CLAUDE = Target.make({
90
94
  path: ".mcp.json",
91
95
  format: "claude-mcp-json"
92
96
  },
97
+ lsp: {
98
+ path: ".lsp.json",
99
+ format: "claude-lsp-json",
100
+ fields: lspFields
101
+ },
93
102
  references: { style: "path" },
94
103
  tools: {
95
104
  names: {},
96
105
  mcp: "mcp__{server}__{tool}",
97
- unlisted: "keep"
106
+ unlisted: "keep",
107
+ runtime: {
108
+ names: {},
109
+ mcp: "mcp__plugin_{plugin}_{server}__{tool}",
110
+ unlisted: "keep"
111
+ }
98
112
  },
99
113
  models: {},
100
114
  efforts: {}
package/copilot.js CHANGED
@@ -1,4 +1,4 @@
1
- import { CLAUDE_HOOK_EVENTS, Target, absent, degrade, drop, keep, translate, unresolved } from "@pluginfinity/core";
1
+ import { CLAUDE_HOOK_EVENTS, Target, absent, degrade, drop, keep, rename, translate, unresolved } from "@pluginfinity/core";
2
2
 
3
3
  //#region src/copilot.ts
4
4
  const ROOT = `\${PLUGIN_ROOT}`;
@@ -54,6 +54,20 @@ const agentFields = {
54
54
  initialPrompt: drop,
55
55
  experimental: drop
56
56
  };
57
+ const lspFields = {
58
+ command: keep,
59
+ args: keep,
60
+ env: keep,
61
+ extensionToLanguage: rename("fileExtensions"),
62
+ initializationOptions: keep,
63
+ settings: unresolved("Copilot has no LSP settings channel; set the server under copilot.lspServers without settings"),
64
+ workspaceFolder: unresolved("Copilot's rootUri is relative to the git root, not a path; set the server under copilot.lspServers without workspaceFolder"),
65
+ startupTimeout: drop,
66
+ shutdownTimeout: drop,
67
+ restartOnCrash: drop,
68
+ maxRestarts: drop,
69
+ diagnostics: drop
70
+ };
57
71
  const PASCAL_CASE = /* @__PURE__ */ new Set([
58
72
  "SessionStart",
59
73
  "SessionEnd",
@@ -95,14 +109,17 @@ const COPILOT = Target.make({
95
109
  pluginRoot: {
96
110
  hooks: ROOT,
97
111
  mcp: ROOT,
112
+ lsp: ROOT,
98
113
  body: unresolved("Copilot documents no plugin-root expansion inside skill or agent bodies")
99
114
  },
100
115
  skills: {
101
116
  dir: "skills",
102
117
  fields: skillFields,
103
- hostFields: []
118
+ hostFields: [],
119
+ invoke: "/{plugin}:{skill}"
104
120
  },
105
121
  agents: {
122
+ id: "{plugin}:{agent}",
106
123
  dir: "com.github.copilot/agents",
107
124
  suffix: ".agent.md",
108
125
  fields: agentFields,
@@ -131,6 +148,11 @@ const COPILOT = Target.make({
131
148
  format: "agent-plugins-mcp-1.0",
132
149
  schema: "https://agent-plugins.org/schemas/1.0.0/mcp.schema.json"
133
150
  },
151
+ lsp: {
152
+ path: "com.github.copilot/lsp.json",
153
+ format: "copilot-lsp-json",
154
+ fields: lspFields
155
+ },
134
156
  references: { style: "prose" },
135
157
  tools: {
136
158
  names: {
@@ -144,15 +166,37 @@ const COPILOT = Target.make({
144
166
  MultiEdit: "edit",
145
167
  Write: "edit",
146
168
  NotebookEdit: "edit",
147
- Grep: "search",
148
- Glob: "search",
149
- WebFetch: "web",
150
- WebSearch: "web",
151
- TodoWrite: "todo",
169
+ Grep: "grep",
170
+ Glob: "glob",
171
+ WebFetch: "web_fetch",
172
+ WebSearch: "web_search",
173
+ TodoWrite: drop,
152
174
  Skill: drop
153
175
  },
154
176
  mcp: "{server}/{tool}",
155
- unlisted: "drop"
177
+ unlisted: "drop",
178
+ runtime: {
179
+ names: {
180
+ Read: "view",
181
+ Bash: "bash",
182
+ Edit: "edit",
183
+ MultiEdit: "edit",
184
+ Write: "create",
185
+ Agent: "task",
186
+ Task: "task",
187
+ Grep: "grep",
188
+ Glob: "glob",
189
+ WebFetch: "web_fetch",
190
+ WebSearch: "web_search",
191
+ Skill: "skill",
192
+ TodoWrite: unresolved("No todo tool appeared in any measured Copilot session"),
193
+ NotebookEdit: unresolved("Copilot has no notebook tool; the run-time name was not measured"),
194
+ NotebookRead: unresolved("Copilot has no notebook tool; the run-time name was not measured"),
195
+ PowerShell: unresolved("The run-time PowerShell tool name was not measured; Copilot showed bash")
196
+ },
197
+ mcp: "{server}-{tool}",
198
+ unlisted: "unresolved"
199
+ }
156
200
  },
157
201
  models: {
158
202
  inherit: drop,
package/index.d.ts CHANGED
@@ -71,6 +71,20 @@ export declare const ClaudeSetting: Schema.Union<readonly [Schema.Literal<true>,
71
71
  readonly url: Schema.String;
72
72
  readonly headers: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
73
73
  }>]>>>;
74
+ readonly lspServers: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Struct<{
75
+ readonly command: Schema.String;
76
+ readonly args: Schema.optionalKey<Schema.$Array<Schema.String>>;
77
+ readonly env: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
78
+ readonly extensionToLanguage: Schema.$Record<Schema.String, Schema.String>;
79
+ readonly initializationOptions: Schema.optionalKey<Schema.Unknown>;
80
+ readonly settings: Schema.optionalKey<Schema.Unknown>;
81
+ readonly workspaceFolder: Schema.optionalKey<Schema.String>;
82
+ readonly startupTimeout: Schema.optionalKey<Schema.Number>;
83
+ readonly shutdownTimeout: Schema.optionalKey<Schema.Number>;
84
+ readonly restartOnCrash: Schema.optionalKey<Schema.Boolean>;
85
+ readonly maxRestarts: Schema.optionalKey<Schema.Number>;
86
+ readonly diagnostics: Schema.optionalKey<Schema.Boolean>;
87
+ }>>>;
74
88
  }>]>;
75
89
  /**
76
90
  * The `copilot` key's value: hooks overrides may also use Copilot's own events.
@@ -91,6 +105,20 @@ export declare const CopilotSetting: Schema.Union<readonly [Schema.Literal<true>
91
105
  readonly url: Schema.String;
92
106
  readonly headers: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
93
107
  }>]>>>;
108
+ readonly lspServers: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Struct<{
109
+ readonly command: Schema.String;
110
+ readonly args: Schema.optionalKey<Schema.$Array<Schema.String>>;
111
+ readonly env: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
112
+ readonly extensionToLanguage: Schema.$Record<Schema.String, Schema.String>;
113
+ readonly initializationOptions: Schema.optionalKey<Schema.Unknown>;
114
+ readonly settings: Schema.optionalKey<Schema.Unknown>;
115
+ readonly workspaceFolder: Schema.optionalKey<Schema.String>;
116
+ readonly startupTimeout: Schema.optionalKey<Schema.Number>;
117
+ readonly shutdownTimeout: Schema.optionalKey<Schema.Number>;
118
+ readonly restartOnCrash: Schema.optionalKey<Schema.Boolean>;
119
+ readonly maxRestarts: Schema.optionalKey<Schema.Number>;
120
+ readonly diagnostics: Schema.optionalKey<Schema.Boolean>;
121
+ }>>>;
94
122
  }>]>;
95
123
  /**
96
124
  * The whole `pluginfinity.config.ts` shape: the plugin-wide fields from
@@ -130,6 +158,21 @@ export declare const PluginfinityConfig: Schema.Struct<{
130
158
  readonly url: Schema.String;
131
159
  readonly headers: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
132
160
  }>]>>>;
161
+ readonly lspServers: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Struct<{
162
+ readonly command: Schema.String;
163
+ readonly args: Schema.optionalKey<Schema.$Array<Schema.String>>;
164
+ readonly env: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
165
+ readonly extensionToLanguage: Schema.$Record<Schema.String, Schema.String>;
166
+ readonly initializationOptions: Schema.optionalKey<Schema.Unknown>;
167
+ readonly settings: Schema.optionalKey<Schema.Unknown>;
168
+ readonly workspaceFolder: Schema.optionalKey<Schema.String>;
169
+ readonly startupTimeout: Schema.optionalKey<Schema.Number>;
170
+ readonly shutdownTimeout: Schema.optionalKey<Schema.Number>;
171
+ readonly restartOnCrash: Schema.optionalKey<Schema.Boolean>;
172
+ readonly maxRestarts: Schema.optionalKey<Schema.Number>;
173
+ readonly diagnostics: Schema.optionalKey<Schema.Boolean>;
174
+ }>>>;
175
+ readonly files: Schema.optionalKey<Schema.$Array<Schema.String>>;
133
176
  readonly claude: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<true>, Schema.Struct<{
134
177
  readonly name: Schema.optionalKey<Schema.String>;
135
178
  readonly hooks: Schema.optionalKey<Schema.Struct<import("@pluginfinity/core").HooksFields<readonly ["SessionStart", "Setup", "UserPromptSubmit", "UserPromptExpansion", "PreToolUse", "PermissionRequest", "PermissionDenied", "PostToolUse", "PostToolUseFailure", "PostToolBatch", "Notification", "MessageDisplay", "SubagentStart", "SubagentStop", "TaskCreated", "TaskCompleted", "Stop", "StopFailure", "TeammateIdle", "InstructionsLoaded", "ConfigChange", "CwdChanged", "DirectoryAdded", "FileChanged", "WorktreeCreate", "WorktreeRemove", "PreCompact", "PostCompact", "PreModelSwitch", "PostModelSwitch", "Elicitation", "ElicitationResult", "SessionEnd"]>>>;
@@ -144,6 +187,20 @@ export declare const PluginfinityConfig: Schema.Struct<{
144
187
  readonly url: Schema.String;
145
188
  readonly headers: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
146
189
  }>]>>>;
190
+ readonly lspServers: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Struct<{
191
+ readonly command: Schema.String;
192
+ readonly args: Schema.optionalKey<Schema.$Array<Schema.String>>;
193
+ readonly env: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
194
+ readonly extensionToLanguage: Schema.$Record<Schema.String, Schema.String>;
195
+ readonly initializationOptions: Schema.optionalKey<Schema.Unknown>;
196
+ readonly settings: Schema.optionalKey<Schema.Unknown>;
197
+ readonly workspaceFolder: Schema.optionalKey<Schema.String>;
198
+ readonly startupTimeout: Schema.optionalKey<Schema.Number>;
199
+ readonly shutdownTimeout: Schema.optionalKey<Schema.Number>;
200
+ readonly restartOnCrash: Schema.optionalKey<Schema.Boolean>;
201
+ readonly maxRestarts: Schema.optionalKey<Schema.Number>;
202
+ readonly diagnostics: Schema.optionalKey<Schema.Boolean>;
203
+ }>>>;
147
204
  }>]>>;
148
205
  readonly copilot: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<true>, Schema.Struct<{
149
206
  readonly name: Schema.optionalKey<Schema.String>;
@@ -159,6 +216,20 @@ export declare const PluginfinityConfig: Schema.Struct<{
159
216
  readonly url: Schema.String;
160
217
  readonly headers: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
161
218
  }>]>>>;
219
+ readonly lspServers: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Struct<{
220
+ readonly command: Schema.String;
221
+ readonly args: Schema.optionalKey<Schema.$Array<Schema.String>>;
222
+ readonly env: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
223
+ readonly extensionToLanguage: Schema.$Record<Schema.String, Schema.String>;
224
+ readonly initializationOptions: Schema.optionalKey<Schema.Unknown>;
225
+ readonly settings: Schema.optionalKey<Schema.Unknown>;
226
+ readonly workspaceFolder: Schema.optionalKey<Schema.String>;
227
+ readonly startupTimeout: Schema.optionalKey<Schema.Number>;
228
+ readonly shutdownTimeout: Schema.optionalKey<Schema.Number>;
229
+ readonly restartOnCrash: Schema.optionalKey<Schema.Boolean>;
230
+ readonly maxRestarts: Schema.optionalKey<Schema.Number>;
231
+ readonly diagnostics: Schema.optionalKey<Schema.Boolean>;
232
+ }>>>;
162
233
  }>]>>;
163
234
  }>;
164
235
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pluginfinity/targets",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "private": false,
5
5
  "description": "The host targets pluginfinity builds for (Claude Code, GitHub Copilot), described as data against the @pluginfinity/core Target schema.",
6
6
  "keywords": [
@@ -36,7 +36,7 @@
36
36
  "./package.json": "./package.json"
37
37
  },
38
38
  "dependencies": {
39
- "@pluginfinity/core": "0.1.1"
39
+ "@pluginfinity/core": "0.2.0"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "effect": "^4.0.0"
package/version.js CHANGED
@@ -9,7 +9,7 @@
9
9
  *
10
10
  * @public
11
11
  */
12
- const TARGETS_VERSION = "0.1.1";
12
+ const TARGETS_VERSION = "0.2.0";
13
13
 
14
14
  //#endregion
15
15
  export { TARGETS_VERSION };