orchestrix-yuri 4.7.1 โ 4.7.3
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.
|
@@ -129,7 +129,7 @@ class Dispatcher {
|
|
|
129
129
|
try {
|
|
130
130
|
const parsed = JSON.parse(line);
|
|
131
131
|
if (parsed.action) {
|
|
132
|
-
const valid = ['change', 'plan', 'develop', 'test', 'deploy', 'status', 'iterate', 'conversation'];
|
|
132
|
+
const valid = ['bugfix', 'change', 'plan', 'develop', 'test', 'deploy', 'status', 'iterate', 'conversation'];
|
|
133
133
|
if (valid.includes(parsed.action)) {
|
|
134
134
|
return {
|
|
135
135
|
action: parsed.action,
|
|
@@ -1404,6 +1404,57 @@ class PhaseOrchestrator {
|
|
|
1404
1404
|
this.onComplete('iterate', `๐ New iteration launched!\n\nSM is drafting stories in dev session: ${devSession}\nAgents will chain automatically via handoff-detector.`);
|
|
1405
1405
|
}
|
|
1406
1406
|
|
|
1407
|
+
// โโ Quick Fix โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
1408
|
+
|
|
1409
|
+
/**
|
|
1410
|
+
* Execute a quick bug fix via Dev agent.
|
|
1411
|
+
* Sends *quick-fix to the Dev window โ no scope assessment, immediate action.
|
|
1412
|
+
*
|
|
1413
|
+
* @param {string} projectRoot
|
|
1414
|
+
* @param {string} bugDesc โ description of the bug/issue
|
|
1415
|
+
* @returns {string} immediate status message
|
|
1416
|
+
*/
|
|
1417
|
+
startQuickFix(projectRoot, bugDesc) {
|
|
1418
|
+
if (this._phase) {
|
|
1419
|
+
return `โ ๏ธ Phase "${this._phase}" is already running. Finish it first or *cancel.`;
|
|
1420
|
+
}
|
|
1421
|
+
|
|
1422
|
+
this._projectRoot = projectRoot;
|
|
1423
|
+
this._phase = 'change';
|
|
1424
|
+
this._lastHash = '';
|
|
1425
|
+
this._stableCount = 0;
|
|
1426
|
+
|
|
1427
|
+
try {
|
|
1428
|
+
const scriptPath = path.join(SKILL_DIR, 'scripts', 'ensure-session.sh');
|
|
1429
|
+
const result = execSync(`bash "${scriptPath}" dev "${projectRoot}"`, {
|
|
1430
|
+
encoding: 'utf8', timeout: 60000,
|
|
1431
|
+
}).trim();
|
|
1432
|
+
const lines = result.split('\n');
|
|
1433
|
+
this._session = lines[lines.length - 1].trim();
|
|
1434
|
+
} catch (err) {
|
|
1435
|
+
this._phase = null;
|
|
1436
|
+
return `โ Failed to ensure dev session: ${err.message}`;
|
|
1437
|
+
}
|
|
1438
|
+
|
|
1439
|
+
// Reload Dev agent and send *quick-fix
|
|
1440
|
+
tmx.sendKeysWithEnter(this._session, 2, '/clear');
|
|
1441
|
+
execSync('sleep 2');
|
|
1442
|
+
tmx.sendKeysWithEnter(this._session, 2, '/o dev');
|
|
1443
|
+
execSync('sleep 12');
|
|
1444
|
+
|
|
1445
|
+
const safeBug = (bugDesc || 'bug fix').replace(/"/g, '\\"');
|
|
1446
|
+
tmx.sendKeysWithEnter(this._session, 2, `*quick-fix "${safeBug}"`);
|
|
1447
|
+
|
|
1448
|
+
// Poll for completion (reuses _pollChange which watches dev window 2)
|
|
1449
|
+
const pollInterval = this.config.phase_poll_interval || 30000;
|
|
1450
|
+
this._step = 0;
|
|
1451
|
+
this._changeContext = { scope: 'small', description: bugDesc };
|
|
1452
|
+
this._timer = setInterval(() => this._pollChange(), pollInterval);
|
|
1453
|
+
|
|
1454
|
+
log.engine(`Quick fix started: "${bugDesc.slice(0, 60)}..."`);
|
|
1455
|
+
return `๐ Quick fix started โ Dev *quick-fix\n\n"${bugDesc.slice(0, 100)}"\n\nI'll notify you when it's done.`;
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1407
1458
|
// โโ Change Management โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
1408
1459
|
|
|
1409
1460
|
/**
|
|
@@ -29,7 +29,14 @@ function capturePane(session, window, lines) {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
function sendKeys(session, window, text) {
|
|
32
|
-
|
|
32
|
+
// Escape all shell metacharacters inside double quotes: " $ ` \ !
|
|
33
|
+
const escaped = text
|
|
34
|
+
.replace(/\\/g, '\\\\')
|
|
35
|
+
.replace(/"/g, '\\"')
|
|
36
|
+
.replace(/`/g, '\\`')
|
|
37
|
+
.replace(/\$/g, '\\$')
|
|
38
|
+
.replace(/!/g, '\\!');
|
|
39
|
+
tmux(`send-keys -t "${session}:${window}" "${escaped}"`);
|
|
33
40
|
}
|
|
34
41
|
|
|
35
42
|
/**
|
package/lib/gateway/router.js
CHANGED
|
@@ -340,6 +340,13 @@ class Router {
|
|
|
340
340
|
this.history.append(msg.chatId, 'user', msg.text);
|
|
341
341
|
|
|
342
342
|
switch (classified.action) {
|
|
343
|
+
case 'bugfix': {
|
|
344
|
+
const desc = classified.description || msg.text;
|
|
345
|
+
const response = this.orchestrator.startQuickFix(projectRoot, desc);
|
|
346
|
+
this.history.append(msg.chatId, 'assistant', response.slice(0, 2000));
|
|
347
|
+
this._updateGlobalFocus(msg, projectRoot);
|
|
348
|
+
return { text: response };
|
|
349
|
+
}
|
|
343
350
|
case 'change': {
|
|
344
351
|
const desc = classified.description || msg.text;
|
|
345
352
|
msg.text = `*change ${desc}`;
|
package/package.json
CHANGED
|
@@ -7,7 +7,8 @@ Messages may include "[CONTEXT]" with the previous assistant response for refere
|
|
|
7
7
|
|
|
8
8
|
| Action | When to use | Examples |
|
|
9
9
|
|--------|-------------|---------|
|
|
10
|
-
|
|
|
10
|
+
| bugfix | User reports a bug, error, or specific problem that needs fixing | "่ฟไธช bug ไฟฎไธไธ", "Fix the login error", "้กต้ขๆฅ้ไบ", "ๆ้ฎ็นไบๆฒกๅๅบ", "่ฟไธช้ฎ้ขๅค็ไธไธ" |
|
|
11
|
+
| change | User wants work done: modify, add, redesign, create a plan, write something, have an agent do work (NOT a bug) | "่ฎฉ UX ้ๆฐ่ฎพ่ฎก็้ข", "Add dark mode", "ๅ
ๅไธชๅฎๆด็่ฎพ่ฎก plan", "ๅไธไปฝๆนๆก", "ไป PO ๅผๅงๆน" |
|
|
11
12
|
| plan | User explicitly wants to START the planning phase from scratch | "ๅผๅง่งๅ", "*plan" |
|
|
12
13
|
| develop | User explicitly wants to START development phase | "ๅผๅงๅผๅ", "*develop" |
|
|
13
14
|
| test | User wants to run tests | "่ทไธไธๆต่ฏ", "ๅ็ๆต่ฏ" |
|
|
@@ -24,7 +25,8 @@ Reply with EXACTLY this JSON format on a single line, nothing else:
|
|
|
24
25
|
|
|
25
26
|
## Critical Rules
|
|
26
27
|
|
|
27
|
-
- **
|
|
28
|
+
- **Bug vs Change**: If the user reports a bug, error, problem, or something broken โ "bugfix". If the user wants new work, redesign, or feature โ "change". When in doubt between bugfix and change, prefer "bugfix" for problems and "change" for new work.
|
|
29
|
+
- **Bias toward action**: If the user wants ANYTHING done (create, write, fix, modify, redesign, evaluate, plan something), classify as "change" or "bugfix". Never let work requests fall into "conversation".
|
|
28
30
|
- If the user is replying to a question with a choice/decision (e.g., "ๅ
ๅ plan" answering "่ฆ A ่ฟๆฏ B๏ผ"), that reply IS an instruction โ classify as "change", NOT "conversation".
|
|
29
31
|
- If the user references a specific agent role (UX, UI, architect, PM, QA, dev, SM) and wants them to do something, classify as "change".
|
|
30
32
|
- If the user asks about previous results, output, or progress, classify as "status".
|