@telorun/analyzer 0.67.0 → 0.68.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.
@@ -1 +1 @@
1
- {"version":3,"file":"analyzer.d.ts","sourceRoot":"","sources":["../src/analyzer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAsB,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAiBzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAKL,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAC;AA8B9B,OAAO,EAAmB,KAAK,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAWvF,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACzF,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAwDjE,OAAO,EAAsB,KAAK,kBAAkB,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAkG/F;0CAC0C;AAC1C,eAAO,MAAM,eAAe,GAAI,OAAO;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,KAAG,OACT,CAAC;AAErD;8EAC8E;AAC9E,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAGhD;AAqUD,8DAA8D;AAC9D,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACtC;AA6DD,MAAM,WAAW,qBAAqB;IACpC,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAkFD,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;gBAEzB,OAAO,GAAE,qBAA0B;IAI/C;;;;;;;;;;;;;;OAcG;IACH,OAAO,CACL,SAAS,EAAE,gBAAgB,EAAE,EAC7B,O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import { describeProjectionFailure, manifestListScope, resolveSchemaProjections, } from "./schema-projection.js";
38
38
  import { validateDynamicSelectors, validateRefSlotDeclarations, } from "./validate-ref-slots.js";
39
39
  import { validateValueTypeSlots, } from "./validate-value-type-slots.js";
40
+ import { validateSensitiveSlots, } from "./validate-sensitive-slots.js";
40
41
  import { resolveSchemaTypeRefs } from "./resolve-schema-type-refs.js";
41
42
  import { validateSchemaTypeRefs } from "./validate-schema-type-refs.js";
42
43
  import { rewriteSyntheticOrigins } from "./rewrite-synthetic-origins.js";
@@ -800,10 +801,16 @@ export class StaticAnalyzer {
800
801
  // definition's `schema:` does. Same scoping as every other schema issue —
801
802
  // the entry's own modules, since a dependency is not the consumer's to fix.
802
803
  const valueTypeSlotIssues = [];
804
+ // `x-telo-sensitive` rides the same walk and the same scoping. It is read by
805
+ // ONE consumer — the kernel, off a bound contract — so an occurrence outside
806
+ // `inputType` / `outputType` is inert; for a security control, inert-and-
807
+ // silent is the failure worth reporting.
808
+ const sensitiveSlotIssues = [];
803
809
  for (const m of manifests) {
804
810
  const declaringModule = m.metadata?.module;
805
811
  if (!declaringModule || rootModules.has(declaringModule)) {
806
812
  valueTypeSlotIssues.push(...validateValueTypeSlots(m));
813
+ sensitiveSlotIssues.push(...validateSensitiveSlots(m));
807
814
  }
808
815
  }
809
816
  for (const m of manifests) {
@@ -1020,6 +1027,22 @@ export class StaticAnalyzer {
1020
1027
  },
1021
1028
  });
1022
1029
  }
1030
+ for (const issue of sensitiveSlotIssues) {
1031
+ diagnostics.push({
1032
+ severity: DiagnosticSeverity.Error,
1033
+ code: issue.code,
1034
+ source: SOURCE,
1035
+ message: issue.message,
1036
+ data: {
1037
+ resource: {
1038
+ kind: issue.manifest.kind,
1039
+ name: issue.manifest.metadata?.name,
1040
+ },
1041
+ filePath: issue.manifest.metadata?.source,
1042
+ path: issue.path,
1043
+ },
1044
+ });
1045
+ }
1023
1046
  // Same split for the two zone annotations. Unreadable ones fail in
1024
1047
  // OPPOSITE directions — a dropped requirement is silently unenforced, a
1025
1048
  // dropped provision invents failures — so neither can be left to
@@ -36,6 +36,26 @@ export declare function inheritedCapability(def: ResourceDefinition | undefined,
36
36
  * `mergeTypeSchemas` that `Type.JsonSchema.extends` uses.
37
37
  * - no `extends` → the own schema unchanged. */
38
38
  export declare function effectiveAuthorSchema(def: ResourceDefinition | undefined, resolve: DefResolver): Record<string, any>;
39
+ /**
40
+ * The fields a merge-form inheriting child publishes over its parent's reading.
41
+ *
42
+ * A child that inherits its controller by delegation and declares no `base:` IS
43
+ * the parent instance, so `resources.<child>` is the parent's `snapshot()` — and
44
+ * a field the parent has never heard of would be readable from nowhere. These
45
+ * are exactly those fields: the ones the effective (merged) schema declares that
46
+ * the controller-bearing ancestor's does not.
47
+ *
48
+ * A REDECLARED name is deliberately excluded. Narrowing an inherited field (a
49
+ * description, a pattern, a widget hint) is ordinary in an additive extension and
50
+ * says nothing about publication, while the parent's `snapshot()` is the sole
51
+ * authority on what a parent instance publishes — its normalizations, its
52
+ * deliberate omissions, and its redactions. Republishing such a field from raw
53
+ * config would silently undo a provider's decision to keep it out.
54
+ *
55
+ * Empty for the `base:` form, whose fields are construction inputs consumed by
56
+ * the mapping, and for a child with its own controller, which publishes itself.
57
+ */
58
+ export declare function publishedOwnFields(def: ResourceDefinition | undefined, resolve: DefResolver): string[];
39
59
  /** The two directions of a kind's invocation contract. `inputType` is what a
40
60
  * caller sends to `invoke()`; `outputType` is what `invoke()` / `provide()`
41
61
  * returns. */
@@ -1 +1 @@
1
- {"version":3,"file":"extends-resolution.d.ts","sourceRoot":"","sources":["../src/extends-resolution.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAGvD;;;;;;;2DAO2D;AAC3D,MAAM,MAAM,WAAW,GAAG,CACxB,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,kBAAkB,KACtB,kBAAkB,GAAG,SAAS,CAAC;AA0BpC;sDACsD;AACtD,w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kB,GAAG,SAAS,EACnC,OAAO,EAAE,WAAW,GACnB,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,CASjC"}
@@ -80,6 +80,35 @@ export function effectiveAuthorSchema(def, resolve) {
80
80
  const parentSchema = effectiveAuthorSchema(parent, resolve);
81
81
  return mergeTypeSchemas([parentSchema, own]);
82
82
  }
83
+ /**
84
+ * The fields a merge-form inheriting child publishes over its parent's reading.
85
+ *
86
+ * A child that inherits its controller by delegation and declares no `base:` IS
87
+ * the parent instance, so `resources.<child>` is the parent's `snapshot()` — and
88
+ * a field the parent has never heard of would be readable from nowhere. These
89
+ * are exactly those fields: the ones the effective (merged) schema declares that
90
+ * the controller-bearing ancestor's does not.
91
+ *
92
+ * A REDECLARED name is deliberately excluded. Narrowing an inherited field (a
93
+ * description, a pattern, a widget hint) is ordinary in an additive extension and
94
+ * says nothing about publication, while the parent's `snapshot()` is the sole
95
+ * authority on what a parent instance publishes — its normalizations, its
96
+ * deliberate omissions, and its redactions. Republishing such a field from raw
97
+ * config would silently undo a provider's decision to keep it out.
98
+ *
99
+ * Empty for the `base:` form, whose fields are construction inputs consumed by
100
+ * the mapping, and for a child with its own controller, which publishes itself.
101
+ */
102
+ export function publishedOwnFields(def, resolve) {
103
+ if (body(def).base || !isInheritedDelegation(def, resolve))
104
+ return [];
105
+ const ancestor = controllerBearingAncestor(def, resolve);
106
+ if (!ancestor)
107
+ return [];
108
+ const inherited = new Set(Object.keys((effectiveAuthorSchema(ancestor, resolve).properties ?? {})));
109
+ const own = (effectiveAuthorSchema(def, resolve).properties ?? {});
110
+ return Object.keys(own).filter((name) => !inherited.has(name));
111
+ }
83
112
  /**
84
113
  * The **nearest declaration** of an invocation contract along the `extends`
85
114
  * chain, self first — the raw type-field value, still to be resolved to a schema
package/dist/index.d.ts CHANGED
@@ -16,9 +16,11 @@ export { applyObservedStateNode, buildObservedStateIndex, buildObservedStateReso
16
16
  export type { AnalyzedResource, ObservedStateRead } from "./validate-observed-state.js";
17
17
  export { moduleScopedDefResolver, scopeResolverForModule } from "./alias-resolver.js";
18
18
  export type { ModuleScopes } from "./alias-resolver.js";
19
- export { ancestorChain, contractDeclarer, controllerBearingAncestor, effectiveAuthorSchema, effectiveContractField, effectiveStatusSchema, hasOwnControllerOrTemplate, inheritedCapability, isInheritedDelegation, mappingFieldFor, needsContractMapping, resolveParent, } from "./extends-resolution.js";
19
+ export { ancestorChain, contractDeclarer, controllerBearingAncestor, effectiveAuthorSchema, effectiveContractField, effectiveStatusSchema, hasOwnControllerOrTemplate, inheritedCapability, isInheritedDelegation, mappingFieldFor, needsContractMapping, publishedOwnFields, resolveParent, } from "./extends-resolution.js";
20
20
  export type { ContractDirection, DefResolver } from "./extends-resolution.js";
21
- export { defaultBearingPaths, declaredScalarPaths, PERMISSIVE_CONTRACT, resolveContract, resolveContractSchema, withLiveValuesSkipped, } from "./invocation-contract.js";
21
+ export { validateSensitiveSlots } from "./validate-sensitive-slots.js";
22
+ export type { SensitiveSlotIssue } from "./validate-sensitive-slots.js";
23
+ export { defaultBearingPaths, declaredScalarPaths, PERMISSIVE_CONTRACT, resolveContract, resolveContractSchema, sensitivePaths, withLiveValuesSkipped, } from "./invocation-contract.js";
22
24
  export type { ContractOrigin, ContractScope, DeclaredScalarForm, DeclaredScalarPath, ResolvedContract, } from "./invocation-contract.js";
23
25
  export { hasIntermediateWildcard, parseRedactionPath, RedactionPathError, } from "./redaction-path.js";
24
26
  export type { RedactionSegment } from "./redaction-path.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,YAAY,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AACjF,YAAY,EACR,cAA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a,EACb,KAAK,EACR,MAAM,YAAY,CAAC;AACpB,cAAc,uBAAuB,CAAC;AAGtC,cAAc,sBAAsB,CAAC;AAIrC,OAAO,EACL,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,4BAA4B,CAAC;AACpC,cAAc,oBAAoB,CAAC"}
package/dist/index.js CHANGED
@@ -8,8 +8,9 @@ export { BINDINGS_ANNOTATION, bindingContextProperties, bindingDependencies, fin
8
8
  export { CEL_RESERVED_WORDS, TYPE_LEVEL_DOC_KINDS, checkName, } from "./identifier-name.js";
9
9
  export { applyObservedStateNode, buildObservedStateIndex, buildObservedStateResourcesSchema, collectRunReachableNames, observedStateRead, validateObservedStateDeclarations, OBSERVED_STATE_SCHEMA, } from "./validate-observed-state.js";
10
10
  export { moduleScopedDefResolver, scopeResolverForModule } from "./alias-resolver.js";
11
- export { ancestorChain, contractDeclarer, controllerBearingAncestor, effectiveAuthorSchema, effectiveContractField, effectiveStatusSchema, hasOwnControllerOrTemplate, inheritedCapability, isInheritedDelegation, mappingFieldFor, needsContractMapping, resolveParent, } from "./extends-resolution.js";
12
- export { defaultBearingPaths, declaredScalarPaths, PERMISSIVE_CONTRACT, resolveContract, resolveContractSchema, withLiveValuesSkipped, } from "./invocation-contract.js";
11
+ export { ancestorChain, contractDeclarer, controllerBearingAncestor, effectiveAuthorSchema, effectiveContractField, effectiveStatusSchema, hasOwnControllerOrTemplate, inheritedCapability, isInheritedDelegation, mappingFieldFor, needsContractMapping, publishedOwnFields, resolveParent, } from "./extends-resolution.js";
12
+ export { validateSensitiveSlots } from "./validate-sensitive-slots.js";
13
+ export { defaultBearingPaths, declaredScalarPaths, PERMISSIVE_CONTRACT, resolveContract, resolveContractSchema, sensitivePaths, withLiveValuesSkipped, } from "./invocation-contract.js";
13
14
  export { hasIntermediateWildcard, parseRedactionPath, RedactionPathError, } from "./redaction-path.js";
14
15
  export { buildCallGraph, projectToPairs, resourceId } from "./call-graph.js";
15
16
  export { buildReferenceFieldMap, isRefEntry, isScopeEntry, satisfiesValueBranch, } from "./reference-field-map.js";
@@ -121,6 +121,26 @@ export declare function defaultBearingPaths(schema: Record<string, any>,
121
121
  * declares its defaults behind the reference, and a walk that cannot follow
122
122
  * it would report none, leaving the caller's data shared where a fill lands. */
123
123
  resolveRef?: (ref: string) => Record<string, any> | undefined): string[][];
124
+ /** Every path in `schema` the author marked `x-telo-sensitive: true` — the
125
+ * values a trace payload must carry as `[redacted]` rather than verbatim.
126
+ *
127
+ * It exists because making a credential a dispatched `Telo.Invocable` turns its
128
+ * material into an invoke OUTPUT, and invoke inputs and outputs ride the debug
129
+ * wire on every call under `--inspect` — which is every watch session. The
130
+ * kernel's substring scrubbing does not reach them: it has one call site, the
131
+ * resource-Created event's properties.
132
+ *
133
+ * Declared by the kind that OWNS the contract, so the kernel names no kind and
134
+ * any module opts in — the `x-telo-eval` shape. Exempting "an Http.Credential
135
+ * result" directly would be kind-knowledge in the kernel, and would stop at
136
+ * that one kind while the same token surfaces wherever else a contract carries
137
+ * it.
138
+ *
139
+ * Bounded by the schema's declarations exactly as {@link defaultBearingPaths}
140
+ * is: a contract marking nothing walks nothing at dispatch. The key is kept and
141
+ * only the value replaced, per the logging spec §14 — a payload that silently
142
+ * loses a key reads as a value that was never produced. */
143
+ export declare function sensitivePaths(schema: Record<string, any>, resolveRef?: (ref: string) => Record<string, any> | undefined): string[][];
124
144
  /** The scalar form a declared node's value takes at runtime. `int64` and
125
145
  * `double` are the two JSON scalars whose runtime representation is NOT decided
126
146
  * by the value that arrives: a CEL integer is a BigInt and a CEL double a JS
@@ -1 +1 @@
1
- {"version":3,"file":"invocation-contract.d.ts","sourceRoot":"","sources":["../src/invocation-contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,kBAAkB,EAAe,MAAM,cAAc,CAAC;AAChF,OAAO,EAAE,aAAa,EAA2B,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAChG,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAA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AM,KAAK,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,GAC5D,MAAM,EAAE,EAAE,CA+BZ;AAED;;;;;;;;;;;;;;;;;;4DAkB4D;AAC5D,wBAAgB,cAAc,CAC5B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC3B,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,GAC5D,MAAM,EAAE,EAAE,CA+CZ;AAED;;;;;;kCAMkC;AAClC,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEpD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;CACnC;AAED;;;;;;;;;;;;;;;;;;;;;;;+DAuB+D;AAC/D,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC3B,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,GAC5D,kBAAkB,EAAE,CAoCtB"}
@@ -241,6 +241,80 @@ resolveRef) {
241
241
  walk(schema, [], []);
242
242
  return out;
243
243
  }
244
+ /** Every path in `schema` the author marked `x-telo-sensitive: true` — the
245
+ * values a trace payload must carry as `[redacted]` rather than verbatim.
246
+ *
247
+ * It exists because making a credential a dispatched `Telo.Invocable` turns its
248
+ * material into an invoke OUTPUT, and invoke inputs and outputs ride the debug
249
+ * wire on every call under `--inspect` — which is every watch session. The
250
+ * kernel's substring scrubbing does not reach them: it has one call site, the
251
+ * resource-Created event's properties.
252
+ *
253
+ * Declared by the kind that OWNS the contract, so the kernel names no kind and
254
+ * any module opts in — the `x-telo-eval` shape. Exempting "an Http.Credential
255
+ * result" directly would be kind-knowledge in the kernel, and would stop at
256
+ * that one kind while the same token surfaces wherever else a contract carries
257
+ * it.
258
+ *
259
+ * Bounded by the schema's declarations exactly as {@link defaultBearingPaths}
260
+ * is: a contract marking nothing walks nothing at dispatch. The key is kept and
261
+ * only the value replaced, per the logging spec §14 — a payload that silently
262
+ * loses a key reads as a value that was never produced. */
263
+ export function sensitivePaths(schema, resolveRef) {
264
+ const out = [];
265
+ const walk = (node, path, chain) => {
266
+ if (!node || typeof node !== "object")
267
+ return;
268
+ let s = node;
269
+ if (chain.includes(s))
270
+ return;
271
+ if (resolveRef && typeof s.$ref === "string") {
272
+ const target = resolveRef(s.$ref);
273
+ if (!target || chain.includes(target))
274
+ return;
275
+ s = { ...target, ...s, $ref: undefined };
276
+ }
277
+ const here = [...chain, node];
278
+ // A marked node is redacted WHOLE, so there is nothing below it to mark:
279
+ // descending would emit paths into a value that is already gone. The EMPTY
280
+ // path is legal and means the whole value — a contract whose entire output
281
+ // is the secret is the simplest shape there is, and refusing it silently
282
+ // (which `path.length > 0` did) left exactly that case unredacted.
283
+ if (s["x-telo-sensitive"] === true) {
284
+ out.push(path);
285
+ return;
286
+ }
287
+ const properties = s.properties;
288
+ if (properties) {
289
+ for (const [key, child] of Object.entries(properties))
290
+ walk(child, [...path, key], here);
291
+ }
292
+ // A map whose VALUES are secrets — `additionalProperties: {x-telo-sensitive}`
293
+ // — is the shape a headers or query bag takes, and it carries no property
294
+ // names to walk. `{}` is the wildcard segment, the `[]` precedent one axis
295
+ // over.
296
+ for (const key of ["additionalProperties", "patternProperties"]) {
297
+ const node = s[key];
298
+ if (!node || typeof node !== "object")
299
+ continue;
300
+ if (key === "additionalProperties")
301
+ walk(node, [...path, "{}"], here);
302
+ else
303
+ for (const child of Object.values(node))
304
+ walk(child, [...path, "{}"], here);
305
+ }
306
+ for (const branch of ["allOf", "anyOf", "oneOf"]) {
307
+ const list = s[branch];
308
+ if (Array.isArray(list))
309
+ for (const child of list)
310
+ walk(child, path, here);
311
+ }
312
+ if (s.items)
313
+ walk(s.items, [...path, "[]"], here);
314
+ };
315
+ walk(schema, [], []);
316
+ return out;
317
+ }
244
318
  /** Every path in `schema` whose declared type fixes a scalar representation —
245
319
  * the leaves a value must carry in that form for the contract to be TRUE, not
246
320
  * merely to pass.
@@ -26,6 +26,8 @@
26
26
  * Browser-safe: no Node built-ins.
27
27
  */
28
28
  import { X_TELO_TYPE } from "@telorun/sdk";
29
+ /** The one annotation read from a DATA schema rather than a kind schema. */
30
+ declare const X_TELO_SENSITIVE: "x-telo-sensitive";
29
31
  import { ANNOTATION_KEYWORDS } from "./value-type-keyword.js";
30
32
  /** A keyword entry: the JSON Schema its VALUE must satisfy, carrying the title
31
33
  * and description completion and hover show. */
@@ -64,5 +66,18 @@ export declare function jsonSchemaKeywords(self: string): SchemaKeywords;
64
66
  * neither validation nor completion. Closing it needs the walkers to distinguish
65
67
  * a schema describing an annotation from an annotation, which nothing does yet.
66
68
  */
67
- export declare const TELO_SCHEMA_ANNOTATIONS: Record<(typeof ANNOTATION_KEYWORDS)[number] | typeof X_TELO_TYPE, Record<string, unknown>>;
69
+ export declare const TELO_SCHEMA_ANNOTATIONS: Record<Exclude<(typeof ANNOTATION_KEYWORDS)[number], typeof X_TELO_SENSITIVE> | typeof X_TELO_TYPE, Record<string, unknown>>;
70
+ /**
71
+ * Annotations that belong on a DATA schema — an `inputType` / `outputType`
72
+ * contract — rather than on a kind's own `schema:`.
73
+ *
74
+ * Split out because {@link TELO_SCHEMA_ANNOTATIONS} is offered only where the
75
+ * fragment is `KindSchema`, which is a kind's CONFIGURATION. `x-telo-sensitive`
76
+ * is read from the opposite place: the kernel resolves it off a bound contract,
77
+ * which stamps `JsonSchema7`. Offering it from the kind vocabulary alone put it
78
+ * on the one schema where nothing reads it and withheld it from the two where it
79
+ * is the whole mechanism.
80
+ */
81
+ export declare const TELO_DATA_SCHEMA_ANNOTATIONS: Record<typeof X_TELO_SENSITIVE, Record<string, unknown>>;
82
+ export {};
68
83
  //# sourceMappingURL=schema-keywords.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema-keywords.d.ts","sourceRoot":"","sources":["../src/schema-keywords.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D;iDACiD;AACjD,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AASrE;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,CAuJ/D;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAC1C,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,GAAG,OAAO,WAAW,EACzD,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAwJxB,CAAC"}
1
+ {"version":3,"file":"schema-keywords.d.ts","sourceRoot":"","sources":["../src/schema-keywords.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,4EAA4E;AAC5E,QAAA,MAAM,gBAAgB,EAAG,kBAA2B,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D;iDACiD;AACjD,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AASrE;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,CAuJ/D;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAMxC,OAAO,CAAC,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,gBAAgB,CAAC,GACtE,OAAO,WAAW,EACpB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAwJxB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,4BAA4B,EAAE,MAAM,CAC/C,OAAO,gBAAgB,EACvB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAQxB,CAAC"}
@@ -25,6 +25,8 @@
25
25
  *
26
26
  * Browser-safe: no Node built-ins.
27
27
  */
28
+ /** The one annotation read from a DATA schema rather than a kind schema. */
29
+ const X_TELO_SENSITIVE = "x-telo-sensitive";
28
30
  /** A JSON type name, as `type:` accepts it — one, or a list (`[string, "null"]`,
29
31
  * the spelling `CEL_NULLABLE_ACCESS` guards). */
30
32
  const TYPE_NAME = {
@@ -342,3 +344,21 @@ export const TELO_SCHEMA_ANNOTATIONS = {
342
344
  type: "string",
343
345
  },
344
346
  };
347
+ /**
348
+ * Annotations that belong on a DATA schema — an `inputType` / `outputType`
349
+ * contract — rather than on a kind's own `schema:`.
350
+ *
351
+ * Split out because {@link TELO_SCHEMA_ANNOTATIONS} is offered only where the
352
+ * fragment is `KindSchema`, which is a kind's CONFIGURATION. `x-telo-sensitive`
353
+ * is read from the opposite place: the kernel resolves it off a bound contract,
354
+ * which stamps `JsonSchema7`. Offering it from the kind vocabulary alone put it
355
+ * on the one schema where nothing reads it and withheld it from the two where it
356
+ * is the whole mechanism.
357
+ */
358
+ export const TELO_DATA_SCHEMA_ANNOTATIONS = {
359
+ [X_TELO_SENSITIVE]: {
360
+ title: "Sensitive",
361
+ description: "This value is auth material or equivalent: carry it as `[redacted]` in trace payloads and on the debug wire rather than verbatim. Read only from a resource's declared `inputType` / `outputType`.",
362
+ type: "boolean",
363
+ },
364
+ };
@@ -1,3 +1,3 @@
1
1
  /** The surface generation this analyzer implements. */
2
- export declare const TELO_SURFACE_VERSION = "0.83.0";
2
+ export declare const TELO_SURFACE_VERSION = "0.84.0";
3
3
  //# sourceMappingURL=telo-version.d.ts.map
@@ -5,4 +5,4 @@
5
5
  // its release identity, this is the scale a module's `requires.telo` range is
6
6
  // written against, and every kernel in every language reports the same scale.
7
7
  /** The surface generation this analyzer implements. */
8
- export const TELO_SURFACE_VERSION = "0.83.0";
8
+ export const TELO_SURFACE_VERSION = "0.84.0";
@@ -1 +1 @@
1
- {"version":3,"file":"validate-extends.d.ts","sourceRoot":"","sources":["../src/validate-extends.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAsB,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAEnE,OAAO,EAAsB,KAAK,kBAAkB,EAAE,MAAM,YAAY,CAAC;AA8BzE,wBAAgB,eAAe,CAC7B,SAAS,EAAE,gBAAgB,EAAE,EAC7B,QAAQ,EAAE,kBAAkB,EAC5B,OAAO,EAAE,aAAa,GACrB,kBAAkB,EAAE,CA4JtB"}
1
+ {"version":3,"file":"validate-extends.d.ts","sourceRoot":"","sources":["../src/validate-extends.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAsB,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAQnE,OAAO,EAAsB,KAAK,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAiCzE,wBAAgB,eAAe,CAC7B,SAAS,EAAE,gBAAgB,EAAE,EAC7B,QAAQ,EAAE,kBAAkB,EAC5B,OAAO,EAAE,aAAa,GACrB,kBAAkB,EAAE,CAqMtB"}
@@ -1,4 +1,4 @@
1
- import { inheritedCapability } from "./extends-resolution.js";
1
+ import { controllerBearingAncestor, effectiveAuthorSchema, inheritedCapability, isInheritedDelegation, } from "./extends-resolution.js";
2
2
  import { DiagnosticSeverity } from "./types.js";
3
3
  const SOURCE = "telo-analyzer";
4
4
  /** Alias-form pattern for `extends`: "<Alias>.<AbstractName>", two PascalCase segments. */
@@ -19,6 +19,9 @@ const EXTENDS_ALIAS_RE = /^[A-Z][A-Za-z0-9_]*\.[A-Z][A-Za-z0-9_]*$/;
19
19
  * - EXTENDS_UNKNOWN_TARGET: alias resolves to a module, but that module has no
20
20
  * registered definition with the target name.
21
21
  * - EXTENDS_NON_ABSTRACT: target resolves to a Telo.Definition, not a Telo.Abstract.
22
+ * - EXTENDS_CLOSED_PARENT_ADDS_FIELD: a child with no `base:` declares a property its
23
+ * controller-bearing ancestor's closed schema rejects — the runtime counterpart is a
24
+ * create-time failure phrased against the ancestor kind.
22
25
  * - CAPABILITY_SHADOWS_EXTENDS (warning): `capability` names a user-declared abstract
23
26
  * (metadata.module !== "Telo"). Builtin lifecycle capabilities (Telo.Invocable, etc.)
24
27
  * never trigger this — they're lifecycle roles by design.
@@ -140,6 +143,44 @@ export function validateExtends(manifests, registry, aliases) {
140
143
  data: { resource, filePath, path: "capability" },
141
144
  });
142
145
  }
146
+ // A merge-form child (no `base:`) forwards its WHOLE config to the
147
+ // inherited controller as the parent's config, so a field the
148
+ // parent's schema closes out is rejected at the parent's own
149
+ // create-time validation — phrased against the parent kind, at the
150
+ // instance's line, about a resource the author never wrote.
151
+ // Reported here instead, at the property that has to change.
152
+ if (m.base == null &&
153
+ isInheritedDelegation(m, resolveDef)) {
154
+ const ancestor = controllerBearingAncestor(m, resolveDef);
155
+ const ancestorSchema = ancestor
156
+ ? effectiveAuthorSchema(ancestor, resolveDef)
157
+ : undefined;
158
+ if (ancestorSchema?.additionalProperties === false) {
159
+ const inherited = new Set(Object.keys(ancestorSchema.properties ?? {}));
160
+ const ownProps = (m
161
+ .schema?.properties ?? {});
162
+ const ancestorKind = `${ancestor?.metadata.module}.${ancestor?.metadata.name}`;
163
+ for (const prop of Object.keys(ownProps)) {
164
+ if (inherited.has(prop))
165
+ continue;
166
+ diagnostics.push({
167
+ severity: DiagnosticSeverity.Error,
168
+ code: "EXTENDS_CLOSED_PARENT_ADDS_FIELD",
169
+ source: SOURCE,
170
+ message: `${label}: declares '${prop}', but '${ancestorKind}' closes its schema ` +
171
+ `(additionalProperties: false) and a child without 'base:' forwards its whole ` +
172
+ `config as that kind's config — so '${prop}' is rejected when the resource is ` +
173
+ `created. Add a 'base:' mapping, which makes this kind's fields construction ` +
174
+ `inputs and builds the parent's config explicitly.`,
175
+ data: {
176
+ resource,
177
+ filePath,
178
+ path: `schema.properties.${prop}`,
179
+ },
180
+ });
181
+ }
182
+ }
183
+ }
143
184
  }
144
185
  }
145
186
  }
