@nelsonlongxiang/dsh-open-a2a-net 0.6.31 → 0.6.32

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.
Files changed (88) hide show
  1. package/README.md +4 -1
  2. package/README_zh.md +3 -0
  3. package/assets/nexusDist/assets/index-D5H8R8de.js +9 -0
  4. package/assets/nexusDist/assets/index-D9GYZyGZ.css +1 -0
  5. package/assets/nexusDist/index.html +2 -2
  6. package/cli/a2a.mjs +445 -57
  7. package/lib/a2a-client.js +9 -4
  8. package/lib/auth-observer.js +254 -0
  9. package/lib/blob-store.js +210 -0
  10. package/lib/card.js +4 -2
  11. package/lib/cli-deposit.js +122 -7
  12. package/lib/client.js +64 -64
  13. package/lib/client.js.map +1 -1
  14. package/lib/faces/admin.js +133 -43
  15. package/lib/faces/canvas-notify.js +12 -3
  16. package/lib/faces/files.js +155 -0
  17. package/lib/faces/nodes.js +171 -0
  18. package/lib/faces/session-log.js +162 -0
  19. package/lib/faces/wire.js +206 -39
  20. package/lib/index.js +809 -1720
  21. package/lib/joined-store.js +23 -0
  22. package/lib/ledger-conservation.js +97 -0
  23. package/lib/legacy/teams-bridge-inbound.js +156 -0
  24. package/lib/node-bind.js +534 -0
  25. package/lib/node-github.js +72 -0
  26. package/lib/node-self.js +453 -0
  27. package/lib/node-store.js +484 -0
  28. package/lib/node-tasks.js +342 -0
  29. package/lib/origin-claim.js +246 -0
  30. package/lib/peer-directory.js +134 -0
  31. package/lib/receipt.js +26 -1
  32. package/lib/skill/SKILL.md +3 -1
  33. package/lib/skill/references/cli.md +82 -3
  34. package/lib/skill/references/collaboration.md +126 -74
  35. package/lib/skill/references/discovery.md +29 -0
  36. package/lib/skill/references/intake.md +107 -0
  37. package/lib/skill/references/router.md +96 -0
  38. package/lib/skill/references/setup.md +2 -1
  39. package/lib/task-auth.js +483 -0
  40. package/lib/task-ledger.js +324 -12
  41. package/lib/team-store.js +24 -1
  42. package/lib/tools/act.js +383 -0
  43. package/lib/tools/files.js +201 -0
  44. package/lib/tools/info.js +684 -0
  45. package/lib/types/a2a-client.d.ts +10 -4
  46. package/lib/types/auth-observer.d.ts +110 -0
  47. package/lib/types/blob-store.d.ts +83 -0
  48. package/lib/types/cli-deposit.d.ts +38 -0
  49. package/lib/types/faces/admin.d.ts +14 -2
  50. package/lib/types/faces/canvas-notify.d.ts +4 -1
  51. package/lib/types/faces/files.d.ts +53 -0
  52. package/lib/types/faces/nodes.d.ts +69 -0
  53. package/lib/types/faces/session-log.d.ts +44 -0
  54. package/lib/types/faces/wire.d.ts +50 -5
  55. package/lib/types/index.d.ts +27 -0
  56. package/lib/types/joined-store.d.ts +9 -0
  57. package/lib/types/ledger-conservation.d.ts +77 -0
  58. package/lib/types/legacy/teams-bridge-inbound.d.ts +94 -0
  59. package/lib/types/node-bind.d.ts +220 -0
  60. package/lib/types/node-github.d.ts +35 -0
  61. package/lib/types/node-self.d.ts +178 -0
  62. package/lib/types/node-store.d.ts +180 -0
  63. package/lib/types/node-tasks.d.ts +121 -0
  64. package/lib/types/origin-claim.d.ts +119 -0
  65. package/lib/types/peer-directory.d.ts +39 -0
  66. package/lib/types/receipt.d.ts +12 -0
  67. package/lib/types/task-auth.d.ts +271 -0
  68. package/lib/types/task-ledger.d.ts +143 -6
  69. package/lib/types/team-store.d.ts +9 -0
  70. package/lib/types/tools/act.d.ts +52 -0
  71. package/lib/types/tools/files.d.ts +38 -0
  72. package/lib/types/tools/info.d.ts +102 -0
  73. package/lib/types/types.d.ts +6 -0
  74. package/nexus-stage/src/canvas-ops.ts +1 -1
  75. package/nexus-stage/src/federation.ts +1 -0
  76. package/nexus-stage/src/main.ts +41 -18
  77. package/nexus-stage/src/planning-member-handles.ts +34 -0
  78. package/nexus-stage/src/planning-mirror.ts +47 -3
  79. package/nexus-stage/src/planning-reachability.ts +28 -0
  80. package/nexus-stage/src/planning-types.ts +1 -1
  81. package/nexus-stage/src/planning-view.ts +29 -26
  82. package/nexus-stage/src/planning.css +4 -0
  83. package/nexus-stage/src/wb-directory.ts +13 -0
  84. package/nexus-stage/src/workbench.css +3 -0
  85. package/nexus-stage/src/workbench.ts +5 -1
  86. package/package.json +1 -1
  87. package/assets/nexusDist/assets/index-Dz8N80tI.css +0 -1
  88. package/assets/nexusDist/assets/index-jm-cFAhB.js +0 -9
@@ -14,6 +14,7 @@
14
14
  * and holds a mailbox for inbound deliveries (receipts land here; the CLI
15
15
  * polls while alive).
16
16
  */
17
+ import { randomUUID } from 'node:crypto';
17
18
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
18
19
  import { join } from 'node:path';
19
20
  import { verifyCard } from "./card.js";
@@ -27,11 +28,31 @@ export const CLI_DEPOSIT_TTL_MS = 4 * 60 * 60 * 1000;
27
28
  export const CLI_TOMBSTONE_CAP = 16;
28
29
  /** Owner ruling ①: <agent-name>/<uuid·8B>. The name is [a-z0-9-]{1,32}. */
29
30
  export const CLI_HANDLE_RE = /^([a-z0-9-]{1,32})\/([0-9a-f]{16})$/;
