@nodaro/shared 2.22.0 → 2.23.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": "@nodaro/shared",
3
- "version": "2.22.0",
3
+ "version": "2.23.0",
4
4
  "description": "Shared types, model catalog, wire contracts, and structural vocabularies for the Nodaro platform and SDK.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
package/src/index.ts CHANGED
@@ -3,6 +3,7 @@ export type {
3
3
  GenericEdge,
4
4
  CharacterDef,
5
5
  ConnectedReference,
6
+ DescribedReference,
6
7
  IdentityFidelity,
7
8
  IdentityMeta,
8
9
  ReferenceSource,
package/src/types.ts CHANGED
@@ -214,6 +214,49 @@ export interface ConnectedReference {
214
214
  * The single new structured-shape field for external (API/MCP/SDK) parity.
215
215
  */
216
216
  readonly identityLock?: { enabled: boolean; text?: string }
217
+ /**
218
+ * PER-USE identity description for this reference — what the caller wants the
219
+ * model told about this subject THIS TIME, overriding whatever the entity's
220
+ * library record says. Wherever a reference's identity description already
221
+ * renders (the legacy identity bullet's `— <desc>` part, a `{image:N:label}`
222
+ * directive's descriptor) it WINS over `characterCanonicalDescription` /
223
+ * `locationCanonicalDescription` / `description`; where the HYBRID format
224
+ * renders no description at all, it adds one trailing `<binding> — <override>.`
225
+ * line instead.
226
+ *
227
+ * The two formats are deliberately ASYMMETRIC where a reference renders no
228
+ * directive at all — a plain upload (`manual` / `wired-image`, non-extra) that
229
+ * is neither `@`-mentioned nor `{image:N}`-covered: the LEGACY format stays
230
+ * silent, and the override is not surfaced there (a bullet would force a
231
+ * fidelity verb onto an opaque image); the HYBRID format — the production
232
+ * default — adds the trailing line above for it.
233
+ *
234
+ * DISTINCT from `description`, which stays the reference's own label slot (the
235
+ * free text an extra-ref row / an upstream node carries) — a caller that edits
236
+ * the wording for ONE use writes it here, so the label is untouched and
237
+ * dropping the override falls back to the library wording. Absent →
238
+ * byte-identical to a caller that never sent it.
239
+ */
240
+ readonly descriptionOverride?: string
241
+ }
242
+
243
+ /**
244
+ * A reference the caller can NAME and DESCRIBE but has no media for — a cast
245
+ * role no entity has been bound to yet, an analysis slot, a character the author
246
+ * has only written down. It carries no `url`, so it attaches no reference image
247
+ * and claims no `@image_N` seat; it reaches the model purely as prose
248
+ * (`<Name> — <description>.`), rendered in ONE place per lane by
249
+ * `@nodaro/prompts`' `renderDescribedReferenceLines`.
250
+ *
251
+ * Correlation with the prompt body is BY NAME: the caller leaves the name in the
252
+ * prose (never an indexed `@slug:N` mention — that grammar is url-gated) and the
253
+ * described line tells the model who that name is.
254
+ */
255
+ export interface DescribedReference {
256
+ /** Display name exactly as it appears in the prompt prose (e.g. "Natalie"). */
257
+ readonly name: string
258
+ /** What the model should picture when it reads that name. */
259
+ readonly description: string
217
260
  }
218
261
 
219
262
  /** Default label per source — used by `@` autocomplete and inventory fallback. */