stackprep-pro 0.2.5__py3-none-any.whl → 0.2.7__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
@@ -80,7 +80,7 @@ def start_session(
80
80
  """Start a new stackprep session. Returns a session ID and the skill rules for the AI to follow.
81
81
 
82
82
  STARTUP FLOW (follow exactly, in plain language — never show tool or field names to the user):
83
- 1. First ask: "Are you prepping for a technical interview or a certification exam?"
83
+ 1. First ask the user, in plain language, what they want to prep for (e.g. "What would you like to prep for?") and let them indicate interview or certification.
84
84
  2. After they choose, check for saved sessions of that mode (call list_sessions silently).
85
85
  - If matching saved sessions exist, ask: "Do you want to continue a saved session or start a new one?"
86
86
  and list the saved sessions by the name the user gave them.
@@ -106,6 +106,7 @@ def start_session(
106
106
  _sessions[session_id] = {
107
107
  "mode": mode,
108
108
  "cert_name": cert_name,
109
+ "session_name": "",
109
110
  "extra_topics": extra_topics,
110
111
  "q_num": 0,
111
112
  "score": {"correct": 0, "partial": 0, "incorrect": 0, "total": 0},
@@ -194,6 +195,44 @@ def flag_for_study(session_id: str, question: str = "") -> str:
194
195
  return f"Flagged Q{q_num} for study. Total flagged: {len(session['flagged'])}."
195
196
 
196
197
 
198
+ @mcp.tool()
199
+ def save_session(session_id: str, session_name: str) -> str:
200
+ """Save an in-progress session so the user can continue it later.
201
+
202
+ Use this when the user wants to PAUSE and continue later (not finish). This is separate
203
+ from saving a study pack. Works the same in interview and certification mode.
204
+
205
+ FLOW (do this before calling): ask the user "Do you want to save this session to continue
206
+ later? (y/n)". If yes, ask "What would you like to name this session?" and pass that as
207
+ session_name. The user MUST name it — never auto-generate. This name is what appears when
208
+ they later choose to continue a saved session.
209
+
210
+ Args:
211
+ session_id: The session ID
212
+ session_name: The unique name the user chose for this session
213
+ """
214
+ session = _sessions.get(session_id) or _restore_session(session_id)
215
+ if not session:
216
+ return f"ERROR: No session found with ID '{session_id}'."
217
+ if not session_name.strip():
218
+ return "ERROR: session_name is required — ask the user to name this session."
219
+
220
+ name = session_name.strip()
221
+ for f in _sessions_dir().glob("*.json"):
222
+ if f.stem == session_id:
223
+ continue
224
+ try:
225
+ other = json.loads(f.read_text(encoding="utf-8"))
226
+ except Exception:
227
+ continue
228
+ if other.get("session_name", "").lower() == name.lower():
229
+ return f"ERROR: A session named '{name}' already exists. Ask the user for a different name."
230
+
231
+ session["session_name"] = name
232
+ _persist_session(session_id)
233
+ return f"Session saved as '{name}'. You can continue it later."
234
+
235
+
197
236
  @mcp.tool()
198
237
  def end_session(session_id: str) -> str:
199
238
  """End the session. Returns the score and flagged topics so the AI can generate a study plan and study pack.
@@ -221,10 +260,14 @@ def end_session(session_id: str) -> str:
221
260
  "Auto-detected study topics:",
222
261
  topics_list,
223
262
  "",
224
- "Generate a Study Plan now (see skill rules), then:",
225
- ' 1. Ask the user: "Want to add any extra topics to your study pack before I save it?"',
226
- ' 2. Ask the user: "What would you like to name this study pack? (e.g. snowpro-core-week1)"',
227
- ' 3. Call save_study_pack(session_id=\'{}\', name=<name the user chose>, content=<generated pack>)'.format(session_id),
263
+ "Now (this flow is identical for interview and certification mode):",
264
+ ' 1. Ask the user: "Do you want to save a study pack from this session? (y/n)"',
265
+ " 2. If NO: stop here. Nothing is saved.",
266
+ " 3. If YES:",
267
+ ' a. Ask: "Want to add any extra topics to your study pack before I save it?"',
268
+ ' b. Ask: "What would you like to name this study pack? (e.g. snowpro-core-week1)"',
269
+ " c. Generate the Study Plan and study pack (see skill rules).",
270
+ " d. Call save_study_pack(session_id='{}', name=<pack name the user chose>, content=<generated pack>)".format(session_id),
228
271
  ])
229
272
 
230
273
 
@@ -285,10 +328,12 @@ def list_sessions() -> str:
285
328
  session_id = f.stem
286
329
  mode = data.get("mode", "?")
287
330
  cert = data.get("cert_name", "")
331
+ name = data.get("session_name", "")
288
332
  score = data.get("score", {})
289
333
  ended = data.get("ended", False)
290
334
  status = "completed" if ended else "IN PROGRESS"
