@@ -113,6 +113,14 @@ def _git_revision(root: Path) -> str:
113113
114114
115115SOURCE_ARTIFACTS : dict [str , tuple [str , ...]] = {
116+ "persephone.control" : (
117+ "package.json" ,
118+ "src/cli.ts" ,
119+ "src/daemon.ts" ,
120+ "src/integrate.ts" ,
121+ "src/rpc.ts" ,
122+ "src/signal.ts" ,
123+ ),
116124 "context.mode.mcp" : (
117125 "server.bundle.mjs" ,
118126 "cli.bundle.mjs" ,
@@ -1289,6 +1297,19 @@ def _contract_current(
12891297 _skill_links_current ("interface-skills" )
12901298 and _skill_policy_current ()
12911299 )
1300+ if integration == "persephone" :
1301+ root = _services_root () / "persephone"
1302+ bun = _binary ("bun" , Path .home () / ".bun" / "bin" / "bun" )
1303+ result = subprocess .run (
1304+ [bun , "src/cli.ts" , "doctor" , "--integration-only" ],
1305+ cwd = root ,
1306+ env = _host_environment ({"OTEL_SDK_DISABLED" : "true" }),
1307+ capture_output = True ,
1308+ text = True ,
1309+ timeout = 120 ,
1310+ check = False ,
1311+ )
1312+ return result .returncode == 0
12921313 # Retrieval-index contracts are represented by the exact source
12931314 # fingerprint written only after a successful targeted sync.
12941315 return integration == "retrieval-index"
@@ -1348,6 +1369,18 @@ def integrate(runtime_id: str) -> bool:
13481369 "cybersecurity.skills" : "cybersecurity-skills" ,
13491370 }.get (runtime_id )
13501371 _retrieval_command ("sync" , * ([source ] if source else []))
1372+ elif integration == "persephone" :
1373+ bun = _binary ("bun" , Path .home () / ".bun" / "bin" / "bun" )
1374+ _run (
1375+ [bun , "install" , "--frozen-lockfile" ],
1376+ cwd = item ["root" ],
1377+ environment = _host_environment ({"OTEL_SDK_DISABLED" : "true" }),
1378+ )
1379+ _run (
1380+ [bun , "src/cli.ts" , "init" ],
1381+ cwd = item ["root" ],
1382+ environment = _host_environment ({"OTEL_SDK_DISABLED" : "true" }),
1383+ )
13511384 elif integration == "firecrawl-cli" :
13521385 _ensure_shell_environment ()
13531386 _integrate_firecrawl ()
@@ -1377,10 +1410,12 @@ def integrate(runtime_id: str) -> bool:
13771410 "integration" : integration ,
13781411 },
13791412 )
1380- print (
1381- f"{ item ['label' ]} : integration applied. "
1382- "Continue configuring or restart Hermes when ready."
1413+ next_step = (
1414+ "Configure ~/.config/persephone, then install or start its user service."
1415+ if integration == "persephone"
1416+ else "Continue configuring or restart Hermes when ready."
13831417 )
1418+ print (f"{ item ['label' ]} : integration applied. { next_step } " )
13841419 return True
13851420
13861421
@@ -1400,6 +1435,7 @@ def integrate_all() -> None:
14001435 "humanizer.skills" ,
14011436 "cybersecurity.skills" ,
14021437 "interface.skills" ,
1438+ "persephone.control" ,
14031439 )
14041440 installed = {item ["id" ]: item for item in load_runtime_management ()}
14051441 for runtime_id in ordered :
0 commit comments