@metaobjectsdev/sdk 0.21.0 → 0.21.2

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.
@@ -89,9 +89,10 @@ concrete imports and signatures so you don't have to guess them.
89
89
 
90
90
  ## `codegen-spring` generators
91
91
 
92
- All live in `metaobjects-codegen-spring` under
92
+ Most live in `metaobjects-codegen-spring` under
93
93
  `com.metaobjects.generator.spring.*`; wire any subset, typically all three of the
94
- first group together:
94
+ first group together. (`JavaObjectCodeGenerator`, last row below, lives in the
95
+ separate `metaobjects-codegen-base` module instead.)
95
96
 
96
97
  | Generator | Output |
97
98
  |---|---|
@@ -105,6 +106,7 @@ first group together:
105
106
  | `SpringRenderHelperGenerator` | the typed render helper for a `template.prompt` payload |
106
107
  | `LlmTraceHelperGenerator` | `<Entity>TraceHelper.java` per concrete entity — the LLM-trace helper |
107
108
  | `SpringFilterAllowlistGenerator` | per-entity filter allowlist |
109
+ | `JavaObjectCodeGenerator` | module `metaobjects-codegen-base` (`com.metaobjects.generator.direct.object.javacode`), a separate module from the Spring generators above. Flavor-selected via the `flavor` generator arg. `flavor=pojoAware` → `class <Name> extends PojoObject` (a concrete `MetaObjectAware` class with a `(MetaObject)` constructor) — its inherited `getMetaData()` back-reference is what breaks a default Jackson/Gson mapper, see "Serializing generated objects" below. `flavor=valueObject` → `class <Name> extends ValueObject` (map-backed; less hostile to a default mapper, but still not the sanctioned serialization path). Either concrete flavor also emits a `<Name>Extractor` plus a self-registering `ObjectClassBindingProvider`. For a plain default-Jackson-friendly type, use the `codegen-spring` record surface instead — never `pojoAware`. |
108
110
 
109
111
  **Projections (read-only views).** An `object.projection` (read-only `source.rdb`
110
112
  `@kind: view` child) is served read-only through OMDB at the ObjectManager layer
@@ -153,3 +155,69 @@ polymorphic + per-subtype-scoped repository seam the consumer implements against
153
155
  Spring Data JPA / JDBC. Conformance-gated by `fixtures/api-contract-conformance/tph`
154
156
  (HTTP wire shape) and `fixtures/persistence-conformance/tph-*` (single-table
155
157
  runtime semantics).
