๐คฏ LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
โป๏ธ refactor: consolidate Hono routers (#18098)
Arvin Xue32e2efe2388
diff --git a/.agents/acceptance/PROJECT.md b/.agents/acceptance/PROJECT.mdindex 9bb35d84365..71c14284579 100644--- a/.agents/acceptance/PROJECT.md+++ b/.agents/acceptance/PROJECT.md@@ -18,8 +18,8 @@ Electron desktop shell, and a CLI (`lh`). Repo layout that matters for testing:- `apps/cli/` โ the `lh` CLI; runs from source (`bun src/index.ts`), no rebuild.**Standalone install** (see ยง6).- `packages/**`, `e2e`, `apps/server` โ covered by the root pnpm workspace.-- `src/` โ the SPA and shared web app; `src/server/` holds agent-hono /- workflows-hono.+- `src/` โ the SPA and shared web app; `apps/server/src/router-hono/` holds the+ Hono endpoint routers and standalone runtime.**The root pnpm workspace does NOT cover `apps/desktop` or `apps/cli`.**`pnpm-workspace.yaml` lists `packages/**`, `e2e`, `apps/server`, and onlydiff --git a/.agents/acceptance/references/dev-server.md b/.agents/acceptance/references/dev-server.mdindex 5492bb49e2c..b0686795edf 100644--- a/.agents/acceptance/references/dev-server.md+++ b/.agents/acceptance/references/dev-server.md@@ -78,7 +78,7 @@ in doubt.| Change location | Restart? || ----------------------------------------------- | -------- || `apps/server/src/` (routers, services, modules) | Yes |-| `src/server/` (agent-hono, workflows-hono) | Yes |+| `apps/server/src/router-hono/` | Yes || `packages/database/` (models) | Yes || `packages/types/` | Yes || `packages/prompts/` | Yes |diff --git a/.agents/skills/project-overview/SKILL.md b/.agents/skills/project-overview/SKILL.mdindex 52bcafb033c..9d1720db0ee 100644--- a/.agents/skills/project-overview/SKILL.md+++ b/.agents/skills/project-overview/SKILL.md@@ -57,7 +57,10 @@ git submodules.โ โโโ cli/ # LobeHub CLIโ โโโ desktop/ # Electron desktop appโ โโโ device-gateway/ # Device gateway service-โ โโโ server/ # Next.js-backed server: featureFlags, globalConfig, modules, routers, services, utils, workflows (`@/server/*` alias)+โ โโโ server/ # Next.js-backed server (`@/server/*` alias)+โ โโโ src/+โ โโโ router-hono/ # Hono endpoint routers and standalone runtime+โ โโโ ... # featureFlags, globalConfig, modules, routers, services, utils, workflowsโโโ docs/ # changelog, development, self-hosting, usageโโโ locales/ # en-US, zh-CN, ...โโโ packages/ # ~80 @lobechat/* workspace packages โ `ls` for the full set. Key ones:@@ -89,7 +92,6 @@ git submodules.โโโ business/ # Open-source stubs (client/server) โ cloud repo provides real implsโโโ features/ # Domain business componentsโโโ store/ # ~30 zustand stores โ `ls` for the full set- โโโ server/ # standalone-Hono server pieces only: agent-hono, workflows-hono (main backend lives in `apps/server`)โโโ ... # components, hooks, layout, libs, services, types, utils```diff --git a/apps/server/package.json b/apps/server/package.jsonindex ac8f952d851..3427655289f 100644--- a/apps/server/package.json+++ b/apps/server/package.json@@ -5,7 +5,7 @@"type": "module","scripts": {"build": "vite build --config viteHonoBuild.config.ts",- "dev": "vite-node --watch --config viteNodeServer.config.ts src/hono/dev.ts",+ "dev": "vite-node --watch --config viteNodeServer.config.ts src/router-hono/dev.ts","start": "node dist/standalone.js","type-check": "tsc --noEmit"}diff --git a/apps/server/src/agent-hono/handlers/__tests__/botCallback.test.ts b/apps/server/src/router-hono/agent/handlers/__tests__/botCallback.test.tssimilarity index 100%rename from apps/server/src/agent-hono/handlers/__tests__/botCallback.test.tsrename to apps/server/src/router-hono/agent/handlers/__tests__/botCallback.test.tsdiff --git a/apps/server/src/agent-hono/handlers/__tests__/gatewayCallback.test.ts b/apps/server/src/router-hono/agent/handlers/__tests__/gatewayCallback.test.tssimilarity index 100%rename from apps/server/src/agent-hono/handlers/__tests__/gatewayCallback.test.tsrename to apps/server/src/router-hono/agent/handlers/__tests__/gatewayCallback.test.tsdiff --git a/apps/server/src/agent-hono/handlers/__tests__/gatewayStart.test.ts b/apps/server/src/router-hono/agent/handlers/__tests__/gatewayStart.test.tssimilarity index 100%rename from apps/server/src/agent-hono/handlers/__tests__/gatewayStart.test.tsrename to apps/server/src/router-hono/agent/handlers/__tests__/gatewayStart.test.tsdiff --git a/apps/server/src/agent-hono/handlers/__tests__/messengerInstall.test.ts b/apps/server/src/router-hono/agent/handlers/__tests__/messengerInstall.test.tssimilarity index 100%rename from apps/server/src/agent-hono/handlers/__tests__/messengerInstall.test.tsrename to apps/server/src/router-hono/agent/handlers/__tests__/messengerInstall.test.tsdiff --git a/apps/server/src/agent-hono/handlers/__tests__/messengerOAuthCallback.test.ts b/apps/server/src/router-hono/agent/handlers/__tests__/messengerOAuthCallback.test.tssimilarity index 100%rename from apps/server/src/agent-hono/handlers/__tests__/messengerOAuthCallback.test.tsrename to apps/server/src/router-hono/agent/handlers/__tests__/messengerOAuthCallback.test.tsdiff --git a/apps/server/src/agent-hono/handlers/__tests__/platformWebhook.test.ts b/apps/server/src/router-hono/agent/handlers/__tests__/platformWebhook.test.tssimilarity index 100%rename from apps/server/src/agent-hono/handlers/__tests__/platformWebhook.test.tsrename to apps/server/src/router-hono/agent/handlers/__tests__/platformWebhook.test.tsdiff --git a/apps/server/src/agent-hono/handlers/__tests__/runStep.test.ts b/apps/server/src/router-hono/agent/handlers/__tests__/runStep.test.tssimilarity index 100%rename from apps/server/src/agent-hono/handlers/__tests__/runStep.test.tsrename to apps/server/src/router-hono/agent/handlers/__tests__/runStep.test.tsdiff --git a/apps/server/src/agent-hono/handlers/__tests__/subAgentCallback.test.ts b/apps/server/src/router-hono/agent/handlers/__tests__/subAgentCallback.test.tssimilarity index 100%rename from apps/server/src/agent-hono/handlers/__tests__/subAgentCallback.test.tsrename to apps/server/src/router-hono/agent/handlers/__tests__/subAgentCallback.test.tsdiff --git a/apps/server/src/agent-hono/handlers/__tests__/toolResult.test.ts b/apps/server/src/router-hono/agent/handlers/__tests__/toolResult.test.tssimilarity index 98%rename from apps/server/src/agent-hono/handlers/__tests__/toolResult.test.tsrename to apps/server/src/router-hono/agent/handlers/__tests__/toolResult.test.tsindex 4a545700295..98610c94f95 100644--- a/apps/server/src/agent-hono/handlers/__tests__/toolResult.test.ts+++ b/apps/server/src/router-hono/agent/handlers/__tests__/toolResult.test.ts@@ -2,7 +2,7 @@import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';// Import after mocks โ and import the handler file directly (not via the-// agent-hono barrel) so we don't trigger Hono module resolution. The handler+// agent router barrel) so we don't trigger Hono module resolution. The handler// only imports Hono types, which are erased at runtime.import { toolResult } from '../toolResult';diff --git a/apps/server/src/agent-hono/handlers/botCallback.ts b/apps/server/src/router-hono/agent/handlers/botCallback.tssimilarity index 100%rename from apps/server/src/agent-hono/handlers/botCallback.tsrename to apps/server/src/router-hono/agent/handlers/botCallback.tsdiff --git a/apps/server/src/agent-hono/handlers/execAgent.ts b/apps/server/src/router-hono/agent/handlers/execAgent.tssimilarity index 100%rename from apps/server/src/agent-hono/handlers/execAgent.tsrename to apps/server/src/router-hono/agent/handlers/execAgent.tsdiff --git a/apps/server/src/agent-hono/handlers/finalizeAbandoned.ts b/apps/server/src/router-hono/agent/handlers/finalizeAbandoned.tssimilarity index 100%rename from apps/server/src/agent-hono/handlers/finalizeAbandoned.tsrename to apps/server/src/router-hono/agent/handlers/finalizeAbandoned.tsdiff --git a/apps/server/src/agent-hono/handlers/gatewayCallback.ts b/apps/server/src/router-hono/agent/handlers/gatewayCallback.tssimilarity index 100%rename from apps/server/src/agent-hono/handlers/gatewayCallback.tsrename to apps/server/src/router-hono/agent/handlers/gatewayCallback.tsdiff --git a/apps/server/src/agent-hono/handlers/gatewayCron.ts b/apps/server/src/router-hono/agent/handlers/gatewayCron.tssimilarity index 100%rename from apps/server/src/agent-hono/handlers/gatewayCron.tsrename to apps/server/src/router-hono/agent/handlers/gatewayCron.tsdiff --git a/apps/server/src/agent-hono/handlers/gatewayStart.ts b/apps/server/src/router-hono/agent/handlers/gatewayStart.tssimilarity index 100%rename from apps/server/src/agent-hono/handlers/gatewayStart.tsrename to apps/server/src/router-hono/agent/handlers/gatewayStart.tsdiff --git a/apps/server/src/agent-hono/handlers/groupMemberCallback.ts b/apps/server/src/router-hono/agent/handlers/groupMemberCallback.tssimilarity index 100%rename from apps/server/src/agent-hono/handlers/groupMemberCallback.tsrename to apps/server/src/router-hono/agent/handlers/groupMemberCallback.tsdiff --git a/apps/server/src/agent-hono/handlers/messengerInstall.ts b/apps/server/src/router-hono/agent/handlers/messengerInstall.tssimilarity index 100%rename from apps/server/src/agent-hono/handlers/messengerInstall.tsrename to apps/server/src/router-hono/agent/handlers/messengerInstall.tsdiff --git a/apps/server/src/agent-hono/handlers/messengerOAuthCallback.ts b/apps/server/src/router-hono/agent/handlers/messengerOAuthCallback.tssimilarity index 100%rename from apps/server/src/agent-hono/handlers/messengerOAuthCallback.tsrename to apps/server/src/router-hono/agent/handlers/messengerOAuthCallback.tsdiff --git a/apps/server/src/agent-hono/handlers/messengerWebhook.ts b/apps/server/src/router-hono/agent/handlers/messengerWebhook.tssimilarity index 100%rename from apps/server/src/agent-hono/handlers/messengerWebhook.tsrename to apps/server/src/router-hono/agent/handlers/messengerWebhook.tsdiff --git a/apps/server/src/agent-hono/handlers/platformWebhook.ts b/apps/server/src/router-hono/agent/handlers/platformWebhook.tssimilarity index 100%rename from apps/server/src/agent-hono/handlers/platformWebhook.tsrename to apps/server/src/router-hono/agent/handlers/platformWebhook.tsdiff --git a/apps/server/src/agent-hono/handlers/runStep.ts b/apps/server/src/router-hono/agent/handlers/runStep.tssimilarity index 100%rename from apps/server/src/agent-hono/handlers/runStep.tsrename to apps/server/src/router-hono/agent/handlers/runStep.tsdiff --git a/apps/server/src/agent-hono/handlers/subAgentCallback.ts b/apps/server/src/router-hono/agent/handlers/subAgentCallback.tssimilarity index 100%rename from apps/server/src/agent-hono/handlers/subAgentCallback.tsrename to apps/server/src/router-hono/agent/handlers/subAgentCallback.tsdiff --git a/apps/server/src/agent-hono/handlers/toolResult.ts b/apps/server/src/router-hono/agent/handlers/toolResult.tssimilarity index 100%rename from apps/server/src/agent-hono/handlers/toolResult.tsrename to apps/server/src/router-hono/agent/handlers/toolResult.tsdiff --git a/apps/server/src/agent-hono/index.ts b/apps/server/src/router-hono/agent/index.tssimilarity index 100%rename from apps/server/src/agent-hono/index.tsrename to apps/server/src/router-hono/agent/index.tsdiff --git a/apps/server/src/agent-hono/middlewares/__tests__/bearerSecretAuth.test.ts b/apps/server/src/router-hono/agent/middlewares/__tests__/bearerSecretAuth.test.tssimilarity index 100%rename from apps/server/src/agent-hono/middlewares/__tests__/bearerSecretAuth.test.tsrename to apps/server/src/router-hono/agent/middlewares/__tests__/bearerSecretAuth.test.tsdiff --git a/apps/server/src/agent-hono/middlewares/__tests__/qstashAuth.test.ts b/apps/server/src/router-hono/agent/middlewares/__tests__/qstashAuth.test.tssimilarity index 100%rename from apps/server/src/agent-hono/middlewares/__tests__/qstashAuth.test.tsrename to apps/server/src/router-hono/agent/middlewares/__tests__/qstashAuth.test.tsdiff --git a/apps/server/src/agent-hono/middlewares/bearerSecretAuth.ts b/apps/server/src/router-hono/agent/middlewares/bearerSecretAuth.tssimilarity index 100%rename from apps/server/src/agent-hono/middlewares/bearerSecretAuth.tsrename to apps/server/src/router-hono/agent/middlewares/bearerSecretAuth.tsdiff --git a/apps/server/src/agent-hono/middlewares/qstashAuth.ts b/apps/server/src/router-hono/agent/middlewares/qstashAuth.tssimilarity index 100%rename from apps/server/src/agent-hono/middlewares/qstashAuth.tsrename to apps/server/src/router-hono/agent/middlewares/qstashAuth.tsdiff --git a/apps/server/src/agent-hono/middlewares/qstashOrApiKeyAuth.ts b/apps/server/src/router-hono/agent/middlewares/qstashOrApiKeyAuth.tssimilarity index 100%rename from apps/server/src/agent-hono/middlewares/qstashOrApiKeyAuth.tsrename to apps/server/src/router-hono/agent/middlewares/qstashOrApiKeyAuth.tsdiff --git a/apps/server/src/agent-hono/middlewares/serviceTokenAuth.ts b/apps/server/src/router-hono/agent/middlewares/serviceTokenAuth.tssimilarity index 100%rename from apps/server/src/agent-hono/middlewares/serviceTokenAuth.tsrename to apps/server/src/router-hono/agent/middlewares/serviceTokenAuth.tsdiff --git a/apps/server/src/hono/dev.ts b/apps/server/src/router-hono/dev.tssimilarity index 100%rename from apps/server/src/hono/dev.tsrename to apps/server/src/router-hono/dev.tsdiff --git a/apps/server/src/hono/index.ts b/apps/server/src/router-hono/index.tssimilarity index 56%rename from apps/server/src/hono/index.tsrename to apps/server/src/router-hono/index.tsindex 074239883e6..69b1dfef1a9 100644--- a/apps/server/src/hono/index.ts+++ b/apps/server/src/router-hono/index.ts@@ -17,9 +17,9 @@ app.get('/health', (c) =>}),);-app.all('/api/agent', (c) => fetchWith(c, () => import('../agent-hono')));-app.all('/api/agent/*', (c) => fetchWith(c, () => import('../agent-hono')));-app.all('/api/workflows', (c) => fetchWith(c, () => import('../workflows-hono')));-app.all('/api/workflows/*', (c) => fetchWith(c, () => import('../workflows-hono')));+app.all('/api/agent', (c) => fetchWith(c, () => import('./agent')));+app.all('/api/agent/*', (c) => fetchWith(c, () => import('./agent')));+app.all('/api/workflows', (c) => fetchWith(c, () => import('./workflows')));+app.all('/api/workflows/*', (c) => fetchWith(c, () => import('./workflows')));export default app;diff --git a/apps/server/src/hono/standalone.ts b/apps/server/src/router-hono/standalone.tssimilarity index 100%rename from apps/server/src/hono/standalone.tsrename to apps/server/src/router-hono/standalone.tsdiff --git a/apps/server/src/workflows-hono/agent-signal/handlers/__tests__/scheduleNightlyReview.test.ts b/apps/server/src/router-hono/workflows/agent-signal/handlers/__tests__/scheduleNightlyReview.test.tssimilarity index 100%rename from apps/server/src/workflows-hono/agent-signal/handlers/__tests__/scheduleNightlyReview.test.tsrename to apps/server/src/router-hono/workflows/agent-signal/handlers/__tests__/scheduleNightlyReview.test.tsdiff --git a/apps/server/src/workflows-hono/agent-signal/handlers/scheduleNightlyReview.ts b/apps/server/src/router-hono/workflows/agent-signal/handlers/scheduleNightlyReview.tssimilarity index 100%rename from apps/server/src/workflows-hono/agent-signal/handlers/scheduleNightlyReview.tsrename to apps/server/src/router-hono/workflows/agent-signal/handlers/scheduleNightlyReview.tsdiff --git a/apps/server/src/workflows-hono/agent-signal/index.ts b/apps/server/src/router-hono/workflows/agent-signal/index.tssimilarity index 100%rename from apps/server/src/workflows-hono/agent-signal/index.tsrename to apps/server/src/router-hono/workflows/agent-signal/index.tsdiff --git a/apps/server/src/workflows-hono/index.ts b/apps/server/src/router-hono/workflows/index.tssimilarity index 100%rename from apps/server/src/workflows-hono/index.tsrename to apps/server/src/router-hono/workflows/index.tsdiff --git a/apps/server/src/workflows-hono/memory-user-memory/index.ts b/apps/server/src/router-hono/workflows/memory-user-memory/index.tssimilarity index 100%rename from apps/server/src/workflows-hono/memory-user-memory/index.tsrename to apps/server/src/router-hono/workflows/memory-user-memory/index.tsdiff --git a/apps/server/src/workflows-hono/memory-user-memory/workflows/__tests__/hourly.test.ts b/apps/server/src/router-hono/workflows/memory-user-memory/workflows/__tests__/hourly.test.tssimilarity index 100%rename from apps/server/src/workflows-hono/memory-user-memory/workflows/__tests__/hourly.test.tsrename to apps/server/src/router-hono/workflows/memory-user-memory/workflows/__tests__/hourly.test.tsdiff --git a/apps/server/src/workflows-hono/memory-user-memory/workflows/__tests__/personaUpdate.test.ts b/apps/server/src/router-hono/workflows/memory-user-memory/workflows/__tests__/personaUpdate.test.tssimilarity index 100%rename from apps/server/src/workflows-hono/memory-user-memory/workflows/__tests__/personaUpdate.test.tsrename to apps/server/src/router-hono/workflows/memory-user-memory/workflows/__tests__/personaUpdate.test.tsdiff --git a/apps/server/src/workflows-hono/memory-user-memory/workflows/__tests__/processTopic.hourlyTask.test.ts b/apps/server/src/router-hono/workflows/memory-user-memory/workflows/__tests__/processTopic.hourlyTask.test.tssimilarity index 100%rename from apps/server/src/workflows-hono/memory-user-memory/workflows/__tests__/processTopic.hourlyTask.test.tsrename to apps/server/src/router-hono/workflows/memory-user-memory/workflows/__tests__/processTopic.hourlyTask.test.tsdiff --git a/apps/server/src/workflows-hono/memory-user-memory/workflows/__tests__/processTopics.hourlyTask.test.ts b/apps/server/src/router-hono/workflows/memory-user-memory/workflows/__tests__/processTopics.hourlyTask.test.tssimilarity index 100%rename from apps/server/src/workflows-hono/memory-user-memory/workflows/__tests__/processTopics.hourlyTask.test.tsrename to apps/server/src/router-hono/workflows/memory-user-memory/workflows/__tests__/processTopics.hourlyTask.test.tsdiff --git a/apps/server/src/workflows-hono/memory-user-memory/workflows/__tests__/processUserTopics.hourlyTask.test.ts b/apps/server/src/router-hono/workflows/memory-user-memory/workflows/__tests__/processUserTopics.hourlyTask.test.tssimilarity index 100%rename from apps/server/src/workflows-hono/memory-user-memory/workflows/__tests__/processUserTopics.hourlyTask.test.tsrename to apps/server/src/router-hono/workflows/memory-user-memory/workflows/__tests__/processUserTopics.hourlyTask.test.tsdiff --git a/apps/server/src/workflows-hono/memory-user-memory/workflows/__tests__/processUserTopics.test.ts b/apps/server/src/router-hono/workflows/memory-user-memory/workflows/__tests__/processUserTopics.test.tssimilarity index 100%rename from apps/server/src/workflows-hono/memory-user-memory/workflows/__tests__/processUserTopics.test.tsrename to apps/server/src/router-hono/workflows/memory-user-memory/workflows/__tests__/processUserTopics.test.tsdiff --git a/apps/server/src/workflows-hono/memory-user-memory/workflows/__tests__/processUsers.hourlyTask.test.ts b/apps/server/src/router-hono/workflows/memory-user-memory/workflows/__tests__/processUsers.hourlyTask.test.tssimilarity index 100%rename from apps/server/src/workflows-hono/memory-user-memory/workflows/__tests__/processUsers.hourlyTask.test.tsrename to apps/server/src/router-hono/workflows/memory-user-memory/workflows/__tests__/processUsers.hourlyTask.test.tsdiff --git a/apps/server/src/workflows-hono/memory-user-memory/workflows/__tests__/processUsers.test.ts b/apps/server/src/router-hono/workflows/memory-user-memory/workflows/__tests__/processUsers.test.tssimilarity index 100%rename from apps/server/src/workflows-hono/memory-user-memory/workflows/__tests__/processUsers.test.tsrename to apps/server/src/router-hono/workflows/memory-user-memory/workflows/__tests__/processUsers.test.tsdiff --git a/apps/server/src/workflows-hono/memory-user-memory/workflows/__tests__/runGuard.test.ts b/apps/server/src/router-hono/workflows/memory-user-memory/workflows/__tests__/runGuard.test.tssimilarity index 100%rename from apps/server/src/workflows-hono/memory-user-memory/workflows/__tests__/runGuard.test.tsrename to apps/server/src/router-hono/workflows/memory-user-memory/workflows/__tests__/runGuard.test.tsdiff --git a/apps/server/src/workflows-hono/memory-user-memory/workflows/hourly.ts b/apps/server/src/router-hono/workflows/memory-user-memory/workflows/hourly.tssimilarity index 100%rename from apps/server/src/workflows-hono/memory-user-memory/workflows/hourly.tsrename to apps/server/src/router-hono/workflows/memory-user-memory/workflows/hourly.tsdiff --git a/apps/server/src/workflows-hono/memory-user-memory/workflows/personaUpdate.ts b/apps/server/src/router-hono/workflows/memory-user-memory/workflows/personaUpdate.tssimilarity index 100%rename from apps/server/src/workflows-hono/memory-user-memory/workflows/personaUpdate.tsrename to apps/server/src/router-hono/workflows/memory-user-memory/workflows/personaUpdate.tsdiff --git a/apps/server/src/workflows-hono/memory-user-memory/workflows/processTopic.ts b/apps/server/src/router-hono/workflows/memory-user-memory/workflows/processTopic.tssimilarity index 100%rename from apps/server/src/workflows-hono/memory-user-memory/workflows/processTopic.tsrename to apps/server/src/router-hono/workflows/memory-user-memory/workflows/processTopic.tsdiff --git a/apps/server/src/workflows-hono/memory-user-memory/workflows/processTopics.ts b/apps/server/src/router-hono/workflows/memory-user-memory/workflows/processTopics.tssimilarity index 100%rename from apps/server/src/workflows-hono/memory-user-memory/workflows/processTopics.tsrename to apps/server/src/router-hono/workflows/memory-user-memory/workflows/processTopics.tsdiff --git a/apps/server/src/workflows-hono/memory-user-memory/workflows/processUserTopics.ts b/apps/server/src/router-hono/workflows/memory-user-memory/workflows/processUserTopics.tssimilarity index 100%rename from apps/server/src/workflows-hono/memory-user-memory/workflows/processUserTopics.tsrename to apps/server/src/router-hono/workflows/memory-user-memory/workflows/processUserTopics.tsdiff --git a/apps/server/src/workflows-hono/memory-user-memory/workflows/processUsers.ts b/apps/server/src/router-hono/workflows/memory-user-memory/workflows/processUsers.tssimilarity index 100%rename from apps/server/src/workflows-hono/memory-user-memory/workflows/processUsers.tsrename to apps/server/src/router-hono/workflows/memory-user-memory/workflows/processUsers.tsdiff --git a/apps/server/src/workflows-hono/memory-user-memory/workflows/runGuard.ts b/apps/server/src/router-hono/workflows/memory-user-memory/workflows/runGuard.tssimilarity index 100%rename from apps/server/src/workflows-hono/memory-user-memory/workflows/runGuard.tsrename to apps/server/src/router-hono/workflows/memory-user-memory/workflows/runGuard.tsdiff --git a/apps/server/src/workflows-hono/memory-user-memory/workflows/utils.ts b/apps/server/src/router-hono/workflows/memory-user-memory/workflows/utils.tssimilarity index 100%rename from apps/server/src/workflows-hono/memory-user-memory/workflows/utils.tsrename to apps/server/src/router-hono/workflows/memory-user-memory/workflows/utils.tsdiff --git a/apps/server/src/workflows-hono/middlewares/qstashAuth.ts b/apps/server/src/router-hono/workflows/middlewares/qstashAuth.tssimilarity index 100%rename from apps/server/src/workflows-hono/middlewares/qstashAuth.tsrename to apps/server/src/router-hono/workflows/middlewares/qstashAuth.tsdiff --git a/apps/server/src/workflows-hono/onboarding-task-recommendation/index.ts b/apps/server/src/router-hono/workflows/onboarding-task-recommendation/index.tssimilarity index 100%rename from apps/server/src/workflows-hono/onboarding-task-recommendation/index.tsrename to apps/server/src/router-hono/workflows/onboarding-task-recommendation/index.tsdiff --git a/apps/server/src/workflows-hono/onboarding-understanding/index.ts b/apps/server/src/router-hono/workflows/onboarding-understanding/index.tssimilarity index 100%rename from apps/server/src/workflows-hono/onboarding-understanding/index.tsrename to apps/server/src/router-hono/workflows/onboarding-understanding/index.tsdiff --git a/apps/server/src/workflows-hono/qstashClient.ts b/apps/server/src/router-hono/workflows/qstashClient.tssimilarity index 100%rename from apps/server/src/workflows-hono/qstashClient.tsrename to apps/server/src/router-hono/workflows/qstashClient.tsdiff --git a/apps/server/src/workflows-hono/task/handlers/__tests__/scheduledTopicDispatch.test.ts b/apps/server/src/router-hono/workflows/task/handlers/__tests__/scheduledTopicDispatch.test.tssimilarity index 100%rename from apps/server/src/workflows-hono/task/handlers/__tests__/scheduledTopicDispatch.test.tsrename to apps/server/src/router-hono/workflows/task/handlers/__tests__/scheduledTopicDispatch.test.tsdiff --git a/apps/server/src/workflows-hono/task/handlers/heartbeatTick.ts b/apps/server/src/router-hono/workflows/task/handlers/heartbeatTick.tssimilarity index 100%rename from apps/server/src/workflows-hono/task/handlers/heartbeatTick.tsrename to apps/server/src/router-hono/workflows/task/handlers/heartbeatTick.tsdiff --git a/apps/server/src/workflows-hono/task/handlers/onCreatorComplete.test.ts b/apps/server/src/router-hono/workflows/task/handlers/onCreatorComplete.test.tssimilarity index 100%rename from apps/server/src/workflows-hono/task/handlers/onCreatorComplete.test.tsrename to apps/server/src/router-hono/workflows/task/handlers/onCreatorComplete.test.tsdiff --git a/apps/server/src/workflows-hono/task/handlers/onCreatorComplete.ts b/apps/server/src/router-hono/workflows/task/handlers/onCreatorComplete.tssimilarity index 100%rename from apps/server/src/workflows-hono/task/handlers/onCreatorComplete.tsrename to apps/server/src/router-hono/workflows/task/handlers/onCreatorComplete.tsdiff --git a/apps/server/src/workflows-hono/task/handlers/onTopicComplete.ts b/apps/server/src/router-hono/workflows/task/handlers/onTopicComplete.tssimilarity index 100%rename from apps/server/src/workflows-hono/task/handlers/onTopicComplete.tsrename to apps/server/src/router-hono/workflows/task/handlers/onTopicComplete.tsdiff --git a/apps/server/src/workflows-hono/task/handlers/scheduleDispatch.ts b/apps/server/src/router-hono/workflows/task/handlers/scheduleDispatch.tssimilarity index 100%rename from apps/server/src/workflows-hono/task/handlers/scheduleDispatch.tsrename to apps/server/src/router-hono/workflows/task/handlers/scheduleDispatch.tsdiff --git a/apps/server/src/workflows-hono/task/handlers/scheduleExecute.ts b/apps/server/src/router-hono/workflows/task/handlers/scheduleExecute.tssimilarity index 100%rename from apps/server/src/workflows-hono/task/handlers/scheduleExecute.tsrename to apps/server/src/router-hono/workflows/task/handlers/scheduleExecute.tsdiff --git a/apps/server/src/workflows-hono/task/handlers/scheduledRunKinds.ts b/apps/server/src/router-hono/workflows/task/handlers/scheduledRunKinds.tssimilarity index 100%rename from apps/server/src/workflows-hono/task/handlers/scheduledRunKinds.tsrename to apps/server/src/router-hono/workflows/task/handlers/scheduledRunKinds.tsdiff --git a/apps/server/src/workflows-hono/task/handlers/scheduledTopicDispatch.ts b/apps/server/src/router-hono/workflows/task/handlers/scheduledTopicDispatch.tssimilarity index 100%rename from apps/server/src/workflows-hono/task/handlers/scheduledTopicDispatch.tsrename to apps/server/src/router-hono/workflows/task/handlers/scheduledTopicDispatch.tsdiff --git a/apps/server/src/workflows-hono/task/handlers/watchdog.ts b/apps/server/src/router-hono/workflows/task/handlers/watchdog.tssimilarity index 100%rename from apps/server/src/workflows-hono/task/handlers/watchdog.tsrename to apps/server/src/router-hono/workflows/task/handlers/watchdog.tsdiff --git a/apps/server/src/workflows-hono/task/index.ts b/apps/server/src/router-hono/workflows/task/index.tssimilarity index 100%rename from apps/server/src/workflows-hono/task/index.tsrename to apps/server/src/router-hono/workflows/task/index.tsdiff --git a/apps/server/src/workflows-hono/topic-auto-summary/dispatch.test.ts b/apps/server/src/router-hono/workflows/topic-auto-summary/dispatch.test.tssimilarity index 100%rename from apps/server/src/workflows-hono/topic-auto-summary/dispatch.test.tsrename to apps/server/src/router-hono/workflows/topic-auto-summary/dispatch.test.tsdiff --git a/apps/server/src/workflows-hono/topic-auto-summary/dispatch.ts b/apps/server/src/router-hono/workflows/topic-auto-summary/dispatch.tssimilarity index 100%rename from apps/server/src/workflows-hono/topic-auto-summary/dispatch.tsrename to apps/server/src/router-hono/workflows/topic-auto-summary/dispatch.tsdiff --git a/apps/server/src/workflows-hono/topic-auto-summary/execute.ts b/apps/server/src/router-hono/workflows/topic-auto-summary/execute.tssimilarity index 100%rename from apps/server/src/workflows-hono/topic-auto-summary/execute.tsrename to apps/server/src/router-hono/workflows/topic-auto-summary/execute.tsdiff --git a/apps/server/src/workflows-hono/topic-auto-summary/index.ts b/apps/server/src/router-hono/workflows/topic-auto-summary/index.tssimilarity index 100%rename from apps/server/src/workflows-hono/topic-auto-summary/index.tsrename to apps/server/src/router-hono/workflows/topic-auto-summary/index.tsdiff --git a/apps/server/src/workflows-hono/verify/handlers/onVerifierComplete.ts b/apps/server/src/router-hono/workflows/verify/handlers/onVerifierComplete.tssimilarity index 100%rename from apps/server/src/workflows-hono/verify/handlers/onVerifierComplete.tsrename to apps/server/src/router-hono/workflows/verify/handlers/onVerifierComplete.tsdiff --git a/apps/server/src/workflows-hono/verify/index.ts b/apps/server/src/router-hono/workflows/verify/index.tssimilarity index 100%rename from apps/server/src/workflows-hono/verify/index.tsrename to apps/server/src/router-hono/workflows/verify/index.tsdiff --git a/apps/server/src/workflows/agentSignal/run.ts b/apps/server/src/workflows/agentSignal/run.tsindex a78d17d2ab4..a03b20497d8 100644--- a/apps/server/src/workflows/agentSignal/run.ts+++ b/apps/server/src/workflows/agentSignal/run.ts@@ -470,7 +470,7 @@ export const runAgentSignalWorkflow = async (// opening the top-level workflow span, otherwise each workflow run starts a fresh trace.// Source/context:// - `src/app/(backend)/middleware/auth/index.ts` performs extract/inject for normal backend APIs- // - `apps/server/src/workflows-hono/agent-signal/index.ts` wires `serve(...)` directly to+ // - `apps/server/src/router-hono/workflows/agent-signal/index.ts` wires `serve(...)` directly to// `runAgentSignalWorkflow(...)`// Removal condition:// - Safe to remove only if the workflow entry stack gains a shared request middleware thatdiff --git a/apps/server/src/workflows/onboardingUnderstanding/processProviders.ts b/apps/server/src/workflows/onboardingUnderstanding/processProviders.tsindex 53ab2b8ee68..2acdc4c59cc 100644--- a/apps/server/src/workflows/onboardingUnderstanding/processProviders.ts+++ b/apps/server/src/workflows/onboardingUnderstanding/processProviders.ts@@ -120,7 +120,7 @@ export const processUnderstandingProviders = async (// Cross-route workflow fan-out must use an absolute QStash trigger.// context.invoke only replaces the current URL's final path segment, which sent this// child to `/api/workflows/onboarding/understanding/process` and returned 404.- // Source/context: `workflows-hono/memory-user-memory/workflows/processUserTopics.ts:193`.+ // Source/context: `router-hono/workflows/memory-user-memory/workflows/processUserTopics.ts:193`.// Remove when Upstash context.invoke supports absolute cross-route workflow URLs.dependencies.triggerTaskRecommendations(body, {// Every completed provider may race to schedule a fingerprint-specific run. Thediff --git a/apps/server/viteHonoBuild.config.ts b/apps/server/viteHonoBuild.config.tsindex ff4f050903d..82f9bd38da4 100644--- a/apps/server/viteHonoBuild.config.ts+++ b/apps/server/viteHonoBuild.config.ts@@ -5,7 +5,8 @@ import { defineConfig } from 'vite';import { honoServerDedupe, honoServerPlugins } from './viteNodeServer.config';const serverRoot = fileURLToPath(new URL('.', import.meta.url));-const entry = (file: string) => fileURLToPath(new URL(`./src/hono/${file}`, import.meta.url));+const entry = (file: string) =>+ fileURLToPath(new URL(`./src/router-hono/${file}`, import.meta.url));export default defineConfig({build: {diff --git a/docs/development/basic/folder-structure.mdx b/docs/development/basic/folder-structure.mdxindex 96ddc6c49cf..1a2ed21f308 100644--- a/docs/development/basic/folder-structure.mdx+++ b/docs/development/basic/folder-structure.mdx@@ -74,7 +74,7 @@ src/โ โโโ onboarding/ # Onboarding flowโ โโโ share/ # Share pagesโโโ server/ # Remaining server-side modules not yet moved to apps/server-โ # (SEO metadata, SPA HTML rendering, composio services, workflows-hono)+โ # (SEO metadata, SPA HTML rendering, composio services)โโโ services/ # Client-side service interfacesโโโ spa/ # SPA entry points and React Router configโ โโโ entry.web.tsx / entry.mobile.tsx / entry.desktop.tsx / entry.popup.tsx / entry.auth.tsxdiff --git a/docs/development/basic/folder-structure.zh-CN.mdx b/docs/development/basic/folder-structure.zh-CN.mdxindex 64da4f35126..80057fbdde4 100644--- a/docs/development/basic/folder-structure.zh-CN.mdx+++ b/docs/development/basic/folder-structure.zh-CN.mdx@@ -72,7 +72,7 @@ src/โ โโโ onboarding/ # ๆฐ็จๆทๅผๅฏผโ โโโ share/ # ๅไบซ้กต้ขโโโ server/ # ๅฐๆช่ฟ็งปๅฐ apps/server ็ๅฉไฝๆๅก็ซฏๆจกๅ-โ # ๏ผSEO metadataใSPA HTML ๆธฒๆใcomposio servicesใworkflows-hono๏ผ+โ # ๏ผSEO metadataใSPA HTML ๆธฒๆใcomposio services๏ผโโโ services/ # ๅฎขๆท็ซฏๆๅกๆฅๅฃโโโ spa/ # SPA ๅ ฅๅฃๅ React Router ้ ็ฝฎโ โโโ entry.web.tsx / entry.mobile.tsx / entry.desktop.tsx / entry.popup.tsx / entry.auth.tsxdiff --git a/src/app/(backend)/api/agent/[[...route]]/route.ts b/src/app/(backend)/api/agent/[[...route]]/route.tsindex 92d620741a0..3ce2befa6dc 100644--- a/src/app/(backend)/api/agent/[[...route]]/route.ts+++ b/src/app/(backend)/api/agent/[[...route]]/route.ts@@ -1,4 +1,4 @@-import app from '@/server/agent-hono';+import app from '@/server/router-hono/agent';const handler = (request: Request) => app.fetch(request);diff --git a/src/app/(backend)/api/workflows/[[...route]]/route.ts b/src/app/(backend)/api/workflows/[[...route]]/route.tsindex 433a41166d8..a4c77a014f8 100644--- a/src/app/(backend)/api/workflows/[[...route]]/route.ts+++ b/src/app/(backend)/api/workflows/[[...route]]/route.ts@@ -1,3 +1,3 @@-import app from '@/server/workflows-hono';+import app from '@/server/router-hono/workflows';export const POST = (request: Request) => app.fetch(request);