mtech-ai-local-runner 0.1.69 → 0.1.70
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/README.md +4 -4
- package/dist/src/asks/alerter.js +10 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -192,10 +192,10 @@ notification naming that app ("It is in your Claude session."), since the person
|
|
|
192
192
|
shown because the person typed gets none. The Gateway's `shown_via` stays `rewake` or `stop`.
|
|
193
193
|
|
|
194
194
|
While the Gateway's sync says `ask_alert: true` for the person (their actor id is in
|
|
195
|
-
`AI_OPS_GATEWAY_WORK_ASK_AI_FIRST_ALERT_ACTOR_IDS`, empty by default), every ask notification is
|
|
196
|
-
`display alert` with Later and Open Claude or Open Codex that stays until it is closed and gives up after 10
|
|
197
|
-
|
|
198
|
-
|
|
195
|
+
`AI_OPS_GATEWAY_WORK_ASK_AI_FIRST_ALERT_ACTOR_IDS`, empty by default), every ask notification is the banner and also an
|
|
196
|
+
alert: a `display alert` with Later and Open Claude or Open Codex that stays until it is closed and gives up after 10
|
|
197
|
+
minutes. The banner stays in Notification Center if the alert is closed unread. Open runs `open -b` with that app's
|
|
198
|
+
bundle id. One alert is on screen at a time; while one is, the next notification is the banner only. The runner never waits for an alert, kills one still
|
|
199
199
|
open after 610 seconds, and closes it at shutdown. A sync without `ask_alert` turns alerts off; the session-open wait
|
|
200
200
|
leaves the last value.
|
|
201
201
|
|
package/dist/src/asks/alerter.js
CHANGED
|
@@ -2,8 +2,8 @@ import { execFile, spawn as nodeSpawn } from "node:child_process";
|
|
|
2
2
|
import { promisify } from "node:util";
|
|
3
3
|
import { OSASCRIPT, notificationText } from "./notifier.js";
|
|
4
4
|
/*
|
|
5
|
-
* Ask notifications as an alert that stays until it is closed (Work Item 643dc395, spec 2026-10-29, C)
|
|
6
|
-
* while the Gateway's sync says alerts are on for this person (ask_alert). One alert at a time, and the runner never
|
|
5
|
+
* Ask notifications as an alert that stays until it is closed (Work Item 643dc395, spec 2026-10-29, C), shown beside
|
|
6
|
+
* the banner while the Gateway's sync says alerts are on for this person (ask_alert). One alert at a time, and the runner never
|
|
7
7
|
* waits for it to close, so it holds no delivery handling and no shutdown. The text and the Open label reach
|
|
8
8
|
* AppleScript as arguments, never as script source, and nothing runs through a shell.
|
|
9
9
|
*/
|
|
@@ -110,17 +110,18 @@ export function createAlerter(deps = {}) {
|
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
112
|
/**
|
|
113
|
-
* The runner's notifier: the alert while alerts are on and none is open
|
|
114
|
-
*
|
|
115
|
-
* the
|
|
113
|
+
* The runner's notifier: always the banner, and also the alert while alerts are on and none is open. The owner chose
|
|
114
|
+
* both on 2026-10-29: the alert stays until it is closed, and the banner stays in Notification Center if it is closed
|
|
115
|
+
* unread. The alert's app is the one the delivery is in, else the app of the most recent session with a typed prompt.
|
|
116
|
+
* The delivery counts as shown when either was.
|
|
116
117
|
*/
|
|
117
118
|
export function withAlerts(banner, alerter, deps) {
|
|
118
119
|
return async (item, options = {}) => {
|
|
120
|
+
const bannerShown = await banner(item, options);
|
|
119
121
|
if (!deps.alertsOn() || alerter.busy)
|
|
120
|
-
return
|
|
122
|
+
return bannerShown;
|
|
121
123
|
const app = options.shownIn ?? options.heldIn ?? options.openedApp ?? deps.fallbackApp();
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
return banner(item, options);
|
|
124
|
+
const alertShown = await alerter.show(notificationText(item, options), app);
|
|
125
|
+
return bannerShown || alertShown;
|
|
125
126
|
};
|
|
126
127
|
}
|