Skip to content

Commit ef51fd1

Browse files
dmealingclaude
andcommitted
deprecate(sdk): the v0.3 package.meta.json prototype and workspace discovery
These ten sdk exports model a package.meta.json that nothing in the toolchain ever reads: no loader, CLI or port consults it, and the only callers are the sdk's own tests. Cross-repo metadata sharing is being built properly as FR-023 (metadata dependencies), so the prototype would mislead anyone who found it first. They are public exports, so they stay working now and are removed in 2.0. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ApQWqotP1jaKs85XhKVXG4
1 parent 2a406dd commit ef51fd1

4 files changed

Lines changed: 32 additions & 7 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@ here.**
1010

1111
## [Unreleased]
1212

13+
### Deprecated
14+
15+
- **`@metaobjectsdev/sdk`: the v0.3 `package.meta.json` prototype and workspace discovery** —
16+
`PackageManifestSchema`, `PackageManifest`, `PACKAGE_MANIFEST_FILE`, `readPackageManifest`,
17+
`resolveMetaobjectsPackage`, `discoverWorkspace`, `resolveExtendsOrder`, `packageLabel`,
18+
`Workspace`, `WorkspacePackage`. Nothing in the toolchain reads a `package.meta.json`;
19+
cross-repo metadata sharing is being built as FR-023 (metadata dependencies). They still work
20+
and are removed in 2.0.
21+
1322
## [1.0.2] — 2026-09-11
1423

1524
_npm `1.0.2` (full lockstep across all 14 `@metaobjectsdev/*` publish candidates)._

‎server/typescript/packages/sdk/src/index.ts‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,13 @@ export type { DiscoveredRoot } from "./discovery.js";
9494
export { resolveCollection } from "./collection.js";
9595
export type { Collection } from "./collection.js";
9696

97-
// Workspace discovery — finds peer metadata packages in a monorepo
97+
// DEPRECATED (removed in 2.0) — workspace discovery over the v0.3 package.meta.json
98+
// prototype. Nothing in the toolchain calls it; cross-repo sharing is FR-023.
9899
export { discoverWorkspace, resolveExtendsOrder, packageLabel } from "./workspace.js";
99100
export type { Workspace, WorkspacePackage } from "./workspace.js";
100101

