@juicesharp/rpiv-config 1.14.6 → 1.15.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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [1.15.0] - 2026-05-28
2
+
3
+ ### Added
4
+ - `GuidanceFieldsSchema` — TypeBox form of the existing `GuidanceFields` interface. For consumers composing larger TypeBox-validated config objects that need to declare a guidance subtree without redeclaring the leaf shape. Used internally by `rpiv-web-tools` Phase 4 config consolidation.
5
+
6
+ ## [1.14.7] - 2026-05-28
7
+
1
8
  ## [1.14.6] - 2026-05-28
2
9
 
3
10
  ## [1.14.5] - 2026-05-28
package/config.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  import { chmodSync, existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
10
10
  import { homedir } from "node:os";
11
11
  import { dirname, join } from "node:path";
12
- import type { Static, TObject } from "typebox";
12
+ import { type Static, type TObject, Type } from "typebox";
13
13
  import { Value } from "typebox/value";
14
14
 
15
15
  // ---------------------------------------------------------------------------
@@ -103,6 +103,21 @@ export interface GuidanceFields {
103
103
  promptGuidelines?: string[];
104
104
  }
105
105
 
106
+ // TypeBox form of GuidanceFields. Mirrors the interface 1:1 — same fields,
107
+ // same optionality. `additionalProperties: true` lets consumers compose
108
+ // wrappers that may carry sibling-specific keys without those leaking back
109
+ // into rpiv-config. The runtime invariants (non-empty string, non-empty
110
+ // array of non-empty strings) are still enforced by `validateGuidanceFields`;
111
+ // the schema is a structural type-narrowing aid for callers that bake
112
+ // guidance into a larger TypeBox-validated config object.
113
+ export const GuidanceFieldsSchema = Type.Object(
114
+ {
115
+ promptSnippet: Type.Optional(Type.String()),
116
+ promptGuidelines: Type.Optional(Type.Array(Type.String())),
117
+ },
118
+ { additionalProperties: true },
119
+ );
120
+
106
121
  /**
107
122
  * Validate and extract guidance fields from an unknown value.
108
123
  *
package/index.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export {
2
2
  configPath,
3
3
  type GuidanceFields,
4
+ GuidanceFieldsSchema,
4
5
  loadJsonConfig,
5
6
  readEnvVar,
6
7
  saveJsonConfig,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juicesharp/rpiv-config",
3
- "version": "1.14.6",
3
+ "version": "1.15.0",
4
4
  "description": "Shared config I/O utilities for rpiv-mono sibling packages",
5
5
  "keywords": [
6
6
  "rpiv",