@yoooclaw/phone-notifications 1.11.0-beta.7 → 1.11.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/dist/index.cjs +74 -15
- package/dist/index.cjs.map +1 -1
- package/package.json +1 -1
- package/skills/notification-analytics/SKILL.md +24 -16
- package/skills/notification-monitor/SKILL.md +4 -2
- package/skills/notification-search/SKILL.md +25 -17
- package/skills/notification-to-memory/references/step-3-check-cron-status.md +4 -2
- package/skills/recording-entity-extraction/SKILL.md +12 -6
- package/skills/recording-interview/SKILL.md +4 -2
- package/skills/recording-meeting-minutes/SKILL.md +4 -2
- package/skills/recording-mindmap/SKILL.md +4 -2
- package/skills/recording-translation/SKILL.md +12 -6
package/dist/index.cjs
CHANGED
|
@@ -5422,7 +5422,7 @@ function readBuildInjectedVersion() {
|
|
|
5422
5422
|
if (false) {
|
|
5423
5423
|
return void 0;
|
|
5424
5424
|
}
|
|
5425
|
-
const version = "1.11.0
|
|
5425
|
+
const version = "1.11.0".trim();
|
|
5426
5426
|
return version || void 0;
|
|
5427
5427
|
}
|
|
5428
5428
|
function readPluginVersionFromPackageJson() {
|
|
@@ -6047,6 +6047,7 @@ function readMeta(taskDir) {
|
|
|
6047
6047
|
if (raw.type !== "light-rule" && !isLegacyLightRuleWithoutType(raw)) return null;
|
|
6048
6048
|
if (!Array.isArray(raw.segments)) return null;
|
|
6049
6049
|
const name = readOptionalString(raw.name) ?? (0, import_node_path3.basename)(taskDir);
|
|
6050
|
+
const title = readOptionalString(raw.title) ?? name;
|
|
6050
6051
|
const description = readOptionalString(raw.description) ?? readOptionalString(raw.reason) ?? name;
|
|
6051
6052
|
const createdAt = readOptionalString(raw.createdAt) ?? (0, import_node_fs4.statSync)(metaPath).birthtime.toISOString();
|
|
6052
6053
|
const enabled = typeof raw.enabled === "boolean" ? raw.enabled : true;
|
|
@@ -6058,6 +6059,7 @@ function readMeta(taskDir) {
|
|
|
6058
6059
|
return {
|
|
6059
6060
|
...raw,
|
|
6060
6061
|
name,
|
|
6062
|
+
title,
|
|
6061
6063
|
type: "light-rule",
|
|
6062
6064
|
description,
|
|
6063
6065
|
segments: raw.segments,
|
|
@@ -6097,6 +6099,7 @@ function createLightRule(ctx, params) {
|
|
|
6097
6099
|
assertAncsRepeatTimes(repeatTimes);
|
|
6098
6100
|
const meta = {
|
|
6099
6101
|
name: params.name,
|
|
6102
|
+
title: params.title,
|
|
6100
6103
|
type: "light-rule",
|
|
6101
6104
|
description: params.description,
|
|
6102
6105
|
segments: params.segments,
|
|
@@ -6117,6 +6120,9 @@ function updateLightRule(ctx, params) {
|
|
|
6117
6120
|
if (params.description !== void 0) {
|
|
6118
6121
|
meta.description = params.description;
|
|
6119
6122
|
}
|
|
6123
|
+
if (params.title !== void 0) {
|
|
6124
|
+
meta.title = params.title;
|
|
6125
|
+
}
|
|
6120
6126
|
if (params.segments !== void 0) {
|
|
6121
6127
|
meta.segments = params.segments;
|
|
6122
6128
|
}
|
|
@@ -6188,7 +6194,8 @@ function registerLightRulesGateway(api, registry, logger, rememberBroadcast) {
|
|
|
6188
6194
|
}
|
|
6189
6195
|
});
|
|
6190
6196
|
registerGatewayMethodWithBroadcastCapture("lightrules.create", async ({ params, respond }) => {
|
|
6191
|
-
const { name, description, segments, repeat, repeat_times } = params;
|
|
6197
|
+
const { name, title, description, segments, repeat, repeat_times } = params;
|
|
6198
|
+
const resolvedTitle = typeof title === "string" && title.trim() ? title.trim() : name;
|
|
6192
6199
|
if (!name || typeof name !== "string") {
|
|
6193
6200
|
respond(false, null, { code: "INVALID_PARAMS", message: "name is required" });
|
|
6194
6201
|
return;
|
|
@@ -6216,12 +6223,19 @@ function registerLightRulesGateway(api, registry, logger, rememberBroadcast) {
|
|
|
6216
6223
|
try {
|
|
6217
6224
|
const result = await registry.create({
|
|
6218
6225
|
name,
|
|
6226
|
+
title: resolvedTitle,
|
|
6219
6227
|
description,
|
|
6220
6228
|
segments: validation.segments,
|
|
6221
6229
|
repeat_times: repeatTimes
|
|
6222
6230
|
});
|
|
6223
6231
|
logger.info(`Light rule created: ${name}`);
|
|
6224
|
-
respond(true, {
|
|
6232
|
+
respond(true, {
|
|
6233
|
+
ok: true,
|
|
6234
|
+
id: result.meta.name,
|
|
6235
|
+
name: result.meta.name,
|
|
6236
|
+
title: result.meta.title,
|
|
6237
|
+
rule: result.meta
|
|
6238
|
+
});
|
|
6225
6239
|
} catch (err2) {
|
|
6226
6240
|
if (err2 instanceof LightRuleError) {
|
|
6227
6241
|
respond(false, null, { code: err2.code, message: err2.message });
|
|
@@ -6232,8 +6246,9 @@ function registerLightRulesGateway(api, registry, logger, rememberBroadcast) {
|
|
|
6232
6246
|
}
|
|
6233
6247
|
});
|
|
6234
6248
|
registerGatewayMethodWithBroadcastCapture("lightrules.update", async ({ params, respond }) => {
|
|
6235
|
-
const { description, segments, repeat, repeat_times, enabled } = params;
|
|
6249
|
+
const { title, description, segments, repeat, repeat_times, enabled } = params;
|
|
6236
6250
|
const name = resolveRuleIdentifier(params);
|
|
6251
|
+
const resolvedTitle = typeof title === "string" ? title.trim() : void 0;
|
|
6237
6252
|
if (!name) {
|
|
6238
6253
|
respond(false, null, {
|
|
6239
6254
|
code: "INVALID_PARAMS",
|
|
@@ -6241,6 +6256,20 @@ function registerLightRulesGateway(api, registry, logger, rememberBroadcast) {
|
|
|
6241
6256
|
});
|
|
6242
6257
|
return;
|
|
6243
6258
|
}
|
|
6259
|
+
if (title !== void 0 && !resolvedTitle) {
|
|
6260
|
+
respond(false, null, {
|
|
6261
|
+
code: "INVALID_PARAMS",
|
|
6262
|
+
message: "title must be a non-empty string"
|
|
6263
|
+
});
|
|
6264
|
+
return;
|
|
6265
|
+
}
|
|
6266
|
+
if (description !== void 0 && typeof description !== "string") {
|
|
6267
|
+
respond(false, null, {
|
|
6268
|
+
code: "INVALID_PARAMS",
|
|
6269
|
+
message: "description must be a string"
|
|
6270
|
+
});
|
|
6271
|
+
return;
|
|
6272
|
+
}
|
|
6244
6273
|
let validatedSegments;
|
|
6245
6274
|
if (segments !== void 0) {
|
|
6246
6275
|
const validation = validateSegments(segments);
|
|
@@ -6266,6 +6295,7 @@ function registerLightRulesGateway(api, registry, logger, rememberBroadcast) {
|
|
|
6266
6295
|
try {
|
|
6267
6296
|
const result = await registry.update({
|
|
6268
6297
|
name,
|
|
6298
|
+
title: resolvedTitle,
|
|
6269
6299
|
description,
|
|
6270
6300
|
segments: validatedSegments,
|
|
6271
6301
|
repeat_times: repeatTimes,
|
|
@@ -6276,6 +6306,7 @@ function registerLightRulesGateway(api, registry, logger, rememberBroadcast) {
|
|
|
6276
6306
|
ok: true,
|
|
6277
6307
|
id: result.meta.name,
|
|
6278
6308
|
name: result.meta.name,
|
|
6309
|
+
title: result.meta.title,
|
|
6279
6310
|
updated: true,
|
|
6280
6311
|
rule: result.meta
|
|
6281
6312
|
});
|
|
@@ -6384,7 +6415,7 @@ var LightRuleRegistry = class {
|
|
|
6384
6415
|
/**
|
|
6385
6416
|
* 拼装 Agent 评估用的 system prompt。
|
|
6386
6417
|
*
|
|
6387
|
-
* 当前实现是一个最小可用骨架:列出全部 enabled 规则的 name + description。
|
|
6418
|
+
* 当前实现是一个最小可用骨架:列出全部 enabled 规则的 title + name + description。
|
|
6388
6419
|
* M3 接入真实 Agent 链路时,会按 prd-lightrules-event-driven-refactor.md §Prompt 拼装
|
|
6389
6420
|
* 的模板补齐"任务说明 / 输出约束"等段落。
|
|
6390
6421
|
*
|
|
@@ -6406,7 +6437,8 @@ var LightRuleRegistry = class {
|
|
|
6406
6437
|
);
|
|
6407
6438
|
sorted.forEach((rule, idx) => {
|
|
6408
6439
|
lines.push(
|
|
6409
|
-
`[${idx + 1}]
|
|
6440
|
+
`[${idx + 1}] title: ${rule.title}`,
|
|
6441
|
+
` name: ${rule.name}`,
|
|
6410
6442
|
` description: ${rule.description}`,
|
|
6411
6443
|
""
|
|
6412
6444
|
);
|
|
@@ -6740,13 +6772,20 @@ function registerLightRulesTools(api, registry, logger) {
|
|
|
6740
6772
|
registerToolWithAliases(api, {
|
|
6741
6773
|
name: "lightrules.create",
|
|
6742
6774
|
label: "Create Light Rule",
|
|
6743
|
-
description: '\u521B\u5EFA\u4E00\u6761\u6301\u4E45\u706F\u6548\u89C4\u5219\uFF0C\u6307\u5B9A\
|
|
6775
|
+
description: '\u521B\u5EFA\u4E00\u6761\u6301\u4E45\u706F\u6548\u89C4\u5219\uFF0C\u6307\u5B9A\u5185\u90E8\u6807\u8BC6 name\u3001\u5C55\u793A\u540D title\u3001\u81EA\u7136\u8BED\u8A00\u89E6\u53D1\u63CF\u8FF0\u548C\u706F\u6548\u53C2\u6570\u3002\u89C4\u5219\u4F1A\u4FDD\u5B58\u5230 tasks/<name>/meta.json\uFF0C\u5E76\u7531\u901A\u77E5\u5230\u8FBE\u540E\u7684\u4E8B\u4EF6\u9A71\u52A8\u8BC4\u4F30\u89E6\u53D1\u3002\u5F53\u7528\u6237\u8BF4"\u6536\u5230\u67D0\u7C7B\u901A\u77E5/\u6D88\u606F\u65F6\u4EAE\u706F/\u95EA\u706F/\u53D8\u706F\u6548"\u3001"\u5F53\u8001\u677F\u53D1\u6D88\u606F\u4EAE\u7EA2\u706F"\u3001"\u65B0\u589E/\u521B\u5EFA\u706F\u6548\u89C4\u5219"\u7B49\u65F6\u8C03\u7528\u3002\u4E0D\u8981\u76F4\u63A5\u8C03\u7528 light_control \u4EE3\u66FF\u521B\u5EFA\u89C4\u5219\uFF1Blight_control \u53EA\u4F1A\u7ACB\u5373\u4EAE\u4E00\u6B21\u706F\uFF0C\u4E0D\u4F1A\u51FA\u73B0\u5728\u706F\u6548\u89C4\u5219\u67E5\u8BE2\u4E2D\u3002',
|
|
6744
6776
|
parameters: {
|
|
6745
6777
|
type: "object",
|
|
6746
|
-
required: ["name", "description", "segments"],
|
|
6778
|
+
required: ["name", "title", "description", "segments"],
|
|
6747
6779
|
additionalProperties: false,
|
|
6748
6780
|
properties: {
|
|
6749
|
-
name: {
|
|
6781
|
+
name: {
|
|
6782
|
+
type: "string",
|
|
6783
|
+
description: "\u89C4\u5219\u7684\u5185\u90E8\u552F\u4E00\u6807\u8BC6\u7B26\uFF08\u82F1\u6587 slug\uFF0C\u5982 red_light_on_wechat\uFF09"
|
|
6784
|
+
},
|
|
6785
|
+
title: {
|
|
6786
|
+
type: "string",
|
|
6787
|
+
description: "\u89C4\u5219\u7684\u5C55\u793A\u540D/\u77ED\u6807\u9898\uFF0C\u5E94\u662F\u5BF9 description \u7684\u603B\u7ED3\u51DD\u7EC3\uFF0C\u4F8B\u5982\u201C\u8001\u677F\u5FAE\u4FE1\u7EA2\u706F\u201D"
|
|
6788
|
+
},
|
|
6750
6789
|
description: {
|
|
6751
6790
|
type: "string",
|
|
6752
6791
|
description: "\u81EA\u7136\u8BED\u8A00\u89E6\u53D1\u6761\u4EF6\uFF0C\u540C\u65F6\u4F5C\u4E3A\u89C4\u5219\u7528\u9014\u8BF4\u660E\u3002Agent \u6309\u6B64\u5B57\u6BB5\u5224\u65AD\u662F\u5426\u547D\u4E2D\uFF0C\u5FC5\u987B\u6E05\u6670\u63CF\u8FF0\u300C\u4F55\u65F6\u89E6\u53D1\u300D"
|
|
@@ -6759,7 +6798,8 @@ function registerLightRulesTools(api, registry, logger) {
|
|
|
6759
6798
|
}
|
|
6760
6799
|
},
|
|
6761
6800
|
async execute(_toolCallId, params) {
|
|
6762
|
-
const { name, description, segments, repeat_times } = params;
|
|
6801
|
+
const { name, title, description, segments, repeat_times } = params;
|
|
6802
|
+
const resolvedTitle = typeof title === "string" && title.trim() ? title.trim() : name;
|
|
6763
6803
|
if (!name || typeof name !== "string")
|
|
6764
6804
|
return err("INVALID_PARAMS", "name is required");
|
|
6765
6805
|
if (!description || typeof description !== "string")
|
|
@@ -6776,12 +6816,19 @@ function registerLightRulesTools(api, registry, logger) {
|
|
|
6776
6816
|
try {
|
|
6777
6817
|
const result = await registry.create({
|
|
6778
6818
|
name,
|
|
6819
|
+
title: resolvedTitle,
|
|
6779
6820
|
description,
|
|
6780
6821
|
segments: validation.segments,
|
|
6781
6822
|
repeat_times: repeatTimes
|
|
6782
6823
|
});
|
|
6783
6824
|
logger.info(`lightrules.create tool: created ${name}`);
|
|
6784
|
-
return ok({
|
|
6825
|
+
return ok({
|
|
6826
|
+
ok: true,
|
|
6827
|
+
id: result.meta.name,
|
|
6828
|
+
name: result.meta.name,
|
|
6829
|
+
title: result.meta.title,
|
|
6830
|
+
rule: result.meta
|
|
6831
|
+
});
|
|
6785
6832
|
} catch (e) {
|
|
6786
6833
|
if (e instanceof LightRuleError) return err(e.code, e.message);
|
|
6787
6834
|
logger.warn(`lightrules.create tool failed: ${e?.message}`);
|
|
@@ -6792,13 +6839,17 @@ function registerLightRulesTools(api, registry, logger) {
|
|
|
6792
6839
|
registerToolWithAliases(api, {
|
|
6793
6840
|
name: "lightrules.update",
|
|
6794
6841
|
label: "Update Light Rule",
|
|
6795
|
-
description: '\u4FEE\u6539\u706F\u6548\u89C4\u5219\uFF08\u542F\u7528/\u7981\u7528\u3001\u6539\u63CF\u8FF0\u3001\u6539\u706F\u6548\u53C2\u6570\uFF09\u3002\u5F53\u7528\u6237\u8BF4"\u7981\u7528\u67D0\u6761\u89C4\u5219"\u3001"\u542F\u7528\u89C4\u5219"\u3001"\u4FEE\u6539\u706F\u6548\u89C4\u5219"\u7B49\u65F6\u8C03\u7528\u3002',
|
|
6842
|
+
description: '\u4FEE\u6539\u706F\u6548\u89C4\u5219\uFF08\u542F\u7528/\u7981\u7528\u3001\u6539 title\u3001\u6539\u63CF\u8FF0\u3001\u6539\u706F\u6548\u53C2\u6570\uFF09\u3002\u5F53\u7528\u6237\u8BF4"\u7981\u7528\u67D0\u6761\u89C4\u5219"\u3001"\u542F\u7528\u89C4\u5219"\u3001"\u4FEE\u6539\u706F\u6548\u89C4\u5219"\u7B49\u65F6\u8C03\u7528\u3002',
|
|
6796
6843
|
parameters: {
|
|
6797
6844
|
type: "object",
|
|
6798
6845
|
required: ["name"],
|
|
6799
6846
|
additionalProperties: false,
|
|
6800
6847
|
properties: {
|
|
6801
6848
|
name: { type: "string", description: "\u8981\u4FEE\u6539\u7684\u89C4\u5219\u540D\u79F0\uFF08\u552F\u4E00\u6807\u8BC6\u7B26\uFF09" },
|
|
6849
|
+
title: {
|
|
6850
|
+
type: "string",
|
|
6851
|
+
description: "\u65B0\u7684\u5C55\u793A\u540D/\u77ED\u6807\u9898\uFF08\u53EF\u9009\uFF09"
|
|
6852
|
+
},
|
|
6802
6853
|
description: { type: "string", description: "\u65B0\u7684\u89E6\u53D1\u6761\u4EF6\u63CF\u8FF0\uFF08\u53EF\u9009\uFF09" },
|
|
6803
6854
|
enabled: { type: "boolean", description: "true=\u542F\u7528\uFF0Cfalse=\u7981\u7528" },
|
|
6804
6855
|
segments: { ...segmentsSchema, description: "\u65B0\u7684\u706F\u6548\u6BB5\u5E8F\u5217\uFF08\u53EF\u9009\uFF0C\u4E0D\u586B\u5219\u4FDD\u6301\u4E0D\u53D8\uFF09" },
|
|
@@ -6806,9 +6857,14 @@ function registerLightRulesTools(api, registry, logger) {
|
|
|
6806
6857
|
}
|
|
6807
6858
|
},
|
|
6808
6859
|
async execute(_toolCallId, params) {
|
|
6809
|
-
const { name, description, enabled, segments, repeat_times } = params;
|
|
6860
|
+
const { name, title, description, enabled, segments, repeat_times } = params;
|
|
6861
|
+
const resolvedTitle = typeof title === "string" ? title.trim() : void 0;
|
|
6810
6862
|
if (!name || typeof name !== "string")
|
|
6811
6863
|
return err("INVALID_PARAMS", "name is required");
|
|
6864
|
+
if (title !== void 0 && !resolvedTitle)
|
|
6865
|
+
return err("INVALID_PARAMS", "title must be a non-empty string");
|
|
6866
|
+
if (description !== void 0 && typeof description !== "string")
|
|
6867
|
+
return err("INVALID_PARAMS", "description must be a string");
|
|
6812
6868
|
let validatedSegments;
|
|
6813
6869
|
if (segments !== void 0) {
|
|
6814
6870
|
const validation = validateSegments(segments);
|
|
@@ -6827,6 +6883,7 @@ function registerLightRulesTools(api, registry, logger) {
|
|
|
6827
6883
|
try {
|
|
6828
6884
|
const result = await registry.update({
|
|
6829
6885
|
name,
|
|
6886
|
+
title: resolvedTitle,
|
|
6830
6887
|
description,
|
|
6831
6888
|
segments: validatedSegments,
|
|
6832
6889
|
repeat_times: repeatTimes,
|
|
@@ -6836,6 +6893,7 @@ function registerLightRulesTools(api, registry, logger) {
|
|
|
6836
6893
|
return ok({
|
|
6837
6894
|
ok: true,
|
|
6838
6895
|
name: result.meta.name,
|
|
6896
|
+
title: result.meta.title,
|
|
6839
6897
|
updated: true,
|
|
6840
6898
|
rule: result.meta
|
|
6841
6899
|
});
|
|
@@ -6884,7 +6942,7 @@ init_env();
|
|
|
6884
6942
|
async function sendLightEffect(apiKey, segments, logger, repeatInput, reason) {
|
|
6885
6943
|
const apiUrl = getEnvUrls().lightApiUrl;
|
|
6886
6944
|
const appKey = "7Q617S1G5WD274JI";
|
|
6887
|
-
const templateId = "
|
|
6945
|
+
const templateId = "1990771146010017800";
|
|
6888
6946
|
logger?.info(
|
|
6889
6947
|
`Light sender: apiUrl=${apiUrl ?? "UNSET"}, appKey=${appKey ? appKey.substring(0, 8) + "\u2026" : "UNSET"}, templateId=${templateId ?? "UNSET"}, apiKey=${apiKey ? apiKey.substring(0, 20) + "\u2026" : "EMPTY"}, segments=${JSON.stringify(segments)}`
|
|
6890
6948
|
);
|
|
@@ -7221,7 +7279,8 @@ function buildSystemPrompt(rules) {
|
|
|
7221
7279
|
(a, b) => (b.createdAt ?? "").localeCompare(a.createdAt ?? "")
|
|
7222
7280
|
);
|
|
7223
7281
|
sorted.forEach((rule, idx) => {
|
|
7224
|
-
lines.push(`[${idx + 1}]
|
|
7282
|
+
lines.push(`[${idx + 1}] title: ${rule.title}`);
|
|
7283
|
+
lines.push(` name: ${rule.name}`);
|
|
7225
7284
|
lines.push(` description: ${rule.description}`);
|
|
7226
7285
|
lines.push("");
|
|
7227
7286
|
});
|