Convex-only Slice 1: clients talk to Convex, Flue is a private worker

Normalize the topology so web/desktop/mobile clients communicate only with
Convex. Convex admits durable commands, dispatches private Flue turns through
FLUE_URL, and stores the product-facing result before clients observe it.

- Normalized relational schema: organizations, projects, conversations/turns/
  messages/attachments, signals/sources/constraints, works/events/attachments.
- Conversation turns queued in Convex; the agent runAction dispatches to Flue
  and persists assistant response, signals, and proposed work back into Convex.
- Browser chat moved off the Flue transport: use-chat-agent now reads reactive
  Convex rows and sends through conversationMessages.send.
- Fixed signed-in blank screen: gate all product queries on useConvexAuth
  (isAuthenticated && !isRefreshing) plus personal-org bootstrap.
- Pinned react/react-dom to 19.2.8 via catalog to fix SSR dual-React crash.
- Removed ~16.6k net lines: daemon, AgentOS/Orb, project issues/runs/artifacts,
  todos, browser Flue transport, mobile execution views, smoke scripts.

Verified end-to-end on cheaptricks: connect repo, send actionable message,
Flue turn completes, Signal + proposed Work created with exact provenance,
persists across refresh.
This commit is contained in:
-Puter
2026-07-27 21:32:17 +05:30
parent 4c741fbe06
commit a5414d83bd
127 changed files with 1283 additions and 17784 deletions

View File

@@ -8,7 +8,6 @@
"./convex": "./src/convex.ts",
"./native": "./src/native.ts",
"./server": "./src/server.ts",
"./smoke": "./src/smoke.ts",
"./web": "./src/web.ts"
},
"scripts": {

View File

@@ -1,55 +0,0 @@
import { z } from "zod";
const smokeEnvSchema = z.object({
accessToken: z.string().min(1),
agentModelBaseUrl: z.url().optional(),
agentModelName: z.string().min(1).optional(),
agentModelProvider: z.string().min(1).optional(),
convexUrl: z.url(),
cpaApiKey: z.string().min(1),
cpaBaseUrl: z.url(),
daemonId: z.string().min(1),
dockerImage: z.string().min(1).optional(),
featureRequest: z.string().min(10),
flueUrl: z.url(),
giteaToken: z.string().min(1).optional(),
giteaUrl: z.url().optional(),
projectId: z.string().min(1).optional(),
repositoryPath: z.string().min(1).optional(),
webUrl: z.url(),
});
export type SmokeEnv = z.infer<typeof smokeEnvSchema>;
export const parseSmokeEnv = (
runtimeEnv: Record<string, string | undefined>
): SmokeEnv =>
smokeEnvSchema.parse({
accessToken: runtimeEnv.ZOPU_SMOKE_ACCESS_TOKEN,
agentModelBaseUrl: runtimeEnv.AGENT_MODEL_BASE_URL,
agentModelName: runtimeEnv.AGENT_MODEL_NAME,
agentModelProvider: runtimeEnv.AGENT_MODEL_PROVIDER,
convexUrl: runtimeEnv.ZOPU_SMOKE_CONVEX_URL ?? runtimeEnv.CONVEX_URL,
cpaApiKey:
runtimeEnv.ZOPU_SMOKE_CPA_API_KEY ?? runtimeEnv.AGENT_MODEL_API_KEY,
cpaBaseUrl:
runtimeEnv.ZOPU_SMOKE_CPA_BASE_URL ?? runtimeEnv.AGENT_MODEL_BASE_URL,
daemonId: runtimeEnv.ZOPU_SMOKE_DAEMON_ID ?? runtimeEnv.DAEMON_ID,
dockerImage: runtimeEnv.ORB_DOCKER_IMAGE,
featureRequest:
runtimeEnv.ZOPU_SMOKE_FEATURE_REQUEST ??
"Add a tiny accessible status control to the existing web project's primary page, keep existing behavior unchanged, and add a focused test for it.",
flueUrl:
runtimeEnv.ZOPU_SMOKE_FLUE_URL ??
runtimeEnv.VITE_FLUE_URL ??
"http://localhost:3583",
giteaToken: runtimeEnv.GITEA_TOKEN ?? runtimeEnv.ZOPU_SMOKE_GITEA_TOKEN,
giteaUrl: runtimeEnv.GITEA_URL ?? runtimeEnv.ZOPU_SMOKE_GITEA_URL,
projectId: runtimeEnv.ZOPU_SMOKE_PROJECT_ID,
repositoryPath:
runtimeEnv.ZOPU_SMOKE_REPOSITORY_PATH ?? runtimeEnv.GITEA_REPOSITORY_PATH,
webUrl:
runtimeEnv.ZOPU_SMOKE_WEB_URL ??
runtimeEnv.SITE_URL ??
"http://localhost:5173",
});

View File

@@ -1,7 +1,6 @@
interface ImportMetaEnv {
readonly [key: string]: string | number | boolean | undefined;
readonly VITE_AUTH_URL: string;
readonly VITE_FLUE_URL: string;
readonly VITE_CONVEX_URL: string;
}

View File

@@ -10,7 +10,6 @@ export const env = createEnv({
client: {
VITE_AUTH_URL: z.url(),
VITE_CONVEX_URL: convexUrlSchema("example.convex.cloud"),
VITE_FLUE_URL: z.url(),
},
clientPrefix: "VITE_",
emptyStringAsUndefined: true,