moai-adk 0.3.10__py3-none-any.whl → 0.3.11__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.

Potentially problematic release.


This version of moai-adk might be problematic. Click here for more details.

moai_adk/__init__.py CHANGED
@@ -4,5 +4,5 @@
4
4
  SPEC-First TDD Framework with Alfred SuperAgent
5
5
  """
6
6
 
7
- __version__ = "0.3.9"
7
+ __version__ = "0.3.11"
8
8
  __all__ = ["__version__"]
moai_adk/__main__.py CHANGED
@@ -6,7 +6,7 @@ Implements the CLI entry point:
6
6
  - Rich console terminal output
7
7
  - ASCII logo rendering
8
8
  - --version and --help options
9
- - Six core commands: init, doctor, status, backup, restore, update
9
+ - Five core commands: init, doctor, status, backup, update
10
10
  """
11
11
 
12
12
  import sys
@@ -19,7 +19,6 @@ from moai_adk import __version__
19
19
  from moai_adk.cli.commands.backup import backup
20
20
  from moai_adk.cli.commands.doctor import doctor
21
21
  from moai_adk.cli.commands.init import init
22
- from moai_adk.cli.commands.restore import restore
23
22
  from moai_adk.cli.commands.status import status
24
23
  from moai_adk.cli.commands.update import update
25
24
 
@@ -58,7 +57,6 @@ def cli(ctx: click.Context) -> None:
58
57
  cli.add_command(init)
59
58
  cli.add_command(doctor)
60
59
  cli.add_command(status)
61
- cli.add_command(restore)
62
60
  cli.add_command(backup)
63
61
  cli.add_command(update)
64
62
 
@@ -1,16 +1,20 @@
1
1
  # @CODE:CLI-001 | SPEC: SPEC-CLI-001.md | TEST: tests/unit/test_cli_commands.py
2
2
  """CLI command module
3
3
 
4
- Four core commands:
4
+ Core commands:
5
5
  - init: initialize the project
6
6
  - doctor: run system diagnostics
7
7
  - status: show project status
8
- - restore: restore backups
8
+ - update: update templates to latest version
9
+ - backup: create project backups
10
+
11
+ Note: restore functionality is handled by checkpoint system in core.git.checkpoint
9
12
  """
10
13
 
14
+ from moai_adk.cli.commands.backup import backup
11
15
  from moai_adk.cli.commands.doctor import doctor
12
16
  from moai_adk.cli.commands.init import init
13
- from moai_adk.cli.commands.restore import restore
14
17
  from moai_adk.cli.commands.status import status
18
+ from moai_adk.cli.commands.update import update
15
19
 
16
- __all__ = ["init", "doctor", "status", "restore"]
20
+ __all__ = ["init", "doctor", "status", "update", "backup"]
@@ -15,7 +15,6 @@ from typing import Sequence
15
15
  import click
16
16
  from rich.console import Console
17
17
  from rich.progress import BarColumn, Progress, SpinnerColumn, TaskID, TextColumn
18
- from rich.prompt import Confirm
19
18
 
20
19
  from moai_adk import __version__
21
20
  from moai_adk.cli.prompts import prompt_project_setup
@@ -305,31 +305,6 @@ class TemplateProcessor:
305
305
  if not silent:
306
306
  console.print(" ✅ .claude/ copy complete (variables substituted)")
307
307
 
308
- def _backup_alfred_folder(self, folder_path: Path, folder_name: str) -> None:
309
- """Backup an Alfred folder before overwriting (safety measure).
310
-
311
- Args:
312
- folder_path: Path to the folder to backup.
313
- folder_name: Name of the folder (e.g., "hooks/alfred").
314
- """
315
- if not folder_path.exists():
316
- return
317
-
318
- # Create backup directory in .moai-backups/.claude-backups/{timestamp}/
319
- backup_base = self.target_path / ".moai-backups" / ".claude-backups"
320
- backup_base.mkdir(parents=True, exist_ok=True)
321
-
322
- # Generate timestamp-based backup directory
323
- from moai_adk.core.project.backup_utils import generate_backup_dir_name
324
-
325
- timestamp = generate_backup_dir_name()
326
- backup_dir = backup_base / timestamp
327
-
328
- # Backup this specific folder
329
- backup_folder = backup_dir / folder_name
330
- backup_folder.parent.mkdir(parents=True, exist_ok=True)
331
- shutil.copytree(folder_path, backup_folder)
332
-
333
308
  def _copy_moai(self, silent: bool = False) -> None:
334
309
  """.moai/ directory copy with variable substitution (excludes protected paths)."""
335
310
  src = self.template_root / ".moai"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: moai-adk
3
- Version: 0.3.10
3
+ Version: 0.3.11
4
4
  Summary: MoAI Agentic Development Kit - SPEC-First TDD with Alfred SuperAgent
