@mortar-ai/skill 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,16 +1,29 @@
1
1
  # Schema migrations and resource artifacts
2
2
 
3
3
  Read this reference when authoring backend source, reviewing a typed migration
4
- plan, resolving revision/checksum conflicts, generating app-data types, or
4
+ plan, resolving revision/checksum conflicts, writing application data types, or
5
5
  deciding whether a Mortar capability belongs in source at all.
6
6
 
7
- ## One canonical plan, four derived type targets
7
+ ## One canonical plan, AI-owned application types
8
8
 
9
9
  Mortar parses SQL into `mortar.migration-plan.v1`, a language-neutral JSON plan.
10
10
  That plan—not TypeScript, Swift, Kotlin, or Dart code—is the execution contract.
11
- After a successful apply, the canonical live schema may generate app-data models
12
- for all four SDK languages. Generated models are downstream output; never edit
13
- them to request a schema change.
11
+ Mortar does not generate project source. After apply, the AI Turn combines the
12
+ canonical live schema, the relevant operations from `references/openapi.yaml`,
13
+ and the project's runtime conventions to write application-owned models and
14
+ request/response code through Harness. Those files are downstream consumers;
15
+ never edit them to request a schema change.
16
+
17
+ Search the OpenAPI by stable operation ID, for example:
18
+
19
+ ```sh
20
+ rg -n 'operationId: (insertDatabaseRows|listDatabaseRows)' \
21
+ /tmp/skills/mortar/references/openapi.yaml
22
+ ```
23
+
24
+ Read the selected operation and every referenced component schema before
25
+ writing code. An operation marked `x-mortar-project-code: forbidden` belongs to
26
+ Harness/control-plane tooling and must never be called from a user app.
14
27
 
15
28
  ## Versioned database SQL
16
29
 
@@ -31,8 +44,14 @@ ALTER TABLE submissions SET ACCESS app_only;
31
44
 
32
45
  The parser accepts common PostgreSQL type spellings and canonicalizes them to
33
46
  Mortar's logical types: `text`, `number`, `bool`, `json`, `timestamp`, and
34
- `uuid`. It rejects row data, backfills, triggers, stored procedures, transaction
35
- control, and calls that pretend functions/storage/cron are SQL.
47
+ `uuid`. `id`, `created_at`, and `updated_at` are server-owned row metadata, so
48
+ they are not declared as application columns; system timestamps may still be
49
+ used in an index, as above. `NOT NULL` enforces required-field presence. Logical
50
+ type names inform project-language types but do not currently runtime-validate
51
+ every row value. The parser rejects `DEFAULT`, `UNIQUE`, `CHECK`, foreign keys,
52
+ row data, backfills, triggers, stored procedures, transaction control, and calls
53
+ that pretend functions/storage/cron are SQL. Never invent unsupported DDL or
54
+ describe client validation as a database constraint.
36
55
 
37
56
  Plan/apply guarantees:
38
57