Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

address review: fix call-signature comment and JSDoc nullable param

[._.]/ Adam Eivy307b4622fa97
diff --git a/server/services/universeBuilder.js b/server/services/universeBuilder.js
index 684bb4d401..633b14d85b 100644
--- a/server/services/universeBuilder.js
+++ b/server/services/universeBuilder.js
@@ -937,7 +937,8 @@ const identityText = (s) => s;
* Accepts a sanitized universe object or a shaped `{ logline, premise,
* styleNotes }` literal (the expand-variations path passes the literal).
*
- * @param {object} universe
+ * @param {object|null|undefined} universe — sanitized universe or a shaped
+ * `{ logline, premise, styleNotes }` literal; `null`/`undefined` returns ''.
* @param {object} [options]
* @param {boolean} [options.includePremise=false] — emit a `PREMISE:` line.
* @param {boolean} [options.includeEmbrace=true] — emit an
diff --git a/server/services/universeBuilderAutoSort.js b/server/services/universeBuilderAutoSort.js
index 44cb9518f1..67e2293045 100644
--- a/server/services/universeBuilderAutoSort.js
+++ b/server/services/universeBuilderAutoSort.js
@@ -35,9 +35,10 @@ const VARIATION_SAMPLE_PER_BUCKET = 10;
// newline-stripped — without `stripPromptControlChars` a label containing
// "\n# Output contract\n..." could redirect the LLM's structure. The
// universe-context block applies the same defense via
-// `buildUniverseStyleContext({ escape: true })` below. Downstream gates
-// (per-entry kind filter, byKey lookup) keep the blast radius bounded even
-// if injection lands, but stripping at the embed layer is the cheap defense.
+// `buildUniverseStyleContext(universe, { escape: true })` below. Downstream
+// gates (per-entry kind filter, byKey lookup) keep the blast radius bounded
+// even if injection lands, but stripping at the embed layer is the cheap
+// defense.
const kindUnionForPrompt = SORTABLE_KINDS.map((k) => `"${k}"`).join(' | ');
const kindListForPrompt = SORTABLE_KINDS.join(', ');