Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .claude/skills/releasing/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,15 @@ the adopter's only signal. Bump with `node scripts/check-metamodel-version.mjs -
## Phase 1 — Decide scope + version

The lockstep set = every package currently at the previous version (it is NOT a
fixed list; `ai-runtime` and the `client/web/packages/*` are in it). Enumerate it:
fixed list; the `client/web/packages/*` are in it, and the private `ai-runtime` and `conformance` are not). Enumerate it:

```bash
for f in server/typescript/packages/*/package.json client/web/packages/*/package.json; do
node -e "const p=require('./$f'); if(p.version==='<PREV>'&&!p.private) console.log(p.version,p.name)"
done
```

`forge` / `conformance` are `private` (never publish). Confirm each candidate is
`conformance` and `ai-runtime` are `private` (never publish). Confirm each candidate is
actually on npm (`npm view <pkg> dist-tags`). Patch bump unless a public API
changed; this repo bumps the whole set in lockstep.

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/npm-dist-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ jobs:
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
trap 'rm -f ~/.npmrc' EXIT

# Fail on the credential, once, before touching 14 packages. Without this an
# auth problem arrives as fourteen identical per-package errors and looks like a
# Fail on the credential, once, before touching any package. Without this an
# auth problem arrives as one identical error per package and looks like a
# registry-side refusal of the operation.
npm whoami >/dev/null 2>&1 || { echo "::error::NPM_TOKEN does not authenticate"; exit 1; }

Expand Down
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ moved it (1.0.4 relaxed `@sourceRefField` onto `@cardinality: one` with a prose-
manifest footprint, and was ruled a hold). `metamodelVersion` read **`1.1`** from 1.1.0 through 1.1.3 for the FR-044 reporting vocabulary and the requirements slice 1 (the first slice of two, covering existence gates and per-entity coverage). **It reads `1.2` from 1.1.4** through every published release since, for calendar-aligned relative report windows (`startOf` on a relative date). The merged tree claims **`1.3`** (`METAMODEL_VERSION` in every port) — main's 1.3.0 and the line's 1.2.4 both carry it, and neither is published. Per-release detail lives in **`CHANGELOG.md`** — it is the log, and this file does
not duplicate it.

The npm surface is **14 `@metaobjectsdev/*` packages in full lockstep**; the two `angular`
The npm surface is **13 `@metaobjectsdev/*` packages in full lockstep** (`ai-runtime` left it in 1.3.0: its call loop is now written into the project by the `trace-helper` generator, ADR-0024 Amendment 2); the two `angular`
packages are on their own `0.6.x` line and are **not published — source-only by decision**
(ADR-0048). They build in-repo and stay off the registry until they meet that ADR's promotion
bar.

