dna-sdk 0.1.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.
Files changed (240) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +58 -0
  3. package/dist/adapters/embedding/onnx.d.ts +32 -0
  4. package/dist/adapters/embedding/onnx.js +51 -0
  5. package/dist/adapters/filesystem/cache.d.ts +16 -0
  6. package/dist/adapters/filesystem/cache.js +113 -0
  7. package/dist/adapters/filesystem/index.d.ts +2 -0
  8. package/dist/adapters/filesystem/index.js +2 -0
  9. package/dist/adapters/filesystem/source.d.ts +82 -0
  10. package/dist/adapters/filesystem/source.js +357 -0
  11. package/dist/adapters/postgres/index.d.ts +2 -0
  12. package/dist/adapters/postgres/index.js +2 -0
  13. package/dist/adapters/postgres/migrations.d.ts +14 -0
  14. package/dist/adapters/postgres/migrations.js +88 -0
  15. package/dist/adapters/postgres/source.d.ts +172 -0
  16. package/dist/adapters/postgres/source.js +569 -0
  17. package/dist/adapters/resolvers/github.d.ts +12 -0
  18. package/dist/adapters/resolvers/github.js +47 -0
  19. package/dist/adapters/resolvers/http.d.ts +22 -0
  20. package/dist/adapters/resolvers/http.js +145 -0
  21. package/dist/adapters/resolvers/index.d.ts +3 -0
  22. package/dist/adapters/resolvers/index.js +3 -0
  23. package/dist/adapters/resolvers/local.d.ts +24 -0
  24. package/dist/adapters/resolvers/local.js +132 -0
  25. package/dist/adapters/search/driver.d.ts +45 -0
  26. package/dist/adapters/search/driver.js +138 -0
  27. package/dist/adapters/search/migrations.d.ts +26 -0
  28. package/dist/adapters/search/migrations.js +58 -0
  29. package/dist/adapters/search/rrf.d.ts +23 -0
  30. package/dist/adapters/search/rrf.js +42 -0
  31. package/dist/adapters/search/sqlite-vec.d.ts +66 -0
  32. package/dist/adapters/search/sqlite-vec.js +294 -0
  33. package/dist/bootstrap.d.ts +45 -0
  34. package/dist/bootstrap.js +134 -0
  35. package/dist/extensions/agentskills/DOCS.md +18 -0
  36. package/dist/extensions/agentskills.d.ts +28 -0
  37. package/dist/extensions/agentskills.js +252 -0
  38. package/dist/extensions/agentsmd/DOCS.md +18 -0
  39. package/dist/extensions/agentsmd.d.ts +22 -0
  40. package/dist/extensions/agentsmd.js +170 -0
  41. package/dist/extensions/audit/kinds/audit-log.kind.yaml +148 -0
  42. package/dist/extensions/audit.d.ts +25 -0
  43. package/dist/extensions/audit.js +62 -0
  44. package/dist/extensions/automation/kinds/automation.kind.yaml +296 -0
  45. package/dist/extensions/automation/query.d.ts +49 -0
  46. package/dist/extensions/automation/query.js +77 -0
  47. package/dist/extensions/automation/write-guards.d.ts +59 -0
  48. package/dist/extensions/automation/write-guards.js +153 -0
  49. package/dist/extensions/automation.d.ts +41 -0
  50. package/dist/extensions/automation.js +54 -0
  51. package/dist/extensions/collab.d.ts +16 -0
  52. package/dist/extensions/collab.js +79 -0
  53. package/dist/extensions/doc/kinds/doc.kind.yaml +118 -0
  54. package/dist/extensions/doc.d.ts +25 -0
  55. package/dist/extensions/doc.js +10 -0
  56. package/dist/extensions/eval/kinds/eval-baseline.kind.yaml +65 -0
  57. package/dist/extensions/eval/kinds/eval-case.kind.yaml +140 -0
  58. package/dist/extensions/eval/kinds/eval-run.kind.yaml +134 -0
  59. package/dist/extensions/eval/kinds/eval-suite.kind.yaml +87 -0
  60. package/dist/extensions/eval.d.ts +24 -0
  61. package/dist/extensions/eval.js +31 -0
  62. package/dist/extensions/evidence/kinds/evidence.kind.yaml +92 -0
  63. package/dist/extensions/evidence.d.ts +17 -0
  64. package/dist/extensions/evidence.js +94 -0
  65. package/dist/extensions/federation.d.ts +22 -0
  66. package/dist/extensions/federation.js +173 -0
  67. package/dist/extensions/guardrails/DOCS.md +20 -0
  68. package/dist/extensions/guardrails.d.ts +31 -0
  69. package/dist/extensions/guardrails.js +228 -0
  70. package/dist/extensions/helix/DOCS-Actor.md +20 -0
  71. package/dist/extensions/helix/DOCS-Agent.md +20 -0
  72. package/dist/extensions/helix/DOCS-UseCase.md +20 -0
  73. package/dist/extensions/helix/layers.d.ts +12 -0
  74. package/dist/extensions/helix/layers.js +18 -0
  75. package/dist/extensions/helix/write-guards.d.ts +70 -0
  76. package/dist/extensions/helix/write-guards.js +172 -0
  77. package/dist/extensions/helix.d.ts +29 -0
  78. package/dist/extensions/helix.js +963 -0
  79. package/dist/extensions/helix_extras.d.ts +124 -0
  80. package/dist/extensions/helix_extras.js +328 -0
  81. package/dist/extensions/hooks.d.ts +31 -0
  82. package/dist/extensions/hooks.js +247 -0
  83. package/dist/extensions/kinddef/DOCS.md +24 -0
  84. package/dist/extensions/kinddef.d.ts +40 -0
  85. package/dist/extensions/kinddef.js +171 -0
  86. package/dist/extensions/lesson.d.ts +6 -0
  87. package/dist/extensions/lesson.js +194 -0
  88. package/dist/extensions/modelreg/kinds/model-profile.kind.yaml +155 -0
  89. package/dist/extensions/modelreg.d.ts +30 -0
  90. package/dist/extensions/modelreg.js +38 -0
  91. package/dist/extensions/recognizer.d.ts +34 -0
  92. package/dist/extensions/recognizer.js +272 -0
  93. package/dist/extensions/research.d.ts +32 -0
  94. package/dist/extensions/research.js +292 -0
  95. package/dist/extensions/safety.d.ts +33 -0
  96. package/dist/extensions/safety.js +230 -0
  97. package/dist/extensions/sdlc/kinds/adr.kind.yaml +136 -0
  98. package/dist/extensions/sdlc/kinds/archive-proposal.kind.yaml +107 -0
  99. package/dist/extensions/sdlc/kinds/changelog.kind.yaml +108 -0
  100. package/dist/extensions/sdlc/kinds/cognitive-policy.kind.yaml +470 -0
  101. package/dist/extensions/sdlc/kinds/forecast.kind.yaml +125 -0
  102. package/dist/extensions/sdlc/kinds/insight.kind.yaml +87 -0
  103. package/dist/extensions/sdlc/kinds/kaizen.kind.yaml +106 -0
  104. package/dist/extensions/sdlc/kinds/lesson-learned.kind.yaml +270 -0
  105. package/dist/extensions/sdlc/kinds/narrative.kind.yaml +189 -0
  106. package/dist/extensions/sdlc/kinds/pattern-insight.kind.yaml +204 -0
  107. package/dist/extensions/sdlc/kinds/postmortem.kind.yaml +168 -0
  108. package/dist/extensions/sdlc/kinds/pre-mortem.kind.yaml +145 -0
  109. package/dist/extensions/sdlc/kinds/prompt-template.kind.yaml +109 -0
  110. package/dist/extensions/sdlc/kinds/retrospective.kind.yaml +186 -0
  111. package/dist/extensions/sdlc/kinds/risk-register.kind.yaml +178 -0
  112. package/dist/extensions/sdlc/kinds/saved-view.kind.yaml +127 -0
  113. package/dist/extensions/sdlc/kinds/status-report.kind.yaml +129 -0
  114. package/dist/extensions/sdlc/kinds/synthesis-run.kind.yaml +279 -0
  115. package/dist/extensions/sdlc/kinds/synthesizer-state.kind.yaml +196 -0
  116. package/dist/extensions/sdlc/kinds/workflow-event.kind.yaml +195 -0
  117. package/dist/extensions/sdlc.d.ts +32 -0
  118. package/dist/extensions/sdlc.js +1318 -0
  119. package/dist/extensions/soulspec/DOCS.md +19 -0
  120. package/dist/extensions/soulspec.d.ts +22 -0
  121. package/dist/extensions/soulspec.js +287 -0
  122. package/dist/extensions/tenant.d.ts +6 -0
  123. package/dist/extensions/tenant.js +291 -0
  124. package/dist/extensions/testkit.d.ts +24 -0
  125. package/dist/extensions/testkit.js +211 -0
  126. package/dist/index.d.ts +80 -0
  127. package/dist/index.js +102 -0
  128. package/dist/kernel/_text.d.ts +28 -0
  129. package/dist/kernel/_text.js +42 -0
  130. package/dist/kernel/bundle-handle.d.ts +83 -0
  131. package/dist/kernel/bundle-handle.js +184 -0
  132. package/dist/kernel/capabilities.d.ts +157 -0
  133. package/dist/kernel/capabilities.js +109 -0
  134. package/dist/kernel/collaborator-ports.d.ts +91 -0
  135. package/dist/kernel/collaborator-ports.js +1 -0
  136. package/dist/kernel/composition-resolver.d.ts +215 -0
  137. package/dist/kernel/composition-resolver.js +558 -0
  138. package/dist/kernel/composition.d.ts +10 -0
  139. package/dist/kernel/composition.js +1 -0
  140. package/dist/kernel/descriptor-loader.d.ts +13 -0
  141. package/dist/kernel/descriptor-loader.js +48 -0
  142. package/dist/kernel/document.d.ts +43 -0
  143. package/dist/kernel/document.js +71 -0
  144. package/dist/kernel/embedding.d.ts +28 -0
  145. package/dist/kernel/embedding.js +78 -0
  146. package/dist/kernel/errors.d.ts +62 -0
  147. package/dist/kernel/errors.js +82 -0
  148. package/dist/kernel/events.d.ts +6 -0
  149. package/dist/kernel/events.js +21 -0
  150. package/dist/kernel/evidence-capture.d.ts +69 -0
  151. package/dist/kernel/evidence-capture.js +138 -0
  152. package/dist/kernel/fs.d.ts +20 -0
  153. package/dist/kernel/fs.js +128 -0
  154. package/dist/kernel/generic-rw.d.ts +33 -0
  155. package/dist/kernel/generic-rw.js +235 -0
  156. package/dist/kernel/hooks.d.ts +172 -0
  157. package/dist/kernel/hooks.js +256 -0
  158. package/dist/kernel/index.d.ts +624 -0
  159. package/dist/kernel/index.js +1638 -0
  160. package/dist/kernel/instance.d.ts +211 -0
  161. package/dist/kernel/instance.js +487 -0
  162. package/dist/kernel/kind-registry.d.ts +183 -0
  163. package/dist/kernel/kind-registry.js +710 -0
  164. package/dist/kernel/kind_base.d.ts +106 -0
  165. package/dist/kernel/kind_base.js +244 -0
  166. package/dist/kernel/layer-resolver.d.ts +48 -0
  167. package/dist/kernel/layer-resolver.js +284 -0
  168. package/dist/kernel/lock-manager.d.ts +21 -0
  169. package/dist/kernel/lock-manager.js +43 -0
  170. package/dist/kernel/lock.d.ts +38 -0
  171. package/dist/kernel/lock.js +115 -0
  172. package/dist/kernel/meta.d.ts +135 -0
  173. package/dist/kernel/meta.js +817 -0
  174. package/dist/kernel/models.d.ts +3089 -0
  175. package/dist/kernel/models.js +764 -0
  176. package/dist/kernel/navigator.d.ts +36 -0
  177. package/dist/kernel/navigator.js +132 -0
  178. package/dist/kernel/port-surface.d.ts +33 -0
  179. package/dist/kernel/port-surface.js +180 -0
  180. package/dist/kernel/preview.d.ts +60 -0
  181. package/dist/kernel/preview.js +54 -0
  182. package/dist/kernel/prompt-budget.d.ts +39 -0
  183. package/dist/kernel/prompt-budget.js +43 -0
  184. package/dist/kernel/prompt-builder.d.ts +25 -0
  185. package/dist/kernel/prompt-builder.js +237 -0
  186. package/dist/kernel/protocols.d.ts +751 -0
  187. package/dist/kernel/protocols.js +493 -0
  188. package/dist/kernel/reports.d.ts +26 -0
  189. package/dist/kernel/reports.js +215 -0
  190. package/dist/kernel/resolver.d.ts +146 -0
  191. package/dist/kernel/resolver.js +232 -0
  192. package/dist/kernel/resource.d.ts +57 -0
  193. package/dist/kernel/resource.js +97 -0
  194. package/dist/kernel/runtime.d.ts +16 -0
  195. package/dist/kernel/runtime.js +18 -0
  196. package/dist/kernel/safety-scanner.d.ts +38 -0
  197. package/dist/kernel/safety-scanner.js +228 -0
  198. package/dist/kernel/serialize-to-files.d.ts +29 -0
  199. package/dist/kernel/serialize-to-files.js +23 -0
  200. package/dist/kernel/spec-access.d.ts +23 -0
  201. package/dist/kernel/spec-access.js +40 -0
  202. package/dist/kernel/studio_ui.d.ts +88 -0
  203. package/dist/kernel/studio_ui.js +135 -0
  204. package/dist/kernel/templates.d.ts +77 -0
  205. package/dist/kernel/templates.js +116 -0
  206. package/dist/kernel/tool-registry.d.ts +52 -0
  207. package/dist/kernel/tool-registry.js +89 -0
  208. package/dist/kernel/write-pipeline.d.ts +65 -0
  209. package/dist/kernel/write-pipeline.js +271 -0
  210. package/dist/kernel/writer-helpers.d.ts +24 -0
  211. package/dist/kernel/writer-helpers.js +42 -0
  212. package/dist/memory/decay.d.ts +31 -0
  213. package/dist/memory/decay.js +97 -0
  214. package/dist/memory/ecphory.d.ts +25 -0
  215. package/dist/memory/ecphory.js +178 -0
  216. package/dist/memory/encodingContext.d.ts +21 -0
  217. package/dist/memory/encodingContext.js +62 -0
  218. package/dist/memory/index.d.ts +23 -0
  219. package/dist/memory/index.js +23 -0
  220. package/dist/memory/memoryType.d.ts +7 -0
  221. package/dist/memory/memoryType.js +24 -0
  222. package/dist/memory/policy.d.ts +35 -0
  223. package/dist/memory/policy.js +35 -0
  224. package/dist/memory/retrieval.d.ts +21 -0
  225. package/dist/memory/retrieval.js +145 -0
  226. package/dist/testing/index.d.ts +8 -0
  227. package/dist/testing/index.js +8 -0
  228. package/dist/testing/recordSearchConformance.d.ts +43 -0
  229. package/dist/testing/recordSearchConformance.js +147 -0
  230. package/dist/viz/ascii.d.ts +7 -0
  231. package/dist/viz/ascii.js +60 -0
  232. package/dist/viz/health.d.ts +8 -0
  233. package/dist/viz/health.js +161 -0
  234. package/dist/viz/index.d.ts +10 -0
  235. package/dist/viz/index.js +10 -0
  236. package/dist/viz/matrix.d.ts +8 -0
  237. package/dist/viz/matrix.js +84 -0
  238. package/dist/viz/mermaid.d.ts +38 -0
  239. package/dist/viz/mermaid.js +706 -0
  240. package/package.json +82 -0
