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 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
- If the runtime channel or in-TUI toast API is unavailable, Linux falls back to
248
- one best-effort desktop notification when `notify-send` and a desktop DBus
249
- session are available. Desktop fallback is enabled by default. Disable it while
250
- retaining project-local attention indicators with:
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. Clicking a notification does not
261
- navigate to its session in this release.
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 and a
273
- persistent `[ATTN]` marker in A. Stop B or use an environment without a valid
274
- private `XDG_RUNTIME_DIR` to test the Linux desktop fallback. Open A's affected
275
- native session to clear its marker.
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "opencode-work-context",
3
3
  "type": "module",
4
- "version": "0.4.4",
4
+ "version": "0.4.5",
5
5
  "description": "Filesystem work-context core and OpenCode adapter",
6
6
  "license": "MIT",
7
7
  "author": {
@@ -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
- const published = globalDelivery && globalChannel.publish({
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
- if (!published) void Promise.resolve(desktopNotifier.notify(context)).catch(() => {});
377
+ void Promise.resolve(desktopNotifier.notify(context)).catch(() => {});
378
378
  },
379
379
  now: options.now,
380
380
  });