@compilr-dev/sdk 0.9.9 → 0.9.10

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.
@@ -19,6 +19,8 @@ export interface CustomAgentDefinition {
19
19
  toolConfig?: ToolConfig;
20
20
  enabledSkills?: string[];
21
21
  modelTier?: ModelTier;
22
+ /** Custom instructions appended to the agent's system prompt (max 2000 chars) */
23
+ systemPromptAddition?: string;
22
24
  }
23
25
  export type { ToolConfig, ToolProfile };
24
26
  /**
@@ -65,4 +67,4 @@ export declare function isAgentIdTaken(id: string, existingCustomAgents: CustomA
65
67
  /**
66
68
  * Create a new CustomAgentDefinition with auto-assigned mascot.
67
69
  */
68
- export declare function createCustomAgentDefinition(id: string, displayName: string, specialty: string, personality: string | undefined, existingAgents: CustomAgentDefinition[], toolConfig?: ToolConfig, enabledSkills?: string[], modelTier?: ModelTier): CustomAgentDefinition;
70
+ export declare function createCustomAgentDefinition(id: string, displayName: string, specialty: string, personality: string | undefined, existingAgents: CustomAgentDefinition[], toolConfig?: ToolConfig, enabledSkills?: string[], modelTier?: ModelTier, systemPromptAddition?: string): CustomAgentDefinition;
@@ -62,6 +62,15 @@ export function generateCustomAgentSystemPrompt(agent) {
62
62
  }
63
63
  lines.push('');
64
64
  lines.push('Focus on your area of expertise. When questions fall outside your specialty, suggest which team member might be better suited to help.');
65
+ // Append custom instructions if provided
66
+ if (agent.systemPromptAddition?.trim()) {
67
+ lines.push('');
68
+ lines.push('---');
69
+ lines.push('');
70
+ lines.push('## Custom Instructions');
71
+ lines.push('');
72
+ lines.push(agent.systemPromptAddition.trim());
73
+ }
65
74
  // Add tool awareness if agent has tool restrictions
66
75
  const toolConfig = agent.toolConfig ?? createDefaultToolConfig();
67
76
  if (toolConfig.profile !== 'full') {
@@ -135,7 +144,7 @@ export function isAgentIdTaken(id, existingCustomAgents, teamAgentIds, predefine
135
144
  /**
136
145
  * Create a new CustomAgentDefinition with auto-assigned mascot.
137
146
  */
138
- export function createCustomAgentDefinition(id, displayName, specialty, personality, existingAgents, toolConfig, enabledSkills, modelTier) {
147
+ export function createCustomAgentDefinition(id, displayName, specialty, personality, existingAgents, toolConfig, enabledSkills, modelTier, systemPromptAddition) {
139
148
  return {
140
149
  id,
141
150
  displayName,
@@ -146,5 +155,6 @@ export function createCustomAgentDefinition(id, displayName, specialty, personal
146
155
  toolConfig: toolConfig ?? createDefaultToolConfig(),
147
156
  enabledSkills: enabledSkills ?? [], // Empty = all skills
148
157
  modelTier: modelTier ?? 'balanced', // Default tier
158
+ systemPromptAddition: systemPromptAddition?.trim() || undefined,
149
159
  };
150
160
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compilr-dev/sdk",
3
- "version": "0.9.9",
3
+ "version": "0.9.10",
4
4
  "description": "Universal agent runtime for building AI-powered applications",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",