From 6c28920dec15e6df45456e2b7616c28d0c203074 Mon Sep 17 00:00:00 2001
From: MikeDiam
Date: Tue, 2 Jun 2026 15:41:12 +0300
Subject: [PATCH 01/11] fix(example): unblock arbitrum-london typecheck on
typescript 6
TypeScript 6 (merged in #13) regressed the example app typecheck, which CI does not cover (CI builds packages only). Two errors blocked next build:
- TS2882: side-effect imports of @txkit/themes/base, @txkit/themes/dark and globals.css need ambient module declarations. Added globals.d.ts.
- TS2769: the as-const tool definitions typed required as a readonly tuple, not assignable to the Anthropic SDK Tool input_schema required string[]. Switched to satisfies Anthropic.Tool, which keeps literal types without readonly.
---
examples/arbitrum-london/globals.d.ts | 10 ++++++++++
examples/arbitrum-london/src/agent/tools.ts | 5 +++--
2 files changed, 13 insertions(+), 2 deletions(-)
create mode 100644 examples/arbitrum-london/globals.d.ts
diff --git a/examples/arbitrum-london/globals.d.ts b/examples/arbitrum-london/globals.d.ts
new file mode 100644
index 00000000..a319edb4
--- /dev/null
+++ b/examples/arbitrum-london/globals.d.ts
@@ -0,0 +1,10 @@
+// Ambient declarations for side-effect imports. TypeScript 6 (TS2882) requires
+// type declarations for `import 'x'` style side-effect imports of non-code
+// modules. The app imports CSS and the @txkit/themes stylesheet entrypoints
+// purely for their styling side effects.
+
+declare module '*.css'
+
+declare module '@txkit/themes/base'
+
+declare module '@txkit/themes/dark'
diff --git a/examples/arbitrum-london/src/agent/tools.ts b/examples/arbitrum-london/src/agent/tools.ts
index 8b79ebb2..ea81dfb6 100644
--- a/examples/arbitrum-london/src/agent/tools.ts
+++ b/examples/arbitrum-london/src/agent/tools.ts
@@ -1,3 +1,4 @@
+import type Anthropic from '@anthropic-ai/sdk'
import { z } from 'zod'
@@ -64,7 +65,7 @@ export const PENDLE_TOOL_DEFINITION = {
},
required: [ 'tokenIn', 'tokenOut', 'amountIn' ],
},
-} as const
+} satisfies Anthropic.Tool
export const RWA_TOOL_DEFINITION = {
name: 'prepare_rwa_buy',
@@ -78,4 +79,4 @@ export const RWA_TOOL_DEFINITION = {
},
required: [ 'asset', 'amount' ],
},
-} as const
+} satisfies Anthropic.Tool
From 6d9f94b3cfef958cd4ee818b638fa75185300de7 Mon Sep 17 00:00:00 2001
From: MikeDiam
Date: Tue, 2 Jun 2026 15:41:13 +0300
Subject: [PATCH 02/11] feat(example): surface deploy-pending state on the
pendle flow
Before deploy, deployed.json holds placeholder addresses and preparing an envelope returns a 503; the flow only surfaced that reactively after a visitor typed a prompt. DeployPendingBanner reads the checkIsAgentPolicyGateDeployed / checkIsMockPendleRouterDeployed predicates and shows a preview-mode banner up front, rendering nothing once both contracts hold real addresses.
---
examples/arbitrum-london/app/flow-a/page.tsx | 4 ++
.../src/ui/DeployPendingBanner.tsx | 51 +++++++++++++++++++
2 files changed, 55 insertions(+)
create mode 100644 examples/arbitrum-london/src/ui/DeployPendingBanner.tsx
diff --git a/examples/arbitrum-london/app/flow-a/page.tsx b/examples/arbitrum-london/app/flow-a/page.tsx
index 8d683492..f585d203 100644
--- a/examples/arbitrum-london/app/flow-a/page.tsx
+++ b/examples/arbitrum-london/app/flow-a/page.tsx
@@ -1,5 +1,7 @@
import Link from 'next/link'
+import { DeployPendingBanner } from '@/src/ui/DeployPendingBanner'
+
import { PendleAgentChat } from './PendleAgentChat'
@@ -24,6 +26,8 @@ const FlowA = () => {
+
+