@@ -0,0 +1,28 @@
1
+ import type { ResourceManifest } from "@telorun/sdk";
2
+ /**
3
+ * `x-telo-sensitive` where nothing reads it.
4
+ *
5
+ * The annotation has exactly one consumer: the kernel resolves it from a
6
+ * resource's bound CONTRACT — `inputType` / `outputType` — and carries the
7
+ * marked value as `[redacted]` in trace payloads. Written anywhere else it is an
8
+ * unknown keyword in an open schema, which is to say it validates, ships, and
9
+ * does nothing.
10
+ *
11
+ * For a security control that is the worst available failure: an author marks a
12
+ * token, sees no error, and puts it on the debug wire anyway. So a misplacement
13
+ * is reported rather than ignored — the same posture `X_TELO_REF_UNRESOLVED`
14
+ * takes toward a reference constraint that resolves to nothing, and for the same
15
+ * reason: silence reads as protection.
16
+ *
17
+ * Scoped by the caller to the entry's own modules, since a dependency's schema
18
+ * is not the consumer's to fix.
19
+ */
20
+ export interface SensitiveSlotIssue {
21
+ code: "SENSITIVE_ANNOTATION_MISPLACED" | "SENSITIVE_ANNOTATION_INVALID";
22
+ manifest: ResourceManifest;
23
+ /** Dotted path to the annotated schema node. */
24
+ path: string;
25
+ message: string;
26
+ }
27
+ export declare function validateSensitiveSlots(manifest: ResourceManifest): SensitiveSlotIssue[];
28
+ //# sourceMappingURL=validate-sensitive-slots.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate-sensitive-slots.d.ts","sourceRoot":"","sources":["../src/validate-sensitive-slots.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGrD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,gCAAgC,GAAG,8BAA8B,CAAC;IACxE,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,gDAAgD;IAChD,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAOD,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,gBAAgB,GAAG,kBAAkB,EAAE,CAqDvF"}
@@ -0,0 +1,75 @@
1
+ import { SCHEMA_REGION_KEYS } from "./schema-region.js";
2
+ const ANNOTATION = "x-telo-sensitive";
3
+ /** The only regions the kernel reads the annotation from. */
4
+ const CONTRACT_KEYS = new Set(["inputType", "outputType"]);
5
+ export function validateSensitiveSlots(manifest) {
6
+ const issues = [];
7
+ const walk = (node, path, seen) => {
8
+ if (!node || typeof node !== "object")
9
+ return;
10
+ if (seen.has(node))
11
+ return;
12
+ seen.add(node);
13
+ if (Array.isArray(node)) {
14
+ node.forEach((child, i) => walk(child, [...path, i], seen));
15
+ return;
16
+ }
17
+ const record = node;
18
+ if (Object.hasOwn(record, ANNOTATION)) {
19
+ const dotted = path.join(".");
20
+ if (record[ANNOTATION] !== true) {
21
+ issues.push({
22
+ code: "SENSITIVE_ANNOTATION_INVALID",
23
+ manifest,
24
+ path: dotted,
25
+ message: `'${ANNOTATION}' must be \`true\`; got ${JSON.stringify(record[ANNOTATION])}. ` +
26
+ `It is a marker, not a level — a value other than \`true\` reads as "not sensitive".`,
27
+ });
28
+ }
29
+ else {
30
+ const region = enclosingSchemaRegion(path);
31
+ if (region === undefined || !CONTRACT_KEYS.has(region)) {
32
+ issues.push({
33
+ code: "SENSITIVE_ANNOTATION_MISPLACED",
34
+ manifest,
35
+ path: dotted,
36
+ message: `'${ANNOTATION}' is only read from a resource's declared contract ` +
37
+ `(\`inputType\` / \`outputType\`), and this node is ` +
38
+ (region === undefined
39
+ ? "not inside a schema at all"
40
+ : `inside \`${region}\``) +
41
+ `. The kernel will not redact it, so the value would still reach trace ` +
42
+ `payloads and the debug wire. Move the mark onto the contract property ` +
43
+ `that carries the value.`,
44
+ });
45
+ }
46
+ }
47
+ }
48
+ for (const [key, child] of Object.entries(record)) {
49
+ walk(child, [...path, key], seen);
50
+ }
51
+ };
52
+ walk(manifest, [], new Set());
53
+ return issues;
54
+ }
55
+ /**
56
+ * The OUTERMOST segment naming a schema-valued key, or `undefined` when the node
57
+ * is not inside a schema.
58
+ *
59
+ * Outermost, not nearest, because a contract is routinely written in the inline
60
+ * `{kind: Telo.JsonSchema, schema: …}` form — so the path to a marked property is
61
+ * `outputType.schema.properties.headers`, and the nearest region key is that
62
+ * wrapper's own `schema`. Reading it as a kind's configuration would report every
63
+ * correctly-marked contract as misplaced, which is how this check first behaved.
64
+ *
65
+ * It is the same reasoning `expandManifestFragments` uses when it keys on the
66
+ * top-level slot: the object a contract resolver is handed is the one under
67
+ * `inputType` / `outputType`, whatever nesting the authoring form adds beneath.
68
+ */
69
+ function enclosingSchemaRegion(path) {
70
+ for (const segment of path) {
71
+ if (typeof segment === "string" && SCHEMA_REGION_KEYS.includes(segment))
72
+ return segment;
73
+ }
74
+ return undefined;
75
+ }
@@ -28,7 +28,7 @@ import type { KeywordDefinition } from "ajv";
28
28
  *
