@yaag/runtime 0.30.1 → 0.31.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yaag/runtime",
3
- "version": "0.30.1",
3
+ "version": "0.31.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -22,6 +22,9 @@ const ThinkingLevelSchema = Type.Union(THINKING_LEVELS.map((level) => Type.Liter
22
22
  * `profile` is the one top-level scalar key. Unlike `agents.extensions`, which
23
23
  * concatenates across the layers, it does not concatenate: the last layer that
24
24
  * states it wins (ADR-0052).
25
+ *
26
+ * `hc.peekTerminals` switches on the Peek Terminals in hc (ADR-0072). Like
27
+ * `profile`, it is last-layer-wins.
25
28
  */
26
29
  export const YaagConfigSchema = Type.Object(
27
30
  {
@@ -55,6 +58,12 @@ export const YaagConfigSchema = Type.Object(
55
58
  { additionalProperties: false },
56
59
  ),
57
60
  ),
61
+ hc: Type.Optional(
62
+ Type.Object(
63
+ { peekTerminals: Type.Optional(Type.Boolean()) },
64
+ { additionalProperties: false },
65
+ ),
66
+ ),
58
67
  },
59
68
  { additionalProperties: false },
60
69
  );
@@ -59,6 +59,10 @@ export interface EffectiveConfig {
59
59
  * goes through `questionSummaryOf`, which applies the defaults.
60
60
  */
61
61
  readonly askUserSummary?: QuestionSummaryConfig;
62
+ /**
63
+ * The last layer that set `hc.peekTerminals` (ADR-0072); absent means `false`.
64
+ */
65
+ readonly hcPeekTerminals?: boolean;
62
66
  }
63
67
 
64
68
  /** What to discover and read. */
@@ -149,10 +153,15 @@ function mergeLayers(found: readonly LoadedLayer[]): EffectiveConfig {
149
153
  (last, { layer }) => layer.document.profile ?? last,
150
154
  undefined,
151
155
  );
156
+ const hcPeekTerminals = found.reduce<boolean | undefined>(
157
+ (last, { layer }) => layer.document.hc?.peekTerminals ?? last,
158
+ undefined,
159
+ );
152
160
  return Object.freeze({
153
161
  extensions: Object.freeze(extensions),
154
162
  files: Object.freeze(found.map(({ layer }) => layer.file)),
155
163
  ...(profile === undefined ? {} : { profile }),
164
+ ...(hcPeekTerminals === undefined ? {} : { hcPeekTerminals }),
156
165
  askUserSummary: mergeQuestionSummary(found),
157
166
  });
158
167
  }