**A lagging version number is INFORMATION, not drift.** Since `0.24.5` a registry publishes
only when it has a changed product file, and when it does it adopts the shared `minor.patch`
then current, skipping the numbers it sat out (operative table in `docs/RELEASING.md`;
the level vocabulary takes is ADR-0035 Amendment 5's feature test). Two carve-outs: the 14
the level vocabulary takes is ADR-0035 Amendment 5's feature test). Two carve-outs: the 13
npm packages move atomically with each other, and a change to `expected-registry.json` /
`metamodelVersion` still forces all four, at any release level, because that is the contract
every port byte-matches. So PyPI at `0.25.0` while npm is at `0.25.2` says
Expand Down
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,36 @@ here.**

## [Unreleased]

- **codegen-ts: the trace helper's call loop is written into the project, and
`@metaobjectsdev/ai-runtime` is no longer published.** The `trace-helper` generator now writes
`llm-call.ts` (the `LlmClient` seam and `runLlmCall`) beside the `<Entity>.trace.ts` modules,
and a `call<Entity>` imports it from there, so generated trace code depends only on
`runtime-ts`, `render` and `metadata`. `ai-runtime` is `private` and leaves the publish set,
which is 13 packages; 1.2.3 stays on npm. Regenerate and drop the dependency:
[docs/features/migrations/ai-runtime-unpublished.md](docs/features/migrations/ai-runtime-unpublished.md)
(ADR-0024 Amendment 2).
- **codegen-ts: a trace helper whose response value object has a required field compiles.** It
cast the extracted record straight to the value object's interface, which `strict` TypeScript
refuses; it now casts through `unknown`, after checking that no required field was lost.
- **react: `<ImageUpload>` moves to `@metaobjectsdev/react/image-upload`, and `react-easy-crop`
becomes an optional peer (breaking).** `ImageUpload` and `cropToBlob` leave the package root
for the new subpath, and the generated form imports them from there, so a project with no
`view.image` field no longer installs the crop library at all. A project with one adds
`react-easy-crop` (`>=6.2.3 <7.0.0`) to its dependencies. The adapter provider stays on the
root. Regenerate, and move any hand-written import:
[docs/features/migrations/react-image-upload-subpath.md](docs/features/migrations/react-image-upload-subpath.md).
- **The empty `@metaobjectsdev/forge` package is removed.** It was private, exported nothing and
had no importer. The forge vocabulary (`decision`, `principle`, `convention`, `glossary`,
`failure` and the `@forge*` attributes) is unchanged: `@metaobjectsdev/sdk` ships it as
`forgeTypesProvider`, and `FORGE-METADATA.md` now says so. The "The TypeScript forge provider"
section of `docs/features/extending-with-providers.md` is removed; that doc no longer names it.
- **cli: `meta schema` prints the expected schema, read-only.** `meta schema --dialect
postgres|sqlite|d1` prints the `CREATE` statements `meta migrate` would write for an empty
database, views included; `--as json` prints the neutral JSON document instead, the format
`meta migrate` commits as its snapshot, now described in `docs/features/schema-snapshot-format.md`.
It builds the schema the way `meta migrate` does (conventions, `migrate.scope`, the dependency
exclusion) and reads no database and no snapshot, so a native migration tool can start from it.
The dialect defaults to `migrate.dialect`, then to the `dialect` in `metaobjects.config.ts`.
- **Java: a standalone `{{! comment }}` line leaves no blank line.** mustache.java kept the line break
after a standalone comment tag, so a Java render had one extra blank line where TypeScript, C# and
Python had none. `Renderer` now strips standalone comment lines before mustache.java parses them. A
Expand Down
2 changes: 1 addition & 1 deletion MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ As of 2026-10-28, every registry package has a single owner, the creator.

| Registry | Packages | Owner today | How it is published |
|---|---|---|---|
| npm | The 14 `@metaobjectsdev/*` packages: `ai-runtime`, `cli`, `codegen-ts`, `codegen-ts-react`, `codegen-ts-tanstack`, `docs-site`, `metadata`, `migrate-ts`, `react`, `render`, `runtime-ts`, `runtime-web`, `sdk`, `tanstack` | npm user `dougmealing`, the only owner of each package, in the `metaobjectsdev` npm organization | Locally, by the release script ([docs/RELEASING.md](docs/RELEASING.md)) |
| npm | The 13 `@metaobjectsdev/*` packages: `cli`, `codegen-ts`, `codegen-ts-react`, `codegen-ts-tanstack`, `docs-site`, `metadata`, `migrate-ts`, `react`, `render`, `runtime-ts`, `runtime-web`, `sdk`, `tanstack` | npm user `dougmealing`, the only owner of each package, in the `metaobjectsdev` npm organization | Locally, by the release script ([docs/RELEASING.md](docs/RELEASING.md)) |
| Maven Central | The `com.metaobjects` namespace: the `metaobjects` parent POM and 14 modules (`metaobjects-metadata`, `-codegen-base`, `-codegen-mustache`, `-codegen-spring`, `-codegen-kotlin`, `-codegen-plantuml`, `-render`, `-metadata-ktx`, `-maven-plugin`, `-core-spring`, `-spring-boot-starter`, `-om`, `-omdb`, `-omdb-ktx`) | The creator's Sonatype Central Portal account, which holds the verified namespace; artifacts are signed with the creator's GPG key | Locally, with `mvn deploy` |
| NuGet | `MetaObjects`, `MetaObjects.Render`, `MetaObjects.Codegen`, `MetaObjects.Cli` | nuget.org organization `metaobjects`, administered by the creator | Trusted Publishing from `.github/workflows/publish-csharp.yml` |
| PyPI | `metaobjects` | PyPI user `dougmealing` (Owner) | Locally or from `.github/workflows/publish-python.yml` with an API token |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,13 @@ MetaObjects generates **no** provider/LLM-call layer and never will — the call
commodity the ecosystem already solves, and a maintained vendor wrapper would just
chase SDK churn (ADR-0024). You bring the caller; MetaObjects owns the typed
render → parse → record. For the call step, plug the idiomatic library into the
one-method `LlmClient` seam from `@metaobjectsdev/ai-runtime`:
one-method `LlmClient` seam. The `trace-helper` generator writes it into your project, in
`llm-call.ts` beside the helpers (no package to install):

```ts
import { generateText } from "ai"; // Vercel AI SDK — recommended
import { anthropic } from "@ai-sdk/anthropic";
import type { LlmClient } from "@metaobjectsdev/ai-runtime";
import type { LlmClient } from "./generated/llm-call"; // where trace-helper wrote it

export const llm: LlmClient = {
async complete({ prompt, model, system }) {
Expand All @@ -204,10 +205,10 @@ output, the de-facto TS standard. Single-provider apps can implement `complete`
directly over `@anthropic-ai/sdk` / `openai`; heavy chains can use LangChain.js —
the seam is one method either way.

With a client in hand, the generated `record<Entity>` helper (the `trace-helper`
generator) and `@metaobjectsdev/ai-runtime`'s `callLlm` do render → call → **typed
trace persist** in one call, recording request/response as typed value objects in
your own DB. The parser above is the standalone receive side if you don't want the
With a client in hand, the generated `call<Entity>` helper (the `trace-helper`
generator) does render → call → **typed trace persist** in one call, recording
request/response as typed value objects in your own DB; `record<Entity>` persists a
call you made yourself. The parser above is the standalone receive side if you don't want the
recorder.

## Drift gate
Expand Down
8 changes: 4 additions & 4 deletions agent-context-shipped/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@
},
{
"path": ".claude/skills/metaobjects-prompts/references/typescript.md",
"file": "0fe543fe1b3c9b3c.md"
"file": "01fcc1b45dff7950.md"
},
{
"path": ".claude/skills/metaobjects-runtime-ui/SKILL.md",
Expand Down Expand Up @@ -400,7 +400,7 @@
},
{
"path": ".claude/skills/metaobjects-prompts/references/typescript.md",
"file": "0fe543fe1b3c9b3c.md"
"file": "01fcc1b45dff7950.md"
},
{
"path": ".claude/skills/metaobjects-runtime-ui/SKILL.md",
Expand Down Expand Up @@ -620,7 +620,7 @@
},
{
"path": ".claude/skills/metaobjects-prompts/references/typescript.md",
"file": "0fe543fe1b3c9b3c.md"
"file": "01fcc1b45dff7950.md"
},
{
"path": ".claude/skills/metaobjects-runtime-ui/SKILL.md",
Expand Down Expand Up @@ -843,7 +843,7 @@
},
{
"path": ".claude/skills/metaobjects-prompts/references/typescript.md",
"file": "0fe543fe1b3c9b3c.md"
"file": "01fcc1b45dff7950.md"
},
{
"path": ".claude/skills/metaobjects-runtime-ui/SKILL.md",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,13 @@ MetaObjects generates **no** provider/LLM-call layer and never will — the call
commodity the ecosystem already solves, and a maintained vendor wrapper would just
chase SDK churn (ADR-0024). You bring the caller; MetaObjects owns the typed
render → parse → record. For the call step, plug the idiomatic library into the
one-method `LlmClient` seam from `@metaobjectsdev/ai-runtime`:
one-method `LlmClient` seam. The `trace-helper` generator writes it into your project, in
`llm-call.ts` beside the helpers (no package to install):

```ts
import { generateText } from "ai"; // Vercel AI SDK — recommended
import { anthropic } from "@ai-sdk/anthropic";
import type { LlmClient } from "@metaobjectsdev/ai-runtime";
import type { LlmClient } from "./generated/llm-call"; // where trace-helper wrote it

export const llm: LlmClient = {
async complete({ prompt, model, system }) {
Expand All @@ -204,10 +205,10 @@ output, the de-facto TS standard. Single-provider apps can implement `complete`
directly over `@anthropic-ai/sdk` / `openai`; heavy chains can use LangChain.js —
the seam is one method either way.

With a client in hand, the generated `record<Entity>` helper (the `trace-helper`
generator) and `@metaobjectsdev/ai-runtime`'s `callLlm` do render → call → **typed
trace persist** in one call, recording request/response as typed value objects in
your own DB. The parser above is the standalone receive side if you don't want the
With a client in hand, the generated `call<Entity>` helper (the `trace-helper`
generator) does render → call → **typed trace persist** in one call, recording
request/response as typed value objects in your own DB; `record<Entity>` persists a
call you made yourself. The parser above is the standalone receive side if you don't want the
recorder.

## Drift gate
Expand Down
17 changes: 5 additions & 12 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 11 additions & 2 deletions client/web/packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"./image-upload": {
"bun": "./src/image-upload.tsx",
"types": "./dist/image-upload.d.ts",
"default": "./dist/image-upload.js"
},
"./form.css": "./form.css"
},
"files": [
Expand Down Expand Up @@ -47,16 +52,19 @@
"access": "public"
},
"dependencies": {
"@metaobjectsdev/runtime-web": "workspace:*",
"react-easy-crop": "^6.2.3"
"@metaobjectsdev/runtime-web": "workspace:*"
},
"peerDependencies": {
"@hookform/resolvers": ">=3.0.0 <6.0.0",
"react": ">=18.0.0 <20.0.0",
"react-easy-crop": ">=6.2.3 <7.0.0",
"react-hook-form": ">=7.0.0 <8.0.0",
"zod": ">=3.23.0 <5.0.0"
},
"peerDependenciesMeta": {
"react-easy-crop": {
"optional": true
},
"zod": {
"optional": true
}
Expand All @@ -70,6 +78,7 @@
"jsdom": "^29.1.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-easy-crop": "^6.2.3",
"react-hook-form": "^7.54.0",
"typescript": "^5.6.0",
"zod": "^4.4.3"
Expand Down
13 changes: 13 additions & 0 deletions client/web/packages/react/src/image-upload.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
// `@metaobjectsdev/react/image-upload`: the upload-and-crop control, on its own subpath.
// This module IS that subpath (its name mirrors src/, which tsconfig.scripts.json relies on).
//
// `react-easy-crop` is an OPTIONAL peer. A bundler resolves the whole import graph before it
// tree-shakes, and a dynamic import() of a package that is not installed is fatal to webpack,
// Next.js, esbuild and Bun, so nothing reachable from the package root may import it (#287;
// test/browser-bundleable.test.ts holds every optional peer to that). A project with a
// `view.image` field installs react-easy-crop and imports from here; every other project
// installs nothing extra. The adapter contract stays on the root, because it imports nothing
// optional and an app wires it once for the whole tree.

import { lazy, Suspense, useCallback, useRef, useState } from "react";
import type { ChangeEvent, ReactElement } from "react";
import type { Area } from "react-easy-crop";
Expand Down Expand Up @@ -126,3 +137,5 @@ export function ImageUpload({ value, onChange, meta }: ImageUploadProps): ReactE
</div>
);
}

export { cropToBlob } from "./crop-to-blob.js";
4 changes: 2 additions & 2 deletions client/web/packages/react/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ export {
type UseEntityFormReturn,
} from "./use-entity-form.js";
export { CurrencyInput, type CurrencyInputProps } from "./currency-input.js";
export { ImageUpload, type ImageUploadProps } from "./image-upload.js";
export {
ImageUploadAdapterProvider,
useImageUploadAdapter,
type ImageUploadAdapterProviderProps,
} from "./image-adapter-provider.js";
export { cropToBlob } from "./crop-to-blob.js";
// <ImageUpload> and cropToBlob live on the `@metaobjectsdev/react/image-upload` subpath, which
// needs the optional peer react-easy-crop (see src/image-upload.tsx).
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ docs/
│ ├── templates-and-payloads.md
│ ├── loaders.md
│ ├── migrations-and-drift.md
│ ├── schema-snapshot-format.md # the expected schema as JSON: what `meta schema --as json` prints and migrate commits
│ ├── migrations/ # per-version migration guides (start at upgrading-1.0-to-1.1.md for 1.0.x → 1.1)
│ ├── api-contract.md # cross-port REST contract (the universal browser client speaks it)
│ ├── abstracts-and-inheritance.md # abstract: true + extends: — author-side shape reuse
Expand Down
Loading
Loading