29
29
  * `x-telo-type` is deliberately absent — it is the one that emits code.
30
30
  */
31
- export declare const ANNOTATION_KEYWORDS: readonly ["x-telo-bindings-from", "x-telo-catches-for", "x-telo-context", "x-telo-context-collection-from", "x-telo-context-element-from", "x-telo-context-from", "x-telo-context-from-ref-kind", "x-telo-context-from-root", "x-telo-context-ref-from", "x-telo-error-context", "x-telo-eval", "x-telo-inline", "x-telo-outcome-list", "x-telo-provides-zone", "x-telo-ref", "x-telo-requires-zone", "x-telo-resource-rules", "x-telo-schema-from", "x-telo-schema-map", "x-telo-schema-projection", "x-telo-schema-projection-from", "x-telo-scope", "x-telo-step-context", "x-telo-topology-role", "x-telo-value-schema-from", "x-telo-widget"];
31
+ export declare const ANNOTATION_KEYWORDS: readonly ["x-telo-bindings-from", "x-telo-catches-for", "x-telo-context", "x-telo-context-collection-from", "x-telo-context-element-from", "x-telo-context-from", "x-telo-context-from-ref-kind", "x-telo-context-from-root", "x-telo-context-ref-from", "x-telo-error-context", "x-telo-eval", "x-telo-inline", "x-telo-outcome-list", "x-telo-provides-zone", "x-telo-ref", "x-telo-requires-zone", "x-telo-resource-rules", "x-telo-schema-from", "x-telo-schema-map", "x-telo-schema-projection", "x-telo-schema-projection-from", "x-telo-scope", "x-telo-sensitive", "x-telo-step-context", "x-telo-topology-role", "x-telo-value-schema-from", "x-telo-widget"];
32
32
  /**
33
33
  * The `x-telo-type` keyword.
34
34
  *
@@ -1 +1 @@
1
- {"version":3,"file":"value-type-keyword.d.ts","sourceRoot":"","sources":["../src/value-type-keyword.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;+EAqB+E;AAG/E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,KAAK,CAAC;AAiB7C;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,onBA2BtB,CAAC;AAEX;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,gBAAgB,IAAI,iBAAiB,CA+BpD;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE;IACxC,UAAU,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,UAAU,CAAC,EAAE,GAAG,KAAK,OAAO,CAAC;CACzD,GAAG,IAAI,CAGP"}
1
+ {"version":3,"file":"value-type-keyword.d.ts","sourceRoot":"","sources":["../src/value-type-keyword.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;+EAqB+E;AAG/E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,KAAK,CAAC;AAiB7C;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,woBA4BtB,CAAC;AAEX;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,gBAAgB,IAAI,iBAAiB,CA+BpD;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE;IACxC,UAAU,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,UAAU,CAAC,EAAE,GAAG,KAAK,OAAO,CAAC;CACzD,GAAG,IAAI,CAGP"}
@@ -54,6 +54,7 @@ export const ANNOTATION_KEYWORDS = [
54
54
  "x-telo-schema-projection",
55
55
  "x-telo-schema-projection-from",
56
56
  "x-telo-scope",
57
+ "x-telo-sensitive",
57
58
  "x-telo-step-context",
58
59
  "x-telo-topology-role",
59
60
  "x-telo-value-schema-from",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telorun/analyzer",
3
- "version": "0.67.0",
3
+ "version": "0.68.0",
4
4
  "description": "Telo Analyzer - Static manifest validator for Telo manifests.",
5
5
  "keywords": [
6
6
  "telo",
package/src/analyzer.ts CHANGED
@@ -108,6 +108,10 @@ import {
108
108
  validateValueTypeSlots,
109
109
  type ValueTypeSlotIssue,
110
110
  } from "./validate-value-type-slots.js";
111
+ import {
112
+ validateSensitiveSlots,
113
+ type SensitiveSlotIssue,
114
+ } from "./validate-sensitive-slots.js";
111
115
  import { resolveSchemaTypeRefs } from "./resolve-schema-type-refs.js";
112
116
  import { validateSchemaTypeRefs } from "./validate-schema-type-refs.js";
113
117
  import { rewriteSyntheticOrigins } from "./rewrite-synthetic-origins.js";
@@ -979,10 +983,16 @@ export class StaticAnalyzer {
979
983
  // definition's `schema:` does. Same scoping as every other schema issue —
980
984
  // the entry's own modules, since a dependency is not the consumer's to fix.
981
985
  const valueTypeSlotIssues: ValueTypeSlotIssue[] = [];
986
+ // `x-telo-sensitive` rides the same walk and the same scoping. It is read by
987
+ // ONE consumer — the kernel, off a bound contract — so an occurrence outside
988
+ // `inputType` / `outputType` is inert; for a security control, inert-and-
989
+ // silent is the failure worth reporting.
990
+ const sensitiveSlotIssues: SensitiveSlotIssue[] = [];
982
991
  for (const m of manifests) {
983
992
  const declaringModule = (m.metadata as { module?: string } | undefined)?.module;
984
993
  if (!declaringModule || rootModules.has(declaringModule)) {
985
994
  valueTypeSlotIssues.push(...validateValueTypeSlots(m as unknown as ResourceManifest));
995
+ sensitiveSlotIssues.push(...validateSensitiveSlots(m as unknown as ResourceManifest));
986
996
  }
987
997
  }
988
998
  for (const m of manifests) {
@@ -1212,6 +1222,22 @@ export class StaticAnalyzer {
1212
1222
  },
1213
1223
  });
1214
1224
  }
1225
+ for (const issue of sensitiveSlotIssues) {
1226
+ diagnostics.push({
1227
+ severity: DiagnosticSeverity.Error,
1228
+ code: issue.code,
1229
+ source: SOURCE,
1230
+ message: issue.message,
1231
+ data: {
1232
+ resource: {
1233
+ kind: issue.manifest.kind,
1234
+ name: issue.manifest.metadata?.name as string,
1235
+ },
1236
+ filePath: (issue.manifest.metadata as { source?: string } | undefined)?.source,
1237
+ path: issue.path,
1238
+ },
1239
+ });
1240
+ }
1215
1241
  // Same split for the two zone annotations. Unreadable ones fail in
1216
1242
  // OPPOSITE directions — a dropped requirement is silently unenforced, a
1217
1243
  // dropped provision invents failures — so neither can be left to
@@ -137,6 +137,39 @@ export function effectiveAuthorSchema(
137
137
  return mergeTypeSchemas([parentSchema, own]) as Record<string, any>;
138
138
  }
139
139
 
140
+ /**
141
+ * The fields a merge-form inheriting child publishes over its parent's reading.
142
+ *
143
+ * A child that inherits its controller by delegation and declares no `base:` IS
144
+ * the parent instance, so `resources.<child>` is the parent's `snapshot()` — and
145
+ * a field the parent has never heard of would be readable from nowhere. These
146
+ * are exactly those fields: the ones the effective (merged) schema declares that
147
+ * the controller-bearing ancestor's does not.
148
+ *
149
+ * A REDECLARED name is deliberately excluded. Narrowing an inherited field (a
150
+ * description, a pattern, a widget hint) is ordinary in an additive extension and
151
+ * says nothing about publication, while the parent's `snapshot()` is the sole
152
+ * authority on what a parent instance publishes — its normalizations, its
153
+ * deliberate omissions, and its redactions. Republishing such a field from raw
154
+ * config would silently undo a provider's decision to keep it out.
155
+ *
156
+ * Empty for the `base:` form, whose fields are construction inputs consumed by
157
+ * the mapping, and for a child with its own controller, which publishes itself.
158
+ */
159
+ export function publishedOwnFields(
160
+ def: ResourceDefinition | undefined,
161
+ resolve: DefResolver,
162
+ ): string[] {
163
+ if (body(def).base || !isInheritedDelegation(def, resolve)) return [];
164
+ const ancestor = controllerBearingAncestor(def, resolve);
165
+ if (!ancestor) return [];
166
+ const inherited = new Set(
167
+ Object.keys((effectiveAuthorSchema(ancestor, resolve).properties ?? {}) as object),
168
+ );
169
+ const own = (effectiveAuthorSchema(def, resolve).properties ?? {}) as Record<string, unknown>;
170
+ return Object.keys(own).filter((name) => !inherited.has(name));
171
+ }
172
+
140
173
  /** The two directions of a kind's invocation contract. `inputType` is what a
141
174
  * caller sends to `invoke()`; `outputType` is what `invoke()` / `provide()`
142
175
  * returns. */
