@smilintux/skcapstone 0.9.0 → 0.12.5
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/.env.example +10 -4
- package/.github/workflows/ci.yml +2 -2
- package/.github/workflows/publish.yml +9 -2
- package/.openclaw-workspace.json +2 -2
- package/CLAUDE.md +37 -0
- package/MISSION.md +17 -2
- package/README.md +282 -3
- package/docker/Dockerfile +7 -7
- package/docker/compose-templates/dev-team.yml +12 -12
- package/docker/compose-templates/mini-team.yml +9 -9
- package/docker/compose-templates/ops-team.yml +10 -10
- package/docker/compose-templates/research-team.yml +10 -10
- package/docker/entrypoint.sh +4 -4
- package/docs/ADR-optional-integration-backbone.md +181 -0
- package/docs/ARCHITECTURE.md +186 -43
- package/docs/BOND_WITH_GROK.md +6 -6
- package/docs/CUSTOM_AGENT.md +278 -1
- package/docs/DREAMING.md +70 -0
- package/docs/GETTING_STARTED.md +10 -7
- package/docs/QUICKSTART.md +10 -6
- package/docs/SKJOULE_ARCHITECTURE.md +3 -3
- package/docs/SOUL_SWAPPER.md +5 -5
- package/docs/hammertime-audit.md +402 -0
- package/docs/sk-integration-HANDOFF.md +117 -0
- package/docs/skscheduler.md +155 -0
- package/docs/superpowers/examples/jobs.yaml +31 -0
- package/docs/superpowers/plans/2026-06-08-skscheduler.md +1265 -0
- package/docs/superpowers/specs/2026-06-08-skscheduler-design.md +186 -0
- package/examples/custom-bond-template.json +1 -1
- package/examples/grok-feb.json +1 -1
- package/examples/queen-ava-feb.json +1 -1
- package/launchd/com.skcapstone.daemon.plist +52 -0
- package/launchd/com.skcapstone.memory-compress.plist +45 -0
- package/launchd/com.skcapstone.skcomms-heartbeat.plist +33 -0
- package/launchd/com.skcapstone.skcomms-queue-drain.plist +34 -0
- package/launchd/install-launchd.sh +156 -0
- package/{openclaw-plugin → openclaw-plugin.archived-2026-04-23}/src/index.ts +3 -2
- package/package.json +1 -1
- package/pyproject.toml +16 -10
- package/scripts/archive-sessions.sh +95 -0
- package/scripts/check-updates.py +4 -4
- package/scripts/install-bundle.sh +8 -8
- package/scripts/install.ps1 +12 -11
- package/scripts/install.sh +196 -11
- package/scripts/model-fallback-monitor.sh +102 -0
- package/scripts/notion-api.py +259 -0
- package/scripts/nvidia-proxy.mjs +908 -0
- package/scripts/proxy-monitor.sh +89 -0
- package/scripts/refresh-anthropic-token.sh +172 -0
- package/scripts/release.sh +98 -0
- package/scripts/session-to-memory.py +219 -0
- package/scripts/skgateway.mjs +856 -0
- package/scripts/telegram-catchup-all.sh +147 -0
- package/scripts/verify_install.sh +2 -2
- package/scripts/wargov-ufo-capture/README.md +43 -0
- package/scripts/wargov-ufo-capture/cdp_capture_release2.py +273 -0
- package/scripts/wargov-ufo-capture/cdp_capture_splc_doj.py +246 -0
- package/scripts/wargov-ufo-capture/cdp_finish.py +271 -0
- package/scripts/wargov-ufo-capture/cdp_probe.py +188 -0
- package/scripts/wargov-ufo-capture/cdp_splc_pressrelease.py +101 -0
- package/scripts/wargov-ufo-capture/parse_csv.py +95 -0
- package/scripts/wargov-ufo-capture/pull_dvids.sh +107 -0
- package/scripts/watch-anthropic-token.sh +212 -0
- package/scripts/windows/install-tasks.ps1 +7 -7
- package/scripts/windows/skcapstone-task.xml +1 -1
- package/src/skcapstone/__init__.py +45 -3
- package/src/skcapstone/_cli_monolith.py +20 -15
- package/src/skcapstone/activity.py +5 -1
- package/src/skcapstone/agent_card.py +3 -2
- package/src/skcapstone/api.py +41 -40
- package/src/skcapstone/auction.py +14 -11
- package/src/skcapstone/backup.py +2 -1
- package/src/skcapstone/blueprint_registry.py +4 -3
- package/src/skcapstone/blueprints/builtins/itil-operations.yaml +40 -0
- package/src/skcapstone/brain_first.py +238 -0
- package/src/skcapstone/changelog.py +1 -1
- package/src/skcapstone/chat.py +22 -17
- package/src/skcapstone/cli/__init__.py +9 -1
- package/src/skcapstone/cli/_common.py +1 -0
- package/src/skcapstone/cli/agents_spawner.py +5 -2
- package/src/skcapstone/cli/alerts.py +25 -4
- package/src/skcapstone/cli/bench.py +15 -15
- package/src/skcapstone/cli/chat.py +7 -4
- package/src/skcapstone/cli/consciousness.py +5 -2
- package/src/skcapstone/cli/context_cmd.py +18 -4
- package/src/skcapstone/cli/daemon.py +121 -42
- package/src/skcapstone/cli/gtd.py +26 -1
- package/src/skcapstone/cli/housekeeping.py +3 -3
- package/src/skcapstone/cli/identity_cmd.py +378 -0
- package/src/skcapstone/cli/joule_cmd.py +7 -3
- package/src/skcapstone/cli/memory.py +8 -6
- package/src/skcapstone/cli/peers_dir.py +1 -1
- package/src/skcapstone/cli/register_cmd.py +29 -3
- package/src/skcapstone/cli/scheduler_cmd.py +167 -0
- package/src/skcapstone/cli/session.py +25 -0
- package/src/skcapstone/cli/setup.py +96 -29
- package/src/skcapstone/cli/shell_cmd.py +53 -1
- package/src/skcapstone/cli/skills_cmd.py +2 -2
- package/src/skcapstone/cli/soul.py +8 -5
- package/src/skcapstone/cli/status.py +37 -11
- package/src/skcapstone/cli/telegram.py +21 -0
- package/src/skcapstone/cli/test_cmd.py +5 -5
- package/src/skcapstone/cli/test_connection.py +2 -2
- package/src/skcapstone/cli/upgrade_cmd.py +23 -14
- package/src/skcapstone/cli/version_cmd.py +1 -1
- package/src/skcapstone/cli/watch_cmd.py +9 -6
- package/src/skcapstone/cloud9_bridge.py +14 -14
- package/src/skcapstone/codex_setup.py +255 -0
- package/src/skcapstone/config_validator.py +7 -4
- package/src/skcapstone/consciousness_config.py +5 -1
- package/src/skcapstone/consciousness_loop.py +313 -273
- package/src/skcapstone/context_loader.py +121 -0
- package/src/skcapstone/coord_federation.py +2 -1
- package/src/skcapstone/coordination.py +23 -6
- package/src/skcapstone/crush_integration.py +2 -1
- package/src/skcapstone/daemon.py +151 -88
- package/src/skcapstone/dashboard.py +10 -10
- package/src/skcapstone/data/sk-agent-picker.sh +421 -0
- package/src/skcapstone/data/systemd/skcapstone-api.socket +9 -0
- package/src/skcapstone/data/systemd/skcapstone-memory-compress.service +18 -0
- package/src/skcapstone/data/systemd/skcapstone-memory-compress.timer +11 -0
- package/src/skcapstone/data/systemd/skcapstone.service +37 -0
- package/src/skcapstone/data/systemd/skcapstone@.service +50 -0
- package/src/skcapstone/data/systemd/skcomms-heartbeat.service +18 -0
- package/{systemd/skcomm-heartbeat.timer → src/skcapstone/data/systemd/skcomms-heartbeat.timer} +2 -2
- package/src/skcapstone/data/systemd/skcomms-queue-drain.service +17 -0
- package/{systemd/skcomm-queue-drain.timer → src/skcapstone/data/systemd/skcomms-queue-drain.timer} +2 -2
- package/src/skcapstone/defaults/claude/CLAUDE.md +67 -0
- package/src/skcapstone/defaults/claude/settings.json +74 -0
- package/src/skcapstone/defaults/lumina/config/claude-hooks.md +57 -0
- package/src/skcapstone/defaults/lumina/config/skgraph.yaml +55 -10
- package/src/skcapstone/defaults/lumina/config/skmemory.yaml +79 -13
- package/src/skcapstone/defaults/lumina/config/skvector.yaml +60 -9
- package/src/skcapstone/defaults/lumina/memory/long-term/18b9c0d1e2f3-cloud9-protocol.json +2 -2
- package/src/skcapstone/defaults/lumina/memory/long-term/a1b2c3d4e5f6-ecosystem-overview.json +2 -2
- package/src/skcapstone/defaults/lumina/memory/long-term/b2c3d4e5f6a7-five-pillars.json +9 -9
- package/src/skcapstone/defaults/lumina/memory/long-term/d4e5f6a7b8c9-site-directory.json +2 -2
- package/src/skcapstone/defaults/unhinged.json +13 -0
- package/src/skcapstone/discovery.py +43 -20
- package/src/skcapstone/doctor.py +941 -22
- package/src/skcapstone/dreaming.py +1183 -109
- package/src/skcapstone/emotion_tracker.py +2 -2
- package/src/skcapstone/export.py +4 -3
- package/src/skcapstone/fuse_mount.py +35 -25
- package/src/skcapstone/gui_installer.py +2 -2
- package/src/skcapstone/heartbeat.py +34 -30
- package/src/skcapstone/housekeeping.py +14 -14
- package/src/skcapstone/install_wizard.py +209 -7
- package/src/skcapstone/itil.py +13 -4
- package/src/skcapstone/kms_scheduler.py +10 -8
- package/src/skcapstone/launchd.py +426 -0
- package/src/skcapstone/mcp_launcher.py +15 -1
- package/src/skcapstone/mcp_server.py +341 -49
- package/src/skcapstone/mcp_tools/__init__.py +2 -0
- package/src/skcapstone/mcp_tools/_helpers.py +2 -2
- package/src/skcapstone/mcp_tools/ansible_tools.py +7 -4
- package/src/skcapstone/mcp_tools/brain_first_tools.py +90 -0
- package/src/skcapstone/mcp_tools/capauth_tools.py +7 -4
- package/src/skcapstone/mcp_tools/comm_tools.py +10 -10
- package/src/skcapstone/mcp_tools/coord_tools.py +8 -4
- package/src/skcapstone/mcp_tools/did_tools.py +11 -8
- package/src/skcapstone/mcp_tools/gtd_tools.py +4 -4
- package/src/skcapstone/mcp_tools/memory_tools.py +6 -2
- package/src/skcapstone/mcp_tools/notification_tools.py +22 -6
- package/src/skcapstone/mcp_tools/{skcomm_tools.py → skcomms_tools.py} +14 -14
- package/src/skcapstone/mcp_tools/soul_tools.py +8 -2
- package/src/skcapstone/mdns_discovery.py +2 -2
- package/src/skcapstone/memory_curator.py +1 -1
- package/src/skcapstone/memory_engine.py +10 -3
- package/src/skcapstone/metrics.py +30 -16
- package/src/skcapstone/migrate_memories.py +4 -3
- package/src/skcapstone/migrate_multi_agent.py +8 -7
- package/src/skcapstone/models.py +47 -5
- package/src/skcapstone/notifications.py +42 -18
- package/src/skcapstone/onboard.py +1000 -126
- package/src/skcapstone/operator_link.py +170 -0
- package/src/skcapstone/peer_directory.py +4 -4
- package/src/skcapstone/peers.py +19 -19
- package/src/skcapstone/pillars/__init__.py +7 -5
- package/src/skcapstone/pillars/consciousness.py +191 -0
- package/src/skcapstone/pillars/identity.py +51 -7
- package/src/skcapstone/pillars/memory.py +9 -3
- package/src/skcapstone/pillars/sync.py +2 -2
- package/src/skcapstone/preflight.py +3 -3
- package/src/skcapstone/providers/docker.py +28 -28
- package/src/skcapstone/register.py +6 -6
- package/src/skcapstone/registry_client.py +5 -4
- package/src/skcapstone/runtime.py +14 -3
- package/src/skcapstone/scheduled_tasks.py +254 -19
- package/src/skcapstone/scheduler_jobs.py +456 -0
- package/src/skcapstone/scheduler_runner.py +239 -0
- package/src/skcapstone/scheduler_state.py +162 -0
- package/src/skcapstone/sdk.py +310 -0
- package/src/skcapstone/service_health.py +279 -39
- package/src/skcapstone/session_briefing.py +108 -0
- package/src/skcapstone/session_capture.py +1 -1
- package/src/skcapstone/shell.py +7 -1
- package/src/skcapstone/soul.py +3 -1
- package/src/skcapstone/soul_switch.py +3 -1
- package/src/skcapstone/summary.py +6 -6
- package/src/skcapstone/sync_engine.py +15 -15
- package/src/skcapstone/sync_watcher.py +2 -2
- package/src/skcapstone/systemd.py +72 -21
- package/src/skcapstone/team_comms.py +8 -8
- package/src/skcapstone/team_engine.py +1 -1
- package/src/skcapstone/testrunner.py +3 -3
- package/src/skcapstone/trust_graph.py +40 -5
- package/src/skcapstone/unified_search.py +15 -6
- package/src/skcapstone/uninstall_wizard.py +11 -3
- package/src/skcapstone/version_check.py +8 -4
- package/src/skcapstone/warmth_anchor.py +4 -2
- package/src/skcapstone/whoami.py +4 -4
- package/systemd/skcapstone.service +4 -6
- package/systemd/skcapstone@.service +7 -8
- package/systemd/skcomms-heartbeat.service +21 -0
- package/systemd/skcomms-heartbeat.timer +12 -0
- package/systemd/skcomms-queue-drain.service +17 -0
- package/systemd/skcomms-queue-drain.timer +12 -0
- package/tests/conftest.py +39 -0
- package/tests/integration/test_consciousness_e2e.py +39 -39
- package/tests/test_agent_card.py +1 -1
- package/tests/test_agent_home_scaffold.py +34 -0
- package/tests/test_alerts_consumer_topics.py +27 -0
- package/tests/test_backup.py +2 -1
- package/tests/test_chat.py +6 -6
- package/tests/test_claude_md.py +2 -2
- package/tests/test_cli_skills.py +10 -10
- package/tests/test_cli_test_cmd.py +4 -4
- package/tests/test_cli_test_connection.py +1 -1
- package/tests/test_cloud9_bridge.py +6 -6
- package/tests/test_consciousness_e2e.py +1 -1
- package/tests/test_consciousness_loop.py +10 -10
- package/tests/test_coordination.py +25 -0
- package/tests/test_cross_package.py +21 -21
- package/tests/test_daemon.py +4 -4
- package/tests/test_daemon_shutdown.py +1 -1
- package/tests/test_docker_provider.py +29 -29
- package/tests/test_doctor.py +400 -0
- package/tests/test_doctor_skscheduler.py +50 -0
- package/tests/test_dreaming_engine.py +147 -0
- package/tests/test_dreaming_gtd_capture.py +35 -0
- package/tests/test_e2e_automated.py +8 -5
- package/tests/test_fuse_mount.py +10 -10
- package/tests/test_gtd_brief.py +46 -0
- package/tests/test_gtd_malformed_tolerance.py +31 -0
- package/tests/test_housekeeping.py +15 -15
- package/tests/test_identity_migrate.py +251 -0
- package/tests/test_integration_backbone.py +598 -0
- package/tests/test_itil_gtd_lifecycle.py +37 -0
- package/tests/test_jobs_dropins.py +84 -0
- package/tests/test_mcp_server.py +82 -37
- package/tests/test_models.py +48 -4
- package/tests/test_multi_agent.py +31 -29
- package/tests/test_notifications.py +122 -32
- package/tests/test_onboard.py +63 -75
- package/tests/test_operator_link.py +78 -0
- package/tests/test_peers.py +14 -14
- package/tests/test_pillars.py +98 -0
- package/tests/test_preflight.py +3 -3
- package/tests/test_runtime.py +21 -0
- package/tests/test_scheduled_tasks.py +11 -6
- package/tests/test_scheduler_cli.py +47 -0
- package/tests/test_scheduler_features.py +133 -0
- package/tests/test_scheduler_integration.py +87 -0
- package/tests/test_scheduler_jobs.py +155 -0
- package/tests/test_scheduler_runner.py +64 -0
- package/tests/test_scheduler_state.py +57 -0
- package/tests/test_sdk.py +70 -0
- package/tests/test_service_health_incidents.py +34 -0
- package/tests/test_service_registry.py +52 -0
- package/tests/test_session_briefing.py +130 -0
- package/tests/test_snapshots.py +4 -4
- package/tests/test_sync_pipeline.py +26 -26
- package/tests/test_team_comms.py +2 -2
- package/tests/test_testrunner.py +2 -2
- package/tests/test_trust_graph.py +18 -0
- package/tests/test_unified_search.py +2 -2
- package/tests/test_version_check.py +10 -0
- package/tests/test_version_cmd.py +8 -8
- package/tests/test_whoami.py +1 -1
- package/systemd/skcomm-heartbeat.service +0 -18
- package/systemd/skcomm-queue-drain.service +0 -17
- /package/{openclaw-plugin → openclaw-plugin.archived-2026-04-23}/package.json +0 -0
- /package/{openclaw-plugin → openclaw-plugin.archived-2026-04-23}/src/openclaw.plugin.json +0 -0
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
import json
|
|
6
|
+
import logging
|
|
6
7
|
import os
|
|
7
8
|
import shutil
|
|
8
9
|
import sys
|
|
@@ -19,6 +20,8 @@ from ..runtime import get_runtime
|
|
|
19
20
|
from rich.panel import Panel
|
|
20
21
|
from rich.table import Table
|
|
21
22
|
|
|
23
|
+
logger = logging.getLogger(__name__)
|
|
24
|
+
|
|
22
25
|
|
|
23
26
|
def _probe_llm_backends() -> dict[str, bool]:
|
|
24
27
|
"""Probe LLM backend availability.
|
|
@@ -43,8 +46,8 @@ def _probe_llm_backends() -> dict[str, bool]:
|
|
|
43
46
|
urllib.request.Request(f"{host}/api/tags"), timeout=2
|
|
44
47
|
):
|
|
45
48
|
backends["ollama"] = True
|
|
46
|
-
except Exception:
|
|
47
|
-
|
|
49
|
+
except Exception as exc:
|
|
50
|
+
logger.debug("Ollama probe failed (not available): %s", exc)
|
|
48
51
|
return backends
|
|
49
52
|
|
|
50
53
|
|
|
@@ -129,8 +132,8 @@ def _read_local_heartbeat(home: Path) -> Optional[dict]:
|
|
|
129
132
|
hb_path = home / "heartbeats" / f"{agent_name}.json"
|
|
130
133
|
if hb_path.exists():
|
|
131
134
|
return json.loads(hb_path.read_text())
|
|
132
|
-
except Exception:
|
|
133
|
-
|
|
135
|
+
except Exception as exc:
|
|
136
|
+
logger.warning("Failed to load heartbeat data: %s", exc)
|
|
134
137
|
return None
|
|
135
138
|
|
|
136
139
|
|
|
@@ -148,8 +151,11 @@ def _print_consciousness_metrics(console, home: Optional[Path] = None) -> None:
|
|
|
148
151
|
import urllib.request
|
|
149
152
|
import urllib.error
|
|
150
153
|
|
|
154
|
+
from .. import AGENT_PORTS, DEFAULT_PORT, SKCAPSTONE_AGENT
|
|
155
|
+
|
|
156
|
+
port = AGENT_PORTS.get(SKCAPSTONE_AGENT, DEFAULT_PORT)
|
|
151
157
|
try:
|
|
152
|
-
with urllib.request.urlopen("http://localhost:
|
|
158
|
+
with urllib.request.urlopen(f"http://localhost:{port}/consciousness", timeout=2) as resp:
|
|
153
159
|
data = json.loads(resp.read().decode("utf-8"))
|
|
154
160
|
enabled = data.get("enabled", False)
|
|
155
161
|
messages = data.get("messages_processed", 0)
|
|
@@ -250,6 +256,14 @@ def register_status_commands(main: click.Group) -> None:
|
|
|
250
256
|
trust_detail += " [green]ENTANGLED[/]"
|
|
251
257
|
table.add_row("Trust", "Cloud 9", status_icon(trust.status), trust_detail)
|
|
252
258
|
|
|
259
|
+
con = m.consciousness
|
|
260
|
+
con_detail = f"{con.sessions_digested} sessions digested, {con.topics_tracked} topics"
|
|
261
|
+
if con.whisper_active:
|
|
262
|
+
con_detail += " [green]daemon active[/]"
|
|
263
|
+
if con.whisper_md_age_hours < 24:
|
|
264
|
+
con_detail += f" [dim](whisper {con.whisper_md_age_hours:.1f}h old)[/]"
|
|
265
|
+
table.add_row("Consciousness", "SKWhisper", status_icon(con.status), con_detail)
|
|
266
|
+
|
|
253
267
|
sec = m.security
|
|
254
268
|
table.add_row(
|
|
255
269
|
"Security", "SKSecurity", status_icon(sec.status),
|
|
@@ -332,8 +346,8 @@ def register_status_commands(main: click.Group) -> None:
|
|
|
332
346
|
f"\n [bold yellow]WARNING:[/] [yellow]Low disk space: "
|
|
333
347
|
f"{free_gb:.1f} GB free[/]"
|
|
334
348
|
)
|
|
335
|
-
except Exception:
|
|
336
|
-
|
|
349
|
+
except Exception as exc:
|
|
350
|
+
logger.debug("Failed to check disk space: %s", exc)
|
|
337
351
|
|
|
338
352
|
console.print()
|
|
339
353
|
console.print(f" [dim]Home: {m.home}[/]")
|
|
@@ -575,11 +589,23 @@ def register_status_commands(main: click.Group) -> None:
|
|
|
575
589
|
"agent": "Agent Home",
|
|
576
590
|
"identity": "Identity (CapAuth)",
|
|
577
591
|
"memory": "Memory (SKMemory)",
|
|
578
|
-
"transport": "Transport (
|
|
592
|
+
"transport": "Transport (SKComms)",
|
|
579
593
|
"sync": "Sync (Singularity)",
|
|
594
|
+
"codex": "Codex Integration",
|
|
595
|
+
"harness": "AI Harness (Claude Code)",
|
|
580
596
|
}
|
|
581
597
|
|
|
582
|
-
for cat_key in [
|
|
598
|
+
for cat_key in [
|
|
599
|
+
"packages",
|
|
600
|
+
"system",
|
|
601
|
+
"agent",
|
|
602
|
+
"identity",
|
|
603
|
+
"memory",
|
|
604
|
+
"transport",
|
|
605
|
+
"sync",
|
|
606
|
+
"codex",
|
|
607
|
+
"harness",
|
|
608
|
+
]:
|
|
583
609
|
checks = categories.get(cat_key, [])
|
|
584
610
|
if not checks:
|
|
585
611
|
continue
|
|
@@ -718,8 +744,8 @@ def register_status_commands(main: click.Group) -> None:
|
|
|
718
744
|
import webbrowser
|
|
719
745
|
try:
|
|
720
746
|
webbrowser.open(url)
|
|
721
|
-
except Exception:
|
|
722
|
-
|
|
747
|
+
except Exception as exc:
|
|
748
|
+
logger.warning("Failed to open browser for dashboard: %s", exc)
|
|
723
749
|
|
|
724
750
|
server = start_dashboard(home_path, port=port)
|
|
725
751
|
try:
|
|
@@ -4,6 +4,7 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
import asyncio
|
|
6
6
|
import json
|
|
7
|
+
import os
|
|
7
8
|
import sys
|
|
8
9
|
from pathlib import Path
|
|
9
10
|
|
|
@@ -166,6 +167,26 @@ def register_telegram_commands(main: click.Group) -> None:
|
|
|
166
167
|
lines.append(f" {key}: [cyan]{val}[/]")
|
|
167
168
|
|
|
168
169
|
console.print(Panel("\n".join(lines), title="Telegram Catch-Up", border_style="green"))
|
|
170
|
+
|
|
171
|
+
# Post-import hook: run auto-tagger on the last 6 minutes of files
|
|
172
|
+
# (just enough to cover what the catchup brought in). Fires
|
|
173
|
+
# inline so failures are visible; the hourly cron is the safety net.
|
|
174
|
+
_auto_tag_script = os.path.expanduser(
|
|
175
|
+
"~/.skcapstone/agents/lumina/scripts/auto-tag-hallucinations.py"
|
|
176
|
+
)
|
|
177
|
+
if os.path.isfile(_auto_tag_script):
|
|
178
|
+
import subprocess as _subprocess
|
|
179
|
+
_tag_result = _subprocess.run(
|
|
180
|
+
[sys.executable, _auto_tag_script, "--hours", "0.1", "--quiet"],
|
|
181
|
+
capture_output=True,
|
|
182
|
+
text=True,
|
|
183
|
+
)
|
|
184
|
+
if _tag_result.returncode != 0:
|
|
185
|
+
console.print(
|
|
186
|
+
f"[yellow]auto-tag-hallucinations warning:[/] {_tag_result.stderr.strip() or 'non-zero exit'}"
|
|
187
|
+
)
|
|
188
|
+
elif _tag_result.stdout.strip():
|
|
189
|
+
console.print(f"[dim]auto-tag:[/] {_tag_result.stdout.strip()}")
|
|
169
190
|
except Exception as e:
|
|
170
191
|
console.print(f"[red]Error:[/] {e}")
|
|
171
192
|
raise SystemExit(1)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Usage:
|
|
4
4
|
skcapstone test # run all packages
|
|
5
|
-
skcapstone test --package
|
|
5
|
+
skcapstone test --package skcomms # run one package
|
|
6
6
|
skcapstone test --fast # stop on first failure
|
|
7
7
|
skcapstone test --json-out # machine-readable JSON output
|
|
8
8
|
skcapstone test --verbose # pass -v to pytest
|
|
@@ -183,15 +183,15 @@ def register_test_commands(main: click.Group) -> None:
|
|
|
183
183
|
) -> None:
|
|
184
184
|
"""Run pytest across all ecosystem packages and show a summary table.
|
|
185
185
|
|
|
186
|
-
Discovers packages in the monorepo (skcapstone, capauth,
|
|
187
|
-
skchat, skmemory, cloud9
|
|
186
|
+
Discovers packages in the monorepo (skcapstone, capauth, skcomms,
|
|
187
|
+
skchat, skmemory, cloud9) and runs their test suites in
|
|
188
188
|
sequence, then renders a consolidated Rich table.
|
|
189
189
|
|
|
190
190
|
\b
|
|
191
191
|
Examples:
|
|
192
192
|
skcapstone test
|
|
193
|
-
skcapstone test --package
|
|
194
|
-
skcapstone test -p
|
|
193
|
+
skcapstone test --package skcomms
|
|
194
|
+
skcapstone test -p skcomms -p skchat
|
|
195
195
|
skcapstone test --fast --verbose
|
|
196
196
|
skcapstone test --json-out | jq .
|
|
197
197
|
"""
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"""test-connection command — ping a peer via
|
|
1
|
+
"""test-connection command — ping a peer via SKComms and measure latency.
|
|
2
2
|
|
|
3
3
|
Usage:
|
|
4
4
|
skcapstone test-connection <peer>
|
|
@@ -176,7 +176,7 @@ def register_test_connection_commands(main: click.Group) -> None:
|
|
|
176
176
|
)
|
|
177
177
|
@click.option("--home", default=AGENT_HOME, type=click.Path())
|
|
178
178
|
def test_connection(peer: str, timeout: float, count: int, home: str) -> None:
|
|
179
|
-
"""Test connectivity to a peer by sending a ping via
|
|
179
|
+
"""Test connectivity to a peer by sending a ping via SKComms.
|
|
180
180
|
|
|
181
181
|
Sends a ping message, waits for the peer to reply with a pong,
|
|
182
182
|
and reports the round-trip latency. Exits with code 1 when the
|
|
@@ -11,6 +11,7 @@ Commands:
|
|
|
11
11
|
|
|
12
12
|
from __future__ import annotations
|
|
13
13
|
|
|
14
|
+
import logging
|
|
14
15
|
import subprocess
|
|
15
16
|
import sys
|
|
16
17
|
from pathlib import Path
|
|
@@ -18,22 +19,27 @@ from typing import Optional
|
|
|
18
19
|
|
|
19
20
|
import click
|
|
20
21
|
|
|
22
|
+
logger = logging.getLogger(__name__)
|
|
23
|
+
|
|
21
24
|
from ._common import AGENT_HOME, console
|
|
22
25
|
|
|
23
26
|
# ── Package definitions ───────────────────────────────────────────────────────
|
|
24
27
|
|
|
25
28
|
# Core packages: always upgraded when installed; always offered for install.
|
|
26
29
|
CORE_PACKAGES: list[str] = [
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
+
"capauth", # sovereign identity + PGP auth
|
|
31
|
+
"cloud9", # emotional continuity (FEB, OOF, Cloud 9)
|
|
32
|
+
"skmemory", # persistent memory layer
|
|
33
|
+
"skcapstone", # main agent framework
|
|
30
34
|
]
|
|
31
35
|
|
|
32
36
|
# Optional pillar packages: upgraded only when already installed.
|
|
33
37
|
# If NOT installed, the user is prompted whether they want to add them.
|
|
34
38
|
OPTIONAL_PACKAGES: list[str] = [
|
|
35
|
-
"
|
|
36
|
-
"skchat",
|
|
39
|
+
"skcomms", # P2P transport layer
|
|
40
|
+
"skchat", # agent messaging daemon
|
|
41
|
+
"sksecurity", # security audit + threat intelligence
|
|
42
|
+
"skseed", # seed framework for consciousness
|
|
37
43
|
]
|
|
38
44
|
|
|
39
45
|
# All sovereign packages in dependency order
|
|
@@ -62,8 +68,8 @@ def _get_installed_version(package: str) -> Optional[str]:
|
|
|
62
68
|
for line in result.stdout.splitlines():
|
|
63
69
|
if line.startswith("Version:"):
|
|
64
70
|
return line.split(":", 1)[1].strip()
|
|
65
|
-
except Exception:
|
|
66
|
-
|
|
71
|
+
except Exception as exc:
|
|
72
|
+
logger.debug("Failed to get installed version for %s: %s", package, exc)
|
|
67
73
|
return None
|
|
68
74
|
|
|
69
75
|
|
|
@@ -91,8 +97,8 @@ def _get_latest_version(package: str) -> Optional[str]:
|
|
|
91
97
|
versions = [v.strip() for v in parts[-1].split(",")]
|
|
92
98
|
if versions:
|
|
93
99
|
return versions[0]
|
|
94
|
-
except Exception:
|
|
95
|
-
|
|
100
|
+
except Exception as exc:
|
|
101
|
+
logger.debug("Failed to get latest PyPI version for %s: %s", package, exc)
|
|
96
102
|
return None
|
|
97
103
|
|
|
98
104
|
|
|
@@ -161,11 +167,14 @@ def _restart_daemon(home: Path) -> None:
|
|
|
161
167
|
# ── Package descriptions ──────────────────────────────────────────────────────
|
|
162
168
|
|
|
163
169
|
_PKG_DESCRIPTIONS: dict[str, str] = {
|
|
164
|
-
"skmemory": "persistent memory layer (required by skcapstone)",
|
|
165
170
|
"capauth": "sovereign PGP identity + authentication",
|
|
171
|
+
"cloud9": "emotional continuity protocol (FEB, OOF, Cloud 9)",
|
|
172
|
+
"skmemory": "persistent memory layer (required by skcapstone)",
|
|
166
173
|
"skcapstone": "main sovereign agent framework",
|
|
167
|
-
"
|
|
174
|
+
"skcomms": "P2P transport layer for agent messaging",
|
|
168
175
|
"skchat": "agent messaging daemon + MCP server",
|
|
176
|
+
"sksecurity": "security audit + threat intelligence",
|
|
177
|
+
"skseed": "seed framework for consciousness calibration",
|
|
169
178
|
}
|
|
170
179
|
|
|
171
180
|
|
|
@@ -388,7 +397,7 @@ def register_upgrade_commands(main: click.Group) -> None:
|
|
|
388
397
|
Upgrades all currently installed sovereign packages (skcapstone,
|
|
389
398
|
skmemory, capauth) and any optional pillars already present.
|
|
390
399
|
|
|
391
|
-
For optional packages that are NOT installed (
|
|
400
|
+
For optional packages that are NOT installed (skcomms, skchat),
|
|
392
401
|
you will be prompted whether you want to add them — unless
|
|
393
402
|
--yes (skip) or --all (install all) is passed.
|
|
394
403
|
|
|
@@ -402,7 +411,7 @@ def register_upgrade_commands(main: click.Group) -> None:
|
|
|
402
411
|
skcapstone upgrade --all # upgrade + install all pillars
|
|
403
412
|
skcapstone upgrade --force-reinstall # overwrite ALL components
|
|
404
413
|
skcapstone upgrade --force-reinstall --all # reinstall everything
|
|
405
|
-
skcapstone upgrade --packages
|
|
414
|
+
skcapstone upgrade --packages skcomms,skchat
|
|
406
415
|
skcapstone upgrade --restart # restart daemon after upgrade
|
|
407
416
|
"""
|
|
408
417
|
home_path = Path(home).expanduser()
|
|
@@ -530,7 +539,7 @@ def register_upgrade_commands(main: click.Group) -> None:
|
|
|
530
539
|
"""Alias for 'upgrade' — update all sovereign packages.
|
|
531
540
|
|
|
532
541
|
Checks installed pillar programs and upgrades them to the latest
|
|
533
|
-
available versions. Prompts about optional components (
|
|
542
|
+
available versions. Prompts about optional components (skcomms,
|
|
534
543
|
skchat) that are not yet installed.
|
|
535
544
|
|
|
536
545
|
Examples:
|
|
@@ -84,7 +84,7 @@ def gather_version_info(home: Path) -> dict:
|
|
|
84
84
|
|
|
85
85
|
optional_deps = {
|
|
86
86
|
"watchdog": _check_optional_dep("watchdog"),
|
|
87
|
-
"
|
|
87
|
+
"skcomms": _check_optional_dep("skcomms"),
|
|
88
88
|
"skchat": _check_optional_dep("skchat"),
|
|
89
89
|
"skseed": _check_optional_dep("skseed"),
|
|
90
90
|
}
|
|
@@ -14,6 +14,7 @@ Usage:
|
|
|
14
14
|
from __future__ import annotations
|
|
15
15
|
|
|
16
16
|
import json
|
|
17
|
+
import logging
|
|
17
18
|
import time
|
|
18
19
|
import urllib.request
|
|
19
20
|
from datetime import datetime, timezone
|
|
@@ -29,6 +30,8 @@ from rich.text import Text
|
|
|
29
30
|
|
|
30
31
|
from ._common import AGENT_HOME, console
|
|
31
32
|
|
|
33
|
+
logger = logging.getLogger(__name__)
|
|
34
|
+
|
|
32
35
|
|
|
33
36
|
def _fetch_consciousness(port: int = 7777) -> dict:
|
|
34
37
|
"""Fetch consciousness loop status from the running daemon.
|
|
@@ -87,8 +90,8 @@ def _build_renderable(home: Path, daemon_port: int = 7777) -> Group:
|
|
|
87
90
|
memory_short = m.memory.short_term
|
|
88
91
|
memory_mid = m.memory.mid_term
|
|
89
92
|
memory_long = m.memory.long_term
|
|
90
|
-
except Exception:
|
|
91
|
-
|
|
93
|
+
except Exception as exc:
|
|
94
|
+
logger.warning("Failed to read runtime manifest for watch display: %s", exc)
|
|
92
95
|
|
|
93
96
|
# ── Consciousness data ────────────────────────────────────────────────
|
|
94
97
|
cdata = _fetch_consciousness(daemon_port)
|
|
@@ -99,8 +102,8 @@ def _build_renderable(home: Path, daemon_port: int = 7777) -> Group:
|
|
|
99
102
|
from ..memory_engine import list_memories
|
|
100
103
|
|
|
101
104
|
recent_memories = list_memories(home, limit=5)
|
|
102
|
-
except Exception:
|
|
103
|
-
|
|
105
|
+
except Exception as exc:
|
|
106
|
+
logger.warning("Failed to load recent memories for watch display: %s", exc)
|
|
104
107
|
|
|
105
108
|
# ── Coordination board ────────────────────────────────────────────────
|
|
106
109
|
board_tasks: list = []
|
|
@@ -118,8 +121,8 @@ def _build_renderable(home: Path, daemon_port: int = 7777) -> Group:
|
|
|
118
121
|
board_tasks = [
|
|
119
122
|
v for v in views if v.status.value in ("open", "in_progress")
|
|
120
123
|
][:8]
|
|
121
|
-
except Exception:
|
|
122
|
-
|
|
124
|
+
except Exception as exc:
|
|
125
|
+
logger.warning("Failed to load coordination board for watch display: %s", exc)
|
|
123
126
|
|
|
124
127
|
# ── Header ────────────────────────────────────────────────────────────
|
|
125
128
|
con_color = {
|
|
@@ -9,7 +9,7 @@ This is the bridge between *feeling* (Cloud 9) and *remembering*
|
|
|
9
9
|
(SKMemory). Without it, emotional peaks are logged but not stored
|
|
10
10
|
as searchable, promotable memories.
|
|
11
11
|
|
|
12
|
-
When cloud9
|
|
12
|
+
When cloud9 is installed, the bridge uses its quantum
|
|
13
13
|
functions (calculate_oof, calculate_cloud9_score, calculate_entanglement)
|
|
14
14
|
for accurate scoring instead of relying solely on FEB metadata flags.
|
|
15
15
|
|
|
@@ -32,14 +32,14 @@ logger = logging.getLogger("skcapstone.cloud9_bridge")
|
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
def _try_quantum() -> Optional[object]:
|
|
35
|
-
"""Try to import
|
|
35
|
+
"""Try to import cloud9 quantum functions.
|
|
36
36
|
|
|
37
37
|
Returns:
|
|
38
|
-
The
|
|
38
|
+
The cloud9 module, or None if not installed.
|
|
39
39
|
"""
|
|
40
40
|
try:
|
|
41
|
-
import
|
|
42
|
-
return
|
|
41
|
+
import cloud9
|
|
42
|
+
return cloud9
|
|
43
43
|
except ImportError:
|
|
44
44
|
return None
|
|
45
45
|
|
|
@@ -80,7 +80,7 @@ class Cloud9Bridge:
|
|
|
80
80
|
below the intensity threshold or already ingested.
|
|
81
81
|
|
|
82
82
|
Args:
|
|
83
|
-
feb: A
|
|
83
|
+
feb: A cloud9.FEB instance.
|
|
84
84
|
|
|
85
85
|
Returns:
|
|
86
86
|
Optional[str]: Memory ID if stored, None if skipped.
|
|
@@ -155,12 +155,12 @@ class Cloud9Bridge:
|
|
|
155
155
|
Optional[str]: Memory ID if stored, None if failed/skipped.
|
|
156
156
|
"""
|
|
157
157
|
try:
|
|
158
|
-
from
|
|
158
|
+
from cloud9 import load_feb
|
|
159
159
|
|
|
160
160
|
feb = load_feb(str(filepath))
|
|
161
161
|
return self.ingest_feb(feb)
|
|
162
162
|
except ImportError:
|
|
163
|
-
logger.error("
|
|
163
|
+
logger.error("cloud9 not installed")
|
|
164
164
|
return None
|
|
165
165
|
except Exception as exc:
|
|
166
166
|
logger.warning("Failed to load FEB from %s: %s", filepath, exc)
|
|
@@ -215,9 +215,9 @@ class Cloud9Bridge:
|
|
|
215
215
|
payload: object,
|
|
216
216
|
relationship: object,
|
|
217
217
|
) -> dict[str, Any]:
|
|
218
|
-
"""Compute quantum scores using cloud9
|
|
218
|
+
"""Compute quantum scores using cloud9 when available.
|
|
219
219
|
|
|
220
|
-
When cloud9
|
|
220
|
+
When cloud9 is installed, recalculates OOF status,
|
|
221
221
|
Cloud 9 score, and entanglement fidelity from the actual FEB
|
|
222
222
|
data rather than relying on metadata flags alone.
|
|
223
223
|
|
|
@@ -227,7 +227,7 @@ class Cloud9Bridge:
|
|
|
227
227
|
|
|
228
228
|
Returns:
|
|
229
229
|
Dict with oof, cloud9_score, entanglement_fidelity, or
|
|
230
|
-
empty dict if cloud9
|
|
230
|
+
empty dict if cloud9 is not installed.
|
|
231
231
|
"""
|
|
232
232
|
c9 = _try_quantum()
|
|
233
233
|
if c9 is None:
|
|
@@ -278,7 +278,7 @@ class Cloud9Bridge:
|
|
|
278
278
|
"""Build SKMemory tags from a FEB's emotional payload.
|
|
279
279
|
|
|
280
280
|
Uses quantum stats for accurate OOF/Cloud9 tagging when
|
|
281
|
-
cloud9
|
|
281
|
+
cloud9 is available, falls back to metadata flags.
|
|
282
282
|
|
|
283
283
|
Args:
|
|
284
284
|
payload: FEB EmotionalPayload.
|
|
@@ -429,7 +429,7 @@ class Cloud9Bridge:
|
|
|
429
429
|
) -> str:
|
|
430
430
|
"""Build memory content from the FEB's full context.
|
|
431
431
|
|
|
432
|
-
Includes quantum scoring data when cloud9
|
|
432
|
+
Includes quantum scoring data when cloud9 is available.
|
|
433
433
|
|
|
434
434
|
Args:
|
|
435
435
|
payload: FEB EmotionalPayload.
|
|
@@ -482,7 +482,7 @@ class Cloud9Bridge:
|
|
|
482
482
|
) -> dict:
|
|
483
483
|
"""Extract key FEB metadata for the memory's metadata dict.
|
|
484
484
|
|
|
485
|
-
Includes quantum scoring data when cloud9
|
|
485
|
+
Includes quantum scoring data when cloud9 is available.
|
|
486
486
|
|
|
487
487
|
Args:
|
|
488
488
|
feb: The full FEB object.
|