@hatchway/cli 0.50.61 → 0.50.62
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/index.js +28 -13
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -174,10 +174,14 @@ function getPlatformPluginDir() {
|
|
|
174
174
|
_pluginDir = findPluginDir();
|
|
175
175
|
if (_pluginDir) {
|
|
176
176
|
const names = listBundledSkills();
|
|
177
|
-
process.
|
|
177
|
+
if (process.env.SILENT_MODE !== '1') {
|
|
178
|
+
process.stderr.write(`[skills] Platform plugin: ${_pluginDir} (${names.length} skills: [${names.join(', ')}])\n`);
|
|
179
|
+
}
|
|
178
180
|
}
|
|
179
181
|
else {
|
|
180
|
-
process.
|
|
182
|
+
if (process.env.SILENT_MODE !== '1') {
|
|
183
|
+
process.stderr.write('[skills] Platform plugin directory not found\n');
|
|
184
|
+
}
|
|
181
185
|
Sentry.logger.error('Platform plugin directory not found — agent will run without core skills', {
|
|
182
186
|
candidatePaths: [
|
|
183
187
|
join(__dirname$3, 'skills', 'platform-plugin'),
|
|
@@ -4402,16 +4406,19 @@ function createNativeClaudeQuery(modelId = DEFAULT_CLAUDE_MODEL_ID, abortControl
|
|
|
4402
4406
|
// See: https://github.com/anthropics/claude-code/issues/2970
|
|
4403
4407
|
// See: https://github.com/anthropics/claude-agent-sdk-typescript/issues/46
|
|
4404
4408
|
abortController,
|
|
4405
|
-
// Capture SDK internal stderr to debug skill discovery
|
|
4409
|
+
// Capture SDK internal stderr to debug skill discovery (suppressed in TUI mode)
|
|
4406
4410
|
stderr: (data) => {
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4411
|
+
if (process.env.SILENT_MODE !== '1') {
|
|
4412
|
+
if (data.toLowerCase().includes('skill') || data.includes('add-dir') || data.includes('additional')) {
|
|
4413
|
+
process.stderr.write(`[native-sdk:stderr] ${data}\n`);
|
|
4414
|
+
}
|
|
4410
4415
|
}
|
|
4411
4416
|
},
|
|
4412
4417
|
};
|
|
4413
4418
|
debugLog$4();
|
|
4414
|
-
process.
|
|
4419
|
+
if (process.env.SILENT_MODE !== '1') {
|
|
4420
|
+
process.stderr.write(`[native-sdk] plugins: ${JSON.stringify(platformPlugins.map(p => p.path))}\n`);
|
|
4421
|
+
}
|
|
4415
4422
|
let messageCount = 0;
|
|
4416
4423
|
let toolCallCount = 0;
|
|
4417
4424
|
let textBlockCount = 0;
|
|
@@ -4443,9 +4450,11 @@ function createNativeClaudeQuery(modelId = DEFAULT_CLAUDE_MODEL_ID, abortControl
|
|
|
4443
4450
|
const discoveredSkills = initMsg.skills ?? [];
|
|
4444
4451
|
const loadedPlugins = initMsg.plugins ?? [];
|
|
4445
4452
|
const toolCount = (initMsg.tools ?? []).length;
|
|
4446
|
-
process.
|
|
4447
|
-
|
|
4448
|
-
|
|
4453
|
+
if (process.env.SILENT_MODE !== '1') {
|
|
4454
|
+
process.stderr.write(`[native-sdk] SDK init — skills: [${discoveredSkills.join(', ')}] (${discoveredSkills.length})\n`);
|
|
4455
|
+
process.stderr.write(`[native-sdk] SDK init — plugins: ${JSON.stringify(loadedPlugins)}\n`);
|
|
4456
|
+
process.stderr.write(`[native-sdk] SDK init — tools: ${toolCount} loaded\n`);
|
|
4457
|
+
}
|
|
4449
4458
|
if (discoveredSkills.length > 0) {
|
|
4450
4459
|
Sentry.logger.info('SDK initialized with skills', {
|
|
4451
4460
|
skillCount: String(discoveredSkills.length),
|
|
@@ -4471,7 +4480,9 @@ function createNativeClaudeQuery(modelId = DEFAULT_CLAUDE_MODEL_ID, abortControl
|
|
|
4471
4480
|
// Capture tool_use_summary messages — these indicate skill content loading
|
|
4472
4481
|
if (sdkMessage.type === 'tool_use_summary') {
|
|
4473
4482
|
const summaryMsg = sdkMessage;
|
|
4474
|
-
process.
|
|
4483
|
+
if (process.env.SILENT_MODE !== '1') {
|
|
4484
|
+
process.stderr.write(`[native-sdk] Tool use summary: ${summaryMsg.summary}\n`);
|
|
4485
|
+
}
|
|
4475
4486
|
}
|
|
4476
4487
|
// Log result messages
|
|
4477
4488
|
if (sdkMessage.type === 'result') {
|
|
@@ -9348,7 +9359,9 @@ function loadSkill(name) {
|
|
|
9348
9359
|
// Try next candidate
|
|
9349
9360
|
}
|
|
9350
9361
|
}
|
|
9351
|
-
process.
|
|
9362
|
+
if (process.env.SILENT_MODE !== '1') {
|
|
9363
|
+
process.stderr.write(`[skills] Could not load skill "${name}" from any path. Searched: ${candidates.join(', ')}\n`);
|
|
9364
|
+
}
|
|
9352
9365
|
return `[Skill "${name}" not found]`;
|
|
9353
9366
|
}
|
|
9354
9367
|
function composeSkills(context) {
|
|
@@ -9381,7 +9394,9 @@ function composeSkills(context) {
|
|
|
9381
9394
|
// Always: build verification
|
|
9382
9395
|
add('build-verification');
|
|
9383
9396
|
const totalChars = sections.reduce((sum, s) => sum + s.length, 0);
|
|
9384
|
-
|
|
9397
|
+
if (process.env.SILENT_MODE !== '1') {
|
|
9398
|
+
process.stderr.write(`[skills] Composed ${loaded.length} skills (${totalChars} chars) for agent=${context.agentId} isNew=${context.isNewProject} hasDesign=${context.hasDesignTags}: [${loaded.join(', ')}]\n`);
|
|
9399
|
+
}
|
|
9385
9400
|
return sections;
|
|
9386
9401
|
}
|
|
9387
9402
|
|