From bcc7941e1003b9b678aeb3d2addd32158feeda27 Mon Sep 17 00:00:00 2001 From: Lakshman Patel Date: Fri, 31 Jul 2026 07:31:31 +0530 Subject: [PATCH 1/6] chore: sync eyrie submodule to 1f085f5 Picks up CI repair: protocol router dedupe, Agnes/LongCat/MiniMax compat, concentrate-payg routing, registry SortOrder uniqueness. --- external/eyrie | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/eyrie b/external/eyrie index a59eb786..1f085f5e 160000 --- a/external/eyrie +++ b/external/eyrie @@ -1 +1 @@ -Subproject commit a59eb786e4ab771faf0da45f2267e8b54cc415a3 +Subproject commit 1f085f5e946c07d848bf21c05932e993c7ceb70a From 0df42203f972ddd2993f96f896415fff318c1594 Mon Sep 17 00:00:00 2001 From: Lakshman Patel Date: Fri, 31 Jul 2026 07:35:00 +0530 Subject: [PATCH 2/6] chore: bump eyrie and tok module versions to match submodules - eyrie v0.1.4-0.20260731015117-1f085f5e946c (CI repair, compat configs) - tok v0.1.5-0.20260731011234-7a7c3cbae89b --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 1cf8a76b..2a8ed0e6 100644 --- a/go.mod +++ b/go.mod @@ -11,11 +11,11 @@ require ( charm.land/bubbles/v2 v2.1.0 charm.land/bubbletea/v2 v2.0.7 charm.land/lipgloss/v2 v2.0.3 - github.com/GrayCodeAI/eyrie v0.1.4-0.20260727034005-5b332a4d6be5 + github.com/GrayCodeAI/eyrie v0.1.4-0.20260731015117-1f085f5e946c github.com/GrayCodeAI/hawk-core-contracts v0.1.11 github.com/GrayCodeAI/inspect v0.0.0-20260726091806-08f3151d5738 github.com/GrayCodeAI/sight v0.0.0-20260726091804-84c96edfc589 - github.com/GrayCodeAI/tok v0.1.5-0.20260727034347-2afc7f549e35 + github.com/GrayCodeAI/tok v0.1.5-0.20260731011234-7a7c3cbae89b github.com/GrayCodeAI/yaad v0.2.1-0.20260727172552-f0aa1699d6b0 github.com/alecthomas/chroma/v2 v2.26.1 github.com/bwmarrin/discordgo v0.28.1 diff --git a/go.sum b/go.sum index c89ed274..aed86978 100644 --- a/go.sum +++ b/go.sum @@ -16,8 +16,8 @@ github.com/BobuSumisu/aho-corasick v1.0.3 h1:uuf+JHwU9CHP2Vx+wAy6jcksJThhJS9ehR8 github.com/BobuSumisu/aho-corasick v1.0.3/go.mod h1:hm4jLcvZKI2vRF2WDU1N4p/jpWtpOzp3nLmi9AzX/XE= github.com/BurntSushi/toml v1.6.0 h1:dRaEfpa2VI55EwlIW72hMRHdWouJeRF7TPYhI+AUQjk= github.com/BurntSushi/toml v1.6.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= -github.com/GrayCodeAI/eyrie v0.1.4-0.20260727034005-5b332a4d6be5 h1:EpZ2JmtzR6gD8perOTr0tCLqK0Rxc50DIQZEC+zdej0= -github.com/GrayCodeAI/eyrie v0.1.4-0.20260727034005-5b332a4d6be5/go.mod h1:rnouStzgv5q8hSvLdsVQazBkLBuYbm+WGCwRcAc5zXE= +github.com/GrayCodeAI/eyrie v0.1.4-0.20260731015117-1f085f5e946c h1:G6VjyLoDkrywY89F0TFv2IuliUNz9P/f7XIOuU7hpbE= +github.com/GrayCodeAI/eyrie v0.1.4-0.20260731015117-1f085f5e946c/go.mod h1:5nYjoCXPoE4NnhcxoqOyriomd15bkStYGGrC4tsBp1c= github.com/GrayCodeAI/hawk-core-contracts v0.1.11 h1:qv6zIoi4InxYxAwgFZrmoberjvEBdB50nSKTd4qVyBE= github.com/GrayCodeAI/hawk-core-contracts v0.1.11/go.mod h1:BXbh68YrCf+s9HVqND5F8DAvl2MnE5NcOwZZZB56HGA= github.com/GrayCodeAI/hawk-mcpkit v0.1.5 h1:gskBd3miHN063aXXP4dEhzn5x0HM9mzYAnTmM+ug/nE= @@ -26,8 +26,8 @@ github.com/GrayCodeAI/inspect v0.0.0-20260726091806-08f3151d5738 h1:T9mQS75wTtTq github.com/GrayCodeAI/inspect v0.0.0-20260726091806-08f3151d5738/go.mod h1:kSyO5gWDrBYKcYXHG4JNkJ/2yWAayAVPee8PIC24bX0= github.com/GrayCodeAI/sight v0.0.0-20260726091804-84c96edfc589 h1:gMXVRCqqdth6ziqFYnw8nXXbrD7LDtlgbGpryJZ0r1Q= github.com/GrayCodeAI/sight v0.0.0-20260726091804-84c96edfc589/go.mod h1:kSCQwmYLH/ek9xU81ITyUgeeoDJjigAC0dGYyAMmKmc= -github.com/GrayCodeAI/tok v0.1.5-0.20260727034347-2afc7f549e35 h1:ZZ/d14nKz8LPhtAWf7ADbmLuKw0lKLlIEc1D8eT1tFU= -github.com/GrayCodeAI/tok v0.1.5-0.20260727034347-2afc7f549e35/go.mod h1:/KTHlWg+qg8fDV8qRsLUfp4VKtt5seTyED1byxldBtE= +github.com/GrayCodeAI/tok v0.1.5-0.20260731011234-7a7c3cbae89b h1:HjAYJHkFSn3FxiZCGdJ2oUCNHoiiIw6fbk5d0ePn6tA= +github.com/GrayCodeAI/tok v0.1.5-0.20260731011234-7a7c3cbae89b/go.mod h1:/KTHlWg+qg8fDV8qRsLUfp4VKtt5seTyED1byxldBtE= github.com/GrayCodeAI/trace v0.1.4-0.20260726090743-c8165a1cc5f6 h1:bxDZibA5qXNXYXeIeu7E3HkLHp6M3MWl+CG5m5Y9wFw= github.com/GrayCodeAI/trace v0.1.4-0.20260726090743-c8165a1cc5f6/go.mod h1:beqoZrKbBAI9wQKR9/m9lLMrezwWaci/5OkT+AY8a7g= github.com/GrayCodeAI/yaad v0.2.1-0.20260727172552-f0aa1699d6b0 h1:jqNnsq2lq5CdZkyIL6jniiFuTRHiWPOPhlQZr37Zw2g= From 8e62565a37a7e67453c15d6b8f60ed10ecd1a238 Mon Sep 17 00:00:00 2001 From: Lakshman Patel Date: Fri, 31 Jul 2026 08:23:40 +0530 Subject: [PATCH 3/6] fix: keep tok token ceilings disabled by default on new trackers tok.NewUsageTracker now provides non-zero default ceilings. Zero the token ceilings in ensureTokUsageTracker (provider rate-limits own throughput) while preserving the optional lifecycle CostUSD budget cap. Fixes TestApplyTokUsageSettingsOverridesAndDisables. --- internal/engine/execution_graph_observations.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/internal/engine/execution_graph_observations.go b/internal/engine/execution_graph_observations.go index 3dfe3594..fb40099d 100644 --- a/internal/engine/execution_graph_observations.go +++ b/internal/engine/execution_graph_observations.go @@ -258,11 +258,17 @@ func (s *Session) ensureTokUsageTracker() *tok.UsageTracker { defer s.mu.Unlock() if s.tokUsage == nil { s.tokUsage = tok.NewUsageTracker() + // Default: token ceilings off (provider rate limits own throughput). + // Only the optional lifecycle budget cap is honored. + limits := s.tokUsage.GetLimits() + limits.HourlyTokens = 0 + limits.DailyTokens = 0 + limits.SessionTokens = 0 + limits.CostUSD = 0 if s.LifecycleSvc() != nil && s.LifecycleSvc().Limits() != nil { - limits := s.tokUsage.GetLimits() limits.CostUSD = s.LifecycleSvc().Limits().MaxBudgetUSD() - s.tokUsage.SetLimits(limits) } + s.tokUsage.SetLimits(limits) } return s.tokUsage } From fd50fb662a0308cfa4437e42e13faf7ddb0ad975 Mon Sep 17 00:00:00 2001 From: Lakshman Patel Date: Fri, 31 Jul 2026 08:32:39 +0530 Subject: [PATCH 4/6] fix: sync RegisteredProviderCount to eyrie's 26-provider registry --- internal/provider/gateway/gateway.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/provider/gateway/gateway.go b/internal/provider/gateway/gateway.go index a20f9fce..af3f055d 100644 --- a/internal/provider/gateway/gateway.go +++ b/internal/provider/gateway/gateway.go @@ -368,7 +368,7 @@ func IsCatalogCacheRequired(err error) bool { // RegisteredProviderCount exposes Eyrie's first-class provider count through // Hawk's single provider-runtime boundary. func RegisteredProviderCount() int { - return 22 + return 26 } func SecretStoreName() string { return eyrieengine.SecretStoreName() } From 4a82a6bbf1689cf21c5f538aad1206169dddf064 Mon Sep 17 00:00:00 2001 From: Lakshman Patel Date: Fri, 31 Jul 2026 08:47:30 +0530 Subject: [PATCH 5/6] fix: use icons.Alert() instead of raw dingbat emoji in stream_usage --- internal/engine/stream_usage.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/engine/stream_usage.go b/internal/engine/stream_usage.go index 4cd251a0..b0af9efe 100644 --- a/internal/engine/stream_usage.go +++ b/internal/engine/stream_usage.go @@ -7,6 +7,7 @@ import ( "time" "github.com/GrayCodeAI/hawk/internal/types" + "github.com/GrayCodeAI/hawk/internal/ui/icons" analytics "github.com/GrayCodeAI/hawk/internal/observability" ) @@ -110,7 +111,7 @@ func (s *Session) recordStreamUsage(ch chan<- StreamEvent, prompt, completion in for _, alert := range tracker.DrainAlerts() { ch <- StreamEvent{ Type: "content", - Content: fmt.Sprintf("\n⚠ Usage %s: %s\n", alert.Level, alert.Message), + Content: fmt.Sprintf("\n%s Usage %s: %s\n", icons.Alert(), alert.Level, alert.Message), } } } From cd6d043734152c79344cb8b0056b453d77f507cf Mon Sep 17 00:00:00 2001 From: Lakshman Patel Date: Fri, 31 Jul 2026 09:36:29 +0530 Subject: [PATCH 6/6] fix: keep tok limits fully disabled by default; refresh gateway count - ensureTokUsageTracker now zeroes all ceilings (including the default $10 lifecycle CostUSD budget) so a fresh session doesn't emit usage alerts. The lifecycle budget is applied opt-in via SetMaxBudgetUSD. This also resolves a channel deadlock in recordStreamUsage under the new tok DrainAlerts path. - Update documented RegisteredProviderCount from 22 to 26 to match eyrie's current provider registry and the setup-gateway count. - Update manpage_test expected provider count to 26. --- cmd/manpage_test.go | 2 +- internal/engine/execution_graph_observations.go | 16 +++++----------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/cmd/manpage_test.go b/cmd/manpage_test.go index 1b7478e3..e4add51d 100644 --- a/cmd/manpage_test.go +++ b/cmd/manpage_test.go @@ -7,7 +7,7 @@ import ( ) func TestProviderCountCopyMatchesRegistry(t *testing.T) { - const documentedProviderCount = 22 + const documentedProviderCount = 26 if got := registeredProviderCount(); got != documentedProviderCount { t.Fatalf("registered providers = %d, update documented count %d and this assertion", got, documentedProviderCount) } diff --git a/internal/engine/execution_graph_observations.go b/internal/engine/execution_graph_observations.go index fb40099d..98fa73f7 100644 --- a/internal/engine/execution_graph_observations.go +++ b/internal/engine/execution_graph_observations.go @@ -257,18 +257,12 @@ func (s *Session) ensureTokUsageTracker() *tok.UsageTracker { s.mu.Lock() defer s.mu.Unlock() if s.tokUsage == nil { - s.tokUsage = tok.NewUsageTracker() // Default: token ceilings off (provider rate limits own throughput). - // Only the optional lifecycle budget cap is honored. - limits := s.tokUsage.GetLimits() - limits.HourlyTokens = 0 - limits.DailyTokens = 0 - limits.SessionTokens = 0 - limits.CostUSD = 0 - if s.LifecycleSvc() != nil && s.LifecycleSvc().Limits() != nil { - limits.CostUSD = s.LifecycleSvc().Limits().MaxBudgetUSD() - } - s.tokUsage.SetLimits(limits) + // tok.NewUsageTracker ships non-zero defaults; explicitly disable them + // so a fresh session doesn't fire usage-alerts. Budget caps are opt-in + // via SetMaxBudgetUSD, which writes CostUSD into this tracker. + s.tokUsage = tok.NewUsageTracker() + s.tokUsage.SetLimits(tok.UsageLimits{}) } return s.tokUsage }