@rajat-rastogi/maestro 0.2.6 → 0.4.0
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/app/out/main/main.js +20 -3
- package/app/out/preload/preload.js +2 -0
- package/app/out/renderer/assets/{index-B6_qR_Gq.js → index-CAcCK5X-.js} +1274 -369
- package/app/out/renderer/index.html +1 -1
- package/dist/agent/install.js +2 -2
- package/dist/agent/install.js.map +1 -1
- package/package.json +1 -1
package/app/out/main/main.js
CHANGED
|
@@ -488,6 +488,12 @@ function registerSessionsIpc(sessionManager2) {
|
|
|
488
488
|
electron.ipcMain.handle("sessions:updateTags", async (_e, id, tags) => {
|
|
489
489
|
sessionManager2.updateTags(id, tags);
|
|
490
490
|
});
|
|
491
|
+
electron.ipcMain.handle("sessions:interrupt", async (_e, id) => {
|
|
492
|
+
sessionManager2.interrupt(id);
|
|
493
|
+
});
|
|
494
|
+
electron.ipcMain.handle("sessions:acknowledge", async (_e, id) => {
|
|
495
|
+
sessionManager2.acknowledge(id);
|
|
496
|
+
});
|
|
491
497
|
electron.ipcMain.handle("sessions:sendInput", async (_e, id, data) => {
|
|
492
498
|
sessionManager2.sendInput(id, data);
|
|
493
499
|
});
|
|
@@ -1571,7 +1577,7 @@ process.stdin.on('end', () => {
|
|
|
1571
1577
|
let status;
|
|
1572
1578
|
if (event === 'UserPromptSubmit' || event === 'PreToolUse') {
|
|
1573
1579
|
status = 'RUNNING';
|
|
1574
|
-
} else if (event === 'Stop' || event === 'Notification') {
|
|
1580
|
+
} else if (event === 'Stop' || event === 'Notification' || event === 'SessionStart') {
|
|
1575
1581
|
status = 'WAITING';
|
|
1576
1582
|
}
|
|
1577
1583
|
if (status) {
|
|
@@ -1603,7 +1609,7 @@ function ensureClaudeHooks() {
|
|
|
1603
1609
|
if (!settings.hooks) {
|
|
1604
1610
|
settings.hooks = {};
|
|
1605
1611
|
}
|
|
1606
|
-
const hookEvents = ["UserPromptSubmit", "PreToolUse", "Stop", "Notification"];
|
|
1612
|
+
const hookEvents = ["SessionStart", "UserPromptSubmit", "PreToolUse", "Stop", "Notification"];
|
|
1607
1613
|
let changed = false;
|
|
1608
1614
|
for (const event of hookEvents) {
|
|
1609
1615
|
if (!settings.hooks[event]) {
|
|
@@ -1673,7 +1679,7 @@ class SessionManager {
|
|
|
1673
1679
|
stateEnteredAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1674
1680
|
tags: {
|
|
1675
1681
|
...opts.tags,
|
|
1676
|
-
"machine": opts.machineId,
|
|
1682
|
+
"machine": machine?.name ?? opts.machineId,
|
|
1677
1683
|
"provider": opts.provider
|
|
1678
1684
|
},
|
|
1679
1685
|
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
@@ -1740,6 +1746,17 @@ class SessionManager {
|
|
|
1740
1746
|
const entry = this.entries.get(id);
|
|
1741
1747
|
if (entry) entry.session.tags = tags;
|
|
1742
1748
|
}
|
|
1749
|
+
/** Acknowledge a waiting/permission state — manually set to idle */
|
|
1750
|
+
acknowledge(id) {
|
|
1751
|
+
this.updateState(id, "idle", "high");
|
|
1752
|
+
}
|
|
1753
|
+
/** Send Ctrl+C to interrupt the running process, then clear the screen */
|
|
1754
|
+
interrupt(id) {
|
|
1755
|
+
const entry = this.entries.get(id);
|
|
1756
|
+
if (!entry) return;
|
|
1757
|
+
entry.adapter.write("");
|
|
1758
|
+
setTimeout(() => entry.adapter.write("\r"), 200);
|
|
1759
|
+
}
|
|
1743
1760
|
sendInput(id, data) {
|
|
1744
1761
|
this.entries.get(id)?.adapter.write(data);
|
|
1745
1762
|
}
|
|
@@ -79,6 +79,8 @@ electron.contextBridge.exposeInMainWorld("maestro", {
|
|
|
79
79
|
rename: (id, name) => electron.ipcRenderer.invoke("sessions:rename", id, name),
|
|
80
80
|
updateTags: (id, tags) => electron.ipcRenderer.invoke("sessions:updateTags", id, tags),
|
|
81
81
|
getBuffer: (id) => electron.ipcRenderer.invoke("sessions:getBuffer", id),
|
|
82
|
+
interrupt: (id) => electron.ipcRenderer.invoke("sessions:interrupt", id),
|
|
83
|
+
acknowledge: (id) => electron.ipcRenderer.invoke("sessions:acknowledge", id),
|
|
82
84
|
sendInput: (id, data) => electron.ipcRenderer.invoke("sessions:sendInput", id, data),
|
|
83
85
|
resize: (id, cols, rows) => electron.ipcRenderer.invoke("sessions:resize", id, cols, rows),
|
|
84
86
|
onData: (cb) => {
|