claude-task-master 0.1.8__py3-none-any.whl → 0.1.9__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.
@@ -3,5 +3,5 @@
3
3
  Uses Claude Agent SDK to keep Claude working until a goal is achieved.
4
4
  """
5
5
 
6
- __version__ = "0.1.8"
6
+ __version__ = "0.1.9"
7
7
  __all__ = ["__version__"]
@@ -25,6 +25,7 @@ Response Models:
25
25
  - CloneRepoResponse: Result of cloning a repository
26
26
  - SetupRepoResponse: Result of setting up a repository
27
27
  - PlanRepoResponse: Result of planning for a repository
28
+ - DeleteCodingStyleResponse: Result of deleting coding-style.md
28
29
 
29
30
  Usage:
30
31
  from claude_task_master.api.models import (
@@ -860,3 +861,24 @@ class PlanRepoResponse(BaseModel):
860
861
  criteria: str | None = None
861
862
  run_id: str | None = None
862
863
  error: str | None = None
864
+
865
+
866
+ # =============================================================================
867
+ # Coding Style Response Models
868
+ # =============================================================================
869
+
870
+
871
+ class DeleteCodingStyleResponse(BaseModel):
872
+ """Response model for deleting the coding-style.md file.
873
+
874
+ Attributes:
875
+ success: Whether the deletion operation succeeded.
876
+ message: Human-readable result message.
877
+ file_existed: Whether the file existed before deletion.
878
+ error: Error message if deletion failed.
879
+ """
880
+
881
+ success: bool
882
+ message: str
883
+ file_existed: bool = False
884
+ error: str | None = None
@@ -10,6 +10,7 @@ Endpoints:
10
10
  - GET /progress: Get progress summary
11
11
  - GET /context: Get accumulated context/learnings
12
12
  - GET /health: Health check endpoint
13
+ - DELETE /coding-style: Delete the coding-style.md file
13
14
  - POST /task/init: Initialize a new task
14
15
  - DELETE /task: Delete/cleanup current task
15
16
  - POST /control/stop: Stop a running task with optional cleanup
@@ -51,6 +52,7 @@ from claude_task_master.api.models import (
51
52
  ConfigUpdateRequest,
52
53
  ContextResponse,
53
54
  ControlResponse,
55
+ DeleteCodingStyleResponse,
54
56
  ErrorResponse,
55
57
  HealthResponse,
56
58
  LogsResponse,
@@ -613,6 +615,68 @@ def create_info_router() -> APIRouter:
613
615
  active_tasks=active_tasks,
614
616
  )
615
617
 
618
+ @router.delete(
619
+ "/coding-style",
620
+ response_model=DeleteCodingStyleResponse,
621
+ responses={
622
+ 404: {"model": ErrorResponse, "description": "No active task found"},
623
+ 500: {"model": ErrorResponse, "description": "Internal server error"},
624
+ },
625
+ summary="Delete Coding Style",
626
+ description="Delete the coding-style.md file from the state directory.",
627
+ )
628
+ async def delete_coding_style(request: Request) -> DeleteCodingStyleResponse | JSONResponse:
629
+ """Delete the coding-style.md file.
630
+
631
+ Removes the coding-style.md file from the state directory. This file
632
+ contains extracted coding conventions and is regenerated on the next run.
633
+
634
+ Returns:
635
+ DeleteCodingStyleResponse indicating whether the file was deleted.
636
+
637
+ Raises:
638
+ 404: If no active task exists.
639
+ 500: If an error occurs during deletion.
640
+ """
641
+ state_manager = _get_state_manager(request)
642
+
643
+ if not state_manager.exists():
644
+ return JSONResponse(
645
+ status_code=404,
646
+ content=ErrorResponse(
647
+ error="not_found",
648
+ message="No active task found",
649
+ suggestion="Start a new task with 'claudetm start <goal>'",
650
+ ).model_dump(),
651
+ )
652
+
653
+ try:
654
+ file_existed = state_manager.delete_coding_style()
655
+
656
+ if file_existed:
657
+ return DeleteCodingStyleResponse(
658
+ success=True,
659
+ message="Coding style file deleted successfully",
660
+ file_existed=True,
661
+ )
662
+ else:
663
+ return DeleteCodingStyleResponse(
664
+ success=True,
665
+ message="Coding style file did not exist",
666
+ file_existed=False,
667
+ )
668
+
669
+ except Exception as e:
670
+ logger.exception("Error deleting coding style file")
671
+ return JSONResponse(
672
+ status_code=500,
673
+ content=ErrorResponse(
674
+ error="internal_error",
675
+ message="Failed to delete coding style file",
676
+ detail=str(e),
677
+ ).model_dump(),
678
+ )
679
+
616
680
  return router
617
681
 
618
682
 
@@ -1356,7 +1420,9 @@ def register_routes(app: FastAPI) -> None:
1356
1420
  repo_router = create_repo_router()
1357
1421
  app.include_router(repo_router, prefix="/repo")
1358
1422
 
1359
- logger.debug("Registered info routes: /status, /plan, /logs, /progress, /context, /health")
1423
+ logger.debug(
1424
+ "Registered info routes: /status, /plan, /logs, /progress, /context, /health, /coding-style"
1425
+ )
1360
1426
  logger.debug("Registered control routes: /control/stop, /control/resume, /config")
1361
1427
  logger.debug("Registered task routes: /task/init, /task")
1362
1428
  logger.debug("Registered webhook routes: /webhooks, /webhooks/{id}, /webhooks/test")
@@ -146,6 +146,18 @@ class FileOperationsMixin:
146
146
  return coding_style_file.read_text()
147
147
  return None
148
148
 
149
+ def delete_coding_style(self) -> bool:
150
+ """Delete coding style guide file (coding-style.md).
151
+
152
+ Returns:
153
+ True if file was deleted, False if file did not exist.
154
+ """
155
+ coding_style_file = self.state_dir / "coding-style.md"
156
+ if coding_style_file.exists():
157
+ coding_style_file.unlink()
158
+ return True
159
+ return False
160
+
149
161
  def _parse_plan_tasks(self, plan: str) -> list[str]:
150
162
  """Parse tasks from plan markdown.
