evo360-types 1.3.626 → 1.3.630
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/apps/evo-csq/zod-schemas.d.ts +174 -0
- package/dist/apps/evo-csq/zod-schemas.js +26 -2
- package/dist/apps/evo-csq/zod-schemas.ts +29 -0
- package/dist/types/evo-csq/index.d.ts +29 -0
- package/dist/types/evo-csq/index.ts +41 -0
- package/dist/types/evo-telemedicine/index.d.ts +31 -0
- package/dist/types/evo-telemedicine/index.js +31 -0
- package/dist/types/evo-telemedicine/index.ts +31 -0
- package/package.json +1 -1
|
@@ -2166,6 +2166,31 @@ export declare const zCsqReviewSchema: z.ZodObject<{
|
|
|
2166
2166
|
note?: string | undefined;
|
|
2167
2167
|
reviewed_at?: unknown;
|
|
2168
2168
|
}>;
|
|
2169
|
+
export declare const zCsqTriageModeSchema: z.ZodEnum<["skip_llm", "full_review"]>;
|
|
2170
|
+
export declare const zCsqTriageReasonSchema: z.ZodEnum<["document_only", "spam_close", "reopen_without_new_messages", "automation_only", "ack_only", "forced"]>;
|
|
2171
|
+
export declare const zCsqTriageDecisionSchema: z.ZodObject<{
|
|
2172
|
+
mode: z.ZodEnum<["skip_llm", "full_review"]>;
|
|
2173
|
+
reasons: z.ZodArray<z.ZodEnum<["document_only", "spam_close", "reopen_without_new_messages", "automation_only", "ack_only", "forced"]>, "many">;
|
|
2174
|
+
}, "strip", z.ZodTypeAny, {
|
|
2175
|
+
mode: "skip_llm" | "full_review";
|
|
2176
|
+
reasons: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "forced")[];
|
|
2177
|
+
}, {
|
|
2178
|
+
mode: "skip_llm" | "full_review";
|
|
2179
|
+
reasons: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "forced")[];
|
|
2180
|
+
}>;
|
|
2181
|
+
export declare const zCsqPromptBlockUsageSchema: z.ZodObject<{
|
|
2182
|
+
name: z.ZodString;
|
|
2183
|
+
chars: z.ZodNumber;
|
|
2184
|
+
tokens_est: z.ZodNumber;
|
|
2185
|
+
}, "strip", z.ZodTypeAny, {
|
|
2186
|
+
name: string;
|
|
2187
|
+
chars: number;
|
|
2188
|
+
tokens_est: number;
|
|
2189
|
+
}, {
|
|
2190
|
+
name: string;
|
|
2191
|
+
chars: number;
|
|
2192
|
+
tokens_est: number;
|
|
2193
|
+
}>;
|
|
2169
2194
|
export declare const zCsqTrailEntrySchema: z.ZodObject<{
|
|
2170
2195
|
ticket_id: z.ZodString;
|
|
2171
2196
|
closed_at: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
@@ -2175,6 +2200,8 @@ export declare const zCsqTrailEntrySchema: z.ZodObject<{
|
|
|
2175
2200
|
alerts_critical: z.ZodNumber;
|
|
2176
2201
|
alerts_new: z.ZodNumber;
|
|
2177
2202
|
alerts_resolved: z.ZodNumber;
|
|
2203
|
+
judge: z.ZodOptional<z.ZodEnum<["judged", "skipped"]>>;
|
|
2204
|
+
triage_reasons: z.ZodOptional<z.ZodArray<z.ZodEnum<["document_only", "spam_close", "reopen_without_new_messages", "automation_only", "ack_only", "forced"]>, "many">>;
|
|
2178
2205
|
}, "strip", z.ZodTypeAny, {
|
|
2179
2206
|
status: "Excelente" | "Bom" | "Regular" | "Ruim" | "Crítico" | "pending_judge";
|
|
2180
2207
|
ticket_id: string;
|
|
@@ -2184,6 +2211,8 @@ export declare const zCsqTrailEntrySchema: z.ZodObject<{
|
|
|
2184
2211
|
alerts_critical: number;
|
|
2185
2212
|
alerts_new: number;
|
|
2186
2213
|
alerts_resolved: number;
|
|
2214
|
+
judge?: "judged" | "skipped" | undefined;
|
|
2215
|
+
triage_reasons?: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "forced")[] | undefined;
|
|
2187
2216
|
}, {
|
|
2188
2217
|
status: "Excelente" | "Bom" | "Regular" | "Ruim" | "Crítico" | "pending_judge";
|
|
2189
2218
|
ticket_id: string;
|
|
@@ -2193,6 +2222,8 @@ export declare const zCsqTrailEntrySchema: z.ZodObject<{
|
|
|
2193
2222
|
alerts_resolved: number;
|
|
2194
2223
|
evaluated_at?: unknown;
|
|
2195
2224
|
closed_at?: unknown;
|
|
2225
|
+
judge?: "judged" | "skipped" | undefined;
|
|
2226
|
+
triage_reasons?: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "forced")[] | undefined;
|
|
2196
2227
|
}>;
|
|
2197
2228
|
/** Resumo denormalizado gravado em `ticket.csq`. */
|
|
2198
2229
|
export declare const zCsqTicketSummarySchema: z.ZodObject<{
|
|
@@ -2251,18 +2282,41 @@ export declare const zCsqLlmUsageSchema: z.ZodObject<{
|
|
|
2251
2282
|
cache_read_tokens: z.ZodOptional<z.ZodNumber>;
|
|
2252
2283
|
cache_creation_tokens: z.ZodOptional<z.ZodNumber>;
|
|
2253
2284
|
rounds: z.ZodOptional<z.ZodNumber>;
|
|
2285
|
+
blocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2286
|
+
name: z.ZodString;
|
|
2287
|
+
chars: z.ZodNumber;
|
|
2288
|
+
tokens_est: z.ZodNumber;
|
|
2289
|
+
}, "strip", z.ZodTypeAny, {
|
|
2290
|
+
name: string;
|
|
2291
|
+
chars: number;
|
|
2292
|
+
tokens_est: number;
|
|
2293
|
+
}, {
|
|
2294
|
+
name: string;
|
|
2295
|
+
chars: number;
|
|
2296
|
+
tokens_est: number;
|
|
2297
|
+
}>, "many">>;
|
|
2254
2298
|
}, "strip", z.ZodTypeAny, {
|
|
2255
2299
|
input_tokens: number;
|
|
2256
2300
|
output_tokens: number;
|
|
2257
2301
|
cache_read_tokens?: number | undefined;
|
|
2258
2302
|
cache_creation_tokens?: number | undefined;
|
|
2259
2303
|
rounds?: number | undefined;
|
|
2304
|
+
blocks?: {
|
|
2305
|
+
name: string;
|
|
2306
|
+
chars: number;
|
|
2307
|
+
tokens_est: number;
|
|
2308
|
+
}[] | undefined;
|
|
2260
2309
|
}, {
|
|
2261
2310
|
input_tokens: number;
|
|
2262
2311
|
output_tokens: number;
|
|
2263
2312
|
cache_read_tokens?: number | undefined;
|
|
2264
2313
|
cache_creation_tokens?: number | undefined;
|
|
2265
2314
|
rounds?: number | undefined;
|
|
2315
|
+
blocks?: {
|
|
2316
|
+
name: string;
|
|
2317
|
+
chars: number;
|
|
2318
|
+
tokens_est: number;
|
|
2319
|
+
}[] | undefined;
|
|
2266
2320
|
}>;
|
|
2267
2321
|
/** Veredito do juiz sobre um achado automatico revalidavel (lote 9). */
|
|
2268
2322
|
export declare const zCsqJudgeRevalidationSchema: z.ZodObject<{
|
|
@@ -6808,18 +6862,41 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
|
|
|
6808
6862
|
cache_read_tokens: z.ZodOptional<z.ZodNumber>;
|
|
6809
6863
|
cache_creation_tokens: z.ZodOptional<z.ZodNumber>;
|
|
6810
6864
|
rounds: z.ZodOptional<z.ZodNumber>;
|
|
6865
|
+
blocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
6866
|
+
name: z.ZodString;
|
|
6867
|
+
chars: z.ZodNumber;
|
|
6868
|
+
tokens_est: z.ZodNumber;
|
|
6869
|
+
}, "strip", z.ZodTypeAny, {
|
|
6870
|
+
name: string;
|
|
6871
|
+
chars: number;
|
|
6872
|
+
tokens_est: number;
|
|
6873
|
+
}, {
|
|
6874
|
+
name: string;
|
|
6875
|
+
chars: number;
|
|
6876
|
+
tokens_est: number;
|
|
6877
|
+
}>, "many">>;
|
|
6811
6878
|
}, "strip", z.ZodTypeAny, {
|
|
6812
6879
|
input_tokens: number;
|
|
6813
6880
|
output_tokens: number;
|
|
6814
6881
|
cache_read_tokens?: number | undefined;
|
|
6815
6882
|
cache_creation_tokens?: number | undefined;
|
|
6816
6883
|
rounds?: number | undefined;
|
|
6884
|
+
blocks?: {
|
|
6885
|
+
name: string;
|
|
6886
|
+
chars: number;
|
|
6887
|
+
tokens_est: number;
|
|
6888
|
+
}[] | undefined;
|
|
6817
6889
|
}, {
|
|
6818
6890
|
input_tokens: number;
|
|
6819
6891
|
output_tokens: number;
|
|
6820
6892
|
cache_read_tokens?: number | undefined;
|
|
6821
6893
|
cache_creation_tokens?: number | undefined;
|
|
6822
6894
|
rounds?: number | undefined;
|
|
6895
|
+
blocks?: {
|
|
6896
|
+
name: string;
|
|
6897
|
+
chars: number;
|
|
6898
|
+
tokens_est: number;
|
|
6899
|
+
}[] | undefined;
|
|
6823
6900
|
}>>;
|
|
6824
6901
|
cost_usd_est: z.ZodNullable<z.ZodNumber>;
|
|
6825
6902
|
llm_provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -6835,6 +6912,8 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
|
|
|
6835
6912
|
alerts_critical: z.ZodNumber;
|
|
6836
6913
|
alerts_new: z.ZodNumber;
|
|
6837
6914
|
alerts_resolved: z.ZodNumber;
|
|
6915
|
+
judge: z.ZodOptional<z.ZodEnum<["judged", "skipped"]>>;
|
|
6916
|
+
triage_reasons: z.ZodOptional<z.ZodArray<z.ZodEnum<["document_only", "spam_close", "reopen_without_new_messages", "automation_only", "ack_only", "forced"]>, "many">>;
|
|
6838
6917
|
}, "strip", z.ZodTypeAny, {
|
|
6839
6918
|
status: "Excelente" | "Bom" | "Regular" | "Ruim" | "Crítico" | "pending_judge";
|
|
6840
6919
|
ticket_id: string;
|
|
@@ -6844,6 +6923,8 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
|
|
|
6844
6923
|
alerts_critical: number;
|
|
6845
6924
|
alerts_new: number;
|
|
6846
6925
|
alerts_resolved: number;
|
|
6926
|
+
judge?: "judged" | "skipped" | undefined;
|
|
6927
|
+
triage_reasons?: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "forced")[] | undefined;
|
|
6847
6928
|
}, {
|
|
6848
6929
|
status: "Excelente" | "Bom" | "Regular" | "Ruim" | "Crítico" | "pending_judge";
|
|
6849
6930
|
ticket_id: string;
|
|
@@ -6853,8 +6934,21 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
|
|
|
6853
6934
|
alerts_resolved: number;
|
|
6854
6935
|
evaluated_at?: unknown;
|
|
6855
6936
|
closed_at?: unknown;
|
|
6937
|
+
judge?: "judged" | "skipped" | undefined;
|
|
6938
|
+
triage_reasons?: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "forced")[] | undefined;
|
|
6856
6939
|
}>, "many">;
|
|
6857
6940
|
judge_error: z.ZodOptional<z.ZodString>;
|
|
6941
|
+
triage: z.ZodOptional<z.ZodObject<{
|
|
6942
|
+
mode: z.ZodEnum<["skip_llm", "full_review"]>;
|
|
6943
|
+
reasons: z.ZodArray<z.ZodEnum<["document_only", "spam_close", "reopen_without_new_messages", "automation_only", "ack_only", "forced"]>, "many">;
|
|
6944
|
+
}, "strip", z.ZodTypeAny, {
|
|
6945
|
+
mode: "skip_llm" | "full_review";
|
|
6946
|
+
reasons: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "forced")[];
|
|
6947
|
+
}, {
|
|
6948
|
+
mode: "skip_llm" | "full_review";
|
|
6949
|
+
reasons: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "forced")[];
|
|
6950
|
+
}>>;
|
|
6951
|
+
judge_skipped_reasons: z.ZodOptional<z.ZodArray<z.ZodEnum<["document_only", "spam_close", "reopen_without_new_messages", "automation_only", "ack_only", "forced"]>, "many">>;
|
|
6858
6952
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
6859
6953
|
id: z.ZodString;
|
|
6860
6954
|
ref: z.ZodAny;
|
|
@@ -8930,18 +9024,41 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
|
|
|
8930
9024
|
cache_read_tokens: z.ZodOptional<z.ZodNumber>;
|
|
8931
9025
|
cache_creation_tokens: z.ZodOptional<z.ZodNumber>;
|
|
8932
9026
|
rounds: z.ZodOptional<z.ZodNumber>;
|
|
9027
|
+
blocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
9028
|
+
name: z.ZodString;
|
|
9029
|
+
chars: z.ZodNumber;
|
|
9030
|
+
tokens_est: z.ZodNumber;
|
|
9031
|
+
}, "strip", z.ZodTypeAny, {
|
|
9032
|
+
name: string;
|
|
9033
|
+
chars: number;
|
|
9034
|
+
tokens_est: number;
|
|
9035
|
+
}, {
|
|
9036
|
+
name: string;
|
|
9037
|
+
chars: number;
|
|
9038
|
+
tokens_est: number;
|
|
9039
|
+
}>, "many">>;
|
|
8933
9040
|
}, "strip", z.ZodTypeAny, {
|
|
8934
9041
|
input_tokens: number;
|
|
8935
9042
|
output_tokens: number;
|
|
8936
9043
|
cache_read_tokens?: number | undefined;
|
|
8937
9044
|
cache_creation_tokens?: number | undefined;
|
|
8938
9045
|
rounds?: number | undefined;
|
|
9046
|
+
blocks?: {
|
|
9047
|
+
name: string;
|
|
9048
|
+
chars: number;
|
|
9049
|
+
tokens_est: number;
|
|
9050
|
+
}[] | undefined;
|
|
8939
9051
|
}, {
|
|
8940
9052
|
input_tokens: number;
|
|
8941
9053
|
output_tokens: number;
|
|
8942
9054
|
cache_read_tokens?: number | undefined;
|
|
8943
9055
|
cache_creation_tokens?: number | undefined;
|
|
8944
9056
|
rounds?: number | undefined;
|
|
9057
|
+
blocks?: {
|
|
9058
|
+
name: string;
|
|
9059
|
+
chars: number;
|
|
9060
|
+
tokens_est: number;
|
|
9061
|
+
}[] | undefined;
|
|
8945
9062
|
}>>;
|
|
8946
9063
|
cost_usd_est: z.ZodNullable<z.ZodNumber>;
|
|
8947
9064
|
llm_provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -8957,6 +9074,8 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
|
|
|
8957
9074
|
alerts_critical: z.ZodNumber;
|
|
8958
9075
|
alerts_new: z.ZodNumber;
|
|
8959
9076
|
alerts_resolved: z.ZodNumber;
|
|
9077
|
+
judge: z.ZodOptional<z.ZodEnum<["judged", "skipped"]>>;
|
|
9078
|
+
triage_reasons: z.ZodOptional<z.ZodArray<z.ZodEnum<["document_only", "spam_close", "reopen_without_new_messages", "automation_only", "ack_only", "forced"]>, "many">>;
|
|
8960
9079
|
}, "strip", z.ZodTypeAny, {
|
|
8961
9080
|
status: "Excelente" | "Bom" | "Regular" | "Ruim" | "Crítico" | "pending_judge";
|
|
8962
9081
|
ticket_id: string;
|
|
@@ -8966,6 +9085,8 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
|
|
|
8966
9085
|
alerts_critical: number;
|
|
8967
9086
|
alerts_new: number;
|
|
8968
9087
|
alerts_resolved: number;
|
|
9088
|
+
judge?: "judged" | "skipped" | undefined;
|
|
9089
|
+
triage_reasons?: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "forced")[] | undefined;
|
|
8969
9090
|
}, {
|
|
8970
9091
|
status: "Excelente" | "Bom" | "Regular" | "Ruim" | "Crítico" | "pending_judge";
|
|
8971
9092
|
ticket_id: string;
|
|
@@ -8975,8 +9096,21 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
|
|
|
8975
9096
|
alerts_resolved: number;
|
|
8976
9097
|
evaluated_at?: unknown;
|
|
8977
9098
|
closed_at?: unknown;
|
|
9099
|
+
judge?: "judged" | "skipped" | undefined;
|
|
9100
|
+
triage_reasons?: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "forced")[] | undefined;
|
|
8978
9101
|
}>, "many">;
|
|
8979
9102
|
judge_error: z.ZodOptional<z.ZodString>;
|
|
9103
|
+
triage: z.ZodOptional<z.ZodObject<{
|
|
9104
|
+
mode: z.ZodEnum<["skip_llm", "full_review"]>;
|
|
9105
|
+
reasons: z.ZodArray<z.ZodEnum<["document_only", "spam_close", "reopen_without_new_messages", "automation_only", "ack_only", "forced"]>, "many">;
|
|
9106
|
+
}, "strip", z.ZodTypeAny, {
|
|
9107
|
+
mode: "skip_llm" | "full_review";
|
|
9108
|
+
reasons: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "forced")[];
|
|
9109
|
+
}, {
|
|
9110
|
+
mode: "skip_llm" | "full_review";
|
|
9111
|
+
reasons: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "forced")[];
|
|
9112
|
+
}>>;
|
|
9113
|
+
judge_skipped_reasons: z.ZodOptional<z.ZodArray<z.ZodEnum<["document_only", "spam_close", "reopen_without_new_messages", "automation_only", "ack_only", "forced"]>, "many">>;
|
|
8980
9114
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
8981
9115
|
id: z.ZodString;
|
|
8982
9116
|
ref: z.ZodAny;
|
|
@@ -11052,18 +11186,41 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
|
|
|
11052
11186
|
cache_read_tokens: z.ZodOptional<z.ZodNumber>;
|
|
11053
11187
|
cache_creation_tokens: z.ZodOptional<z.ZodNumber>;
|
|
11054
11188
|
rounds: z.ZodOptional<z.ZodNumber>;
|
|
11189
|
+
blocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
11190
|
+
name: z.ZodString;
|
|
11191
|
+
chars: z.ZodNumber;
|
|
11192
|
+
tokens_est: z.ZodNumber;
|
|
11193
|
+
}, "strip", z.ZodTypeAny, {
|
|
11194
|
+
name: string;
|
|
11195
|
+
chars: number;
|
|
11196
|
+
tokens_est: number;
|
|
11197
|
+
}, {
|
|
11198
|
+
name: string;
|
|
11199
|
+
chars: number;
|
|
11200
|
+
tokens_est: number;
|
|
11201
|
+
}>, "many">>;
|
|
11055
11202
|
}, "strip", z.ZodTypeAny, {
|
|
11056
11203
|
input_tokens: number;
|
|
11057
11204
|
output_tokens: number;
|
|
11058
11205
|
cache_read_tokens?: number | undefined;
|
|
11059
11206
|
cache_creation_tokens?: number | undefined;
|
|
11060
11207
|
rounds?: number | undefined;
|
|
11208
|
+
blocks?: {
|
|
11209
|
+
name: string;
|
|
11210
|
+
chars: number;
|
|
11211
|
+
tokens_est: number;
|
|
11212
|
+
}[] | undefined;
|
|
11061
11213
|
}, {
|
|
11062
11214
|
input_tokens: number;
|
|
11063
11215
|
output_tokens: number;
|
|
11064
11216
|
cache_read_tokens?: number | undefined;
|
|
11065
11217
|
cache_creation_tokens?: number | undefined;
|
|
11066
11218
|
rounds?: number | undefined;
|
|
11219
|
+
blocks?: {
|
|
11220
|
+
name: string;
|
|
11221
|
+
chars: number;
|
|
11222
|
+
tokens_est: number;
|
|
11223
|
+
}[] | undefined;
|
|
11067
11224
|
}>>;
|
|
11068
11225
|
cost_usd_est: z.ZodNullable<z.ZodNumber>;
|
|
11069
11226
|
llm_provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -11079,6 +11236,8 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
|
|
|
11079
11236
|
alerts_critical: z.ZodNumber;
|
|
11080
11237
|
alerts_new: z.ZodNumber;
|
|
11081
11238
|
alerts_resolved: z.ZodNumber;
|
|
11239
|
+
judge: z.ZodOptional<z.ZodEnum<["judged", "skipped"]>>;
|
|
11240
|
+
triage_reasons: z.ZodOptional<z.ZodArray<z.ZodEnum<["document_only", "spam_close", "reopen_without_new_messages", "automation_only", "ack_only", "forced"]>, "many">>;
|
|
11082
11241
|
}, "strip", z.ZodTypeAny, {
|
|
11083
11242
|
status: "Excelente" | "Bom" | "Regular" | "Ruim" | "Crítico" | "pending_judge";
|
|
11084
11243
|
ticket_id: string;
|
|
@@ -11088,6 +11247,8 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
|
|
|
11088
11247
|
alerts_critical: number;
|
|
11089
11248
|
alerts_new: number;
|
|
11090
11249
|
alerts_resolved: number;
|
|
11250
|
+
judge?: "judged" | "skipped" | undefined;
|
|
11251
|
+
triage_reasons?: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "forced")[] | undefined;
|
|
11091
11252
|
}, {
|
|
11092
11253
|
status: "Excelente" | "Bom" | "Regular" | "Ruim" | "Crítico" | "pending_judge";
|
|
11093
11254
|
ticket_id: string;
|
|
@@ -11097,6 +11258,19 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
|
|
|
11097
11258
|
alerts_resolved: number;
|
|
11098
11259
|
evaluated_at?: unknown;
|
|
11099
11260
|
closed_at?: unknown;
|
|
11261
|
+
judge?: "judged" | "skipped" | undefined;
|
|
11262
|
+
triage_reasons?: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "forced")[] | undefined;
|
|
11100
11263
|
}>, "many">;
|
|
11101
11264
|
judge_error: z.ZodOptional<z.ZodString>;
|
|
11265
|
+
triage: z.ZodOptional<z.ZodObject<{
|
|
11266
|
+
mode: z.ZodEnum<["skip_llm", "full_review"]>;
|
|
11267
|
+
reasons: z.ZodArray<z.ZodEnum<["document_only", "spam_close", "reopen_without_new_messages", "automation_only", "ack_only", "forced"]>, "many">;
|
|
11268
|
+
}, "strip", z.ZodTypeAny, {
|
|
11269
|
+
mode: "skip_llm" | "full_review";
|
|
11270
|
+
reasons: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "forced")[];
|
|
11271
|
+
}, {
|
|
11272
|
+
mode: "skip_llm" | "full_review";
|
|
11273
|
+
reasons: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "forced")[];
|
|
11274
|
+
}>>;
|
|
11275
|
+
judge_skipped_reasons: z.ZodOptional<z.ZodArray<z.ZodEnum<["document_only", "spam_close", "reopen_without_new_messages", "automation_only", "ack_only", "forced"]>, "many">>;
|
|
11102
11276
|
}, z.ZodTypeAny, "passthrough">>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.zCsqLeadReportSchema = exports.zCsqRunSchema = exports.zCsqAlertCountsSchema = exports.zCsqEligibilitySchema = exports.zCsqEvaluatedForSchema = exports.zCsqReportHeaderSchema = exports.zCsqReportAttendantSchema = exports.zCsqReportPatientSchema = exports.zCsqReportLeadSchema = exports.zCsqSystemFactsSchema = exports.zCsqBillingFactSchema = exports.zCsqPreviousTicketFactSchema = exports.zCsqOverlapFactSchema = exports.zCsqOverlapFamilyHintsSchema = exports.zCsqOverlapAppointmentFactSchema = exports.zCsqAppointmentFactSchema = exports.zCsqJudgeOutputSchema = void 0;
|
|
3
|
+
exports.zCsqTicketSummarySchema = exports.zCsqTrailEntrySchema = exports.zCsqPromptBlockUsageSchema = exports.zCsqTriageDecisionSchema = exports.zCsqTriageReasonSchema = exports.zCsqTriageModeSchema = exports.zCsqReviewSchema = exports.zCsqDataQualitySchema = exports.zCsqCoverageSchema = exports.zCsqContributorSchema = exports.zCsqEvaluationSchema = exports.zCsqPillarScoreSchema = exports.zCsqPillarCoverageSchema = exports.zCsqCriterionScoreSchema = exports.zCsqCrossCheckSchema = exports.zCsqClaimTypeSchema = exports.zCsqClaimSchema = exports.zCsqClaimPriceInformedSchema = exports.zCsqClaimPatientStatusSchema = exports.zCsqClaimFirstConcreteOfferSchema = exports.zCsqClaimQuestionRequiresAnswerSchema = exports.zCsqClaimOutcomeSchema = exports.zCsqClaimRequiredDataSchema = exports.zCsqClaimDataCollectedSchema = exports.zCsqClaimPromiseSchema = exports.zCsqClaimAppointmentInformedSchema = exports.zCsqLeadStateSchema = exports.zCsqLeadStateListFieldSchema = exports.zCsqLeadStateFieldSchema = exports.zCsqIndicatorsSchema = exports.zCsqIndicatorsSetSchema = exports.zCsqAlertSchema = exports.zCsqEvidenceSchema = exports.zCsqAlertSubtypeSchema = exports.zCsqAlertCodeSchema = exports.zCsqPillarCodeSchema = exports.zCsqCriterionScoreValueSchema = exports.zCsqAuthorKindSchema = exports.zCsqReviewVerdictSchema = exports.zCsqLlmConnectionSourceSchema = exports.zCsqPhaseSchema = exports.zCsqRunStatusSchema = exports.zCsqVerificationStateSchema = exports.zCsqAlertResolvedReasonSchema = exports.zCsqAlertLifecycleSchema = exports.zCsqAlertScopeSchema = exports.zCsqAlertSourceSchema = exports.zCsqSeveritySchema = exports.zCsqStatusSchema = exports.zCsqModeSchema = void 0;
|
|
4
|
+
exports.zCsqLeadReportSchema = exports.zCsqRunSchema = exports.zCsqAlertCountsSchema = exports.zCsqEligibilitySchema = exports.zCsqEvaluatedForSchema = exports.zCsqReportHeaderSchema = exports.zCsqReportAttendantSchema = exports.zCsqReportPatientSchema = exports.zCsqReportLeadSchema = exports.zCsqSystemFactsSchema = exports.zCsqBillingFactSchema = exports.zCsqPreviousTicketFactSchema = exports.zCsqOverlapFactSchema = exports.zCsqOverlapFamilyHintsSchema = exports.zCsqOverlapAppointmentFactSchema = exports.zCsqAppointmentFactSchema = exports.zCsqJudgeOutputSchema = exports.zCsqJudgeResolvedAlertSchema = exports.zCsqJudgeRevalidationSchema = exports.zCsqLlmUsageSchema = exports.zCsqTranscriptMessageSchema = void 0;
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
const zod_schemas_1 = require("../shared/zod-schemas");
|
|
7
7
|
// Schemas zod do CSQ 2.0 (feat-154). As interfaces TS equivalentes ficam em
|
|
@@ -351,6 +351,25 @@ exports.zCsqReviewSchema = zod_1.z.object({
|
|
|
351
351
|
reviewed_at: zod_schemas_1.zFirestoreDateSchema,
|
|
352
352
|
});
|
|
353
353
|
// ───────── Trilha e denormalizacao ─────────
|
|
354
|
+
// ───────── Triagem sem LLM (feat-206 F1) ─────────
|
|
355
|
+
exports.zCsqTriageModeSchema = zod_1.z.enum(["skip_llm", "full_review"]);
|
|
356
|
+
exports.zCsqTriageReasonSchema = zod_1.z.enum([
|
|
357
|
+
"document_only",
|
|
358
|
+
"spam_close",
|
|
359
|
+
"reopen_without_new_messages",
|
|
360
|
+
"automation_only",
|
|
361
|
+
"ack_only",
|
|
362
|
+
"forced",
|
|
363
|
+
]);
|
|
364
|
+
exports.zCsqTriageDecisionSchema = zod_1.z.object({
|
|
365
|
+
mode: exports.zCsqTriageModeSchema,
|
|
366
|
+
reasons: zod_1.z.array(exports.zCsqTriageReasonSchema),
|
|
367
|
+
});
|
|
368
|
+
exports.zCsqPromptBlockUsageSchema = zod_1.z.object({
|
|
369
|
+
name: zod_1.z.string(),
|
|
370
|
+
chars: zod_1.z.number(),
|
|
371
|
+
tokens_est: zod_1.z.number(),
|
|
372
|
+
});
|
|
354
373
|
exports.zCsqTrailEntrySchema = zod_1.z.object({
|
|
355
374
|
ticket_id: zod_1.z.string(),
|
|
356
375
|
closed_at: zod_schemas_1.zFirestoreDateSchema,
|
|
@@ -360,6 +379,8 @@ exports.zCsqTrailEntrySchema = zod_1.z.object({
|
|
|
360
379
|
alerts_critical: zod_1.z.number(),
|
|
361
380
|
alerts_new: zod_1.z.number(),
|
|
362
381
|
alerts_resolved: zod_1.z.number(),
|
|
382
|
+
judge: zod_1.z.enum(["judged", "skipped"]).optional(),
|
|
383
|
+
triage_reasons: zod_1.z.array(exports.zCsqTriageReasonSchema).optional(),
|
|
363
384
|
});
|
|
364
385
|
/** Resumo denormalizado gravado em `ticket.csq`. */
|
|
365
386
|
exports.zCsqTicketSummarySchema = zod_1.z.object({
|
|
@@ -388,6 +409,7 @@ exports.zCsqLlmUsageSchema = zod_1.z.object({
|
|
|
388
409
|
cache_read_tokens: zod_1.z.number().optional(),
|
|
389
410
|
cache_creation_tokens: zod_1.z.number().optional(),
|
|
390
411
|
rounds: zod_1.z.number().optional(),
|
|
412
|
+
blocks: zod_1.z.array(exports.zCsqPromptBlockUsageSchema).optional(),
|
|
391
413
|
});
|
|
392
414
|
/** Veredito do juiz sobre um achado automatico revalidavel (lote 9). */
|
|
393
415
|
exports.zCsqJudgeRevalidationSchema = zod_1.z.object({
|
|
@@ -603,5 +625,7 @@ exports.zCsqLeadReportSchema = zod_schemas_1.zFireDocSchema
|
|
|
603
625
|
llm_connection_source: exports.zCsqLlmConnectionSourceSchema.nullable().optional(),
|
|
604
626
|
trail: zod_1.z.array(exports.zCsqTrailEntrySchema),
|
|
605
627
|
judge_error: zod_1.z.string().optional(),
|
|
628
|
+
triage: exports.zCsqTriageDecisionSchema.optional(),
|
|
629
|
+
judge_skipped_reasons: zod_1.z.array(exports.zCsqTriageReasonSchema).optional(),
|
|
606
630
|
})
|
|
607
631
|
.passthrough();
|
|
@@ -404,6 +404,30 @@ export const zCsqReviewSchema = z.object({
|
|
|
404
404
|
|
|
405
405
|
// ───────── Trilha e denormalizacao ─────────
|
|
406
406
|
|
|
407
|
+
// ───────── Triagem sem LLM (feat-206 F1) ─────────
|
|
408
|
+
|
|
409
|
+
export const zCsqTriageModeSchema = z.enum(["skip_llm", "full_review"]);
|
|
410
|
+
|
|
411
|
+
export const zCsqTriageReasonSchema = z.enum([
|
|
412
|
+
"document_only",
|
|
413
|
+
"spam_close",
|
|
414
|
+
"reopen_without_new_messages",
|
|
415
|
+
"automation_only",
|
|
416
|
+
"ack_only",
|
|
417
|
+
"forced",
|
|
418
|
+
]);
|
|
419
|
+
|
|
420
|
+
export const zCsqTriageDecisionSchema = z.object({
|
|
421
|
+
mode: zCsqTriageModeSchema,
|
|
422
|
+
reasons: z.array(zCsqTriageReasonSchema),
|
|
423
|
+
});
|
|
424
|
+
|
|
425
|
+
export const zCsqPromptBlockUsageSchema = z.object({
|
|
426
|
+
name: z.string(),
|
|
427
|
+
chars: z.number(),
|
|
428
|
+
tokens_est: z.number(),
|
|
429
|
+
});
|
|
430
|
+
|
|
407
431
|
export const zCsqTrailEntrySchema = z.object({
|
|
408
432
|
ticket_id: z.string(),
|
|
409
433
|
closed_at: zFirestoreDateSchema,
|
|
@@ -413,6 +437,8 @@ export const zCsqTrailEntrySchema = z.object({
|
|
|
413
437
|
alerts_critical: z.number(),
|
|
414
438
|
alerts_new: z.number(),
|
|
415
439
|
alerts_resolved: z.number(),
|
|
440
|
+
judge: z.enum(["judged", "skipped"]).optional(),
|
|
441
|
+
triage_reasons: z.array(zCsqTriageReasonSchema).optional(),
|
|
416
442
|
});
|
|
417
443
|
|
|
418
444
|
/** Resumo denormalizado gravado em `ticket.csq`. */
|
|
@@ -446,6 +472,7 @@ export const zCsqLlmUsageSchema = z.object({
|
|
|
446
472
|
cache_read_tokens: z.number().optional(),
|
|
447
473
|
cache_creation_tokens: z.number().optional(),
|
|
448
474
|
rounds: z.number().optional(),
|
|
475
|
+
blocks: z.array(zCsqPromptBlockUsageSchema).optional(),
|
|
449
476
|
});
|
|
450
477
|
|
|
451
478
|
/** Veredito do juiz sobre um achado automatico revalidavel (lote 9). */
|
|
@@ -690,5 +717,7 @@ export const zCsqLeadReportSchema = zFireDocSchema
|
|
|
690
717
|
llm_connection_source: zCsqLlmConnectionSourceSchema.nullable().optional(),
|
|
691
718
|
trail: z.array(zCsqTrailEntrySchema),
|
|
692
719
|
judge_error: z.string().optional(),
|
|
720
|
+
triage: zCsqTriageDecisionSchema.optional(),
|
|
721
|
+
judge_skipped_reasons: z.array(zCsqTriageReasonSchema).optional(),
|
|
693
722
|
})
|
|
694
723
|
.passthrough();
|
|
@@ -417,6 +417,24 @@ export interface ICsqReview {
|
|
|
417
417
|
reviewer_login_id: string;
|
|
418
418
|
reviewed_at: Date;
|
|
419
419
|
}
|
|
420
|
+
/** Modo decidido pela triagem deterministica antes do prompt. Os modos
|
|
421
|
+
* intermediarios ficam para a F3/F4. */
|
|
422
|
+
export type CsqTriageMode = "skip_llm" | "full_review";
|
|
423
|
+
/** Motivo da triagem. `skip_llm` sempre tem motivo; `full_review` normalmente
|
|
424
|
+
* nao tem (lista vazia), salvo `forced` (replay do dry-run com
|
|
425
|
+
* `--force-review`; producao nunca usa). */
|
|
426
|
+
export type CsqTriageReason = "document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "forced";
|
|
427
|
+
export interface ICsqTriageDecision {
|
|
428
|
+
mode: CsqTriageMode;
|
|
429
|
+
reasons: CsqTriageReason[];
|
|
430
|
+
}
|
|
431
|
+
/** Tamanho de um bloco do prompt do juiz. `tokens_est` e estimativa
|
|
432
|
+
* deterministica (chars / 3,6), nao contagem do tokenizer. */
|
|
433
|
+
export interface ICsqPromptBlockUsage {
|
|
434
|
+
name: string;
|
|
435
|
+
chars: number;
|
|
436
|
+
tokens_est: number;
|
|
437
|
+
}
|
|
420
438
|
/** Entrada da trilha do lead (so tendencia; a serie completa vai para o BQ). */
|
|
421
439
|
export interface ICsqTrailEntry {
|
|
422
440
|
ticket_id: string;
|
|
@@ -427,6 +445,10 @@ export interface ICsqTrailEntry {
|
|
|
427
445
|
alerts_critical: number;
|
|
428
446
|
alerts_new: number;
|
|
429
447
|
alerts_resolved: number;
|
|
448
|
+
/** feat-206: `skipped` = triagem pulou o juiz; score/status sao os do laudo
|
|
449
|
+
* anterior. Ausente em entradas antigas e na F0. */
|
|
450
|
+
judge?: "judged" | "skipped";
|
|
451
|
+
triage_reasons?: CsqTriageReason[];
|
|
430
452
|
}
|
|
431
453
|
/** Resumo denormalizado gravado em `ticket.csq` (fila e listagem do Omni). */
|
|
432
454
|
export interface ICsqTicketSummary {
|
|
@@ -457,6 +479,8 @@ export interface ICsqLlmUsage {
|
|
|
457
479
|
cache_creation_tokens?: number;
|
|
458
480
|
/** Tentativas gastas. Contrato: <= 2 (1 retry por falha de schema). */
|
|
459
481
|
rounds?: number;
|
|
482
|
+
/** feat-206: tamanho por bloco do prompt (system, user e schema da tool). */
|
|
483
|
+
blocks?: ICsqPromptBlockUsage[];
|
|
460
484
|
}
|
|
461
485
|
/** Veredito do juiz sobre um achado automatico revalidavel (lote 9). O codigo
|
|
462
486
|
* so aplica `dismiss` a codigos da allowlist de revalidacao. */
|
|
@@ -714,4 +738,9 @@ export interface ICsqLeadReport extends IFireDoc {
|
|
|
714
738
|
llm_connection_source?: CsqLlmConnectionSource | null;
|
|
715
739
|
trail: ICsqTrailEntry[];
|
|
716
740
|
judge_error?: string;
|
|
741
|
+
/** feat-206: decisao da triagem do ticket avaliado (so F1). */
|
|
742
|
+
triage?: ICsqTriageDecision;
|
|
743
|
+
/** feat-206: presente quando o ULTIMO ticket nao passou pelo juiz. A avaliacao
|
|
744
|
+
* (score, pilares, criterios), `model` e `llm_usage` sao do ultimo juiz. */
|
|
745
|
+
judge_skipped_reasons?: CsqTriageReason[];
|
|
717
746
|
}
|
|
@@ -665,6 +665,36 @@ export interface ICsqReview {
|
|
|
665
665
|
|
|
666
666
|
// ───────── Trilha e denormalizacao ─────────
|
|
667
667
|
|
|
668
|
+
// ───────── Triagem sem LLM (feat-206 F1) ─────────
|
|
669
|
+
|
|
670
|
+
/** Modo decidido pela triagem deterministica antes do prompt. Os modos
|
|
671
|
+
* intermediarios ficam para a F3/F4. */
|
|
672
|
+
export type CsqTriageMode = "skip_llm" | "full_review";
|
|
673
|
+
|
|
674
|
+
/** Motivo da triagem. `skip_llm` sempre tem motivo; `full_review` normalmente
|
|
675
|
+
* nao tem (lista vazia), salvo `forced` (replay do dry-run com
|
|
676
|
+
* `--force-review`; producao nunca usa). */
|
|
677
|
+
export type CsqTriageReason =
|
|
678
|
+
| "document_only"
|
|
679
|
+
| "spam_close"
|
|
680
|
+
| "reopen_without_new_messages"
|
|
681
|
+
| "automation_only"
|
|
682
|
+
| "ack_only"
|
|
683
|
+
| "forced";
|
|
684
|
+
|
|
685
|
+
export interface ICsqTriageDecision {
|
|
686
|
+
mode: CsqTriageMode;
|
|
687
|
+
reasons: CsqTriageReason[];
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
/** Tamanho de um bloco do prompt do juiz. `tokens_est` e estimativa
|
|
691
|
+
* deterministica (chars / 3,6), nao contagem do tokenizer. */
|
|
692
|
+
export interface ICsqPromptBlockUsage {
|
|
693
|
+
name: string;
|
|
694
|
+
chars: number;
|
|
695
|
+
tokens_est: number;
|
|
696
|
+
}
|
|
697
|
+
|
|
668
698
|
/** Entrada da trilha do lead (so tendencia; a serie completa vai para o BQ). */
|
|
669
699
|
export interface ICsqTrailEntry {
|
|
670
700
|
ticket_id: string;
|
|
@@ -675,6 +705,10 @@ export interface ICsqTrailEntry {
|
|
|
675
705
|
alerts_critical: number;
|
|
676
706
|
alerts_new: number;
|
|
677
707
|
alerts_resolved: number;
|
|
708
|
+
/** feat-206: `skipped` = triagem pulou o juiz; score/status sao os do laudo
|
|
709
|
+
* anterior. Ausente em entradas antigas e na F0. */
|
|
710
|
+
judge?: "judged" | "skipped";
|
|
711
|
+
triage_reasons?: CsqTriageReason[];
|
|
678
712
|
}
|
|
679
713
|
|
|
680
714
|
/** Resumo denormalizado gravado em `ticket.csq` (fila e listagem do Omni). */
|
|
@@ -712,6 +746,8 @@ export interface ICsqLlmUsage {
|
|
|
712
746
|
cache_creation_tokens?: number;
|
|
713
747
|
/** Tentativas gastas. Contrato: <= 2 (1 retry por falha de schema). */
|
|
714
748
|
rounds?: number;
|
|
749
|
+
/** feat-206: tamanho por bloco do prompt (system, user e schema da tool). */
|
|
750
|
+
blocks?: ICsqPromptBlockUsage[];
|
|
715
751
|
}
|
|
716
752
|
|
|
717
753
|
/** Veredito do juiz sobre um achado automatico revalidavel (lote 9). O codigo
|
|
@@ -999,4 +1035,9 @@ export interface ICsqLeadReport extends IFireDoc {
|
|
|
999
1035
|
llm_connection_source?: CsqLlmConnectionSource | null;
|
|
1000
1036
|
trail: ICsqTrailEntry[];
|
|
1001
1037
|
judge_error?: string;
|
|
1038
|
+
/** feat-206: decisao da triagem do ticket avaliado (so F1). */
|
|
1039
|
+
triage?: ICsqTriageDecision;
|
|
1040
|
+
/** feat-206: presente quando o ULTIMO ticket nao passou pelo juiz. A avaliacao
|
|
1041
|
+
* (score, pilares, criterios), `model` e `llm_usage` sao do ultimo juiz. */
|
|
1042
|
+
judge_skipped_reasons?: CsqTriageReason[];
|
|
1002
1043
|
}
|
|
@@ -38,6 +38,37 @@ export declare const TELEMEDICINE_WINDOW_DEFAULTS: {
|
|
|
38
38
|
readonly launch_code_ttl_minutes: 5;
|
|
39
39
|
/** Access da sessão pública do browser (`browser_session`), renovável de forma rotativa. */
|
|
40
40
|
readonly browser_session_ttl_minutes: 15;
|
|
41
|
+
/**
|
|
42
|
+
* TTL da sessão de browser enquanto a consulta está VIVA (2026-09-28).
|
|
43
|
+
*
|
|
44
|
+
* 15 min bastam antes de a consulta começar — é uma janela de preflight. Já
|
|
45
|
+
* uma consulta em andamento tem pausa, navegador que trava, notebook que
|
|
46
|
+
* dorme e aba fechada por engano, e com 15 min qualquer um desses obriga o
|
|
47
|
+
* médico a pedir um launch code NOVO no painel para voltar. 60 min cobre
|
|
48
|
+
* todos eles com folga.
|
|
49
|
+
*
|
|
50
|
+
* O risco de um cookie mais longevo é limitado pela própria consulta: toda
|
|
51
|
+
* rota da sala relê o estado clínico, e consulta terminal responde `410` — o
|
|
52
|
+
* cookie fica inerte no fim do encontro, não no fim do TTL. O teto de duração
|
|
53
|
+
* da plataforma é 1h30, então esta sessão não sobrevive a uma consulta.
|
|
54
|
+
*/
|
|
55
|
+
readonly browser_session_live_ttl_minutes: 60;
|
|
56
|
+
/**
|
|
57
|
+
* Graça para o `sid` ANTERIOR depois da rotação (2026-09-28).
|
|
58
|
+
*
|
|
59
|
+
* A sessão rotaciona trocando o cookie na resposta, então qualquer requisição
|
|
60
|
+
* em vôo no instante da troca carrega o cookie anterior — o `/session` é
|
|
61
|
+
* polado a cada 5 s, o que faz dessa corrida um evento recorrente em toda
|
|
62
|
+
* consulta longa, não uma raridade. Dentro desta janela, reusar o `sid`
|
|
63
|
+
* rotacionado NÃO é comprometimento: é aba que voltou, navegador que travou ou
|
|
64
|
+
* resposta de rotação que se perdeu no caminho.
|
|
65
|
+
*
|
|
66
|
+
* 10 min é o mesmo número de `reconnect_grace_minutes`, de propósito: é a
|
|
67
|
+
* janela em que o produto JÁ considera que a pessoa continua na mesma
|
|
68
|
+
* consulta. Um conceito, não dois. Passados os 10 min, reuso de cookie
|
|
69
|
+
* rotacionado deixa de parecer tropeço e volta a ser sinal de cópia.
|
|
70
|
+
*/
|
|
71
|
+
readonly browser_session_rotation_grace_minutes: 10;
|
|
41
72
|
/** Verificação de identidade: N falhas na janela bloqueiam o grant. */
|
|
42
73
|
readonly identity_max_failures: 5;
|
|
43
74
|
readonly identity_failure_window_minutes: 15;
|
|
@@ -71,6 +71,37 @@ exports.TELEMEDICINE_WINDOW_DEFAULTS = {
|
|
|
71
71
|
launch_code_ttl_minutes: 5,
|
|
72
72
|
/** Access da sessão pública do browser (`browser_session`), renovável de forma rotativa. */
|
|
73
73
|
browser_session_ttl_minutes: 15,
|
|
74
|
+
/**
|
|
75
|
+
* TTL da sessão de browser enquanto a consulta está VIVA (2026-09-28).
|
|
76
|
+
*
|
|
77
|
+
* 15 min bastam antes de a consulta começar — é uma janela de preflight. Já
|
|
78
|
+
* uma consulta em andamento tem pausa, navegador que trava, notebook que
|
|
79
|
+
* dorme e aba fechada por engano, e com 15 min qualquer um desses obriga o
|
|
80
|
+
* médico a pedir um launch code NOVO no painel para voltar. 60 min cobre
|
|
81
|
+
* todos eles com folga.
|
|
82
|
+
*
|
|
83
|
+
* O risco de um cookie mais longevo é limitado pela própria consulta: toda
|
|
84
|
+
* rota da sala relê o estado clínico, e consulta terminal responde `410` — o
|
|
85
|
+
* cookie fica inerte no fim do encontro, não no fim do TTL. O teto de duração
|
|
86
|
+
* da plataforma é 1h30, então esta sessão não sobrevive a uma consulta.
|
|
87
|
+
*/
|
|
88
|
+
browser_session_live_ttl_minutes: 60,
|
|
89
|
+
/**
|
|
90
|
+
* Graça para o `sid` ANTERIOR depois da rotação (2026-09-28).
|
|
91
|
+
*
|
|
92
|
+
* A sessão rotaciona trocando o cookie na resposta, então qualquer requisição
|
|
93
|
+
* em vôo no instante da troca carrega o cookie anterior — o `/session` é
|
|
94
|
+
* polado a cada 5 s, o que faz dessa corrida um evento recorrente em toda
|
|
95
|
+
* consulta longa, não uma raridade. Dentro desta janela, reusar o `sid`
|
|
96
|
+
* rotacionado NÃO é comprometimento: é aba que voltou, navegador que travou ou
|
|
97
|
+
* resposta de rotação que se perdeu no caminho.
|
|
98
|
+
*
|
|
99
|
+
* 10 min é o mesmo número de `reconnect_grace_minutes`, de propósito: é a
|
|
100
|
+
* janela em que o produto JÁ considera que a pessoa continua na mesma
|
|
101
|
+
* consulta. Um conceito, não dois. Passados os 10 min, reuso de cookie
|
|
102
|
+
* rotacionado deixa de parecer tropeço e volta a ser sinal de cópia.
|
|
103
|
+
*/
|
|
104
|
+
browser_session_rotation_grace_minutes: 10,
|
|
74
105
|
/** Verificação de identidade: N falhas na janela bloqueiam o grant. */
|
|
75
106
|
identity_max_failures: 5,
|
|
76
107
|
identity_failure_window_minutes: 15,
|
|
@@ -67,6 +67,37 @@ export const TELEMEDICINE_WINDOW_DEFAULTS = {
|
|
|
67
67
|
launch_code_ttl_minutes: 5,
|
|
68
68
|
/** Access da sessão pública do browser (`browser_session`), renovável de forma rotativa. */
|
|
69
69
|
browser_session_ttl_minutes: 15,
|
|
70
|
+
/**
|
|
71
|
+
* TTL da sessão de browser enquanto a consulta está VIVA (2026-09-28).
|
|
72
|
+
*
|
|
73
|
+
* 15 min bastam antes de a consulta começar — é uma janela de preflight. Já
|
|
74
|
+
* uma consulta em andamento tem pausa, navegador que trava, notebook que
|
|
75
|
+
* dorme e aba fechada por engano, e com 15 min qualquer um desses obriga o
|
|
76
|
+
* médico a pedir um launch code NOVO no painel para voltar. 60 min cobre
|
|
77
|
+
* todos eles com folga.
|
|
78
|
+
*
|
|
79
|
+
* O risco de um cookie mais longevo é limitado pela própria consulta: toda
|
|
80
|
+
* rota da sala relê o estado clínico, e consulta terminal responde `410` — o
|
|
81
|
+
* cookie fica inerte no fim do encontro, não no fim do TTL. O teto de duração
|
|
82
|
+
* da plataforma é 1h30, então esta sessão não sobrevive a uma consulta.
|
|
83
|
+
*/
|
|
84
|
+
browser_session_live_ttl_minutes: 60,
|
|
85
|
+
/**
|
|
86
|
+
* Graça para o `sid` ANTERIOR depois da rotação (2026-09-28).
|
|
87
|
+
*
|
|
88
|
+
* A sessão rotaciona trocando o cookie na resposta, então qualquer requisição
|
|
89
|
+
* em vôo no instante da troca carrega o cookie anterior — o `/session` é
|
|
90
|
+
* polado a cada 5 s, o que faz dessa corrida um evento recorrente em toda
|
|
91
|
+
* consulta longa, não uma raridade. Dentro desta janela, reusar o `sid`
|
|
92
|
+
* rotacionado NÃO é comprometimento: é aba que voltou, navegador que travou ou
|
|
93
|
+
* resposta de rotação que se perdeu no caminho.
|
|
94
|
+
*
|
|
95
|
+
* 10 min é o mesmo número de `reconnect_grace_minutes`, de propósito: é a
|
|
96
|
+
* janela em que o produto JÁ considera que a pessoa continua na mesma
|
|
97
|
+
* consulta. Um conceito, não dois. Passados os 10 min, reuso de cookie
|
|
98
|
+
* rotacionado deixa de parecer tropeço e volta a ser sinal de cópia.
|
|
99
|
+
*/
|
|
100
|
+
browser_session_rotation_grace_minutes: 10,
|
|
70
101
|
/** Verificação de identidade: N falhas na janela bloqueiam o grant. */
|
|
71
102
|
identity_max_failures: 5,
|
|
72
103
|
identity_failure_window_minutes: 15,
|