@speakableio/core 1.0.46 → 1.0.48

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.
@@ -118,6 +118,7 @@ interface PageActivity {
118
118
  target_text?: string;
119
119
  type: ActivityPageType;
120
120
  grading_criteria?: string;
121
+ grading_criteria_title?: string;
121
122
  scoring_type?: string;
122
123
  grading_method?: 'simple' | 'rubric' | 'manual' | 'standards_based';
123
124
  feedback_types?: FeedbackTypesCard[];
@@ -220,6 +221,7 @@ declare function useCards({ cardIds, enabled, asObject, }: {
220
221
  default_language?: string;
221
222
  target_text?: string;
222
223
  grading_criteria?: string;
224
+ grading_criteria_title?: string;
223
225
  scoring_type?: string;
224
226
  grading_method?: "simple" | "rubric" | "manual" | "standards_based";
225
227
  feedback_types?: FeedbackTypesCard[];
@@ -301,6 +303,7 @@ declare function useCreateCards(): {
301
303
  target_text?: string;
302
304
  type: ActivityPageType;
303
305
  grading_criteria?: string;
306
+ grading_criteria_title?: string;
304
307
  scoring_type?: string;
305
308
  grading_method?: "simple" | "rubric" | "manual" | "standards_based";
306
309
  feedback_types?: FeedbackTypesCard[];
@@ -388,6 +391,7 @@ declare function useGetCard({ cardId, enabled }: {
388
391
  default_language?: string;
389
392
  target_text?: string;
390
393
  grading_criteria?: string;
394
+ grading_criteria_title?: string;
391
395
  scoring_type?: string;
392
396
  grading_method?: "simple" | "rubric" | "manual" | "standards_based";
393
397
  feedback_types?: FeedbackTypesCard[];
@@ -469,6 +473,7 @@ declare const createCardRepo: () => {
469
473
  target_text?: string;
470
474
  type: ActivityPageType;
471
475
  grading_criteria?: string;
476
+ grading_criteria_title?: string;
472
477
  scoring_type?: string;
473
478
  grading_method?: "simple" | "rubric" | "manual" | "standards_based";
474
479
  feedback_types?: FeedbackTypesCard[];
@@ -543,6 +548,7 @@ declare const createCardRepo: () => {
543
548
  default_language?: string;
544
549
  target_text?: string;
545
550
  grading_criteria?: string;
551
+ grading_criteria_title?: string;
546
552
  scoring_type?: string;
547
553
  grading_method?: "simple" | "rubric" | "manual" | "standards_based";
548
554
  feedback_types?: FeedbackTypesCard[];
@@ -1400,6 +1406,7 @@ declare function createFsClientBase({ db, helpers, httpsCallable, logEvent, }: {
1400
1406
  target_text?: string;
1401
1407
  type: ActivityPageType;
1402
1408
  grading_criteria?: string;
1409
+ grading_criteria_title?: string;
1403
1410
  scoring_type?: string;
1404
1411
  grading_method?: "simple" | "rubric" | "manual" | "standards_based";
1405
1412
  feedback_types?: FeedbackTypesCard[];
@@ -1474,6 +1481,7 @@ declare function createFsClientBase({ db, helpers, httpsCallable, logEvent, }: {
1474
1481
  default_language?: string;
1475
1482
  target_text?: string;
1476
1483
  grading_criteria?: string;
1484
+ grading_criteria_title?: string;
1477
1485
  scoring_type?: string;
1478
1486
  grading_method?: "simple" | "rubric" | "manual" | "standards_based";
1479
1487
  feedback_types?: FeedbackTypesCard[];
@@ -1732,6 +1740,7 @@ declare function useActivity({ id, isAssignment, onAssignmentSubmitted, ltiData,
1732
1740
  default_language?: string;
1733
1741
  target_text?: string;
1734
1742
  grading_criteria?: string;
1743
+ grading_criteria_title?: string;
1735
1744
  scoring_type?: string;
1736
1745
  grading_method?: "simple" | "rubric" | "manual" | "standards_based";
1737
1746
  feedback_types?: FeedbackTypesCard[];
@@ -3279,6 +3288,7 @@ declare const createFsClientNative: ({ db, httpsCallable, logEvent }: FsClientPa
3279
3288
  target_text?: string;
3280
3289
  type: ActivityPageType;
3281
3290
  grading_criteria?: string;
3291
+ grading_criteria_title?: string;
3282
3292
  scoring_type?: string;
3283
3293
  grading_method?: "simple" | "rubric" | "manual" | "standards_based";
3284
3294
  feedback_types?: FeedbackTypesCard[];
@@ -3353,6 +3363,7 @@ declare const createFsClientNative: ({ db, httpsCallable, logEvent }: FsClientPa
3353
3363
  default_language?: string;
3354
3364
  target_text?: string;
3355
3365
  grading_criteria?: string;
3366
+ grading_criteria_title?: string;
3356
3367
  scoring_type?: string;
3357
3368
  grading_method?: "simple" | "rubric" | "manual" | "standards_based";
3358
3369
  feedback_types?: FeedbackTypesCard[];
@@ -118,6 +118,7 @@ interface PageActivity {
118
118
  target_text?: string;
119
119
  type: ActivityPageType;
120
120
  grading_criteria?: string;
121
+ grading_criteria_title?: string;
121
122
  scoring_type?: string;
122
123
  grading_method?: 'simple' | 'rubric' | 'manual' | 'standards_based';
123
124
  feedback_types?: FeedbackTypesCard[];
@@ -220,6 +221,7 @@ declare function useCards({ cardIds, enabled, asObject, }: {
220
221
  default_language?: string;
221
222
  target_text?: string;
222
223
  grading_criteria?: string;
224
+ grading_criteria_title?: string;
223
225
  scoring_type?: string;
224
226
  grading_method?: "simple" | "rubric" | "manual" | "standards_based";
225
227
  feedback_types?: FeedbackTypesCard[];
@@ -301,6 +303,7 @@ declare function useCreateCards(): {
301
303
  target_text?: string;
302
304
  type: ActivityPageType;
303
305
  grading_criteria?: string;
306
+ grading_criteria_title?: string;
304
307
  scoring_type?: string;
305
308
  grading_method?: "simple" | "rubric" | "manual" | "standards_based";
306
309
  feedback_types?: FeedbackTypesCard[];
@@ -388,6 +391,7 @@ declare function useGetCard({ cardId, enabled }: {
388
391
  default_language?: string;
389
392
  target_text?: string;
390
393
  grading_criteria?: string;
394
+ grading_criteria_title?: string;
391
395
  scoring_type?: string;
392
396
  grading_method?: "simple" | "rubric" | "manual" | "standards_based";
393
397
  feedback_types?: FeedbackTypesCard[];
@@ -469,6 +473,7 @@ declare const createCardRepo: () => {
469
473
  target_text?: string;
470
474
  type: ActivityPageType;
471
475
  grading_criteria?: string;
476
+ grading_criteria_title?: string;
472
477
  scoring_type?: string;
473
478
  grading_method?: "simple" | "rubric" | "manual" | "standards_based";
474
479
  feedback_types?: FeedbackTypesCard[];
@@ -543,6 +548,7 @@ declare const createCardRepo: () => {
543
548
  default_language?: string;
544
549
  target_text?: string;
545
550
  grading_criteria?: string;
551
+ grading_criteria_title?: string;
546
552
  scoring_type?: string;
547
553
  grading_method?: "simple" | "rubric" | "manual" | "standards_based";
548
554
  feedback_types?: FeedbackTypesCard[];
@@ -1400,6 +1406,7 @@ declare function createFsClientBase({ db, helpers, httpsCallable, logEvent, }: {
1400
1406
  target_text?: string;
1401
1407
  type: ActivityPageType;
1402
1408
  grading_criteria?: string;
1409
+ grading_criteria_title?: string;
1403
1410
  scoring_type?: string;
1404
1411
  grading_method?: "simple" | "rubric" | "manual" | "standards_based";
1405
1412
  feedback_types?: FeedbackTypesCard[];
@@ -1474,6 +1481,7 @@ declare function createFsClientBase({ db, helpers, httpsCallable, logEvent, }: {
1474
1481
  default_language?: string;
1475
1482
  target_text?: string;
1476
1483
  grading_criteria?: string;
1484
+ grading_criteria_title?: string;
1477
1485
  scoring_type?: string;
1478
1486
  grading_method?: "simple" | "rubric" | "manual" | "standards_based";
1479
1487
  feedback_types?: FeedbackTypesCard[];
@@ -1732,6 +1740,7 @@ declare function useActivity({ id, isAssignment, onAssignmentSubmitted, ltiData,
1732
1740
  default_language?: string;
1733
1741
  target_text?: string;
1734
1742
  grading_criteria?: string;
1743
+ grading_criteria_title?: string;
1735
1744
  scoring_type?: string;
1736
1745
  grading_method?: "simple" | "rubric" | "manual" | "standards_based";
1737
1746
  feedback_types?: FeedbackTypesCard[];
@@ -3279,6 +3288,7 @@ declare const createFsClientNative: ({ db, httpsCallable, logEvent }: FsClientPa
3279
3288
  target_text?: string;
3280
3289
  type: ActivityPageType;
3281
3290
  grading_criteria?: string;
3291
+ grading_criteria_title?: string;
3282
3292
  scoring_type?: string;
3283
3293
  grading_method?: "simple" | "rubric" | "manual" | "standards_based";
3284
3294
  feedback_types?: FeedbackTypesCard[];
@@ -3353,6 +3363,7 @@ declare const createFsClientNative: ({ db, httpsCallable, logEvent }: FsClientPa
3353
3363
  default_language?: string;
3354
3364
  target_text?: string;
3355
3365
  grading_criteria?: string;
3366
+ grading_criteria_title?: string;
3356
3367
  scoring_type?: string;
3357
3368
  grading_method?: "simple" | "rubric" | "manual" | "standards_based";
3358
3369
  feedback_types?: FeedbackTypesCard[];
@@ -2292,24 +2292,34 @@ var createSetRepo = () => {
2292
2292
  // src/utils/ai/detect-transcript-hallucionation.ts
2293
2293
  var HALLUCINATION_THRESHOLDS = {
2294
2294
  // Short repeats
2295
- MIN_CONSECUTIVE_REPEATS: 3,
2296
- MIN_WORDS_FOR_RATIO_CHECK: 10,
2295
+ MIN_CONSECUTIVE_REPEATS: 5,
2296
+ // Increased from 3 to allow phrases like "pio pio pio" or "no no no no"
2297
+ MIN_WORDS_FOR_RATIO_CHECK: 15,
2298
+ // Increased from 10 to require longer text for ratio check
2297
2299
  MAX_UNIQUE_WORDS_FOR_RATIO: 3,
2298
- MIN_REPETITION_RATIO: 3,
2300
+ MIN_REPETITION_RATIO: 4,
2301
+ // Increased from 3 to be more permissive
2299
2302
  // Phrase repeats
2300
- MIN_SENTENCE_LENGTH: 10,
2301
- MIN_CONSECUTIVE_SIMILAR_SENTENCES: 2,
2302
- MIN_SENTENCES_FOR_DUPLICATE_CHECK: 3,
2303
+ MIN_SENTENCE_LENGTH: 15,
2304
+ // Increased from 10 to avoid flagging short natural sentences
2305
+ MIN_CONSECUTIVE_SIMILAR_SENTENCES: 3,
2306
+ // Increased from 2 to allow some natural repetition
2307
+ MIN_SENTENCES_FOR_DUPLICATE_CHECK: 4,
2308
+ // Increased from 3
2303
2309
  // Cyclic patterns
2304
- MIN_CYCLE_LENGTH: 20,
2310
+ MIN_CYCLE_LENGTH: 30,
2311
+ // Increased from 20 to focus on longer patterns
2305
2312
  MIN_CYCLE_REPEATS: 3,
2306
2313
  // Entropy detection
2307
- MIN_LENGTH_FOR_ENTROPY_CHECK: 50,
2308
- MAX_ENTROPY_THRESHOLD: 2.5,
2309
- // bits per character
2314
+ MIN_LENGTH_FOR_ENTROPY_CHECK: 60,
2315
+ // Increased from 50
2316
+ MAX_ENTROPY_THRESHOLD: 2.2,
2317
+ // Decreased from 2.5 to be more strict on entropy (lower = more repetitive needed)
2310
2318
  // Similarity
2311
- SENTENCE_SIMILARITY_THRESHOLD: 0.8,
2312
- SEGMENT_SIMILARITY_THRESHOLD: 0.85
2319
+ SENTENCE_SIMILARITY_THRESHOLD: 0.85,
2320
+ // Increased from 0.8 to require more similarity
2321
+ SEGMENT_SIMILARITY_THRESHOLD: 0.9
2322
+ // Increased from 0.85
2313
2323
  };
2314
2324
  function detectTranscriptHallucinationWithDetails(transcript) {
2315
2325
  if (!transcript || transcript.trim().length === 0) {