import { defineAction } from "@agent-native/core/action"; import { readAppState } from "@agent-native/core/application-state"; import { z } from "zod"; export default defineAction({ description: "Read the Chat app's current navigation state. Basic navigation is already included in ; use this action only when you need a fresh read.", schema: z.object({}), http: false, readOnly: true, run: async () => { const navigation = await readAppState("navigation"); const screen: Record = {}; if (navigation) screen.navigation = navigation; if (Object.keys(screen).length === 0) { return "No application state found. Is the app running?"; } return screen; }, });