@heixui/dsh-session-suite 0.4.3 → 0.4.4
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/client.js +33 -11
- package/lib/memory-host.js +13 -3
- package/package.json +1 -1
package/client.js
CHANGED
|
@@ -268,6 +268,8 @@ window.__ModuleLoader__.load({
|
|
|
268
268
|
'memory.extractionRejected': '{n} rejected as unusable',
|
|
269
269
|
'memory.extractionEvents': '{n} session event(s) received',
|
|
270
270
|
'memory.extractionTurns': '{n} turn(s) ended',
|
|
271
|
+
'memory.extractionRegistered': 'hook registered',
|
|
272
|
+
'memory.extractionNotRegistered': 'HOOK NOT REGISTERED',
|
|
271
273
|
'memory.accept': 'Keep',
|
|
272
274
|
'memory.reject': 'Discard',
|
|
273
275
|
'memory.accepted': 'Kept',
|
|
@@ -512,6 +514,8 @@ window.__ModuleLoader__.load({
|
|
|
512
514
|
'memory.extractionRejected': '剔除 {n} 条',
|
|
513
515
|
'memory.extractionEvents': '收到 {n} 个会话事件',
|
|
514
516
|
'memory.extractionTurns': '结束 {n} 轮',
|
|
517
|
+
'memory.extractionRegistered': '钩子已注册',
|
|
518
|
+
'memory.extractionNotRegistered': '钩子未注册',
|
|
515
519
|
'memory.accept': '保留',
|
|
516
520
|
'memory.reject': '丢弃',
|
|
517
521
|
'memory.accepted': '已保留',
|
|
@@ -1046,17 +1050,9 @@ window.__ModuleLoader__.load({
|
|
|
1046
1050
|
line-height: 1.35;
|
|
1047
1051
|
overflow-wrap: anywhere;
|
|
1048
1052
|
}
|
|
1049
|
-
/* Composition and tag bars get distinct hues
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
had to go back to the label each time. Colour-coding by position makes the rows
|
|
1053
|
-
separately trackable while staying inside the theme's palette. */
|
|
1054
|
-
.dss-tone-c0 { background: #4d6bfe; }
|
|
1055
|
-
.dss-tone-c1 { background: #7b5cf5; }
|
|
1056
|
-
.dss-tone-c2 { background: #2aa6c9; }
|
|
1057
|
-
.dss-tone-c3 { background: #14a37f; }
|
|
1058
|
-
.dss-tone-c4 { background: #e0a03a; }
|
|
1059
|
-
.dss-tone-c5 { background: #d9636a; }
|
|
1053
|
+
/* Composition and tag bars get distinct hues — declared at the END of the sheet, next
|
|
1054
|
+
to the fill rule, because source order decides between two single-class rules and an
|
|
1055
|
+
earlier declaration lost to the fill's own background. */
|
|
1060
1056
|
.dss-statbar-track {
|
|
1061
1057
|
flex: 1; height: 8px; min-width: 0;
|
|
1062
1058
|
background: var(--dsw-alias-bg-layer-2, #f2f3f5);
|
|
@@ -1121,6 +1117,21 @@ window.__ModuleLoader__.load({
|
|
|
1121
1117
|
.dss-row-actions { display: flex; align-items: center; gap: 4px; flex: none; }
|
|
1122
1118
|
.dss-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: dss-spin .8s linear infinite; }
|
|
1123
1119
|
@keyframes dss-spin { to { transform: rotate(360deg); } }
|
|
1120
|
+
/* Colour overrides, last in the sheet on purpose.
|
|
1121
|
+
The first version put the hue classes before the fill rule, which sets a brand
|
|
1122
|
+
background — so every bar rendered the same near-black colour and the chart looked
|
|
1123
|
+
like five copies of one object. Source order decides here, not specificity: both are
|
|
1124
|
+
single-class selectors. Declared last so the hue wins, and the double-class form for
|
|
1125
|
+
the extra specificity that makes it survive a future rule added above. */
|
|
1126
|
+
.dss-statbar-fill.dss-tone-c0 { background: #4d6bfe; }
|
|
1127
|
+
.dss-statbar-fill.dss-tone-c1 { background: #7b5cf5; }
|
|
1128
|
+
.dss-statbar-fill.dss-tone-c2 { background: #2aa6c9; }
|
|
1129
|
+
.dss-statbar-fill.dss-tone-c3 { background: #14a37f; }
|
|
1130
|
+
.dss-statbar-fill.dss-tone-c4 { background: #e0a03a; }
|
|
1131
|
+
.dss-statbar-fill.dss-tone-c5 { background: #d9636a; }
|
|
1132
|
+
.dss-statbar-fill.dss-tone-good { background: var(--dsw-alias-state-success-primary, #1a9c50); }
|
|
1133
|
+
.dss-statbar-fill.dss-tone-warn { background: var(--dsw-alias-state-warning-primary, #d97706); }
|
|
1134
|
+
.dss-statbar-fill.dss-tone-bad { background: var(--dsw-alias-state-error-primary, #d93025); }
|
|
1124
1135
|
`
|
|
1125
1136
|
|
|
1126
1137
|
function installStyles() {
|
|
@@ -3496,12 +3507,23 @@ window.__ModuleLoader__.load({
|
|
|
3496
3507
|
// Raw counts of what the Host actually delivered, so "nothing waiting"
|
|
3497
3508
|
// can be told apart from "the hook never fired". Without this the two
|
|
3498
3509
|
// states look identical on screen.
|
|
3510
|
+
//
|
|
3511
|
+
// `registered` is the third state: the hook was never installed at all
|
|
3512
|
+
// (the optional registration threw), which is a different bug from
|
|
3513
|
+
// "installed but never called".
|
|
3499
3514
|
extraction
|
|
3500
3515
|
? h(
|
|
3501
3516
|
'div',
|
|
3502
3517
|
{ className: 'dss-row-meta' },
|
|
3503
3518
|
h('span', null, t('memory.extractionEvents', { n: extraction.eventsSeen ?? 0 })),
|
|
3504
3519
|
h('span', null, t('memory.extractionTurns', { n: extraction.turnEndsSeen ?? 0 })),
|
|
3520
|
+
h(
|
|
3521
|
+
'span',
|
|
3522
|
+
null,
|
|
3523
|
+
extraction.registered
|
|
3524
|
+
? t('memory.extractionRegistered')
|
|
3525
|
+
: t('memory.extractionNotRegistered'),
|
|
3526
|
+
),
|
|
3505
3527
|
)
|
|
3506
3528
|
: null,
|
|
3507
3529
|
)
|
package/lib/memory-host.js
CHANGED
|
@@ -201,7 +201,17 @@ export function installMemory({ ctx, root, config, log }) {
|
|
|
201
201
|
)
|
|
202
202
|
|
|
203
203
|
// --- 3. Implicit extraction after a turn --------------------------------
|
|
204
|
-
safe('implicit extraction', () =>
|
|
204
|
+
safe('implicit extraction', () => {
|
|
205
|
+
// A startup marker, recorded before the listener is even registered.
|
|
206
|
+
//
|
|
207
|
+
// The whole question "why is the queue empty" has two halves that look identical
|
|
208
|
+
// on screen: the hook is not registered at all, or it is registered and never
|
|
209
|
+
// called. This records the first half so the trace can distinguish them — the
|
|
210
|
+
// block used to render only after extraction ran, so a dead hook produced no
|
|
211
|
+
// trace and therefore no diagnostics.
|
|
212
|
+
extractionTrace.registered = true
|
|
213
|
+
extractionTrace.registeredAt = Date.now()
|
|
214
|
+
publishExtractionTrace(engine)
|
|
205
215
|
ctx.effect(
|
|
206
216
|
() =>
|
|
207
217
|
ctx.on('session/event', (session, event) => {
|
|
@@ -245,8 +255,8 @@ export function installMemory({ ctx, root, config, log }) {
|
|
|
245
255
|
})
|
|
246
256
|
}),
|
|
247
257
|
'session-suite: implicit memory',
|
|
248
|
-
)
|
|
249
|
-
)
|
|
258
|
+
)
|
|
259
|
+
})
|
|
250
260
|
|
|
251
261
|
// --- 3b. Automatic maintenance -------------------------------------------
|
|
252
262
|
// Scoring, decay, clustering, and cold archiving are otherwise only reachable
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@heixui/dsh-session-suite",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"description": "Session checkpoints for DSH: rewind a conversation with its files and memory, permanent session deletion, and shareable exports",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|