pulsemcp-cms-admin-mcp-server 0.7.1 → 0.7.3
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/build/shared/src/pulsemcp-admin-client/lib/save-results-for-mirror.js +1 -1
- package/build/shared/src/tools/save-results-for-mirror.js +14 -1
- package/package.json +1 -1
- package/shared/pulsemcp-admin-client/lib/save-results-for-mirror.js +1 -1
- package/shared/tools/save-results-for-mirror.js +14 -1
|
@@ -98,14 +98,27 @@ Typical workflow:
|
|
|
98
98
|
// The exam_id may live at the top level of the stream line OR inside
|
|
99
99
|
// line.data (the actual result payload). Prefer the data payload to
|
|
100
100
|
// avoid reading from potentially incomplete display metadata.
|
|
101
|
+
//
|
|
102
|
+
// The real proctor API returns line.data as a metadata wrapper:
|
|
103
|
+
// { mirror_id, exam_id, status, result: { status, output: {...} } }
|
|
104
|
+
// The actual output lives inside line.data.result. When we pass the
|
|
105
|
+
// entire line.data as `data`, the output ends up nested too deeply
|
|
106
|
+
// (result.data.result.output) and the backend saves empty output.
|
|
107
|
+
// Use line.data.result when present so that `output` is at the
|
|
108
|
+
// expected depth (result.data.output).
|
|
101
109
|
results = stored.lines
|
|
102
110
|
.filter((line) => line.type === 'exam_result')
|
|
103
111
|
.map((line) => {
|
|
104
112
|
const data = line.data;
|
|
113
|
+
// Prefer the nested result object (contains output, input, etc.)
|
|
114
|
+
// over the full data wrapper (contains metadata like mirror_id)
|
|
115
|
+
const resultData = data?.result && typeof data.result === 'object' && !Array.isArray(data.result)
|
|
116
|
+
? data.result
|
|
117
|
+
: data;
|
|
105
118
|
return {
|
|
106
119
|
exam_id: extractExamId(line),
|
|
107
120
|
status: extractStatus(line),
|
|
108
|
-
...(
|
|
121
|
+
...(resultData ? { data: resultData } : {}),
|
|
109
122
|
};
|
|
110
123
|
});
|
|
111
124
|
if (!runtimeId) {
|
package/package.json
CHANGED
|
@@ -98,14 +98,27 @@ Typical workflow:
|
|
|
98
98
|
// The exam_id may live at the top level of the stream line OR inside
|
|
99
99
|
// line.data (the actual result payload). Prefer the data payload to
|
|
100
100
|
// avoid reading from potentially incomplete display metadata.
|
|
101
|
+
//
|
|
102
|
+
// The real proctor API returns line.data as a metadata wrapper:
|
|
103
|
+
// { mirror_id, exam_id, status, result: { status, output: {...} } }
|
|
104
|
+
// The actual output lives inside line.data.result. When we pass the
|
|
105
|
+
// entire line.data as `data`, the output ends up nested too deeply
|
|
106
|
+
// (result.data.result.output) and the backend saves empty output.
|
|
107
|
+
// Use line.data.result when present so that `output` is at the
|
|
108
|
+
// expected depth (result.data.output).
|
|
101
109
|
results = stored.lines
|
|
102
110
|
.filter((line) => line.type === 'exam_result')
|
|
103
111
|
.map((line) => {
|
|
104
112
|
const data = line.data;
|
|
113
|
+
// Prefer the nested result object (contains output, input, etc.)
|
|
114
|
+
// over the full data wrapper (contains metadata like mirror_id)
|
|
115
|
+
const resultData = data?.result && typeof data.result === 'object' && !Array.isArray(data.result)
|
|
116
|
+
? data.result
|
|
117
|
+
: data;
|
|
105
118
|
return {
|
|
106
119
|
exam_id: extractExamId(line),
|
|
107
120
|
status: extractStatus(line),
|
|
108
|
-
...(
|
|
121
|
+
...(resultData ? { data: resultData } : {}),
|
|
109
122
|
};
|
|
110
123
|
});
|
|
111
124
|
if (!runtimeId) {
|