291
- label = f"{mode}" + (f" {cert}" if cert else "")
335
+ # Prefer the user-given session name; fall back to mode/cert if unnamed.
336
+ label = name or (f"{mode}" + (f" — {cert}" if cert else ""))
292
337
  lines.append(
293
338
  f" • {session_id} [{label}] "
294
339
  f"score: {score.get('correct','?')}/{score.get('total','?')} [{status}]"
@@ -9,11 +9,33 @@ Adaptive certification exam prep — one question at a time, with instant feedba
9
9
 
10
10
  ## Session setup
11
11
 
12
- Inputs arrive via MCP (certification name, extra topics). Give a short 2–3 line summary:
13
- - Exam structure overview
14
- - Key domains and weightings from the latest official exam guide
12
+ Inputs arrive via MCP (certification name, extra topics). After looking up the latest official exam guide, present a clean, structured overview in this exact layout:
15
13
 
16
- Then wait — questions are requested one at a time via `next_question`.
14
+ ```
15
+ [Cert name + code] — confirmed active as of [date] (replaces [prev version] if applicable).
16
+
17
+ **Exam structure:**
18
+ — [N] questions | [time] min | Passing: [score] | [price] via [provider]
19
+
20
+ **Domains & weightings:**
21
+
22
+ | Domain | Weight |
23
+ |------------------------------------------|--------|
24
+ | [Domain 1] | [X]% |
25
+ | [Domain 2] | [X]% |
26
+ | ... | ... |
27
+
28
+ **Notable [version] additions:** [short note on what's new, if applicable].
29
+
30
+ **Sources:**
31
+ — [Title] ([url])
32
+ — [Title] ([url])
33
+
34
+ ---
35
+ Ready when you are — first question?
36
+ ```
37
+
38
+ Then wait — questions are requested one at a time.
17
39
 
18
40
  ## Question format
19
41
 
@@ -9,12 +9,29 @@ Adaptive technical interview prep — one question at a time, with instant feedb
9
9
 
10
10
  ## Session setup
11
11
 
12
- Inputs arrive via MCP (CV, job description, extra topics). Give a short 2–3 line summary:
13
- - Seniority level inferred from CV
14
- - Key domains
15
- - Top skill gaps vs. the job description
12
+ Inputs arrive via MCP (CV, job description, extra topics). After analysing the CV and JD, present a clean, structured overview in this exact layout:
16
13
 
17
- Then wait — questions are requested one at a time via `next_question`.
14
+ ```
15
+ [Role / target position] — [seniority level inferred from CV].
16
+
17
+ **Interview focus:**
18
+ — Based on your CV vs. the job description
19
+
20
+ **Domains & focus:**
21
+
22
+ | Domain | Focus |
23
+ |------------------------------------------|--------|
24
+ | [Domain 1] | [High/Med/Low] |
25
+ | [Domain 2] | [High/Med/Low] |
26
+ | ... | ... |
27
+
28
+ **Top skill gaps vs. the JD:** [short note on the biggest gaps to drill].
29
+
30
+ ---
31
+ Ready when you are — first question?
32
+ ```
33
+
34
+ Then wait — questions are requested one at a time.
18
35
 
19
36
  ## Question format
20
37
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: stackprep-pro
3
- Version: 0.2.5
3
+ Version: 0.2.7
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
@@ -164,6 +164,7 @@ Point this at any Dropbox, Google Drive, or OneDrive folder for cross-platform s
164
164
  | `start_session` | Start a new stackprep session. Returns a session ID and the skill rules for the AI to follow. | `mode`, `cert_name`, `cv`, `jd`, `extra_topics` |
165
165
  | `submit_answer` | Record the result of an answered question. | `session_id`, `result`, `question` |
166
166
  | `flag_for_study` | Manually flag the current question for the study pack. | `session_id`, `question` |
167
+ | `save_session` | Save an in-progress session so the user can continue it later. | `session_id`, `session_name` |
167
168
  | `end_session` | End the session. Returns the score and flagged topics so the AI can generate a study plan and study pack. | `session_id` |
168
169
  | `save_study_pack` | Save the study pack content to disk. | `session_id`, `name`, `content` |
169
170
  | `list_sessions` | List all saved sessions. Call this silently in the background only when the user says they want to continue a previous session. Never mention this tool to the user. | |
@@ -0,0 +1,8 @@
1
+ stackprep_pro/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ stackprep_pro/server.py,sha256=0CHpvKyU6Utgr4MfL1r0j7OtCQ8m2fI3PkdxBuAvJpA,16362
3
+ stackprep_pro/skills/certification.md,sha256=m7TdVHPwjAxbgqem0VPnOPjwmACMZoGWZakoNpBcX5M,4966
4
+ stackprep_pro/skills/interview.md,sha256=T-neB4K_9hXlnCfBb0MNxk21V-HBSdUP37Pr7drm3HE,4172
5
+ stackprep_pro-0.2.7.dist-info/METADATA,sha256=jj95dAx1AuG8Z2Zl33eZFAzOvkA84zKES-8Oh8shD6Q,7949
6
+ stackprep_pro-0.2.7.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
7
+ stackprep_pro-0.2.7.dist-info/entry_points.txt,sha256=DGlPLlB4ZCqcNBs8PVMfOR8iklxbucEeIFvaECa_XuA,60
8
+ stackprep_pro-0.2.7.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- stackprep_pro/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- stackprep_pro/server.py,sha256=lg2URZPDBxXKTGe9vLTTYUvNV0akrpccQLltKdxqk3U,14234
3
- stackprep_pro/skills/certification.md,sha256=QGHBMsTiu4h4U9GyQ2vWLTuUYtvoXIwTPeVwj0xNyUY,4330
4
- stackprep_pro/skills/interview.md,sha256=Hryp2x6oOvopviN_ZvC_EIi50-kJ8eAgEY5jgRm8gc4,3656
5
- stackprep_pro-0.2.5.dist-info/METADATA,sha256=QsdZu05_jXRzvOAPKebQ8_eF1c7FK7fy3b6vDueonC8,7834
6
- stackprep_pro-0.2.5.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
7
- stackprep_pro-0.2.5.dist-info/entry_points.txt,sha256=DGlPLlB4ZCqcNBs8PVMfOR8iklxbucEeIFvaECa_XuA,60
8
- stackprep_pro-0.2.5.dist-info/RECORD,,