5
5
  Project-URL: Homepage, https://github.com/modu-ai/moai-adk
6
6
  Project-URL: Repository, https://github.com/modu-ai/moai-adk
@@ -1,12 +1,11 @@
1
- moai_adk/__init__.py,sha256=zdXpTUQ-OHC67YgbzBHiGqxEvmfizRXENDKBpasoYjE,216
2
- moai_adk/__main__.py,sha256=FUUtsqo_NkeY3VR35EjPPtkP3vPkUqRraE30TXMGFL4,2502
1
+ moai_adk/__init__.py,sha256=xGKbfTvpKMGcmSZOUJtX8_WsZAAp04nKprHyddnHS3o,217
2
+ moai_adk/__main__.py,sha256=Wok19np6X4pxX4ybsGWS6McDZwoAN6iAvyLqFD9G5No,2419
3
3
  moai_adk/cli/__init__.py,sha256=tidIaJnd4Pje_5QYRq7OvRRst4T3kaPlkw5QcPQ3l1Y,135
4
4
  moai_adk/cli/main.py,sha256=mHACHi27AP2N7fg7zhzOo1tlF1Jrlw1_AcbxMfpGLVE,306
5
- moai_adk/cli/commands/__init__.py,sha256=Gq_obgREC-eFpiYB3IEpYywWj0dy4N0eEbw6q7NxrKs,490
5
+ moai_adk/cli/commands/__init__.py,sha256=AXHW3xozTShXENtrAINFK6brSEEGmaFCi0q71xsE9FQ,675
6
6
  moai_adk/cli/commands/backup.py,sha256=Hzf3zc7NhfChAJu2OTN_0xARtUbNaB32fmPczchbrC4,1652
7
7
  moai_adk/cli/commands/doctor.py,sha256=R4Cf9Jqwww1ng36u2SHTh6x0VdmnvaT7G9KVKJRX7N4,6623
8
- moai_adk/cli/commands/init.py,sha256=dVdBNuCBuwWu-8JBXW8XLX2Acr_6BVa4VsI2I3PP7nA,10409
9
- moai_adk/cli/commands/restore.py,sha256=nIhFR9PUQ-XuxZApONVyN77x2lWCjNhn0orL94YD0xs,2691
8
+ moai_adk/cli/commands/init.py,sha256=B9xWjjpIU9YgXBwfguLrzopVZMYg8GaqPa481EiHHGo,10377
10
9
  moai_adk/cli/commands/status.py,sha256=YJhh7RoKnumxY0_ho7FWTWm5Nxh2jTnH9aSsapdLhyo,2277
11
10
  moai_adk/cli/commands/update.py,sha256=aoYSR6Nz70sI-KNnkeD_9nZg4CHo5DJkmstnVfoTbrk,5979
12
11
  moai_adk/cli/prompts/__init__.py,sha256=a4_ctS4KEvGtmM9j7z8XIlMkpftohjVb9woUwZu38gE,136
@@ -35,7 +34,7 @@ moai_adk/core/template/backup.py,sha256=R187b3ZGQU5f-vQ-iBSFx0aIqbNHJAHODC4ODc3S
35
34
  moai_adk/core/template/config.py,sha256=UbDxqJ-yohwLW3Yzx_6-0RmjCxNRFqzw6bRIC2bS5-w,2712
36
35
  moai_adk/core/template/languages.py,sha256=waeyA_MFy217bV9IiILc2gofG9RM9JhD-kdVGRyJzFk,1648
37
36
  moai_adk/core/template/merger.py,sha256=dvKobOW4vXz-7GWKJpZFYxCMtR-LszcJZYbYFTL3XY0,4049
38
- moai_adk/core/template/processor.py,sha256=_EklBt3jFay235vREsYPNMoDHEM5xAgW3JIGM52jPc8,16179
37
+ moai_adk/core/template/processor.py,sha256=gmYK3d0dwlf0ES2RZb59ihBVctYcknB3WX0Gsp1pwBg,15175
39
38
  moai_adk/templates/.gitignore,sha256=6VNKResdDpyaii3cmJA4pOLwK2PhYARIWkUODYtKyxg,310
40
39
  moai_adk/templates/CLAUDE.md,sha256=xANecTF739Bh2aJX7nExWQcS2Yc_G8jk2HEVZKlmJOo,27286
41
40
  moai_adk/templates/__init__.py,sha256=9YY0tDkKbDFCdUB7rJFtGq0CZbF2ftVSKF573iw0KJc,99
@@ -82,8 +81,8 @@ moai_adk/templates/.moai/project/tech.md,sha256=1BgkApeFqQCq6TPriGiev02G9niVx23c
82
81
  moai_adk/utils/__init__.py,sha256=fv-UwHv8r4-eedwRnDA9hFjo5QSZYXjctKDyE7XF10g,220
