stackprep-pro 0.2.22__py3-none-any.whl → 0.2.25__py3-none-any.whl

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.
stackprep_pro/server.py CHANGED
@@ -19,11 +19,17 @@ PRESENTATION (every message): always respond as elegant RENDERED markdown blocks
19
19
  dividers, clean tables/lists. NEVER output flat plain text.
20
20
 
21
21
  After the user picks a mode, silently call BOTH list_sessions(mode=<chosen mode>) and
22
- list_study_packs(mode=<chosen mode>). Then show ONE single "What would you like to do?" block — a single
23
- numbered table — listing, as rows: each saved session to continue (by its name), each saved study pack to
24
- open (by its name), and a final "Start a brand-new prep" row. Do NOT show separate "saved sessions" and
25
- "saved study packs" tables on top of the options table only the one combined options table. The user
26
- replies with a number. Collect inputs and call start_session.
22
+ list_study_packs(mode=<chosen mode>).
23
+
24
+ - If there are NO saved sessions AND NO saved study packs for that mode: do NOT ask anything about
25
+ continuing or opening go straight to collecting inputs and starting a brand-new session.
26
+ - Only if there IS at least one saved session or study pack: show ONE single "What would you like to do?"
27
+ block — a single numbered table listing each saved session to continue (by its name), each saved study
28
+ pack to open (by its name), and a final "Start a brand-new prep" row. Do NOT show separate "saved
29
+ sessions" / "saved study packs" tables on top of it — only the one combined options table.
30
+
31
+ Never show empty tables or "none found" messages to the user. The user replies with a number (when a table
32
+ is shown). Collect inputs and call start_session.
27
33
  Follow the skill rules returned by start_session exactly — the skill is the source of truth."""
28
34
 
29
35
  # Hardcoded so the very first block is guaranteed, not AI-guessed.
@@ -296,6 +302,33 @@ def save_session(session_id: str, session_name: str) -> str:
296
302
  return f"Session saved as '{name}'. You can continue it later."
297
303
 
298
304
 
305
+ @mcp.tool()
306
+ def exit_session(session_id: str) -> str:
307
+ """ALWAYS call this the moment the user wants to leave a session in progress — any of: "exit", "quit",
308
+ "stop", "leave", "X", "done for now", "bye", "that's enough". Do NOT end the conversation yourself on an
309
+ exit intent; call this first and relay its instructions. It returns the exact save prompt to show.
310
+
311
+ Args:
312
+ session_id: The session ID
313
+ """
314
+ session = _sessions.get(session_id) or _restore_session(session_id)
315
+ if not session:
316
+ return f"ERROR: No session found with ID '{session_id}'."
317
+
318
+ score = session.get("score", {})
319
+ return "\n".join([
320
+ "=== EXIT REQUESTED — you MUST ask this before ending ===",
321
+ f"Progress so far: {score.get('correct','?')}/{score.get('total','?')}.",
322
+ "",
323
+ 'Ask the user, exactly: "Do you want to save this session so you can continue later? (y/n)"',
324
+ " - If YES: ask \"What would you like to name this session?\" (the user MUST provide the name — never",
325
+ " auto-generate). Then call save_session(session_id='{}', session_name=<name>). It stays resumable.".format(session_id),
326
+ " - If NO: call discard_session(session_id='{}'). It is permanently deleted and won't appear later.".format(session_id),
327
+ "",
328
+ "Do NOT skip this question. Do NOT end the conversation until the user has answered y or n.",
329
+ ])
330
+
331
+
299
332
  @mcp.tool()
300
333
  def discard_session(session_id: str) -> str:
301
334
  """Permanently delete a session. Call this when the user is exiting and answers NO to saving the
@@ -10,7 +10,8 @@ Adaptive certification exam prep — one question at a time, with instant feedba
10
10
  ## ⛔ EXIT RULE (READ FIRST — NEVER SKIP)
11
11
 
12
12
  The instant the user says ANYTHING meaning they want to stop — "exit", "quit", "stop", "leave", "X",
13
- "done for now", "bye", "that's enough" — you MUST NOT just end the conversation. You MUST first ask:
13
+ "done for now", "bye", "that's enough" — you MUST NOT just end the conversation. You MUST FIRST call the
14
+ `exit_session(session_id)` tool and follow the instructions it returns. Those instructions are:
14
15
 
15
16
  > "Do you want to save this session so you can continue later? (y/n)"
16
17
 
@@ -18,7 +19,7 @@ The instant the user says ANYTHING meaning they want to stop — "exit", "quit",
18
19
  then call `save_session(session_id, session_name=<that name>)`. It stays resumable under that name.
19
20
  - **No** → call `discard_session(session_id)` to permanently delete it, then end. It will NOT appear later.
20
21
 
21
- This is mandatory EVERY time, no matter how few questions were answered.
22
+ This is mandatory EVERY time, no matter how few questions were answered. Never skip calling `exit_session`.
22
23
 
23
24
  ## Session setup
24
25
 
@@ -10,7 +10,8 @@ Adaptive technical interview prep — one question at a time, with instant feedb
10
10
  ## ⛔ EXIT RULE (READ FIRST — NEVER SKIP)
11
11
 
12
12
  The instant the user says ANYTHING meaning they want to stop — "exit", "quit", "stop", "leave", "X",
13
- "done for now", "bye", "that's enough" — you MUST NOT just end the conversation. You MUST first ask:
13
+ "done for now", "bye", "that's enough" — you MUST NOT just end the conversation. You MUST FIRST call the
14
+ `exit_session(session_id)` tool and follow the instructions it returns. Those instructions are:
14
15
 
15
16
  > "Do you want to save this session so you can continue later? (y/n)"
16
17
 
