@laplace.live/internal 1.3.40 → 1.3.42
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/package.json +1 -1
- package/src/namespaces/laplace.d.ts +101 -1
package/package.json
CHANGED
|
@@ -592,6 +592,13 @@ export declare namespace LaplaceInternal {
|
|
|
592
592
|
|
|
593
593
|
/** Full tag definition (admin-facing, includes internal fields) */
|
|
594
594
|
export interface TagAdmin extends Tag {
|
|
595
|
+
/**
|
|
596
|
+
* Private guidance for the meme AI check's tagging prompt, e.g. what a slang tag name means. Never in viewer
|
|
597
|
+
* responses.
|
|
598
|
+
*
|
|
599
|
+
* @since Oct 26, 2026
|
|
600
|
+
*/
|
|
601
|
+
aiHint: string | null
|
|
595
602
|
scope: string[] | null
|
|
596
603
|
/** Per-entity-type usage counts, computed on-the-fly. Keys are entity type names (e.g. `bilibili_user`, `bilibili_meme`). */
|
|
597
604
|
entityCounts: Record<string, number>
|
|
@@ -606,6 +613,8 @@ export declare namespace LaplaceInternal {
|
|
|
606
613
|
emoji?: string
|
|
607
614
|
icon?: string
|
|
608
615
|
description?: string
|
|
616
|
+
/** Private meme AI check guidance, max 1000 chars (see {@link TagAdmin.aiHint}) */
|
|
617
|
+
aiHint?: string
|
|
609
618
|
scope?: string[]
|
|
610
619
|
}
|
|
611
620
|
|
|
@@ -616,6 +625,8 @@ export declare namespace LaplaceInternal {
|
|
|
616
625
|
emoji?: string | null
|
|
617
626
|
icon?: string | null
|
|
618
627
|
description?: string | null
|
|
628
|
+
/** Private meme AI check guidance, or null to clear (see {@link TagAdmin.aiHint}) */
|
|
629
|
+
aiHint?: string | null
|
|
619
630
|
scope?: string[] | null
|
|
620
631
|
}
|
|
621
632
|
|
|
@@ -1423,7 +1434,7 @@ export declare namespace LaplaceInternal {
|
|
|
1423
1434
|
uid: number
|
|
1424
1435
|
content: string
|
|
1425
1436
|
note?: string
|
|
1426
|
-
/** Existing tag IDs to suggest for this meme (max 10) */
|
|
1437
|
+
/** Existing tag IDs to suggest for this meme (max 10); the AI check replaces them with its own picks */
|
|
1427
1438
|
tags?: number[]
|
|
1428
1439
|
turnstileToken: string
|
|
1429
1440
|
}
|
|
@@ -1447,6 +1458,24 @@ export declare namespace LaplaceInternal {
|
|
|
1447
1458
|
createdAt: string
|
|
1448
1459
|
reviewedAt?: string
|
|
1449
1460
|
rejectReason?: string
|
|
1461
|
+
/**
|
|
1462
|
+
* AI review state (see MemeAiStatus). Null when never checked.
|
|
1463
|
+
*
|
|
1464
|
+
* @since Oct 26, 2026
|
|
1465
|
+
*/
|
|
1466
|
+
aiStatus?: MemeAiStatus | null
|
|
1467
|
+
/**
|
|
1468
|
+
* AI review verdict (see MemeAiVerdict). Null while running or when errored.
|
|
1469
|
+
*
|
|
1470
|
+
* @since Oct 26, 2026
|
|
1471
|
+
*/
|
|
1472
|
+
aiVerdict?: MemeAiVerdict | null
|
|
1473
|
+
/**
|
|
1474
|
+
* AI review payload (see MemeAiData). Null when never checked.
|
|
1475
|
+
*
|
|
1476
|
+
* @since Oct 26, 2026
|
|
1477
|
+
*/
|
|
1478
|
+
aiData?: MemeAiData | null
|
|
1450
1479
|
}
|
|
1451
1480
|
|
|
1452
1481
|
/** Query params for GET /laplace/meme-contributions */
|
|
@@ -1509,6 +1538,77 @@ export declare namespace LaplaceInternal {
|
|
|
1509
1538
|
copyCount: number
|
|
1510
1539
|
}
|
|
1511
1540
|
|
|
1541
|
+
// ============================================
|
|
1542
|
+
// Meme AI Check Types
|
|
1543
|
+
// ============================================
|
|
1544
|
+
|
|
1545
|
+
/**
|
|
1546
|
+
* AI review lifecycle on our side.
|
|
1547
|
+
* - `running` — model call in flight
|
|
1548
|
+
* - `done` — verdict landed (see aiVerdict)
|
|
1549
|
+
* - `errored` — the call failed, was refused, or returned unusable output; row stays pending
|
|
1550
|
+
*/
|
|
1551
|
+
export type MemeAiStatus = 'running' | 'done' | 'errored'
|
|
1552
|
+
|
|
1553
|
+
/** `flagged` when any {@link MemeAiFlag} applies; flagged memes always wait for a human. */
|
|
1554
|
+
export type MemeAiVerdict = 'clean' | 'flagged'
|
|
1555
|
+
|
|
1556
|
+
/**
|
|
1557
|
+
* Why a meme needs human review.
|
|
1558
|
+
* - `curse` — profanity, slurs or abusive insults, including pinyin initials and homophones
|
|
1559
|
+
* - `doxxing` — reveals the real identity behind a streamer or anyone else (开盒, 中之人, 前世)
|
|
1560
|
+
* - `personal_info` — contact or identifying details such as a phone, QQ/WeChat, ID card or bank number
|
|
1561
|
+
*/
|
|
1562
|
+
export type MemeAiFlag = 'curse' | 'doxxing' | 'personal_info'
|
|
1563
|
+
|
|
1564
|
+
/** What kicked off the check; same values as {@link FertilityAiTrigger}. */
|
|
1565
|
+
export type MemeAiTrigger = 'admin' | 'submit'
|
|
1566
|
+
|
|
1567
|
+
/**
|
|
1568
|
+
* What the system did automatically based on the verdict.
|
|
1569
|
+
* - `approved` — clean; the contribution was approved with the AI's tags
|
|
1570
|
+
* - `flagged` — flagged, or auto-approve is off; row stays pending for admin review
|
|
1571
|
+
* - `approve_failed_duplicate` — clean, but the streamer already has a meme with identical content
|
|
1572
|
+
*/
|
|
1573
|
+
export type MemeAiAutoActionResult = 'approved' | 'flagged' | 'approve_failed_duplicate'
|
|
1574
|
+
|
|
1575
|
+
/** Payload stored in bilibili_meme_contributions.ai_data (jsonb). */
|
|
1576
|
+
export interface MemeAiData {
|
|
1577
|
+
/** OpenRouter model slug; once checked, the model that answered (a router such as Jev picks one per call) */
|
|
1578
|
+
model: string
|
|
1579
|
+
trigger: MemeAiTrigger
|
|
1580
|
+
/** ISO 8601 */
|
|
1581
|
+
startedAt: string
|
|
1582
|
+
/** ISO 8601, set when status leaves 'running' */
|
|
1583
|
+
checkedAt?: string
|
|
1584
|
+
/** USD that OpenRouter billed for the call */
|
|
1585
|
+
costUsd?: number
|
|
1586
|
+
flags?: MemeAiFlag[]
|
|
1587
|
+
/** Simplified Chinese, quoting the flagged text; null when clean */
|
|
1588
|
+
reason?: string | null
|
|
1589
|
+
/** Tag IDs the AI picked; they replace the contribution's `tags` */
|
|
1590
|
+
tags?: number[]
|
|
1591
|
+
/** The contributor's own picks, kept because the AI's replace them */
|
|
1592
|
+
contributorTags?: number[]
|
|
1593
|
+
/** Absent when the row was reviewed by an admin before the check finished */
|
|
1594
|
+
autoActionResult?: MemeAiAutoActionResult
|
|
1595
|
+
/** `api_error`, `refusal`, `invalid_output` or `internal_error` */
|
|
1596
|
+
errorMessage?: string
|
|
1597
|
+
}
|
|
1598
|
+
|
|
1599
|
+
/** Response for POST and GET /laplace/meme-contribution-ai-check/:id */
|
|
1600
|
+
export interface MemeAiCheckResponse {
|
|
1601
|
+
id: number
|
|
1602
|
+
contributionStatus: ContributionStatus
|
|
1603
|
+
ai: {
|
|
1604
|
+
status: MemeAiStatus | null
|
|
1605
|
+
verdict: MemeAiVerdict | null
|
|
1606
|
+
data: MemeAiData | null
|
|
1607
|
+
}
|
|
1608
|
+
/** POST only: true when a check already in flight was returned instead of running a new one */
|
|
1609
|
+
reusedExisting?: boolean
|
|
1610
|
+
}
|
|
1611
|
+
|
|
1512
1612
|
// ============================================
|
|
1513
1613
|
// Guild History Types
|
|
1514
1614
|
// ============================================
|