aisi/
├── src/
│ ├── index.ts # Worker entry point (Hono router)
│ ├── types.ts # Global type definitions
│ ├── agents/
│ │ ├── agent.ts # Durable Object class
│ │ ├── types.ts # Message, PendingApproval types
│ │ ├── system-prompt.ts # System prompt builder
│ │ └── zod-schema.ts # Zod → JSON Schema converter
│ ├── middleware/
│ │ ├── auth.ts # JWT auth + CORS
│ │ └── rate-limit.ts # Rate limiting (60 req/min)
│ ├── routes/
│ │ ├── agents.ts # /api/agents endpoints
│ │ ├── workspaces.ts # /api/workspaces CRUD + /connections CRUD
│ │ ├── connection-test.ts # Connector health + connection capability tests
│ │ ├── testing.ts # SAP testing framework routes
│ │ ├── credentials.ts # Connection secrets + user SAP credentials APIs
│ │ ├── indexing.ts # SAP metadata indexing
│ │ ├── dashboard.ts # Inventory + analytics
│ │ ├── clean-core.ts # Clean Core / readiness endpoints
│ │ ├── docs.ts # Generated docs endpoints
│ │ ├── source.ts # ABAP source fetch endpoints
│ │ ├── orgs.ts # Organization management
│ │ ├── files.ts # R2 file upload/download
│ │ ├── sandbox-callback.ts # Sandbox tool callback route
│ │ └── scheduled.ts # Cron handler
│ ├── services/
│ │ ├── sap-indexer.ts # Background SAP indexer
│ │ ├── clean-core-analyzer.ts # Clean Core analysis engine
│ │ ├── conversion-readiness-analyzer.ts # ECC conversion readiness
│ │ ├── doc-generator.ts # Module + technical docs generator
│ │ ├── embedding-service.ts # OpenAI embeddings for search
│ │ └── business-process-inferrer.ts # Process inference
│ ├── workflows/
│ │ └── sap-sync-workflow.ts # Index + enrichment workflow
│ ├── tools/
│ │ ├── tool-definitions.ts # Base SAP tool definitions
│ │ ├── sap-tools.ts # buildSapTools(), connection_id routing
│ │ ├── sap-connector-client.ts # HTTP client for Java connector
│ │ ├── mock-data.ts # Fallback mock data generators
│ │ ├── sandbox/
│ │ │ ├── execute-code.ts # execute_code tool definition
│ │ │ ├── bridge-codegen.ts # Python bridge code generator
│ │ │ └── types.ts # Sandbox request/response types
│ │ └── etl/
│ │ ├── types.ts # ETL type definitions
│ │ ├── etl-tools.ts # 4 ETL tool definitions
│ │ └── transformers.ts # 12 pure transform functions
│ ├── lib/
│ │ ├── supabase.ts # Supabase client factory
│ │ ├── auth-helpers.ts # requireMembership, requireAdmin
│ │ └── encryption.ts # AES-256-GCM helpers for SAP passwords
│ ├── data/ # Ingestion + prompt assets for scans
│ └── frontend/
│ ├── main.tsx # React entry
│ ├── App.tsx # Route definitions
│ ├── context/ # AuthContext, DashboardContext
│ ├── pages/ # Login, Dashboard, Workspace, Agent, Settings
│ ├── components/
│ │ ├── chat/ # ChatInterface, MessageBubble, ApprovalCard, ToolCard
│ │ ├── layout/ # Sidebar, Layout
│ │ ├── workspaces/ # WorkspaceGrid, WorkspaceCard
│ │ └── ui/ # Radix UI wrappers (button, card, dialog, etc.)
│ └── styles/
│ └── globals.css # Tailwind + CSS variables
├── connector/ # Java SAP connector (see /connector)
├── supabase/
│ ├── config.toml
│ ├── migrations/ # Postgres schema migrations
│ └── seed.sql
├── tests/
│ ├── setup.ts # Vitest setup
│ └── stubs/ # Mock modules (cloudflare-workers, anthropic-sdk, cloudflare-sandbox)
├── docs/ # Mintlify documentation
├── wrangler.toml # Cloudflare Workers config
├── vite.config.ts
├── vitest.config.ts
├── tailwind.config.js
├── tsconfig.json
└── .eslintrc.cjs