@nelsonlongxiang/dsh-open-a2a-net 0.6.40 → 0.6.42

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 (76) hide show
  1. package/README.md +2 -1
  2. package/README_zh.md +2 -1
  3. package/assets/stageDist/assets/index-Bj7S2pA1.css +1 -1
  4. package/assets/stageDist/assets/index-C-28k_o5.js +974 -974
  5. package/assets/stageDist/index.html +12 -12
  6. package/lib/a2a-client.js +3 -2
  7. package/lib/client.js +64 -64
  8. package/lib/client.js.map +1 -1
  9. package/lib/config.js +1 -0
  10. package/lib/faces/files.js +2 -2
  11. package/lib/faces/session-log.js +3 -3
  12. package/lib/faces/wire.js +11 -16
  13. package/lib/index.js +102 -18
  14. package/lib/link-keys.js +29 -0
  15. package/lib/origin-claim.js +4 -0
  16. package/lib/skill/SKILL.md +117 -117
  17. package/lib/skill/references/collaboration.md +428 -428
  18. package/lib/skill/references/discovery.md +78 -78
  19. package/lib/skill/references/intake.md +107 -107
  20. package/lib/skill/references/membership.md +73 -73
  21. package/lib/skill/references/pitfalls.md +51 -51
  22. package/lib/skill/references/router.md +96 -96
  23. package/lib/skill/references/routing.md +65 -65
  24. package/lib/skill/references/setup.md +5 -1
  25. package/lib/tools/files.js +3 -1
  26. package/lib/types/a2a-client.d.ts +3 -1
  27. package/lib/types/config.d.ts +6 -0
  28. package/lib/types/faces/files.d.ts +2 -1
  29. package/lib/types/faces/session-log.d.ts +2 -0
  30. package/lib/types/faces/wire.d.ts +2 -1
  31. package/lib/types/link-keys.d.ts +13 -0
  32. package/lib/types/origin-claim.d.ts +2 -0
  33. package/lib/types/tools/files.d.ts +1 -1
  34. package/nexus-stage/package.json +21 -21
  35. package/nexus-stage/scripts/mockhost.py +261 -261
  36. package/nexus-stage/src/canvas-ops.ts +191 -191
  37. package/nexus-stage/src/canvas-wire.ts +164 -164
  38. package/nexus-stage/src/cli-home-picker.ts +42 -42
  39. package/nexus-stage/src/fault.ts +56 -56
  40. package/nexus-stage/src/federation-overlay.ts +103 -103
  41. package/nexus-stage/src/federation.ts +241 -241
  42. package/nexus-stage/src/layout-doc.ts +145 -145
  43. package/nexus-stage/src/main.ts +513 -513
  44. package/nexus-stage/src/planning-card-text.ts +73 -73
  45. package/nexus-stage/src/planning-card.ts +63 -63
  46. package/nexus-stage/src/planning-edges.ts +26 -26
  47. package/nexus-stage/src/planning-fit.ts +45 -45
  48. package/nexus-stage/src/planning-frame-hue.ts +13 -13
  49. package/nexus-stage/src/planning-legend.ts +39 -39
  50. package/nexus-stage/src/planning-member-handles.ts +61 -61
  51. package/nexus-stage/src/planning-menus.ts +422 -422
  52. package/nexus-stage/src/planning-mirror.ts +75 -75
  53. package/nexus-stage/src/planning-nodelist.ts +294 -294
  54. package/nexus-stage/src/planning-overlap.ts +159 -159
  55. package/nexus-stage/src/planning-reachability.ts +28 -28
  56. package/nexus-stage/src/planning-relayout.ts +121 -121
  57. package/nexus-stage/src/planning-roster.ts +15 -15
  58. package/nexus-stage/src/planning-search.ts +168 -168
  59. package/nexus-stage/src/planning-types.ts +115 -115
  60. package/nexus-stage/src/planning-undo.ts +68 -68
  61. package/nexus-stage/src/planning-view.ts +1499 -1499
  62. package/nexus-stage/src/planning.css +340 -340
  63. package/nexus-stage/src/seat-name-editor.ts +31 -31
  64. package/nexus-stage/src/session-drag.ts +64 -64
  65. package/nexus-stage/src/viewport.ts +106 -106
  66. package/nexus-stage/src/wb-chat.ts +684 -684
  67. package/nexus-stage/src/wb-directory.ts +237 -237
  68. package/nexus-stage/src/wb-ledger.ts +279 -279
  69. package/nexus-stage/src/wb-names.ts +43 -43
  70. package/nexus-stage/src/wb-rail.ts +147 -147
  71. package/nexus-stage/src/workbench.css +388 -388
  72. package/nexus-stage/src/workbench.ts +1272 -1272
  73. package/nexus-stage/src/world.ts +509 -509
  74. package/nexus-stage/tsconfig.json +24 -24
  75. package/nexus-stage/vite.config.ts +15 -15
  76. package/package.json +1 -1
