@compilr-dev/sdk 0.20.3 → 0.21.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/team/team-agent.d.ts +12 -0
- package/dist/team/team-agent.js +25 -0
- package/dist/team/types.d.ts +7 -0
- package/package.json +1 -1
|
@@ -31,6 +31,8 @@ export interface TeamAgentUpdate {
|
|
|
31
31
|
mascot?: MascotExpression;
|
|
32
32
|
description?: string;
|
|
33
33
|
systemPromptAddition?: string;
|
|
34
|
+
/** Tone only. Composed into the prompt at build time — see `TeamAgent.personality`. */
|
|
35
|
+
personality?: string;
|
|
34
36
|
toolProfile?: TeamAgentConfig['toolProfile'];
|
|
35
37
|
toolFilter?: string[];
|
|
36
38
|
enabledSkills?: string[];
|
|
@@ -149,6 +151,16 @@ export declare class TeamAgent {
|
|
|
149
151
|
* Enabled skills (empty = all skills)
|
|
150
152
|
*/
|
|
151
153
|
enabledSkills?: string[];
|
|
154
|
+
/**
|
|
155
|
+
* How the agent should sound. Tone only — never capability.
|
|
156
|
+
*
|
|
157
|
+
* ⚠️ COMPOSED AT `initialize()`, NEVER STORED INSIDE `systemPromptAddition`. Baking it in
|
|
158
|
+
* at write time is what leaves a stale sentence behind after an edit — the same defect the
|
|
159
|
+
* custom-agent path has, where a display name rendered once at creation survives every
|
|
160
|
+
* later rename. Composing it on each build means it cannot go stale, and editing your
|
|
161
|
+
* instructions cannot silently delete it.
|
|
162
|
+
*/
|
|
163
|
+
personality?: string;
|
|
152
164
|
/**
|
|
153
165
|
* Auto-approve handoffs from this agent without user confirmation
|
|
154
166
|
*/
|
package/dist/team/team-agent.js
CHANGED
|
@@ -149,6 +149,16 @@ export class TeamAgent {
|
|
|
149
149
|
* Enabled skills (empty = all skills)
|
|
150
150
|
*/
|
|
151
151
|
enabledSkills;
|
|
152
|
+
/**
|
|
153
|
+
* How the agent should sound. Tone only — never capability.
|
|
154
|
+
*
|
|
155
|
+
* ⚠️ COMPOSED AT `initialize()`, NEVER STORED INSIDE `systemPromptAddition`. Baking it in
|
|
156
|
+
* at write time is what leaves a stale sentence behind after an edit — the same defect the
|
|
157
|
+
* custom-agent path has, where a display name rendered once at creation survives every
|
|
158
|
+
* later rename. Composing it on each build means it cannot go stale, and editing your
|
|
159
|
+
* instructions cannot silently delete it.
|
|
160
|
+
*/
|
|
161
|
+
personality;
|
|
152
162
|
/**
|
|
153
163
|
* Auto-approve handoffs from this agent without user confirmation
|
|
154
164
|
*/
|
|
@@ -193,6 +203,7 @@ export class TeamAgent {
|
|
|
193
203
|
this.toolFilter = config.toolFilter;
|
|
194
204
|
this.toolProfile = config.toolProfile;
|
|
195
205
|
this.enabledSkills = config.enabledSkills;
|
|
206
|
+
this.personality = config.personality;
|
|
196
207
|
this.autoApproveHandoff = config.autoApproveHandoff;
|
|
197
208
|
this._modelTier = config.modelTier;
|
|
198
209
|
this.agentConfig = config.agentConfig ?? {};
|
|
@@ -281,6 +292,7 @@ export class TeamAgent {
|
|
|
281
292
|
applyUpdate(patch) {
|
|
282
293
|
const needsRebuild = (patch.systemPromptAddition !== undefined &&
|
|
283
294
|
patch.systemPromptAddition !== this.systemPromptAddition) ||
|
|
295
|
+
(patch.personality !== undefined && patch.personality !== this.personality) ||
|
|
284
296
|
(patch.toolProfile !== undefined && patch.toolProfile !== this.toolProfile) ||
|
|
285
297
|
(patch.toolFilter !== undefined && !sameStrings(patch.toolFilter, this.toolFilter)) ||
|
|
286
298
|
(patch.enabledSkills !== undefined && !sameStrings(patch.enabledSkills, this.enabledSkills));
|
|
@@ -299,6 +311,8 @@ export class TeamAgent {
|
|
|
299
311
|
this.description = patch.description;
|
|
300
312
|
if (patch.systemPromptAddition !== undefined)
|
|
301
313
|
this.systemPromptAddition = patch.systemPromptAddition;
|
|
314
|
+
if (patch.personality !== undefined)
|
|
315
|
+
this.personality = patch.personality;
|
|
302
316
|
/*
|
|
303
317
|
⚠️ THE PROFILE IS A LABEL; `toolFilter` IS THE ENFORCEMENT. `initialize()` passes
|
|
304
318
|
`toolFilter` to the factory and never looks at `toolProfile`, so setting the profile
|
|
@@ -361,6 +375,15 @@ export class TeamAgent {
|
|
|
361
375
|
finalSystemPromptAddition = finalSystemPromptAddition
|
|
362
376
|
? `${identityBlock}\n\n${finalSystemPromptAddition}`
|
|
363
377
|
: identityBlock;
|
|
378
|
+
/*
|
|
379
|
+
⚠️ TONE, COMPOSED HERE RATHER THAN STORED. Appending it to the stored
|
|
380
|
+
`systemPromptAddition` at write time would leave a stale sentence behind on the next
|
|
381
|
+
edit, and would put generated text inside the field the user edits by hand — where
|
|
382
|
+
their next save silently deletes it.
|
|
383
|
+
*/
|
|
384
|
+
if (this.personality?.trim()) {
|
|
385
|
+
finalSystemPromptAddition += `\n\nYour manner: ${this.personality.trim()} This affects tone only, never what you are willing or able to do.`;
|
|
386
|
+
}
|
|
364
387
|
// Inject shared context if provided (excluding roster — that goes via anchor for live updates)
|
|
365
388
|
if (sharedContext) {
|
|
366
389
|
const sharedContextBlock = sharedContext.format({ excludeRoster: true });
|
|
@@ -547,6 +570,7 @@ export class TeamAgent {
|
|
|
547
570
|
role: this.role,
|
|
548
571
|
description: this.description,
|
|
549
572
|
systemPromptAddition: this.systemPromptAddition,
|
|
573
|
+
personality: this.personality,
|
|
550
574
|
useMinimalSystemPrompt: this.useMinimalSystemPrompt,
|
|
551
575
|
noTools: this.noTools,
|
|
552
576
|
toolFilter: this.toolFilter,
|
|
@@ -571,6 +595,7 @@ export class TeamAgent {
|
|
|
571
595
|
role: data.role,
|
|
572
596
|
description: data.description,
|
|
573
597
|
systemPromptAddition: data.systemPromptAddition,
|
|
598
|
+
personality: data.personality,
|
|
574
599
|
useMinimalSystemPrompt: data.useMinimalSystemPrompt,
|
|
575
600
|
noTools: data.noTools,
|
|
576
601
|
toolFilter,
|
package/dist/team/types.d.ts
CHANGED
|
@@ -112,6 +112,11 @@ export interface TeamAgentConfig {
|
|
|
112
112
|
* Appended to the base system prompt
|
|
113
113
|
*/
|
|
114
114
|
systemPromptAddition?: string;
|
|
115
|
+
/**
|
|
116
|
+
* How the agent should sound. Tone only — composed into the prompt at build time so it
|
|
117
|
+
* cannot go stale and cannot be deleted by editing the instructions.
|
|
118
|
+
*/
|
|
119
|
+
personality?: string;
|
|
115
120
|
/**
|
|
116
121
|
* Use minimal system prompt - skip all modules, just use role prompt
|
|
117
122
|
*/
|
|
@@ -162,6 +167,8 @@ export interface SerializedTeamAgent {
|
|
|
162
167
|
role: AgentRole;
|
|
163
168
|
description?: string;
|
|
164
169
|
systemPromptAddition?: string;
|
|
170
|
+
/** Tone. See TeamAgentConfig.personality. */
|
|
171
|
+
personality?: string;
|
|
165
172
|
useMinimalSystemPrompt?: boolean;
|
|
166
173
|
noTools?: boolean;
|
|
167
174
|
toolFilter?: string[];
|