claude-code-templates 1.24.11 → 1.24.13
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.
|
@@ -232,14 +232,37 @@ Requirements:
|
|
|
232
232
|
- Do NOT include any explanations, ONLY code blocks with filenames`
|
|
233
233
|
: config.prompt;
|
|
234
234
|
|
|
235
|
+
// TEMPORARY SOLUTION: Load agent content manually and pass as systemPrompt
|
|
236
|
+
//
|
|
237
|
+
// NOTE: This is a workaround because the current version of @anthropic-ai/claude-agent-sdk
|
|
238
|
+
// does not properly support `settingSources: ['project']` for loading agents from .claude/
|
|
239
|
+
//
|
|
240
|
+
// FUTURE: Once the SDK properly supports settingSources, we should use:
|
|
241
|
+
// settingSources: ['project']
|
|
242
|
+
// instead of manually loading and passing the agent content.
|
|
243
|
+
//
|
|
244
|
+
// The SDK version ^0.1.0 is the latest available but seems to have issues with
|
|
245
|
+
// automatic agent loading. We need to revisit this in future SDK updates.
|
|
246
|
+
let agentSystemPrompt = '';
|
|
247
|
+
if (agents.length > 0) {
|
|
248
|
+
const agentPath = path.join(process.cwd(), '.claude', 'agents', `${agents[0].replace(/\//g, '-')}.md`);
|
|
249
|
+
if (fs.existsSync(agentPath)) {
|
|
250
|
+
agentSystemPrompt = fs.readFileSync(agentPath, 'utf-8');
|
|
251
|
+
log(`Loaded agent from: ${agentPath}`);
|
|
252
|
+
} else {
|
|
253
|
+
log(`Agent file not found: ${agentPath}`, 'warning');
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
235
257
|
// Configure Claude Agent SDK options
|
|
236
258
|
const options: ClaudeAgentOptions = {
|
|
237
259
|
model: 'claude-sonnet-4-5',
|
|
238
260
|
apiKey: config.anthropicApiKey,
|
|
239
|
-
// Use
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
261
|
+
// Use custom system prompt with agent content if available
|
|
262
|
+
// TODO: Replace with settingSources once SDK properly supports it
|
|
263
|
+
systemPrompt: agentSystemPrompt
|
|
264
|
+
? { type: 'text', text: agentSystemPrompt }
|
|
265
|
+
: { type: 'preset', preset: 'claude_code' },
|
|
243
266
|
};
|
|
244
267
|
|
|
245
268
|
// Collect the full response
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-code-templates",
|
|
3
|
-
"version": "1.24.
|
|
3
|
+
"version": "1.24.13",
|
|
4
4
|
"description": "CLI tool to setup Claude Code configurations with framework-specific commands, automation hooks and MCP Servers for your projects",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"bin": {
|