You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit bcef4d9
Browse filesBrowse the repository at this point in the historyBrowse files
fix(cli,sdk): a directory argument is the PROJECT ROOT, and the error now says so (#344)
`meta docs metaobjects` has never worked on Node and never will: the Node
positional is the project root, while the Python and C# `docs` positionals are
the metadata directory — and all three are spelled the same way in help text.
The Node one was literally named `<metadata>`.
The diagnostic then advised declaring `sources`, which from inside the metadata
directory is a second dead end: a `sources` entry is a tagged-union object
(`{ "path": … }`), so the bare string an author writes next fails config-schema
validation.
- `resolveCollection` names the mistake when the directory it resolved holds
metadata but carries no `.metaobjects/config.json`, and points at the
directory to pass instead. The discriminator is the document ROOT
(`metadata.root` / a column-0 `metadata:`), NOT the file extension —
`package.json` and `tsconfig.json` carry a recognized metadata extension, so
an extension test would misdiagnose every JS project root with no metadata
yet, and a confidently wrong hint is worse than the generic one.
- The generic message gained the shape it was asking for:
`"sources": [{ "path": "model" }]`.
- The positional is renamed `[<project-root>]` in both help surfaces, and
`DocsFlags.metadata` → `projectRoot` — the internal name is what kept
regenerating the misleading word.
- The agent-context `metaobjects-codegen` references gained the cross-port note
beside their own `docs` examples (the C# one shipped `dotnet meta docs
metaobjects`, the exact string that misleads on Node), and the `sources` entry
shape — which appeared in no installed skill — is now in the TS reference.
TypeScript-only, deliberately: the sibling ports' directory arguments are
metadata directories throughout, so the mistake is unreachable there. Their
identically worded `ERR_COLLECTION_NOT_FOUND` is untouched, and the cross-port
`source-resolution-conformance` corpus pins error CODES, not message text.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DhpswkF1NvwxhFWMmdAT15
Copy file name to clipboardExpand all lines: fixtures/agent-context-conformance/python/expected/.claude/skills/metaobjects-codegen/references/python.md
Copy file name to clipboardExpand all lines: fixtures/agent-context-conformance/ts-react-tanstack/expected/.claude/skills/metaobjects-codegen/references/typescript.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,6 +67,17 @@ block, and the inferred types.
67
67
A second file, `.metaobjects/config.json`, holds static project state parseable by
68
68
non-TS tooling; `meta init` scaffolds both plus the `metaobjects/` source dir.
69
69
70
+
`sources` in that file is where the metadata lives — `metaobjects/` is only its
71
+
DEFAULT value, so a project can point it anywhere. **Every entry is an OBJECT, never
72
+
a bare string**, and it names a DIRECTORY or a file:
Copy file name to clipboardExpand all lines: fixtures/agent-context-conformance/ts-requirements/expected/.claude/skills/metaobjects-codegen/references/typescript.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,6 +67,17 @@ block, and the inferred types.
67
67
A second file, `.metaobjects/config.json`, holds static project state parseable by
68
68
non-TS tooling; `meta init` scaffolds both plus the `metaobjects/` source dir.
69
69
70
+
`sources` in that file is where the metadata lives — `metaobjects/` is only its
71
+
DEFAULT value, so a project can point it anywhere. **Every entry is an OBJECT, never
72
+
a bare string**, and it names a DIRECTORY or a file:
0 commit comments