30
- const MAILBOX_CAP = 64;
31
+ /** A fresh mailbox epoch: any reader's seq cursor from another epoch is void. */
32
+ const newEpoch = () => randomUUID().replace(/-/g, '').slice(0, 12);
33
+ const isSeq = (n) => typeof n === 'number' && Number.isInteger(n) && n >= 1;
34
+ /** The public key a stored card was published with ('' when it does not parse: never equal to a verified key, so fail-closed). */
35
+ const publicKeyOf = (cardJson) => {
36
+ try {
37
+ const key = JSON.parse(cardJson)?.publicKey;
38
+ return typeof key === 'string' ? key : '';
39
+ }
40
+ catch {
41
+ return '';
42
+ }
43
+ };
44
+ export const MAILBOX_CAP = 64;
45
+ export const MAILBOX_TEXT_CAP = 4000;
31
46
  export class CliDepositStore {
32
47
  path;
33
48
  deposits = new Map();
34
49
  mailbox = new Map();
50
+ nextSeq = new Map();
51
+ dropped = new Map();
52
+ truncated = new Map();
53
+ epoch = newEpoch();
54
+ /** gh#113 review: true while the last write failed — the epoch on disk no longer matches memory. */
55
+ unpersisted = false;
35
56
  now;
36
57
  constructor(path, options) {
37
58
  this.path = path;
@@ -60,11 +81,17 @@ export class CliDepositStore {
60
81
  const ttl = Math.min(CLI_DEPOSIT_TTL_MS, CLI_DEPOSIT_TTL_MS);
61
82
  const at = this.now();
62
83
  const prior = this.deposits.get(handle);
84
+ // gh#137: same handle, same key. A live deposit or a tombstone pins the
85
+ // handle to the key it was published with; a different key is refused
86
+ // until the old deposit is revoked explicitly (a2a revoke), so a swap is
87
+ // a visible act, never a silent overwrite (an `init --force` collision).
88
+ if (prior !== undefined && publicKeyOf(prior.cardJson) !== verdict.card.publicKey) {
89
+ return { ok: false, error: `handle ${handle} is held by another key (${prior.expiredAt !== undefined ? 'offline' : 'live'} deposit) — revoke it first (a2a revoke), then publish` };
90
+ }
63
91
  // gh#47: a re-publish un-tombstones (expiredAt clears) and refreshes
64
92
  // the card — same handle, same key, back online.
65
93
  const row = { handle, name, cardJson, depositedAt: at, expiresAt: at + ttl };
66
94
  this.deposits.set(handle, row);
67
- void prior;
68
95
  this.pruneTombstones();
69
96
  this.persist();
70
97
  return { ok: true, handle, expiresAt: row.expiresAt };
@@ -123,13 +150,43 @@ export class CliDepositStore {
123
150
  }
124
151
  mail(handle, from, text) {
125
152
  const list = this.mailbox.get(handle) ?? [];
126
- list.unshift({ at: this.now(), from, text: text.slice(0, 4000) });
153
+ const seq = this.nextSeq.get(handle) ?? 1;
154
+ this.nextSeq.set(handle, seq + 1);
155
+ const cut = text.length > MAILBOX_TEXT_CAP;
156
+ if (cut)
157
+ this.truncated.set(handle, (this.truncated.get(handle) ?? 0) + 1);
158
+ list.unshift({ at: this.now(), from, text: cut ? text.slice(0, MAILBOX_TEXT_CAP) : text, seq, ...(cut ? { truncated: true, chars: text.length } : {}) });
159
+ // gh#113: the cap still holds, but what it pushes out is counted, not lost silently.
160
+ if (list.length > MAILBOX_CAP)
161
+ this.dropped.set(handle, (this.dropped.get(handle) ?? 0) + list.length - MAILBOX_CAP);
127
162
  this.mailbox.set(handle, list.slice(0, MAILBOX_CAP));
128
163
  this.persist();
129
164
  }
130
165
  readMail(handle) {
131
166
  return [...(this.mailbox.get(handle) ?? [])];
132
167
  }
168
+ /** gh#113: the mailbox with its seq bounds and loss counter; `afterSeq` keeps only newer rows. */
169
+ readMailbox(handle, afterSeq) {
170
+ const all = this.mailbox.get(handle) ?? [];
171
+ const next = this.nextSeq.get(handle) ?? 1;
172
+ return {
173
+ mail: afterSeq === undefined ? [...all] : all.filter(m => m.seq > afterSeq),
174
+ epoch: this.epoch,
175
+ next_seq: next,
176
+ oldest_seq: all.length === 0 ? next : Math.min(...all.map(m => m.seq)),
177
+ dropped: this.dropped.get(handle) ?? 0,
178
+ };
179
+ }
180
+ /** gh#113: fleet-wide loss counters for the state face (the team verifier reads them). */
181
+ mailStats() {
182
+ let dropped = 0;
183
+ let truncated = 0;
184
+ for (const n of this.dropped.values())
185
+ dropped += n;
186
+ for (const n of this.truncated.values())
187
+ truncated += n;
188
+ return { dropped, truncated };
189
+ }
133
190
  sweep() {
134
191
  const now = this.now();
135
192
  for (const [handle, row] of this.deposits) {
@@ -158,13 +215,26 @@ export class CliDepositStore {
158
215
  const mailbox = {};
159
216
  for (const [handle, list] of this.mailbox)
160
217
  mailbox[handle] = [...list];
161
- const snapshot = { deposits: [...this.deposits.values()], mailbox };
218
+ const snapshot = {
219
+ deposits: [...this.deposits.values()], mailbox, epoch: this.epoch,
220
+ nextSeq: Object.fromEntries(this.nextSeq), dropped: Object.fromEntries(this.dropped), truncated: Object.fromEntries(this.truncated),
221
+ };
162
222
  try {
163
223
  mkdirSync(join(this.path, '..'), { recursive: true });
164
224
  writeFileSync(this.path, JSON.stringify(snapshot), 'utf8');
225
+ this.unpersisted = false;
165
226
  }
166
227
  catch {
167
- // persistence best-effort; the deposit re-publishes self-heal
228
+ // Persistence stays best-effort (re-publishes self-heal), but a seq
229
+ // handed out from memory must never be handed out again after a
230
+ // restart under the same epoch: the disk still holds the older
231
+ // nextSeq, so a reader holding a newer seq would skip new mail.
232
+ // Leave the epoch on disk behind — readers of this memory-only run
233
+ // fall back to their `at` cursor after a restart (gh#113 review P2).
234
+ if (!this.unpersisted) {
235
+ this.unpersisted = true;
236
+ this.epoch = newEpoch();
237
+ }
168
238
  }
169
239
  }
170
240
  restore() {
@@ -177,11 +247,56 @@ export class CliDepositStore {
177
247
  this.deposits.set(row.handle, row);
178
248
  }
179
249
  }
250
+ // The epoch is kept only when the seq record that goes with it survived:
251
+ // an epoch without nextSeq would restart seq at 1 under the same name.
252
+ let keepEpoch = typeof snapshot.epoch === 'string' && snapshot.epoch !== '' && snapshot.nextSeq !== null && typeof snapshot.nextSeq === 'object';
253
+ const counts = (record, into) => {
254
+ let clean = true;
255
+ for (const [handle, n] of Object.entries(record ?? {})) {
256
+ if (typeof n === 'number' && Number.isInteger(n) && n >= 0)
257
+ into.set(handle, n);
258
+ else
259
+ clean = false;
260
+ }
261
+ return clean;
262
+ };
263
+ // A nextSeq value we cannot read, or a mailbox handle with no nextSeq,
264
+ // could hand out seq again under the kept epoch: start a new one.
265
+ if (!counts(snapshot.nextSeq, this.nextSeq))
266
+ keepEpoch = false;
267
+ for (const handle of Object.keys(snapshot.mailbox ?? {}))
268
+ if (!this.nextSeq.has(handle))
269
+ keepEpoch = false;
270
+ counts(snapshot.dropped, this.dropped);
271
+ counts(snapshot.truncated, this.truncated);
272
+ let renumbered = false;
180
273
  for (const [handle, list] of Object.entries(snapshot.mailbox ?? {})) {
181
- if (Array.isArray(list))
182
- this.mailbox.set(handle, list.filter(m => m !== null && typeof m === 'object'));
274
+ if (!Array.isArray(list))
275
+ continue;
276
+ const rows = list.filter((m) => m !== null && typeof m === 'object');
277
+ const seqs = rows.map(m => m.seq);
278
+ const sound = seqs.every(isSeq) && new Set(seqs).size === seqs.length &&
279
+ seqs.every((n, i) => i === 0 || n < seqs[i - 1]) && (this.nextSeq.get(handle) ?? 0) > Math.max(0, ...seqs);
280
+ if (sound) {
281
+ this.mailbox.set(handle, rows);
282
+ continue;
283
+ }
284
+ // A pre-gh#113 snapshot (no seq), or one whose seqs are not unique
285
+ // positive integers in newest-first order: number the whole handle
286
+ // afresh, oldest first, under a new epoch.
287
+ renumbered = true;
288
+ const numbered = [...rows].reverse().map((m, i) => ({ ...m, seq: i + 1 })).reverse();
289
+ this.mailbox.set(handle, numbered);
290
+ this.nextSeq.set(handle, numbered.length + 1);
183
291
  }
292
+ if (renumbered)
293
+ keepEpoch = false;
294
+ if (keepEpoch)
295
+ this.epoch = snapshot.epoch;
184
296
  this.sweep();
297
+ // Pin the epoch (and any renumbering) on disk now, so it does not change on every start.
298
+ if (!keepEpoch)
299
+ this.persist();
185
300
  }
186
301
  catch {
187
302
  // corrupt file: start empty (re-publish heals)
package/lib/client.js CHANGED
@@ -7,7 +7,7 @@ window.__ModuleLoader__.load({
7
7
  let react_jsx_runtime = require("react/jsx-runtime");
8
8
  let react = require("react");
9
9
  let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
10
- //#region ../../../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
10
+ //#region node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
11
11
  function r(e) {
12
12
  var t, f, n = "";
13
13
  if ("string" == typeof e || "number" == typeof e) n += e;
@@ -22,8 +22,8 @@ window.__ModuleLoader__.load({
22
22
  return n;
23
23
  }
24
24
  //#endregion
25
- //#region \0dsh-css:D:\workspace\dsh-open-a2a-net\tmp\release\0.6.31-4214a12\build\src\client\A2aControl.module.css.mjs
26
- const css = ".bd8Xqq_wrap{max-width:100%;display:inline-flex;position:relative}.bd8Xqq_trigger{align-items:center;gap:4px;display:inline-flex;position:relative}.bd8Xqq_unreadBadge{text-align:center;color:#fff;background:var(--dsh-accent,#4c8bf5);border-radius:7px;min-width:14px;height:14px;padding:0 3px;font-size:9px;line-height:14px;animation:2s ease-in-out infinite bd8Xqq_badgePulse;position:absolute;top:-6px;right:-8px}@keyframes bd8Xqq_badgePulse{0%,to{box-shadow:0 0 #4c8bf573}50%{box-shadow:0 0 0 4px #4c8bf500}}@media (prefers-reduced-motion:reduce){.bd8Xqq_unreadBadge{animation:none}}.bd8Xqq_popover{z-index:1100;border:1px solid var(--dsh-border,#2a2a30);background:var(--dsh-surface-raised,#1c1c22);border-radius:10px;flex-direction:column;gap:8px;width:320px;max-width:calc(100vw - 16px);max-height:60vh;padding:12px;display:flex;position:fixed;overflow-y:auto;box-shadow:0 8px 24px #00000059}.bd8Xqq_title{font-size:13px;font-weight:600}.bd8Xqq_sectionTitle{border-top:1px solid var(--dsh-border,#2a2a30);text-transform:uppercase;letter-spacing:.04em;opacity:.65;margin-top:4px;padding-top:8px;font-size:11px;font-weight:600}.bd8Xqq_stageRow{border-top:1px solid var(--dsh-border,#2a2a30);align-items:center;gap:8px;margin-top:4px;padding-top:8px;display:flex}.bd8Xqq_stageTitle{text-transform:uppercase;letter-spacing:.04em;opacity:.65;font-size:11px;font-weight:600}.bd8Xqq_stageLinks{gap:6px;display:flex}.bd8Xqq_stageLink{border:1px solid var(--dsh-border,#2a2a30);color:inherit;border-radius:999px;align-items:center;padding:3px 8px;font-size:11px;text-decoration:none;display:inline-flex}.bd8Xqq_stageLink:hover,.bd8Xqq_stageLink:focus-visible{border-color:var(--dsh-accent,#4c8bf5)}.bd8Xqq_empty{opacity:.7;font-size:12px}.bd8Xqq_row{border:1px solid #0000;border-radius:8px;align-items:center;gap:10px;padding:8px;display:flex}.bd8Xqq_joined{border-color:var(--dsh-border,#2a2a30)}.bd8Xqq_facts{text-align:left;min-width:0;color:inherit;font:inherit;cursor:pointer;background:0 0;border:none;border-radius:6px;flex-direction:column;flex:1;gap:2px;padding:2px 4px;display:flex}.bd8Xqq_facts:hover{background:var(--dsh-surface-hover,#ffffff0f)}.bd8Xqq_nameRow{align-items:center;gap:6px;display:flex}.bd8Xqq_stateDot{border-radius:50%;flex:none;width:7px;height:7px}.bd8Xqq_stateDot.bd8Xqq_live{background:var(--dsh-accent,#4c8bf5)}.bd8Xqq_stateDot.bd8Xqq_live.bd8Xqq_joined{background:var(--dsh-success,#3fb96f)}.bd8Xqq_stateDot.bd8Xqq_cold{background:var(--dsh-warning,#d9a13c)}.bd8Xqq_name{text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:500;overflow:hidden}.bd8Xqq_description{opacity:.7;text-overflow:ellipsis;white-space:nowrap;font-size:12px;overflow:hidden}.bd8Xqq_team{opacity:.55;font-size:11px;font-family:var(--dsh-mono,monospace)}.bd8Xqq_note{opacity:.6;font-size:11px}.bd8Xqq_searchInput{box-sizing:border-box;border:1px solid var(--dsh-border,#2a2a30);background:var(--dsh-surface,#141419);width:100%;color:inherit;border-radius:6px;padding:5px 8px;font-size:12px}.bd8Xqq_searchInput:focus{outline:1px solid var(--dsh-accent,#4c8bf5)}.bd8Xqq_sessionGroup{flex-direction:column;gap:2px;display:flex}.bd8Xqq_groupHead{color:inherit;font:inherit;opacity:.75;cursor:pointer;text-align:left;background:0 0;border:none;align-items:center;gap:6px;padding:4px 2px;font-size:11px;font-weight:600;display:flex}.bd8Xqq_groupChevron{transition:transform .12s;display:inline-block}.bd8Xqq_groupChevronClosed{transform:rotate(-90deg)}.bd8Xqq_groupTag{text-overflow:ellipsis;white-space:nowrap;border:1px solid var(--dsh-border,#2a2a30);opacity:.8;border-radius:999px;flex:none;max-width:90px;padding:0 6px;font-size:10px;line-height:16px;overflow:hidden}.bd8Xqq_groupButton{width:24px;height:24px;color:inherit;opacity:.55;cursor:pointer;background:0 0;border:1px solid #0000;border-radius:6px;flex:none;font-size:12px;line-height:1}.bd8Xqq_groupButton:hover{border-color:var(--dsh-border,#2a2a30);opacity:1}.bd8Xqq_groupPicker{border:1px dashed var(--dsh-border,#2a2a30);border-radius:8px;flex-wrap:wrap;gap:6px;width:100%;padding:8px;display:flex;position:relative}.bd8Xqq_groupOption{border:1px solid var(--dsh-border,#2a2a30);color:inherit;cursor:pointer;background:0 0;border-radius:999px;padding:2px 8px;font-size:11px}.bd8Xqq_groupOptionActive{border-color:var(--dsh-accent,#4c8bf5);color:var(--dsh-accent,#4c8bf5)}.bd8Xqq_groupNew{align-items:center;gap:6px;width:100%;margin-top:2px;display:flex}.bd8Xqq_groupInput{border:1px solid var(--dsh-border,#2a2a30);background:var(--dsh-surface,#141419);min-width:0;color:inherit;border-radius:6px;flex:1;padding:4px 8px;font-size:12px}.bd8Xqq_peerGrid{flex-wrap:wrap;gap:6px;display:flex}.bd8Xqq_peerChip{border:1px solid var(--dsh-border,#2a2a30);border-radius:999px;align-items:center;gap:6px;padding:3px 8px;font-size:11px;display:inline-flex}.bd8Xqq_peerHost{text-overflow:ellipsis;white-space:nowrap;max-width:160px;overflow:hidden}.bd8Xqq_peerScore{font-family:var(--dsh-mono,monospace);opacity:.6}.bd8Xqq_activityList{flex-direction:column;gap:2px;display:flex}.bd8Xqq_activityRow{border-radius:4px;align-items:center;gap:8px;padding:2px 4px;font-size:11px;display:flex}.bd8Xqq_activityRow[data-ok=false]{opacity:.55}.bd8Xqq_activityDir{flex:none;font-weight:600}.bd8Xqq_activityDir.bd8Xqq_in{color:var(--dsh-success,#3fb96f)}.bd8Xqq_activityDir.bd8Xqq_out{color:var(--dsh-accent,#4c8bf5)}.bd8Xqq_activityTeam{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-family:var(--dsh-mono,monospace);opacity:.8;flex:1;overflow:hidden}.bd8Xqq_activityPeer{text-overflow:ellipsis;white-space:nowrap;opacity:.55;max-width:90px;overflow:hidden}.bd8Xqq_activityTime{opacity:.5;font-family:var(--dsh-mono,monospace);flex:none}.bd8Xqq_activityRow[data-jump=true]{cursor:pointer}.bd8Xqq_activityRow[data-jump=true]:hover{background:var(--dsh-surface-hover,#ffffff0f)}.bd8Xqq_fresh{animation:1.2s ease-out 3 bd8Xqq_freshFlash}@keyframes bd8Xqq_freshFlash{0%{background:#4c8bf538}to{background:0 0}}@media (prefers-reduced-motion:reduce){.bd8Xqq_fresh{background:#4c8bf51f;animation:none}}.bd8Xqq_inFlightList{flex-direction:column;gap:2px;margin-bottom:4px;display:flex}.bd8Xqq_inFlightRow{border:1px dashed var(--dsh-border,#2a2a30);border-radius:4px;align-items:center;gap:8px;padding:3px 4px;font-size:11px;display:flex}.bd8Xqq_inFlightPulse{background:var(--dsh-accent,#4c8bf5);border-radius:50%;flex:none;width:7px;height:7px;animation:1.1s ease-in-out infinite bd8Xqq_flightPulse}@keyframes bd8Xqq_flightPulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.5;transform:scale(.55)}}@media (prefers-reduced-motion:reduce){.bd8Xqq_inFlightPulse{animation:none}}.bd8Xqq_versionTag{color:var(--dsh-color-text-tertiary,#888);background:var(--dsh-color-bg-secondary,#8080801f);border-radius:999px;margin-left:auto;padding:1px 6px;font-size:10px;font-weight:500}.bd8Xqq_inFlightStale{opacity:.55}.bd8Xqq_canvasCreate{align-items:center;gap:6px;margin-bottom:4px;display:flex}.bd8Xqq_canvasCreate .bd8Xqq_groupInput{flex:1;min-width:0}.bd8Xqq_canvasChip{max-width:100%;color:var(--dsh-color-text-secondary,#aaa);background:var(--dsh-color-bg-secondary,#8080801f);border-radius:999px;align-items:center;gap:4px;margin:2px 4px 2px 0;padding:1px 6px;font-size:11px;display:inline-flex}.bd8Xqq_canvasChip>span:not([class]){white-space:nowrap;text-overflow:ellipsis;min-width:0;overflow:hidden}.bd8Xqq_canvasChipRemove{cursor:pointer;min-width:24px;min-height:24px;color:var(--dsh-color-text-tertiary,#888);background:0 0;border:none;padding:2px 5px;font-size:11px;line-height:1}.bd8Xqq_canvasChipRemove:hover{color:var(--dsh-color-text-primary,#eee)}.bd8Xqq_canvasChipRemove{transition:color .14s ease-out}@media (prefers-reduced-motion:reduce){.bd8Xqq_canvasChipRemove{transition:none}}.bd8Xqq_canvasChipRemove:focus-visible{outline:2px solid var(--dsh-color-primary,#4f8cff);outline-offset:1px;border-radius:4px}.bd8Xqq_canvasActions{gap:6px;margin-top:4px;display:flex}.bd8Xqq_inFlightStale .bd8Xqq_inFlightPulse{opacity:.4;animation:none}.bd8Xqq_failMark{color:#f87171;flex-shrink:0;font-size:11px}.bd8Xqq_staleNote{color:var(--dsh-text-muted,#94a3b8b3);padding:4px 8px;font-size:11px}";
25
+ //#region \0dsh-css:D:\workspace\dsh-open-a2a-net\tmp\rc-3081-90c7d4c\src\client\A2aControl.module.css.mjs
26
+ const css = ".uJ8yTG_wrap{max-width:100%;display:inline-flex;position:relative}.uJ8yTG_trigger{align-items:center;gap:4px;display:inline-flex;position:relative}.uJ8yTG_unreadBadge{text-align:center;color:#fff;background:var(--dsh-accent,#4c8bf5);border-radius:7px;min-width:14px;height:14px;padding:0 3px;font-size:9px;line-height:14px;animation:2s ease-in-out infinite uJ8yTG_badgePulse;position:absolute;top:-6px;right:-8px}@keyframes uJ8yTG_badgePulse{0%,to{box-shadow:0 0 #4c8bf573}50%{box-shadow:0 0 0 4px #4c8bf500}}@media (prefers-reduced-motion:reduce){.uJ8yTG_unreadBadge{animation:none}}.uJ8yTG_popover{z-index:1100;border:1px solid var(--dsh-border,#2a2a30);background:var(--dsh-surface-raised,#1c1c22);border-radius:10px;flex-direction:column;gap:8px;width:320px;max-width:calc(100vw - 16px);max-height:60vh;padding:12px;display:flex;position:fixed;overflow-y:auto;box-shadow:0 8px 24px #00000059}.uJ8yTG_title{font-size:13px;font-weight:600}.uJ8yTG_sectionTitle{border-top:1px solid var(--dsh-border,#2a2a30);text-transform:uppercase;letter-spacing:.04em;opacity:.65;margin-top:4px;padding-top:8px;font-size:11px;font-weight:600}.uJ8yTG_stageRow{border-top:1px solid var(--dsh-border,#2a2a30);align-items:center;gap:8px;margin-top:4px;padding-top:8px;display:flex}.uJ8yTG_stageTitle{text-transform:uppercase;letter-spacing:.04em;opacity:.65;font-size:11px;font-weight:600}.uJ8yTG_stageLinks{gap:6px;display:flex}.uJ8yTG_stageLink{border:1px solid var(--dsh-border,#2a2a30);color:inherit;border-radius:999px;align-items:center;padding:3px 8px;font-size:11px;text-decoration:none;display:inline-flex}.uJ8yTG_stageLink:hover,.uJ8yTG_stageLink:focus-visible{border-color:var(--dsh-accent,#4c8bf5)}.uJ8yTG_empty{opacity:.7;font-size:12px}.uJ8yTG_row{border:1px solid #0000;border-radius:8px;align-items:center;gap:10px;padding:8px;display:flex}.uJ8yTG_joined{border-color:var(--dsh-border,#2a2a30)}.uJ8yTG_facts{text-align:left;min-width:0;color:inherit;font:inherit;cursor:pointer;background:0 0;border:none;border-radius:6px;flex-direction:column;flex:1;gap:2px;padding:2px 4px;display:flex}.uJ8yTG_facts:hover{background:var(--dsh-surface-hover,#ffffff0f)}.uJ8yTG_nameRow{align-items:center;gap:6px;display:flex}.uJ8yTG_stateDot{border-radius:50%;flex:none;width:7px;height:7px}.uJ8yTG_stateDot.uJ8yTG_live{background:var(--dsh-accent,#4c8bf5)}.uJ8yTG_stateDot.uJ8yTG_live.uJ8yTG_joined{background:var(--dsh-success,#3fb96f)}.uJ8yTG_stateDot.uJ8yTG_cold{background:var(--dsh-warning,#d9a13c)}.uJ8yTG_name{text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:500;overflow:hidden}.uJ8yTG_description{opacity:.7;text-overflow:ellipsis;white-space:nowrap;font-size:12px;overflow:hidden}.uJ8yTG_team{opacity:.55;font-size:11px;font-family:var(--dsh-mono,monospace)}.uJ8yTG_note{opacity:.6;font-size:11px}.uJ8yTG_searchInput{box-sizing:border-box;border:1px solid var(--dsh-border,#2a2a30);background:var(--dsh-surface,#141419);width:100%;color:inherit;border-radius:6px;padding:5px 8px;font-size:12px}.uJ8yTG_searchInput:focus{outline:1px solid var(--dsh-accent,#4c8bf5)}.uJ8yTG_sessionGroup{flex-direction:column;gap:2px;display:flex}.uJ8yTG_groupHead{color:inherit;font:inherit;opacity:.75;cursor:pointer;text-align:left;background:0 0;border:none;align-items:center;gap:6px;padding:4px 2px;font-size:11px;font-weight:600;display:flex}.uJ8yTG_groupChevron{transition:transform .12s;display:inline-block}.uJ8yTG_groupChevronClosed{transform:rotate(-90deg)}.uJ8yTG_groupTag{text-overflow:ellipsis;white-space:nowrap;border:1px solid var(--dsh-border,#2a2a30);opacity:.8;border-radius:999px;flex:none;max-width:90px;padding:0 6px;font-size:10px;line-height:16px;overflow:hidden}.uJ8yTG_groupButton{width:24px;height:24px;color:inherit;opacity:.55;cursor:pointer;background:0 0;border:1px solid #0000;border-radius:6px;flex:none;font-size:12px;line-height:1}.uJ8yTG_groupButton:hover{border-color:var(--dsh-border,#2a2a30);opacity:1}.uJ8yTG_groupPicker{border:1px dashed var(--dsh-border,#2a2a30);border-radius:8px;flex-wrap:wrap;gap:6px;width:100%;padding:8px;display:flex;position:relative}.uJ8yTG_groupOption{border:1px solid var(--dsh-border,#2a2a30);color:inherit;cursor:pointer;background:0 0;border-radius:999px;padding:2px 8px;font-size:11px}.uJ8yTG_groupOptionActive{border-color:var(--dsh-accent,#4c8bf5);color:var(--dsh-accent,#4c8bf5)}.uJ8yTG_groupNew{align-items:center;gap:6px;width:100%;margin-top:2px;display:flex}.uJ8yTG_groupInput{border:1px solid var(--dsh-border,#2a2a30);background:var(--dsh-surface,#141419);min-width:0;color:inherit;border-radius:6px;flex:1;padding:4px 8px;font-size:12px}.uJ8yTG_peerGrid{flex-wrap:wrap;gap:6px;display:flex}.uJ8yTG_peerChip{border:1px solid var(--dsh-border,#2a2a30);border-radius:999px;align-items:center;gap:6px;padding:3px 8px;font-size:11px;display:inline-flex}.uJ8yTG_peerHost{text-overflow:ellipsis;white-space:nowrap;max-width:160px;overflow:hidden}.uJ8yTG_peerScore{font-family:var(--dsh-mono,monospace);opacity:.6}.uJ8yTG_activityList{flex-direction:column;gap:2px;display:flex}.uJ8yTG_activityRow{border-radius:4px;align-items:center;gap:8px;padding:2px 4px;font-size:11px;display:flex}.uJ8yTG_activityRow[data-ok=false]{opacity:.55}.uJ8yTG_activityDir{flex:none;font-weight:600}.uJ8yTG_activityDir.uJ8yTG_in{color:var(--dsh-success,#3fb96f)}.uJ8yTG_activityDir.uJ8yTG_out{color:var(--dsh-accent,#4c8bf5)}.uJ8yTG_activityTeam{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-family:var(--dsh-mono,monospace);opacity:.8;flex:1;overflow:hidden}.uJ8yTG_activityPeer{text-overflow:ellipsis;white-space:nowrap;opacity:.55;max-width:90px;overflow:hidden}.uJ8yTG_activityTime{opacity:.5;font-family:var(--dsh-mono,monospace);flex:none}.uJ8yTG_activityRow[data-jump=true]{cursor:pointer}.uJ8yTG_activityRow[data-jump=true]:hover{background:var(--dsh-surface-hover,#ffffff0f)}.uJ8yTG_fresh{animation:1.2s ease-out 3 uJ8yTG_freshFlash}@keyframes uJ8yTG_freshFlash{0%{background:#4c8bf538}to{background:0 0}}@media (prefers-reduced-motion:reduce){.uJ8yTG_fresh{background:#4c8bf51f;animation:none}}.uJ8yTG_inFlightList{flex-direction:column;gap:2px;margin-bottom:4px;display:flex}.uJ8yTG_inFlightRow{border:1px dashed var(--dsh-border,#2a2a30);border-radius:4px;align-items:center;gap:8px;padding:3px 4px;font-size:11px;display:flex}.uJ8yTG_inFlightPulse{background:var(--dsh-accent,#4c8bf5);border-radius:50%;flex:none;width:7px;height:7px;animation:1.1s ease-in-out infinite uJ8yTG_flightPulse}@keyframes uJ8yTG_flightPulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.5;transform:scale(.55)}}@media (prefers-reduced-motion:reduce){.uJ8yTG_inFlightPulse{animation:none}}.uJ8yTG_versionTag{color:var(--dsh-color-text-tertiary,#888);background:var(--dsh-color-bg-secondary,#8080801f);border-radius:999px;margin-left:auto;padding:1px 6px;font-size:10px;font-weight:500}.uJ8yTG_inFlightStale{opacity:.55}.uJ8yTG_canvasCreate{align-items:center;gap:6px;margin-bottom:4px;display:flex}.uJ8yTG_canvasCreate .uJ8yTG_groupInput{flex:1;min-width:0}.uJ8yTG_canvasChip{max-width:100%;color:var(--dsh-color-text-secondary,#aaa);background:var(--dsh-color-bg-secondary,#8080801f);border-radius:999px;align-items:center;gap:4px;margin:2px 4px 2px 0;padding:1px 6px;font-size:11px;display:inline-flex}.uJ8yTG_canvasChip>span:not([class]){white-space:nowrap;text-overflow:ellipsis;min-width:0;overflow:hidden}.uJ8yTG_canvasChipRemove{cursor:pointer;min-width:24px;min-height:24px;color:var(--dsh-color-text-tertiary,#888);background:0 0;border:none;padding:2px 5px;font-size:11px;line-height:1}.uJ8yTG_canvasChipRemove:hover{color:var(--dsh-color-text-primary,#eee)}.uJ8yTG_canvasChipRemove{transition:color .14s ease-out}@media (prefers-reduced-motion:reduce){.uJ8yTG_canvasChipRemove{transition:none}}.uJ8yTG_canvasChipRemove:focus-visible{outline:2px solid var(--dsh-color-primary,#4f8cff);outline-offset:1px;border-radius:4px}.uJ8yTG_canvasActions{gap:6px;margin-top:4px;display:flex}.uJ8yTG_inFlightStale .uJ8yTG_inFlightPulse{opacity:.4;animation:none}.uJ8yTG_failMark{color:#f87171;flex-shrink:0;font-size:11px}.uJ8yTG_staleNote{color:var(--dsh-text-muted,#94a3b8b3);padding:4px 8px;font-size:11px}";
27
27
  const tagId = "@nelsonlongxiang/dsh-open-a2a-net/A2aControl.module.css";
28
28
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
29
29
  const tag = document.createElement("style");
@@ -33,67 +33,67 @@ window.__ModuleLoader__.load({
33
33
  document.head.appendChild(tag);
34
34
  }
35
35
  var A2aControl_module_css_default = {
36
- "activityDir": "bd8Xqq_activityDir",
37
- "activityList": "bd8Xqq_activityList",
38
- "activityPeer": "bd8Xqq_activityPeer",
39
- "activityRow": "bd8Xqq_activityRow",
40
- "activityTeam": "bd8Xqq_activityTeam",
41
- "activityTime": "bd8Xqq_activityTime",
42
- "badgePulse": "bd8Xqq_badgePulse",
43
- "canvasActions": "bd8Xqq_canvasActions",
44
- "canvasChip": "bd8Xqq_canvasChip",
45
- "canvasChipRemove": "bd8Xqq_canvasChipRemove",
46
- "canvasCreate": "bd8Xqq_canvasCreate",
47
- "cold": "bd8Xqq_cold",
48
- "description": "bd8Xqq_description",
49
- "empty": "bd8Xqq_empty",
50
- "facts": "bd8Xqq_facts",
51
- "failMark": "bd8Xqq_failMark",
52
- "flightPulse": "bd8Xqq_flightPulse",
53
- "fresh": "bd8Xqq_fresh",
54
- "freshFlash": "bd8Xqq_freshFlash",
55
- "groupButton": "bd8Xqq_groupButton",
56
- "groupChevron": "bd8Xqq_groupChevron",
57
- "groupChevronClosed": "bd8Xqq_groupChevronClosed",
58
- "groupHead": "bd8Xqq_groupHead",
59
- "groupInput": "bd8Xqq_groupInput",
60
- "groupNew": "bd8Xqq_groupNew",
61
- "groupOption": "bd8Xqq_groupOption",
62
- "groupOptionActive": "bd8Xqq_groupOptionActive",
63
- "groupPicker": "bd8Xqq_groupPicker",
64
- "groupTag": "bd8Xqq_groupTag",
65
- "in": "bd8Xqq_in",
66
- "inFlightList": "bd8Xqq_inFlightList",
67
- "inFlightPulse": "bd8Xqq_inFlightPulse",
68
- "inFlightRow": "bd8Xqq_inFlightRow",
69
- "inFlightStale": "bd8Xqq_inFlightStale",
70
- "joined": "bd8Xqq_joined",
71
- "live": "bd8Xqq_live",
72
- "name": "bd8Xqq_name",
73
- "nameRow": "bd8Xqq_nameRow",
74
- "note": "bd8Xqq_note",
75
- "out": "bd8Xqq_out",
76
- "peerChip": "bd8Xqq_peerChip",
77
- "peerGrid": "bd8Xqq_peerGrid",
78
- "peerHost": "bd8Xqq_peerHost",
79
- "peerScore": "bd8Xqq_peerScore",
80
- "popover": "bd8Xqq_popover",
81
- "row": "bd8Xqq_row",
82
- "searchInput": "bd8Xqq_searchInput",
83
- "sectionTitle": "bd8Xqq_sectionTitle",
84
- "sessionGroup": "bd8Xqq_sessionGroup",
85
- "stageLink": "bd8Xqq_stageLink",
86
- "stageLinks": "bd8Xqq_stageLinks",
87
- "stageRow": "bd8Xqq_stageRow",
88
- "stageTitle": "bd8Xqq_stageTitle",
89
- "staleNote": "bd8Xqq_staleNote",
90
- "stateDot": "bd8Xqq_stateDot",
91
- "team": "bd8Xqq_team",
92
- "title": "bd8Xqq_title",
93
- "trigger": "bd8Xqq_trigger",
94
- "unreadBadge": "bd8Xqq_unreadBadge",
95
- "versionTag": "bd8Xqq_versionTag",
96
- "wrap": "bd8Xqq_wrap"
36
+ "activityDir": "uJ8yTG_activityDir",
37
+ "activityList": "uJ8yTG_activityList",
38
+ "activityPeer": "uJ8yTG_activityPeer",
39
+ "activityRow": "uJ8yTG_activityRow",
40
+ "activityTeam": "uJ8yTG_activityTeam",
41
+ "activityTime": "uJ8yTG_activityTime",
42
+ "badgePulse": "uJ8yTG_badgePulse",
43
+ "canvasActions": "uJ8yTG_canvasActions",
44
+ "canvasChip": "uJ8yTG_canvasChip",
45
+ "canvasChipRemove": "uJ8yTG_canvasChipRemove",
46
+ "canvasCreate": "uJ8yTG_canvasCreate",
47
+ "cold": "uJ8yTG_cold",
48
+ "description": "uJ8yTG_description",
49
+ "empty": "uJ8yTG_empty",
50
+ "facts": "uJ8yTG_facts",
51
+ "failMark": "uJ8yTG_failMark",
52
+ "flightPulse": "uJ8yTG_flightPulse",
53
+ "fresh": "uJ8yTG_fresh",
54
+ "freshFlash": "uJ8yTG_freshFlash",
55
+ "groupButton": "uJ8yTG_groupButton",
56
+ "groupChevron": "uJ8yTG_groupChevron",
57
+ "groupChevronClosed": "uJ8yTG_groupChevronClosed",
58
+ "groupHead": "uJ8yTG_groupHead",
59
+ "groupInput": "uJ8yTG_groupInput",
60
+ "groupNew": "uJ8yTG_groupNew",
61
+ "groupOption": "uJ8yTG_groupOption",
62
+ "groupOptionActive": "uJ8yTG_groupOptionActive",
63
+ "groupPicker": "uJ8yTG_groupPicker",
64
+ "groupTag": "uJ8yTG_groupTag",
65
+ "in": "uJ8yTG_in",
66
+ "inFlightList": "uJ8yTG_inFlightList",
67
+ "inFlightPulse": "uJ8yTG_inFlightPulse",
68
+ "inFlightRow": "uJ8yTG_inFlightRow",
69
+ "inFlightStale": "uJ8yTG_inFlightStale",
70
+ "joined": "uJ8yTG_joined",
71
+ "live": "uJ8yTG_live",
72
+ "name": "uJ8yTG_name",
73
+ "nameRow": "uJ8yTG_nameRow",
74
+ "note": "uJ8yTG_note",
75
+ "out": "uJ8yTG_out",
76
+ "peerChip": "uJ8yTG_peerChip",
77
+ "peerGrid": "uJ8yTG_peerGrid",
78
+ "peerHost": "uJ8yTG_peerHost",
79
+ "peerScore": "uJ8yTG_peerScore",
80
+ "popover": "uJ8yTG_popover",
81
+ "row": "uJ8yTG_row",
82
+ "searchInput": "uJ8yTG_searchInput",
83
+ "sectionTitle": "uJ8yTG_sectionTitle",
84
+ "sessionGroup": "uJ8yTG_sessionGroup",
85
+ "stageLink": "uJ8yTG_stageLink",
86
+ "stageLinks": "uJ8yTG_stageLinks",
87
+ "stageRow": "uJ8yTG_stageRow",
88
+ "stageTitle": "uJ8yTG_stageTitle",
89
+ "staleNote": "uJ8yTG_staleNote",
90
+ "stateDot": "uJ8yTG_stateDot",
91
+ "team": "uJ8yTG_team",
92
+ "title": "uJ8yTG_title",
93
+ "trigger": "uJ8yTG_trigger",
94
+ "unreadBadge": "uJ8yTG_unreadBadge",
95
+ "versionTag": "uJ8yTG_versionTag",
96
+ "wrap": "uJ8yTG_wrap"
97
97
  };
98
98
  //#endregion
99
99
  //#region lib/client/A2aControl.js
package/lib/client.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","names":["css","Button","IconGlobeOutlineRegular","_Fragment"],"sources":["../../../../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs","client/A2aControl.js","client/locales.js","client/index.js"],"sourcesContent":["function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\n/**\n * A2A network control: a footer action opening this host's recent network\n * activity feed. The feed is the panel's whole content — in-flight routes,\n * owed receipts, and the routing activity ring. Session/team management\n * lives in the planning view (design: docs/design/panel-activity-feed.md):\n * the stage links row above the feed is the explicit navigation to it.\n * Probes the host's state route at registration time (the seat renders only\n * on a host that serves it). While open, the feed polls so it visibly\n * follows each turn; the closed trigger's unread badge rides a slow poll.\n */\nimport { useCallback, useEffect, useRef, useState } from 'react';\nimport clsx from 'clsx';\nimport { Button, IconGlobeOutlineRegular } from '@deepseek-ai/dsh-client-ui-primitives';\nimport css from './A2aControl.module.css';\n/** Fetch the host's network state; undefined means the route is absent. */\nasync function fetchState() {\n const response = await fetch('/__dsh_a2a/state', { cache: 'no-store' });\n if (!response.ok)\n return undefined;\n const body = await response.json();\n if (body.nodes !== true || !Array.isArray(body.sessions))\n return undefined;\n return {\n sessions: body.sessions,\n activity: Array.isArray(body.activity) ? body.activity : [],\n inFlight: Array.isArray(body.inFlight) ? body.inFlight : [],\n tasks: Array.isArray(body.tasks) ? body.tasks : [],\n ...(typeof body.tasksStaleCount === 'number' ? { tasksStaleCount: body.tasksStaleCount } : {}),\n ...(typeof body.version === 'string' ? { version: body.version } : {}),\n };\n}\n/** Compact relative time for an activity row. */\nfunction relativeTime(ts) {\n const seconds = Math.max(0, Math.round((Date.now() - ts) / 1000));\n if (seconds < 60)\n return `${String(seconds)}s`;\n const minutes = Math.round(seconds / 60);\n if (minutes < 60)\n return `${String(minutes)}m`;\n return `${String(Math.round(minutes / 60))}h`;\n}\n/** One feed row: direction glyph (aria-labelled), team, peer host, age, fail mark. */\nfunction FeedRow({ dir, team, peer, ts, ok, target, openSession, t }) {\n const fresh = Date.now() - ts < 5_000;\n return (_jsxs(\"div\", { className: clsx(css.activityRow, fresh && css.fresh), \"data-ok\": ok === undefined ? undefined : String(ok), \"data-jump\": target !== undefined, title: target !== undefined ? t('a2a.jump') : undefined, onClick: () => { if (target !== undefined)\n openSession(target.id); }, role: target !== undefined ? 'button' : undefined, children: [_jsx(\"span\", { className: clsx(css.activityDir, dir), \"aria-label\": dir === 'in' ? 'inbound' : 'outbound', children: dir === 'in' ? '←' : '→' }), _jsx(\"span\", { className: css.activityTeam, title: team, children: team }), _jsx(\"span\", { className: css.activityPeer, title: peer, children: peer === '' || peer === 'local' ? '' : peer.replace(/^https?:\\/\\//, '').replace(/\\/.*$/, '') }), ok === false ? _jsx(\"span\", { className: css.failMark, \"aria-label\": \"failed\", children: \"\\u2715\" }) : null, _jsx(\"span\", { className: css.activityTime, children: relativeTime(ts) })] }));\n}\n/**\n * Render the network toggle and its activity feed.\n * @param props - composed slot props.\n * @returns the control element tree.\n */\nexport function A2aControl({ wide, t, openSession }) {\n const [open, setOpen] = useState(false);\n const [state, setState] = useState({ sessions: [], activity: [], inFlight: [], tasks: [] });\n const [seenActivity, setSeenActivity] = useState(0);\n const stopped = useRef(false);\n useEffect(() => () => { stopped.current = true; }, []);\n const wrap = useRef(null);\n // The popover anchors to the trigger's viewport rect: the sidebar column\n // clips its descendants (the collapse slide), so an in-column absolute\n // popover is cut at the column edge whenever the column is narrower than\n // the popover; fixed positioning escapes the clip at rest (the ui-settings\n // panel precedent). The left edge clamps so a narrow viewport never hides\n // the popover's right side.\n const [anchor, setAnchor] = useState(null);\n // The unread badge counts inbound activity entries that arrived while the\n // panel was closed; opening the panel clears it.\n const unread = Math.max(0, state.activity.filter(entry => entry.dir === 'in').length - seenActivity);\n const toggleOpen = () => {\n if (open) {\n setOpen(false);\n return;\n }\n const rect = wrap.current?.getBoundingClientRect();\n if (rect !== undefined) {\n setAnchor({\n left: Math.max(8, Math.min(rect.left, window.innerWidth - 336)),\n bottom: window.innerHeight - rect.top + 8,\n });\n }\n setSeenActivity(state.activity.filter(entry => entry.dir === 'in').length);\n setOpen(true);\n };\n const refresh = useCallback(() => {\n void fetchState().then((next) => {\n if (!stopped.current && next !== undefined)\n setState(next);\n }).catch(() => { });\n }, []);\n useEffect(() => {\n if (open)\n refresh();\n }, [open, refresh]);\n useEffect(() => {\n // The unread badge lives on the closed trigger, so the state must move\n // even while the panel is closed — a slow poll keeps it fresh; the open\n // panel's faster poll below takes over while visible.\n const slow = setInterval(refresh, 10_000);\n refresh();\n return () => { clearInterval(slow); };\n }, [refresh]);\n useEffect(() => {\n if (!open)\n return;\n // While the feed is open, it polls so the ring visibly follows turns.\n const poll = setInterval(refresh, 2_000);\n return () => { clearInterval(poll); };\n }, [open, refresh]);\n useEffect(() => {\n if (!open)\n return;\n const onPointerDown = (event) => {\n if (event.target.closest(`.${css.wrap}`) === null)\n setOpen(false);\n };\n document.addEventListener('pointerdown', onPointerDown);\n return () => { document.removeEventListener('pointerdown', onPointerDown); };\n }, [open]);\n // 0.6.10: the receive face of click-to-reach (0.6.7 BroadcastChannel,\n // 0.6.8 ?dsh-a2a-open deep link) is removed by ruling — 禁止任何跳转,\n // 全部使用响应式布局. The workbench's 快派 form is the only cross-surface\n // reach primitive and it stays on the workbench page; this panel's\n // FeedRow openSession remains (it switches a conversation in place inside\n // the GUI — no navigation).\n const { sessions, activity, inFlight, tasks } = state;\n return (_jsxs(\"div\", { ref: wrap, className: clsx(css.wrap, wide ? css.wide : css.rail), children: [_jsx(Button, { variant: \"ghost\", size: \"sm\", title: t('a2a.label'), \"aria-label\": t('a2a.label'), \"aria-expanded\": open, onClick: () => { toggleOpen(); }, children: _jsxs(\"span\", { className: css.trigger, children: [_jsx(IconGlobeOutlineRegular, {}), wide ? _jsx(\"span\", { children: t('a2a.label') }) : null, unread > 0 ? _jsx(\"span\", { className: css.unreadBadge, \"aria-label\": String(unread), children: unread > 9 ? '9+' : String(unread) }) : null] }) }), open\n ? (_jsxs(\"div\", { className: css.popover, role: \"dialog\", \"aria-label\": t('a2a.title'), style: anchor === null ? undefined : { left: `${String(anchor.left)}px`, bottom: `${String(anchor.bottom)}px` }, children: [_jsxs(\"div\", { className: css.title, children: [t('a2a.title'), state.version !== undefined ? _jsxs(\"span\", { className: css.versionTag, title: state.version, children: [\"v\", state.version] }) : null] }), _jsxs(\"div\", { className: css.stageRow, children: [_jsx(\"span\", { className: css.stageTitle, children: t('a2a.stageTitle') }), _jsx(\"span\", { className: css.stageLinks, children: _jsx(\"a\", { className: css.stageLink, href: \"/__dsh_a2a_nexus/\", target: \"_blank\", rel: \"noreferrer\", title: t('a2a.stageWorkbench'), children: t('a2a.stageWorkbench') }) })] }), _jsxs(\"div\", { \"aria-live\": \"polite\", children: [inFlight.length > 0 && (_jsx(\"div\", { className: css.inFlightList, \"aria-label\": t('a2a.inFlight'), children: inFlight.map((route) => (_jsxs(\"div\", { className: clsx(css.inFlightRow, Date.now() - route.startedAt > 120_000 && css.inFlightStale), title: Date.now() - route.startedAt > 120_000 ? t('a2a.inFlightStale') : undefined, children: [_jsx(\"span\", { className: css.inFlightPulse, \"aria-hidden\": true }), _jsx(FeedRow, { dir: \"out\", team: route.team, peer: route.peer, ts: route.startedAt, openSession: openSession, t: t })] }, `${route.team}-${String(route.startedAt)}`))) })), (() => {\n // C-ruling: render only settleable debt; the stale tail is a\n // count line, never a row-per-noise listing.\n const settleableTasks = tasks.filter(task => task.settleable !== false);\n const staleCount = state.tasksStaleCount ?? (tasks.length - settleableTasks.length);\n if (settleableTasks.length === 0 && staleCount === 0)\n return null;\n return (_jsxs(_Fragment, { children: [settleableTasks.length > 0 && (_jsxs(_Fragment, { children: [_jsx(\"div\", { className: css.sectionTitle, children: t('a2a.tasks') }), _jsx(\"div\", { className: css.inFlightList, \"aria-label\": t('a2a.tasks'), children: settleableTasks.map((task) => (_jsx(\"div\", { className: css.inFlightRow, title: t('a2a.tasksNote'), children: _jsx(FeedRow, { dir: \"out\", team: task.team, peer: task.peer, ts: task.startedAt, openSession: openSession, t: t }) }, task.taskId))) })] })), staleCount > 0 && (_jsxs(\"div\", { className: css.staleNote, title: t('a2a.tasksNote'), children: [t('a2a.tasksStale'), \" \\u00B7 \", String(staleCount)] }))] }));\n })(), _jsx(\"div\", { className: css.sectionTitle, children: t('a2a.activity') }), activity.length === 0\n ? _jsx(\"div\", { className: css.empty, children: t('a2a.activityEmpty') })\n : (_jsx(\"div\", { className: css.activityList, children: [...activity].reverse().slice(0, 10).map((entry, index) => {\n // A same-host session team resolves to its session row;\n // clicking the activity line jumps there (the linkage\n // into an ongoing collaboration).\n const target = sessions.find(row => row.team === entry.team);\n return (_jsx(FeedRow, { dir: entry.dir, team: entry.team, peer: entry.peer, ts: entry.ts, ok: entry.ok, ...(target !== undefined ? { target } : {}), openSession: openSession, t: t }, `${String(entry.ts)}-${String(index)}`));\n }) }))] })] }))\n : null] }));\n}\n","/** Locale dictionaries for the A2A network sidebar control (namespace `a2aNet`). */\n/** Simplified Chinese dictionary. */\nexport const zh = {\n 'a2a.label': 'A2A 网络',\n 'a2a.title': 'A2A 网络动态',\n 'a2a.activity': '最近动态',\n 'a2a.activityEmpty': '暂无网络动态——加入网络即可开始协作',\n 'a2a.inFlight': '进行中的路由',\n 'a2a.inFlightStale': '等待回执超时(对端处理慢或回执丢失);180 秒后自动解除并按已送达处理',\n 'a2a.tasks': '欠回执的异步任务',\n 'a2a.tasksNote': '异步欠账分三段:未决(等回执)→ 死信(超期自动标注,目标恢复后仍可补回执结算)→ 归档(结算留痕不蒸发)',\n 'a2a.tasksStale': '对话式已送达未答(非欠账,24h 自动死信)',\n 'a2a.jump': '点击跳转到该会话',\n 'a2a.stageTitle': 'A2A 工作台(目录 · 台账 · 活动 · 规划)',\n 'a2a.stageWorkbench': '打开工作台',\n};\n/** English dictionary. */\nexport const en = {\n 'a2a.label': 'A2A network',\n 'a2a.title': 'A2A network activity',\n 'a2a.activity': 'Recent activity',\n 'a2a.activityEmpty': 'No network activity yet — join sessions to the network to start collaborating',\n 'a2a.inFlight': 'Routes in flight',\n 'a2a.inFlightStale': 'Reply wait past 120s (slow or lost receipt); auto-releases as delivered at 180s',\n 'a2a.tasks': 'Owed receipts',\n 'a2a.tasksNote': 'Async debts in three tiers: pending (awaiting receipt) → dead-lettered (auto-flagged past the stale TTL; a revived target can still settle late) → archived (settled records kept for audit)',\n 'a2a.tasksStale': 'Delivered conversationally, no formal receipt (not debt; auto-dead-letters at the TTL)',\n 'a2a.jump': 'Click to open this session',\n 'a2a.stageTitle': 'A2A workbench (directory · ledger · activity · plan)',\n 'a2a.stageWorkbench': 'Open workbench',\n};\n","import { A2aControl } from \"./A2aControl.js\";\nimport { en, zh } from \"./locales.js\";\n/** Dictionary namespace owned by this plugin (network control copy). */\nconst NS = 'a2aNet';\n/** Services required by the browser half: the slot system, the sessions\n * flow used to wake cold rows, and the locale dictionaries. */\nexport const inject = ['slots', 'sessions', 'locale'];\n/** Registers the network control's dictionaries and its sidebar seat.\n * @param ctx - Client root context.\n */\nexport function apply(ctx) {\n ctx.effect(() => ctx.locale.register(NS, { zh, en }), 'a2a-net: dictionaries');\n // The network control renders only on a host that serves the session-node\n // state route (a2a host half + session nodes composed); the probe keeps\n // the seat quiet everywhere else.\n void fetch('/__dsh_a2a/state', { cache: 'no-store' })\n .then(response => (response.ok ? response.json() : undefined))\n .then((info) => {\n if (info?.nodes !== true)\n return;\n ctx.slots.inject('sidebar.footer.action', () => ctx.slots.register({\n name: 'sidebar.footer.action',\n id: 'a2a',\n order: 10,\n locale: NS,\n // Wake = the standard session-open flow: the host materializes the\n // session's agent and the a2a host half's persisted intent remounts\n // the node, so the cold row flips live on the next poll.\n inject: () => ({\n openSession: (id) => { ctx.sessions.open(id); },\n }),\n }, A2aControl));\n })\n .catch(() => { });\n}\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;EAAA,SAAS,EAAE,GAAE;GAAC,IAAI,GAAE,GAAE,IAAE;GAAG,IAAG,YAAU,OAAO,KAAG,YAAU,OAAO,GAAE,KAAG;QAAO,IAAG,YAAU,OAAO,GAAE,IAAG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B,qBAAqB;GACrB,aAAa;GACb,iBAAiB;GACjB,kBAAkB;GAClB,YAAY;GACZ,kBAAkB;GAClB,sBAAsB;EAC1B;;EAEA,MAAa,KAAK;GACd,aAAa;GACb,aAAa;GACb,gBAAgB;GAChB,qBAAqB;GACrB,gBAAgB;GAChB,qBAAqB;GACrB,aAAa;GACb,iBAAiB;GACjB,kBAAkB;GAClB,YAAY;GACZ,kBAAkB;GAClB,sBAAsB;EAC1B;;;;EC3BA,MAAM,KAAK;;;EAGX,MAAa,SAAS;GAAC;GAAS;GAAY;EAAQ;;;;EAIpD,SAAgB,MAAM,KAAK;GACvB,IAAI,aAAa,IAAI,OAAO,SAAS,IAAI;IAAE;IAAI;GAAG,CAAC,GAAG,uBAAuB;GAI7E,MAAW,oBAAoB,EAAE,OAAO,WAAW,CAAC,CAAC,CAChD,MAAK,aAAa,SAAS,KAAK,SAAS,KAAK,IAAI,KAAA,CAAU,CAAC,CAC7D,MAAM,SAAS;IAChB,IAAI,MAAM,UAAU,MAChB;IACJ,IAAI,MAAM,OAAO,+BAA+B,IAAI,MAAM,SAAS;KAC/D,MAAM;KACN,IAAI;KACJ,OAAO;KACP,QAAQ;KAIR,eAAe,EACX,cAAc,OAAO;MAAE,IAAI,SAAS,KAAK,EAAE;KAAG,EAClD;IACJ,GAAG,UAAU,CAAC;GAClB,CAAC,CAAC,CACG,YAAY,CAAE,CAAC;EACxB"}
1
+ {"version":3,"file":"client.js","names":["css","Button","IconGlobeOutlineRegular","_Fragment"],"sources":["../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs","client/A2aControl.js","client/locales.js","client/index.js"],"sourcesContent":["function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\n/**\n * A2A network control: a footer action opening this host's recent network\n * activity feed. The feed is the panel's whole content — in-flight routes,\n * owed receipts, and the routing activity ring. Session/team management\n * lives in the planning view (design: docs/design/panel-activity-feed.md):\n * the stage links row above the feed is the explicit navigation to it.\n * Probes the host's state route at registration time (the seat renders only\n * on a host that serves it). While open, the feed polls so it visibly\n * follows each turn; the closed trigger's unread badge rides a slow poll.\n */\nimport { useCallback, useEffect, useRef, useState } from 'react';\nimport clsx from 'clsx';\nimport { Button, IconGlobeOutlineRegular } from '@deepseek-ai/dsh-client-ui-primitives';\nimport css from './A2aControl.module.css';\n/** Fetch the host's network state; undefined means the route is absent. */\nasync function fetchState() {\n const response = await fetch('/__dsh_a2a/state', { cache: 'no-store' });\n if (!response.ok)\n return undefined;\n const body = await response.json();\n if (body.nodes !== true || !Array.isArray(body.sessions))\n return undefined;\n return {\n sessions: body.sessions,\n activity: Array.isArray(body.activity) ? body.activity : [],\n inFlight: Array.isArray(body.inFlight) ? body.inFlight : [],\n tasks: Array.isArray(body.tasks) ? body.tasks : [],\n ...(typeof body.tasksStaleCount === 'number' ? { tasksStaleCount: body.tasksStaleCount } : {}),\n ...(typeof body.version === 'string' ? { version: body.version } : {}),\n };\n}\n/** Compact relative time for an activity row. */\nfunction relativeTime(ts) {\n const seconds = Math.max(0, Math.round((Date.now() - ts) / 1000));\n if (seconds < 60)\n return `${String(seconds)}s`;\n const minutes = Math.round(seconds / 60);\n if (minutes < 60)\n return `${String(minutes)}m`;\n return `${String(Math.round(minutes / 60))}h`;\n}\n/** One feed row: direction glyph (aria-labelled), team, peer host, age, fail mark. */\nfunction FeedRow({ dir, team, peer, ts, ok, target, openSession, t }) {\n const fresh = Date.now() - ts < 5_000;\n return (_jsxs(\"div\", { className: clsx(css.activityRow, fresh && css.fresh), \"data-ok\": ok === undefined ? undefined : String(ok), \"data-jump\": target !== undefined, title: target !== undefined ? t('a2a.jump') : undefined, onClick: () => { if (target !== undefined)\n openSession(target.id); }, role: target !== undefined ? 'button' : undefined, children: [_jsx(\"span\", { className: clsx(css.activityDir, dir), \"aria-label\": dir === 'in' ? 'inbound' : 'outbound', children: dir === 'in' ? '←' : '→' }), _jsx(\"span\", { className: css.activityTeam, title: team, children: team }), _jsx(\"span\", { className: css.activityPeer, title: peer, children: peer === '' || peer === 'local' ? '' : peer.replace(/^https?:\\/\\//, '').replace(/\\/.*$/, '') }), ok === false ? _jsx(\"span\", { className: css.failMark, \"aria-label\": \"failed\", children: \"\\u2715\" }) : null, _jsx(\"span\", { className: css.activityTime, children: relativeTime(ts) })] }));\n}\n/**\n * Render the network toggle and its activity feed.\n * @param props - composed slot props.\n * @returns the control element tree.\n */\nexport function A2aControl({ wide, t, openSession }) {\n const [open, setOpen] = useState(false);\n const [state, setState] = useState({ sessions: [], activity: [], inFlight: [], tasks: [] });\n const [seenActivity, setSeenActivity] = useState(0);\n const stopped = useRef(false);\n useEffect(() => () => { stopped.current = true; }, []);\n const wrap = useRef(null);\n // The popover anchors to the trigger's viewport rect: the sidebar column\n // clips its descendants (the collapse slide), so an in-column absolute\n // popover is cut at the column edge whenever the column is narrower than\n // the popover; fixed positioning escapes the clip at rest (the ui-settings\n // panel precedent). The left edge clamps so a narrow viewport never hides\n // the popover's right side.\n const [anchor, setAnchor] = useState(null);\n // The unread badge counts inbound activity entries that arrived while the\n // panel was closed; opening the panel clears it.\n const unread = Math.max(0, state.activity.filter(entry => entry.dir === 'in').length - seenActivity);\n const toggleOpen = () => {\n if (open) {\n setOpen(false);\n return;\n }\n const rect = wrap.current?.getBoundingClientRect();\n if (rect !== undefined) {\n setAnchor({\n left: Math.max(8, Math.min(rect.left, window.innerWidth - 336)),\n bottom: window.innerHeight - rect.top + 8,\n });\n }\n setSeenActivity(state.activity.filter(entry => entry.dir === 'in').length);\n setOpen(true);\n };\n const refresh = useCallback(() => {\n void fetchState().then((next) => {\n if (!stopped.current && next !== undefined)\n setState(next);\n }).catch(() => { });\n }, []);\n useEffect(() => {\n if (open)\n refresh();\n }, [open, refresh]);\n useEffect(() => {\n // The unread badge lives on the closed trigger, so the state must move\n // even while the panel is closed — a slow poll keeps it fresh; the open\n // panel's faster poll below takes over while visible.\n const slow = setInterval(refresh, 10_000);\n refresh();\n return () => { clearInterval(slow); };\n }, [refresh]);\n useEffect(() => {\n if (!open)\n return;\n // While the feed is open, it polls so the ring visibly follows turns.\n const poll = setInterval(refresh, 2_000);\n return () => { clearInterval(poll); };\n }, [open, refresh]);\n useEffect(() => {\n if (!open)\n return;\n const onPointerDown = (event) => {\n if (event.target.closest(`.${css.wrap}`) === null)\n setOpen(false);\n };\n document.addEventListener('pointerdown', onPointerDown);\n return () => { document.removeEventListener('pointerdown', onPointerDown); };\n }, [open]);\n // 0.6.10: the receive face of click-to-reach (0.6.7 BroadcastChannel,\n // 0.6.8 ?dsh-a2a-open deep link) is removed by ruling — 禁止任何跳转,\n // 全部使用响应式布局. The workbench's 快派 form is the only cross-surface\n // reach primitive and it stays on the workbench page; this panel's\n // FeedRow openSession remains (it switches a conversation in place inside\n // the GUI — no navigation).\n const { sessions, activity, inFlight, tasks } = state;\n return (_jsxs(\"div\", { ref: wrap, className: clsx(css.wrap, wide ? css.wide : css.rail), children: [_jsx(Button, { variant: \"ghost\", size: \"sm\", title: t('a2a.label'), \"aria-label\": t('a2a.label'), \"aria-expanded\": open, onClick: () => { toggleOpen(); }, children: _jsxs(\"span\", { className: css.trigger, children: [_jsx(IconGlobeOutlineRegular, {}), wide ? _jsx(\"span\", { children: t('a2a.label') }) : null, unread > 0 ? _jsx(\"span\", { className: css.unreadBadge, \"aria-label\": String(unread), children: unread > 9 ? '9+' : String(unread) }) : null] }) }), open\n ? (_jsxs(\"div\", { className: css.popover, role: \"dialog\", \"aria-label\": t('a2a.title'), style: anchor === null ? undefined : { left: `${String(anchor.left)}px`, bottom: `${String(anchor.bottom)}px` }, children: [_jsxs(\"div\", { className: css.title, children: [t('a2a.title'), state.version !== undefined ? _jsxs(\"span\", { className: css.versionTag, title: state.version, children: [\"v\", state.version] }) : null] }), _jsxs(\"div\", { className: css.stageRow, children: [_jsx(\"span\", { className: css.stageTitle, children: t('a2a.stageTitle') }), _jsx(\"span\", { className: css.stageLinks, children: _jsx(\"a\", { className: css.stageLink, href: \"/__dsh_a2a_nexus/\", target: \"_blank\", rel: \"noreferrer\", title: t('a2a.stageWorkbench'), children: t('a2a.stageWorkbench') }) })] }), _jsxs(\"div\", { \"aria-live\": \"polite\", children: [inFlight.length > 0 && (_jsx(\"div\", { className: css.inFlightList, \"aria-label\": t('a2a.inFlight'), children: inFlight.map((route) => (_jsxs(\"div\", { className: clsx(css.inFlightRow, Date.now() - route.startedAt > 120_000 && css.inFlightStale), title: Date.now() - route.startedAt > 120_000 ? t('a2a.inFlightStale') : undefined, children: [_jsx(\"span\", { className: css.inFlightPulse, \"aria-hidden\": true }), _jsx(FeedRow, { dir: \"out\", team: route.team, peer: route.peer, ts: route.startedAt, openSession: openSession, t: t })] }, `${route.team}-${String(route.startedAt)}`))) })), (() => {\n // C-ruling: render only settleable debt; the stale tail is a\n // count line, never a row-per-noise listing.\n const settleableTasks = tasks.filter(task => task.settleable !== false);\n const staleCount = state.tasksStaleCount ?? (tasks.length - settleableTasks.length);\n if (settleableTasks.length === 0 && staleCount === 0)\n return null;\n return (_jsxs(_Fragment, { children: [settleableTasks.length > 0 && (_jsxs(_Fragment, { children: [_jsx(\"div\", { className: css.sectionTitle, children: t('a2a.tasks') }), _jsx(\"div\", { className: css.inFlightList, \"aria-label\": t('a2a.tasks'), children: settleableTasks.map((task) => (_jsx(\"div\", { className: css.inFlightRow, title: t('a2a.tasksNote'), children: _jsx(FeedRow, { dir: \"out\", team: task.team, peer: task.peer, ts: task.startedAt, openSession: openSession, t: t }) }, task.taskId))) })] })), staleCount > 0 && (_jsxs(\"div\", { className: css.staleNote, title: t('a2a.tasksNote'), children: [t('a2a.tasksStale'), \" \\u00B7 \", String(staleCount)] }))] }));\n })(), _jsx(\"div\", { className: css.sectionTitle, children: t('a2a.activity') }), activity.length === 0\n ? _jsx(\"div\", { className: css.empty, children: t('a2a.activityEmpty') })\n : (_jsx(\"div\", { className: css.activityList, children: [...activity].reverse().slice(0, 10).map((entry, index) => {\n // A same-host session team resolves to its session row;\n // clicking the activity line jumps there (the linkage\n // into an ongoing collaboration).\n const target = sessions.find(row => row.team === entry.team);\n return (_jsx(FeedRow, { dir: entry.dir, team: entry.team, peer: entry.peer, ts: entry.ts, ok: entry.ok, ...(target !== undefined ? { target } : {}), openSession: openSession, t: t }, `${String(entry.ts)}-${String(index)}`));\n }) }))] })] }))\n : null] }));\n}\n","/** Locale dictionaries for the A2A network sidebar control (namespace `a2aNet`). */\n/** Simplified Chinese dictionary. */\nexport const zh = {\n 'a2a.label': 'A2A 网络',\n 'a2a.title': 'A2A 网络动态',\n 'a2a.activity': '最近动态',\n 'a2a.activityEmpty': '暂无网络动态——加入网络即可开始协作',\n 'a2a.inFlight': '进行中的路由',\n 'a2a.inFlightStale': '等待回执超时(对端处理慢或回执丢失);180 秒后自动解除并按已送达处理',\n 'a2a.tasks': '欠回执的异步任务',\n 'a2a.tasksNote': '异步欠账分三段:未决(等回执)→ 死信(超期自动标注,目标恢复后仍可补回执结算)→ 归档(结算留痕不蒸发)',\n 'a2a.tasksStale': '对话式已送达未答(非欠账,24h 自动死信)',\n 'a2a.jump': '点击跳转到该会话',\n 'a2a.stageTitle': 'A2A 工作台(目录 · 台账 · 活动 · 规划)',\n 'a2a.stageWorkbench': '打开工作台',\n};\n/** English dictionary. */\nexport const en = {\n 'a2a.label': 'A2A network',\n 'a2a.title': 'A2A network activity',\n 'a2a.activity': 'Recent activity',\n 'a2a.activityEmpty': 'No network activity yet — join sessions to the network to start collaborating',\n 'a2a.inFlight': 'Routes in flight',\n 'a2a.inFlightStale': 'Reply wait past 120s (slow or lost receipt); auto-releases as delivered at 180s',\n 'a2a.tasks': 'Owed receipts',\n 'a2a.tasksNote': 'Async debts in three tiers: pending (awaiting receipt) → dead-lettered (auto-flagged past the stale TTL; a revived target can still settle late) → archived (settled records kept for audit)',\n 'a2a.tasksStale': 'Delivered conversationally, no formal receipt (not debt; auto-dead-letters at the TTL)',\n 'a2a.jump': 'Click to open this session',\n 'a2a.stageTitle': 'A2A workbench (directory · ledger · activity · plan)',\n 'a2a.stageWorkbench': 'Open workbench',\n};\n","import { A2aControl } from \"./A2aControl.js\";\nimport { en, zh } from \"./locales.js\";\n/** Dictionary namespace owned by this plugin (network control copy). */\nconst NS = 'a2aNet';\n/** Services required by the browser half: the slot system, the sessions\n * flow used to wake cold rows, and the locale dictionaries. */\nexport const inject = ['slots', 'sessions', 'locale'];\n/** Registers the network control's dictionaries and its sidebar seat.\n * @param ctx - Client root context.\n */\nexport function apply(ctx) {\n ctx.effect(() => ctx.locale.register(NS, { zh, en }), 'a2a-net: dictionaries');\n // The network control renders only on a host that serves the session-node\n // state route (a2a host half + session nodes composed); the probe keeps\n // the seat quiet everywhere else.\n void fetch('/__dsh_a2a/state', { cache: 'no-store' })\n .then(response => (response.ok ? response.json() : undefined))\n .then((info) => {\n if (info?.nodes !== true)\n return;\n ctx.slots.inject('sidebar.footer.action', () => ctx.slots.register({\n name: 'sidebar.footer.action',\n id: 'a2a',\n order: 10,\n locale: NS,\n // Wake = the standard session-open flow: the host materializes the\n // session's agent and the a2a host half's persisted intent remounts\n // the node, so the cold row flips live on the next poll.\n inject: () => ({\n openSession: (id) => { ctx.sessions.open(id); },\n }),\n }, A2aControl));\n })\n .catch(() => { });\n}\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;EAAA,SAAS,EAAE,GAAE;GAAC,IAAI,GAAE,GAAE,IAAE;GAAG,IAAG,YAAU,OAAO,KAAG,YAAU,OAAO,GAAE,KAAG;QAAO,IAAG,YAAU,OAAO,GAAE,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