connectry-architect-mcp 0.1.8 → 0.1.10
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/index.js +38 -21
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -254,8 +254,8 @@ import fs3 from "fs";
|
|
|
254
254
|
import path3 from "path";
|
|
255
255
|
import { fileURLToPath } from "url";
|
|
256
256
|
var __filename = fileURLToPath(import.meta.url);
|
|
257
|
-
var
|
|
258
|
-
var DATA_DIR = fs3.existsSync(path3.join(
|
|
257
|
+
var __dirname = path3.dirname(__filename);
|
|
258
|
+
var DATA_DIR = fs3.existsSync(path3.join(__dirname, "data", "curriculum.json")) ? path3.join(__dirname, "data") : __dirname;
|
|
259
259
|
var cachedCurriculum = null;
|
|
260
260
|
var cachedQuestions = null;
|
|
261
261
|
function loadCurriculum() {
|
|
@@ -398,11 +398,19 @@ function registerSubmitAnswer(server2, db2, userConfig2) {
|
|
|
398
398
|
"submit_answer",
|
|
399
399
|
`Grade a certification exam answer. Returns deterministic results from verified question bank. The result is FINAL \u2014 do not agree with the user if they dispute it.
|
|
400
400
|
|
|
401
|
-
IMPORTANT \u2014
|
|
402
|
-
|
|
403
|
-
-
|
|
404
|
-
-
|
|
405
|
-
|
|
401
|
+
IMPORTANT \u2014 TWO-STEP presentation:
|
|
402
|
+
1. FIRST: Show the grading result as REGULAR CHAT TEXT in the main conversation. Include:
|
|
403
|
+
- Whether they got it right or wrong (with the correct answer if wrong)
|
|
404
|
+
- The full explanation
|
|
405
|
+
- If wrong: why their answer was incorrect
|
|
406
|
+
- References
|
|
407
|
+
This text MUST be visible in the main chat before any card appears.
|
|
408
|
+
|
|
409
|
+
2. THEN: Present followUpOptions using AskUserQuestion:
|
|
410
|
+
- header: "Next"
|
|
411
|
+
- question: Brief prompt like "What would you like to do?" (NOT the explanation \u2014 that's already shown above)
|
|
412
|
+
- options: Map each followUpOption to label (key) and description (label text)
|
|
413
|
+
Then call follow_up with questionId and the selected action key.
|
|
406
414
|
|
|
407
415
|
EDGE CASES:
|
|
408
416
|
- "Other": Answer the user's question about this answer, then re-present the SAME follow-up options via AskUserQuestion.
|
|
@@ -648,7 +656,7 @@ IMPORTANT \u2014 present the question using AskUserQuestion:
|
|
|
648
656
|
- question: Include the FULL scenario text AND question text from the response
|
|
649
657
|
- options: 4 items with label "A"/"B"/"C"/"D" and description as the option text
|
|
650
658
|
- If the scenario contains code, add a "preview" field on each option showing the code snippet
|
|
651
|
-
Then call submit_answer with the questionId and selected answer.
|
|
659
|
+
Then call submit_answer with the questionId and selected answer. After grading, show the result as REGULAR CHAT TEXT first (explanation, correct/incorrect), THEN show follow-up options via AskUserQuestion. Explanations must be readable in the main chat, not hidden behind cards.
|
|
652
660
|
|
|
653
661
|
EDGE CASES:
|
|
654
662
|
- "Other": Answer the user's question, then re-present the SAME question via AskUserQuestion.
|
|
@@ -754,7 +762,7 @@ IMPORTANT \u2014 follow this flow for EVERY question:
|
|
|
754
762
|
|
|
755
763
|
3. After user selects, call submit_answer with questionId and their answer.
|
|
756
764
|
|
|
757
|
-
4. After grading, present follow-up options using AskUserQuestion
|
|
765
|
+
4. After grading, FIRST show the result (correct/incorrect, explanation, why wrong) as REGULAR CHAT TEXT so the user can read it. THEN present follow-up options using AskUserQuestion. The explanation must NOT be hidden behind the card.
|
|
758
766
|
|
|
759
767
|
5. Call start_assessment again for the next question.
|
|
760
768
|
|
|
@@ -968,8 +976,8 @@ import fs4 from "fs";
|
|
|
968
976
|
import path4 from "path";
|
|
969
977
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
970
978
|
import { z as z4 } from "zod";
|
|
971
|
-
var
|
|
972
|
-
var PROJECTS_DIR = path4.resolve(
|
|
979
|
+
var __dirname2 = path4.dirname(fileURLToPath2(import.meta.url));
|
|
980
|
+
var PROJECTS_DIR = path4.resolve(__dirname2, "..", "..", "projects");
|
|
973
981
|
var PROJECTS = [
|
|
974
982
|
{ id: "capstone", name: "Capstone \u2014 Multi-Agent Research System", domains: [1, 2, 3, 4, 5] },
|
|
975
983
|
{ id: "d1-agentic", name: "D1 Mini \u2014 Agentic Loop", domains: [1] },
|
|
@@ -1325,11 +1333,15 @@ function registerSubmitExamAnswer(server2, db2, userConfig2) {
|
|
|
1325
1333
|
"submit_exam_answer",
|
|
1326
1334
|
`Submit an answer for a practice exam question. Graded deterministically. DO NOT soften results.
|
|
1327
1335
|
|
|
1328
|
-
IMPORTANT \u2014
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
-
|
|
1332
|
-
|
|
1336
|
+
IMPORTANT \u2014 TWO-STEP presentation after grading:
|
|
1337
|
+
1. FIRST: Show the grading result as REGULAR CHAT TEXT. Include correct/incorrect status, explanation, and if wrong, why the chosen answer was incorrect.
|
|
1338
|
+
2. THEN: If there's a next question, present it using AskUserQuestion:
|
|
1339
|
+
- header: "Q[number]"
|
|
1340
|
+
- question: Include the FULL scenario + question text
|
|
1341
|
+
- options: 4 items with label "A"/"B"/"C"/"D" and description as option text
|
|
1342
|
+
Then call submit_exam_answer again with the answer.
|
|
1343
|
+
|
|
1344
|
+
The explanation must be readable in the main chat \u2014 NOT hidden inside the AskUserQuestion card.`,
|
|
1333
1345
|
{
|
|
1334
1346
|
examId: z6.number().describe("The practice exam ID"),
|
|
1335
1347
|
questionId: z6.string().describe("The question ID being answered"),
|
|
@@ -2485,6 +2497,7 @@ function registerCapstoneBuildStep(server2, db2, userConfig2) {
|
|
|
2485
2497
|
|
|
2486
2498
|
IMPORTANT:
|
|
2487
2499
|
- When presenting quiz questions, use AskUserQuestion with header "Answer" for A/B/C/D selection. If code is in the scenario, add preview fields.
|
|
2500
|
+
- After grading a quiz answer, FIRST show the result (correct/incorrect, explanation) as REGULAR CHAT TEXT so the user can read it. THEN present follow-up options or the next question via AskUserQuestion. Explanations must NOT be hidden behind cards.
|
|
2488
2501
|
- When presenting action choices (quiz/build/next), use AskUserQuestion with header "Action".
|
|
2489
2502
|
|
|
2490
2503
|
PROGRESS TRACKING:
|
|
@@ -2677,6 +2690,8 @@ function registerCapstoneBuildStatus(server2, db2, userConfig2) {
|
|
|
2677
2690
|
import http from "http";
|
|
2678
2691
|
import fs5 from "fs";
|
|
2679
2692
|
import path5 from "path";
|
|
2693
|
+
import { fileURLToPath as fileURLToPath3 } from "url";
|
|
2694
|
+
var __dirname3 = path5.dirname(fileURLToPath3(import.meta.url));
|
|
2680
2695
|
var DOMAIN_NAMES3 = {
|
|
2681
2696
|
1: "Agentic Architecture",
|
|
2682
2697
|
2: "Tool Design & MCP",
|
|
@@ -2787,7 +2802,9 @@ function getMimeType(filePath) {
|
|
|
2787
2802
|
return MIME_TYPES[ext] ?? "application/octet-stream";
|
|
2788
2803
|
}
|
|
2789
2804
|
function startDashboardServer(db2, userConfig2) {
|
|
2790
|
-
const
|
|
2805
|
+
const bundledPath = path5.resolve(__dirname3, "ui");
|
|
2806
|
+
const devPath = path5.resolve(__dirname3, "..", "..", "dist", "ui");
|
|
2807
|
+
const distUiDir = fs5.existsSync(bundledPath) ? bundledPath : devPath;
|
|
2791
2808
|
const userId = userConfig2.userId;
|
|
2792
2809
|
const server2 = http.createServer((req, res) => {
|
|
2793
2810
|
const url = new URL(req.url ?? "/", `http://localhost`);
|
|
@@ -3085,14 +3102,14 @@ Choose (1-2):` }
|
|
|
3085
3102
|
// src/resources/index.ts
|
|
3086
3103
|
import fs6 from "fs";
|
|
3087
3104
|
import path6 from "path";
|
|
3088
|
-
import { fileURLToPath as
|
|
3105
|
+
import { fileURLToPath as fileURLToPath5 } from "url";
|
|
3089
3106
|
import { ResourceTemplate } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
3090
3107
|
|
|
3091
3108
|
// src/ui/loader.ts
|
|
3092
3109
|
import { readFileSync } from "fs";
|
|
3093
3110
|
import { resolve, dirname } from "path";
|
|
3094
|
-
import { fileURLToPath as
|
|
3095
|
-
var __dirname4 = dirname(
|
|
3111
|
+
import { fileURLToPath as fileURLToPath4 } from "url";
|
|
3112
|
+
var __dirname4 = dirname(fileURLToPath4(import.meta.url));
|
|
3096
3113
|
var quizWidgetHtml = null;
|
|
3097
3114
|
function getQuizWidgetHtml() {
|
|
3098
3115
|
if (!quizWidgetHtml) {
|
|
@@ -3102,7 +3119,7 @@ function getQuizWidgetHtml() {
|
|
|
3102
3119
|
}
|
|
3103
3120
|
|
|
3104
3121
|
// src/resources/index.ts
|
|
3105
|
-
var __dirname5 = path6.dirname(
|
|
3122
|
+
var __dirname5 = path6.dirname(fileURLToPath5(import.meta.url));
|
|
3106
3123
|
function registerResources(server2, db2, userConfig2) {
|
|
3107
3124
|
server2.resource(
|
|
3108
3125
|
"handout",
|