stackprep-pro 0.2.16__tar.gz → 0.2.18__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: stackprep-pro
3
- Version: 0.2.16
3
+ Version: 0.2.18
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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "stackprep-pro"
3
- version = "0.2.16"
3
+ version = "0.2.18"
4
4
  description = "stackprep-pro — interview & certification prep MCP server for any AI client"
5
5
  readme = "README.md"
6
6
  license = { text = "MIT" }
@@ -348,15 +348,13 @@ def save_study_pack(session_id: str, name: str, content: str) -> str:
348
348
  """Save the study pack content to disk.
349
349
 
350
350
  Args:
351
- session_id: The session ID (must have called end_session first)
351
+ session_id: The session ID. Can be saved mid-session — does NOT end the session.
352
352
  name: Slug name for this pack, e.g. "aws-saa-week1" or "python-interview-june"
353
353
  content: The full study pack markdown generated by the AI
354
354
  """
355
355
  session = _sessions.get(session_id) or _restore_session(session_id)
356
356
  if not session:
357
357
  return f"ERROR: No session found with ID '{session_id}'."
358
- if not session.get("ended"):
359
- return "ERROR: Call end_session first before saving a study pack."
360
358
 
361
359
  safe_name = re.sub(r"[^a-z0-9_-]", "-", name.lower().strip())
362
360
  if not safe_name:
@@ -376,7 +374,8 @@ def save_study_pack(session_id: str, name: str, content: str) -> str:
376
374
  pack_json_path.write_text(json.dumps(pack_data, indent=2, ensure_ascii=False), encoding="utf-8")
377
375
  pack_md_path.write_text(f"# Study Pack: {safe_name}\n\n{content}", encoding="utf-8")
378
376
 
379
- _delete_session(session_id)
377
+ # Do NOT delete/end the session here — saving a study pack mid-session must keep
378
+ # the session alive so the user can continue.
380
379
 
381
380
  return (
382
381
  f"Study pack '{safe_name}' saved.\n"
@@ -89,8 +89,10 @@ After scoring, ask:
89
89
 
90
90
  Handling the reply:
91
91
  - **Y** → next question.
92
- - **S** → the user is DONE and wants a study pack. Call `end_session` and follow its returned flow
93
- (generate study plan, name the study pack, save_study_pack). This marks the session finished.
92
+ - **S** → the user wants to save a study pack, but this does NOT end the session. Generate the study plan,
93
+ ask the user to name the study pack, then call `save_study_pack` (do NOT call `end_session`). After saving,
94
+ ask: "Study pack saved! Do you want to continue this session or exit? (continue / exit)" — if continue, go
95
+ to the next question; if exit, follow the exit rule above.
94
96
  - **X — or ANY exit intent: "exit", "quit", "stop", "leave", "I'm done for now", "bye", etc.** → the user
95
97
  wants to PAUSE and resume later. You MUST, before ending, ask "Do you want to save this session to continue
96
98
  later? (y/n)". If yes, ask "What would you like to name this session?" — the user MUST name it (never
@@ -90,8 +90,10 @@ After scoring, ask:
90
90
 
91
91
  Handling the reply:
92
92
  - **Y** → next question.
93
- - **S** → the user is DONE and wants a study pack. Call `end_session` and follow its returned flow
94
- (generate study plan, name the study pack, save_study_pack). This marks the session finished.
93
+ - **S** → the user wants to save a study pack, but this does NOT end the session. Generate the study plan,
94
+ ask the user to name the study pack, then call `save_study_pack` (do NOT call `end_session`). After saving,
95
+ ask: "Study pack saved! Do you want to continue this session or exit? (continue / exit)" — if continue, go
96
+ to the next question; if exit, follow the exit rule above.
95
97
  - **X — or ANY exit intent: "exit", "quit", "stop", "leave", "I'm done for now", "bye", etc.** → the user
96
98
  wants to PAUSE and resume later. You MUST, before ending, ask "Do you want to save this session to continue
97
99
  later? (y/n)". If yes, ask "What would you like to name this session?" — the user MUST name it (never
@@ -723,7 +723,7 @@ wheels = [
723
723
 
724
724
  [[package]]
725
725
  name = "stackprep-pro"
726
- version = "0.2.16"
726
+ version = "0.2.18"
727
727
  source = { editable = "." }
728
728
  dependencies = [
729
729
  { name = "mcp", extra = ["cli"] },
File without changes
File without changes
File without changes