The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(free-tier): setup.ready carries the failure block flat, the shape setup.status already spreads
kshitijk4poor658f3191472e
diff --git a/apps/shared/src/gateway-contract.generated.ts b/apps/shared/src/gateway-contract.generated.tsindex e6bd64dc3a9..8c1f85edd50 100644--- a/apps/shared/src/gateway-contract.generated.ts+++ b/apps/shared/src/gateway-contract.generated.ts@@ -3838,6 +3838,9 @@ export interface SetupReadyPayload {has_identity: booleanother_providers: booleanerror?: string+ error_code?: string | null+ retryable?: boolean | null+ retry_after?: number | nullfinished_at: number[key: string]: unknown}diff --git a/apps/shared/src/gateway-contract.openrpc.json b/apps/shared/src/gateway-contract.openrpc.jsonindex 543fda53b7b..a05d5905fe5 100644--- a/apps/shared/src/gateway-contract.openrpc.json+++ b/apps/shared/src/gateway-contract.openrpc.json@@ -27293,6 +27293,42 @@"title": "Error","type": "string"},+ "error_code": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ],+ "default": null,+ "title": "Error Code"+ },+ "retryable": {+ "anyOf": [+ {+ "type": "boolean"+ },+ {+ "type": "null"+ }+ ],+ "default": null,+ "title": "Retryable"+ },+ "retry_after": {+ "anyOf": [+ {+ "type": "integer"+ },+ {+ "type": "null"+ }+ ],+ "default": null,+ "title": "Retry After"+ },"finished_at": {"title": "Finished At","type": "number"diff --git a/hermes_cli/free_tier_bootstrap.py b/hermes_cli/free_tier_bootstrap.pyindex c77cd719887..ea7f21514c1 100644--- a/hermes_cli/free_tier_bootstrap.py+++ b/hermes_cli/free_tier_bootstrap.py@@ -45,7 +45,11 @@ class SetupRecord:finished_at: float = field(default_factory=time.time)def as_payload(self) -> Dict[str, Any]:- return asdict(self)+ # The broadcast carries the failure block flat, the same shape ``setup.status`` spreads,+ # so a client keys on ``error_code`` identically whichever surface it read.+ payload = asdict(self)+ payload.update(payload.pop("failure"))+ return payloaddef failure_fields(self) -> Dict[str, Any]:return dict(self.failure)diff --git a/tui_gateway/contracts/events.py b/tui_gateway/contracts/events.pyindex 6904f690dab..85c8b16881e 100644--- a/tui_gateway/contracts/events.py+++ b/tui_gateway/contracts/events.py@@ -72,6 +72,10 @@ class SetupReadyPayload(OpenPayload):has_identity: boolother_providers: boolerror: str = ""+ # Present only when the free-tier mint did not happen (``anon_auth.MintFailure.as_payload``).+ error_code: str | None = None+ retryable: bool | None = None+ retry_after: int | None = Nonefinished_at: float