@edpire/sdk 0.8.0 → 0.8.1

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/CHANGELOG.md CHANGED
@@ -9,6 +9,24 @@ integrators pin a version and had no way to tell what a bump would change.
9
9
  The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and
10
10
  the package follows [semantic versioning](https://semver.org/spec/v2.0.0.html).
11
11
 
12
+ ## [0.8.1] - 2026-09-29
13
+
14
+ ### Fixed
15
+
16
+ - **An AI-marked answer that has no mark yet is no longer described as a
17
+ teacher reviewing open responses.** When the AI does not answer in time, the
18
+ player's banner now says the answers are still being marked ("Being marked",
19
+ in en/fr/ar), and still hides the score. Driven by the new `ai_pending` field
20
+ of the submit and review responses; older servers that do not send it keep
21
+ the previous banner.
22
+
23
+ ### Added
24
+
25
+ - `ai_pending?: boolean` on `EmbedResult`, on `SubmissionReview.submission`,
26
+ and on `GradeResult` (`POST /assessments/{id}/submit`). True when an
27
+ AI-marked answer has no mark yet: treat the score as provisional, never as a
28
+ final 0.
29
+
12
30
  ## [0.8.0] - 2026-09-23
13
31
 
14
32
  ### Added
package/README.md CHANGED
@@ -90,7 +90,7 @@ embed.unmount()
90
90
  **CDN (no bundler):**
91
91
 
92
92
  ```html
93
- <script src="https://cdn.jsdelivr.net/npm/@edpire/sdk@0.8.0/dist/umd/index.global.js"></script>
93
+ <script src="https://cdn.jsdelivr.net/npm/@edpire/sdk@0.8.1/dist/umd/index.global.js"></script>
94
94
  <script>
95
95
  EdpireSDK.EdpireAssessment.mount({ token, container: "#root", onComplete: handleDone })
96
96
  </script>
@@ -328,7 +328,7 @@ The integration uses two parts:
328
328
  </head>
329
329
  <body>
330
330
  <div id="root"></div>
331
- <script src="https://cdn.jsdelivr.net/npm/@edpire/sdk@0.8.0/dist/umd/index.global.js"></script>
331
+ <script src="https://cdn.jsdelivr.net/npm/@edpire/sdk@0.8.1/dist/umd/index.global.js"></script>
332
332
  <script>
333
333
  EdpireSDK.EdpireAssessment.mount({
334
334
  token: "{{EMBED_TOKEN}}", // replace server-side before loading
package/dist/client.d.mts CHANGED
@@ -55,6 +55,8 @@ interface EmbedResult {
55
55
  attempt_number: number;
56
56
  /** True when the submission contains open-response nodes still pending teacher review. */
57
57
  awaiting_manual_grading?: boolean;
58
+ /** True when an AI-marked answer has no mark yet: it is being marked, not scored 0. */
59
+ ai_pending?: boolean;
58
60
  exercise_results: Array<{
59
61
  exercise_id: string;
60
62
  total_score: number;
@@ -129,6 +131,8 @@ interface SubmissionReview {
129
131
  * player hides them.
130
132
  */
131
133
  awaiting_manual_grading: boolean;
134
+ /** True while an AI-marked answer has no mark yet. Optional: older servers did not send it. */
135
+ ai_pending?: boolean;
132
136
  submitted_at: string | null;
133
137
  };
134
138
  assessment: AssessmentLoaderResponse["assessment"];
@@ -332,6 +336,12 @@ interface GradeResult {
332
336
  * the `submission.grading.completed` webhook.
333
337
  */
334
338
  awaiting_manual_grading: boolean;
339
+ /**
340
+ * True when an AI-marked answer has no mark yet (the AI did not answer in
341
+ * time). It is being marked, not scored 0: treat the score as provisional.
342
+ * Optional because servers before 2026-09-29 did not send it.
343
+ */
344
+ ai_pending?: boolean;
335
345
  exercise_results: Array<{
336
346
  exercise_id: string;
337
347
  total_score: number;
@@ -379,6 +389,13 @@ interface CheckResult {
379
389
  correct: boolean;
380
390
  score: number;
381
391
  max_score: number;
392
+ /**
393
+ * True when an AI-graded part of the question could not be graded in time.
394
+ * That node's feedback carries `pending: true` and no score, and `correct` /
395
+ * `score` cover only what was graded. Not a wrong answer: do not penalise it.
396
+ * Optional because servers before 2026-09-29 did not send it.
397
+ */
398
+ ai_pending?: boolean;
382
399
  feedback: Record<string, unknown>;
383
400
  }
384
401
  interface Submission {
package/dist/core.d.mts CHANGED
@@ -89,6 +89,8 @@ interface EmbedResult {
89
89
  attempt_number: number;
90
90
  /** True when the submission contains open-response nodes still pending teacher review. */
91
91
  awaiting_manual_grading?: boolean;
92
+ /** True when an AI-marked answer has no mark yet: it is being marked, not scored 0. */
93
+ ai_pending?: boolean;
92
94
  exercise_results: Array<{
93
95
  exercise_id: string;
94
96
  total_score: number;
@@ -163,6 +165,8 @@ interface SubmissionReview {
163
165
  * player hides them.
164
166
  */
165
167
  awaiting_manual_grading: boolean;
168
+ /** True while an AI-marked answer has no mark yet. Optional: older servers did not send it. */
169
+ ai_pending?: boolean;
166
170
  submitted_at: string | null;
167
171
  };
168
172
  assessment: AssessmentLoaderResponse["assessment"];
package/dist/index.d.mts CHANGED
@@ -96,6 +96,12 @@ interface SubmitResult {
96
96
  exerciseFeedback: ExerciseFeedbackData[];
97
97
  /** When true, score banners hide the score (still being reviewed). */
98
98
  awaitingManualGrading?: boolean;
99
+ /**
100
+ * When true, an AI-marked answer has no mark yet (it did not come back in
101
+ * time). The banner then says the answers are still being marked, rather
102
+ * than that a teacher is reviewing open responses.
103
+ */
104
+ aiPending?: boolean;
99
105
  }
100
106
 
101
107
  type SpinnerTheme = "default" | "dots" | "pulse" | "bars";
@@ -139,6 +145,8 @@ interface EmbedResult {
139
145
  attempt_number: number;
140
146
  /** True when the submission contains open-response nodes still pending teacher review. */
141
147
  awaiting_manual_grading?: boolean;
148
+ /** True when an AI-marked answer has no mark yet: it is being marked, not scored 0. */
149
+ ai_pending?: boolean;
142
150
  exercise_results: Array<{
143
151
  exercise_id: string;
144
152
  total_score: number;
@@ -285,6 +293,8 @@ interface SubmissionReview {
285
293
  * player hides them.
286
294
  */
287
295
  awaiting_manual_grading: boolean;
296
+ /** True while an AI-marked answer has no mark yet. Optional: older servers did not send it. */
297
+ ai_pending?: boolean;
288
298
  submitted_at: string | null;
289
299
  };
290
300
  assessment: AssessmentLoaderResponse["assessment"];