orchestrix-yuri 4.5.9 → 4.6.1
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.
|
@@ -374,10 +374,14 @@ async function callClaude(opts) {
|
|
|
374
374
|
// Build args
|
|
375
375
|
const args = ['-p', '--output-format', 'json', '--dangerously-skip-permissions'];
|
|
376
376
|
|
|
377
|
+
let systemPromptFile = null;
|
|
377
378
|
if (_sessionId) {
|
|
378
379
|
args.push('--resume', _sessionId);
|
|
379
380
|
} else {
|
|
380
|
-
|
|
381
|
+
// Write system prompt to temp file — too large for CLI argument
|
|
382
|
+
systemPromptFile = path.join(os.tmpdir(), `yuri-sp-${Date.now()}.txt`);
|
|
383
|
+
fs.writeFileSync(systemPromptFile, buildSystemPrompt());
|
|
384
|
+
args.push('--system-prompt-file', systemPromptFile);
|
|
381
385
|
}
|
|
382
386
|
|
|
383
387
|
args.push(prompt);
|
|
@@ -385,6 +389,11 @@ async function callClaude(opts) {
|
|
|
385
389
|
// Execute
|
|
386
390
|
const result = await runClaude(args, cwd, callTimeout);
|
|
387
391
|
|
|
392
|
+
// Cleanup system prompt temp file
|
|
393
|
+
if (systemPromptFile) {
|
|
394
|
+
try { fs.unlinkSync(systemPromptFile); } catch { /* ok */ }
|
|
395
|
+
}
|
|
396
|
+
|
|
388
397
|
// Store session ID for subsequent calls
|
|
389
398
|
if (result.sessionId) {
|
|
390
399
|
_sessionId = result.sessionId;
|
|
@@ -400,12 +409,15 @@ async function callClaude(opts) {
|
|
|
400
409
|
log.warn('Session may have expired, retrying with fresh session...');
|
|
401
410
|
clearSessionState();
|
|
402
411
|
|
|
412
|
+
const freshSpFile = path.join(os.tmpdir(), `yuri-sp-fresh-${Date.now()}.txt`);
|
|
413
|
+
fs.writeFileSync(freshSpFile, buildSystemPrompt());
|
|
403
414
|
const freshArgs = [
|
|
404
415
|
'-p', '--output-format', 'json', '--dangerously-skip-permissions',
|
|
405
|
-
'--system-prompt',
|
|
416
|
+
'--system-prompt-file', freshSpFile,
|
|
406
417
|
prompt,
|
|
407
418
|
];
|
|
408
419
|
const freshResult = await runClaude(freshArgs, cwd, callTimeout);
|
|
420
|
+
try { fs.unlinkSync(freshSpFile); } catch { /* ok */ }
|
|
409
421
|
if (freshResult.sessionId) {
|
|
410
422
|
_sessionId = freshResult.sessionId;
|
|
411
423
|
_messageCount = 1;
|
package/package.json
CHANGED
|
@@ -26,8 +26,9 @@ total_planned=0
|
|
|
26
26
|
if [ -d "$PRD_DIR" ]; then
|
|
27
27
|
for yaml in "$PRD_DIR"/epic-*.yaml; do
|
|
28
28
|
[ -f "$yaml" ] || continue
|
|
29
|
-
# Count
|
|
30
|
-
|
|
29
|
+
# Count story-level entries only (2-space indent: " - id:")
|
|
30
|
+
# Deeper indentation (4+ spaces) are acceptance_criteria, business_rules, etc.
|
|
31
|
+
n=$(grep -cE '^ - id:' "$yaml" 2>/dev/null || echo 0)
|
|
31
32
|
total_planned=$((total_planned + n))
|
|
32
33
|
done
|
|
33
34
|
fi
|