@falkenslab/asker-mcp 0.1.0 → 0.1.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/README.md +1 -1
- package/dist/server.mjs +6 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -61,7 +61,7 @@ Asker generates many questions from a definitions file with fixed templates: the
|
|
|
61
61
|
|
|
62
62
|
Found testing every input in [dvarrui/asker-inputs](https://github.com/dvarrui/asker-inputs) through the built server, and importing into [moodle-sandbox](https://github.com/falkenslab/moodle-sandbox)'s Moodle 5.2 with moodle-driver (what moodle-teacher's `import_questions` runs):
|
|
63
63
|
|
|
64
|
-
- **`asker check`
|
|
64
|
+
- **`asker check` flags lines Asker ignores**: `%tags` and `%def` in a `%code` mean nothing there (60 of the 129 inputs have them); Asker skips them and generates, while `asker check` refuses the file. `check_input` always makes a trial run: its `ok` says whether Asker reads the file, and `syntax` the lines to fix anyway ([teuton-software/asker#30](https://github.com/teuton-software/asker/issues/30)).
|
|
65
65
|
- **Ordering questions don't import into Moodle 4.4 and later**: Asker writes them without `<shownumcorrect/>`, and Moodle's ordering type then fails to save them ("Error writing to database"). The server adds it.
|
|
66
66
|
- **Unescaped text**: Asker writes an answer like `mysql -u root < data.sql` into a `<text>` without CDATA, which leaves the XML unreadable. The server escapes `<`, `>` and `&` there, with the same text.
|
|
67
67
|
- **GIFT**: Asker can't write drag-and-drop matching there, and its warning comments out the next question's first line; it also skips questions with embedded files. The server removes the broken blocks, restores the next question, and says what GIFT lacks.
|
package/dist/server.mjs
CHANGED
|
@@ -43272,6 +43272,8 @@ var CODE = `# Asker input: code (experimental in Asker)
|
|
|
43272
43272
|
%path files/string.py
|
|
43273
43273
|
\`\`\`
|
|
43274
43274
|
- **%type**: python, ruby, javascript or sql. **%path**: relative to the input's folder.
|
|
43275
|
+
- No %tags or %def in a %code: they mean nothing there, Asker skips them and asker check flags them.
|
|
43276
|
+
- Experimental in Asker: it may change or go, so keep code files few and simple.
|
|
43275
43277
|
- Its questions go under the file's name. Short programs with real, readable lines work best.`;
|
|
43276
43278
|
var QUESTIONS = `# What Asker makes
|
|
43277
43279
|
|
|
@@ -43753,7 +43755,7 @@ function explain(messages) {
|
|
|
43753
43755
|
return out;
|
|
43754
43756
|
}
|
|
43755
43757
|
function attribute(error62, input2) {
|
|
43756
|
-
const name = path.basename(input2);
|
|
43758
|
+
const name = path.basename(input2.replace(/\\/g, "/"));
|
|
43757
43759
|
const mentioned = /\(([^()]*\.(?:haml|xml))\)/i.exec(error62)?.[1];
|
|
43758
43760
|
if (!mentioned) return error62;
|
|
43759
43761
|
const other = path.basename(mentioned.replace(/\\/g, "/"));
|
|
@@ -43932,7 +43934,7 @@ ${run.stderr}`;
|
|
|
43932
43934
|
return { ok: false, ...syntax ? { syntax } : {}, errors: [...errors, `Asker's Moodle XML can't be read: ${error62 instanceof Error ? error62.message : String(error62)}`], explained: explain(errors), ...ran };
|
|
43933
43935
|
}
|
|
43934
43936
|
const { all, groups } = countQuestions(read.filter((q) => q.type !== "ddmatch"));
|
|
43935
|
-
const lenient = syntax && !syntax.ok ? ["
|
|
43937
|
+
const lenient = syntax && !syntax.ok ? ["Asker reads the file and makes its questions, but asker check flags the lines in syntax: Asker ignores them as they are (%tags and %def in a %code, for one, mean nothing there). Fix or remove them so the file says only what Asker uses."] : [];
|
|
43936
43938
|
return { ok: errors.length === 0, ...syntax ? { syntax } : {}, errors, explained: [.../* @__PURE__ */ new Set([...errors.length ? [...syntaxExplained, ...explain(errors)] : [], ...lenient])], ...ran, wouldGenerate: { total: all.total, groups } };
|
|
43937
43939
|
});
|
|
43938
43940
|
}
|
|
@@ -44164,7 +44166,7 @@ var registerCheckInput = (server) => {
|
|
|
44164
44166
|
ok: external_exports.boolean(),
|
|
44165
44167
|
errors: external_exports.array(external_exports.object({ line: external_exports.number(), message: external_exports.string(), source: external_exports.string() })),
|
|
44166
44168
|
total: external_exports.number().optional().describe("How many errors in all: Asker shows at most 10")
|
|
44167
|
-
}).optional().describe("asker check's verdict (HAML only), each complaint with its line; it
|
|
44169
|
+
}).optional().describe("asker check's verdict (HAML only), each complaint with its line; it also flags lines Asker ignores while loading, so ok says whether Asker reads the file, and these still need fixing"),
|
|
44168
44170
|
errors: external_exports.array(external_exports.string()),
|
|
44169
44171
|
warnings: external_exports.array(external_exports.string()),
|
|
44170
44172
|
wouldGenerate: external_exports.object({ total: external_exports.number(), groups: external_exports.array(groupSchema) }).optional().describe("What generate_questions would make, with every question type"),
|
|
@@ -44379,7 +44381,7 @@ var registerReadQuestions = (server) => {
|
|
|
44379
44381
|
// package.json
|
|
44380
44382
|
var package_default = {
|
|
44381
44383
|
name: "@falkenslab/asker-mcp",
|
|
44382
|
-
version: "0.1.
|
|
44384
|
+
version: "0.1.1",
|
|
44383
44385
|
description: "Asker for AI agents: a definitions file checked, questions generated from it as Moodle XML or GIFT, read back for review and filtered before importing.",
|
|
44384
44386
|
license: "MIT",
|
|
44385
44387
|
author: "Falken's Lab",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@falkenslab/asker-mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Asker for AI agents: a definitions file checked, questions generated from it as Moodle XML or GIFT, read back for review and filtered before importing.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Falken's Lab",
|