Files
semif-agent/seeds/time/date/skill.py
T
gabby e9a7fc73ee scheduler/gateway: carry skill identity structurally, not in action_log
Skill bodies prefixed their own `category.name` into `ActionResult.action_log`,
which duplicated the runner's deterministic summary prefix and leaked the name
into the text the gateways speak. Identity is not data for the output string.

- bodies (seeds, canned replies, housekeeping meta skills) write only the real
  result; the runner already owns the `category.name:` summary prefix
- `run_queue`/`submit_request`/`answer` now return a structured `SchedulerReply`
  (status, text, run_id, skill_ref, result); the gateway reads `skill_ref` and
  `result` from it instead of regex-parsing them back out of the summary
- drop the gateway's `_SKILL_REF`/`_LEADING_RUN_ID` parsing helpers
- fix a latent double-prefix when a failed run had an empty action_log
- CODEGEN.md: generated bodies must not prefix the skill name
2026-10-07 00:30:37 +00:00

22 lines
682 B
Python

"""Report today's date.
Real local compute: reads the host clock and formats the calendar date in the
user's timezone — the top-level `timezone` config value (an IANA name) when set,
otherwise the host's local timezone. No external service.
"""
from __future__ import annotations
from semif_agent.skills import ActionResult
from semif_agent.timers import local_now
INTEGRATION = {"service": "local_clock", "transport": "compute", "config_vars": []}
CONTRACT = {}
def act(ctx, request):
today = local_now(ctx.config).date()
message = f"Today is {today.strftime('%A, %B %d, %Y')} ({today.isoformat()})."
return ActionResult(action_log=message, new_state=message)