@pluginfinity/targets 0.3.2 → 0.4.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 +16 -11
- package/config.js +2 -2
- package/copilot.js +2 -0
- package/index.d.ts +17 -6
- package/package.json +3 -3
- package/registry.js +1 -1
- package/version.js +2 -2
package/claude.js
CHANGED
|
@@ -96,6 +96,20 @@ const CLAUDE = Target.make({
|
|
|
96
96
|
format: "claude-hooks-json",
|
|
97
97
|
events: Object.fromEntries(CLAUDE_HOOK_EVENTS.map((event) => [event, event])),
|
|
98
98
|
ownEvents: [],
|
|
99
|
+
handlers: [
|
|
100
|
+
"command",
|
|
101
|
+
"http",
|
|
102
|
+
"mcp_tool",
|
|
103
|
+
"prompt",
|
|
104
|
+
"agent"
|
|
105
|
+
],
|
|
106
|
+
entryFields: [
|
|
107
|
+
"if",
|
|
108
|
+
"statusMessage",
|
|
109
|
+
"async",
|
|
110
|
+
"asyncRewake",
|
|
111
|
+
"shell"
|
|
112
|
+
],
|
|
99
113
|
matcherIgnored: [],
|
|
100
114
|
envShell: [
|
|
101
115
|
"SessionStart",
|
|
@@ -119,34 +133,25 @@ const CLAUDE = Target.make({
|
|
|
119
133
|
],
|
|
120
134
|
system_message: [
|
|
121
135
|
"SessionStart",
|
|
122
|
-
"Setup",
|
|
123
136
|
"UserPromptSubmit",
|
|
124
137
|
"UserPromptExpansion",
|
|
138
|
+
"PreSkillShellCommand",
|
|
125
139
|
"PreToolUse",
|
|
126
140
|
"PermissionRequest",
|
|
127
141
|
"PermissionDenied",
|
|
128
142
|
"PostToolUse",
|
|
129
143
|
"PostToolUseFailure",
|
|
130
144
|
"PostToolBatch",
|
|
131
|
-
"MessageDisplay",
|
|
132
145
|
"SubagentStart",
|
|
133
146
|
"SubagentStop",
|
|
134
147
|
"TaskCreated",
|
|
135
148
|
"TaskCompleted",
|
|
136
149
|
"Stop",
|
|
137
|
-
"StopFailure",
|
|
138
150
|
"TeammateIdle",
|
|
139
|
-
"InstructionsLoaded",
|
|
140
151
|
"CwdChanged",
|
|
141
|
-
"DirectoryAdded",
|
|
142
152
|
"FileChanged",
|
|
143
|
-
"WorktreeCreate",
|
|
144
|
-
"WorktreeRemove",
|
|
145
|
-
"PostCompact",
|
|
146
153
|
"PreModelSwitch",
|
|
147
|
-
"PostModelSwitch"
|
|
148
|
-
"Elicitation",
|
|
149
|
-
"ElicitationResult"
|
|
154
|
+
"PostModelSwitch"
|
|
150
155
|
]
|
|
151
156
|
}
|
|
152
157
|
},
|
package/config.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { COPILOT_OWN_EVENTS } from "./copilot.js";
|
|
2
|
-
import { KNOWN_TARGET_IDS } from "./registry.js";
|
|
3
1
|
import { BASE_CONFIG_KEYS, BaseConfigFields, CLAUDE_HOOK_EVENTS, Hooks, makeHooks, makeTargetSetting } from "@pluginfinity/core";
|
|
4
2
|
import { Schema } from "effect";
|
|
3
|
+
import { COPILOT_OWN_EVENTS } from "./copilot.js";
|
|
4
|
+
import { KNOWN_TARGET_IDS } from "./registry.js";
|
|
5
5
|
|
|
6
6
|
// src/config.ts
|
|
7
7
|
/**
|
package/copilot.js
CHANGED
|
@@ -147,6 +147,8 @@ const COPILOT = Target.make({
|
|
|
147
147
|
format: "copilot-hooks-v1",
|
|
148
148
|
events: Object.fromEntries(CLAUDE_HOOK_EVENTS.map((event) => [event, PASCAL_CASE.has(event) ? event : CAMEL_CASE[event] ?? absent])),
|
|
149
149
|
ownEvents: [...COPILOT_OWN_EVENTS],
|
|
150
|
+
handlers: ["command"],
|
|
151
|
+
entryFields: [],
|
|
150
152
|
matcherIgnored: [
|
|
151
153
|
"SessionStart",
|
|
152
154
|
"SessionEnd",
|
package/index.d.ts
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The host targets pluginfinity builds for, described as data.
|
|
3
|
+
*
|
|
4
|
+
* @remarks
|
|
5
|
+
* The registry (`claude`, `copilot`), the `CLAUDE` and `COPILOT` descriptions
|
|
6
|
+
* (values of `@pluginfinity/core`'s `Target` class), and the assembled
|
|
7
|
+
* `PluginfinityConfig` schema, which joins the `@pluginfinity/core` base fields
|
|
8
|
+
* with one optional key per target and its per-target settings.
|
|
9
|
+
*
|
|
10
|
+
* @packageDocumentation
|
|
11
|
+
*/
|
|
1
12
|
import { Target } from "@pluginfinity/core";
|
|
2
13
|
import { Schema } from "effect";
|
|
3
14
|
/**
|
|
@@ -55,7 +66,7 @@ export declare const isKnownTargetId: (id: string) => id is KnownTargetId;
|
|
|
55
66
|
export declare const ClaudeSetting: Schema.Union<readonly [Schema.Literal<true>, Schema.Struct<{
|
|
56
67
|
readonly name: Schema.optionalKey<Schema.String>;
|
|
57
68
|
readonly files: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
58
|
-
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"]>>>;
|
|
69
|
+
readonly hooks: Schema.optionalKey<Schema.Struct<import("@pluginfinity/core").HooksFields<readonly ["SessionStart", "Setup", "UserPromptSubmit", "UserPromptExpansion", "PreSkillShellCommand", "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"]>>>;
|
|
59
70
|
readonly mcpServers: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
|
|
60
71
|
readonly type: Schema.optionalKey<Schema.Literal<"stdio">>;
|
|
61
72
|
readonly command: Schema.String;
|
|
@@ -100,7 +111,7 @@ export declare const ClaudeSetting: Schema.Union<readonly [Schema.Literal<true>,
|
|
|
100
111
|
export declare const CopilotSetting: Schema.Union<readonly [Schema.Literal<true>, Schema.Struct<{
|
|
101
112
|
readonly name: Schema.optionalKey<Schema.String>;
|
|
102
113
|
readonly files: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
103
|
-
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"]>>>;
|
|
114
|
+
readonly hooks: Schema.optionalKey<Schema.Struct<import("@pluginfinity/core").HooksFields<readonly ["SessionStart", "Setup", "UserPromptSubmit", "UserPromptExpansion", "PreSkillShellCommand", "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"]>>>;
|
|
104
115
|
readonly mcpServers: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
|
|
105
116
|
readonly type: Schema.optionalKey<Schema.Literal<"stdio">>;
|
|
106
117
|
readonly command: Schema.String;
|
|
@@ -163,7 +174,7 @@ export declare const PluginfinityConfig: Schema.Struct<{
|
|
|
163
174
|
readonly scripts: Schema.optionalKey<Schema.Struct<{
|
|
164
175
|
readonly invoke: Schema.optionalKey<Schema.Literals<readonly ["bash", "exec"]>>;
|
|
165
176
|
}>>;
|
|
166
|
-
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"]>>>;
|
|
177
|
+
readonly hooks: Schema.optionalKey<Schema.Struct<import("@pluginfinity/core").HooksFields<readonly ["SessionStart", "Setup", "UserPromptSubmit", "UserPromptExpansion", "PreSkillShellCommand", "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"]>>>;
|
|
167
178
|
readonly mcpServers: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
|
|
168
179
|
readonly type: Schema.optionalKey<Schema.Literal<"stdio">>;
|
|
169
180
|
readonly command: Schema.String;
|
|
@@ -211,7 +222,7 @@ export declare const PluginfinityConfig: Schema.Struct<{
|
|
|
211
222
|
readonly claude: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<true>, Schema.Struct<{
|
|
212
223
|
readonly name: Schema.optionalKey<Schema.String>;
|
|
213
224
|
readonly files: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
214
|
-
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"]>>>;
|
|
225
|
+
readonly hooks: Schema.optionalKey<Schema.Struct<import("@pluginfinity/core").HooksFields<readonly ["SessionStart", "Setup", "UserPromptSubmit", "UserPromptExpansion", "PreSkillShellCommand", "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"]>>>;
|
|
215
226
|
readonly mcpServers: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
|
|
216
227
|
readonly type: Schema.optionalKey<Schema.Literal<"stdio">>;
|
|
217
228
|
readonly command: Schema.String;
|
|
@@ -251,7 +262,7 @@ export declare const PluginfinityConfig: Schema.Struct<{
|
|
|
251
262
|
readonly copilot: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<true>, Schema.Struct<{
|
|
252
263
|
readonly name: Schema.optionalKey<Schema.String>;
|
|
253
264
|
readonly files: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
254
|
-
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"]>>>;
|
|
265
|
+
readonly hooks: Schema.optionalKey<Schema.Struct<import("@pluginfinity/core").HooksFields<readonly ["SessionStart", "Setup", "UserPromptSubmit", "UserPromptExpansion", "PreSkillShellCommand", "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"]>>>;
|
|
255
266
|
readonly mcpServers: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
|
|
256
267
|
readonly type: Schema.optionalKey<Schema.Literal<"stdio">>;
|
|
257
268
|
readonly command: Schema.String;
|
|
@@ -331,7 +342,7 @@ export declare const COPILOT: Target;
|
|
|
331
342
|
* The version of `@pluginfinity/targets` this build was made from.
|
|
332
343
|
*
|
|
333
344
|
* @remarks
|
|
334
|
-
* A build-time literal: the
|
|
345
|
+
* A build-time literal: the build replaces `process.env.__PACKAGE_VERSION__`
|
|
335
346
|
* with this package's own version, so this is not a runtime environment read.
|
|
336
347
|
* `"0.0.0"` is the unbuilt-source fallback.
|
|
337
348
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pluginfinity/targets",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.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,10 +36,10 @@
|
|
|
36
36
|
"./package.json": "./package.json"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@pluginfinity/core": "0.
|
|
39
|
+
"@pluginfinity/core": "0.4.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"effect": "~4.1.
|
|
42
|
+
"effect": "~4.1.0"
|
|
43
43
|
},
|
|
44
44
|
"engines": {
|
|
45
45
|
"node": ">=24.11.0"
|
package/registry.js
CHANGED
package/version.js
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
* The version of `@pluginfinity/targets` this build was made from.
|
|
4
4
|
*
|
|
5
5
|
* @remarks
|
|
6
|
-
* A build-time literal: the
|
|
6
|
+
* A build-time literal: the build replaces `process.env.__PACKAGE_VERSION__`
|
|
7
7
|
* with this package's own version, so this is not a runtime environment read.
|
|
8
8
|
* `"0.0.0"` is the unbuilt-source fallback.
|
|
9
9
|
*
|
|
10
10
|
* @public
|
|
11
11
|
*/
|
|
12
|
-
const TARGETS_VERSION = "0.
|
|
12
|
+
const TARGETS_VERSION = "0.4.0";
|
|
13
13
|
|
|
14
14
|
export { TARGETS_VERSION };
|