@compilr-dev/sdk 0.26.0 → 0.28.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/dist/actions/registry.d.ts +1 -1
- package/dist/actions/registry.js +1 -1
- package/dist/guide/shared-content.js +42 -9
- package/dist/index.d.ts +12 -8
- package/dist/index.js +7 -5
- package/dist/platform/tools/canvas-tools.js +11 -11
- package/dist/project-types/action-meta.d.ts +21 -7
- package/dist/project-types/action-meta.js +44 -213
- package/dist/project-types/index.d.ts +5 -3
- package/dist/project-types/index.js +3 -2
- package/dist/project-types/macro-meta.d.ts +39 -0
- package/dist/project-types/{skill-meta.js → macro-meta.js} +203 -12
- package/dist/project-types/macro-relevance.d.ts +47 -0
- package/dist/project-types/macro-relevance.js +58 -0
- package/dist/project-types/types.d.ts +23 -4
- package/dist/skills/book-macros.d.ts +10 -0
- package/dist/skills/{book-skills.js → book-macros.js} +6 -6
- package/dist/skills/business-macros.d.ts +11 -0
- package/dist/skills/{business-skills.js → business-macros.js} +7 -7
- package/dist/skills/canvas-exemplars.d.ts +2 -2
- package/dist/skills/canvas-exemplars.js +4 -4
- package/dist/skills/canvas-icons.d.ts +1 -1
- package/dist/skills/canvas-icons.js +2 -2
- package/dist/skills/canvas-macros.d.ts +11 -0
- package/dist/skills/{canvas-skills.js → canvas-macros.js} +11 -11
- package/dist/skills/content-macros.d.ts +10 -0
- package/dist/skills/{content-skills.js → content-macros.js} +6 -6
- package/dist/skills/course-macros.d.ts +9 -0
- package/dist/skills/{course-skills.js → course-macros.js} +5 -5
- package/dist/skills/index.d.ts +6 -2
- package/dist/skills/index.js +4 -2
- package/dist/skills/macro-invocation.d.ts +78 -0
- package/dist/skills/macro-invocation.js +286 -0
- package/dist/skills/macro-list.d.ts +54 -0
- package/dist/skills/macro-list.js +84 -0
- package/dist/skills/operations.js +4 -4
- package/dist/skills/platform-macros.d.ts +27 -0
- package/dist/skills/platform-macros.js +94 -0
- package/dist/skills/prompt-resolver.d.ts +8 -2
- package/dist/skills/prompt-resolver.js +14 -8
- package/dist/skills/research-macros.d.ts +10 -0
- package/dist/skills/{research-skills.js → research-macros.js} +6 -6
- package/dist/skills/resolver.d.ts +15 -9
- package/dist/skills/resolver.js +13 -13
- package/dist/skills/software-macros.d.ts +14 -0
- package/dist/skills/{software-skills.js → software-macros.js} +37 -37
- package/dist/skills/types.d.ts +2 -2
- package/dist/skills/types.js +4 -4
- package/dist/team/agent-templates.d.ts +0 -1
- package/dist/team/agent-templates.js +0 -2
- package/dist/team/custom-agents.d.ts +1 -2
- package/dist/team/custom-agents.js +1 -2
- package/dist/team/index.d.ts +3 -3
- package/dist/team/index.js +1 -1
- package/dist/team/{skill-requirements.d.ts → macro-requirements.d.ts} +20 -14
- package/dist/team/{skill-requirements.js → macro-requirements.js} +28 -22
- package/dist/team/macro-tool-gap.d.ts +3 -3
- package/dist/team/macro-tool-gap.js +6 -6
- package/dist/team/team-agent.d.ts +6 -7
- package/dist/team/team-agent.js +6 -14
- package/dist/team/types.d.ts +8 -7
- package/dist/team/workshop-data.d.ts +17 -5
- package/dist/team/workshop-data.js +13 -13
- package/package.json +1 -1
- package/dist/project-types/skill-meta.d.ts +0 -17
- package/dist/skills/book-skills.d.ts +0 -10
- package/dist/skills/business-skills.d.ts +0 -11
- package/dist/skills/canvas-skills.d.ts +0 -11
- package/dist/skills/content-skills.d.ts +0 -10
- package/dist/skills/course-skills.d.ts +0 -9
- package/dist/skills/platform-skills.d.ts +0 -20
- package/dist/skills/platform-skills.js +0 -87
- package/dist/skills/research-skills.d.ts +0 -10
- package/dist/skills/software-skills.d.ts +0 -14
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Macro tool requirements.
|
|
3
3
|
*
|
|
4
|
-
* Maps
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Maps each MACRO to the tools its text assumes, so an agent can be told before it starts that
|
|
5
|
+
* it cannot carry one out. A macro is a named prompt the USER invokes — `/design`, `/code-review`
|
|
6
|
+
* — which expands into a message.
|
|
7
|
+
*
|
|
8
|
+
* ⚠️ THIS IS NOT ABOUT SKILLS, DESPITE ITS FORMER NAME. It was called `MACRO_REQUIREMENTS` and
|
|
9
|
+
* rendered by `buildAgentWorkshopData` as if it were a catalogue of skills, which is how the
|
|
10
|
+
* agent editor came to offer 13 items that were all Commands. Verified: every one of the 13
|
|
11
|
+
* entries is a macro and none is an installed skill. Skills — the Anthropic kind the model
|
|
12
|
+
* chooses — declare their own requirements in `SKILL.md` under `compilr.requires`.
|
|
7
13
|
*/
|
|
8
|
-
export interface
|
|
9
|
-
/** Tools that MUST be available for this
|
|
14
|
+
export interface MacroToolRequirement {
|
|
15
|
+
/** Tools that MUST be available for this macro to work */
|
|
10
16
|
required: string[];
|
|
11
|
-
/** Tools that enhance this
|
|
17
|
+
/** Tools that enhance this macro but aren't strictly required */
|
|
12
18
|
optional?: string[];
|
|
13
19
|
/** Brief description of why these tools are needed */
|
|
14
20
|
reason?: string;
|
|
@@ -20,23 +26,23 @@ export interface SkillToolRequirement {
|
|
|
20
26
|
* - Required tools: The skill will fail without these
|
|
21
27
|
* - Optional tools: The skill works better with these but can function without
|
|
22
28
|
*/
|
|
23
|
-
export declare const
|
|
29
|
+
export declare const MACRO_REQUIREMENTS: Record<string, MacroToolRequirement>;
|
|
24
30
|
/**
|
|
25
31
|
* Get all skill names that have requirements defined.
|
|
26
32
|
*/
|
|
27
|
-
export declare function
|
|
33
|
+
export declare function getDefinedMacroNames(): string[];
|
|
28
34
|
/**
|
|
29
35
|
* Get the tool requirements for a skill.
|
|
30
36
|
*/
|
|
31
|
-
export declare function
|
|
37
|
+
export declare function getMacroRequirements(macroName: string): MacroToolRequirement | undefined;
|
|
32
38
|
/**
|
|
33
39
|
* Check if a skill is compatible with a set of available tools.
|
|
34
40
|
*
|
|
35
|
-
* @param
|
|
41
|
+
* @param macroName - Name of the macro to check
|
|
36
42
|
* @param availableTools - Set of tool names available to the agent
|
|
37
43
|
* @returns Object with compatibility status and missing tools
|
|
38
44
|
*/
|
|
39
|
-
export declare function
|
|
45
|
+
export declare function checkMacroCompatibility(macroName: string, availableTools: Set<string> | string[]): {
|
|
40
46
|
compatible: boolean;
|
|
41
47
|
missingRequired: string[];
|
|
42
48
|
missingOptional: string[];
|
|
@@ -48,7 +54,7 @@ export declare function checkSkillCompatibility(skillName: string, availableTool
|
|
|
48
54
|
* @param allSkillNames - All skill names to check (default: defined skills)
|
|
49
55
|
* @returns Object with compatible and incompatible skill names
|
|
50
56
|
*/
|
|
51
|
-
export declare function
|
|
57
|
+
export declare function getCompatibleMacros(availableTools: Set<string> | string[], allMacroNames?: string[]): {
|
|
52
58
|
compatible: string[];
|
|
53
59
|
incompatible: Array<{
|
|
54
60
|
name: string;
|
|
@@ -63,4 +69,4 @@ export declare function getAllRequiredTools(): string[];
|
|
|
63
69
|
/**
|
|
64
70
|
* Get skills grouped by their primary category.
|
|
65
71
|
*/
|
|
66
|
-
export declare function
|
|
72
|
+
export declare function getMacrosByCategory(): Record<string, string[]>;
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Macro tool requirements.
|
|
3
3
|
*
|
|
4
|
-
* Maps
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Maps each MACRO to the tools its text assumes, so an agent can be told before it starts that
|
|
5
|
+
* it cannot carry one out. A macro is a named prompt the USER invokes — `/design`, `/code-review`
|
|
6
|
+
* — which expands into a message.
|
|
7
|
+
*
|
|
8
|
+
* ⚠️ THIS IS NOT ABOUT SKILLS, DESPITE ITS FORMER NAME. It was called `MACRO_REQUIREMENTS` and
|
|
9
|
+
* rendered by `buildAgentWorkshopData` as if it were a catalogue of skills, which is how the
|
|
10
|
+
* agent editor came to offer 13 items that were all Commands. Verified: every one of the 13
|
|
11
|
+
* entries is a macro and none is an installed skill. Skills — the Anthropic kind the model
|
|
12
|
+
* chooses — declare their own requirements in `SKILL.md` under `compilr.requires`.
|
|
7
13
|
*/
|
|
8
14
|
// =============================================================================
|
|
9
|
-
//
|
|
15
|
+
// Macro Requirements
|
|
10
16
|
// =============================================================================
|
|
11
17
|
/**
|
|
12
18
|
* Maps skill names to their tool requirements.
|
|
@@ -15,7 +21,7 @@
|
|
|
15
21
|
* - Required tools: The skill will fail without these
|
|
16
22
|
* - Optional tools: The skill works better with these but can function without
|
|
17
23
|
*/
|
|
18
|
-
export const
|
|
24
|
+
export const MACRO_REQUIREMENTS = {
|
|
19
25
|
// Development skills
|
|
20
26
|
'code-review': {
|
|
21
27
|
required: ['read_file', 'glob', 'grep'],
|
|
@@ -104,33 +110,33 @@ export const SKILL_REQUIREMENTS = {
|
|
|
104
110
|
/**
|
|
105
111
|
* Get all skill names that have requirements defined.
|
|
106
112
|
*/
|
|
107
|
-
export function
|
|
108
|
-
return Object.keys(
|
|
113
|
+
export function getDefinedMacroNames() {
|
|
114
|
+
return Object.keys(MACRO_REQUIREMENTS);
|
|
109
115
|
}
|
|
110
116
|
/**
|
|
111
117
|
* Get the tool requirements for a skill.
|
|
112
118
|
*/
|
|
113
|
-
export function
|
|
114
|
-
return
|
|
119
|
+
export function getMacroRequirements(macroName) {
|
|
120
|
+
return MACRO_REQUIREMENTS[macroName];
|
|
115
121
|
}
|
|
116
122
|
/**
|
|
117
123
|
* Check if a skill is compatible with a set of available tools.
|
|
118
124
|
*
|
|
119
|
-
* @param
|
|
125
|
+
* @param macroName - Name of the macro to check
|
|
120
126
|
* @param availableTools - Set of tool names available to the agent
|
|
121
127
|
* @returns Object with compatibility status and missing tools
|
|
122
128
|
*/
|
|
123
|
-
export function
|
|
129
|
+
export function checkMacroCompatibility(macroName, availableTools) {
|
|
124
130
|
const toolSet = availableTools instanceof Set ? availableTools : new Set(availableTools);
|
|
125
131
|
// If no requirements defined, assume compatible
|
|
126
|
-
if (!(
|
|
132
|
+
if (!(macroName in MACRO_REQUIREMENTS)) {
|
|
127
133
|
return {
|
|
128
134
|
compatible: true,
|
|
129
135
|
missingRequired: [],
|
|
130
136
|
missingOptional: [],
|
|
131
137
|
};
|
|
132
138
|
}
|
|
133
|
-
const requirement =
|
|
139
|
+
const requirement = MACRO_REQUIREMENTS[macroName];
|
|
134
140
|
const missingRequired = requirement.required.filter((t) => !toolSet.has(t));
|
|
135
141
|
const missingOptional = (requirement.optional ?? []).filter((t) => !toolSet.has(t));
|
|
136
142
|
return {
|
|
@@ -146,18 +152,18 @@ export function checkSkillCompatibility(skillName, availableTools) {
|
|
|
146
152
|
* @param allSkillNames - All skill names to check (default: defined skills)
|
|
147
153
|
* @returns Object with compatible and incompatible skill names
|
|
148
154
|
*/
|
|
149
|
-
export function
|
|
150
|
-
const
|
|
155
|
+
export function getCompatibleMacros(availableTools, allMacroNames) {
|
|
156
|
+
const macroNames = allMacroNames ?? getDefinedMacroNames();
|
|
151
157
|
const compatible = [];
|
|
152
158
|
const incompatible = [];
|
|
153
|
-
for (const
|
|
154
|
-
const result =
|
|
159
|
+
for (const macroName of macroNames) {
|
|
160
|
+
const result = checkMacroCompatibility(macroName, availableTools);
|
|
155
161
|
if (result.compatible) {
|
|
156
|
-
compatible.push(
|
|
162
|
+
compatible.push(macroName);
|
|
157
163
|
}
|
|
158
164
|
else {
|
|
159
165
|
incompatible.push({
|
|
160
|
-
name:
|
|
166
|
+
name: macroName,
|
|
161
167
|
missingTools: result.missingRequired,
|
|
162
168
|
});
|
|
163
169
|
}
|
|
@@ -170,7 +176,7 @@ export function getCompatibleSkills(availableTools, allSkillNames) {
|
|
|
170
176
|
*/
|
|
171
177
|
export function getAllRequiredTools() {
|
|
172
178
|
const allTools = new Set();
|
|
173
|
-
for (const requirement of Object.values(
|
|
179
|
+
for (const requirement of Object.values(MACRO_REQUIREMENTS)) {
|
|
174
180
|
for (const tool of requirement.required) {
|
|
175
181
|
allTools.add(tool);
|
|
176
182
|
}
|
|
@@ -180,7 +186,7 @@ export function getAllRequiredTools() {
|
|
|
180
186
|
/**
|
|
181
187
|
* Get skills grouped by their primary category.
|
|
182
188
|
*/
|
|
183
|
-
export function
|
|
189
|
+
export function getMacrosByCategory() {
|
|
184
190
|
return {
|
|
185
191
|
development: ['code-review', 'debug', 'explain', 'refactor'],
|
|
186
192
|
security: ['security-review'],
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* something it cannot deliver. The failure surfaces as the agent being broken rather than as a
|
|
8
8
|
* mismatch anyone can act on.
|
|
9
9
|
*
|
|
10
|
-
* The data for this has existed all along — `
|
|
11
|
-
* and a written `reason` per macro, and `
|
|
10
|
+
* The data for this has existed all along — `MACRO_REQUIREMENTS` carries `required`, `optional`
|
|
11
|
+
* and a written `reason` per macro, and `checkMacroCompatibility` does the comparison. Between
|
|
12
12
|
* them they had exactly one caller: a display hint in the CLI's agent wizard.
|
|
13
13
|
*
|
|
14
14
|
* ⚠️ THE WARNING GOES TO THE AGENT, NOT THE USER. A host-side dialog stops the user at a moment
|
|
@@ -21,7 +21,7 @@ export interface MacroToolGap {
|
|
|
21
21
|
missingRequired: string[];
|
|
22
22
|
/** Tools the macro uses when present. Reported so the agent can say what it will skip. */
|
|
23
23
|
missingOptional: string[];
|
|
24
|
-
/** The macro's own stated reason for needing them, from
|
|
24
|
+
/** The macro's own stated reason for needing them, from MACRO_REQUIREMENTS. */
|
|
25
25
|
reason: string;
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* something it cannot deliver. The failure surfaces as the agent being broken rather than as a
|
|
8
8
|
* mismatch anyone can act on.
|
|
9
9
|
*
|
|
10
|
-
* The data for this has existed all along — `
|
|
11
|
-
* and a written `reason` per macro, and `
|
|
10
|
+
* The data for this has existed all along — `MACRO_REQUIREMENTS` carries `required`, `optional`
|
|
11
|
+
* and a written `reason` per macro, and `checkMacroCompatibility` does the comparison. Between
|
|
12
12
|
* them they had exactly one caller: a display hint in the CLI's agent wizard.
|
|
13
13
|
*
|
|
14
14
|
* ⚠️ THE WARNING GOES TO THE AGENT, NOT THE USER. A host-side dialog stops the user at a moment
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* The agent does know, once told, and is where the user is already looking: it can explain in one
|
|
17
17
|
* sentence and suggest the handoff.
|
|
18
18
|
*/
|
|
19
|
-
import {
|
|
19
|
+
import { MACRO_REQUIREMENTS, checkMacroCompatibility } from './macro-requirements.js';
|
|
20
20
|
/**
|
|
21
21
|
* What this macro needs and this agent lacks, or `null` when there is nothing to say.
|
|
22
22
|
*
|
|
@@ -25,9 +25,9 @@ import { SKILL_REQUIREMENTS, checkSkillCompatibility } from './skill-requirement
|
|
|
25
25
|
* ignore the warning.
|
|
26
26
|
*/
|
|
27
27
|
export function macroToolGap(macroName, availableTools) {
|
|
28
|
-
if (!(macroName in
|
|
28
|
+
if (!(macroName in MACRO_REQUIREMENTS))
|
|
29
29
|
return null;
|
|
30
|
-
const { missingRequired, missingOptional } =
|
|
30
|
+
const { missingRequired, missingOptional } = checkMacroCompatibility(macroName, [
|
|
31
31
|
...availableTools,
|
|
32
32
|
]);
|
|
33
33
|
// Optional tools alone are not worth interrupting for — the macro still works without them.
|
|
@@ -37,7 +37,7 @@ export function macroToolGap(macroName, availableTools) {
|
|
|
37
37
|
missingRequired,
|
|
38
38
|
missingOptional,
|
|
39
39
|
// Every entry carries one; the fallback exists because the index signature cannot say so.
|
|
40
|
-
reason:
|
|
40
|
+
reason: MACRO_REQUIREMENTS[macroName].reason ?? 'carry out this workflow',
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
@@ -67,7 +67,6 @@ export interface TeamAgentUpdate {
|
|
|
67
67
|
personality?: string;
|
|
68
68
|
toolProfile?: TeamAgentConfig['toolProfile'];
|
|
69
69
|
toolFilter?: string[];
|
|
70
|
-
enabledSkills?: string[];
|
|
71
70
|
/** Which MCP servers this agent may reach. See `TeamAgent.mcpServers`. */
|
|
72
71
|
mcpServers?: string[];
|
|
73
72
|
/** Which Skills this agent may choose. See `TeamAgent.grantedSkills`. */
|
|
@@ -193,11 +192,12 @@ export declare class TeamAgent {
|
|
|
193
192
|
* Skills this agent may CHOOSE. `undefined` = never asked, reaches everything eligible;
|
|
194
193
|
* `[]` = granted nothing. Same contract as `mcpServers`.
|
|
195
194
|
*
|
|
196
|
-
* ⚠️
|
|
197
|
-
*
|
|
198
|
-
* friends, all
|
|
199
|
-
*
|
|
200
|
-
*
|
|
195
|
+
* ⚠️ THERE USED TO BE A SECOND FIELD, `enabledSkills`, AND IT HELD SOMETHING ELSE ENTIRELY.
|
|
196
|
+
* MACRO ids — the 13 its picker offered were `code-review`, `debug`, `design`, `prd` and
|
|
197
|
+
* friends, all things a user types. 0.25.0 wired Skills enforcement onto it and produced a
|
|
198
|
+
* live hazard: ticking "Code Review" wrote a name no installed skill has, so the agent
|
|
199
|
+
* silently got zero skills. It is deleted now. The MCP-style reading is legitimate HERE
|
|
200
|
+
* only because this
|
|
201
201
|
* field is new and nothing has a prior meaning.
|
|
202
202
|
*/
|
|
203
203
|
grantedSkills?: string[];
|
|
@@ -213,7 +213,6 @@ export declare class TeamAgent {
|
|
|
213
213
|
/**
|
|
214
214
|
* Enabled skills (empty = all skills)
|
|
215
215
|
*/
|
|
216
|
-
enabledSkills?: string[];
|
|
217
216
|
/**
|
|
218
217
|
* How the agent should sound. Tone only — never capability.
|
|
219
218
|
*
|
package/dist/team/team-agent.js
CHANGED
|
@@ -207,11 +207,12 @@ export class TeamAgent {
|
|
|
207
207
|
* Skills this agent may CHOOSE. `undefined` = never asked, reaches everything eligible;
|
|
208
208
|
* `[]` = granted nothing. Same contract as `mcpServers`.
|
|
209
209
|
*
|
|
210
|
-
* ⚠️
|
|
211
|
-
*
|
|
212
|
-
* friends, all
|
|
213
|
-
*
|
|
214
|
-
*
|
|
210
|
+
* ⚠️ THERE USED TO BE A SECOND FIELD, `enabledSkills`, AND IT HELD SOMETHING ELSE ENTIRELY.
|
|
211
|
+
* MACRO ids — the 13 its picker offered were `code-review`, `debug`, `design`, `prd` and
|
|
212
|
+
* friends, all things a user types. 0.25.0 wired Skills enforcement onto it and produced a
|
|
213
|
+
* live hazard: ticking "Code Review" wrote a name no installed skill has, so the agent
|
|
214
|
+
* silently got zero skills. It is deleted now. The MCP-style reading is legitimate HERE
|
|
215
|
+
* only because this
|
|
215
216
|
* field is new and nothing has a prior meaning.
|
|
216
217
|
*/
|
|
217
218
|
grantedSkills;
|
|
@@ -227,7 +228,6 @@ export class TeamAgent {
|
|
|
227
228
|
/**
|
|
228
229
|
* Enabled skills (empty = all skills)
|
|
229
230
|
*/
|
|
230
|
-
enabledSkills;
|
|
231
231
|
/**
|
|
232
232
|
* How the agent should sound. Tone only — never capability.
|
|
233
233
|
*
|
|
@@ -284,7 +284,6 @@ export class TeamAgent {
|
|
|
284
284
|
this.customGroups = config.customGroups;
|
|
285
285
|
this.mcpServers = config.mcpServers;
|
|
286
286
|
this.grantedSkills = config.grantedSkills;
|
|
287
|
-
this.enabledSkills = config.enabledSkills;
|
|
288
287
|
this.personality = config.personality;
|
|
289
288
|
this.autoApproveHandoff = config.autoApproveHandoff;
|
|
290
289
|
this._modelTier = config.modelTier;
|
|
@@ -418,8 +417,6 @@ export class TeamAgent {
|
|
|
418
417
|
(patch.personality !== undefined && patch.personality !== this.personality) ||
|
|
419
418
|
(patch.toolProfile !== undefined && patch.toolProfile !== this.toolProfile) ||
|
|
420
419
|
(patch.toolFilter !== undefined && !sameStrings(patch.toolFilter, this.toolFilter)) ||
|
|
421
|
-
(patch.enabledSkills !== undefined &&
|
|
422
|
-
!sameStrings(patch.enabledSkills, this.enabledSkills)) ||
|
|
423
420
|
(patch.mcpServers !== undefined && !sameStrings(patch.mcpServers, this.mcpServers)) ||
|
|
424
421
|
(patch.grantedSkills !== undefined && !sameStrings(patch.grantedSkills, this.grantedSkills));
|
|
425
422
|
/*
|
|
@@ -484,8 +481,6 @@ export class TeamAgent {
|
|
|
484
481
|
}
|
|
485
482
|
if (patch.toolFilter !== undefined)
|
|
486
483
|
this.toolFilter = patch.toolFilter;
|
|
487
|
-
if (patch.enabledSkills !== undefined)
|
|
488
|
-
this.enabledSkills = patch.enabledSkills;
|
|
489
484
|
if (needsRebuild)
|
|
490
485
|
this.stashForRebuild();
|
|
491
486
|
return { rebuilt: needsRebuild || tierChanged };
|
|
@@ -775,7 +770,6 @@ export class TeamAgent {
|
|
|
775
770
|
customGroups: this.customGroups,
|
|
776
771
|
mcpServers: this.mcpServers,
|
|
777
772
|
grantedSkills: this.grantedSkills,
|
|
778
|
-
enabledSkills: this.enabledSkills,
|
|
779
773
|
modelTier: this.modelTier,
|
|
780
774
|
autoApproveHandoff: this.autoApproveHandoff,
|
|
781
775
|
agentState,
|
|
@@ -833,7 +827,6 @@ export class TeamAgent {
|
|
|
833
827
|
customGroups: data.customGroups,
|
|
834
828
|
mcpServers: data.mcpServers,
|
|
835
829
|
grantedSkills: data.grantedSkills,
|
|
836
|
-
enabledSkills: data.enabledSkills,
|
|
837
830
|
modelTier: data.modelTier,
|
|
838
831
|
autoApproveHandoff: data.autoApproveHandoff,
|
|
839
832
|
});
|
|
@@ -916,7 +909,6 @@ export class TeamAgent {
|
|
|
916
909
|
toolFilter, // Pass tool filter from custom agent config
|
|
917
910
|
toolProfile: def.toolConfig?.profile, // Store profile for display
|
|
918
911
|
customGroups: def.toolConfig?.customGroups,
|
|
919
|
-
enabledSkills: def.enabledSkills, // Store skills for display
|
|
920
912
|
modelTier: def.modelTier, // Store model tier
|
|
921
913
|
});
|
|
922
914
|
}
|
package/dist/team/types.d.ts
CHANGED
|
@@ -147,13 +147,15 @@ export interface TeamAgentConfig {
|
|
|
147
147
|
* agent the whole machine.
|
|
148
148
|
*/
|
|
149
149
|
mcpServers?: string[];
|
|
150
|
-
/** Skills this agent may choose — see TeamAgent.grantedSkills. Not `enabledSkills`. */
|
|
151
|
-
grantedSkills?: string[];
|
|
152
150
|
/**
|
|
153
|
-
*
|
|
154
|
-
*
|
|
151
|
+
* Skills this agent may choose. undefined = never asked, [] = none.
|
|
152
|
+
*
|
|
153
|
+
* ⚠️ THERE USED TO BE A SECOND FIELD HERE, `enabledSkills`, holding MACRO ids with the
|
|
154
|
+
* OPPOSITE empty-semantics ("empty = all"). It was collected by a picker in both hosts,
|
|
155
|
+
* serialised, displayed — and never reached an agent factory in its life. Both pickers are
|
|
156
|
+
* deleted and the field with them. Old team files may still carry the key; it is ignored.
|
|
155
157
|
*/
|
|
156
|
-
|
|
158
|
+
grantedSkills?: string[];
|
|
157
159
|
/**
|
|
158
160
|
* Model tier for this agent (fast/balanced/powerful)
|
|
159
161
|
* Determines which model is used based on provider
|
|
@@ -190,9 +192,8 @@ export interface SerializedTeamAgent {
|
|
|
190
192
|
customGroups?: string[];
|
|
191
193
|
/** See TeamAgentConfig.mcpServers — undefined means a pre-grants agent, which reaches all. */
|
|
192
194
|
mcpServers?: string[];
|
|
193
|
-
/** Skills this agent may choose
|
|
195
|
+
/** Skills this agent may choose. undefined = never asked, [] = none. */
|
|
194
196
|
grantedSkills?: string[];
|
|
195
|
-
enabledSkills?: string[];
|
|
196
197
|
modelTier?: ModelTier;
|
|
197
198
|
autoApproveHandoff?: boolean;
|
|
198
199
|
agentState?: AgentState;
|
|
@@ -32,7 +32,19 @@ export interface WorkshopModelTier {
|
|
|
32
32
|
label: string;
|
|
33
33
|
description: string;
|
|
34
34
|
}
|
|
35
|
-
|
|
35
|
+
/**
|
|
36
|
+
* A MACRO, with the tools its text assumes.
|
|
37
|
+
*
|
|
38
|
+
* ⚠️ IT WAS CALLED WorkshopSkillDef, AND THAT NAME BUILT A WHOLE WRONG SCREEN. The contents are
|
|
39
|
+
* `MACRO_REQUIREMENTS` verbatim — the same 13 ids — but the field was called `skills`, so both
|
|
40
|
+
* agent editors rendered it as a catalogue of Skills the agent may use. It is not: these are
|
|
41
|
+
* macros, which a USER types, and an agent cannot "be restricted to" one. That is why the
|
|
42
|
+
* resulting control could only ever offer 13 of ~55 and why it enforced nothing.
|
|
43
|
+
*
|
|
44
|
+
* Skills — the kind a model chooses — come from `loadInstalledSkills()` and are granted per
|
|
45
|
+
* agent through `grantedSkills`. A grants UI must read THAT, never this.
|
|
46
|
+
*/
|
|
47
|
+
export interface WorkshopMacroDef {
|
|
36
48
|
id: string;
|
|
37
49
|
label: string;
|
|
38
50
|
category: string;
|
|
@@ -50,10 +62,10 @@ export interface AgentWorkshopData {
|
|
|
50
62
|
toolProfiles: WorkshopToolProfile[];
|
|
51
63
|
/** Model tiers */
|
|
52
64
|
modelTiers: WorkshopModelTier[];
|
|
53
|
-
/**
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
|
|
65
|
+
/** Macros with the tools their text assumes. NOT Skills — see WorkshopMacroDef. */
|
|
66
|
+
macros: WorkshopMacroDef[];
|
|
67
|
+
/** Macro category names in display order */
|
|
68
|
+
macroCategories: string[];
|
|
57
69
|
}
|
|
58
70
|
/**
|
|
59
71
|
* Build the complete workshop data from SDK constants.
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { PREDEFINED_ROLE_IDS, ROLE_METADATA, ROLE_EXPERTISE, ROLE_GROUPS, ROLE_COPY, } from './types.js';
|
|
9
9
|
import { PROFILE_INFO } from './tool-config.js';
|
|
10
|
-
import {
|
|
10
|
+
import { MACRO_REQUIREMENTS, getMacrosByCategory } from './macro-requirements.js';
|
|
11
11
|
// =============================================================================
|
|
12
12
|
// Builder
|
|
13
13
|
// =============================================================================
|
|
@@ -25,7 +25,7 @@ function getRoleGroup(roleId) {
|
|
|
25
25
|
* Prettify a skill ID into a human-readable label.
|
|
26
26
|
* "code-review" → "Code Review", "prd" → "PRD"
|
|
27
27
|
*/
|
|
28
|
-
function
|
|
28
|
+
function macroLabel(id) {
|
|
29
29
|
// Special cases
|
|
30
30
|
const special = { prd: 'PRD' };
|
|
31
31
|
if (special[id])
|
|
@@ -35,9 +35,9 @@ function skillLabel(id) {
|
|
|
35
35
|
/**
|
|
36
36
|
* Find which category a skill belongs to.
|
|
37
37
|
*/
|
|
38
|
-
function
|
|
39
|
-
for (const [cat,
|
|
40
|
-
if (
|
|
38
|
+
function getMacroCategory(macroId, categories) {
|
|
39
|
+
for (const [cat, members] of Object.entries(categories)) {
|
|
40
|
+
if (members.includes(macroId)) {
|
|
41
41
|
// Capitalize category name
|
|
42
42
|
return cat.charAt(0).toUpperCase() + cat.slice(1);
|
|
43
43
|
}
|
|
@@ -88,24 +88,24 @@ export function buildAgentWorkshopData(suggestedRolesMap) {
|
|
|
88
88
|
},
|
|
89
89
|
{ id: 'powerful', label: 'Powerful', description: 'Best reasoning for complex tasks' },
|
|
90
90
|
];
|
|
91
|
-
//
|
|
92
|
-
const categories =
|
|
93
|
-
const
|
|
91
|
+
// Macros
|
|
92
|
+
const categories = getMacrosByCategory();
|
|
93
|
+
const macros = Object.entries(MACRO_REQUIREMENTS).map(([id, req]) => ({
|
|
94
94
|
id,
|
|
95
|
-
label:
|
|
96
|
-
category:
|
|
95
|
+
label: macroLabel(id),
|
|
96
|
+
category: getMacroCategory(id, categories),
|
|
97
97
|
requiredTools: req.required,
|
|
98
98
|
optionalTools: req.optional ?? [],
|
|
99
99
|
}));
|
|
100
|
-
const
|
|
100
|
+
const macroCategories = Object.keys(categories).map((c) => c.charAt(0).toUpperCase() + c.slice(1));
|
|
101
101
|
return {
|
|
102
102
|
roles,
|
|
103
103
|
roleGroupOrder,
|
|
104
104
|
suggestedRoles: suggestedRolesMap ?? {},
|
|
105
105
|
toolProfiles,
|
|
106
106
|
modelTiers,
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
macros,
|
|
108
|
+
macroCategories,
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
111
|
/**
|
package/package.json
CHANGED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Skill Metadata Registry
|
|
3
|
-
*
|
|
4
|
-
* Maps skill IDs to UI metadata (label, icon, category).
|
|
5
|
-
* This is the single source of truth — the desktop reads this via IPC.
|
|
6
|
-
*/
|
|
7
|
-
import type { SkillMeta } from './types.js';
|
|
8
|
-
/** All skill UI metadata — platform skills + builtin skills */
|
|
9
|
-
export declare const SKILL_META_REGISTRY: Record<string, SkillMeta>;
|
|
10
|
-
/**
|
|
11
|
-
* Get skill metadata by ID.
|
|
12
|
-
*/
|
|
13
|
-
export declare function getSkillMeta(skillId: string): SkillMeta | undefined;
|
|
14
|
-
/**
|
|
15
|
-
* Get all skill metadata entries.
|
|
16
|
-
*/
|
|
17
|
-
export declare function getAllSkillMeta(): SkillMeta[];
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Book Skills
|
|
3
|
-
*
|
|
4
|
-
* book-outline, character-design, plot-threads, scene-breakdown, book-review
|
|
5
|
-
*/
|
|
6
|
-
export declare const bookOutlineSkill: import("@compilr-dev/agents").Skill;
|
|
7
|
-
export declare const characterDesignSkill: import("@compilr-dev/agents").Skill;
|
|
8
|
-
export declare const plotThreadsSkill: import("@compilr-dev/agents").Skill;
|
|
9
|
-
export declare const sceneBreakdownSkill: import("@compilr-dev/agents").Skill;
|
|
10
|
-
export declare const bookReviewSkill: import("@compilr-dev/agents").Skill;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Business Plan Skills
|
|
3
|
-
*
|
|
4
|
-
* business-vision, market-analysis, competitor-analysis, financial-model, pitch-outline, business-review
|
|
5
|
-
*/
|
|
6
|
-
export declare const businessVisionSkill: import("@compilr-dev/agents").Skill;
|
|
7
|
-
export declare const marketAnalysisSkill: import("@compilr-dev/agents").Skill;
|
|
8
|
-
export declare const competitorAnalysisSkill: import("@compilr-dev/agents").Skill;
|
|
9
|
-
export declare const financialModelSkill: import("@compilr-dev/agents").Skill;
|
|
10
|
-
export declare const pitchOutlineSkill: import("@compilr-dev/agents").Skill;
|
|
11
|
-
export declare const businessReviewSkill: import("@compilr-dev/agents").Skill;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Canvas Skills
|
|
3
|
-
*
|
|
4
|
-
* canvas — author and edit a visual canvas (infographic, carousel, or board)
|
|
5
|
-
* rendered from sandboxed HTML/SVG, optionally with live "Tweaks" controls.
|
|
6
|
-
*/
|
|
7
|
-
export declare const canvasSkill: import("@compilr-dev/agents").Skill;
|
|
8
|
-
export declare const infographicSkill: import("@compilr-dev/agents").Skill;
|
|
9
|
-
export declare const carouselSkill: import("@compilr-dev/agents").Skill;
|
|
10
|
-
export declare const boardSkill: import("@compilr-dev/agents").Skill;
|
|
11
|
-
export declare const canvasStylesSkill: import("@compilr-dev/agents").Skill;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Content & Marketing Skills
|
|
3
|
-
*
|
|
4
|
-
* brand-setup, content-strategy, content-calendar, create-content, content-review
|
|
5
|
-
*/
|
|
6
|
-
export declare const brandSetupSkill: import("@compilr-dev/agents").Skill;
|
|
7
|
-
export declare const contentStrategySkill: import("@compilr-dev/agents").Skill;
|
|
8
|
-
export declare const contentCalendarSkill: import("@compilr-dev/agents").Skill;
|
|
9
|
-
export declare const createContentSkill: import("@compilr-dev/agents").Skill;
|
|
10
|
-
export declare const contentReviewSkill: import("@compilr-dev/agents").Skill;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Course / Training Skills
|
|
3
|
-
*
|
|
4
|
-
* curriculum-design, lesson-plan, assessment-design, course-review
|
|
5
|
-
*/
|
|
6
|
-
export declare const curriculumDesignSkill: import("@compilr-dev/agents").Skill;
|
|
7
|
-
export declare const lessonPlanSkill: import("@compilr-dev/agents").Skill;
|
|
8
|
-
export declare const assessmentDesignSkill: import("@compilr-dev/agents").Skill;
|
|
9
|
-
export declare const courseReviewSkill: import("@compilr-dev/agents").Skill;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Platform Skills — Aggregate
|
|
3
|
-
*
|
|
4
|
-
* Re-exports all domain-specific skills and provides the combined platformSkills array.
|
|
5
|
-
* Individual skill files: software-skills.ts, research-skills.ts, business-skills.ts, content-skills.ts
|
|
6
|
-
*/
|
|
7
|
-
import type { Skill } from '@compilr-dev/agents';
|
|
8
|
-
export { designSkill, sketchSkill, prdSkill, refineSkill, refineItemSkill, architectureSkill, sessionNotesSkill, buildSkill, scaffoldSkill, } from './software-skills.js';
|
|
9
|
-
export { outlineSkill, literatureReviewSkill, draftSectionSkill, peerReviewSkill, researchScaffoldSkill, } from './research-skills.js';
|
|
10
|
-
export { businessVisionSkill, marketAnalysisSkill, competitorAnalysisSkill, financialModelSkill, pitchOutlineSkill, businessReviewSkill, } from './business-skills.js';
|
|
11
|
-
export { brandSetupSkill, contentStrategySkill, contentCalendarSkill, createContentSkill, contentReviewSkill, } from './content-skills.js';
|
|
12
|
-
export { curriculumDesignSkill, lessonPlanSkill, assessmentDesignSkill, courseReviewSkill, } from './course-skills.js';
|
|
13
|
-
export { bookOutlineSkill, characterDesignSkill, plotThreadsSkill, sceneBreakdownSkill, bookReviewSkill, } from './book-skills.js';
|
|
14
|
-
export { canvasSkill, infographicSkill, carouselSkill, boardSkill, canvasStylesSkill, } from './canvas-skills.js';
|
|
15
|
-
export { canvasExemplarInfographicSkill, canvasExemplarAppScreenSkill, } from './canvas-exemplars.js';
|
|
16
|
-
export { canvasIconsSkill } from './canvas-icons.js';
|
|
17
|
-
/**
|
|
18
|
-
* All platform-specific skills (38 total).
|
|
19
|
-
*/
|
|
20
|
-
export declare const platformSkills: Skill[];
|