spine-parts 2.22.0 → 2.23.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.
package/docs/AUTHORING.md CHANGED
@@ -8201,3 +8201,27 @@ Internal `SeamSupport.drawings` never enters check JSON. Named requirement
8201
8201
  | `requirements.lines.*.*` | Open requirement figures; the dictionary rows and nested object arrays are schema checked. |
8202
8202
  | `sets.*.RECOMPOSITE_HOLES.*` | Open alternate reported figures; every emitted nested object row is schema checked. |
8203
8203
  <!-- check-row-table:end -->
8204
+
8205
+ ## Relocating config file references
8206
+
8207
+ Import `configFileReferences` and, for annotations, `ConfigFileReference` from
8208
+ `@rig-c/parts/src/config.ts` (issue #1134). Pass the JSON-parsed config object before
8209
+ loading it. Each result exposes `at`, the dotted field path, `value`, the path
8210
+ as declared, and `set(next)`, which writes back to that field. Enumeration
8211
+ leaves the object unchanged, skips absent, empty and non-string fields, and
8212
+ excludes built-in skeleton names. It performs no validation or file reads;
8213
+ use the normal loader for diagnostics.
8214
+
8215
+ ```ts
8216
+ import { configFileReferences } from '@rig-c/parts/src/config.ts';
8217
+ import { dirname, resolve } from 'node:path';
8218
+
8219
+ for (const reference of configFileReferences(raw)) {
8220
+ reference.set(resolve(dirname(sourceConfig), reference.value));
8221
+ }
8222
+ ```
8223
+
8224
+ Here `sourceConfig` is the absolute original config filename and `raw` is its
8225
+ JSON-parsed object. Serialize that object at the destination after copying any
8226
+ referenced files; callers that copy files can instead set their new relative
8227
+ paths. The enumerator derives membership from the loader's own declarations.
package/docs/STABILITY.md CHANGED
@@ -29,6 +29,19 @@ below). A build's bytes are not promised across versions. A later version may mo
29
29
  them, and when it does, the change that moves them declares which bytes and why (the
30
30
  winding change of #133 is the example: [MIGRATION.md](MIGRATION.md)).
31
31
 
32
+ ## Programmatic config file references
33
+
34
+ `@rig-c/parts/src/config.ts` exports `configFileReferences(raw: unknown):
35
+ ConfigFileReference[]` and the `ConfigFileReference` type (issue #1134).
36
+ Each reference has `at: string` (a dotted config field), `value: string`
37
+ (the declared path), and `set(value: string): void`, which changes that field
38
+ on the supplied object. Enumeration itself does not mutate, validate, read files,
39
+ or resolve paths. Empty and non-string values are omitted; invalid fields remain
40
+ for the loader to diagnose. Built-in control skeleton names are excluded.
41
+ The loader's file-field declarations determine membership; no separate list is
42
+ maintained. Resolve `value` against the source config directory when relocating.
43
+ Existing deep package paths remain available.
44
+
32
45
  ## Commands and flags
33
46
 
34
47
  Exit codes are part of the interface: **0** the command did what it says, **1** it
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spine-parts",
3
- "version": "2.22.0",
3
+ "version": "2.23.0",
4
4
  "description": "AI-authored 2D character parts from one anime painting and its See-through layer decomposition: measured parts, weighted-mesh rig specs, verified through rig-c before anything is written. A CLI for agents that cannot see the image.",
5
5
  "type": "module",
6
6
  "bin": {