package/src/index.ts CHANGED
@@ -84,15 +84,19 @@ export {
84
84
  isInheritedDelegation,
85
85
  mappingFieldFor,
86
86
  needsContractMapping,
87
+ publishedOwnFields,
87
88
  resolveParent,
88
89
  } from "./extends-resolution.js";
89
90
  export type { ContractDirection, DefResolver } from "./extends-resolution.js";
91
+ export { validateSensitiveSlots } from "./validate-sensitive-slots.js";
92
+ export type { SensitiveSlotIssue } from "./validate-sensitive-slots.js";
90
93
  export {
91
94
  defaultBearingPaths,
92
95
  declaredScalarPaths,
93
96
  PERMISSIVE_CONTRACT,
94
97
  resolveContract,
95
98
  resolveContractSchema,
99
+ sensitivePaths,
96
100
  withLiveValuesSkipped,
97
101
  } from "./invocation-contract.js";
98
102
  export type {
@@ -334,6 +334,77 @@ export function defaultBearingPaths(
334
334
  return out;
335
335
  }
336
336
 
337
+ /** Every path in `schema` the author marked `x-telo-sensitive: true` — the
338
+ * values a trace payload must carry as `[redacted]` rather than verbatim.
339
+ *
340
+ * It exists because making a credential a dispatched `Telo.Invocable` turns its
341
+ * material into an invoke OUTPUT, and invoke inputs and outputs ride the debug
342
+ * wire on every call under `--inspect` — which is every watch session. The
343
+ * kernel's substring scrubbing does not reach them: it has one call site, the
344
+ * resource-Created event's properties.
345
+ *
346
+ * Declared by the kind that OWNS the contract, so the kernel names no kind and
347
+ * any module opts in — the `x-telo-eval` shape. Exempting "an Http.Credential
348
+ * result" directly would be kind-knowledge in the kernel, and would stop at
349
+ * that one kind while the same token surfaces wherever else a contract carries
350
+ * it.
351
+ *
352
+ * Bounded by the schema's declarations exactly as {@link defaultBearingPaths}
353
+ * is: a contract marking nothing walks nothing at dispatch. The key is kept and
354
+ * only the value replaced, per the logging spec §14 — a payload that silently
355
+ * loses a key reads as a value that was never produced. */
356
+ export function sensitivePaths(
357
+ schema: Record<string, any>,
358
+ resolveRef?: (ref: string) => Record<string, any> | undefined,
359
+ ): string[][] {
360
+ const out: string[][] = [];
361
+
362
+ const walk = (node: unknown, path: string[], chain: readonly object[]): void => {
363
+ if (!node || typeof node !== "object") return;
364
+ let s = node as Record<string, any>;
365
+ if (chain.includes(s)) return;
366
+ if (resolveRef && typeof s.$ref === "string") {
367
+ const target = resolveRef(s.$ref);
368
+ if (!target || chain.includes(target)) return;
369
+ s = { ...target, ...s, $ref: undefined };
370
+ }
371
+ const here = [...chain, node as object];
372
+
373
+ // A marked node is redacted WHOLE, so there is nothing below it to mark:
374
+ // descending would emit paths into a value that is already gone. The EMPTY
375
+ // path is legal and means the whole value — a contract whose entire output
376
+ // is the secret is the simplest shape there is, and refusing it silently
377
+ // (which `path.length > 0` did) left exactly that case unredacted.
378
+ if (s["x-telo-sensitive"] === true) {
379
+ out.push(path);
380
+ return;
381
+ }
382
+
383
+ const properties = s.properties as Record<string, any> | undefined;
384
+ if (properties) {
385
+ for (const [key, child] of Object.entries(properties)) walk(child, [...path, key], here);
386
+ }
387
+ // A map whose VALUES are secrets — `additionalProperties: {x-telo-sensitive}`
388
+ // — is the shape a headers or query bag takes, and it carries no property
389
+ // names to walk. `{}` is the wildcard segment, the `[]` precedent one axis
390
+ // over.
391
+ for (const key of ["additionalProperties", "patternProperties"] as const) {
392
+ const node = s[key];
393
+ if (!node || typeof node !== "object") continue;
394
+ if (key === "additionalProperties") walk(node, [...path, "{}"], here);
395
+ else for (const child of Object.values(node)) walk(child, [...path, "{}"], here);
396
+ }
397
+ for (const branch of ["allOf", "anyOf", "oneOf"] as const) {
398
+ const list = s[branch];
399
+ if (Array.isArray(list)) for (const child of list) walk(child, path, here);
400
+ }
401
+ if (s.items) walk(s.items, [...path, "[]"], here);
402
+ };
403
+
404
+ walk(schema, [], []);
405
+ return out;
406
+ }
407
+
337
408
  /** The scalar form a declared node's value takes at runtime. `int64` and
338
409
  * `double` are the two JSON scalars whose runtime representation is NOT decided
339
410
  * by the value that arrives: a CEL integer is a BigInt and a CEL double a JS
@@ -27,6 +27,9 @@
27
27
  */
28
28
 
29
29
  import { X_TELO_TYPE } from "@telorun/sdk";
30
+
31
+ /** The one annotation read from a DATA schema rather than a kind schema. */
32
+ const X_TELO_SENSITIVE = "x-telo-sensitive" as const;
30
33
  import { ANNOTATION_KEYWORDS } from "./value-type-keyword.js";
31
34
 
32
35
  /** A keyword entry: the JSON Schema its VALUE must satisfy, carrying the title
@@ -227,7 +230,13 @@ export function jsonSchemaKeywords(self: string): SchemaKeywords {
227
230
  * a schema describing an annotation from an annotation, which nothing does yet.
228
231
  */
229
232
  export const TELO_SCHEMA_ANNOTATIONS: Record<
230
- (typeof ANNOTATION_KEYWORDS)[number] | typeof X_TELO_TYPE,
233
+ // Exhaustive over the kind vocabulary, so adding a keyword without an entry is
234
+ // a compile error. `x-telo-sensitive` is excluded because it belongs to the
235
+ // DATA vocabulary below — it is read from a contract, not from a kind's own
236
+ // `schema:` — and offering it here would put it on the one schema where
237
+ // nothing reads it.
238
+ | Exclude<(typeof ANNOTATION_KEYWORDS)[number], typeof X_TELO_SENSITIVE>
239
+ | typeof X_TELO_TYPE,
231
240
  Record<string, unknown>
232
241
  > = {
233
242
  "x-telo-eval": {
@@ -381,3 +390,26 @@ export const TELO_SCHEMA_ANNOTATIONS: Record<
381
390
  type: "string",
382
391
  },
383
392
  };
393
+
394
+ /**
395
+ * Annotations that belong on a DATA schema — an `inputType` / `outputType`
396
+ * contract — rather than on a kind's own `schema:`.
397
+ *
398
+ * Split out because {@link TELO_SCHEMA_ANNOTATIONS} is offered only where the
399
+ * fragment is `KindSchema`, which is a kind's CONFIGURATION. `x-telo-sensitive`
400
+ * is read from the opposite place: the kernel resolves it off a bound contract,
401
+ * which stamps `JsonSchema7`. Offering it from the kind vocabulary alone put it
402
+ * on the one schema where nothing reads it and withheld it from the two where it
403
+ * is the whole mechanism.
404
+ */
405
+ export const TELO_DATA_SCHEMA_ANNOTATIONS: Record<
406
+ typeof X_TELO_SENSITIVE,
407
+ Record<string, unknown>
408
+ > = {
409
+ [X_TELO_SENSITIVE]: {
410
+ title: "Sensitive",
411
+ description:
412
+ "This value is auth material or equivalent: carry it as `[redacted]` in trace payloads and on the debug wire rather than verbatim. Read only from a resource's declared `inputType` / `outputType`.",
413
+ type: "boolean",
414
+ },
415
+ };
@@ -6,4 +6,4 @@
6
6
  // written against, and every kernel in every language reports the same scale.
7
7
 
8
8
  /** The surface generation this analyzer implements. */
9
- export const TELO_SURFACE_VERSION = "0.83.0";
9
+ export const TELO_SURFACE_VERSION = "0.84.0";
@@ -1,7 +1,13 @@
1
1
  import type { ResourceDefinition, ResourceManifest } from "@telorun/sdk";
2
2
  import type { AliasResolver } from "./alias-resolver.js";
3
3
  import type { DefinitionRegistry } from "./definition-registry.js";
4
- import { inheritedCapability, type DefResolver } from "./extends-resolution.js";
4
+ import {
5
+ controllerBearingAncestor,
6
+ effectiveAuthorSchema,
7
+ inheritedCapability,
8
+ isInheritedDelegation,
9
+ type DefResolver,
10
+ } from "./extends-resolution.js";
5
11
  import { DiagnosticSeverity, type AnalysisDiagnostic } from "./types.js";
6
12
 
7
13
  const SOURCE = "telo-analyzer";
@@ -25,6 +31,9 @@ const EXTENDS_ALIAS_RE = /^[A-Z][A-Za-z0-9_]*\.[A-Z][A-Za-z0-9_]*$/;
25
31
  * - EXTENDS_UNKNOWN_TARGET: alias resolves to a module, but that module has no
26
32
  * registered definition with the target name.
27
33
  * - EXTENDS_NON_ABSTRACT: target resolves to a Telo.Definition, not a Telo.Abstract.
34
+ * - EXTENDS_CLOSED_PARENT_ADDS_FIELD: a child with no `base:` declares a property its
35
+ * controller-bearing ancestor's closed schema rejects — the runtime counterpart is a
36
+ * create-time failure phrased against the ancestor kind.
28
37
  * - CAPABILITY_SHADOWS_EXTENDS (warning): `capability` names a user-declared abstract
29
38
  * (metadata.module !== "Telo"). Builtin lifecycle capabilities (Telo.Invocable, etc.)
30
39
  * never trigger this — they're lifecycle roles by design.
@@ -149,6 +158,47 @@ export function validateExtends(
149
158
  data: { resource, filePath, path: "capability" },
150
159
  });
