@yoooclaw/phone-notifications 1.11.17 → 1.11.18
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/dist/auth/credentials.d.ts +5 -0
- package/dist/auth/credentials.d.ts.map +1 -1
- package/dist/bin/ntf.cjs +12 -11
- package/dist/bin/ntf.cjs.map +5 -5
- package/dist/cli/ntf-summary.d.ts.map +1 -1
- package/dist/cli/ntf-sync.d.ts.map +1 -1
- package/dist/index.cjs +136 -32
- package/dist/index.cjs.map +7 -7
- package/dist/profile/auth/jvsclaw.d.ts +1 -0
- package/dist/profile/auth/jvsclaw.d.ts.map +1 -1
- package/dist/update/executor.d.ts.map +1 -1
- package/package.json +1 -1
- package/skills/notification-query/SKILL.md +8 -4
- package/skills/notification-to-memory/references/step-0-preflight.md +11 -2
- package/skills/notification-to-memory/references/step-1-scan-pending.md +1 -1
- package/skills/notification-to-memory/references/step-2-process-dates.md +9 -3
- package/skills/notification-to-memory/references/step-4-final-reporting.md +20 -2
|
@@ -15,6 +15,11 @@ interface Credentials {
|
|
|
15
15
|
* 当前环境(development / production),由 ntf env switch 写入
|
|
16
16
|
*/
|
|
17
17
|
env?: string;
|
|
18
|
+
/**
|
|
19
|
+
* jvsclaw 专用:上次置换 apiKey 时使用的 link_secret 哈希。
|
|
20
|
+
* 用于重置后检测宿主下发的密文是否变化,避免继续复用旧实例 apiKey。
|
|
21
|
+
*/
|
|
22
|
+
jvsclawLinkSecretHash?: string;
|
|
18
23
|
}
|
|
19
24
|
interface ApiKeyEntry {
|
|
20
25
|
label?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../../src/auth/credentials.ts"],"names":[],"mappings":"AAUA,UAAU,WAAW;IACnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;IACxB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../../src/auth/credentials.ts"],"names":[],"mappings":"AAUA,UAAU,WAAW;IACnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;IACxB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,UAAU,WAAW;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAID,wBAAgB,eAAe,IAAI,MAAM,CAExC;AAED,wBAAgB,eAAe,IAAI,WAAW,CAQ7C;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI,CAOzD;AAiBD,wBAAgB,UAAU,IAAI,MAAM,GAAG,SAAS,CAS/C;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAItD;AAED,wBAAgB,YAAY,IAAI,IAAI,CAMnC;AAED,wBAAgB,aAAa,IAAI,MAAM,CAQtC;AAGD,wBAAgB,SAAS,IAAI,MAAM,GAAG,SAAS,CAE9C;AAED,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAED,8DAA8D;AAC9D,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CA2BjE"}
|
package/dist/bin/ntf.cjs
CHANGED
|
@@ -2849,11 +2849,11 @@ function registerNtfSearch(ntf, ctx) {
|
|
|
2849
2849
|
}
|
|
2850
2850
|
|
|
2851
2851
|
// src/cli/ntf-summary.ts
|
|
2852
|
-
function compactNotification(item) {
|
|
2852
|
+
function compactNotification(item, maxContent) {
|
|
2853
2853
|
const result = {
|
|
2854
2854
|
appName: item.appName,
|
|
2855
|
-
title: item.title,
|
|
2856
|
-
content: item.content,
|
|
2855
|
+
title: truncate(item.title, maxContent),
|
|
2856
|
+
content: truncate(item.content, maxContent),
|
|
2857
2857
|
timestamp: item.timestamp
|
|
2858
2858
|
};
|
|
2859
2859
|
if (item.appDisplayName)
|
|
@@ -2888,14 +2888,14 @@ function hourBucket(timestamp) {
|
|
|
2888
2888
|
return null;
|
|
2889
2889
|
return `${match[1]} ${match[2]}:00`;
|
|
2890
2890
|
}
|
|
2891
|
-
function buildSamplesBySender(notifications, senderRows) {
|
|
2891
|
+
function buildSamplesBySender(notifications, senderRows, maxContent) {
|
|
2892
2892
|
return senderRows.map((row) => {
|
|
2893
2893
|
const samples = [];
|
|
2894
2894
|
for (const item of notifications) {
|
|
2895
2895
|
const sender = item.senderName?.trim() || item.title?.trim() || "(unknown)";
|
|
2896
2896
|
if (sender !== row.sender)
|
|
2897
2897
|
continue;
|
|
2898
|
-
const content = truncate(item.content.trim());
|
|
2898
|
+
const content = truncate(item.content.trim(), maxContent);
|
|
2899
2899
|
if (content && !samples.includes(content))
|
|
2900
2900
|
samples.push(content);
|
|
2901
2901
|
if (samples.length >= 5)
|
|
@@ -2905,7 +2905,7 @@ function buildSamplesBySender(notifications, senderRows) {
|
|
|
2905
2905
|
});
|
|
2906
2906
|
}
|
|
2907
2907
|
function registerNtfSummary(ntf, ctx) {
|
|
2908
|
-
ntf.command("summary").description("生成通知摘要输入(聚合统计 + 样例,供 Agent 快速总结)").option("--from <time>", "开始时间 ISO 8601,例如 2026-03-01T09:00:00+08:00").option("--to <time>", "结束时间 ISO 8601,例如 2026-03-01T18:00:00+08:00").option("--app <name>", "按应用名过滤").option("--sender <name>", "按发送人过滤").option("--conversation-type <type>", "按会话类型过滤(group/private)").option("--keyword <text>", "在标题和内容中搜索关键词").option("--limit <n>", "纳入摘要的最大通知条数", "100").option("--sample <n>", "返回最近样例条数", "
|
|
2908
|
+
ntf.command("summary").description("生成通知摘要输入(聚合统计 + 样例,供 Agent 快速总结)").option("--from <time>", "开始时间 ISO 8601,例如 2026-03-01T09:00:00+08:00").option("--to <time>", "结束时间 ISO 8601,例如 2026-03-01T18:00:00+08:00").option("--app <name>", "按应用名过滤").option("--sender <name>", "按发送人过滤").option("--conversation-type <type>", "按会话类型过滤(group/private)").option("--keyword <text>", "在标题和内容中搜索关键词").option("--limit <n>", "纳入摘要的最大通知条数", "100").option("--sample <n>", "返回最近样例条数", "20").option("--top <n>", "返回聚合榜单条数", "10").option("--max-content <n>", "单条样例标题/正文最大字数(超出截断)", "80").action(async (opts) => {
|
|
2909
2909
|
const dir = resolveNotificationsDir(ctx);
|
|
2910
2910
|
if (!dir)
|
|
2911
2911
|
exitError("STORAGE_UNAVAILABLE", "通知存储目录不可用");
|
|
@@ -2913,6 +2913,7 @@ function registerNtfSummary(ntf, ctx) {
|
|
|
2913
2913
|
const query = parseNotificationQueryOptions(opts);
|
|
2914
2914
|
const sampleLimit = parsePositiveIntegerOption(opts.sample, 30, "--sample", "INVALID_SAMPLE");
|
|
2915
2915
|
const topLimit = parsePositiveIntegerOption(opts.top, 10, "--top", "INVALID_TOP");
|
|
2916
|
+
const maxContent = parsePositiveIntegerOption(opts.maxContent, 80, "--max-content", "INVALID_MAX_CONTENT");
|
|
2916
2917
|
const notifications = await collectMatchingNotifications(dir, query);
|
|
2917
2918
|
const byApp = new Map;
|
|
2918
2919
|
const bySender = new Map;
|
|
@@ -2949,8 +2950,8 @@ function registerNtfSummary(ntf, ctx) {
|
|
|
2949
2950
|
bySender: senderRows,
|
|
2950
2951
|
byConversation: topRows(byConversation, topLimit),
|
|
2951
2952
|
byHour: topRows(byHour, topLimit),
|
|
2952
|
-
latest: notifications.slice(0, sampleLimit).map(compactNotification),
|
|
2953
|
-
samplesBySender: buildSamplesBySender(notifications, senderRows)
|
|
2953
|
+
latest: notifications.slice(0, sampleLimit).map((item) => compactNotification(item, maxContent)),
|
|
2954
|
+
samplesBySender: buildSamplesBySender(notifications, senderRows, maxContent)
|
|
2954
2955
|
});
|
|
2955
2956
|
});
|
|
2956
2957
|
}
|
|
@@ -3014,7 +3015,7 @@ function registerNtfStats(ntf, ctx) {
|
|
|
3014
3015
|
// src/cli/ntf-sync.ts
|
|
3015
3016
|
var import_node_fs6 = require("node:fs");
|
|
3016
3017
|
var import_node_path6 = require("node:path");
|
|
3017
|
-
var SYNC_FETCH_LIMIT =
|
|
3018
|
+
var SYNC_FETCH_LIMIT = 100;
|
|
3018
3019
|
function checkpointPath(dir) {
|
|
3019
3020
|
return import_node_path6.join(dir, ".checkpoint.json");
|
|
3020
3021
|
}
|
|
@@ -5075,7 +5076,7 @@ function pickNewestVersion(versions) {
|
|
|
5075
5076
|
var import_node_fs14 = require("node:fs");
|
|
5076
5077
|
function readBuildInjectedVersion() {
|
|
5077
5078
|
if (false) {}
|
|
5078
|
-
const version = "1.11.
|
|
5079
|
+
const version = "1.11.18".trim();
|
|
5079
5080
|
return version || undefined;
|
|
5080
5081
|
}
|
|
5081
5082
|
function readPluginVersionFromPackageJson() {
|
|
@@ -5650,5 +5651,5 @@ program2.parseAsync(process.argv).catch((err) => {
|
|
|
5650
5651
|
process.exit(1);
|
|
5651
5652
|
});
|
|
5652
5653
|
|
|
5653
|
-
//# debugId=
|
|
5654
|
+
//# debugId=46DD5F6174DE223B64756E2164756E21
|
|
5654
5655
|
//# sourceMappingURL=ntf.cjs.map
|