@laplace.live/internal 1.3.12 → 1.3.14
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
CHANGED
|
@@ -120,10 +120,6 @@ export declare namespace BilibiliInternal {
|
|
|
120
120
|
* 当前请求的 buvid3 获取模式
|
|
121
121
|
*/
|
|
122
122
|
ackMode: string
|
|
123
|
-
/**
|
|
124
|
-
* Custom CookieCloud sync server
|
|
125
|
-
*/
|
|
126
|
-
syncServer?: string
|
|
127
123
|
}
|
|
128
124
|
}
|
|
129
125
|
|
|
@@ -196,10 +192,6 @@ export declare namespace BilibiliInternal {
|
|
|
196
192
|
* @deprecated use `ackMode`
|
|
197
193
|
*/
|
|
198
194
|
buvidMode: string
|
|
199
|
-
/**
|
|
200
|
-
* Custom CookieCloud sync server
|
|
201
|
-
*/
|
|
202
|
-
syncServer?: string
|
|
203
195
|
}
|
|
204
196
|
}
|
|
205
197
|
|
|
@@ -73,7 +73,6 @@ export declare namespace LaplaceInternal {
|
|
|
73
73
|
fetchMode: 'login-sync' | 'anonymous' | 'built-in'
|
|
74
74
|
ackMode: 'guest' | 'passthrough' | 'builtin-passthrough'
|
|
75
75
|
fetcher: number
|
|
76
|
-
syncServer: boolean
|
|
77
76
|
}
|
|
78
77
|
}
|
|
79
78
|
|
|
@@ -980,6 +979,12 @@ export declare namespace LaplaceInternal {
|
|
|
980
979
|
/** ISO timestamp string */
|
|
981
980
|
reviewedAt?: string
|
|
982
981
|
rejectReason?: string
|
|
982
|
+
/** AI review state (see FertilityAiStatus). Null when never checked. */
|
|
983
|
+
aiStatus?: FertilityAiStatus | null
|
|
984
|
+
/** AI review verdict (see FertilityAiVerdict). Null when running, errored, or skipped without a verdict. */
|
|
985
|
+
aiVerdict?: FertilityAiVerdict | null
|
|
986
|
+
/** AI review per-attempt payload (see FertilityAiData). Null when never checked. */
|
|
987
|
+
aiData?: FertilityAiData | null
|
|
983
988
|
}
|
|
984
989
|
|
|
985
990
|
/**
|
|
@@ -1074,6 +1079,85 @@ export declare namespace LaplaceInternal {
|
|
|
1074
1079
|
avgProcessingTimeHours: number | null
|
|
1075
1080
|
}
|
|
1076
1081
|
|
|
1082
|
+
// ============================================
|
|
1083
|
+
// Fertility AI Check Types
|
|
1084
|
+
// ============================================
|
|
1085
|
+
|
|
1086
|
+
/**
|
|
1087
|
+
* AI review session lifecycle on our side.
|
|
1088
|
+
* - `running` — Browser Use session dispatched, waiting for terminal status
|
|
1089
|
+
* - `done` — verdict landed (see aiVerdict)
|
|
1090
|
+
* - `errored` — Browser Use failed or returned non-conforming output
|
|
1091
|
+
* - `skipped` — source URL was off-list (e.g. not a Bilibili page); never dispatched
|
|
1092
|
+
*/
|
|
1093
|
+
export type FertilityAiStatus = 'running' | 'done' | 'errored' | 'skipped'
|
|
1094
|
+
|
|
1095
|
+
/** Verdict produced by evaluating the AI's structured output against the contribution's claim. */
|
|
1096
|
+
export type FertilityAiVerdict = 'valid' | 'invalid' | 'inconclusive'
|
|
1097
|
+
|
|
1098
|
+
/**
|
|
1099
|
+
* What the system did automatically based on the verdict.
|
|
1100
|
+
* - `approved` — verdict was `valid`; approveFertilityContribution succeeded
|
|
1101
|
+
* - `flagged` — verdict was `invalid` or `inconclusive`; row stays pending for admin review
|
|
1102
|
+
* - `approve_failed_duplicate` — verdict was `valid` but approval bounced because the period already exists in production
|
|
1103
|
+
* - `skipped_unsupported` — source URL was not Bilibili; no AI call made
|
|
1104
|
+
*/
|
|
1105
|
+
export type FertilityAiAutoActionResult =
|
|
1106
|
+
| 'approved'
|
|
1107
|
+
| 'flagged'
|
|
1108
|
+
| 'approve_failed_duplicate'
|
|
1109
|
+
| 'skipped_unsupported'
|
|
1110
|
+
|
|
1111
|
+
/**
|
|
1112
|
+
* Structured output the Browser Use agent returns (matches FERTILITY_AI_OUTPUT_SCHEMA).
|
|
1113
|
+
*/
|
|
1114
|
+
export interface FertilityAiEvidence {
|
|
1115
|
+
extractedUid: number | null
|
|
1116
|
+
uidMatches: boolean
|
|
1117
|
+
/** YYYY-MM-DD in Asia/Shanghai; the date the content claims the period began. */
|
|
1118
|
+
extractedPeriodStartDate: string | null
|
|
1119
|
+
/** YYYY-MM-DD in Asia/Shanghai; the post's publish date (auxiliary). */
|
|
1120
|
+
postedAt: string | null
|
|
1121
|
+
contentMentionsPeriod: boolean
|
|
1122
|
+
evidenceQuote: string | null
|
|
1123
|
+
pageType: 'video' | 'dynamic' | 'livestream_replay' | 'space' | 'unknown'
|
|
1124
|
+
confidence: number
|
|
1125
|
+
notes: string | null
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
/**
|
|
1129
|
+
* Payload stored in bilibili_fertility_contributions.ai_data (jsonb).
|
|
1130
|
+
* Used both by the workers and by Drizzle via $type<>().
|
|
1131
|
+
*/
|
|
1132
|
+
export interface FertilityAiData {
|
|
1133
|
+
sessionId: string
|
|
1134
|
+
model: string
|
|
1135
|
+
liveUrl?: string
|
|
1136
|
+
/** ISO 8601 */
|
|
1137
|
+
startedAt: string
|
|
1138
|
+
/** ISO 8601, set when status leaves 'running' */
|
|
1139
|
+
checkedAt?: string
|
|
1140
|
+
costUsd?: string
|
|
1141
|
+
confidence?: number
|
|
1142
|
+
evidence?: FertilityAiEvidence
|
|
1143
|
+
autoActionResult?: FertilityAiAutoActionResult
|
|
1144
|
+
errorMessage?: string
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
/**
|
|
1148
|
+
* Response shape for POST /laplace/fertility-contribution-ai-check/:id
|
|
1149
|
+
* and GET /laplace/fertility-contribution-ai-check/:id.
|
|
1150
|
+
*/
|
|
1151
|
+
export interface FertilityAiCheckResponse {
|
|
1152
|
+
id: number
|
|
1153
|
+
contributionStatus: ContributionStatus
|
|
1154
|
+
ai: {
|
|
1155
|
+
status: FertilityAiStatus | null
|
|
1156
|
+
verdict: FertilityAiVerdict | null
|
|
1157
|
+
data: FertilityAiData | null
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1077
1161
|
// ============================================
|
|
1078
1162
|
// Meme Types
|
|
1079
1163
|
// ============================================
|