@@ -0,0 +1,183 @@
1
+ /**
2
+ * KindRegistry — the kernel's registered-Kind identity map + the full
3
+ * registration funnel, extracted from the Kernel god-object (kernel
4
+ * decomposition, Fase 3 — `s-kernel-decomp-ts-parity`; Py twin:
5
+ * `dna/kernel/kind_registry.py`).
6
+ *
7
+ * Two surfaces live here:
8
+ *
9
+ * - **Lookup** (pre-F3): the `kinds` map + the read surface (port lookup,
10
+ * alias, storage/container resolution, container→kind, describe). Also
11
+ * exported as the PURE functions `kindPortForOver` / `resolveDepFilterTargetOver`
12
+ * so a registry VIEW over an existing map (CompositionEngine / nav_kernel /
13
+ * the ManifestInstance) shares the ONE canonical resolver without holding a
14
+ * class instance.
15
+ * - **Registration** (this slice): `registerKind` (the H1 validation funnel —
16
+ * interface/dup-key/dup-alias/BUNDLE-marker/plane/i-195-name-collision +
17
+ * alias generation), the static `_lintPlane` helper, `registerFromDescriptor`
18
+ * (builtin `*.kind.yaml` descriptors) and `registerKindDefinitions` (the
19
+ * per-scope KindDefinition funnel — warn+skip instead of throw). The kernel
20
+ * keeps `kind()` / `kindFromDescriptor()` / `_registerKindDefinitions()` /
21
+ * `_registerCustomKinds()` as THIN facades delegating here.
22
+ *
23
+ * Registration mutates `this.kinds` directly (the registry OWNS the map; the
24
+ * kernel's `_kinds` getter proxies to it, so the ~20 inline `this._kinds` read
25
+ * sites across the kernel keep working unchanged). Side effects that touch the
26
+ * wider kernel — hooks (`kinddef_conflict` / `parse_error` events), the
27
+ * `_readers` list (the rescan return gate), the generic reader/writer wiring,
28
+ * the `_genericsResolved` flag, and the `_loadingExtOwner` alias-owner context —
29
+ * route through a NARROW `RegistryHost` back-ref (the anti-cosmetic rule, spec
30
+ * §3.1): the kernel satisfies it structurally. View-only registries pass no host
31
+ * and use only the lookup surface / pure functions.
32
+ *
33
+ * One registry per kernel, shared across `withTenant` shallow copies (Kinds are
34
+ * global — registered once at boot on the base kernel).
35
+ *
36
+ * The map is keyed `${apiVersion}\0${kind}` — the same shape held by both the
37
+ * Kernel and the ManifestInstance.
38
+ */
39
+ import type { KindPort, StorageDescriptor } from "./protocols.js";
40
+ import type { RegistryHost } from "./collaborator-ports.js";
41
+ /**
42
+ * Resolve a kind's prose documentation.
43
+ *
44
+ * Resolution order:
45
+ * 1. DOCS-<KindName>.md next to the extension's source file
46
+ * (inside `<basename>/`, where basename is the extension .ts stem)
47
+ * 2. DOCS.md in that same directory
48
+ * 3. The `docs` attribute on the KindPort
49
+ * 4. null
50
+ *
51
+ * Browser consumers (Tauri Studio / Vite) stub node:fs/path/url via
52
+ * `nodeStubPlugin` in vite.config.ts — filesystem reads return empty and
53
+ * the loader transparently falls through to `kp.docs`.
54
+ */
55
+ export declare function loadKindDocs(kp: KindPort): string | null;
56
+ /** CamelCase kind name → kebab-case: EvalCase → eval-case, ADR → adr,
57
+ * HTMLThing → html-thing. */
58
+ export declare function kebabKindName(kind: string): string;
59
+ /** The canonical alias for a Kind: `<owner>-<kebab(kind)>`. */
60
+ export declare function generateAlias(owner: string, kind: string): string;
61
+ /** Ratchet (shrink-only): every builtin CLASS Kind that still hand-types
62
+ * its alias — the live wire format that CANNOT be renamed without a doc
63
+ * migration. New Kinds must OMIT the alias (generation). Entries leave
64
+ * as classes migrate to generation/descriptors — NEVER add one
65
+ * (tests/alias-generation.test.ts, ratchet test). Py twin:
66
+ * dna.kernel.kind_registry.EXPLICIT_ALIAS_ALLOWLIST — the TS set
67
+ * excludes the Py-only extensions (gaia-*, collab-comment) and includes
68
+ * every TS class port, per kind-registry-parity.json. */
69
+ export declare const EXPLICIT_ALIAS_ALLOWLIST: ReadonlySet<string>;
70
+ /** i-195 — kind names allowed to exist under MULTIPLE apiVersions in the
71
+ * extension/builtin funnel. SHRINK-ONLY ratchet: the Reference pair
72
+ * (github.com/ruinosus/dna/research/v1 + github.com/ruinosus/dna/sdlc/v1) predates the guard and is scheduled
73
+ * to be merged by the Reference-family unification follow-up; when that
74
+ * lands, empty this set. NEVER add a name here — rename the new Kind
75
+ * instead (bare-name lookups become ambiguous the moment two
76
+ * apiVersions share a kind name). Py twin:
77
+ * dna.kernel.kind_registry.KIND_NAME_COLLISION_ALLOWLIST. */
78
+ export declare const KIND_NAME_COLLISION_ALLOWLIST: ReadonlySet<string>;
79
+ /**
80
+ * Lookup a registered KindPort by kind name (case-sensitive) over `kinds`.
81
+ * With `apiVersion` the lookup is EXACT on (apiVersion, kind) — bare
82
+ * lookups on a name shared by multiple apiVersions resolve
83
+ * extension-first then registration order (i-195, Py twin:
84
+ * `KindRegistry.port_for`).
85
+ */
86
+ export declare function kindPortForOver(kinds: Map<string, KindPort>, kind: string, apiVersion?: string): KindPort | null;
87
+ /**
88
+ * Canonical dep_filter target resolution (s-alias-generated-not-typed).
89
+ *
90
+ * The CONTRACT is alias-valued dep_filters (`"soulspec-soul"`). The
91
+ * legacy `"kind=<Name>"` format resolves through a DEPRECATED shim so
92
+ * per-scope KindDefinition docs keep working (builtin extensions must be
93
+ * alias-pure — `validateDepFilters` rejects `kind=` there). Since
94
+ * s-unify-composition-subsystems this is THE resolver for every
95
+ * dep_filter reader — `validateRefs` / `mi.composition` and the Kernel.
96
+ * Py twin: `KindRegistry.resolve_dep_filter_target`.
97
+ */
98
+ export declare function resolveDepFilterTargetOver(kinds: Map<string, KindPort>, value: string): KindPort | null;
99
+ /**
100
+ * Holds the registered KindPorts + the lookups + the registration funnel.
101
+ */
102
+ export declare class KindRegistry {
103
+ /** Key: "apiVersion\0kind" for uniqueness. OWNED here; the kernel's
104
+ * `_kinds` getter proxies to it. */
105
+ readonly kinds: Map<string, KindPort>;
106
+ /** The NARROW `RegistryHost` back-ref used ONLY by the registration
107
+ * funnel (hooks fan-out, the `_readers` rescan gate, generic
108
+ * reader/writer wiring, `_genericsResolved`, the `_loadingExtOwner`
109
+ * alias-owner context). Only read at registration time (boot) — so the
110
+ * kernel may pass `this` before its `hooks`/`_readers` are fully wired.
111
+ * View-only registries pass `null` and never call `register*`. */
112
+ private readonly _host;
113
+ constructor(kinds?: Map<string, KindPort>, host?: RegistryHost | null);
114
+ /** Lookup a registered KindPort by kind name (case-sensitive). With
115
+ * apiVersion the lookup is EXACT on (apiVersion, kind); bare lookups on
116
+ * an ambiguous name resolve extension-first then registration order
117
+ * (i-195). Py twin: `KindRegistry.port_for`. */
118
+ portFor(kind: string, apiVersion?: string): KindPort | null;
119
+ /** All registered KindPorts. Order matches registration. */
120
+ allPorts(): KindPort[];
121
+ /** Resolve a kind name to its globally-unique alias (`<owner>-<kind>`).
122
+ * Falls back to `kind.toLowerCase()` when no registered port provides
123
+ * one. Py twin: `KindRegistry.alias_for`. */
124
+ aliasFor(kind: string, apiVersion?: string): string;
125
+ /** Return the storage container directory for a kind, or null. */
126
+ containerFor(kindName: string): string | null;
127
+ /** Return the StorageDescriptor for a kind, or null if unknown. */
128
+ storageFor(kindName: string): StorageDescriptor | null;
129
+ /** Return the kind name whose StorageDescriptor.container matches.
130
+ * null for empty container (ROOT kinds) or unregistered containers. */
131
+ byContainer(container: string): string | null;
132
+ /** Canonical dep_filter target resolution (s-alias-generated-not-typed).
133
+ * Delegates to the shared `resolveDepFilterTargetOver`. Py twin:
134
+ * `KindRegistry.resolve_dep_filter_target`. */
135
+ resolveDepFilterTarget(value: string): KindPort | null;
136
+ /** Summary dict for a registered kind, including resolved docs. Py twin:
137
+ * `KindRegistry.describe`. */
138
+ describe(kindName: string): Record<string, unknown> | null;
139
+ /** s-alias-generated-not-typed — every dep_filter target of an
140
+ * EXTENSION-registered Kind must resolve to a registered alias.
141
+ *
142
+ * Aliases are the wire key of dep_filters / Mustache sections /
143
+ * LayerPolicy — a typo used to degrade the prompt SILENTLY (the dep
144
+ * just vanished from the context, warning buried in logs). Called at
145
+ * the end of `loadBuiltins()` (the TS twin of `Kernel.auto()`).
146
+ *
147
+ * - Extension/builtin port with an unknown alias OR the legacy
148
+ * `kind=` format → `KindRegistrationError` (boot fails loud).
149
+ * - Per-scope declarative ports (user KindDefinition docs) only WARN
150
+ * — user docs never take the boot down (same posture as the
151
+ * parse_error / plane-lint funnels).
152
+ * Py twin: `KindRegistry.validate_dep_filters`. */
153
+ validateDepFilters(): void;
154
+ /** H1 registration funnel — moved verbatim from `Kernel.kind()`. The
155
+ * kernel keeps `kind()` as a thin facade delegating here. Py twin:
156
+ * `KindRegistry.register_kind`. */
157
+ registerKind(k: KindPort): void;
158
+ /** Two-planes lint (spec D1) — plane is explicit and validated, never
159
+ * derived. A "record" Kind cannot carry any composition signal;
160
+ * contradictions fail registration loudly instead of silently
161
+ * mis-routing the write path.
162
+ *
163
+ * F3 (spec D3): extracted from `registerKind()` so BOTH funnels run it —
164
+ * `registerKind()` (extension classes + builtin descriptors) throws;
165
+ * `registerKindDefinitions` (per-scope) catches → warn + skip
166
+ * (per-scope docs never take the boot down). Mirrors Python
167
+ * KindRegistry._lint_plane. */
168
+ static _lintPlane(k: KindPort): void;
169
+ /** F3 (spec D3): register a BUILTIN Kind from a KindDefinition
170
+ * descriptor (`kinds/*.kind.yaml` package data). Same format + same
171
+ * funnel as everything else. Py twin:
172
+ * `KindRegistry.register_from_descriptor`. */
173
+ registerFromDescriptor(raw: Record<string, unknown>): KindPort;
174
+ /** Phase 1 of 2-phase loading: parse KindDefinition docs + register
175
+ * synthetic DeclarativeKindPorts. Extension-registered kinds win on
176
+ * conflict. Returns true iff new BUNDLE readers were added (the rescan
177
+ * gate). Py twin: `KindRegistry.register_kind_definitions`. */
178
+ registerKindDefinitions(rawDocs: Record<string, unknown>[]): boolean;
179
+ /** Register dynamic kinds from `Module.spec.custom_kinds`. Py twin:
180
+ * `KindRegistry.register_custom_kinds`. */
181
+ registerCustomKinds(manifest: Record<string, unknown>): void;
182
+ static _makeDynamicKind(av: string, kn: string, al: string): KindPort;
183
+ }