83
82
  moai_adk/utils/banner.py,sha256=TmZyJKXOnJpdbdn6NZDJC6a4hm051QudEvOfiKQhvI8,1873
84
83
  moai_adk/utils/logger.py,sha256=jYCWKvcN-tX17hZ-e2IPuHATwkQBFc_I1dd5fUTWxmY,5059
85
- moai_adk-0.3.10.dist-info/METADATA,sha256=xJtnrnXZna5oSyjS0kZa4SRTbf-H0APs7cSYXvhoHdk,49933
86
- moai_adk-0.3.10.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
87
- moai_adk-0.3.10.dist-info/entry_points.txt,sha256=P9no1794UipqH72LP-ltdyfVd_MeB1WKJY_6-JQgV3U,52
88
- moai_adk-0.3.10.dist-info/licenses/LICENSE,sha256=M1M2b07fWcSWRM6_P3wbZKndZvyfHyYk_Wu9bS8F7o8,1069
89
- moai_adk-0.3.10.dist-info/RECORD,,
84
+ moai_adk-0.3.11.dist-info/METADATA,sha256=GvaHiumDTnHbFtuELOGZfSy8lO30yJAo3CLooR0IgGE,49933
85
+ moai_adk-0.3.11.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
86
+ moai_adk-0.3.11.dist-info/entry_points.txt,sha256=P9no1794UipqH72LP-ltdyfVd_MeB1WKJY_6-JQgV3U,52
87
+ moai_adk-0.3.11.dist-info/licenses/LICENSE,sha256=M1M2b07fWcSWRM6_P3wbZKndZvyfHyYk_Wu9bS8F7o8,1069
88
+ moai_adk-0.3.11.dist-info/RECORD,,
@@ -1,77 +0,0 @@
1
- # @CODE:CLI-001 | SPEC: SPEC-CLI-001.md | TEST: tests/unit/test_cli_commands.py
2
- """MoAI-ADK restore command
3
-
4
- Backup restore command:
5
- - Locate backups in .moai-backups/{timestamp}/ directory
6
- - Restore the specified timestamp or the latest backup
7
- - Confirm before performing the restore
8
- """
9
-
10
- from pathlib import Path
11
-
12
- import click
13
- from rich.console import Console
14
-
15
- console = Console()
16
-
17
-
18
- @click.command()
19
- @click.option(
20
- "--timestamp",
21
- help="Specific backup timestamp to restore (format: YYYY-MM-DD-HHMMSS)",
22
- )
23
- def restore(timestamp: str | None) -> None:
24
- """Restore from backup
25
-
26
- Args:
27
- timestamp: Optional specific backup timestamp
28
-
29
- Examples:
30
- python -m moai_adk restore # Restore from latest backup
31
- python -m moai_adk restore --timestamp 2025-10-13-120000 # Restore specific backup
32
- """
33
- try:
34
- project_root = Path.cwd()
35
- backup_dir = project_root / ".moai-backups"
36
-
37
- # Find all timestamp directories in .moai-backups/
38
- if not backup_dir.exists():
39
- console.print("[yellow]⚠ No backup directory found[/yellow]")
40
- console.print("[dim]Backups are stored in .moai-backups/{timestamp}/[/dim]")
41
- raise click.Abort()
42
-
43
- backup_dirs = sorted(
44
- [d for d in backup_dir.iterdir() if d.is_dir()],
45
- key=lambda x: x.name,
46
- reverse=True
47
- )
48
-
49
- if not backup_dirs:
50
- console.print("[yellow]⚠ No backup directories found[/yellow]")
51
- console.print("[dim]Backups are stored in .moai-backups/{timestamp}/[/dim]")
52
- raise click.Abort()
53
-
54
- # When a timestamp is provided, find the matching backup
55
- if timestamp:
56
- console.print(f"[cyan]Restoring from {timestamp}...[/cyan]")
57
- matching = [d for d in backup_dirs if timestamp in d.name]
58
- if not matching:
59
- console.print(f"[red]✗ Backup not found for timestamp: {timestamp}[/red]")
60
- raise click.Abort()
61
- backup_path = matching[0]
62
- else:
63
- console.print("[cyan]Restoring from latest backup...[/cyan]")
64
- backup_path = backup_dirs[0]
65
-
66
- # Placeholder for the future restore implementation
67
- console.print(f"[dim] └─ Backup: {backup_path.name}[/dim]")
68
- console.print("[green]✓ Restore completed[/green]")
69
-
70
- console.print("\n[yellow]Note:[/yellow] Restore functionality is not yet implemented")
71
- console.print("[dim]This will be added in a future release[/dim]")
72
-
73
- except click.Abort:
74
- raise
75
- except Exception as e:
76
- console.print(f"[red]✗ Restore failed: {e}[/red]")
77
- raise