@wcstack/devtools 1.27.0 → 1.28.0
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/dist/auto.min.js +1 -1
- package/dist/auto.min.js.map +1 -1
- package/dist/index.d.ts +32 -1
- package/dist/index.esm.js +77 -1
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -214,7 +214,7 @@ function formatArgs(args) {
|
|
|
214
214
|
const RESERVED_STATE_NAME_PREFIX = "wcs-devtools";
|
|
215
215
|
const DEFAULT_TIMELINE_CAPACITY = 500;
|
|
216
216
|
function pathKeyOf(stateName, path) {
|
|
217
|
-
return stateName + "
|
|
217
|
+
return stateName + "\u0000" + path;
|
|
218
218
|
}
|
|
219
219
|
class DevtoolsCore {
|
|
220
220
|
_timelineCapacity;
|
|
@@ -601,6 +601,74 @@ class DevtoolsCore {
|
|
|
601
601
|
});
|
|
602
602
|
return;
|
|
603
603
|
}
|
|
604
|
+
case "propagation:suppressed": {
|
|
605
|
+
// two-way エコーの辺単位抑止。state 名を持たない(node+member が主語)
|
|
606
|
+
// ため hidden 判定はここでは行わない。
|
|
607
|
+
this._appendTimeline({
|
|
608
|
+
sourceId,
|
|
609
|
+
kind: "propagation-suppressed",
|
|
610
|
+
stateName: null,
|
|
611
|
+
label: event.member,
|
|
612
|
+
detail: `${event.reason} (tx ${event.transactionId}, edge ${event.edgeId})`,
|
|
613
|
+
subscriberCount: null,
|
|
614
|
+
});
|
|
615
|
+
return;
|
|
616
|
+
}
|
|
617
|
+
case "propagation:coalesced": {
|
|
618
|
+
const stateName = event.absoluteAddress.absolutePathInfo.stateName;
|
|
619
|
+
if (this.isHiddenStateName(stateName)) {
|
|
620
|
+
return;
|
|
621
|
+
}
|
|
622
|
+
this._appendTimeline({
|
|
623
|
+
sourceId,
|
|
624
|
+
kind: "propagation-coalesced",
|
|
625
|
+
stateName,
|
|
626
|
+
label: this._labelOf(event.absoluteAddress),
|
|
627
|
+
detail: `tx ${event.droppedTransactionId} dropped (winner tx ${event.winnerTransactionId})`,
|
|
628
|
+
subscriberCount: null,
|
|
629
|
+
});
|
|
630
|
+
return;
|
|
631
|
+
}
|
|
632
|
+
case "propagation:hop-limit": {
|
|
633
|
+
const stateName = event.absoluteAddress.absolutePathInfo.stateName;
|
|
634
|
+
if (this.isHiddenStateName(stateName)) {
|
|
635
|
+
return;
|
|
636
|
+
}
|
|
637
|
+
this._appendTimeline({
|
|
638
|
+
sourceId,
|
|
639
|
+
kind: "propagation-hop-limit",
|
|
640
|
+
stateName,
|
|
641
|
+
label: this._labelOf(event.absoluteAddress),
|
|
642
|
+
detail: `hop ${event.hop} (tx ${event.transactionId})`,
|
|
643
|
+
subscriberCount: null,
|
|
644
|
+
});
|
|
645
|
+
return;
|
|
646
|
+
}
|
|
647
|
+
case "contract:drift": {
|
|
648
|
+
// sidecar と live wcBindable の乖離。live が正本(wcstack-manifest-schema.md)。
|
|
649
|
+
// sidecarEvent / liveEvent は型上 optional(reason と結合されていない構造的
|
|
650
|
+
// 型付け)のため、欠落 payload でも "undefined" を表示しない防御を入れる。
|
|
651
|
+
const memberPart = event.member !== undefined ? `: ${event.member}` : "";
|
|
652
|
+
const eventPart = event.reason === "event-mismatch"
|
|
653
|
+
? ` (sidecar ${event.sidecarEvent ?? "?"} / live ${event.liveEvent ?? "?"})`
|
|
654
|
+
: "";
|
|
655
|
+
this._appendTimeline({
|
|
656
|
+
sourceId,
|
|
657
|
+
kind: "contract-drift",
|
|
658
|
+
stateName: null,
|
|
659
|
+
label: event.tag,
|
|
660
|
+
detail: `${event.reason}${memberPart}${eventPart}`,
|
|
661
|
+
subscriberCount: null,
|
|
662
|
+
});
|
|
663
|
+
return;
|
|
664
|
+
}
|
|
665
|
+
case "contract:manifest-read":
|
|
666
|
+
case "contract:unsupported-extension": {
|
|
667
|
+
// 情報イベント。contract analyzer の戻り値 API から取得でき、timeline は
|
|
668
|
+
// 活動ログに絞る(static-wiring-dx-design.md §6 の行 4 種)。union に
|
|
669
|
+
// 載せることで「型に無いイベントを黙って捨てる」状態だけを解消する。
|
|
670
|
+
return;
|
|
671
|
+
}
|
|
604
672
|
}
|
|
605
673
|
}
|
|
606
674
|
}
|
|
@@ -1424,6 +1492,14 @@ class WcsDevtools extends HTMLElement {
|
|
|
1424
1492
|
? "a $watch threw; the runtime isolated it (console.error only)"
|
|
1425
1493
|
: "a $watch write chain hit the depth limit and was cut off";
|
|
1426
1494
|
}
|
|
1495
|
+
// 伝播の打ち切りと契約 drift も「黙って起きる異常」なので warn に乗せる。
|
|
1496
|
+
// suppressed / coalesced は定常動作(エコー抑止・合流)のため通常表示。
|
|
1497
|
+
if (entry.kind === "propagation-hop-limit" || entry.kind === "contract-drift") {
|
|
1498
|
+
kind.classList.add("warn");
|
|
1499
|
+
kind.title = entry.kind === "propagation-hop-limit"
|
|
1500
|
+
? "a two-way propagation chain hit the hop limit and was cut off"
|
|
1501
|
+
: "sidecar manifest drifted from the live wcBindable declaration (live wins)";
|
|
1502
|
+
}
|
|
1427
1503
|
const label = document.createElement("span");
|
|
1428
1504
|
label.className = "label";
|
|
1429
1505
|
const stateName = entry.stateName !== null ? `@${entry.stateName}` : "";
|