@pluginfinity/targets 0.3.3 → 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 +5 -5
- package/package.json +2 -2
- package/registry.js +1 -1
- package/version.js +1 -1
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
|
@@ -66,7 +66,7 @@ export declare const isKnownTargetId: (id: string) => id is KnownTargetId;
|
|
|
66
66
|
export declare const ClaudeSetting: Schema.Union<readonly [Schema.Literal<true>, Schema.Struct<{
|
|
67
67
|
readonly name: Schema.optionalKey<Schema.String>;
|
|
68
68
|
readonly files: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
69
|
-
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"]>>>;
|
|
70
70
|
readonly mcpServers: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
|
|
71
71
|
readonly type: Schema.optionalKey<Schema.Literal<"stdio">>;
|
|
72
72
|
readonly command: Schema.String;
|
|
@@ -111,7 +111,7 @@ export declare const ClaudeSetting: Schema.Union<readonly [Schema.Literal<true>,
|
|
|
111
111
|
export declare const CopilotSetting: Schema.Union<readonly [Schema.Literal<true>, Schema.Struct<{
|
|
112
112
|
readonly name: Schema.optionalKey<Schema.String>;
|
|
113
113
|
readonly files: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
114
|
-
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"]>>>;
|
|
115
115
|
readonly mcpServers: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
|
|
116
116
|
readonly type: Schema.optionalKey<Schema.Literal<"stdio">>;
|
|
117
117
|
readonly command: Schema.String;
|
|
@@ -174,7 +174,7 @@ export declare const PluginfinityConfig: Schema.Struct<{
|
|
|
174
174
|
readonly scripts: Schema.optionalKey<Schema.Struct<{
|
|
175
175
|
readonly invoke: Schema.optionalKey<Schema.Literals<readonly ["bash", "exec"]>>;
|
|
176
176
|
}>>;
|
|
177
|
-
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"]>>>;
|
|
178
178
|
readonly mcpServers: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
|
|
179
179
|
readonly type: Schema.optionalKey<Schema.Literal<"stdio">>;
|
|
180
180
|
readonly command: Schema.String;
|
|
@@ -222,7 +222,7 @@ export declare const PluginfinityConfig: Schema.Struct<{
|
|
|
222
222
|
readonly claude: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<true>, Schema.Struct<{
|
|
223
223
|
readonly name: Schema.optionalKey<Schema.String>;
|
|
224
224
|
readonly files: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
225
|
-
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"]>>>;
|
|
226
226
|
readonly mcpServers: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
|
|
227
227
|
readonly type: Schema.optionalKey<Schema.Literal<"stdio">>;
|
|
228
228
|
readonly command: Schema.String;
|
|
@@ -262,7 +262,7 @@ export declare const PluginfinityConfig: Schema.Struct<{
|
|
|
262
262
|
readonly copilot: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<true>, Schema.Struct<{
|
|
263
263
|
readonly name: Schema.optionalKey<Schema.String>;
|
|
264
264
|
readonly files: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
265
|
-
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"]>>>;
|
|
266
266
|
readonly mcpServers: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
|
|
267
267
|
readonly type: Schema.optionalKey<Schema.Literal<"stdio">>;
|
|
268
268
|
readonly command: Schema.String;
|
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,7 +36,7 @@
|
|
|
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
42
|
"effect": "~4.1.0"
|
package/registry.js
CHANGED