@pluginfinity/targets 0.2.1 → 0.3.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
@@ -77,7 +77,12 @@ const CLAUDE = Target.make({
77
77
  dir: "skills",
78
78
  fields: skillFields,
79
79
  hostFields: [],
80
- invoke: "/{plugin}:{skill}"
80
+ invoke: "/{plugin}:{skill}",
81
+ dirSpelling: {
82
+ own: `\${CLAUDE_SKILL_DIR}`,
83
+ other: `\${CLAUDE_PLUGIN_ROOT}/skills/{skill}`,
84
+ agent: `\${CLAUDE_PLUGIN_ROOT}/skills/{skill}`
85
+ }
81
86
  },
82
87
  agents: {
83
88
  dir: "agents",
@@ -90,7 +95,60 @@ const CLAUDE = Target.make({
90
95
  path: "hooks/hooks.json",
91
96
  format: "claude-hooks-json",
92
97
  events: Object.fromEntries(CLAUDE_HOOK_EVENTS.map((event) => [event, event])),
93
- ownEvents: []
98
+ ownEvents: [],
99
+ matcherIgnored: [],
100
+ envShell: [
101
+ "SessionStart",
102
+ "Setup",
103
+ "CwdChanged",
104
+ "FileChanged"
105
+ ],
106
+ output: {
107
+ context: [
108
+ "SessionStart",
109
+ "SubagentStart",
110
+ "PostModelSwitch",
111
+ "UserPromptSubmit",
112
+ "UserPromptExpansion",
113
+ "PreToolUse",
114
+ "PostToolUse",
115
+ "PostToolUseFailure",
116
+ "PostToolBatch",
117
+ "Stop",
118
+ "SubagentStop"
119
+ ],
120
+ system_message: [
121
+ "SessionStart",
122
+ "Setup",
123
+ "UserPromptSubmit",
124
+ "UserPromptExpansion",
125
+ "PreToolUse",
126
+ "PermissionRequest",
127
+ "PermissionDenied",
128
+ "PostToolUse",
129
+ "PostToolUseFailure",
130
+ "PostToolBatch",
131
+ "MessageDisplay",
132
+ "SubagentStart",
133
+ "SubagentStop",
134
+ "TaskCreated",
135
+ "TaskCompleted",
136
+ "Stop",
137
+ "StopFailure",
138
+ "TeammateIdle",
139
+ "InstructionsLoaded",
140
+ "CwdChanged",
141
+ "DirectoryAdded",
142
+ "FileChanged",
143
+ "WorktreeCreate",
144
+ "WorktreeRemove",
145
+ "PostCompact",
146
+ "PreModelSwitch",
147
+ "PostModelSwitch",
148
+ "Elicitation",
149
+ "ElicitationResult"
150
+ ]
151
+ }
94
152
  },
95
153
  mcp: {
96
154
  placement: inManifest("mcpServers", ".mcp.json"),
@@ -101,6 +159,10 @@ const CLAUDE = Target.make({
101
159
  format: "claude-lsp-servers",
102
160
  fields: lspFields
103
161
  },
162
+ monitors: {
163
+ path: "monitors/monitors.json",
164
+ root: ROOT
165
+ },
104
166
  references: { style: "path" },
105
167
  tools: {
106
168
  names: {},
package/copilot.js CHANGED
@@ -116,7 +116,12 @@ const COPILOT = Target.make({
116
116
  dir: "skills",
117
117
  fields: skillFields,
118
118
  hostFields: [],
119
- invoke: "/{plugin}:{skill}"
119
+ invoke: "/{plugin}:{skill}",
120
+ dirSpelling: {
121
+ own: "<skill base directory>",
122
+ other: "<skill base directory>/../{skill}",
123
+ agent: unresolved("an agent has no skill base directory on copilot; name the path in the skill instead")
124
+ }
120
125
  },
121
126
  agents: {
122
127
  id: "{plugin}:{agent}",
@@ -141,7 +146,22 @@ const COPILOT = Target.make({
141
146
  path: "com.github.copilot/hooks/hooks.json",
142
147
  format: "copilot-hooks-v1",
143
148
  events: Object.fromEntries(CLAUDE_HOOK_EVENTS.map((event) => [event, PASCAL_CASE.has(event) ? event : CAMEL_CASE[event] ?? absent])),
144
- ownEvents: [...COPILOT_OWN_EVENTS]
149
+ ownEvents: [...COPILOT_OWN_EVENTS],
150
+ matcherIgnored: [
151
+ "SessionStart",
152
+ "SessionEnd",
153
+ "SubagentStop"
154
+ ],
155
+ output: {
156
+ context: [
157
+ "SessionStart",
158
+ "SubagentStart",
159
+ "PostToolUse",
160
+ "Notification"
161
+ ],
162
+ system_message: []
163
+ },
164
+ envShell: []
145
165
  },
146
166
  mcp: {
147
167
  placement: inFile("mcp.json"),
@@ -153,6 +173,7 @@ const COPILOT = Target.make({
153
173
  format: "copilot-lsp-json",
154
174
  fields: lspFields
155
175
  },
176
+ monitors: unresolved("Copilot CLI has no monitors"),
156
177
  references: { style: "prose" },
157
178
  tools: {
158
179
  names: {
package/index.d.ts CHANGED
@@ -59,6 +59,7 @@ export declare const isKnownTargetId: (id: string) => id is KnownTargetId;
59
59
  */
60
60
  export declare const ClaudeSetting: Schema.Union<readonly [Schema.Literal<true>, Schema.Struct<{
61
61
  readonly name: Schema.optionalKey<Schema.String>;
62
+ readonly files: Schema.optionalKey<Schema.$Array<Schema.String>>;
62
63
  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"]>>>;
63
64
  readonly mcpServers: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
64
65
  readonly type: Schema.optionalKey<Schema.Literal<"stdio">>;
@@ -85,6 +86,16 @@ export declare const ClaudeSetting: Schema.Union<readonly [Schema.Literal<true>,
85
86
  readonly maxRestarts: Schema.optionalKey<Schema.Number>;
86
87
  readonly diagnostics: Schema.optionalKey<Schema.Boolean>;
87
88
  }>>>;
89
+ readonly monitors: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
90
+ readonly description: Schema.String;
91
+ readonly when: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"always">, Schema.String]>>;
92
+ readonly script: Schema.String;
93
+ readonly args: Schema.optionalKey<Schema.$Array<Schema.String>>;
94
+ }>, Schema.Struct<{
95
+ readonly description: Schema.String;
96
+ readonly when: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"always">, Schema.String]>>;
97
+ readonly command: Schema.String;
98
+ }>]>>>;
88
99
  }>]>;
89
100
  /**
90
101
  * The `copilot` key's value: hooks overrides may also use Copilot's own events.
@@ -93,6 +104,7 @@ export declare const ClaudeSetting: Schema.Union<readonly [Schema.Literal<true>,
93
104
  */
94
105
  export declare const CopilotSetting: Schema.Union<readonly [Schema.Literal<true>, Schema.Struct<{
95
106
  readonly name: Schema.optionalKey<Schema.String>;
107
+ readonly files: Schema.optionalKey<Schema.$Array<Schema.String>>;
96
108
  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", "userPromptTransformed", "errorOccurred"]>>>;
97
109
  readonly mcpServers: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
98
110
  readonly type: Schema.optionalKey<Schema.Literal<"stdio">>;
@@ -119,6 +131,16 @@ export declare const CopilotSetting: Schema.Union<readonly [Schema.Literal<true>
119
131
  readonly maxRestarts: Schema.optionalKey<Schema.Number>;
120
132
  readonly diagnostics: Schema.optionalKey<Schema.Boolean>;
121
133
  }>>>;
134
+ readonly monitors: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
135
+ readonly description: Schema.String;
136
+ readonly when: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"always">, Schema.String]>>;
137
+ readonly script: Schema.String;
138
+ readonly args: Schema.optionalKey<Schema.$Array<Schema.String>>;
139
+ }>, Schema.Struct<{
140
+ readonly description: Schema.String;
141
+ readonly when: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"always">, Schema.String]>>;
142
+ readonly command: Schema.String;
143
+ }>]>>>;
122
144
  }>]>;
123
145
  /**
124
146
  * The whole `pluginfinity.config.ts` shape: the plugin-wide fields from
@@ -172,9 +194,28 @@ export declare const PluginfinityConfig: Schema.Struct<{
172
194
  readonly maxRestarts: Schema.optionalKey<Schema.Number>;
173
195
  readonly diagnostics: Schema.optionalKey<Schema.Boolean>;
174
196
  }>>>;
197
+ readonly monitors: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
198
+ readonly description: Schema.String;
199
+ readonly when: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"always">, Schema.String]>>;
200
+ readonly script: Schema.String;
201
+ readonly args: Schema.optionalKey<Schema.$Array<Schema.String>>;
202
+ }>, Schema.Struct<{
203
+ readonly description: Schema.String;
204
+ readonly when: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"always">, Schema.String]>>;
205
+ readonly command: Schema.String;
206
+ }>]>>>;
175
207
  readonly files: Schema.optionalKey<Schema.$Array<Schema.String>>;
208
+ readonly env: Schema.optionalKey<Schema.Struct<{
209
+ readonly prefix: Schema.optionalKey<Schema.String>;
210
+ readonly vars: Schema.$Record<Schema.String, Schema.Struct<{
211
+ readonly default: Schema.optionalKey<Schema.String>;
212
+ readonly description: Schema.optionalKey<Schema.String>;
213
+ }>>;
214
+ readonly setup: Schema.optionalKey<Schema.String>;
215
+ }>>;
176
216
  readonly claude: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<true>, Schema.Struct<{
177
217
  readonly name: Schema.optionalKey<Schema.String>;
218
+ readonly files: Schema.optionalKey<Schema.$Array<Schema.String>>;
178
219
  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"]>>>;
179
220
  readonly mcpServers: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
180
221
  readonly type: Schema.optionalKey<Schema.Literal<"stdio">>;
@@ -201,9 +242,20 @@ export declare const PluginfinityConfig: Schema.Struct<{
201
242
  readonly maxRestarts: Schema.optionalKey<Schema.Number>;
202
243
  readonly diagnostics: Schema.optionalKey<Schema.Boolean>;
203
244
  }>>>;
245
+ readonly monitors: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
246
+ readonly description: Schema.String;
247
+ readonly when: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"always">, Schema.String]>>;
248
+ readonly script: Schema.String;
249
+ readonly args: Schema.optionalKey<Schema.$Array<Schema.String>>;
250
+ }>, Schema.Struct<{
251
+ readonly description: Schema.String;
252
+ readonly when: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"always">, Schema.String]>>;
253
+ readonly command: Schema.String;
254
+ }>]>>>;
204
255
  }>]>>;
205
256
  readonly copilot: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<true>, Schema.Struct<{
206
257
  readonly name: Schema.optionalKey<Schema.String>;
258
+ readonly files: Schema.optionalKey<Schema.$Array<Schema.String>>;
207
259
  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", "userPromptTransformed", "errorOccurred"]>>>;
208
260
  readonly mcpServers: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
209
261
  readonly type: Schema.optionalKey<Schema.Literal<"stdio">>;
@@ -230,6 +282,16 @@ export declare const PluginfinityConfig: Schema.Struct<{
230
282
  readonly maxRestarts: Schema.optionalKey<Schema.Number>;
231
283
  readonly diagnostics: Schema.optionalKey<Schema.Boolean>;
232
284
  }>>>;
285
+ readonly monitors: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
286
+ readonly description: Schema.String;
287
+ readonly when: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"always">, Schema.String]>>;
288
+ readonly script: Schema.String;
289
+ readonly args: Schema.optionalKey<Schema.$Array<Schema.String>>;
290
+ }>, Schema.Struct<{
291
+ readonly description: Schema.String;
292
+ readonly when: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"always">, Schema.String]>>;
293
+ readonly command: Schema.String;
294
+ }>]>>>;
233
295
  }>]>>;
234
296
  }>;
235
297
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pluginfinity/targets",
3
- "version": "0.2.1",
3
+ "version": "0.3.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.2.1"
39
+ "@pluginfinity/core": "0.3.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.2.1";
12
+ const TARGETS_VERSION = "0.3.0";
13
13
 
14
14
  //#endregion
15
15
  export { TARGETS_VERSION };