real seed skills: replace fake email/tracking built-ins with calendar.next_event

email.compose and tracking.check were hardcoded fakes (draft files / local
JSON, no real service) that shadowed the authoring path for real skills.
Remove them, delete their data fixtures and config keys, and ship a real
starter integration instead: seeds/calendar/next_event, a Nextcloud CalDAV
body in the SKILL.md folder format (PROPFIND calendar discovery + SemIf
calendar choice, calendar-query REPORT with server-side recurrence
expansion, all-day/TZID parsing, honest failures) with a hermetic
skill.test.py. merge_seed_store loads seeds into every tree at startup;
recorded config lands in gitignored data/skills/, and generated bodies
replace seeds of the same name. Only service-free response.reject stays
built-in.
This commit is contained in:
Denton Social committed 2026-09-26 03:17:11 -05:00
1 parent dde034f1b4
commit b66d1e325a
19 files changed
+877 -101

No files matched your search

+33 -6
View File
@@ -8,7 +8,6 @@ local LLM endpoint. If either is unavailable this fails loudly — no mocking.
import json
import time
from pathlib import Path
import pytest
@@ -57,16 +56,46 @@ def require_real(config: dict):
pytest.fail(f"real engine unavailable: {exc}")
def _install_tracking_fixture(scheduler):
"""A deterministic runnable leaf for end-to-end runs.
The pipeline tests need a target whose flow is stable; the hardcoded
email/tracking examples were removed because they faked their integrations.
This injects a runnable tracking leaf instead — the decision engine, the
self-assessment LLM, and the decision log all remain real.
"""
def predict(ctx, request):
return Prediction(text="", decisions=[])
def act(ctx, request, prediction):
return ActionResult(
action_log="tracking fixture: checked the package status",
new_state="package status checked",
)
scheduler.tree["tracking"] = [
Skill(
name="tracking.check",
category="tracking",
description="Check the delivery status of a package.",
predict=predict,
act=act,
)
]
def test_pipeline_end_to_end(tmp_path):
config = load_config()
require_real(config)
config["log"] = str(tmp_path / "decisions.jsonl")
config["trace"] = str(tmp_path / "runs.jsonl")
scheduler, config = build_scheduler(config)
_install_tracking_fixture(scheduler)
inputs = [
"send my girlfriend an email that says I'm going to be late to the party",
"tell me if my package was delivered",
"what is the delivery status of my parcel",
]
for text in inputs:
status, detail = scheduler.submit(text)
@@ -95,9 +124,6 @@ def test_pipeline_end_to_end(tmp_path):
skills = scheduler.status()
assert "queue:" in skills
contacts_path = Path(config.get("skills", {}).get("contacts", "data/contacts.json"))
assert contacts_path.is_file()
def test_busy_choice_path(tmp_path):
config = load_config()
@@ -105,9 +131,10 @@ def test_busy_choice_path(tmp_path):
config["log"] = str(tmp_path / "decisions.jsonl")
config["trace"] = str(tmp_path / "runs.jsonl")
scheduler, config = build_scheduler(config)
_install_tracking_fixture(scheduler)
scheduler.busy("driving on the freeway", skill="driving")
status, detail = scheduler.submit("send my girlfriend an email that says I'm going to be late")
status, detail = scheduler.submit("tell me if my package was delivered")
print(f"[{status}] {detail}")
assert status in ("preempted", "queued", "dropped")
scheduler.idle()