158
+
159
+ ## Serializing generated objects
160
+
161
+ Two paths hand you a `MetaObjectAware` instance: (a) `JavaObjectCodeGenerator`'s
162
+ flavored codegen above (a `pojoAware` or `valueObject` class), and (b) the om/omdb
163
+ runtime (`ObjectManager.getObjects(...)` / `MetaObject.newInstance()` — see the
164
+ runtime-ui reference). **A default Jackson/Gson mapper over a `PojoObject` subtype
165
+ fails on the `MetaObject` back-reference** — the inherited `getMetaData()` getter
166
+ leads a bean-style mapper into the metadata graph, and on a modular JVM into
167
+ `InaccessibleObjectException`. This is expected, not a bug to work around. If you
168
+ want a type that serializes cleanly with a bare default mapper, use the
169
+ `codegen-spring` record surface (`SpringDtoGenerator` / `SpringPayloadGenerator` /
170
+ `SpringValueObjectGenerator`) instead — never `pojoAware`.
171
+
172
+ Serialize any `MetaObjectAware` instance through the MetaObjects JSON layer's
173
+ `JsonObjectWriter`/`JsonObjectReader`, not a bare mapper — it applies the temporal
174
+ wire form below, and read/write round-trip through the same pair of calls:
175
+
176
+ ```java
177
+ import com.metaobjects.io.object.json.JsonObjectWriter;
178
+ import com.metaobjects.io.object.json.JsonObjectReader;
179
+ import com.metaobjects.loader.MetaDataLoader;
180
+ import com.metaobjects.object.MetaObject;
181
+
182
+ import java.io.StringReader;
183
+ import java.io.StringWriter;
184
+ import java.nio.file.Path;
185
+
186
+ MetaDataLoader loader = MetaDataLoader.fromDirectory("app", Path.of("src/main/metaobjects"));
187
+ MetaObject mo = loader.getMetaObjectByName("acme::blog::Author");
188
+
189
+ // pojoAware-flavor generated class: public Author(MetaObject mo) { super(mo); }
190
+ Author author = new Author(mo);
191
+ author.setName("Ada");
192
+ author.setBirthDate(new java.util.Date()); // field.date
193
+
194
+ // Write
195
+ StringWriter out = new StringWriter();
196
+ JsonObjectWriter.writeObject(author, out);
197
+ String json = out.toString();
198
+ // {"@type":"acme::blog::Author","name":"Ada","birthDate":"2026-06-03"}
199
+
200
+ // Read
201
+ Author roundTripped = JsonObjectReader.readObject(Author.class, mo, new StringReader(json));
202
+ ```
203
+
204
+ **Wire form** (`field.date` / `field.timestamp`):
205
+
206
+ | Field | Wire form | Example |
207
+ |---|---|---|
208
+ | `field.date` | calendar date of the instant at UTC — `YYYY-MM-DD` | `"2026-06-03"` |
209
+ | `field.timestamp` + `@localTime: true` | wall clock of the instant at UTC, no `Z` | `"2026-06-03T14:30:00.123"` |
210
+ | `field.timestamp` (default, tz-aware) | UTC instant, with `Z` | `"2026-06-03T14:30:00.123Z"` |
211
+
212
+ Fraction is millisecond resolution, trailing zeros stripped, and the `.` plus
213
+ fraction omitted entirely when zero (`.123`→`.123`, `.120`→`.12`, `.100`→`.1`,
214
+ `.000`→omitted). A `null` value writes JSON `null`. Readers are tolerant and
215
+ backward-compatible: a JSON **number** is still read as **legacy epoch
216
+ milliseconds**; a JSON **string** is tried in order as an ISO instant (the `Z`
217
+ form) → a local date-time (no `Z`) → a date-only form, failing with a message
218
+ naming all three accepted forms.
219
+
220
+ **Known bounded caveat:** a hand-constructed `field.date` value carrying a
221
+ sub-day time component writes as the calendar date only (truncated on first
222
+ write, stable thereafter) — this matches the shipped OMDB DATE codec, which
223
+ anchors DATE columns at midnight UTC.
@@ -53,6 +53,14 @@ rather than a throw. The payload record itself comes from `SpringPayloadGenerato
53
53
  — the parser is a companion to it, so the parser and payload VO can't silently
54
54
  drift.
55
55
 
56
+ Both `parse()` and `extractLenient(...)` here return **plain Java 21 records** —
57
+ safe with any mapper, nothing special needed. That's specific to this
58
+ `codegen-spring` extract tier: the codegen-base flavored `<Name>Extractor` and the
59
+ raw `MetaObjectExtractor` (the alternative extraction path, see the codegen
60
+ reference) return `MetaObjectAware` instances instead, and those need
61
+ `JsonObjectWriter`/`MetaObjectSerializer` — not a bare mapper — to serialize
62
+ correctly (see the codegen reference's "Serializing generated objects" section).
63
+
56
64
  ## The output-format prompt fragment (FR-010)
57
65
 
58
66
  For every json/xml-format `template.output`, `codegen-spring`'s
@@ -65,6 +65,22 @@ try {
65
65
  taking a `QueryOptions` (built from an `Expression`). `ValueObject` is the
66
66
  map-backed runtime carrier.
67
67
 
68
+ ## Serializing a row
69
+
70
+ A `ValueObject` **is** a `Map<String, Object>`, so a default Jackson
71
+ `ObjectMapper` map-serializes it without special configuration — you may not
72
+ hit a hard failure at all. The hard failure other shapes hit is the
73
+ **`pojoAware`** codegen flavor's bean shape (a public `getMetaData()`
74
+ back-reference a bean-style mapper walks into) and any direct Gson field walk
75
+ over a `MetaObjectAware` instance — an OMDB `ValueObject` row sidesteps both.
76
+
77
+ Even so, the MetaObjects JSON layer (`JsonObjectWriter`/`JsonObjectReader`,
78
+ `com.metaobjects.io.object.json`) is the sanctioned path for an OMDB row
79
+ regardless of mapper friendliness — it's what applies the temporal wire form
80
+ (`field.date`/`field.timestamp` render per the cross-port contract; a default
81
+ mapper has no idea what shape those should take). See the codegen reference's
82
+ "Serializing generated objects" section for the write+read snippet.
83
+
68
84
  ## Spring wiring
69
85
 
70
86
  `metaobjects-core-spring` (or the Spring Boot starter) declares an
@@ -15,6 +15,7 @@ spine; generated code is the disposable artifact. Regenerate with `{{codegenComm
15
15
  - Never hand-edit generated files — change the metadata and regenerate (three-way merge preserves hand-written regions).
16
16
  - Use the generated constants for any string that names metadata.
17
17
  - The loaded metadata model is READ-ONLY — never inject nodes or mutate the tree at load time (no "enrich the model on load" hooks). Need an extra field/column? Author it in the metadata, or derive it during codegen (read the metadata, emit output). Mutating the loaded model makes it diverge from what's declared — a bad practice reserved for very rare cases.
18
+ - **JVM:** serialize a MetaObject-backed instance (a `pojoAware`-flavor generated class, a runtime `ValueObject`, or any `MetaObjectAware` type) through the MetaObjects JSON layer — never hand-configure a Jackson/Gson mapper around the framework fields to make a default mapper cope.
18
19
 
19
20
  ## Authoring rules you must not violate
20
21
  - Nodes are fused-key maps: `{"<type>.<subType>": { ... }}` (e.g. `{"field.string": {"name": "email"}}`) — never split the type and subtype into separate keys.
package/dist/config.d.ts CHANGED
@@ -1,4 +1,17 @@
1
1
  import { z } from "zod";
2
+ /**
3
+ * Kept in lockstep with the CLI's authoritative `ALLOW_TOKENS`
4
+ * (`cli/src/lib/args.ts`) by hand — `sdk` has no dependency on `cli` (the
5
+ * dependency runs the other way: `cli` depends on `sdk`), so this list
6
+ * cannot import that one. `cli`'s `allow-tokens-pinned.test.ts` is the
7
+ * drift guard: it imports BOTH `ALLOW_TOKENS` and this enum's `.options`
8
+ * and asserts they're the same set, so an out-of-sync edit here fails that
9
+ * test rather than silently rejecting a token the CLI itself accepts (as
10
+ * happened before `drop-check`/`drop-view`/`drop-view-cascade`/
11
+ * `adopt-view`/`drop-identity-default` were added to `cli` without a
12
+ * matching update here).
13
+ */
14
+ export declare const AllowTokenEnum: z.ZodEnum<["drop-column", "drop-table", "type-change", "drop-index", "drop-fk", "drop-check", "drop-view", "drop-view-cascade", "adopt-view", "nullable-to-not-null", "drop-identity-default"]>;
2
15
  export declare const ConfigSchema: z.ZodObject<{
3
16
  schema_version: z.ZodLiteral<1>;
4
17
  pending_in_git: z.ZodDefault<z.ZodBoolean>;
@@ -44,7 +57,7 @@ export declare const ConfigSchema: z.ZodObject<{
44
57
  dialect: z.ZodOptional<z.ZodEnum<["sqlite", "postgres", "d1"]>>;
45
58
  format: z.ZodOptional<z.ZodEnum<["default", "flyway"]>>;
46
59
  onAmbiguous: z.ZodOptional<z.ZodEnum<["abort", "rename", "drop-add"]>>;
47
- allow: z.ZodOptional<z.ZodArray<z.ZodEnum<["drop-column", "drop-table", "type-change", "drop-index", "drop-fk", "nullable-to-not-null"]>, "many">>;
60
+ allow: z.ZodOptional<z.ZodArray<z.ZodEnum<["drop-column", "drop-table", "type-change", "drop-index", "drop-fk", "drop-check", "drop-view", "drop-view-cascade", "adopt-view", "nullable-to-not-null", "drop-identity-default"]>, "many">>;
48
61
  d1: z.ZodOptional<z.ZodObject<{
49
62
  binding: z.ZodOptional<z.ZodString>;
50
63
  remote: z.ZodOptional<z.ZodBoolean>;
@@ -73,7 +86,7 @@ export declare const ConfigSchema: z.ZodObject<{
73
86
  dialect?: "sqlite" | "postgres" | "d1" | undefined;
74
87
  format?: "default" | "flyway" | undefined;
75
88
  onAmbiguous?: "abort" | "rename" | "drop-add" | undefined;
76
- allow?: ("drop-column" | "drop-table" | "type-change" | "drop-index" | "drop-fk" | "nullable-to-not-null")[] | undefined;
89
+ allow?: ("drop-column" | "drop-table" | "type-change" | "drop-index" | "drop-fk" | "drop-check" | "drop-view" | "drop-view-cascade" | "adopt-view" | "nullable-to-not-null" | "drop-identity-default")[] | undefined;
77
90
  }, {
78
91
  d1?: {
79
92
  binding?: string | undefined;
@@ -86,7 +99,7 @@ export declare const ConfigSchema: z.ZodObject<{
86
99
  dialect?: "sqlite" | "postgres" | "d1" | undefined;
87
100
  format?: "default" | "flyway" | undefined;
88
101
  onAmbiguous?: "abort" | "rename" | "drop-add" | undefined;
89
- allow?: ("drop-column" | "drop-table" | "type-change" | "drop-index" | "drop-fk" | "nullable-to-not-null")[] | undefined;
102
+ allow?: ("drop-column" | "drop-table" | "type-change" | "drop-index" | "drop-fk" | "drop-check" | "drop-view" | "drop-view-cascade" | "adopt-view" | "nullable-to-not-null" | "drop-identity-default")[] | undefined;
90
103
  }>>;
91
104
  }, "strip", z.ZodTypeAny, {
92
105
  schema_version: 1;
@@ -117,7 +130,7 @@ export declare const ConfigSchema: z.ZodObject<{
117
130
  dialect?: "sqlite" | "postgres" | "d1" | undefined;
118
131
  format?: "default" | "flyway" | undefined;
119
132
  onAmbiguous?: "abort" | "rename" | "drop-add" | undefined;
120
- allow?: ("drop-column" | "drop-table" | "type-change" | "drop-index" | "drop-fk" | "nullable-to-not-null")[] | undefined;
133
+ allow?: ("drop-column" | "drop-table" | "type-change" | "drop-index" | "drop-fk" | "drop-check" | "drop-view" | "drop-view-cascade" | "adopt-view" | "nullable-to-not-null" | "drop-identity-default")[] | undefined;
121
134
  } | undefined;
122
135
  }, {
123
136
  schema_version: 1;
@@ -148,7 +161,7 @@ export declare const ConfigSchema: z.ZodObject<{
148
161
  dialect?: "sqlite" | "postgres" | "d1" | undefined;
149
162
  format?: "default" | "flyway" | undefined;
150
163
  onAmbiguous?: "abort" | "rename" | "drop-add" | undefined;
151
- allow?: ("drop-column" | "drop-table" | "type-change" | "drop-index" | "drop-fk" | "nullable-to-not-null")[] | undefined;
164
+ allow?: ("drop-column" | "drop-table" | "type-change" | "drop-index" | "drop-fk" | "drop-check" | "drop-view" | "drop-view-cascade" | "adopt-view" | "nullable-to-not-null" | "drop-identity-default")[] | undefined;
152
165
  } | undefined;
153
166
  }>;
154
167
  export type Config = z.infer<typeof ConfigSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAqCxB,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuBvB,CAAC;AAEH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAElD,eAAO,MAAM,cAAc,EAAE,MAAkD,CAAC;AAIhF,wBAAsB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAGlE;AAED,wBAAsB,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAOhF"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,cAAc,iMAYzB,CAAC;AAsBH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuBvB,CAAC;AAEH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAElD,eAAO,MAAM,cAAc,EAAE,MAAkD,CAAC;AAIhF,wBAAsB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAGlE;AAED,wBAAsB,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAOhF"}
package/dist/config.js CHANGED
@@ -3,13 +3,30 @@ import { readFile, writeFile } from "node:fs/promises";
3
3
  import { join } from "node:path";
4
4
  const DialectEnum = z.enum(["sqlite", "postgres", "d1"]);
5
5
  const OnAmbiguousEnum = z.enum(["abort", "rename", "drop-add"]);
6
- const AllowTokenEnum = z.enum([
6
+ /**
7
+ * Kept in lockstep with the CLI's authoritative `ALLOW_TOKENS`
8
+ * (`cli/src/lib/args.ts`) by hand — `sdk` has no dependency on `cli` (the
9
+ * dependency runs the other way: `cli` depends on `sdk`), so this list
10
+ * cannot import that one. `cli`'s `allow-tokens-pinned.test.ts` is the
11
+ * drift guard: it imports BOTH `ALLOW_TOKENS` and this enum's `.options`
12
+ * and asserts they're the same set, so an out-of-sync edit here fails that
13
+ * test rather than silently rejecting a token the CLI itself accepts (as
14
+ * happened before `drop-check`/`drop-view`/`drop-view-cascade`/
15
+ * `adopt-view`/`drop-identity-default` were added to `cli` without a
16
+ * matching update here).
17
+ */
18
+ export const AllowTokenEnum = z.enum([
7
19
  "drop-column",
8
20
  "drop-table",
9
21
  "type-change",
10
22
  "drop-index",
11
23
  "drop-fk",
24
+ "drop-check",
25
+ "drop-view",
26
+ "drop-view-cascade",
27
+ "adopt-view",
12
28
  "nullable-to-not-null",
29
+ "drop-identity-default",
13
30
  ]);
14
31
  const D1Block = z.object({
15
32
  binding: z.string(),
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,MAAM,WAAW,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC;AAEzD,MAAM,eAAe,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC;AAEhE,MAAM,cAAc,GAAG,CAAC,CAAC,IAAI,CAAC;IAC5B,aAAa;IACb,YAAY;IACZ,aAAa;IACb,YAAY;IACZ,SAAS;IACT,sBAAsB;CACvB,CAAC,CAAC;AAEH,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,CAAC;IACvB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE;IACnB,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE;IACtB,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE;CAC/B,CAAC,CAAC,OAAO,EAAE,CAAC;AAEb,sEAAsE;AACtE,MAAM,iBAAiB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC;AAExD,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,OAA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Ac;IAC/D,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,0BAA0B;IACtD,MAAM,SAAS,CACb,IAAI,CAAC,QAAQ,EAAE,WAAW,CAAC,EAC3B,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,EACtC,MAAM,CACP,CAAC;AACJ,CAAC"}
package/dist/index.d.ts CHANGED
@@ -8,7 +8,7 @@ export { AnyRecord } from "./records/any.js";
8
8
  export { readRecord, recordExists, writeRecord, removeRecord, listRecords, promoteRecord, supersede, ForgeRecordNotFoundError, ForgeAlreadyPromotedError, ForgeRecordParseError, } from "./storage/index.js";
9
9
  export type { ListOptions } from "./storage/index.js";
10
10
  export { recordPath, resolveMetaRoot } from "./paths.js";
11
- export { ConfigSchema, DEFAULT_CONFIG, loadConfig, saveConfig } from "./config.js";
11
+ export { ConfigSchema, DEFAULT_CONFIG, loadConfig, saveConfig, AllowTokenEnum } from "./config.js";
12
12
  export type { Config } from "./config.js";
13
13
  export { FORGE_TYPE_DECISION, FORGE_TYPE_PRINCIPLE, FORGE_TYPE_CONVENTION, FORGE_TYPE_GLOSSARY, FORGE_TYPE_FAILURE, FORGE_TYPES, FORGE_DECISION_SUBTYPES, FORGE_PRINCIPLE_SUBTYPES, FORGE_CONVENTION_SUBTYPES, FORGE_GLOSSARY_SUBTYPES, FORGE_FAILURE_SUBTYPES, FORGE_ATTR_CONFIDENCE, FORGE_ATTR_SOURCE, FORGE_ATTR_CAPTURED_AT, FORGE_ATTR_LAST_VALIDATED_COMMIT, FORGE_ATTR_PRIMARY_LOCATION, FORGE_ATTR_OCCURRENCES, FORGE_ATTR_RATIONALE, FORGE_ATTR_ALTERNATIVES, FORGE_ATTR_SCOPE, FORGE_ATTR_STATEMENT, FORGE_ATTR_ENFORCEMENT, FORGE_ATTR_PATTERN_DESCRIPTION, FORGE_ATTR_EXAMPLES, FORGE_ATTR_COUNTER_EXAMPLES, FORGE_ATTR_APPLIES_TO, FORGE_ATTR_TERM, FORGE_ATTR_SYNONYMS, FORGE_ATTR_DEFINITION, FORGE_ATTR_CODE_ANCHORS, FORGE_ATTR_SEE_ALSO, FORGE_ATTR_WHAT_WAS_TRIED, FORGE_ATTR_WHY_IT_FAILED, FORGE_ATTRS, registerForgeTypes, forgeTypesProvider, } from "./forge-types.js";
14
14
  export type { ForgeType, ForgeAttr } from "./forge-types.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAG7C,OAAO,EACL,UAAU,EACV,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,WAAW,EACX,aAAa,EACb,SAAS,EACT,wBAAwB,EACxB,yBAAyB,EACzB,qBAAqB,GACtB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGtD,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAGzD,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACnF,YAAY,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAK1C,OAAO,EAEL,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EAClB,WAAW,EAEX,u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,OAAO,EACL,UAAU,EACV,0BAA0B,EAC1B,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGrD,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACtF,YAAY,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAOlE,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,GACtB,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAGpD,cAAc,0BAA0B,CAAC"}
package/dist/index.js CHANGED
@@ -11,7 +11,7 @@ export { readRecord, recordExists, writeRecord, removeRecord, listRecords, promo
11
11
  // Paths
12
12
  export { recordPath, resolveMetaRoot } from "./paths.js";
13
13
  // Config
14
- export { ConfigSchema, DEFAULT_CONFIG, loadConfig, saveConfig } from "./config.js";
14
+ export { ConfigSchema, DEFAULT_CONFIG, loadConfig, saveConfig, AllowTokenEnum } from "./config.js";
15
15
  // Meta Forge metadata types + attribute name constants (registered into a
16
16
  // TypeRegistry to let Loader parse decision/principle/etc. children + the
17
17
  // @forge* attribute namespace).
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,sB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AACX,uBAAuB,EACvB,wBAAwB,EACxB,yBAAyB,EACzB,uBAAuB,EACvB,sBAAsB;AACtB,kBAAkB;AAClB,qBAAqB,EACrB,iBAAiB,EACjB,sBAAsB,EACtB,gCAAgC,EAChC,2BAA2B,EAC3B,sBAAsB,EACtB,oBAAoB,EACpB,uBAAuB,EACvB,gBAAgB,EAChB,oBAAoB,EACpB,sBAAsB,EACtB,8BAA8B,EAC9B,mBAAmB,EACnB,2BAA2B,EAC3B,qBAAqB,EACrB,eAAe,EACf,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,EACnB,yBAAyB,EACzB,wBAAwB,EACxB,WAAW;AACX,iCAAiC;AACjC,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAG1B,yDAAyD;AACzD,mEAAmE;AACnE,6CAA6C;AAC7C,OAAO,EACL,UAAU,EACV,0BAA0B,EAC1B,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,aAAa,CAAC;AAGrB,mEAAmE;AACnE,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAGtF,4EAA4E;AAC5E,0EAA0E;AAC1E,wEAAwE;AACxE,yEAAyE;AACzE,uBAAuB;AACvB,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,GACtB,MAAM,cAAc,CAAC;AAGtB,uEAAuE;AACvE,cAAc,0BAA0B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metaobjectsdev/sdk",
3
- "version": "0.21.0",
3
+ "version": "0.21.2",
4
4
  "description": "Workspace helpers and agent-docs utilities for MetaObjects projects.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -56,7 +56,7 @@
56
56
  "access": "public"
57
57
  },
58
58
  "dependencies": {
59
- "@metaobjectsdev/metadata": "0.21.0",
59
+ "@metaobjectsdev/metadata": "0.21.2",
60
60
  "zod": "^3.23.0"
61
61
  },
62
62
  "devDependencies": {
package/src/config.ts CHANGED
@@ -6,13 +6,30 @@ const DialectEnum = z.enum(["sqlite", "postgres", "d1"]);
6
6
 
7
7
  const OnAmbiguousEnum = z.enum(["abort", "rename", "drop-add"]);
8
8
 
9
- const AllowTokenEnum = z.enum([
9
+ /**
10
+ * Kept in lockstep with the CLI's authoritative `ALLOW_TOKENS`
11
+ * (`cli/src/lib/args.ts`) by hand — `sdk` has no dependency on `cli` (the
12
+ * dependency runs the other way: `cli` depends on `sdk`), so this list
13
+ * cannot import that one. `cli`'s `allow-tokens-pinned.test.ts` is the
14
+ * drift guard: it imports BOTH `ALLOW_TOKENS` and this enum's `.options`
15
+ * and asserts they're the same set, so an out-of-sync edit here fails that
16
+ * test rather than silently rejecting a token the CLI itself accepts (as
17
+ * happened before `drop-check`/`drop-view`/`drop-view-cascade`/
18
+ * `adopt-view`/`drop-identity-default` were added to `cli` without a
19
+ * matching update here).
20
+ */
21
+ export const AllowTokenEnum = z.enum([
10
22
  "drop-column",
11
23
  "drop-table",
12
24
  "type-change",
13
25
  "drop-index",
14
26
  "drop-fk",
27
+ "drop-check",
28
+ "drop-view",
29
+ "drop-view-cascade",
30
+ "adopt-view",
15
31
  "nullable-to-not-null",
32
+ "drop-identity-default",
16
33
  ]);
17
34
 
18
35
  const D1Block = z.object({
package/src/index.ts CHANGED
@@ -26,7 +26,7 @@ export type { ListOptions } from "./storage/index.js";
26
26
  export { recordPath, resolveMetaRoot } from "./paths.js";
27
27
 
28
28
  // Config
29
- export { ConfigSchema, DEFAULT_CONFIG, loadConfig, saveConfig } from "./config.js";
29
+ export { ConfigSchema, DEFAULT_CONFIG, loadConfig, saveConfig, AllowTokenEnum } from "./config.js";
30
30
  export type { Config } from "./config.js";
31
31
 
32
32
  // Meta Forge metadata types + attribute name constants (registered into a