@huynle/hub 0.7.2 → 0.7.4

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.
@@ -28,8 +28,8 @@
28
28
  <link rel="icon" href="/icon.svg" type="image/svg+xml" />
29
29
  <link rel="icon" href="/icon-192.png" type="image/png" sizes="192x192" />
30
30
  <link rel="apple-touch-icon" href="/apple-touch-icon.png" />
31
- <script type="module" crossorigin src="/assets/index-DWnMhXk9.js"></script>
32
- <link rel="stylesheet" crossorigin href="/assets/index-DmUXEnw9.css">
31
+ <script type="module" crossorigin src="/assets/index-FUJbj_Du.js"></script>
32
+ <link rel="stylesheet" crossorigin href="/assets/index-Dm8OmkaO.css">
33
33
  </head>
34
34
  <body>
35
35
  <div id="root"></div>
package/web/dist/sw.js CHANGED
@@ -17,6 +17,7 @@ const VIBRATE = {
17
17
  decision: [200, 100, 200],
18
18
  message: [150, 80, 150],
19
19
  failed: [300],
20
+ providerError: [300, 100, 300],
20
21
  subagentFailed: [300],
21
22
  jobFailed: [300],
22
23
  done: [100, 60, 100],
@@ -98,6 +99,8 @@ self.addEventListener("push", (event) => {
98
99
  const sessionID = typeof data.sessionID === "string" ? data.sessionID : ""
99
100
  const kind = typeof data.kind === "string" ? data.kind : "update"
100
101
  const requestID = typeof data.requestID === "string" ? data.requestID : ""
102
+ // Per-session kinds (a root's and a subagent's provider error) keep one notification each.
103
+ const tagKey = typeof data.tagKey === "string" && /^ses_[A-Za-z0-9]{1,64}$/.test(data.tagKey) ? data.tagKey : ""
101
104
  const decisionID = kind === "decision" && typeof data.decisionID === "string" && /^dec_[A-Za-z0-9]{1,64}$/.test(data.decisionID) ? data.decisionID : ""
102
105
  event.waitUntil(
103
106
  (async () => {
@@ -125,7 +128,7 @@ self.addEventListener("push", (event) => {
125
128
  await self.registration.showNotification(data.title || "Hub", {
126
129
  body,
127
130
  // One notification per session and kind (a test one does not replace a real one).
128
- tag: `${data.test ? "test:" : ""}${sessionID}:${kind}`,
131
+ tag: `${data.test ? "test:" : ""}${sessionID}:${kind}${tagKey && tagKey !== sessionID ? `:${tagKey}` : ""}`,
129
132
  renotify: !QUIET.has(kind),
130
133
  requireInteraction: STICKY.has(kind),
131
134
  vibrate: VIBRATE[kind] || [100],