151
160
  }
161
+
162
+ // A merge-form child (no `base:`) forwards its WHOLE config to the
163
+ // inherited controller as the parent's config, so a field the
164
+ // parent's schema closes out is rejected at the parent's own
165
+ // create-time validation — phrased against the parent kind, at the
166
+ // instance's line, about a resource the author never wrote.
167
+ // Reported here instead, at the property that has to change.
168
+ if (
169
+ (m as { base?: unknown }).base == null &&
170
+ isInheritedDelegation(m as ResourceDefinition, resolveDef)
171
+ ) {
172
+ const ancestor = controllerBearingAncestor(m as ResourceDefinition, resolveDef);
173
+ const ancestorSchema = ancestor
174
+ ? effectiveAuthorSchema(ancestor, resolveDef)
175
+ : undefined;
176
+ if (ancestorSchema?.additionalProperties === false) {
177
+ const inherited = new Set(Object.keys(ancestorSchema.properties ?? {}));
178
+ const ownProps = ((m as { schema?: { properties?: Record<string, unknown> } })
179
+ .schema?.properties ?? {}) as Record<string, unknown>;
180
+ const ancestorKind = `${ancestor?.metadata.module}.${ancestor?.metadata.name}`;
181
+ for (const prop of Object.keys(ownProps)) {
182
+ if (inherited.has(prop)) continue;
183
+ diagnostics.push({
184
+ severity: DiagnosticSeverity.Error,
185
+ code: "EXTENDS_CLOSED_PARENT_ADDS_FIELD",
186
+ source: SOURCE,
187
+ message:
188
+ `${label}: declares '${prop}', but '${ancestorKind}' closes its schema ` +
189
+ `(additionalProperties: false) and a child without 'base:' forwards its whole ` +
190
+ `config as that kind's config — so '${prop}' is rejected when the resource is ` +
191
+ `created. Add a 'base:' mapping, which makes this kind's fields construction ` +
192
+ `inputs and builds the parent's config explicitly.`,
193
+ data: {
194
+ resource,
195
+ filePath,
196
+ path: `schema.properties.${prop}`,
197
+ },
198
+ });
199
+ }
200
+ }
201
+ }
152
202
  }
