opencode-work-context 0.4.4 → 0.4.5
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 +14 -10
- package/package.json +1 -1
- package/plugin/attention.js +2 -2
package/README.md
CHANGED
|
@@ -244,10 +244,12 @@ titles plus a controlled reason. Prompts, messages, tool output, secrets, raw
|
|
|
244
244
|
provider errors, and full project paths are never published. No daemon, socket,
|
|
245
245
|
terminal multiplexer integration, or arbitrary command is required.
|
|
246
246
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
247
|
+
On Linux, each newly created background attention also requests one best-effort
|
|
248
|
+
desktop notification when `notify-send` and a desktop DBus session are
|
|
249
|
+
available. This delivery is independent of the in-TUI toast, so cross-project
|
|
250
|
+
attention can appear both inside active OpenCode B and in the system notification
|
|
251
|
+
center. Desktop delivery is enabled by default. Disable it while retaining
|
|
252
|
+
in-TUI toasts and project-local attention indicators with:
|
|
251
253
|
|
|
252
254
|
```yaml
|
|
253
255
|
notifications:
|
|
@@ -257,8 +259,9 @@ notifications:
|
|
|
257
259
|
The package invokes the fixed `notify-send` executable directly without a shell
|
|
258
260
|
or configurable command. Missing commands, unsupported platforms, unavailable
|
|
259
261
|
desktop sessions, timeouts, and delivery errors are ignored so they cannot
|
|
260
|
-
interrupt TUI startup or event processing.
|
|
261
|
-
|
|
262
|
+
interrupt TUI startup or event processing. If the runtime channel is unavailable,
|
|
263
|
+
desktop delivery remains a best-effort fallback. Clicking a notification does
|
|
264
|
+
not navigate to its session in this release.
|
|
262
265
|
|
|
263
266
|
Background includes a linked native session that is not selected and any session
|
|
264
267
|
owned by an OpenCode instance other than the most recently active live instance.
|
|
@@ -269,10 +272,11 @@ foreground.
|
|
|
269
272
|
|
|
270
273
|
To verify cross-project delivery, install and load the TUI integration in two
|
|
271
274
|
projects, start work in linked session A, then interact with OpenCode B before A
|
|
272
|
-
finishes or asks a question. Expect a `Work Context` toast inside B
|
|
273
|
-
persistent `[ATTN]` marker in A.
|
|
274
|
-
|
|
275
|
-
|
|
275
|
+
finishes or asks a question. Expect a `Work Context` toast inside B, one system
|
|
276
|
+
notification, and a persistent `[ATTN]` marker in A. Open A's affected native
|
|
277
|
+
session to clear its marker. Set `notifications.desktop` to `false`, restart
|
|
278
|
+
OpenCode, and repeat to verify that the toast and marker remain without the
|
|
279
|
+
system notification.
|
|
276
280
|
|
|
277
281
|
Tools are registered by the installed server export and are not copied into the
|
|
278
282
|
project. Core and storage remain in the installed package; projects should not
|
package/package.json
CHANGED
package/plugin/attention.js
CHANGED
|
@@ -367,14 +367,14 @@ export const tui = async (api, options = {}) => {
|
|
|
367
367
|
try { options.onAttention?.(change); } catch {}
|
|
368
368
|
const context = change.contexts?.[0];
|
|
369
369
|
if (!context) return;
|
|
370
|
-
|
|
370
|
+
if (globalDelivery) globalChannel.publish({
|
|
371
371
|
dedupeKey: `${projectRoot}\0${change.sessionId}\0${change.attention.eventKey}`,
|
|
372
372
|
reason: context.reason,
|
|
373
373
|
projectTitle: path.basename(projectRoot),
|
|
374
374
|
workspaceTitle: context.workspaceTitle,
|
|
375
375
|
stageTitle: context.stageTitle,
|
|
376
376
|
});
|
|
377
|
-
|
|
377
|
+
void Promise.resolve(desktopNotifier.notify(context)).catch(() => {});
|
|
378
378
|
},
|
|
379
379
|
now: options.now,
|
|
380
380
|
});
|