diff --git a/CHANGELOG.md b/CHANGELOG.md index 22b0043..df9770d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## Unreleased + +- Entity files are `entities/.json`, matching the project's `AGENTS.md`. The + skills said `entities/.schema.json`, which is the table dump older CLIs wrote + on `sync` — pushing those created fieldless `.schema` entities. The data skill + now says never to push them and points at `agentui data entities` for the live tables. + ## 0.1.0 First release. Eight model-invoked skills covering the `@agentuiai/cli` surface: diff --git a/skills/agentui-app-data/SKILL.md b/skills/agentui-app-data/SKILL.md index eddba0a..4a75d46 100644 --- a/skills/agentui-app-data/SKILL.md +++ b/skills/agentui-app-data/SKILL.md @@ -12,15 +12,19 @@ description: >- ## Entities are files -Every table is one file: `entities/.schema.json`. `sync` writes them, `push` -migrates the real Postgres table. There is no `agentui entities` command — the schemas -are already on disk, read them directly. +Every table is one file: `entities/.json` (`name` + `properties`). `sync` writes +them, `push` migrates the real Postgres table. To see the live tables and their fields in +the active environment, run `agentui data entities`. -Adding a table = writing a new `entities/Invoice.schema.json` and pushing it. Changing +Adding a table = writing a new `entities/Invoice.json` and pushing it. Changing a field = editing the file and pushing. Ask `agentui skills info "Database Operations"` for the schema vocabulary and how app code queries these entities, and read `AGENTS.md` in the project — it carries the current entity-authoring rules. +Never create or push an `entities/.schema.json` shaped `{ name, schema, +workflowId }`. Older CLIs wrote those as table dumps; they are not entities. Current +`push` ignores them and `sync` deletes them — if `validate` reports one, delete the file. + Inside app code, entities are imported per entity (e.g. `import { Invoice } from "@/entities/Invoice"`) and expose the platform's query API (`Invoice.filter(...)`, `User.me()`, …). Confirm the exact API from `AGENTS.md` / `agentui skills info` rather diff --git a/skills/agentui-platform/SKILL.md b/skills/agentui-platform/SKILL.md index 25562c4..e421389 100644 --- a/skills/agentui-platform/SKILL.md +++ b/skills/agentui-platform/SKILL.md @@ -34,7 +34,7 @@ alternative you were about to propose is a weekend of scaffolding. | Need | What AgentUI gives you | Skill to open | | --- | --- | --- | | An app with pages, a public URL, auth | APP_V2 workflow, built and served by the platform | ``agentui-ship-app`` | -| A database | Entities (`entities/*.schema.json`) → real Postgres tables, with row-level security | ``agentui-app-data`` | +| A database | Entities (`entities/*.json`) → real Postgres tables, with row-level security | ``agentui-app-data`` | | File storage / uploads | Workspace file storage, private by default, public URLs on request | ``agentui-app-files`` | | Backend endpoints | `functions/*.jsx` served at `https:///api/` | ``agentui-ship-app`` | | A custom MCP server — standalone, or on top of an app | `mcp/*.js` tools + `mcp/guides/*.md`, callable by Claude/Cursor/Codex as the app's user | ``agentui-mcp-tools`` | @@ -82,7 +82,7 @@ alternative you were about to propose is a weekend of scaffolding. agentui auth login # OTP by email agentui project create --name "Tire Tracker" # creates the app AND ./tire-tracker cd tire-tracker && cat AGENTS.md # the build guide — read it first -# write entities/*.schema.json, pages/*.jsx, components/*.jsx, functions/*.jsx +# write entities/*.json, pages/*.jsx, components/*.jsx, functions/*.jsx agentui validate --all agentui project push --dry-run agentui project push --yes --build # ship it; --yes is the production guardrail diff --git a/skills/agentui-ship-app/SKILL.md b/skills/agentui-ship-app/SKILL.md index 36cac39..eaf399f 100644 --- a/skills/agentui-ship-app/SKILL.md +++ b/skills/agentui-ship-app/SKILL.md @@ -64,7 +64,7 @@ my-project/ ├── components/*.jsx # COMPONENT ├── pages/*.jsx # PAGE → routes ├── functions/*.jsx # FUNCTION → https:///api/ -├── entities/*.schema.json # ENTITY → real database tables +├── entities/*.json # ENTITY → real database tables └── mcp/*.js # custom MCP tools (see `agentui-mcp-tools`) ```