-
Notifications
You must be signed in to change notification settings - Fork 862
feat: raw apps can be built by agents fully locally #7448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Add automatic generation of DATATABLES.md file when syncing raw apps. This documentation helps AI agents understand the datatable configuration and clarifies that tables must be whitelisted in data.tables of raw_app.yaml. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Ensure the auto-generated DATATABLES.md documentation file is not pushed as an app file. Added to skip lists in both collectAppFiles and elementsToMap functions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add new interactive command that prompts for summary, path, and framework to scaffold a new raw app with template files and DATATABLES.md. - Validates path format (u/ or f/ prefix, no dots, alphanumeric only) - Supports React 19, React 18, Svelte 5, and Vue 3 templates - Generates complete app structure with backend folder and example runnable 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add a new mechanism for AI agents to create and modify datatables during development: - Add sql_to_apply folder to app templates (excluded from push) - Watch sql_to_apply folder in dev server for .sql file changes - Show confirmation modal in browser when SQL files are created/modified - Execute confirmed SQL against the configured datatable - Update DATATABLES.md to document the sql_to_apply workflow - Remind agents to add created tables to data.tables in raw_app.yaml 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
…generate-datatables command Enhance wmill app new: - Fetch and display available datatables from workspace - Allow interactive selection of datatable (prefers "main") - Support creating new schema or selecting existing one - Generate SQL file in sql_to_apply/ for new schema creation - Update raw_app.yaml with data configuration - Advise user to run wmill app dev for full experience Add wmill app generate-datatables: - Fetch datatable schemas from remote workspace - Generate comprehensive DATATABLES.md with all tables/columns - Include app-specific configuration from raw_app.yaml - Document SQL migration workflow and usage examples 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
…autocompletion Fix bug where 'wmill app new' was only using the last path segment for the folder name (e.g., f/foobar/x/y became y.raw_app instead of f/foobar/x/y.raw_app). Add folder autocompletion when typing paths - fetches workspace folders and suggests matching f/<folder>/ paths as the user types. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
…ng SQL files on startup DATATABLES.md improvements: - Add prominent "CRITICAL RULES FOR AI AGENTS" section at the top - Make clear that agents can ONLY use tables listed in data.tables - Show whitelisted tables with "USE THESE FIRST" heading - Add "How to Add a New Table to the Whitelist" section with examples - Mark schema discovery as optional/reference only SQL watcher fix: - Scan existing SQL files in sql_to_apply/ on dev server startup - Show modal for each existing file after 2 second delay (for WebSocket connection) - Track prompted files to avoid duplicate modals 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Major changes: - Create AGENTS.md as main documentation file for AI agents - DATATABLES.md now focuses only on schema information - Rename command from generate-datatables to generate-agents - Command now regenerates both AGENTS.md and DATATABLES.md - Auto-refresh docs after SQL migration is applied in dev server AGENTS.md improvements: - Complete app structure overview - Backend runnables: only code file needed, .yaml is optional - Added generate-locks command documentation - All supported languages and extensions listed - Clear instructions for creating and calling runnables 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Queue SQL files and process them one at a time - Delete SQL files after successful application - Send pending SQL files to new WebSocket clients on connect - Show next file in queue after apply or skip 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Code files in backend/ are now auto-detected as inline runnables - No need for <id>.yaml with type: inline - just add <id>.<ext> - YAML config is optional for additional settings (fields, static values) - Updated AGENTS.md documentation to reflect simpler workflow 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
These are auto-generated files that shouldn't be included in the app files sent to the server. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Skip dev-only and generated files during pull operations to prevent them from being created when syncing from remote: - sql_to_apply/ folder (dev-only SQL migrations) - wmill.d.ts (generated TypeScript definitions) - AGENTS.md (generated documentation) - DATATABLES.md (generated documentation) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Remove custom_path from sync pull (it's derived from file path) - Remove custom_path from new app template - Make custom_path optional in AppFile interface - Only include custom_path in push if explicitly set 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
|
Claude finished @rubenfiszel's task in 2m 59s —— View job Reviewing PR #7448: feat: raw apps can be built by agents fully locally
SummaryThis PR introduces significant enhancements to enable raw apps to be built by AI agents fully locally. The changes span backend (new datatable schema export API), CLI (new commands for app creation and agent documentation), and frontend (improved copilot integration). Key ChangesBackend
CLI (
|
Deploying windmill with
|
| Latest commit: |
0e095c1
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://2d9fcbcf.windmill.pages.dev |
| Branch Preview URL: | https://rf-datatableschemas.windmill.pages.dev |
| .await | ||
| .map_err(|e| Error::internal_err(format!("Failed to query schema: {}", e)))?; | ||
|
|
||
| // Build hierarchical structure: schema -> table -> column -> compact_type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment here has a formatting issue - it uses a forward slash (/) instead of double slashes (//) for a comment. This appears to be a typo introduced during editing.
| // Build hierarchical structure: schema -> table -> column -> compact_type | |
| // Build hierarchical structure: schema -> table -> column -> compact_type |
| #[derive(Serialize, Debug)] | ||
| struct DataTableSchema { | ||
| datatable_name: String, | ||
| /// Hierarchical schema: schema_name -> table_name -> column_name -> "type[?][=default]" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same issue - this uses a single forward slash instead of double slashes for the comment.
| /// Hierarchical schema: schema_name -> table_name -> column_name -> "type[?][=default]" | |
| // Hierarchical schema: schema_name -> table_name -> column_name -> "type[?][=default]" |
|
|
||
| // Regenerate AGENTS.md and DATATABLES.md to reflect schema changes | ||
| try { | ||
| await regenerateAgentDocs(workspaceId, process.cwd(), true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good practice: After applying SQL migrations, the code regenerates AGENTS.md and DATATABLES.md to reflect schema changes. The error handling here is appropriately lenient (warning rather than failing) since refreshing docs is a non-critical operation.
| * - Cannot contain dots | ||
| * - Can only contain alphanumeric characters, underscores, hyphens, and slashes | ||
| */ | ||
| function validateAppPath(appPath: string): { valid: boolean; error?: string } { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good validation function! This properly enforces Windmill's path conventions (u/ or f/ prefix, no dots, valid characters). This prevents common user errors when creating apps via CLI.
| if (entry.isDirectory) { | ||
| // Skip the runnables and node_modules subfolders | ||
| // Skip the runnables, node_modules, and sql_to_apply subfolders | ||
| if ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good practice: Excluding generated files (DATATABLES.md, AGENTS.md, wmill.d.ts) and development folders (node_modules, dist, .claude, sql_to_apply) from the app bundle prevents accidental inclusion of local development artifacts in the deployed app.
| * Generates AGENTS.md - the main documentation file for AI agents working with raw apps. | ||
| * This includes app structure, backend runnables, datatables usage, and all critical rules. | ||
| */ | ||
| export function generateAgentsDocumentation(data: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The generateAgentsDocumentation function is well-structured and provides excellent documentation for AI agents. It covers:
- App structure with clear directory layout
- Backend runnable creation patterns
- Supported languages and extensions
- Critical datatable rules
This is a great improvement for making raw apps self-documenting and agent-friendly.
| * Hierarchical structure: schema_name -> table_name -> column_name -> compact_type | ||
| * Compact type format: 'type[?][=default]' where ? means nullable (e.g. 'int4', 'text?', 'int4?=0') | ||
| */ | ||
| export interface DataTableSchema { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good alignment: The DataTableSchema interface here correctly mirrors the backend's DataTableSchema struct defined in workspaces.rs. The hierarchical schema format (schema_name → table_name → column_name → compact_type) provides a compact yet comprehensive representation.
mov-2025-12-24--20-53-39.mp4