@rine-kit/pubg-reply 0.1.3 → 0.1.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.
@@ -10,6 +10,7 @@ export type Part = {
10
10
  arguments?: unknown;
11
11
  };
12
12
  export declare const FACT_TOOLS: Set<string>;
13
+ export declare const FACT: RegExp;
13
14
  export declare const BARE_RECORD_TTL_MS = 120000;
14
15
  export declare const SAFE_REPLY = "\u8FD9\u6B21 PUBG \u6218\u7EE9\u6CA1\u6709\u5B8C\u6210\u672C\u8F6E\u6570\u636E\u6838\u9A8C\uFF0C\u6211\u4E0D\u80FD\u786E\u8BA4\u7ED3\u679C\u3002\u8BF7\u518D\u8BD5\u4E00\u6B21\u3002";
15
16
  export declare function isBareRecordRequest(request: unknown): boolean;
package/dist/evidence.js CHANGED
@@ -4,7 +4,7 @@ export const FACT_TOOLS = new Set([
4
4
  'pubg_get_review_facts', 'pubg_get_period_review', 'pubg_query_team_damage',
5
5
  ]);
6
6
  const REQUEST = /PUBG|绝地求生|吃鸡|战绩|对局|几局|击杀|KD|K\/D/u;
7
- const FACT = /PUBG|绝地求生|吃鸡|战绩|对局|击杀|伤害|KD|K\/D|no_matches|\d+\s*(?:局|杀|场|次)|一局都没有|没有.{0,8}战绩/u;
7
+ export const FACT = /PUBG|绝地求生|吃鸡|战绩|对局|击杀|伤害|KD|K\/D|no_matches|\d+\s*(?:局|杀|场|次)|一局都没有|没有.{0,8}战绩/u;
8
8
  const TEAM = /全队|整队|队伍|小队|我们|咱们|大家|所有人|全员|team|squad/iu;
9
9
  // A bare record request names no one ("昨日战绩", "@Kurisu 今天战绩"); in the squad it means the whole team.
10
10
  const BARE_RECORD = /^(?:\s|@\S+\s*)*(?:今天|今日|昨天|昨日|前天|本周|这周|上周|最近)?\s*(?:的)?\s*(?:PUBG|吃鸡)?\s*(?:战绩|战况)\s*[??!!。.~]*\s*$/iu;
package/dist/persona.d.ts CHANGED
@@ -10,7 +10,14 @@ export interface AddressingRecord {
10
10
  externalId: string;
11
11
  }>;
12
12
  }
13
- export declare function renderGroupRoster(entries: readonly AddressingRecord[]): string | undefined;
13
+ /**
14
+ * Who decided the forms of address, as the roster's heading says it. Lab's own wording is the default (its roster is
15
+ * reviewed by Arthur); a host with another authority passes its own, e.g. RINE: the room's admins decide.
16
+ */
17
+ export declare const LAB_ROSTER_AUTHORITY = "Arthur \u5BA1\u6838\u8FC7\u7684\u957F\u671F\u8BBE\u5B9A";
18
+ export declare function renderGroupRoster<T extends AddressingRecord>(entries: readonly T[], options?: {
19
+ authority?: string;
20
+ }): string | undefined;
14
21
  /**
15
22
  * Group voice anchor: a squad group's session resets daily, which also drops the long in-character replies that kept
16
23
  * Kurisu talkative. This block restores the register on every turn without adding facts or capabilities.
package/dist/persona.js CHANGED
@@ -2,7 +2,12 @@
2
2
  * Moved unchanged from Lab's plugins/amadeus/src/group-roster.ts: the squad's forms of address and the group voice
3
3
  * anchor (Kurisu). Hosts decide where the entries come from (Lab: its identity store; RINE: the room's roster).
4
4
  */
5
- export function renderGroupRoster(entries) {
5
+ /**
6
+ * Who decided the forms of address, as the roster's heading says it. Lab's own wording is the default (its roster is
7
+ * reviewed by Arthur); a host with another authority passes its own, e.g. RINE: the room's admins decide.
8
+ */
9
+ export const LAB_ROSTER_AUTHORITY = 'Arthur 审核过的长期设定';
10
+ export function renderGroupRoster(entries, options = {}) {
6
11
  if (!entries.length)
7
12
  return undefined;
8
13
  const lines = entries.map((entry) => {
@@ -13,7 +18,7 @@ export function renderGroupRoster(entries) {
13
18
  return `- ${who}:称呼「${entry.addressAs}」${entry.avoid.length ? `;不要叫:${entry.avoid.join('、')}` : ''}${entry.note ? `;${entry.note}` : ''}`;
14
19
  });
15
20
  return [
16
- '本群成员的称呼(成员约定、Arthur 审核过的长期设定;与聊天记录里的旧叫法冲突时以这里为准):',
21
+ `本群成员的称呼(成员约定、${options.authority ?? LAB_ROSTER_AUTHORITY};与聊天记录里的旧叫法冲突时以这里为准):`,
17
22
  ...lines,
18
23
  '称呼成员时用这里的叫法。查询战绩、确认身份仍按身份与 PUBG 工具,不要从称呼推断账号。',
19
24
  ].join('\n');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rine-kit/pubg-reply",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "type": "module",
5
5
  "description": "How a PUBG tool result reaches the model and the chat: the presentation glue (displayText in the chat layout, replyGuide, share link), the squad voice and roster, the PUBG rules text, the bare-record scope guard and the outbound evidence check. Moved unchanged from Lab's plugins/pubg and plugins/amadeus; hosts add only delivery.",
6
6
  "license": "MIT",
@@ -18,8 +18,8 @@
18
18
  "dist"
19
19
  ],
20
20
  "dependencies": {
21
- "@rine-kit/presentation": "0.1.3",
22
- "@rine-kit/pubg-domain": "0.1.3"
21
+ "@rine-kit/presentation": "0.1.4",
22
+ "@rine-kit/pubg-domain": "0.1.4"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@types/node": "^26.6.5",