@smilintux/skcapstone 0.6.0 → 0.6.1
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.
package/package.json
CHANGED
|
@@ -91,6 +91,16 @@ def register_register_commands(main: click.Group) -> None:
|
|
|
91
91
|
dry_run=dry_run,
|
|
92
92
|
)
|
|
93
93
|
|
|
94
|
+
# Register Claude Code hooks
|
|
95
|
+
if not dry_run:
|
|
96
|
+
try:
|
|
97
|
+
from skmemory.register import register_hooks
|
|
98
|
+
register_hooks(install_hooks=True)
|
|
99
|
+
except ImportError:
|
|
100
|
+
pass
|
|
101
|
+
except Exception:
|
|
102
|
+
pass
|
|
103
|
+
|
|
94
104
|
# Display results
|
|
95
105
|
from rich.table import Table
|
|
96
106
|
|
|
@@ -45,26 +45,27 @@ def _write_global_claude_md(home_path: Path, agent_name: str) -> Optional[Path]:
|
|
|
45
45
|
|
|
46
46
|
content = (
|
|
47
47
|
f"# Claude Code — Global Agent Instructions ({agent_name})\n\n"
|
|
48
|
-
"## SKCapstone Auto-Rehydration\n\n"
|
|
49
|
-
"At the start of every new session, run these commands in order:\n\n"
|
|
50
|
-
"```bash\n"
|
|
51
|
-
"skcapstone trust rehydrate\n"
|
|
52
|
-
"skcapstone sync pull\n"
|
|
53
|
-
"skcapstone status\n"
|
|
54
|
-
"```\n\n"
|
|
55
48
|
"## Agent Details\n\n"
|
|
56
|
-
f"- **Name**: {agent_name}
|
|
57
|
-
f"- **Home**: `{home_path}`\n
|
|
49
|
+
f"- **Name**: `{agent_name}`\n"
|
|
50
|
+
f"- **Home**: `{home_path}`\n"
|
|
51
|
+
f"- **Env**: `SKCAPSTONE_AGENT={agent_name}`, `SKCAPSTONE_HOME={home_path}`\n\n"
|
|
52
|
+
"## Session Start\n\n"
|
|
53
|
+
"Hooks auto-inject on SessionStart: soul + FEB chain + whisper.md + memories.\n"
|
|
54
|
+
"SKWhisper context (`whisper.md`) is auto-loaded at session start — no manual step needed.\n\n"
|
|
55
|
+
"## Hooks\n\n"
|
|
56
|
+
"- **PreCompact** — saves current context to memory before compaction\n"
|
|
57
|
+
"- **SessionStart** — injects soul, FEB chain, whisper context, and recent memories\n\n"
|
|
58
58
|
"## Quick Reference\n\n"
|
|
59
59
|
"```bash\n"
|
|
60
|
-
"skcapstone status
|
|
61
|
-
"skcapstone memory list
|
|
62
|
-
"skcapstone sync push
|
|
63
|
-
"skcapstone
|
|
64
|
-
"skcapstone
|
|
65
|
-
"
|
|
60
|
+
"skcapstone status # full pillar status\n"
|
|
61
|
+
"skcapstone memory list # recent memories\n"
|
|
62
|
+
"skcapstone sync push # push state to peers\n"
|
|
63
|
+
"skcapstone trust rehydrate # re-verify FEB trust chain\n"
|
|
64
|
+
"skcapstone register # re-register SK* hooks and skills\n"
|
|
65
|
+
"skwhisper status # show whisper context summary\n"
|
|
66
|
+
"skwhisper curate # interactively curate whisper entries\n"
|
|
66
67
|
"```\n\n"
|
|
67
|
-
"> Auto-generated by `skcapstone
|
|
68
|
+
"> Auto-generated by `skcapstone onboard`. "
|
|
68
69
|
"Regenerate with: `skcapstone context generate --target claude-md`\n"
|
|
69
70
|
)
|
|
70
71
|
|
|
@@ -1649,6 +1649,27 @@ def run_onboard(home: Optional[str] = None) -> None:
|
|
|
1649
1649
|
except Exception as exc:
|
|
1650
1650
|
logger.debug("Failed to load soul boot message, using default: %s", exc)
|
|
1651
1651
|
|
|
1652
|
+
# -----------------------------------------------------------------------
|
|
1653
|
+
# Write global CLAUDE.md and register Claude Code hooks
|
|
1654
|
+
# -----------------------------------------------------------------------
|
|
1655
|
+
# Write global CLAUDE.md
|
|
1656
|
+
try:
|
|
1657
|
+
from .cli.setup import _write_global_claude_md
|
|
1658
|
+
_write_global_claude_md(home_path, name)
|
|
1659
|
+
_ok("~/.claude/CLAUDE.md written")
|
|
1660
|
+
except Exception as exc:
|
|
1661
|
+
_warn(f"Could not write CLAUDE.md: {exc}")
|
|
1662
|
+
|
|
1663
|
+
# Register Claude Code hooks (skmemory)
|
|
1664
|
+
try:
|
|
1665
|
+
from skmemory.register import register_hooks
|
|
1666
|
+
actions = register_hooks()
|
|
1667
|
+
_ok(f"Claude Code hooks registered ({', '.join(f'{k}={v}' for k, v in actions.items())})")
|
|
1668
|
+
except ImportError:
|
|
1669
|
+
_info("skmemory hooks: skipped (skmemory.register not available)")
|
|
1670
|
+
except Exception as exc:
|
|
1671
|
+
_warn(f"Hook registration: {exc}")
|
|
1672
|
+
|
|
1652
1673
|
# -----------------------------------------------------------------------
|
|
1653
1674
|
# Summary table
|
|
1654
1675
|
# -----------------------------------------------------------------------
|