dsh-context 0.22.2 → 0.23.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/lib/client.js +151 -63
- package/lib/client.js.map +1 -1
- package/lib/index.d.ts +6 -0
- package/lib/index.js +5 -0
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -329,6 +329,12 @@ interface TimelineState {
|
|
|
329
329
|
cost?: SessionCostUsage;
|
|
330
330
|
/** Newest `gone` among archive entries dropped by the retention bounds. */
|
|
331
331
|
archiveFloor?: number;
|
|
332
|
+
/**
|
|
333
|
+
* Tool callId → name, armed by `tool/call` and DELETED when its
|
|
334
|
+
* `tool/result` folds in (one result per call, in log order) — the map
|
|
335
|
+
* stays at pending-call size instead of growing for the session's whole
|
|
336
|
+
* lifetime (it is persisted state, shallow-copied by every fold step).
|
|
337
|
+
*/
|
|
332
338
|
callNames: Record<string, string>;
|
|
333
339
|
/**
|
|
334
340
|
* Seq list of the surface nodes the next replacement will shadow, armed by
|
package/lib/index.js
CHANGED
|
@@ -304,6 +304,11 @@ function applySurface(st, ev, type, data, message) {
|
|
|
304
304
|
const blockId = (message?.content?.[0])?.toolCallId;
|
|
305
305
|
if (srcName) node.tool = srcName;
|
|
306
306
|
else if (typeof blockId === "string") node.tool = st.callNames[blockId];
|
|
307
|
+
if (typeof srcId === "string" || typeof blockId === "string") {
|
|
308
|
+
const kept = {};
|
|
309
|
+
for (const k in st.callNames) if (k !== srcId && k !== blockId) kept[k] = st.callNames[k];
|
|
310
|
+
st.callNames = kept;
|
|
311
|
+
}
|
|
307
312
|
if (data?.error) node.err = true;
|
|
308
313
|
} else if (source?.kind === "skill-invocation") node.skill = typeof source.name === "string" ? source.name : "?";
|
|
309
314
|
else if (source?.kind === "plugin") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-context",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.0",
|
|
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
|
"author": "bowenliang123",
|
|
6
6
|
"repository": {
|