@@ -18,7 +19,7 @@ The instant the user says ANYTHING meaning they want to stop — "exit", "quit",
18
19
  then call `save_session(session_id, session_name=<that name>)`. It stays resumable under that name.
19
20
  - **No** → call `discard_session(session_id)` to permanently delete it, then end. It will NOT appear later.
20
21
 
21
- This is mandatory EVERY time, no matter how few questions were answered.
22
+ This is mandatory EVERY time, no matter how few questions were answered. Never skip calling `exit_session`.
22
23
 
23
24
  ## Session setup
24
25
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: stackprep-pro
3
- Version: 0.2.22
3
+ Version: 0.2.25
4
4
  Summary: stackprep-pro — interview & certification prep MCP server for any AI client
5
5
  Project-URL: Homepage, https://github.com/youngpada1/stackprep-pro
6
6
  Project-URL: Repository, https://github.com/youngpada1/stackprep-pro
@@ -52,11 +52,28 @@ uvx stackprep-pro
52
52
 
53
53
  ## Configure your MCP client
54
54
 
55
- The config is the same for every client — just point to `uvx stackprep-pro`.
55
+ The config is the same for every client — just point to `uvx stackprep-pro`. No API keys, no
56
+ authentication, no accounts — stackprep stores everything as plain files on your own machine.
57
+
58
+ > **Prerequisite:** install [uv](https://docs.astral.sh/uv/) (it provides `uvx`):
59
+ > ```bash
60
+ > curl -LsSf https://astral.sh/uv/install.sh | sh
61
+ > ```
56
62
 
57
63
  ### Claude Code
58
64
 
59
- Create `.mcp.json` in your project root:
65
+ **Recommended register it globally** so it works from any directory (the normal way you'd use it):
66
+
67
+ ```bash
68
+ claude mcp add stackprep --scope user -- uvx stackprep-pro
69
+ ```
70
+
71
+ Then launch Claude Code from anywhere with `claude` and type `start`.
72
+
73
+ <details>
74
+ <summary>Alternative: per-project config</summary>
75
+
76
+ If you'd rather scope it to a single project, create `.mcp.json` in that project's root instead:
60
77
 
61
78
  ```json
62
79
  {
@@ -68,10 +85,11 @@ Create `.mcp.json` in your project root:
68
85
  }
69
86
  }
70
87
  ```
88
+ </details>
71
89
 
72
90
  ### Cursor
73
91
 
74
- Create `~/.cursor/mcp.json`:
92
+ Create `~/.cursor/mcp.json` (global — works from any directory):
75
93
 
76
94
  ```json
77
95
  {
@@ -166,6 +184,7 @@ Point this at any Dropbox, Google Drive, or OneDrive folder for cross-platform s
166
184
  | `submit_answer` | Record the result of an answered question. | `session_id`, `result`, `question` |
167
185
  | `flag_for_study` | Manually flag the current question for the study pack. | `session_id`, `question` |
168
186
  | `save_session` | Save an in-progress session so the user can continue it later. | `session_id`, `session_name` |
187
+ | `exit_session` | ALWAYS call this the moment the user wants to leave a session in progress — any of: "exit", "quit", | `session_id` |
169
188
  | `discard_session` | Permanently delete a session. Call this when the user is exiting and answers NO to saving the | `session_id` |
170
189
  | `end_session` | End the session. Returns the score and flagged topics so the AI can generate a study plan and study pack. | `session_id` |
171
190
  | `save_study_pack` | Save the study pack content to disk. | `session_id`, `name`, `content` |
@@ -0,0 +1,8 @@
1
+ stackprep_pro/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ stackprep_pro/server.py,sha256=mKbs6e3Zm9x50M6EgY2jkqPNm4C0liZHv-3b7NkQpk0,22549
3
+ stackprep_pro/skills/certification.md,sha256=VjkA7O3RjNoM0_MpSKD_2mORRDnNLxGdSdTioZ9xoI4,6859
4
+ stackprep_pro/skills/interview.md,sha256=pouK-9ZMiPx3JQGiWkOTGT62aN4BsVF0OXzd9AIU6fs,6839
5
+ stackprep_pro-0.2.25.dist-info/METADATA,sha256=J1Y3rJHZ4Rx8yUA1yOCSYP0VkdRKPqTvM5gCGNPQIuQ,8898
6
+ stackprep_pro-0.2.25.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
7
+ stackprep_pro-0.2.25.dist-info/entry_points.txt,sha256=DGlPLlB4ZCqcNBs8PVMfOR8iklxbucEeIFvaECa_XuA,60
8
+ stackprep_pro-0.2.25.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.30.1
2
+ Generator: hatchling 1.31.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,8 +0,0 @@
1
- stackprep_pro/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- stackprep_pro/server.py,sha256=h04Z3oiP4Gi-nZEWfZSQ63747bLVwTHWzWXI8vfva88,20822
3
- stackprep_pro/skills/certification.md,sha256=XeDicaQyRVC5PeV0eawwkb31SIylOVG7DqAWtIOBlNs,6724
4
- stackprep_pro/skills/interview.md,sha256=G2debQDqIU-UpIfRbjKwalx9_4dZrr1BwjZi5F2VMRo,6704
5
- stackprep_pro-0.2.22.dist-info/METADATA,sha256=Bu1rGesWhn-9X8ON8bMY4RCuxr-r9F372YFQrH420ME,8085
6
- stackprep_pro-0.2.22.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
7
- stackprep_pro-0.2.22.dist-info/entry_points.txt,sha256=DGlPLlB4ZCqcNBs8PVMfOR8iklxbucEeIFvaECa_XuA,60
8
- stackprep_pro-0.2.22.dist-info/RECORD,,