@kanadego/dsh-heartbeat 1.9.2 → 1.9.3
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/README.md +351 -396
- package/client.js +96 -20
- package/config/policy.json +4 -3
- package/dist/{chunk-AJ5HLAL7.js → chunk-TRO4E6WG.js} +132 -26
- package/dist/chunk-TRO4E6WG.js.map +1 -0
- package/dist/{chunk-IG6YMUHW.js → chunk-WLZSABBH.js} +17 -3
- package/dist/chunk-WLZSABBH.js.map +1 -0
- package/dist/{chunk-ZLV4NMFX.js → chunk-XYYEJK3W.js} +4 -1
- package/dist/chunk-XYYEJK3W.js.map +1 -0
- package/dist/cli/index.js +5 -5
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +35 -8
- package/dist/index.js.map +1 -1
- package/dist/{orchestrator-EUTZ3KG6.js → orchestrator-ZPRGVDCB.js} +9 -5
- package/package.json +1 -1
- package/dist/chunk-AJ5HLAL7.js.map +0 -1
- package/dist/chunk-IG6YMUHW.js.map +0 -1
- package/dist/chunk-ZLV4NMFX.js.map +0 -1
- /package/dist/{orchestrator-EUTZ3KG6.js.map → orchestrator-ZPRGVDCB.js.map} +0 -0
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
loadPolicy,
|
|
7
7
|
updateUserPolicy,
|
|
8
8
|
userPresetRoot
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-XYYEJK3W.js";
|
|
10
10
|
import {
|
|
11
11
|
addBinding,
|
|
12
12
|
loadBindings,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
sessionEventCount,
|
|
28
28
|
sessionEvents,
|
|
29
29
|
startOrchestrator
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-TRO4E6WG.js";
|
|
31
31
|
import {
|
|
32
32
|
appendEntry,
|
|
33
33
|
ledgerFilePath,
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
readLedger,
|
|
37
37
|
readWeeklyReport,
|
|
38
38
|
scanPending
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-WLZSABBH.js";
|
|
40
40
|
import {
|
|
41
41
|
getRuntime,
|
|
42
42
|
setRuntime
|
|
@@ -67,7 +67,7 @@ import {
|
|
|
67
67
|
atomicWriteJsonSync
|
|
68
68
|
} from "./chunk-WRUTATW4.js";
|
|
69
69
|
|
|
70
|
-
// node_modules/@deepseek-ai/cosmokit/lib/index.js
|
|
70
|
+
// node_modules/.pnpm/@deepseek-ai+cosmokit@1.8.5/node_modules/@deepseek-ai/cosmokit/lib/index.js
|
|
71
71
|
function isNullable(value) {
|
|
72
72
|
return value === null || value === void 0;
|
|
73
73
|
}
|
|
@@ -292,7 +292,7 @@ var Time;
|
|
|
292
292
|
Time2.template = template;
|
|
293
293
|
})(Time || (Time = {}));
|
|
294
294
|
|
|
295
|
-
// node_modules/@deepseek-ai/schemastery/lib/index.mjs
|
|
295
|
+
// node_modules/.pnpm/@deepseek-ai+schemastery@3.18.4/node_modules/@deepseek-ai/schemastery/lib/index.mjs
|
|
296
296
|
var kSchema = /* @__PURE__ */ Symbol.for("schemastery");
|
|
297
297
|
var kValidationError = /* @__PURE__ */ Symbol.for("ValidationError");
|
|
298
298
|
globalThis.__schemastery_index__ ??= 0;
|
|
@@ -1450,9 +1450,36 @@ function buildEndpoints(deps, isLive) {
|
|
|
1450
1450
|
tact: d.tact,
|
|
1451
1451
|
topic: d.topic,
|
|
1452
1452
|
wander: d.wander,
|
|
1453
|
-
withinBudget: d.withinBudget
|
|
1453
|
+
withinBudget: d.withinBudget,
|
|
1454
|
+
// v2.0 (item 6): the card shows the budget and what the caps dropped.
|
|
1455
|
+
totalChars: d.totalChars,
|
|
1456
|
+
budgetChars: d.budgetChars,
|
|
1457
|
+
omitted: d.omitted
|
|
1454
1458
|
});
|
|
1455
1459
|
},
|
|
1460
|
+
"profile.partitions"() {
|
|
1461
|
+
const doc = loadProfile(guard, profileFilePath(paths.dataDir));
|
|
1462
|
+
const partitions = {};
|
|
1463
|
+
for (const part of ["interest", "projects", "comm", "psy"]) {
|
|
1464
|
+
const all = doc.partitions[part]?.entries ?? [];
|
|
1465
|
+
const valid = all.filter((e) => e.validTo === null);
|
|
1466
|
+
partitions[part] = {
|
|
1467
|
+
total: all.length,
|
|
1468
|
+
valid: valid.length,
|
|
1469
|
+
entries: valid.slice().sort((a, b) => b.confidence - a.confidence || (a.updatedAt < b.updatedAt ? 1 : -1)).map((e) => ({
|
|
1470
|
+
id: e.id,
|
|
1471
|
+
topic: e.topic,
|
|
1472
|
+
subTopic: e.subTopic,
|
|
1473
|
+
content: e.content,
|
|
1474
|
+
confidence: e.confidence,
|
|
1475
|
+
temporal: e.temporal,
|
|
1476
|
+
updatedAt: e.updatedAt,
|
|
1477
|
+
lowActivity: e.lowActivity === true
|
|
1478
|
+
}))
|
|
1479
|
+
};
|
|
1480
|
+
}
|
|
1481
|
+
return ok({ partitions });
|
|
1482
|
+
},
|
|
1456
1483
|
"profile.export"() {
|
|
1457
1484
|
const doc = loadProfile(guard, profileFilePath(paths.dataDir));
|
|
1458
1485
|
const lines = [`# \u753B\u50CF\u5BFC\u51FA ${(/* @__PURE__ */ new Date()).toISOString()}`, ""];
|
|
@@ -1473,7 +1500,7 @@ function buildEndpoints(deps, isLive) {
|
|
|
1473
1500
|
spawn("cmd", ["/c", "start", "", f], { detached: true, stdio: "ignore" }).unref();
|
|
1474
1501
|
return ok({ path: f });
|
|
1475
1502
|
},
|
|
1476
|
-
"weekly.list": () => ok({ reports: listWeeklyReports(guard, paths.dataDir) }),
|
|
1503
|
+
"weekly.list": () => ok({ reports: listWeeklyReports(guard, paths.dataDir, policy.weekly.keepReports) }),
|
|
1477
1504
|
"weekly.get"(p) {
|
|
1478
1505
|
const file = String(p.file ?? "");
|
|
1479
1506
|
const rep = readWeeklyReport(guard, paths.dataDir, file);
|
|
@@ -1815,7 +1842,7 @@ var Config = Schema.object({
|
|
|
1815
1842
|
/** IANA timezone for the injected clock; empty = process zone. */
|
|
1816
1843
|
timeZone: Schema.string().default(""),
|
|
1817
1844
|
/** Statusbar master switch (D19). Off = no section/pre-step status; time injection unaffected. */
|
|
1818
|
-
statusbar: Schema.boolean().default(
|
|
1845
|
+
statusbar: Schema.boolean().default(false),
|
|
1819
1846
|
/** v1.6.3 闲着模式:素材池为空时用画像话题兜底主动搭话(默认关)。 */
|
|
1820
1847
|
idleMode: Schema.boolean().default(false),
|
|
1821
1848
|
/** v1.7.0 节省 token 模式:用户离开(闲置 ≥30 分钟)或锁屏时整跳暂停(默认关)。 */
|