@ego-z/contracts 0.15.13 → 0.15.14
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 +1 -1
- package/src/ask.d.ts +27 -1
- package/src/draft-conv.d.ts +2 -0
package/package.json
CHANGED
package/src/ask.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import type { Intent, JsonSchemaDefinition, ResponseFormat, TokenUsage } from './envelope';
|
|
9
|
-
import type { InitContextItem, InitContextItemAccepted, InitContextUi } from './draft-conv';
|
|
9
|
+
import type { InitContextItem, InitContextItemAccepted, InitContextTenant, InitContextUi } from './draft-conv';
|
|
10
10
|
import type { AskQuestionSet } from './questions';
|
|
11
11
|
|
|
12
12
|
// ============================================================================
|
|
@@ -242,6 +242,32 @@ export interface AskRequestBody {
|
|
|
242
242
|
*/
|
|
243
243
|
contextItems?: InitContextItem[];
|
|
244
244
|
|
|
245
|
+
/**
|
|
246
|
+
* The tenant AS IT IS NOW — sent when it may have changed since the
|
|
247
|
+
* conversation began.
|
|
248
|
+
*
|
|
249
|
+
* ── Why per-turn ─────────────────────────────────────────────────────
|
|
250
|
+
*
|
|
251
|
+
* The draft's `initContext.tenant` is captured once, and its `features`
|
|
252
|
+
* are rendered to the agent as a hard rule on every turn: disabled means
|
|
253
|
+
* "never offer". A tenant whose features change mid-conversation — a setup
|
|
254
|
+
* flow switching bookings on — would otherwise be told, turn after turn,
|
|
255
|
+
* that the thing it just enabled is off.
|
|
256
|
+
*
|
|
257
|
+
* ── Merged, and kept ─────────────────────────────────────────────────
|
|
258
|
+
*
|
|
259
|
+
* The keys you SEND replace the stored ones; keys you omit keep their
|
|
260
|
+
* stored value, and `null` clears one. `features` is replaced as a whole
|
|
261
|
+
* map — send the complete current set, not a delta. The merged block is
|
|
262
|
+
* kept on the conversation (except for a no-store tenant), so a later
|
|
263
|
+
* turn that omits this field still sees it.
|
|
264
|
+
*
|
|
265
|
+
* Validated exactly like `initContext.tenant`: an invalid block is a 400.
|
|
266
|
+
*
|
|
267
|
+
* Optional and additive: omit it and nothing changes.
|
|
268
|
+
*/
|
|
269
|
+
tenant?: InitContextTenant;
|
|
270
|
+
|
|
245
271
|
/**
|
|
246
272
|
* Output a MACHINE produced for this turn — the result of something the
|
|
247
273
|
* user asked to have run, not anything the user said.
|
package/src/draft-conv.d.ts
CHANGED
|
@@ -456,6 +456,8 @@ export interface InitContextTenant {
|
|
|
456
456
|
name?: string | null;
|
|
457
457
|
description?: string | null;
|
|
458
458
|
category?: string | null;
|
|
459
|
+
/** What the business is, in the caller's words — finer than `category` ("barbershop"). */
|
|
460
|
+
niche?: string | null;
|
|
459
461
|
/** Enabled-feature flags, e.g. `{ products: true, booking: false }`. */
|
|
460
462
|
features?: Record<string, boolean>;
|
|
461
463
|
}
|