@nelsonlongxiang/dsh-open-a2a-net 0.5.14 → 0.6.24
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 +243 -121
- package/README_zh.md +144 -84
- package/assets/nexusDist/assets/index-034h1cNc.js +3 -0
- package/assets/nexusDist/assets/index-PG9EieGX.css +1 -0
- package/assets/nexusDist/index.html +26 -0
- package/assets/stageDist/assets/index-Bj7S2pA1.css +1 -0
- package/assets/stageDist/assets/index-C-28k_o5.js +974 -0
- package/assets/stageDist/assets/interiors-CQGBjffT.png +0 -0
- package/assets/stageDist/assets/office-tileset-CHQT-uYL.png +0 -0
- package/assets/stageDist/index.html +13 -0
- package/lib/a2a-client.js +190 -13
- package/lib/canvas-store.js +218 -0
- package/lib/card.js +25 -0
- package/lib/client/A2aControl.js +45 -137
- package/lib/client/locales.js +16 -40
- package/lib/client.js +164 -467
- package/lib/client.js.map +1 -1
- package/lib/group-store.js +6 -0
- package/lib/idempotency-store.js +291 -0
- package/lib/index.js +4217 -259
- package/lib/joined-store.js +11 -0
- package/lib/layout-store.js +155 -0
- package/lib/peer-store.js +98 -13
- package/lib/receipt-ladder.js +35 -0
- package/lib/receipt.js +102 -0
- package/lib/self-suppress.js +62 -0
- package/lib/session-transcript.js +150 -0
- package/lib/skill/SKILL.md +77 -0
- package/lib/skill/references/discovery.md +38 -0
- package/lib/skill/references/membership.md +50 -0
- package/lib/skill/references/pitfalls.md +42 -0
- package/lib/skill/references/routing.md +43 -0
- package/lib/skill-registration.js +52 -0
- package/lib/stage-mount.js +32 -0
- package/lib/task-ledger.js +540 -0
- package/lib/team-store.js +122 -0
- package/lib/teams-bridge.js +18 -0
- package/lib/transport-caps.js +31 -0
- package/lib/types/a2a-client.d.ts +72 -1
- package/lib/types/canvas-store.d.ts +102 -0
- package/lib/types/client/A2aControl.d.ts +18 -28
- package/lib/types/client/locales.d.ts +1 -1
- package/lib/types/group-store.d.ts +6 -0
- package/lib/types/idempotency-store.d.ts +164 -0
- package/lib/types/index.d.ts +210 -6
- package/lib/types/joined-store.d.ts +9 -0
- package/lib/types/layout-store.d.ts +63 -0
- package/lib/types/peer-store.d.ts +45 -2
- package/lib/types/receipt-ladder.d.ts +25 -0
- package/lib/types/receipt.d.ts +51 -0
- package/lib/types/self-suppress.d.ts +41 -0
- package/lib/types/session-transcript.d.ts +37 -0
- package/lib/types/skill-registration.d.ts +3 -0
- package/lib/types/stage-mount.d.ts +29 -0
- package/lib/types/task-ledger.d.ts +308 -0
- package/lib/types/team-store.d.ts +55 -0
- package/lib/types/teams-bridge.d.ts +112 -0
- package/lib/types/transport-caps.d.ts +29 -0
- package/lib/types/types.d.ts +43 -0
- package/nexus-stage/package-lock.json +2262 -0
- package/nexus-stage/package.json +21 -0
- package/nexus-stage/scripts/__pycache__/mockhost.cpython-312.pyc +0 -0
- package/nexus-stage/scripts/mockhost.py +253 -0
- package/nexus-stage/src/canvas-ops.ts +175 -0
- package/nexus-stage/src/canvas-wire.ts +156 -0
- package/nexus-stage/src/edges.ts +72 -0
- package/nexus-stage/src/fault.ts +56 -0
- package/nexus-stage/src/federation.ts +234 -0
- package/nexus-stage/src/layout-doc.ts +143 -0
- package/nexus-stage/src/layout-wire.ts +158 -0
- package/nexus-stage/src/main.ts +361 -0
- package/nexus-stage/src/planning-menus.ts +352 -0
- package/nexus-stage/src/planning-nodelist.ts +294 -0
- package/nexus-stage/src/planning-types.ts +111 -0
- package/nexus-stage/src/planning-view.ts +1313 -0
- package/nexus-stage/src/planning.css +280 -0
- package/nexus-stage/src/seat.ts +35 -0
- package/nexus-stage/src/stage-name.ts +13 -0
- package/nexus-stage/src/tokens.ts +32 -0
- package/nexus-stage/src/viewport.ts +83 -0
- package/nexus-stage/src/workbench.css +267 -0
- package/nexus-stage/src/workbench.ts +1530 -0
- package/nexus-stage/src/world.ts +509 -0
- package/nexus-stage/tsconfig.json +25 -0
- package/nexus-stage/vite.config.ts +16 -0
- package/package.json +83 -22
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public shapes of the planning board: its input, dependencies, the
|
|
3
|
+
* handler seam tests drive, and the view surface. planning-view re-exports
|
|
4
|
+
* all of them, so importers keep using `./planning-view`.
|
|
5
|
+
* @module nexus-stage/planning-types
|
|
6
|
+
*/
|
|
7
|
+
import type { CanvasAction } from './canvas-ops'
|
|
8
|
+
import type { InFlightRow, PeerRow, RemoteTeamRow } from './federation'
|
|
9
|
+
import type { LampState } from './layout-wire'
|
|
10
|
+
import type { LayoutViewport } from './viewport'
|
|
11
|
+
import type { SessionLite, TeamLite } from './world'
|
|
12
|
+
|
|
13
|
+
/** Minimal session/team shapes consumed here (topology rows satisfy them). */
|
|
14
|
+
export interface PlanningSession extends SessionLite {}
|
|
15
|
+
export interface PlanningTeam extends TeamLite {}
|
|
16
|
+
|
|
17
|
+
export interface PlanningInput {
|
|
18
|
+
sessions: ReadonlyArray<PlanningSession>
|
|
19
|
+
teams: ReadonlyArray<PlanningTeam>
|
|
20
|
+
peerCount: number
|
|
21
|
+
/** Federation peers (PR D): rows for the badge column right of the content. */
|
|
22
|
+
peers?: ReadonlyArray<PeerRow>
|
|
23
|
+
/** Pending outbound routes (PR D): the accent activity edges. */
|
|
24
|
+
inFlight?: ReadonlyArray<InFlightRow>
|
|
25
|
+
/** Remote team directory rows (PR D v1 ruling): grouped under peer cards. */
|
|
26
|
+
remoteTeams?: ReadonlyArray<RemoteTeamRow>
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** Screen-width class a viewport is remembered under (window width, not board width — collapsing the rail must not switch buckets). */
|
|
30
|
+
export type ViewportBucket = 'narrow' | 'medium' | 'wide'
|
|
31
|
+
|
|
32
|
+
export function viewportBucket(width: number): ViewportBucket {
|
|
33
|
+
return width < 680 ? 'narrow' : width < 1024 ? 'medium' : 'wide'
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface PlanningDeps {
|
|
37
|
+
/** An edit that should persist happened (drag/nudge/pan/zoom/marquee end). */
|
|
38
|
+
onDirty(): void
|
|
39
|
+
/** The save lamp was clicked (error state -> retry). */
|
|
40
|
+
onLampClick(): void
|
|
41
|
+
/** Viewport size in CSS px (defaults to the root element's box; tests
|
|
42
|
+
* inject fixed sizes so fit math is assertable without layout). */
|
|
43
|
+
viewSize?(): { w: number; h: number }
|
|
44
|
+
/**
|
|
45
|
+
* Per-device viewport memory. The saved layout's viewport is the LAST
|
|
46
|
+
* saver's screen, so a desktop pan landed on a phone (and any other
|
|
47
|
+
* device's save yanked this one's view). When present, the first adopted
|
|
48
|
+
* layout takes this screen bucket's own viewport — else, on a wide screen,
|
|
49
|
+
* the host's (where it was most likely saved), else a fit — later
|
|
50
|
+
* adoptions leave the viewport alone, and every persisted edit writes the
|
|
51
|
+
* bucket back. Optional: without it the host viewport wins as before.
|
|
52
|
+
*/
|
|
53
|
+
viewportStore?: { get(bucket: ViewportBucket): unknown; set(bucket: ViewportBucket, vp: LayoutViewport): void }
|
|
54
|
+
/**
|
|
55
|
+
* A team write action (optimistic state already applied by the view).
|
|
56
|
+
* Resolves true when the host accepted it — or it was an idempotent
|
|
57
|
+
* no-op (ok:false without an error string). Resolves false when the
|
|
58
|
+
* write was refused/failed: the view then rolls the action's scoped
|
|
59
|
+
* undo back itself. Rejecting the promise is also handled (treated as
|
|
60
|
+
* false) — the channel must not leave the team's guard pinned.
|
|
61
|
+
*/
|
|
62
|
+
onCanvasAction(a: CanvasAction): Promise<boolean>
|
|
63
|
+
/** A plain (non-shift, no-drag) left click selected exactly one node
|
|
64
|
+
* (0.6.13): the host may open the reading face (chat drawer) for it.
|
|
65
|
+
* Selection itself is already applied — this is a notification, not a
|
|
66
|
+
* command; the host decides what (if anything) to show. */
|
|
67
|
+
onNodePick?(id: string): void
|
|
68
|
+
/** Wall clock for the inFlight age labels (tests pin it; default Date.now). */
|
|
69
|
+
now?(): number
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/** Pointer-like event surface the handlers consume (real events satisfy it). */
|
|
73
|
+
export interface SeamPointer {
|
|
74
|
+
button: number
|
|
75
|
+
shiftKey: boolean
|
|
76
|
+
ctrlKey: boolean
|
|
77
|
+
clientX: number
|
|
78
|
+
clientY: number
|
|
79
|
+
pointerId?: number
|
|
80
|
+
target: Element | null
|
|
81
|
+
deltaX?: number
|
|
82
|
+
deltaY?: number
|
|
83
|
+
deltaMode?: number
|
|
84
|
+
preventDefault(): void
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export interface SeamKey { key: string; shiftKey: boolean; altKey?: boolean; ctrlKey?: boolean; metaKey?: boolean; target: Element | null; preventDefault(): void }
|
|
88
|
+
|
|
89
|
+
export interface PlanningView {
|
|
90
|
+
root: HTMLElement
|
|
91
|
+
reconcile(input: PlanningInput): void
|
|
92
|
+
activate(): void
|
|
93
|
+
deactivate(): void
|
|
94
|
+
/** Adopt a (possibly normalized) layout document when the save loop allows. */
|
|
95
|
+
adoptExternalLayout(layout: unknown): void
|
|
96
|
+
/** The current document for the save loop, read at send time. */
|
|
97
|
+
snapshotDoc(): unknown
|
|
98
|
+
setLamp(state: LampState, savedAt?: string): void
|
|
99
|
+
/** A transient notice (host error verbatim or an info hint). */
|
|
100
|
+
notice(kind: 'error' | 'info', text: string): void
|
|
101
|
+
seam: {
|
|
102
|
+
pointerDown(ev: SeamPointer): void
|
|
103
|
+
pointerMove(ev: SeamPointer): void
|
|
104
|
+
pointerUp(ev: SeamPointer): void
|
|
105
|
+
wheel(ev: SeamPointer): void
|
|
106
|
+
key(ev: SeamKey): void
|
|
107
|
+
keyUp(ev: SeamKey): void
|
|
108
|
+
contextMenu(ev: SeamPointer): void
|
|
109
|
+
}
|
|
110
|
+
destroy(): void
|
|
111
|
+
}
|