dsh-context 0.62.1 → 0.62.2

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/lib/client.js CHANGED
@@ -11404,7 +11404,7 @@ window.__ModuleLoader__.load({
11404
11404
  return function PluginInfo() {
11405
11405
  const [latest, setLatest] = (0, react.useState)(null);
11406
11406
  (0, react.useEffect)(() => {
11407
- if ("0.62.1".includes("-dev")) return;
11407
+ if ("0.62.2".includes("-dev")) return;
11408
11408
  let on = true;
11409
11409
  fetchLatestVersion().then((v) => {
11410
11410
  if (on && v) setLatest(v);
@@ -11413,8 +11413,8 @@ window.__ModuleLoader__.load({
11413
11413
  on = false;
11414
11414
  };
11415
11415
  }, []);
11416
- const update = latest !== null && isNewerVersion(latest, "0.62.1") ? latest : null;
11417
- const nameText = "dsh-context (v0.62.1)";
11416
+ const update = latest !== null && isNewerVersion(latest, "0.62.2") ? latest : null;
11417
+ const nameText = "dsh-context (v0.62.2)";
11418
11418
  const nameValue = [nameText];
11419
11419
  if (update) nameValue.push(/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
11420
11420
  className: "lc-pi-update",
package/lib/index.d.ts CHANGED
@@ -638,20 +638,26 @@ interface ToolTimingTotals {
638
638
  * own embedded stream (`assistant/message.data.stream` /
639
639
  * `assistant/attempt.data.stream`), matching the harness's own
640
640
  * session-stats fold. Durations are wall-clock milliseconds: `wallMs` sums
641
- * whole steps, `ttftMs` the step-start → first-token slice (the model wait)
642
- * and `genMs` the first-token → assistant-message slice (the generation) —
641
+ * whole steps, `ttftMs` the step-start → decode-start slice (the model wait)
642
+ * and `genMs` the decode-start → assistant-message slice (the generation) —
643
643
  * both only over calls whose stream carried a token delta, `toolsMs` the sum
644
644
  * of per-call tool durations (parallel calls each count, so it can overlap).
645
- * Absent until the first step lifecycle completes in the log.
645
+ * The decode window opens at the first OBSERVABLE instant — the first token,
646
+ * or an earlier `block-start` marker the token packing could not stamp (a
647
+ * redacted reasoning block leaves no chunk behind): anchoring at the token
648
+ * would charge the marker-tiled window to the wait as well, double-counting
649
+ * it past 100% in the legend. Absent until the first step lifecycle
650
+ * completes in the log.
646
651
  *
647
652
  * The generation window itself splits by WHAT was being decoded, off the
648
653
  * stream's `block-start` framing (`blockType`): `reasoningMs` (the model's
649
654
  * thinking), `textMs` (the answer text), and `toolArgMs` (the tool-call
650
655
  * arguments). Each marker owns the interval up to the next one (the last one
651
- * up to the assistant message), so the three tile the marker span and together
652
- * account for essentially all of `genMs` — the span opens at the first marker,
653
- * which can sit marginally before the first token, so it is not an exact
654
- * partition. They are ADDITIVE-OPTIONAL: cached projection rows written before
656
+ * up to the assistant message), so the three tile the marker span — exactly
657
+ * `genMs` when the first marker leads the first token (the window opens
658
+ * there); when the first marker sits marginally PAST the token the lead-in
659
+ * gap stays inside `genMs` unattributed, so the buckets never exceed it.
660
+ * They are ADDITIVE-OPTIONAL: cached projection rows written before
655
661
  * the split carry `genMs` without them, so the card falls back to the
656
662
  * un-split shape instead of the cache row being discarded (the
657
663
  * stateVersion-15 rationale in host/timeline.ts).
@@ -659,9 +665,9 @@ interface ToolTimingTotals {
659
665
  interface TimingTotals {
660
666
  /** Summed wall time of completed steps (the session's active time). */
661
667
  wallMs: number;
662
- /** Summed step-start → first-token time (the model wait, TTFT). */
668
+ /** Summed step-start → decode-start time (the model wait, TTFT). */
663
669
  ttftMs: number;
664
- /** Summed first-token → assistant-message time (the generation). */
670
+ /** Summed decode-start → assistant-message time (the generation). */
665
671
  genMs: number;
666
672
  /** Reasoning-decode slice of `genMs` (the model's thinking). */
667
673
  reasoningMs?: number;
@@ -687,7 +693,9 @@ interface TimingTotals {
687
693
  * output tokens and `speedMs` the first-token → assistant-message
688
694
  * windows, over the calls that carried BOTH a first-token stamp and a
689
695
  * usage report — a subset of `genMs`, which counts every token-stamped
690
- * call regardless of usage. Additive-optional: cached rows written before
696
+ * call regardless of usage. `speedMs` KEEPS the first-token anchor (not
697
+ * the marker-aware decode start): it is the harness-parity figure.
698
+ * Additive-optional: cached rows written before
691
699
  * the seat existed lack them, and the card falls back to no chip.
692
700
  */
693
701
  speedTokens?: number;
package/lib/index.js CHANGED
@@ -1592,11 +1592,11 @@ function applyTimeline(state, event, bounds) {
1592
1592
  if (stepStart !== void 0) {
1593
1593
  const firstToken = stepStart.firstToken ?? firstTokenTimeOfStream(data?.stream);
1594
1594
  if (firstToken !== void 0) {
1595
- timing.ttftMs += durOf(stepStart.time, firstToken);
1596
- timing.genMs += durOf(firstToken, event.time);
1597
1595
  const decodeBlocks = decodeSpansOfStream(data?.stream, event.time);
1598
1596
  let decodeStart = firstToken;
1599
1597
  for (const block of decodeBlocks) decodeStart = Math.min(decodeStart, block.start);
1598
+ timing.ttftMs += durOf(stepStart.time, decodeStart);
1599
+ timing.genMs += durOf(decodeStart, event.time);
1600
1600
  const modelSpans = [{
1601
1601
  kind: "ttft",
1602
1602
  start: stepStart.time,
@@ -3415,7 +3415,7 @@ function createContextTimelineDefinition(config, slim) {
3415
3415
  },
3416
3416
  init: () => createTimelineState(),
3417
3417
  apply: (state, event) => applyTimeline(state, event, bounds),
3418
- stateVersion: 23
3418
+ stateVersion: 24
3419
3419
  };
3420
3420
  }
3421
3421
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-context",
3
- "version": "0.62.1",
3
+ "version": "0.62.2",
4
4
  "description": "A DeepSeek Harness plugin for context insight and management, with context dashboard and context command, for understanding how the context is made of, and how it evolves.",
5
5
  "icon": "icon.svg",
6
6
  "author": "bowenliang123",