chore: push all design docs, V2 plan specs, and current working state
Includes AirPlan design documents, AircOding-alpha1-plan, AirPlanV2, AirPlan-ParaV2, AirPlan-Para V1 reference docs, and all working code changes across packages. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
38
AirPlan/docs/spec/AirPlan-ParaV2/AirContextServer/scripts/cmd_pause.py
Executable file
38
AirPlan/docs/spec/AirPlan-ParaV2/AirContextServer/scripts/cmd_pause.py
Executable file
@@ -0,0 +1,38 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Backend for /aircontext-pause [on|off]."""
|
||||
from __future__ import annotations
|
||||
import os
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
_HERE = Path(__file__).resolve().parent
|
||||
sys.path.insert(0, str(_HERE))
|
||||
|
||||
from core.state import StateFile # noqa: E402
|
||||
|
||||
|
||||
def main() -> int:
|
||||
project = Path(os.environ.get("CLAUDE_PROJECT_DIR", os.getcwd()))
|
||||
air = project / "AirContext"
|
||||
if not air.exists():
|
||||
print("AirContext not initialised. Run /aircontext-init first.")
|
||||
return 1
|
||||
|
||||
state = StateFile(air / "state.json")
|
||||
arg = (sys.argv[1].lower() if len(sys.argv) > 1 else "").strip()
|
||||
|
||||
cur = bool(state.read().get("paused"))
|
||||
if arg in ("on", "pause", "true", "1"):
|
||||
new = True
|
||||
elif arg in ("off", "resume", "false", "0"):
|
||||
new = False
|
||||
else:
|
||||
new = not cur # toggle
|
||||
|
||||
state.update(paused=new)
|
||||
print(f"AirContext automatic compaction: {'PAUSED' if new else 'ACTIVE'}")
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
Reference in New Issue
Block a user