@@ -1,61 +1,61 @@
1
- /** Pure membership projections: joined-local handles for remote organization members, canvas team indexes, mirror-frame members. */
2
- import type { RemoteTeamRow } from './federation'
3
- import type { SessionLite } from './world'
4
-
5
- type HandleSession = Pick<SessionLite, 'id' | 'team' | 'joined'>
6
-
7
- /** Map only unique joined id8 handles that no remote directory row already owns. */
8
- export function joinedLocalIdsByHandle(sessions: ReadonlyArray<HandleSession>, publishedHandles: ReadonlySet<string>): Map<string, string> {
9
- const localIds = new Map<string, string>()
10
- const ambiguous = new Set<string>()
11
- for (const session of sessions) {
12
- if (session.joined !== true) continue
13
- const slash = session.team.lastIndexOf('/')
14
- if (slash <= 0 || session.team.slice(slash + 1) !== session.id.replace(/^session-/, '').slice(0, 8)) continue
15
- const handle = session.team
16
- if (publishedHandles.has(handle) || ambiguous.has(handle)) continue
17
- if (localIds.has(handle)) {
18
- localIds.delete(handle)
19
- ambiguous.add(handle)
20
- } else {
21
- localIds.set(handle, session.id)
22
- }
23
- }
24
- return localIds
25
- }
26
-
27
- /** Project a remote canvas member to its local card or stable synthetic card id. */
28
- export function remoteMemberBoardId(member: string, localIdsByHandle: ReadonlyMap<string, string>, remoteTeams: ReadonlyArray<RemoteTeamRow> | undefined, peerUrl: string): string {
29
- const localId = localIdsByHandle.get(member)
30
- if (localId !== undefined) return localId
31
- if (member.includes('/')) return `member-${member.replace(/[^a-z0-9-]/gi, '-')}`
32
- const peerZone = remoteTeams?.find(row => row.via === peerUrl)?.team.split('/')[0] ?? 'dsh'
33
- return `member-${peerZone}-${member.replace(/^session-/, '').slice(0, 8)}`
34
- }
35
-
36
- /** Each member id → the canvas teams it sits in, with its position in that team's member order. */
37
- export function membershipIndex(teams: ReadonlyArray<{ name: string; members: ReadonlyArray<{ id: string }> }>): Map<string, Array<{ team: string; index: number }>> {
38
- const memberships = new Map<string, Array<{ team: string; index: number }>>()
39
- for (const team of teams) {
40
- for (let i = 0; i < team.members.length; i++) {
41
- const id = team.members[i]!.id
42
- const list = memberships.get(id) ?? []
43
- list.push({ team: team.name, index: i })
44
- memberships.set(id, list)
45
- }
46
- }
47
- return memberships
48
- }
49
-
50
- /** Local joined sessions that sit in a peer's org team (a mirror frame): they are teamed even with no local team. */
51
- export function mirrorMemberIds(peerOrg: ReadonlyArray<{ org: ReadonlyArray<{ members: readonly string[] }> }>, sessions: ReadonlyArray<HandleSession>, remoteTeams: ReadonlyArray<RemoteTeamRow> | undefined): Set<string> {
52
- const byHandle = joinedLocalIdsByHandle(sessions, new Set((remoteTeams ?? []).map(session => session.team)))
53
- const ids = new Set<string>()
54
- for (const row of peerOrg) {
55
- for (const team of row.org) for (const member of team.members) {
56
- const id = byHandle.get(member)
57
- if (id !== undefined) ids.add(id)
58
- }
59
- }
60
- return ids
61
- }
1
+ /** Pure membership projections: joined-local handles for remote organization members, canvas team indexes, mirror-frame members. */
2
+ import type { RemoteTeamRow } from './federation'
3
+ import type { SessionLite } from './world'
4
+
5
+ type HandleSession = Pick<SessionLite, 'id' | 'team' | 'joined'>
6
+
7
+ /** Map only unique joined id8 handles that no remote directory row already owns. */
8
+ export function joinedLocalIdsByHandle(sessions: ReadonlyArray<HandleSession>, publishedHandles: ReadonlySet<string>): Map<string, string> {
9
+ const localIds = new Map<string, string>()
10
+ const ambiguous = new Set<string>()
11
+ for (const session of sessions) {
12
+ if (session.joined !== true) continue
13
+ const slash = session.team.lastIndexOf('/')
14
+ if (slash <= 0 || session.team.slice(slash + 1) !== session.id.replace(/^session-/, '').slice(0, 8)) continue
15
+ const handle = session.team
16
+ if (publishedHandles.has(handle) || ambiguous.has(handle)) continue
17
+ if (localIds.has(handle)) {
18
+ localIds.delete(handle)
19
+ ambiguous.add(handle)
20
+ } else {
21
+ localIds.set(handle, session.id)
22
+ }
23
+ }
24
+ return localIds
25
+ }
26
+
27
+ /** Project a remote canvas member to its local card or stable synthetic card id. */
28
+ export function remoteMemberBoardId(member: string, localIdsByHandle: ReadonlyMap<string, string>, remoteTeams: ReadonlyArray<RemoteTeamRow> | undefined, peerUrl: string): string {
29
+ const localId = localIdsByHandle.get(member)
30
+ if (localId !== undefined) return localId
31
+ if (member.includes('/')) return `member-${member.replace(/[^a-z0-9-]/gi, '-')}`
32
+ const peerZone = remoteTeams?.find(row => row.via === peerUrl)?.team.split('/')[0] ?? 'dsh'
33
+ return `member-${peerZone}-${member.replace(/^session-/, '').slice(0, 8)}`
34
+ }
35
+
36
+ /** Each member id → the canvas teams it sits in, with its position in that team's member order. */
37
+ export function membershipIndex(teams: ReadonlyArray<{ name: string; members: ReadonlyArray<{ id: string }> }>): Map<string, Array<{ team: string; index: number }>> {
38
+ const memberships = new Map<string, Array<{ team: string; index: number }>>()
39
+ for (const team of teams) {
40
+ for (let i = 0; i < team.members.length; i++) {
41
+ const id = team.members[i]!.id
42
+ const list = memberships.get(id) ?? []
43
+ list.push({ team: team.name, index: i })
44
+ memberships.set(id, list)
45
+ }
46
+ }
47
+ return memberships
48
+ }
49
+
50
+ /** Local joined sessions that sit in a peer's org team (a mirror frame): they are teamed even with no local team. */
51
+ export function mirrorMemberIds(peerOrg: ReadonlyArray<{ org: ReadonlyArray<{ members: readonly string[] }> }>, sessions: ReadonlyArray<HandleSession>, remoteTeams: ReadonlyArray<RemoteTeamRow> | undefined): Set<string> {
52
+ const byHandle = joinedLocalIdsByHandle(sessions, new Set((remoteTeams ?? []).map(session => session.team)))
53
+ const ids = new Set<string>()
54
+ for (const row of peerOrg) {
55
+ for (const team of row.org) for (const member of team.members) {
56
+ const id = byHandle.get(member)
57
+ if (id !== undefined) ids.add(id)
58
+ }
59
+ }
60
+ return ids
61
+ }