@aalis/plugin-trigger-policy 0.15.0 → 0.17.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/config.d.ts +118 -157
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +55 -122
- package/dist/config.js.map +1 -1
- package/dist/idle-scheduler.d.ts +14 -9
- package/dist/idle-scheduler.d.ts.map +1 -1
- package/dist/idle-scheduler.js +37 -23
- package/dist/idle-scheduler.js.map +1 -1
- package/dist/index.d.ts +10 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +62 -49
- package/dist/index.js.map +1 -1
- package/dist/locales/en.d.ts +36 -0
- package/dist/locales/en.d.ts.map +1 -0
- package/dist/locales/en.js +36 -0
- package/dist/locales/en.js.map +1 -0
- package/dist/state.d.ts +6 -10
- package/dist/state.d.ts.map +1 -1
- package/dist/state.js +1 -3
- package/dist/state.js.map +1 -1
- package/dist/texts.d.ts +71 -0
- package/dist/texts.d.ts.map +1 -0
- package/dist/texts.js +44 -0
- package/dist/texts.js.map +1 -0
- package/package.json +19 -14
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
readonly displayName: "Trigger policy";
|
|
3
|
+
readonly triggerLabel: "Rules (count/score)";
|
|
4
|
+
readonly intervalModeLabel: "Interval mode";
|
|
5
|
+
readonly intervalFixed: "fixed (count only)";
|
|
6
|
+
readonly intervalDynamic: "dynamic (score threshold only)";
|
|
7
|
+
readonly intervalBoth: "both (either one)";
|
|
8
|
+
readonly triggerOnAtLabel: "Detect @ mentions";
|
|
9
|
+
readonly triggerOnAtDescription: "An @ to the assistant counts as a mention (as do pokes and its name): a mention gets a reply right away, the turn is recorded as immediate, and whoever mentioned is the authorizing principal.";
|
|
10
|
+
readonly triggerOnPokeLabel: "Pokes trigger directly";
|
|
11
|
+
readonly triggerOnPokeDescription: "Pokes and similar attention actions trigger right away like an @; when off, such actions fall back to the normal willingness assessment and do not force a reply.";
|
|
12
|
+
readonly triggerNamesLabel: "Trigger name aliases (comma- or newline-separated)";
|
|
13
|
+
readonly muteKeywordsLabel: "Mute keywords (comma- or newline-separated)";
|
|
14
|
+
readonly muteTimeSecondsLabel: "Mute duration on keyword match (seconds)";
|
|
15
|
+
readonly fixedIntervalLabel: "Fixed interval (trigger every N messages)";
|
|
16
|
+
readonly activityScoreLowerLabel: "Activity index lower bound";
|
|
17
|
+
readonly activityScoreUpperLabel: "Activity index upper bound";
|
|
18
|
+
readonly activityDecayMinutesLabel: "Threshold decay minutes";
|
|
19
|
+
readonly scoreDecayMinutesLabel: "Score decay minutes (0 = no decay)";
|
|
20
|
+
readonly idleTriggerScopeLabel: "Idle trigger scope";
|
|
21
|
+
readonly idleScopeOff: "off (disabled)";
|
|
22
|
+
readonly idleScopeSession: "session (a timer per session)";
|
|
23
|
+
readonly idleScopePlatform: "platform (elected across sessions)";
|
|
24
|
+
readonly idleTriggerStrategyLabel: "Idle trigger strategy";
|
|
25
|
+
readonly idleStrategyAllQuiet: "all-quiet (when every session is quiet)";
|
|
26
|
+
readonly idleStrategyFixed: "fixed (fixed interval)";
|
|
27
|
+
readonly idleTriggerMinutesLabel: "Idle trigger minutes";
|
|
28
|
+
readonly idleTriggerStyleLabel: "Idle trigger style";
|
|
29
|
+
readonly idleStyleExponential: "exponential (exponential backoff)";
|
|
30
|
+
readonly idleStyleFixed: "fixed";
|
|
31
|
+
readonly idleTriggerMaxMinutesLabel: "Idle trigger maximum minutes";
|
|
32
|
+
readonly idleTriggerJitterLabel: "Idle trigger jitter";
|
|
33
|
+
readonly idleTriggerPromptLabel: "Idle trigger system prompt";
|
|
34
|
+
};
|
|
35
|
+
export default _default;
|
|
36
|
+
//# sourceMappingURL=en.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/locales/en.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,wBAmCG"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { defineLocale } from '@aalis/schema-i18n';
|
|
2
|
+
export default defineLocale()({
|
|
3
|
+
displayName: 'Trigger policy',
|
|
4
|
+
triggerLabel: 'Rules (count/score)',
|
|
5
|
+
intervalModeLabel: 'Interval mode',
|
|
6
|
+
intervalFixed: 'fixed (count only)',
|
|
7
|
+
intervalDynamic: 'dynamic (score threshold only)',
|
|
8
|
+
intervalBoth: 'both (either one)',
|
|
9
|
+
triggerOnAtLabel: 'Detect @ mentions',
|
|
10
|
+
triggerOnAtDescription: 'An @ to the assistant counts as a mention (as do pokes and its name): a mention gets a reply right away, the turn is recorded as immediate, and whoever mentioned is the authorizing principal.',
|
|
11
|
+
triggerOnPokeLabel: 'Pokes trigger directly',
|
|
12
|
+
triggerOnPokeDescription: 'Pokes and similar attention actions trigger right away like an @; when off, such actions fall back to the normal willingness assessment and do not force a reply.',
|
|
13
|
+
triggerNamesLabel: 'Trigger name aliases (comma- or newline-separated)',
|
|
14
|
+
muteKeywordsLabel: 'Mute keywords (comma- or newline-separated)',
|
|
15
|
+
muteTimeSecondsLabel: 'Mute duration on keyword match (seconds)',
|
|
16
|
+
fixedIntervalLabel: 'Fixed interval (trigger every N messages)',
|
|
17
|
+
activityScoreLowerLabel: 'Activity index lower bound',
|
|
18
|
+
activityScoreUpperLabel: 'Activity index upper bound',
|
|
19
|
+
activityDecayMinutesLabel: 'Threshold decay minutes',
|
|
20
|
+
scoreDecayMinutesLabel: 'Score decay minutes (0 = no decay)',
|
|
21
|
+
idleTriggerScopeLabel: 'Idle trigger scope',
|
|
22
|
+
idleScopeOff: 'off (disabled)',
|
|
23
|
+
idleScopeSession: 'session (a timer per session)',
|
|
24
|
+
idleScopePlatform: 'platform (elected across sessions)',
|
|
25
|
+
idleTriggerStrategyLabel: 'Idle trigger strategy',
|
|
26
|
+
idleStrategyAllQuiet: 'all-quiet (when every session is quiet)',
|
|
27
|
+
idleStrategyFixed: 'fixed (fixed interval)',
|
|
28
|
+
idleTriggerMinutesLabel: 'Idle trigger minutes',
|
|
29
|
+
idleTriggerStyleLabel: 'Idle trigger style',
|
|
30
|
+
idleStyleExponential: 'exponential (exponential backoff)',
|
|
31
|
+
idleStyleFixed: 'fixed',
|
|
32
|
+
idleTriggerMaxMinutesLabel: 'Idle trigger maximum minutes',
|
|
33
|
+
idleTriggerJitterLabel: 'Idle trigger jitter',
|
|
34
|
+
idleTriggerPromptLabel: 'Idle trigger system prompt',
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=en.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"en.js","sourceRoot":"","sources":["../../src/locales/en.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGlD,eAAe,YAAY,EAAU,CAAC;IACpC,WAAW,EAAE,gBAAgB;IAC7B,YAAY,EAAE,qBAAqB;IACnC,iBAAiB,EAAE,eAAe;IAClC,aAAa,EAAE,oBAAoB;IACnC,eAAe,EAAE,gCAAgC;IACjD,YAAY,EAAE,mBAAmB;IACjC,gBAAgB,EAAE,mBAAmB;IACrC,sBAAsB,EACpB,iMAAiM;IACnM,kBAAkB,EAAE,wBAAwB;IAC5C,wBAAwB,EACtB,mKAAmK;IACrK,iBAAiB,EAAE,oDAAoD;IACvE,iBAAiB,EAAE,6CAA6C;IAChE,oBAAoB,EAAE,0CAA0C;IAChE,kBAAkB,EAAE,2CAA2C;IAC/D,uBAAuB,EAAE,4BAA4B;IACrD,uBAAuB,EAAE,4BAA4B;IACrD,yBAAyB,EAAE,yBAAyB;IACpD,sBAAsB,EAAE,oCAAoC;IAC5D,qBAAqB,EAAE,oBAAoB;IAC3C,YAAY,EAAE,gBAAgB;IAC9B,gBAAgB,EAAE,+BAA+B;IACjD,iBAAiB,EAAE,oCAAoC;IACvD,wBAAwB,EAAE,uBAAuB;IACjD,oBAAoB,EAAE,yCAAyC;IAC/D,iBAAiB,EAAE,wBAAwB;IAC3C,uBAAuB,EAAE,sBAAsB;IAC/C,qBAAqB,EAAE,oBAAoB;IAC3C,oBAAoB,EAAE,mCAAmC;IACzD,cAAc,EAAE,OAAO;IACvB,0BAA0B,EAAE,8BAA8B;IAC1D,sBAAsB,EAAE,qBAAqB;IAC7C,sBAAsB,EAAE,4BAA4B;CACrD,CAAC,CAAC"}
|
package/dist/state.d.ts
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TriggerPolicySettings } from './config.js';
|
|
2
2
|
export interface TriggerSessionState {
|
|
3
|
-
/** 该 session 所属 platform
|
|
3
|
+
/** 该 session 所属 platform(按会话读参数时的入口平台,idle 注入也用它) */
|
|
4
4
|
platform: string;
|
|
5
|
-
/** 该 session 的 sessionType(如 group/private/channel);用于 per-scope 覆盖匹配 */
|
|
6
|
-
sessionType: string;
|
|
7
|
-
/** 该 session 的目标 id(群号/用户号/频道号);用于 per-scope 覆盖匹配 */
|
|
8
|
-
targetId: string;
|
|
9
5
|
messageCount: number;
|
|
10
6
|
activityScore: number;
|
|
11
7
|
lastMessageTime: number;
|
|
@@ -18,15 +14,15 @@ export interface TriggerSessionState {
|
|
|
18
14
|
idleTimer: ReturnType<typeof setTimeout> | null;
|
|
19
15
|
idleBackoff: number;
|
|
20
16
|
}
|
|
21
|
-
export declare function createState(platform: string
|
|
17
|
+
export declare function createState(platform: string): TriggerSessionState;
|
|
22
18
|
/** 会话最近一次活动:真人消息或 bot 开口,取较晚者 */
|
|
23
19
|
export declare function lastActivityOf(state: TriggerSessionState): number;
|
|
24
20
|
/** 当前阈值(动态衰减) */
|
|
25
|
-
export declare function getCurrentThreshold(state: TriggerSessionState, cfg:
|
|
21
|
+
export declare function getCurrentThreshold(state: TriggerSessionState, cfg: TriggerPolicySettings): number;
|
|
26
22
|
/** 评分按距离上次消息的时间线性衰减(原地修改) */
|
|
27
|
-
export declare function applyScoreDecay(state: TriggerSessionState, cfg:
|
|
23
|
+
export declare function applyScoreDecay(state: TriggerSessionState, cfg: TriggerPolicySettings): void;
|
|
28
24
|
/** 计算单条入站对评分的增量(受用户交互权重影响) */
|
|
29
|
-
export declare function calculateScoreIncrement(state: TriggerSessionState, cfg:
|
|
25
|
+
export declare function calculateScoreIncrement(state: TriggerSessionState, cfg: TriggerPolicySettings, userId?: string): number;
|
|
30
26
|
/** 会话状态的保留期:超过它无活动且无 idle 定时器即淘汰 */
|
|
31
27
|
export declare const SESSION_TTL_MS: number;
|
|
32
28
|
/** 删除无 idle 定时器且超过 TTL 无活动的会话状态,返回删除数 */
|
package/dist/state.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../src/state.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../src/state.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEzD,MAAM,WAAW,mBAAmB;IAClC,qDAAqD;IACrD,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,kDAAkD;IAClD,eAAe,EAAE,MAAM,CAAC;IACxB,wCAAwC;IACxC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,2BAA2B;IAC3B,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,SAAS,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,GAAG,IAAI,CAAC;IAChD,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,mBAAmB,CAYjE;AAED,iCAAiC;AACjC,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,MAAM,CAEjE;AAED,iBAAiB;AACjB,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,mBAAmB,EAAE,GAAG,EAAE,qBAAqB,GAAG,MAAM,CAMlG;AAED,6BAA6B;AAC7B,wBAAgB,eAAe,CAAC,KAAK,EAAE,mBAAmB,EAAE,GAAG,EAAE,qBAAqB,GAAG,IAAI,CAO5F;AAED,8BAA8B;AAC9B,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,mBAAmB,EAC1B,GAAG,EAAE,qBAAqB,EAC1B,MAAM,CAAC,EAAE,MAAM,GACd,MAAM,CAUR;AAED,oCAAoC;AACpC,eAAO,MAAM,cAAc,QAA2B,CAAC;AAEvD,yCAAyC;AACzC,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAU9F"}
|
package/dist/state.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
// ----- 触发会话状态 + 衰减/计数算法 + TTL 清扫 -----
|
|
2
|
-
export function createState(platform
|
|
2
|
+
export function createState(platform) {
|
|
3
3
|
return {
|
|
4
4
|
platform,
|
|
5
|
-
sessionType,
|
|
6
|
-
targetId,
|
|
7
5
|
messageCount: 0,
|
|
8
6
|
activityScore: 0,
|
|
9
7
|
lastMessageTime: 0,
|
package/dist/state.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.js","sourceRoot":"","sources":["../src/state.ts"],"names":[],"mappings":"AAAA,wCAAwC;
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../src/state.ts"],"names":[],"mappings":"AAAA,wCAAwC;AAoBxC,MAAM,UAAU,WAAW,CAAC,QAAgB;IAC1C,OAAO;QACL,QAAQ;QACR,YAAY,EAAE,CAAC;QACf,aAAa,EAAE,CAAC;QAChB,eAAe,EAAE,CAAC;QAClB,eAAe,EAAE,CAAC;QAClB,iBAAiB,EAAE,CAAC;QACpB,gB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.ts
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
declare const SOURCE: {
|
|
2
|
+
readonly displayName: "触发策略";
|
|
3
|
+
readonly triggerLabel: "规则(计数/评分)";
|
|
4
|
+
readonly intervalModeLabel: "间隔模式";
|
|
5
|
+
readonly intervalFixed: "fixed (仅按计数)";
|
|
6
|
+
readonly intervalDynamic: "dynamic (仅按评分阈值)";
|
|
7
|
+
readonly intervalBoth: "both (任一满足)";
|
|
8
|
+
readonly triggerOnAtLabel: "检测 @ 提及";
|
|
9
|
+
readonly triggerOnAtDescription: "@ 自己算\"被点名\"(戳一戳、名字同理):点名直接开口,回合记为 immediate,点名者即授权主体。";
|
|
10
|
+
readonly triggerOnPokeLabel: "戳一戳直触发";
|
|
11
|
+
readonly triggerOnPokeDescription: "戳一戳等注意力动作视同 @ 即时触发;关闭后此类动作落回正常意愿评估,不强制回复。";
|
|
12
|
+
readonly triggerNamesLabel: "触发名别名(逗号或换行分隔)";
|
|
13
|
+
readonly muteKeywordsLabel: "禁言关键词(逗号或换行分隔)";
|
|
14
|
+
readonly muteTimeSecondsLabel: "禁言关键词命中时长(秒)";
|
|
15
|
+
readonly fixedIntervalLabel: "固定间隔(每 N 条触发)";
|
|
16
|
+
readonly activityScoreLowerLabel: "活跃指数下限";
|
|
17
|
+
readonly activityScoreUpperLabel: "活跃指数上限";
|
|
18
|
+
readonly activityDecayMinutesLabel: "阈值衰减分钟";
|
|
19
|
+
readonly scoreDecayMinutesLabel: "评分衰减分钟(0=不衰减)";
|
|
20
|
+
readonly idleTriggerScopeLabel: "闲置触发范围";
|
|
21
|
+
readonly idleScopeOff: "off (关闭)";
|
|
22
|
+
readonly idleScopeSession: "session (每会话独立定时)";
|
|
23
|
+
readonly idleScopePlatform: "platform (跨会话选举)";
|
|
24
|
+
readonly idleTriggerStrategyLabel: "闲置触发策略";
|
|
25
|
+
readonly idleStrategyAllQuiet: "all-quiet (所有会话都静默时)";
|
|
26
|
+
readonly idleStrategyFixed: "fixed (固定间隔)";
|
|
27
|
+
readonly idleTriggerMinutesLabel: "闲置触发分钟";
|
|
28
|
+
readonly idleTriggerStyleLabel: "闲置触发风格";
|
|
29
|
+
readonly idleStyleExponential: "exponential (指数退避)";
|
|
30
|
+
readonly idleStyleFixed: "fixed (固定)";
|
|
31
|
+
readonly idleTriggerMaxMinutesLabel: "闲置触发上限分钟";
|
|
32
|
+
readonly idleTriggerJitterLabel: "闲置触发抖动";
|
|
33
|
+
readonly idleTriggerPromptLabel: "闲置触发系统提示";
|
|
34
|
+
};
|
|
35
|
+
export type Source = typeof SOURCE;
|
|
36
|
+
export declare const t: import("@aalis/schema-i18n").TextFactory<{
|
|
37
|
+
readonly displayName: "触发策略";
|
|
38
|
+
readonly triggerLabel: "规则(计数/评分)";
|
|
39
|
+
readonly intervalModeLabel: "间隔模式";
|
|
40
|
+
readonly intervalFixed: "fixed (仅按计数)";
|
|
41
|
+
readonly intervalDynamic: "dynamic (仅按评分阈值)";
|
|
42
|
+
readonly intervalBoth: "both (任一满足)";
|
|
43
|
+
readonly triggerOnAtLabel: "检测 @ 提及";
|
|
44
|
+
readonly triggerOnAtDescription: "@ 自己算\"被点名\"(戳一戳、名字同理):点名直接开口,回合记为 immediate,点名者即授权主体。";
|
|
45
|
+
readonly triggerOnPokeLabel: "戳一戳直触发";
|
|
46
|
+
readonly triggerOnPokeDescription: "戳一戳等注意力动作视同 @ 即时触发;关闭后此类动作落回正常意愿评估,不强制回复。";
|
|
47
|
+
readonly triggerNamesLabel: "触发名别名(逗号或换行分隔)";
|
|
48
|
+
readonly muteKeywordsLabel: "禁言关键词(逗号或换行分隔)";
|
|
49
|
+
readonly muteTimeSecondsLabel: "禁言关键词命中时长(秒)";
|
|
50
|
+
readonly fixedIntervalLabel: "固定间隔(每 N 条触发)";
|
|
51
|
+
readonly activityScoreLowerLabel: "活跃指数下限";
|
|
52
|
+
readonly activityScoreUpperLabel: "活跃指数上限";
|
|
53
|
+
readonly activityDecayMinutesLabel: "阈值衰减分钟";
|
|
54
|
+
readonly scoreDecayMinutesLabel: "评分衰减分钟(0=不衰减)";
|
|
55
|
+
readonly idleTriggerScopeLabel: "闲置触发范围";
|
|
56
|
+
readonly idleScopeOff: "off (关闭)";
|
|
57
|
+
readonly idleScopeSession: "session (每会话独立定时)";
|
|
58
|
+
readonly idleScopePlatform: "platform (跨会话选举)";
|
|
59
|
+
readonly idleTriggerStrategyLabel: "闲置触发策略";
|
|
60
|
+
readonly idleStrategyAllQuiet: "all-quiet (所有会话都静默时)";
|
|
61
|
+
readonly idleStrategyFixed: "fixed (固定间隔)";
|
|
62
|
+
readonly idleTriggerMinutesLabel: "闲置触发分钟";
|
|
63
|
+
readonly idleTriggerStyleLabel: "闲置触发风格";
|
|
64
|
+
readonly idleStyleExponential: "exponential (指数退避)";
|
|
65
|
+
readonly idleStyleFixed: "fixed (固定)";
|
|
66
|
+
readonly idleTriggerMaxMinutesLabel: "闲置触发上限分钟";
|
|
67
|
+
readonly idleTriggerJitterLabel: "闲置触发抖动";
|
|
68
|
+
readonly idleTriggerPromptLabel: "闲置触发系统提示";
|
|
69
|
+
}>;
|
|
70
|
+
export {};
|
|
71
|
+
//# sourceMappingURL=texts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"texts.d.ts","sourceRoot":"","sources":["../src/texts.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCF,CAAC;AACX,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC;AAEnC,eAAO,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKZ,CAAC"}
|
package/dist/texts.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// 本插件自己的原文字典:显示名、触发服务的标签与配置项
|
|
2
|
+
import { defineTexts } from '@aalis/schema-i18n';
|
|
3
|
+
import en from './locales/en.js';
|
|
4
|
+
const SOURCE = {
|
|
5
|
+
displayName: '触发策略',
|
|
6
|
+
triggerLabel: '规则(计数/评分)',
|
|
7
|
+
intervalModeLabel: '间隔模式',
|
|
8
|
+
intervalFixed: 'fixed (仅按计数)',
|
|
9
|
+
intervalDynamic: 'dynamic (仅按评分阈值)',
|
|
10
|
+
intervalBoth: 'both (任一满足)',
|
|
11
|
+
triggerOnAtLabel: '检测 @ 提及',
|
|
12
|
+
triggerOnAtDescription: '@ 自己算"被点名"(戳一戳、名字同理):点名直接开口,回合记为 immediate,点名者即授权主体。',
|
|
13
|
+
triggerOnPokeLabel: '戳一戳直触发',
|
|
14
|
+
triggerOnPokeDescription: '戳一戳等注意力动作视同 @ 即时触发;关闭后此类动作落回正常意愿评估,不强制回复。',
|
|
15
|
+
triggerNamesLabel: '触发名别名(逗号或换行分隔)',
|
|
16
|
+
muteKeywordsLabel: '禁言关键词(逗号或换行分隔)',
|
|
17
|
+
muteTimeSecondsLabel: '禁言关键词命中时长(秒)',
|
|
18
|
+
fixedIntervalLabel: '固定间隔(每 N 条触发)',
|
|
19
|
+
activityScoreLowerLabel: '活跃指数下限',
|
|
20
|
+
activityScoreUpperLabel: '活跃指数上限',
|
|
21
|
+
activityDecayMinutesLabel: '阈值衰减分钟',
|
|
22
|
+
scoreDecayMinutesLabel: '评分衰减分钟(0=不衰减)',
|
|
23
|
+
idleTriggerScopeLabel: '闲置触发范围',
|
|
24
|
+
idleScopeOff: 'off (关闭)',
|
|
25
|
+
idleScopeSession: 'session (每会话独立定时)',
|
|
26
|
+
idleScopePlatform: 'platform (跨会话选举)',
|
|
27
|
+
idleTriggerStrategyLabel: '闲置触发策略',
|
|
28
|
+
idleStrategyAllQuiet: 'all-quiet (所有会话都静默时)',
|
|
29
|
+
idleStrategyFixed: 'fixed (固定间隔)',
|
|
30
|
+
idleTriggerMinutesLabel: '闲置触发分钟',
|
|
31
|
+
idleTriggerStyleLabel: '闲置触发风格',
|
|
32
|
+
idleStyleExponential: 'exponential (指数退避)',
|
|
33
|
+
idleStyleFixed: 'fixed (固定)',
|
|
34
|
+
idleTriggerMaxMinutesLabel: '闲置触发上限分钟',
|
|
35
|
+
idleTriggerJitterLabel: '闲置触发抖动',
|
|
36
|
+
idleTriggerPromptLabel: '闲置触发系统提示',
|
|
37
|
+
};
|
|
38
|
+
export const t = defineTexts({
|
|
39
|
+
ns: '@aalis/plugin-trigger-policy',
|
|
40
|
+
language: 'zh-CN',
|
|
41
|
+
source: SOURCE,
|
|
42
|
+
locales: { en },
|
|
43
|
+
});
|
|
44
|
+
//# sourceMappingURL=texts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"texts.js","sourceRoot":"","sources":["../src/texts.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAEjC,MAAM,MAAM,GAAG;IACb,WAAW,EAAE,MAAM;IACnB,YAAY,EAAE,WAAW;IACzB,iBAAiB,EAAE,MAAM;IACzB,aAAa,EAAE,cAAc;IAC7B,eAAe,EAAE,kBAAkB;IACnC,YAAY,EAAE,aAAa;IAC3B,gBAAgB,EAAE,SAAS;IAC3B,sBAAsB,EAAE,sDAAsD;IAC9E,kBAAkB,EAAE,QAAQ;IAC5B,wBAAwB,EAAE,2CAA2C;IACrE,iBAAiB,EAAE,gBAAgB;IACnC,iBAAiB,EAAE,gBAAgB;IACnC,oBAAoB,EAAE,cAAc;IACpC,kBAAkB,EAAE,eAAe;IACnC,uBAAuB,EAAE,QAAQ;IACjC,uBAAuB,EAAE,QAAQ;IACjC,yBAAyB,EAAE,QAAQ;IACnC,sBAAsB,EAAE,eAAe;IACvC,qBAAqB,EAAE,QAAQ;IAC/B,YAAY,EAAE,UAAU;IACxB,gBAAgB,EAAE,mBAAmB;IACrC,iBAAiB,EAAE,kBAAkB;IACrC,wBAAwB,EAAE,QAAQ;IAClC,oBAAoB,EAAE,sBAAsB;IAC5C,iBAAiB,EAAE,cAAc;IACjC,uBAAuB,EAAE,QAAQ;IACjC,qBAAqB,EAAE,QAAQ;IAC/B,oBAAoB,EAAE,oBAAoB;IAC1C,cAAc,EAAE,YAAY;IAC5B,0BAA0B,EAAE,UAAU;IACtC,sBAAsB,EAAE,QAAQ;IAChC,sBAAsB,EAAE,UAAU;CAC1B,CAAC;AAGX,MAAM,CAAC,MAAM,CAAC,GAAG,WAAW,CAAC;IAC3B,EAAE,EAAE,8BAA8B;IAClC,QAAQ,EAAE,OAAO;IACjB,MAAM,EAAE,MAAM;IACd,OAAO,EAAE,EAAE,EAAE,EAAE;CAChB,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aalis/plugin-trigger-policy",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,23 +24,26 @@
|
|
|
24
24
|
"dist"
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@aalis/schema-config": ">=0.
|
|
28
|
-
"@aalis/api-flow-control": ">=0.
|
|
29
|
-
"@aalis/api-gateway": ">=0.
|
|
30
|
-
"@aalis/api-message-archive": ">=0.
|
|
31
|
-
"@aalis/api-persona": ">=0.
|
|
32
|
-
"@aalis/
|
|
33
|
-
"@aalis/
|
|
34
|
-
"@aalis/api-
|
|
35
|
-
"@aalis/api-
|
|
27
|
+
"@aalis/schema-config": ">=0.16.0 <1.0.0",
|
|
28
|
+
"@aalis/api-flow-control": ">=0.9.0 <1.0.0",
|
|
29
|
+
"@aalis/api-gateway": ">=0.10.0 <1.0.0",
|
|
30
|
+
"@aalis/api-message-archive": ">=0.9.0 <1.0.0",
|
|
31
|
+
"@aalis/api-persona": ">=0.10.0 <1.0.0",
|
|
32
|
+
"@aalis/schema-message": ">=0.11.0 <1.0.0",
|
|
33
|
+
"@aalis/api-hooks": ">=0.3.0 <1.0.0",
|
|
34
|
+
"@aalis/api-trigger": ">=0.3.0 <1.0.0",
|
|
35
|
+
"@aalis/api-host-config": ">=0.3.0 <1.0.0",
|
|
36
|
+
"@aalis/api-session-manager": ">=0.12.0 <1.0.0",
|
|
37
|
+
"@aalis/api-session-settings": ">=0.1.0 <1.0.0",
|
|
38
|
+
"@aalis/schema-i18n": ">=0.1.0 <1.0.0"
|
|
36
39
|
},
|
|
37
40
|
"devDependencies": {
|
|
38
41
|
"@types/node": "^22.0.0",
|
|
39
42
|
"typescript": "^5.7.0",
|
|
40
|
-
"@aalis/core": "0.
|
|
43
|
+
"@aalis/core": "0.21.0"
|
|
41
44
|
},
|
|
42
45
|
"peerDependencies": {
|
|
43
|
-
"@aalis/core": ">=0.
|
|
46
|
+
"@aalis/core": ">=0.21.0 <1.0.0"
|
|
44
47
|
},
|
|
45
48
|
"aalis": {
|
|
46
49
|
"service": {
|
|
@@ -56,9 +59,11 @@
|
|
|
56
59
|
"optional": [
|
|
57
60
|
"flow-control",
|
|
58
61
|
"persona",
|
|
59
|
-
"session-manager",
|
|
60
62
|
"message-archive",
|
|
61
|
-
"trigger"
|
|
63
|
+
"trigger",
|
|
64
|
+
"session-manager",
|
|
65
|
+
"session-settings",
|
|
66
|
+
"host-config"
|
|
62
67
|
],
|
|
63
68
|
"provides": [
|
|
64
69
|
"trigger"
|