153
203
  }
154
204
  }
@@ -0,0 +1,109 @@
1
+ import type { ResourceManifest } from "@telorun/sdk";
2
+ import { SCHEMA_REGION_KEYS } from "./schema-region.js";
3
+
4
+ /**
5
+ * `x-telo-sensitive` where nothing reads it.
6
+ *
7
+ * The annotation has exactly one consumer: the kernel resolves it from a
8
+ * resource's bound CONTRACT — `inputType` / `outputType` — and carries the
9
+ * marked value as `[redacted]` in trace payloads. Written anywhere else it is an
10
+ * unknown keyword in an open schema, which is to say it validates, ships, and
11
+ * does nothing.
12
+ *
13
+ * For a security control that is the worst available failure: an author marks a
14
+ * token, sees no error, and puts it on the debug wire anyway. So a misplacement
15
+ * is reported rather than ignored — the same posture `X_TELO_REF_UNRESOLVED`
16
+ * takes toward a reference constraint that resolves to nothing, and for the same
17
+ * reason: silence reads as protection.
18
+ *
19
+ * Scoped by the caller to the entry's own modules, since a dependency's schema
20
+ * is not the consumer's to fix.
21
+ */
22
+ export interface SensitiveSlotIssue {
23
+ code: "SENSITIVE_ANNOTATION_MISPLACED" | "SENSITIVE_ANNOTATION_INVALID";
24
+ manifest: ResourceManifest;
25
+ /** Dotted path to the annotated schema node. */
26
+ path: string;
27
+ message: string;
28
+ }
29
+
30
+ const ANNOTATION = "x-telo-sensitive";
31
+
32
+ /** The only regions the kernel reads the annotation from. */
33
+ const CONTRACT_KEYS = new Set(["inputType", "outputType"]);
34
+
35
+ export function validateSensitiveSlots(manifest: ResourceManifest): SensitiveSlotIssue[] {
36
+ const issues: SensitiveSlotIssue[] = [];
37
+
38
+ const walk = (node: unknown, path: (string | number)[], seen: Set<object>): void => {
39
+ if (!node || typeof node !== "object") return;
40
+ if (seen.has(node as object)) return;
41
+ seen.add(node as object);
42
+
43
+ if (Array.isArray(node)) {
44
+ node.forEach((child, i) => walk(child, [...path, i], seen));
45
+ return;
46
+ }
47
+
48
+ const record = node as Record<string, unknown>;
49
+ if (Object.hasOwn(record, ANNOTATION)) {
50
+ const dotted = path.join(".");
51
+ if (record[ANNOTATION] !== true) {
52
+ issues.push({
53
+ code: "SENSITIVE_ANNOTATION_INVALID",
54
+ manifest,
55
+ path: dotted,
56
+ message:
57
+ `'${ANNOTATION}' must be \`true\`; got ${JSON.stringify(record[ANNOTATION])}. ` +
58
+ `It is a marker, not a level — a value other than \`true\` reads as "not sensitive".`,
59
+ });
60
+ } else {
61
+ const region = enclosingSchemaRegion(path);
62
+ if (region === undefined || !CONTRACT_KEYS.has(region)) {
63
+ issues.push({
64
+ code: "SENSITIVE_ANNOTATION_MISPLACED",
65
+ manifest,
66
+ path: dotted,
67
+ message:
68
+ `'${ANNOTATION}' is only read from a resource's declared contract ` +
69
+ `(\`inputType\` / \`outputType\`), and this node is ` +
70
+ (region === undefined
71
+ ? "not inside a schema at all"
72
+ : `inside \`${region}\``) +
73
+ `. The kernel will not redact it, so the value would still reach trace ` +
74
+ `payloads and the debug wire. Move the mark onto the contract property ` +
75
+ `that carries the value.`,
76
+ });
77
+ }
78
+ }
79
+ }
80
+
81
+ for (const [key, child] of Object.entries(record)) {
82
+ walk(child, [...path, key], seen);
83
+ }
84
+ };
85
+
86
+ walk(manifest as unknown as Record<string, unknown>, [], new Set());
87
+ return issues;
88
+ }
89
+
90
+ /**
91
+ * The OUTERMOST segment naming a schema-valued key, or `undefined` when the node
92
+ * is not inside a schema.
93
+ *
94
+ * Outermost, not nearest, because a contract is routinely written in the inline
95
+ * `{kind: Telo.JsonSchema, schema: …}` form — so the path to a marked property is
96
+ * `outputType.schema.properties.headers`, and the nearest region key is that
97
+ * wrapper's own `schema`. Reading it as a kind's configuration would report every
98
+ * correctly-marked contract as misplaced, which is how this check first behaved.
99
+ *
100
+ * It is the same reasoning `expandManifestFragments` uses when it keys on the
101
+ * top-level slot: the object a contract resolver is handed is the one under
102
+ * `inputType` / `outputType`, whatever nesting the authoring form adds beneath.
103
+ */
104
+ function enclosingSchemaRegion(path: readonly (string | number)[]): string | undefined {
105
+ for (const segment of path) {
106
+ if (typeof segment === "string" && SCHEMA_REGION_KEYS.includes(segment)) return segment;
107
+ }
108
+ return undefined;
109
+ }
@@ -69,6 +69,7 @@ export const ANNOTATION_KEYWORDS = [
69
69
  "x-telo-schema-projection",
70
70
  "x-telo-schema-projection-from",
71
71
  "x-telo-scope",
72
+ "x-telo-sensitive",
72
73
  "x-telo-step-context",
73
74
  "x-telo-topology-role",
74
75
  "x-telo-value-schema-from",