dsh-context 0.59.1 → 0.59.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
@@ -10784,7 +10784,7 @@ window.__ModuleLoader__.load({
10784
10784
  return function PluginInfo() {
10785
10785
  const [latest, setLatest] = (0, react.useState)(null);
10786
10786
  (0, react.useEffect)(() => {
10787
- if ("0.59.1".includes("-dev")) return;
10787
+ if ("0.59.2".includes("-dev")) return;
10788
10788
  let on = true;
10789
10789
  fetchLatestVersion().then((v) => {
10790
10790
  if (on && v) setLatest(v);
@@ -10793,8 +10793,8 @@ window.__ModuleLoader__.load({
10793
10793
  on = false;
10794
10794
  };
10795
10795
  }, []);
10796
- const update = latest !== null && isNewerVersion(latest, "0.59.1") ? latest : null;
10797
- const nameText = "dsh-context (v0.59.1)";
10796
+ const update = latest !== null && isNewerVersion(latest, "0.59.2") ? latest : null;
10797
+ const nameText = "dsh-context (v0.59.2)";
10798
10798
  const nameValue = [nameText];
10799
10799
  if (update) nameValue.push(/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
10800
10800
  className: "lc-pi-update",
package/lib/index.js CHANGED
@@ -1518,6 +1518,12 @@ function applyTimeline(state, event, bounds) {
1518
1518
  applySurface(s, event, event.type, data, asstMsg);
1519
1519
  break;
1520
1520
  }
1521
+ case "session/end-seed": {
1522
+ if (data?.inherited !== true) break;
1523
+ const s = ensure([]);
1524
+ s.cost = {};
1525
+ break;
1526
+ }
1521
1527
  case "plan/mode":
1522
1528
  if (data && typeof data.active === "boolean") {
1523
1529
  const s = ensure(["events"]);
@@ -1900,6 +1906,10 @@ function applyActivity(state, event) {
1900
1906
  delete next.stepStart;
1901
1907
  return next;
1902
1908
  }
1909
+ if (event.type === "session/end-seed") {
1910
+ if (event.data?.inherited !== true) return state;
1911
+ return { days: {} };
1912
+ }
1903
1913
  if (event.type !== "assistant/message") return state;
1904
1914
  const initiated = state.stepStart !== void 0 ? state.stepStart : event.time;
1905
1915
  const key = dayKeyOf(initiated);
@@ -1936,11 +1946,11 @@ function applyActivity(state, event) {
1936
1946
  /**
1937
1947
  * The daily-activity projection unit, registered alongside the timeline and
1938
1948
  * headers units (host/index.ts); the overview reads it through the session
1939
- * list's projection column. `stateVersion` 2: the ledger gained the per-day
1940
- * pricing records (and the fold the route/step-start tracking behind them),
1941
- * so on upgrade every cached row reads version-stale — the dashboard's
1942
- * warm-up cold-refolds it from the durable log, rebuilding the fees for the
1943
- * whole corpus exactly.
1949
+ * list's projection column. `stateVersion` 3: the fold resets the ledger at
1950
+ * the tagged fork/seed boundary, so a seeded session's days count post-seed
1951
+ * activity only (issue #94) — cached rows for seeded forks read
1952
+ * version-stale on upgrade and the dashboard's warm-up cold-refolds them
1953
+ * from the durable log, which drops the inherited prefix they booked.
1944
1954
  */
1945
1955
  function createContextActivityDefinition() {
1946
1956
  return {
@@ -1952,7 +1962,7 @@ function createContextActivityDefinition() {
1952
1962
  viewSchema: contextActivitySchema,
1953
1963
  view: (state) => ({ days: Object.fromEntries(Object.entries(state.days).map(([k, v]) => [k, { ...v }])) })
1954
1964
  },
1955
- stateVersion: 2
1965
+ stateVersion: 3
1956
1966
  };
1957
1967
  }
1958
1968
  /**
@@ -3281,7 +3291,7 @@ function createContextTimelineDefinition(config, slim) {
3281
3291
  },
3282
3292
  init: () => createTimelineState(),
3283
3293
  apply: (state, event) => applyTimeline(state, event, bounds),
3284
- stateVersion: 21
3294
+ stateVersion: 22
3285
3295
  };
3286
3296
  }
3287
3297
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-context",
3
- "version": "0.59.1",
3
+ "version": "0.59.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",