Unified Agent + reusable Go agent core.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: add local weekday to runtime meta

Lyric c91bc4f8 e03e2f18

+27 -2
+2 -1
internal/runtimeclock/meta.go
··· 5 5 ) 6 6 7 7 func WithRuntimeClockMeta(meta map[string]any, now time.Time) map[string]any { 8 - out := make(map[string]any, len(meta)+2) 8 + out := make(map[string]any, len(meta)+3) 9 9 for k, v := range meta { 10 10 out[k] = v 11 11 } 12 12 13 13 out["now_utc"] = now.UTC().Format(time.RFC3339) 14 14 out["now_local"] = now.Format(time.RFC3339) 15 + out["now_local_weekday"] = now.Weekday().String() 15 16 return out 16 17 }
+24
internal/runtimeclock/meta_test.go
··· 1 + package runtimeclock 2 + 3 + import ( 4 + "testing" 5 + "time" 6 + ) 7 + 8 + func TestWithRuntimeClockMetaAddsLocalWeekday(t *testing.T) { 9 + now := time.Date(2026, 4, 15, 17, 56, 42, 0, time.FixedZone("JST", 9*60*60)) 10 + 11 + meta := WithRuntimeClockMeta(map[string]any{ 12 + "trigger": "ui", 13 + }, now) 14 + 15 + if got := meta["now_local_weekday"]; got != "Wednesday" { 16 + t.Fatalf("now_local_weekday = %#v, want %q", got, "Wednesday") 17 + } 18 + if got := meta["now_local"]; got != "2026-04-15T17:56:42+09:00" { 19 + t.Fatalf("now_local = %#v, want %q", got, "2026-04-15T17:56:42+09:00") 20 + } 21 + if got := meta["now_utc"]; got != "2026-04-15T08:56:42Z" { 22 + t.Fatalf("now_utc = %#v, want %q", got, "2026-04-15T08:56:42Z") 23 + } 24 + }
+1 -1
internal/todo/reference_llm_test.go
··· 64 64 if runtime == nil { 65 65 t.Fatalf("missing runtime payload") 66 66 } 67 - for _, key := range []string{"now_utc", "now_local"} { 67 + for _, key := range []string{"now_utc", "now_local", "now_local_weekday"} { 68 68 v, _ := runtime[key].(string) 69 69 if strings.TrimSpace(v) == "" { 70 70 t.Fatalf("missing runtime clock field %q in runtime payload: %#v", key, runtime)