101-
// Package manifest — the v0.3 package.meta.json model. Three-field manifest
102-
// (name, version, extends) that defines a metadata package's identity and
103-
// upstream dependencies. The package's metadata tree IS its public API;
104-
// there is no exports field. See docs/strategy/2026-05-12-v0.3-ai-first-
105-
// metadata-loading.md.
102+
// DEPRECATED (removed in 2.0) — the v0.3 package.meta.json prototype. Never wired into
103+
// loading; superseded by FR-023 (metadata dependencies).
106104
export {
107105
PackageManifestSchema,
108106
readPackageManifest,

‎server/typescript/packages/sdk/src/package.ts‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ const MetaobjectsPackageSchema = z.string().regex(
3939
/**
4040
* The package.meta.json schema. Authoring this is the one-time cost of
4141
* defining a metadata package; subsequent edits should be rare.
42+
*
43+
* @deprecated The v0.3 `package.meta.json` prototype: nothing in the toolchain reads it. Cross-repo metadata sharing is FR-023 (metadata dependencies). Removed in 2.0.
4244
*/
4345
export const PackageManifestSchema = z.object({
4446
/**
@@ -72,15 +74,19 @@ export const PackageManifestSchema = z.object({
7274
extends: z.array(ExtendsEntrySchema).default([]),
7375
});
7476

77+
/** @deprecated The v0.3 `package.meta.json` prototype: nothing in the toolchain reads it. Cross-repo metadata sharing is FR-023 (metadata dependencies). Removed in 2.0. */
7578
export type PackageManifest = z.infer<typeof PackageManifestSchema>;
7679

80+
/** @deprecated The v0.3 `package.meta.json` prototype: nothing in the toolchain reads it. Cross-repo metadata sharing is FR-023 (metadata dependencies). Removed in 2.0. */
7781
export const PACKAGE_MANIFEST_FILE = "package.meta.json";
7882

7983
/**
8084
* Read a package.meta.json from a given .meta/ root, if present.
8185
* Returns undefined when the file isn't there — packages are optional in
8286
* v0.3 v0.1 (loadMemory still works for single-package usage without one,
8387
* and forge init scaffolds one but doesn't enforce its presence).
88+
*
89+
* @deprecated The v0.3 `package.meta.json` prototype: nothing in the toolchain reads it. Cross-repo metadata sharing is FR-023 (metadata dependencies). Removed in 2.0.
8490
*/
8591
export async function readPackageManifest(metaDir: string): Promise<PackageManifest | undefined> {
8692
const path = join(metaDir, PACKAGE_MANIFEST_FILE);
@@ -104,6 +110,8 @@ export async function readPackageManifest(metaDir: string): Promise<PackageManif
104110
* Returns undefined if `name` itself isn't a valid bare name (e.g. has
105111
* uppercase chars) and no explicit ref is set — the caller should treat
106112
* this as an authoring error.
113+
*
114+
* @deprecated The v0.3 `package.meta.json` prototype: nothing in the toolchain reads it. Cross-repo metadata sharing is FR-023 (metadata dependencies). Removed in 2.0.
107115
*/
108116
export function resolveMetaobjectsPackage(manifest: PackageManifest): string | undefined {
109117
if (manifest.metaobjectsPackage !== undefined) return manifest.metaobjectsPackage;

‎server/typescript/packages/sdk/src/workspace.ts‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ const PACKAGE_JSON = "package.json";
3030
// Public types
3131
// ---------------------------------------------------------------------------
3232

33+
/** @deprecated The v0.3 `package.meta.json` prototype: nothing in the toolchain reads it. Cross-repo metadata sharing is FR-023 (metadata dependencies). Removed in 2.0. */
3334
export interface WorkspacePackage {
3435
/** Absolute path to the .meta/ directory. */
3536
metaDir: string;
@@ -39,6 +40,7 @@ export interface WorkspacePackage {
3940
metaobjectsPackage: string;
4041
}
4142

43+
/** @deprecated The v0.3 `package.meta.json` prototype: nothing in the toolchain reads it. Cross-repo metadata sharing is FR-023 (metadata dependencies). Removed in 2.0. */
4244
export interface Workspace {
4345
/** Absolute path to the workspace root (where pnpm-workspace.yaml or package.json lives). */
4446
root: string;
@@ -213,6 +215,8 @@ function matchGlobSegment(pattern: string): (value: string) => boolean {
213215
*
214216
* The returned Workspace has every package's manifest pre-loaded; callers
215217
* can look up peers by name or canonical metaobjects ref.
218+
*
219+
* @deprecated The v0.3 `package.meta.json` prototype: nothing in the toolchain reads it. Cross-repo metadata sharing is FR-023 (metadata dependencies). Removed in 2.0.
216220
*/
217221
export async function discoverWorkspace(cwd: string): Promise<Workspace | undefined> {
218222
const config = await findWorkspaceConfig(cwd);
@@ -290,6 +294,8 @@ export async function discoverWorkspace(cwd: string): Promise<Workspace | undefi
290294
* Throws on:
291295
* - Missing package referenced by extends:
292296
* - Cycles in the extends graph
297+
*
298+
* @deprecated The v0.3 `package.meta.json` prototype: nothing in the toolchain reads it. Cross-repo metadata sharing is FR-023 (metadata dependencies). Removed in 2.0.
293299
*/
294300
export function resolveExtendsOrder(
295301
workspace: Workspace,
@@ -336,7 +342,11 @@ export function resolveExtendsOrder(
336342
// Diagnostic helpers
337343
// ---------------------------------------------------------------------------
338344

339-
/** Human-readable label for a workspace package — useful for error messages. */
345+
/**
346+
* Human-readable label for a workspace package — useful for error messages.
347+
*
348+
* @deprecated The v0.3 `package.meta.json` prototype: nothing in the toolchain reads it. Cross-repo metadata sharing is FR-023 (metadata dependencies). Removed in 2.0.
349+
*/
340350
export function packageLabel(pkg: WorkspacePackage): string {
341351
return `${pkg.manifest.name} (${pkg.metaobjectsPackage}) at ${basename(dirname(pkg.metaDir))}`;
342352
}

0 commit comments

Comments
 (0)