@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.
- package/README.md +2 -1
- package/README_zh.md +2 -1
- package/assets/stageDist/assets/index-Bj7S2pA1.css +1 -1
- package/assets/stageDist/assets/index-C-28k_o5.js +974 -974
- package/assets/stageDist/index.html +12 -12
- package/lib/a2a-client.js +3 -2
- package/lib/client.js +64 -64
- package/lib/client.js.map +1 -1
- package/lib/config.js +1 -0
- package/lib/faces/files.js +2 -2
- package/lib/faces/session-log.js +3 -3
- package/lib/faces/wire.js +11 -16
- package/lib/index.js +102 -18
- package/lib/link-keys.js +29 -0
- package/lib/origin-claim.js +4 -0
- package/lib/skill/SKILL.md +117 -117
- package/lib/skill/references/collaboration.md +428 -428
- package/lib/skill/references/discovery.md +78 -78
- package/lib/skill/references/intake.md +107 -107
- package/lib/skill/references/membership.md +73 -73
- package/lib/skill/references/pitfalls.md +51 -51
- package/lib/skill/references/router.md +96 -96
- package/lib/skill/references/routing.md +65 -65
- package/lib/skill/references/setup.md +5 -1
- package/lib/tools/files.js +3 -1
- package/lib/types/a2a-client.d.ts +3 -1
- package/lib/types/config.d.ts +6 -0
- package/lib/types/faces/files.d.ts +2 -1
- package/lib/types/faces/session-log.d.ts +2 -0
- package/lib/types/faces/wire.d.ts +2 -1
- package/lib/types/link-keys.d.ts +13 -0
- package/lib/types/origin-claim.d.ts +2 -0
- package/lib/types/tools/files.d.ts +1 -1
- package/nexus-stage/package.json +21 -21
- package/nexus-stage/scripts/mockhost.py +261 -261
- package/nexus-stage/src/canvas-ops.ts +191 -191
- package/nexus-stage/src/canvas-wire.ts +164 -164
- package/nexus-stage/src/cli-home-picker.ts +42 -42
- package/nexus-stage/src/fault.ts +56 -56
- package/nexus-stage/src/federation-overlay.ts +103 -103
- package/nexus-stage/src/federation.ts +241 -241
- package/nexus-stage/src/layout-doc.ts +145 -145
- package/nexus-stage/src/main.ts +513 -513
- package/nexus-stage/src/planning-card-text.ts +73 -73
- package/nexus-stage/src/planning-card.ts +63 -63
- package/nexus-stage/src/planning-edges.ts +26 -26
- package/nexus-stage/src/planning-fit.ts +45 -45
- package/nexus-stage/src/planning-frame-hue.ts +13 -13
- package/nexus-stage/src/planning-legend.ts +39 -39
- package/nexus-stage/src/planning-member-handles.ts +61 -61
- package/nexus-stage/src/planning-menus.ts +422 -422
- package/nexus-stage/src/planning-mirror.ts +75 -75
- package/nexus-stage/src/planning-nodelist.ts +294 -294
- package/nexus-stage/src/planning-overlap.ts +159 -159
- package/nexus-stage/src/planning-reachability.ts +28 -28
- package/nexus-stage/src/planning-relayout.ts +121 -121
- package/nexus-stage/src/planning-roster.ts +15 -15
- package/nexus-stage/src/planning-search.ts +168 -168
- package/nexus-stage/src/planning-types.ts +115 -115
- package/nexus-stage/src/planning-undo.ts +68 -68
- package/nexus-stage/src/planning-view.ts +1499 -1499
- package/nexus-stage/src/planning.css +340 -340
- package/nexus-stage/src/seat-name-editor.ts +31 -31
- package/nexus-stage/src/session-drag.ts +64 -64
- package/nexus-stage/src/viewport.ts +106 -106
- package/nexus-stage/src/wb-chat.ts +684 -684
- package/nexus-stage/src/wb-directory.ts +237 -237
- package/nexus-stage/src/wb-ledger.ts +279 -279
- package/nexus-stage/src/wb-names.ts +43 -43
- package/nexus-stage/src/wb-rail.ts +147 -147
- package/nexus-stage/src/workbench.css +388 -388
- package/nexus-stage/src/workbench.ts +1272 -1272
- package/nexus-stage/src/world.ts +509 -509
- package/nexus-stage/tsconfig.json +24 -24
- package/nexus-stage/vite.config.ts +15 -15
- package/package.json +1 -1
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 撤销 for the board layout (frontend seat, 2026-10-29): with no status-bar
|
|
3
|
-
* hint for automatic moves (owner: 载入时避让挪了卡片,不需要在状态条提示),
|
|
4
|
-
* a wrong move must be one keystroke away from undone. Covers card drags,
|
|
5
|
-
* frame drags and resizes, keyboard nudges, 整理成员, 一键重排 and the
|
|
6
|
-
* load-time settle — positions and frame rects only. Team membership
|
|
7
|
-
* (入队 / 离队, host writes) is not undone here.
|
|
8
|
-
*
|
|
9
|
-
* capture() before an edit, commit(before) after it: only an edit that
|
|
10
|
-
* actually moved something already on the board is recorded, so a click,
|
|
11
|
-
* a pan or a marquee leaves the stack alone, and a card that arrived by
|
|
12
|
-
* poll mid-gesture is not counted as a move. revert(before) is for a
|
|
13
|
-
* gesture the OS cancelled (pointercancel): layout back, nothing recorded.
|
|
14
|
-
* @module nexus-stage/planning-undo
|
|
15
|
-
*/
|
|
16
|
-
import type { FrameGeom, WorldModel } from './world'
|
|
17
|
-
|
|
18
|
-
export interface LayoutSnap {
|
|
19
|
-
readonly nodes: ReadonlyMap<string, { readonly x: number; readonly y: number }>
|
|
20
|
-
readonly frames: ReadonlyMap<string, FrameGeom>
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/** Undo depth (older steps fall off). */
|
|
24
|
-
export const UNDO_LIMIT = 30
|
|
25
|
-
|
|
26
|
-
export function createLayoutUndo(model: WorldModel) {
|
|
27
|
-
const stack: LayoutSnap[] = []
|
|
28
|
-
const capture = (): LayoutSnap => ({
|
|
29
|
-
nodes: new Map(model.allNodes().map(n => [n.id, { x: n.x, y: n.y }])),
|
|
30
|
-
frames: new Map(model.allFrames().map(([name, f]) => [name, { ...f }])),
|
|
31
|
-
})
|
|
32
|
-
/** True when something present both before and now has moved or changed size. */
|
|
33
|
-
const moved = (before: LayoutSnap): boolean =>
|
|
34
|
-
model.allNodes().some(n => { const b = before.nodes.get(n.id); return b !== undefined && (b.x !== n.x || b.y !== n.y) }) ||
|
|
35
|
-
model.allFrames().some(([name, f]) => { const b = before.frames.get(name); return b !== undefined && (b.x !== f.x || b.y !== f.y || b.w !== f.w || b.h !== f.h) })
|
|
36
|
-
const restore = (snap: LayoutSnap): void => {
|
|
37
|
-
for (const n of model.allNodes()) {
|
|
38
|
-
const b = snap.nodes.get(n.id)
|
|
39
|
-
if (b !== undefined && (b.x !== n.x || b.y !== n.y)) model.dragNodes([n.id], b.x - n.x, b.y - n.y)
|
|
40
|
-
}
|
|
41
|
-
for (const [name, f] of model.allFrames()) {
|
|
42
|
-
const b = snap.frames.get(name)
|
|
43
|
-
if (b !== undefined && (b.x !== f.x || b.y !== f.y || b.w !== f.w || b.h !== f.h)) model.setFrame(name, { ...b })
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
return {
|
|
47
|
-
capture,
|
|
48
|
-
commit(before: LayoutSnap): void {
|
|
49
|
-
if (!moved(before)) return
|
|
50
|
-
stack.push(before)
|
|
51
|
-
if (stack.length > UNDO_LIMIT) stack.shift()
|
|
52
|
-
},
|
|
53
|
-
/** Restore the last recorded layout; false when there is nothing to undo. */
|
|
54
|
-
undo(): boolean {
|
|
55
|
-
const snap = stack.pop()
|
|
56
|
-
if (snap === undefined) return false
|
|
57
|
-
restore(snap)
|
|
58
|
-
return true
|
|
59
|
-
},
|
|
60
|
-
/** Put back `before` without recording a step (an abandoned gesture); true when something moved. */
|
|
61
|
-
revert(before: LayoutSnap): boolean {
|
|
62
|
-
if (!moved(before)) return false
|
|
63
|
-
restore(before)
|
|
64
|
-
return true
|
|
65
|
-
},
|
|
66
|
-
get depth(): number { return stack.length },
|
|
67
|
-
}
|
|
68
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* 撤销 for the board layout (frontend seat, 2026-10-29): with no status-bar
|
|
3
|
+
* hint for automatic moves (owner: 载入时避让挪了卡片,不需要在状态条提示),
|
|
4
|
+
* a wrong move must be one keystroke away from undone. Covers card drags,
|
|
5
|
+
* frame drags and resizes, keyboard nudges, 整理成员, 一键重排 and the
|
|
6
|
+
* load-time settle — positions and frame rects only. Team membership
|
|
7
|
+
* (入队 / 离队, host writes) is not undone here.
|
|
8
|
+
*
|
|
9
|
+
* capture() before an edit, commit(before) after it: only an edit that
|
|
10
|
+
* actually moved something already on the board is recorded, so a click,
|
|
11
|
+
* a pan or a marquee leaves the stack alone, and a card that arrived by
|
|
12
|
+
* poll mid-gesture is not counted as a move. revert(before) is for a
|
|
13
|
+
* gesture the OS cancelled (pointercancel): layout back, nothing recorded.
|
|
14
|
+
* @module nexus-stage/planning-undo
|
|
15
|
+
*/
|
|
16
|
+
import type { FrameGeom, WorldModel } from './world'
|
|
17
|
+
|
|
18
|
+
export interface LayoutSnap {
|
|
19
|
+
readonly nodes: ReadonlyMap<string, { readonly x: number; readonly y: number }>
|
|
20
|
+
readonly frames: ReadonlyMap<string, FrameGeom>
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** Undo depth (older steps fall off). */
|
|
24
|
+
export const UNDO_LIMIT = 30
|
|
25
|
+
|
|
26
|
+
export function createLayoutUndo(model: WorldModel) {
|
|
27
|
+
const stack: LayoutSnap[] = []
|
|
28
|
+
const capture = (): LayoutSnap => ({
|
|
29
|
+
nodes: new Map(model.allNodes().map(n => [n.id, { x: n.x, y: n.y }])),
|
|
30
|
+
frames: new Map(model.allFrames().map(([name, f]) => [name, { ...f }])),
|
|
31
|
+
})
|
|
32
|
+
/** True when something present both before and now has moved or changed size. */
|
|
33
|
+
const moved = (before: LayoutSnap): boolean =>
|
|
34
|
+
model.allNodes().some(n => { const b = before.nodes.get(n.id); return b !== undefined && (b.x !== n.x || b.y !== n.y) }) ||
|
|
35
|
+
model.allFrames().some(([name, f]) => { const b = before.frames.get(name); return b !== undefined && (b.x !== f.x || b.y !== f.y || b.w !== f.w || b.h !== f.h) })
|
|
36
|
+
const restore = (snap: LayoutSnap): void => {
|
|
37
|
+
for (const n of model.allNodes()) {
|
|
38
|
+
const b = snap.nodes.get(n.id)
|
|
39
|
+
if (b !== undefined && (b.x !== n.x || b.y !== n.y)) model.dragNodes([n.id], b.x - n.x, b.y - n.y)
|
|
40
|
+
}
|
|
41
|
+
for (const [name, f] of model.allFrames()) {
|
|
42
|
+
const b = snap.frames.get(name)
|
|
43
|
+
if (b !== undefined && (b.x !== f.x || b.y !== f.y || b.w !== f.w || b.h !== f.h)) model.setFrame(name, { ...b })
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
capture,
|
|
48
|
+
commit(before: LayoutSnap): void {
|
|
49
|
+
if (!moved(before)) return
|
|
50
|
+
stack.push(before)
|
|
51
|
+
if (stack.length > UNDO_LIMIT) stack.shift()
|
|
52
|
+
},
|
|
53
|
+
/** Restore the last recorded layout; false when there is nothing to undo. */
|
|
54
|
+
undo(): boolean {
|
|
55
|
+
const snap = stack.pop()
|
|
56
|
+
if (snap === undefined) return false
|
|
57
|
+
restore(snap)
|
|
58
|
+
return true
|
|
59
|
+
},
|
|
60
|
+
/** Put back `before` without recording a step (an abandoned gesture); true when something moved. */
|
|
61
|
+
revert(before: LayoutSnap): boolean {
|
|
62
|
+
if (!moved(before)) return false
|
|
63
|
+
restore(before)
|
|
64
|
+
return true
|
|
65
|
+
},
|
|
66
|
+
get depth(): number { return stack.length },
|
|
67
|
+
}
|
|
68
|
+
}
|