Files
LangBot/plugins/misc/ScheNotify/components/tools/get_current_time_str.yaml
T
afc426826d feat(plugins): add timezone config to ScheNotify for all tools (LANG-319) (#2894)
* feat(plugins): add timezone config to ScheNotify for all tools (LANG-319)

Add a `timezone` plugin config (IANA name, UTC, or an offset such as
UTC+8; empty keeps the server's local timezone). get_current_time_str
reports the time in it, schedule_notify interprets time_str in it, and
!sche / !dsche display reminder times in it. Reminders now store aware
instants, so the detached scheduler compares against UTC without reading
installation config. Bump to 0.2.7 and add tzdata.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-authored-by: multica-agent <[email protected]>

* fix(plugins): deliver ScheNotify reminders under audit-correlating SDKs (LANG-319)

The scheduler task was created with a copy of the scheduling invocation's
context, which carries the SDK's per-action audit correlation. SDKs that
close that correlation when the action returns (langbot-plugin 0.7.21,
pinned by Core) then rejected every delivery with "Plugin audit
invocation has ended", so no reminder was ever sent. Start the loop from
an empty context; it already re-enters the captured invocation.

Found during live acceptance; adds a regression test that relays the
audit correlation like the real handler.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-authored-by: multica-agent <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: multica-agent <[email protected]>
2026-11-05 23:54:13 +08:00

21 lines
716 B
YAML

apiVersion: v1
kind: Tool
metadata:
name: get_current_time_str
label:
en_US: Get Current Time
zh_Hans: 获取当前时间
description:
en_US: 'Get the current time in the configured timezone as a string'
zh_Hans: '获取配置时区下当前时间的字符串'
spec:
parameters:
type: object
properties: {}
required: []
llm_prompt: 'Get the current time in the configured timezone, e.g. "2026-01-01 08:00:00 (Asia/Shanghai, UTC+08:00)". Call this function before scheduling any notification to ensure you have the latest current time. Times passed to schedule_notify are in this same timezone.'
execution:
python:
path: get_current_time_str.py
attr: GetCurrentTimeStr