151
163
 
@@ -69,6 +69,7 @@ ClearMailboxResult = tools.ClearMailboxResult
69
69
  CloneRepoResult = tools.CloneRepoResult
70
70
  SetupRepoResult = tools.SetupRepoResult
71
71
  PlanRepoResult = tools.PlanRepoResult
72
+ DeleteCodingStyleResult = tools.DeleteCodingStyleResult
72
73
 
73
74
 
74
75
  # =============================================================================
@@ -201,6 +202,24 @@ def create_server(
201
202
  """
202
203
  return tools.clean_task(work_dir, force, state_dir)
203
204
 
205
+ @mcp.tool()
206
+ def delete_coding_style(
207
+ state_dir: str | None = None,
208
+ ) -> dict[str, Any]:
209
+ """Delete the coding style guide file (coding-style.md).
210
+
211
+ The coding style file is a cached guide that's preserved across runs to save
212
+ tokens. Call this to force regeneration on the next planning phase when
213
+ project conventions have changed.
214
+
215
+ Args:
216
+ state_dir: Optional custom state directory path.
217
+
218
+ Returns:
219
+ Dictionary indicating success or failure with deletion status.
220
+ """
221
+ return tools.delete_coding_style(work_dir, state_dir)
222
+
204
223
  @mcp.tool()
205
224
  def initialize_task(
206
225
  goal: str,
@@ -183,6 +183,15 @@ class PlanRepoResult(BaseModel):
183
183
  error: str | None = None
184
184
 
185
185
 
186
+ class DeleteCodingStyleResult(BaseModel):
187
+ """Result from delete_coding_style tool."""
188
+
189
+ success: bool
190
+ message: str
191
+ deleted: bool = False
192
+ error: str | None = None
193
+
194
+
186
195
  # =============================================================================
187
196
  # Tool Implementations
188
197
  # =============================================================================
@@ -402,6 +411,57 @@ def get_context(
402
411
  }
403
412
 
404
413
 
414
+ def delete_coding_style(
415
+ work_dir: Path,
416
+ state_dir: str | None = None,
417
+ ) -> dict[str, Any]:
418
+ """Delete the coding style guide file (coding-style.md).
419
+
420
+ The coding style file is a cached guide that's preserved across runs to save
421
+ tokens. Call this to force regeneration on the next planning phase when
422
+ project conventions have changed.
423
+
424
+ Args:
425
+ work_dir: Working directory for the server.
426
+ state_dir: Optional custom state directory path.
427
+
428
+ Returns:
429
+ Dictionary indicating success or failure with deletion status.
430
+ """
431
+ state_path = Path(state_dir) if state_dir else work_dir / ".claude-task-master"
432
+ state_manager = StateManager(state_dir=state_path)
433
+
434
+ if not state_manager.exists():
435
+ return DeleteCodingStyleResult(
436
+ success=False,
437
+ message="No task state found",
438
+ deleted=False,
439
+ error="No active task found. Initialize a task first.",
440
+ ).model_dump()
441
+
442
+ try:
443
+ deleted = state_manager.delete_coding_style()
444
+ if deleted:
445
+ return DeleteCodingStyleResult(
446
+ success=True,
447
+ message="Coding style guide deleted successfully",
448
+ deleted=True,
449
+ ).model_dump()
450
+ else:
451
+ return DeleteCodingStyleResult(
452
+ success=True,
453
+ message="Coding style guide did not exist",
454
+ deleted=False,
455
+ ).model_dump()
456
+ except Exception as e:
457
+ return DeleteCodingStyleResult(
458
+ success=False,
459
+ message=f"Failed to delete coding style guide: {e}",
460
+ deleted=False,
461
+ error=str(e),
462
+ ).model_dump()
463
+
464
+
405
465
  def clean_task(
406
466
  work_dir: Path,
407
467
  force: bool = False,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: claude-task-master
3
- Version: 0.1.8
3
+ Version: 0.1.9
4
4
  Summary: Autonomous task orchestration system that keeps Claude working until a goal is achieved
5
5
  Author: Claude Task Master Team
6
6
  License-Expression: MIT
@@ -19,7 +19,7 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
19
19
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
20
20
  Requires-Python: >=3.12
21
21
  Description-Content-Type: text/markdown
22
- Requires-Dist: claude-agent-sdk>=0.1.0
22
+ Requires-Dist: claude-agent-sdk>=0.1.27
23
23
  Requires-Dist: typer>=0.12.0
24
24
  Requires-Dist: pydantic>=2.0.0
25
25
  Requires-Dist: rich>=13.0.0
@@ -1,10 +1,10 @@
1
- claude_task_master/__init__.py,sha256=JAKhI_GFk5m5HASlCbJF5c_zSYuMV_GZYjOLrzWU-Lo,187
1
+ claude_task_master/__init__.py,sha256=XMb-GKezewx3ros2o__HnqUXISrBMP93OxLxbDoQXqQ,187
2
2
  claude_task_master/cli.py,sha256=b2nowi18sFSX8pLZiFKjQqDp7cvRWRnNayN96n-d770,6238
3
3
  claude_task_master/server.py,sha256=a39yqwj2gZWpAPOzU9E3yj8ds7wmSqevOyiI7QHu_EQ,15791
4
4
  claude_task_master/wrapper.py,sha256=NQywkv06-4jkBz4lFPkQvDrr8TEMgyAqYWEnQI2fgck,6001
5
5
  claude_task_master/api/__init__.py,sha256=PLYnsz8ce5JbMhkE3s268l898QZjR-hCiaqb97o0W0Y,2205
6
- claude_task_master/api/models.py,sha256=w5UirlQXirF94a3HCfCic2pz223PYaw2-KTVBG8cFC4,25922
7
- claude_task_master/api/routes.py,sha256=iwMREBGW37hxlmABsdzzjc8kWtSPyHA0N5Y66GrAIKk,47780
6
+ claude_task_master/api/models.py,sha256=9Qvr_8GnyymUtNFL763knq9GIo8bEYwfVXy9RhdqEJ4,26627
7
+ claude_task_master/api/routes.py,sha256=bbTJVPlIDsmhe6yIPTioGnYnG68T8SQBYz_-2xxnq90,50185
8
8
  claude_task_master/api/routes_config.py,sha256=gmLb40bxiNwF4N8U7_MarXRFnzzJWGjqQGDF4wOMjiI,5125
9
9
  claude_task_master/api/routes_control.py,sha256=HaM6JfTTlwnfaHADXlk-Pc3FpdBWp6yzG3NBXqdfFTU,9814
10
10
  claude_task_master/api/routes_repo.py,sha256=Lh9c1JqyBTUiuq_8Nlyig-wtVyl6Ha9rVk_20MOxCqg,11649
@@ -61,7 +61,7 @@ claude_task_master/core/shutdown.py,sha256=-WaP6FoAgvdBGOmu6AtEu9YWA4n0v8AP9Cm_3
61
61
  claude_task_master/core/state.py,sha256=wCoFubgFyW5Lj1gqum7Kz_2_khynWv7lTxtw92NxCSk,24811
62
62
  claude_task_master/core/state_backup.py,sha256=OJnFotGNyCxzDBbfmtd8zo8VyEHVvsxGH_NRBNL0Ma8,5780
63
63
  claude_task_master/core/state_exceptions.py,sha256=7nJ5-tBf-owTU68a07pkdUq-DnUV_D7DbNMuNSzsVLc,6691
64
- claude_task_master/core/state_file_ops.py,sha256=uQ4lRPzVWWD5VhXnZhDQacJyqefK0V_38uBpQiV7zaI,5035
64
+ claude_task_master/core/state_file_ops.py,sha256=91nRGA1vf-vHNHDJdvypH2uCXdhngHP45Yv5clbp-PQ,5423
65
65
  claude_task_master/core/state_pr.py,sha256=R8pwmzP15yStFji_Epq1p8VcWdLN96aG8mAcndi5p1U,7926
66
66
  claude_task_master/core/state_recovery.py,sha256=1kIOd_dnRF3ZbjNohTXDzanBsfAhrWcQUNzGdg3rN9o,3812
67
67
  claude_task_master/core/subagents.py,sha256=-O4dsywG2-FWwB6kg20GwaVIuQ2DAWcrkJYIBvmVM1Q,6759
@@ -80,8 +80,8 @@ claude_task_master/mailbox/models.py,sha256=CTLqm3M2Mvw_cZQSaphGE1x05fFFTQMOHzh1
80
80
  claude_task_master/mailbox/storage.py,sha256=n0gzVp64R12pMtX1TQbJuraQfzASCsD53xgeyfdVWo4,6372
81
81
  claude_task_master/mcp/__init__.py,sha256=uLd6VkJlzO3qKaYRLTVEM5OJrGi5wlSIzNLre_tPhgw,1018
82
82
  claude_task_master/mcp/auth.py,sha256=K1FHszG7Klnn0j1k9n0krueSmZ4Q8_gKw8NDRp0OFU4,5459
83
- claude_task_master/mcp/server.py,sha256=zxiaEDqijo-k2O-QuRgEkjb-hoX8Xvd1NyWku5wQS5Y,27318
84
- claude_task_master/mcp/tools.py,sha256=74f6Z7JHyqgVLlb-AkNS4b5jIaU4JhvIXmSDO14NYBo,57158
83
+ claude_task_master/mcp/server.py,sha256=6QyfIEXoXE8vW4XpP8xoBI-7Yzxi543d2ZocAEO5qsY,27999
84
+ claude_task_master/mcp/tools.py,sha256=EmPkwlR1RYH4gQ5H4GXaGGJjFVNNjoxV01rFGzaNRLM,59039
85
85
  claude_task_master/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
86
86
  claude_task_master/utils/debug_claude_md.py,sha256=88opwpoh9ApR3ZyRVFro3e6jpngR3_kGoB5abdLA1As,6620
87
87
  claude_task_master/utils/doctor.py,sha256=z9mm9RUVVAYuFzCWd03kjUXMvKFxXVDyeiuqS5-RXYA,2796
@@ -89,8 +89,8 @@ claude_task_master/webhooks/__init__.py,sha256=bJfQBkSRZCOaVNnOg7PlG-FbwJV4YsySD
89
89
  claude_task_master/webhooks/client.py,sha256=DEz3vrNmuTBPp2t_rK515zRRKJAzFxxL8B9iCbXRuEU,24589
90
90
  claude_task_master/webhooks/config.py,sha256=cufVrl94zSSubpoNFWVYp5ht2Okf_K_8UAQfFsaaOIE,19230
91
91
  claude_task_master/webhooks/events.py,sha256=dbzOEdrum_joa4AUizVKxyPQW6q3TVAXDft5kxlr8O8,32140
92
- claude_task_master-0.1.8.dist-info/METADATA,sha256=w6ZU44zJZ6uVA5ZNYeOT2rXbLd3PSj9wWhZkGQ9_MBI,29580
93
- claude_task_master-0.1.8.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
94
- claude_task_master-0.1.8.dist-info/entry_points.txt,sha256=vpjSBkvZSSZ1WmmNSbiszyiiy-fAvtmmaOTOyLnufqM,251
95
- claude_task_master-0.1.8.dist-info/top_level.txt,sha256=Axj8q87a_7qo5JyjdIFe9ebs4BFOnuDt_gdxHqSDwqc,19
96
- claude_task_master-0.1.8.dist-info/RECORD,,
92
+ claude_task_master-0.1.9.dist-info/METADATA,sha256=_GYLRrQu7M6gt0Ipqfe9HrHBP-42BNh8rH0rc8EsP80,29581
93
+ claude_task_master-0.1.9.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
94
+ claude_task_master-0.1.9.dist-info/entry_points.txt,sha256=vpjSBkvZSSZ1WmmNSbiszyiiy-fAvtmmaOTOyLnufqM,251
95
+ claude_task_master-0.1.9.dist-info/top_level.txt,sha256=Axj8q87a_7qo5JyjdIFe9ebs4BFOnuDt_gdxHqSDwqc,19
96
+ claude_task_master-0.1.9.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.10.1)
2
+ Generator: setuptools (80.10.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5